cxgb4: fix regression with HASH tc prio value update
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Wed, 2 Jun 2021 14:08:59 +0000 (19:38 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jun 2021 11:39:19 +0000 (13:39 +0200)
commit1dcf3d435bf6147691560b8670ff06bfaa023a69
tree71a0dfcdc7328345dcb3a5104bdd5b81f0ecf0f9
parent8067da904921c1de8c1cd055170ab1f5944945e3
cxgb4: fix regression with HASH tc prio value update

[ Upstream commit a27fb314cba8cb84cd6456a4699c3330a83c326d ]

commit db43b30cd89c ("cxgb4: add ethtool n-tuple filter deletion")
has moved searching for next highest priority HASH filter rule to
cxgb4_flow_rule_destroy(), which searches the rhashtable before the
the rule is removed from it and hence always finds at least 1 entry.
Fix by removing the rule from rhashtable first before calling
cxgb4_flow_rule_destroy() and hence avoid fetching stale info.

Fixes: db43b30cd89c ("cxgb4: add ethtool n-tuple filter deletion")
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c