From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 7EA55E5D for ; Fri, 15 Sep 2017 17:38:13 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from xuemingl@mellanox.com) with ESMTPS (AES256-SHA encrypted); 15 Sep 2017 18:38:08 +0300 Received: from dev-r630-05.mtbc.labs.mlnx (dev-r630-05.mtbc.labs.mlnx [10.12.205.160]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v8FFc7ob014085; Fri, 15 Sep 2017 18:38:08 +0300 Received: from dev-r630-05.mtbc.labs.mlnx (localhost [127.0.0.1]) by dev-r630-05.mtbc.labs.mlnx (8.14.7/8.14.7) with ESMTP id v8FFc626071504; Fri, 15 Sep 2017 23:38:06 +0800 Received: (from xuemingl@localhost) by dev-r630-05.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id v8FFc2r0071502; Fri, 15 Sep 2017 23:38:02 +0800 From: Xueming Li To: Sergio Gonzalez Monroy Cc: dev@dpdk.org, Xueming Li Date: Fri, 15 Sep 2017 23:37:21 +0800 Message-Id: <1505489841-71452-1-git-send-email-xuemingl@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <20170823022135.169012-1-xuemingl@mellanox.com> References: <20170823022135.169012-1-xuemingl@mellanox.com> Subject: [dpdk-dev] [PATCH v2] examples/l2fwd_fork: fix message pool init X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2017 15:38:13 -0000 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: Sergio Gonzalez Monroy Signed-off-by: Xueming Li --- examples/multi_process/l2fwd_fork/main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c index f8a626b..2e70c2f 100644 --- a/examples/multi_process/l2fwd_fork/main.c +++ b/examples/multi_process/l2fwd_fork/main.c @@ -1204,10 +1204,7 @@ struct l2fwd_port_statistics { 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"); -- 1.8.3.1