netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taehee Yoo <ap420073@gmail.com>
To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com, andrew+netdev@lunn.ch, horms@kernel.org,
	shuah@kernel.org, netdev@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Cc: kory.maincent@bootlin.com, willemb@google.com,
	aleksander.lobakin@intel.com, ecree.xilinx@gmail.com,
	almasrymina@google.com, daniel.zahka@gmail.com,
	jianbol@nvidia.com, gal@nvidia.com, michael.chan@broadcom.com,
	ap420073@gmail.com
Subject: [PATCH net 0/2] fix wrong hds-thresh value setting
Date: Thu,  3 Apr 2025 06:04:21 +0000	[thread overview]
Message-ID: <20250403060423.1209435-1-ap420073@gmail.com> (raw)

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(-)

-- 
2.34.1


             reply	other threads:[~2025-04-03  6:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-03  6:04 Taehee Yoo [this message]
2025-04-03  6:04 ` [PATCH net 1/2] net: ethtool: fix ethtool_ringparam_get_cfg() returns a hds_thresh value always as 0 Taehee Yoo
2025-04-03  6:04 ` [PATCH net 2/2] selftests: drv-net: test random value for hds-thresh Taehee Yoo
2025-04-04  5:26   ` Taehee Yoo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250403060423.1209435-1-ap420073@gmail.com \
    --to=ap420073@gmail.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=almasrymina@google.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=daniel.zahka@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=horms@kernel.org \
    --cc=jianbol@nvidia.com \
    --cc=kory.maincent@bootlin.com \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).