diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-07-26 00:23:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-07-29 11:59:08 +0200 |
commit | dc9755370e1c5965d16dff98c9877f5b1847e367 (patch) | |
tree | 5409f0de7f389232f84ef7ac80bc5a424cea560b /tools/testing/selftests/drivers/net | |
parent | ethtool: fix setting key and resetting indir at once (diff) | |
download | linux-dc9755370e1c5965d16dff98c9877f5b1847e367.tar.xz linux-dc9755370e1c5965d16dff98c9877f5b1847e367.zip |
ethtool: fix the state of additional contexts with old API
We expect drivers implementing the new create/modify/destroy
API to populate the defaults in struct ethtool_rxfh_context.
In legacy API ctx isn't even passed, and rxfh.indir / rxfh.key
are NULL so drivers can't give us defaults even if they want to.
Call get_rxfh() to fetch the values. We can reuse rxfh_dev
for the get_rxfh(), rxfh stores the input from the user.
This fixes IOCTL reporting 0s instead of the default key /
indir table for drivers using legacy API.
Add a check to try to catch drivers using the new API
but not populating the key.
Fixes: 7964e7884643 ("net: ethtool: use the tracking array for get_rxfh on custom RSS contexts")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/drivers/net')
0 files changed, 0 insertions, 0 deletions