From: Miroslav Lichvar <mlichvar@redhat.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Kurt Kanzenbach <kurt@linutronix.de>,
Jacob Keller <jacob.e.keller@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Vinicius Costa Gomes <vinicius.gomes@intel.com>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-next] igb: Retrieve Tx timestamp directly from interrupt
Date: Tue, 23 Sep 2025 10:25:37 +0200 [thread overview]
Message-ID: <aNJZgRkY66BCu9Aj@localhost> (raw)
In-Reply-To: <20250913212212.3nwetWbI@linutronix.de>
On Sat, Sep 13, 2025 at 11:22:12PM +0200, Sebastian Andrzej Siewior wrote:
> If I do
> | ntpperf -i X … -I -r 1000 -t 2
>
> then there is no loss and on other side I see
>
> | NTP packets received : 2201
> | NTP timestamps held : 2101
> | NTP daemon TX timestamps : 200
> | NTP kernel TX timestamps : 901
> | NTP hardware TX timestamps : 1100
> | tx_hwstamp:2101
>
> Here the tx_hwstamp counter colorates with "NTP timestamps held". Does
> it this make any sense? I don't see this matching with the "larger" runs
> where ntpperf reports loss.
The serverstats counters are for timestamps that were served to the
client, which is different from timestamps it got from the kernel.
Some HW timestamps are not used because chronyd is not tracking the
PHC yet. That takes at least one second in default configuration (it
can be reduced by the minpoll option of hwtimestamp). If there was no
other NTP activity on that interface before the test was started, in
the first second of the test (i.e. 50% of -t 2, or 10% of -t 10)
chronyd will be serving kernel TX timestamps, even though it is
receiving HW timestamps from the kernel. To minimize that effect, you
can run a client chronyd instance in background polling the server
once per second (minpoll 0 maxpoll 0) and wait for a few seconds
before starting ntpperf after the server chronyd instance was
restarted.
There is a 2-packet delay in the interleaved mode for each client
(ntpperf has a warmup phase to avoid counting basic responses). With
-r 1000 ntpperf simulates 100 clients. So, for the 2201 requests
chronyd received, the first 200 (2 * 100 clients) responses had a
daemon TX timestamp, 901 responses had a kernel TX timestamp before
the PHC tracking initialized in the first second, and the remaining
1100 responses had a HW TX timestamp.
The "NTP timestamps held" matching tx_hwstamp is a coincidence. It
is not related to the number of HW timestamps received from the kernel
or served to the client. Until chronyd starts dropping timestamps to
not exceed clientloglimit, it's just counting requests in interleaved
mode, i.e. the number of requests minus the first request from each
client: 2201 - 1 * 100 = 2101.
--
Miroslav Lichvar
next prev parent reply other threads:[~2025-09-23 8:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-15 6:50 [PATCH iwl-next] igb: Retrieve Tx timestamp directly from interrupt Kurt Kanzenbach
2025-08-15 7:55 ` [Intel-wired-lan] " Paul Menzel
2025-08-15 8:10 ` Sebastian Andrzej Siewior
2025-08-15 8:17 ` Kurt Kanzenbach
2025-08-15 12:54 ` Paul Menzel
2025-08-15 16:41 ` Sebastian Andrzej Siewior
2025-08-15 13:58 ` Vadim Fedorenko
2025-08-16 9:06 ` Kurt Kanzenbach
2025-08-18 12:24 ` Miroslav Lichvar
2025-08-19 6:09 ` Kurt Kanzenbach
2025-08-19 14:50 ` Kurt Kanzenbach
2025-08-20 6:54 ` Miroslav Lichvar
2025-08-19 23:31 ` Jacob Keller
2025-08-20 7:56 ` Miroslav Lichvar
2025-08-20 20:29 ` Jacob Keller
2025-08-21 7:50 ` Miroslav Lichvar
2025-08-21 11:38 ` Kurt Kanzenbach
2025-08-21 12:59 ` Miroslav Lichvar
2025-08-21 14:08 ` Kurt Kanzenbach
2025-08-21 14:51 ` Miroslav Lichvar
2025-09-12 9:04 ` Kurt Kanzenbach
2025-09-13 21:22 ` Sebastian Andrzej Siewior
2025-09-23 8:25 ` Miroslav Lichvar [this message]
2025-09-23 8:01 ` Miroslav Lichvar
2025-08-19 23:24 ` Jacob Keller
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=aNJZgRkY66BCu9Aj@localhost \
--to=mlichvar@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=richardcochran@gmail.com \
--cc=vinicius.gomes@intel.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;
as well as URLs for NNTP newsgroup(s).