From: Paolo Abeni <pabeni@redhat.com>
To: Aaron Conole <aconole@redhat.com>,
Eelco Chaudron <echaudro@redhat.com>,
Ilya Maximets <i.maximets@ovn.org>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
horms@kernel.org, corbet@lwn.net, saeedm@nvidia.com,
tariqt@nvidia.com, mbloch@nvidia.com, leon@kernel.org,
dsahern@kernel.org, ncardwell@google.com, ecree.xilinx@gmail.com,
Richard Gobert <richardbgobert@gmail.com>,
kuniyu@google.com, shuah@kernel.org, sdf@fomichev.me,
aleksander.lobakin@intel.com, florian.fainelli@broadcom.com,
alexander.duyck@gmail.com, linux-kernel@vger.kernel.org,
linux-net-drivers@amd.com, netdev@vger.kernel.org,
willemdebruijn.kernel@gmail.com
Subject: Re: [PATCH net-next v6 4/5] net: gro: remove unnecessary df checks
Date: Thu, 25 Sep 2025 12:15:27 +0200 [thread overview]
Message-ID: <dd89dc81-6c1b-4753-9682-9876c18acffc@redhat.com> (raw)
In-Reply-To: <d88f374a-07ff-46ff-aa04-a205c2d85a4c@gmail.com>
Adding the OVS maintainers for awareness..
On 9/22/25 10:19 AM, Richard Gobert wrote:
> Richard Gobert wrote:
>> Paolo Abeni wrote:
>>> On 9/16/25 4:48 PM, Richard Gobert wrote:
>>>> Currently, packets with fixed IDs will be merged only if their
>>>> don't-fragment bit is set. This restriction is unnecessary since
>>>> packets without the don't-fragment bit will be forwarded as-is even
>>>> if they were merged together. The merged packets will be segmented
>>>> into their original forms before being forwarded, either by GSO or
>>>> by TSO. The IDs will also remain identical unless NETIF_F_TSO_MANGLEID
>>>> is set, in which case the IDs can become incrementing, which is also fine.
>>>>
>>>> Note that IP fragmentation is not an issue here, since packets are
>>>> segmented before being further fragmented. Fragmentation happens the
>>>> same way regardless of whether the packets were first merged together.
>>>
>>> I agree with Willem, that an explicit assertion somewhere (in
>>> ip_do_fragmentation?!?) could be useful.
>>>
>>
>> As I replied to Willem, I'll mention ip_finish_output_gso explicitly in the
>> commit message.
>>
>> Or did you mean I should add some type of WARN_ON assertion that ip_do_fragment isn't
>> called for GSO packets?
>>
>>> Also I'm not sure that "packets are segmented before being further
>>> fragmented" is always true for the OVS forwarding scenario.
>>>
>>
>> If this is really the case, it is a bug in OVS. Segmentation is required before
>> fragmentation as otherwise GRO isn't transparent and fragments will be forwarded
>> that contain data from multiple different packets. It's also probably less efficient,
>> if the segment size is smaller than the MTU. I think this should be addressed in a
>> separate patch series.
>>
>> I'll also mention OVS in the commit message.
>>
>
> I looked into it, and it seems that you are correct. Looks like fragmentation
> can occur without segmentation in the OVS forwarding case. As I said, this is
> a bug since generated fragments may contain data from multiple packets. Still,
> this can already happen for packets with incrementing IDs and nothing special
> in particular will happen for the packets discussed in this patch. This should
> be fixed in a separate patch series, as do all other cases where ip_do_fragment
> is called directly without segmenting the packets first.
TL;DR: apparently there is a bug in OVS segmentation/fragmentation code:
OVS can do fragmentation of GSO packets without segmenting them
beforehands, please see the threads under:
https://lore.kernel.org/netdev/20250916144841.4884-5-richardbgobert@gmail.com/
for the whole discussion.
Thanks,
Paolo
next prev parent reply other threads:[~2025-09-25 10:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-16 14:48 [PATCH net-next v6 0/5] net: gso: restore outer ip ids correctly Richard Gobert
2025-09-16 14:48 ` [PATCH net-next v6 1/5] net: gro: remove is_ipv6 from napi_gro_cb Richard Gobert
2025-09-16 14:48 ` [PATCH net-next v6 2/5] net: gro: only merge packets with incrementing or fixed outer ids Richard Gobert
2025-09-22 19:28 ` Willem de Bruijn
2025-09-16 14:48 ` [PATCH net-next v6 3/5] net: gso: restore ids of outer ip headers correctly Richard Gobert
2025-09-22 19:35 ` Willem de Bruijn
2025-09-23 8:29 ` Richard Gobert
2025-09-16 14:48 ` [PATCH net-next v6 4/5] net: gro: remove unnecessary df checks Richard Gobert
2025-09-18 8:10 ` Paolo Abeni
2025-09-18 14:01 ` Richard Gobert
2025-09-22 8:19 ` Richard Gobert
2025-09-25 10:15 ` Paolo Abeni [this message]
2025-09-29 11:09 ` Ilya Maximets
2025-09-29 14:20 ` Willem de Bruijn
2025-09-16 14:48 ` [PATCH net-next v6 5/5] selftests/net: test ipip packets in gro.sh Richard Gobert
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=dd89dc81-6c1b-4753-9682-9876c18acffc@redhat.com \
--to=pabeni@redhat.com \
--cc=aconole@redhat.com \
--cc=aleksander.lobakin@intel.com \
--cc=alexander.duyck@gmail.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=echaudro@redhat.com \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=horms@kernel.org \
--cc=i.maximets@ovn.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net-drivers@amd.com \
--cc=mbloch@nvidia.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=richardbgobert@gmail.com \
--cc=saeedm@nvidia.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=tariqt@nvidia.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 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®