Flow dump operation is read-only operation.  There is no need to
take ovs-lock.  Following patch use rcu-lock for dumping flows.

Signed-off-by: Pravin B Shelar <pshe...@nicira.com>
---
 datapath/datapath.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/datapath/datapath.c b/datapath/datapath.c
index 3680391..d2939b9 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -1507,10 +1507,10 @@ static int ovs_flow_cmd_dump(struct sk_buff *skb, 
struct netlink_callback *cb)
        struct datapath *dp;
        struct flow_table *table;
 
-       ovs_lock();
+       rcu_read_lock();
        dp = get_dp(sock_net(skb->sk), ovs_header->dp_ifindex);
        if (!dp) {
-               ovs_unlock();
+               rcu_read_unlock();
                return -ENODEV;
        }
 
@@ -1535,7 +1535,7 @@ static int ovs_flow_cmd_dump(struct sk_buff *skb, struct 
netlink_callback *cb)
                cb->args[0] = bucket;
                cb->args[1] = obj;
        }
-       ovs_unlock();
+       rcu_read_unlock();
        return skb->len;
 }
 
-- 
1.7.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to