Skip to contentSkip to conversation

ethtool: igb: dump RR2DCDELAY register

PATCH In review Artem Bityutskiy 4 participants 6 messages Jul 15, 2019 – Jul 26, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index e0ccef9..ab0896f 100644
@@ -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
#1 lore raw
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:
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 +0 -0
index e0ccef9..ab0896f 100644

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

#2 lore raw
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!

#3 lore raw

PATCH v2 1/1 ethtool: igb: dump RR2DCDELAY register

In reply to 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:
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
index e0ccef9..cb24877 100644
@@ -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
Reviewed-by on v2 1/1
#4 lore raw
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:
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 +5 -0
index e0ccef9..cb24877 100644
@@ -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;
 }
 
#5 lore raw
In reply to Artem Bityutskiy
Quoted 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:
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:

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.

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.