From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AB188A04C2; Thu, 14 Nov 2019 11:01:57 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B696D374; Thu, 14 Nov 2019 11:01:56 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 7E301235; Thu, 14 Nov 2019 11:01:54 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2019 02:01:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,304,1569308400"; d="scan'208";a="203022200" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.252.7.220]) ([10.252.7.220]) by fmsmga008.fm.intel.com with ESMTP; 14 Nov 2019 02:01:51 -0800 To: yasufum.o@gmail.com, david.marchand@redhat.com, konstantin.ananyev@intel.com Cc: dev@dpdk.org, stable@dpdk.org, Yasufumi Ogawa References: <20190724082031.45546-1-yasufum.o@gmail.com> <20191113214346.33749-1-yasufum.o@gmail.com> <20191113214346.33749-2-yasufum.o@gmail.com> From: "Burakov, Anatoly" Message-ID: <6a6d7228-f22b-9ba5-c288-1701b738b7c4@intel.com> Date: Thu, 14 Nov 2019 10:01:50 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191113214346.33749-2-yasufum.o@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v7 1/1] fbarray: fix duplicated fbarray file in secondary 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 13-Nov-19 9:43 PM, yasufum.o@gmail.com wrote: > From: Yasufumi Ogawa > > In secondary_msl_create_walk(), it creates a file for fbarrays with its > PID for reserving unique name among secondary processes. However, it > does not work if several secondaries run as app containers because each > of containerized secondary has PID 1, and failed to reserve unique name > other than first one. To reserve unique name in each of containers, use > hostname in addition to PID. > > Cc: stable@dpdk.org > > Signed-off-by: Yasufumi Ogawa > --- > lib/librte_eal/linux/eal/eal_memalloc.c | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > > diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c > index af6d0d023..11de6d4d6 100644 > --- a/lib/librte_eal/linux/eal/eal_memalloc.c > +++ b/lib/librte_eal/linux/eal/eal_memalloc.c > @@ -1365,6 +1365,12 @@ secondary_msl_create_walk(const struct rte_memseg_list *msl, > struct rte_memseg_list *primary_msl, *local_msl; > char name[PATH_MAX]; > int msl_idx, ret; > + char hostname[HOST_NAME_MAX+1] = { 0 }; > + /* filename of secondary's fbarray is defined such as > + * "fbarray_memseg-1048576k-0-0_PID_HOSTNAME" and length of PID > + * can be 7 digits maximumly. > + */ > + int fbarray_sec_name_len = 32 + 7 + 1 + HOST_NAME_MAX + 1; What does 32 stand for? Maybe #define both 32 and 7 values? Other than that, Acked-by: Anatoly Burakov -- Thanks, Anatoly