diff mbox series

[ovs-dev,v2,21/24] datapath: use hlist_for_each_entry_rcu instead of hlist_for_each_entry

Message ID 20200909192021.9545-22-gvrose8192@gmail.com
State Superseded
Headers show
Series Add support for Linux kernels up to 5.8.x | expand

Commit Message

Gregory Rose Sept. 9, 2020, 7:20 p.m. UTC
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>

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

Cc: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
---
 datapath/flow_table.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

0-day Robot Sept. 9, 2020, 9:21 p.m. UTC | #1
Bleep bloop.  Greetings Greg Rose, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
ERROR: Author Tonghao Zhang <xiangxia.m.yue@gmail.com> needs to sign off.
WARNING: Unexpected sign-offs from developers who are not authors or co-authors or committers: Greg Rose <gvrose8192@gmail.com>
Lines checked: 53, Warnings: 1, Errors: 1


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
diff mbox series

Patch

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);
 	}