On 8/31/22 11:59, Eli Britstein wrote:
> Commit [1] introduced a flag in dpif-netdev level, to optimize
> performance and avoid hw_miss_packet_recover() for devices with no such
> support.
> However, there is a race condition between traffic processing and
> assigning a 'flow_api' object to the netdev. In such case, EOPNOTSUPP is
> returned by netdev_hw_miss_packet_recover() in netdev-offload.c layer
> because 'flow_api' is not yet initialized. As a result, the flag is
> falsely disabled, and subsequent packets won't be recovered, though they
> should.
> 
> In order to fix it, move the flag to be in netdev-offload layer, to
> avoid that race.
> 
> [1]: 6e50c1651869 ("dpif-netdev: Avoid hw_miss_packet_recover() for devices 
> with no support.")
> 
> Fixes: 6e50c1651869 ("dpif-netdev: Avoid hw_miss_packet_recover() for devices 
> with no support.")
> Signed-off-by: Eli Britstein <[email protected]>
> ---
>  lib/dpif-netdev.c    | 18 +++++++-----------
>  lib/netdev-offload.c | 28 +++++++++++++++++++++++-----
>  lib/netdev-offload.h |  2 ++
>  lib/netdev.c         |  1 +
>  4 files changed, 33 insertions(+), 16 deletions(-)

Thanks!  Applied and backported down to 2.17.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to