From mboxrd@z Thu Jan 1 00:00:00 1970 From: "De Lara Guarch, Pablo" Subject: Re: [PATCH] crypto/scheduler: fix possible duplicated ring names Date: Wed, 16 May 2018 09:42:27 +0000 Message-ID: References: <20180514100927.78088-1-roy.fan.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "Rybalchenko, Kirill" , "stable@dpdk.org" To: "Zhang, Roy Fan" , "dev@dpdk.org" Return-path: In-Reply-To: <20180514100927.78088-1-roy.fan.zhang@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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