From: MengEn Sun <mengensun88@gmail.com>
To: edumazet@google.com
Cc: dsahern@kernel.org, horms@kernel.org, kuba@kernel.org,
linux-kernel@vger.kernel.org, mengensun88@gmail.com,
mengensun@tencent.com, netdev@vger.kernel.org, pabeni@redhat.com,
yuehongwu@tencent.com
Subject: Re: [PATCH] tcp: replace head->tstamp with head->skb_mstamp_ns in tcp_tso_should_defer()
Date: Wed, 4 Dec 2024 19:00:27 +0800 [thread overview]
Message-ID: <1733310027-29602-1-git-send-email-mengensun@tencent.com> (raw)
In-Reply-To: <CANn89i+ZtxW1HoiZaA2hB4r4+QBbif=biG6tQ1Fc2jHFPWH8Sw@mail.gmail.com>
Thank you very much for your reply!
There is no functional issue with using tstamp here.
TCP does indeed use tstamp in many places, but it seems that most of
them are related to SO_TIMESTAMP*. The main interface functions that
set tstamp in the code include the following:
- __net_timestamp
- net_timestamp_set
- __skb_tstamp_tx
The points where this tstamp is modified are documented in the kernel
documentation: Documentation/networking/timestamping.txt.
The functions that mainly modify skb_mstamp_ns include the following:
- tcp_add_tx_delay
- __tcp_transmit_skb
- tcp_write_xmit
- tcp_make_synack
- tcp_send_syn_data
The tstamp in an skb on the RTX queue has indeed not been modified by
the first group of functions mentioned above; instead, it is set by
the second group of functions before cloning the skb using skb_mstamp_ns.
I spent quite a bit of time reading the code before realizing that
the use of tstamp here is actually intended to retrieve the meaning of
skb_mstamp_ns. Therefore, I think if skb_mstamp_ns is used here, it
might give newcomers reading the TCP code a hint that this is actually
the value set by the second group of functions.
Best regards
MengEn
next prev parent reply other threads:[~2024-12-04 11:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 2:36 mengensun88
2024-12-04 7:21 ` Eric Dumazet
2024-12-04 11:00 ` MengEn Sun [this message]
2024-12-04 12:11 ` Eric Dumazet
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=1733310027-29602-1-git-send-email-mengensun@tencent.com \
--to=mengensun88@gmail.com \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mengensun@tencent.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yuehongwu@tencent.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
all inboxes | Powered by JetHome®