On Mon, Jul 12, 2021 at 5:07 PM Eli Britstein <[email protected]> wrote:
>
> Association of a mark to a flow is done as part of its offload handling,
> in the offloading thread. However, the PMD thread specifies whether an
> offload request is an "add" or "modify" by the association of a mark to
> the flow.
> This is exposed to a race condition. A flow might be created with
> actions that cannot be fully offloaded, for example flooding (before MAC
> learning), and later modified to have actions that can be fully
> offloaded. If the two requests are queued before the offload thread
> handling, they are both marked as "add". When the offload thread handles
> them, the first request is partially offloaded, and the second one is
> ignored as the flow is already considered as offloaded.
>
> Fix it by specifying add/modify of an offload request by the actual flow
> state change, without relying on the mark.
>
> Fixes: 3c7330ebf036 ("netdev-offload-dpdk: Support offload of output action.")

Afaiu, the race was present since the introduction of the thread
handling offload requests.
But this Fixes: line is ok as the race was probably not a problem
before actually doing full offload.

Reported-at: 
https://mail.openvswitch.org/pipermail/ovs-dev/2021-March/381296.html
> Signed-off-by: Eli Britstein <[email protected]>
> Reviewed-by: Gaetan Rivet <[email protected]>

Copying Maxime.
Patch lgtm and it fixes the issue I had seen.

Reviewed-by: David Marchand <[email protected]>


-- 
David Marchand

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

Reply via email to