Netdev List
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: xiexinet@gmail.com
Cc: Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	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,
	stable@vger.kernel.org
Subject: Re: [PATCH net v2 1/4] net: hsr: fix packet drops caused by GRO superpackets
Date: Thu, 30 Jul 2026 15:46:53 +0100	[thread overview]
Message-ID: <20260730144653.147367-1-horms@kernel.org> (raw)
In-Reply-To: <20260724161253.79-2-xiexinet@gmail.com>

This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
Full review at: https://sashiko.dev/#/patchset/20260724161253.79-2-xiexinet@gmail.com?part=1
---
--- Patch [1]: [PATCH net v2 1/4] net: hsr: fix packet drops caused by GRO superpackets ---
commit b386202ef95164a9e68085058531ac441d9df79d
Author: Xin Xie <xiexinet@gmail.com>

net: hsr: fix packet drops caused by GRO superpackets

This commit fixes HSR/PRP packet drops by preventing lower devices from
aggregating frames into GRO super-packets. It adds dev_disable_gro() and
netif_disable_gro() functions and calls them during HSR port setup.

> diff --git a/net/core/dev.c b/net/core/dev.c
> index 5933c5dab09ee..a6cf2adc86256 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c

[ ... ]

> @@ -1840,6 +1840,24 @@ void netif_disable_lro(struct net_device *dev)
>  	}
>  }
>  
> +void netif_disable_gro(struct net_device *dev)
> +{
> +	struct net_device *lower_dev;
> +	struct list_head *iter;
> +
> +	dev->wanted_features &= ~(NETIF_F_GRO | NETIF_F_GRO_HW);

[Severity: High]
Does this one-time modification of wanted_features prevent userspace from
subsequently re-enabling GRO?

Since NETIF_F_GRO and NETIF_F_GRO_HW are not included in the
NETIF_F_UPPER_DISABLES macro definition in include/linux/netdev_features.h,
would netdev_sync_upper_features() and netdev_sync_lower_features() fail
to enforce the disabled state on lower devices during features recalculation?

Could an administrator run ethtool -K eth0 gro on (or add a new physical
device to an intermediate upper device already enslaved to HSR) to bypass
this restriction and cause the HSR packet drops to resurface?

> +	netdev_update_features(dev);
> +
> +	if (unlikely(dev->features & (NETIF_F_GRO | NETIF_F_GRO_HW)))
> +		netdev_WARN(dev, "failed to disable GRO!\n");
> +
> +	netdev_for_each_lower_dev(dev, lower_dev, iter) {
> +		netdev_lock_ops(lower_dev);
> +		netif_disable_gro(lower_dev);
> +		netdev_unlock_ops(lower_dev);
> +	}
> +}

  reply	other threads:[~2026-07-30 14:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24 16:12 [PATCH net v2 0/4] net: hsr: fix GRO/GSO super-packet handling Xin Xie
2026-07-24 16:12 ` [PATCH net v2 1/4] net: hsr: fix packet drops caused by GRO superpackets Xin Xie
2026-07-30 14:46   ` Simon Horman [this message]
2026-07-30 15:53     ` Xin Xie
2026-07-24 16:12 ` [PATCH net v2 2/4] net: hsr: shrink seqnr_lock to sequence counter updates Xin Xie
2026-07-24 16:12 ` [PATCH net v2 3/4] net: hsr: unfold GSO super-packets at the forward entry Xin Xie
2026-07-24 16:12 ` [PATCH net v2 4/4] selftests: net: hsr: add GRO super-packet forwarding test Xin Xie

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=20260730144653.147367-1-horms@kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fmaurer@redhat.com \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luka.gejak@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petr.wozniak@gmail.com \
    --cc=qingfang.deng@linux.dev \
    --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