summaryrefslogtreecommitdiff
path: root/examples/ip_fragmentation
diff options
context:
space:
mode:
authorAli Alnubani <alialnu@mellanox.com>2019-05-06 09:49:10 +0000
committerThomas Monjalon <thomas@monjalon.net>2019-06-04 12:45:41 +0200
commit9758b956dcf493e9cb73c965c791d2a50407ae6b (patch)
tree9d49e5af3599de7d8eddab47969f3569baa43aef /examples/ip_fragmentation
parentf10aadfd2f2fc0e43a00083dfff7ba9a64871b2d (diff)
downloaddpdk-9758b956dcf493e9cb73c965c791d2a50407ae6b.zip
dpdk-9758b956dcf493e9cb73c965c791d2a50407ae6b.tar.gz
dpdk-9758b956dcf493e9cb73c965c791d2a50407ae6b.tar.xz
examples/ip_fragmentation: fix Tx queues init
The application tries to configure queue ids larger than the maximum allowed by MAX_TX_QUEUE_PER_PORT. This causes the startup error: " ... Initializing port 0 on lcore 0... Address:7C:FE:90:12:23:0D txq=0,0 txq=1,1 txq=2,2 txq=3,3 txq=4,4 txq=5,5 txq=6,6 txq=7,7 txq=8,8 txq=9,9 txq=10,10 txq=11,11 txq=12,12 txq=13,13 txq=14,14 txq=15,15 txq=16,16 Invalid TX queue_id=16 EAL: Error - exiting with code: 1 Cause: rte_eth_tx_queue_setup: err=-22, port=0 " The error reproduces when lcores aren't set, and when the machine has more than 16 cores. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Diffstat (limited to 'examples/ip_fragmentation')
-rw-r--r--examples/ip_fragmentation/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index a5101fa..85c0100 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -989,6 +989,9 @@ main(int argc, char **argv)
if (rte_lcore_is_enabled(lcore_id) == 0)
continue;
+ if (queueid >= rte_eth_devices[portid].data->nb_tx_queues)
+ break;
+
socket = (int) rte_lcore_to_socket_id(lcore_id);
printf("txq=%u,%d ", lcore_id, queueid);
fflush(stdout);