[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200824073602.70812-4-xiangxia.m.yue@gmail.com>
Date: Mon, 24 Aug 2020 15:36:02 +0800
From: xiangxia.m.yue@...il.com
To: davem@...emloft.net, pshelar@....org, xiyou.wangcong@...il.com
Cc: dev@...nvswitch.org, netdev@...r.kernel.org,
Tonghao Zhang <xiangxia.m.yue@...il.com>
Subject: [PATCH net-next v2 3/3] net: openvswitch: remove unused keep_flows
From: Tonghao Zhang <xiangxia.m.yue@...il.com>
keep_flows was introduced by [1], which used as flag to delete flows or not.
When rehashing or expanding the table instance, we will not flush the flows.
Now don't use it anymore, remove it.
[1] - https://github.com/openvswitch/ovs/commit/acd051f1761569205827dc9b037e15568a8d59f8
Cc: Pravin B Shelar <pshelar@....org>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@...il.com>
---
v2:
change unnused -> unused
---
net/openvswitch/flow_table.c | 6 ------
net/openvswitch/flow_table.h | 1 -
2 files changed, 7 deletions(-)
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index f8a21dd80e72..0473758035b5 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -166,7 +166,6 @@ static struct table_instance *table_instance_alloc(int new_size)
ti->n_buckets = new_size;
ti->node_ver = 0;
- ti->keep_flows = false;
get_random_bytes(&ti->hash_seed, sizeof(u32));
return ti;
@@ -479,9 +478,6 @@ void table_instance_flow_flush(struct flow_table *table,
{
int i;
- if (ti->keep_flows)
- return;
-
for (i = 0; i < ti->n_buckets; i++) {
struct hlist_head *head = &ti->buckets[i];
struct hlist_node *n;
@@ -598,8 +594,6 @@ static void flow_table_copy_flows(struct table_instance *old,
lockdep_ovsl_is_held())
table_instance_insert(new, flow);
}
-
- old->keep_flows = true;
}
static struct table_instance *table_instance_rehash(struct table_instance *ti,
diff --git a/net/openvswitch/flow_table.h b/net/openvswitch/flow_table.h
index 6e7d4ac59353..d8fb7a3a3dfd 100644
--- a/net/openvswitch/flow_table.h
+++ b/net/openvswitch/flow_table.h
@@ -53,7 +53,6 @@ struct table_instance {
struct rcu_head rcu;
int node_ver;
u32 hash_seed;
- bool keep_flows;
};
struct flow_table {
--
2.23.0
Powered by blists - more mailing lists