From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 022411B1D5; Wed, 16 May 2018 11:42:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 May 2018 02:42:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,404,1520924400"; d="scan'208";a="42222190" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by orsmga006.jf.intel.com with ESMTP; 16 May 2018 02:42:28 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.150]) by irsmsx105.ger.corp.intel.com ([169.254.7.214]) with mapi id 14.03.0319.002; Wed, 16 May 2018 10:42:27 +0100 From: "De Lara Guarch, Pablo" To: "Zhang, Roy Fan" , "dev@dpdk.org" CC: "Rybalchenko, Kirill" , "stable@dpdk.org" Thread-Topic: [PATCH] crypto/scheduler: fix possible duplicated ring names Thread-Index: AQHT62y486ybIZY+EkC+d6d8boeDW6QyDXsg Date: Wed, 16 May 2018 09:42:27 +0000 Message-ID: References: <20180514100927.78088-1-roy.fan.zhang@intel.com> In-Reply-To: <20180514100927.78088-1-roy.fan.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTVmMmU0NWYtN2E3My00NjEwLTlmNWItZGQ0NTk1NDczYTU3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImFPMUkzUE9XY3o2U1ZuN2MyWndrZHpndUF1blVEdkdIZGlwNmdDbWdSZ0U9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH] crypto/scheduler: fix possible duplicated ring names X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2018 09:42:31 -0000 Hi Fan, > -----Original Message----- > From: Zhang, Roy Fan > Sent: Monday, May 14, 2018 11:09 AM > To: dev@dpdk.org > Cc: Zhang, Roy Fan ; Rybalchenko, Kirill > ; stable@dpdk.org; De Lara Guarch, Pablo > > Subject: [PATCH] crypto/scheduler: fix possible duplicated ring names >=20 > Fixes: 4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode") Fixes line goes before "Signed-off-by" and after the description of the pat= ch. Also, CC: stable@dpdk.org should go after Fixes line. >=20 > This patch fixes the possible duplicated ring names in multi-core schedul= er. > Originally two or more multi-core schedulers may have same worker ring na= mes > thus will cause initialization error. >=20 > Signed-off-by: Fan Zhang > --- > drivers/crypto/scheduler/scheduler_multicore.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/crypto/scheduler/scheduler_multicore.c > b/drivers/crypto/scheduler/scheduler_multicore.c > index 644426e93..cd71d18ee 100644 > --- a/drivers/crypto/scheduler/scheduler_multicore.c > +++ b/drivers/crypto/scheduler/scheduler_multicore.c > @@ -347,14 +347,18 @@ scheduler_create_private_ctx(struct rte_cryptodev > *dev) > for (i =3D 0; i < sched_ctx->nb_wc; i++) { > char r_name[16]; >=20 > - snprintf(r_name, sizeof(r_name), > MC_SCHED_ENQ_RING_NAME_PREFIX "%u", i); > + snprintf(r_name, sizeof(r_name), > + MC_SCHED_ENQ_RING_NAME_PREFIX "%u", > + sched_ctx->wc_pool[i]); We could potentially have 2 scheduler sharing same cores, right? I mean, performance wise, it doesn't make sense, but it should still work. In this case, it wouldn't work, so we might need a different name. I'd say using the scheduler id and the index "i" should work. Thanks, Pablo