From: "naamax.meir" <naamax.meir@linux.intel.com>
To: Vinicius Costa Gomes <vinicius.gomes@intel.com>,
intel-wired-lan@lists.osuosl.org
Cc: vladimir.oltean@nxp.com, kurt@linutronix.de, anthony.l.nguyen@intel.com
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v4 3/4] igc: Retrieve TX timestamp during interrupt handling
Date: Tue, 20 Jun 2023 22:02:46 +0300 [thread overview]
Message-ID: <077e8567-0e45-8afe-f68d-d87a72be703f@linux.intel.com> (raw)
In-Reply-To: <20230607213232.875138-4-vinicius.gomes@intel.com>
On 6/8/2023 00:32, Vinicius Costa Gomes wrote:
> When the interrupt is handled, the TXTT_0 bit in the TSYNCTXCTL
> register should already be set and the timestamp value already loaded
> in the appropriate register.
>
> This simplifies the handling, and reduces the latency for retrieving
> the TX timestamp, which increase the amount of TX timestamps that can
> be handled in a given time period.
>
> As the "work" function doesn't run in a workqueue anymore, rename it
> to something more sensible, a event handler.
>
> Using ntpperf[1] we can see the following performance improvements:
>
> Before:
>
> $ sudo ./ntpperf -i enp3s0 -m 10:22:22:22:22:21 -d 192.168.1.3 -s 172.18.0.0/16 -I -H -o -37
> | responses | TX timestamp offset (ns)
> rate clients | lost invalid basic xleave | min mean max stddev
> 1000 100 0.00% 0.00% 0.00% 100.00% -56 +9 +52 19
> 1500 150 0.00% 0.00% 0.00% 100.00% -40 +30 +75 22
> 2250 225 0.00% 0.00% 0.00% 100.00% -11 +29 +72 15
> 3375 337 0.00% 0.00% 0.00% 100.00% -18 +40 +88 22
> 5062 506 0.00% 0.00% 0.00% 100.00% -19 +23 +77 15
> 7593 759 0.00% 0.00% 0.00% 100.00% +7 +47 +5168 43
> 11389 1138 0.00% 0.00% 0.00% 100.00% -11 +41 +5240 39
> 17083 1708 0.00% 0.00% 0.00% 100.00% +19 +60 +5288 50
> 25624 2562 0.00% 0.00% 0.00% 100.00% +1 +56 +5368 58
> 38436 3843 0.00% 0.00% 0.00% 100.00% -84 +12 +8847 66
> 57654 5765 0.00% 0.00% 100.00% 0.00%
> 86481 8648 0.00% 0.00% 100.00% 0.00%
> 129721 12972 0.00% 0.00% 100.00% 0.00%
> 194581 16384 0.00% 0.00% 100.00% 0.00%
> 291871 16384 27.35% 0.00% 72.65% 0.00%
> 437806 16384 50.05% 0.00% 49.95% 0.00%
>
> After:
>
> $ sudo ./ntpperf -i enp3s0 -m 10:22:22:22:22:21 -d 192.168.1.3 -s 172.18.0.0/16 -I -H -o -37
> | responses | TX timestamp offset (ns)
> rate clients | lost invalid basic xleave | min mean max stddev
> 1000 100 0.00% 0.00% 0.00% 100.00% -44 +0 +61 19
> 1500 150 0.00% 0.00% 0.00% 100.00% -6 +39 +81 16
> 2250 225 0.00% 0.00% 0.00% 100.00% -22 +25 +69 15
> 3375 337 0.00% 0.00% 0.00% 100.00% -28 +15 +56 14
> 5062 506 0.00% 0.00% 0.00% 100.00% +7 +78 +143 27
> 7593 759 0.00% 0.00% 0.00% 100.00% -54 +24 +144 47
> 11389 1138 0.00% 0.00% 0.00% 100.00% -90 -33 +28 21
> 17083 1708 0.00% 0.00% 0.00% 100.00% -50 -2 +35 14
> 25624 2562 0.00% 0.00% 0.00% 100.00% -62 +7 +66 23
> 38436 3843 0.00% 0.00% 0.00% 100.00% -33 +30 +5395 36
> 57654 5765 0.00% 0.00% 100.00% 0.00%
> 86481 8648 0.00% 0.00% 100.00% 0.00%
> 129721 12972 0.00% 0.00% 100.00% 0.00%
> 194581 16384 19.50% 0.00% 80.50% 0.00%
> 291871 16384 35.81% 0.00% 64.19% 0.00%
> 437806 16384 55.40% 0.00% 44.60% 0.00%
>
> [1] https://github.com/mlichvar/ntpperf
>
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
> ---
> drivers/net/ethernet/intel/igc/igc.h | 2 +-
> drivers/net/ethernet/intel/igc/igc_main.c | 2 +-
> drivers/net/ethernet/intel/igc/igc_ptp.c | 15 +++++----------
> 3 files changed, 7 insertions(+), 12 deletions(-)
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2023-06-20 19:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 21:32 [Intel-wired-lan] [PATCH iwl-net v4 0/4] igc: TX timestamping fixes Vinicius Costa Gomes
2023-06-07 21:32 ` [Intel-wired-lan] [PATCH iwl-net v4 1/4] igc: Fix race condition in PTP tx code Vinicius Costa Gomes
2023-06-19 7:29 ` naamax.meir
2023-06-07 21:32 ` [Intel-wired-lan] [PATCH iwl-net v4 2/4] igc: Check if hardware TX timestamping is enabled earlier Vinicius Costa Gomes
2023-06-20 6:54 ` naamax.meir
2023-06-07 21:32 ` [Intel-wired-lan] [PATCH iwl-net v4 3/4] igc: Retrieve TX timestamp during interrupt handling Vinicius Costa Gomes
2023-06-20 19:02 ` naamax.meir [this message]
2023-06-07 21:32 ` [Intel-wired-lan] [PATCH iwl-net v4 4/4] igc: Work around HW bug causing missing timestamps Vinicius Costa Gomes
2023-06-22 8:59 ` naamax.meir
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=077e8567-0e45-8afe-f68d-d87a72be703f@linux.intel.com \
--to=naamax.meir@linux.intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kurt@linutronix.de \
--cc=vinicius.gomes@intel.com \
--cc=vladimir.oltean@nxp.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