Thread (19 messages) 19 messages, 2 authors, 23d ago

Re: [PATCH net-next 05/11] tcp: allow mptcp to drop TS for some packets

From: Matthieu Baerts <matttbe@kernel.org>
Date: 2026-06-01 08:07:16
Also in: lkml, mptcp

On 01/06/2026 17:26, Eric Dumazet wrote:
On Sun, May 31, 2026 at 11:52 PM Matthieu Baerts [off-list ref] wrote:
(...)
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help