]> git.baikalelectronics.ru Git - kernel.git/commit
net: openvswitch: refactor flow free function
authorTonghao Zhang <xiangxia.m.yue@gmail.com>
Tue, 1 Sep 2020 12:26:13 +0000 (20:26 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Sep 2020 18:42:15 +0000 (11:42 -0700)
commitf8b2300802c20a1ecf32d8faeb0080130531f9f0
tree5fc31764156c18d02197c675677cfbe1d680f5ea
parent638d4a2ead18888ecb97ceea575d932257cb8bba
net: openvswitch: refactor flow free function

Decrease table->count and ufid_count unconditionally,
because we only don't use count or ufid_count to count
when flushing the flows. To simplify the codes, we
remove the "count" argument of table_instance_flow_free.

To avoid a bug when deleting flows in the future, add
WARN_ON in flush flows function.

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