DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: hengx.ding@intel.com, qian.q.xu@intel.com,
	konstantin.ananyev@intel.com, dev@dpdk.org
Subject: [dpdk-dev] [PATCH] examples: fix duplicated lpm6 name
Date: Mon, 13 Jun 2016 11:43:03 +0200	[thread overview]
Message-ID: <1465810983-11324-1-git-send-email-olivier.matz@6wind.com> (raw)
In-Reply-To: <575E72D4.7010104@6wind.com>

When starting the ip_fragmentation or ip_reassembly example
on several sockets, it fails.

The name of the lpm6 table is the same on every socket,
resulting in a table creation failure (-EEXIST). The failure
appeared after:
commit f82f705b635d ("lpm: fix allocation of an existing object")

Indeed, before this commit the returned value when the existing
table, which was probably a bug in that case: one table for 2
sockets for lpm6, and one per socket for lpm.

Fixes: 74de12b7b63a ("examples/ip_fragmentation: overhaul")
Fixes: b84fb4cb88ff ("examples/ip_reassembly: overhaul")
Reported-by: Ding Heng <hengx.ding@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 examples/ip_fragmentation/main.c | 2 +-
 examples/ip_reassembly/main.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index b00f1e6..2f45264 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -785,7 +785,7 @@ init_mem(void)
 			RTE_LOG(INFO, IP_FRAG, "Creating LPM6 table on socket %i\n", socket);
 			snprintf(buf, sizeof(buf), "IP_FRAG_LPM_%i", socket);
 
-			lpm6 = rte_lpm6_create("IP_FRAG_LPM6", socket, &lpm6_config);
+			lpm6 = rte_lpm6_create(buf, socket, &lpm6_config);
 			if (lpm6 == NULL) {
 				RTE_LOG(ERR, IP_FRAG, "Cannot create LPM table\n");
 				return -1;
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index a8aabdc..ef09a2e 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -963,7 +963,7 @@ init_mem(void)
 			RTE_LOG(INFO, IP_RSMBL, "Creating LPM6 table on socket %i\n", socket);
 			snprintf(buf, sizeof(buf), "IP_RSMBL_LPM_%i", socket);
 
-			lpm6 = rte_lpm6_create("IP_RSMBL_LPM6", socket, &lpm6_config);
+			lpm6 = rte_lpm6_create(buf, socket, &lpm6_config);
 			if (lpm6 == NULL) {
 				RTE_LOG(ERR, IP_RSMBL, "Cannot create LPM table\n");
 				return -1;
-- 
2.8.0.rc3

  reply	other threads:[~2016-06-13  9:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13  7:41 [dpdk-dev] run ip_fragmentation with cores in different socket will cause core dump Ding, HengX
2016-06-13  8:46 ` Olivier Matz
2016-06-13  9:43   ` Olivier Matz [this message]
2016-06-15 14:30     ` [dpdk-dev] [PATCH] examples: fix duplicated lpm6 name 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=1465810983-11324-1-git-send-email-olivier.matz@6wind.com \
    --to=olivier.matz@6wind.com \
    --cc=dev@dpdk.org \
    --cc=hengx.ding@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=qian.q.xu@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).