From: netdev-bot+sashiko@kernel.org
To: kuba@kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
michael.chan@broadcom.com, manishc@marvell.com,
joshwash@google.com, hramamurthy@google.com, tariqt@nvidia.com,
saeedm@nvidia.com, daniel@iogearbox.net, hawk@kernel.org,
sdf@fomichev.me, willemb@google.com,
przemyslaw.kitszel@intel.com, bpf@vger.kernel.org
Subject: Re: [PATCH net-next 2/8] selftests: drv-net: drop the generic XDP hack from the HW GRO setup
Date: Sun, 22 Nov 2026 17:03:01 +0000 [thread overview]
Message-ID: <179536698167.3135.988717812075290728@kernel.org> (raw)
In-Reply-To: <20261118232315.3593731-3-kuba@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] After this patch, nothing in
tools/testing/selftests/drivers/net/hw/gro_stats.py checks that rx-…
--
selftests: drv-net: drop the generic XDP hack from the HW GRO setup
This commit removes the generic XDP fallback from the HW GRO setup in
gro_lib.py and hw/gro_stats.py. Drivers no longer tie HW GRO to
NETIF_F_GRO, so the setup now asks ethtool for SW GRO off and rx-gro-hw
on directly.
> diff --git a/tools/testing/selftests/drivers/net/gro_lib.py b/tools/testing/selftests/drivers/net/gro_lib.py
> index 875a715b2ae1c..6eff19db3541f 100644
> --- a/tools/testing/selftests/drivers/net/gro_lib.py
> +++ b/tools/testing/selftests/drivers/net/gro_lib.py
> @@ -263,26 +263,7 @@ def _setup(cfg, mode, test_name):
> set_ethtool_feat(cfg.ifname, cfg.feat,
> {"generic-receive-offload": False,
> "rx-gro-hw": True,
> - "large-receive-offload": False},
> - check=False)
[ ... ]
> diff --git a/tools/testing/selftests/drivers/net/hw/gro_stats.py b/tools/testing/selftests/drivers/net/hw/gro_stats.py
> index 70e76e3888bdb..569ca81368e69 100755
> --- a/tools/testing/selftests/drivers/net/hw/gro_stats.py
> +++ b/tools/testing/selftests/drivers/net/hw/gro_stats.py
> @@ -173,24 +173,6 @@ def _setup_hw_gro(cfg):
> "rx-gro-hw": True,
> "large-receive-offload": False})
>
> - # Some NICs treat HW GRO as a GRO sub-feature so disabling GRO
> - # will also clear HW GRO. Use a hack of installing XDP generic
> - # to skip SW GRO, even when enabled.
> - feat = ethtool(f"-k {cfg.ifname}", json=True)[0]
> - if not feat["rx-gro-hw"]["active"]:
[ ... ]
> - _set_ethtool_feat(cfg, feat,
> - {"generic-receive-offload": True,
> - "rx-gro-hw": True,
> - "large-receive-offload": False})
> -
[Severity: Medium]
Now that this read-back is gone, does anything in gro_stats.py still check
that rx-gro-hw is actually active after _setup_hw_gro() runs?
_setup_hw_gro() calls the file-local _set_ethtool_feat(). That helper only
raises KsftSkipEx when a feature is marked fixed. It never re-reads the
features after running ethtool -K:
tools/testing/selftests/drivers/net/hw/gro_stats.py:_set_ethtool_feat() {
...
eth_cmd = ethtool(" ".join(new))
defer(ethtool, " ".join(old))
# If ethtool printed something kernel must have modified some features
if eth_cmd.stdout:
ksft_pr(eth_cmd)
}
In the same patch, _setup() in gro_lib.py drops check=False. It now relies
on the read-back in the shared helper:
tools/testing/selftests/drivers/net/lib/py/feat.py:set_ethtool_feat() {
...
current = ethtool(f"-k {dev}", json=True, host=host)[0]
for name, state in feats.items():
if current[name]["active"] != state:
raise KsftXfailEx(f"{name} was not set to {s2n[state]}")
}
The kernel can still clear rx-gro-hw even when the feature is not fixed:
- netdev_fix_features() drops NETIF_F_GRO_HW when RXCSUM is off or RX-FCS
is on.
- A driver's ndo_fix_features can clear it.
- The tests may run on a kernel without "net: stop making HW-GRO depend
on SW GRO".
In those cases, would gro_stats.py go on to run with both SW and HW GRO
disabled?
If so, test_gro_stats_full would fail its ksft_ge(gro_coalesced, 1) and
rx-hw-gro-* checks with misleading messages. Meanwhile test_gro_stats_single
and test_gro_order could pass without HW GRO ever having run.
Would it make sense to switch _setup_hw_gro() to the shared
set_ethtool_feat()? Another option is to re-read ethtool -k after the set
and skip or xfail when rx-gro-hw is not active.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261118232315.3593731-1-kuba%40kernel.org
next prev parent reply other threads:[~2026-11-22 17:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 23:23 [PATCH net-next 0/8] net: adjust HW GRO and LRO feature handling Jakub Kicinski
2026-11-18 23:23 ` [PATCH net-next 1/8] net: stop making HW-GRO depend on SW GRO Jakub Kicinski
2026-11-22 17:03 ` netdev-bot+sashiko
2026-11-18 23:23 ` [PATCH net-next 2/8] selftests: drv-net: drop the generic XDP hack from the HW GRO setup Jakub Kicinski
2026-11-19 21:40 ` Willem de Bruijn
2026-11-22 17:03 ` netdev-bot+sashiko [this message]
2026-11-18 23:23 ` [PATCH net-next 3/8] net: state the "XDP excludes HW-GRO" rule in the core Jakub Kicinski
2026-11-19 22:59 ` Willem de Bruijn
2026-11-20 22:13 ` Jakub Kicinski
2026-11-22 17:03 ` netdev-bot+sashiko
2026-11-18 23:23 ` [PATCH net-next 4/8] net: state the "XDP excludes LRO" " Jakub Kicinski
2026-11-19 23:02 ` Willem de Bruijn
2026-11-19 23:24 ` sashiko-bot
2026-11-22 17:03 ` netdev-bot+sashiko
2026-11-18 23:23 ` [PATCH net-next 5/8] eth: mlx5e: drop the now-dead HW-GRO and LRO vs XDP handling Jakub Kicinski
2026-11-19 15:42 ` Dragos Tatulea
2026-11-22 17:03 ` netdev-bot+sashiko
2026-11-18 23:23 ` [PATCH net-next 6/8] eth: bnxt_en: don't clear HW-GRO and LRO for XDP in ndo_fix_features Jakub Kicinski
2026-11-18 23:23 ` [PATCH net-next 7/8] eth: qede: drop the now-dead HW-GRO vs XDP handling Jakub Kicinski
2026-11-22 17:03 ` netdev-bot+sashiko
2026-11-18 23:23 ` [PATCH net-next 8/8] eth: gve: drop the now-dead HW-GRO vs XDP interlock Jakub Kicinski
2026-11-18 23:44 ` Ankit Garg
2026-11-19 22:14 ` Harshitha Ramamurthy
2026-11-22 17:03 ` netdev-bot+sashiko
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=179536698167.3135.988717812075290728@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=hramamurthy@google.com \
--cc=joshwash@google.com \
--cc=kuba@kernel.org \
--cc=manishc@marvell.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=saeedm@nvidia.com \
--cc=sdf@fomichev.me \
--cc=tariqt@nvidia.com \
--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