Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Matthieu Baerts
Mon, 09 Nov 2026 12:24
Re: [PATCH v2 net-next 2/2] mptcp: Don't call tcp_update_recv_tstamps() if not needed.
Author: Matthieu Baerts
Date: Mon, 09 Nov 2026 12:24
Date: Mon, 09 Nov 2026 12:24
43 lines
12535 bytes
12535 bytes
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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads