A hds-thresh value is not set correctly if input value is 0. The cause is that ethtool_ringparam_get_cfg(), which is a internal function that returns ringparameters from both ->get_ringparam() and dev->cfg can't return a correct hds-thresh value.
The first patch fixes ethtool_ringparam_get_cfg() to set hds-thresh value correcltly.
The second patch adds random test for hds-thresh value. So that we can test 0 value for a hds-thresh properly.
Taehee Yoo (2): net: ethtool: fix ethtool_ringparam_get_cfg() returns a hds_thresh value always as 0. selftests: drv-net: test random value for hds-thresh
net/ethtool/common.c | 1 + tools/testing/selftests/drivers/net/hds.py | 28 +++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-)