From: Xueming Li <xuemingl@mellanox.com>
To: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Cc: dev@dpdk.org, Xueming Li <xuemingl@mellanox.com>
Subject: [dpdk-dev] [PATCH v2] examples/l2fwd_fork: fix message pool init
Date: Fri, 15 Sep 2017 23:37:21 +0800 [thread overview]
Message-ID: <1505489841-71452-1-git-send-email-xuemingl@mellanox.com> (raw)
In-Reply-To: <20170823022135.169012-1-xuemingl@mellanox.com>
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 <sergio.gonzalez.monroy@intel.com>
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
---
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
next prev parent reply other threads:[~2017-09-15 15:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 2:21 [dpdk-dev] [PATCH] examples/l2fwd_fork: fix messaage " Xueming Li
2017-09-15 15:37 ` Xueming Li [this message]
2017-10-13 22:33 ` [dpdk-dev] [PATCH v2] examples/l2fwd_fork: fix message " Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1505489841-71452-1-git-send-email-xuemingl@mellanox.com \
--to=xuemingl@mellanox.com \
--cc=dev@dpdk.org \
--cc=sergio.gonzalez.monroy@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).