summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXueming Li <xuemingl@mellanox.com>2017-09-15 23:37:21 +0800
committerThomas Monjalon <thomas@monjalon.net>2017-10-14 00:36:12 +0200
commit9b85b871cc52d1219f5a68131059e539f7ee9916 (patch)
tree67ca0ff284055edcb16e04b79e0e2afca390a7cc
parent7a08b1d860a3adbc7315bc5ca532d541d07310af (diff)
downloaddpdk-9b85b871cc52d1219f5a68131059e539f7ee9916.zip
dpdk-9b85b871cc52d1219f5a68131059e539f7ee9916.tar.gz
dpdk-9b85b871cc52d1219f5a68131059e539f7ee9916.tar.xz
examples/l2fwd_fork: fix message pool init
Some invalid callback functions are provided to rte_pktmbuf_pool_init() without their associated data causing a segmentation fault when the function tries to use it. In this example, those callbacks are not necessary, they can be safely replaced by NULL pointers. Fixes: 95e8005a56e8 ("examples/l2fwd_fork: new app") Cc: stable@dpdk.org Signed-off-by: Xueming Li <xuemingl@mellanox.com>
-rw-r--r--examples/multi_process/l2fwd_fork/main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c
index 238b7f6..d273e45 100644
--- a/examples/multi_process/l2fwd_fork/main.c
+++ b/examples/multi_process/l2fwd_fork/main.c
@@ -1205,10 +1205,7 @@ main(int argc, char **argv)
message_pool = rte_mempool_create("ms_msg_pool",
NB_CORE_MSGBUF * RTE_MAX_LCORE,
sizeof(enum l2fwd_cmd), NB_CORE_MSGBUF / 2,
- 0,
- rte_pktmbuf_pool_init, NULL,
- rte_pktmbuf_init, NULL,
- rte_socket_id(), 0);
+ 0, NULL, NULL, NULL, NULL, rte_socket_id(), 0);
if (message_pool == NULL)
rte_exit(EXIT_FAILURE, "Create msg mempool failed\n");