mirror of https://github.com/F-Stack/f-stack.git
🐛 tools should init dpdk before all malloc for the same 'virtual memory address'
This commit is contained in:
parent
47da7658f2
commit
85eb2ae96a
|
@ -51,7 +51,7 @@ ff_set_proc_id(int pid)
|
|||
ff_proc_id = pid;
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
ff_ipc_init(void)
|
||||
{
|
||||
if (inited) {
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
/* Set F-Stack proccess id to communicate with */
|
||||
void ff_set_proc_id(int pid);
|
||||
|
||||
int ff_ipc_init(void);
|
||||
struct ff_msg *ff_ipc_msg_alloc(void);
|
||||
int ff_ipc_msg_free(struct ff_msg *msg);
|
||||
|
||||
|
|
|
@ -426,6 +426,8 @@ main(int argc, char *argv[])
|
|||
struct option *p;
|
||||
size_t iflen;
|
||||
|
||||
ff_ipc_init();
|
||||
|
||||
all = downonly = uponly = namesonly = noload = verbose = 0;
|
||||
f_inet = f_inet6 = f_ether = f_addr = NULL;
|
||||
|
||||
|
|
|
@ -247,6 +247,8 @@ main(int argc, char *argv[])
|
|||
char *endptr;
|
||||
bool first = true;
|
||||
|
||||
ff_ipc_init();
|
||||
|
||||
af = AF_UNSPEC;
|
||||
|
||||
argc = xo_parse_args(argc, argv);
|
||||
|
|
|
@ -281,6 +281,8 @@ main(int argc, char **argv)
|
|||
if (argc < 2)
|
||||
usage(NULL);
|
||||
|
||||
ff_ipc_init();
|
||||
|
||||
#ifndef FSTACK
|
||||
while ((ch = getopt(argc, argv, "46nqdtv")) != -1)
|
||||
#else
|
||||
|
|
|
@ -241,6 +241,8 @@ main(int argc, char **argv)
|
|||
int ch;
|
||||
int warncount = 0;
|
||||
|
||||
ff_ipc_init();
|
||||
|
||||
setlocale(LC_NUMERIC, "");
|
||||
setbuf(stdout,0);
|
||||
setbuf(stderr,0);
|
||||
|
|
|
@ -53,6 +53,8 @@ int main(int argc, char **argv)
|
|||
unsigned int i;
|
||||
struct ff_top_args top, otop;
|
||||
|
||||
ff_ipc_init();
|
||||
|
||||
#define TOP_DIFF(member) (top.member - otop.member)
|
||||
|
||||
while ((ch = getopt(argc, argv, "hp:d:n:")) != -1) {
|
||||
|
|
Loading…
Reference in New Issue