From: "Bilal Yazıcıoğlu" <ahmetbilalyazicioglu@gmail.com>
To: netdev@vger.kernel.org
Cc: "Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Shuah Khan" <shuah@kernel.org>,
"Mohsin Bashir" <hmohsin@meta.com>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
"Bilal Yazıcıoğlu" <ahmetbilalyazicioglu@gmail.com>
Subject: [PATCH net v2 0/2] selftests: drv-net: ring_reconfig: handle devices without channel config
Date: Tue, 10 Nov 2026 19:14:21 +0300 [thread overview]
Message-ID: <20261110161423.77910-1-ahmetbilalyazicioglu@gmail.com> (raw)
ring_reconfig.py assumes that a device which supports ring parameters
also supports changing its channels. Drivers without a get_channels op,
such as e1000e, return -EOPNOTSUPP for the channel query, and drivers
with get_channels but no set_channels, such as vmxnet3 and r8169,
return it for every channel change. The resulting NlError makes the
tests fail instead of skipping them.
On a ThinkPad T480 with an I219-V (e1000e) "ethtool -g" works while
"ethtool -l" returns "Operation not supported", and running the test
functions through the in-tree YNL library against the device shows
the three failures.
Patch 1 skips channels() on such devices and lets ringparam() continue
without the optional channel reduction, patch 2 skips
reconfig_tx_stall(). Only EOPNOTSUPP is handled; any other error still
fails, and restores are only dropped when nothing was changed. The
patches are split because the affected code came from two different
commits.
Testing: there is no remote endpoint for the T480, so the full test
was not run. With v1, the test functions were run against the real
device under ksft_run with a stub environment and all ethtool set
requests blocked: before the series all three fail, after it two are
skipped and the channel helper returns after the query. v2 was not
run on hardware; its new code is only reached after a successful
channel query, which never happens on e1000e. Drivers with
get_channels but no set_channels were not available; that part, and
devices which support changing channels, were checked against an
emulated ethtool family (unsupported query or change, other errors,
drivers rejecting only some layouts, failing restores) to check that
other errors still fail, restores still run after a change, and
behaviour with channel support is unchanged. pylint and ruff report
nothing new. Not tested: the full test with NETIF and a remote
endpoint, and the rest of ringparam() on e1000e (see the note in
patch 1 about ring size clamping).
I found this while looking for kernel tests I could validate on my
ThinkPad T480. I investigated and validated the issue on that
hardware, defined the scope of the fix, reviewed and refined the
implementation, and extended the regression tests used to validate
it.
This work was AI-assisted: OpenAI Codex helped with the initial
source analysis, and Claude Code drafted the implementation,
changelogs and test tooling. I take responsibility for the submitted
changes.
Changes in v2:
- patch 1: also handle -EOPNOTSUPP from the channel change in
_configure_min_ring_cnt(), for drivers with get_channels but no
set_channels (reported by the Sashiko review of v1)
- patch 1: skip channels() when every channel layout it tries is
rejected with -EOPNOTSUPP, dropping the restore of the unchanged
counts
- patch 2: skip reconfig_tx_stall() when enabling a second combined
channel is rejected with -EOPNOTSUPP, dropping the restore for it
v1: https://lore.kernel.org/all/20261106150509.30458-1-ahmetbilalyazicioglu@gmail.com/
Bilal Yazıcıoğlu (2):
selftests: drv-net: ring_reconfig: handle devices without channel
config
selftests: drv-net: ring_reconfig: skip tx stall test without channel
config
.../selftests/drivers/net/ring_reconfig.py | 65 ++++++++++++++++---
1 file changed, 57 insertions(+), 8 deletions(-)
base-commit: 19a227903e65c7a9c179156485660a4e017575fe
--
2.56.0
next reply other threads:[~2026-11-10 16:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 16:14 Bilal Yazıcıoğlu [this message]
2026-11-10 16:14 ` [PATCH net v2 1/2] " Bilal Yazıcıoğlu
2026-11-10 16:14 ` [PATCH net v2 2/2] selftests: drv-net: ring_reconfig: skip tx stall test " Bilal Yazıcıoğlu
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=20261110161423.77910-1-ahmetbilalyazicioglu@gmail.com \
--to=ahmetbilalyazicioglu@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hmohsin@meta.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®