From: Matthieu Baerts <matttbe@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: Mat Martineau <martineau@kernel.org>,
Geliang Tang <geliang@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, mptcp@lists.linux.dev,
linux-kernel@vger.kernel.org,
Neal Cardwell <ncardwell@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>
Subject: Re: [PATCH net-next 05/11] tcp: allow mptcp to drop TS for some packets
Date: Mon, 1 Jun 2026 18:07:09 +1000 [thread overview]
Message-ID: <9a86dcf5-da53-4ae2-b871-33e36856cde7@kernel.org> (raw)
In-Reply-To: <CANn89iLBh-tSEzDuZce5G2dmC6An1agoJ9UNq2qwAAC0+oTuPg@mail.gmail.com>
On 01/06/2026 17:26, Eric Dumazet wrote:
> On Sun, May 31, 2026 at 11:52 PM Matthieu Baerts <matttbe@kernel.org> wrote:
(...)
>> The modifications in net/ipv4/tcp_output.c would then be limited to:
>>
>>
>> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
>> index ef0c10cd31c7..f4edc9c4f3fc 100644
>> --- a/net/ipv4/tcp_output.c
>> +++ b/net/ipv4/tcp_output.c
>> @@ -1181,12 +1181,18 @@ static unsigned int tcp_established_options(struct sock *sk, struct sk_buff *skb
>> */
>> if (sk_is_mptcp(sk)) {
>> unsigned int remaining = MAX_TCP_OPTION_SPACE - size;
>> + bool has_ts = opts->options & OPTION_TS;
>> unsigned int opt_size = 0;
>>
>> if (mptcp_established_options(sk, skb, &opt_size, remaining,
>> - &opts->mptcp)) {
>> + has_ts, &opts->mptcp)) {
>> opts->options |= OPTION_MPTCP;
>> size += opt_size;
>> +
>> +#if IS_ENABLED(CONFIG_MPTCP)
>> + if (opts->mptcp.drop_ts)
>> + opts->options &= ~OPTION_TS;
>> +#endif
>
> SGTM, but maybe the IS_ENABLED() is not needed in this block,
> guarded by if (sk_is_mptcp(sk)) ?
It looks like it is still needed, same if I use:
if (IS_ENABLED(CONFIG_MPTCP) && sk_is_mptcp(sk)) {
Or maybe I missed another technique to avoid an extra #if.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2026-06-01 8:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 5:22 [PATCH net-next 00/11] mptcp: pm: drop TCP TS with ADD_ADDRv6 + port Matthieu Baerts (NGI0)
2026-06-01 5:22 ` [PATCH net-next 01/11] mptcp: options: suboptions sizes can be negative Matthieu Baerts (NGI0)
2026-06-01 5:22 ` [PATCH net-next 02/11] mptcp: pm: avoid computing rm_addr size twice Matthieu Baerts (NGI0)
2026-06-01 5:22 ` [PATCH net-next 03/11] mptcp: pm: avoid computing add_addr " Matthieu Baerts (NGI0)
2026-06-01 5:22 ` [PATCH net-next 04/11] mptcp: introduce add_addr_v6_port_drop_ts sysctl knob Matthieu Baerts (NGI0)
2026-06-01 5:44 ` Eric Dumazet
2026-06-01 6:04 ` Matthieu Baerts
2026-06-01 5:22 ` [PATCH net-next 05/11] tcp: allow mptcp to drop TS for some packets Matthieu Baerts (NGI0)
2026-06-01 6:04 ` Eric Dumazet
2026-06-01 6:52 ` Matthieu Baerts
2026-06-01 7:26 ` Eric Dumazet
2026-06-01 7:36 ` Matthieu Baerts
2026-06-01 8:07 ` Matthieu Baerts [this message]
2026-06-01 5:22 ` [PATCH net-next 06/11] mptcp: pm: drop TCP TS with ADD_ADDRv6 + port Matthieu Baerts (NGI0)
2026-06-01 5:22 ` [PATCH net-next 07/11] selftests: mptcp: validate ADD_ADDRv6 + TS " Matthieu Baerts (NGI0)
2026-06-01 5:22 ` [PATCH net-next 08/11] selftests: mptcp: always check sent/dropped ADD_ADDRs Matthieu Baerts (NGI0)
2026-06-01 5:22 ` [PATCH net-next 09/11] selftests: mptcp: connect: test name in pcap file Matthieu Baerts (NGI0)
2026-06-01 5:22 ` [PATCH net-next 10/11] selftests: mptcp: simult_flow: " Matthieu Baerts (NGI0)
2026-06-01 5:22 ` [PATCH net-next 11/11] selftests: mptcp: pcap: drop most of the payload Matthieu Baerts (NGI0)
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=9a86dcf5-da53-4ae2-b871-33e36856cde7@kernel.org \
--to=matttbe@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geliang@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martineau@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=ncardwell@google.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