mbox series

[net,0/2] fix wrong hds-thresh value setting

Message ID 20250403060423.1209435-1-ap420073@gmail.com (mailing list archive)
Headers show
Series fix wrong hds-thresh value setting | expand

Message

Taehee Yoo April 3, 2025, 6:04 a.m. UTC
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(-)