patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2
@ 2017-05-02  9:32 Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/performance-thread: fix compilation on Suse 11 SP2' " Yuanhan Liu
                   ` (25 more replies)
  0 siblings, 26 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 13d6a5c8a1b917b54ef9398fde9f238e20f4b2e2 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 21 Apr 2017 14:50:22 +0100
Subject: [PATCH] examples: fix build clean on FreeBSD

[ upstream commit b2f4f2e2a69169c92376797c1365daeb20faf401 ]

The "examples_clean" top-level build target calls "make clean" for each
individual example. However, for a number of those which were linux-only
examples, the "if" condition only had a dummy "all" target i.e. no "clean"
target, causing an error with examples_clean.

Fixes: 3417cd687e5e ("examples: ignore linux apps on bsd")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/exception_path/Makefile       | 1 +
 examples/netmap_compat/bridge/Makefile | 1 +
 examples/qos_sched/Makefile            | 1 +
 3 files changed, 3 insertions(+)

diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile
index 959914a..4b6e071 100644
--- a/examples/exception_path/Makefile
+++ b/examples/exception_path/Makefile
@@ -42,6 +42,7 @@ ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
 $(info This application can only operate in a linuxapp environment, \
 please change the definition of the RTE_TARGET environment variable)
 all:
+clean:
 else
 
 # binary name
diff --git a/examples/netmap_compat/bridge/Makefile b/examples/netmap_compat/bridge/Makefile
index 50d96e8..1d4ddff 100644
--- a/examples/netmap_compat/bridge/Makefile
+++ b/examples/netmap_compat/bridge/Makefile
@@ -42,6 +42,7 @@ ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
 $(info This application can only operate in a linuxapp environment, \
 please change the definition of the RTE_TARGET environment variable)
 all:
+clean:
 else
 
 # binary name
diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
index f59645f..e41ac50 100644
--- a/examples/qos_sched/Makefile
+++ b/examples/qos_sched/Makefile
@@ -42,6 +42,7 @@ ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
 $(info This application can only operate in a linuxapp environment, \
 please change the definition of the RTE_TARGET environment variable)
 all:
+clean:
 else
 
 # binary name
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'examples/performance-thread: fix compilation on Suse 11 SP2' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'mbuf: fix missing includes in exported header' " Yuanhan Liu
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Yuanhan Liu, Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 1ae4edde5697a738dfbcd4163d2c2b2935d9880f Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 24 Apr 2017 14:04:22 +0100
Subject: [PATCH] examples/performance-thread: fix compilation on Suse 11 SP2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 1e6d5a960820a377e2453a13c8cd2e6797dc2f76 ]

Fixes following compilation error, using uint64_t type,
instead of int128_t unnecessarily:

In file included from ./common/lthread.c:82:0:
./common/lthread_timer.h: In function ‘_ns_to_clks’:
./common/lthread_timer.h:49:20: error: expected ‘=’, ‘,’, ‘;’,
 ‘asm’ or ‘__attribute__’ before ‘clkns’
compilation terminated due to -Wfatal-errors.

Fixes: 116819b9ed0d ("examples/performance-thread: add lthread subsystem")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/performance-thread/common/lthread_timer.h | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/examples/performance-thread/common/lthread_timer.h b/examples/performance-thread/common/lthread_timer.h
index b5e6fb0..2d14757 100644
--- a/examples/performance-thread/common/lthread_timer.h
+++ b/examples/performance-thread/common/lthread_timer.h
@@ -42,11 +42,22 @@
 static inline uint64_t
 _ns_to_clks(uint64_t ns)
 {
-	unsigned __int128 clkns = rte_get_tsc_hz();
+	/*
+	 * clkns needs to be divided by 1E9 to get ns clocks. However,
+	 * dividing by this first would lose a lot of accuracy.
+	 * Dividing after a multiply by ns, could cause overflow of
+	 * uint64_t if ns is about 5 seconds [if we assume a max tsc
+	 * rate of 4GHz]. Therefore we first divide by 1E4, then
+	 * multiply and finally divide by 1E5. This allows ns to be
+	 * values many hours long, without overflow, while still keeping
+	 * reasonable accuracy.
+	 */
+	uint64_t clkns = rte_get_tsc_hz() / 1e4;
 
 	clkns *= ns;
-	clkns /= 1000000000;
-	return (uint64_t) clkns;
+	clkns /= 1e5;
+
+	return clkns;
 }
 
 
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'mbuf: fix missing includes in exported header' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/performance-thread: fix compilation on Suse 11 SP2' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede: fix default MAC address handling' " Yuanhan Liu
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Yuanhan Liu, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 14d88542d4203f0d800c35f76ab805dd579e12ca Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Wed, 26 Apr 2017 14:07:14 +0200
Subject: [PATCH] mbuf: fix missing includes in exported header

[ upstream commit d53aad67e8001f1abeeae3c3765ca80cd7c3326a ]

This commit addresses the following errors:

 In file included from /tmp/check-includes.sh.681.c:1:0:
 build/include/rte_mbuf_ptype.h:587:35: error: unknown type name 'uint32_t'
 [...]
 build/include/rte_mbuf_ptype.h:662:51: error: unknown type name 'size_t'
 [...]

Fixes: 288541c8ff9e ("mbuf: add functions to dump packet type")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf_ptype.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_mbuf/rte_mbuf_ptype.h b/lib/librte_mbuf/rte_mbuf_ptype.h
index ff6de9d..a3269c4 100644
--- a/lib/librte_mbuf/rte_mbuf_ptype.h
+++ b/lib/librte_mbuf/rte_mbuf_ptype.h
@@ -91,6 +91,9 @@
  * RTE_PTYPE_INNER_L4_UDP.
  */
 
+#include <stddef.h>
+#include <stdint.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'net/qede: fix default MAC address handling' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/performance-thread: fix compilation on Suse 11 SP2' " Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'mbuf: fix missing includes in exported header' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-06 15:07   ` Patil, Harish
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede: fix fastpath rings reset phase' " Yuanhan Liu
                   ` (22 subsequent siblings)
  25 siblings, 1 reply; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Harish Patil; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 9d5824d3cbf8eb610c37bb969bd7b1f24942017e Mon Sep 17 00:00:00 2001
From: Harish Patil <harish.patil@cavium.com>
Date: Tue, 25 Apr 2017 00:28:36 -0700
Subject: [PATCH] net/qede: fix default MAC address handling

[ upstream commit 49d8b54e867982d0ee55d0706d9b7cec73492542 ]

- In qede_mac_addr_set(), in order to configure default MAC address we
first delete the existing MAC address before trying to add new one. During
init time, there is no MAC filter to begin with, so trying to remove a
non-existing MAC address causes a firmware exception. This can be prevented
by internally calling qede_mac_addr_add() which has the checks in place to
delete a MAC address only if it was added before.

- Remove setting of the default MAC address from within
qede_dev_configure() since rte_eth_dev_start() calls mac_addr_set() anyway.

Fixes: 2ea6f76aff40 ("qede: add core driver")

Signed-off-by: Harish Patil <harish.patil@cavium.com>
---
 drivers/net/qede/qede_ethdev.c | 30 +-----------------------------
 1 file changed, 1 insertion(+), 29 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index debf7bf..2322147 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -433,8 +433,6 @@ qede_mac_addr_set(struct rte_eth_dev *eth_dev, struct ether_addr *mac_addr)
 {
 	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
 	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
-	struct ecore_filter_ucast ucast;
-	int rc;
 
 	if (IS_VF(edev) && !ecore_vf_check_mac(ECORE_LEADING_HWFN(edev),
 					       mac_addr->addr_bytes)) {
@@ -444,29 +442,7 @@ qede_mac_addr_set(struct rte_eth_dev *eth_dev, struct ether_addr *mac_addr)
 		return;
 	}
 
-	/* First remove the primary mac */
-	qede_set_ucast_cmn_params(&ucast);
-	ucast.opcode = ECORE_FILTER_REMOVE;
-	ucast.type = ECORE_FILTER_MAC;
-	ether_addr_copy(&qdev->primary_mac,
-			(struct ether_addr *)&ucast.mac);
-	rc = ecore_filter_ucast_cmd(edev, &ucast, ECORE_SPQ_MODE_CB, NULL);
-	if (rc != 0) {
-		DP_ERR(edev, "Unable to remove current macaddr"
-			     " Reverting to previous default mac\n");
-		ether_addr_copy(&qdev->primary_mac,
-				&eth_dev->data->mac_addrs[0]);
-		return;
-	}
-
-	/* Add new MAC */
-	ucast.opcode = ECORE_FILTER_ADD;
-	ether_addr_copy(mac_addr, (struct ether_addr *)&ucast.mac);
-	rc = ecore_filter_ucast_cmd(edev, &ucast, ECORE_SPQ_MODE_CB, NULL);
-	if (rc != 0)
-		DP_ERR(edev, "Unable to add new default mac\n");
-	else
-		ether_addr_copy(mac_addr, &qdev->primary_mac);
+	qede_mac_addr_add(eth_dev, mac_addr, 0, 0);
 }
 
 static void qede_config_accept_any_vlan(struct qede_dev *qdev, bool action)
@@ -741,10 +717,6 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 
 	SLIST_INIT(&qdev->vlan_list_head);
 
-	/* Add primary mac for PF */
-	if (IS_PF(edev))
-		qede_mac_addr_set(eth_dev, &qdev->primary_mac);
-
 	/* Enable VLAN offloads by default */
 	qede_vlan_offload_set(eth_dev, ETH_VLAN_STRIP_MASK  |
 				       ETH_VLAN_FILTER_MASK |
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'net/qede: fix fastpath rings reset phase' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (2 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede: fix default MAC address handling' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-06 15:06   ` Patil, Harish
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede/base: fix find zero bit macro' " Yuanhan Liu
                   ` (21 subsequent siblings)
  25 siblings, 1 reply; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Harish Patil; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From e705b5d8a5dd0e9acfacdfe43df357964e230905 Mon Sep 17 00:00:00 2001
From: Harish Patil <harish.patil@cavium.com>
Date: Tue, 25 Apr 2017 00:28:37 -0700
Subject: [PATCH] net/qede: fix fastpath rings reset phase

[ upstream commit b3fb8c5ea03518be598f3aafa87c51df66702a6a ]

Perform reset of the fastpath RX/TX rings after stopping device port and
not while starting the ports.

Fixes: cfe28a988565 ("net/qede: support unequal number of Rx/Tx queues")

Signed-off-by: Harish Patil <harish.patil@cavium.com>
---
 drivers/net/qede/qede_rxtx.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index a34b665..9cce13d 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -1318,10 +1318,6 @@ int qede_dev_start(struct rte_eth_dev *eth_dev)
 	/* Bring-up the link */
 	qede_dev_set_link_state(eth_dev, true);
 
-	/* Reset ring */
-	if (qede_reset_fp_rings(qdev))
-		return -ENOMEM;
-
 	/* Start/resume traffic */
 	qdev->ops->fastpath_start(edev);
 
@@ -1490,6 +1486,7 @@ int qede_reset_fp_rings(struct qede_dev *qdev)
 			}
 		}
 	}
+	qede_reset_fp_rings(qdev);
 
 	return 0;
 }
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'net/qede/base: fix find zero bit macro' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (3 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede: fix fastpath rings reset phase' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/i40e: fix mbuf alloc failed counter' " Yuanhan Liu
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From d61fdece2102135417341a35dc968d2ab008b152 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Tue, 25 Apr 2017 00:28:45 -0700
Subject: [PATCH] net/qede/base: fix find zero bit macro

[ upstream commit 9a671097bc537cd830f6c9a68de68573ed5522f2 ]

Use appropriate operator for if condition

Coverity issue: 1379399
Coverity issue: 1379404
Fixes: ec94dbc57362 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/base/bcm_osal.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/qede/base/bcm_osal.c b/drivers/net/qede/base/bcm_osal.c
index 28be958..3f895cd 100644
--- a/drivers/net/qede/base/bcm_osal.c
+++ b/drivers/net/qede/base/bcm_osal.c
@@ -98,9 +98,7 @@ inline u32 qede_find_first_zero_bit(unsigned long *addr, u32 limit)
 	u32 nwords = 0;
 	OSAL_BUILD_BUG_ON(!limit);
 	nwords = (limit - 1) / OSAL_BITS_PER_UL + 1;
-	for (i = 0; i < nwords; i++)
-		if (~(addr[i] != 0))
-			break;
+	for (i = 0; i < nwords && ~(addr[i]) == 0; i++);
 	return (i == nwords) ? limit : i * OSAL_BITS_PER_UL + qede_ffz(addr[i]);
 }
 
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix mbuf alloc failed counter' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (4 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede/base: fix find zero bit macro' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/bonding: fix updating slave link status' " Yuanhan Liu
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Matt Peters; +Cc: Yuanhan Liu, Allain Legacy, Helin Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 326c17459bcd3dfa1c5bf224908ed4488376caab Mon Sep 17 00:00:00 2001
From: Matt Peters <matt.peters@windriver.com>
Date: Tue, 25 Apr 2017 08:28:45 -0400
Subject: [PATCH] net/i40e: fix mbuf alloc failed counter

[ upstream commit 09c04fbc8d1580b49095f6113ff3b140d699278e ]

When an mbuf alloc fails during the mempool get operation for the
i40e bulk alloc receive function, the rx_mbuf_alloc_failed counter
is not incremented to record the error.

This fix ensures consistency with the other i40e receive procedures and
other net drivers.

Signed-off-by: Matt Peters <matt.peters@windriver.com>
Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
---
 drivers/net/i40e/i40e_rxtx.c | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 9cc9808..1a007d6 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -598,6 +598,7 @@ static inline uint16_t
 rx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 {
 	struct i40e_rx_queue *rxq = (struct i40e_rx_queue *)rx_queue;
+	struct rte_eth_dev *dev;
 	uint16_t nb_rx = 0;
 
 	if (!nb_pkts)
@@ -615,9 +616,10 @@ rx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		if (i40e_rx_alloc_bufs(rxq) != 0) {
 			uint16_t i, j;
 
-			PMD_RX_LOG(DEBUG, "Rx mbuf alloc failed for "
-				   "port_id=%u, queue_id=%u",
-				   rxq->port_id, rxq->queue_id);
+			dev = I40E_VSI_TO_ETH_DEV(rxq->vsi);
+			dev->data->rx_mbuf_alloc_failed +=
+				rxq->rx_free_thresh;
+
 			rxq->rx_nb_avail = 0;
 			rxq->rx_tail = (uint16_t)(rxq->rx_tail - nb_rx);
 			for (i = 0, j = rxq->rx_tail; i < nb_rx; i++, j++)
@@ -679,6 +681,7 @@ i40e_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	union i40e_rx_desc rxd;
 	struct i40e_rx_entry *sw_ring;
 	struct i40e_rx_entry *rxe;
+	struct rte_eth_dev *dev;
 	struct rte_mbuf *rxm;
 	struct rte_mbuf *nmb;
 	uint16_t nb_rx;
@@ -707,10 +710,13 @@ i40e_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 			break;
 
 		nmb = rte_mbuf_raw_alloc(rxq->mp);
-		if (unlikely(!nmb))
+		if (unlikely(!nmb)) {
+			dev = I40E_VSI_TO_ETH_DEV(rxq->vsi);
+			dev->data->rx_mbuf_alloc_failed++;
 			break;
-		rxd = *rxdp;
+		}
 
+		rxd = *rxdp;
 		nb_hold++;
 		rxe = &sw_ring[rx_id];
 		rx_id++;
@@ -802,6 +808,7 @@ i40e_recv_scattered_pkts(void *rx_queue,
 	struct rte_mbuf *nmb, *rxm;
 	uint16_t rx_id = rxq->rx_tail;
 	uint16_t nb_rx = 0, nb_hold = 0, rx_packet_len;
+	struct rte_eth_dev *dev;
 	uint32_t rx_status;
 	uint64_t qword1;
 	uint64_t dma_addr;
@@ -818,8 +825,12 @@ i40e_recv_scattered_pkts(void *rx_queue,
 			break;
 
 		nmb = rte_mbuf_raw_alloc(rxq->mp);
-		if (unlikely(!nmb))
+		if (unlikely(!nmb)) {
+			dev = I40E_VSI_TO_ETH_DEV(rxq->vsi);
+			dev->data->rx_mbuf_alloc_failed++;
 			break;
+		}
+
 		rxd = *rxdp;
 		nb_hold++;
 		rxe = &sw_ring[rx_id];
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'net/bonding: fix updating slave link status' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (5 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/i40e: fix mbuf alloc failed counter' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/virtio: fix MSI-X for modern devices' " Yuanhan Liu
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Wei Wang; +Cc: Yuanhan Liu, Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From deaec9d3464ff455161235d59201c309d76f3371 Mon Sep 17 00:00:00 2001
From: Wei Wang <lnykww@gmail.com>
Date: Tue, 25 Apr 2017 14:30:49 +0800
Subject: [PATCH] net/bonding: fix updating slave link status

[ upstream commit 210903803f6e0c31f398b26fe337eb5a729ca72b ]

We need to update dev->data->dev_link before handling LSC event.
Otherwise it will still have the initial value after the startup of
the program before interrupt callback was executed.

Fixes: 414b202343ce ("bonding: fix initial link status of slave")

Signed-off-by: Wei Wang <lnykww@gmail.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 08ef181..aa71e3f 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1430,9 +1430,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
 	}
 
 	/* If lsc interrupt is set, check initial slave's link status */
-	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
+	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
+		slave_eth_dev->dev_ops->link_update(slave_eth_dev, 0);
 		bond_ethdev_lsc_event_callback(slave_eth_dev->data->port_id,
 			RTE_ETH_EVENT_INTR_LSC, &bonded_eth_dev->data->port_id);
+	}
 
 	return 0;
 }
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'net/virtio: fix MSI-X for modern devices' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (6 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/bonding: fix updating slave link status' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/virtio: fix link status always down' " Yuanhan Liu
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Jianfeng Tan; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 23275b326c9ea9b1044125b9469f1dc19c4f7c36 Mon Sep 17 00:00:00 2001
From: Jianfeng Tan <jianfeng.tan@intel.com>
Date: Thu, 27 Apr 2017 07:35:36 +0000
Subject: [PATCH] net/virtio: fix MSI-X for modern devices

[ upstream commit 554b6d3ef90d2c65a11523e72d768945baeebd41 ]

The field, use_msix, in struct virtio_hw is not updated for modern
device, and is always zero. And now we depend on the status feature
and MSI-X to report LSC support (which is also not a correct
behavior). As a result, LSC is always disabled for modern devices.

To fix this, we just recognize MSI-X capability when going through
capability list, and update the info in virtio.

Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 drivers/net/virtio/virtio_pci.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index f49a123..f6d697f 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -48,6 +48,7 @@
  */
 #define PCI_CAPABILITY_LIST	0x34
 #define PCI_CAP_ID_VNDR		0x09
+#define PCI_CAP_ID_MSIX		0x11
 
 /*
  * The remaining space is defined by each driver as the per-driver
@@ -670,6 +671,9 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
 			break;
 		}
 
+		if (cap.cap_vndr == PCI_CAP_ID_MSIX)
+			hw->use_msix = 1;
+
 		if (cap.cap_vndr != PCI_CAP_ID_VNDR) {
 			PMD_INIT_LOG(DEBUG,
 				"[%2x] skipping non VNDR cap id: %02x",
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'net/virtio: fix link status always down' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (7 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/virtio: fix MSI-X for modern devices' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/virtio: fix crash when closing twice' " Yuanhan Liu
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Jianfeng Tan; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 93a0820c7d7a3864da073d3fe49cf8b4cf8ee3bb Mon Sep 17 00:00:00 2001
From: Jianfeng Tan <jianfeng.tan@intel.com>
Date: Thu, 27 Apr 2017 07:35:39 +0000
Subject: [PATCH] net/virtio: fix link status always down

[ upstream commit 58d9fe4000ee918b1d7f0260191349dd2f13ef02 ]

The virtio port link status will always be DOWN:

The commit aa9f06061765 ("net/virtio: fix link status always being up")
introduces a flag to help checking the status. If this flag is not set,
status will be always down. However, in dev start, this flag is set
after link status update, then we miss the chance to change the status
to UP in dev start.

To fix this bug, we simply move the link status update after the flag
setting so that the status can be correctly updated.

Fixes: aa9f06061765 ("net/virtio: fix link status always being up")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index d2256f7..d430093 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1550,9 +1550,6 @@ virtio_dev_start(struct rte_eth_dev *dev)
 		}
 	}
 
-	/* Initialize Link state */
-	virtio_dev_link_update(dev, 0);
-
 	/*Notify the backend
 	 *Otherwise the tap backend might already stop its queue due to fullness.
 	 *vhost backend will have no chance to be waked up
@@ -1581,8 +1578,12 @@ virtio_dev_start(struct rte_eth_dev *dev)
 		txvq = dev->data->tx_queues[i];
 		VIRTQUEUE_DUMP(txvq->vq);
 	}
+
 	hw->started = 1;
 
+	/* Initialize Link state */
+	virtio_dev_link_update(dev, 0);
+
 	return 0;
 }
 
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'net/virtio: fix crash when closing twice' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (8 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/virtio: fix link status always down' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'crypto/openssl: fix AAD capabilities for AES-GCM' " Yuanhan Liu
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Huanle Han; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 807a533c3bcb5087c09591d85f7d4833a476f4fd Mon Sep 17 00:00:00 2001
From: Huanle Han <hanxueluo@gmail.com>
Date: Mon, 20 Feb 2017 22:04:46 +0800
Subject: [PATCH] net/virtio: fix crash when closing twice

[ upstream commit 0e78cfddc0851a0a12da0257758fe011ec507495 ]

This commit fixs segment fault when rte_eth_dev_close() is called on
a virtio dev more than once.  Assigning zero after free to avoids
freed memory to be accessed again.

Fixes: 69c80d4ef89b ("net/virtio: allocate queue at init stage")

Signed-off-by: Huanle Han <hanxueluo@gmail.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 5 +++++
 lib/librte_ether/rte_ethdev.c      | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index d430093..452ad2a 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -545,6 +545,9 @@ virtio_free_queues(struct virtio_hw *hw)
 	int queue_type;
 	uint16_t i;
 
+	if (hw->vqs == NULL)
+		return;
+
 	for (i = 0; i < nr_vq; i++) {
 		vq = hw->vqs[i];
 		if (!vq)
@@ -563,9 +566,11 @@ virtio_free_queues(struct virtio_hw *hw)
 		}
 
 		rte_free(vq);
+		hw->vqs[i] = NULL;
 	}
 
 	rte_free(hw->vqs);
+	hw->vqs = NULL;
 }
 
 static int
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 5a31759..ea54525 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -1051,8 +1051,10 @@ rte_eth_dev_close(uint8_t port_id)
 	dev->data->dev_started = 0;
 	(*dev->dev_ops->dev_close)(dev);
 
+	dev->data->nb_rx_queues = 0;
 	rte_free(dev->data->rx_queues);
 	dev->data->rx_queues = NULL;
+	dev->data->nb_tx_queues = 0;
 	rte_free(dev->data->tx_queues);
 	dev->data->tx_queues = NULL;
 }
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'crypto/openssl: fix AAD capabilities for AES-GCM' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (9 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/virtio: fix crash when closing twice' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'crypto/openssl: fix AES-GCM capability' " Yuanhan Liu
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Yuanhan Liu, Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 1c7c94d88cb27632552affbac9c8f3a0a354c115 Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Tue, 25 Apr 2017 15:40:48 +0100
Subject: [PATCH] crypto/openssl: fix AAD capabilities for AES-GCM

[ upstream commit 0625598a11414c65c8f280df19b81d5e23fe46ae ]

Fix aad capabilities for AES-GCM authtentication, aad is changed from
range 8-12 to 0-65535

Fixes: 8a9867a635c0 ("crypto/openssl: rename libcrypto to openssl")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/openssl/rte_openssl_pmd_ops.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 875550c..8ab384e 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -350,9 +350,9 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
 					.increment = 0
 				},
 				.aad_size = {
-					.min = 8,
-					.max = 12,
-					.increment = 4
+					.min = 0,
+					.max = 65535,
+					.increment = 1
 				}
 			}, }
 		}, }
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'crypto/openssl: fix AES-GCM capability' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (10 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'crypto/openssl: fix AAD capabilities for AES-GCM' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix packets array index' " Yuanhan Liu
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 329d7b82b0f4bfef763ea7f07e70c26deb49cd60 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 26 Apr 2017 14:33:03 +0100
Subject: [PATCH] crypto/openssl: fix AES-GCM capability

[ upstream commit ca79b7f332760fbebca892534e7de62e69a12eb7 ]

Crypto OpenSSL PMD supports 16, 24 and 32 byte keys,
for AES GCM.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/openssl/rte_openssl_pmd_ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 8ab384e..139fed1 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -366,8 +366,8 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
 				.block_size = 16,
 				.key_size = {
 					.min = 16,
-					.max = 16,
-					.increment = 0
+					.max = 32,
+					.increment = 8
 				},
 				.iv_size = {
 					.min = 12,
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'examples/l2fwd-crypto: fix packets array index' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (11 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'crypto/openssl: fix AES-GCM capability' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'crypto/qat: fix dequeue statistics' " Yuanhan Liu
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From bf42bd5ff96fe1dd20d98b6bce1a415a94257619 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 25 Apr 2017 16:32:36 +0100
Subject: [PATCH] examples/l2fwd-crypto: fix packets array index

[ upstream commit d7acf6ba43b43dde40d13681738c6940049555cb ]

Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op oriented")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 77a5fe1..24d7b1e 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -815,7 +815,7 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options)
 						ops_burst, nb_rx) !=
 								nb_rx) {
 					for (j = 0; j < nb_rx; j++)
-						rte_pktmbuf_free(pkts_burst[i]);
+						rte_pktmbuf_free(pkts_burst[j]);
 
 					nb_rx = 0;
 				}
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'crypto/qat: fix dequeue statistics' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (12 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix packets array index' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'cryptodev: fix API digest length comments' " Yuanhan Liu
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Gage Eads; +Cc: Yuanhan Liu, Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 800c77c2d316be9b382616800fd9204cdff307e3 Mon Sep 17 00:00:00 2001
From: Gage Eads <gage.eads@intel.com>
Date: Thu, 27 Apr 2017 10:31:17 -0500
Subject: [PATCH] crypto/qat: fix dequeue statistics

[ upstream commit 54402696f420b23a3521a53ddae28a1364cac084 ]

The QAT device's dequeued_count and dequeue_err_count stats were
incorrectly assigned the enqueued_count and enqueue_err_count values,
respectively.

Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 drivers/crypto/qat/qat_crypto.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index abffa90..0fe0b23 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -1296,9 +1296,9 @@ void qat_crypto_sym_stats_get(struct rte_cryptodev *dev,
 		}
 
 		stats->enqueued_count += qp[i]->stats.enqueued_count;
-		stats->dequeued_count += qp[i]->stats.enqueued_count;
+		stats->dequeued_count += qp[i]->stats.dequeued_count;
 		stats->enqueue_err_count += qp[i]->stats.enqueue_err_count;
-		stats->dequeue_err_count += qp[i]->stats.enqueue_err_count;
+		stats->dequeue_err_count += qp[i]->stats.dequeue_err_count;
 	}
 }
 
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'cryptodev: fix API digest length comments' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (13 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'crypto/qat: fix dequeue statistics' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'app/testpmd: fix crash at mbuf pool creation' " Yuanhan Liu
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Fiona Trahe; +Cc: Yuanhan Liu, Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 7daa029bfac280d99ca99b73f984e12b0bf97b13 Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe@intel.com>
Date: Tue, 25 Apr 2017 17:56:31 +0100
Subject: [PATCH] cryptodev: fix API digest length comments

[ upstream commit daf3c9152f54efa25244fc1f199c4fe8dc0ea999 ]

Fix misleading comments clarifying setting of digest length.

Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices")

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
 lib/librte_cryptodev/rte_crypto_sym.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
index d3d38e4..8f81d25 100644
--- a/lib/librte_cryptodev/rte_crypto_sym.h
+++ b/lib/librte_cryptodev/rte_crypto_sym.h
@@ -276,11 +276,10 @@ struct rte_crypto_auth_xform {
 	 * this specifies the length of the digest to be compared for the
 	 * session.
 	 *
+	 * It is the caller's responsibility to ensure that the
+	 * digest length is compliant with the hash algorithm being used.
 	 * If the value is less than the maximum length allowed by the hash,
-	 * the result shall be truncated.  If the value is greater than the
-	 * maximum length allowed by the hash then an error will be generated
-	 * by *rte_cryptodev_sym_session_create* or by the
-	 * *rte_cryptodev_sym_enqueue_burst* if using session-less APIs.
+	 * the result shall be truncated.
 	 */
 
 	uint32_t add_auth_data_length;
@@ -571,7 +570,9 @@ struct rte_crypto_sym_op {
 			phys_addr_t phys_addr;
 			/**< Physical address of digest */
 			uint16_t length;
-			/**< Length of digest */
+			/**< Length of digest. This must be the same value as
+			 * @ref rte_crypto_auth_xform.digest_length.
+			 */
 		} digest; /**< Digest parameters */
 
 		struct {
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix crash at mbuf pool creation' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (14 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'cryptodev: fix API digest length comments' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'app/testpmd: fix exit without freeing resources' " Yuanhan Liu
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Yuanhan Liu, Jingjing Wu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 967fb4ff0171813a24e7bb642a41076828c581ac Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Mon, 24 Apr 2017 14:33:57 +0200
Subject: [PATCH] app/testpmd: fix crash at mbuf pool creation

[ upstream commit 3c1a5444d47c6c3e34c5c1a991c4a80835ba4f43 ]

Since
commit 999b2ee0fe45 ("app/testpmd: enable NUMA support by default"),
testpmd is started with numa enabled by default. This highlights a
floating point exception when started with --total-num-mbufs without any
port (division by 0). This bug was already triggered before this commit
if the --no-numa option was given.

This commit adds a check of the nb_ports value before doing the
division. By looking at this code, it appears that the creation of the
mbuf pool is not consistent for the number of mbufs depending on the
configuration. This is fixed in the next commit.

Fixes: b6ea6408fbc7 ("ethdev: store numa_node per device")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
 app/test-pmd/testpmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index efd7d64..5d89c86 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -572,7 +572,7 @@ init_config(void)
 		uint8_t i;
 		unsigned int nb_mbuf;
 
-		if (param_total_num_mbufs)
+		if (param_total_num_mbufs && nb_ports != 0)
 			nb_mbuf_per_pool = nb_mbuf_per_pool/nb_ports;
 
 		for (i = 0; i < max_socket; i++) {
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix exit without freeing resources' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (15 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'app/testpmd: fix crash at mbuf pool creation' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/performance-thread: fix build on FreeBSD 10.0' " Yuanhan Liu
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Jiayu Hu; +Cc: Yuanhan Liu, Jianfeng Tan, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From e8b4fadc40c4eb30f2d4c2b8d5fb7f187d606f6d Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu@intel.com>
Date: Fri, 28 Apr 2017 09:32:50 +0800
Subject: [PATCH] app/testpmd: fix exit without freeing resources

[ upstream commit 0de738cfc1489d99509640a90cb7cb0629347cb5 ]

When testpmd exits, it frees the acquired resources (e.g. stop ports).
However, when we terminate it by Ctrl-d, testpmd exits directly without
releasing the resources. In this patch, we fix this exit issue.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 app/test-pmd/testpmd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 5d89c86..f0ac7f3 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2129,6 +2129,7 @@ main(int argc, char** argv)
 			start_packet_forwarding(0);
 		}
 		prompt();
+		pmd_test_exit();
 	} else
 #endif
 	{
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'examples/performance-thread: fix build on FreeBSD 10.0' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (16 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'app/testpmd: fix exit without freeing resources' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/multi_process: fix timer update' " Yuanhan Liu
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Yuanhan Liu, Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From f39a12efab89832c0524d7d3446de1b7c3742d17 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 28 Apr 2017 11:18:15 +0100
Subject: [PATCH] examples/performance-thread: fix build on FreeBSD 10.0

[ upstream commit b7162fee8811461fb87dd9c5b843b3d1ba283e5c ]

While later releases in the FreeBSD 10 series have a CPU_COUNT macro
defined, FreeBSD 10.0 and 10.1 do not have this macro. Therefore we provide
a basic fallback implementation of the macro for platforms where it is not
defined.

Fixes: 433ba6228f9a ("examples/performance-thread: add pthread_shim app")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/performance-thread/pthread_shim/pthread_shim.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/examples/performance-thread/pthread_shim/pthread_shim.c b/examples/performance-thread/pthread_shim/pthread_shim.c
index 0d6100c..e8e5ec5 100644
--- a/examples/performance-thread/pthread_shim/pthread_shim.c
+++ b/examples/performance-thread/pthread_shim/pthread_shim.c
@@ -48,6 +48,21 @@
 
 #define POSIX_ERRNO(x)  (x)
 
+/* some releases of FreeBSD 10, e.g. 10.0, don't have CPU_COUNT macro */
+#ifndef CPU_COUNT
+#define CPU_COUNT(x) __cpu_count(x)
+
+static inline unsigned int
+__cpu_count(const rte_cpuset_t *cpuset)
+{
+	unsigned int i, count = 0;
+	for (i = 0; i < RTE_MAX_LCORE; i++)
+		if (CPU_ISSET(i, cpuset))
+			count++;
+	return count;
+}
+#endif
+
 /*
  * this flag determines at run time if we override pthread
  * calls and map then to equivalent lthread calls
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'examples/multi_process: fix timer update' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (17 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/performance-thread: fix build on FreeBSD 10.0' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/l3fwd-power: fix handling no Rx queue' " Yuanhan Liu
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Zhiyong Yang; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From c3a972116bc9a2760c417acc5922bf20507f8db1 Mon Sep 17 00:00:00 2001
From: Zhiyong Yang <zhiyong.yang@intel.com>
Date: Thu, 23 Feb 2017 10:00:58 +0800
Subject: [PATCH] examples/multi_process: fix timer update

[ upstream commit ab69581b74232b9e5cffd104672b0afb7096163a ]

To miss updating the variable prev_tsc in function l2fwd_main_loop()
The patch fixes it.

Fixes: e2366e74e029 ("examples: use buffered Tx")

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
 examples/multi_process/l2fwd_fork/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c
index 2d951d9..6052c84 100644
--- a/examples/multi_process/l2fwd_fork/main.c
+++ b/examples/multi_process/l2fwd_fork/main.c
@@ -672,6 +672,8 @@ l2fwd_main_loop(void)
 					port_statistics[portid].tx += sent;
 
 			}
+
+			prev_tsc = cur_tsc;
 		}
 
 		/*
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'examples/l3fwd-power: fix handling no Rx queue' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (18 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/multi_process: fix timer update' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/l3fwd-power: fix Rx descriptor size' " Yuanhan Liu
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From f201b083c0d5f3ecc6be365772d1cfdcb74f4b34 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Fri, 28 Apr 2017 18:47:44 +0800
Subject: [PATCH] examples/l3fwd-power: fix handling no Rx queue

[ upstream commit ddc554ad284eed63d6333c28d06b6b0b8e8e75d3 ]

If the number of rx queues is zero, it is meaningless to enable
rx interrupt. This patch fixes it.

Fixes: aee3bc79cc34 ("examples/l3fwd-power: enable one-shot Rx interrupt and polling switch")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 examples/l3fwd-power/main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index b65d683..f9a8c52 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1545,6 +1545,7 @@ main(int argc, char **argv)
 	uint32_t n_tx_queue, nb_lcores;
 	uint32_t dev_rxq_num, dev_txq_num;
 	uint8_t portid, nb_rx_queue, queue, socketid;
+	uint16_t org_rxq_intr = port_conf.intr_conf.rxq;
 
 	/* catch SIGINT and restore cpufreq governor to ondemand */
 	signal(SIGINT, signal_exit_now);
@@ -1605,8 +1606,13 @@ main(int argc, char **argv)
 			n_tx_queue = dev_txq_num;
 		printf("Creating queues: nb_rxq=%d nb_txq=%u... ",
 			nb_rx_queue, (unsigned)n_tx_queue );
+		/* If number of Rx queue is 0, no need to enable Rx interrupt */
+		if (nb_rx_queue == 0)
+			port_conf.intr_conf.rxq = 0;
 		ret = rte_eth_dev_configure(portid, nb_rx_queue,
 					(uint16_t)n_tx_queue, &port_conf);
+		/* Revert to original value */
+		port_conf.intr_conf.rxq = org_rxq_intr;
 		if (ret < 0)
 			rte_exit(EXIT_FAILURE, "Cannot configure device: "
 					"err=%d, port=%d\n", ret, portid);
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'examples/l3fwd-power: fix Rx descriptor size' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (19 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/l3fwd-power: fix handling no Rx queue' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/load_balancer: fix Tx flush' " Yuanhan Liu
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Yuanhan Liu, Lei Yao, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From c71be06310edd9b7e54a986c62ea4701da648077 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 26 Apr 2017 12:29:52 +0100
Subject: [PATCH] examples/l3fwd-power: fix Rx descriptor size

[ upstream commit 4175729d012914e1c10e5f54e5a59169be020124 ]

L3fwd power app monitors the RX queues to see if the polling frequency
should be adjusted (the busier the queue, the higher the frequency).
The app uses several thresholds in the ring to determine the frequency,
being 96 the highest one, when frequency should be highest.

The problem is that the difference between this value and the ring size
is not big enough (128 - 96 = 32 descriptors), which means that
if the descriptors are not replenished quick enough, queue might
not be busy, but the app would think that it is, because 96th descriptor
is set.

Therefore, by increasing this gap (increasing the RX ring size),
we make sure that this false measurement will not happen.

Fixes: b451aa39db31 ("examples/l3fwd-power: use DD bit rather than RX queue count")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
---
 examples/l3fwd-power/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index f9a8c52..920a9fc 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -147,7 +147,7 @@
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 128
+#define RTE_TEST_RX_DESC_DEFAULT 512
 #define RTE_TEST_TX_DESC_DEFAULT 512
 static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
 static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'examples/load_balancer: fix Tx flush' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (20 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/l3fwd-power: fix Rx descriptor size' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/thunderx: fix deadlock in Rx path' " Yuanhan Liu
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Andriy Berestovskyy; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 82803d1d77f5e3c68f99130e4ebde7d2302bdb55 Mon Sep 17 00:00:00 2001
From: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
Date: Thu, 27 Apr 2017 11:27:54 +0200
Subject: [PATCH] examples/load_balancer: fix Tx flush

[ upstream commit 509f35d4c48434ec5a4a8b60342bf633eea69062 ]

Port ID is not an index from 0 to n_nic_ports, but rather a value
of nic_ports array.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
---
 examples/load_balancer/runtime.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/load_balancer/runtime.c b/examples/load_balancer/runtime.c
index 6944325..ed63fc9 100644
--- a/examples/load_balancer/runtime.c
+++ b/examples/load_balancer/runtime.c
@@ -418,10 +418,12 @@ static inline void
 app_lcore_io_tx_flush(struct app_lcore_params_io *lp)
 {
 	uint8_t port;
+	uint32_t i;
 
-	for (port = 0; port < lp->tx.n_nic_ports; port ++) {
+	for (i = 0; i < lp->tx.n_nic_ports; i++) {
 		uint32_t n_pkts;
 
+		port = lp->tx.nic_ports[i];
 		if (likely((lp->tx.mbuf_out_flush[port] == 0) ||
 		           (lp->tx.mbuf_out[port].n_mbufs == 0))) {
 			lp->tx.mbuf_out_flush[port] = 1;
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'net/thunderx: fix deadlock in Rx path' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (21 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/load_balancer: fix Tx flush' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'doc: add limitation of AAD size to QAT guide' " Yuanhan Liu
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From dbcd67e3b000adcece8aa962cd85c5a4b3514585 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Tue, 2 May 2017 00:11:55 +0530
Subject: [PATCH] net/thunderx: fix deadlock in Rx path

[ upstream commit b31eb105463fa1844c19fde382dd6bd294329831 ]

RBDR buffers are refilled when SW consumes the buffers from CQ.
This creates deadlock case when CQ buffers exhausted due to lack
of RBDR buffers. Fix is to refill the RBDR when rx_free_thresh
meet, irrespective of the number of CQ buffers consumed.

Fixes: e2d7fc9f0a24 ("net/thunderx: add single and multi-segment Rx")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/net/thunderx/nicvf_rxtx.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c
index fc43b74..87e9de1 100644
--- a/drivers/net/thunderx/nicvf_rxtx.c
+++ b/drivers/net/thunderx/nicvf_rxtx.c
@@ -469,11 +469,10 @@ nicvf_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		rxq->head = cqe_head;
 		nicvf_addr_write(rxq->cq_door, to_process);
 		rxq->recv_buffers += to_process;
-		if (rxq->recv_buffers > rxq->rx_free_thresh) {
-			rxq->recv_buffers -= nicvf_fill_rbdr(rxq,
-						rxq->rx_free_thresh);
-			NICVF_RX_ASSERT(rxq->recv_buffers >= 0);
-		}
+	}
+	if (rxq->recv_buffers > rxq->rx_free_thresh) {
+		rxq->recv_buffers -= nicvf_fill_rbdr(rxq, rxq->rx_free_thresh);
+		NICVF_RX_ASSERT(rxq->recv_buffers >= 0);
 	}
 
 	return to_process;
@@ -563,11 +562,10 @@ nicvf_recv_pkts_multiseg(void *rx_queue, struct rte_mbuf **rx_pkts,
 		rxq->head = cqe_head;
 		nicvf_addr_write(rxq->cq_door, to_process);
 		rxq->recv_buffers += buffers_consumed;
-		if (rxq->recv_buffers > rxq->rx_free_thresh) {
-			rxq->recv_buffers -=
-				nicvf_fill_rbdr(rxq, rxq->rx_free_thresh);
-			NICVF_RX_ASSERT(rxq->recv_buffers >= 0);
-		}
+	}
+	if (rxq->recv_buffers > rxq->rx_free_thresh) {
+		rxq->recv_buffers -= nicvf_fill_rbdr(rxq, rxq->rx_free_thresh);
+		NICVF_RX_ASSERT(rxq->recv_buffers >= 0);
 	}
 
 	return to_process;
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'doc: add limitation of AAD size to QAT guide' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (22 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/thunderx: fix deadlock in Rx path' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede: fix FW version string for VF' " Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/performance-thread: fix build on FreeBSD' " Yuanhan Liu
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Yuanhan Liu, Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 525842197f7621f108b85c93c0db8efee53c67d7 Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Tue, 25 Apr 2017 15:39:36 +0100
Subject: [PATCH] doc: add limitation of AAD size to QAT guide

[ backported from upstream commit d4f44265a1d74d270da2a6deaec8938b2f1b49d4 ]

Add limitation of additional authenticated data (AAD) in
Intel QuickAssist Technology driver rst file

Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 doc/guides/cryptodevs/qat.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
index 52a9ae3..a7b28eb 100644
--- a/doc/guides/cryptodevs/qat.rst
+++ b/doc/guides/cryptodevs/qat.rst
@@ -80,6 +80,7 @@ Limitations
 * SNOW 3G (UEA2) and KASUMI (F8) supported only if cipher length, cipher offset fields are byte-aligned.
 * SNOW 3G (UIA2) and KASUMI (F9) supported only if hash length, hash offset fields are byte-aligned.
 * No BSD support as BSD QAT kernel driver not available.
+* Maximum additional authenticated data (AAD) for GCM is 240 bytes long.
 
 
 Installation
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'net/qede: fix FW version string for VF' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (23 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'doc: add limitation of AAD size to QAT guide' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  2017-05-02  9:32 ` [dpdk-stable] patch 'examples/performance-thread: fix build on FreeBSD' " Yuanhan Liu
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 6b99b9ca627950ec3e27152f878de729a80d12ee Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Tue, 25 Apr 2017 00:28:42 -0700
Subject: [PATCH] net/qede: fix FW version string for VF

[ upstream commit 738f56d41ab56285187eafc5f10b3047c5ded06f ]

In SRIOV testing, print adapter info shows firmware version used by PF,
this patch provides fix to populate correct firmware version used by VF.

Fixes: 86a2265e59d7 ("qede: add SRIOV support")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/qede_main.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index b666e1c..a6d8ef4 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -345,11 +345,12 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info)
 	rte_memcpy(&dev_info->hw_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
 	       ETHER_ADDR_LEN);
 
+	dev_info->fw_major = FW_MAJOR_VERSION;
+	dev_info->fw_minor = FW_MINOR_VERSION;
+	dev_info->fw_rev = FW_REVISION_VERSION;
+	dev_info->fw_eng = FW_ENGINEERING_VERSION;
+
 	if (IS_PF(edev)) {
-		dev_info->fw_major = FW_MAJOR_VERSION;
-		dev_info->fw_minor = FW_MINOR_VERSION;
-		dev_info->fw_rev = FW_REVISION_VERSION;
-		dev_info->fw_eng = FW_ENGINEERING_VERSION;
 		dev_info->mf_mode = edev->mf_mode;
 		dev_info->tx_switching = false;
 	} else {
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [dpdk-stable] patch 'examples/performance-thread: fix build on FreeBSD' has been queued to LTS release 16.11.2
  2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
                   ` (24 preceding siblings ...)
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede: fix FW version string for VF' " Yuanhan Liu
@ 2017-05-02  9:32 ` Yuanhan Liu
  25 siblings, 0 replies; 29+ messages in thread
From: Yuanhan Liu @ 2017-05-02  9:32 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From 963719060979ddcd067d7aabaf532577ea8199f1 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 21 Apr 2017 14:50:23 +0100
Subject: [PATCH] examples/performance-thread: fix build on FreeBSD

[ backported from upstream commit 4cde45f36fb4e46139400a7a00c923656c99a3d8 ]

This set of sample apps did not compile on FreeBSD due to use of a number
of Linux/glibc-specific APIs, or APIs which existed in different headers
on FreeBSD. Specifically, the following APIs has problems:
  * sched_getcpu() is a glibc extension, so use rte_lcore_id() on BSD
  * pthread_yield() returns int on Linux, but void on FreeBSD, so
    we have to create two slightly different copies of the function.
  * the type for managing cpu sets is cpuset_t on FreeBSD rather than
    cpu_set_t as on Linux, so use rte_cpuset_t from rte_lcore.h.
  * APIs for managing cpu affinity are in pthread_np.h on FreeBSD, rather
    than in pthread.h, also fixed by including rte_lcore.h

Fixes: 433ba6228f9a ("examples/performance-thread: add pthread_shim app")
Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/performance-thread/l3fwd-thread/main.c    |  4 ++++
 examples/performance-thread/pthread_shim/main.c    |  8 ++++++--
 .../performance-thread/pthread_shim/pthread_shim.c | 23 ++++++++++++++++------
 .../performance-thread/pthread_shim/pthread_shim.h |  3 ++-
 4 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index fdc90b2..c275649 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -90,6 +90,10 @@
 #define APP_LOOKUP_METHOD             APP_LOOKUP_LPM
 #endif
 
+#ifndef __GLIBC__ /* sched_getcpu() is glibc specific */
+#define sched_getcpu() rte_lcore_id()
+#endif
+
 /*
  *  When set to zero, simple forwaring path is eanbled.
  *  When set to one, optimized forwarding path is enabled.
diff --git a/examples/performance-thread/pthread_shim/main.c b/examples/performance-thread/pthread_shim/main.c
index f035721..850b009 100644
--- a/examples/performance-thread/pthread_shim/main.c
+++ b/examples/performance-thread/pthread_shim/main.c
@@ -59,6 +59,10 @@
 #define DEBUG_APP 0
 #define HELLOW_WORLD_MAX_LTHREADS 10
 
+#ifndef __GLIBC__ /* sched_getcpu() is glibc-specific */
+#define sched_getcpu() rte_lcore_id()
+#endif
+
 __thread int print_count;
 __thread pthread_mutex_t print_lock;
 
@@ -175,12 +179,12 @@ static void initial_lthread(void *args __attribute__((unused)))
 		 * use an attribute to pass the desired lcore
 		 */
 		pthread_attr_t attr;
-		cpu_set_t cpuset;
+		rte_cpuset_t cpuset;
 
 		CPU_ZERO(&cpuset);
 		CPU_SET(lcore, &cpuset);
 		pthread_attr_init(&attr);
-		pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpuset);
+		pthread_attr_setaffinity_np(&attr, sizeof(rte_cpuset_t), &cpuset);
 
 		/* create the thread */
 		pthread_create(&tid[i], &attr, helloworld_pthread, (void *) i);
diff --git a/examples/performance-thread/pthread_shim/pthread_shim.c b/examples/performance-thread/pthread_shim/pthread_shim.c
index e8e5ec5..113bafa 100644
--- a/examples/performance-thread/pthread_shim/pthread_shim.c
+++ b/examples/performance-thread/pthread_shim/pthread_shim.c
@@ -174,7 +174,7 @@ int (*f_pthread_setschedparam)
 int (*f_pthread_yield)
 	(void);
 int (*f_pthread_setaffinity_np)
-	(pthread_t thread, size_t cpusetsize, const cpu_set_t *cpuset);
+	(pthread_t thread, size_t cpusetsize, const rte_cpuset_t *cpuset);
 int (*f_nanosleep)
 	(const struct timespec *req, struct timespec *rem);
 } _sys_pthread_funcs = {
@@ -405,11 +405,11 @@ pthread_create(pthread_t *__restrict tid,
 
 		if (attr != NULL) {
 			/* determine CPU being requested */
-			cpu_set_t cpuset;
+			rte_cpuset_t cpuset;
 
 			CPU_ZERO(&cpuset);
 			pthread_attr_getaffinity_np(attr,
-						sizeof(cpu_set_t),
+						sizeof(rte_cpuset_t),
 						&cpuset);
 
 			if (CPU_COUNT(&cpuset) != 1)
@@ -591,15 +591,26 @@ int pthread_rwlock_wrlock(pthread_rwlock_t *a)
 	return _sys_pthread_funcs.f_pthread_rwlock_wrlock(a);
 }
 
-int pthread_yield(void)
+#ifdef RTE_EXEC_ENV_LINUXAPP
+int
+pthread_yield(void)
 {
 	if (override) {
 		lthread_yield();
 		return 0;
 	}
 	return _sys_pthread_funcs.f_pthread_yield();
-
 }
+#else
+void
+pthread_yield(void)
+{
+	if (override)
+		lthread_yield();
+	else
+		_sys_pthread_funcs.f_pthread_yield();
+}
+#endif
 
 pthread_t pthread_self(void)
 {
@@ -701,7 +712,7 @@ int nanosleep(const struct timespec *req, struct timespec *rem)
 
 int
 pthread_setaffinity_np(pthread_t thread, size_t cpusetsize,
-		       const cpu_set_t *cpuset)
+		       const rte_cpuset_t *cpuset)
 {
 	if (override) {
 		/* we only allow affinity with a single CPU */
diff --git a/examples/performance-thread/pthread_shim/pthread_shim.h b/examples/performance-thread/pthread_shim/pthread_shim.h
index 78bbb5a..10f8789 100644
--- a/examples/performance-thread/pthread_shim/pthread_shim.h
+++ b/examples/performance-thread/pthread_shim/pthread_shim.h
@@ -33,7 +33,8 @@
 
 #ifndef _PTHREAD_SHIM_H_
 #define _PTHREAD_SHIM_H_
-#include <pthread.h>
+
+#include <rte_lcore.h>
 
 /*
  * This pthread shim is an example that demonstrates how legacy code
-- 
1.9.0

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [dpdk-stable] patch 'net/qede: fix fastpath rings reset phase' has been queued to LTS release 16.11.2
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede: fix fastpath rings reset phase' " Yuanhan Liu
@ 2017-05-06 15:06   ` Patil, Harish
  0 siblings, 0 replies; 29+ messages in thread
From: Patil, Harish @ 2017-05-06 15:06 UTC (permalink / raw)
  To: Yuanhan Liu; +Cc: dpdk stable

>

>Hi,
>
>FYI, your patch has been queued to LTS release 16.11.2
>
>Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable
>yet. It will be pushed if I get no objections before 05/07/17.
>So please shout if anyone has objections.
>
>Thanks.
>
>	--yliu
>
>---
>From e705b5d8a5dd0e9acfacdfe43df357964e230905 Mon Sep 17 00:00:00 2001
>From: Harish Patil <harish.patil@cavium.com>
>Date: Tue, 25 Apr 2017 00:28:37 -0700
>Subject: [PATCH] net/qede: fix fastpath rings reset phase
>
>[ upstream commit b3fb8c5ea03518be598f3aafa87c51df66702a6a ]
>
>Perform reset of the fastpath RX/TX rings after stopping device port and
>not while starting the ports.
>
>Fixes: cfe28a988565 ("net/qede: support unequal number of Rx/Tx queues")
>
>Signed-off-by: Harish Patil <harish.patil@cavium.com>
>---
> drivers/net/qede/qede_rxtx.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
>diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
>index a34b665..9cce13d 100644
>--- a/drivers/net/qede/qede_rxtx.c
>+++ b/drivers/net/qede/qede_rxtx.c
>@@ -1318,10 +1318,6 @@ int qede_dev_start(struct rte_eth_dev *eth_dev)
> 	/* Bring-up the link */
> 	qede_dev_set_link_state(eth_dev, true);
> 
>-	/* Reset ring */
>-	if (qede_reset_fp_rings(qdev))
>-		return -ENOMEM;
>-
> 	/* Start/resume traffic */
> 	qdev->ops->fastpath_start(edev);
> 
>@@ -1490,6 +1486,7 @@ int qede_reset_fp_rings(struct qede_dev *qdev)
> 			}
> 		}
> 	}
>+	qede_reset_fp_rings(qdev);
> 
> 	return 0;
> }
>-- 
>1.9.0
>
>

Hi Yuanhan,
Sure, there are no objections to push  it to dpdk-stable.
Thanks


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [dpdk-stable] patch 'net/qede: fix default MAC address handling' has been queued to LTS release 16.11.2
  2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede: fix default MAC address handling' " Yuanhan Liu
@ 2017-05-06 15:07   ` Patil, Harish
  0 siblings, 0 replies; 29+ messages in thread
From: Patil, Harish @ 2017-05-06 15:07 UTC (permalink / raw)
  To: Yuanhan Liu; +Cc: dpdk stable

>

>Hi,
>
>FYI, your patch has been queued to LTS release 16.11.2
>
>Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable
>yet. It will be pushed if I get no objections before 05/07/17.
>So please shout if anyone has objections.
>
>Thanks.
>
>	--yliu
>
>---
>From 9d5824d3cbf8eb610c37bb969bd7b1f24942017e Mon Sep 17 00:00:00 2001
>From: Harish Patil <harish.patil@cavium.com>
>Date: Tue, 25 Apr 2017 00:28:36 -0700
>Subject: [PATCH] net/qede: fix default MAC address handling
>
>[ upstream commit 49d8b54e867982d0ee55d0706d9b7cec73492542 ]
>
>- In qede_mac_addr_set(), in order to configure default MAC address we
>first delete the existing MAC address before trying to add new one. During
>init time, there is no MAC filter to begin with, so trying to remove a
>non-existing MAC address causes a firmware exception. This can be
>prevented
>by internally calling qede_mac_addr_add() which has the checks in place to
>delete a MAC address only if it was added before.
>
>- Remove setting of the default MAC address from within
>qede_dev_configure() since rte_eth_dev_start() calls mac_addr_set()
>anyway.
>
>Fixes: 2ea6f76aff40 ("qede: add core driver")
>
>Signed-off-by: Harish Patil <harish.patil@cavium.com>
>---
> drivers/net/qede/qede_ethdev.c | 30 +-----------------------------
> 1 file changed, 1 insertion(+), 29 deletions(-)
>
>diff --git a/drivers/net/qede/qede_ethdev.c
>b/drivers/net/qede/qede_ethdev.c
>index debf7bf..2322147 100644
>--- a/drivers/net/qede/qede_ethdev.c
>+++ b/drivers/net/qede/qede_ethdev.c
>@@ -433,8 +433,6 @@ qede_mac_addr_set(struct rte_eth_dev *eth_dev, struct
>ether_addr *mac_addr)
> {
> 	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
> 	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
>-	struct ecore_filter_ucast ucast;
>-	int rc;
> 
> 	if (IS_VF(edev) && !ecore_vf_check_mac(ECORE_LEADING_HWFN(edev),
> 					       mac_addr->addr_bytes)) {
>@@ -444,29 +442,7 @@ qede_mac_addr_set(struct rte_eth_dev *eth_dev,
>struct ether_addr *mac_addr)
> 		return;
> 	}
> 
>-	/* First remove the primary mac */
>-	qede_set_ucast_cmn_params(&ucast);
>-	ucast.opcode = ECORE_FILTER_REMOVE;
>-	ucast.type = ECORE_FILTER_MAC;
>-	ether_addr_copy(&qdev->primary_mac,
>-			(struct ether_addr *)&ucast.mac);
>-	rc = ecore_filter_ucast_cmd(edev, &ucast, ECORE_SPQ_MODE_CB, NULL);
>-	if (rc != 0) {
>-		DP_ERR(edev, "Unable to remove current macaddr"
>-			     " Reverting to previous default mac\n");
>-		ether_addr_copy(&qdev->primary_mac,
>-				&eth_dev->data->mac_addrs[0]);
>-		return;
>-	}
>-
>-	/* Add new MAC */
>-	ucast.opcode = ECORE_FILTER_ADD;
>-	ether_addr_copy(mac_addr, (struct ether_addr *)&ucast.mac);
>-	rc = ecore_filter_ucast_cmd(edev, &ucast, ECORE_SPQ_MODE_CB, NULL);
>-	if (rc != 0)
>-		DP_ERR(edev, "Unable to add new default mac\n");
>-	else
>-		ether_addr_copy(mac_addr, &qdev->primary_mac);
>+	qede_mac_addr_add(eth_dev, mac_addr, 0, 0);
> }
> 
> static void qede_config_accept_any_vlan(struct qede_dev *qdev, bool
>action)
>@@ -741,10 +717,6 @@ static int qede_dev_configure(struct rte_eth_dev
>*eth_dev)
> 
> 	SLIST_INIT(&qdev->vlan_list_head);
> 
>-	/* Add primary mac for PF */
>-	if (IS_PF(edev))
>-		qede_mac_addr_set(eth_dev, &qdev->primary_mac);
>-
> 	/* Enable VLAN offloads by default */
> 	qede_vlan_offload_set(eth_dev, ETH_VLAN_STRIP_MASK  |
> 				       ETH_VLAN_FILTER_MASK |
>-- 
>1.9.0
>
>

Hi Yuanhan,
Sure, there are no objections to push  it to dpdk-stable.
Thanks.


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2017-05-06 15:07 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-02  9:32 [dpdk-stable] patch 'examples: fix build clean on FreeBSD' has been queued to LTS release 16.11.2 Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/performance-thread: fix compilation on Suse 11 SP2' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'mbuf: fix missing includes in exported header' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede: fix default MAC address handling' " Yuanhan Liu
2017-05-06 15:07   ` Patil, Harish
2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede: fix fastpath rings reset phase' " Yuanhan Liu
2017-05-06 15:06   ` Patil, Harish
2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede/base: fix find zero bit macro' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/i40e: fix mbuf alloc failed counter' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/bonding: fix updating slave link status' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/virtio: fix MSI-X for modern devices' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/virtio: fix link status always down' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/virtio: fix crash when closing twice' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'crypto/openssl: fix AAD capabilities for AES-GCM' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'crypto/openssl: fix AES-GCM capability' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix packets array index' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'crypto/qat: fix dequeue statistics' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'cryptodev: fix API digest length comments' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'app/testpmd: fix crash at mbuf pool creation' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'app/testpmd: fix exit without freeing resources' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/performance-thread: fix build on FreeBSD 10.0' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/multi_process: fix timer update' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/l3fwd-power: fix handling no Rx queue' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/l3fwd-power: fix Rx descriptor size' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/load_balancer: fix Tx flush' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/thunderx: fix deadlock in Rx path' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'doc: add limitation of AAD size to QAT guide' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'net/qede: fix FW version string for VF' " Yuanhan Liu
2017-05-02  9:32 ` [dpdk-stable] patch 'examples/performance-thread: fix build on FreeBSD' " Yuanhan Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).