linux/drivers/net/ethernet
Vinicius Costa Gomes 3ed247e789 igc: Add support for multiple in-flight TX timestamps
Add support for using the four sets of timestamping registers that
i225/i226 have available for TX.

In some workloads, where multiple applications request hardware
transmission timestamps, it was possible that some of those requests
were denied because the only in use register was already occupied.

This is also in preparation to future support for hardware
timestamping with multiple PTP domains. With multiple domains chances
of multiple TX timestamps being requested at the same time increase.

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%       +1     +41     +73     13
1500       150   0.00%   0.00%   0.00% 100.00%       +9     +49     +87     15
2250       225   0.00%   0.00%   0.00% 100.00%       +9     +42     +79     13
3375       337   0.00%   0.00%   0.00% 100.00%      +11     +46     +81     13
5062       506   0.00%   0.00%   0.00% 100.00%       +7     +44     +80     13
7593       759   0.00%   0.00%   0.00% 100.00%       +9     +44     +79     12
11389     1138   0.00%   0.00%   0.00% 100.00%      +14     +51     +87     13
17083     1708   0.00%   0.00%   0.00% 100.00%       +1     +41     +80     14
25624     2562   0.00%   0.00%   0.00% 100.00%      +11     +50   +5107     51
38436     3843   0.00%   0.00%   0.00% 100.00%       -2     +36   +7843     38
57654     5765   0.00%   0.00%   0.00% 100.00%       +4     +42  +10503     69
86481     8648   0.00%   0.00%   0.00% 100.00%      +11     +54   +5492     65
129721   12972   0.00%   0.00%   0.00% 100.00%      +31   +2680   +6942   2606
194581   16384  16.79%   0.00%   0.87%  82.34%      +73   +4444  +15879   3116
291871   16384  35.05%   0.00%   1.53%  63.42%     +188   +5381  +17019   3035
437806   16384  54.95%   0.00%   2.55%  42.50%     +233   +6302  +13885   2846

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%      -20     +12     +43     13
1500       150   0.00%   0.00%   0.00% 100.00%      -23     +18     +57     14
2250       225   0.00%   0.00%   0.00% 100.00%       -2     +33     +67     13
3375       337   0.00%   0.00%   0.00% 100.00%       +1     +38     +76     13
5062       506   0.00%   0.00%   0.00% 100.00%       +9     +52     +93     14
7593       759   0.00%   0.00%   0.00% 100.00%      +11     +47     +82     13
11389     1138   0.00%   0.00%   0.00% 100.00%       -9     +27     +74     13
17083     1708   0.00%   0.00%   0.00% 100.00%      -13     +25     +66     14
25624     2562   0.00%   0.00%   0.00% 100.00%       -8     +28     +65     13
38436     3843   0.00%   0.00%   0.00% 100.00%      -13     +28     +69     13
57654     5765   0.00%   0.00%   0.00% 100.00%      -11     +32     +71     14
86481     8648   0.00%   0.00%   0.00% 100.00%       +2     +44     +83     14
129721   12972  15.36%   0.00%   0.35%  84.29%       -2   +2248  +22907   4252
194581   16384  42.98%   0.00%   1.98%  55.04%       -4   +5278  +65039   5856
291871   16384  54.33%   0.00%   2.21%  43.46%       -3   +6306  +22608   5665

We can see that with 4 registers, as expected, we are able to handle a
increasing number of requests more consistently, but as soon as all
registers are in use, the decrease in quality of service happens in a
sharp step.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2023-08-24 12:55:24 -07:00
..
3com
8390 net: ethernet: 8390: ne2k-pci: use module_pci_driver() macro 2023-08-10 19:31:57 -07:00
actions
adaptec
adi net: ethernet: adi: adin1110: use eth_broadcast_addr() to assign broadcast address 2023-08-06 13:22:47 +01:00
aeroflex net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
agere et131x: Use pci_dev_id() to simplify the code 2023-08-13 12:30:39 +01:00
alacritech net: ethernet: slicoss: remove redundant increment of pointer data 2023-07-28 15:37:08 -07:00
allwinner
alteon
altera
amazon net: ena: Use pci_dev_id() to simplify the code 2023-08-17 19:13:09 -07:00
amd Revert "pds_core: Fix some kernel-doc comments" 2023-08-21 12:11:35 -07:00
apm net/xgene: fix Wvoid-pointer-to-enum-cast warning 2023-08-11 09:58:45 +01:00
apple net/macmace: Replace zero-length array with DECLARE_FLEX_ARRAY() helper 2023-08-01 14:46:21 -07:00
aquantia net: atlantic: Remove unnecessary (void*) conversions 2023-07-18 19:00:47 -07:00
arc net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
asix
atheros alx: fix OOB-read compiler warning 2023-08-22 12:30:15 +02:00
broadcom Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-24 10:51:39 -07:00
brocade Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-07-20 15:52:55 -07:00
cadence Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-18 12:44:56 -07:00
calxeda
cavium Networking changes for 6.5. 2023-06-28 16:43:10 -07:00
chelsio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-24 10:51:39 -07:00
cirrus cirrus: cs89x0: fix the return value handle and remove redundant dev_warn() for platform_get_irq() 2023-08-02 12:10:39 -07:00
cisco
cortina net: gemini: Remove redundant of_match_ptr() 2023-08-16 09:59:40 +01:00
davicom net: dm9051: Use PTR_ERR_OR_ZERO() to simplify code 2023-08-23 18:57:30 -07:00
dec
dlink
emulex rtnetlink: remove redundant checks for nlattr IFLA_BRIDGE_MODE 2023-08-08 15:10:37 -07:00
engleder page_pool: split types and declarations from page_pool.h 2023-08-07 13:05:19 -07:00
ezchip net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
faraday net: ftmac100: add multicast filtering possibility 2023-08-11 06:58:31 +01:00
freescale net: fec: add exception tracing for XDP 2023-08-23 18:57:57 -07:00
fujitsu
fungible eth: add missing xdp.h includes in drivers 2023-08-03 08:38:07 -07:00
google gve: RX path for DQO-QPL 2023-08-06 08:34:36 +01:00
hisilicon net: hns3: fix wrong rpu tln reg issue 2023-08-16 08:56:38 +01:00
huawei
i825xx
ibm Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-24 10:51:39 -07:00
intel igc: Add support for multiple in-flight TX timestamps 2023-08-24 12:55:24 -07:00
litex
marvell Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-24 10:51:39 -07:00
mediatek Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-24 10:51:39 -07:00
mellanox Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-24 10:51:39 -07:00
micrel
microchip net: microchip: Remove unused declarations 2023-08-22 10:31:47 -07:00
microsoft net: mana: Add gdma stats to ethtool output for mana 2023-08-11 09:53:59 +01:00
moxa
mscc net: mscc: ocelot: Remove unused declarations 2023-08-22 10:29:15 -07:00
myricom
natsemi
neterion ethernet: s2io: Use ether_addr_to_u64() to convert ethernet address 2023-08-09 15:26:49 -07:00
netronome rtnetlink: remove redundant checks for nlattr IFLA_BRIDGE_MODE 2023-08-08 15:10:37 -07:00
ni net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
nvidia
nxp
oki-semi
packetengines
pasemi
pensando ionic: Remove unused declarations 2023-08-22 10:30:06 -07:00
qlogic qed/qede: Remove unused declarations 2023-08-23 08:21:37 +01:00
qualcomm net: qualcomm: Remove redundant of_match_ptr() 2023-08-16 09:59:40 +01:00
rdc
realtek Revert "r8169: disable ASPM during NAPI poll" 2023-07-19 21:09:11 -07:00
renesas net: renesas: rswitch: Add .[gs]et_link_ksettings support 2023-08-08 15:31:52 -07:00
rocker
samsung
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-24 10:51:39 -07:00
sgi
silan
sis
smsc net: smsc: Use pci_dev_id() to simplify the code 2023-08-13 12:30:39 +01:00
socionext page_pool: split types and declarations from page_pool.h 2023-08-07 13:05:19 -07:00
stmicro net: stmmac: Check more MAC HW features for XGMAC Core 3.20 2023-08-20 18:19:20 +01:00
sun ethernet: ldmvsw: mark ldmvsw_open() static 2023-08-11 18:24:02 -07:00
sunplus
synopsys
tehuti
ti net: ethernet: ti: Remove unused declarations 2023-08-22 10:33:21 -07:00
toshiba net: tc35815: Use pci_dev_id() to simplify the code 2023-08-13 12:30:39 +01:00
tundra
vertexcom
via net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
wangxun net: ngbe: use pci_dev_id() to simplify the code 2023-08-13 12:30:39 +01:00
wiznet
xilinx Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-03 14:34:37 -07:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig
korina.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-03 14:34:37 -07:00
lantiq_etop.c
lantiq_xrx200.c
Makefile