From: Xuanqiang Luo <xuanqiang.luo@linux.dev>
To: Jason Xing <kerneljasonxing@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
willemb@google.com, kuniyu@google.com
Subject: Re: [PATCH net v2] tcp: preserve timestamps across receive queue collapse
Date: Thu, 17 Sep 2026 22:09:32 +0800 [thread overview]
Message-ID: <e70bcac1-7970-4d79-b210-bf31193aee3c@linux.dev> (raw)
In-Reply-To: <20260917132742.87117-1-kerneljasonxing@gmail.com>
在 2026/9/17 21:27, Jason Xing 写道:
> When tcp_collapse() rebuilds skbs under memory pressure, the copy
> process doesn't include the right tstamp and hwtstamp from the
> old skb. And memcpy(nskb->cb, skb->cb, ...) copies has_rxtstamp,
> but nskb->tstamp and hwtstamps are left at zero, so
> tcp_recv_timestamp() ends up emitting no cmsg at all.
>
> In net timestamping case, if such an skb happens to be the last
> one consumed in a recvmsg() call, the application receives no RX
> timestamp for that call.
>
> Fix this by copying both tstamp and hwtstamp to the new skb right
> after the initialization.
>
> Fixes: 98aaa913b4ed ("tcp: Extend SOF_TIMESTAMPING_RX_SOFTWARE to TCP recvmsg")
> Signed-off-by: Jason Xing <kerneljasonxing@gmail.com>
Reviewed-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
Thanks,
Xuanqiang
next prev parent reply other threads:[~2026-09-17 14:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 13:27 [PATCH net v2] tcp: preserve timestamps across receive queue collapse Jason Xing
2026-09-17 14:09 ` Xuanqiang Luo [this message]
2026-09-21 15:34 ` netdev-bot+sashiko
2026-09-21 15:47 ` Eric Dumazet
2026-09-24 14:33 ` Jason Xing
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=e70bcac1-7970-4d79-b210-bf31193aee3c@linux.dev \
--to=xuanqiang.luo@linux.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kerneljasonxing@gmail.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.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