From: Dimitri Daskalakis <dimitri.daskalakis1@gmail.com>
To: "David S . Miller" <davem@davemloft.net>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
Eric Dumazet <edumazet@google.com>,
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] selftests: drv-net: remove duplicate functions in hds.py
Date: Fri, 11 Sep 2026 15:42:55 -0700 [thread overview]
Message-ID: <20260911224255.3675903-1-dimitri.daskalakis1@gmail.com> (raw)
From: Dimitri Daskalakis <daskald@meta.com>
There were duplicate definitions of the enabled_set_xdp and set_xdp
test methods. The two enabled_set_xdp copies were identical apart from
a comment and whitespace.
The set_xdp copies differed by a reset of the hds configuration.
commit ee3ae27721fb ("selftests: drv-net: hds: restore hds settings")
introduced the config reset, but this was shadowed by the copy.
Signed-off-by: Dimitri Daskalakis <daskald@meta.com>
---
tools/testing/selftests/drivers/net/hds.py | 29 ----------------------
1 file changed, 29 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/hds.py b/tools/testing/selftests/drivers/net/hds.py
index c4fe049e9baa..606e26d75951 100755
--- a/tools/testing/selftests/drivers/net/hds.py
+++ b/tools/testing/selftests/drivers/net/hds.py
@@ -240,35 +240,6 @@ def enabled_set_xdp(cfg, netnl) -> None:
_xdp_onoff(cfg)
-def set_xdp(cfg, netnl) -> None:
- """
- Enable single-buffer XDP on the device.
- When HDS is in "auto" / UNKNOWN mode, XDP installation should work.
- """
- mode = _get_hds_mode(cfg, netnl)
- if mode == 'enabled':
- netnl.rings_set({'header': {'dev-index': cfg.ifindex},
- 'tcp-data-split': 'unknown'})
-
- _xdp_onoff(cfg)
-
-
-def enabled_set_xdp(cfg, netnl) -> None:
- """
- Enable single-buffer XDP on the device.
- When HDS is in "enabled" mode, XDP installation should not work.
- """
- _get_hds_mode(cfg, netnl) # Trigger skip if not supported
-
- netnl.rings_set({'header': {'dev-index': cfg.ifindex},
- 'tcp-data-split': 'enabled'})
- defer(netnl.rings_set, {'header': {'dev-index': cfg.ifindex},
- 'tcp-data-split': 'unknown'})
-
- with ksft_raises(CmdExitFailure) as e:
- _xdp_onoff(cfg)
-
-
def ioctl(cfg, netnl) -> None:
mode1 = _get_hds_mode(cfg, netnl)
_ioctl_ringparam_modify(cfg, netnl)
--
2.52.0
reply other threads:[~2026-09-11 22:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260911224255.3675903-1-dimitri.daskalakis1@gmail.com \
--to=dimitri.daskalakis1@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--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