Hi Fiona, Akhil, > -----Original Message----- > From: dev <[email protected]> On Behalf Of Trahe, Fiona > Sent: Thursday, February 28, 2019 8:00 PM > To: Akhil Goyal <[email protected]>; Anoob Joseph > <[email protected]>; Doherty, Declan <[email protected]>; De > Lara Guarch, Pablo <[email protected]>; Yigit, Ferruh > <[email protected]>; Thomas Monjalon <[email protected]> > Cc: Jerin Jacob Kollanukkaran <[email protected]>; Narayana Prasad Raju > Athreya <[email protected]>; [email protected]; Ankur Dwivedi > <[email protected]>; Trahe, Fiona <[email protected]> > Subject: Re: [dpdk-dev] [PATCH] lib/cryptodev: fix driver name comparison > > Hi Akhil, Anoob, > > > -----Original Message----- > > From: Akhil Goyal [mailto:[email protected]] > > Sent: Thursday, February 28, 2019 10:20 AM > > To: Anoob Joseph <[email protected]>; Trahe, Fiona > > <[email protected]>; Doherty, Declan <[email protected]>; > > De Lara Guarch, Pablo <[email protected]>; Yigit, Ferruh > > <[email protected]>; Thomas Monjalon <[email protected]> > > Cc: Jerin Jacob Kollanukkaran <[email protected]>; Narayana Prasad > > Raju Athreya <[email protected]>; [email protected]; Ankur Dwivedi > > <[email protected]> > > Subject: Re: [dpdk-dev] [PATCH] lib/cryptodev: fix driver name > > comparison > > > > > > > > On 2/28/2019 2:57 PM, Anoob Joseph wrote: > > > Hi Akhil, > > > > > > Please see inline. > > > > > > Thanks, > > > Anoob > > > > > >> -----Original Message----- > > >> From: Akhil Goyal <[email protected]> > > >> Sent: Thursday, February 28, 2019 2:22 PM > > >> To: Anoob Joseph <[email protected]>; Trahe, Fiona > > >> <[email protected]>; Doherty, Declan > > >> <[email protected]>; De Lara Guarch, Pablo > > >> <[email protected]>; Yigit, Ferruh > > >> <[email protected]>; Thomas Monjalon <[email protected]> > > >> Cc: Jerin Jacob Kollanukkaran <[email protected]>; Narayana Prasad > > >> Raju Athreya <[email protected]>; [email protected]; Ankur Dwivedi > > >> <[email protected]> > > >> Subject: Re: [dpdk-dev] [PATCH] lib/cryptodev: fix driver name > > >> comparison > > >> > > >> Hi Anoob, > > >> > > >> On 2/28/2019 12:18 PM, Anoob Joseph wrote: > > >>> Hi Akhil, Declan, Pablo, > > >>> > > >>> Can you review this patch and share your thoughts? > > >>> > > >>> Thanks, > > >>> Anoob > > >>> > > >>>> -----Original Message----- > > >>>> From: Trahe, Fiona <[email protected]> > > >>>> Sent: Monday, February 25, 2019 5:22 PM > > >>>> To: Anoob Joseph <[email protected]>; Akhil Goyal > > >>>> <[email protected]>; Doherty, Declan > > >>>> <[email protected]>; > > >> De > > >>>> Lara Guarch, Pablo <[email protected]>; Yigit, > > >>>> Ferruh <[email protected]>; Thomas Monjalon > > >>>> <[email protected]> > > >>>> Cc: Jerin Jacob Kollanukkaran <[email protected]>; Narayana > > >>>> Prasad Raju Athreya <[email protected]>; [email protected]; > Ankur > > >>>> Dwivedi <[email protected]> > > >>>> Subject: RE: [PATCH] lib/cryptodev: fix driver name comparison > > >>>> > > >>>> Hi Anoob > > >>>> > > >>>>> -----Original Message----- > > >>>>> From: Anoob Joseph [mailto:[email protected]] > > >>>>> Sent: Saturday, February 23, 2019 6:12 AM > > >>>>> To: Trahe, Fiona <[email protected]>; Akhil Goyal > > >>>>> <[email protected]>; Doherty, Declan > > >>>>> <[email protected]>; De Lara Guarch, Pablo > > >>>>> <[email protected]>; Yigit, Ferruh > > >>>>> <[email protected]>; Thomas Monjalon > <[email protected]> > > >>>>> Cc: Jerin Jacob Kollanukkaran <[email protected]>; Narayana > > >>>>> Prasad Raju Athreya <[email protected]>; [email protected]; > Ankur > > >>>>> Dwivedi <[email protected]> > > >>>>> Subject: RE: [PATCH] lib/cryptodev: fix driver name comparison > > >>>>> > > >>>>> Hi Fiona, > > >>>>> > > >>>>>> -----Original Message----- > > >>>>>> From: Trahe, Fiona <[email protected]> > > >>>>>> Sent: Friday, February 22, 2019 9:09 PM > > >>>>>> To: Anoob Joseph <[email protected]>; Akhil Goyal > > >>>>>> <[email protected]>; Doherty, Declan > > >> <[email protected]>; > > >>>>>> De Lara Guarch, Pablo <[email protected]> > > >>>>>> Cc: Jerin Jacob Kollanukkaran <[email protected]>; Narayana > > >>>>>> Prasad Raju Athreya <[email protected]>; [email protected]; > Ankur > > >>>>>> Dwivedi <[email protected]>; Trahe, Fiona > > >>>>>> <[email protected]> > > >>>>>> Subject: RE: [PATCH] lib/cryptodev: fix driver name comparison > > >>>>>> > > >>>>>> Hi Anoob, > > >>>>>> > > >>>>>>>>>> @@ -542,8 +543,8 @@ rte_cryptodev_get_dev_id(const char > > >>>> *name) > > >>>>>>>>>> return -1; > > >>>>>>>>>> > > >>>>>>>>>> for (i = 0; i < cryptodev_globals.nb_devs; i++) > > >>>>>>>>>> - if ((strcmp(cryptodev_globals.devs[i].data- > >name, > > >>>> name) > > >>>>>>>>>> - == 0) && > > >>>>>>>>>> + if ((strncmp(cryptodev_globals.devs[i].data- > >name, > > >>>>>> name, > > >>>>>>>>>> + > RTE_CRYPTODEV_NAME_MAX_LEN) > > >> consider using "strlen(name) + 1" instead of > > >> RTE_CRYPTODEV_NAME_MAX_LEN. > > >> This will not cause any ABI breakage in my opinion and and will > > >> check till we get a null terminated string in both the strings. > > >> What say? > > > [Anoob] In that case, I'll restrict the patch to two places. > > > Wherever strlen(name) is used, I'll make it > > strlen(name)+1. I won't touch strcmp ones as that would work as is. Shall I > prepare a v2? > > I think it should be fine. > > > > Fiona, > > Any comments? > [Fiona] Good idea. That should be ok.
[Anoob] Another thought. If we are fine with doing strlen of input buffer, then using strcmp would also do. That way the usage also would be uniform in the file. Thanks, Anoob

