Skip to contentSkip to conversation

examples/l3fwd: fix max Tx queue count

PATCH In review Harman Kalra 2 participants 6 messages Dec 14, 2020 – Jan 19, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/l3fwd: fix max Tx queue count

In l3fwd no of transmit queues is calculated based on no of lcores with which it is launched. Hence maximum no of tx queues possible per port should depend on RTE_MAX_LCORE value.

Fixes 268888b5b020 ("examples/l3fwd: modularize")
---
 examples/l3fwd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/l3fwd/main.c +1 -1
index d62dec434..bb49e5faf 100644
@@ -48,7 +48,7 @@
 #include "l3fwd.h"
 #include "l3fwd_event.h"
 
-#define MAX_TX_QUEUE_PER_PORT RTE_MAX_ETHPORTS
+#define MAX_TX_QUEUE_PER_PORT RTE_MAX_LCORE
 #define MAX_RX_QUEUE_PER_PORT 128
 
 #define MAX_LCORE_PARAMS 1024
Signature · 1 line
2.18.0
#1 lore raw

Ping...

Quoted 28 lines · Harman Kalra

In l3fwd no of transmit queues is calculated based on no of lcores with which it is launched. Hence maximum no of tx queues possible per port should depend on RTE_MAX_LCORE value.

Fixes 268888b5b020 ("examples/l3fwd: modularize")
---
 examples/l3fwd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/l3fwd/main.c +1 -1
index d62dec434..bb49e5faf 100644
@@ -48,7 +48,7 @@
 #include "l3fwd.h"
 #include "l3fwd_event.h"
 
-#define MAX_TX_QUEUE_PER_PORT RTE_MAX_ETHPORTS
+#define MAX_TX_QUEUE_PER_PORT RTE_MAX_LCORE
 #define MAX_RX_QUEUE_PER_PORT 128
 
 #define MAX_LCORE_PARAMS 1024
Signature · 1 line
2.18.0
Reviewed-by on v1 1/1
#2 lore raw
In reply to Harman Kalra
Quoted 4 lines · Harman Kalra

In l3fwd no of transmit queues is calculated based on no of lcores with which it is launched. Hence maximum no of tx queues possible per port should depend on RTE_MAX_LCORE value.

For the title, we are not "fixing" the Tx queue count. WDYT of:
examples/l3fwd: remove limitation on Tx queue count

Quoted 2 lines
Fixes 268888b5b020 ("examples/l3fwd: modularize")

This commit simply moves code around, so it is unlikely to be the origin. Afaiu, this behavior has been present since the start.
I'd rather flag

Fixes af75078fece3 ("first public release")
Quoted 12 lines
---
 examples/l3fwd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/l3fwd/main.c +0 -0
index d62dec434..bb49e5faf 100644

examples/l3fwd/main.c line 54

Quoted 8 lines
examples/l3fwd/main.c +1 -1
@@ -48,7 +48,7 @@
 #include "l3fwd.h"
 #include "l3fwd_event.h"
 
-#define MAX_TX_QUEUE_PER_PORT RTE_MAX_ETHPORTS
+#define MAX_TX_QUEUE_PER_PORT RTE_MAX_LCORE
 #define MAX_RX_QUEUE_PER_PORT 128
 
 #define MAX_LCORE_PARAMS 1024

Later in the code, the associated check on nb_lcores > RTE_MAX_LCORE does not make much sense.
But keeping this MAX_TX_QUEUE_PER_PORT macro is a way to document how the txq are allocated.
So this change lgtm.

--
David Marchand

#3 lore raw
Quoted 5 lines · David Marchand

External Email

----------------------------------------------------------------------

Quoted 1 line · Harman Kalra
Quoted 7 lines
Quoted 3 lines

In l3fwd no of transmit queues is calculated based on no of lcores with which it is launched. Hence maximum no of tx queues possible per port should depend on RTE_MAX_LCORE value.

For the title, we are not "fixing" the Tx queue count. WDYT of:
examples/l3fwd: remove limitation on Tx queue count

Hi David
Thanks for reviewing, I will push V2 with the required changes.

Quoted 43 lines
Quoted 3 lines
Fixes 268888b5b020 ("examples/l3fwd: modularize")

This commit simply moves code around, so it is unlikely to be the origin. Afaiu, this behavior has been present since the start.
I'd rather flag

Fixes af75078fece3 ("first public release")
Quoted 12 lines
---
 examples/l3fwd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/l3fwd/main.c +0 -0
index d62dec434..bb49e5faf 100644

examples/l3fwd/main.c line 54

Quoted 8 lines
examples/l3fwd/main.c +1 -1
@@ -48,7 +48,7 @@
 #include "l3fwd.h"
 #include "l3fwd_event.h"
 
-#define MAX_TX_QUEUE_PER_PORT RTE_MAX_ETHPORTS
+#define MAX_TX_QUEUE_PER_PORT RTE_MAX_LCORE
 #define MAX_RX_QUEUE_PER_PORT 128
 
 #define MAX_LCORE_PARAMS 1024

Later in the code, the associated check on nb_lcores > RTE_MAX_LCORE does not make much sense.
But keeping this MAX_TX_QUEUE_PER_PORT macro is a way to document how the txq are allocated.
So this change lgtm.

--
David Marchand

#4 lore raw

PATCH v2 1/1 examples/l3fwd: remove limitation on Tx queue count

In reply to David Marchand

In l3fwd no of transmit queues is calculated based on no of lcores with which it is launched. Hence maximum no of tx queues possible per port should depend on RTE_MAX_LCORE value.

Fixes af75078fece3 ("first public release")

---
V2:
* Reworded patch subject
* Corrected the Fixes tag commit

 examples/l3fwd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/l3fwd/main.c +1 -1
index d62dec434..bb49e5faf 100644
@@ -48,7 +48,7 @@
 #include "l3fwd.h"
 #include "l3fwd_event.h"
 
-#define MAX_TX_QUEUE_PER_PORT RTE_MAX_ETHPORTS
+#define MAX_TX_QUEUE_PER_PORT RTE_MAX_LCORE
 #define MAX_RX_QUEUE_PER_PORT 128
 
 #define MAX_LCORE_PARAMS 1024
Signature · 1 line
2.18.0
#5 lore raw

Re: [dpdk-dev] [PATCH v2] examples/l3fwd: remove limitation on Tx queue count

Quoted 10 lines · Harman Kalra

In l3fwd no of transmit queues is calculated based on no of lcores with which it is launched. Hence maximum no of tx queues possible per port should depend on RTE_MAX_LCORE value.

Fixes af75078fece3 ("first public release")

Applied, thanks.

Signature · 1 line
David Marchand