ethtool: igb: dump RR2DCDELAY register
Subsystems (2)
PATCH 1/1 ethtool: igb: dump RR2DCDELAY register
Decode 'RR2DCDELAY' register which Linux kernel provides starting from version 5.3. The corresponding commit in the Linux kernel is:
cd502a7f7c9c igb: add RR2DCDELAY to ethtool registers dump
The RR2DCDELAY register is present in I210 and I211 Intel Gigabit Ethernet chips and it stands for "Read Request To Data Completion Delay". Here is how this register is described in the I210 datasheet:
"This field captures the maximum PCIe split time in 16 ns units, which is the maximum delay between the read request to the first data completion. This is giving an estimation of the PCIe round trip time."
In practice, this register can be used to measure the time it takes the NIC to read data from the host memory.
--- igb.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
igb.c +12 -0
@@ -859,6 +859,18 @@ igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)"0x03430: TDFPC (Tx data FIFO packet count) 0x%08X\n" , regs_buff[550]); +/* +* Starting from kernel version 5.3 the registers dump buffer grew from +* 739 4-byte words to 740 words, and word 740 contains the RR2DCDLAY +* register. +*/ +if (regs->len <740 ) +return 0 ; + +fprintf (stdout, +"0x05BF4: RR2DCDELAY (Max. DMA read delay) 0x%08X\n" , + regs_buff[739 ]); +return 0 ; }
Signature · 1 line
2.20.1
Quoted 25 lines · Artem Bityutskiy
Decode 'RR2DCDELAY' register which Linux kernel provides starting from version 5.3. The corresponding commit in the Linux kernel is:
cd502a7f7c9cigb: add RR2DCDELAY to ethtool registers dumpThe RR2DCDELAY register is present in I210 and I211 Intel Gigabit Ethernet chips and it stands for "Read Request To Data Completion Delay". Here is how this register is described in the I210 datasheet:
"This field captures the maximum PCIe split time in 16 ns units, which is the maximum delay between the read request to the first data completion. This is giving an estimation of the PCIe round trip time."
In practice, this register can be used to measure the time it takes the NIC to read data from the host memory.
Signed-off-by Artem Bityutskiy <[email protected]>--- igb.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)igb.c +0
-0
igb.c igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) · line 864
Quoted 6 lines
igb.c +3
-0@@ -859,6 +859,18 @@ igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)"0x03430: TDFPC (Tx data FIFO packet count) 0x%08X\n" , regs_buff[550]); +/* +* Starting from kernel version 5.3 the registers dump buffer grew from +* 739 4-byte words to 740 words, and word 740 contains the RR2DCDLAY
nit: "E" missing here: ^
igb.c igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) · line 872
Quoted 8 lines
igb.c +8
-0+* register. +*/ +if (regs->len <740 ) +return 0 ; + +fprintf (stdout, +"0x05BF4: RR2DCDELAY (Max. DMA read delay) 0x%08X\n" , + regs_buff[739 ]);
Showing a delay as hex number doesn't seem very user friendly but that also applies to many existing registers so it's probably better to be consistent and perhaps do an overall cleanup later.
Michal
Quoted 5 lines · Michal Kubecek
igb.c igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) · line 864
Quoted 3 lines
igb.c +3
-0+/* +* Starting from kernel version 5.3 the registers dump buffer grew from +* 739 4-byte words to 740 words, and word 740 contains the RR2DCDLAY nit: "E" missing here: ^
Fixed and sent out v2.
Quoted 7 lines
igb.c igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) · line 872
Quoted 3 lines
igb.c +3
-0+fprintf (stdout, +"0x05BF4: RR2DCDELAY (Max. DMA read delay) 0x%08X\n" , + regs_buff[739 ]);Showing a delay as hex number doesn't seem very user friendly but that also applies to many existing registers so it's probably better to be consistent and perhaps do an overall cleanup later.
Agree.
Thanks!
PATCH v2 1/1 ethtool: igb: dump RR2DCDELAY register
In reply to Artem BityutskiyFrom: Artem Bityutskiy <[email protected]>
Decode 'RR2DCDELAY' register which Linux kernel provides starting from version 5.3. The corresponding commit in the Linux kernel is:
cd502a7f7c9c igb: add RR2DCDELAY to ethtool registers dump
The RR2DCDELAY register is present in I210 and I211 Intel Gigabit Ethernet chips and it stands for "Read Request To Data Completion Delay". Here is how this register is described in the I210 datasheet:
"This field captures the maximum PCIe split time in 16 ns units, which is the maximum delay between the read request to the first data completion. This is giving an estimation of the PCIe round trip time."
In practice, this register can be used to measure the time it takes the NIC to read data from the host memory.
--- igb.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Changelog:
v2: Fixed a typo in the commentary.
v1: Initial pach version.
igb.c +12 -0
@@ -859,6 +859,18 @@ igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)"0x03430: TDFPC (Tx data FIFO packet count) 0x%08X\n" , regs_buff[550]); +/* +* Starting from kernel version 5.3 the registers dump buffer grew from +* 739 4-byte words to 740 words, and word 740 contains the RR2DCDELAY +* register. +*/ +if (regs->len <740 ) +return 0 ; + +fprintf (stdout, +"0x05BF4: RR2DCDELAY (Max. DMA read delay) 0x%08X\n" , + regs_buff[739 ]); +return 0 ; }
Signature · 1 line
2.20.1
Quoted 40 lines · Artem Bityutskiy
From: Artem Bityutskiy <[email protected]>
Decode 'RR2DCDELAY' register which Linux kernel provides starting from version 5.3. The corresponding commit in the Linux kernel is:
cd502a7f7c9cigb: add RR2DCDELAY to ethtool registers dumpThe RR2DCDELAY register is present in I210 and I211 Intel Gigabit Ethernet chips and it stands for "Read Request To Data Completion Delay". Here is how this register is described in the I210 datasheet:
"This field captures the maximum PCIe split time in 16 ns units, which is the maximum delay between the read request to the first data completion. This is giving an estimation of the PCIe round trip time."
In practice, this register can be used to measure the time it takes the NIC to read data from the host memory.
Signed-off-by Artem Bityutskiy <[email protected]>--- igb.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)Changelog:
v2: Fixed a typo in the commentary.
v1: Initial pach version.igb.c +5
-0@@ -859,6 +859,18 @@ igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)"0x03430: TDFPC (Tx data FIFO packet count) 0x%08X\n" , regs_buff[550]); +/* +* Starting from kernel version 5.3 the registers dump buffer grew from +* 739 4-byte words to 740 words, and word 740 contains the RR2DCDELAY +* register. +*/
igb.c igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) · line 876
Quoted 10 lines
igb.c +7
-0+if (regs->len <740 ) +return 0 ; + +fprintf (stdout, +"0x05BF4: RR2DCDELAY (Max. DMA read delay) 0x%08X\n" , + regs_buff[739 ]); +return 0 ; }
John W. Linville
AppliedQuoted 10 lines · Artem Bityutskiy
From: Artem Bityutskiy <[email protected]>
Decode 'RR2DCDELAY' register which Linux kernel provides starting from version 5.3. The corresponding commit in the Linux kernel is:
cd502a7f7c9cigb: add RR2DCDELAY to ethtool registers dumpThe RR2DCDELAY register is present in I210 and I211 Intel Gigabit Ethernet chips and it stands for "Read Request To Data Completion Delay". Here is how this register is described in the I210 datasheet:
Quoted 8 lines
"This field captures the maximum PCIe split time in 16 ns units, which is the maximum delay between the read request to the first data completion. This is giving an estimation of the PCIe round trip time."
In practice, this register can be used to measure the time it takes the NIC to read data from the host memory.
Signed-off-by Artem Bityutskiy <[email protected]>
Queued for next release -- thanks!
John
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.