]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: openvswitch: remove unused keep_flows
authorTonghao Zhang <xiangxia.m.yue@gmail.com>
Tue, 1 Sep 2020 12:26:14 +0000 (20:26 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Sep 2020 18:42:15 +0000 (11:42 -0700)
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>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/flow_table.c
net/openvswitch/flow_table.h

index 80849bdf45d25f6e54e2afddd31c1a53fd4ea8e2..87c286ad660ecc4596a72f357d369765b91afcae 100644 (file)
@@ -168,7 +168,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;
@@ -481,9 +480,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;
@@ -603,8 +599,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,
index 6e7d4ac5935316c8da89d9e4dab0826eb21bc3c8..d8fb7a3a3dfd6fdeb38a47105b573e2aac2130a2 100644 (file)
@@ -53,7 +53,6 @@ struct table_instance {
        struct rcu_head rcu;
        int node_ver;
        u32 hash_seed;
-       bool keep_flows;
 };
 
 struct flow_table {