All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ali Alnubani <alialnu@mellanox.com>
To: "konstantin.ananyev@intel.com" <konstantin.ananyev@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH] examples/ip_fragmentation: fix Tx queues init
Date: Mon, 6 May 2019 09:49:10 +0000	[thread overview]
Message-ID: <20190506094857.14248-1-alialnu@mellanox.com> (raw)

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>
---
 examples/ip_fragmentation/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index e90a61e35..953115aba 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -984,6 +984,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);
-- 
2.19.2


             reply	other threads:[~2019-05-06  9:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06  9:49 Ali Alnubani [this message]
2019-06-04 10:42 ` [dpdk-dev] [dpdk-stable] [PATCH] examples/ip_fragmentation: fix Tx queues init Thomas Monjalon
  -- strict thread matches above, loose matches on Subject: below --
2019-05-06  8:56 [dpdk-dev] " Ali Alnubani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190506094857.14248-1-alialnu@mellanox.com \
    --to=alialnu@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.