From: Dimitri Daskalakis <dimitri.daskalakis1@gmail.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
Dimitri Daskalakis <dimitri.daskalakis1@gmail.com>
Subject: [PATCH net-next 1/3] selftests: drv-net: hds: always restore tcp-data-split to auto
Date: Thu, 5 Nov 2026 19:12:06 -0800 [thread overview]
Message-ID: <20261106031208.465456-2-dimitri.daskalakis1@gmail.com> (raw)
In-Reply-To: <20261106031208.465456-1-dimitri.daskalakis1@gmail.com>
From: Dimitri Daskalakis <daskald@meta.com>
_hds_reset() only restores tcp-data-split if the reported value
changed. Drivers may report the current HDS state rather than the
configured value, so an explicit setting made by a test can be
indistinguishable from the original "unknown" config.
bnxt reports enabled or disabled based on whether aggregation rings
are in use. mlx5 will report enabled or disabled based on whether
SHAMPO is active, and an explicit "disabled" keeps HW-GRO off. After
set_hds_disable on a default mlx5 device the reset is skipped, leaving
tcp-data-split disabled and HW-GRO unable to be enabled.
Always reset tcp-data-split to "unknown" when it was reported.
Signed-off-by: Dimitri Daskalakis <daskald@meta.com>
---
tools/testing/selftests/drivers/net/hds.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/hds.py b/tools/testing/selftests/drivers/net/hds.py
index 606e26d75951..af34dc9ce749 100755
--- a/tools/testing/selftests/drivers/net/hds.py
+++ b/tools/testing/selftests/drivers/net/hds.py
@@ -65,13 +65,13 @@ def _hds_reset(cfg, netnl, rings) -> None:
cur = netnl.rings_get({'header': {'dev-index': cfg.ifindex}})
arg = {'header': {'dev-index': cfg.ifindex}}
- if cur.get('tcp-data-split') != rings.get('tcp-data-split'):
+ if 'tcp-data-split' in rings:
# Try to reset to "unknown" first, we don't know if the setting
# was the default or user chose it. Default seems more likely.
arg['tcp-data-split'] = "unknown"
netnl.rings_set(arg)
cur = netnl.rings_get({'header': {'dev-index': cfg.ifindex}})
- if cur['tcp-data-split'] == rings['tcp-data-split']:
+ if cur.get('tcp-data-split') == rings['tcp-data-split']:
del arg['tcp-data-split']
else:
# Try the explicit setting
--
2.52.0
next prev parent reply other threads:[~2026-11-06 3:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 3:12 [PATCH net-next 0/3] selftests: drv-net: hds: fix state leaks and ioctl tests Dimitri Daskalakis
2026-11-06 3:12 ` Dimitri Daskalakis [this message]
2026-11-09 18:14 ` [PATCH net-next 1/3] selftests: drv-net: hds: always restore tcp-data-split to auto netdev-bot+sashiko
2026-11-09 20:59 ` Dimitri Daskalakis
2026-11-06 3:12 ` [PATCH net-next 2/3] selftests: drv-net: hds: perturb settings via ioctl in ioctl_enabled_set_xdp Dimitri Daskalakis
2026-11-06 3:12 ` [PATCH net-next 3/3] selftests: drv-net: hds: restore HDS settings in ioctl_set_xdp Dimitri Daskalakis
2026-11-09 18:14 ` netdev-bot+sashiko
2026-11-09 21:13 ` Dimitri Daskalakis
2026-11-11 0:00 ` [PATCH net-next 0/3] selftests: drv-net: hds: fix state leaks and ioctl tests patchwork-bot+netdevbpf
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=20261106031208.465456-2-dimitri.daskalakis1@gmail.com \
--to=dimitri.daskalakis1@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
/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