igc: Add support for multiple TX tstamp requests
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 12 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | igc: Fix race condition in PTP tx codedrivers/ drivers/ drivers/ | +47 | 3 replies | |
| 2/3 | igc: Add support for multiple in-flight TX timestampsdrivers/ drivers/ drivers/ +3 more | +182 | 2 replies | |
| 3/3 | igc: Use ptp->aux_worker to retrieve TX timestampsdrivers/ drivers/ drivers/ | +28 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Intel-wired-lan] [PATCH next-queue v1 0/3] igc: Add support for multiple TX tstamp requests
Hi,
Intel I225 and I226 have 4 sets of registers used to store the result of transmission timestamp requests, until now only one those sets was used.
Add support for using those extra registers, so the driver is able to handle multiple applications doing requests at the same time. This will become more useful when support for PTP multi-domain is more common.
The series is divided into three parts:
Patch 1 - The idea is to use spinlocks to handle concurrent access to
the resources, the original version of the patch was proposed here:
https://lore.kernel.org/all/[email protected]/
It has received some modifications to make it easier to integrate with later patches, and some fixes for issues found with lockdep.
Patch 2 - Use the 4 registers sets, the idea is simple, we have a pool
of registers, and we use the first one from the pool that's free. Each element of the pool is pre-allocated with the register address from each timestamp register set.
Patch 3 - More of an optimization. Use the ptp_aux_work kthread to do
the work, and also try to do the work "inline" if the timestamp is ready already. Suggested by Vladimir Oltean and Kurt Kanzenbach.
Evaluation
----------
To do the evaluation I am using a simple application that sends packets (and waits for the timestamp to be received before sending the next packet) and takes two measurements:
1. from the HW timestamp value and the time the application retrieves the timestamps (called "HW to Timestamp";
2. from just before the sendto() being called in the application to the time the application retrieves the timestamp (called "Send to Timestamp"). I think this measurement is useful to make sure that the total time to send a packet and retrieve its timestamp hasn't degraded.
(all tests were done for 1M packets, and times are in nanoseconds)
Before:
HW to Timestamp
min: 9130 max: 143183 percentile 99: 10379 percentile 99.99: 11510 Send to Timestamp min: 18431 max: 196798 percentile 99: 19937 percentile 99.99: 26066
After:
HW to Timestamp
min: 7933 max: 31934 percentile 99: 8690 percentile 99.99: 10598 Send to Timestamp min: 17291 max: 46327 percentile 99: 18268 percentile 99.99: 21575
The minimum times are not that different, but we can see a big improvement in the 'maximum' time.
Andre Guedes (1):
igc: Fix race condition in PTP tx code
Vinicius Costa Gomes (2):
igc: Add support for multiple in-flight TX timestamps
igc: Use ptp->aux_worker to retrieve TX timestamps
drivers/net/ethernet/intel/igc/igc.h | 25 ++- drivers/net/ethernet/intel/igc/igc_base.h | 3 + drivers/net/ethernet/intel/igc/igc_defines.h | 7 + drivers/net/ethernet/intel/igc/igc_main.c | 58 ++++- drivers/net/ethernet/intel/igc/igc_ptp.c | 225 +++++++++++++------ drivers/net/ethernet/intel/igc/igc_regs.h | 12 + 6 files changed, 240 insertions(+), 90 deletions(-)
Signature · 6 lines
2.39.2 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan