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 A2DE7A04C1; Wed, 20 Nov 2019 11:45:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4DB163256; Wed, 20 Nov 2019 11:45:24 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id AF2002F42 for ; Wed, 20 Nov 2019 11:45:22 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Nov 2019 02:45:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,221,1571727600"; d="scan'208";a="406769638" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga005.fm.intel.com with ESMTP; 20 Nov 2019 02:45:21 -0800 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 20 Nov 2019 02:45:21 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 20 Nov 2019 02:45:21 -0800 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (104.47.40.50) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 20 Nov 2019 02:45:21 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pii/drVLX+aqMX1bKPgVc/j1g5xfRWp5RvOaIicBRj80nj8yBrYLu2kjF7/acYerLtJhUsvKm7cqC6NqI6vbsKaOws6uBj1sPWDpmMej6oNwiwDWMykrWH9ifmGwh/1R+e3Or9YKjrnRWlb57v5uhXtABwVrBff3j0TxCdWl5zXV2dbPMGDtNTaRZJpv3FzforfGHsD7lZ/myir3hyI3UhZfuEenGEL7NQ7cY4ZiA5HVIhVby2+YTl+5KRtw0I83aAFxZtbWP2Oc5BjTWkas7PiuyZZcIf6ZX9Pt9D7VYfITB1Z/SBJ/3E2qXKDwsCYdLTVQ6/4IElQxTYySzhM6hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UtgKdpZTY8t+rkao2onA0QbEYO0EzQ6LJbZrtfoYviQ=; b=KS2C3T7Ei5IeSNZP0YuZZOnq29nqcVzKUKtlJo6Azk+OMhfNLfxl2GrEBNy899sJFM6M2/Glj+YNcWBoAG5jt5NN/RnWm2SG+IDjHOevcsL4XBMtoKS1tCJpUHu/n0IGaJU33/P9PPoTAMAos+LDbJlSynbKeDArA1MYAOfdrZaPjo+DQK6z/TCKvHuZ2zauPA5TzTBLpSbXfMI8foOYE30DAVgeTTZ8PuNQfDuBb1q9utNFFzzzqlzp3q5qqzRg463lEaA0PFmNMGy14R+/08n+fZPToM7/pfmJlIpnZy1szByJluhMuhOhP0Ayi9jOjZEJBOo0IPKrYl6S/KVS8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UtgKdpZTY8t+rkao2onA0QbEYO0EzQ6LJbZrtfoYviQ=; b=jNyc28evV2TZqJmcRhClIFGZY3e7heUt7rQOkpQgvyAaZw9M/QfR6o0oUWPuBcMI97UeQL0oF5WhEkyuLOgqCGAs748z5mDI0Sgk+DGubWUw44v/R/+tqPfZe1ZjPqEkq97JGOLUIBb6LN1AzMXZu9W3gJUNSedqaaFvy716Tp4= Received: from SN6PR11MB2558.namprd11.prod.outlook.com (52.135.91.13) by SN6PR11MB3518.namprd11.prod.outlook.com (52.135.125.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.23; Wed, 20 Nov 2019 10:45:19 +0000 Received: from SN6PR11MB2558.namprd11.prod.outlook.com ([fe80::19a4:37bc:d979:dd76]) by SN6PR11MB2558.namprd11.prod.outlook.com ([fe80::19a4:37bc:d979:dd76%5]) with mapi id 15.20.2451.031; Wed, 20 Nov 2019 10:45:19 +0000 From: "Ananyev, Konstantin" To: Li Han , "Burakov, Anatoly" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] eal/linux: fix muti-secondary msl create issue Thread-Index: AQHVn00TG5tqIDpbK0SQoQcq0xvkfqeT4Ckg Date: Wed, 20 Nov 2019 10:45:19 +0000 Message-ID: References: <1574214917-7700-1-git-send-email-han.li1@zte.com.cn> In-Reply-To: <1574214917-7700-1-git-send-email-han.li1@zte.com.cn> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWE5YmE2ZjEtMGE2OS00Yjc0LThhZTctMWZhNmI0ZTdhZjNhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTXU0RFU3RGJvcmgxSGhsU3dyUVM0SzA0TjJNUWg3ZnR6cTUyVnRuRnhNRGc1bTMyQUJMVVV6ZFVXZ0dJRllDWiJ9 dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 x-ctpclassification: CTP_NT authentication-results: spf=none (sender IP is ) smtp.mailfrom=konstantin.ananyev@intel.com; x-originating-ip: [46.7.38.224] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 66ca46f5-e1f2-4e59-1149-08d76da6bcab x-ms-traffictypediagnostic: SN6PR11MB3518: x-ms-exchange-purlcount: 1 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:565; x-forefront-prvs: 02272225C5 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(346002)(39860400002)(376002)(136003)(366004)(199004)(189003)(8936002)(6636002)(11346002)(446003)(52536014)(6116002)(81166006)(81156014)(8676002)(3846002)(7696005)(229853002)(256004)(66946007)(76116006)(5660300002)(66446008)(14454004)(86362001)(476003)(55016002)(305945005)(478600001)(6246003)(6506007)(71200400001)(74316002)(71190400001)(99286004)(64756008)(66556008)(66476007)(6306002)(7736002)(4326008)(76176011)(486006)(110136005)(102836004)(9686003)(6436002)(316002)(33656002)(66066001)(25786009)(26005)(2906002)(966005)(186003); DIR:OUT; SFP:1102; SCL:1; SRVR:SN6PR11MB3518; H:SN6PR11MB2558.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CUjxhvafXS4U9U6zt1s+W58Dj9koZYEDV7WrfFy4lG7rQv9hYTp7q8HZMCdUQWt7hSkZrjFNOv4DuWixqu+Duqb5tAg2HpbJlVam8tZNAKacfb7ZtTS6l24mCLqYudJxzqBNVrIIizI6XBaWWvmzHjYoan/BRhnEhEelMdDg4gY4/F/K9L+ZkaUEDGJi1C6KkeegB+7K1DTKKI5Tav9ndFDPX7ML3HPSb+x6ZAvjIoav25e6uzJSr79cw4rsTAgBu9RarsVPtc0H0JTPWtr2hheH6ZhvmKHq/u1VtL1lWWZmoMwiXtQjx9bkFDU/ZIiTOUhEINA9BeQqWJCX5FDDvh5wTB14pSVU32OeiTQ0xiUvOXwVnRuRRFdQPeO6GTYCjy5by42UVJNPu9dWKYsDiE5UVX+7kVQunB2zInjqfezwR1cEgbniLTPsHE4t3XJlj0BgTpznHWOYlDAJehGJsjsi3WCmdN8kxHoGdlJ30WE= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 66ca46f5-e1f2-4e59-1149-08d76da6bcab X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Nov 2019 10:45:19.2311 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: RMsD3Yaea7R9SRfRqgkybbsji9xYtlniXJxh7jonMBHBGrR7gQNvDYAK0xe72pWNPu1fbvNTxEpR7dAMit5d0TOUTqu4f3gt0U4gtw9hqEo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3518 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] eal/linux: fix muti-secondary msl create issue 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" >=20 > 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/ >=20 > Signed-off-by: Li Han > --- > lib/librte_eal/linux/eal/eal_memalloc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/lin= ux/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 =3D &local_memsegs[msl_idx]; >=20 > /* 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()); >=20 > ret =3D rte_fbarray_init(&local_msl->memseg_arr, name, > primary_msl->memseg_arr.len, > -- > 1.8.3.1