summaryrefslogtreecommitdiff
path: root/datapath
diff options
context:
space:
mode:
authorTonghao Zhang <xiangxia.m.yue@gmail.com>2020-10-12 13:25:08 -0700
committerIlya Maximets <i.maximets@ovn.org>2020-10-17 17:32:06 +0200
commitafe7210161854078e9f1af2a575d9acacc5a0101 (patch)
treebb516a899272df6f7031b93b69a7aa2b0530029c /datapath
parent577550b14c65b8b74ee35e15307acee8d4510c34 (diff)
downloadopenvswitch-afe7210161854078e9f1af2a575d9acacc5a0101.tar.gz
datapath: use hlist_for_each_entry_rcu instead of hlist_for_each_entry
Upstream commit: commit 64948427a63f49dd0ce403388d232f22cc1971a8 Author: Tonghao Zhang <xiangxia.m.yue@gmail.com> Date: Thu Mar 26 04:27:24 2020 +0800 net: openvswitch: use hlist_for_each_entry_rcu instead of hlist_for_each_entry The struct sw_flow is protected by RCU, when traversing them, use hlist_for_each_entry_rcu. Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Tested-by: Greg Rose <gvrose8192@gmail.com> Reviewed-by: Greg Rose <gvrose8192@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Compat fixup - OVS doesn't support lockdep_ovsl_is_held() yet Reviewed-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Acked-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Greg Rose <gvrose8192@gmail.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'datapath')
-rw-r--r--datapath/flow_table.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/datapath/flow_table.c b/datapath/flow_table.c
index bd05dd394..650338fb0 100644
--- a/datapath/flow_table.c
+++ b/datapath/flow_table.c
@@ -485,12 +485,12 @@ static void flow_table_copy_flows(struct table_instance *old,
struct hlist_head *head = &old->buckets[i];
if (ufid)
- hlist_for_each_entry(flow, head,
- ufid_table.node[old_ver])
+ hlist_for_each_entry_rcu(flow, head,
+ ufid_table.node[old_ver])
ufid_table_instance_insert(new, flow);
else
- hlist_for_each_entry(flow, head,
- flow_table.node[old_ver])
+ hlist_for_each_entry_rcu(flow, head,
+ flow_table.node[old_ver])
table_instance_insert(new, flow);
}