patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1
@ 2017-01-23  7:46 Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'pci: fix check of mknod' " Yuanhan Liu
                   ` (78 more replies)
  0 siblings, 79 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Neil Horman; +Cc: Yuanhan Liu, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From d21918d85abec753de382b664117258798a71d7c Mon Sep 17 00:00:00 2001
From: Neil Horman <nhorman@tuxdriver.com>
Date: Fri, 18 Nov 2016 13:47:52 -0500
Subject: [PATCH] pmdinfogen: fix endianness with cross-compilation

[ upstream commit 112fc39b829039ee4ade210c464d26fecde7eac0 ]

pmdinfogen has a bug in which, during build, it pulls in rte_byteorder.h to
obtain the rte macros for byteswapping between the cpu byte order and big or
little endian.  Unfortunately, pmdinfogen is a tool that is only meant to be run
during the build of dpdk components, and so, it runs on the host.  In cross
compile environments however, the rte_byteorder.h is configured using a target
cpu, who's endianness may differ from that of the host, leading to improper
swapping.

The fix is to use host system defined byte swapping routines rather than the
dpdk provided routines.  Note that we are using non posix compliant routines, as
the posix compliant api only addresses 16 and 32 bit swaps, and we also need 64
bit swaps.  Those macros exist (via endian.h), but BSD and Linux put that header
in different locations so some ifdeffery is required.

Tested successfully by myself on Linux and BSD systems.

Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
---
 buildtools/pmdinfogen/pmdinfogen.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/buildtools/pmdinfogen/pmdinfogen.h b/buildtools/pmdinfogen/pmdinfogen.h
index 1da2966..e9eabff 100644
--- a/buildtools/pmdinfogen/pmdinfogen.h
+++ b/buildtools/pmdinfogen/pmdinfogen.h
@@ -16,12 +16,16 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/mman.h>
+#ifdef __linux__
+#include <endian.h>
+#else
+#include <sys/endian.h>
+#endif
 #include <fcntl.h>
 #include <unistd.h>
 #include <elf.h>
 #include <rte_config.h>
 #include <rte_pci.h>
-#include <rte_byteorder.h>
 
 /* On BSD-alike OSes elf.h defines these according to host's word size */
 #undef ELF_ST_BIND
@@ -75,9 +79,9 @@
 #define CONVERT_NATIVE(fend, width, x) ({ \
 typeof(x) ___x; \
 if ((fend) == ELFDATA2LSB) \
-	___x = rte_le_to_cpu_##width(x); \
+	___x = le##width##toh(x); \
 else \
-	___x = rte_be_to_cpu_##width(x); \
+	___x = be##width##toh(x); \
 	___x; \
 })
 
-- 
1.9.0

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

* [dpdk-stable] patch 'pci: fix check of mknod' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: check maximum number of queues for statistics' " Yuanhan Liu
                   ` (77 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Wei Dai; +Cc: Yuanhan Liu, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From d8ae6e7afb2aca0dba8a94402d0d1f030c69666f Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Thu, 17 Nov 2016 14:47:15 +0800
Subject: [PATCH] pci: fix check of mknod

[ upstream commit f1d54e6dfb1624d9c2d0a1b8a96eb4a84070b639 ]

In function pci_mknod_uio_dev() in lib/librte_eal/eal/eal_pci_uio.c,
The return value of mknod() is ret, not f got by fopen().
So the value of ret should be checked for mknod().

Fixes: f7f97c16048e ("pci: add option --create-uio-dev to run without hotplug")

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
index 1786b75..3e4ffb5 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
@@ -133,7 +133,7 @@ pci_mknod_uio_dev(const char *sysfs_uio_path, unsigned uio_num)
 	snprintf(filename, sizeof(filename), "/dev/uio%u", uio_num);
 	dev = makedev(major, minor);
 	ret = mknod(filename, S_IFCHR | S_IRUSR | S_IWUSR, dev);
-	if (f == NULL) {
+	if (ret != 0) {
 		RTE_LOG(ERR, EAL, "%s(): mknod() failed %s\n",
 			__func__, strerror(errno));
 		return -1;
-- 
1.9.0

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

* [dpdk-stable] patch 'ethdev: check maximum number of queues for statistics' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'pci: fix check of mknod' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'mempool: fix API documentation' " Yuanhan Liu
                   ` (76 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Bert van Leeuwen; +Cc: Yuanhan Liu, Alejandro Lucero, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 808e1b2ef8861187bb1e503ddeb6de6174d2bf32 Mon Sep 17 00:00:00 2001
From: Bert van Leeuwen <bert.vanleeuwen@netronome.com>
Date: Mon, 21 Nov 2016 09:59:38 +0000
Subject: [PATCH] ethdev: check maximum number of queues for statistics

[ upstream commit e0ccf3380039357274237a3123bba9fa01d3127c ]

Arrays inside rte_eth_stats have size=RTE_ETHDEV_QUEUE_STAT_CNTRS.
Some devices report more queues than that and this code blindly uses
the reported number of queues by the device to fill those arrays up.
This patch fixes the problem using MIN between the reported number of
queues and RTE_ETHDEV_QUEUE_STAT_CNTRS.

Fixes: ce757f5c9a4d ("ethdev: new method to retrieve extended statistics")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_ether/rte_ethdev.c | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index fde8112..4209ad0 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -1343,8 +1343,10 @@ get_xstats_count(uint8_t port_id)
 	} else
 		count = 0;
 	count += RTE_NB_STATS;
-	count += dev->data->nb_rx_queues * RTE_NB_RXQ_STATS;
-	count += dev->data->nb_tx_queues * RTE_NB_TXQ_STATS;
+	count += RTE_MIN(dev->data->nb_rx_queues, RTE_ETHDEV_QUEUE_STAT_CNTRS) *
+		 RTE_NB_RXQ_STATS;
+	count += RTE_MIN(dev->data->nb_tx_queues, RTE_ETHDEV_QUEUE_STAT_CNTRS) *
+		 RTE_NB_TXQ_STATS;
 	return count;
 }
 
@@ -1358,6 +1360,7 @@ rte_eth_xstats_get_names(uint8_t port_id,
 	int cnt_expected_entries;
 	int cnt_driver_entries;
 	uint32_t idx, id_queue;
+	uint16_t num_q;
 
 	cnt_expected_entries = get_xstats_count(port_id);
 	if (xstats_names == NULL || cnt_expected_entries < 0 ||
@@ -1374,7 +1377,8 @@ rte_eth_xstats_get_names(uint8_t port_id,
 			"%s", rte_stats_strings[idx].name);
 		cnt_used_entries++;
 	}
-	for (id_queue = 0; id_queue < dev->data->nb_rx_queues; id_queue++) {
+	num_q = RTE_MIN(dev->data->nb_rx_queues, RTE_ETHDEV_QUEUE_STAT_CNTRS);
+	for (id_queue = 0; id_queue < num_q; id_queue++) {
 		for (idx = 0; idx < RTE_NB_RXQ_STATS; idx++) {
 			snprintf(xstats_names[cnt_used_entries].name,
 				sizeof(xstats_names[0].name),
@@ -1384,7 +1388,8 @@ rte_eth_xstats_get_names(uint8_t port_id,
 		}
 
 	}
-	for (id_queue = 0; id_queue < dev->data->nb_tx_queues; id_queue++) {
+	num_q = RTE_MIN(dev->data->nb_tx_queues, RTE_ETHDEV_QUEUE_STAT_CNTRS);
+	for (id_queue = 0; id_queue < num_q; id_queue++) {
 		for (idx = 0; idx < RTE_NB_TXQ_STATS; idx++) {
 			snprintf(xstats_names[cnt_used_entries].name,
 				sizeof(xstats_names[0].name),
@@ -1420,14 +1425,18 @@ rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
 	unsigned count = 0, i, q;
 	signed xcount = 0;
 	uint64_t val, *stats_ptr;
+	uint16_t nb_rxqs, nb_txqs;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
 
 	dev = &rte_eth_devices[port_id];
 
+	nb_rxqs = RTE_MIN(dev->data->nb_rx_queues, RTE_ETHDEV_QUEUE_STAT_CNTRS);
+	nb_txqs = RTE_MIN(dev->data->nb_tx_queues, RTE_ETHDEV_QUEUE_STAT_CNTRS);
+
 	/* Return generic statistics */
-	count = RTE_NB_STATS + (dev->data->nb_rx_queues * RTE_NB_RXQ_STATS) +
-		(dev->data->nb_tx_queues * RTE_NB_TXQ_STATS);
+	count = RTE_NB_STATS + (nb_rxqs * RTE_NB_RXQ_STATS) +
+		(nb_txqs * RTE_NB_TXQ_STATS);
 
 	/* implemented by the driver */
 	if (dev->dev_ops->xstats_get != NULL) {
@@ -1458,7 +1467,7 @@ rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
 	}
 
 	/* per-rxq stats */
-	for (q = 0; q < dev->data->nb_rx_queues; q++) {
+	for (q = 0; q < nb_rxqs; q++) {
 		for (i = 0; i < RTE_NB_RXQ_STATS; i++) {
 			stats_ptr = RTE_PTR_ADD(&eth_stats,
 					rte_rxq_stats_strings[i].offset +
@@ -1469,7 +1478,7 @@ rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
 	}
 
 	/* per-txq stats */
-	for (q = 0; q < dev->data->nb_tx_queues; q++) {
+	for (q = 0; q < nb_txqs; q++) {
 		for (i = 0; i < RTE_NB_TXQ_STATS; i++) {
 			stats_ptr = RTE_PTR_ADD(&eth_stats,
 					rte_txq_stats_strings[i].offset +
-- 
1.9.0

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

* [dpdk-stable] patch 'mempool: fix API documentation' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'pci: fix check of mknod' " Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: check maximum number of queues for statistics' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: fix port lookup if none' " Yuanhan Liu
                   ` (75 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Yuanhan Liu, John McNamara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From ab88d044c8771d5f40c7ff2d1d4d27b8b06d5ac2 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Tue, 22 Nov 2016 11:04:58 +0100
Subject: [PATCH] mempool: fix API documentation

[ upstream commit 8ee94d8aee73d39f50dea753da787c285f228b5c ]

A previous commit changed the local_cache table into a
pointer, reducing the size of the rte_mempool structure.

Fix the API comment of rte_mempool_create() related to
this modification.

Fixes: 213af31e0960 ("mempool: reduce structure size if no cache needed")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 lib/librte_mempool/rte_mempool.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 440f3b1..956ce04 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -610,9 +610,7 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *);
  *   never be used. The access to the per-lcore table is of course
  *   faster than the multi-producer/consumer pool. The cache can be
  *   disabled if the cache_size argument is set to 0; it can be useful to
- *   avoid losing objects in cache. Note that even if not used, the
- *   memory space for cache is always reserved in a mempool structure,
- *   except if CONFIG_RTE_MEMPOOL_CACHE_MAX_SIZE is set to 0.
+ *   avoid losing objects in cache.
  * @param private_data_size
  *   The size of the private data appended after the mempool
  *   structure. This is useful for storing some private data after the
-- 
1.9.0

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

* [dpdk-stable] patch 'ethdev: fix port lookup if none' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (2 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'mempool: fix API documentation' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'vdev: fix detaching with alias' " Yuanhan Liu
                   ` (74 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Yuanhan Liu, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From d384e2694e1f61cb08fc8c96d4faef7755ab8e9c Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Sat, 19 Nov 2016 13:10:11 +0000
Subject: [PATCH] ethdev: fix port lookup if none

[ upstream commit f9ae888b1e19face2ce02e92936f793499c11956 ]

Aside from avoiding doing useless work, this also fixes a segfault
when calling rte_eth_dev_get_port_by_name() whenever no devices
were found yet, and therefore rte_eth_dev_data wasn't yet allocated.

Fixes: 9c5b8d8b9feb ("ethdev: clean port id retrieval when attaching")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_ether/rte_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 4209ad0..1e0f206 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -376,6 +376,9 @@ rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id)
 		return -EINVAL;
 	}
 
+	if (!nb_ports)
+		return -ENODEV;
+
 	*port_id = RTE_MAX_ETHPORTS;
 
 	for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
-- 
1.9.0

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

* [dpdk-stable] patch 'vdev: fix detaching with alias' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (3 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: fix port lookup if none' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'examples/ethtool: fix driver information' " Yuanhan Liu
                   ` (73 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Yuanhan Liu, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 6680fb5b28e2ec870d092046f7cde75a604d2b2f Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 18 Nov 2016 16:32:49 +0000
Subject: [PATCH] vdev: fix detaching with alias

[ upstream commit c431384c8fbf8503693bcae1bdcd58d6fa459b8a ]

Fixes: d63eed6b2dca ("eal: add driver name alias")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_eal/common/eal_common_vdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c
index 0ff2377..7d6e54f 100644
--- a/lib/librte_eal/common/eal_common_vdev.c
+++ b/lib/librte_eal/common/eal_common_vdev.c
@@ -111,6 +111,14 @@ rte_eal_vdev_uninit(const char *name)
 			return driver->remove(name);
 	}
 
+	/* Give new names precedence over aliases. */
+	TAILQ_FOREACH(driver, &vdev_driver_list, next) {
+		if (driver->driver.alias &&
+		    !strncmp(driver->driver.alias, name,
+			    strlen(driver->driver.alias)))
+			return driver->remove(name);
+	}
+
 	RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
 	return -EINVAL;
 }
-- 
1.9.0

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

* [dpdk-stable] patch 'examples/ethtool: fix driver information' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (4 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'vdev: fix detaching with alias' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: remove invalid function from version map' " Yuanhan Liu
                   ` (72 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Yuanhan Liu, Remy Horton, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From df489b35ba0c06291488c1118399af38d351a6c8 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Tue, 22 Nov 2016 09:41:24 +0800
Subject: [PATCH] examples/ethtool: fix driver information

[ upstream commit bcb5b1af485bc2c3c327a5550cb3ca0f3d5c768b ]

Function pcmd_drvinfo_callback uses struct info to get
the ethtool information of each port. Struct info will
store the information of previous port until this
information be updated. This patch fixes this issue.

Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
 examples/ethtool/ethtool-app/ethapp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/ethtool/ethtool-app/ethapp.c b/examples/ethtool/ethtool-app/ethapp.c
index 38e466c..6aeaa06 100644
--- a/examples/ethtool/ethtool-app/ethapp.c
+++ b/examples/ethtool/ethtool-app/ethapp.c
@@ -177,6 +177,7 @@ pcmd_drvinfo_callback(__rte_unused void *ptr_params,
 	int id_port;
 
 	for (id_port = 0; id_port < rte_eth_dev_count(); id_port++) {
+		memset(&info, 0, sizeof(info));
 		if (rte_ethtool_get_drvinfo(id_port, &info)) {
 			printf("Error getting info for port %i\n", id_port);
 			return;
-- 
1.9.0

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

* [dpdk-stable] patch 'ethdev: remove invalid function from version map' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (5 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'examples/ethtool: fix driver information' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: fix extended statistics name index' " Yuanhan Liu
                   ` (71 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 0bbb2ec649b5b2a4196094834f5d40bffcaad869 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 22 Dec 2016 12:00:16 +0000
Subject: [PATCH] ethdev: remove invalid function from version map

[ upstream commit a4435629a99459005781cb8dcd252e29c07b4c29 ]

Fixes: 9d41beed24b0 ("lib: provide initial versioning")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ether/rte_ether_version.map | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map
index 72be66d..fd62263 100644
--- a/lib/librte_ether/rte_ether_version.map
+++ b/lib/librte_ether/rte_ether_version.map
@@ -19,7 +19,6 @@ DPDK_2.2 {
 	rte_eth_dev_bypass_ver_show;
 	rte_eth_dev_bypass_wd_reset;
 	rte_eth_dev_bypass_wd_timeout_show;
-	rte_eth_dev_callback_process;
 	rte_eth_dev_callback_register;
 	rte_eth_dev_callback_unregister;
 	rte_eth_dev_close;
-- 
1.9.0

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

* [dpdk-stable] patch 'ethdev: fix extended statistics name index' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (6 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: remove invalid function from version map' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'pmdinfogen: fix null dereference' " Yuanhan Liu
                   ` (70 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Yuanhan Liu, Remy Horton, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From f9966fd2b5decd236cda6c596b7971c3dffb0192 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 16 Dec 2016 10:44:13 +0100
Subject: [PATCH] ethdev: fix extended statistics name index

[ upstream commit 513c78ae3fd654c5b571f2cc8fdfb924ff2c4ade ]

The function rte_eth_xstats_get() return an array of tuples (id,
value). The value is the statistic counter, while the id references a
name in the array returned by rte_eth_xstats_get_name().

Today, each 'id' returned by rte_eth_xstats_get() is equal to the index
in the returned array, making this value useless. It also prevents a
driver from having different indexes for names and value, like in the
example below:

  rte_eth_xstats_get_name() returns:
    0: "rx0_stat"
    1: "rx1_stat"
    2: ...
    7: "rx7_stat"
    8: "tx0_stat"
    9: "tx1_stat"
    ...
    15: "tx7_stat"

  rte_eth_xstats_get() returns:
    0: id=0, val=<stat>    ("rx0_stat")
    1: id=1, val=<stat>    ("rx1_stat")
    2: id=8, val=<stat>    ("tx0_stat")
    3: id=9, val=<stat>    ("tx1_stat")

This patch fixes the drivers to set the 'id' in their ethdev->xstats_get()
(except e1000 which was already doing it), and fixes ethdev by not setting
the 'id' field to the index of the table for pmd-specific stats: instead,
they should just be shifted by the max number of generic statistics.

Fixes: bd6aa172cf35 ("ethdev: fetch extended statistics with integer ids")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
 drivers/net/bnx2x/bnx2x_ethdev.c   | 1 +
 drivers/net/fm10k/fm10k_ethdev.c   | 3 +++
 drivers/net/i40e/i40e_ethdev.c     | 4 ++++
 drivers/net/ixgbe/ixgbe_ethdev.c   | 3 +++
 drivers/net/qede/qede_ethdev.c     | 2 ++
 drivers/net/vhost/rte_eth_vhost.c  | 2 ++
 drivers/net/virtio/virtio_ethdev.c | 2 ++
 lib/librte_ether/rte_ethdev.c      | 5 ++++-
 8 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 0eae433..94bbd66 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -422,6 +422,7 @@ bnx2x_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 			xstats[num].value =
 					  *(uint64_t *)((char *)&sc->eth_stats +
 					  bnx2x_xstats_strings[num].offset_lo);
+		xstats[num].id = num;
 	}
 
 	return num;
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 923690c..7c51d3b 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1315,6 +1315,7 @@ fm10k_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	for (i = 0; i < FM10K_NB_HW_XSTATS; i++) {
 		xstats[count].value = *(uint64_t *)(((char *)hw_stats) +
 			fm10k_hw_stats_strings[count].offset);
+		xstats[count].id = count;
 		count++;
 	}
 
@@ -1324,12 +1325,14 @@ fm10k_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 			xstats[count].value =
 				*(uint64_t *)(((char *)&hw_stats->q[q]) +
 				fm10k_hw_stats_rx_q_strings[i].offset);
+			xstats[count].id = count;
 			count++;
 		}
 		for (i = 0; i < FM10K_NB_TX_Q_XSTATS; i++) {
 			xstats[count].value =
 				*(uint64_t *)(((char *)&hw_stats->q[q]) +
 				fm10k_hw_stats_tx_q_strings[i].offset);
+			xstats[count].id = count;
 			count++;
 		}
 	}
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 67778ba..c7b0d0f 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2532,6 +2532,7 @@ i40e_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	for (i = 0; i < I40E_NB_ETH_XSTATS; i++) {
 		xstats[count].value = *(uint64_t *)(((char *)&hw_stats->eth) +
 			rte_i40e_stats_strings[i].offset);
+		xstats[count].id = count;
 		count++;
 	}
 
@@ -2539,6 +2540,7 @@ i40e_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	for (i = 0; i < I40E_NB_HW_PORT_XSTATS; i++) {
 		xstats[count].value = *(uint64_t *)(((char *)hw_stats) +
 			rte_i40e_hw_port_strings[i].offset);
+		xstats[count].id = count;
 		count++;
 	}
 
@@ -2548,6 +2550,7 @@ i40e_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 				*(uint64_t *)(((char *)hw_stats) +
 				rte_i40e_rxq_prio_strings[i].offset +
 				(sizeof(uint64_t) * prio));
+			xstats[count].id = count;
 			count++;
 		}
 	}
@@ -2558,6 +2561,7 @@ i40e_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 				*(uint64_t *)(((char *)hw_stats) +
 				rte_i40e_txq_prio_strings[i].offset +
 				(sizeof(uint64_t) * prio));
+			xstats[count].id = count;
 			count++;
 		}
 	}
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index edc9b22..fe98b96 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2902,6 +2902,7 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	for (i = 0; i < IXGBE_NB_HW_STATS; i++) {
 		xstats[count].value = *(uint64_t *)(((char *)hw_stats) +
 				rte_ixgbe_stats_strings[i].offset);
+		xstats[count].id = count;
 		count++;
 	}
 
@@ -2911,6 +2912,7 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 			xstats[count].value = *(uint64_t *)(((char *)hw_stats) +
 					rte_ixgbe_rxq_strings[stat].offset +
 					(sizeof(uint64_t) * i));
+			xstats[count].id = count;
 			count++;
 		}
 	}
@@ -2921,6 +2923,7 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 			xstats[count].value = *(uint64_t *)(((char *)hw_stats) +
 					rte_ixgbe_txq_strings[stat].offset +
 					(sizeof(uint64_t) * i));
+			xstats[count].id = count;
 			count++;
 		}
 	}
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index d106dd0..55441b9 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -973,6 +973,7 @@ qede_get_xstats(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	for (i = 0; i < RTE_DIM(qede_xstats_strings); i++) {
 		xstats[stat_idx].value = *(uint64_t *)(((char *)&stats) +
 					     qede_xstats_strings[i].offset);
+		xstats[stat_idx].id = stat_idx;
 		stat_idx++;
 	}
 
@@ -982,6 +983,7 @@ qede_get_xstats(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 				xstats[stat_idx].value = *(uint64_t *)(
 					((char *)(qdev->fp_array[(qid)].rxq)) +
 					 qede_rxq_xstats_strings[i].offset);
+				xstats[stat_idx].id = stat_idx;
 				stat_idx++;
 			}
 		}
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 766d4ef..dd79ccf 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -324,6 +324,7 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 				*(uint64_t *)(((char *)vq)
 				+ vhost_rxport_stat_strings[t].offset);
 		}
+		xstats[count].id = count;
 		count++;
 	}
 	for (t = 0; t < VHOST_NB_XSTATS_TXPORT; t++) {
@@ -336,6 +337,7 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 				*(uint64_t *)(((char *)vq)
 				+ vhost_txport_stat_strings[t].offset);
 		}
+		xstats[count].id = count;
 		count++;
 	}
 	return count;
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 079fd6c..9fe5b8b 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -893,6 +893,7 @@ virtio_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 		for (t = 0; t < VIRTIO_NB_RXQ_XSTATS; t++) {
 			xstats[count].value = *(uint64_t *)(((char *)rxvq) +
 				rte_virtio_rxq_stat_strings[t].offset);
+			xstats[count].id = count;
 			count++;
 		}
 	}
@@ -908,6 +909,7 @@ virtio_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 		for (t = 0; t < VIRTIO_NB_TXQ_XSTATS; t++) {
 			xstats[count].value = *(uint64_t *)(((char *)txvq) +
 				rte_virtio_txq_stat_strings[t].offset);
+			xstats[count].id = count;
 			count++;
 		}
 	}
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 1e0f206..45d8286 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -1491,8 +1491,11 @@ rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
 		}
 	}
 
-	for (i = 0; i < count + xcount; i++)
+	for (i = 0; i < count; i++)
 		xstats[i].id = i;
+	/* add an offset to driver-specific stats */
+	for ( ; i < count + xcount; i++)
+		xstats[i].id += count;
 
 	return count + xcount;
 }
-- 
1.9.0

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

* [dpdk-stable] patch 'pmdinfogen: fix null dereference' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (7 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: fix extended statistics name index' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'app/testpmd: fix static build link ordering' " Yuanhan Liu
                   ` (69 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Neil Horman; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 2e48bbe500bf9de6144dac822e67341b5a2cac3f Mon Sep 17 00:00:00 2001
From: Neil Horman <nhorman@tuxdriver.com>
Date: Thu, 5 Jan 2017 14:22:41 -0500
Subject: [PATCH] pmdinfogen: fix null dereference

[ upstream commit 348e470bc6be6f28fc197f6d2dc4f3cebb43e719 ]

Coverity reports a forward null dereference from a for loop
that works with a variable previously tested for null that had no error
handling or condition to prevent it.  Pretty obvious fix below.

Coverity issue: 139593
Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
---
 buildtools/pmdinfogen/pmdinfogen.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
index 59ab956..5bf08ce 100644
--- a/buildtools/pmdinfogen/pmdinfogen.c
+++ b/buildtools/pmdinfogen/pmdinfogen.c
@@ -226,13 +226,14 @@ static int parse_elf(struct elf_info *info, const char *filename)
 	}
 	if (!info->symtab_start)
 		fprintf(stderr, "%s has no symtab?\n", filename);
-
-	/* Fix endianness in symbols */
-	for (sym = info->symtab_start; sym < info->symtab_stop; sym++) {
-		sym->st_shndx = TO_NATIVE(endian, 16, sym->st_shndx);
-		sym->st_name  = TO_NATIVE(endian, 32, sym->st_name);
-		sym->st_value = TO_NATIVE(endian, ADDR_SIZE, sym->st_value);
-		sym->st_size  = TO_NATIVE(endian, ADDR_SIZE, sym->st_size);
+	else {
+		/* Fix endianness in symbols */
+		for (sym = info->symtab_start; sym < info->symtab_stop; sym++) {
+			sym->st_shndx = TO_NATIVE(endian, 16, sym->st_shndx);
+			sym->st_name  = TO_NATIVE(endian, 32, sym->st_name);
+			sym->st_value = TO_NATIVE(endian, ADDR_SIZE, sym->st_value);
+			sym->st_size  = TO_NATIVE(endian, ADDR_SIZE, sym->st_size);
+		}
 	}
 
 	if (symtab_shndx_idx != ~0U) {
-- 
1.9.0

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

* [dpdk-stable] patch 'app/testpmd: fix static build link ordering' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (8 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'pmdinfogen: fix null dereference' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'app/testpmd: fix check for invalid ports' " Yuanhan Liu
                   ` (68 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 0c32990ad6faa6f977f1dcb5d73ad75d18be029a Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Thu, 12 Jan 2017 13:16:54 +0530
Subject: [PATCH] app/testpmd: fix static build link ordering

[ upstream commit d74cbeca7596b3237fe5b823fb8a4bcfe8a7d979 ]

By introducing explicit -lrte_pmd_ixgbe link request in
testpmd Makefile,"-Wl,-lrte_pmd_ixgbe" provided twice, and linker
removes the duplication by keeping only first occurrence.
This moves "-Wl,-lrte_pmd_ixgbe" out of "-Wl,--whole-archive" flag
and makes symbol generation totally different than previous version
in case of static build.
This patch fixes the static build linking order by introducing
-lrte_pmd_ixgbe under the shared library config
(CONFIG_RTE_BUILD_SHARED_LIB).

Fixes: 425781ff5afe ("app/testpmd: add ixgbe VF management")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 app/test-pmd/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile
index 891b85a..92c0c1b 100644
--- a/app/test-pmd/Makefile
+++ b/app/test-pmd/Makefile
@@ -58,7 +58,9 @@ SRCS-y += csumonly.c
 SRCS-y += icmpecho.c
 SRCS-$(CONFIG_RTE_LIBRTE_IEEE1588) += ieee1588fwd.c
 
+ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += -lrte_pmd_ixgbe
+endif
 
 CFLAGS_cmdline.o := -D_GNU_SOURCE
 
-- 
1.9.0

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

* [dpdk-stable] patch 'app/testpmd: fix check for invalid ports' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (9 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'app/testpmd: fix static build link ordering' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'examples/ip_pipeline: fix coremask limitation' " Yuanhan Liu
                   ` (67 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: Yuanhan Liu, Chen Jing D(Mark), Jingjing Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 3545e2e92e2b8fd380d77a5f10c0461fcd11ac33 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Tue, 13 Dec 2016 15:11:08 +0800
Subject: [PATCH] app/testpmd: fix check for invalid ports

[ upstream commit dc0537e6d6acbc27d79b7d247ca3bc7f8c20f269 ]

Some CLIs don't check the input port ID, it
may cause segmentation fault (core dumped).

Fixes: 425781ff5afe ("app/testpmd: add ixgbe VF management")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
 app/test-pmd/cmdline.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 63b55dc..315a252 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -10807,6 +10807,9 @@ cmd_set_vf_vlan_anti_spoof_parsed(
 	int ret = 0;
 	int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
 
+	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+		return;
+
 	ret = rte_pmd_ixgbe_set_vf_vlan_anti_spoof(res->port_id, res->vf_id,
 			is_on);
 	switch (ret) {
@@ -10892,6 +10895,9 @@ cmd_set_vf_mac_anti_spoof_parsed(
 	int ret;
 	int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
 
+	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+		return;
+
 	ret = rte_pmd_ixgbe_set_vf_mac_anti_spoof(res->port_id, res->vf_id,
 			is_on);
 	switch (ret) {
@@ -10977,6 +10983,9 @@ cmd_set_vf_vlan_stripq_parsed(
 	int ret = 0;
 	int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
 
+	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+		return;
+
 	ret = rte_pmd_ixgbe_set_vf_vlan_stripq(res->port_id, res->vf_id, is_on);
 	switch (ret) {
 	case 0:
@@ -11060,6 +11069,9 @@ cmd_set_vf_vlan_insert_parsed(
 	struct cmd_vf_vlan_insert_result *res = parsed_result;
 	int ret;
 
+	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+		return;
+
 	ret = rte_pmd_ixgbe_set_vf_vlan_insert(res->port_id, res->vf_id, res->vlan_id);
 	switch (ret) {
 	case 0:
@@ -11134,6 +11146,9 @@ cmd_set_tx_loopback_parsed(
 	int ret;
 	int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
 
+	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+		return;
+
 	ret = rte_pmd_ixgbe_set_tx_loopback(res->port_id, is_on);
 	switch (ret) {
 	case 0:
@@ -11211,6 +11226,9 @@ cmd_set_all_queues_drop_en_parsed(
 	int ret = 0;
 	int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
 
+	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+		return;
+
 	ret = rte_pmd_ixgbe_set_all_queues_drop_en(res->port_id, is_on);
 	switch (ret) {
 	case 0:
@@ -11294,6 +11312,9 @@ cmd_set_vf_split_drop_en_parsed(
 	int ret;
 	int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
 
+	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+		return;
+
 	ret = rte_pmd_ixgbe_set_vf_split_drop_en(res->port_id, res->vf_id,
 			is_on);
 	switch (ret) {
@@ -11378,6 +11399,9 @@ cmd_set_vf_mac_addr_parsed(
 	struct cmd_set_vf_mac_addr_result *res = parsed_result;
 	int ret;
 
+	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+		return;
+
 	ret = rte_pmd_ixgbe_set_vf_mac_addr(res->port_id, res->vf_id,
 			&res->mac_addr);
 	switch (ret) {
-- 
1.9.0

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

* [dpdk-stable] patch 'examples/ip_pipeline: fix coremask limitation' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (10 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'app/testpmd: fix check for invalid ports' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'examples/ip_pipeline: fix parsing of pass-through pipeline' " Yuanhan Liu
                   ` (66 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Sankar Chokkalingam; +Cc: Yuanhan Liu, Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 7def3833a7196ccac6e01c84d63c7eb5bcfd3dfb Mon Sep 17 00:00:00 2001
From: Sankar Chokkalingam <sankarx.chokkalingam@intel.com>
Date: Wed, 28 Dec 2016 05:01:54 -0700
Subject: [PATCH] examples/ip_pipeline: fix coremask limitation

[ upstream commit ac6bad59f1026c3b271542aea1856e4a0d87c426 ]

Issue:
coremask used in IP Pipeline is limited to 64 cores.

Solution:
Modified coremask as an array of uint64_t to support RTE_MAX_LCORE

Fixes: 7f64b9c004aa ("examples/ip_pipeline: rework config file syntax")
Fixes: eb32fe7c5574 ("examples/ip_pipeline: rework initialization parameters")
Fixes: b4aee0fb9c6d ("examples/ip_pipeline: reconfigure thread binding dynamically")
Fixes: 4e14069328fc ("examples/ip_pipeline: measure CPU utilization")

Signed-off-by: Sankar Chokkalingam <sankarx.chokkalingam@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 examples/ip_pipeline/app.h       | 35 ++++++++++++++++++++++++++++++++++-
 examples/ip_pipeline/init.c      | 15 ++++++++++-----
 examples/ip_pipeline/thread_fe.c |  9 +++------
 3 files changed, 47 insertions(+), 12 deletions(-)

diff --git a/examples/ip_pipeline/app.h b/examples/ip_pipeline/app.h
index f8b84e0..e41290e 100644
--- a/examples/ip_pipeline/app.h
+++ b/examples/ip_pipeline/app.h
@@ -491,6 +491,9 @@ struct app_eal_params {
 #define APP_THREAD_HEADROOM_STATS_COLLECT        1
 #endif
 
+#define APP_CORE_MASK_SIZE					\
+	(RTE_MAX_LCORE / 64 + ((RTE_MAX_LCORE % 64) ? 1 : 0))
+
 struct app_params {
 	/* Config */
 	char app_name[APP_APPNAME_SIZE];
@@ -533,7 +536,7 @@ struct app_params {
 	/* Init */
 	char *eal_argv[1 + APP_EAL_ARGC];
 	struct cpu_core_map *core_map;
-	uint64_t core_mask;
+	uint64_t core_mask[APP_CORE_MASK_SIZE];
 	struct rte_mempool *mempool[APP_MAX_MEMPOOLS];
 	struct app_link_data link_data[APP_MAX_LINKS];
 	struct rte_ring *swq[APP_MAX_PKTQ_SWQ];
@@ -1359,6 +1362,36 @@ app_get_link_for_kni(struct app_params *app, struct app_pktq_kni_params *p_kni)
 	return &app->link_params[link_param_idx];
 }
 
+static inline uint32_t
+app_core_is_enabled(struct app_params *app, uint32_t lcore_id)
+{
+	return(app->core_mask[lcore_id / 64] &
+		(1LLU << (lcore_id % 64)));
+}
+
+static inline void
+app_core_enable_in_core_mask(struct app_params *app, int lcore_id)
+{
+	app->core_mask[lcore_id / 64] |= 1LLU << (lcore_id % 64);
+
+}
+
+static inline void
+app_core_build_core_mask_string(struct app_params *app, char *mask_buffer)
+{
+	int i;
+
+	mask_buffer[0] = '\0';
+	for (i = (int)RTE_DIM(app->core_mask); i > 0; i--) {
+		/* For Hex representation of bits in uint64_t */
+		char buffer[(64 / 8) * 2 + 1];
+		memset(buffer, 0, sizeof(buffer));
+		snprintf(buffer, sizeof(buffer), "%016" PRIx64,
+			 app->core_mask[i-1]);
+		strcat(mask_buffer, buffer);
+	}
+}
+
 void app_pipeline_params_get(struct app_params *app,
 	struct app_pipeline_params *p_in,
 	struct pipeline_params *p_out);
diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c
index 3b36b53..d46bd36 100644
--- a/examples/ip_pipeline/init.c
+++ b/examples/ip_pipeline/init.c
@@ -78,11 +78,14 @@ app_init_core_map(struct app_params *app)
 		cpu_core_map_print(app->core_map);
 }
 
+/* Core Mask String in Hex Representation */
+#define APP_CORE_MASK_STRING_SIZE ((64 * APP_CORE_MASK_SIZE) / 8 * 2 + 1)
+
 static void
 app_init_core_mask(struct app_params *app)
 {
-	uint64_t mask = 0;
 	uint32_t i;
+	char core_mask_str[APP_CORE_MASK_STRING_SIZE];
 
 	for (i = 0; i < app->n_pipelines; i++) {
 		struct app_pipeline_params *p = &app->pipeline_params[i];
@@ -96,17 +99,18 @@ app_init_core_mask(struct app_params *app)
 		if (lcore_id < 0)
 			rte_panic("Cannot create CPU core mask\n");
 
-		mask |= 1LLU << lcore_id;
+		app_core_enable_in_core_mask(app, lcore_id);
 	}
 
-	app->core_mask = mask;
-	APP_LOG(app, HIGH, "CPU core mask = 0x%016" PRIx64, app->core_mask);
+	app_core_build_core_mask_string(app, core_mask_str);
+	APP_LOG(app, HIGH, "CPU core mask = 0x%s", core_mask_str);
 }
 
 static void
 app_init_eal(struct app_params *app)
 {
 	char buffer[256];
+	char core_mask_str[APP_CORE_MASK_STRING_SIZE];
 	struct app_eal_params *p = &app->eal_params;
 	uint32_t n_args = 0;
 	uint32_t i;
@@ -114,7 +118,8 @@ app_init_eal(struct app_params *app)
 
 	app->eal_argv[n_args++] = strdup(app->app_name);
 
-	snprintf(buffer, sizeof(buffer), "-c%" PRIx64, app->core_mask);
+	app_core_build_core_mask_string(app, core_mask_str);
+	snprintf(buffer, sizeof(buffer), "-c%s", core_mask_str);
 	app->eal_argv[n_args++] = strdup(buffer);
 
 	if (p->coremap) {
diff --git a/examples/ip_pipeline/thread_fe.c b/examples/ip_pipeline/thread_fe.c
index 6c547ca..4590c2b 100644
--- a/examples/ip_pipeline/thread_fe.c
+++ b/examples/ip_pipeline/thread_fe.c
@@ -70,8 +70,7 @@ app_pipeline_enable(struct app_params *app,
 			core_id,
 			hyper_th_id);
 
-	if ((thread_id < 0) ||
-		((app->core_mask & (1LLU << thread_id)) == 0))
+	if ((thread_id < 0) || !app_core_is_enabled(app, thread_id))
 		return -1;
 
 	if (app_pipeline_data(app, pipeline_id) == NULL)
@@ -134,8 +133,7 @@ app_pipeline_disable(struct app_params *app,
 			core_id,
 			hyper_th_id);
 
-	if ((thread_id < 0) ||
-		((app->core_mask & (1LLU << thread_id)) == 0))
+	if ((thread_id < 0) || !app_core_is_enabled(app, thread_id))
 		return -1;
 
 	if (app_pipeline_data(app, pipeline_id) == NULL)
@@ -188,8 +186,7 @@ app_thread_headroom(struct app_params *app,
 			core_id,
 			hyper_th_id);
 
-	if ((thread_id < 0) ||
-		((app->core_mask & (1LLU << thread_id)) == 0))
+	if ((thread_id < 0) || !app_core_is_enabled(app, thread_id))
 		return -1;
 
 	req = app_msg_alloc(app);
-- 
1.9.0

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

* [dpdk-stable] patch 'examples/ip_pipeline: fix parsing of pass-through pipeline' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (11 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'examples/ip_pipeline: fix coremask limitation' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e: fix xstats value mapping' " Yuanhan Liu
                   ` (65 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Jasvinder Singh; +Cc: Yuanhan Liu, Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 13e7358d00677ff97c1cbbf5610c6780e9a1d97c Mon Sep 17 00:00:00 2001
From: Jasvinder Singh <jasvinder.singh@intel.com>
Date: Mon, 21 Nov 2016 13:37:37 +0000
Subject: [PATCH] examples/ip_pipeline: fix parsing of pass-through pipeline

[ upstream commit d30185b7bf1cd6924bee7e7abe5d00ae31203ccb ]

This patch fixes the configuration file parsing error when load balancing
function is enabled in pass-through pipeline.

error log:
pipeline> [APP] Initializing PIPELINE1 ...
[PIPELINE1] Pass-through
Parse error in section "PIPELINE1": entry "lb" has invalid value ("hash")

Fixes: cbe82f6cfb0a ("examples/ip_pipeline: add swap action in pass-through")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 examples/ip_pipeline/pipeline/pipeline_passthrough_be.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ip_pipeline/pipeline/pipeline_passthrough_be.c b/examples/ip_pipeline/pipeline/pipeline_passthrough_be.c
index 8b71a7d..7ab0afe 100644
--- a/examples/ip_pipeline/pipeline/pipeline_passthrough_be.c
+++ b/examples/ip_pipeline/pipeline/pipeline_passthrough_be.c
@@ -589,7 +589,7 @@ pipeline_passthrough_parse_args(struct pipeline_passthrough_params *p,
 				params->name, arg_name);
 			dma_hash_lb_present = 1;
 
-			if (strcmp(arg_value, "hash") ||
+			if (strcmp(arg_value, "hash") &&
 				strcmp(arg_value, "HASH"))
 
 				PIPELINE_PARSE_ERR_INV_VAL(0,
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e: fix xstats value mapping' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (12 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'examples/ip_pipeline: fix parsing of pass-through pipeline' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/mlx5: fix leak when starvation occurs' " Yuanhan Liu
                   ` (64 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Remy Horton; +Cc: Yuanhan Liu, Kevin Traynor, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 9e167354e8dab53a9665a7b0b8248f4f6725c2ce Mon Sep 17 00:00:00 2001
From: Remy Horton <remy.horton@intel.com>
Date: Mon, 14 Nov 2016 14:14:48 +0800
Subject: [PATCH] net/i40e: fix xstats value mapping

[ upstream commit 1ef3b073f7a56d7885dc85b58d39abbcd585d5e8 ]

The offsets used in rte_i40evf_stats_strings for transmission
statistics were wrong, returning the total byte count rather than
the respective (unicast, multicast, broadcast, drop, & error)
packet counts.

Fixes: da61cd084976 ("i40evf: add extended stats")

Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index aa306d6..afae2ec 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -176,11 +176,11 @@ static const struct rte_i40evf_xstats_name_off rte_i40evf_stats_strings[] = {
 	{"rx_unknown_protocol_packets", offsetof(struct i40e_eth_stats,
 		rx_unknown_protocol)},
 	{"tx_bytes", offsetof(struct i40e_eth_stats, tx_bytes)},
-	{"tx_unicast_packets", offsetof(struct i40e_eth_stats, tx_bytes)},
-	{"tx_multicast_packets", offsetof(struct i40e_eth_stats, tx_bytes)},
-	{"tx_broadcast_packets", offsetof(struct i40e_eth_stats, tx_bytes)},
-	{"tx_dropped_packets", offsetof(struct i40e_eth_stats, tx_bytes)},
-	{"tx_error_packets", offsetof(struct i40e_eth_stats, tx_bytes)},
+	{"tx_unicast_packets", offsetof(struct i40e_eth_stats, tx_unicast)},
+	{"tx_multicast_packets", offsetof(struct i40e_eth_stats, tx_multicast)},
+	{"tx_broadcast_packets", offsetof(struct i40e_eth_stats, tx_broadcast)},
+	{"tx_dropped_packets", offsetof(struct i40e_eth_stats, tx_discards)},
+	{"tx_error_packets", offsetof(struct i40e_eth_stats, tx_errors)},
 };
 
 #define I40EVF_NB_XSTATS (sizeof(rte_i40evf_stats_strings) / \
-- 
1.9.0

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

* [dpdk-stable] patch 'net/mlx5: fix leak when starvation occurs' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (13 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e: fix xstats value mapping' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/mlx5: fix endianness in Tx completion queue' " Yuanhan Liu
                   ` (63 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Nélio Laranjeiro
  Cc: Yuanhan Liu, Liming Sun, Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From cb4d2bab007ba1625e772a343998fce5bb58f255 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Thu, 17 Nov 2016 10:49:54 +0100
Subject: [PATCH] net/mlx5: fix leak when starvation occurs

[ upstream commit fe5fe3820e504380f4abd15f839f63dd6e5c508f ]

The list of segments to free was wrongly manipulated ending by only freeing
the first segment instead of freeing all of them.  The last one still
belongs to the NIC and thus should not be freed.

Fixes: a1bdb71a32da ("net/mlx5: fix crash in Rx")

Reported-by: Liming Sun <lsun@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 9b59801..b31b33b 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1310,10 +1310,10 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			}
 			while (pkt != seg) {
 				assert(pkt != (*rxq->elts)[idx]);
-				seg = NEXT(pkt);
+				rep = NEXT(pkt);
 				rte_mbuf_refcnt_set(pkt, 0);
 				__rte_mbuf_raw_free(pkt);
-				pkt = seg;
+				pkt = rep;
 			}
 			break;
 		}
-- 
1.9.0

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

* [dpdk-stable] patch 'net/mlx5: fix endianness in Tx completion queue' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (14 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/mlx5: fix leak when starvation occurs' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e: fix logging for Tx free threshold check' " Yuanhan Liu
                   ` (62 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Nélio Laranjeiro
  Cc: Yuanhan Liu, Liming Sun, Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From d511f7d668c3c2791a30beffee1c5860e443c0da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Thu, 17 Nov 2016 10:49:55 +0100
Subject: [PATCH] net/mlx5: fix endianness in Tx completion queue

[ upstream commit e929f2a2cd1f45e865dc6a52b44b17f5630238d5 ]

Completion queue entry data uses network endian, to access them we should
use ntoh*().

Fixes: c305090bbaf8 ("net/mlx5: replace countdown with threshold for Tx completions")

Reported-by: Liming Sun <lsun@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index b31b33b..2c5ca74 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -199,7 +199,7 @@ txq_complete(struct txq *txq)
 	} while (1);
 	if (unlikely(cqe == NULL))
 		return;
-	wqe = &(*txq->wqes)[htons(cqe->wqe_counter) &
+	wqe = &(*txq->wqes)[ntohs(cqe->wqe_counter) &
 			    ((1 << txq->wqe_n) - 1)].hdr;
 	elts_tail = wqe->ctrl[3];
 	assert(elts_tail < (1 << txq->wqe_n));
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e: fix logging for Tx free threshold check' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (15 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/mlx5: fix endianness in Tx completion queue' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e: enable auto link update for 25G' " Yuanhan Liu
                   ` (61 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From cddce9c4d7159a843780f705f7f39b5455293689 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Sun, 27 Nov 2016 17:11:35 +0800
Subject: [PATCH] net/i40e: fix logging for Tx free threshold check

[ upstream commit f6d227550fb525d0292733fb94ebb73e04517f18 ]

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/i40e_rxtx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 7ae7d9f..d359dae 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1916,8 +1916,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
 		return I40E_ERR_PARAM;
 	}
 	if (tx_free_thresh >= (nb_desc - 3)) {
-		PMD_INIT_LOG(ERR, "tx_rs_thresh must be less than the "
-			     "tx_free_thresh must be less than the "
+		PMD_INIT_LOG(ERR, "tx_free_thresh must be less than the "
 			     "number of TX descriptors minus 3. "
 			     "(tx_free_thresh=%u port=%d queue=%d)",
 			     (unsigned int)tx_free_thresh,
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e: enable auto link update for 25G' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (16 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e: fix logging for Tx free threshold check' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40evf: fix casting between structs' " Yuanhan Liu
                   ` (60 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 47059da3212772de46fc7c77fa94763dad213910 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 29 Nov 2016 15:26:21 -0500
Subject: [PATCH] net/i40e: enable auto link update for 25G

[ upstream commit 5e21d9ee9b661645ef7f858f57a46026708664be ]

For 25G devices auto link update was disabled because it was causing
link issues when enabled.

The problem found because of interface changes in admin queue command
"set_phy_config" and "get_phy_capabilities" for 25G.

This patch fixes the issue and enables auto link update for 25G devices.

Fixes: 75d133dd3296 ("net/i40e: enable 25G device")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index c7b0d0f..a4d1cfc 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1628,6 +1628,8 @@ i40e_phy_conf_link(struct i40e_hw *hw,
 
 	/* use get_phy_abilities_resp value for the rest */
 	phy_conf.phy_type = phy_ab.phy_type;
+	phy_conf.phy_type_ext = phy_ab.phy_type_ext;
+	phy_conf.fec_config = phy_ab.mod_type_ext;
 	phy_conf.eee_capability = phy_ab.eee_capability;
 	phy_conf.eeer = phy_ab.eeer_val;
 	phy_conf.low_power_ctrl = phy_ab.d3_lpan;
@@ -1653,8 +1655,7 @@ i40e_apply_link_speed(struct rte_eth_dev *dev)
 	struct rte_eth_conf *conf = &dev->data->dev_conf;
 
 	speed = i40e_parse_link_speeds(conf->link_speeds);
-	if (!I40E_PHY_TYPE_SUPPORT_25G(hw->phy.phy_types))
-		abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
+	abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
 	if (!(conf->link_speeds & ETH_LINK_SPEED_FIXED))
 		abilities |= I40E_AQ_PHY_AN_ENABLED;
 	abilities |= I40E_AQ_PHY_LINK_ENABLED;
@@ -1990,8 +1991,7 @@ i40e_dev_set_link_down(struct rte_eth_dev *dev)
 	uint8_t abilities = 0;
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
-	if (!I40E_PHY_TYPE_SUPPORT_25G(hw->phy.phy_types))
-		abilities = I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
+	abilities = I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
 	return i40e_phy_conf_link(hw, abilities, speed);
 }
 
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40evf: fix casting between structs' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (17 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e: enable auto link update for 25G' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix flow control set for 25G' " Yuanhan Liu
                   ` (59 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 4b502c2ecbdce8c23881afe88c5826b693c6da27 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Wed, 30 Nov 2016 10:02:25 +0800
Subject: [PATCH] net/i40evf: fix casting between structs

[ upstream commit dd2681bb1f23a5099dd7dbd8e94bfccd499eefd9 ]

Casting from structs which lay out data in typed members
to structs which have flat memory buffers, will cause
problems if the alignment of the former isn't as expected.
This patch removes the casting between structs.

Fixes: ae19955e7c86 ("i40evf: support reporting PF reset")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index afae2ec..f54544e 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1336,8 +1336,9 @@ i40evf_handle_aq_msg(struct rte_eth_dev *dev)
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 	struct i40e_arq_event_info info;
-	struct i40e_virtchnl_msg *v_msg;
-	uint16_t pending, opcode;
+	uint16_t pending, aq_opc;
+	enum i40e_virtchnl_ops msg_opc;
+	enum i40e_status_code msg_ret;
 	int ret;
 
 	info.buf_len = I40E_AQ_BUF_SZ;
@@ -1346,7 +1347,6 @@ i40evf_handle_aq_msg(struct rte_eth_dev *dev)
 		return;
 	}
 	info.msg_buf = vf->aq_resp;
-	v_msg = (struct i40e_virtchnl_msg *)&info.desc;
 
 	pending = 1;
 	while (pending) {
@@ -1357,32 +1357,39 @@ i40evf_handle_aq_msg(struct rte_eth_dev *dev)
 				    "ret: %d", ret);
 			break;
 		}
-		opcode = rte_le_to_cpu_16(info.desc.opcode);
-
-		switch (opcode) {
+		aq_opc = rte_le_to_cpu_16(info.desc.opcode);
+		/* For the message sent from pf to vf, opcode is stored in
+		 * cookie_high of struct i40e_aq_desc, while return error code
+		 * are stored in cookie_low, Which is done by
+		 * i40e_aq_send_msg_to_vf in PF driver.*/
+		msg_opc = (enum i40e_virtchnl_ops)rte_le_to_cpu_32(
+						  info.desc.cookie_high);
+		msg_ret = (enum i40e_status_code)rte_le_to_cpu_32(
+						  info.desc.cookie_low);
+		switch (aq_opc) {
 		case i40e_aqc_opc_send_msg_to_vf:
-			if (v_msg->v_opcode == I40E_VIRTCHNL_OP_EVENT)
+			if (msg_opc == I40E_VIRTCHNL_OP_EVENT)
 				/* process event*/
 				i40evf_handle_pf_event(dev, info.msg_buf,
 						       info.msg_len);
 			else {
 				/* read message and it's expected one */
-				if (v_msg->v_opcode == vf->pend_cmd) {
-					vf->cmd_retval = v_msg->v_retval;
+				if (msg_opc == vf->pend_cmd) {
+					vf->cmd_retval = msg_ret;
 					/* prevent compiler reordering */
 					rte_compiler_barrier();
 					_clear_cmd(vf);
 				} else
 					PMD_DRV_LOG(ERR, "command mismatch,"
 						"expect %u, get %u",
-						vf->pend_cmd, v_msg->v_opcode);
+						vf->pend_cmd, msg_opc);
 				PMD_DRV_LOG(DEBUG, "adminq response is received,"
-					     " opcode = %d\n", v_msg->v_opcode);
+					     " opcode = %d\n", msg_opc);
 			}
 			break;
 		default:
 			PMD_DRV_LOG(ERR, "Request %u is not supported yet",
-				    opcode);
+				    aq_opc);
 			break;
 		}
 	}
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e/base: fix flow control set for 25G' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (18 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40evf: fix casting between structs' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix bit test mask' " Yuanhan Liu
                   ` (58 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 7297e7820a0991a52a88a2534b73f6b74623e2ca Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Sat, 10 Dec 2016 19:24:24 +0800
Subject: [PATCH] net/i40e/base: fix flow control set for 25G

[ upstream commit f8080847982fd74ade0fac3e0e1dabcb9d2a543f ]

Add phy_type_ext copied from old setting to rpevents 25G PHY
types from being disabled when setting the flow control modes.

Fixes: 51131ae119 ("net/i40e/base: get PHY abilities for 25G")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9a6b3ed..d67ad90 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1789,6 +1789,7 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,
 			config.abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
 		/* Copy over all the old settings */
 		config.phy_type = abilities.phy_type;
+		config.phy_type_ext = abilities.phy_type_ext;
 		config.link_speed = abilities.link_speed;
 		config.eee_capability = abilities.eee_capability;
 		config.eeer = abilities.eeer_val;
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e/base: fix bit test mask' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (19 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix flow control set for 25G' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix long link down notification time' " Yuanhan Liu
                   ` (57 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From dcf70be182cfb946693067368b9ee2247afbe5bb Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Sat, 10 Dec 2016 19:24:26 +0800
Subject: [PATCH] net/i40e/base: fix bit test mask

[ upstream commit 2551ed46ff379679dbf0a733a65f4c650d29c120 ]

Incorrect bit mask was used for testing "get link status" response.
Instead of I40E_AQ_LSE_ENABLE (which is actually 0x03) it should
be I40E_AQ_LSE_IS_ENABLED (which is defined as 0x01).

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index d67ad90..0409050 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1975,7 +1975,7 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
 	else
 		hw_link_info->crc_enable = false;
 
-	if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_ENABLE))
+	if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_IS_ENABLED))
 		hw_link_info->lse_enable = true;
 	else
 		hw_link_info->lse_enable = false;
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e/base: fix long link down notification time' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (20 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix bit test mask' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix unknown PHYs incorrect identification' " Yuanhan Liu
                   ` (56 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 1dc6b15de1ce97a5b65572c777d052bcf11f09f4 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Sat, 10 Dec 2016 19:24:28 +0800
Subject: [PATCH] net/i40e/base: fix long link down notification time

[ upstream commit 75c3de654eadadfbccf8b6d3d26496453a379723 ]

This patch fixes a problem where it could take a very
long time (>100 msec) to print the link down notification.
This problem is fixed by changing how often we update link
info from fw, when link is down. Without this patch, it can
take over 100msec to notify user link is down.

Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 0409050..cba3bc5 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2746,7 +2746,10 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
 	if (status)
 		return status;
 
-	if (hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) {
+	/* extra checking needed to ensure link info to user is timely */
+	if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
+	    ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
+	     !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) {
 		status = i40e_aq_get_phy_capabilities(hw, false, false,
 						      &abilities, NULL);
 		if (status)
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e/base: fix unknown PHYs incorrect identification' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (21 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix long link down notification time' " Yuanhan Liu
@ 2017-01-23  7:46 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix WoL failure on PF reset' " Yuanhan Liu
                   ` (55 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:46 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 190ff7a112900e1c86e4c8b74a5f4ccb045fb9eb Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Sat, 10 Dec 2016 19:24:33 +0800
Subject: [PATCH] net/i40e/base: fix unknown PHYs incorrect identification

[ upstream commit e19e16ad7a39033650057e0d24f55502da4f15d9 ]

The PHY type value for unrecognized PHYs and cables was changed
based on firmware version number. Newer hardware use lower firmware
version numbers and this was causing some PHYs to be identified
as type 0x16 instead of 0xe (unknown).

Without this patch, newer card will incorrectly identify unknown
PHYs and cables.

This change adds hardware type to the check for firmware version
so the PHY type is reported correctly.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index cba3bc5..3fb2992 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1980,7 +1980,8 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
 	else
 		hw_link_info->lse_enable = false;
 
-	if ((hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 &&
+	if ((hw->mac.type == I40E_MAC_XL710) &&
+	    (hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 &&
 	     hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
 		hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
 
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e/base: fix WoL failure on PF reset' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (22 preceding siblings ...)
  2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix unknown PHYs incorrect identification' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix NVM access interfering' " Yuanhan Liu
                   ` (54 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 21de86f68bf604b54ebfc84145d4509dd8a1d2f9 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Sat, 10 Dec 2016 19:24:42 +0800
Subject: [PATCH] net/i40e/base: fix WoL failure on PF reset

[ upstream commit ec3bd63e870fa28174804973f232e0a67d3d8d24 ]

By default the device clears all MAC filter information on PF Reset.
However, this will cause Wake-On-LAN to fail because the wake filters
are deleted on transition to D3 power state. To get around this,
firmware is adding functionality to preserve certain MAC filters during
PFR. These bits allow the driver tell the FW which filters to preserve.

Set the datalen field and add I40E_AQ_FLAG_BUF/I40E_AQ_FLAG_RD flags in the
desc struct for the WoL/Proxy AQ descriptors. The WoL/Proxy AQ commands
were failing because these were missing.

Fixes: 3c89193a36fd ("i40e/base: support WOL config for X722")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/base/i40e_adminq_cmd.h |  5 ++++-
 drivers/net/i40e/base/i40e_common.c     | 16 +++++++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 4f06772..d5cf61e 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -540,7 +540,8 @@ struct i40e_aqc_mac_address_read {
 #define I40E_AQC_PORT_ADDR_VALID	0x40
 #define I40E_AQC_WOL_ADDR_VALID		0x80
 #define I40E_AQC_MC_MAG_EN_VALID	0x100
-#define I40E_AQC_ADDR_VALID_MASK	0x1F0
+#define I40E_AQC_WOL_PRESERVE_STATUS	0x200
+#define I40E_AQC_ADDR_VALID_MASK	0x3F0
 	u8	reserved[6];
 	__le32	addr_high;
 	__le32	addr_low;
@@ -561,6 +562,7 @@ I40E_CHECK_STRUCT_LEN(24, i40e_aqc_mac_address_read_data);
 struct i40e_aqc_mac_address_write {
 	__le16	command_flags;
 #define I40E_AQC_MC_MAG_EN		0x0100
+#define I40E_AQC_WOL_PRESERVE_ON_PFR	0x0200
 #define I40E_AQC_WRITE_TYPE_LAA_ONLY	0x0000
 #define I40E_AQC_WRITE_TYPE_LAA_WOL	0x4000
 #define I40E_AQC_WRITE_TYPE_PORT	0x8000
@@ -600,6 +602,7 @@ struct i40e_aqc_set_wol_filter {
 	__le16 cmd_flags;
 #define I40E_AQC_SET_WOL_FILTER				0x8000
 #define I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL		0x4000
+#define I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR	0x2000
 #define I40E_AQC_SET_WOL_FILTER_ACTION_CLEAR		0
 #define I40E_AQC_SET_WOL_FILTER_ACTION_SET		1
 	__le16 valid_flags;
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 3fb2992..02d9277 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6596,10 +6596,13 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
 
 	i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_proxy_config);
 
+	desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
+	desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
 	desc.params.external.addr_high =
 				  CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config));
 	desc.params.external.addr_low =
 				  CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config));
+	desc.datalen = sizeof(struct i40e_aqc_arp_proxy_data);
 
 	status = i40e_asq_send_command(hw, &desc, proxy_config,
 				       sizeof(struct i40e_aqc_arp_proxy_data),
@@ -6630,10 +6633,13 @@ enum i40e_status_code i40e_aq_set_ns_proxy_table_entry(struct i40e_hw *hw,
 	i40e_fill_default_direct_cmd_desc(&desc,
 				i40e_aqc_opc_set_ns_proxy_table_entry);
 
+	desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
+	desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
 	desc.params.external.addr_high =
 		CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry));
 	desc.params.external.addr_low =
 		CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry));
+	desc.datalen = sizeof(struct i40e_aqc_ns_proxy_data);
 
 	status = i40e_asq_send_command(hw, &desc, ns_proxy_table_entry,
 				       sizeof(struct i40e_aqc_ns_proxy_data),
@@ -6680,9 +6686,11 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
 	if (set_filter) {
 		if (!filter)
 			return  I40E_ERR_PARAM;
+
 		cmd_flags |= I40E_AQC_SET_WOL_FILTER;
-		buff_len = sizeof(*filter);
+		cmd_flags |= I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR;
 	}
+
 	if (no_wol_tco)
 		cmd_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL;
 	cmd->cmd_flags = CPU_TO_LE16(cmd_flags);
@@ -6693,6 +6701,12 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
 		valid_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_ACTION_VALID;
 	cmd->valid_flags = CPU_TO_LE16(valid_flags);
 
+	buff_len = sizeof(*filter);
+	desc.datalen = buff_len;
+
+	desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
+	desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
+
 	cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((u64)filter));
 	cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)filter));
 
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e/base: fix NVM access interfering' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (23 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix WoL failure on PF reset' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix division by zero' " Yuanhan Liu
                   ` (53 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 5da762ced0e231f007c4a1af08324bcbfd7029e8 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Sat, 10 Dec 2016 19:24:44 +0800
Subject: [PATCH] net/i40e/base: fix NVM access interfering

[ upstream commit c5846a125b261c4960561f72848c270202c1596c ]

Acquire NVM lock before reads on all devices.  Previously, locks were
only used for X722 and later.  Fixes an issue where simultaneous X710
NVM accesses were interfering with each other.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/base/i40e_nvm.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 4fa1220..74a9a5b 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -219,19 +219,19 @@ enum i40e_status_code i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
 {
 	enum i40e_status_code ret_code = I40E_SUCCESS;
 
+	ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
+	if (!ret_code) {
 #ifdef X722_SUPPORT
-	if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
-		ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
-		if (!ret_code) {
+		if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
 			ret_code = i40e_read_nvm_word_aq(hw, offset, data);
-			i40e_release_nvm(hw);
+		} else {
+			ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
 		}
-	} else {
-		ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
-	}
 #else
-	ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
+		ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
 #endif
+		i40e_release_nvm(hw);
+	}
 	return ret_code;
 }
 
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e/base: fix division by zero' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (24 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix NVM access interfering' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix byte order' " Yuanhan Liu
                   ` (52 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From c37b4644a0a5e0aff793739d07587c0e004bce21 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Sat, 10 Dec 2016 19:24:50 +0800
Subject: [PATCH] net/i40e/base: fix division by zero

[ upstream commit 5a26067443621bf77e582be69b433540f7e657a8 ]

For some cases when reading from device are incorrect or image is
incorrect, this part of code causes crash due to division by zero.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 02d9277..9a7c5e1 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -3879,8 +3879,10 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
 	/* partition id is 1-based, and functions are evenly spread
 	 * across the ports as partitions
 	 */
-	hw->partition_id = (hw->pf_id / hw->num_ports) + 1;
-	hw->num_partitions = num_functions / hw->num_ports;
+	if (hw->num_ports != 0) {
+		hw->partition_id = (hw->pf_id / hw->num_ports) + 1;
+		hw->num_partitions = num_functions / hw->num_ports;
+	}
 
 	/* additional HW specific goodies that might
 	 * someday be HW version specific
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e/base: fix byte order' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (25 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix division by zero' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix resource leak' " Yuanhan Liu
                   ` (51 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 390cdfc85be40d1a6ec24bb2d38eb7e36142362f Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Sat, 10 Dec 2016 19:24:51 +0800
Subject: [PATCH] net/i40e/base: fix byte order

[ upstream commit 61407696fc63ae645a928df9f9ce4c9d17bc12c0 ]

Big Endian platform will accidentally send the wrong
data to the firmware command. This patch fixes the issue.

Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722")
Fixes: 3c89193a36fd ("i40e/base: support WOL config for X722")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9a7c5e1..edf9108 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6604,7 +6604,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
 				  CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config));
 	desc.params.external.addr_low =
 				  CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config));
-	desc.datalen = sizeof(struct i40e_aqc_arp_proxy_data);
+	desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_arp_proxy_data));
 
 	status = i40e_asq_send_command(hw, &desc, proxy_config,
 				       sizeof(struct i40e_aqc_arp_proxy_data),
@@ -6641,7 +6641,7 @@ enum i40e_status_code i40e_aq_set_ns_proxy_table_entry(struct i40e_hw *hw,
 		CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry));
 	desc.params.external.addr_low =
 		CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry));
-	desc.datalen = sizeof(struct i40e_aqc_ns_proxy_data);
+	desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_ns_proxy_data));
 
 	status = i40e_asq_send_command(hw, &desc, ns_proxy_table_entry,
 				       sizeof(struct i40e_aqc_ns_proxy_data),
@@ -6704,7 +6704,7 @@ enum i40e_status_code i40e_aq_set_clear_wol_filter(struct i40e_hw *hw,
 	cmd->valid_flags = CPU_TO_LE16(valid_flags);
 
 	buff_len = sizeof(*filter);
-	desc.datalen = buff_len;
+	desc.datalen = CPU_TO_LE16(buff_len);
 
 	desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF);
 	desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD);
-- 
1.9.0

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

* [dpdk-stable] patch 'net/qede: fix resource leak' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (26 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix byte order' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/pcap: fix timestamps in output pcap file' " Yuanhan Liu
                   ` (50 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Yong Wang; +Cc: Yuanhan Liu, Harish Patil, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 0604811eceb1ef8d9ed5b28251fca3d2475c23cb Mon Sep 17 00:00:00 2001
From: Yong Wang <wang.yong19@zte.com.cn>
Date: Wed, 30 Nov 2016 07:32:09 -0500
Subject: [PATCH] net/qede: fix resource leak

[ upstream commit 7bb4b07057a7c129ce7eec65af56e0bfb7f675b5 ]

Current code does not close 'fd' on function exit, leaking resources.

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

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Harish Patil <harish.patil@qlogic.com>
---
 drivers/net/qede/qede_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index ab22409..b666e1c 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -137,6 +137,7 @@ static int qed_load_firmware_data(struct ecore_dev *edev)
 
 	if (fstat(fd, &st) < 0) {
 		DP_NOTICE(edev, false, "Can't stat firmware file\n");
+		close(fd);
 		return -1;
 	}
 
@@ -158,9 +159,11 @@ static int qed_load_firmware_data(struct ecore_dev *edev)
 	if (edev->fw_len < 104) {
 		DP_NOTICE(edev, false, "Invalid fw size: %" PRIu64 "\n",
 			  edev->fw_len);
+		close(fd);
 		return -EINVAL;
 	}
 
+	close(fd);
 	return 0;
 }
 #endif
-- 
1.9.0

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

* [dpdk-stable] patch 'net/pcap: fix timestamps in output pcap file' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (27 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix resource leak' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/vmxnet3: fix Rx deadlock' " Yuanhan Liu
                   ` (49 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Piotr Bartosiewicz
  Cc: Yuanhan Liu, Michał Mirosław, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 6394c08d4047adbae5a15a226709602fc770a673 Mon Sep 17 00:00:00 2001
From: Piotr Bartosiewicz <piotr.bartosiewicz@atendesoftware.pl>
Date: Tue, 13 Dec 2016 02:08:17 +0100
Subject: [PATCH] net/pcap: fix timestamps in output pcap file
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit c4fdcb6aedfc73e8c5284d7f5e7af2e742f2c4e1 ]
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes: 4c173302c307 ("pcap: add new driver")

Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 0162f44..57b0b31 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -247,7 +247,7 @@ calculate_timestamp(struct timeval *ts) {
 
 	cycles = rte_get_timer_cycles() - start_cycles;
 	cur_time.tv_sec = cycles / hz;
-	cur_time.tv_usec = (cycles % hz) * 10e6 / hz;
+	cur_time.tv_usec = (cycles % hz) * 1e6 / hz;
 	timeradd(&start_time, &cur_time, ts);
 }
 
-- 
1.9.0

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

* [dpdk-stable] patch 'net/vmxnet3: fix Rx deadlock' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (28 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/pcap: fix timestamps in output pcap file' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/nfp: fix typo in Tx offload capabilities' " Yuanhan Liu
                   ` (48 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Stefan Puiu; +Cc: Yuanhan Liu, Yong Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 6c4c8b6bbd97e91b8aa849c0aa6e38a593375786 Mon Sep 17 00:00:00 2001
From: Stefan Puiu <stefan.puiu@gmail.com>
Date: Mon, 19 Dec 2016 11:40:53 +0200
Subject: [PATCH] net/vmxnet3: fix Rx deadlock

[ upstream commit 8fce14b789aecdb4345a62f6980e7b6e7f4ba245 ]

Our use case is that we have an app that needs to keep mbufs around
for a while. We've seen cases when calling vmxnet3_post_rx_bufs() from
vmxet3_recv_pkts(), it might not succeed to add any mbufs to any RX
descriptors (where it returns -err). Since there are no mbufs that the
virtual hardware can use, no packets will be received after this; the
driver won't refill the mbuf after this so it gets stuck in this
state. I call this a deadlock for lack of a better term - the virtual
HW waits for free mbufs, while the app waits for the hardware to
notify it for data (by flipping the generation bit on the used Rx
descriptors). Note that after this, the app can't recover.

This fix is a rework of this patch by Marco Lee:
http://dpdk.org/dev/patchwork/patch/6575/. I had to forward port
it, address review comments and also reverted the allocation
failure handling to the first version of the patch
(http://dpdk.org/ml/archives/dev/2015-July/022079.html), since
that's the only approach that seems to work, and seems to be what
other drivers are doing (I checked ixgbe and em). Reusing the mbuf
that's getting passed to the application doesn't seem to make
sense, and it was causing weird issues in our app. Also, reusing
rxm without checking if it's NULL could cause the code to crash.

Fixes: 14680e3747d5 ("vmxnet3: improve Rx performance")

Signed-off-by: Stefan Puiu <stefan.puiu@gmail.com>
Acked-by: Yong Wang <yongwang@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 39 ++++++++++++++++++++++++++++++++++++--
 1 file changed, 37 insertions(+), 2 deletions(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index b109168..93db10f 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -518,6 +518,32 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	return nb_tx;
 }
 
+static inline void
+vmxnet3_renew_desc(vmxnet3_rx_queue_t *rxq, uint8_t ring_id,
+		   struct rte_mbuf *mbuf)
+{
+	uint32_t val = 0;
+	struct vmxnet3_cmd_ring *ring = &rxq->cmd_ring[ring_id];
+	struct Vmxnet3_RxDesc *rxd =
+		(struct Vmxnet3_RxDesc *)(ring->base + ring->next2fill);
+	vmxnet3_buf_info_t *buf_info = &ring->buf_info[ring->next2fill];
+
+	if (ring_id == 0)
+		val = VMXNET3_RXD_BTYPE_HEAD;
+	else
+		val = VMXNET3_RXD_BTYPE_BODY;
+
+	buf_info->m = mbuf;
+	buf_info->len = (uint16_t)(mbuf->buf_len - RTE_PKTMBUF_HEADROOM);
+	buf_info->bufPA = rte_mbuf_data_dma_addr_default(mbuf);
+
+	rxd->addr = buf_info->bufPA;
+	rxd->btype = val;
+	rxd->len = buf_info->len;
+	rxd->gen = ring->gen;
+
+	vmxnet3_cmd_ring_adv_next2fill(ring);
+}
 /*
  *  Allocates mbufs and clusters. Post rx descriptors with buffer details
  *  so that device can receive packets in those buffers.
@@ -657,9 +683,18 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	}
 
 	while (rcd->gen == rxq->comp_ring.gen) {
+		struct rte_mbuf *newm;
+
 		if (nb_rx >= nb_pkts)
 			break;
 
+		newm = rte_mbuf_raw_alloc(rxq->mp);
+		if (unlikely(newm == NULL)) {
+			PMD_RX_LOG(ERR, "Error allocating mbuf");
+			rxq->stats.rx_buf_alloc_failure++;
+			break;
+		}
+
 		idx = rcd->rxdIdx;
 		ring_idx = (uint8_t)((rcd->rqID == rxq->qid1) ? 0 : 1);
 		rxd = (Vmxnet3_RxDesc *)rxq->cmd_ring[ring_idx].base + idx;
@@ -759,8 +794,8 @@ rcd_done:
 		VMXNET3_INC_RING_IDX_ONLY(rxq->cmd_ring[ring_idx].next2comp,
 					  rxq->cmd_ring[ring_idx].size);
 
-		/* It's time to allocate some new buf and renew descriptors */
-		vmxnet3_post_rx_bufs(rxq, ring_idx);
+		/* It's time to renew descriptors */
+		vmxnet3_renew_desc(rxq, ring_idx, newm);
 		if (unlikely(rxq->shared->ctrl.updateRxProd)) {
 			VMXNET3_WRITE_BAR0_REG(hw, rxprod_reg[ring_idx] + (rxq->queue_id * VMXNET3_REG_ALIGN),
 					       rxq->cmd_ring[ring_idx].next2fill);
-- 
1.9.0

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

* [dpdk-stable] patch 'net/nfp: fix typo in Tx offload capabilities' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (29 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/vmxnet3: fix Rx deadlock' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix PHY reset check for x550em-ext' " Yuanhan Liu
                   ` (47 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 0cc6c9a70c4ac1b19b26ba3a1d322106bb096b80 Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Mon, 19 Dec 2016 12:22:39 +0000
Subject: [PATCH] net/nfp: fix typo in Tx offload capabilities

[ upstream commit 348dbdd8d1cc1477c24802424ecb0df40dfae73a ]

Because macros for TCP and UDP related to offload cksums have
same values, this was not a main problem. But better to use the
right ones.

Fixes: d4a27a3b092a ("nfp: add basic features")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index c6b1587..f4c09f1 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1027,8 +1027,8 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 
 	if (hw->cap & NFP_NET_CFG_CTRL_TXCSUM)
 		dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_IPV4_CKSUM |
-					     DEV_RX_OFFLOAD_UDP_CKSUM |
-					     DEV_RX_OFFLOAD_TCP_CKSUM;
+					     DEV_TX_OFFLOAD_UDP_CKSUM |
+					     DEV_TX_OFFLOAD_TCP_CKSUM;
 
 	dev_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_thresh = {
-- 
1.9.0

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

* [dpdk-stable] patch 'net/ixgbe/base: fix PHY reset check for x550em-ext' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (30 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/nfp: fix typo in Tx offload capabilities' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix clearing SAN MAC address' " Yuanhan Liu
                   ` (46 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Wei Dai; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From ae44b8a30a96e66670749bbbbb8091dd7be8a4f3 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Wed, 21 Dec 2016 17:47:45 +0800
Subject: [PATCH] net/ixgbe/base: fix PHY reset check for x550em-ext

[ upstream commit e39713e45fdee330aa1fc9a21ec1a44a26cf1d0d ]

PHY type ixgbe_phy_x550em_ext_t requires different check
to verify reset status.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_phy.c | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 43c55d7..1d9fb3e 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -528,11 +528,30 @@ s32 ixgbe_reset_phy_generic(struct ixgbe_hw *hw)
 	 */
 	for (i = 0; i < 30; i++) {
 		msec_delay(100);
-		hw->phy.ops.read_reg(hw, IXGBE_MDIO_PHY_XS_CONTROL,
-				     IXGBE_MDIO_PHY_XS_DEV_TYPE, &ctrl);
-		if (!(ctrl & IXGBE_MDIO_PHY_XS_RESET)) {
-			usec_delay(2);
-			break;
+		if (hw->phy.type == ixgbe_phy_x550em_ext_t) {
+			status = hw->phy.ops.read_reg(hw,
+						  IXGBE_MDIO_TX_VENDOR_ALARMS_3,
+						  IXGBE_MDIO_PMA_PMD_DEV_TYPE,
+						  &ctrl);
+			if (status != IXGBE_SUCCESS)
+				return status;
+
+			if (ctrl & IXGBE_MDIO_TX_VENDOR_ALARMS_3_RST_MASK) {
+				usec_delay(2);
+				break;
+			}
+		} else {
+			status = hw->phy.ops.read_reg(hw,
+						     IXGBE_MDIO_PHY_XS_CONTROL,
+						     IXGBE_MDIO_PHY_XS_DEV_TYPE,
+						     &ctrl);
+			if (status != IXGBE_SUCCESS)
+				return status;
+
+			if (!(ctrl & IXGBE_MDIO_PHY_XS_RESET)) {
+				usec_delay(2);
+				break;
+			}
 		}
 	}
 
-- 
1.9.0

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

* [dpdk-stable] patch 'net/ixgbe/base: fix clearing SAN MAC address' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (31 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix PHY reset check for x550em-ext' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix PHY identification for x550a' " Yuanhan Liu
                   ` (45 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Wei Dai; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From a7e9ec8612596ea02af01d9b4c3dc3d31566154c Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Wed, 21 Dec 2016 17:47:46 +0800
Subject: [PATCH] net/ixgbe/base: fix clearing SAN MAC address

[ upstream commit 1b417db3d3d1a92ebcef25913a5e268c4cae830a ]

Receive Address Register (RAR) entries, including SAN MAC address,
are cleared when VMDq pool bits are cleared.
Prevent SAN MAC address to be cleared.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index cca19ef..b2cc6fb 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -3764,7 +3764,8 @@ s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
 	}
 
 	/* was that the last pool using this rar? */
-	if (mpsar_lo == 0 && mpsar_hi == 0 && rar != 0)
+	if (mpsar_lo == 0 && mpsar_hi == 0 &&
+	    rar != 0 && rar != hw->mac.san_mac_rar_index)
 		hw->mac.ops.clear_rar(hw, rar);
 done:
 	return IXGBE_SUCCESS;
-- 
1.9.0

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

* [dpdk-stable] patch 'net/ixgbe/base: fix PHY identification for x550a' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (32 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix clearing SAN MAC address' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix getting PHY type for some x550 devices' " Yuanhan Liu
                   ` (44 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Wei Dai; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 0236a94c6a792a6b9b43746db46e9feca58b8b71 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Wed, 21 Dec 2016 17:47:48 +0800
Subject: [PATCH] net/ixgbe/base: fix PHY identification for x550a

[ upstream commit 5b313c497f25f84eacb72e3a5d15689400189cb1 ]

Method to identify the CS4223/CS4227 is incorrect and unreliable.
Provide a new register to differentiate between these PHY SKUs.

Fixes: fc0559bdb5e3 ("net/ixgbe/base: add link MAC setup for X550a SFP+")

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_phy.h  | 5 +++--
 drivers/net/ixgbe/base/ixgbe_x550.c | 6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_phy.h b/drivers/net/ixgbe/base/ixgbe_phy.h
index da14abc..816de36 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.h
+++ b/drivers/net/ixgbe/base/ixgbe_phy.h
@@ -92,8 +92,9 @@ POSSIBILITY OF SUCH DAMAGE.
 #define IXGBE_CS4227_GLOBAL_ID_MSB	1
 #define IXGBE_CS4227_SCRATCH		2
 #define IXGBE_CS4227_GLOBAL_ID_VALUE	0x03E5
-#define IXGBE_CS4223_PHY_ID		0x7003	/* Quad port */
-#define IXGBE_CS4227_PHY_ID		0x3003	/* Dual port */
+#define IXGBE_CS4227_EFUSE_PDF_SKU	0x19F
+#define IXGBE_CS4223_SKU_ID		0x0010	/* Quad port */
+#define IXGBE_CS4227_SKU_ID		0x0014	/* Dual port */
 #define IXGBE_CS4227_RESET_PENDING	0x1357
 #define IXGBE_CS4227_RESET_COMPLETE	0x5AA5
 #define IXGBE_CS4227_RETRIES		15
diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index acb8140..909f50f 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -2922,8 +2922,8 @@ s32 ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw,
 			return IXGBE_ERR_PHY_ADDR_INVALID;
 		}
 
-		/* Get external PHY device id */
-		ret_val = hw->phy.ops.read_reg(hw, IXGBE_CS4227_GLOBAL_ID_MSB,
+		/* Get external PHY SKU id */
+		ret_val = hw->phy.ops.read_reg(hw, IXGBE_CS4227_EFUSE_PDF_SKU,
 					IXGBE_MDIO_ZERO_DEV_TYPE, &reg_phy_ext);
 
 		if (ret_val != IXGBE_SUCCESS)
@@ -2932,7 +2932,7 @@ s32 ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw,
 		/* When configuring quad port CS4223, the MAC instance is part
 		 * of the slice offset.
 		 */
-		if (reg_phy_ext == IXGBE_CS4223_PHY_ID)
+		if (reg_phy_ext == IXGBE_CS4223_SKU_ID)
 			slice_offset = (hw->bus.lan_id +
 					(hw->bus.instance_id << 1)) << 12;
 		else
-- 
1.9.0

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

* [dpdk-stable] patch 'net/ixgbe/base: fix getting PHY type for some x550 devices' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (33 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix PHY identification for x550a' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix SGMII link setup for M88 PHYs' " Yuanhan Liu
                   ` (43 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Wei Dai; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From ceae49ba8178c45d10c283642097227fbae8a963 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Wed, 21 Dec 2016 17:47:55 +0800
Subject: [PATCH] net/ixgbe/base: fix getting PHY type for some x550 devices

[ upstream commit 63b32fda0c575609429a3c93078b6049c7bdebf1 ]

Return correct physical layer for some x550 devices.

Fixes: 76d5b807ff74 ("ixgbe/base: new X557 phy")
Fixes: d2e72774e58c ("ixgbe/base: support X550")

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_x550.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index 909f50f..a134f69 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -3772,6 +3772,8 @@ u32 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw)
 		if (ext_ability & IXGBE_MDIO_PHY_1000BASET_ABILITY)
 			physical_layer |= IXGBE_PHYSICAL_LAYER_1000BASE_T;
 		break;
+	case ixgbe_phy_m88:
+		physical_layer = IXGBE_PHYSICAL_LAYER_1000BASE_T;
 	default:
 		break;
 	}
-- 
1.9.0

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

* [dpdk-stable] patch 'net/ixgbe/base: fix SGMII link setup for M88 PHYs' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (34 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix getting PHY type for some x550 devices' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix setting unsupported autoneg speeds' " Yuanhan Liu
                   ` (42 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Wei Dai; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From ca7550d3458e1d14652ad6899b2163d60e6114c4 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Wed, 21 Dec 2016 17:47:56 +0800
Subject: [PATCH] net/ixgbe/base: fix SGMII link setup for M88 PHYs

[ upstream commit f7894d88b31d0986f6c6576066b89b4e6ec2a524 ]

Fix ixgbe_setup_sgmii_m88 to set lane speed to autoneg instead of 1G
to prevent problems with link between PHYs

Fixes: d4b4c6845487 ("net/ixgbe/base: add X550em_a FW ALEF support")

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_x550.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index a134f69..8a4c6ed 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -1776,7 +1776,7 @@ STATIC s32 ixgbe_setup_sgmii_m88(struct ixgbe_hw *hw, ixgbe_link_speed speed,
 		return rc;
 
 	flx_val &= ~IXGBE_KRM_PMD_FLX_MASK_ST20_SPEED_MASK;
-	flx_val |= IXGBE_KRM_PMD_FLX_MASK_ST20_SPEED_1G;
+	flx_val |= IXGBE_KRM_PMD_FLX_MASK_ST20_SPEED_AN;
 	flx_val &= ~IXGBE_KRM_PMD_FLX_MASK_ST20_AN_EN;
 	flx_val |= IXGBE_KRM_PMD_FLX_MASK_ST20_SGMII_EN;
 	flx_val |= IXGBE_KRM_PMD_FLX_MASK_ST20_AN37_EN;
-- 
1.9.0

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

* [dpdk-stable] patch 'net/ixgbe/base: fix setting unsupported autoneg speeds' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (35 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix SGMII link setup for M88 PHYs' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix IXGBE LSWFW register' " Yuanhan Liu
                   ` (41 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Wei Dai; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 2f00a50a5d595f9fd750a915f08d59961abac7d6 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Wed, 21 Dec 2016 17:47:58 +0800
Subject: [PATCH] net/ixgbe/base: fix setting unsupported autoneg speeds

[ upstream commit 222c65194151bd68803adb311635e078323f7e0a ]

Update ixgbe_setup_phy_link_generic that set/unset auto-negotiation.
Ensure that unsupported auto-negotiation speeds are unset.

This is necessary since the PHY NVM may advertise unsupported speeds.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_phy.c | 130 +++++++++++++++----------------------
 1 file changed, 51 insertions(+), 79 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 1d9fb3e..54e45b2 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -787,91 +787,63 @@ s32 ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw)
 
 	ixgbe_get_copper_link_capabilities_generic(hw, &speed, &autoneg);
 
-	if (speed & IXGBE_LINK_SPEED_10GB_FULL) {
-		/* Set or unset auto-negotiation 10G advertisement */
-		hw->phy.ops.read_reg(hw, IXGBE_MII_10GBASE_T_AUTONEG_CTRL_REG,
-				     IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				     &autoneg_reg);
-
-		autoneg_reg &= ~IXGBE_MII_10GBASE_T_ADVERTISE;
-		if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL)
-			autoneg_reg |= IXGBE_MII_10GBASE_T_ADVERTISE;
-
-		hw->phy.ops.write_reg(hw, IXGBE_MII_10GBASE_T_AUTONEG_CTRL_REG,
-				      IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				      autoneg_reg);
-	}
-
-	if (hw->mac.type == ixgbe_mac_X550) {
-		if (speed & IXGBE_LINK_SPEED_5GB_FULL) {
-			/* Set or unset auto-negotiation 5G advertisement */
-			hw->phy.ops.read_reg(hw,
-				IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
-				IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				&autoneg_reg);
-
-			autoneg_reg &= ~IXGBE_MII_5GBASE_T_ADVERTISE;
-			if (hw->phy.autoneg_advertised &
-			     IXGBE_LINK_SPEED_5GB_FULL)
-				autoneg_reg |= IXGBE_MII_5GBASE_T_ADVERTISE;
-
-			hw->phy.ops.write_reg(hw,
-				IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
-				IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				autoneg_reg);
-		}
+	/* Set or unset auto-negotiation 10G advertisement */
+	hw->phy.ops.read_reg(hw, IXGBE_MII_10GBASE_T_AUTONEG_CTRL_REG,
+			     IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
+			     &autoneg_reg);
 
-		if (speed & IXGBE_LINK_SPEED_2_5GB_FULL) {
-			/* Set or unset auto-negotiation 2.5G advertisement */
-			hw->phy.ops.read_reg(hw,
-				IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
-				IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				&autoneg_reg);
-
-			autoneg_reg &= ~IXGBE_MII_2_5GBASE_T_ADVERTISE;
-			if (hw->phy.autoneg_advertised &
-			    IXGBE_LINK_SPEED_2_5GB_FULL)
-				autoneg_reg |= IXGBE_MII_2_5GBASE_T_ADVERTISE;
-
-			hw->phy.ops.write_reg(hw,
-				IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
-				IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				autoneg_reg);
-		}
-	}
+	autoneg_reg &= ~IXGBE_MII_10GBASE_T_ADVERTISE;
+	if ((hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL) &&
+	    (speed & IXGBE_LINK_SPEED_10GB_FULL))
+		autoneg_reg |= IXGBE_MII_10GBASE_T_ADVERTISE;
 
-	if (speed & IXGBE_LINK_SPEED_1GB_FULL) {
-		/* Set or unset auto-negotiation 1G advertisement */
-		hw->phy.ops.read_reg(hw,
-				     IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
-				     IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				     &autoneg_reg);
+	hw->phy.ops.write_reg(hw, IXGBE_MII_10GBASE_T_AUTONEG_CTRL_REG,
+			      IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
+			      autoneg_reg);
 
-		autoneg_reg &= ~IXGBE_MII_1GBASE_T_ADVERTISE;
-		if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL)
-			autoneg_reg |= IXGBE_MII_1GBASE_T_ADVERTISE;
+	hw->phy.ops.read_reg(hw, IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
+			     IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
+			     &autoneg_reg);
 
-		hw->phy.ops.write_reg(hw,
-				      IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
-				      IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				      autoneg_reg);
+	if (hw->mac.type == ixgbe_mac_X550) {
+		/* Set or unset auto-negotiation 5G advertisement */
+		autoneg_reg &= ~IXGBE_MII_5GBASE_T_ADVERTISE;
+		if ((hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_5GB_FULL) &&
+		    (speed & IXGBE_LINK_SPEED_5GB_FULL))
+			autoneg_reg |= IXGBE_MII_5GBASE_T_ADVERTISE;
+
+		/* Set or unset auto-negotiation 2.5G advertisement */
+		autoneg_reg &= ~IXGBE_MII_2_5GBASE_T_ADVERTISE;
+		if ((hw->phy.autoneg_advertised &
+		     IXGBE_LINK_SPEED_2_5GB_FULL) &&
+		    (speed & IXGBE_LINK_SPEED_2_5GB_FULL))
+			autoneg_reg |= IXGBE_MII_2_5GBASE_T_ADVERTISE;
 	}
 
-	if (speed & IXGBE_LINK_SPEED_100_FULL) {
-		/* Set or unset auto-negotiation 100M advertisement */
-		hw->phy.ops.read_reg(hw, IXGBE_MII_AUTONEG_ADVERTISE_REG,
-				     IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				     &autoneg_reg);
-
-		autoneg_reg &= ~(IXGBE_MII_100BASE_T_ADVERTISE |
-				 IXGBE_MII_100BASE_T_ADVERTISE_HALF);
-		if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_100_FULL)
-			autoneg_reg |= IXGBE_MII_100BASE_T_ADVERTISE;
-
-		hw->phy.ops.write_reg(hw, IXGBE_MII_AUTONEG_ADVERTISE_REG,
-				      IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				      autoneg_reg);
-	}
+	/* Set or unset auto-negotiation 1G advertisement */
+	autoneg_reg &= ~IXGBE_MII_1GBASE_T_ADVERTISE;
+	if ((hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL) &&
+	    (speed & IXGBE_LINK_SPEED_1GB_FULL))
+		autoneg_reg |= IXGBE_MII_1GBASE_T_ADVERTISE;
+
+	hw->phy.ops.write_reg(hw, IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
+			      IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
+			      autoneg_reg);
+
+	/* Set or unset auto-negotiation 100M advertisement */
+	hw->phy.ops.read_reg(hw, IXGBE_MII_AUTONEG_ADVERTISE_REG,
+			     IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
+			     &autoneg_reg);
+
+	autoneg_reg &= ~(IXGBE_MII_100BASE_T_ADVERTISE |
+			 IXGBE_MII_100BASE_T_ADVERTISE_HALF);
+	if ((hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_100_FULL) &&
+	    (speed & IXGBE_LINK_SPEED_100_FULL))
+		autoneg_reg |= IXGBE_MII_100BASE_T_ADVERTISE;
+
+	hw->phy.ops.write_reg(hw, IXGBE_MII_AUTONEG_ADVERTISE_REG,
+			      IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
+			      autoneg_reg);
 
 	/* Blocked by MNG FW so don't reset PHY */
 	if (ixgbe_check_reset_blocked(hw))
-- 
1.9.0

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

* [dpdk-stable] patch 'net/ixgbe/base: fix IXGBE LSWFW register' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (36 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix setting unsupported autoneg speeds' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
       [not found]   ` <49759EB36A64CF4892C1AFEC9231E8D63A354E36@PGSMSX106.gar.corp.intel.com>
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix filtering code' " Yuanhan Liu
                   ` (40 subsequent siblings)
  78 siblings, 1 reply; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Wei Dai; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From b8aa05644901c9f3e4c9aca04504b702b15043a9 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Wed, 21 Dec 2016 17:48:10 +0800
Subject: [PATCH] net/ixgbe/base: fix IXGBE LSWFW register

[ upstream commit 45f79aea9e4bce079bbfb86f8278c88633f299ee ]

This register was incorrect when compared to the data sheet.
Even though the driver doesn't currently use this register,
it is better to fix it upstream.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_type.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index 4982e03..a9b6914 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -1045,7 +1045,7 @@ struct ixgbe_dmac_config {
 #define IXGBE_FTFT		0x09400 /* 0x9400-0x97FC */
 #define IXGBE_METF(_i)		(0x05190 + ((_i) * 4)) /* 4 of these (0-3) */
 #define IXGBE_MDEF_EXT(_i)	(0x05160 + ((_i) * 4)) /* 8 of these (0-7) */
-#define IXGBE_LSWFW		0x15014
+#define IXGBE_LSWFW		0x15F14
 #define IXGBE_BMCIP(_i)		(0x05050 + ((_i) * 4)) /* 0x5050-0x505C */
 #define IXGBE_BMCIPVAL		0x05060
 #define IXGBE_BMCIP_IPADDR_TYPE	0x00000001
-- 
1.9.0

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

* [dpdk-stable] patch 'net/qede: fix filtering code' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (37 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix IXGBE LSWFW register' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: add vendor/device id info' " Yuanhan Liu
                   ` (39 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Harish Patil; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 8604d5ce501bc6f04b1ffe45a6890c16b74a0729 Mon Sep 17 00:00:00 2001
From: Harish Patil <harish.patil@qlogic.com>
Date: Thu, 22 Dec 2016 16:48:06 -0800
Subject: [PATCH] net/qede: fix filtering code

[ upstream commit 77fac1b54fc99daaf7e9c281edc09367bdcdbf06 ]

In qede_mac_addr_add() a check is added to differentiate between
unicast/multicast mac to prevent a multicast mac from being wrongly added
to unicast filter table. Secondly, two separate lists will be used to keep
track of unicast/multicast mac filters to prevent duplicate filter
programming. The other change is to remove filter_config from struct
qed_eth_ops_pass and invoke the base APIs directly. This avoids the need
to have multiple structs and function calls.

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

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
---
 drivers/net/qede/qede_eth_if.c | 101 +-------------
 drivers/net/qede/qede_eth_if.h |  36 +----
 drivers/net/qede/qede_ethdev.c | 303 ++++++++++++++++++++++++++++-------------
 drivers/net/qede/qede_ethdev.h |  15 ++
 4 files changed, 230 insertions(+), 225 deletions(-)

diff --git a/drivers/net/qede/qede_eth_if.c b/drivers/net/qede/qede_eth_if.c
index 1ae6127..30fded0 100644
--- a/drivers/net/qede/qede_eth_if.c
+++ b/drivers/net/qede/qede_eth_if.c
@@ -310,86 +310,11 @@ qed_get_vport_stats(struct ecore_dev *edev, struct ecore_eth_stats *stats)
 	ecore_get_vport_stats(edev, stats);
 }
 
-static int
-qed_configure_filter_ucast(struct ecore_dev *edev,
-			   struct qed_filter_ucast_params *params)
-{
-	struct ecore_filter_ucast ucast;
-
-	if (!params->vlan_valid && !params->mac_valid) {
-		DP_NOTICE(edev, true,
-			  "Tried configuring a unicast filter,"
-			  "but both MAC and VLAN are not set\n");
-		return -EINVAL;
-	}
-
-	memset(&ucast, 0, sizeof(ucast));
-	switch (params->type) {
-	case QED_FILTER_XCAST_TYPE_ADD:
-		ucast.opcode = ECORE_FILTER_ADD;
-		break;
-	case QED_FILTER_XCAST_TYPE_DEL:
-		ucast.opcode = ECORE_FILTER_REMOVE;
-		break;
-	case QED_FILTER_XCAST_TYPE_REPLACE:
-		ucast.opcode = ECORE_FILTER_REPLACE;
-		break;
-	default:
-		DP_NOTICE(edev, true, "Unknown unicast filter type %d\n",
-			  params->type);
-	}
-
-	if (params->vlan_valid && params->mac_valid) {
-		ucast.type = ECORE_FILTER_MAC_VLAN;
-		ether_addr_copy((struct ether_addr *)&params->mac,
-				(struct ether_addr *)&ucast.mac);
-		ucast.vlan = params->vlan;
-	} else if (params->mac_valid) {
-		ucast.type = ECORE_FILTER_MAC;
-		ether_addr_copy((struct ether_addr *)&params->mac,
-				(struct ether_addr *)&ucast.mac);
-	} else {
-		ucast.type = ECORE_FILTER_VLAN;
-		ucast.vlan = params->vlan;
-	}
-
-	ucast.is_rx_filter = true;
-	ucast.is_tx_filter = true;
-
-	return ecore_filter_ucast_cmd(edev, &ucast, ECORE_SPQ_MODE_CB, NULL);
-}
-
-static int
-qed_configure_filter_mcast(struct ecore_dev *edev,
-			   struct qed_filter_mcast_params *params)
-{
-	struct ecore_filter_mcast mcast;
-	int i;
-
-	memset(&mcast, 0, sizeof(mcast));
-	switch (params->type) {
-	case QED_FILTER_XCAST_TYPE_ADD:
-		mcast.opcode = ECORE_FILTER_ADD;
-		break;
-	case QED_FILTER_XCAST_TYPE_DEL:
-		mcast.opcode = ECORE_FILTER_REMOVE;
-		break;
-	default:
-		DP_NOTICE(edev, true, "Unknown multicast filter type %d\n",
-			  params->type);
-	}
-
-	mcast.num_mc_addrs = params->num;
-	for (i = 0; i < mcast.num_mc_addrs; i++)
-		ether_addr_copy((struct ether_addr *)&params->mac[i],
-				(struct ether_addr *)&mcast.mac[i]);
-
-	return ecore_filter_mcast_cmd(edev, &mcast, ECORE_SPQ_MODE_CB, NULL);
-}
-
-int qed_configure_filter_rx_mode(struct ecore_dev *edev,
+int qed_configure_filter_rx_mode(struct rte_eth_dev *eth_dev,
 				 enum qed_filter_rx_mode_type type)
 {
+	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
+	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
 	struct ecore_filter_accept_flags flags;
 
 	memset(&flags, 0, sizeof(flags));
@@ -422,25 +347,6 @@ int qed_configure_filter_rx_mode(struct ecore_dev *edev,
 				       ECORE_SPQ_MODE_CB, NULL);
 }
 
-static int
-qed_configure_filter(struct ecore_dev *edev, struct qed_filter_params *params)
-{
-	switch (params->type) {
-	case QED_FILTER_TYPE_UCAST:
-		return qed_configure_filter_ucast(edev, &params->filter.ucast);
-	case QED_FILTER_TYPE_MCAST:
-		return qed_configure_filter_mcast(edev, &params->filter.mcast);
-	case QED_FILTER_TYPE_RX_MODE:
-		return qed_configure_filter_rx_mode(edev,
-						    params->filter.
-						    accept_flags);
-	default:
-		DP_NOTICE(edev, true, "Unknown filter type %d\n",
-			  (int)params->type);
-		return -EINVAL;
-	}
-}
-
 static const struct qed_eth_ops qed_eth_ops_pass = {
 	INIT_STRUCT_FIELD(common, &qed_common_ops_pass),
 	INIT_STRUCT_FIELD(fill_dev_info, &qed_fill_eth_dev_info),
@@ -455,7 +361,6 @@ static const struct qed_eth_ops qed_eth_ops_pass = {
 	INIT_STRUCT_FIELD(fastpath_stop, &qed_fastpath_stop),
 	INIT_STRUCT_FIELD(fastpath_start, &qed_fastpath_start),
 	INIT_STRUCT_FIELD(get_vport_stats, &qed_get_vport_stats),
-	INIT_STRUCT_FIELD(filter_config, &qed_configure_filter),
 };
 
 const struct qed_eth_ops *qed_get_eth_ops(void)
diff --git a/drivers/net/qede/qede_eth_if.h b/drivers/net/qede/qede_eth_if.h
index 33655c3..9c0db87 100644
--- a/drivers/net/qede/qede_eth_if.h
+++ b/drivers/net/qede/qede_eth_if.h
@@ -26,12 +26,6 @@ enum qed_filter_rx_mode_type {
 	QED_FILTER_RX_MODE_TYPE_PROMISC,
 };
 
-enum qed_filter_xcast_params_type {
-	QED_FILTER_XCAST_TYPE_ADD,
-	QED_FILTER_XCAST_TYPE_DEL,
-	QED_FILTER_XCAST_TYPE_REPLACE,
-};
-
 enum qed_filter_type {
 	QED_FILTER_TYPE_UCAST,
 	QED_FILTER_TYPE_MCAST,
@@ -93,31 +87,6 @@ struct qed_stop_txq_params {
 	uint8_t tx_queue_id;
 };
 
-struct qed_filter_ucast_params {
-	enum qed_filter_xcast_params_type type;
-	uint8_t vlan_valid;
-	uint16_t vlan;
-	uint8_t mac_valid;
-	unsigned char mac[ETHER_ADDR_LEN];
-};
-
-struct qed_filter_mcast_params {
-	enum qed_filter_xcast_params_type type;
-	uint8_t num;
-	unsigned char mac[QEDE_MAX_MCAST_FILTERS][ETHER_ADDR_LEN];
-};
-
-union qed_filter_type_params {
-	enum qed_filter_rx_mode_type accept_flags;
-	struct qed_filter_ucast_params ucast;
-	struct qed_filter_mcast_params mcast;
-};
-
-struct qed_filter_params {
-	enum qed_filter_type type;
-	union qed_filter_type_params filter;
-};
-
 struct qed_eth_ops {
 	const struct qed_common_ops *common;
 
@@ -162,9 +131,6 @@ struct qed_eth_ops {
 
 	void (*get_vport_stats)(struct ecore_dev *edev,
 				struct ecore_eth_stats *stats);
-
-	int (*filter_config)(struct ecore_dev *edev,
-			     struct qed_filter_params *params);
 };
 
 /* externs */
@@ -173,7 +139,7 @@ extern const struct qed_common_ops qed_common_ops_pass;
 
 const struct qed_eth_ops *qed_get_eth_ops();
 
-int qed_configure_filter_rx_mode(struct ecore_dev *edev,
+int qed_configure_filter_rx_mode(struct rte_eth_dev *eth_dev,
 				 enum qed_filter_rx_mode_type type);
 
 #endif /* _QEDE_ETH_IF_H */
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 55441b9..b22f61e 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -223,47 +223,181 @@ static void qede_print_adapter_info(struct qede_dev *qdev)
 	DP_INFO(edev, "*********************************\n");
 }
 
+static void qede_set_ucast_cmn_params(struct ecore_filter_ucast *ucast)
+{
+	memset(ucast, 0, sizeof(struct ecore_filter_ucast));
+	ucast->is_rx_filter = true;
+	ucast->is_tx_filter = true;
+	/* ucast->assert_on_error = true; - For debug */
+}
+
 static int
-qede_set_ucast_rx_mac(struct qede_dev *qdev,
-		      enum qed_filter_xcast_params_type opcode,
-		      uint8_t mac[ETHER_ADDR_LEN])
+qede_ucast_filter(struct rte_eth_dev *eth_dev, struct ecore_filter_ucast *ucast,
+		  bool add)
 {
-	struct ecore_dev *edev = &qdev->edev;
-	struct qed_filter_params filter_cmd;
-
-	memset(&filter_cmd, 0, sizeof(filter_cmd));
-	filter_cmd.type = QED_FILTER_TYPE_UCAST;
-	filter_cmd.filter.ucast.type = opcode;
-	filter_cmd.filter.ucast.mac_valid = 1;
-	rte_memcpy(&filter_cmd.filter.ucast.mac[0], &mac[0], ETHER_ADDR_LEN);
-	return qdev->ops->filter_config(edev, &filter_cmd);
+	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
+	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
+	struct qede_ucast_entry *tmp = NULL;
+	struct qede_ucast_entry *u;
+	struct ether_addr *mac_addr;
+
+	mac_addr  = (struct ether_addr *)ucast->mac;
+	if (add) {
+		SLIST_FOREACH(tmp, &qdev->uc_list_head, list) {
+			if ((memcmp(mac_addr, &tmp->mac,
+				    ETHER_ADDR_LEN) == 0) &&
+			     ucast->vlan == tmp->vlan) {
+				DP_ERR(edev, "Unicast MAC is already added"
+				       " with vlan = %u, vni = %u\n",
+				       ucast->vlan,  ucast->vni);
+					return -EEXIST;
+			}
+		}
+		u = rte_malloc(NULL, sizeof(struct qede_ucast_entry),
+			       RTE_CACHE_LINE_SIZE);
+		if (!u) {
+			DP_ERR(edev, "Did not allocate memory for ucast\n");
+			return -ENOMEM;
+		}
+		ether_addr_copy(mac_addr, &u->mac);
+		u->vlan = ucast->vlan;
+		SLIST_INSERT_HEAD(&qdev->uc_list_head, u, list);
+		qdev->num_uc_addr++;
+	} else {
+		SLIST_FOREACH(tmp, &qdev->uc_list_head, list) {
+			if ((memcmp(mac_addr, &tmp->mac,
+				    ETHER_ADDR_LEN) == 0) &&
+			    ucast->vlan == tmp->vlan)
+			break;
+		}
+		if (tmp == NULL) {
+			DP_INFO(edev, "Unicast MAC is not found\n");
+			return -EINVAL;
+		}
+		SLIST_REMOVE(&qdev->uc_list_head, tmp, qede_ucast_entry, list);
+		qdev->num_uc_addr--;
+	}
+
+	return 0;
 }
 
-static void
-qede_mac_addr_add(struct rte_eth_dev *eth_dev, struct ether_addr *mac_addr,
-		  uint32_t index, __rte_unused uint32_t pool)
+static int
+qede_mcast_filter(struct rte_eth_dev *eth_dev, struct ecore_filter_ucast *mcast,
+		  bool add)
 {
-	struct qede_dev *qdev = eth_dev->data->dev_private;
-	struct ecore_dev *edev = &qdev->edev;
-	int rc;
+	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
+	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
+	struct ether_addr *mac_addr;
+	struct qede_mcast_entry *tmp = NULL;
+	struct qede_mcast_entry *m;
+
+	mac_addr  = (struct ether_addr *)mcast->mac;
+	if (add) {
+		SLIST_FOREACH(tmp, &qdev->mc_list_head, list) {
+			if (memcmp(mac_addr, &tmp->mac, ETHER_ADDR_LEN) == 0) {
+				DP_ERR(edev,
+					"Multicast MAC is already added\n");
+				return -EEXIST;
+			}
+		}
+		m = rte_malloc(NULL, sizeof(struct qede_mcast_entry),
+			RTE_CACHE_LINE_SIZE);
+		if (!m) {
+			DP_ERR(edev,
+				"Did not allocate memory for mcast\n");
+			return -ENOMEM;
+		}
+		ether_addr_copy(mac_addr, &m->mac);
+		SLIST_INSERT_HEAD(&qdev->mc_list_head, m, list);
+		qdev->num_mc_addr++;
+	} else {
+		SLIST_FOREACH(tmp, &qdev->mc_list_head, list) {
+			if (memcmp(mac_addr, &tmp->mac, ETHER_ADDR_LEN) == 0)
+				break;
+		}
+		if (tmp == NULL) {
+			DP_INFO(edev, "Multicast mac is not found\n");
+			return -EINVAL;
+		}
+		SLIST_REMOVE(&qdev->mc_list_head, tmp,
+			     qede_mcast_entry, list);
+		qdev->num_mc_addr--;
+	}
 
-	PMD_INIT_FUNC_TRACE(edev);
+	return 0;
+}
 
-	if (index >= qdev->dev_info.num_mac_addrs) {
-		DP_ERR(edev, "Index %u is above MAC filter limit %u\n",
-		       index, qdev->dev_info.num_mac_addrs);
-		return;
+static enum _ecore_status_t
+qede_mac_int_ops(struct rte_eth_dev *eth_dev, struct ecore_filter_ucast *ucast,
+		 bool add)
+{
+	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
+	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
+	enum _ecore_status_t rc;
+	struct ecore_filter_mcast mcast;
+	struct qede_mcast_entry *tmp;
+	uint16_t j = 0;
+
+	/* Multicast */
+	if (is_multicast_ether_addr((struct ether_addr *)ucast->mac)) {
+		if (add) {
+			if (qdev->num_mc_addr >= ECORE_MAX_MC_ADDRS) {
+				DP_ERR(edev,
+				       "Mcast filter table limit exceeded, "
+				       "Please enable mcast promisc mode\n");
+				return -ECORE_INVAL;
+			}
+		}
+		rc = qede_mcast_filter(eth_dev, ucast, add);
+		if (rc == 0) {
+			DP_INFO(edev, "num_mc_addrs = %u\n", qdev->num_mc_addr);
+			memset(&mcast, 0, sizeof(mcast));
+			mcast.num_mc_addrs = qdev->num_mc_addr;
+			mcast.opcode = ECORE_FILTER_ADD;
+			SLIST_FOREACH(tmp, &qdev->mc_list_head, list) {
+				ether_addr_copy(&tmp->mac,
+					(struct ether_addr *)&mcast.mac[j]);
+				j++;
+			}
+			rc = ecore_filter_mcast_cmd(edev, &mcast,
+						    ECORE_SPQ_MODE_CB, NULL);
+		}
+		if (rc != ECORE_SUCCESS) {
+			DP_ERR(edev, "Failed to add multicast filter"
+			       " rc = %d, op = %d\n", rc, add);
+		}
+	} else { /* Unicast */
+		if (add) {
+			if (qdev->num_uc_addr >= qdev->dev_info.num_mac_addrs) {
+				DP_ERR(edev,
+				       "Ucast filter table limit exceeded,"
+				       " Please enable promisc mode\n");
+				return -ECORE_INVAL;
+			}
+		}
+		rc = qede_ucast_filter(eth_dev, ucast, add);
+		if (rc == 0)
+			rc = ecore_filter_ucast_cmd(edev, ucast,
+						    ECORE_SPQ_MODE_CB, NULL);
+		if (rc != ECORE_SUCCESS) {
+			DP_ERR(edev, "MAC filter failed, rc = %d, op = %d\n",
+			       rc, add);
+		}
 	}
 
-	/* Adding macaddr even though promiscuous mode is set */
-	if (rte_eth_promiscuous_get(eth_dev->data->port_id) == 1)
-		DP_INFO(edev, "Port is in promisc mode, yet adding it\n");
+	return rc;
+}
 
-	/* Add MAC filters according to the unicast secondary macs */
-	rc = qede_set_ucast_rx_mac(qdev, QED_FILTER_XCAST_TYPE_ADD,
-				   mac_addr->addr_bytes);
-	if (rc)
-		DP_ERR(edev, "Unable to add macaddr rc=%d\n", rc);
+static void
+qede_mac_addr_add(struct rte_eth_dev *eth_dev, struct ether_addr *mac_addr,
+		  uint32_t index, __rte_unused uint32_t pool)
+{
+	struct ecore_filter_ucast ucast;
+
+	qede_set_ucast_cmn_params(&ucast);
+	ucast.type = ECORE_FILTER_MAC;
+	ether_addr_copy(mac_addr, (struct ether_addr *)&ucast.mac);
+	(void)qede_mac_int_ops(eth_dev, &ucast, 1);
 }
 
 static void
@@ -272,6 +406,7 @@ qede_mac_addr_remove(struct rte_eth_dev *eth_dev, uint32_t index)
 	struct qede_dev *qdev = eth_dev->data->dev_private;
 	struct ecore_dev *edev = &qdev->edev;
 	struct ether_addr mac_addr;
+	struct ecore_filter_ucast ucast;
 	int rc;
 
 	PMD_INIT_FUNC_TRACE(edev);
@@ -282,12 +417,15 @@ qede_mac_addr_remove(struct rte_eth_dev *eth_dev, uint32_t index)
 		return;
 	}
 
+	qede_set_ucast_cmn_params(&ucast);
+	ucast.opcode = ECORE_FILTER_REMOVE;
+	ucast.type = ECORE_FILTER_MAC;
+
 	/* Use the index maintained by rte */
-	ether_addr_copy(&eth_dev->data->mac_addrs[index], &mac_addr);
-	rc = qede_set_ucast_rx_mac(qdev, QED_FILTER_XCAST_TYPE_DEL,
-				   mac_addr.addr_bytes);
-	if (rc)
-		DP_ERR(edev, "Unable to remove macaddr rc=%d\n", rc);
+	ether_addr_copy(&eth_dev->data->mac_addrs[index],
+			(struct ether_addr *)&ucast.mac);
+
+	ecore_filter_ucast_cmd(edev, &ucast, ECORE_SPQ_MODE_CB, NULL);
 }
 
 static void
@@ -295,6 +433,7 @@ 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),
@@ -306,10 +445,13 @@ qede_mac_addr_set(struct rte_eth_dev *eth_dev, struct ether_addr *mac_addr)
 	}
 
 	/* First remove the primary mac */
-	rc = qede_set_ucast_rx_mac(qdev, QED_FILTER_XCAST_TYPE_DEL,
-				   qdev->primary_mac.addr_bytes);
-
-	if (rc) {
+	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,
@@ -318,18 +460,15 @@ qede_mac_addr_set(struct rte_eth_dev *eth_dev, struct ether_addr *mac_addr)
 	}
 
 	/* Add new MAC */
-	rc = qede_set_ucast_rx_mac(qdev, QED_FILTER_XCAST_TYPE_ADD,
-				   mac_addr->addr_bytes);
-
-	if (rc)
+	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);
 }
 
-
-
-
 static void qede_config_accept_any_vlan(struct qede_dev *qdev, bool action)
 {
 	struct ecore_dev *edev = &qdev->edev;
@@ -415,22 +554,6 @@ static void qede_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
 		mask, rxmode->hw_vlan_strip, rxmode->hw_vlan_filter);
 }
 
-static int qede_set_ucast_rx_vlan(struct qede_dev *qdev,
-				  enum qed_filter_xcast_params_type opcode,
-				  uint16_t vid)
-{
-	struct qed_filter_params filter_cmd;
-	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
-
-	memset(&filter_cmd, 0, sizeof(filter_cmd));
-	filter_cmd.type = QED_FILTER_TYPE_UCAST;
-	filter_cmd.filter.ucast.type = opcode;
-	filter_cmd.filter.ucast.vlan_valid = 1;
-	filter_cmd.filter.ucast.vlan = vid;
-
-	return qdev->ops->filter_config(edev, &filter_cmd);
-}
-
 static int qede_vlan_filter_set(struct rte_eth_dev *eth_dev,
 				uint16_t vlan_id, int on)
 {
@@ -439,6 +562,7 @@ static int qede_vlan_filter_set(struct rte_eth_dev *eth_dev,
 	struct qed_dev_eth_info *dev_info = &qdev->dev_info;
 	struct qede_vlan_entry *tmp = NULL;
 	struct qede_vlan_entry *vlan;
+	struct ecore_filter_ucast ucast;
 	int rc;
 
 	if (on) {
@@ -465,9 +589,13 @@ static int qede_vlan_filter_set(struct rte_eth_dev *eth_dev,
 			return -ENOMEM;
 		}
 
-		rc = qede_set_ucast_rx_vlan(qdev, QED_FILTER_XCAST_TYPE_ADD,
-					    vlan_id);
-		if (rc) {
+		qede_set_ucast_cmn_params(&ucast);
+		ucast.opcode = ECORE_FILTER_ADD;
+		ucast.type = ECORE_FILTER_VLAN;
+		ucast.vlan = vlan_id;
+		rc = ecore_filter_ucast_cmd(edev, &ucast, ECORE_SPQ_MODE_CB,
+					    NULL);
+		if (rc != 0) {
 			DP_ERR(edev, "Failed to add VLAN %u rc %d\n", vlan_id,
 			       rc);
 			rte_free(vlan);
@@ -497,9 +625,13 @@ static int qede_vlan_filter_set(struct rte_eth_dev *eth_dev,
 
 		SLIST_REMOVE(&qdev->vlan_list_head, tmp, qede_vlan_entry, list);
 
-		rc = qede_set_ucast_rx_vlan(qdev, QED_FILTER_XCAST_TYPE_DEL,
-					    vlan_id);
-		if (rc) {
+		qede_set_ucast_cmn_params(&ucast);
+		ucast.opcode = ECORE_FILTER_REMOVE;
+		ucast.type = ECORE_FILTER_VLAN;
+		ucast.vlan = vlan_id;
+		rc = ecore_filter_ucast_cmd(edev, &ucast, ECORE_SPQ_MODE_CB,
+					    NULL);
+		if (rc != 0) {
 			DP_ERR(edev, "Failed to delete VLAN %u rc %d\n",
 			       vlan_id, rc);
 		} else {
@@ -742,22 +874,6 @@ qede_link_update(struct rte_eth_dev *eth_dev, __rte_unused int wait_to_complete)
 	return ((curr->link_status == link.link_up) ? -1 : 0);
 }
 
-static void
-qede_rx_mode_setting(struct rte_eth_dev *eth_dev,
-		     enum qed_filter_rx_mode_type accept_flags)
-{
-	struct qede_dev *qdev = eth_dev->data->dev_private;
-	struct ecore_dev *edev = &qdev->edev;
-	struct qed_filter_params rx_mode;
-
-	DP_INFO(edev, "%s mode %u\n", __func__, accept_flags);
-
-	memset(&rx_mode, 0, sizeof(struct qed_filter_params));
-	rx_mode.type = QED_FILTER_TYPE_RX_MODE;
-	rx_mode.filter.accept_flags = accept_flags;
-	qdev->ops->filter_config(edev, &rx_mode);
-}
-
 static void qede_promiscuous_enable(struct rte_eth_dev *eth_dev)
 {
 	struct qede_dev *qdev = eth_dev->data->dev_private;
@@ -770,7 +886,7 @@ static void qede_promiscuous_enable(struct rte_eth_dev *eth_dev)
 	if (rte_eth_allmulticast_get(eth_dev->data->port_id) == 1)
 		type |= QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC;
 
-	qede_rx_mode_setting(eth_dev, type);
+	qed_configure_filter_rx_mode(eth_dev, type);
 }
 
 static void qede_promiscuous_disable(struct rte_eth_dev *eth_dev)
@@ -781,10 +897,11 @@ static void qede_promiscuous_disable(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE(edev);
 
 	if (rte_eth_allmulticast_get(eth_dev->data->port_id) == 1)
-		qede_rx_mode_setting(eth_dev,
-				     QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC);
+		qed_configure_filter_rx_mode(eth_dev,
+				QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC);
 	else
-		qede_rx_mode_setting(eth_dev, QED_FILTER_RX_MODE_TYPE_REGULAR);
+		qed_configure_filter_rx_mode(eth_dev,
+				QED_FILTER_RX_MODE_TYPE_REGULAR);
 }
 
 static void qede_poll_sp_sb_cb(void *param)
@@ -1044,15 +1161,17 @@ static void qede_allmulticast_enable(struct rte_eth_dev *eth_dev)
 	if (rte_eth_promiscuous_get(eth_dev->data->port_id) == 1)
 		type |= QED_FILTER_RX_MODE_TYPE_PROMISC;
 
-	qede_rx_mode_setting(eth_dev, type);
+	qed_configure_filter_rx_mode(eth_dev, type);
 }
 
 static void qede_allmulticast_disable(struct rte_eth_dev *eth_dev)
 {
 	if (rte_eth_promiscuous_get(eth_dev->data->port_id) == 1)
-		qede_rx_mode_setting(eth_dev, QED_FILTER_RX_MODE_TYPE_PROMISC);
+		qed_configure_filter_rx_mode(eth_dev,
+				QED_FILTER_RX_MODE_TYPE_PROMISC);
 	else
-		qede_rx_mode_setting(eth_dev, QED_FILTER_RX_MODE_TYPE_REGULAR);
+		qed_configure_filter_rx_mode(eth_dev,
+				QED_FILTER_RX_MODE_TYPE_REGULAR);
 }
 
 static int qede_flow_ctrl_set(struct rte_eth_dev *eth_dev,
diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h
index a97e3d9..a35ea8b 100644
--- a/drivers/net/qede/qede_ethdev.h
+++ b/drivers/net/qede/qede_ethdev.h
@@ -123,6 +123,17 @@ struct qede_vlan_entry {
 	uint16_t vid;
 };
 
+struct qede_mcast_entry {
+	struct ether_addr mac;
+	SLIST_ENTRY(qede_mcast_entry) list;
+};
+
+struct qede_ucast_entry {
+	struct ether_addr mac;
+	uint16_t vlan;
+	SLIST_ENTRY(qede_ucast_entry) list;
+};
+
 /*
  *  Structure to store private data for each port.
  */
@@ -147,6 +158,10 @@ struct qede_dev {
 	uint16_t configured_vlans;
 	bool accept_any_vlan;
 	struct ether_addr primary_mac;
+	SLIST_HEAD(mc_list_head, qede_mcast_entry) mc_list_head;
+	uint16_t num_mc_addr;
+	SLIST_HEAD(uc_list_head, qede_ucast_entry) uc_list_head;
+	uint16_t num_uc_addr;
 	bool handle_hw_err;
 	char drv_ver[QEDE_PMD_DRV_VER_STR_SIZE];
 };
-- 
1.9.0

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

* [dpdk-stable] patch 'net/qede: add vendor/device id info' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (38 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix filtering code' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix SRIOV printouts' " Yuanhan Liu
                   ` (38 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 3190a3ba9baf4ab66be195a111a5a657d96b65de Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Thu, 22 Dec 2016 16:49:57 -0800
Subject: [PATCH] net/qede: add vendor/device id info

[ upstream commit fb58ad9ea019ff6e85f745df8b160325603c395e ]

The vendor_id and device_id are used to determine device type. If you
don't have them, then check for determining device type fails and is
always set to default device type.

Fixes: ec94dbc57362 ("qede: add base driver")

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

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index b22f61e..2dbb200 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1545,6 +1545,10 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
 
+	/* @DPDK */
+	edev->vendor_id = pci_dev->id.vendor_id;
+	edev->device_id = pci_dev->id.device_id;
+
 	qed_ops = qed_get_eth_ops();
 	if (!qed_ops) {
 		DP_ERR(edev, "Failed to get qed_eth_ops_pass\n");
-- 
1.9.0

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

* [dpdk-stable] patch 'net/qede/base: fix SRIOV printouts' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (39 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: add vendor/device id info' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix multiple acquisition requests by VF' " Yuanhan Liu
                   ` (37 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 95f7917d274a632df11887b522c1bfc51ba711b3 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Thu, 22 Dec 2016 16:49:58 -0800
Subject: [PATCH] net/qede/base: fix SRIOV printouts

[ upstream commit 3013f8c1617ce01827132f93d16503eeae8bc1e1 ]

Remove unmeaningful function ID value in print.

Don't print the number of Multicast filters as part of Acquire response,
as this is an obsolete field which isn't enforced by PF.

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

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

diff --git a/drivers/net/qede/base/ecore_sriov.c b/drivers/net/qede/base/ecore_sriov.c
index b28d728..de54b9a 100644
--- a/drivers/net/qede/base/ecore_sriov.c
+++ b/drivers/net/qede/base/ecore_sriov.c
@@ -317,10 +317,9 @@ static enum _ecore_status_t ecore_iov_pci_cfg_info(struct ecore_dev *p_dev)
 
 	OSAL_PCI_READ_CONFIG_BYTE(p_dev, pos + PCI_SRIOV_FUNC_LINK, &iov->link);
 
-	DP_VERBOSE(p_dev, ECORE_MSG_IOV, "IOV info[%d]: nres %d, cap 0x%x,"
+	DP_VERBOSE(p_dev, ECORE_MSG_IOV, "IOV info: nres %d, cap 0x%x,"
 		   "ctrl 0x%x, total %d, initial %d, num vfs %d, offset %d,"
-		   " stride %d, page size 0x%x\n", 0,
-		   /* @@@TBD MichalK - function id */
+		   " stride %d, page size 0x%x\n",
 		   iov->nres, iov->cap, iov->ctrl,
 		   iov->total_vfs, iov->initial_vfs, iov->nr_virtfn,
 		   iov->offset, iov->stride, iov->pgsz);
@@ -1575,12 +1574,12 @@ static void ecore_iov_vf_mbx_acquire(struct ecore_hwfn       *p_hwfn,
 		   "VF[%d] ACQUIRE_RESPONSE: pfdev_info- chip_num=0x%x,"
 		   " db_size=%d, idx_per_sb=%d, pf_cap=0x%lx\n"
 		   "resources- n_rxq-%d, n_txq-%d, n_sbs-%d, n_macs-%d,"
-		   " n_vlans-%d, n_mcs-%d\n",
+		   " n_vlans-%d\n",
 		   vf->abs_vf_id, resp->pfdev_info.chip_num,
 		   resp->pfdev_info.db_size, resp->pfdev_info.indices_per_sb,
 		   (unsigned long)resp->pfdev_info.capabilities, resc->num_rxqs,
 		   resc->num_txqs, resc->num_sbs, resc->num_mac_filters,
-		   resc->num_vlan_filters, resc->num_mc_filters);
+		   resc->num_vlan_filters);
 
 	vf->state = VF_ACQUIRED;
 
-- 
1.9.0

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

* [dpdk-stable] patch 'net/qede/base: fix multiple acquisition requests by VF' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (40 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix SRIOV printouts' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix error code in resc allocation' " Yuanhan Liu
                   ` (36 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From fb347e719be1e05dcea0a6f8126d568ade0bd209 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Thu, 22 Dec 2016 16:49:59 -0800
Subject: [PATCH] net/qede/base: fix multiple acquisition requests by VF

[ upstream commit a1f761e16f774ed6eb4721d589bf3827e9519534 ]

There are certain conditions under which VF would infinitely send
ACQUIRE messages, as it will fail to understand that PF has rejected
the ACQUIRE request. Fix to reject multiple acquisition requests by VF.

Fixes: 22d07d939c3c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/base/ecore_vf.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/qede/base/ecore_vf.c b/drivers/net/qede/base/ecore_vf.c
index be8b1ec..161b317 100644
--- a/drivers/net/qede/base/ecore_vf.c
+++ b/drivers/net/qede/base/ecore_vf.c
@@ -296,6 +296,14 @@ static enum _ecore_status_t ecore_vf_pf_acquire(struct ecore_hwfn *p_hwfn)
 						VFPF_ACQUIRE_CAP_PRE_FP_HSI;
 				}
 			}
+
+			/* If PF/VF are using same Major, PF must have had
+			 * it's reasons. Simply fail.
+			 */
+			DP_NOTICE(p_hwfn, false,
+				  "PF rejected acquisition by VF\n");
+			rc = ECORE_INVAL;
+			goto exit;
 		} else {
 			DP_ERR(p_hwfn,
 			       "PF returned err %d to VF acquisition request\n",
-- 
1.9.0

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

* [dpdk-stable] patch 'net/qede/base: fix error code in resc allocation' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (41 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix multiple acquisition requests by VF' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix mutex in freeing context manager' " Yuanhan Liu
                   ` (35 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 35a5e41db371aca33d9617a3275c1cff76f2dc8f Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Thu, 22 Dec 2016 16:50:00 -0800
Subject: [PATCH] net/qede/base: fix error code in resc allocation

[ upstream commit 3eb0add0c2f356bae45c8d03619953233f566e5a ]

Fix to return error code ECORE_INVAL instead of 0 when EQ elements
is too large as done elsewhere in this function.

Fixes: 22d07d939c3c ("net/qede/base: update")

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

diff --git a/drivers/net/qede/base/ecore_dev.c b/drivers/net/qede/base/ecore_dev.c
index 6060f9e..58b9387 100644
--- a/drivers/net/qede/base/ecore_dev.c
+++ b/drivers/net/qede/base/ecore_dev.c
@@ -667,6 +667,7 @@ enum _ecore_status_t ecore_resc_alloc(struct ecore_dev *p_dev)
 			DP_ERR(p_hwfn, "Cannot allocate 0x%x EQ elements."
 				       "The maximum of a u16 chain is 0x%x\n",
 			       n_eqes, 0xFFFF);
+			rc = ECORE_INVAL;
 			goto alloc_err;
 		}
 
-- 
1.9.0

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

* [dpdk-stable] patch 'net/qede/base: fix mutex in freeing context manager' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (42 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix error code in resc allocation' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix Rx queue access by malicious VFs' " Yuanhan Liu
                   ` (34 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 89a1f76789aba1278c539dd71185c371ff249e7b Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Thu, 22 Dec 2016 16:50:01 -0800
Subject: [PATCH] net/qede/base: fix mutex in freeing context manager

[ upstream commit c3c5eaa085254978ebd11f9ba8ab2e777f8310e5 ]

Fix OSAL_MUTEX_DEALLOC() in freeing the context manager.

Fixes: 22d07d939c3c ("net/qede/base: update")

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

diff --git a/drivers/net/qede/base/ecore_cxt.c b/drivers/net/qede/base/ecore_cxt.c
index 3dd953d..5ea4f5c 100644
--- a/drivers/net/qede/base/ecore_cxt.c
+++ b/drivers/net/qede/base/ecore_cxt.c
@@ -1155,7 +1155,7 @@ void ecore_cxt_mngr_free(struct ecore_hwfn *p_hwfn)
 	ecore_cid_map_free(p_hwfn);
 	ecore_cxt_src_t2_free(p_hwfn);
 	ecore_ilt_shadow_free(p_hwfn);
-	OSAL_MUTEX_DEALLOC(&p_mngr->mutex);
+	OSAL_MUTEX_DEALLOC(&p_hwfn->p_cxt_mngr->mutex);
 	OSAL_FREE(p_hwfn->p_dev, p_hwfn->p_cxt_mngr);
 
 	p_hwfn->p_cxt_mngr = OSAL_NULL;
-- 
1.9.0

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

* [dpdk-stable] patch 'net/qede/base: fix Rx queue access by malicious VFs' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (43 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix mutex in freeing context manager' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix to handle acquire request from VF' " Yuanhan Liu
                   ` (33 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From b97ae1650f140e7e14d8d497ead4f2c117b8dab2 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Thu, 22 Dec 2016 16:50:02 -0800
Subject: [PATCH] net/qede/base: fix Rx queue access by malicious VFs

[ upstream commit 917ce8bd36f8fca277b09c0717fccb6ec60f4f1d ]

Rx queue access is still done prior to the index being validated by PF.
Hence move Rx queue and status block validation check before accessing
Rx queue to prevent malicious VFs from using out-of-bound queue indices.

Fixes: 98bc693e1938 ("net/qede/base: change queue start")

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

diff --git a/drivers/net/qede/base/ecore_sriov.c b/drivers/net/qede/base/ecore_sriov.c
index de54b9a..1255296 100644
--- a/drivers/net/qede/base/ecore_sriov.c
+++ b/drivers/net/qede/base/ecore_sriov.c
@@ -1968,6 +1968,11 @@ static void ecore_iov_vf_mbx_start_rxq(struct ecore_hwfn *p_hwfn,
 	enum _ecore_status_t rc;
 
 	req = &mbx->req_virt->start_rxq;
+
+	if (!ecore_iov_validate_rxq(p_hwfn, vf, req->rx_qid) ||
+	    !ecore_iov_validate_sb(p_hwfn, vf, req->hw_sb))
+		goto out;
+
 	OSAL_MEMSET(&p_params, 0, sizeof(p_params));
 	p_params.queue_id = (u8)vf->vf_queues[req->rx_qid].fw_rx_qid;
 	p_params.vf_qid = req->rx_qid;
@@ -1976,10 +1981,6 @@ static void ecore_iov_vf_mbx_start_rxq(struct ecore_hwfn *p_hwfn,
 	p_params.sb = req->hw_sb;
 	p_params.sb_idx = req->sb_index;
 
-	if (!ecore_iov_validate_rxq(p_hwfn, vf, req->rx_qid) ||
-	    !ecore_iov_validate_sb(p_hwfn, vf, req->hw_sb))
-		goto out;
-
 	/* Legacy VFs have their Producers in a different location, which they
 	 * calculate on their own and clean the producer prior to this.
 	 */
-- 
1.9.0

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

* [dpdk-stable] patch 'net/qede/base: fix to handle acquire request from VF' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (44 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix Rx queue access by malicious VFs' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix VF over legacy PF' " Yuanhan Liu
                   ` (32 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 5c76963a53d0df863f6253a748c70ec37e0eed6e Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Thu, 22 Dec 2016 16:50:03 -0800
Subject: [PATCH] net/qede/base: fix to handle acquire request from VF

[ upstream commit b765730bc13e008e2b3452a2e6dffb2d24994035 ]

Add a check and fail the VF's probe request if VF is already in
VF_ACQUIRED state.

Fixes: 22d07d939c3c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/base/ecore_sriov.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/qede/base/ecore_sriov.c b/drivers/net/qede/base/ecore_sriov.c
index 1255296..c2fbee8 100644
--- a/drivers/net/qede/base/ecore_sriov.c
+++ b/drivers/net/qede/base/ecore_sriov.c
@@ -1459,6 +1459,18 @@ static void ecore_iov_vf_mbx_acquire(struct ecore_hwfn       *p_hwfn,
 	pfdev_info->major_fp_hsi = ETH_HSI_VER_MAJOR;
 	pfdev_info->minor_fp_hsi = ETH_HSI_VER_MINOR;
 
+	/* TODO - not doing anything is bad since we'll assert, but this isn't
+	 * necessarily the right behavior - perhaps we should have allowed some
+	 * versatility here.
+	 */
+	if (vf->state != VF_FREE &&
+	    vf->state != VF_STOPPED) {
+		DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
+			   "VF[%d] sent ACQUIRE but is already in state %d - fail request\n",
+			   vf->abs_vf_id, vf->state);
+		goto out;
+	}
+
 	/* Validate FW compatibility */
 	if (req->vfdev_info.eth_fp_hsi_major != ETH_HSI_VER_MAJOR) {
 		if (req->vfdev_info.capabilities &
-- 
1.9.0

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

* [dpdk-stable] patch 'net/qede/base: fix VF over legacy PF' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (45 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix to handle acquire request from VF' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx5: fix RSS hash result for flows' " Yuanhan Liu
                   ` (31 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 09740ae6241886d72345281de9368b91edef2b91 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Thu, 22 Dec 2016 16:50:04 -0800
Subject: [PATCH] net/qede/base: fix VF over legacy PF

[ upstream commit 6087d8a9cc5b54457e5e1b28550679f567fa48ca ]

Apparently VF over Legacy PF doesn't work, as VF would fail after
getting the initial rejection message [instead of sending an additional
one where it asks for a FW override and see if it works].

Fixes: 22d07d939c3c ("net/qede/base: update")

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

diff --git a/drivers/net/qede/base/ecore_vf.c b/drivers/net/qede/base/ecore_vf.c
index 161b317..c26b602 100644
--- a/drivers/net/qede/base/ecore_vf.c
+++ b/drivers/net/qede/base/ecore_vf.c
@@ -294,6 +294,7 @@ static enum _ecore_status_t ecore_vf_pf_acquire(struct ecore_hwfn *p_hwfn)
 						" override\n");
 					req->vfdev_info.capabilities |=
 						VFPF_ACQUIRE_CAP_PRE_FP_HSI;
+					continue;
 				}
 			}
 
-- 
1.9.0

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

* [dpdk-stable] patch 'net/mlx5: fix RSS hash result for flows' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (46 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix VF over legacy PF' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e: fix wrong return value when handling PF message' " Yuanhan Liu
                   ` (30 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Yuanhan Liu, Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 8b218d20ca79ec1bc6f812040315ceefb9579dae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Wed, 28 Dec 2016 10:58:31 +0100
Subject: [PATCH] net/mlx5: fix RSS hash result for flows

[ upstream commit 36ba0c0097c6aaf969fe520f91352e772a143904 ]

Flows redirected to a specific queue do not have a valid RSS hash result
and the related mbuf flag must not be set.

Fixes: ecf60761fc2a ("net/mlx5: return RSS hash result in mbuf")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 2c5ca74..615d0ce 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1338,7 +1338,7 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			/* Update packet information. */
 			pkt->packet_type = 0;
 			pkt->ol_flags = 0;
-			if (rxq->rss_hash) {
+			if (rss_hash_res && rxq->rss_hash) {
 				pkt->hash.rss = rss_hash_res;
 				pkt->ol_flags = PKT_RX_RSS_HASH;
 			}
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e: fix wrong return value when handling PF message' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (47 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx5: fix RSS hash result for flows' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx5: fix missing inline attributes' " Yuanhan Liu
                   ` (29 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From bf85fd798e9cd98c940e49b1cb83473c1206c8c9 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Wed, 21 Dec 2016 16:29:40 +0800
Subject: [PATCH] net/i40e: fix wrong return value when handling PF message

[ upstream commit aca95e38cc13a2ddc65b459186e45c1a1447625e ]

When VF receives a message from PF, it should check the return
value. But in i40evf_execute_vf_cmd the value is ignored and not
returned to the caller.

Fixes: 95cd21f45d1b ("i40evf: allocate virtchnl commands buffer per VF")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/i40e/i40e_ethdev.h    | 2 +-
 drivers/net/i40e/i40e_ethdev_vf.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 298cef4..28111a7 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -527,7 +527,7 @@ struct i40e_vf {
 	enum i40e_aq_link_speed link_speed;
 	bool vf_reset;
 	volatile uint32_t pend_cmd; /* pending command not finished yet */
-	uint32_t cmd_retval; /* return value of the cmd response from PF */
+	int32_t cmd_retval; /* return value of the cmd response from PF */
 	u16 pend_msg; /* flags indicates events from pf not handled yet */
 	uint8_t *aq_resp; /* buffer to store the adminq response from PF */
 
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index f54544e..5d86c7b 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -361,6 +361,7 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args)
 		err = -1;
 		do {
 			ret = i40evf_read_pfmsg(dev, &info);
+			vf->cmd_retval = info.result;
 			if (ret == I40EVF_MSG_CMD) {
 				err = 0;
 				break;
-- 
1.9.0

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

* [dpdk-stable] patch 'net/mlx5: fix missing inline attributes' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (48 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e: fix wrong return value when handling PF message' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx5: fix Tx doorbell' " Yuanhan Liu
                   ` (28 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Yuanhan Liu, Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 433e0a15dfd0508ea0387e665d09441d14edc8c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Thu, 24 Nov 2016 17:03:33 +0100
Subject: [PATCH] net/mlx5: fix missing inline attributes

[ upstream commit ff1807a3f175ec3ca8c8fcb1a4b49e1dd86b91da ]

These functions must be forced inline for better performance.

Fixes: 99c12dcca65d ("net/mlx5: handle Rx CQE compression")
Fixes: 1d88ba171942 ("net/mlx5: refactor Tx data path")
Fixes: 67fa62bc672d ("mlx5: support checksum offload")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 34 +++++++++++++++++++++++++---------
 1 file changed, 25 insertions(+), 9 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 615d0ce..0eb1c94 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -69,6 +69,31 @@
 #include "mlx5_defs.h"
 #include "mlx5_prm.h"
 
+static inline int
+check_cqe(volatile struct mlx5_cqe *cqe,
+	  unsigned int cqes_n, const uint16_t ci)
+	  __attribute__((always_inline));
+
+static inline uint32_t
+txq_mp2mr(struct txq *txq, struct rte_mempool *mp)
+	__attribute__((always_inline));
+
+static inline void
+mlx5_tx_dbrec(struct txq *txq) __attribute__((always_inline));
+
+static inline uint32_t
+rxq_cq_to_pkt_type(volatile struct mlx5_cqe *cqe)
+	__attribute__((always_inline));
+
+static inline int
+mlx5_rx_poll_len(struct rxq *rxq, volatile struct mlx5_cqe *cqe,
+		 uint16_t cqe_cnt, uint32_t *rss_hash)
+		 __attribute__((always_inline));
+
+static inline uint32_t
+rxq_cq_to_ol_flags(struct rxq *rxq, volatile struct mlx5_cqe *cqe)
+		   __attribute__((always_inline));
+
 #ifndef NDEBUG
 
 /**
@@ -98,11 +123,6 @@ check_cqe_seen(volatile struct mlx5_cqe *cqe)
 
 #endif /* NDEBUG */
 
-static inline int
-check_cqe(volatile struct mlx5_cqe *cqe,
-	  unsigned int cqes_n, const uint16_t ci)
-	  __attribute__((always_inline));
-
 /**
  * Check whether CQE is valid.
  *
@@ -246,10 +266,6 @@ txq_mb2mp(struct rte_mbuf *buf)
 	return buf->pool;
 }
 
-static inline uint32_t
-txq_mp2mr(struct txq *txq, struct rte_mempool *mp)
-	__attribute__((always_inline));
-
 /**
  * Get Memory Region (MR) <-> Memory Pool (MP) association from txq->mp2mr[].
  * Add MP to txq->mp2mr[] if it's not registered yet. If mp2mr[] is full,
-- 
1.9.0

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

* [dpdk-stable] patch 'net/mlx5: fix Tx doorbell' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (49 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx5: fix missing inline attributes' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix PF fastpath status block index' " Yuanhan Liu
                   ` (27 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Yuanhan Liu, Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From df2f335b0ad275115937cba7019d50453c9e51e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Fri, 9 Dec 2016 14:27:58 +0100
Subject: [PATCH] net/mlx5: fix Tx doorbell

[ upstream commit 30807f62b288a738141b20c19caf72fa5e00faed ]

Too much data is uselessly written to the Tx doorbell, which since v16.11
may also cause Tx queues to behave erratically and crash applications.

This regression was seen on VF devices when the BlueFlame buffer size is
zero (txq->bf_buf_size) due to the following change:

 -       txq->bf_offset ^= txq->bf_buf_size;
 +       txq->bf_offset ^= (1 << txq->bf_buf_size);

Fixes: 1d88ba171942 ("net/mlx5: refactor Tx data path")
Fixes: d5793daefec8 ("net/mlx5: reduce memory overhead for BF handling")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 26 ++++++++++++--------------
 drivers/net/mlx5/mlx5_rxtx.h |  2 --
 drivers/net/mlx5/mlx5_txq.c  |  2 --
 3 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 0eb1c94..e31d985 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -79,7 +79,8 @@ txq_mp2mr(struct txq *txq, struct rte_mempool *mp)
 	__attribute__((always_inline));
 
 static inline void
-mlx5_tx_dbrec(struct txq *txq) __attribute__((always_inline));
+mlx5_tx_dbrec(struct txq *txq, volatile struct mlx5_wqe *wqe)
+	__attribute__((always_inline));
 
 static inline uint32_t
 rxq_cq_to_pkt_type(volatile struct mlx5_cqe *cqe)
@@ -308,23 +309,20 @@ txq_mp2mr(struct txq *txq, struct rte_mempool *mp)
  *
  * @param txq
  *   Pointer to TX queue structure.
+ * @param wqe
+ *   Pointer to the last WQE posted in the NIC.
  */
 static inline void
-mlx5_tx_dbrec(struct txq *txq)
+mlx5_tx_dbrec(struct txq *txq, volatile struct mlx5_wqe *wqe)
 {
-	uint8_t *dst = (uint8_t *)((uintptr_t)txq->bf_reg + txq->bf_offset);
-	uint32_t data[4] = {
-		htonl((txq->wqe_ci << 8) | MLX5_OPCODE_SEND),
-		htonl(txq->qp_num_8s),
-		0,
-		0,
-	};
+	uint64_t *dst = (uint64_t *)((uintptr_t)txq->bf_reg);
+	volatile uint64_t *src = ((volatile uint64_t *)wqe);
+
 	rte_wmb();
 	*txq->qp_db = htonl(txq->wqe_ci);
 	/* Ensure ordering between DB record and BF copy. */
 	rte_wmb();
-	memcpy(dst, (uint8_t *)data, 16);
-	txq->bf_offset ^= (1 << txq->bf_buf_size);
+	*dst = *src;
 }
 
 /**
@@ -610,7 +608,7 @@ next_pkt:
 	txq->stats.opackets += i;
 #endif
 	/* Ring QP doorbell. */
-	mlx5_tx_dbrec(txq);
+	mlx5_tx_dbrec(txq, (volatile struct mlx5_wqe *)wqe);
 	txq->elts_head = elts_head;
 	return i;
 }
@@ -818,7 +816,7 @@ mlx5_tx_burst_mpw(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 	/* Ring QP doorbell. */
 	if (mpw.state == MLX5_MPW_STATE_OPENED)
 		mlx5_mpw_close(txq, &mpw);
-	mlx5_tx_dbrec(txq);
+	mlx5_tx_dbrec(txq, mpw.wqe);
 	txq->elts_head = elts_head;
 	return i;
 }
@@ -1087,7 +1085,7 @@ mlx5_tx_burst_mpw_inline(void *dpdk_txq, struct rte_mbuf **pkts,
 		mlx5_mpw_inline_close(txq, &mpw);
 	else if (mpw.state == MLX5_MPW_STATE_OPENED)
 		mlx5_mpw_close(txq, &mpw);
-	mlx5_tx_dbrec(txq);
+	mlx5_tx_dbrec(txq, mpw.wqe);
 	txq->elts_head = elts_head;
 	return i;
 }
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 5708c2a..909d80e 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -251,8 +251,6 @@ struct txq {
 	uint16_t elts_n:4; /* (*elts)[] length (in log2). */
 	uint16_t cqe_n:4; /* Number of CQ elements (in log2). */
 	uint16_t wqe_n:4; /* Number of of WQ elements (in log2). */
-	uint16_t bf_buf_size:4; /* Log2 Blueflame size. */
-	uint16_t bf_offset; /* Blueflame offset. */
 	uint16_t max_inline; /* Multiple of RTE_CACHE_LINE_SIZE to inline. */
 	uint32_t qp_num_8s; /* QP number shifted by 8. */
 	volatile struct mlx5_cqe (*cqes)[]; /* Completion queue. */
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 053665d..439908f 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -220,8 +220,6 @@ txq_setup(struct txq_ctrl *tmpl, struct txq_ctrl *txq_ctrl)
 	tmpl->txq.wqe_n = log2above(qp->sq.wqe_cnt);
 	tmpl->txq.qp_db = &qp->gen_data.db[MLX5_SND_DBR];
 	tmpl->txq.bf_reg = qp->gen_data.bf->reg;
-	tmpl->txq.bf_offset = qp->gen_data.bf->offset;
-	tmpl->txq.bf_buf_size = log2above(qp->gen_data.bf->buf_size);
 	tmpl->txq.cq_db = cq->dbrec;
 	tmpl->txq.cqes =
 		(volatile struct mlx5_cqe (*)[])
-- 
1.9.0

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

* [dpdk-stable] patch 'net/qede: fix PF fastpath status block index' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (50 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx5: fix Tx doorbell' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix per queue statisitics' " Yuanhan Liu
                   ` (26 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Harish Patil; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 0032f48fb417956ace999cdb65dd9fc19a870432 Mon Sep 17 00:00:00 2001
From: Harish Patil <harish.patil@qlogic.com>
Date: Fri, 6 Jan 2017 00:16:47 -0800
Subject: [PATCH] net/qede: fix PF fastpath status block index

[ upstream commit 9dd9cb4274e573d8bc927327f7a73f1a881746f6 ]

Allocate double the number of fastpath status block index
since the PF RX/TX queues are not sharing the status block.
This is an interim solution till other parts of the code
is modified to handle the same.

Fixes: f1e4b6c0acee ("net/qede: fix status block index for VF queues")

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

diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 2e181c8..a34b665 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -435,13 +435,15 @@ int qede_alloc_fp_resc(struct qede_dev *qdev)
 	struct ecore_dev *edev = &qdev->edev;
 	struct qede_fastpath *fp;
 	uint32_t num_sbs;
-	int rc, i;
+	uint16_t i;
+	uint16_t sb_idx;
+	int rc;
 
 	if (IS_VF(edev))
 		ecore_vf_get_num_sbs(ECORE_LEADING_HWFN(edev), &num_sbs);
 	else
-		num_sbs = (ecore_cxt_get_proto_cid_count
-			  (ECORE_LEADING_HWFN(edev), PROTOCOLID_ETH, NULL)) / 2;
+		num_sbs = ecore_cxt_get_proto_cid_count
+			  (ECORE_LEADING_HWFN(edev), PROTOCOLID_ETH, NULL);
 
 	if (num_sbs == 0) {
 		DP_ERR(edev, "No status blocks available\n");
@@ -459,7 +461,11 @@ int qede_alloc_fp_resc(struct qede_dev *qdev)
 
 	for (i = 0; i < QEDE_QUEUE_CNT(qdev); i++) {
 		fp = &qdev->fp_array[i];
-		if (qede_alloc_mem_sb(qdev, fp->sb_info, i % num_sbs)) {
+		if (IS_VF(edev))
+			sb_idx = i % num_sbs;
+		else
+			sb_idx = i;
+		if (qede_alloc_mem_sb(qdev, fp->sb_info, sb_idx)) {
 			qede_free_fp_arrays(qdev);
 			return -ENOMEM;
 		}
-- 
1.9.0

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

* [dpdk-stable] patch 'net/qede: fix per queue statisitics' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (51 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix PF fastpath status block index' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/af_packet: fix fd use after free' " Yuanhan Liu
                   ` (25 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From b7884624ced5ac3be6cfc8c8e803376c33eacece Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Fri, 6 Jan 2017 00:16:48 -0800
Subject: [PATCH] net/qede: fix per queue statisitics

[ upstream commit 06e83c4e9ffbb1b30bbe5cb92ebb6eb255f0d579 ]

If value of number of rxq/txq is different than
RTE_ETHDEV_QUEUE_STAT_CNTRS, limit per queue
stats/xstats to minimum of the two.

Fixes: 7634c5f91569 ("net/qede: add queue statistics")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/qede_ethdev.c | 32 +++++++++++++++++++++++++++++---
 1 file changed, 29 insertions(+), 3 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 2dbb200..6d6fb9d 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -970,6 +970,7 @@ qede_get_stats(struct rte_eth_dev *eth_dev, struct rte_eth_stats *eth_stats)
 	struct ecore_dev *edev = &qdev->edev;
 	struct ecore_eth_stats stats;
 	unsigned int i = 0, j = 0, qid;
+	unsigned int rxq_stat_cntrs, txq_stat_cntrs;
 	struct qede_tx_queue *txq;
 
 	qdev->ops->get_vport_stats(edev, &stats);
@@ -1003,6 +1004,17 @@ qede_get_stats(struct rte_eth_dev *eth_dev, struct rte_eth_stats *eth_stats)
 	eth_stats->oerrors = stats.tx_err_drop_pkts;
 
 	/* Queue stats */
+	rxq_stat_cntrs = RTE_MIN(QEDE_RSS_COUNT(qdev),
+			       RTE_ETHDEV_QUEUE_STAT_CNTRS);
+	txq_stat_cntrs = RTE_MIN(QEDE_TSS_COUNT(qdev),
+			       RTE_ETHDEV_QUEUE_STAT_CNTRS);
+	if ((rxq_stat_cntrs != QEDE_RSS_COUNT(qdev)) ||
+	    (txq_stat_cntrs != QEDE_TSS_COUNT(qdev)))
+		DP_VERBOSE(edev, ECORE_MSG_DEBUG,
+		       "Not all the queue stats will be displayed. Set"
+		       " RTE_ETHDEV_QUEUE_STAT_CNTRS config param"
+		       " appropriately and retry.\n");
+
 	for (qid = 0; qid < QEDE_QUEUE_CNT(qdev); qid++) {
 		if (qdev->fp_array[qid].type & QEDE_FASTPATH_RX) {
 			eth_stats->q_ipackets[i] =
@@ -1021,7 +1033,11 @@ qede_get_stats(struct rte_eth_dev *eth_dev, struct rte_eth_stats *eth_stats)
 					rx_alloc_errors));
 			i++;
 		}
+		if (i == rxq_stat_cntrs)
+			break;
+	}
 
+	for (qid = 0; qid < QEDE_QUEUE_CNT(qdev); qid++) {
 		if (qdev->fp_array[qid].type & QEDE_FASTPATH_TX) {
 			txq = qdev->fp_array[(qid)].txqs[0];
 			eth_stats->q_opackets[j] =
@@ -1031,13 +1047,17 @@ qede_get_stats(struct rte_eth_dev *eth_dev, struct rte_eth_stats *eth_stats)
 						  xmit_pkts)));
 			j++;
 		}
+		if (j == txq_stat_cntrs)
+			break;
 	}
 }
 
 static unsigned
 qede_get_xstats_count(struct qede_dev *qdev) {
 	return RTE_DIM(qede_xstats_strings) +
-		(RTE_DIM(qede_rxq_xstats_strings) * QEDE_RSS_COUNT(qdev));
+		(RTE_DIM(qede_rxq_xstats_strings) *
+		 RTE_MIN(QEDE_RSS_COUNT(qdev),
+			 RTE_ETHDEV_QUEUE_STAT_CNTRS));
 }
 
 static int
@@ -1047,6 +1067,7 @@ qede_get_xstats_names(__rte_unused struct rte_eth_dev *dev,
 	struct qede_dev *qdev = dev->data->dev_private;
 	const unsigned int stat_cnt = qede_get_xstats_count(qdev);
 	unsigned int i, qid, stat_idx = 0;
+	unsigned int rxq_stat_cntrs;
 
 	if (xstats_names != NULL) {
 		for (i = 0; i < RTE_DIM(qede_xstats_strings); i++) {
@@ -1057,7 +1078,9 @@ qede_get_xstats_names(__rte_unused struct rte_eth_dev *dev,
 			stat_idx++;
 		}
 
-		for (qid = 0; qid < QEDE_RSS_COUNT(qdev); qid++) {
+		rxq_stat_cntrs = RTE_MIN(QEDE_RSS_COUNT(qdev),
+					 RTE_ETHDEV_QUEUE_STAT_CNTRS);
+		for (qid = 0; qid < rxq_stat_cntrs; qid++) {
 			for (i = 0; i < RTE_DIM(qede_rxq_xstats_strings); i++) {
 				snprintf(xstats_names[stat_idx].name,
 					sizeof(xstats_names[stat_idx].name),
@@ -1081,6 +1104,7 @@ qede_get_xstats(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	struct ecore_eth_stats stats;
 	const unsigned int num = qede_get_xstats_count(qdev);
 	unsigned int i, qid, stat_idx = 0;
+	unsigned int rxq_stat_cntrs;
 
 	if (n < num)
 		return num;
@@ -1094,7 +1118,9 @@ qede_get_xstats(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 		stat_idx++;
 	}
 
-	for (qid = 0; qid < QEDE_QUEUE_CNT(qdev); qid++) {
+	rxq_stat_cntrs = RTE_MIN(QEDE_RSS_COUNT(qdev),
+				 RTE_ETHDEV_QUEUE_STAT_CNTRS);
+	for (qid = 0; qid < rxq_stat_cntrs; qid++) {
 		if (qdev->fp_array[qid].type & QEDE_FASTPATH_RX) {
 			for (i = 0; i < RTE_DIM(qede_rxq_xstats_strings); i++) {
 				xstats[stat_idx].value = *(uint64_t *)(
-- 
1.9.0

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

* [dpdk-stable] patch 'net/af_packet: fix fd use after free' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (52 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix per queue statisitics' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e: fix segment number in reassemble process' " Yuanhan Liu
                   ` (24 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Timmons C. Player; +Cc: Yuanhan Liu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 6aadd6c743b55f04a5a07702851eab64c25b3575 Mon Sep 17 00:00:00 2001
From: "Timmons C. Player" <timmons.player@spirent.com>
Date: Thu, 5 Jan 2017 09:33:35 -0500
Subject: [PATCH] net/af_packet: fix fd use after free

[ upstream commit 5d16a43c40cf2220c1b295307a00cee55d845633 ]

When using the same file descriptor for both rx and tx, the
eth_dev_stop function would close the same fd twice.   This
change prevents that from happening.

Fixes: 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices")

Signed-off-by: Timmons C. Player <timmons.player@spirent.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/af_packet/rte_eth_af_packet.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index ff45068..45c6519 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -261,9 +261,16 @@ eth_dev_stop(struct rte_eth_dev *dev)
 		sockfd = internals->rx_queue[i].sockfd;
 		if (sockfd != -1)
 			close(sockfd);
-		sockfd = internals->tx_queue[i].sockfd;
-		if (sockfd != -1)
-			close(sockfd);
+
+		/* Prevent use after free in case tx fd == rx fd */
+		if (sockfd != internals->tx_queue[i].sockfd) {
+			sockfd = internals->tx_queue[i].sockfd;
+			if (sockfd != -1)
+				close(sockfd);
+		}
+
+		internals->rx_queue[i].sockfd = -1;
+		internals->tx_queue[i].sockfd = -1;
 	}
 
 	dev->data->dev_link.link_status = ETH_LINK_DOWN;
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e: fix segment number in reassemble process' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (53 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/af_packet: fix fd use after free' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/enic: remove unnecessary function parameter attributes' " Yuanhan Liu
                   ` (23 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Chenghu Yao; +Cc: Yuanhan Liu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From d7df8ac7e24b0f2ecbc2ca4adf4853c10860f339 Mon Sep 17 00:00:00 2001
From: Chenghu Yao <yao.chenghu@zte.com.cn>
Date: Mon, 9 Jan 2017 11:31:04 +0800
Subject: [PATCH] net/i40e: fix segment number in reassemble process

[ upstream commit 65600813884cf018358dc09c032c78f8f5f5a83b ]

When freeing up last mbuf, start->nb_segs should be decremented
by one. See also ixgbe process.

Fixes: 0e0da28cd888 ("i40e: add vector scatter Rx")

Signed-off-by: Chenghu Yao <yao.chenghu@zte.com.cn>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/i40e/i40e_rxtx_vec_common.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h
index 6cb5dce..990520f 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_common.h
+++ b/drivers/net/i40e/i40e_rxtx_vec_common.h
@@ -71,6 +71,7 @@ reassemble_packets(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_bufs,
 					/* free up last mbuf */
 					struct rte_mbuf *secondlast = start;
 
+					start->nb_segs--;
 					while (secondlast->next != end)
 						secondlast = secondlast->next;
 					secondlast->data_len -= (rxq->crc_len -
-- 
1.9.0

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

* [dpdk-stable] patch 'net/enic: remove unnecessary function parameter attributes' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (54 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e: fix segment number in reassemble process' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/nfp: fix VLAN offload flags check' " Yuanhan Liu
                   ` (22 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: John Daley; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 2bde551528bfb138cb1666fe3b0c38bcfd6a9977 Mon Sep 17 00:00:00 2001
From: John Daley <johndale@cisco.com>
Date: Tue, 10 Jan 2017 19:42:12 -0800
Subject: [PATCH] net/enic: remove unnecessary function parameter attributes

[ upstream commit 9d0fe07b4ecbd8ab94df3f44713819fd8d359aa5 ]

Remove __rte_unused attributes in function declaration when
the parameters really are used.

Fixes: dfbd6a9cb504 ("net/enic: extend flow director support for 1300 series")

Signed-off-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index 865cd76..7ff994b 100644
--- a/drivers/net/enic/enic.h
+++ b/drivers/net/enic/enic.h
@@ -301,8 +301,7 @@ int enic_link_update(struct enic *enic);
 void enic_fdir_info(struct enic *enic);
 void enic_fdir_info_get(struct enic *enic, struct rte_eth_fdir_info *stats);
 void copy_fltr_v1(struct filter_v2 *fltr, struct rte_eth_fdir_input *input,
-		  struct rte_eth_fdir_masks *masks);
-void copy_fltr_v2(__rte_unused struct filter_v2 *fltr,
-		  __rte_unused struct rte_eth_fdir_input *input,
 		  __rte_unused struct rte_eth_fdir_masks *masks);
+void copy_fltr_v2(struct filter_v2 *fltr, struct rte_eth_fdir_input *input,
+		  struct rte_eth_fdir_masks *masks);
 #endif /* _ENIC_H_ */
-- 
1.9.0

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

* [dpdk-stable] patch 'net/nfp: fix VLAN offload flags check' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (55 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/enic: remove unnecessary function parameter attributes' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/cxgbe: fix parenthesis on bitwise operation' " Yuanhan Liu
                   ` (21 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Yuanhan Liu, Alejandro Lucero, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 495ba39d2fac0bdb656b33a06a4111699a9007e4 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Thu, 12 Jan 2017 14:04:56 +0100
Subject: [PATCH] net/nfp: fix VLAN offload flags check

[ upstream commit 6ffc32808d488ee53eec33791e95ae78e55b5db1 ]

Fix typo when checking that no VLAN offload flags are passed at port
initialization.

By the way, also fix a typo in the log.

Fixes: d4a27a3b092a ("nfp: add basic features")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index f4c09f1..099d82b 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2043,9 +2043,9 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 	new_ctrl = 0;
 
 	if ((mask & ETH_VLAN_FILTER_OFFLOAD) ||
-	    (mask & ETH_VLAN_FILTER_OFFLOAD))
-		RTE_LOG(INFO, PMD, "Not support for ETH_VLAN_FILTER_OFFLOAD or"
-			" ETH_VLAN_FILTER_EXTEND");
+	    (mask & ETH_VLAN_EXTEND_OFFLOAD))
+		RTE_LOG(INFO, PMD, "No support for ETH_VLAN_FILTER_OFFLOAD or"
+			" ETH_VLAN_EXTEND_OFFLOAD");
 
 	/* Enable vlan strip if it is not configured yet */
 	if ((mask & ETH_VLAN_STRIP_OFFLOAD) &&
-- 
1.9.0

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

* [dpdk-stable] patch 'net/cxgbe: fix parenthesis on bitwise operation' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (56 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/nfp: fix VLAN offload flags check' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix function declaration' " Yuanhan Liu
                   ` (20 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Emmanuel Roullit; +Cc: Yuanhan Liu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From fa4ee9379579da2622482f2ffea7abe8bb004f58 Mon Sep 17 00:00:00 2001
From: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Date: Sun, 15 Jan 2017 20:50:37 +0100
Subject: [PATCH] net/cxgbe: fix parenthesis on bitwise operation

[ upstream commit 1039ee1c6ddfa2ba67e05449147c8e5c2d783cd0 ]

clang reports the following error:
error: logical not is only applied to the left hand side of this bitwise
operator. [-Werror,-Wlogical-not-parentheses]

Fixes: 92c8a63223e5 ("cxgbe: add device configuration and Rx support")

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/cxgbe/cxgbe_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 922155b..345f9b0 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -959,7 +959,7 @@ int setup_rss(struct port_info *pi)
 	dev_debug(adapter, "%s:  pi->rss_size = %u; pi->n_rx_qsets = %u\n",
 		  __func__, pi->rss_size, pi->n_rx_qsets);
 
-	if (!pi->flags & PORT_RSS_DONE) {
+	if (!(pi->flags & PORT_RSS_DONE)) {
 		if (adapter->flags & FULL_INIT_DONE) {
 			/* Fill default values with equal distribution */
 			for (j = 0; j < pi->rss_size; j++)
-- 
1.9.0

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

* [dpdk-stable] patch 'net/qede: fix function declaration' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (57 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/cxgbe: fix parenthesis on bitwise operation' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx: fix IPv4 and IPv6 packet type' " Yuanhan Liu
                   ` (19 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Emmanuel Roullit; +Cc: Yuanhan Liu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 62b43f8aff2828de3e63407e6e3dd6b3b972c13a Mon Sep 17 00:00:00 2001
From: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Date: Sun, 15 Jan 2017 20:51:24 +0100
Subject: [PATCH] net/qede: fix function declaration

[ upstream commit 25358aa6f73471d99d9f1cd0aba1b96b7c1fcfb7 ]

clang reports this error message:
error: this function declaration is not a prototype
[-Werror,-Wstrict-prototypes]

Fixes: 5cdd769a26ec ("qede: add L2 support")

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/qede/qede_eth_if.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/qede/qede_eth_if.h b/drivers/net/qede/qede_eth_if.h
index 9c0db87..ef4a4b5 100644
--- a/drivers/net/qede/qede_eth_if.h
+++ b/drivers/net/qede/qede_eth_if.h
@@ -137,7 +137,7 @@ struct qed_eth_ops {
 
 extern const struct qed_common_ops qed_common_ops_pass;
 
-const struct qed_eth_ops *qed_get_eth_ops();
+const struct qed_eth_ops *qed_get_eth_ops(void);
 
 int qed_configure_filter_rx_mode(struct rte_eth_dev *eth_dev,
 				 enum qed_filter_rx_mode_type type);
-- 
1.9.0

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

* [dpdk-stable] patch 'net/mlx: fix IPv4 and IPv6 packet type' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (58 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix function declaration' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e: fix VF reset flow' " Yuanhan Liu
                   ` (18 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  Cc: Yuanhan Liu, Samuel Gauthier, Olivier Matz, Adrien Mazarguil,
	dpdk stable, Matthieu Ternisien d'Ouville

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 30b88a3528ae7c73dd323f2327756e75fb13b3ce Mon Sep 17 00:00:00 2001
From: Matthieu Ternisien d'Ouville <matthieu.tdo@6wind.com>
Date: Wed, 11 Jan 2017 17:44:33 +0100
Subject: [PATCH] net/mlx: fix IPv4 and IPv6 packet type

[ upstream commit 501505c5608a7177ef6cdee60459c7847c398f9b ]

Mellanox PMDs do not differentiate IP header with or without options, so
the advertised packet type for an IPv4 should not be RTE_PTYPE_L3_IPV4,
which explicitly means "does not contain any header option".

Change the driver to set
RTE_PTYPE(_INNER)_L3_IPV4_EXT_UNKNOWN or
RTE_PTYPE(_INNER)_L3_IPV6_EXT_UNKNOWN flags for all IPv4/IPv6 packets
received.

Fixes: 429df3803a16 ("mlx4: replace some offload flags with packet type")
Fixes: 67fa62bc672d ("mlx5: support checksum offload")

Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
Signed-off-by: Matthieu Ternisien d'Ouville <matthieu.tdo@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx4/mlx4.c      | 18 ++++++++++++------
 drivers/net/mlx5/mlx5_rxtx.c | 12 ++++++------
 2 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index da61a85..6d43a97 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -2961,19 +2961,25 @@ rxq_cq_to_pkt_type(uint32_t flags)
 	if (flags & IBV_EXP_CQ_RX_TUNNEL_PACKET)
 		pkt_type =
 			TRANSPOSE(flags,
-			          IBV_EXP_CQ_RX_OUTER_IPV4_PACKET, RTE_PTYPE_L3_IPV4) |
+				  IBV_EXP_CQ_RX_OUTER_IPV4_PACKET,
+				  RTE_PTYPE_L3_IPV4_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
-			          IBV_EXP_CQ_RX_OUTER_IPV6_PACKET, RTE_PTYPE_L3_IPV6) |
+				  IBV_EXP_CQ_RX_OUTER_IPV6_PACKET,
+				  RTE_PTYPE_L3_IPV6_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
-			          IBV_EXP_CQ_RX_IPV4_PACKET, RTE_PTYPE_INNER_L3_IPV4) |
+				  IBV_EXP_CQ_RX_IPV4_PACKET,
+				  RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
-			          IBV_EXP_CQ_RX_IPV6_PACKET, RTE_PTYPE_INNER_L3_IPV6);
+				  IBV_EXP_CQ_RX_IPV6_PACKET,
+				  RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN);
 	else
 		pkt_type =
 			TRANSPOSE(flags,
-			          IBV_EXP_CQ_RX_IPV4_PACKET, RTE_PTYPE_L3_IPV4) |
+				  IBV_EXP_CQ_RX_IPV4_PACKET,
+				  RTE_PTYPE_L3_IPV4_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
-			          IBV_EXP_CQ_RX_IPV6_PACKET, RTE_PTYPE_L3_IPV6);
+				  IBV_EXP_CQ_RX_IPV6_PACKET,
+				  RTE_PTYPE_L3_IPV6_EXT_UNKNOWN);
 	return pkt_type;
 }
 
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index e31d985..46720f5 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1111,24 +1111,24 @@ rxq_cq_to_pkt_type(volatile struct mlx5_cqe *cqe)
 		pkt_type =
 			TRANSPOSE(flags,
 				  MLX5_CQE_RX_OUTER_IPV4_PACKET,
-				  RTE_PTYPE_L3_IPV4) |
+				  RTE_PTYPE_L3_IPV4_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
 				  MLX5_CQE_RX_OUTER_IPV6_PACKET,
-				  RTE_PTYPE_L3_IPV6) |
+				  RTE_PTYPE_L3_IPV6_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
 				  MLX5_CQE_RX_IPV4_PACKET,
-				  RTE_PTYPE_INNER_L3_IPV4) |
+				  RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
 				  MLX5_CQE_RX_IPV6_PACKET,
-				  RTE_PTYPE_INNER_L3_IPV6);
+				  RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN);
 	else
 		pkt_type =
 			TRANSPOSE(flags,
 				  MLX5_CQE_L3_HDR_TYPE_IPV6,
-				  RTE_PTYPE_L3_IPV6) |
+				  RTE_PTYPE_L3_IPV6_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
 				  MLX5_CQE_L3_HDR_TYPE_IPV4,
-				  RTE_PTYPE_L3_IPV4);
+				  RTE_PTYPE_L3_IPV4_EXT_UNKNOWN);
 	return pkt_type;
 }
 
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e: fix VF reset flow' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (59 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx: fix IPv4 and IPv6 packet type' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'cryptodev: fix crash on null dereference' " Yuanhan Liu
                   ` (17 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Yuanhan Liu, Helin Zhang, Vincent Jardin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From fbd93a4a35d926e75ea002cfe6207b4d2747f633 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 17 Jan 2017 16:45:11 +0800
Subject: [PATCH] net/i40e: fix VF reset flow

[ upstream commit 32ecaf723fa3724f6e78aad08653cb9c975b9ad9 ]

Add missing step during VF reset: PF should
set I40E_VFGEN_RSTAT to ACTIVE at end of the
VF reset operation or VF driver may not able
to detect that reset is already completed.
This patch also remove the unnecessary enum
for vfr state.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
---
 drivers/net/i40e/i40e_pf.c | 6 ++++--
 drivers/net/i40e/i40e_pf.h | 5 -----
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index ddfc140..97b8ecc 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -138,7 +138,7 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset)
 	abs_vf_id = vf_id + hw->func_caps.vf_base_id;
 
 	/* Notify VF that we are in VFR progress */
-	I40E_WRITE_REG(hw, I40E_VFGEN_RSTAT1(vf_id), I40E_PF_VFR_INPROGRESS);
+	I40E_WRITE_REG(hw, I40E_VFGEN_RSTAT1(vf_id), I40E_VFR_INPROGRESS);
 
 	/*
 	 * If require a SW VF reset, a VFLR interrupt will be generated,
@@ -219,7 +219,7 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset)
 	}
 
 	/* Reset done, Set COMPLETE flag and clear reset bit */
-	I40E_WRITE_REG(hw, I40E_VFGEN_RSTAT1(vf_id), I40E_PF_VFR_COMPLETED);
+	I40E_WRITE_REG(hw, I40E_VFGEN_RSTAT1(vf_id), I40E_VFR_COMPLETED);
 	val = I40E_READ_REG(hw, I40E_VPGEN_VFRTRIG(vf_id));
 	val &= ~I40E_VPGEN_VFRTRIG_VFSWR_MASK;
 	I40E_WRITE_REG(hw, I40E_VPGEN_VFRTRIG(vf_id), val);
@@ -247,6 +247,8 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset)
 		return -EFAULT;
 	}
 
+	I40E_WRITE_REG(hw, I40E_VFGEN_RSTAT1(vf_id), I40E_VFR_VFACTIVE);
+
 	return ret;
 }
 
diff --git a/drivers/net/i40e/i40e_pf.h b/drivers/net/i40e/i40e_pf.h
index cddc45c..244bac3 100644
--- a/drivers/net/i40e/i40e_pf.h
+++ b/drivers/net/i40e/i40e_pf.h
@@ -48,11 +48,6 @@
 
 #define I40E_DPDK_OFFSET  0x100
 
-enum i40e_pf_vfr_state {
-	I40E_PF_VFR_INPROGRESS = 0,
-	I40E_PF_VFR_COMPLETED = 1,
-};
-
 /* DPDK pf driver specific command to VF */
 enum i40e_virtchnl_ops_dpdk {
 	/*
-- 
1.9.0

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

* [dpdk-stable] patch 'cryptodev: fix crash on null dereference' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (60 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e: fix VF reset flow' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/openssl: fix extra bytes written at end of data' " Yuanhan Liu
                   ` (16 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Yuanhan Liu, Arek Kusztal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 6da032c83440bb5a4faa56b013617cbb2b103949 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Sun, 4 Dec 2016 00:04:01 +0530
Subject: [PATCH] cryptodev: fix crash on null dereference

[ upstream commit 53a3ba0c36757cd74bc8411e60aa81c91f679cd3 ]

crypodev->data->name will be null when
rte_cryptodev_get_dev_id() invoked without a valid
crypto device instance.

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

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 lib/librte_cryptodev/rte_cryptodev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 127e8d0..54e95d5 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -225,13 +225,14 @@ rte_cryptodev_create_vdev(const char *name, const char *args)
 }
 
 int
-rte_cryptodev_get_dev_id(const char *name) {
+rte_cryptodev_get_dev_id(const char *name)
+{
 	unsigned i;
 
 	if (name == NULL)
 		return -1;
 
-	for (i = 0; i < rte_cryptodev_globals->max_devs; i++)
+	for (i = 0; i < rte_cryptodev_globals->nb_devs; i++)
 		if ((strcmp(rte_cryptodev_globals->devs[i].data->name, name)
 				== 0) &&
 				(rte_cryptodev_globals->devs[i].attached ==
-- 
1.9.0

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

* [dpdk-stable] patch 'crypto/openssl: fix extra bytes written at end of data' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (61 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'cryptodev: fix crash on null dereference' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/aesni_mb: fix incorrect crypto session' " Yuanhan Liu
                   ` (15 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Piotr Azarewicz; +Cc: Yuanhan Liu, Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 1db7965c01649ef0a3e24d76d8f09c282a5594ca Mon Sep 17 00:00:00 2001
From: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Date: Wed, 7 Dec 2016 11:45:54 +0100
Subject: [PATCH] crypto/openssl: fix extra bytes written at end of data

[ upstream commit 6b283a03216e120a697a0006341b3ab633e6a82c ]

Extra bytes are being written at end of data while process standard
openssl cipher encryption. This behaviour is unexpected.

This patch disable the padding feature in openssl library, which is
causing the problem.

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

Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 5f8fa33..832ea1d 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -496,6 +496,8 @@ process_openssl_cipher_encrypt(uint8_t *src, uint8_t *dst,
 	if (EVP_EncryptInit_ex(ctx, algo, NULL, key, iv) <= 0)
 		goto process_cipher_encrypt_err;
 
+	EVP_CIPHER_CTX_set_padding(ctx, 0);
+
 	if (EVP_EncryptUpdate(ctx, dst, &dstlen, src, srclen) <= 0)
 		goto process_cipher_encrypt_err;
 
-- 
1.9.0

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

* [dpdk-stable] patch 'crypto/aesni_mb: fix incorrect crypto session' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (62 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/openssl: fix extra bytes written at end of data' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/aesni_gcm: fix J0 padding bytes' " Yuanhan Liu
                   ` (14 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Yuanhan Liu, Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 861348f40cd77ba5ec2af0a787d0385e584cfb06 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Mon, 19 Dec 2016 17:29:00 +0000
Subject: [PATCH] crypto/aesni_mb: fix incorrect crypto session

[ upstream commit 3413354ea1fe2ea10718a30e14516f61f15aaba1 ]

When using sessionless crypto operations, crypto session
is obtained from a pool of sessions, when processing the
operation. Once the operation is processed, the session
is put back in the pool, but for the AESNI MB PMD, this
session was not being saved in the operation and therefore,
it did not return to the session pool.

Fixes: 924e84f87306 ("aesni_mb: add driver for multi buffer based crypto")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index f07cd07..7443b47 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -322,6 +322,7 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
 			rte_mempool_put(qp->sess_mp, _sess);
 			sess = NULL;
 		}
+		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
 	}
 
 	return sess;
-- 
1.9.0

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

* [dpdk-stable] patch 'crypto/aesni_gcm: fix J0 padding bytes' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (63 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/aesni_mb: fix incorrect crypto session' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/aesni_gcm: fix IV size in capabilities' " Yuanhan Liu
                   ` (13 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Yuanhan Liu, Piotr Azarewicz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 97d299a856c43e465ec4326eed415402f807b1d6 Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Fri, 23 Dec 2016 08:24:51 +0000
Subject: [PATCH] crypto/aesni_gcm: fix J0 padding bytes

[ upstream commit b9719b996a7c0c0dd4d80a142ddb26fabafd0ce9 ]

This commit fixes pre-counter block (J0) padding by clearing
four most significant bytes before setting initial counter value.

Fixes: b2bb3597470c ("crypto/aesni_gcm: move pre-counter block to driver")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index dba5e15..af3d60f 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -40,6 +40,7 @@
 #include <rte_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
+#include <rte_byteorder.h>
 
 #include "aesni_gcm_pmd_private.h"
 
@@ -241,7 +242,8 @@ process_gcm_crypto_op(struct aesni_gcm_qp *qp, struct rte_crypto_sym_op *op,
 	 * to set BE LSB to 1, driver expects that 16B is allocated
 	 */
 	if (op->cipher.iv.length == 12) {
-		op->cipher.iv.data[15] = 1;
+		uint32_t *iv_padd = (uint32_t *)&op->cipher.iv.data[12];
+		*iv_padd = rte_bswap32(1);
 	}
 
 	if (op->auth.aad.length != 12 && op->auth.aad.length != 8 &&
-- 
1.9.0

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

* [dpdk-stable] patch 'crypto/aesni_gcm: fix IV size in capabilities' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (64 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/aesni_gcm: fix J0 padding bytes' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/qat: " Yuanhan Liu
                   ` (12 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Yuanhan Liu, Piotr Azarewicz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 56058a841941c138fee58bb9de36bc046bb47a41 Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Fri, 23 Dec 2016 08:24:52 +0000
Subject: [PATCH] crypto/aesni_gcm: fix IV size in capabilities

[ upstream commit 39dc49db37b9539cda685c7922fe9258a36613a8 ]

This patch sets iv size in aesni gcm PMD to 12 bytes to be
conformant with nist SP800-38D.

Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto operations")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index e824d4b..c51f82a 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -77,8 +77,8 @@ static const struct rte_cryptodev_capabilities aesni_gcm_pmd_capabilities[] = {
 					.increment = 0
 				},
 				.iv_size = {
-					.min = 16,
-					.max = 16,
+					.min = 12,
+					.max = 12,
 					.increment = 0
 				}
 			}, }
-- 
1.9.0

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

* [dpdk-stable] patch 'crypto/qat: fix IV size in capabilities' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (65 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/aesni_gcm: fix IV size in capabilities' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'cryptodev: fix loop in device query' " Yuanhan Liu
                   ` (11 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Yuanhan Liu, Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From e5af83d662bcfba218fce6002311966b1afebf2b Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Fri, 23 Dec 2016 08:24:53 +0000
Subject: [PATCH] crypto/qat: fix IV size in capabilities

[ upstream commit d19db9f91204c6f296db86b9ec88c1ed1c029af7 ]

This patch sets iv size in qat PMD to 12 bytes to be
conformant with nist SP800-38D.

Fixes: 26c2e4ad5ad4 ("cryptodev: add capabilities discovery")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@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 798cd98..d6c2731 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -303,8 +303,8 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = {
 					.increment = 8
 				},
 				.iv_size = {
-					.min = 16,
-					.max = 16,
+					.min = 12,
+					.max = 12,
 					.increment = 0
 				}
 			}, }
-- 
1.9.0

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

* [dpdk-stable] patch 'cryptodev: fix loop in device query' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (66 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/qat: " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/openssl: fix indentation in guide' " Yuanhan Liu
                   ` (10 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Fan Zhang; +Cc: Yuanhan Liu, Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From f7e2edaeb4a760ba46614784efbf6151e37aad64 Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Wed, 11 Jan 2017 14:09:47 +0000
Subject: [PATCH] cryptodev: fix loop in device query

[ upstream commit c5b70818adf02f97f049c2b2b3206e89d6f6c64b ]

This patch fixes the dev value update problem in
rte_cryptodev_pmd_get_named_dev, orginally, dev won't be updated
after the initial step in the loop.

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

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 lib/librte_cryptodev/rte_cryptodev_pmd.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index abfe2dc..c6a5794 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -183,8 +183,9 @@ rte_cryptodev_pmd_get_named_dev(const char *name)
 	if (name == NULL)
 		return NULL;
 
-	for (i = 0, dev = &rte_cryptodev_globals->devs[i];
-			i < rte_cryptodev_globals->max_devs; i++) {
+	for (i = 0; i < rte_cryptodev_globals->max_devs; i++) {
+		dev = &rte_cryptodev_globals->devs[i];
+
 		if ((dev->attached == RTE_CRYPTODEV_ATTACHED) &&
 				(strcmp(dev->data->name, name) == 0))
 			return dev;
-- 
1.9.0

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

* [dpdk-stable] patch 'crypto/openssl: fix indentation in guide' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (67 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'cryptodev: fix loop in device query' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'app/test: fix symmetric session free in crypto perf tests' " Yuanhan Liu
                   ` (9 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Daniel Mrzyglod; +Cc: Yuanhan Liu, Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 1d32a1be4293c8debe22b7ab5070c15576a6fb24 Mon Sep 17 00:00:00 2001
From: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Date: Tue, 10 Jan 2017 15:44:25 +0100
Subject: [PATCH] crypto/openssl: fix indentation in guide

[ upstream commit ce7445744959786cf773e736b4efbd4e4ed8a9ac ]

The code section was lacking indentation to be be correctly formatted.

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

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/cryptodevs/openssl.rst | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/guides/cryptodevs/openssl.rst b/doc/guides/cryptodevs/openssl.rst
index d2b5906..f1c39ba 100644
--- a/doc/guides/cryptodevs/openssl.rst
+++ b/doc/guides/cryptodevs/openssl.rst
@@ -98,15 +98,15 @@ To verify real traffic l2fwd-crypto example can be used with this command:
 
 .. code-block:: console
 
-sudo ./build/l2fwd-crypto -c 0x3 -n 4 --vdev "crypto_openssl"
---vdev "crypto_openssl"-- -p 0x3 --chain CIPHER_HASH
---cipher_op ENCRYPT --cipher_algo AES_CBC
---cipher_key 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f
---iv 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:ff
---auth_op GENERATE --auth_algo SHA1_HMAC
---auth_key 11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
-:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
-:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
+	sudo ./build/l2fwd-crypto -c 0x3 -n 4 --vdev "crypto_openssl"
+	--vdev "crypto_openssl"-- -p 0x3 --chain CIPHER_HASH
+	--cipher_op ENCRYPT --cipher_algo AES_CBC
+	--cipher_key 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f
+	--iv 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:ff
+	--auth_op GENERATE --auth_algo SHA1_HMAC
+	--auth_key 11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
+	:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
+	:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11
 
 Limitations
 -----------
-- 
1.9.0

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

* [dpdk-stable] patch 'app/test: fix symmetric session free in crypto perf tests' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (68 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/openssl: fix indentation in guide' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'vhost: fix guest/host physical address mapping' " Yuanhan Liu
                   ` (8 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 35a8a7eab3594c83c1ae9e2ea516e3a532b3dc6d Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Tue, 17 Jan 2017 13:33:07 +0000
Subject: [PATCH] app/test: fix symmetric session free in crypto perf tests

[ upstream commit e4006b30eedcbec4573a7f69682458c907b3c1a8 ]

This commit fixes problem with deallocation of symmetric
session entries in cryptodev performance tests.

Fixes: 390919829fdb ("app/test: update AES SHA performance test")
Fixes: 79521c438363 ("app/test: add AES GCM performance test")
Fixes: ffbe3be0d4b5 ("app/test: add libcrypto")
Fixes: 97fe6461c7cb ("app/test: add SNOW 3G performance test")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 app/test/test_cryptodev_perf.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/app/test/test_cryptodev_perf.c b/app/test/test_cryptodev_perf.c
index 59a6891..89a6795 100644
--- a/app/test/test_cryptodev_perf.c
+++ b/app/test/test_cryptodev_perf.c
@@ -2216,6 +2216,7 @@ test_perf_snow3G_optimise_cyclecount(struct perf_test_params *pparams)
 		rte_pktmbuf_free(c_ops[i]->sym->m_src);
 		rte_crypto_op_free(c_ops[i]);
 	}
+	rte_cryptodev_sym_session_free(ts_params->dev_id, sess);
 
 	return TEST_SUCCESS;
 }
@@ -2418,6 +2419,7 @@ test_perf_openssl_optimise_cyclecount(struct perf_test_params *pparams)
 		rte_pktmbuf_free(c_ops[i]->sym->m_src);
 		rte_crypto_op_free(c_ops[i]);
 	}
+	rte_cryptodev_sym_session_free(ts_params->dev_id, sess);
 
 	return TEST_SUCCESS;
 }
@@ -3039,6 +3041,7 @@ test_perf_aes_sha(uint8_t dev_id, uint16_t queue_id,
 
 	for (i = 0; i < pparams->burst_size * NUM_MBUF_SETS; i++)
 		rte_pktmbuf_free(mbufs[i]);
+	rte_cryptodev_sym_session_free(dev_id, sess);
 
 	printf("\n");
 	return TEST_SUCCESS;
@@ -3202,6 +3205,7 @@ test_perf_snow3g(uint8_t dev_id, uint16_t queue_id,
 
 	for (i = 0; i < pparams->burst_size * NUM_MBUF_SETS; i++)
 		rte_pktmbuf_free(mbufs[i]);
+	rte_cryptodev_sym_session_free(dev_id, sess);
 
 	printf("\n");
 	return TEST_SUCCESS;
@@ -3351,6 +3355,7 @@ test_perf_openssl(uint8_t dev_id, uint16_t queue_id,
 
 	for (i = 0; i < pparams->burst_size * NUM_MBUF_SETS; i++)
 		rte_pktmbuf_free(mbufs[i]);
+	rte_cryptodev_sym_session_free(dev_id, sess);
 
 	printf("\n");
 	return TEST_SUCCESS;
@@ -3956,6 +3961,7 @@ perf_AES_GCM(uint8_t dev_id, uint16_t queue_id,
 
 	for (i = 0; i < burst; i++)
 		rte_pktmbuf_free(mbufs[i]);
+	rte_cryptodev_sym_session_free(dev_id, sess);
 
 	return 0;
 }
-- 
1.9.0

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

* [dpdk-stable] patch 'vhost: fix guest/host physical address mapping' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (69 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'app/test: fix symmetric session free in crypto perf tests' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'vhost: fix memory leak' " Yuanhan Liu
                   ` (7 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Haifeng Lin; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From aa86b1608f9cda8aabc66a14a1c9a9c9a437c1c9 Mon Sep 17 00:00:00 2001
From: Haifeng Lin <haifeng.lin@huawei.com>
Date: Thu, 1 Dec 2016 19:42:02 +0800
Subject: [PATCH] vhost: fix guest/host physical address mapping

[ upstream commit 8c33fc10f65d250cf84d9dcf2766dabd605a37b2 ]

When reg_size < page_size the function read in
rte_mem_virt2phy would not return, because
host_user_addr is invalid.

Fixes: e246896178e6 ("vhost: get guest/host physical address mappings")

Signed-off-by: Haifeng Lin <haifeng.lin@huawei.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 lib/librte_vhost/vhost_user.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 6b83c15..50cb6d1 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -447,14 +447,14 @@ add_guest_pages(struct virtio_net *dev, struct virtio_memory_region *reg,
 	reg_size -= size;
 
 	while (reg_size > 0) {
+		size = RTE_MIN(reg_size, page_size);
 		host_phys_addr = rte_mem_virt2phy((void *)(uintptr_t)
 						  host_user_addr);
-		add_one_guest_page(dev, guest_phys_addr, host_phys_addr,
-				   page_size);
+		add_one_guest_page(dev, guest_phys_addr, host_phys_addr, size);
 
-		host_user_addr  += page_size;
-		guest_phys_addr += page_size;
-		reg_size -= page_size;
+		host_user_addr  += size;
+		guest_phys_addr += size;
+		reg_size -= size;
 	}
 }
 
-- 
1.9.0

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

* [dpdk-stable] patch 'vhost: fix memory leak' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (70 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'vhost: fix guest/host physical address mapping' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/vhost: fix socket file deleted on stop' " Yuanhan Liu
                   ` (6 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Yong Wang; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From c3b125f1f78f434e5579ba36a98027eef02703fa Mon Sep 17 00:00:00 2001
From: Yong Wang <wang.yong19@zte.com.cn>
Date: Tue, 3 Jan 2017 22:57:55 -0500
Subject: [PATCH] vhost: fix memory leak

[ upstream commit 5731d6acc7fe1f76ed895d08821b51dd5c817bd0 ]

In function vhost_new_device(), current code dose not free 'dev'
in "i == MAX_VHOST_DEVICE" condition statements. It will lead to a
memory leak.

Fixes: 45ca9c6f7bc6 ("vhost: get rid of linked list for devices")

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 lib/librte_vhost/vhost.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 31825b8..e415093 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -250,6 +250,7 @@ vhost_new_device(void)
 	if (i == MAX_VHOST_DEVICE) {
 		RTE_LOG(ERR, VHOST_CONFIG,
 			"Failed to find a free slot for new device.\n");
+		rte_free(dev);
 		return -1;
 	}
 
-- 
1.9.0

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

* [dpdk-stable] patch 'net/vhost: fix socket file deleted on stop' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (71 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'vhost: fix memory leak' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'examples/vhost: fix calculation of mbuf count' " Yuanhan Liu
                   ` (5 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Chas Williams; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From b7c0199369dda076bb025293ec3e895b734679a0 Mon Sep 17 00:00:00 2001
From: Chas Williams <ciwillia@brocade.com>
Date: Tue, 3 Jan 2017 11:22:42 -0500
Subject: [PATCH] net/vhost: fix socket file deleted on stop

[ upstream commit aed0b12930b3338a9735c9f1bb85b54d61456e43 ]

If you create a vhost server device, it doesn't create the actual datagram
socket until you call .dev_start().  If you call .dev_stop() is also
deletes those sockets.  For QEMU clients, this is a problem since QEMU
doesn't know how to re-attach to datagram sockets that have gone away.

To fix this, register and unregister the datagram sockets during device
creation and removal.

Fixes: ee584e9710b9 ("vhost: add driver on top of the library")

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 45 +++++++++++++++------------------------
 1 file changed, 17 insertions(+), 28 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index dd79ccf..e715c31 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -115,9 +115,6 @@ struct pmd_internal {
 	char *dev_name;
 	char *iface_name;
 	uint16_t max_queues;
-	uint64_t flags;
-
-	volatile uint16_t once;
 };
 
 struct internal_list {
@@ -776,35 +773,14 @@ vhost_driver_session_stop(void)
 }
 
 static int
-eth_dev_start(struct rte_eth_dev *dev)
+eth_dev_start(struct rte_eth_dev *dev __rte_unused)
 {
-	struct pmd_internal *internal = dev->data->dev_private;
-	int ret = 0;
-
-	if (rte_atomic16_cmpset(&internal->once, 0, 1)) {
-		ret = rte_vhost_driver_register(internal->iface_name,
-						internal->flags);
-		if (ret)
-			return ret;
-	}
-
-	/* We need only one message handling thread */
-	if (rte_atomic16_add_return(&nb_started_ports, 1) == 1)
-		ret = vhost_driver_session_start();
-
-	return ret;
+	return 0;
 }
 
 static void
-eth_dev_stop(struct rte_eth_dev *dev)
+eth_dev_stop(struct rte_eth_dev *dev __rte_unused)
 {
-	struct pmd_internal *internal = dev->data->dev_private;
-
-	if (rte_atomic16_cmpset(&internal->once, 1, 0))
-		rte_vhost_driver_unregister(internal->iface_name);
-
-	if (rte_atomic16_sub_return(&nb_started_ports, 1) == 0)
-		vhost_driver_session_stop();
 }
 
 static int
@@ -1048,7 +1024,6 @@ eth_dev_vhost_create(const char *name, char *iface_name, int16_t queues,
 	internal->iface_name = strdup(iface_name);
 	if (internal->iface_name == NULL)
 		goto error;
-	internal->flags = flags;
 
 	list->eth_dev = eth_dev;
 	pthread_mutex_lock(&internal_list_lock);
@@ -1083,6 +1058,15 @@ eth_dev_vhost_create(const char *name, char *iface_name, int16_t queues,
 	eth_dev->rx_pkt_burst = eth_vhost_rx;
 	eth_dev->tx_pkt_burst = eth_vhost_tx;
 
+	if (rte_vhost_driver_register(iface_name, flags))
+		goto error;
+
+	/* We need only one message handling thread */
+	if (rte_atomic16_add_return(&nb_started_ports, 1) == 1) {
+		if (vhost_driver_session_start())
+			goto error;
+	}
+
 	return data->port_id;
 
 error:
@@ -1220,6 +1204,11 @@ rte_pmd_vhost_remove(const char *name)
 
 	eth_dev_stop(eth_dev);
 
+	rte_vhost_driver_unregister(internal->iface_name);
+
+	if (rte_atomic16_sub_return(&nb_started_ports, 1) == 0)
+		vhost_driver_session_stop();
+
 	rte_free(vring_states[eth_dev->data->port_id]);
 	vring_states[eth_dev->data->port_id] = NULL;
 
-- 
1.9.0

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

* [dpdk-stable] patch 'examples/vhost: fix calculation of mbuf count' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (72 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/vhost: fix socket file deleted on stop' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'examples/vhost: fix lcore initialization' " Yuanhan Liu
                   ` (4 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Yong Wang; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 0eb5e0e3cc8153762264e38551b0c5eec8cca0b7 Mon Sep 17 00:00:00 2001
From: Yong Wang <wang.yong19@zte.com.cn>
Date: Wed, 11 Jan 2017 22:52:17 -0500
Subject: [PATCH] examples/vhost: fix calculation of mbuf count

[ upstream commit 12ee45a3620b30a99d21cbf5a25d787f088f0de9 ]

When calculating 'nr_mbufs_per_core', 'MAX_PKT_BURST' was mutiplied
twice. Fix it by removing one of them.

Fixes: bdb19b771e6f ("examples/vhost: fix mbuf allocation failure")

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 examples/vhost/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 0709859..f3d5073 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1393,7 +1393,7 @@ create_mbuf_pool(uint16_t nr_port, uint32_t nr_switch_core, uint32_t mbuf_size,
 		mtu = 64 * 1024;
 
 	nr_mbufs_per_core  = (mtu + mbuf_size) * MAX_PKT_BURST /
-			(mbuf_size - RTE_PKTMBUF_HEADROOM) * MAX_PKT_BURST;
+			(mbuf_size - RTE_PKTMBUF_HEADROOM);
 	nr_mbufs_per_core += nr_rx_desc;
 	nr_mbufs_per_core  = RTE_MAX(nr_mbufs_per_core, nr_mbuf_cache);
 
-- 
1.9.0

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

* [dpdk-stable] patch 'examples/vhost: fix lcore initialization' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (73 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'examples/vhost: fix calculation of mbuf count' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'examples/ethtool: fix querying non-PCI devices' " Yuanhan Liu
                   ` (3 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Yong Wang; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 26076e5469fb09247e5a85e7369d68bbe382572b Mon Sep 17 00:00:00 2001
From: Yong Wang <wang.yong19@zte.com.cn>
Date: Wed, 11 Jan 2017 03:59:46 -0500
Subject: [PATCH] examples/vhost: fix lcore initialization

[ upstream commit b3bee7d87d4abd01dd7a1d4163f2994f31487343 ]

when "TAILQ_INIT()" was added to the loop of "for (lcore_id = 0; ...)"
statement, the assignment to "lcore_ids" was removed out of the loop.
It changed the original initialization of "lcore_ids".

Fix it by introducing two braces.

Fixes: 45657a5c6861 ("examples/vhost: use tailq to link vhost devices")

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 examples/vhost/main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index f3d5073..eddaf92 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1436,11 +1436,12 @@ main(int argc, char *argv[])
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Invalid argument\n");
 
-	for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id ++)
+	for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
 		TAILQ_INIT(&lcore_info[lcore_id].vdev_list);
 
 		if (rte_lcore_is_enabled(lcore_id))
-			lcore_ids[core_id ++] = lcore_id;
+			lcore_ids[core_id++] = lcore_id;
+	}
 
 	if (rte_lcore_count() > RTE_MAX_LCORE)
 		rte_exit(EXIT_FAILURE,"Not enough cores\n");
-- 
1.9.0

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

* [dpdk-stable] patch 'examples/ethtool: fix querying non-PCI devices' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (74 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'examples/vhost: fix lcore initialization' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/virtio-user: fix wrongly get/set features' " Yuanhan Liu
                   ` (2 subsequent siblings)
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Remy Horton; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From cb1ae621259ba918a027c423a57075bcc7b754e0 Mon Sep 17 00:00:00 2001
From: Remy Horton <remy.horton@intel.com>
Date: Wed, 30 Nov 2016 10:47:29 +0800
Subject: [PATCH] examples/ethtool: fix querying non-PCI devices

[ backported from upstream commit 6c66be9a769fdfeee3ca1d4c0d444e23402ce073 ]

Doing a device information query on a non-PCI device such as
vhost was resulting in the dereferencing of a NULL pointer
(the absent PCI data), causing a segmentation fault.

Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")

Signed-off-by: Remy Horton <remy.horton@intel.com>
---
 examples/ethtool/lib/rte_ethtool.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c
index a1f91d4..6f0ce84 100644
--- a/examples/ethtool/lib/rte_ethtool.c
+++ b/examples/ethtool/lib/rte_ethtool.c
@@ -61,10 +61,15 @@ rte_ethtool_get_drvinfo(uint8_t port_id, struct ethtool_drvinfo *drvinfo)
 		dev_info.driver_name);
 	snprintf(drvinfo->version, sizeof(drvinfo->version), "%s",
 		rte_version());
-	snprintf(drvinfo->bus_info, sizeof(drvinfo->bus_info),
-		"%04x:%02x:%02x.%x",
-		dev_info.pci_dev->addr.domain, dev_info.pci_dev->addr.bus,
-		dev_info.pci_dev->addr.devid, dev_info.pci_dev->addr.function);
+	if (dev_info.pci_dev)
+		snprintf(drvinfo->bus_info, sizeof(drvinfo->bus_info),
+			"%04x:%02x:%02x.%x",
+			dev_info.pci_dev->addr.domain,
+			dev_info.pci_dev->addr.bus,
+			dev_info.pci_dev->addr.devid,
+			dev_info.pci_dev->addr.function);
+	else
+		snprintf(drvinfo->bus_info, sizeof(drvinfo->bus_info), "N/A");
 
 	memset(&reg_info, 0, sizeof(reg_info));
 	rte_eth_dev_get_reg_info(port_id, &reg_info);
-- 
1.9.0

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

* [dpdk-stable] patch 'net/virtio-user: fix wrongly get/set features' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (75 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'examples/ethtool: fix querying non-PCI devices' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/virtio-user: fix not properly reset device' " Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/virtio: fix rewriting LSC flag' " Yuanhan Liu
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Jianfeng Tan; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From e201723c1f6f88a36fbfe3d9f142f5d39ea0e49d Mon Sep 17 00:00:00 2001
From: Jianfeng Tan <jianfeng.tan@intel.com>
Date: Fri, 13 Jan 2017 12:18:34 +0000
Subject: [PATCH] net/virtio-user: fix wrongly get/set features

[ upstream commit 142678d429598f5e1c484d84c986f33aaf2263dc ]

Before the commit 86d59b21468a ("net/virtio: support LRO"), features
in virtio PMD, is decided and properly set at device initialization
and will not be changed. But afterward, features could be changed in
virtio_dev_configure(), and will be re-negotiated if it's changed.

In virtio-user, device features is obtained at driver probe phase
only once, but we did not store it. So the added feature bits in
re-negotiation will fail.

To fix it, we store it down, and will be used to feature negotiation
either at device initialization phase or device configure phase.

Fixes: e9efa4d93821 ("net/virtio-user: add new virtual PCI driver")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 drivers/net/virtio/virtio_ethdev.h               |  5 ++++
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 34 +++++++++++-------------
 drivers/net/virtio/virtio_user/virtio_user_dev.h |  5 +++-
 drivers/net/virtio/virtio_user_ethdev.c          |  5 ++--
 4 files changed, 28 insertions(+), 21 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h
index 27d9a19..4feccf9 100644
--- a/drivers/net/virtio/virtio_ethdev.h
+++ b/drivers/net/virtio/virtio_ethdev.h
@@ -70,6 +70,11 @@
 	 1ULL << VIRTIO_F_VERSION_1       |	\
 	 1ULL << VIRTIO_F_IOMMU_PLATFORM)
 
+#define VIRTIO_PMD_SUPPORTED_GUEST_FEATURES	\
+	(VIRTIO_PMD_DEFAULT_GUEST_FEATURES |	\
+	 1u << VIRTIO_NET_F_GUEST_CSUM	   |	\
+	 1u << VIRTIO_NET_F_GUEST_TSO4     |	\
+	 1u << VIRTIO_NET_F_GUEST_TSO6)
 /*
  * CQ function prototype
  */
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index e239e0e..0d7e17b 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -148,12 +148,13 @@ virtio_user_start_device(struct virtio_user_dev *dev)
 
 	/* Step 1: set features
 	 * Make sure VHOST_USER_F_PROTOCOL_FEATURES is added if mq is enabled,
-	 * and VIRTIO_NET_F_MAC is stripped.
+	 * VIRTIO_NET_F_MAC and VIRTIO_NET_F_CTRL_VQ is stripped.
 	 */
 	features = dev->features;
 	if (dev->max_queue_pairs > 1)
 		features |= VHOST_USER_MQ;
 	features &= ~(1ull << VIRTIO_NET_F_MAC);
+	features &= ~(1ull << VIRTIO_NET_F_CTRL_VQ);
 	ret = vhost_user_sock(dev->vhostfd, VHOST_USER_SET_FEATURES, &features);
 	if (ret < 0)
 		goto error;
@@ -228,29 +229,26 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 	}
 
 	if (vhost_user_sock(dev->vhostfd, VHOST_USER_GET_FEATURES,
-			    &dev->features) < 0) {
+			    &dev->device_features) < 0) {
 		PMD_INIT_LOG(ERR, "get_features failed: %s", strerror(errno));
 		return -1;
 	}
 	if (dev->mac_specified)
-		dev->features |= (1ull << VIRTIO_NET_F_MAC);
+		dev->device_features |= (1ull << VIRTIO_NET_F_MAC);
 
-	if (!cq) {
-		dev->features &= ~(1ull << VIRTIO_NET_F_CTRL_VQ);
-		/* Also disable features depends on VIRTIO_NET_F_CTRL_VQ */
-		dev->features &= ~(1ull << VIRTIO_NET_F_CTRL_RX);
-		dev->features &= ~(1ull << VIRTIO_NET_F_CTRL_VLAN);
-		dev->features &= ~(1ull << VIRTIO_NET_F_GUEST_ANNOUNCE);
-		dev->features &= ~(1ull << VIRTIO_NET_F_MQ);
-		dev->features &= ~(1ull << VIRTIO_NET_F_CTRL_MAC_ADDR);
-	} else {
-		/* vhost user backend does not need to know ctrl-q, so
-		 * actually we need add this bit into features. However,
-		 * DPDK vhost-user does send features with this bit, so we
-		 * check it instead of OR it for now.
+	if (cq) {
+		/* device does not really need to know anything about CQ,
+		 * so if necessary, we just claim to support CQ
 		 */
-		if (!(dev->features & (1ull << VIRTIO_NET_F_CTRL_VQ)))
-			PMD_INIT_LOG(INFO, "vhost does not support ctrl-q");
+		dev->device_features |= (1ull << VIRTIO_NET_F_CTRL_VQ);
+	} else {
+		dev->device_features &= ~(1ull << VIRTIO_NET_F_CTRL_VQ);
+		/* Also disable features depends on VIRTIO_NET_F_CTRL_VQ */
+		dev->device_features &= ~(1ull << VIRTIO_NET_F_CTRL_RX);
+		dev->device_features &= ~(1ull << VIRTIO_NET_F_CTRL_VLAN);
+		dev->device_features &= ~(1ull << VIRTIO_NET_F_GUEST_ANNOUNCE);
+		dev->device_features &= ~(1ull << VIRTIO_NET_F_MQ);
+		dev->device_features &= ~(1ull << VIRTIO_NET_F_CTRL_MAC_ADDR);
 	}
 
 	if (dev->max_queue_pairs > 1) {
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h
index 33690b5..28fc788 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.h
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h
@@ -46,7 +46,10 @@ struct virtio_user_dev {
 	uint32_t	max_queue_pairs;
 	uint32_t	queue_pairs;
 	uint32_t	queue_size;
-	uint64_t	features;
+	uint64_t	features; /* the negotiated features with driver,
+				   * and will be sync with device
+				   */
+	uint64_t	device_features; /* supported features by device */
 	uint8_t		status;
 	uint8_t		mac_addr[ETHER_ADDR_LEN];
 	char		path[PATH_MAX];
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 406beea..a23923d 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -117,7 +117,8 @@ virtio_user_get_features(struct virtio_hw *hw)
 {
 	struct virtio_user_dev *dev = virtio_user_get_dev(hw);
 
-	return dev->features;
+	/* unmask feature bits defined in vhost user protocol */
+	return dev->device_features & VIRTIO_PMD_SUPPORTED_GUEST_FEATURES;
 }
 
 static void
@@ -125,7 +126,7 @@ virtio_user_set_features(struct virtio_hw *hw, uint64_t features)
 {
 	struct virtio_user_dev *dev = virtio_user_get_dev(hw);
 
-	dev->features = features;
+	dev->features = features & dev->device_features;
 }
 
 static uint8_t
-- 
1.9.0

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

* [dpdk-stable] patch 'net/virtio-user: fix not properly reset device' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (76 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/virtio-user: fix wrongly get/set features' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/virtio: fix rewriting LSC flag' " Yuanhan Liu
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Jianfeng Tan; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 20e50101c83c214c26e419f7e99ab92157d36de5 Mon Sep 17 00:00:00 2001
From: Jianfeng Tan <jianfeng.tan@intel.com>
Date: Fri, 13 Jan 2017 12:18:35 +0000
Subject: [PATCH] net/virtio-user: fix not properly reset device

[ upstream commit c12a26ee209e0f378cd0b31d3fd0186df09e14ce ]

virtio_user is not properly reset when users call vtpci_reset(),
as it ignores VIRTIO_CONFIG_STATUS_RESET status in
virtio_user_set_status().

This might lead to initialization failure as it starts to re-init
the device before sending RESET messege to backend. Besides, previous
callfds and kickfds are not closed.

To fix it, we add support to disable virtqueues when it's set to
DRIVER OK status, and re-init fields in struct virtio_user_dev.

Fixes: e9efa4d93821 ("net/virtio-user: add new virtual PCI driver")
Fixes: 37a7eb2ae816 ("net/virtio-user: add device emulation layer")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 26 ++++++++++++++++--------
 drivers/net/virtio/virtio_user_ethdev.c          | 15 ++++++++------
 2 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 0d7e17b..a38398b 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -182,7 +182,17 @@ error:
 
 int virtio_user_stop_device(struct virtio_user_dev *dev)
 {
-	return vhost_user_sock(dev->vhostfd, VHOST_USER_RESET_OWNER, NULL);
+	uint32_t i;
+
+	for (i = 0; i < dev->max_queue_pairs * 2; ++i) {
+		close(dev->callfds[i]);
+		close(dev->kickfds[i]);
+	}
+
+	for (i = 0; i < dev->max_queue_pairs; ++i)
+		vhost_user_enable_queue_pair(dev->vhostfd, i, 0);
+
+	return 0;
 }
 
 static inline void
@@ -210,6 +220,8 @@ int
 virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 		     int cq, int queue_size, const char *mac)
 {
+	uint32_t i;
+
 	snprintf(dev->path, PATH_MAX, "%s", path);
 	dev->max_queue_pairs = queues;
 	dev->queue_pairs = 1; /* mq disabled by default */
@@ -218,6 +230,11 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 	parse_mac(dev, mac);
 	dev->vhostfd = -1;
 
+	for (i = 0; i < VIRTIO_MAX_VIRTQUEUES * 2 + 1; ++i) {
+		dev->kickfds[i] = -1;
+		dev->callfds[i] = -1;
+	}
+
 	dev->vhostfd = vhost_user_setup(dev->path);
 	if (dev->vhostfd < 0) {
 		PMD_INIT_LOG(ERR, "backend set up fails");
@@ -264,13 +281,6 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 void
 virtio_user_dev_uninit(struct virtio_user_dev *dev)
 {
-	uint32_t i;
-
-	for (i = 0; i < dev->max_queue_pairs * 2; ++i) {
-		close(dev->callfds[i]);
-		close(dev->kickfds[i]);
-	}
-
 	close(dev->vhostfd);
 }
 
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index a23923d..6ca757b 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -87,21 +87,24 @@ virtio_user_write_dev_config(struct virtio_hw *hw, size_t offset,
 }
 
 static void
-virtio_user_set_status(struct virtio_hw *hw, uint8_t status)
+virtio_user_reset(struct virtio_hw *hw)
 {
 	struct virtio_user_dev *dev = virtio_user_get_dev(hw);
 
-	if (status & VIRTIO_CONFIG_STATUS_DRIVER_OK)
-		virtio_user_start_device(dev);
-	dev->status = status;
+	if (dev->status & VIRTIO_CONFIG_STATUS_DRIVER_OK)
+		virtio_user_stop_device(dev);
 }
 
 static void
-virtio_user_reset(struct virtio_hw *hw)
+virtio_user_set_status(struct virtio_hw *hw, uint8_t status)
 {
 	struct virtio_user_dev *dev = virtio_user_get_dev(hw);
 
-	virtio_user_stop_device(dev);
+	if (status & VIRTIO_CONFIG_STATUS_DRIVER_OK)
+		virtio_user_start_device(dev);
+	else if (status == VIRTIO_CONFIG_STATUS_RESET)
+		virtio_user_reset(hw);
+	dev->status = status;
 }
 
 static uint8_t
-- 
1.9.0

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

* [dpdk-stable] patch 'net/virtio: fix rewriting LSC flag' has been queued to stable release 16.11.1
  2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
                   ` (77 preceding siblings ...)
  2017-01-23  7:47 ` [dpdk-stable] patch 'net/virtio-user: fix not properly reset device' " Yuanhan Liu
@ 2017-01-23  7:47 ` Yuanhan Liu
  78 siblings, 0 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  7:47 UTC (permalink / raw)
  To: Jianfeng Tan; +Cc: Yuanhan Liu, Lei Yao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.11.1

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

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 56f2637e78d40cc13aab1362064c6fde7547cd28 Mon Sep 17 00:00:00 2001
From: Jianfeng Tan <jianfeng.tan@intel.com>
Date: Tue, 17 Jan 2017 07:10:21 +0000
Subject: [PATCH] net/virtio: fix rewriting LSC flag

[ backported from upstream commit f229eb41eeecfc121600379046c7f11680739f1a ]

The LSC flag is decided according to if VIRTIO_NET_F_STATUS feature
is negotiated. Copy the PCI info after the judgement will rewrite
the correct result.

Fixes: 198ab33677c9 ("net/virtio: move device initialization in a function")

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

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 9fe5b8b..85ae147 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1206,14 +1206,14 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 	if (virtio_negotiate_features(hw, req_features) < 0)
 		return -1;
 
+	rte_eth_copy_pci_info(eth_dev, pci_dev);
+
 	/* If host does not support status then disable LSC */
 	if (!vtpci_with_feature(hw, VIRTIO_NET_F_STATUS))
 		eth_dev->data->dev_flags &= ~RTE_ETH_DEV_INTR_LSC;
 	else
 		eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
 
-	rte_eth_copy_pci_info(eth_dev, pci_dev);
-
 	rx_func_get(eth_dev);
 
 	/* Setting up rx_header size for the device */
-- 
1.9.0

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

* Re: [dpdk-stable] patch 'net/ixgbe/base: fix IXGBE LSWFW register' has been queued to stable release 16.11.1
       [not found]   ` <49759EB36A64CF4892C1AFEC9231E8D63A354E36@PGSMSX106.gar.corp.intel.com>
@ 2017-01-23  9:44     ` Yuanhan Liu
  2017-01-23 10:17       ` Thomas Monjalon
  2017-01-23 10:29       ` Mcnamara, John
  0 siblings, 2 replies; 83+ messages in thread
From: Yuanhan Liu @ 2017-01-23  9:44 UTC (permalink / raw)
  To: Dai, Wei
  Cc: Zhang, Helin, Liu, Yu Y, stable, Richardson, Bruce, Ferruh Yigit,
	Lu, Wenzhuo, Wu, Jingjing, Thomas Monjalon, Mcnamara, John

On Mon, Jan 23, 2017 at 08:14:08AM +0000, Dai, Wei wrote:
> Hi, Yuanhan
> 
> Remove the mail list.

Add it back.

> Each time we updated NIC shared code, we always submitted a patch set including multiple patches.
> I notice that only patch with "fix" are applied into stable release.
> I am not sure the NIC can work well without other patches without "fix".
> Indeed the users like STV team always apply whole patch set for shared code update.
> They regards the patch set as whole one.
> So why not apply whole patch set for NIC shared code in stable release ?

Dai Wei, that's really a good question! And it deserves more discussion,
thus more people are cc'ed.

Firstly, to answer your question: it's not proper to apply all patches.
Stable tree is meant to apply bug fixes only. Applying all of them looks
more like backporting a feature, which is too risk for a stable release.

OTOH, if we apply some base fixes, doesn't it mean user also has to do
firmware update? If so, that doesn't sound good to me. I think we should
avoid asking user to do firmware update for a LTS. Correct me if I'm
wrong.

Maybe we could start with a simple rule first: no base fixes are allowed
for a stable release, unless
- they fixed some severe bugs, AND
- the author can make sure that these fix doesn't require firmware
  update and will not break anything.

Does that sound reasonable?

	--yliu

> > -----Original Message-----
> > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com]
> > Sent: Monday, January 23, 2017 3:47 PM
> > To: Dai, Wei <wei.dai@intel.com>
> > Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>; dpdk stable <stable@dpdk.org>
> > Subject: patch 'net/ixgbe/base: fix IXGBE LSWFW register' has been queued to
> > stable release 16.11.1
> > 
> > Hi,
> > 
> > FYI, your patch has been queued to stable release 16.11.1
> > 
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable
> > yet. It will be pushed if I get no objections before 01/28/17.
> > So please shout if anyone has objections.
> > 
> > ---
> > 
> > Note 16.11 is a LTS release. v16.11.1 is planned to be released shortly (about
> > 2-3 weeks) after v17.02.
> > 
> > ---
> > 
> > Thanks.
> > 
> > 	--yliu
> > 
> > ---
> > From b8aa05644901c9f3e4c9aca04504b702b15043a9 Mon Sep 17 00:00:00
> > 2001
> > From: Wei Dai <wei.dai@intel.com>
> > Date: Wed, 21 Dec 2016 17:48:10 +0800
> > Subject: [PATCH] net/ixgbe/base: fix IXGBE LSWFW register
> > 
> > [ upstream commit 45f79aea9e4bce079bbfb86f8278c88633f299ee ]
> > 
> > This register was incorrect when compared to the data sheet.
> > Even though the driver doesn't currently use this register, it is better to fix it
> > upstream.
> > 
> > Fixes: af75078fece3 ("first public release")
> > 
> > Signed-off-by: Wei Dai <wei.dai@intel.com>
> > ---
> >  drivers/net/ixgbe/base/ixgbe_type.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/net/ixgbe/base/ixgbe_type.h
> > b/drivers/net/ixgbe/base/ixgbe_type.h
> > index 4982e03..a9b6914 100644
> > --- a/drivers/net/ixgbe/base/ixgbe_type.h
> > +++ b/drivers/net/ixgbe/base/ixgbe_type.h
> > @@ -1045,7 +1045,7 @@ struct ixgbe_dmac_config {
> >  #define IXGBE_FTFT		0x09400 /* 0x9400-0x97FC */
> >  #define IXGBE_METF(_i)		(0x05190 + ((_i) * 4)) /* 4 of these (0-3) */
> >  #define IXGBE_MDEF_EXT(_i)	(0x05160 + ((_i) * 4)) /* 8 of these (0-7) */
> > -#define IXGBE_LSWFW		0x15014
> > +#define IXGBE_LSWFW		0x15F14
> >  #define IXGBE_BMCIP(_i)		(0x05050 + ((_i) * 4)) /* 0x5050-0x505C */
> >  #define IXGBE_BMCIPVAL		0x05060
> >  #define IXGBE_BMCIP_IPADDR_TYPE	0x00000001
> > --
> > 1.9.0

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

* Re: [dpdk-stable] patch 'net/ixgbe/base: fix IXGBE LSWFW register' has been queued to stable release 16.11.1
  2017-01-23  9:44     ` Yuanhan Liu
@ 2017-01-23 10:17       ` Thomas Monjalon
  2017-01-23 10:29       ` Mcnamara, John
  1 sibling, 0 replies; 83+ messages in thread
From: Thomas Monjalon @ 2017-01-23 10:17 UTC (permalink / raw)
  To: Yuanhan Liu
  Cc: Dai, Wei, Zhang, Helin, Liu, Yu Y, stable, Richardson, Bruce,
	Ferruh Yigit, Lu, Wenzhuo, Wu, Jingjing, Mcnamara, John

2017-01-23 17:44, Yuanhan Liu:
> On Mon, Jan 23, 2017 at 08:14:08AM +0000, Dai, Wei wrote:
> > Hi, Yuanhan
> > 
> > Remove the mail list.
> 
> Add it back.
> 
> > Each time we updated NIC shared code, we always submitted a patch set including multiple patches.
> > I notice that only patch with "fix" are applied into stable release.
> > I am not sure the NIC can work well without other patches without "fix".
> > Indeed the users like STV team always apply whole patch set for shared code update.
> > They regards the patch set as whole one.
> > So why not apply whole patch set for NIC shared code in stable release ?
> 
> Dai Wei, that's really a good question! And it deserves more discussion,
> thus more people are cc'ed.
> 
> Firstly, to answer your question: it's not proper to apply all patches.
> Stable tree is meant to apply bug fixes only. Applying all of them looks
> more like backporting a feature, which is too risk for a stable release.
> 
> OTOH, if we apply some base fixes, doesn't it mean user also has to do
> firmware update? If so, that doesn't sound good to me. I think we should
> avoid asking user to do firmware update for a LTS. Correct me if I'm
> wrong.
> 
> Maybe we could start with a simple rule first: no base fixes are allowed
> for a stable release, unless
> - they fixed some severe bugs, AND
> - the author can make sure that these fix doesn't require firmware
>   update and will not break anything.
> 
> Does that sound reasonable?

+1

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

* Re: [dpdk-stable] patch 'net/ixgbe/base: fix IXGBE LSWFW register' has been queued to stable release 16.11.1
  2017-01-23  9:44     ` Yuanhan Liu
  2017-01-23 10:17       ` Thomas Monjalon
@ 2017-01-23 10:29       ` Mcnamara, John
  1 sibling, 0 replies; 83+ messages in thread
From: Mcnamara, John @ 2017-01-23 10:29 UTC (permalink / raw)
  To: Yuanhan Liu, Dai, Wei
  Cc: Zhang, Helin, Liu, Yu Y, stable, Richardson, Bruce, Yigit,
	Ferruh, Lu, Wenzhuo, Wu, Jingjing, Thomas Monjalon



> -----Original Message-----
> From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com]
> Sent: Monday, January 23, 2017 9:45 AM
> To: Dai, Wei <wei.dai@intel.com>
> Cc: Zhang, Helin <helin.zhang@intel.com>; Liu, Yu Y <yu.y.liu@intel.com>;
> stable@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>; Yigit,
> Ferruh <ferruh.yigit@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu,
> Jingjing <jingjing.wu@intel.com>; Thomas Monjalon
> <thomas.monjalon@6wind.com>; Mcnamara, John <john.mcnamara@intel.com>
> Subject: Re: patch 'net/ixgbe/base: fix IXGBE LSWFW register' has been
> queued to stable release 16.11.1
> 
> On Mon, Jan 23, 2017 at 08:14:08AM +0000, Dai, Wei wrote:
> > Hi, Yuanhan
> >
> > Remove the mail list.
> 
> Add it back.
> 
> > Each time we updated NIC shared code, we always submitted a patch set
> including multiple patches.
> > I notice that only patch with "fix" are applied into stable release.
> > I am not sure the NIC can work well without other patches without "fix".
> > Indeed the users like STV team always apply whole patch set for shared
> code update.
> > They regards the patch set as whole one.
> > So why not apply whole patch set for NIC shared code in stable release ?
> 
> Dai Wei, that's really a good question! And it deserves more discussion,
> thus more people are cc'ed.
> 
> Firstly, to answer your question: it's not proper to apply all patches.
> Stable tree is meant to apply bug fixes only. Applying all of them looks
> more like backporting a feature, which is too risk for a stable release.
> 
> OTOH, if we apply some base fixes, doesn't it mean user also has to do
> firmware update? If so, that doesn't sound good to me. I think we should
> avoid asking user to do firmware update for a LTS. Correct me if I'm
> wrong.
> 
> Maybe we could start with a simple rule first: no base fixes are allowed
> for a stable release, unless
> - they fixed some severe bugs, AND
> - the author can make sure that these fix doesn't require firmware
>   update and will not break anything.
> 
> Does that sound reasonable?

Hi,

That sounds like a reasonable approach to me.

John

 

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

end of thread, other threads:[~2017-01-23 10:29 UTC | newest]

Thread overview: 83+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' has been queued to stable release 16.11.1 Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'pci: fix check of mknod' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: check maximum number of queues for statistics' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'mempool: fix API documentation' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: fix port lookup if none' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'vdev: fix detaching with alias' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'examples/ethtool: fix driver information' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: remove invalid function from version map' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: fix extended statistics name index' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'pmdinfogen: fix null dereference' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'app/testpmd: fix static build link ordering' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'app/testpmd: fix check for invalid ports' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'examples/ip_pipeline: fix coremask limitation' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'examples/ip_pipeline: fix parsing of pass-through pipeline' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e: fix xstats value mapping' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/mlx5: fix leak when starvation occurs' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/mlx5: fix endianness in Tx completion queue' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e: fix logging for Tx free threshold check' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e: enable auto link update for 25G' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40evf: fix casting between structs' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix flow control set for 25G' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix bit test mask' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix long link down notification time' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix unknown PHYs incorrect identification' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix WoL failure on PF reset' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix NVM access interfering' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix division by zero' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix byte order' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix resource leak' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/pcap: fix timestamps in output pcap file' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/vmxnet3: fix Rx deadlock' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/nfp: fix typo in Tx offload capabilities' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix PHY reset check for x550em-ext' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix clearing SAN MAC address' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix PHY identification for x550a' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix getting PHY type for some x550 devices' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix SGMII link setup for M88 PHYs' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix setting unsupported autoneg speeds' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix IXGBE LSWFW register' " Yuanhan Liu
     [not found]   ` <49759EB36A64CF4892C1AFEC9231E8D63A354E36@PGSMSX106.gar.corp.intel.com>
2017-01-23  9:44     ` Yuanhan Liu
2017-01-23 10:17       ` Thomas Monjalon
2017-01-23 10:29       ` Mcnamara, John
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix filtering code' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: add vendor/device id info' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix SRIOV printouts' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix multiple acquisition requests by VF' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix error code in resc allocation' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix mutex in freeing context manager' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix Rx queue access by malicious VFs' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix to handle acquire request from VF' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix VF over legacy PF' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx5: fix RSS hash result for flows' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e: fix wrong return value when handling PF message' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx5: fix missing inline attributes' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx5: fix Tx doorbell' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix PF fastpath status block index' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix per queue statisitics' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/af_packet: fix fd use after free' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e: fix segment number in reassemble process' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/enic: remove unnecessary function parameter attributes' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/nfp: fix VLAN offload flags check' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/cxgbe: fix parenthesis on bitwise operation' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix function declaration' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx: fix IPv4 and IPv6 packet type' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e: fix VF reset flow' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'cryptodev: fix crash on null dereference' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/openssl: fix extra bytes written at end of data' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/aesni_mb: fix incorrect crypto session' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/aesni_gcm: fix J0 padding bytes' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/aesni_gcm: fix IV size in capabilities' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/qat: " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'cryptodev: fix loop in device query' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/openssl: fix indentation in guide' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'app/test: fix symmetric session free in crypto perf tests' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'vhost: fix guest/host physical address mapping' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'vhost: fix memory leak' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/vhost: fix socket file deleted on stop' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'examples/vhost: fix calculation of mbuf count' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'examples/vhost: fix lcore initialization' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'examples/ethtool: fix querying non-PCI devices' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/virtio-user: fix wrongly get/set features' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/virtio-user: fix not properly reset device' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/virtio: fix rewriting LSC flag' " 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).