From: netdev-bot+sashiko@kernel.org
To: xiexinet@gmail.com
Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, davem@davemloft.net,
edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, andrew+netdev@lunn.ch, shuah@kernel.org,
kees@kernel.org, petr.wozniak@gmail.com, qingfang.deng@linux.dev,
fmaurer@redhat.com, luka.gejak@linux.dev, bigeasy@linutronix.de,
xiaoliang.yang_1@nxp.com, skhawaja@google.com,
liuhangbin@gmail.com, stable@vger.kernel.org,
sdf.kernel@gmail.com, lukma@denx.de, fmancera@suse.de,
danishanwar@ti.com
Subject: Re: [PATCH net v9 1/4] net: hsr: keep GRO disabled on HSR/PRP ports
Date: Mon, 16 Nov 2026 16:27:23 +0000 [thread overview]
Message-ID: <179484644326.3136.10831441284903731799@kernel.org> (raw)
In-Reply-To: <20261112153333.20-2-xiexinet@gmail.com>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The patch puts HSR-specific policy into the generic core function
__netdev_update_features() in net/core/dev.c (lines 11279-11285):…
--
net: hsr: keep GRO disabled on HSR/PRP ports
This commit adds an hsr_port bit to struct net_device. HSR sets the bit
on its direct members (slave A/B and interlink). While the bit is set,
__netdev_update_features() clears NETIF_F_GRO and configurable
NETIF_F_GRO_HW from both wanted_features and the computed features, and
an attach fails if software GRO stays on.
> diff --git a/net/core/dev.c b/net/core/dev.c
> index df1a840b03343..c8c2de2125567 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -11269,6 +11269,21 @@ int __netdev_update_features(struct net_device *dev)
>
> features = netdev_get_wanted_features(dev);
>
> + /* A direct HSR/PRP port needs per-frame metadata. Drop software
> + * GRO and configurable GRO_HW from the request as well as from the
> + * features passed to ndo_fix_features(), as the core does for
> + * upper-disabled features: drivers such as veth derive state from
> + * wanted_features and need the requested and the active bit to
> + * agree. Fixed-on or driver-required GRO_HW is left to the driver.
> + */
> + if (dev->hsr_port) {
> + netdev_features_t gro = NETIF_F_GRO |
> + (dev->hw_features & NETIF_F_GRO_HW);
> +
> + dev->wanted_features &= ~gro;
> + features &= ~gro;
> + }
[Severity: Low]
The comment says this follows what "the core does for upper-disabled
features". Is that right?
netdev_sync_upper_features() runs inside the lower device's own update.
It masks only the computed features and does not touch the request:
if (!(upper->wanted_features & feature)
&& (features & feature)) {
...
features &= ~feature;
}
Only netdev_sync_lower_features() clears lower->wanted_features, and it
does that once, when the upper device turns the feature off. In this
patch, the request is cleared inside the same update that is supposed to
apply it.
Can this make the legacy ETHTOOL_SFEATURES ioctl report success for a
GRO request that was never applied? ethtool_set_features() sets
wanted_features and then runs:
net/ethtool/ioctl.c:ethtool_set_features() {
...
__netdev_update_features(dev);
if ((dev->wanted_features ^ dev->features) & valid)
ret |= ETHTOOL_F_WISH;
...
}
When hsr_port is set, GRO is already gone from both wanted_features and
features when the XOR runs. So ETHTOOL_F_WISH is not set for GRO, and
the ioctl reports full success while GRO stays off. A later ethtool -k
shows GRO off without the "[requested on]" marker.
Compare LRO disabled by an upper device: there the request stays in
wanted_features and ETHTOOL_F_WISH is returned. The netlink path,
ethnl_set_features(), still reports the mismatch, because it compares
against its local req_wanted copy.
The comment on the new struct net_device field also says "Kernel role
state only; no user ABI", but the field changes behaviour that ethtool
users can see. It also puts HSR-specific policy into the generic
__netdev_update_features() under a "net: hsr:" subject. Later patches in
the series do not touch net/core/dev.c, so this is still the case at the
end of the series.
Would it work to mask only the computed features here, the way
netdev_sync_upper_features() does? Or, if the request has to be cleared
for veth, could the comment stop citing the upper-disable path as the
model and mention the ETHTOOL_F_WISH change?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261112153333.20-1-xiexinet%40gmail.com
next prev parent reply other threads:[~2026-11-16 16:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 15:33 [PATCH net v9 0/4] net: hsr: fix super-packet forwarding Xin Xie
2026-11-12 15:33 ` [PATCH net v9 1/4] net: hsr: keep GRO disabled on HSR/PRP ports Xin Xie
2026-11-16 16:27 ` netdev-bot+sashiko [this message]
2026-11-12 15:33 ` [PATCH net v9 2/4] net: hsr: refuse forwarding devices as " Xin Xie
2026-11-16 16:27 ` netdev-bot+sashiko
2026-11-12 15:33 ` [PATCH net v9 3/4] net: hsr: segment GSO before per-frame forwarding Xin Xie
2026-11-15 21:41 ` Sebastian Andrzej Siewior
2026-11-16 9:06 ` Xin Xie
2026-11-12 15:33 ` [PATCH net v9 4/4] selftests: net: hsr: verify GRO policy and ordered forwarding Xin Xie
2026-11-16 16:27 ` netdev-bot+sashiko
2026-11-13 16:38 ` [PATCH net v9 0/4] net: hsr: fix super-packet forwarding Sebastian Andrzej Siewior
2026-11-15 21:45 ` Sebastian Andrzej Siewior
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=179484644326.3136.10831441284903731799@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bigeasy@linutronix.de \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=fmancera@suse.de \
--cc=fmaurer@redhat.com \
--cc=horms@kernel.org \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=luka.gejak@linux.dev \
--cc=lukma@denx.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petr.wozniak@gmail.com \
--cc=qingfang.deng@linux.dev \
--cc=sdf.kernel@gmail.com \
--cc=shuah@kernel.org \
--cc=skhawaja@google.com \
--cc=stable@vger.kernel.org \
--cc=xiaoliang.yang_1@nxp.com \
--cc=xiexinet@gmail.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
all inboxes | Powered by JetHome®