mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-20 04:24:13 +00:00
cxgb4: fix regression with HASH tc prio value update
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>
This commit is contained in:
parent
e03101824d
commit
a27fb314cb
@ -997,20 +997,16 @@ int cxgb4_tc_flower_destroy(struct net_device *dev,
|
||||
if (!ch_flower)
|
||||
return -ENOENT;
|
||||
|
||||
rhashtable_remove_fast(&adap->flower_tbl, &ch_flower->node,
|
||||
adap->flower_ht_params);
|
||||
|
||||
ret = cxgb4_flow_rule_destroy(dev, ch_flower->fs.tc_prio,
|
||||
&ch_flower->fs, ch_flower->filter_id);
|
||||
if (ret)
|
||||
goto err;
|
||||
netdev_err(dev, "Flow rule destroy failed for tid: %u, ret: %d",
|
||||
ch_flower->filter_id, ret);
|
||||
|
||||
ret = rhashtable_remove_fast(&adap->flower_tbl, &ch_flower->node,
|
||||
adap->flower_ht_params);
|
||||
if (ret) {
|
||||
netdev_err(dev, "Flow remove from rhashtable failed");
|
||||
goto err;
|
||||
}
|
||||
kfree_rcu(ch_flower, rcu);
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user