aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/lock_debug.c
diff options
context:
space:
mode:
authorTaehee Yoo <[email protected]>2025-04-04 12:21:25 +0000
committerJakub Kicinski <[email protected]>2025-04-07 18:00:00 +0000
commit216a61d33c0728a8cf1650aaed2c523c6ce16354 (patch)
treefc2344d664879b223d6704030f6e103a58851e86 /net/core/lock_debug.c
parentMerge tag 'net-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff)
downloadkernel-216a61d33c0728a8cf1650aaed2c523c6ce16354.tar.gz
kernel-216a61d33c0728a8cf1650aaed2c523c6ce16354.zip
net: ethtool: fix ethtool_ringparam_get_cfg() returns a hds_thresh value always as 0.
When hds-thresh is configured, ethnl_set_rings() is called, and it calls ethtool_ringparam_get_cfg() to get ringparameters from .get_ringparam() callback and dev->cfg. Both hds_config and hds_thresh values should be set from dev->cfg, not from .get_ringparam(). But ethtool_ringparam_get_cfg() sets only hds_config from dev->cfg. So, ethtool_ringparam_get_cfg() returns always a hds_thresh as 0. If an input value of hds-thresh is 0, a hds_thresh value from ethtool_ringparam_get_cfg() are same. So ethnl_set_rings() does nothing and returns immediately. It causes a bug that setting a hds-thresh value to 0 is not working. Reproducer: modprobe netdevsim echo 1 > /sys/bus/netdevsim/new_device ethtool -G eth0 hds-thresh 100 ethtool -G eth0 hds-thresh 0 ethtool -g eth0 #hds-thresh value should be 0, but it shows 100. The tools/testing/selftests/drivers/net/hds.py can test it too with applying a following patch for hds.py. Fixes: 928459bbda19 ("net: ethtool: populate the default HDS params in the core") Signed-off-by: Taehee Yoo <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/core/lock_debug.c')
0 files changed, 0 insertions, 0 deletions