On Fri, Aug 21, 2020 at 6:50 AM Greg Rose <[email protected]> wrote: > > From: Tonghao Zhang <[email protected]> > > Upstream commit: > commit 64948427a63f49dd0ce403388d232f22cc1971a8 > Author: Tonghao Zhang <[email protected]> > 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 <[email protected]> > Tested-by: Greg Rose <[email protected]> > Reviewed-by: Greg Rose <[email protected]> > Signed-off-by: David S. Miller <[email protected]> > > Compat fixup - OVS doesn't support lockdep_ovsl_is_held() yet > > Cc: Tonghao Zhang <[email protected]> > Signed-off-by: Greg Rose <[email protected]> Reviewed-by: Tonghao Zhang <[email protected]> > --- > datapath/flow_table.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/datapath/flow_table.c b/datapath/flow_table.c > index bd05dd3..650338f 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); > } > > -- > 1.8.3.1 >
-- Best regards, Tonghao _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
