Skip to contentSkip to conversation

net/ixgbe: fix min Rx/Tx descriptors

PATCH Superseded Mingjin Ye 2 participants 5 messages Feb 21, 2025 – Feb 25, 2025 Network drivers

lore
Share & tools
lore

Mingjin Ye

author
#0 lore raw

PATCH 1/1 net/ixgbe: fix min Rx/Tx descriptors

The minimum free packet threshold (tx_free_thresh) and the minimum RS bit threshold (tx_rs_thresh) both have a default value of 32. Therefore, the default minimum number of ring descriptors value is 64.

Fixes dee5f1fd5fc7 ("ixgbe: get queue info and descriptor limits")
---
 doc/guides/nics/ixgbe.rst            | 2 +-
 drivers/net/intel/ixgbe/ixgbe_rxtx.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
doc/guides/nics/ixgbe.rst +1 -1
index c5c6a6c34b..10a0cdd270 100644
@@ -76,7 +76,7 @@ Scattered packets are not supported in this mode.
 If an incoming packet is greater than the maximum acceptable length of one "mbuf" data size (by default, the size is 2 KB),
 vPMD for RX would be disabled.
 
-By default, IXGBE_MAX_RING_DESC is set to 8192 and RTE_PMD_IXGBE_RX_MAX_BURST is set to 32.
+By default, IXGBE_MAX_RING_DESC is set to 8192 and RTE_PMD_IXGBE_RX_MAX_BURST is set to 64.
 
 Windows Prerequisites and Pre-conditions
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
drivers/net/intel/ixgbe/ixgbe_rxtx.h +1 -1
index 278f665108..54569c7ade 100644
@@ -26,7 +26,7 @@
  * descriptors should meet the following condition:
  *      (num_ring_desc * sizeof(rx/tx descriptor)) % 128 == 0
  */
-#define	IXGBE_MIN_RING_DESC	32
+#define	IXGBE_MIN_RING_DESC	64
 #define	IXGBE_MAX_RING_DESC	8192
 
 #define RTE_PMD_IXGBE_TX_MAX_BURST 32
Signature · 1 line
2.25.1
#1 lore raw
Quoted 18 lines · Mingjin Ye

The minimum free packet threshold (tx_free_thresh) and the minimum RS bit threshold (tx_rs_thresh) both have a default value of 32. Therefore, the default minimum number of ring descriptors value is 64.

Fixes dee5f1fd5fc7 ("ixgbe: get queue info and descriptor limits")
---
 doc/guides/nics/ixgbe.rst            | 2 +-
 drivers/net/intel/ixgbe/ixgbe_rxtx.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
doc/guides/nics/ixgbe.rst +0 -0
index c5c6a6c34b..10a0cdd270 100644

doc/guides/nics/ixgbe.rst Scattered packets are not supported in this mode. · line 80

Quoted 6 lines
doc/guides/nics/ixgbe.rst +1 -1
@@ -76,7 +76,7 @@ Scattered packets are not supported in this mode.
 If an incoming packet is greater than the maximum acceptable length of one "mbuf" data size (by default, the size is 2 KB),
 vPMD for RX would be disabled.
 
-By default, IXGBE_MAX_RING_DESC is set to 8192 and RTE_PMD_IXGBE_RX_MAX_BURST is set to 32.
+By default, IXGBE_MAX_RING_DESC is set to 8192 and RTE_PMD_IXGBE_RX_MAX_BURST is set to 64.
 

Was this part of the patch included by mistake? The RX_MAX_BURST value is still set to 32 in the code.

However, in terms of doc updates, I believe the text above this point is incorrect. It states that scattered packets are not supported in vector drivers, which is no longer correct, as we support them for vector Rx. Similarly, I think the pre-conditions for use of burst/vector mode are incorrect compared to what is checked in the code.

Quoted 18 lines
doc/guides/nics/ixgbe.rst +0 -0
 Windows Prerequisites and Pre-conditions
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
drivers/net/intel/ixgbe/ixgbe_rxtx.h +1 -1
index 278f665108..54569c7ade 100644
@@ -26,7 +26,7 @@
  * descriptors should meet the following condition:
  *      (num_ring_desc * sizeof(rx/tx descriptor)) % 128 == 0
  */
-#define	IXGBE_MIN_RING_DESC	32
+#define	IXGBE_MIN_RING_DESC	64
 #define	IXGBE_MAX_RING_DESC	8192
 
 #define RTE_PMD_IXGBE_TX_MAX_BURST 32
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#2 lore raw
In reply to Mingjin Ye
Quoted 31 lines · Mingjin Ye

The minimum free packet threshold (tx_free_thresh) and the minimum RS bit threshold (tx_rs_thresh) both have a default value of 32. Therefore, the default minimum number of ring descriptors value is 64.

Fixes dee5f1fd5fc7 ("ixgbe: get queue info and descriptor limits")
---
 doc/guides/nics/ixgbe.rst            | 2 +-
 drivers/net/intel/ixgbe/ixgbe_rxtx.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
doc/guides/nics/ixgbe.rst +1 -1
index c5c6a6c34b..10a0cdd270 100644
@@ -76,7 +76,7 @@ Scattered packets are not supported in this mode.
 If an incoming packet is greater than the maximum acceptable length of one "mbuf" data size (by default, the size is 2 KB),
 vPMD for RX would be disabled.
 
-By default, IXGBE_MAX_RING_DESC is set to 8192 and RTE_PMD_IXGBE_RX_MAX_BURST is set to 32.
+By default, IXGBE_MAX_RING_DESC is set to 8192 and RTE_PMD_IXGBE_RX_MAX_BURST is set to 64.
 
 Windows Prerequisites and Pre-conditions
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
drivers/net/intel/ixgbe/ixgbe_rxtx.h +0 -0
index 278f665108..54569c7ade 100644

drivers/net/intel/ixgbe/ixgbe_rxtx.h line 30

Quoted 6 lines
drivers/net/intel/ixgbe/ixgbe_rxtx.h +1 -1
@@ -26,7 +26,7 @@
  * descriptors should meet the following condition:
  *      (num_ring_desc * sizeof(rx/tx descriptor)) % 128 == 0
  */
-#define	IXGBE_MIN_RING_DESC	32
+#define	IXGBE_MIN_RING_DESC	64
 #define	IXGBE_MAX_RING_DESC	8192

Ack for this part of the change. Just ran a quick test using ixgbe and things stopped working pretty quickly with an Rx ring size of 32.

With the doc update above dropped:

author
#3 lore raw

PATCH v2 1/1 net/ixgbe: fix min Rx/Tx descriptors

In reply to Mingjin Ye

The minimum free packet threshold (tx_free_thresh) and the minimum RS bit threshold (tx_rs_thresh) both have a default value of 32. Therefore, the default minimum number of ring descriptors value is 64.

For reference, see "Configuration of Transmit Queues" in doc/guides/prog_guide/ethdev/ethdev.rst

Fixes dee5f1fd5fc7 ("ixgbe: get queue info and descriptor limits")

---
v2: Change doc.

---
 doc/guides/nics/ixgbe.rst            | 5 +++--
 drivers/net/intel/ixgbe/ixgbe_rxtx.h | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
doc/guides/nics/ixgbe.rst +3 -2
index c5c6a6c34b..aaed324e15 100644
@@ -68,11 +68,12 @@ Ensure that the following pre-conditions are satisfied:
 
 *   (rxq->nb_rx_desc % rxq->rx_free_thresh) == 0
 
-*   rxq->nb_rx_desc  < (IXGBE_MAX_RING_DESC - RTE_PMD_IXGBE_RX_MAX_BURST)
+*   rxq->nb_rx_desc >= IXGBE_MIN_RING_DESC
+
+*   rxq->nb_rx_desc <= IXGBE_MAX_RING_DESC
 
 These conditions are checked in the code.
 
-Scattered packets are not supported in this mode.
 If an incoming packet is greater than the maximum acceptable length of one "mbuf" data size (by default, the size is 2 KB),
 vPMD for RX would be disabled.
 
drivers/net/intel/ixgbe/ixgbe_rxtx.h +1 -1
index 278f665108..54569c7ade 100644
@@ -26,7 +26,7 @@
  * descriptors should meet the following condition:
  *      (num_ring_desc * sizeof(rx/tx descriptor)) % 128 == 0
  */
-#define	IXGBE_MIN_RING_DESC	32
+#define	IXGBE_MIN_RING_DESC	64
 #define	IXGBE_MAX_RING_DESC	8192
 
 #define RTE_PMD_IXGBE_TX_MAX_BURST 32
Signature · 1 line
2.25.1
Acked-by on v2 1/1 Applied
#4 lore raw
Quoted 27 lines · Mingjin Ye

The minimum free packet threshold (tx_free_thresh) and the minimum RS bit threshold (tx_rs_thresh) both have a default value of 32. Therefore, the default minimum number of ring descriptors value is 64.

For reference, see "Configuration of Transmit Queues" in doc/guides/prog_guide/ethdev/ethdev.rst

Fixes dee5f1fd5fc7 ("ixgbe: get queue info and descriptor limits")

---
v2: Change doc.

---
 doc/guides/nics/ixgbe.rst            | 5 +++--
 drivers/net/intel/ixgbe/ixgbe_rxtx.h | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
doc/guides/nics/ixgbe.rst +0 -1
index c5c6a6c34b..aaed324e15 100644
@@ -68,11 +68,12 @@ Ensure that the following pre-conditions are satisfied:
 
 *   (rxq->nb_rx_desc % rxq->rx_free_thresh) == 0
 
-*   rxq->nb_rx_desc  < (IXGBE_MAX_RING_DESC - RTE_PMD_IXGBE_RX_MAX_BURST)

doc/guides/nics/ixgbe.rst Ensure that the following pre-conditions are satisfied: · line 79

Quoted 10 lines
doc/guides/nics/ixgbe.rst +3 -1
+*   rxq->nb_rx_desc >= IXGBE_MIN_RING_DESC
+
+*   rxq->nb_rx_desc <= IXGBE_MAX_RING_DESC
 
 These conditions are checked in the code.
 
-Scattered packets are not supported in this mode.
 If an incoming packet is greater than the maximum acceptable length of one "mbuf" data size (by default, the size is 2 KB),
 vPMD for RX would be disabled.
 

These two lines in the doc should be removed as well, since they also imply the unavailability of scattered Rx.
Fixing this by dropping them on apply.

Quoted 16 lines
drivers/net/intel/ixgbe/ixgbe_rxtx.h +1 -1
index 278f665108..54569c7ade 100644
@@ -26,7 +26,7 @@
  * descriptors should meet the following condition:
  *      (num_ring_desc * sizeof(rx/tx descriptor)) % 128 == 0
  */
-#define	IXGBE_MIN_RING_DESC	32
+#define	IXGBE_MIN_RING_DESC	64
 #define	IXGBE_MAX_RING_DESC	8192
 
 #define RTE_PMD_IXGBE_TX_MAX_BURST 32
Signature · 1 line
2.25.1

Applied to dpdk-next-net-intel.

Thanks,
/Bruce