From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id AC73CA0471
	for <public@inbox.dpdk.org>; Fri, 21 Jun 2019 18:51:12 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 9B7E81D54F;
	Fri, 21 Jun 2019 18:51:12 +0200 (CEST)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
 by dpdk.org (Postfix) with ESMTP id 072775B3A
 for <stable@dpdk.org>; Fri, 21 Jun 2019 18:51:11 +0200 (CEST)
Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com
 [10.5.11.12])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.redhat.com (Postfix) with ESMTPS id 78FED8762F;
 Fri, 21 Jun 2019 16:51:10 +0000 (UTC)
Received: from rh.redhat.com (ovpn-117-77.ams2.redhat.com [10.36.117.77])
 by smtp.corp.redhat.com (Postfix) with ESMTP id AF99E60BE0;
 Fri, 21 Jun 2019 16:51:05 +0000 (UTC)
From: Kevin Traynor <ktraynor@redhat.com>
To: Ali Alnubani <alialnu@mellanox.com>
Cc: dpdk stable <stable@dpdk.org>
Date: Fri, 21 Jun 2019 17:46:07 +0100
Message-Id: <20190621164626.31219-23-ktraynor@redhat.com>
In-Reply-To: <20190621164626.31219-1-ktraynor@redhat.com>
References: <20190621164626.31219-1-ktraynor@redhat.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
 (mx1.redhat.com [10.5.110.26]); Fri, 21 Jun 2019 16:51:10 +0000 (UTC)
Subject: [dpdk-stable] patch 'examples/ip_fragmentation: fix Tx queues init'
	has been queued to LTS release 18.11.3
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
Errors-To: stable-bounces@dpdk.org
Sender: "stable" <stable-bounces@dpdk.org>

Hi,

FYI, your patch has been queued to LTS release 18.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/26/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/2c139f18efb74e54256c69667a53b7087de44042

Thanks.

Kevin Traynor

---
>From 2c139f18efb74e54256c69667a53b7087de44042 Mon Sep 17 00:00:00 2001
From: Ali Alnubani <alialnu@mellanox.com>
Date: Mon, 6 May 2019 09:49:10 +0000
Subject: [PATCH] examples/ip_fragmentation: fix Tx queues init

[ upstream commit 9758b956dcf493e9cb73c965c791d2a50407ae6b ]

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")

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 17a877da2..b388f3083 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -967,4 +967,7 @@ main(int argc, char **argv)
 				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);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-06-21 17:22:12.946165034 +0100
+++ 0023-examples-ip_fragmentation-fix-Tx-queues-init.patch	2019-06-21 17:22:11.734518875 +0100
@@ -1 +1 @@
-From 9758b956dcf493e9cb73c965c791d2a50407ae6b Mon Sep 17 00:00:00 2001
+From 2c139f18efb74e54256c69667a53b7087de44042 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9758b956dcf493e9cb73c965c791d2a50407ae6b ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index a5101fa91..85c0100f7 100644
+index 17a877da2..b388f3083 100644
@@ -36 +37 @@
-@@ -990,4 +990,7 @@ main(int argc, char **argv)
+@@ -967,4 +967,7 @@ main(int argc, char **argv)