DPDK patches and discussions
 help / color / mirror / Atom feed
From: Li Han <han.li1@zte.com.cn>
To: anatoly.burakov@intel.com
Cc: dev@dpdk.org, Li Han <han.li1@zte.com.cn>
Subject: [dpdk-dev] [PATCH] eal/linux: fix muti-secondary msl create issue
Date: Wed, 20 Nov 2019 09:55:17 +0800	[thread overview]
Message-ID: <1574214917-7700-1-git-send-email-han.li1@zte.com.cn> (raw)

when we run dpdk in docker, process pid may the same.
add rte_rdtsc() to ensure all the names used in rte_fbarray_init
are different.

Signed-off-by: Li Han <han.li1@zte.com.cn>
---
 lib/librte_eal/linux/eal/eal_memalloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c
index af6d0d0..65a7183 100644
--- a/lib/librte_eal/linux/eal/eal_memalloc.c
+++ b/lib/librte_eal/linux/eal/eal_memalloc.c
@@ -1374,8 +1374,8 @@ struct rte_memseg *
 	local_msl = &local_memsegs[msl_idx];
 
 	/* create distinct fbarrays for each secondary */
-	snprintf(name, RTE_FBARRAY_NAME_LEN, "%s_%i",
-		primary_msl->memseg_arr.name, getpid());
+	snprintf(name, RTE_FBARRAY_NAME_LEN, "%s_%i_%"PRIx64,
+		primary_msl->memseg_arr.name, getpid(), rte_rdtsc());
 
 	ret = rte_fbarray_init(&local_msl->memseg_arr, name,
 		primary_msl->memseg_arr.len,
-- 
1.8.3.1


             reply	other threads:[~2019-11-20  2:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-20  1:55 Li Han [this message]
2019-11-20  7:36 ` David Marchand
2019-11-20 10:45 ` Ananyev, Konstantin

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=1574214917-7700-1-git-send-email-han.li1@zte.com.cn \
    --to=han.li1@zte.com.cn \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    /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).