On 4/12/21 5:20 PM, Gaetan Rivet wrote:
> The rte_flow API in DPDK is now thread safe for insertion and deletion.
> It is not however safe for concurrent query while the offload is being
> inserted or deleted.
> 
> Insertion is not an issue as the rte_flow handle will be published to
> other threads only once it has been inserted in the hardware, so the
> query will only be able to proceed once it is already available.
> 
> For the deletion path however, offload status queries can be made while
> an offload is being destroyed. This would create race conditions and
> use-after-free if not properly protected.
> 
> As a pre-step before removing the OVS-level locks on the rte_flow API,
> mutually exclude offload query and deletion from concurrent execution.
> 
> Signed-off-by: Gaetan Rivet <[email protected]>
> Reviewed-by: Eli Britstein <[email protected]>
> ---
>  lib/netdev-offload-dpdk.c | 39 ++++++++++++++++++++++++++++++++++++---
>  1 file changed, 36 insertions(+), 3 deletions(-)

Reviewed-by: Maxime Coquelin <[email protected]>

Thanks,
Maxime

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

Reply via email to