Skip to contentSkip to conversation

net/i40e: increase descriptor queue length to 8160

PATCH In review Igor Gutorov 3 participants 6 messages May 27, 2024 – Jun 28, 2024 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/i40e: increase descriptor queue length to 8160

According to the Intel X710/XXV710/XL710 Datasheet, the maximum receive queue descriptor length is 0x1FE0 (8160 in base 10). This is specified as QLEN in table 8-12, page 1083.

I've tested this change with an XXV710 NIC and it has positive effect on performance under high load scenarios. Where previously I'd get ~2000 packets/sec miss rate, now I get only ~40 packets/sec miss rate.

---
 drivers/net/i40e/i40e_rxtx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_rxtx.h +1 -1
index 2f2f890855..33fc9770d9 100644
@@ -25,7 +25,7 @@
 #define I40E_RX_MAX_DATA_BUF_SIZE	(16 * 1024 - 128)
 
 #define	I40E_MIN_RING_DESC	64
-#define	I40E_MAX_RING_DESC	4096
+#define	I40E_MAX_RING_DESC	8160
 
 #define I40E_FDIR_NUM_TX_DESC   (I40E_FDIR_PRG_PKT_CNT << 1)
 #define I40E_FDIR_NUM_RX_DESC   (I40E_FDIR_PRG_PKT_CNT << 1)
Signature · 1 line
2.45.1
#1 lore raw
Quoted 28 lines · Igor Gutorov

According to the Intel X710/XXV710/XL710 Datasheet, the maximum receive queue descriptor length is 0x1FE0 (8160 in base 10). This is specified as QLEN in table 8-12, page 1083.

I've tested this change with an XXV710 NIC and it has positive effect on performance under high load scenarios. Where previously I'd get ~2000 packets/sec miss rate, now I get only ~40 packets/sec miss rate.

---
 drivers/net/i40e/i40e_rxtx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_rxtx.h +1 -2
index 2f2f890855..33fc9770d9 100644
@@ -25,7 +25,7 @@
 #define I40E_RX_MAX_DATA_BUF_SIZE      (16 * 1024 - 128)
 
 #define        I40E_MIN_RING_DESC      64
-#define        I40E_MAX_RING_DESC      4096
+#define        I40E_MAX_RING_DESC      8160
 
 #define I40E_FDIR_NUM_TX_DESC   (I40E_FDIR_PRG_PKT_CNT << 1)
 #define I40E_FDIR_NUM_RX_DESC   (I40E_FDIR_PRG_PKT_CNT << 1)
--
Quoted 2 lines

2.45.1

CC'ing to a different email (got an address rejected error, the MAINTAINERS file might need an update).

Also, I've noticed that an X722 NIC is also supported by the i40e driver, but it seems the datasheet isn't on Intel's website for that NIC. Does anybody know if X722 has 4096 or 8160 usable descriptors? If someone could test this patch against X722, that would be great.

#2 lore raw
Quoted 36 lines · Igor Gutorov
Quoted 28 lines · Igor Gutorov

According to the Intel X710/XXV710/XL710 Datasheet, the maximum receive queue descriptor length is 0x1FE0 (8160 in base 10). This is specified as QLEN in table 8-12, page 1083.

I've tested this change with an XXV710 NIC and it has positive effect on performance under high load scenarios. Where previously I'd get ~2000 packets/sec miss rate, now I get only ~40 packets/sec miss rate.

---
 drivers/net/i40e/i40e_rxtx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_rxtx.h +1 -2
index 2f2f890855..33fc9770d9 100644
@@ -25,7 +25,7 @@
 #define I40E_RX_MAX_DATA_BUF_SIZE      (16 * 1024 - 128)
 
 #define        I40E_MIN_RING_DESC      64
-#define        I40E_MAX_RING_DESC      4096
+#define        I40E_MAX_RING_DESC      8160
 
 #define I40E_FDIR_NUM_TX_DESC   (I40E_FDIR_PRG_PKT_CNT << 1)
 #define I40E_FDIR_NUM_RX_DESC   (I40E_FDIR_PRG_PKT_CNT << 1)
--
Quoted 2 lines

2.45.1

CC'ing to a different email (got an address rejected error, the MAINTAINERS file might need an update).

Quoted 4 lines

Also, I've noticed that an X722 NIC is also supported by the i40e driver, but it seems the datasheet isn't on Intel's website for that NIC. Does anybody know if X722 has 4096 or 8160 usable descriptors? If someone could test this patch against X722, that would be great.

Apologies for pinging again. Who should I send my patch to? The MAINTAINERS file shows Yuying Zhang as the maintainer of the net/i40e driver and contains 2 emails, but both [email protected] and [email protected] emails are non-existent (550 Address rejected).

#3 lore raw
Quoted 43 lines

From: Igor Gutorov [mailto:[email protected]]
Sent: Wednesday, 5 June 2024 12.47

Quoted 39 lines · Igor Gutorov
Quoted 28 lines · Igor Gutorov

According to the Intel X710/XXV710/XL710 Datasheet, the maximum receive queue descriptor length is 0x1FE0 (8160 in base 10). This is specified as QLEN in table 8-12, page 1083.

I've tested this change with an XXV710 NIC and it has positive effect on performance under high load scenarios. Where previously I'd get ~2000 packets/sec miss rate, now I get only ~40 packets/sec miss rate.

---
 drivers/net/i40e/i40e_rxtx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_rxtx.h +1 -2
index 2f2f890855..33fc9770d9 100644
@@ -25,7 +25,7 @@
 #define I40E_RX_MAX_DATA_BUF_SIZE      (16 * 1024 - 128)
 
 #define        I40E_MIN_RING_DESC      64
-#define        I40E_MAX_RING_DESC      4096
+#define        I40E_MAX_RING_DESC      8160
 
 #define I40E_FDIR_NUM_TX_DESC   (I40E_FDIR_PRG_PKT_CNT << 1)
 #define I40E_FDIR_NUM_RX_DESC   (I40E_FDIR_PRG_PKT_CNT << 1)
--
Quoted 2 lines

2.45.1

CC'ing to a different email (got an address rejected error, the MAINTAINERS file might need an update).

Also, I've noticed that an X722 NIC is also supported by the i40e driver, but it seems the datasheet isn't on Intel's website for that NIC. Does anybody know if X722 has 4096 or 8160 usable descriptors?

It does.
Refer to table 38-419, page 3086 in the Intel C620 Chipset datasheet:
https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/c620-series-chipset-datasheet.pdf

Quoted 2 lines
Quoted 2 lines

If
someone could test this patch against X722, that would be great.

I don't have one, so I cannot test it. But:

Quoted 5 lines

Apologies for pinging again. Who should I send my patch to? The MAINTAINERS file shows Yuying Zhang as the maintainer of the net/i40e driver and contains 2 emails, but both [email protected] and [email protected] emails are non-existent (550 Address rejected).

The i40e DPDK driver is currently without maintainers. Sending the patch to the [email protected] mailing list suffices.

Acked-by on v1 1/1
#4 lore raw
In reply to Igor Gutorov
Quoted 18 lines · Igor Gutorov

According to the Intel X710/XXV710/XL710 Datasheet, the maximum receive queue descriptor length is 0x1FE0 (8160 in base 10). This is specified as QLEN in table 8-12, page 1083.

I've tested this change with an XXV710 NIC and it has positive effect on performance under high load scenarios. Where previously I'd get ~2000 packets/sec miss rate, now I get only ~40 packets/sec miss rate.

---
 drivers/net/i40e/i40e_rxtx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_rxtx.h +0 -0
index 2f2f890855..33fc9770d9 100644

drivers/net/i40e/i40e_rxtx.h line 29

Quoted 6 lines
drivers/net/i40e/i40e_rxtx.h +1 -1
@@ -25,7 +25,7 @@
 #define I40E_RX_MAX_DATA_BUF_SIZE	(16 * 1024 - 128)
 
 #define	I40E_MIN_RING_DESC	64
-#define	I40E_MAX_RING_DESC	4096
+#define	I40E_MAX_RING_DESC	8160
 

since the ring memory allocation in the driver always seems to allocate space for up to the max number of descriptors, this will lead to an increase of memory footprint of ~128k per Rx Q, and ~64k per Tx Q. However, I'd view this as relatively harmless given what we have now. If it is an issue, we should look to fix it in a separate patch, rather than blocking this simple change.

#5 lore raw
Quoted 33 lines · Bruce Richardson
Quoted 18 lines · Igor Gutorov

According to the Intel X710/XXV710/XL710 Datasheet, the maximum receive queue descriptor length is 0x1FE0 (8160 in base 10). This is specified as QLEN in table 8-12, page 1083.

I've tested this change with an XXV710 NIC and it has positive effect on performance under high load scenarios. Where previously I'd get ~2000 packets/sec miss rate, now I get only ~40 packets/sec miss rate.

---
 drivers/net/i40e/i40e_rxtx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_rxtx.h +0 -0
index 2f2f890855..33fc9770d9 100644

drivers/net/i40e/i40e_rxtx.h line 29

Quoted 6 lines
drivers/net/i40e/i40e_rxtx.h +1 -1
@@ -25,7 +25,7 @@
 #define I40E_RX_MAX_DATA_BUF_SIZE	(16 * 1024 - 128)
 
 #define	I40E_MIN_RING_DESC	64
-#define	I40E_MAX_RING_DESC	4096
+#define	I40E_MAX_RING_DESC	8160
 

since the ring memory allocation in the driver always seems to allocate space for up to the max number of descriptors, this will lead to an increase of memory footprint of ~128k per Rx Q, and ~64k per Tx Q. However, I'd view this as relatively harmless given what we have now. If it is an issue, we should look to fix it in a separate patch, rather than blocking this simple change.

Quoted 1 line

Patch applied to dpdk-next-net-intel,

Thanks,
/Bruce