| 52 | } |
| 53 | |
| 54 | int |
| 55 | ff_ipc_init(void) |
| 56 | { |
| 57 | if (inited) { |
| 58 | return 0; |
| 59 | } |
| 60 | |
| 61 | char *dpdk_argv[] = { |
| 62 | "ff-ipc", "-c1", "-n4", |
| 63 | "--proc-type=secondary", |
| 64 | /* RTE_LOG_WARNING */ |
| 65 | "--log-level=5", |
| 66 | }; |
| 67 | |
| 68 | int ret = rte_eal_init(sizeof(dpdk_argv)/sizeof(dpdk_argv[0]), dpdk_argv); |
| 69 | if (ret < 0) { |
| 70 | rte_exit(EXIT_FAILURE, "Error with EAL initialization\n"); |
| 71 | } |
| 72 | |
| 73 | message_pool = rte_mempool_lookup(FF_MSG_POOL); |
| 74 | if (message_pool == NULL) { |
| 75 | rte_exit(EXIT_FAILURE, "lookup message pool:%s failed!\n", FF_MSG_POOL); |
| 76 | } |
| 77 | |
| 78 | inited = 1; |
| 79 | |
| 80 | return 0; |
| 81 | } |
| 82 | |
| 83 | void |
| 84 | ff_ipc_exit(void) |