DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Li Han <han.li1@zte.com.cn>,
	"Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] eal/linux: fix muti-secondary msl create issue
Date: Wed, 20 Nov 2019 10:45:19 +0000	[thread overview]
Message-ID: <SN6PR11MB25586588763905664C0BD8CD9A4F0@SN6PR11MB2558.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1574214917-7700-1-git-send-email-han.li1@zte.com.cn>


> 
> 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.

There is another patch addressing similar issue, but in a slightly
different way:
http://patches.dpdk.org/patch/62972/


> 
> 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


      parent reply	other threads:[~2019-11-20 10:45 UTC|newest]

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

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=SN6PR11MB25586588763905664C0BD8CD9A4F0@SN6PR11MB2558.namprd11.prod.outlook.com \
    --to=konstantin.ananyev@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=han.li1@zte.com.cn \
    /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).