[ovs-dev] [PATCH V2 1/3] dpif-netdev: Do not flush PMD offloads on reload

Ilya Maximets i.maximets at ovn.org
Sun Jul 25 23:30:22 UTC 2021


On 7/25/21 8:40 AM, Eli Britstein wrote:
> 
> On 7/23/2021 9:00 PM, Ilya Maximets wrote:
>> External email: Use caution opening links or attachments
>>
>>
>> On 7/12/21 5:07 PM, Eli Britstein wrote:
>>> Before flushing offloads of a removed port was supported by [1], it was
>>> necessary to flush the 'marks'. In doing so, all offloads of the PMD are
>>> removed, include the ones that are not related to the removed port and
>>> that are not modified following this removal. As a result such flows are
>>> evicted from being offloaded, and won't resume offloading.
>>>
>>> As PMD offload flush is not necessary, avoid it.
>>>
>>> [1] 62d1c28e9ce0 ("dpif-netdev: Flush offload rules upon port deletion.")
>>>
>>> Signed-off-by: Eli Britstein <elibr at nvidia.com>
>>> Reviewed-by: Gaetan Rivet <gaetanr at nvidia.com>
>>> ---
>> Is my understanding here correct:
>> On a port deletion netdev_fow_flush() will remove flows from HW and
>> offloading layer.  Later, ofproto will request to remove flows from
>> the datapath.  flow marks will be freed, but actual netdev_flow_del()
>> will fail, because netdev-offload already removed these flows.  But
>> we do not really care about this failure.  Right?
> 
> That is correct.
> 
> It was also the same before above [1], but then in the race condition, the offload memory was leaked, and the offloads themselves were either not destroyed (e.g. leaked) or removed by the PMD, which was PMD dependent.
> 
> [1] resolved the leaking, but didn't change the mentioned failure behavior.
> 
> This commit doesn't prevents this failure either, but removes the code that destroys offloads of flows that should not be destroyed.

Make sense.  Thanks!


More information about the dev mailing list