From: Matthieu Baerts <matttbe@kernel.org>
To: Kuniyuki Iwashima <kuniyu@google.com>
Cc: Eric Dumazet <edumazet@kernel.org>,
Neal Cardwell <ncardwell@google.com>,
Mat Martineau <martineau@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Geliang Tang <geliang@kernel.org>,
Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuni1840@gmail.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH v2 net-next 2/2] mptcp: Don't call tcp_update_recv_tstamps() if not needed.
Date: Mon, 9 Nov 2026 13:24:15 +0100 [thread overview]
Message-ID: <ecd91efe-dd83-4890-8e55-ae04aa744d4c@kernel.org> (raw)
In-Reply-To: <20261105215209.3160316-3-kuniyu@google.com>
Hi Kuniyuki,
On 05/11/2026 22:51, Kuniyuki Iwashima wrote:
> As with TCP, __mptcp_recvmsg_mskq() also always triggers
> tcp_recv_timestamp() if skb has hwtstamp.
>
> Accessing sk->sk_tsflags incurs unnecessary costs for sockets
> that do not need RX tstamp.
>
> Let's check SOCK_RCVTSTAMP and SOCK_TIMESTAMPING_ANY under
> lock_sock().
Thank you for also fixing MPTCP!
> Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
> ---
> net/mptcp/protocol.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 7a22e9388e0e..797797ce4e88 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -2189,7 +2189,8 @@ static int __mptcp_recvmsg_mskq(struct sock *sk, struct msghdr *msg,
> }
> }
>
> - if (MPTCP_SKB_CB(skb)->has_rxtstamp) {
> + if (MPTCP_SKB_CB(skb)->has_rxtstamp &&
> + tcp_want_rx_tstamp_cmsg(sk)) {
It is "strange" to call a TCP helper on an MPTCP socket (and not on a
TCP subflow), and that's why I preferred the previous name (sk_*). But I
understand you got asked to change that name, so better not to change it
again just for MPTCP I suppose :)
Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2026-11-09 12:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 21:51 [PATCH v2 net-next 0/2] tcp/mptcp: Don't call tcp_update_recv_tstamps() if not needed Kuniyuki Iwashima
2026-11-05 21:51 ` [PATCH v2 net-next 1/2] tcp: " Kuniyuki Iwashima
2026-11-05 21:51 ` [PATCH v2 net-next 2/2] mptcp: " Kuniyuki Iwashima
2026-11-09 12:24 ` Matthieu Baerts [this message]
2026-11-10 23:50 ` [PATCH v2 net-next 0/2] tcp/mptcp: " patchwork-bot+netdevbpf
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=ecd91efe-dd83-4890-8e55-ae04aa744d4c@kernel.org \
--to=matttbe@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=geliang@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=kuniyu@google.com \
--cc=martineau@kernel.org \
--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