From: Mariusz Klimek <maklimek97@gmail.com>
To: Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/3] net: gso: do not include jumbogram HBH header in seglen calculation
Date: Tue, 2 Dec 2025 17:41:21 +0100 [thread overview]
Message-ID: <3428eb6d-2698-4a08-bbb8-336c633752e9@gmail.com> (raw)
In-Reply-To: <a7b90a3a-79ed-42a4-a782-17cde1b9a2d6@redhat.com>
On 12/2/25 12:36, Paolo Abeni wrote:
> On 11/27/25 10:13 AM, Mariusz Klimek wrote:
>> This patch fixes an issue in skb_gso_network_seglen where the calculated
>> segment length includes the HBH headers of BIG TCP jumbograms despite these
>> headers being removed before segmentation. These headers are added by GRO
>> or by ip6_xmit for BIG TCP packets and are later removed by GSO. This bug
>> causes MTU validation of BIG TCP jumbograms to fail.
>>
>> Signed-off-by: Mariusz Klimek <maklimek97@gmail.com>
>> ---
>> net/core/gso.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/net/core/gso.c b/net/core/gso.c
>> index bcd156372f4d..251a49181031 100644
>> --- a/net/core/gso.c
>> +++ b/net/core/gso.c
>> @@ -180,6 +180,10 @@ static unsigned int skb_gso_network_seglen(const struct sk_buff *skb)
>> unsigned int hdr_len = skb_transport_header(skb) -
>> skb_network_header(skb);
>>
>> + /* Jumbogram HBH header is removed upon segmentation. */
>> + if (skb->protocol == htons(ETH_P_IPV6) && skb->len > IPV6_MAXPLEN)
>> + hdr_len -= sizeof(struct hop_jumbo_hdr);
>
> Isn't the above condition a bit too course-grain? Specifically, can
> UDP-encapsulated GSO packets wrongly hit it?
>
> /P
>
You're right. Also, It should actually be skb->len - nhdr_len where nhdr_len is
the length from the beginning of the packet up to right after the network header.
Should I send a new version or wait for net-next to re-open?
--
Mariusz K.
next prev parent reply other threads:[~2025-12-02 16:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 9:13 [PATCH net-next 0/3] net: gso: fix MTU validation of BIG TCP jumbograms Mariusz Klimek
2025-11-27 9:13 ` [PATCH net-next 1/3] net: gso: do not include jumbogram HBH header in seglen calculation Mariusz Klimek
2025-12-02 11:36 ` Paolo Abeni
2025-12-02 12:06 ` Paolo Abeni
2025-12-02 16:55 ` Mariusz Klimek
2025-12-02 16:41 ` Mariusz Klimek [this message]
2025-12-02 20:34 ` Paolo Abeni
2025-11-27 9:13 ` [PATCH net-next 2/3] ipv6: remove IP6SKB_FAKEJUMBO flag Mariusz Klimek
2025-11-27 9:13 ` [PATCH net-next 3/3] selftests/net: remove unnecessary MTU config in big_tcp.sh Mariusz Klimek
2025-12-02 12:01 ` Paolo Abeni
2025-12-02 16:46 ` Mariusz Klimek
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=3428eb6d-2698-4a08-bbb8-336c633752e9@gmail.com \
--to=maklimek97@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).