[ovs-dev] [PATCH v4 27/27] netdev-dpdk: Remove rte-flow API access locks

Gaetan Rivet grive at u256.net
Wed Jun 9 13:09:35 UTC 2021


The rte_flow DPDK API was made thread-safe [1] in release 20.11.
Now that the DPDK offload provider in OVS is thread safe, remove the
locks.

[1]: http://mails.dpdk.org/archives/dev/2020-October/184251.html

Signed-off-by: Gaetan Rivet <grive at u256.net>
Reviewed-by: Eli Britstein <elibr at nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 lib/netdev-dpdk.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 9d8096668..c7ebeb4d5 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -5239,9 +5239,7 @@ netdev_dpdk_rte_flow_destroy(struct netdev *netdev,
     struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
     int ret;
 
-    ovs_mutex_lock(&dev->mutex);
     ret = rte_flow_destroy(dev->port_id, rte_flow, error);
-    ovs_mutex_unlock(&dev->mutex);
     return ret;
 }
 
@@ -5255,9 +5253,7 @@ netdev_dpdk_rte_flow_create(struct netdev *netdev,
     struct rte_flow *flow;
     struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
 
-    ovs_mutex_lock(&dev->mutex);
     flow = rte_flow_create(dev->port_id, attr, items, actions, error);
-    ovs_mutex_unlock(&dev->mutex);
     return flow;
 }
 
@@ -5285,9 +5281,7 @@ netdev_dpdk_rte_flow_query_count(struct netdev *netdev,
     }
 
     dev = netdev_dpdk_cast(netdev);
-    ovs_mutex_lock(&dev->mutex);
     ret = rte_flow_query(dev->port_id, rte_flow, actions, query, error);
-    ovs_mutex_unlock(&dev->mutex);
     return ret;
 }
 
-- 
2.31.1



More information about the dev mailing list