On 31 Mar 2022, at 17:36, Maxime Coquelin wrote:

> On 3/31/22 17:21, David Marchand wrote:
>> On Thu, Mar 31, 2022 at 4:41 PM Eelco Chaudron <[email protected]> wrote:
>>>
>>> The dp_netdev_get_pmd() function is using only the hash of the core_id
>>> to get the pmd structure. So in case of hash collisions, the wrong pmd
>>> is returned.
>>>
>>> This patch is fixing this by checking for the correct core_id using
>>> the CMAP_FOR_EACH_WITH_HASH macro.
>>>
>>>
>>> Fixes: b19befaef ("dpif-netdev: Add function to get pmd using core id.")
>>
>> Nit: Fixes: hash should be on 12 digits.
>> Fixes: b19befaef27d ("dpif-netdev: Add function to get pmd using core id.")
>
> Tip: you can add a git alias to do that easily:
>
> [alias]
>       fixline = log -1 --abbrev=12 --format='Fixes: %h (\"%s\")%nCc: %ae'
>
> $ git fixline b19befaef27dddd7fb76cb3a547f9c972cafe9e7
> Fixes: b19befaef27d ("dpif-netdev: Add function to get pmd using core id.")
> Cc: [email protected]
>

Yes, I do have a similar alias, but I guess the 9 digits show my age :)

Ilya do you want a new version with this fixed in the commit, or can you do 
this?

//Eelco

>>> Signed-off-by: Eelco Chaudron <[email protected]>
>>
>> This fix is straightforward.
>> I am a bit surprised that we lived with this bug for so long.
>>
>> (PMD-related) unit tests looks good too.
>>
>> Reviewed-by: David Marchand <[email protected]>
>>
>>

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to