regressions.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Thorsten Leemhuis <regressions@leemhuis.info>
To: "regressions@lists.linux.dev" <regressions@lists.linux.dev>
Subject: Re: xfrm regression: TCP MSS calculation broken by commit b515d263, results in TCP stall #forregzbot
Date: Fri, 4 Feb 2022 09:59:12 +0100	[thread overview]
Message-ID: <f957038d-a5fe-7507-402a-850a38d43094@leemhuis.info> (raw)
In-Reply-To: <221e1da9-e1c4-10ee-332a-117dee0d913d@leemhuis.info>

For the record:

#regzbot fixed-by: a6d95c5a628a09be

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a6d95c5a628a09be129f25d5663a7e9db8261f51

> Revert "xfrm: xfrm_state_mtu should return at least 1280 for ipv6"
> This reverts commit b515d2637276a3810d6595e10ab02c13bfd0b63a.
> 
> Commit b515d2637276a3810d6595e10ab02c13bfd0b63a ("xfrm: xfrm_state_mtu
> should return at least 1280 for ipv6") in v5.14 breaks the TCP MSS
> calculation in ipsec transport mode, resulting complete stalls of TCP
> connections. This happens when the (P)MTU is 1280 or slighly larger.
> 
> The desired formula for the MSS is:
> MSS = (MTU - ESP_overhead) - IP header - TCP header
> 
> However, the above commit clamps the (MTU - ESP_overhead) to a
> minimum of 1280, turning the formula into
> MSS = max(MTU - ESP overhead, 1280) -  IP header - TCP header
> 
> With the (P)MTU near 1280, the calculated MSS is too large and the
> resulting TCP packets never make it to the destination because they
> are over the actual PMTU.
> 
> The above commit also causes suboptimal double fragmentation in
> xfrm tunnel mode, as described in
> https://lore.kernel.org/netdev/20210429202529.codhwpc7w6kbudug@dwarf.suse.cz/
> 
> The original problem the above commit was trying to fix is now fixed
> by commit 6596a0229541270fb8d38d989f91b78838e5e9da ("xfrm: fix MTU
> regression").
> 
> Signed-off-by: Jiri Bohac <jbohac@suse.cz>
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>

TWIMC: this mail is primarily send for documentation purposes and for
regzbot, my Linux kernel regression tracking bot. These mails usually
contain '#forregzbot' in the subject, to make them easy to spot and filter.

On 16.01.22 11:18, Thorsten Leemhuis wrote:
> [TLDR: I'm adding this regression to regzbot, the Linux kernel
> regression tracking bot; most text you find below is compiled from a few
> templates paragraphs some of you might have seen already.]
> 
> Top-posting for once, to make this easy accessible to everyone.
> 
> On 14.01.22 18:31, Jiri Bohac wrote:
>>
>> our customer found that commit
>> b515d2637276a3810d6595e10ab02c13bfd0b63a ("xfrm: xfrm_state_mtu
>> should return at least 1280 for ipv6") in v5.14 breaks the TCP
>> MSS calculation in ipsec transport mode, resulting complete
>> stalls of TCP connections. This happens when the (P)MTU is 1280
>> or slighly larger.
>>
>> The desired formula for the MSS is:
>> 	MSS = (MTU - ESP_overhead) - IP header - TCP header
>>
>> However, the above patch clamps the (MTU - ESP_overhead) to a
>> minimum of 1280, turning the formula into
>> 	MSS = max(MTU - ESP overhead, 1280) -  IP header - TCP header
>>
>> With the (P)MTU near 1280, the calculated MSS is too large and
>> the resulting TCP packets never make it to the destination
>> because they are over the actual PMTU.
>>
>> Trying to fix the exact same problem as the broken patch, which I
>> was unaware of, I sent an alternative patch in this thread of
>> April 2021:
>> https://lore.kernel.org/netdev/20210429170254.5grfgsz2hgy2qjhk@dwarf.suse.cz/
>> (note the v1 is broken and followed by v2!)
>>
>> In that thread I also found other problems with
>> b515d2637276a3810d6595e10ab02c13bfd0b63a - in tunnel mode it
>> causes suboptimal double fragmentation:
>> https://lore.kernel.org/netdev/20210429202529.codhwpc7w6kbudug@dwarf.suse.cz/
>>
>> I therefore propose to revert
>> b515d2637276a3810d6595e10ab02c13bfd0b63a and
>> apply the v2 version of my patch, which I'll re-send in reply to
>> this e-mail.
> 
> Thanks for the report.
> 
> To be sure this issue doesn't fall through the cracks unnoticed, I'm
> adding it to regzbot, my Linux kernel regression tracking bot:
> 
> #regzbot ^introduced b515d2637276a3810d6595e10ab02c13bfd0b63a
> #regzbot title xfrm: TCP MSS calculation broken by commit b515d263,
> results in TCP stall
> #regzbot ignore-activity
> 
> Reminder: when fixing the issue, please add a 'Link:' tag with the URL
> to the report (the parent of this mail) using the kernel.org redirector,
> as explained in 'Documentation/process/submitting-patches.rst'. Regzbot
> then will automatically mark the regression as resolved once the fix
> lands in the appropriate tree. For more details about regzbot see footer.
> 
> Sending this to everyone that got the initial report, to make all aware
> of the tracking. I also hope that messages like this motivate people to
> directly get at least the regression mailing list and ideally even
> regzbot involved when dealing with regressions, as messages like this
> wouldn't be needed then.
> 
> Don't worry, I'll send further messages wrt to this regression just to
> the lists (with a tag in the subject so people can filter them away), as
> long as they are intended just for regzbot. With a bit of luck no such
> messages will be needed anyway.
> 
> Ciao, Thorsten (wearing his 'Linux kernel regression tracker' hat)
> 
> P.S.: As a Linux kernel regression tracker I'm getting a lot of reports
> on my table. I can only look briefly into most of them. Unfortunately
> therefore I sometimes will get things wrong or miss something important.
> I hope that's not the case here; if you think it is, don't hesitate to
> tell me about it in a public reply, that's in everyone's interest.
> 
> BTW, I have no personal interest in this issue, which is tracked using
> regzbot, my Linux kernel regression tracking bot
> (https://linux-regtracking.leemhuis.info/regzbot/). I'm only posting
> this mail to get things rolling again and hence don't need to be CC on
> all further activities wrt to this regression.
> 
> ---
> Additional information about regzbot:
> 
> If you want to know more about regzbot, check out its web-interface, the
> getting start guide, and/or the references documentation:
> 
> https://linux-regtracking.leemhuis.info/regzbot/
> https://gitlab.com/knurd42/regzbot/-/blob/main/docs/getting_started.md
> https://gitlab.com/knurd42/regzbot/-/blob/main/docs/reference.md
> 
> The last two documents will explain how you can interact with regzbot
> yourself if your want to.
> 
> Hint for reporters: when reporting a regression it's in your interest to
> tell #regzbot about it in the report, as that will ensure the regression
> gets on the radar of regzbot and the regression tracker. That's in your
> interest, as they will make sure the report won't fall through the
> cracks unnoticed.
> 
> Hint for developers: you normally don't need to care about regzbot once
> it's involved. Fix the issue as you normally would, just remember to
> include a 'Link:' tag to the report in the commit message, as explained
> in Documentation/process/submitting-patches.rst
> That aspect was recently was made more explicit in commit 1f57bd42b77c:
> https://git.kernel.org/linus/1f57bd42b77c
> 

  reply	other threads:[~2022-02-04  8:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220114173133.tzmdm2hy4flhblo3@dwarf.suse.cz>
2022-01-16 10:18 ` xfrm regression: TCP MSS calculation broken by commit b515d263, results in TCP stall Thorsten Leemhuis
2022-02-04  8:59   ` Thorsten Leemhuis [this message]
     [not found] ` <20220114174058.rqhtuwpfhq6czldn@dwarf.suse.cz>
     [not found]   ` <20220119073519.GJ1223722@gauss3.secunet.de>
     [not found]     ` <20220119091233.pzqdlzpcyicjavk5@dwarf.suse.cz>
     [not found]       ` <20220124154531.GM1223722@gauss3.secunet.de>
     [not found]         ` <20220125094102.ju7bhuplcxnkyv4x@dwarf.suse.cz>
     [not found]           ` <20220126064214.GO1223722@gauss3.secunet.de>
     [not found]             ` <20220126150018.7cdfxtkq2nfkqj4j@dwarf.suse.cz>
     [not found]               ` <20220201064639.GS1223722@gauss3.secunet.de>
2022-02-15 14:59                 ` [PATCH] Revert "xfrm: xfrm_state_mtu should return at least 1280 for ipv6" Thorsten Leemhuis
2022-02-16 11:02                   ` Steffen Klassert

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=f957038d-a5fe-7507-402a-850a38d43094@leemhuis.info \
    --to=regressions@leemhuis.info \
    --cc=regressions@lists.linux.dev \
    /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).