All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Julius Bairaktaris <julius@bairaktaris.de>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@kernel.org,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	dsahern@kernel.org, willemb@google.com,
	willemdebruijn.kernel@gmail.com, kuniyu@google.com,
	steffen.klassert@secunet.com
Subject: Re: [PATCH net v7 0/2] ipmr: forward GSO multicast packets
Date: Tue, 1 Dec 2026 22:03:02 +0200	[thread overview]
Message-ID: <20261201200302.GA2365323@shredder> (raw)
In-Reply-To: <cover.1795882892.git.julius@bairaktaris.de>

On Sat, Nov 28, 2026 at 05:47:54PM +0100, Julius Bairaktaris wrote:
> With fraglist GRO or UDP GRO forwarding on, a routed IPv4 multicast
> stream arrives as GSO packets. ipmr_prepare_xmit() drops every DF
> aggregate larger than the MTU, and ip_encap() sets no tunnel GSO state,
> so a GSO packet sent to a VIFF_TUNNEL vif is dropped during
> segmentation.
> 
> Patch 1 sets up IPXIP4 GSO state, outer IP IDs and length in
> ip_encap(), segments an already encapsulated GSO packet in software
> before it, as an ipip device does, and completes the pending checksum
> of an encapsulated packet that is not GSO.
> Patch 2 lets DF GSO packets pass when their segments fit the MTU.

Two comments:

1. This doesn't look like net material. The patches don't fix a
regression: ipmr never handled DF GSO packets larger than the MTU, or
GSO packets sent to tunnel vifs. The blamed commit gated the feature
behind "rx-gro-list" which is off by default. It's not like the same
user space got different results before and after this commit. Please
target net-next and remove the Fixes: tag.

2. AFAIU, VIFF_TUNNEL vifs are only used by DVMRP (mrouted), which is
obsolete, and I'm not aware of anyone using them. Therefore, patch 1 is
most likely going to be dead code and not worth the complexity. Better
to just adjust patch 2 to keep the current behavior for tunnel vifs by
not applying the GSO exception to them, and explain why in the commit
message to suppress comments from the review bot:

diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 836f3f95b20c..4e6bdac403f0 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1936,6 +1936,7 @@ static int ipmr_prepare_xmit(struct net *net, struct mr_table *mrt,
 	struct rtable *rt;
 	struct flowi4 fl4;
 	int    encap = 0;
+	unsigned int mtu;
 
 	vif_dev = vif_dev_read(vif);
 	if (!vif_dev)
@@ -1968,7 +1969,10 @@ static int ipmr_prepare_xmit(struct net *net, struct mr_table *mrt,
 			return -1;
 	}
 
-	if (skb->len+encap > dst4_mtu(&rt->dst) && (ntohs(iph->frag_off) & IP_DF)) {
+	mtu = dst4_mtu(&rt->dst);
+	if (skb->len + encap > mtu && (ntohs(iph->frag_off) & IP_DF) &&
+	    (encap || !skb_is_gso(skb) ||
+	     !skb_gso_validate_network_len(skb, mtu))) {
 		/* Do not fragment multicasts. Alas, IPv4 does not
 		 * allow to send ICMP, so that packets will disappear
 		 * to blackhole.


      parent reply	other threads:[~2026-12-01 20:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-28 16:47 [PATCH net v7 0/2] ipmr: forward GSO multicast packets Julius Bairaktaris
2026-11-28 16:47 ` [PATCH net v7 1/2] ipmr: set up GSO state for tunnel vifs Julius Bairaktaris
2026-11-28 16:47 ` [PATCH net v7 2/2] ipmr: do not drop GSO packets that fit the MTU after segmentation Julius Bairaktaris
2026-12-01 20:03 ` Ido Schimmel [this message]

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=20261201200302.GA2365323@shredder \
    --to=idosch@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=julius@bairaktaris.de \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=steffen.klassert@secunet.com \
    --cc=willemb@google.com \
    --cc=willemdebruijn.kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.