Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: xiangxia.m.yue@gmail.com
To: davem@davemloft.net, pshelar@ovn.org, xiyou.wangcong@gmail.com
Cc: dev@openvswitch.org, netdev@vger.kernel.org,
	Tonghao Zhang <xiangxia.m.yue@gmail.com>
Subject: [PATCH net-next v3 3/3] net: openvswitch: remove unnused keep_flows
Date: Tue, 25 Aug 2020 13:06:36 +0800	[thread overview]
Message-ID: <20200825050636.14153-4-xiangxia.m.yue@gmail.com> (raw)
In-Reply-To: <20200825050636.14153-1-xiangxia.m.yue@gmail.com>

From: Tonghao Zhang <xiangxia.m.yue@gmail.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@ovn.org>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
---
 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 98dad1c5f9d9..d8545ae38e4e 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;
@@ -601,8 +597,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


  parent reply	other threads:[~2020-08-25  5:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25  5:06 [PATCH net-next v3 0/3] net: openvswitch: improve codes xiangxia.m.yue
2020-08-25  5:06 ` [PATCH net-next v3 1/3] net: openvswitch: improve coding style xiangxia.m.yue
2020-08-25 21:51   ` Stefano Brivio
2020-09-01 11:54     ` Tonghao Zhang
2020-08-25  5:06 ` [PATCH net-next v3 2/3] net: openvswitch: refactor flow free function xiangxia.m.yue
2020-08-26 19:23   ` Pravin Shelar
2020-08-25  5:06 ` xiangxia.m.yue [this message]
2020-08-26 19:23   ` [PATCH net-next v3 3/3] net: openvswitch: remove unnused keep_flows Pravin Shelar
2020-08-25 16:37 ` [PATCH net-next v3 0/3] net: openvswitch: improve codes David Miller
2020-08-26  7:09   ` Pravin Shelar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200825050636.14153-4-xiangxia.m.yue@gmail.com \
    --to=xiangxia.m.yue@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dev@openvswitch.org \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@ovn.org \
    --cc=xiyou.wangcong@gmail.com \
    --subject='Re: [PATCH net-next v3 3/3] net: openvswitch: remove unnused keep_flows' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).