patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2
@ 2018-04-22 15:08 Yuanhan Liu
  2018-04-22 15:08 ` [dpdk-stable] patch 'pci: remove duplicated symbol from map file' " Yuanhan Liu
                   ` (57 more replies)
  0 siblings, 58 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:08 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: Luca Boccassi, Chao Zhu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 7ee451e8ccfc37f24511f4a84fae61c0004391a9 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Date: Tue, 27 Feb 2018 20:43:58 +0530
Subject: [PATCH] eal/ppc: remove braces in SMP memory barrier macro

[ upstream commit da07658d58461bef714afc196569cf18377073e2 ]

This patch fixes the compilation problem with rte_smp_mb,
when there is else clause following it, as in test_barrier.c.

Fixes: 05c3fd7110 ("eal/ppc: atomic operations for IBM Power")

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
---
 lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
index 6993dd29a..3a80311bc 100644
--- a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
+++ b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
@@ -55,7 +55,7 @@ extern "C" {
  * Guarantees that the LOAD and STORE operations generated before the
  * barrier occur before the LOAD and STORE operations generated after.
  */
-#define	rte_mb()  {asm volatile("sync" : : : "memory"); }
+#define	rte_mb()  asm volatile("sync" : : : "memory")
 
 /**
  * Write memory barrier.
-- 
2.11.0

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

* [dpdk-stable] patch 'pci: remove duplicated symbol from map file' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
@ 2018-04-22 15:08 ` Yuanhan Liu
  2018-04-22 15:08 ` [dpdk-stable] patch 'kni: fix build on RHEL 7.5' " Yuanhan Liu
                   ` (56 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:08 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 9393d8d613602e8e9b266ffc95d4ecb51691e776 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 15 Mar 2018 16:48:54 +0000
Subject: [PATCH] pci: remove duplicated symbol from map file

[ upstream commit 8f0b534b35a6748563e953ef40112bbb750f354c ]

Remove duplicated symbol rte_pci_device_name from .map file.

Also sort the map file to be able to detect any possible duplication
easier in the future.

Fixes: 0e3ef055bee5 ("pci: fix namespace prefix of new functions")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 lib/librte_pci/rte_pci_version.map | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/librte_pci/rte_pci_version.map b/lib/librte_pci/rte_pci_version.map
index 15d93d95c..c0280277b 100644
--- a/lib/librte_pci/rte_pci_version.map
+++ b/lib/librte_pci/rte_pci_version.map
@@ -3,12 +3,11 @@ DPDK_17.11 {
 
 	eal_parse_pci_BDF;
 	eal_parse_pci_DomBDF;
-	rte_pci_addr_cmp;
-	rte_pci_addr_parse;
-	rte_pci_device_name;
 	pci_map_resource;
 	pci_unmap_resource;
 	rte_eal_compare_pci_addr;
+	rte_pci_addr_cmp;
+	rte_pci_addr_parse;
 	rte_pci_device_name;
 
 	local: *;
-- 
2.11.0

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

* [dpdk-stable] patch 'kni: fix build on RHEL 7.5' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
  2018-04-22 15:08 ` [dpdk-stable] patch 'pci: remove duplicated symbol from map file' " Yuanhan Liu
@ 2018-04-22 15:08 ` Yuanhan Liu
  2018-04-22 15:08 ` [dpdk-stable] patch 'bus/vdev: fix finding device by name' " Yuanhan Liu
                   ` (55 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:08 UTC (permalink / raw)
  To: Lee Roberts; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 0e1f49f7fb1cfe4283a9c22a641b196a0f37fa5e Mon Sep 17 00:00:00 2001
From: Lee Roberts <lee.roberts@hpe.com>
Date: Thu, 1 Mar 2018 16:20:35 -0700
Subject: [PATCH] kni: fix build on RHEL 7.5

[ upstream commit 37d477b6863e5c06e20be434b559d3a03d89f46a ]

Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/kni/compat.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
index 3f8c0bc87..6a6968d93 100644
--- a/lib/librte_eal/linuxapp/kni/compat.h
+++ b/lib/librte_eal/linuxapp/kni/compat.h
@@ -101,6 +101,11 @@
 #undef NET_NAME_UNKNOWN
 #endif
 
+#if (defined(RHEL_RELEASE_CODE) && \
+	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)))
+#define ndo_change_mtu ndo_change_mtu_rh74
+#endif
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
 #define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
 #endif
-- 
2.11.0

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

* [dpdk-stable] patch 'bus/vdev: fix finding device by name' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
  2018-04-22 15:08 ` [dpdk-stable] patch 'pci: remove duplicated symbol from map file' " Yuanhan Liu
  2018-04-22 15:08 ` [dpdk-stable] patch 'kni: fix build on RHEL 7.5' " Yuanhan Liu
@ 2018-04-22 15:08 ` Yuanhan Liu
  2018-04-22 15:08 ` [dpdk-stable] patch 'app/procinfo: fix strncpy usage in args parsing' " Yuanhan Liu
                   ` (54 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:08 UTC (permalink / raw)
  To: Nachiketa Prachanda; +Cc: Jianfeng Tan, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From f894e1f530c1aa8585bd1456b73696631c51f615 Mon Sep 17 00:00:00 2001
From: Nachiketa Prachanda <nprachan@vyatta.att-mail.com>
Date: Mon, 12 Mar 2018 09:54:00 -0700
Subject: [PATCH] bus/vdev: fix finding device by name

[ upstream commit fada6963ce735048b2d40f215ff110cb2f4cb6a4 ]

Use strcmp to compare device names as the strncmp in original code
causes find_vdev to return -EEXIST  for names that are prefix
of another. The creation of interfaces fails unpredictably based
on the order of their creation. An easy way hit this bug is to create
eth_vhost1 after eth_vhost11.

Fixes: dda987315ca2 ("vdev: make virtual bus use its device struct")

Signed-off-by: Nachiketa Prachanda <nprachan@vyatta.att-mail.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 drivers/bus/vdev/vdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index ba0ed7a27..a0ffb534e 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -129,7 +129,7 @@ find_vdev(const char *name)
 	TAILQ_FOREACH(dev, &vdev_device_list, next) {
 		const char *devname = rte_vdev_device_name(dev);
 
-		if (!strncmp(devname, name, strlen(name)))
+		if (!strcmp(devname, name))
 			return dev;
 	}
 
-- 
2.11.0

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

* [dpdk-stable] patch 'app/procinfo: fix strncpy usage in args parsing' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (2 preceding siblings ...)
  2018-04-22 15:08 ` [dpdk-stable] patch 'bus/vdev: fix finding device by name' " Yuanhan Liu
@ 2018-04-22 15:08 ` Yuanhan Liu
  2018-04-22 15:08 ` [dpdk-stable] patch 'examples/exception_path: limit core count to 64' " Yuanhan Liu
                   ` (53 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:08 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 5919756e4d383f36ac491ba3cb65f7db394b9df6 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Tue, 20 Feb 2018 13:52:22 +0000
Subject: [PATCH] app/procinfo: fix strncpy usage in args parsing

[ upstream commit f0b9479497741040476aae5008afe84e0467e586 ]

Replace strncpy with snprintf to avoid overwriting the last
NULL character.

Coverity issue: 143252
Fixes: 2deb6b5246d7 ("app/procinfo: add collectd format and host id")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/proc_info/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/proc_info/main.c b/app/proc_info/main.c
index 64fbbd0f8..875d91ea3 100644
--- a/app/proc_info/main.c
+++ b/app/proc_info/main.c
@@ -188,7 +188,7 @@ proc_info_preparse_args(int argc, char **argv)
 				proc_info_usage(prgname);
 				return -1;
 			}
-			strncpy(host_id, argv[i+1], sizeof(host_id));
+			snprintf(host_id, sizeof(host_id), "%s", argv[i+1]);
 		}
 	}
 
-- 
2.11.0

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

* [dpdk-stable] patch 'examples/exception_path: limit core count to 64' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (3 preceding siblings ...)
  2018-04-22 15:08 ` [dpdk-stable] patch 'app/procinfo: fix strncpy usage in args parsing' " Yuanhan Liu
@ 2018-04-22 15:08 ` Yuanhan Liu
  2018-04-22 15:08 ` [dpdk-stable] patch 'net/mlx5: fix flow creation with a single target queue' " Yuanhan Liu
                   ` (52 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:08 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 5d8b7a35d8799ed1f1e5d0e503ab48c48604575f Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Tue, 20 Feb 2018 12:05:57 +0000
Subject: [PATCH] examples/exception_path: limit core count to 64

[ upstream commit f93c7cd0823c2b268dda209e1ca8827e01900b3f ]

Application doesn't support more that 64 lcores due to command
line limitation of using a coremask that is parsed as a 64bit
value, so changed it to reflect this limitation.

Coverity issue: 30688
Fixes: af75078fece3 ("first public release")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/exception_path/main.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index f8f5bbdf0..dc1d9641d 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -70,13 +70,21 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 
+#ifndef APP_MAX_LCORE
+#if (RTE_MAX_LCORE > 64)
+#define APP_MAX_LCORE 64
+#else
+#define APP_MAX_LCORE RTE_MAX_LCORE
+#endif
+#endif
+
 /* Macros for printing using RTE_LOG */
 #define RTE_LOGTYPE_APP RTE_LOGTYPE_USER1
 #define FATAL_ERROR(fmt, args...)       rte_exit(EXIT_FAILURE, fmt "\n", ##args)
 #define PRINT_INFO(fmt, args...)        RTE_LOG(INFO, APP, fmt "\n", ##args)
 
 /* Max ports than can be used (each port is associated with two lcores) */
-#define MAX_PORTS               (RTE_MAX_LCORE / 2)
+#define MAX_PORTS               (APP_MAX_LCORE / 2)
 
 /* Max size of a single packet */
 #define MAX_PACKET_SZ (2048)
@@ -133,7 +141,7 @@ static uint64_t input_cores_mask = 0;
 static uint64_t output_cores_mask = 0;
 
 /* Array storing port_id that is associated with each lcore */
-static uint16_t port_ids[RTE_MAX_LCORE];
+static uint16_t port_ids[APP_MAX_LCORE];
 
 /* Structure type for recording lcore-specific stats */
 struct stats {
@@ -143,7 +151,7 @@ struct stats {
 };
 
 /* Array of lcore-specific stats */
-static struct stats lcore_stats[RTE_MAX_LCORE];
+static struct stats lcore_stats[APP_MAX_LCORE];
 
 /* Print out statistics on packets handled */
 static void
@@ -362,7 +370,9 @@ setup_port_lcore_affinities(void)
 	uint16_t rx_port = 0;
 
 	/* Setup port_ids[] array, and check masks were ok */
-	RTE_LCORE_FOREACH(i) {
+	for (i = 0; i < APP_MAX_LCORE; i++) {
+		if (!rte_lcore_is_enabled(i))
+			continue;
 		if (input_cores_mask & (1ULL << i)) {
 			/* Skip ports that are not enabled */
 			while ((ports_mask & (1 << rx_port)) == 0) {
-- 
2.11.0

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

* [dpdk-stable] patch 'net/mlx5: fix flow creation with a single target queue' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (4 preceding siblings ...)
  2018-04-22 15:08 ` [dpdk-stable] patch 'examples/exception_path: limit core count to 64' " Yuanhan Liu
@ 2018-04-22 15:08 ` Yuanhan Liu
  2018-04-22 15:08 ` [dpdk-stable] patch 'vhost: fix message payload union in setting ring address' " Yuanhan Liu
                   ` (51 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:08 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 889f8e89691e5047d3bad7ec352e22691e26f304 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Wed, 14 Feb 2018 16:04:45 +0100
Subject: [PATCH] net/mlx5: fix flow creation with a single target queue

[ upstream commit c55a1667950f43be515c976269749a2a00c7268d ]

Adding a pattern targeting a single queues wrongly behaves as it is an RSS
request, ending by creating several Verbs flows rules to match the RSS
configuration.

Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")

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

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 092644ff1..3a9407b00 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -951,6 +951,16 @@ priv_flow_convert_finalise(struct priv *priv, struct mlx5_flow_parse *parser)
 	unsigned int i;
 
 	(void)priv;
+	/* Remove any other flow not matching the pattern. */
+	if (parser->queues_n == 1) {
+		for (i = 0; i != hash_rxq_init_n; ++i) {
+			if (i == HASH_RXQ_ETH)
+				continue;
+			rte_free(parser->queue[i].ibv_attr);
+			parser->queue[i].ibv_attr = NULL;
+		}
+		return;
+	}
 	if (parser->layer == HASH_RXQ_ETH) {
 		goto fill;
 	} else {
@@ -1777,6 +1787,7 @@ priv_flow_create_action_queue(struct priv *priv,
 {
 	int err = 0;
 	unsigned int i;
+	unsigned int flows_n = 0;
 
 	assert(priv->pd);
 	assert(priv->ctx);
@@ -1801,11 +1812,17 @@ priv_flow_create_action_queue(struct priv *priv,
 			err = ENOMEM;
 			goto error;
 		}
+		++flows_n;
 		DEBUG("%p type %d QP %p ibv_flow %p",
 		      (void *)flow, i,
 		      (void *)flow->frxq[i].hrxq,
 		      (void *)flow->frxq[i].ibv_flow);
 	}
+	if (!flows_n) {
+		rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_HANDLE,
+				   NULL, "internal error in flow creation");
+		goto error;
+	}
 	for (i = 0; i != parser->queues_n; ++i) {
 		struct mlx5_rxq_data *q =
 			(*priv->rxqs)[parser->queues[i]];
-- 
2.11.0

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

* [dpdk-stable] patch 'vhost: fix message payload union in setting ring address' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (5 preceding siblings ...)
  2018-04-22 15:08 ` [dpdk-stable] patch 'net/mlx5: fix flow creation with a single target queue' " Yuanhan Liu
@ 2018-04-22 15:08 ` Yuanhan Liu
  2018-04-22 15:08 ` [dpdk-stable] patch 'vhost: fix offset while mmaping log base " Yuanhan Liu
                   ` (50 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:08 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 3a460071f4febc3c46ce1d255d555c93f2f55018 Mon Sep 17 00:00:00 2001
From: Stefan Hajnoczi <stefanha@redhat.com>
Date: Mon, 5 Feb 2018 13:16:00 +0100
Subject: [PATCH] vhost: fix message payload union in setting ring address

[ upstream commit 55659ed3ed1880beef6211d345c5bb5baf5b4e8b ]

vhost_user_set_vring_addr() uses the msg->payload.addr union member, not
msg->payload.state.  Luckily the offset of the 'index' field is
identical in both structs, so there was never any buggy behavior.

Fixes: 5cd690e4fda9 ("vhost: fix vring addresses not translated")

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 3acaacf58..4ed18fd12 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -463,7 +463,7 @@ vhost_user_set_vring_addr(struct virtio_net **pdev, VhostUserMsg *msg)
 
 	if (vq->enabled && (dev->features &
 				(1ULL << VHOST_USER_F_PROTOCOL_FEATURES))) {
-		dev = translate_ring_addresses(dev, msg->payload.state.index);
+		dev = translate_ring_addresses(dev, msg->payload.addr.index);
 		if (!dev)
 			return -1;
 
-- 
2.11.0

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

* [dpdk-stable] patch 'vhost: fix offset while mmaping log base address' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (6 preceding siblings ...)
  2018-04-22 15:08 ` [dpdk-stable] patch 'vhost: fix message payload union in setting ring address' " Yuanhan Liu
@ 2018-04-22 15:08 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: check cmsg not null' " Yuanhan Liu
                   ` (49 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:08 UTC (permalink / raw)
  To: Tomasz Kulasek
  Cc: Pawel Wodkowski, Jianfeng Tan, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 608a0be0c01880f30a5f7902f9a0766457c5db36 Mon Sep 17 00:00:00 2001
From: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Date: Thu, 8 Feb 2018 17:59:00 +0100
Subject: [PATCH] vhost: fix offset while mmaping log base address

[ upstream commit fbc4d248b198db7f720fe31a47050a406632cc7a ]

QEMU always set offset to 0 but for sanity we should take the offset
into account.

Fixes: 54f9e32305d4 ("vhost: handle dirty pages logging request")

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 4ed18fd12..03190d64f 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -954,7 +954,7 @@ vhost_user_set_log_base(struct virtio_net *dev, struct VhostUserMsg *msg)
 	 * mmap from 0 to workaround a hugepage mmap bug: mmap will
 	 * fail when offset is not page size aligned.
 	 */
-	addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+	addr = mmap(0, size + off, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 	close(fd);
 	if (addr == MAP_FAILED) {
 		RTE_LOG(ERR, VHOST_CONFIG, "mmap log base failed!\n");
-- 
2.11.0

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

* [dpdk-stable] patch 'vhost: check cmsg not null' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (7 preceding siblings ...)
  2018-04-22 15:08 ` [dpdk-stable] patch 'vhost: fix offset while mmaping log base " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: fix device cleanup at stop' " Yuanhan Liu
                   ` (48 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Tomasz Kulasek
  Cc: Pawel Wodkowski, Jianfeng Tan, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 188887c74f8854e6a471f25a9e96c008d632d63d Mon Sep 17 00:00:00 2001
From: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Date: Fri, 9 Feb 2018 18:05:00 +0100
Subject: [PATCH] vhost: check cmsg not null

[ upstream commit aa001111b002a05bf126c688d06146c092c0795a ]

Fixes: 8f972312b8f4 ("vhost: support vhost-user")

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/socket.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 811e6bf16..72831b347 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -181,6 +181,11 @@ send_fd_message(int sockfd, char *buf, int buflen, int *fds, int fd_num)
 		msgh.msg_control = control;
 		msgh.msg_controllen = sizeof(control);
 		cmsg = CMSG_FIRSTHDR(&msgh);
+		if (cmsg == NULL) {
+			RTE_LOG(ERR, VHOST_CONFIG, "cmsg == NULL\n");
+			errno = EINVAL;
+			return -1;
+		}
 		cmsg->cmsg_len = CMSG_LEN(fdsize);
 		cmsg->cmsg_level = SOL_SOCKET;
 		cmsg->cmsg_type = SCM_RIGHTS;
-- 
2.11.0

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

* [dpdk-stable] patch 'vhost: fix device cleanup at stop' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (8 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: check cmsg not null' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: fix realloc failure' " Yuanhan Liu
                   ` (47 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Tomasz Kulasek
  Cc: Dariusz Stojaczyk, Jianfeng Tan, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From c1bea86d1a7216da292b0a26e1026b02bd6b1195 Mon Sep 17 00:00:00 2001
From: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Date: Fri, 9 Feb 2018 18:10:00 +0100
Subject: [PATCH] vhost: fix device cleanup at stop

[ upstream commit ace7b6b7859e1dc410589610a8e436c1a3b430f3 ]

This prevents from destroying & recreating user device in "incomplete"
vring state. virtio_is_ready() was returning true for devices with
vrings which did not have valid callfd (their VHOST_USER_SET_VRING_CALL
hasn't arrived yet)

Fixes: 8f972312b8f4 ("vhost: support vhost-user")

Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 03190d64f..02f219dc7 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -860,6 +860,11 @@ vhost_user_get_vring_base(struct virtio_net *dev,
 
 	vq->kickfd = VIRTIO_UNINITIALIZED_EVENTFD;
 
+	if (vq->callfd >= 0)
+		close(vq->callfd);
+
+	vq->callfd = VIRTIO_UNINITIALIZED_EVENTFD;
+
 	if (dev->dequeue_zero_copy)
 		free_zmbufs(vq);
 	rte_free(vq->shadow_used_ring);
-- 
2.11.0

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

* [dpdk-stable] patch 'vhost: fix realloc failure' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (9 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: fix device cleanup at stop' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: fix ring index returned to master on stop' " Yuanhan Liu
                   ` (46 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Tomasz Kulasek; +Cc: Ziye Yang, Jianfeng Tan, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From fc53c4750ed619bdf238e7616720cc2f1954eb15 Mon Sep 17 00:00:00 2001
From: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Date: Fri, 9 Feb 2018 18:19:00 +0100
Subject: [PATCH] vhost: fix realloc failure

[ upstream commit 7afa2e4538c1740391e40e018fb3ecafd53603cc ]

When reallocation of guest pages fails, vhost_user_set_mem_table() also
should fail.

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

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 02f219dc7..63f7d50ef 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -488,7 +488,7 @@ vhost_user_set_vring_base(struct virtio_net *dev,
 	return 0;
 }
 
-static void
+static int
 add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
 		   uint64_t host_phys_addr, uint64_t size)
 {
@@ -498,6 +498,10 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
 		dev->max_guest_pages *= 2;
 		dev->guest_pages = realloc(dev->guest_pages,
 					dev->max_guest_pages * sizeof(*page));
+		if (!dev->guest_pages) {
+			RTE_LOG(ERR, VHOST_CONFIG, "cannot realloc guest_pages\n");
+			return -1;
+		}
 	}
 
 	if (dev->nr_guest_pages > 0) {
@@ -506,7 +510,7 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
 		if (host_phys_addr == last_page->host_phys_addr +
 				      last_page->size) {
 			last_page->size += size;
-			return;
+			return 0;
 		}
 	}
 
@@ -514,9 +518,11 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
 	page->guest_phys_addr = guest_phys_addr;
 	page->host_phys_addr  = host_phys_addr;
 	page->size = size;
+
+	return 0;
 }
 
-static void
+static int
 add_guest_pages(struct virtio_net *dev, struct rte_vhost_mem_region *reg,
 		uint64_t page_size)
 {
@@ -530,7 +536,9 @@ add_guest_pages(struct virtio_net *dev, struct rte_vhost_mem_region *reg,
 	size = page_size - (guest_phys_addr & (page_size - 1));
 	size = RTE_MIN(size, reg_size);
 
-	add_one_guest_page(dev, guest_phys_addr, host_phys_addr, size);
+	if (add_one_guest_page(dev, guest_phys_addr, host_phys_addr, size) < 0)
+		return -1;
+
 	host_user_addr  += size;
 	guest_phys_addr += size;
 	reg_size -= size;
@@ -539,12 +547,16 @@ add_guest_pages(struct virtio_net *dev, struct rte_vhost_mem_region *reg,
 		size = RTE_MIN(reg_size, page_size);
 		host_phys_addr = rte_mem_virt2iova((void *)(uintptr_t)
 						  host_user_addr);
-		add_one_guest_page(dev, guest_phys_addr, host_phys_addr, size);
+		if (add_one_guest_page(dev, guest_phys_addr, host_phys_addr,
+				size) < 0)
+			return -1;
 
 		host_user_addr  += size;
 		guest_phys_addr += size;
 		reg_size -= size;
 	}
+
+	return 0;
 }
 
 #ifdef RTE_LIBRTE_VHOST_DEBUG
@@ -692,7 +704,12 @@ vhost_user_set_mem_table(struct virtio_net *dev, struct VhostUserMsg *pmsg)
 				      mmap_offset;
 
 		if (dev->dequeue_zero_copy)
-			add_guest_pages(dev, reg, alignment);
+			if (add_guest_pages(dev, reg, alignment) < 0) {
+				RTE_LOG(ERR, VHOST_CONFIG,
+					"adding guest pages to region %u failed.\n",
+					i);
+				goto err_mmap;
+			}
 
 		RTE_LOG(INFO, VHOST_CONFIG,
 			"guest memory region %u, size: 0x%" PRIx64 "\n"
-- 
2.11.0

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

* [dpdk-stable] patch 'vhost: fix ring index returned to master on stop' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (10 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: fix realloc failure' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc: add missing defines for SAL annotation' " Yuanhan Liu
                   ` (45 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Tomasz Kulasek
  Cc: Pawel Wodkowski, Jianfeng Tan, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 4be70b1c3fbc14209d6f8c3dba4bb845d1c0be8c Mon Sep 17 00:00:00 2001
From: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Date: Fri, 9 Feb 2018 18:28:00 +0100
Subject: [PATCH] vhost: fix ring index returned to master on stop

[ upstream commit 90bb22a197abb41795cc9946e57af9d4f9395970 ]

According to the "Vhost-user Protocol" document,
VHOST_USER_GET_VRING_BASE should get the available vring base offset.

Fixes: 8f972312b8f4 ("vhost: support vhost-user")

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 63f7d50ef..c86713f30 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -861,8 +861,8 @@ vhost_user_get_vring_base(struct virtio_net *dev,
 
 	dev->flags &= ~VIRTIO_DEV_READY;
 
-	/* Here we are safe to get the last used index */
-	msg->payload.state.num = vq->last_used_idx;
+	/* Here we are safe to get the last avail index */
+	msg->payload.state.num = vq->last_avail_idx;
 
 	RTE_LOG(INFO, VHOST_CONFIG,
 		"vring base idx:%d file:%d\n", msg->payload.state.index,
-- 
2.11.0

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

* [dpdk-stable] patch 'net/sfc: add missing defines for SAL annotation' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (11 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: fix ring index returned to master on stop' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: fix primary slave port id storage type' " Yuanhan Liu
                   ` (44 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 5399a7cc122b4115f984023ad350a51b888a5faf Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Tue, 20 Feb 2018 07:33:19 +0000
Subject: [PATCH] net/sfc: add missing defines for SAL annotation

[ upstream commit fbbf83ea136f9c994cb09dba3009d647081461cf ]

Fixes: e1b944598579 ("net/sfc: build libefx")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/efsys.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/sfc/efsys.h b/drivers/net/sfc/efsys.h
index f428b6246..5b52c2224 100644
--- a/drivers/net/sfc/efsys.h
+++ b/drivers/net/sfc/efsys.h
@@ -141,6 +141,8 @@ prefetch_read_once(const volatile void *addr)
 #define __out_ecount_opt(_n)
 #define __out_bcount(_n)
 #define __out_bcount_opt(_n)
+#define __out_bcount_part(_n, _l)
+#define __out_bcount_part_opt(_n, _l)
 
 #define __deref_out
 
-- 
2.11.0

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

* [dpdk-stable] patch 'net/bonding: fix primary slave port id storage type' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (12 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc: add missing defines for SAL annotation' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/octeontx: fix null pointer dereference' " Yuanhan Liu
                   ` (43 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 9bf81086c3593e7581e5d086240607a21231ca53 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Date: Tue, 6 Mar 2018 15:07:04 +0530
Subject: [PATCH] net/bonding: fix primary slave port id storage type

[ upstream commit e54b560d2892e540567476e2588be42dbd15d957 ]

primary_slave_port_id is uint16_t which needs to be correctly stored
with the same data type of input parameter in bond_ethdev_configure.

In powerpc, creating bond pmd results in below error due to wrong
cast on input param. This is reproducible, only when using shared
libraries.

sudo -E LD_LIBRARY_PATH=$PWD/$RTE_TARGET/lib $RTE_TARGET/app/testpmd \
  -l 0,8 --socket-mem=1024,1024 \
  --vdev 'net_tap0,iface=dpdktap0' --vdev 'net_tap1,iface=dpdktap1' \
  --vdev 'net_bonding0,mode=1,slave=0,slave=1,primary=0,socket_id=1' \
  -d $RTE_TARGET/lib/librte_pmd_tap.so \
  -d $RTE_TARGET/lib/librte_mempool_ring.so -- --forward-mode=rxonly

Configuring Port 0 (socket 0)
PMD: net_tap0: 0x70a854070280: TX configured queues number: 1
PMD: net_tap0: 0x70a854070280: RX configured queues number: 1
Port 0: 86:EA:6D:52:3E:DB
Configuring Port 1 (socket 0)
PMD: net_tap1: 0x70a854074300: TX configured queues number: 1
PMD: net_tap1: 0x70a854074300: RX configured queues number: 1
Port 1: 42:9A:B8:49:B6:00
Configuring Port 2 (socket 1)
EAL: Failed to set primary slave port 7424 on bonded device net_bonding0
Fail to configure port 2
EAL: Error - exiting with code: 1
  Cause: Start ports failed

Fixes: f8244c6399 ("ethdev: increase port id range")

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/bonding/rte_eth_bond_args.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index e816da31f..8c94cc617 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -273,7 +273,7 @@ bond_ethdev_parse_primary_slave_port_id_kvarg(const char *key __rte_unused,
 	if (primary_slave_port_id < 0)
 		return -1;
 
-	*(uint8_t *)extra_args = (uint8_t)primary_slave_port_id;
+	*(uint16_t *)extra_args = (uint16_t)primary_slave_port_id;
 
 	return 0;
 }
-- 
2.11.0

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

* [dpdk-stable] patch 'net/octeontx: fix null pointer dereference' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (13 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: fix primary slave port id storage type' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/octeontx: fix uninitialized variable in port open' " Yuanhan Liu
                   ` (42 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Santosh Shukla; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 2ea90622af0f937f06a5298afa66b3bca46fda47 Mon Sep 17 00:00:00 2001
From: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Date: Tue, 20 Feb 2018 22:44:15 +0530
Subject: [PATCH] net/octeontx: fix null pointer dereference

[ upstream commit a98122ef6601015374bb2d598012331ddfd2b81d ]

Coverity issue: 195040
Fixes: f18b146c498d ("net/octeontx: create ethdev ports")

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index eca3a39fd..890c7ea19 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -1142,7 +1142,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
 	return data->port_id;
 
 err:
-	if (port)
+	if (nic)
 		octeontx_port_close(nic);
 
 	if (eth_dev != NULL) {
-- 
2.11.0

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

* [dpdk-stable] patch 'net/octeontx: fix uninitialized variable in port open' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (14 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/octeontx: fix null pointer dereference' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/nfp: fix assigning port id in mbuf' " Yuanhan Liu
                   ` (41 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Santosh Shukla; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 1e2c25e769ad37cfef4219ab2b32db1e6a4f744e Mon Sep 17 00:00:00 2001
From: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Date: Tue, 20 Feb 2018 22:44:16 +0530
Subject: [PATCH] net/octeontx: fix uninitialized variable in port open

[ upstream commit a371fd7903f99753d535b31dbad2adcc33dcdd5c ]

Coverity issue: 195045
Fixes: f18b146c498d ("net/octeontx: create ethdev ports")

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 890c7ea19..ec03e4c8a 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -127,7 +127,7 @@ octeontx_port_open(struct octeontx_nic *nic)
 	int res;
 
 	res = 0;
-
+	memset(&bgx_port_conf, 0x0, sizeof(bgx_port_conf));
 	PMD_INIT_FUNC_TRACE();
 
 	res = octeontx_bgx_port_open(nic->port_id, &bgx_port_conf);
-- 
2.11.0

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

* [dpdk-stable] patch 'net/nfp: fix assigning port id in mbuf' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (15 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/octeontx: fix uninitialized variable in port open' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/nfp: fix barrier location' " Yuanhan Liu
                   ` (40 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From b95ba43c1b894ac304dd347c95304d947e46689e Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Thu, 22 Feb 2018 11:13:48 +0000
Subject: [PATCH] net/nfp: fix assigning port id in mbuf

[ upstream commit ca7d716b3ad74529fa331f2cfb45716241124b27 ]

Although this can be done by the app, because other PMDs are doing it,
apps expect this behaviour from the PMD.

Fixes: b812daadad0d ("nfp: add Rx and Tx")

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

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index fa8ff3cb3..f633a8df5 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2065,6 +2065,8 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		mb->nb_segs = 1;
 		mb->next = NULL;
 
+		mb->port = rxq->port_id;
+
 		/* Checking the RSS flag */
 		nfp_net_set_hash(rxq, rxds, mb);
 
-- 
2.11.0

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

* [dpdk-stable] patch 'net/nfp: fix barrier location' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (16 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/nfp: fix assigning port id in mbuf' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/nfp: fix link speed capabilities' " Yuanhan Liu
                   ` (39 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 55c8d97724452f28558438ef6dafb2ff7d0c152c Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Thu, 22 Feb 2018 11:30:39 +0000
Subject: [PATCH] net/nfp: fix barrier location

[ upstream commit f598e1a2d0e29293b924119c1b3cdd4e16756e95 ]

The barrier needs to be after reading the DD bit. It has not been
a problem because the potential reads which can not happen before
reading the DD bit seem to be far enough, so the compiler is not
rescheduling them. However, a refactoring could make this problem
to arise.

Fixes: b812daadad0d ("nfp: add Rx and Tx")

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

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index f633a8df5..3cc3da6ee 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1995,16 +1995,16 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 			break;
 		}
 
+		rxds = &rxq->rxds[rxq->rd_p];
+		if ((rxds->rxd.meta_len_dd & PCIE_DESC_RX_DD) == 0)
+			break;
+
 		/*
 		 * Memory barrier to ensure that we won't do other
 		 * reads before the DD bit.
 		 */
 		rte_rmb();
 
-		rxds = &rxq->rxds[rxq->rd_p];
-		if ((rxds->rxd.meta_len_dd & PCIE_DESC_RX_DD) == 0)
-			break;
-
 		/*
 		 * We got a packet. Let's alloc a new mbuff for refilling the
 		 * free descriptor ring as soon as possible
-- 
2.11.0

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

* [dpdk-stable] patch 'net/nfp: fix link speed capabilities' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (17 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/nfp: fix barrier location' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'doc: fix NFP NIC guide grammar' " Yuanhan Liu
                   ` (38 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 7759b4ae0286f52eb21d23bc6a232c86501cbdd7 Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Thu, 22 Feb 2018 11:57:20 +0000
Subject: [PATCH] net/nfp: fix link speed capabilities

[ upstream commit 03c4e7abee3647024ccbc89b4d48dc9da7862379 ]

Mixing numeric macros with bit shifts macros is not a good idea.

Fixes: 011411586e03 ("net/nfp: extend speed capabilities advertised")

Signed-off-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 3cc3da6ee..cfb357b91 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1244,9 +1244,9 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->reta_size = NFP_NET_CFG_RSS_ITBL_SZ;
 	dev_info->hash_key_size = NFP_NET_CFG_RSS_KEY_SZ;
 
-	dev_info->speed_capa = ETH_SPEED_NUM_1G | ETH_LINK_SPEED_10G |
-			       ETH_SPEED_NUM_25G | ETH_SPEED_NUM_40G |
-			       ETH_SPEED_NUM_50G | ETH_LINK_SPEED_100G;
+	dev_info->speed_capa = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G |
+			       ETH_LINK_SPEED_25G | ETH_LINK_SPEED_40G |
+			       ETH_LINK_SPEED_50G | ETH_LINK_SPEED_100G;
 
 	if (hw->cap & NFP_NET_CFG_CTRL_LSO)
 		dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_TCP_TSO;
-- 
2.11.0

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

* [dpdk-stable] patch 'doc: fix NFP NIC guide grammar' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (18 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/nfp: fix link speed capabilities' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/qede: fix alloc from socket 0' " Yuanhan Liu
                   ` (37 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: Marko Kovacevic, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From c8a66eb239ae3e29c5931ab8524fa66699d11b03 Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Thu, 22 Feb 2018 12:15:53 +0000
Subject: [PATCH] doc: fix NFP NIC guide grammar

[ upstream commit 0b598c9c69ec29f088b3b5e455494df6db5a2a72 ]

My english is far worse than those from the marketing team.

Fixes: 80bc1752f16e ("nfp: add guide")
Fixes: d625beafc8be ("doc: update NFP with PF support information")
Fixes: 80987c40fd28 ("config: enable nfp driver on Linux")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 doc/guides/nics/nfp.rst | 43 ++++++++++++++++++++++---------------------
 1 file changed, 22 insertions(+), 21 deletions(-)

diff --git a/doc/guides/nics/nfp.rst b/doc/guides/nics/nfp.rst
index 99a3b76eb..67e574e0a 100644
--- a/doc/guides/nics/nfp.rst
+++ b/doc/guides/nics/nfp.rst
@@ -34,14 +34,14 @@ NFP poll mode driver library
 Netronome's sixth generation of flow processors pack 216 programmable
 cores and over 100 hardware accelerators that uniquely combine packet,
 flow, security and content processing in a single device that scales
-up to 400 Gbps.
+up to 400-Gb/s.
 
 This document explains how to use DPDK with the Netronome Poll Mode
 Driver (PMD) supporting Netronome's Network Flow Processor 6xxx
 (NFP-6xxx) and Netronome's Flow Processor 4xxx (NFP-4xxx).
 
 NFP is a SRIOV capable device and the PMD driver supports the physical
-function (PF) and virtual functions (VFs).
+function (PF) and the virtual functions (VFs).
 
 Dependencies
 ------------
@@ -49,17 +49,18 @@ Dependencies
 Before using the Netronome's DPDK PMD some NFP configuration,
 which is not related to DPDK, is required. The system requires
 installation of **Netronome's BSP (Board Support Package)** along
-with some specific NFP firmware application. Netronome's NSP ABI
+with a specific NFP firmware application. Netronome's NSP ABI
 version should be 0.20 or higher.
 
 If you have a NFP device you should already have the code and
-documentation for doing all this configuration. Contact
+documentation for this configuration. Contact
 **support@netronome.com** to obtain the latest available firmware.
 
-The NFP Linux netdev kernel driver for VFs is part of vanilla kernel
-since kernel version 4.5, and support for the PF since kernel version
-4.11. Support for older kernels can be obtained on Github at
-**https://github.com/Netronome/nfp-drv-kmods** along with build
+The NFP Linux netdev kernel driver for VFs has been a part of the
+vanilla kernel since kernel version 4.5, and support for the PF
+since kernel version 4.11. Support for older kernels can be obtained
+on Github at
+**https://github.com/Netronome/nfp-drv-kmods** along with the build
 instructions.
 
 NFP PMD needs to be used along with UIO ``igb_uio`` or VFIO (``vfio-pci``)
@@ -70,15 +71,15 @@ Building the software
 
 Netronome's PMD code is provided in the **drivers/net/nfp** directory.
 Although NFP PMD has Netronome´s BSP dependencies, it is possible to
-compile it along with other DPDK PMDs even if no BSP was installed before.
+compile it along with other DPDK PMDs even if no BSP was installed previously.
 Of course, a DPDK app will require such a BSP installed for using the
 NFP PMD, along with a specific NFP firmware application.
 
-Default PMD configuration is at **common_linuxapp configuration** file:
+Default PMD configuration is at the **common_linuxapp configuration** file:
 
 - **CONFIG_RTE_LIBRTE_NFP_PMD=y**
 
-Once DPDK is built all the DPDK apps and examples include support for
+Once the DPDK is built all the DPDK apps and examples include support for
 the NFP PMD.
 
 
@@ -91,18 +92,18 @@ for details.
 Using the PF
 ------------
 
-NFP PMD has support for using the NFP PF as another DPDK port, but it does not
+NFP PMD supports using the NFP PF as another DPDK port, but it does not
 have any functionality for controlling VFs. In fact, it is not possible to use
 the PMD with the VFs if the PF is being used by DPDK, that is, with the NFP PF
-bound to ``igb_uio`` or ``vfio-pci`` kernel drivers. Future DPDK version will
+bound to ``igb_uio`` or ``vfio-pci`` kernel drivers. Future DPDK versions will
 have a PMD able to work with the PF and VFs at the same time and with the PF
 implementing VF management along with other PF-only functionalities/offloads.
 
-The PMD PF has extra work to do which will delay the DPDK app initialization
-like checking if a firmware is already available in the device, uploading the
-firmware if necessary, and configure the Link state properly when starting or
-stopping a PF port. Note that firmware upload is not always necessary which is
-the main delay for NFP PF PMD initialization.
+The PMD PF has extra work to do which will delay the DPDK app initialization.
+This additional effort could be checking if a firmware is already available in
+the device, uploading the firmware if necessary or configuring the Link state
+properly when starting or stopping a PF port. Note that firmware upload is not
+always necessary which is the main delay for NFP PF PMD initialization.
 
 Depending on the Netronome product installed in the system, firmware files
 should be available under ``/lib/firmware/netronome``. DPDK PMD supporting the
@@ -114,14 +115,14 @@ PF multiport support
 --------------------
 
 Some NFP cards support several physical ports with just one single PCI device.
-DPDK core is designed with the 1:1 relationship between PCI devices and DPDK
+The DPDK core is designed with a 1:1 relationship between PCI devices and DPDK
 ports, so NFP PMD PF support requires handling the multiport case specifically.
 During NFP PF initialization, the PMD will extract the information about the
 number of PF ports from the firmware and will create as many DPDK ports as
 needed.
 
 Because the unusual relationship between a single PCI device and several DPDK
-ports, there are some limitations when using more than one PF DPDK ports: there
+ports, there are some limitations when using more than one PF DPDK port: there
 is no support for RX interrupts and it is not possible either to use those PF
 ports with the device hotplug functionality.
 
@@ -136,7 +137,7 @@ System configuration
    get the drivers from the above Github repository and follow the instructions
    for building and installing it.
 
-   Virtual Functions need to be enabled before they can be used with the PMD.
+   VFs need to be enabled before they can be used with the PMD.
    Before enabling the VFs it is useful to obtain information about the
    current NFP PCI device detected by the system:
 
-- 
2.11.0

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

* [dpdk-stable] patch 'net/qede: fix alloc from socket 0' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (19 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'doc: fix NFP NIC guide grammar' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/enic: allocate stats DMA buffer upfront during probe' " Yuanhan Liu
                   ` (36 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Pascal Mazon; +Cc: Harish Patil, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 5978967e184e4a27fa34a1370d07c0889cc416b3 Mon Sep 17 00:00:00 2001
From: Pascal Mazon <pascal.mazon@6wind.com>
Date: Mon, 26 Feb 2018 09:01:10 +0100
Subject: [PATCH] net/qede: fix alloc from socket 0

[ upstream commit 368b11185c8c35f95c6b4db1b24fa7757e5678f9 ]

In case osal_dma_alloc_coherent() or osal_dma_alloc_coherent_aligned() are
called from a management thread, core_id turn out to be LCORE_ID_ANY, and
the resulting socket for alloc will be socket 0.

This is not desirable when using a NIC from socket 1 which might very
likely be configured to use memory from that socket only.
In that case, allocation will fail.

To address this, use master lcore instead when called from mgmt thread.
The associated socket should have memory available.

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

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Harish Patil <harish.patil@cavium.com>
Acked-by: Harish Patil <harish.patil@cavium.com>
---
 drivers/net/qede/base/bcm_osal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/qede/base/bcm_osal.c b/drivers/net/qede/base/bcm_osal.c
index fe42f3256..91017b89a 100644
--- a/drivers/net/qede/base/bcm_osal.c
+++ b/drivers/net/qede/base/bcm_osal.c
@@ -133,7 +133,7 @@ void *osal_dma_alloc_coherent(struct ecore_dev *p_dev,
 	snprintf(mz_name, sizeof(mz_name) - 1, "%lx",
 					(unsigned long)rte_get_timer_cycles());
 	if (core_id == (unsigned int)LCORE_ID_ANY)
-		core_id = 0;
+		core_id = rte_get_master_lcore();
 	socket_id = rte_lcore_to_socket_id(core_id);
 	mz = rte_memzone_reserve_aligned(mz_name, size,
 					 socket_id, 0, RTE_CACHE_LINE_SIZE);
@@ -172,7 +172,7 @@ void *osal_dma_alloc_coherent_aligned(struct ecore_dev *p_dev,
 	snprintf(mz_name, sizeof(mz_name) - 1, "%lx",
 					(unsigned long)rte_get_timer_cycles());
 	if (core_id == (unsigned int)LCORE_ID_ANY)
-		core_id = 0;
+		core_id = rte_get_master_lcore();
 	socket_id = rte_lcore_to_socket_id(core_id);
 	mz = rte_memzone_reserve_aligned(mz_name, size, socket_id, 0, align);
 	if (!mz) {
-- 
2.11.0

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

* [dpdk-stable] patch 'net/enic: allocate stats DMA buffer upfront during probe' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (20 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/qede: fix alloc from socket 0' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/i40e: fix link update no wait' " Yuanhan Liu
                   ` (35 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: John Daley, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From bbfa4ce60276b84b1ff0915ab1f1228a3c1256e8 Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Wed, 7 Mar 2018 18:46:58 -0800
Subject: [PATCH] net/enic: allocate stats DMA buffer upfront during probe

[ upstream commit 8d782f3f89e1dcd0c8af1c3c93501d7a06159d66 ]

The driver provides a DMA buffer to the firmware when it requests port
stats. The NIC then fills that buffer with latest stats. Currently,
the driver allocates the DMA buffer the first time it requests stats
and saves it for later use. This can lead to crashes when
primary/secondary processes are involved. For example, the following
sequence crashes the secondary process.

1. Start a primary app that does not call rte_eth_stats_get()
2. dpdk-procinfo -- --stats

dpdk-procinfo crashes while trying to allocate the stats DMA buffer
because the alloc function pointer (vdev.alloc_consistent) is valid
only in the primary process, not in the secondary process.

Overwriting the alloc function pointer in the secondary process is not
an option, as it will simply make the pointer invalid in the primary
process. Instead, allocate the DMA buffer during probe so that only
the primary process does both allocate and free. This allows the
secondary process to dump stats as well.

Fixes: 9913fbb91df0 ("enic/base: common code")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/base/vnic_dev.c | 24 ++++++++++++++----------
 drivers/net/enic/base/vnic_dev.h |  1 +
 drivers/net/enic/enic_main.c     |  9 +++++++++
 3 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c
index 9b25d219c..9e54ace35 100644
--- a/drivers/net/enic/base/vnic_dev.c
+++ b/drivers/net/enic/base/vnic_dev.c
@@ -627,17 +627,9 @@ int vnic_dev_stats_dump(struct vnic_dev *vdev, struct vnic_stats **stats)
 {
 	u64 a0, a1;
 	int wait = 1000;
-	static u32 instance;
-	char name[NAME_MAX];
 
-	if (!vdev->stats) {
-		snprintf((char *)name, sizeof(name),
-			"vnic_stats-%u", instance++);
-		vdev->stats = vdev->alloc_consistent(vdev->priv,
-			sizeof(struct vnic_stats), &vdev->stats_pa, (u8 *)name);
-		if (!vdev->stats)
-			return -ENOMEM;
-	}
+	if (!vdev->stats)
+		return -ENOMEM;
 
 	*stats = vdev->stats;
 	a0 = vdev->stats_pa;
@@ -962,6 +954,18 @@ u32 vnic_dev_get_intr_coal_timer_max(struct vnic_dev *vdev)
 	return vdev->intr_coal_timer_info.max_usec;
 }
 
+int vnic_dev_alloc_stats_mem(struct vnic_dev *vdev)
+{
+	char name[NAME_MAX];
+	static u32 instance;
+
+	snprintf((char *)name, sizeof(name), "vnic_stats-%u", instance++);
+	vdev->stats = vdev->alloc_consistent(vdev->priv,
+					     sizeof(struct vnic_stats),
+					     &vdev->stats_pa, (u8 *)name);
+	return vdev->stats == NULL ? -ENOMEM : 0;
+}
+
 void vnic_dev_unregister(struct vnic_dev *vdev)
 {
 	if (vdev) {
diff --git a/drivers/net/enic/base/vnic_dev.h b/drivers/net/enic/base/vnic_dev.h
index c9ca25b35..94964e442 100644
--- a/drivers/net/enic/base/vnic_dev.h
+++ b/drivers/net/enic/base/vnic_dev.h
@@ -196,6 +196,7 @@ struct vnic_dev *vnic_dev_register(struct vnic_dev *vdev,
 	void *priv, struct rte_pci_device *pdev, struct vnic_dev_bar *bar,
 	unsigned int num_bars);
 struct rte_pci_device *vnic_dev_get_pdev(struct vnic_dev *vdev);
+int vnic_dev_alloc_stats_mem(struct vnic_dev *vdev);
 int vnic_dev_cmd_init(struct vnic_dev *vdev, int fallback);
 int vnic_dev_get_size(void);
 int vnic_dev_int13(struct vnic_dev *vdev, u64 arg, u32 op);
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 1694aed12..59e60aa76 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1383,6 +1383,15 @@ int enic_probe(struct enic *enic)
 		enic_alloc_consistent,
 		enic_free_consistent);
 
+	/*
+	 * Allocate the consistent memory for stats upfront so both primary and
+	 * secondary processes can dump stats.
+	 */
+	err = vnic_dev_alloc_stats_mem(enic->vdev);
+	if (err) {
+		dev_err(enic, "Failed to allocate cmd memory, aborting\n");
+		goto err_out_unregister;
+	}
 	/* Issue device open to get device in known state */
 	err = enic_dev_open(enic);
 	if (err) {
-- 
2.11.0

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

* [dpdk-stable] patch 'net/i40e: fix link update no wait' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (21 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/enic: allocate stats DMA buffer upfront during probe' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/vmxnet3: set the queue shared buffer at start' " Yuanhan Liu
                   ` (34 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Fan Zhang; +Cc: Andrey Chilikin, Eelco Chaudron, Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From a991f1979bfd0e6e528185a686699566aeb7d403 Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Thu, 8 Mar 2018 12:17:52 +0000
Subject: [PATCH] net/i40e: fix link update no wait

[ upstream commit eef2daf2e199d2a22eba0bdf9ee990c2a9efc101 ]

In i40e_dev_link_update() the driver obtains the link status
info via admin queue command despite of "no_wait" flag. This
requires relatively long time and may be a problem to some
application such as ovs-dpdk.
(https://bugzilla.redhat.com/show_bug.cgi?id=1551761).

This patch aims to fix the problem by using a different
approach of obtaining link status for i40e NIC without waiting.
Instead of getting the link status via admin queue command,
this patch reads the link status registers to accelerate the
procedure.

Fixes: 263333bbb7a9 ("i40e: fix link status timeout")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Reviewed-by: Eelco Chaudron <echaudro@redhat.com>
Tested-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 128 ++++++++++++++++++++++++++++++-----------
 1 file changed, 95 insertions(+), 33 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 290ef2491..ef6470814 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2444,77 +2444,139 @@ i40e_dev_set_link_down(struct rte_eth_dev *dev)
 	return i40e_phy_conf_link(hw, abilities, speed, false);
 }
 
-int
-i40e_dev_link_update(struct rte_eth_dev *dev,
-		     int wait_to_complete)
+static __rte_always_inline void
+update_link_no_wait(struct i40e_hw *hw, struct rte_eth_link *link)
+{
+/* Link status registers and values*/
+#define I40E_PRTMAC_LINKSTA		0x001E2420
+#define I40E_REG_LINK_UP		0x40000080
+#define I40E_PRTMAC_MACC		0x001E24E0
+#define I40E_REG_MACC_25GB		0x00020000
+#define I40E_REG_SPEED_MASK		0x38000000
+#define I40E_REG_SPEED_100MB		0x00000000
+#define I40E_REG_SPEED_1GB		0x08000000
+#define I40E_REG_SPEED_10GB		0x10000000
+#define I40E_REG_SPEED_20GB		0x20000000
+#define I40E_REG_SPEED_25_40GB		0x18000000
+	uint32_t link_speed;
+	uint32_t reg_val;
+
+	reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA);
+	link_speed = reg_val & I40E_REG_SPEED_MASK;
+	reg_val &= I40E_REG_LINK_UP;
+	link->link_status = (reg_val == I40E_REG_LINK_UP) ? 1 : 0;
+
+	if (unlikely(link->link_status != 0))
+		return;
+
+	/* Parse the link status */
+	switch (link_speed) {
+	case I40E_REG_SPEED_100MB:
+		link->link_speed = ETH_SPEED_NUM_100M;
+		break;
+	case I40E_REG_SPEED_1GB:
+		link->link_speed = ETH_SPEED_NUM_1G;
+		break;
+	case I40E_REG_SPEED_10GB:
+		link->link_speed = ETH_SPEED_NUM_10G;
+		break;
+	case I40E_REG_SPEED_20GB:
+		link->link_speed = ETH_SPEED_NUM_20G;
+		break;
+	case I40E_REG_SPEED_25_40GB:
+		reg_val = I40E_READ_REG(hw, I40E_PRTMAC_MACC);
+
+		if (reg_val & I40E_REG_MACC_25GB)
+			link->link_speed = ETH_SPEED_NUM_25G;
+		else
+			link->link_speed = ETH_SPEED_NUM_40G;
+
+		break;
+	default:
+		PMD_DRV_LOG(ERR, "Unknown link speed info %u", link_speed);
+		break;
+	}
+}
+
+static __rte_always_inline void
+update_link_wait(struct i40e_hw *hw, struct rte_eth_link *link,
+	bool enable_lse)
 {
-#define CHECK_INTERVAL 100  /* 100ms */
-#define MAX_REPEAT_TIME 10  /* 1s (10 * 100ms) in total */
-	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+#define CHECK_INTERVAL             100  /* 100ms */
+#define MAX_REPEAT_TIME            10  /* 1s (10 * 100ms) in total */
+	uint32_t rep_cnt = MAX_REPEAT_TIME;
 	struct i40e_link_status link_status;
-	struct rte_eth_link link, old;
 	int status;
-	unsigned rep_cnt = MAX_REPEAT_TIME;
-	bool enable_lse = dev->data->dev_conf.intr_conf.lsc ? true : false;
 
-	memset(&link, 0, sizeof(link));
-	memset(&old, 0, sizeof(old));
 	memset(&link_status, 0, sizeof(link_status));
-	rte_i40e_dev_atomic_read_link_status(dev, &old);
 
 	do {
 		/* Get link status information from hardware */
 		status = i40e_aq_get_link_info(hw, enable_lse,
 						&link_status, NULL);
-		if (status != I40E_SUCCESS) {
-			link.link_speed = ETH_SPEED_NUM_100M;
-			link.link_duplex = ETH_LINK_FULL_DUPLEX;
+		if (unlikely(status != I40E_SUCCESS)) {
+			link->link_speed = ETH_SPEED_NUM_100M;
+			link->link_duplex = ETH_LINK_FULL_DUPLEX;
 			PMD_DRV_LOG(ERR, "Failed to get link info");
-			goto out;
+			return;
 		}
 
-		link.link_status = link_status.link_info & I40E_AQ_LINK_UP;
-		if (!wait_to_complete || link.link_status)
-			break;
+		link->link_status = link_status.link_info & I40E_AQ_LINK_UP;
+		if (unlikely(link->link_status != 0))
+			return;
 
 		rte_delay_ms(CHECK_INTERVAL);
 	} while (--rep_cnt);
 
-	if (!link.link_status)
-		goto out;
-
-	/* i40e uses full duplex only */
-	link.link_duplex = ETH_LINK_FULL_DUPLEX;
-
 	/* Parse the link status */
 	switch (link_status.link_speed) {
 	case I40E_LINK_SPEED_100MB:
-		link.link_speed = ETH_SPEED_NUM_100M;
+		link->link_speed = ETH_SPEED_NUM_100M;
 		break;
 	case I40E_LINK_SPEED_1GB:
-		link.link_speed = ETH_SPEED_NUM_1G;
+		link->link_speed = ETH_SPEED_NUM_1G;
 		break;
 	case I40E_LINK_SPEED_10GB:
-		link.link_speed = ETH_SPEED_NUM_10G;
+		link->link_speed = ETH_SPEED_NUM_10G;
 		break;
 	case I40E_LINK_SPEED_20GB:
-		link.link_speed = ETH_SPEED_NUM_20G;
+		link->link_speed = ETH_SPEED_NUM_20G;
 		break;
 	case I40E_LINK_SPEED_25GB:
-		link.link_speed = ETH_SPEED_NUM_25G;
+		link->link_speed = ETH_SPEED_NUM_25G;
 		break;
 	case I40E_LINK_SPEED_40GB:
-		link.link_speed = ETH_SPEED_NUM_40G;
+		link->link_speed = ETH_SPEED_NUM_40G;
 		break;
 	default:
-		link.link_speed = ETH_SPEED_NUM_100M;
+		link->link_speed = ETH_SPEED_NUM_100M;
 		break;
 	}
+}
+
+int
+i40e_dev_link_update(struct rte_eth_dev *dev,
+		     int wait_to_complete)
+{
+	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct rte_eth_link link, old;
+	bool enable_lse = dev->data->dev_conf.intr_conf.lsc ? true : false;
 
+	memset(&link, 0, sizeof(link));
+	memset(&old, 0, sizeof(old));
+
+	rte_i40e_dev_atomic_read_link_status(dev, &old);
+
+	/* i40e uses full duplex only */
+	link.link_duplex = ETH_LINK_FULL_DUPLEX;
 	link.link_autoneg = !(dev->data->dev_conf.link_speeds &
 			ETH_LINK_SPEED_FIXED);
 
-out:
+	if (!wait_to_complete)
+		update_link_no_wait(hw, &link);
+	else
+		update_link_wait(hw, &link, enable_lse);
+
 	rte_i40e_dev_atomic_write_link_status(dev, &link);
 	if (link.link_status == old.link_status)
 		return -1;
-- 
2.11.0

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

* [dpdk-stable] patch 'net/vmxnet3: set the queue shared buffer at start' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (22 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/i40e: fix link update no wait' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/mrvl: fix crash when port is closed without starting' " Yuanhan Liu
                   ` (33 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Chas Williams; +Cc: Shrikrishna Khare, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 0cef16ac7a9ef0e2be016f54e515883afda528a6 Mon Sep 17 00:00:00 2001
From: Chas Williams <chas3@att.com>
Date: Wed, 17 Jan 2018 10:04:56 -0500
Subject: [PATCH] net/vmxnet3: set the queue shared buffer at start

[ upstream commit 3e5810f31d9cafe1a49a098372467c1eda3bf4aa ]

If a reconfiguration happens, queuedesc is reallocated.  Any queues that
are preserved point to the previous queuedesc since the queues are only
configured during queue setup.  Delay configuration of the shared queue
pointers until device start when queuedesc is no longer changing.

Fixes: 8618d19b52b1 ("net/vmxnet3: reallocate shared memzone on re-config")

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 ++++
 drivers/net/vmxnet3/vmxnet3_rxtx.c   | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 93d96499c..7669c64d0 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -670,6 +670,8 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)
 		Vmxnet3_TxQueueDesc *tqd = &hw->tqd_start[i];
 		vmxnet3_tx_queue_t *txq  = dev->data->tx_queues[i];
 
+		txq->shared = &hw->tqd_start[i];
+
 		tqd->ctrl.txNumDeferred  = 0;
 		tqd->ctrl.txThreshold    = 1;
 		tqd->conf.txRingBasePA   = txq->cmd_ring.basePA;
@@ -690,6 +692,8 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)
 		Vmxnet3_RxQueueDesc *rqd  = &hw->rqd_start[i];
 		vmxnet3_rx_queue_t *rxq   = dev->data->rx_queues[i];
 
+		rxq->shared = &hw->rqd_start[i];
+
 		rqd->conf.rxRingBasePA[0] = rxq->cmd_ring[0].basePA;
 		rqd->conf.rxRingBasePA[1] = rxq->cmd_ring[1].basePA;
 		rqd->conf.compRingBasePA  = rxq->comp_ring.basePA;
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index aa396ab28..940068ff2 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -937,7 +937,7 @@ vmxnet3_dev_tx_queue_setup(struct rte_eth_dev *dev,
 
 	txq->queue_id = queue_idx;
 	txq->port_id = dev->data->port_id;
-	txq->shared = &hw->tqd_start[queue_idx];
+	txq->shared = NULL; /* set in vmxnet3_setup_driver_shared() */
 	txq->hw = hw;
 	txq->qid = queue_idx;
 	txq->stopped = TRUE;
@@ -1040,7 +1040,7 @@ vmxnet3_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	rxq->mp = mp;
 	rxq->queue_id = queue_idx;
 	rxq->port_id = dev->data->port_id;
-	rxq->shared = &hw->rqd_start[queue_idx];
+	rxq->shared = NULL; /* set in vmxnet3_setup_driver_shared() */
 	rxq->hw = hw;
 	rxq->qid1 = queue_idx;
 	rxq->qid2 = queue_idx + hw->num_rx_queues;
-- 
2.11.0

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

* [dpdk-stable] patch 'net/mrvl: fix crash when port is closed without starting' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (23 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/vmxnet3: set the queue shared buffer at start' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/mrvl: fix Rx descriptors number' " Yuanhan Liu
                   ` (32 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Natalie Samsonov; +Cc: Tomasz Duszynski, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From fb146de14743bce479d6659db0e6ea6cd7028182 Mon Sep 17 00:00:00 2001
From: Natalie Samsonov <nsamsono@marvell.com>
Date: Thu, 15 Mar 2018 08:51:57 +0100
Subject: [PATCH] net/mrvl: fix crash when port is closed without starting

[ upstream commit b4d0fff30807adaac6722689eaa72b4460632d80 ]

Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton")

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
---
 drivers/net/mrvl/mrvl_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c
index 9a3581946..fc34c5a32 100644
--- a/drivers/net/mrvl/mrvl_ethdev.c
+++ b/drivers/net/mrvl/mrvl_ethdev.c
@@ -674,7 +674,8 @@ mrvl_dev_stop(struct rte_eth_dev *dev)
 		pp2_cls_qos_tbl_deinit(priv->qos_tbl);
 		priv->qos_tbl = NULL;
 	}
-	pp2_ppio_deinit(priv->ppio);
+	if (priv->ppio)
+		pp2_ppio_deinit(priv->ppio);
 	priv->ppio = NULL;
 }
 
-- 
2.11.0

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

* [dpdk-stable] patch 'net/mrvl: fix Rx descriptors number' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (24 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/mrvl: fix crash when port is closed without starting' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/mlx5: fix existing file removal' " Yuanhan Liu
                   ` (31 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Tomasz Duszynski; +Cc: Marcin Wojtas, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From e280c61ef69ffff1de9bb01c402852c826d94fda Mon Sep 17 00:00:00 2001
From: Tomasz Duszynski <tdu@semihalf.com>
Date: Thu, 15 Mar 2018 13:12:21 +0100
Subject: [PATCH] net/mrvl: fix Rx descriptors number

[ upstream commit c3637258d8946ed3c490c358202baaaf673526ba ]

Since filling hardware buffer pool (bpool) is Rx related
constant describing maximum number of rx descriptors
instead of maximum number of Tx descriptors should be used.

Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton")

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
---
 drivers/net/mrvl/mrvl_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c
index fc34c5a32..d7e9cefaf 100644
--- a/drivers/net/mrvl/mrvl_ethdev.c
+++ b/drivers/net/mrvl/mrvl_ethdev.c
@@ -1218,8 +1218,8 @@ mrvl_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 static int
 mrvl_fill_bpool(struct mrvl_rxq *rxq, int num)
 {
-	struct buff_release_entry entries[MRVL_PP2_TXD_MAX];
-	struct rte_mbuf *mbufs[MRVL_PP2_TXD_MAX];
+	struct buff_release_entry entries[MRVL_PP2_RXD_MAX];
+	struct rte_mbuf *mbufs[MRVL_PP2_RXD_MAX];
 	int i, ret;
 	unsigned int core_id;
 	struct pp2_hif *hif;
-- 
2.11.0

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

* [dpdk-stable] patch 'net/mlx5: fix existing file removal' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (25 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/mrvl: fix Rx descriptors number' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/bnxt: fix LRO disable' " Yuanhan Liu
                   ` (30 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Xueming Li; +Cc: Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From eefca081f86f15b13c059c45940d2258628aeaf6 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@mellanox.com>
Date: Fri, 16 Mar 2018 23:22:27 +0800
Subject: [PATCH] net/mlx5: fix existing file removal

[ upstream commit be939f60f42673eaa99609ea2c9f876e29320eff ]

There is no guarantee that the file won't be removed by external
user/application between the stat() and remove() syscalls, remove() will
fail if the file no longer exists.

Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file descriptor")

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_socket.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_socket.c b/drivers/net/mlx5/mlx5_socket.c
index 5cd1ab80f..ddfdc9a8e 100644
--- a/drivers/net/mlx5/mlx5_socket.c
+++ b/drivers/net/mlx5/mlx5_socket.c
@@ -59,7 +59,6 @@ priv_socket_init(struct priv *priv)
 	};
 	int ret;
 	int flags;
-	struct stat file_stat;
 
 	/*
 	 * Initialise the socket to communicate with the secondary
@@ -79,9 +78,7 @@ priv_socket_init(struct priv *priv)
 		goto out;
 	snprintf(sun.sun_path, sizeof(sun.sun_path), "/var/tmp/%s_%d",
 		 MLX5_DRIVER_NAME, priv->primary_socket);
-	ret = stat(sun.sun_path, &file_stat);
-	if (!ret)
-		claim_zero(remove(sun.sun_path));
+	remove(sun.sun_path);
 	ret = bind(priv->primary_socket, (const struct sockaddr *)&sun,
 		   sizeof(sun));
 	if (ret < 0) {
-- 
2.11.0

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

* [dpdk-stable] patch 'net/bnxt: fix LRO disable' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (26 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/mlx5: fix existing file removal' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc: fix mbuf data alignment calculation' " Yuanhan Liu
                   ` (29 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From e1f807f285823cf37b9410c2df6aad61dcafa55c Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Wed, 28 Feb 2018 14:12:36 -0800
Subject: [PATCH] net/bnxt: fix LRO disable

[ upstream commit e331b9626f42c7b2bcfd7d51db4d98f80090ae96 ]

When the vnic_tpa_cfg HWRM command is sent to the FW,
we are not passing the VNIC ID in case of disable.
This can cause the FW to return an error.
Correct VNIC ID needs to be passed for both enable and disable.

Fixes: 0958d8b6435d ("net/bnxt: support LRO")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index ce214d7cb..f7e437160 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1424,12 +1424,12 @@ int bnxt_hwrm_vnic_tpa_cfg(struct bnxt *bp,
 				HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO |
 				HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_ECN |
 			HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_SAME_GRE_SEQ);
-		req.vnic_id = rte_cpu_to_le_32(vnic->fw_vnic_id);
 		req.max_agg_segs = rte_cpu_to_le_16(5);
 		req.max_aggs =
 			rte_cpu_to_le_16(HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_MAX);
 		req.min_agg_len = rte_cpu_to_le_32(512);
 	}
+	req.vnic_id = rte_cpu_to_le_32(vnic->fw_vnic_id);
 
 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
 
-- 
2.11.0

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

* [dpdk-stable] patch 'net/sfc: fix mbuf data alignment calculation' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (27 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/bnxt: fix LRO disable' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'ethdev: fix queue start' " Yuanhan Liu
                   ` (28 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From d47563ee7cb413a1fe56d9ab27e7f7f0d088c498 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Mon, 19 Mar 2018 07:50:11 +0000
Subject: [PATCH] net/sfc: fix mbuf data alignment calculation

[ upstream commit bd0c7b4d76783484e1600ec34b0dae2c5d9ef57b ]

Unlike ffs() rte_bsf32() counts bit position from 0.

Fixes: 0c7a0c35f24c ("net/sfc: calculate Rx buffer size which may be used")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 7816393b7..be778d387 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -814,7 +814,7 @@ sfc_rx_mbuf_data_alignment(struct rte_mempool *mb_pool)
 
 	order = MIN(order, rte_bsf32(data_off));
 
-	return 1u << (order - 1);
+	return 1u << order;
 }
 
 static uint16_t
-- 
2.11.0

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

* [dpdk-stable] patch 'ethdev: fix queue start' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (28 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc: fix mbuf data alignment calculation' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc: fix type of opaque pointer in perf profile handler' " Yuanhan Liu
                   ` (27 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From e44d77b107e817189dd1b4dd3c54a4da00724468 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 22 Mar 2018 20:59:01 +0800
Subject: [PATCH] ethdev: fix queue start

[ upstream commit 239c9b435ad4abcac89b5d2480a0c21ce8b8288f ]

Device must be started before start any queue.

Fixes: 0748be2cf9a2 ("ethdev: queue start and stop")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_ether/rte_ethdev.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 4d23bc1c2..eea11d066 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -533,6 +533,12 @@ rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
 
 	dev = &rte_eth_devices[port_id];
+	if (!dev->data->dev_started) {
+		RTE_PMD_DEBUG_TRACE(
+		    "port %d must be started before start any queue\n", port_id);
+		return -EINVAL;
+	}
+
 	if (rx_queue_id >= dev->data->nb_rx_queues) {
 		RTE_PMD_DEBUG_TRACE("Invalid RX queue_id=%d\n", rx_queue_id);
 		return -EINVAL;
@@ -585,6 +591,12 @@ rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
 
 	dev = &rte_eth_devices[port_id];
+	if (!dev->data->dev_started) {
+		RTE_PMD_DEBUG_TRACE(
+		    "port %d must be started before start any queue\n", port_id);
+		return -EINVAL;
+	}
+
 	if (tx_queue_id >= dev->data->nb_tx_queues) {
 		RTE_PMD_DEBUG_TRACE("Invalid TX queue_id=%d\n", tx_queue_id);
 		return -EINVAL;
-- 
2.11.0

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

* [dpdk-stable] patch 'net/sfc: fix type of opaque pointer in perf profile handler' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (29 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'ethdev: fix queue start' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/i40e: fix intr callback unregister by adding retry' " Yuanhan Liu
                   ` (26 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Roman Zhukov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 4a74fd447a99736624d9236ed91cbf505b4a70c5 Mon Sep 17 00:00:00 2001
From: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Date: Sat, 24 Mar 2018 06:42:23 +0000
Subject: [PATCH] net/sfc: fix type of opaque pointer in perf profile handler

[ upstream commit 5076ad03912e49fc4fa991bcff3f5188ccbfeb9d ]

The 'opaque' pointer in handler function is the last argument
of sfc_kvargs_process() function and it is pointer to the adapter
'evq_flags' that has a uint32_t type. So 'value' must be pointer
to uint32_t.

Fixes: c22d3c508e0c ("net/sfc: support parameter to choose performance profile")

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_ev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_ev.c b/drivers/net/sfc/sfc_ev.c
index 5fbebbf1b..ba22f7ef2 100644
--- a/drivers/net/sfc/sfc_ev.c
+++ b/drivers/net/sfc/sfc_ev.c
@@ -859,7 +859,7 @@ static int
 sfc_kvarg_perf_profile_handler(__rte_unused const char *key,
 			       const char *value_str, void *opaque)
 {
-	uint64_t *value = opaque;
+	uint32_t *value = opaque;
 
 	if (strcasecmp(value_str, SFC_KVARG_PERF_PROFILE_THROUGHPUT) == 0)
 		*value = EFX_EVQ_FLAGS_TYPE_THROUGHPUT;
-- 
2.11.0

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

* [dpdk-stable] patch 'net/i40e: fix intr callback unregister by adding retry' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (30 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc: fix type of opaque pointer in perf profile handler' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/ixgbe: " Yuanhan Liu
                   ` (25 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Kirill Rybalchenko, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From ed3b62da2a97cf8edbade91d0675f4a833b156bd Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 20 Mar 2018 15:01:24 +0800
Subject: [PATCH] net/i40e: fix intr callback unregister by adding retry

[ upstream commit 0264539dce2d40d8abaed474d4b1b526ca3ed2e4 ]

The nic's interrupt source has some active callbacks, when
the port hotplug. Add a retry to give more port's a chance
to uninit before returning an error.

Fixes: d42aaf30008b ("i40e: support port hotplug")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index ef6470814..8383adefe 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1554,6 +1554,7 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev)
 	struct rte_flow *p_flow;
 	int ret;
 	uint8_t aq_fail = 0;
+	int retries = 0;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1595,9 +1596,20 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev)
 	/* disable uio intr before callback unregister */
 	rte_intr_disable(intr_handle);
 
-	/* register callback func to eal lib */
-	rte_intr_callback_unregister(intr_handle,
-				     i40e_dev_interrupt_handler, dev);
+	/* unregister callback func to eal lib */
+	do {
+		ret = rte_intr_callback_unregister(intr_handle,
+				i40e_dev_interrupt_handler, dev);
+		if (ret >= 0) {
+			break;
+		} else if (ret != -EAGAIN) {
+			PMD_INIT_LOG(ERR,
+				 "intr callback unregister failed: %d",
+				 ret);
+			return ret;
+		}
+		i40e_msec_delay(500);
+	} while (retries++ < 5);
 
 	i40e_rm_ethtype_filter_list(pf);
 	i40e_rm_tunnel_filter_list(pf);
-- 
2.11.0

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

* [dpdk-stable] patch 'net/ixgbe: fix intr callback unregister by adding retry' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (31 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/i40e: fix intr callback unregister by adding retry' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'ethdev: fix port accessing after release' " Yuanhan Liu
                   ` (24 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 8ef7b99624efb1823c90f6d942abe281b4351d9d Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 21 Mar 2018 20:28:10 +0800
Subject: [PATCH] net/ixgbe: fix intr callback unregister by adding retry

[ upstream commit 91fbf1791cd7d69012010ab159d0b5c7dee81f79 ]

The nic's interrupt source has some active callbacks, when
the port hotplug. Add a retry to give more port's a chance
to uninit before returning an error.

Fixes: 2866c5f1b87e ("ixgbe: support port hotplug")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index f2198660f..830add2e2 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1366,6 +1366,8 @@ eth_ixgbe_dev_uninit(struct rte_eth_dev *eth_dev)
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
 	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
 	struct ixgbe_hw *hw;
+	int retries = 0;
+	int ret;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1386,8 +1388,20 @@ eth_ixgbe_dev_uninit(struct rte_eth_dev *eth_dev)
 
 	/* disable uio intr before callback unregister */
 	rte_intr_disable(intr_handle);
-	rte_intr_callback_unregister(intr_handle,
-				     ixgbe_dev_interrupt_handler, eth_dev);
+
+	do {
+		ret = rte_intr_callback_unregister(intr_handle,
+				ixgbe_dev_interrupt_handler, eth_dev);
+		if (ret >= 0) {
+			break;
+		} else if (ret != -EAGAIN) {
+			PMD_INIT_LOG(ERR,
+				"intr callback unregister failed: %d",
+				ret);
+			return ret;
+		}
+		rte_delay_ms(100);
+	} while (retries++ < (10 + IXGBE_LINK_UP_TIME));
 
 	/* uninitialize PF if max_vfs not zero */
 	ixgbe_pf_host_uninit(eth_dev);
-- 
2.11.0

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

* [dpdk-stable] patch 'ethdev: fix port accessing after release' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (32 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/ixgbe: " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: avoid concurrency when logging dirty pages' " Yuanhan Liu
                   ` (23 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Matan Azrad; +Cc: Ferruh Yigit, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From e59f537227090d28bf2b3563f2d794070642c305 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Wed, 28 Mar 2018 12:10:30 +0000
Subject: [PATCH] ethdev: fix port accessing after release

[ upstream commit f0e1180cb6a99825587ce4c108c4366023ac1f63 ]

rte_eth_dev_pci_release() function wrongly releases an ethdev port and
then releases internal fields of this port.
This behavior is problematic, because after the release, the port may
be reallocated again by another thread or just be invalid for any
usage.

Move the release operation to the end of the function.

Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers")

Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_ether/rte_ethdev_pci.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_ether/rte_ethdev_pci.h b/lib/librte_ether/rte_ethdev_pci.h
index ad64a169c..f69316d53 100644
--- a/lib/librte_ether/rte_ethdev_pci.h
+++ b/lib/librte_ether/rte_ethdev_pci.h
@@ -123,9 +123,6 @@ rte_eth_dev_pci_allocate(struct rte_pci_device *dev, size_t private_data_size)
 static inline void
 rte_eth_dev_pci_release(struct rte_eth_dev *eth_dev)
 {
-	/* free ether device */
-	rte_eth_dev_release_port(eth_dev);
-
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
 		rte_free(eth_dev->data->dev_private);
 
@@ -139,6 +136,9 @@ rte_eth_dev_pci_release(struct rte_eth_dev *eth_dev)
 
 	eth_dev->device = NULL;
 	eth_dev->intr_handle = NULL;
+
+	/* free ether device */
+	rte_eth_dev_release_port(eth_dev);
 }
 
 typedef int (*eth_dev_pci_callback_t)(struct rte_eth_dev *eth_dev);
-- 
2.11.0

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

* [dpdk-stable] patch 'vhost: avoid concurrency when logging dirty pages' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (33 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'ethdev: fix port accessing after release' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-23  9:03   ` Maxime Coquelin
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/vhost: fix crash when creating vdev dynamically' " Yuanhan Liu
                   ` (22 subsequent siblings)
  57 siblings, 1 reply; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Jianfeng Tan, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From acdf634b3533a5ccb1528ee546ac9dcfb57b8a36 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 21 Mar 2018 16:44:13 +0100
Subject: [PATCH] vhost: avoid concurrency when logging dirty pages

[ upstream commit 394313fff39d0f994325c47f7eab39daf5dc9e11 ]

This patch aims at fixing a migration performance regression
faced since atomic operation is used to log pages as dirty when
doing live migration.

Instead of setting a single bit by doing an atomic read-modify-write
operation to log a page as dirty, this patch write 0xFF to the
corresponding byte, and so logs 8 page as dirty.

The advantage is that it avoids concurrent atomic operations by
multiple PMD threads, the drawback is that some clean pages are
marked as dirty and so are transferred twice.

Fixes: 897f13a1f726 ("vhost: make page logging atomic")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 lib/librte_vhost/vhost.h | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index c8f2a8176..5c488fa57 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -261,18 +261,14 @@ struct virtio_net {
 #define VHOST_LOG_PAGE	4096
 
 /*
- * Atomically set a bit in memory.
+ * Mark all pages belonging to the same dirty log bitmap byte
+ * as dirty. The goal is to avoid concurrency between different
+ * threads doing atomic read-modify-writes on the same byte.
  */
 static __rte_always_inline void
-vhost_set_bit(unsigned int nr, volatile uint8_t *addr)
-{
-	__sync_fetch_and_or_8(addr, (1U << nr));
-}
-
-static __rte_always_inline void
 vhost_log_page(uint8_t *log_base, uint64_t page)
 {
-	vhost_set_bit(page % 8, &log_base[page / 8]);
+	log_base[page / 8] = 0xff;
 }
 
 static __rte_always_inline void
-- 
2.11.0

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

* [dpdk-stable] patch 'net/vhost: fix crash when creating vdev dynamically' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (34 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: avoid concurrency when logging dirty pages' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'bus/fslmc: fix find device start condition' " Yuanhan Liu
                   ` (21 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Junjie Chen; +Cc: Zhiyong Yang, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From f225e0f0b08de54ed5dd1fab6e4e410dd72a771f Mon Sep 17 00:00:00 2001
From: Junjie Chen <junjie.j.chen@intel.com>
Date: Fri, 30 Mar 2018 14:58:31 +0800
Subject: [PATCH] net/vhost: fix crash when creating vdev dynamically

[ upstream commit 30a701a53737a0b6f7953412cc3b3d36c1d49122 ]

When creating vdev dynamically, vhost pmd driver starts directly without
checking TX/RX queues are ready or not, and thus causes segmentation fault
when vhost library accesses queues. This patch adds a flag to check whether
queues are setup or not, and adds queues setup into dev_start function to
allow user to start them after setting up.

Fixes: aed0b12930b3 ("net/vhost: fix socket file deleted on stop")

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Tested-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 69 ++++++++++++++++++++++++++-------------
 1 file changed, 46 insertions(+), 23 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 2536ee4a2..2299ce877 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -117,6 +117,7 @@ struct pmd_internal {
 	char *dev_name;
 	char *iface_name;
 	uint16_t max_queues;
+	uint16_t vid;
 	rte_atomic32_t started;
 };
 
@@ -527,8 +528,10 @@ update_queuing_status(struct rte_eth_dev *dev)
 	unsigned int i;
 	int allow_queuing = 1;
 
-	if (rte_atomic32_read(&internal->started) == 0 ||
-	    rte_atomic32_read(&internal->dev_attached) == 0)
+	if (rte_atomic32_read(&internal->dev_attached) == 0)
+		return;
+
+	if (rte_atomic32_read(&internal->started) == 0)
 		allow_queuing = 0;
 
 	/* Wait until rx/tx_pkt_burst stops accessing vhost device */
@@ -551,13 +554,36 @@ update_queuing_status(struct rte_eth_dev *dev)
 	}
 }
 
+static void
+queue_setup(struct rte_eth_dev *eth_dev, struct pmd_internal *internal)
+{
+	struct vhost_queue *vq;
+	int i;
+
+	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
+		vq = eth_dev->data->rx_queues[i];
+		if (!vq)
+			continue;
+		vq->vid = internal->vid;
+		vq->internal = internal;
+		vq->port = eth_dev->data->port_id;
+	}
+	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
+		vq = eth_dev->data->tx_queues[i];
+		if (!vq)
+			continue;
+		vq->vid = internal->vid;
+		vq->internal = internal;
+		vq->port = eth_dev->data->port_id;
+	}
+}
+
 static int
 new_device(int vid)
 {
 	struct rte_eth_dev *eth_dev;
 	struct internal_list *list;
 	struct pmd_internal *internal;
-	struct vhost_queue *vq;
 	unsigned i;
 	char ifname[PATH_MAX];
 #ifdef RTE_LIBRTE_VHOST_NUMA
@@ -580,21 +606,13 @@ new_device(int vid)
 		eth_dev->data->numa_node = newnode;
 #endif
 
-	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
-		vq = eth_dev->data->rx_queues[i];
-		if (vq == NULL)
-			continue;
-		vq->vid = vid;
-		vq->internal = internal;
-		vq->port = eth_dev->data->port_id;
-	}
-	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
-		vq = eth_dev->data->tx_queues[i];
-		if (vq == NULL)
-			continue;
-		vq->vid = vid;
-		vq->internal = internal;
-		vq->port = eth_dev->data->port_id;
+	internal->vid = vid;
+	if (eth_dev->data->rx_queues && eth_dev->data->tx_queues) {
+		queue_setup(eth_dev, internal);
+		rte_atomic32_set(&internal->dev_attached, 1);
+	} else {
+		RTE_LOG(INFO, PMD, "RX/TX queues have not setup yet\n");
+		rte_atomic32_set(&internal->dev_attached, 0);
 	}
 
 	for (i = 0; i < rte_vhost_get_vring_num(vid); i++)
@@ -604,7 +622,6 @@ new_device(int vid)
 
 	eth_dev->data->dev_link.link_status = ETH_LINK_UP;
 
-	rte_atomic32_set(&internal->dev_attached, 1);
 	update_queuing_status(eth_dev);
 
 	RTE_LOG(INFO, PMD, "New connection established\n");
@@ -635,8 +652,9 @@ destroy_device(int vid)
 	eth_dev = list->eth_dev;
 	internal = eth_dev->data->dev_private;
 
-	rte_atomic32_set(&internal->dev_attached, 0);
+	rte_atomic32_set(&internal->started, 0);
 	update_queuing_status(eth_dev);
+	rte_atomic32_set(&internal->dev_attached, 0);
 
 	eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
 
@@ -773,12 +791,17 @@ rte_eth_vhost_get_vid_from_port_id(uint16_t port_id)
 }
 
 static int
-eth_dev_start(struct rte_eth_dev *dev)
+eth_dev_start(struct rte_eth_dev *eth_dev)
 {
-	struct pmd_internal *internal = dev->data->dev_private;
+	struct pmd_internal *internal = eth_dev->data->dev_private;
+
+	if (unlikely(rte_atomic32_read(&internal->dev_attached) == 0)) {
+		queue_setup(eth_dev, internal);
+		rte_atomic32_set(&internal->dev_attached, 1);
+	}
 
 	rte_atomic32_set(&internal->started, 1);
-	update_queuing_status(dev);
+	update_queuing_status(eth_dev);
 
 	return 0;
 }
-- 
2.11.0

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

* [dpdk-stable] patch 'bus/fslmc: fix find device start condition' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (35 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/vhost: fix crash when creating vdev dynamically' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'hash: fix missing spinlock unlock in add key' " Yuanhan Liu
                   ` (20 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: Shreyansh Jain, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From a213371548bc6bec83afb0a1a18d8402527657a6 Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <gaetan.rivet@6wind.com>
Date: Thu, 22 Mar 2018 11:28:44 +0100
Subject: [PATCH] bus/fslmc: fix find device start condition

[ upstream commit 78f5a2e93d746110d1da1a81a62cf6149c52e6ef ]

If start is set and a device before it matches the data,
this device is returned.

Fixes: c7fe1eea8a74 ("bus: simplify finding starting point")

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/bus/fslmc/fslmc_bus.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 480857e57..001e56ca1 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -310,8 +310,9 @@ rte_fslmc_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
 	struct rte_dpaa2_device *dev;
 
 	TAILQ_FOREACH(dev, &rte_fslmc_bus.device_list, next) {
-		if (start && &dev->device == start) {
-			start = NULL;  /* starting point found */
+		if (start != NULL) {
+			if (&dev->device == start)
+				start = NULL;  /* starting point found */
 			continue;
 		}
 
-- 
2.11.0

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

* [dpdk-stable] patch 'hash: fix missing spinlock unlock in add key' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (36 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'bus/fslmc: fix find device start condition' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'app/crypto-perf: fix IOVA translation' " Yuanhan Liu
                   ` (19 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From a139332392d40cd0c66e9def6f12130a891d33fe Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Sun, 4 Mar 2018 20:28:31 +0530
Subject: [PATCH] hash: fix missing spinlock unlock in add key

[ upstream commit e166e55c1a472d6bbc388c66f41be5823c63f8b7 ]

Fix missing spinlock unlock during add key when key is already present.

Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_hash/rte_cuckoo_hash.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index 55fd7bdcc..cbf78fab2 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -573,7 +573,8 @@ __rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key,
 				 * Return index where key is stored,
 				 * subtracting the first dummy index
 				 */
-				return prim_bkt->key_idx[i] - 1;
+				ret = prim_bkt->key_idx[i] - 1;
+				goto failure;
 			}
 		}
 	}
@@ -593,7 +594,8 @@ __rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key,
 				 * Return index where key is stored,
 				 * subtracting the first dummy index
 				 */
-				return sec_bkt->key_idx[i] - 1;
+				ret = sec_bkt->key_idx[i] - 1;
+				goto failure;
 			}
 		}
 	}
-- 
2.11.0

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

* [dpdk-stable] patch 'app/crypto-perf: fix IOVA translation' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (37 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'hash: fix missing spinlock unlock in add key' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'mem: do not use physical addresses in IOVA as VA mode' " Yuanhan Liu
                   ` (18 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Pablo de Lara, Santosh Shukla, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 620a1e67570485ad42836703108fd263cfa1c48d Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Wed, 4 Apr 2018 15:40:44 +0100
Subject: [PATCH] app/crypto-perf: fix IOVA translation

[ upstream commit 72b75134b89667baf4aaf4fcb516ab6bc2b1ebd7 ]

IOVA addresses should be found by calling rte_virt2iova() as
opposed to rte_virt2phy(), as physical address may not be
equal to IOVA address.

Fixes: 2eb6a1a3e5fc ("app/crypto-perf: fix crypto op init")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
 app/test-crypto-perf/cperf_test_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 328744ef8..9b08b3f74 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -119,7 +119,7 @@ mempool_obj_init(struct rte_mempool *mp,
 	op->type = RTE_CRYPTO_OP_TYPE_SYMMETRIC;
 	op->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
 	op->sess_type = RTE_CRYPTO_OP_WITH_SESSION;
-	op->phys_addr = rte_mem_virt2phy(obj);
+	op->phys_addr = rte_mem_virt2iova(obj);
 	op->mempool = mp;
 
 	/* Set source buffer */
-- 
2.11.0

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

* [dpdk-stable] patch 'mem: do not use physical addresses in IOVA as VA mode' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (38 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'app/crypto-perf: fix IOVA translation' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'vfio: do not needlessly check for IOVA " Yuanhan Liu
                   ` (17 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Santosh Shukla, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 8888d6f0905cac90bd2335d799778a6d12472055 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Wed, 4 Apr 2018 15:40:45 +0100
Subject: [PATCH] mem: do not use physical addresses in IOVA as VA mode

[ upstream commit 048303b6f3fdfb5ce863e293f6b3dfabc0a0a2db ]

We already use VA addresses for IOVA purposes everywhere if we're in
RTE_IOVA_VA mode:
 1) rte_malloc_virt2phy()/rte_malloc_virt2iova() always return VA addresses
 2) Because of 1), memzone's IOVA is set to VA address on reserve
 3) Because of 2), mempool's IOVA addresses are set to VA addresses

The only place where actual physical addresses are stored is in memsegs at
init time, but we're not using them anywhere, and there is no external API
to get those addresses (aside from manually iterating through memsegs), nor
should anyone care about them in RTE_IOVA_VA mode.

So, fix EAL initialization to allocate VA-contiguous segments at the start
without regard for physical addresses (as if they weren't available), and
use VA to set final IOVA addresses for all pages.

Fixes: 62196f4e0941 ("mem: rename address mapping function to IOVA")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
 lib/librte_eal/linuxapp/eal/eal_memory.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index 16a181c36..17c20d4b3 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -491,6 +491,9 @@ map_all_hugepages(struct hugepage_file *hugepg_tbl, struct hugepage_info *hpi,
 			hugepg_tbl[i].orig_va = virtaddr;
 		}
 		else {
+			/* rewrite physical addresses in IOVA as VA mode */
+			if (rte_eal_iova_mode() == RTE_IOVA_VA)
+				hugepg_tbl[i].physaddr = (uintptr_t)virtaddr;
 			hugepg_tbl[i].final_va = virtaddr;
 		}
 
@@ -1109,7 +1112,8 @@ rte_eal_hugepage_init(void)
 				continue;
 		}
 
-		if (phys_addrs_available) {
+		if (phys_addrs_available &&
+				rte_eal_iova_mode() != RTE_IOVA_VA) {
 			/* find physical addresses for each hugepage */
 			if (find_physaddrs(&tmp_hp[hp_offset], hpi) < 0) {
 				RTE_LOG(DEBUG, EAL, "Failed to find phys addr "
-- 
2.11.0

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

* [dpdk-stable] patch 'vfio: do not needlessly check for IOVA mode' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (39 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'mem: do not use physical addresses in IOVA as VA mode' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/dpaa: fix oob access' " Yuanhan Liu
                   ` (16 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Santosh Shukla, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 9b5e52ab4bed30d8fa461fd17b92fe4497c0c4dd Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Wed, 4 Apr 2018 15:40:47 +0100
Subject: [PATCH] vfio: do not needlessly check for IOVA mode

[ upstream commit bef5a2d629d536a82c81c02b84684da828c0e37f ]

We already set IOVA addresses of memsegs and memzones to VA
address during initialization, so we don't need to check
whether we're in RTE_IOVA_VA mode anywhere else.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
 lib/librte_eal/linuxapp/eal/eal_vfio.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index fb1a62261..a75ef5a10 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -710,10 +710,7 @@ vfio_type1_dma_map(int vfio_container_fd)
 		dma_map.argsz = sizeof(struct vfio_iommu_type1_dma_map);
 		dma_map.vaddr = ms[i].addr_64;
 		dma_map.size = ms[i].len;
-		if (rte_eal_iova_mode() == RTE_IOVA_VA)
-			dma_map.iova = dma_map.vaddr;
-		else
-			dma_map.iova = ms[i].iova;
+		dma_map.iova = ms[i].iova;
 		dma_map.flags = VFIO_DMA_MAP_FLAG_READ | VFIO_DMA_MAP_FLAG_WRITE;
 
 		ret = ioctl(vfio_container_fd, VFIO_IOMMU_MAP_DMA, &dma_map);
@@ -813,10 +810,7 @@ vfio_spapr_dma_map(int vfio_container_fd)
 		dma_map.argsz = sizeof(struct vfio_iommu_type1_dma_map);
 		dma_map.vaddr = ms[i].addr_64;
 		dma_map.size = ms[i].len;
-		if (rte_eal_iova_mode() == RTE_IOVA_VA)
-			dma_map.iova = dma_map.vaddr;
-		else
-			dma_map.iova = ms[i].iova;
+		dma_map.iova = ms[i].iova;
 		dma_map.flags = VFIO_DMA_MAP_FLAG_READ |
 				 VFIO_DMA_MAP_FLAG_WRITE;
 
-- 
2.11.0

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

* [dpdk-stable] patch 'net/dpaa: fix oob access' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (40 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'vfio: do not needlessly check for IOVA " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'bus/dpaa: fix resource leak' " Yuanhan Liu
                   ` (15 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Shreyansh Jain, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 1917ba488cf3bc66ab1008bbe721ac2cf12a8aa3 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Mon, 9 Apr 2018 15:52:47 +0530
Subject: [PATCH] net/dpaa: fix oob access

[ upstream commit 5c3fc73e820ac0365ae1c1da5546572ac80e64cf ]

Coverity issue: 268318
Fixes: b21ed3e2a16d ("net/dpaa: support extended statistics")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index e4375c373..02056bc66 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -324,10 +324,13 @@ dpaa_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 static int
 dpaa_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 		      struct rte_eth_xstat_name *xstats_names,
-		      __rte_unused unsigned int limit)
+		      unsigned int limit)
 {
 	unsigned int i, stat_cnt = RTE_DIM(dpaa_xstats_strings);
 
+	if (limit < stat_cnt)
+		return stat_cnt;
+
 	if (xstats_names != NULL)
 		for (i = 0; i < stat_cnt; i++)
 			snprintf(xstats_names[i].name,
@@ -355,7 +358,7 @@ dpaa_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
 			return 0;
 
 		fman_if_stats_get_all(dpaa_intf->fif, values_copy,
-				      sizeof(struct dpaa_if_stats));
+				      sizeof(struct dpaa_if_stats) / 8);
 
 		for (i = 0; i < stat_cnt; i++)
 			values[i] =
-- 
2.11.0

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

* [dpdk-stable] patch 'bus/dpaa: fix resource leak' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (41 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/dpaa: fix oob access' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/dpaa2: fix xstats' " Yuanhan Liu
                   ` (14 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Shreyansh Jain, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 707181de882820ccd27e8b62b74d965a82c28beb Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Mon, 9 Apr 2018 15:52:48 +0530
Subject: [PATCH] bus/dpaa: fix resource leak

[ upstream commit 35bb5234defc3d1629e1f24db0ade342b0157e70 ]

Coverity issue: 268337
Fixes: 1459585888b5 ("bus/dpaa: fix memory allocation during scan")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/bus/dpaa/base/fman/fman.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c
index 3816dba5c..a9c88ddcb 100644
--- a/drivers/bus/dpaa/base/fman/fman.c
+++ b/drivers/bus/dpaa/base/fman/fman.c
@@ -475,6 +475,7 @@ fman_if_init(const struct device_node *dpa_node)
 		if (!pool_node) {
 			FMAN_ERR(-ENXIO, "%s: bad fsl,bman-buffer-pools\n",
 				 dname);
+			free(bpool);
 			goto err;
 		}
 		pname = pool_node->full_name;
@@ -482,6 +483,7 @@ fman_if_init(const struct device_node *dpa_node)
 		prop = of_get_property(pool_node, "fsl,bpid", &proplen);
 		if (!prop) {
 			FMAN_ERR(-EINVAL, "%s: no fsl,bpid\n", pname);
+			free(bpool);
 			goto err;
 		}
 		assert(proplen == sizeof(*prop));
-- 
2.11.0

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

* [dpdk-stable] patch 'net/dpaa2: fix xstats' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (42 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'bus/dpaa: fix resource leak' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'ip_frag: fix double free of chained mbufs' " Yuanhan Liu
                   ` (13 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 2470d2d0dba2d91c6547a1e88e7b22b4a2a0749d Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Mon, 9 Apr 2018 15:52:50 +0530
Subject: [PATCH] net/dpaa2: fix xstats

[ upstream commit 876b2c902ea0480f3bd0f4f9361e8e0ad9745ff3 ]

Fixes: 1d6329b2fc1f ("net/dpaa2: support extra stats")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 202f84f0a..0711baf10 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -1144,12 +1144,12 @@ dpaa2_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	union dpni_statistics value[3] = {};
 	unsigned int i = 0, num = RTE_DIM(dpaa2_xstats_strings);
 
-	if (xstats == NULL)
-		return 0;
-
 	if (n < num)
 		return num;
 
+	if (xstats == NULL)
+		return 0;
+
 	/* Get Counters from page_0*/
 	retcode = dpni_get_statistics(dpni, CMD_PRI_LOW, priv->token,
 				      0, 0, &value[0]);
@@ -1182,10 +1182,13 @@ err:
 static int
 dpaa2_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 		       struct rte_eth_xstat_name *xstats_names,
-		       __rte_unused unsigned int limit)
+		       unsigned int limit)
 {
 	unsigned int i, stat_cnt = RTE_DIM(dpaa2_xstats_strings);
 
+	if (limit < stat_cnt)
+		return stat_cnt;
+
 	if (xstats_names != NULL)
 		for (i = 0; i < stat_cnt; i++)
 			snprintf(xstats_names[i].name,
-- 
2.11.0

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

* [dpdk-stable] patch 'ip_frag: fix double free of chained mbufs' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (43 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/dpaa2: fix xstats' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/octeontx: fix uninitialized speed variable' " Yuanhan Liu
                   ` (12 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Allain Legacy; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 9e228df9965720c90194ee3dc75110b1119eb127 Mon Sep 17 00:00:00 2001
From: Allain Legacy <allain.legacy@windriver.com>
Date: Mon, 19 Mar 2018 09:25:23 -0500
Subject: [PATCH] ip_frag: fix double free of chained mbufs

[ upstream commit 4f512a1919998933a39886ab2ec7f2fdde48756c ]

The first mbuf and the last mbuf to be visited in the preceding loop
are not set to NULL in the fragmentation table.  This creates the
possibility of a double free when the fragmentation table is later freed
with rte_ip_frag_table_destroy().

Fixes: 95908f52393d ("ip_frag: free mbufs on reassembly table destroy")

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_ip_frag/rte_ipv4_reassembly.c | 2 ++
 lib/librte_ip_frag/rte_ipv6_reassembly.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/lib/librte_ip_frag/rte_ipv4_reassembly.c b/lib/librte_ip_frag/rte_ipv4_reassembly.c
index 040bd70a2..3b84dcadb 100644
--- a/lib/librte_ip_frag/rte_ipv4_reassembly.c
+++ b/lib/librte_ip_frag/rte_ipv4_reassembly.c
@@ -88,7 +88,9 @@ ipv4_frag_reassemble(struct ip_frag_pkt *fp)
 	/* chain with the first fragment. */
 	rte_pktmbuf_adj(m, (uint16_t)(m->l2_len + m->l3_len));
 	rte_pktmbuf_chain(fp->frags[IP_FIRST_FRAG_IDX].mb, m);
+	fp->frags[curr_idx].mb = NULL;
 	m = fp->frags[IP_FIRST_FRAG_IDX].mb;
+	fp->frags[IP_FIRST_FRAG_IDX].mb = NULL;
 
 	/* update mbuf fields for reassembled packet. */
 	m->ol_flags |= PKT_TX_IP_CKSUM;
diff --git a/lib/librte_ip_frag/rte_ipv6_reassembly.c b/lib/librte_ip_frag/rte_ipv6_reassembly.c
index dde58cb78..26b9a8831 100644
--- a/lib/librte_ip_frag/rte_ipv6_reassembly.c
+++ b/lib/librte_ip_frag/rte_ipv6_reassembly.c
@@ -111,7 +111,9 @@ ipv6_frag_reassemble(struct ip_frag_pkt *fp)
 	/* chain with the first fragment. */
 	rte_pktmbuf_adj(m, (uint16_t)(m->l2_len + m->l3_len));
 	rte_pktmbuf_chain(fp->frags[IP_FIRST_FRAG_IDX].mb, m);
+	fp->frags[curr_idx].mb = NULL;
 	m = fp->frags[IP_FIRST_FRAG_IDX].mb;
+	fp->frags[IP_FIRST_FRAG_IDX].mb = NULL;
 
 	/* update mbuf fields for reassembled packet. */
 	m->ol_flags |= PKT_TX_IP_CKSUM;
-- 
2.11.0

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

* [dpdk-stable] patch 'net/octeontx: fix uninitialized speed variable' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (44 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'ip_frag: fix double free of chained mbufs' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: fix setting VLAN ID on slave ports' " Yuanhan Liu
                   ` (11 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 951d4d74a16a677dd2b5d65c2dc295b9ea8062cd Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 5 Apr 2018 08:12:28 -0700
Subject: [PATCH] net/octeontx: fix uninitialized speed variable

[ upstream commit 3a4b87c897d6e746ce53bcbe70a35e44654c7434 ]

This is fix for Coverity Defect 268319 about uninitialized speed
in an error case. Also drop unnecessary assignment.

Coverity issue: 268319
Fixes: 4fac7c0a147e ("net/octeontx: add link update")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index ec03e4c8a..33c6e78e6 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -537,7 +537,6 @@ octeontx_dev_link_update(struct rte_eth_dev *dev,
 	struct rte_eth_link link;
 	int res;
 
-	res = 0;
 	PMD_INIT_FUNC_TRACE();
 
 	res = octeontx_port_link_status(nic);
@@ -571,6 +570,7 @@ octeontx_dev_link_update(struct rte_eth_dev *dev,
 	case OCTEONTX_LINK_SPEED_RESERVE1:
 	case OCTEONTX_LINK_SPEED_RESERVE2:
 	default:
+		link.link_speed = ETH_SPEED_NUM_NONE;
 		octeontx_log_err("incorrect link speed %d", nic->speed);
 		break;
 	}
-- 
2.11.0

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

* [dpdk-stable] patch 'net/bonding: fix setting VLAN ID on slave ports' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (45 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/octeontx: fix uninitialized speed variable' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: clear started state if start fails' " Yuanhan Liu
                   ` (10 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Chas Williams; +Cc: Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 824d1367ee29c2b0a9376e2c8f652610b1316866 Mon Sep 17 00:00:00 2001
From: Chas Williams <chas3@att.com>
Date: Tue, 3 Apr 2018 12:01:22 -0400
Subject: [PATCH] net/bonding: fix setting VLAN ID on slave ports

[ upstream commit 3639903f488976e61752103bed546d5b87147ad0 ]

The pos returned is just the offset of the slab.  You need to use this
to offset the bits in the slab.

Fixes: c771e4ef38 ("net/bonding: enable slave VLAN filter")

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
 drivers/net/bonding/rte_eth_bond_api.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index b83403566..8fd90ae9f 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -240,9 +240,12 @@ slave_vlan_filter_set(uint16_t bonded_port_id, uint16_t slave_port_id)
 		for (i = 0, mask = 1;
 		     i < RTE_BITMAP_SLAB_BIT_SIZE;
 		     i ++, mask <<= 1) {
-			if (unlikely(slab & mask))
+			if (unlikely(slab & mask)) {
+				uint16_t vlan_id = pos + i;
+
 				res = rte_eth_dev_vlan_filter(slave_port_id,
-							      (uint16_t)pos, 1);
+							      vlan_id, 1);
+			}
 		}
 		found = rte_bitmap_scan(internals->vlan_filter_bmp,
 					&pos, &slab);
-- 
2.11.0

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

* [dpdk-stable] patch 'net/bonding: clear started state if start fails' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (46 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: fix setting VLAN ID on slave ports' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/szedata2: fix total stats' " Yuanhan Liu
                   ` (9 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Chas Williams; +Cc: Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From ee1fb8fc8271d2be09495c7cbf671dfd519dd1c8 Mon Sep 17 00:00:00 2001
From: Chas Williams <chas3@att.com>
Date: Fri, 23 Mar 2018 13:05:32 -0400
Subject: [PATCH] net/bonding: clear started state if start fails

[ upstream commit 85d3c09a0f40740ca64556522fed1b3bb5aa6167 ]

There are several error paths where the bonding device may not start.
Clear dev_started before we return if we take one of these paths.

Fixes: 2efb58cbab6e ("bond: new link bonding library")

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 1d3fbebab..08444d9fc 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1912,7 +1912,7 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev)
 
 	if (internals->slave_count == 0) {
 		RTE_BOND_LOG(ERR, "Cannot start port since there are no slave devices");
-		return -1;
+		goto out_err;
 	}
 
 	if (internals->user_defined_mac == 0) {
@@ -1923,18 +1923,18 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev)
 				new_mac_addr = &internals->slaves[i].persisted_mac_addr;
 
 		if (new_mac_addr == NULL)
-			return -1;
+			goto out_err;
 
 		if (mac_address_set(eth_dev, new_mac_addr) != 0) {
 			RTE_BOND_LOG(ERR, "bonded port (%d) failed to update MAC address",
 					eth_dev->data->port_id);
-			return -1;
+			goto out_err;
 		}
 	}
 
 	/* Update all slave devices MACs*/
 	if (mac_address_slaves_update(eth_dev) != 0)
-		return -1;
+		goto out_err;
 
 	/* If bonded device is configure in promiscuous mode then re-apply config */
 	if (internals->promiscuous_en)
@@ -1959,7 +1959,7 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev)
 				"bonded port (%d) failed to reconfigure slave device (%d)",
 				eth_dev->data->port_id,
 				internals->slaves[i].port_id);
-			return -1;
+			goto out_err;
 		}
 		/* We will need to poll for link status if any slave doesn't
 		 * support interrupts
@@ -1967,6 +1967,7 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev)
 		if (internals->slaves[i].link_status_poll_enabled)
 			internals->link_status_polling_enabled = 1;
 	}
+
 	/* start polling if needed */
 	if (internals->link_status_polling_enabled) {
 		rte_eal_alarm_set(
@@ -1986,6 +1987,10 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev)
 		bond_tlb_enable(internals);
 
 	return 0;
+
+out_err:
+	eth_dev->data->dev_started = 0;
+	return -1;
 }
 
 static void
-- 
2.11.0

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

* [dpdk-stable] patch 'net/szedata2: fix total stats' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (47 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: clear started state if start fails' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/szedata2: fix format string for PCI address' " Yuanhan Liu
                   ` (8 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Matej Vido; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From c0ba6842c991f2cb7f73383f6aa6c88c46fa9193 Mon Sep 17 00:00:00 2001
From: Matej Vido <vido@cesnet.cz>
Date: Wed, 4 Apr 2018 15:42:18 +0200
Subject: [PATCH] net/szedata2: fix total stats

[ upstream commit 745f6a1e7e37d80920d38be4fffbb442a09ab7cf ]

Counters from all queues have to be summed up for total stats
even though the number of queue stats counters is not sufficient.

Fixes: 83556fd2c0fc ("szedata2: change to physical device type")

Signed-off-by: Matej Vido <vido@cesnet.cz>
---
 drivers/net/szedata2/rte_eth_szedata2.c | 33 ++++++++++++++++++++-------------
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 45aebed33..81ff73f52 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1054,22 +1054,29 @@ eth_stats_get(struct rte_eth_dev *dev,
 	uint64_t tx_err_total = 0;
 	uint64_t rx_total_bytes = 0;
 	uint64_t tx_total_bytes = 0;
-	const struct pmd_internals *internals = dev->data->dev_private;
 
-	for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS && i < nb_rx; i++) {
-		stats->q_ipackets[i] = internals->rx_queue[i].rx_pkts;
-		stats->q_ibytes[i] = internals->rx_queue[i].rx_bytes;
-		rx_total += stats->q_ipackets[i];
-		rx_total_bytes += stats->q_ibytes[i];
+	for (i = 0; i < nb_rx; i++) {
+		struct szedata2_rx_queue *rxq = dev->data->rx_queues[i];
+
+		if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
+			stats->q_ipackets[i] = rxq->rx_pkts;
+			stats->q_ibytes[i] = rxq->rx_bytes;
+		}
+		rx_total += rxq->rx_pkts;
+		rx_total_bytes += rxq->rx_bytes;
 	}
 
-	for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS && i < nb_tx; i++) {
-		stats->q_opackets[i] = internals->tx_queue[i].tx_pkts;
-		stats->q_obytes[i] = internals->tx_queue[i].tx_bytes;
-		stats->q_errors[i] = internals->tx_queue[i].err_pkts;
-		tx_total += stats->q_opackets[i];
-		tx_total_bytes += stats->q_obytes[i];
-		tx_err_total += stats->q_errors[i];
+	for (i = 0; i < nb_tx; i++) {
+		struct szedata2_tx_queue *txq = dev->data->tx_queues[i];
+
+		if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
+			stats->q_opackets[i] = txq->tx_pkts;
+			stats->q_obytes[i] = txq->tx_bytes;
+			stats->q_errors[i] = txq->err_pkts;
+		}
+		tx_total += txq->tx_pkts;
+		tx_total_bytes += txq->tx_bytes;
+		tx_err_total += txq->err_pkts;
 	}
 
 	stats->ipackets = rx_total;
-- 
2.11.0

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

* [dpdk-stable] patch 'net/szedata2: fix format string for PCI address' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (48 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/szedata2: fix total stats' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/enic: fix crash on MTU update with non-setup queues' " Yuanhan Liu
                   ` (7 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Matej Vido; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From e0c8ca1c5a44fdec3ed075f3f826f3312dae71a1 Mon Sep 17 00:00:00 2001
From: Matej Vido <vido@cesnet.cz>
Date: Wed, 4 Apr 2018 15:42:21 +0200
Subject: [PATCH] net/szedata2: fix format string for PCI address

[ upstream commit ddbbe324db8fa340e01a389844dc703e8cb30072 ]

For fscanf() function SCN macros should be used but PRI macros were
wrongly used.
Also use correct sizes of variables for read values.

Fixes: 83556fd2c0fc ("szedata2: change to physical device type")

Signed-off-by: Matej Vido <vido@cesnet.cz>
---
 drivers/net/szedata2/rte_eth_szedata2.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 81ff73f52..88f5fb8a7 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1424,9 +1424,9 @@ get_szedata2_index(const struct rte_pci_addr *pcislot_addr, uint32_t *index)
 	FILE *fd;
 	char pcislot_path[PATH_MAX];
 	uint32_t domain;
-	uint32_t bus;
-	uint32_t devid;
-	uint32_t function;
+	uint8_t bus;
+	uint8_t devid;
+	uint8_t function;
 
 	dir = opendir("/sys/class/combo");
 	if (dir == NULL)
@@ -1451,7 +1451,7 @@ get_szedata2_index(const struct rte_pci_addr *pcislot_addr, uint32_t *index)
 		if (fd == NULL)
 			continue;
 
-		ret = fscanf(fd, "%4" PRIx16 ":%2" PRIx8 ":%2" PRIx8 ".%" PRIx8,
+		ret = fscanf(fd, "%8" SCNx32 ":%2" SCNx8 ":%2" SCNx8 ".%" SCNx8,
 				&domain, &bus, &devid, &function);
 		fclose(fd);
 		if (ret != 4)
-- 
2.11.0

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

* [dpdk-stable] patch 'net/enic: fix crash on MTU update with non-setup queues' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (49 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/szedata2: fix format string for PCI address' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/ixgbe: fix busy wait during checking link status' " Yuanhan Liu
                   ` (6 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: John Daley; +Cc: Hyong Youb Kim, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 60477676869d817b49c8a2e4a943182bae040904 Mon Sep 17 00:00:00 2001
From: John Daley <johndale@cisco.com>
Date: Wed, 4 Apr 2018 16:54:53 -0700
Subject: [PATCH] net/enic: fix crash on MTU update with non-setup queues

[ upstream commit 33a2d6594945eb3278bfa441f79ae9a38ea538a0 ]

The enic code called from rte_eth_dev_set_mtu() was assuming that the
Rx queues are already set up via a call to rte_eth_tx_queue_setup().
OVS calls rte_eth_dev_set_mtu() before rte_eth_rx_queue_setup() and
a null pointer was dereferenced.

Fixes: c3e09182bcd6 ("net/enic: support scatter Rx in MTU update")

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
---
 drivers/net/enic/enic_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 59e60aa76..6356c10cb 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1252,6 +1252,8 @@ int enic_set_mtu(struct enic *enic, uint16_t new_mtu)
 	/* free and reallocate RQs with the new MTU */
 	for (rq_idx = 0; rq_idx < enic->rq_count; rq_idx++) {
 		rq = &enic->rq[enic_rte_rq_idx_to_sop_idx(rq_idx)];
+		if (!rq->in_use)
+			continue;
 
 		enic_free_rq(rq);
 		rc = enic_alloc_rq(enic, rq_idx, rq->socket_id, rq->mp,
-- 
2.11.0

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

* [dpdk-stable] patch 'net/ixgbe: fix busy wait during checking link status' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (50 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/enic: fix crash on MTU update with non-setup queues' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'doc: add timestamp offload to mlx5 features' " Yuanhan Liu
                   ` (5 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Chas Williams; +Cc: Helin Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 709ce2c55bf4f7e6d2a904c3937f99bc2b12605b Mon Sep 17 00:00:00 2001
From: Chas Williams <chas3@att.com>
Date: Thu, 1 Feb 2018 17:39:07 -0500
Subject: [PATCH] net/ixgbe: fix busy wait during checking link status

[ upstream commit 22da9548cc1841350421e9b7efbb659c8e0b3d3b ]

If we haven't set wait_to_complete, there is no need to busy wait
until we have a link status.  Applications, like bonding, use the
wait_to_complete flag to indicate that they will be doing their own
busy wait and will likely be polling again shortly.

Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF")

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 830add2e2..249b6926e 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3900,7 +3900,7 @@ ixgbevf_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 	/* for SFP+ modules and DA cables on 82599 it can take up to 500usecs
 	 * before the link status is correct
 	 */
-	if (mac->type == ixgbe_mac_82599_vf) {
+	if (mac->type == ixgbe_mac_82599_vf && wait_to_complete) {
 		int i;
 
 		for (i = 0; i < 5; i++) {
-- 
2.11.0

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

* [dpdk-stable] patch 'doc: add timestamp offload to mlx5 features' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (51 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/ixgbe: fix busy wait during checking link status' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/bnxt: fix Rx drop setting' " Yuanhan Liu
                   ` (4 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From f2fb61d7171b4ced59834e09066a46bdcd6fe597 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Mon, 2 Apr 2018 10:01:22 -0700
Subject: [PATCH] doc: add timestamp offload to mlx5 features

[ upstream commit 360e6972e8b7dca1b4a0a4ed8ed3005b861aa718 ]

Fixes: 78c7406b7b5a ("net/mlx5: add Rx HW timestamp")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 doc/guides/nics/features/mlx5.ini | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/guides/nics/features/mlx5.ini b/doc/guides/nics/features/mlx5.ini
index c36363915..f8ce08770 100644
--- a/doc/guides/nics/features/mlx5.ini
+++ b/doc/guides/nics/features/mlx5.ini
@@ -29,6 +29,7 @@ CRC offload          = Y
 VLAN offload         = Y
 L3 checksum offload  = Y
 L4 checksum offload  = Y
+Timestamp offload    = Y
 Packet type parsing  = Y
 Rx descriptor status = Y
 Tx descriptor status = Y
-- 
2.11.0

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

* [dpdk-stable] patch 'net/bnxt: fix Rx drop setting' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (52 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'doc: add timestamp offload to mlx5 features' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc/base: fix comparison always true warning' " Yuanhan Liu
                   ` (3 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From c45d70fa893b3baaa0add1bf217772cd75b0dbd5 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Sat, 7 Apr 2018 10:40:54 -0700
Subject: [PATCH] net/bnxt: fix Rx drop setting

[ upstream commit d4cd95c645b5af9f7f480ba7fb6f4e4eee0e0e23 ]

If Rx descriptors are not available, pkts are dropped by default.
Fix rx_drop_en setting in bnxt_dev_info_get_op to reflect it.

Fixes: 0a6d2a720078 ("net/bnxt: get device infos")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 3eeca6f4d..049afd0bf 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -465,7 +465,8 @@ static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
 			.wthresh = 0,
 		},
 		.rx_free_thresh = 32,
-		.rx_drop_en = 0,
+		/* If no descriptors available, pkts are dropped by default */
+		.rx_drop_en = 1,
 	};
 
 	dev_info->default_txconf = (struct rte_eth_txconf) {
-- 
2.11.0

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

* [dpdk-stable] patch 'net/sfc/base: fix comparison always true warning' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (53 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/bnxt: fix Rx drop setting' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/i40e: fix DDP profile DEL operation' " Yuanhan Liu
                   ` (2 subsequent siblings)
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From dd5e667ecc714f01aaabc051dedd2e6cc58e8330 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Mon, 9 Apr 2018 12:58:57 +0100
Subject: [PATCH] net/sfc/base: fix comparison always true warning

[ upstream commit 06619ede18663fe81bf7ebf49ec751210308d41e ]

Loopback type used as bit index has efx_loopback_type_t type
which is enum. clang complains that it is always true when it
is compared with qword (64 bit) bits number boundary.

Fixes: 9ee64bd404fc ("net/sfc/base: import loopback control")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/efx_port.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/base/efx_port.c b/drivers/net/sfc/base/efx_port.c
index 518c2a228..ec8a1575e 100644
--- a/drivers/net/sfc/base/efx_port.c
+++ b/drivers/net/sfc/base/efx_port.c
@@ -145,7 +145,7 @@ efx_port_loopback_set(
 	EFSYS_ASSERT(link_mode < EFX_LINK_NMODES);
 
 	if (EFX_TEST_QWORD_BIT(encp->enc_loopback_types[link_mode],
-		loopback_type) == 0) {
+		(int)loopback_type) == 0) {
 		rc = ENOTSUP;
 		goto fail1;
 	}
-- 
2.11.0

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

* [dpdk-stable] patch 'net/i40e: fix DDP profile DEL operation' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (54 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc/base: fix comparison always true warning' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/vhost: fix invalid state' " Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: free mempool used in mode 6' " Yuanhan Liu
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Jingjing Wu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From dfa6a0ed3c69f6b4d2af39286b70104c3431a63f Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Wed, 7 Feb 2018 16:40:59 +0800
Subject: [PATCH] net/i40e: fix DDP profile DEL operation

[ upstream commit 0585f5c3d2643e49c0d2629e4937fb0bf010afbd ]

Customized info will be updated when processing DDP package,
including PCYPE/PTYPE/protocol. Previously, the customized info
is updated without any check for package operation - ADD or DEL,
but only covers ADD operation. In this situation, even if a package
is being removed, new PCTYPE/PTYPE/protocol will still be created,
it will cause wrong parsing for SW. This patch cleans new
PCTYPE/PTYPE/protocol created when a package is being removed.

Fixes: e163c18a15b0 ("net/i40e: update ptype and pctype info")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c  | 51 +++++++++++++++++++++++++++++++++--------
 drivers/net/i40e/i40e_ethdev.h  |  4 +++-
 drivers/net/i40e/i40e_flow.c    |  2 +-
 drivers/net/i40e/rte_pmd_i40e.c |  6 +++--
 4 files changed, 50 insertions(+), 13 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 8383adefe..b57b60f5c 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -11403,7 +11403,8 @@ i40e_find_customized_pctype(struct i40e_pf *pf, uint8_t index)
 static int
 i40e_update_customized_pctype(struct rte_eth_dev *dev, uint8_t *pkg,
 			      uint32_t pkg_size, uint32_t proto_num,
-			      struct rte_pmd_i40e_proto_info *proto)
+			      struct rte_pmd_i40e_proto_info *proto,
+			      enum rte_pmd_i40e_package_op op)
 {
 	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	uint32_t pctype_num;
@@ -11416,6 +11417,12 @@ i40e_update_customized_pctype(struct rte_eth_dev *dev, uint8_t *pkg,
 	uint32_t i, j, n;
 	int ret;
 
+	if (op != RTE_PMD_I40E_PKG_OP_WR_ADD &&
+	    op != RTE_PMD_I40E_PKG_OP_WR_DEL) {
+		PMD_DRV_LOG(ERR, "Unsupported operation.");
+		return -1;
+	}
+
 	ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size,
 				(uint8_t *)&pctype_num, sizeof(pctype_num),
 				RTE_PMD_I40E_PKG_INFO_PCTYPE_NUM);
@@ -11478,8 +11485,13 @@ i40e_update_customized_pctype(struct rte_eth_dev *dev, uint8_t *pkg,
 				i40e_find_customized_pctype(pf,
 						      I40E_CUSTOMIZED_GTPU);
 		if (new_pctype) {
-			new_pctype->pctype = pctype_value;
-			new_pctype->valid = true;
+			if (op == RTE_PMD_I40E_PKG_OP_WR_ADD) {
+				new_pctype->pctype = pctype_value;
+				new_pctype->valid = true;
+			} else {
+				new_pctype->pctype = I40E_FILTER_PCTYPE_INVALID;
+				new_pctype->valid = false;
+			}
 		}
 	}
 
@@ -11489,8 +11501,9 @@ i40e_update_customized_pctype(struct rte_eth_dev *dev, uint8_t *pkg,
 
 static int
 i40e_update_customized_ptype(struct rte_eth_dev *dev, uint8_t *pkg,
-			       uint32_t pkg_size, uint32_t proto_num,
-			       struct rte_pmd_i40e_proto_info *proto)
+			     uint32_t pkg_size, uint32_t proto_num,
+			     struct rte_pmd_i40e_proto_info *proto,
+			     enum rte_pmd_i40e_package_op op)
 {
 	struct rte_pmd_i40e_ptype_mapping *ptype_mapping;
 	uint16_t port_id = dev->data->port_id;
@@ -11503,6 +11516,17 @@ i40e_update_customized_ptype(struct rte_eth_dev *dev, uint8_t *pkg,
 	bool inner_ip;
 	int ret;
 
+	if (op != RTE_PMD_I40E_PKG_OP_WR_ADD &&
+	    op != RTE_PMD_I40E_PKG_OP_WR_DEL) {
+		PMD_DRV_LOG(ERR, "Unsupported operation.");
+		return -1;
+	}
+
+	if (op == RTE_PMD_I40E_PKG_OP_WR_DEL) {
+		rte_pmd_i40e_ptype_mapping_reset(port_id);
+		return 0;
+	}
+
 	/* get information about new ptype num */
 	ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size,
 				(uint8_t *)&ptype_num, sizeof(ptype_num),
@@ -11621,7 +11645,7 @@ i40e_update_customized_ptype(struct rte_eth_dev *dev, uint8_t *pkg,
 
 void
 i40e_update_customized_info(struct rte_eth_dev *dev, uint8_t *pkg,
-			      uint32_t pkg_size)
+			    uint32_t pkg_size, enum rte_pmd_i40e_package_op op)
 {
 	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	uint32_t proto_num;
@@ -11630,6 +11654,12 @@ i40e_update_customized_info(struct rte_eth_dev *dev, uint8_t *pkg,
 	uint32_t i;
 	int ret;
 
+	if (op != RTE_PMD_I40E_PKG_OP_WR_ADD &&
+	    op != RTE_PMD_I40E_PKG_OP_WR_DEL) {
+		PMD_DRV_LOG(ERR, "Unsupported operation.");
+		return;
+	}
+
 	/* get information about protocol number */
 	ret = rte_pmd_i40e_get_ddp_info(pkg, pkg_size,
 				       (uint8_t *)&proto_num, sizeof(proto_num),
@@ -11663,20 +11693,23 @@ i40e_update_customized_info(struct rte_eth_dev *dev, uint8_t *pkg,
 	/* Check if GTP is supported. */
 	for (i = 0; i < proto_num; i++) {
 		if (!strncmp(proto[i].name, "GTP", 3)) {
-			pf->gtp_support = true;
+			if (op == RTE_PMD_I40E_PKG_OP_WR_ADD)
+				pf->gtp_support = true;
+			else
+				pf->gtp_support = false;
 			break;
 		}
 	}
 
 	/* Update customized pctype info */
 	ret = i40e_update_customized_pctype(dev, pkg, pkg_size,
-					    proto_num, proto);
+					    proto_num, proto, op);
 	if (ret)
 		PMD_DRV_LOG(INFO, "No pctype is updated.");
 
 	/* Update customized ptype info */
 	ret = i40e_update_customized_ptype(dev, pkg, pkg_size,
-					   proto_num, proto);
+					   proto_num, proto, op);
 	if (ret)
 		PMD_DRV_LOG(INFO, "No ptype is updated.");
 
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 229c974e2..2c107e2b6 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -40,6 +40,7 @@
 #include <rte_hash.h>
 #include <rte_flow_driver.h>
 #include <rte_tm_driver.h>
+#include "rte_pmd_i40e.h"
 
 #define I40E_VLAN_TAG_SIZE        4
 
@@ -1221,7 +1222,8 @@ void i40e_tm_conf_uninit(struct rte_eth_dev *dev);
 struct i40e_customized_pctype*
 i40e_find_customized_pctype(struct i40e_pf *pf, uint8_t index);
 void i40e_update_customized_info(struct rte_eth_dev *dev, uint8_t *pkg,
-				 uint32_t pkg_size);
+				 uint32_t pkg_size,
+				 enum rte_pmd_i40e_package_op op);
 int i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb);
 int i40e_flush_queue_region_all_conf(struct rte_eth_dev *dev,
 		struct i40e_hw *hw, struct i40e_pf *pf, uint16_t on);
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 37380e6e7..4ebf925a6 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2418,7 +2418,7 @@ i40e_flow_fdir_get_pctype_value(struct i40e_pf *pf,
 		break;
 	}
 
-	if (cus_pctype)
+	if (cus_pctype && cus_pctype->valid)
 		return cus_pctype->pctype;
 
 	return I40E_FILTER_PCTYPE_INVALID;
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index f726a9cca..ab1163cc0 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -1632,8 +1632,6 @@ rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
 		return -EINVAL;
 	}
 
-	i40e_update_customized_info(dev, buff, size);
-
 	/* Find metadata segment */
 	metadata_seg_hdr = i40e_find_segment_in_package(SEGMENT_TYPE_METADATA,
 							pkg_hdr);
@@ -1737,6 +1735,10 @@ rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
 		}
 	}
 
+	if (op == RTE_PMD_I40E_PKG_OP_WR_ADD ||
+	    op == RTE_PMD_I40E_PKG_OP_WR_DEL)
+		i40e_update_customized_info(dev, buff, size, op);
+
 	rte_free(profile_info_sec);
 	return status;
 }
-- 
2.11.0

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

* [dpdk-stable] patch 'net/vhost: fix invalid state' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (55 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/i40e: fix DDP profile DEL operation' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: free mempool used in mode 6' " Yuanhan Liu
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Junjie Chen; +Cc: Jens Freimann, Jianfeng Tan, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From a8d0841a426b59b29218bf5498eab7aaab19361a Mon Sep 17 00:00:00 2001
From: Junjie Chen <junjie.j.chen@intel.com>
Date: Wed, 11 Apr 2018 13:02:32 -0400
Subject: [PATCH] net/vhost: fix invalid state

[ upstream commit e6722dee533cda3756fbc5c9ea4ddfbf30276f1b ]

dev_start sets *dev_attached* after setup queues, this sets device to
invalid state since no frontend is attached. Also destroy_device set
*started* to zero which makes *allow_queuing* always zero until dev_start
get called again. Actually, we should not determine queues existence by
*dev_attached* but by queues pointers or other separated variable(s).

Fixes: 30a701a53737 ("net/vhost: fix crash when creating vdev dynamically")

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Tested-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 59 +++++++++++++++++++--------------------
 1 file changed, 29 insertions(+), 30 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 2299ce877..caf9fce0a 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -528,10 +528,11 @@ update_queuing_status(struct rte_eth_dev *dev)
 	unsigned int i;
 	int allow_queuing = 1;
 
-	if (rte_atomic32_read(&internal->dev_attached) == 0)
+	if (!dev->data->rx_queues || !dev->data->tx_queues)
 		return;
 
-	if (rte_atomic32_read(&internal->started) == 0)
+	if (rte_atomic32_read(&internal->started) == 0 ||
+	    rte_atomic32_read(&internal->dev_attached) == 0)
 		allow_queuing = 0;
 
 	/* Wait until rx/tx_pkt_burst stops accessing vhost device */
@@ -607,13 +608,10 @@ new_device(int vid)
 #endif
 
 	internal->vid = vid;
-	if (eth_dev->data->rx_queues && eth_dev->data->tx_queues) {
+	if (rte_atomic32_read(&internal->started) == 1)
 		queue_setup(eth_dev, internal);
-		rte_atomic32_set(&internal->dev_attached, 1);
-	} else {
-		RTE_LOG(INFO, PMD, "RX/TX queues have not setup yet\n");
-		rte_atomic32_set(&internal->dev_attached, 0);
-	}
+	else
+		RTE_LOG(INFO, PMD, "RX/TX queues not exist yet\n");
 
 	for (i = 0; i < rte_vhost_get_vring_num(vid); i++)
 		rte_vhost_enable_guest_notification(vid, i, 0);
@@ -622,6 +620,7 @@ new_device(int vid)
 
 	eth_dev->data->dev_link.link_status = ETH_LINK_UP;
 
+	rte_atomic32_set(&internal->dev_attached, 1);
 	update_queuing_status(eth_dev);
 
 	RTE_LOG(INFO, PMD, "New connection established\n");
@@ -652,23 +651,24 @@ destroy_device(int vid)
 	eth_dev = list->eth_dev;
 	internal = eth_dev->data->dev_private;
 
-	rte_atomic32_set(&internal->started, 0);
-	update_queuing_status(eth_dev);
 	rte_atomic32_set(&internal->dev_attached, 0);
+	update_queuing_status(eth_dev);
 
 	eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
 
-	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
-		vq = eth_dev->data->rx_queues[i];
-		if (vq == NULL)
-			continue;
-		vq->vid = -1;
-	}
-	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
-		vq = eth_dev->data->tx_queues[i];
-		if (vq == NULL)
-			continue;
-		vq->vid = -1;
+	if (eth_dev->data->rx_queues && eth_dev->data->tx_queues) {
+		for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
+			vq = eth_dev->data->rx_queues[i];
+			if (!vq)
+				continue;
+			vq->vid = -1;
+		}
+		for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
+			vq = eth_dev->data->tx_queues[i];
+			if (!vq)
+				continue;
+			vq->vid = -1;
+		}
 	}
 
 	state = vring_states[eth_dev->data->port_id];
@@ -795,11 +795,7 @@ eth_dev_start(struct rte_eth_dev *eth_dev)
 {
 	struct pmd_internal *internal = eth_dev->data->dev_private;
 
-	if (unlikely(rte_atomic32_read(&internal->dev_attached) == 0)) {
-		queue_setup(eth_dev, internal);
-		rte_atomic32_set(&internal->dev_attached, 1);
-	}
-
+	queue_setup(eth_dev, internal);
 	rte_atomic32_set(&internal->started, 1);
 	update_queuing_status(eth_dev);
 
@@ -839,10 +835,13 @@ eth_dev_close(struct rte_eth_dev *dev)
 	pthread_mutex_unlock(&internal_list_lock);
 	rte_free(list);
 
-	for (i = 0; i < dev->data->nb_rx_queues; i++)
-		rte_free(dev->data->rx_queues[i]);
-	for (i = 0; i < dev->data->nb_tx_queues; i++)
-		rte_free(dev->data->tx_queues[i]);
+	if (dev->data->rx_queues)
+		for (i = 0; i < dev->data->nb_rx_queues; i++)
+			rte_free(dev->data->rx_queues[i]);
+
+	if (dev->data->tx_queues)
+		for (i = 0; i < dev->data->nb_tx_queues; i++)
+			rte_free(dev->data->tx_queues[i]);
 
 	rte_free(dev->data->mac_addrs);
 	free(internal->dev_name);
-- 
2.11.0

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

* [dpdk-stable] patch 'net/bonding: free mempool used in mode 6' has been queued to LTS release 17.11.2
  2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
                   ` (56 preceding siblings ...)
  2018-04-22 15:09 ` [dpdk-stable] patch 'net/vhost: fix invalid state' " Yuanhan Liu
@ 2018-04-22 15:09 ` Yuanhan Liu
  57 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-04-22 15:09 UTC (permalink / raw)
  To: Tonghao Zhang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.2

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

Thanks.

	--yliu

---
>From 45955450becaf6f4d2801105151465fc5a2bc915 Mon Sep 17 00:00:00 2001
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Date: Tue, 10 Apr 2018 21:34:28 -0700
Subject: [PATCH] net/bonding: free mempool used in mode 6

[ upstream commit b9c0dea24beb4b893e88d93c1b52481003ff8999 ]

When creating bond device with mode6, dpdk will create
mempool for arp packets. If free the bond device and
create it with same name, there will be an error. Because
the mempool is not freed when destroying bond device.

Fixes: 06fe78b98ccd ("bond: add mode 6")
Fixes: ea0c20ea95fd ("apps: use helper to create mbuf pools")

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 08444d9fc..e58d8bde2 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2972,6 +2972,10 @@ bond_remove(struct rte_vdev_device *dev)
 	eth_dev->tx_pkt_burst = NULL;
 
 	internals = eth_dev->data->dev_private;
+	/* Try to release mempool used in mode6. If the bond
+	 * device is not mode6, free the NULL is not problem.
+	 */
+	rte_mempool_free(internals->mode6.mempool);
 	rte_bitmap_free(internals->vlan_filter_bmp);
 	rte_free(internals->vlan_filter_bmpmem);
 	rte_free(eth_dev->data->dev_private);
-- 
2.11.0

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

* Re: [dpdk-stable] patch 'vhost: avoid concurrency when logging dirty pages' has been queued to LTS release 17.11.2
  2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: avoid concurrency when logging dirty pages' " Yuanhan Liu
@ 2018-04-23  9:03   ` Maxime Coquelin
  2018-05-06  3:51     ` Yuanhan Liu
  0 siblings, 1 reply; 61+ messages in thread
From: Maxime Coquelin @ 2018-04-23  9:03 UTC (permalink / raw)
  To: Yuanhan Liu; +Cc: Jianfeng Tan, dpdk stable

Hi Yuanhan,

On 04/22/2018 05:09 PM, Yuanhan Liu wrote:
> Hi,
> 
> FYI, your patch has been queued to LTS release 17.11.2
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 04/29/18. So please
> shout if anyone has objections.

Please don't pick this patch, it cause a regression with multiqueue,
I posted a revert of the patch on list last week.

I'm working on an alternative solution, but while it is ready, better to
keep performance penalty from initial patch.


Thanks,
Maxime
> Thanks.
> 
> 	--yliu
> 
> ---
>  From acdf634b3533a5ccb1528ee546ac9dcfb57b8a36 Mon Sep 17 00:00:00 2001
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Date: Wed, 21 Mar 2018 16:44:13 +0100
> Subject: [PATCH] vhost: avoid concurrency when logging dirty pages
> 
> [ upstream commit 394313fff39d0f994325c47f7eab39daf5dc9e11 ]
> 
> This patch aims at fixing a migration performance regression
> faced since atomic operation is used to log pages as dirty when
> doing live migration.
> 
> Instead of setting a single bit by doing an atomic read-modify-write
> operation to log a page as dirty, this patch write 0xFF to the
> corresponding byte, and so logs 8 page as dirty.
> 
> The advantage is that it avoids concurrent atomic operations by
> multiple PMD threads, the drawback is that some clean pages are
> marked as dirty and so are transferred twice.
> 
> Fixes: 897f13a1f726 ("vhost: make page logging atomic")
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
> ---
>   lib/librte_vhost/vhost.h | 12 ++++--------
>   1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
> index c8f2a8176..5c488fa57 100644
> --- a/lib/librte_vhost/vhost.h
> +++ b/lib/librte_vhost/vhost.h
> @@ -261,18 +261,14 @@ struct virtio_net {
>   #define VHOST_LOG_PAGE	4096
>   
>   /*
> - * Atomically set a bit in memory.
> + * Mark all pages belonging to the same dirty log bitmap byte
> + * as dirty. The goal is to avoid concurrency between different
> + * threads doing atomic read-modify-writes on the same byte.
>    */
>   static __rte_always_inline void
> -vhost_set_bit(unsigned int nr, volatile uint8_t *addr)
> -{
> -	__sync_fetch_and_or_8(addr, (1U << nr));
> -}
> -
> -static __rte_always_inline void
>   vhost_log_page(uint8_t *log_base, uint64_t page)
>   {
> -	vhost_set_bit(page % 8, &log_base[page / 8]);
> +	log_base[page / 8] = 0xff;
>   }
>   
>   static __rte_always_inline void
> 

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

* Re: [dpdk-stable] patch 'vhost: avoid concurrency when logging dirty pages' has been queued to LTS release 17.11.2
  2018-04-23  9:03   ` Maxime Coquelin
@ 2018-05-06  3:51     ` Yuanhan Liu
  0 siblings, 0 replies; 61+ messages in thread
From: Yuanhan Liu @ 2018-05-06  3:51 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Jianfeng Tan, dpdk stable

On Mon, Apr 23, 2018 at 11:03:22AM +0200, Maxime Coquelin wrote:
> Hi Yuanhan,
> 
> On 04/22/2018 05:09 PM, Yuanhan Liu wrote:
> > Hi,
> > 
> > FYI, your patch has been queued to LTS release 17.11.2
> > 
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > It will be pushed if I get no objections before 04/29/18. So please
> > shout if anyone has objections.
> 
> Please don't pick this patch, it cause a regression with multiqueue,
> I posted a revert of the patch on list last week.

Hi Maxime,

Thank you for letting me know. I have now dropped it.

	--yliu
> 
> I'm working on an alternative solution, but while it is ready, better to
> keep performance penalty from initial patch.
> 
> 
> Thanks,
> Maxime
> > Thanks.
> > 
> > 	--yliu
> > 
> > ---
> >  From acdf634b3533a5ccb1528ee546ac9dcfb57b8a36 Mon Sep 17 00:00:00 2001
> > From: Maxime Coquelin <maxime.coquelin@redhat.com>
> > Date: Wed, 21 Mar 2018 16:44:13 +0100
> > Subject: [PATCH] vhost: avoid concurrency when logging dirty pages
> > 
> > [ upstream commit 394313fff39d0f994325c47f7eab39daf5dc9e11 ]
> > 
> > This patch aims at fixing a migration performance regression
> > faced since atomic operation is used to log pages as dirty when
> > doing live migration.
> > 
> > Instead of setting a single bit by doing an atomic read-modify-write
> > operation to log a page as dirty, this patch write 0xFF to the
> > corresponding byte, and so logs 8 page as dirty.
> > 
> > The advantage is that it avoids concurrent atomic operations by
> > multiple PMD threads, the drawback is that some clean pages are
> > marked as dirty and so are transferred twice.
> > 
> > Fixes: 897f13a1f726 ("vhost: make page logging atomic")
> > 
> > Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> > Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
> > ---
> >   lib/librte_vhost/vhost.h | 12 ++++--------
> >   1 file changed, 4 insertions(+), 8 deletions(-)
> > 
> > diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
> > index c8f2a8176..5c488fa57 100644
> > --- a/lib/librte_vhost/vhost.h
> > +++ b/lib/librte_vhost/vhost.h
> > @@ -261,18 +261,14 @@ struct virtio_net {
> >   #define VHOST_LOG_PAGE	4096
> >   /*
> > - * Atomically set a bit in memory.
> > + * Mark all pages belonging to the same dirty log bitmap byte
> > + * as dirty. The goal is to avoid concurrency between different
> > + * threads doing atomic read-modify-writes on the same byte.
> >    */
> >   static __rte_always_inline void
> > -vhost_set_bit(unsigned int nr, volatile uint8_t *addr)
> > -{
> > -	__sync_fetch_and_or_8(addr, (1U << nr));
> > -}
> > -
> > -static __rte_always_inline void
> >   vhost_log_page(uint8_t *log_base, uint64_t page)
> >   {
> > -	vhost_set_bit(page % 8, &log_base[page / 8]);
> > +	log_base[page / 8] = 0xff;
> >   }
> >   static __rte_always_inline void
> > 

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

end of thread, other threads:[~2018-05-06  3:51 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-22 15:08 [dpdk-stable] patch 'eal/ppc: remove braces in SMP memory barrier macro' has been queued to LTS release 17.11.2 Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'pci: remove duplicated symbol from map file' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'kni: fix build on RHEL 7.5' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'bus/vdev: fix finding device by name' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'app/procinfo: fix strncpy usage in args parsing' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'examples/exception_path: limit core count to 64' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'net/mlx5: fix flow creation with a single target queue' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'vhost: fix message payload union in setting ring address' " Yuanhan Liu
2018-04-22 15:08 ` [dpdk-stable] patch 'vhost: fix offset while mmaping log base " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: check cmsg not null' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: fix device cleanup at stop' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: fix realloc failure' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: fix ring index returned to master on stop' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc: add missing defines for SAL annotation' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: fix primary slave port id storage type' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/octeontx: fix null pointer dereference' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/octeontx: fix uninitialized variable in port open' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/nfp: fix assigning port id in mbuf' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/nfp: fix barrier location' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/nfp: fix link speed capabilities' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'doc: fix NFP NIC guide grammar' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/qede: fix alloc from socket 0' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/enic: allocate stats DMA buffer upfront during probe' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/i40e: fix link update no wait' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/vmxnet3: set the queue shared buffer at start' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/mrvl: fix crash when port is closed without starting' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/mrvl: fix Rx descriptors number' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/mlx5: fix existing file removal' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/bnxt: fix LRO disable' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc: fix mbuf data alignment calculation' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'ethdev: fix queue start' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc: fix type of opaque pointer in perf profile handler' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/i40e: fix intr callback unregister by adding retry' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/ixgbe: " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'ethdev: fix port accessing after release' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'vhost: avoid concurrency when logging dirty pages' " Yuanhan Liu
2018-04-23  9:03   ` Maxime Coquelin
2018-05-06  3:51     ` Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/vhost: fix crash when creating vdev dynamically' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'bus/fslmc: fix find device start condition' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'hash: fix missing spinlock unlock in add key' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'app/crypto-perf: fix IOVA translation' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'mem: do not use physical addresses in IOVA as VA mode' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'vfio: do not needlessly check for IOVA " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/dpaa: fix oob access' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'bus/dpaa: fix resource leak' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/dpaa2: fix xstats' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'ip_frag: fix double free of chained mbufs' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/octeontx: fix uninitialized speed variable' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: fix setting VLAN ID on slave ports' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: clear started state if start fails' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/szedata2: fix total stats' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/szedata2: fix format string for PCI address' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/enic: fix crash on MTU update with non-setup queues' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/ixgbe: fix busy wait during checking link status' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'doc: add timestamp offload to mlx5 features' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/bnxt: fix Rx drop setting' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/sfc/base: fix comparison always true warning' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/i40e: fix DDP profile DEL operation' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/vhost: fix invalid state' " Yuanhan Liu
2018-04-22 15:09 ` [dpdk-stable] patch 'net/bonding: free mempool used in mode 6' " 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).