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 0648CA04F2; Fri, 6 Dec 2019 11:44:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6C5391BF92; Fri, 6 Dec 2019 11:44:38 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 8B2941BF8D for ; Fri, 6 Dec 2019 11:44:35 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Dec 2019 02:44:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,284,1571727600"; d="scan'208";a="362204167" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.92]) ([10.237.220.92]) by orsmga004.jf.intel.com with ESMTP; 06 Dec 2019 02:44:33 -0800 To: Yasufumi Ogawa , konstantin.ananyev@intel.com, david.marchand@redhat.com, dev@dpdk.org Cc: yasufumi.ogawa.gy@hco.ntt.co.jp, Yasufumi Ogawa References: <20191113214346.33749-1-yasufum.o@gmail.com> <20191127084826.3519-1-yasufum.o@gmail.com> <20191127084826.3519-2-yasufum.o@gmail.com> From: "Burakov, Anatoly" Message-ID: <2dc8c11a-ec17-7b26-b79e-bed4e6063f6b@intel.com> Date: Fri, 6 Dec 2019 10:44:32 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <20191127084826.3519-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 v8 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 27-Nov-19 8:48 AM, Yasufumi Ogawa 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. > > Signed-off-by: Yasufumi Ogawa > --- > lib/librte_eal/common/include/rte_fbarray.h | 7 ++++++- > lib/librte_eal/linux/eal/eal_memalloc.c | 11 ++++++++--- > 2 files changed, 14 insertions(+), 4 deletions(-) > > diff --git a/lib/librte_eal/common/include/rte_fbarray.h b/lib/librte_eal/common/include/rte_fbarray.h > index 6dccdbec9..df003b8dc 100644 > --- a/lib/librte_eal/common/include/rte_fbarray.h > +++ b/lib/librte_eal/common/include/rte_fbarray.h > @@ -39,7 +39,12 @@ extern "C" { > #include > #include > > -#define RTE_FBARRAY_NAME_LEN 64 > +/* Filename of fbarray is defined as a combination of several params > + * such as "fbarray_memseg-1048576k-0-0_PID_HOSTNAME". > + * The length of string before PID can be 32bytes, and the length of > + * PID can be 7bytes maximamly. Final 1 byte is for null terminator. > + */ > +#define RTE_FBARRAY_NAME_LEN (32 + 7 + 1 + HOST_NAME_MAX + 1) > This breaks ABI, but i believe this doesn't break *stable* ABI, so it is OK. Reviewed-by: Anatoly Burakov -- Thanks, Anatoly