On 2/28/2019 2:57 PM, Anoob Joseph wrote:
> Hi Akhil,
>
> Please see inline.
>
> Thanks,
> Anoob
>
>> -----Original Message-----
>> From: Akhil Goyal <akhil.go...@nxp.com>
>> Sent: Thursday, February 28, 2019 2:22 PM
>> To: Anoob Joseph <ano...@marvell.com>; Trahe, Fiona
>> <fiona.tr...@intel.com>; Doherty, Declan <declan.dohe...@intel.com>; De
>> Lara Guarch, Pablo <pablo.de.lara.gua...@intel.com>; Yigit, Ferruh
>> <ferruh.yi...@intel.com>; Thomas Monjalon <tho...@monjalon.net>
>> Cc: Jerin Jacob Kollanukkaran <jer...@marvell.com>; Narayana Prasad Raju
>> Athreya <pathr...@marvell.com>; dev@dpdk.org; Ankur Dwivedi
>> <adwiv...@marvell.com>
>> 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 <fiona.tr...@intel.com>
>>>> Sent: Monday, February 25, 2019 5:22 PM
>>>> To: Anoob Joseph <ano...@marvell.com>; Akhil Goyal
>>>> <akhil.go...@nxp.com>; Doherty, Declan <declan.dohe...@intel.com>;
>> De
>>>> Lara Guarch, Pablo <pablo.de.lara.gua...@intel.com>; Yigit, Ferruh
>>>> <ferruh.yi...@intel.com>; Thomas Monjalon <tho...@monjalon.net>
>>>> Cc: Jerin Jacob Kollanukkaran <jer...@marvell.com>; Narayana Prasad
>>>> Raju Athreya <pathr...@marvell.com>; dev@dpdk.org; Ankur Dwivedi
>>>> <adwiv...@marvell.com>
>>>> Subject: RE: [PATCH] lib/cryptodev: fix driver name comparison
>>>>
>>>> Hi Anoob
>>>>
>>>>> -----Original Message-----
>>>>> From: Anoob Joseph [mailto:ano...@marvell.com]
>>>>> Sent: Saturday, February 23, 2019 6:12 AM
>>>>> To: Trahe, Fiona <fiona.tr...@intel.com>; Akhil Goyal
>>>>> <akhil.go...@nxp.com>; Doherty, Declan <declan.dohe...@intel.com>;
>>>>> De Lara Guarch, Pablo <pablo.de.lara.gua...@intel.com>; Yigit,
>>>>> Ferruh <ferruh.yi...@intel.com>; Thomas Monjalon
>>>>> <tho...@monjalon.net>
>>>>> Cc: Jerin Jacob Kollanukkaran <jer...@marvell.com>; Narayana Prasad
>>>>> Raju Athreya <pathr...@marvell.com>; dev@dpdk.org; Ankur Dwivedi
>>>>> <adwiv...@marvell.com>
>>>>> Subject: RE: [PATCH] lib/cryptodev: fix driver name comparison
>>>>>
>>>>> Hi Fiona,
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Trahe, Fiona <fiona.tr...@intel.com>
>>>>>> Sent: Friday, February 22, 2019 9:09 PM
>>>>>> To: Anoob Joseph <ano...@marvell.com>; Akhil Goyal
>>>>>> <akhil.go...@nxp.com>; Doherty, Declan
>> <declan.dohe...@intel.com>;
>>>>>> De Lara Guarch, Pablo <pablo.de.lara.gua...@intel.com>
>>>>>> Cc: Jerin Jacob Kollanukkaran <jer...@marvell.com>; Narayana Prasad
>>>>>> Raju Athreya <pathr...@marvell.com>; dev@dpdk.org; Ankur Dwivedi
>>>>>> <adwiv...@marvell.com>; Trahe, Fiona <fiona.tr...@intel.com>
>>>>>> 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?

-Akhil

Reply via email to