cxgb4: fix wrong ethtool n-tuple rule lookup
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Sat, 12 Jun 2021 13:50:44 +0000 (19:20 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Jun 2021 19:17:57 +0000 (12:17 -0700)
commit09427c1915f754ebe7d3d8e54e79bbee48afe916
treedc97a16e34df3784b776a13e19000d94b08c6b9f
parent49a10c7b176295f8fafb338911cf028e97f65f4d
cxgb4: fix wrong ethtool n-tuple rule lookup

The TID returned during successful filter creation is relative to
the region in which the filter is created. Using it directly always
returns Hi Prio/Normal filter region's entry for the first couple of
entries, even though the rule is actually inserted in Hash region.
Fix by analyzing in which region the filter has been inserted and
save the absolute TID to be used for lookup later.

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>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c