patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2
@ 2019-05-08 10:14 Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix memory leak' " Kevin Traynor
                   ` (50 more replies)
  0 siblings, 51 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From a88105ed2f169b26a26415da97cbe7d7a55790c9 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Thu, 11 Apr 2019 18:47:37 -0700
Subject: [PATCH] net/bnx2x: fix MTU for jumbo frame

[ upstream commit ed55533e98c78273fc857151d42889741a4b3316 ]

Fix to update eth dev MTU for jumbo frames

Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/bnx2x/bnx2x_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index cc7816dd5..c31821316 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -181,6 +181,8 @@ bnx2x_dev_configure(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE(sc);
 
-	if (rxmode->offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
+	if (rxmode->offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
 		sc->mtu = dev->data->dev_conf.rxmode.max_rx_pkt_len;
+		dev->data->mtu = sc->mtu;
+	}
 
 	if (dev->data->nb_tx_queues > dev->data->nb_rx_queues) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:05.898194189 +0100
+++ 0001-net-bnx2x-fix-MTU-for-jumbo-frame.patch	2019-05-08 11:05:05.723934979 +0100
@@ -1 +1 @@
-From ed55533e98c78273fc857151d42889741a4b3316 Mon Sep 17 00:00:00 2001
+From a88105ed2f169b26a26415da97cbe7d7a55790c9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ed55533e98c78273fc857151d42889741a4b3316 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 1f2eb92b7..5b4c5cf84 100644
+index cc7816dd5..c31821316 100644
@@ -20 +21 @@
-@@ -182,6 +182,8 @@ bnx2x_dev_configure(struct rte_eth_dev *dev)
+@@ -181,6 +181,8 @@ bnx2x_dev_configure(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/bnx2x: fix memory leak' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix ramrod timeout' " Kevin Traynor
                   ` (49 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Shahed Shaikh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 272093cc912fa98dee9e5382d6c0efbc780948e5 Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shshaikh@marvell.com>
Date: Thu, 11 Apr 2019 18:47:38 -0700
Subject: [PATCH] net/bnx2x: fix memory leak

[ upstream commit 68ed0742256dde2335cb1f6560ef94e7b29febed ]

We allocate DMA memory but never free after using it.
Add function to free DMA memory.

Fixes: b5bf7719221d ("bnx2x: driver support routines")

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
---
 drivers/net/bnx2x/bnx2x.c    | 15 +++++++++++++++
 drivers/net/bnx2x/bnx2x.h    |  3 ++-
 drivers/net/bnx2x/ecore_sp.h | 17 +++++++++--------
 3 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index ab092e23f..298bc414a 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -186,4 +186,5 @@ bnx2x_dma_alloc(struct bnx2x_softc *sc, size_t size, struct bnx2x_dma *dma,
 	dma->paddr = (uint64_t) z->iova;
 	dma->vaddr = z->addr;
+	dma->mzone = (const void *)z;
 
 	PMD_DRV_LOG(DEBUG, sc,
@@ -193,4 +194,17 @@ bnx2x_dma_alloc(struct bnx2x_softc *sc, size_t size, struct bnx2x_dma *dma,
 }
 
+void bnx2x_dma_free(struct bnx2x_dma *dma)
+{
+	if (dma->mzone == NULL)
+		return;
+
+	rte_memzone_free((const struct rte_memzone *)dma->mzone);
+	dma->sc = NULL;
+	dma->paddr = 0;
+	dma->vaddr = NULL;
+	dma->nseg = 0;
+	dma->mzone = NULL;
+}
+
 static int bnx2x_acquire_hw_lock(struct bnx2x_softc *sc, uint32_t resource)
 {
@@ -2437,4 +2451,5 @@ static int bnx2x_alloc_mem(struct bnx2x_softc *sc)
 static void bnx2x_free_fw_stats_mem(struct bnx2x_softc *sc)
 {
+	bnx2x_dma_free(&sc->fw_stats_dma);
 	sc->fw_stats_num = 0;
 
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index 32a12294b..9e82a8931 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -320,4 +320,5 @@ struct bnx2x_dma {
 	void                    *vaddr;
 	int                     nseg;
+	const void		*mzone;
 	char                    msg[RTE_MEMZONE_NAMESIZE - 6];
 };
@@ -1754,5 +1755,5 @@ int  bnx2x_cmpxchg(volatile int *addr, int old, int new);
 int bnx2x_dma_alloc(struct bnx2x_softc *sc, size_t size,
 		struct bnx2x_dma *dma, const char *msg, uint32_t align);
-
+void bnx2x_dma_free(struct bnx2x_dma *dma);
 uint32_t bnx2x_dmae_opcode_add_comp(uint32_t opcode, uint8_t comp_type);
 uint32_t bnx2x_dmae_opcode_clr_src_reset(uint32_t opcode);
diff --git a/drivers/net/bnx2x/ecore_sp.h b/drivers/net/bnx2x/ecore_sp.h
index f295bf5af..7126097db 100644
--- a/drivers/net/bnx2x/ecore_sp.h
+++ b/drivers/net/bnx2x/ecore_sp.h
@@ -152,12 +152,13 @@ typedef rte_spinlock_t ECORE_MUTEX_SPIN;
 	} while (0)
 
-#define ECORE_ILT_FREE(x, y, size)                   \
-    do {                                             \
-	if (x) {                                     \
-	    rte_free(x);                             \
-	    x = NULL;                                \
-	    y = 0;                                   \
-	}                                            \
-    } while (0)
+#define ECORE_ILT_FREE(x, y, size)					\
+	do {								\
+		if (x) {						\
+			bnx2x_dma_free((struct bnx2x_dma *)x);		\
+			rte_free(x);					\
+			x = NULL;					\
+			y = 0;						\
+		}							\
+	} while (0)
 
 #define ECORE_IS_VALID_ETHER_ADDR(_mac) TRUE
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:05.945053489 +0100
+++ 0002-net-bnx2x-fix-memory-leak.patch	2019-05-08 11:05:05.737934686 +0100
@@ -1 +1 @@
-From 68ed0742256dde2335cb1f6560ef94e7b29febed Mon Sep 17 00:00:00 2001
+From 272093cc912fa98dee9e5382d6c0efbc780948e5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 68ed0742256dde2335cb1f6560ef94e7b29febed ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bnx2x: fix ramrod timeout' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix memory leak' " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix DMAE " Kevin Traynor
                   ` (48 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Shahed Shaikh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From ec060662b2f4030f5e549755c1935ebe864e65fe Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shshaikh@marvell.com>
Date: Thu, 11 Apr 2019 18:47:39 -0700
Subject: [PATCH] net/bnx2x: fix ramrod timeout

[ upstream commit 8bd31421c593e5f3e2ee2a4d7d3c6a74489838c6 ]

There is a race condition while processing RAMROD
completion in fast path queue through interrupt handler
and polling method.

Interrupt handler invoked from actual interrupt event
and from RAMROD processing polling flow may create a
situation where one flow will read and clear a fastpath
interrupt without actually processing the RAMROD completion.
Thus, causing a RAMROD timeout even though HW sent an
completion event.

Fix this by introducing an atomic variable which will be
set only when interrupt handler needs to process RAMROD
completion.

Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
---
 drivers/net/bnx2x/bnx2x.c        | 18 ++++++++++++------
 drivers/net/bnx2x/bnx2x.h        |  4 ++--
 drivers/net/bnx2x/bnx2x_ethdev.c |  2 +-
 drivers/net/bnx2x/ecore_sp.c     | 12 ++++++++++--
 4 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 298bc414a..f32db6d12 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -125,5 +125,5 @@ int bnx2x_nic_load(struct bnx2x_softc *sc);
 
 static int bnx2x_handle_sp_tq(struct bnx2x_softc *sc);
-static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp, int scan_fp);
+static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp);
 static void bnx2x_ack_sb(struct bnx2x_softc *sc, uint8_t igu_sb_id,
 			 uint8_t storm, uint16_t index, uint8_t op,
@@ -1115,4 +1115,10 @@ bnx2x_sp_post(struct bnx2x_softc *sc, int command, int cid, uint32_t data_hi,
 		    atomic_load_acq_long(&sc->eq_spq_left));
 
+	/* RAMROD completion is processed in bnx2x_intr_legacy()
+	 * which can run from different contexts.
+	 * Ask bnx2x_intr_intr() to process RAMROD
+	 * completion whenever it gets scheduled.
+	 */
+	rte_atomic32_set(&sc->scan_fp, 1);
 	bnx2x_sp_prod_update(sc);
 
@@ -4540,5 +4546,5 @@ static int bnx2x_handle_sp_tq(struct bnx2x_softc *sc)
 }
 
-static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp, int scan_fp)
+static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp)
 {
 	struct bnx2x_softc *sc = fp->sc;
@@ -4555,5 +4561,5 @@ static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp, int scan_fp)
 	bnx2x_update_fp_sb_idx(fp);
 
-	if (scan_fp) {
+	if (rte_atomic32_read(&sc->scan_fp) == 1) {
 		if (bnx2x_has_rx_work(fp)) {
 			more_rx = bnx2x_rxeof(sc, fp);
@@ -4562,5 +4568,5 @@ static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp, int scan_fp)
 		if (more_rx) {
 			/* still more work to do */
-			bnx2x_handle_fp_tq(fp, scan_fp);
+			bnx2x_handle_fp_tq(fp);
 			return;
 		}
@@ -4578,5 +4584,5 @@ static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp, int scan_fp)
  * interrupt causes: link, RX, and TX.
  */
-int bnx2x_intr_legacy(struct bnx2x_softc *sc, int scan_fp)
+int bnx2x_intr_legacy(struct bnx2x_softc *sc)
 {
 	struct bnx2x_fastpath *fp;
@@ -4610,5 +4616,5 @@ int bnx2x_intr_legacy(struct bnx2x_softc *sc, int scan_fp)
 			bnx2x_ack_sb(sc, fp->igu_sb_id, USTORM_ID,
 				     0, IGU_INT_DISABLE, 0);
-			bnx2x_handle_fp_tq(fp, scan_fp);
+			bnx2x_handle_fp_tq(fp);
 			status &= ~mask;
 		}
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index 9e82a8931..bb8031001 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -1091,5 +1091,5 @@ struct bnx2x_softc {
 #define PERIODIC_GO   1
 	volatile unsigned long periodic_flags;
-
+	rte_atomic32_t	scan_fp;
 	struct bnx2x_fastpath fp[MAX_RSS_CHAINS];
 	struct bnx2x_sp_objs  sp_objs[MAX_RSS_CHAINS];
@@ -1940,5 +1940,5 @@ uint8_t bnx2x_txeof(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp);
 void bnx2x_print_adapter_info(struct bnx2x_softc *sc);
 void bnx2x_print_device_info(struct bnx2x_softc *sc);
-int bnx2x_intr_legacy(struct bnx2x_softc *sc, int scan_fp);
+int bnx2x_intr_legacy(struct bnx2x_softc *sc);
 void bnx2x_link_status_update(struct bnx2x_softc *sc);
 int bnx2x_complete_sp(struct bnx2x_softc *sc);
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index c31821316..d5328e8d9 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -113,5 +113,5 @@ bnx2x_interrupt_action(struct rte_eth_dev *dev)
 	uint32_t link_status;
 
-	bnx2x_intr_legacy(sc, 0);
+	bnx2x_intr_legacy(sc);
 
 	if (sc->periodic_flags & PERIODIC_GO)
diff --git a/drivers/net/bnx2x/ecore_sp.c b/drivers/net/bnx2x/ecore_sp.c
index 6d2bb815c..43194095b 100644
--- a/drivers/net/bnx2x/ecore_sp.c
+++ b/drivers/net/bnx2x/ecore_sp.c
@@ -292,12 +292,17 @@ static int ecore_state_wait(struct bnx2x_softc *sc, int state,
 
 	ECORE_MSG(sc, "waiting for state to become %d", state);
+	/* being over protective to remind bnx2x_intr_legacy() to
+	 * process RAMROD
+	 */
+	rte_atomic32_set(&sc->scan_fp, 1);
 
 	ECORE_MIGHT_SLEEP();
 	while (cnt--) {
-		bnx2x_intr_legacy(sc, 1);
+		bnx2x_intr_legacy(sc);
 		if (!ECORE_TEST_BIT(state, pstate)) {
 #ifdef ECORE_STOP_ON_ERROR
 			ECORE_MSG(sc, "exit  (cnt %d)", 5000 - cnt);
 #endif
+			rte_atomic32_set(&sc->scan_fp, 0);
 			return ECORE_SUCCESS;
 		}
@@ -305,10 +310,13 @@ static int ecore_state_wait(struct bnx2x_softc *sc, int state,
 		ECORE_WAIT(sc, delay_us);
 
-		if (sc->panic)
+		if (sc->panic) {
+			rte_atomic32_set(&sc->scan_fp, 0);
 			return ECORE_IO;
+		}
 	}
 
 	/* timeout! */
 	PMD_DRV_LOG(ERR, sc, "timeout waiting for state %d", state);
+	rte_atomic32_set(&sc->scan_fp, 0);
 #ifdef ECORE_STOP_ON_ERROR
 	ecore_panic();
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.006474401 +0100
+++ 0003-net-bnx2x-fix-ramrod-timeout.patch	2019-05-08 11:05:05.750934414 +0100
@@ -1 +1 @@
-From 8bd31421c593e5f3e2ee2a4d7d3c6a74489838c6 Mon Sep 17 00:00:00 2001
+From ec060662b2f4030f5e549755c1935ebe864e65fe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8bd31421c593e5f3e2ee2a4d7d3c6a74489838c6 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -108 +109 @@
-index 5b4c5cf84..bcb899a57 100644
+index c31821316..d5328e8d9 100644
@@ -111 +112 @@
-@@ -114,5 +114,5 @@ bnx2x_interrupt_action(struct rte_eth_dev *dev)
+@@ -113,5 +113,5 @@ bnx2x_interrupt_action(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/bnx2x: fix DMAE timeout' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix memory leak' " Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix ramrod timeout' " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix race for periodic flags' " Kevin Traynor
                   ` (47 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Shahed Shaikh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From bd288e305328130df81326c426b72cace4eaf4fd Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shshaikh@marvell.com>
Date: Thu, 11 Apr 2019 18:47:40 -0700
Subject: [PATCH] net/bnx2x: fix DMAE timeout

[ upstream commit e166e0db8cf6c0e391a40f1a75a678bec930c970 ]

In some cases, DPDK application may send packets
while PMD is going through load or unload flow.
This causes firmware to access invalid/unallocated
memory to process transmit buffer. Which results in
error on PCI bus and chip further blocks access to host,
causing a DMAE timeout.

Fix this issue by installing dummy empty transmit and receive
handlers at the beginning of unload path (rte_eth_dev_stop())
and install actual transmit and receive handlers after successful
load of the PMD port (rte_eth_dev_start()). This way, application
won't be able to send packets while device is going through
load/unload flow.

Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
---
 drivers/net/bnx2x/bnx2x_ethdev.c |  9 ++++-----
 drivers/net/bnx2x/bnx2x_rxtx.c   | 21 ++++++++++++++++-----
 drivers/net/bnx2x/bnx2x_rxtx.h   |  3 ++-
 3 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index d5328e8d9..fb44a71f2 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -213,4 +213,5 @@ bnx2x_dev_configure(struct rte_eth_dev *dev)
 	}
 
+	bnx2x_dev_rxtx_init_dummy(dev);
 	return 0;
 }
@@ -242,9 +243,5 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
 	}
 
-	ret = bnx2x_dev_rx_init(dev);
-	if (ret != 0) {
-		PMD_DRV_LOG(DEBUG, sc, "bnx2x_dev_rx_init returned error code");
-		return -3;
-	}
+	bnx2x_dev_rxtx_init(dev);
 
 	bnx2x_print_device_info(sc);
@@ -261,4 +258,6 @@ bnx2x_dev_stop(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE(sc);
 
+	bnx2x_dev_rxtx_init_dummy(dev);
+
 	if (IS_PF(sc)) {
 		rte_intr_disable(&sc->pci_dev->intr_handle);
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
index ca28aaccf..e5a2b25b5 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.c
+++ b/drivers/net/bnx2x/bnx2x_rxtx.c
@@ -312,5 +312,4 @@ bnx2x_dev_tx_queue_setup(struct rte_eth_dev *dev,
 	txq->tx_bd_head = 0;
 	txq->nb_tx_avail = txq->nb_tx_desc;
-	dev->tx_pkt_burst = bnx2x_xmit_pkts;
 	dev->data->tx_queues[queue_idx] = txq;
 	if (!sc->tx_queues) sc->tx_queues = dev->data->tx_queues;
@@ -442,10 +441,22 @@ next_rx:
 }
 
-int
-bnx2x_dev_rx_init(struct rte_eth_dev *dev)
+static uint16_t
+bnx2x_rxtx_pkts_dummy(__rte_unused void *p_rxq,
+		      __rte_unused struct rte_mbuf **rx_pkts,
+		      __rte_unused uint16_t nb_pkts)
+{
+	return 0;
+}
+
+void bnx2x_dev_rxtx_init_dummy(struct rte_eth_dev *dev)
+{
+	dev->rx_pkt_burst = bnx2x_rxtx_pkts_dummy;
+	dev->tx_pkt_burst = bnx2x_rxtx_pkts_dummy;
+}
+
+void bnx2x_dev_rxtx_init(struct rte_eth_dev *dev)
 {
 	dev->rx_pkt_burst = bnx2x_recv_pkts;
-
-	return 0;
+	dev->tx_pkt_burst = bnx2x_xmit_pkts;
 }
 
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.h b/drivers/net/bnx2x/bnx2x_rxtx.h
index 6ad4928c1..3f4692b47 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.h
+++ b/drivers/net/bnx2x/bnx2x_rxtx.h
@@ -75,5 +75,6 @@ int bnx2x_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
 void bnx2x_dev_rx_queue_release(void *rxq);
 void bnx2x_dev_tx_queue_release(void *txq);
-int bnx2x_dev_rx_init(struct rte_eth_dev *dev);
+void bnx2x_dev_rxtx_init(struct rte_eth_dev *dev);
+void bnx2x_dev_rxtx_init_dummy(struct rte_eth_dev *dev);
 void bnx2x_dev_clear_queues(struct rte_eth_dev *dev);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.067947504 +0100
+++ 0004-net-bnx2x-fix-DMAE-timeout.patch	2019-05-08 11:05:05.751934393 +0100
@@ -1 +1 @@
-From e166e0db8cf6c0e391a40f1a75a678bec930c970 Mon Sep 17 00:00:00 2001
+From bd288e305328130df81326c426b72cace4eaf4fd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e166e0db8cf6c0e391a40f1a75a678bec930c970 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index bcb899a57..f85766c68 100644
+index d5328e8d9..fb44a71f2 100644
@@ -34 +35 @@
-@@ -214,4 +214,5 @@ bnx2x_dev_configure(struct rte_eth_dev *dev)
+@@ -213,4 +213,5 @@ bnx2x_dev_configure(struct rte_eth_dev *dev)
@@ -40 +41 @@
-@@ -243,9 +244,5 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
+@@ -242,9 +243,5 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
@@ -51 +52 @@
-@@ -262,4 +259,6 @@ bnx2x_dev_stop(struct rte_eth_dev *dev)
+@@ -261,4 +258,6 @@ bnx2x_dev_stop(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/bnx2x: fix race for periodic flags' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (2 preceding siblings ...)
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix DMAE " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix optic module verification' " Kevin Traynor
                   ` (46 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From c00065cb6d1455933a6d4c1e6362044c9bfa158a Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Thu, 11 Apr 2019 18:47:41 -0700
Subject: [PATCH] net/bnx2x: fix race for periodic flags

[ upstream commit c19eafccb22e1b1ca52439a936908cfd6fd12ff1 ]

The periodic callout function and the interrupt handler both modify the
periodic flags. There is a possible race condition when an application
is going through dev_stop()/dev_start() and an interrupt handler is
invoked. We also need to ensure that periodic polling is not invoked in
interrupt context.

This patch handles such case by using separate variable to check for
interrupt context. Also, atomically load and store the periodic flag
value.

Fixes: 0f6ebeee2402 ("net/bnx2x: fix call to link handling periodic function")

Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/bnx2x/bnx2x_ethdev.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index fb44a71f2..c628cdc0f 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -108,5 +108,5 @@ bnx2x_link_update(struct rte_eth_dev *dev)
 
 static void
-bnx2x_interrupt_action(struct rte_eth_dev *dev)
+bnx2x_interrupt_action(struct rte_eth_dev *dev, int intr_cxt)
 {
 	struct bnx2x_softc *sc = dev->data->dev_private;
@@ -115,5 +115,6 @@ bnx2x_interrupt_action(struct rte_eth_dev *dev)
 	bnx2x_intr_legacy(sc);
 
-	if (sc->periodic_flags & PERIODIC_GO)
+	if ((atomic_load_acq_long(&sc->periodic_flags) == PERIODIC_GO) &&
+	    !intr_cxt)
 		bnx2x_periodic_callout(sc);
 	link_status = REG_RD(sc, sc->link_params.shmem_base +
@@ -132,7 +133,5 @@ bnx2x_interrupt_handler(void *param)
 	PMD_DEBUG_PERIODIC_LOG(INFO, sc, "Interrupt handled");
 
-	atomic_store_rel_long(&sc->periodic_flags, PERIODIC_STOP);
-	bnx2x_interrupt_action(dev);
-	atomic_store_rel_long(&sc->periodic_flags, PERIODIC_GO);
+	bnx2x_interrupt_action(dev, 1);
 	rte_intr_enable(&sc->pci_dev->intr_handle);
 }
@@ -145,5 +144,5 @@ static void bnx2x_periodic_start(void *param)
 
 	atomic_store_rel_long(&sc->periodic_flags, PERIODIC_GO);
-	bnx2x_interrupt_action(dev);
+	bnx2x_interrupt_action(dev, 0);
 	if (IS_PF(sc)) {
 		ret = rte_eal_alarm_set(BNX2X_SP_TIMER_PERIOD,
@@ -165,4 +164,6 @@ void bnx2x_periodic_stop(void *param)
 
 	rte_eal_alarm_cancel(bnx2x_periodic_start, (void *)dev);
+
+	PMD_DRV_LOG(DEBUG, sc, "Periodic poll stopped");
 }
 
@@ -226,6 +227,8 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
 
 	/* start the periodic callout */
-	if (sc->periodic_flags & PERIODIC_STOP)
+	if (atomic_load_acq_long(&sc->periodic_flags) == PERIODIC_STOP) {
 		bnx2x_periodic_start(dev);
+		PMD_DRV_LOG(DEBUG, sc, "Periodic poll re-started");
+	}
 
 	ret = bnx2x_init(sc);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.113850223 +0100
+++ 0005-net-bnx2x-fix-race-for-periodic-flags.patch	2019-05-08 11:05:05.752934373 +0100
@@ -1 +1 @@
-From c19eafccb22e1b1ca52439a936908cfd6fd12ff1 Mon Sep 17 00:00:00 2001
+From c00065cb6d1455933a6d4c1e6362044c9bfa158a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c19eafccb22e1b1ca52439a936908cfd6fd12ff1 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index f85766c68..3063aea64 100644
+index fb44a71f2..c628cdc0f 100644
@@ -28 +29 @@
-@@ -109,5 +109,5 @@ bnx2x_link_update(struct rte_eth_dev *dev)
+@@ -108,5 +108,5 @@ bnx2x_link_update(struct rte_eth_dev *dev)
@@ -35 +36 @@
-@@ -116,5 +116,6 @@ bnx2x_interrupt_action(struct rte_eth_dev *dev)
+@@ -115,5 +115,6 @@ bnx2x_interrupt_action(struct rte_eth_dev *dev)
@@ -43 +44 @@
-@@ -133,7 +134,5 @@ bnx2x_interrupt_handler(void *param)
+@@ -132,7 +133,5 @@ bnx2x_interrupt_handler(void *param)
@@ -52 +53 @@
-@@ -146,5 +145,5 @@ static void bnx2x_periodic_start(void *param)
+@@ -145,5 +144,5 @@ static void bnx2x_periodic_start(void *param)
@@ -59 +60 @@
-@@ -166,4 +165,6 @@ void bnx2x_periodic_stop(void *param)
+@@ -165,4 +164,6 @@ void bnx2x_periodic_stop(void *param)
@@ -66 +67 @@
-@@ -227,6 +228,8 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
+@@ -226,6 +227,8 @@ bnx2x_dev_start(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/bnx2x: fix optic module verification' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (3 preceding siblings ...)
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix race for periodic flags' " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/mlx5: fix RSS validation function' " Kevin Traynor
                   ` (45 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 90baad67611a2ddfd9731cb1d441ea13f7014020 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Thu, 11 Apr 2019 18:47:42 -0700
Subject: [PATCH] net/bnx2x: fix optic module verification

[ upstream commit 5a6af6baa8c64ab31bd457b12be1f5173194bec6 ]

Enable the optic module vendor and part number verification from driver
by setting appropriate flags. Link handling module in conjunction with
FW performs optic module verification.

Without this fix the SFP is powered down and the link doesn't come up,
if module verification is enforced in nvram setting.

Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/bnx2x/bnx2x.c | 21 +++++++++++++++++++++
 drivers/net/bnx2x/bnx2x.h |  2 ++
 2 files changed, 23 insertions(+)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index f32db6d12..3e705c7a1 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -8104,4 +8104,25 @@ static int bnx2x_get_shmem_info(struct bnx2x_softc *sc)
 	}
 
+	val = sc->devinfo.bc_ver >> 8;
+	if (val < BNX2X_BC_VER) {
+		/* for now only warn later we might need to enforce this */
+		PMD_DRV_LOG(NOTICE, sc, "This driver needs bc_ver %X but found %X, please upgrade BC\n",
+			    BNX2X_BC_VER, val);
+	}
+	sc->link_params.feature_config_flags |=
+				(val >= REQ_BC_VER_4_VRFY_FIRST_PHY_OPT_MDL) ?
+				ELINK_FEATURE_CONFIG_BC_SUPPORTS_OPT_MDL_VRFY :
+				0;
+
+	sc->link_params.feature_config_flags |=
+		(val >= REQ_BC_VER_4_VRFY_SPECIFIC_PHY_OPT_MDL) ?
+		ELINK_FEATURE_CONFIG_BC_SUPPORTS_DUAL_PHY_OPT_MDL_VRFY : 0;
+	sc->link_params.feature_config_flags |=
+		(val >= REQ_BC_VER_4_VRFY_AFEX_SUPPORTED) ?
+		ELINK_FEATURE_CONFIG_BC_SUPPORTS_AFEX : 0;
+	sc->link_params.feature_config_flags |=
+		(val >= REQ_BC_VER_4_SFP_TX_DISABLE_SUPPORTED) ?
+		ELINK_FEATURE_CONFIG_BC_SUPPORTS_SFP_TX_DISABLED : 0;
+
 	/* get the initial value of the link params */
 	sc->link_params.multi_phy_config =
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index bb8031001..ef1688ff3 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -120,4 +120,6 @@ int bnx2x_ilog2(int x)
 #endif
 
+#define BNX2X_BC_VER		0x040200
+
 #include "ecore_sp.h"
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.161360145 +0100
+++ 0006-net-bnx2x-fix-optic-module-verification.patch	2019-05-08 11:05:05.760934205 +0100
@@ -1 +1 @@
-From 5a6af6baa8c64ab31bd457b12be1f5173194bec6 Mon Sep 17 00:00:00 2001
+From 90baad67611a2ddfd9731cb1d441ea13f7014020 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5a6af6baa8c64ab31bd457b12be1f5173194bec6 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/mlx5: fix RSS validation function' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (4 preceding siblings ...)
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix optic module verification' " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/enetc: fix SMMU unhandled context fault' " Kevin Traynor
                   ` (44 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Ori Kam; +Cc: Yongseok Koh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From f55be1a96226fef54d7a5fa122d124c4010108d3 Mon Sep 17 00:00:00 2001
From: Ori Kam <orika@mellanox.com>
Date: Sun, 14 Apr 2019 07:05:21 +0000
Subject: [PATCH] net/mlx5: fix RSS validation function

[ upstream commit 1183f12f14becc160a084c5c081317c3927cdaa4 ]

The RSS validation function was missing the verifcation that
if RSS is requested on inner packet, the flow must have tunnel data.

Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c       | 9 +++++++++
 drivers/net/mlx5/mlx5_flow.h       | 1 +
 drivers/net/mlx5/mlx5_flow_dv.c    | 6 +++---
 drivers/net/mlx5/mlx5_flow_verbs.c | 2 +-
 4 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 15302533d..222cd81d0 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -876,4 +876,6 @@ mlx5_flow_validate_action_queue(const struct rte_flow_action *action,
  * @param[in] attr
  *   Attributes of flow that includes this action.
+ * @param[in] item_flags
+ *   Items that were detected.
  * @param[out] error
  *   Pointer to error structure.
@@ -887,8 +889,10 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
 			      struct rte_eth_dev *dev,
 			      const struct rte_flow_attr *attr,
+			      uint64_t item_flags,
 			      struct rte_flow_error *error)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	const struct rte_flow_action_rss *rss = action->conf;
+	int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);
 	unsigned int i;
 
@@ -951,4 +955,9 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
 					  "rss action not supported for "
 					  "egress");
+	if (rss->level > 1 &&  !tunnel)
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
+					  "inner RSS is not supported for "
+					  "non-tunnel flows");
 	return 0;
 }
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 4a7c05293..e1424c789 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -364,4 +364,5 @@ int mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
 				  struct rte_eth_dev *dev,
 				  const struct rte_flow_attr *attr,
+				  uint64_t item_flags,
 				  struct rte_flow_error *error);
 int mlx5_flow_validate_attributes(struct rte_eth_dev *dev,
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index d34c11152..207edcbc5 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -777,5 +777,4 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	uint64_t item_flags = 0;
 	uint64_t last_item = 0;
-	int tunnel = 0;
 	uint8_t next_protocol = 0xff;
 	int actions_n = 0;
@@ -787,5 +786,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 		return ret;
 	for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
-		tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);
+		int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);
 		switch (items->type) {
 		case RTE_FLOW_ITEM_TYPE_VOID:
@@ -959,5 +958,6 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			ret = mlx5_flow_validate_action_rss(actions,
 							    action_flags, dev,
-							    attr, error);
+							    attr, item_flags,
+							    error);
 			if (ret < 0)
 				return ret;
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index aef855f24..1fdbca3d2 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -1192,5 +1192,5 @@ flow_verbs_validate(struct rte_eth_dev *dev,
 			ret = mlx5_flow_validate_action_rss(actions,
 							    action_flags, dev,
-							    attr,
+							    attr, item_flags,
 							    error);
 			if (ret < 0)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.219985007 +0100
+++ 0007-net-mlx5-fix-RSS-validation-function.patch	2019-05-08 11:05:05.767934059 +0100
@@ -1 +1 @@
-From 1183f12f14becc160a084c5c081317c3927cdaa4 Mon Sep 17 00:00:00 2001
+From f55be1a96226fef54d7a5fa122d124c4010108d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1183f12f14becc160a084c5c081317c3927cdaa4 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 1c78a5f8e..a0683ee98 100644
+index 15302533d..222cd81d0 100644
@@ -25 +26 @@
-@@ -883,4 +883,6 @@ mlx5_flow_validate_action_queue(const struct rte_flow_action *action,
+@@ -876,4 +876,6 @@ mlx5_flow_validate_action_queue(const struct rte_flow_action *action,
@@ -32 +33 @@
-@@ -894,8 +896,10 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
+@@ -887,8 +889,10 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
@@ -43 +44 @@
-@@ -966,4 +970,9 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
+@@ -951,4 +955,9 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
@@ -54 +55 @@
-index 622e305ea..9f47fd4ee 100644
+index 4a7c05293..e1424c789 100644
@@ -57 +58 @@
-@@ -444,4 +444,5 @@ int mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
+@@ -364,4 +364,5 @@ int mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
@@ -64 +65 @@
-index ccb2f7593..3862b26c5 100644
+index d34c11152..207edcbc5 100644
@@ -67 +68 @@
-@@ -1800,5 +1800,4 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -777,5 +777,4 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -73 +74 @@
-@@ -1810,5 +1809,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -787,5 +786,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -80 +81 @@
-@@ -1982,5 +1981,6 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -959,5 +958,6 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -89 +90 @@
-index 3956df1a7..773213e14 100644
+index aef855f24..1fdbca3d2 100644
@@ -92 +93 @@
-@@ -1195,5 +1195,5 @@ flow_verbs_validate(struct rte_eth_dev *dev,
+@@ -1192,5 +1192,5 @@ flow_verbs_validate(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/enetc: fix SMMU unhandled context fault' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (5 preceding siblings ...)
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/mlx5: fix RSS validation function' " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/enetc: fix big endian build and buffer allocation' " Kevin Traynor
                   ` (43 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 49e645b59640b99c75edc1bb5a0eda140ff6a6db Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Fri, 12 Apr 2019 12:28:54 +0000
Subject: [PATCH] net/enetc: fix SMMU unhandled context fault

[ upstream commit 63c34c299acf53e3fdfb5a9c30af8c9d0b7b6188 ]

First configure ring with BDs properly then enable
the ring.

Fixes: 469c6111a799 ("net/enetc: enable Rx and Tx")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/net/enetc/enetc_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index 023fe7517..a21205af0 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -491,7 +491,4 @@ enetc_setup_rxbdr(struct enetc_hw *hw, struct enetc_bdr *rx_ring,
 
 	rx_ring->mb_pool = mb_pool;
-	/* enable ring */
-	enetc_rxbdr_wr(hw, idx, ENETC_RBMR, ENETC_RBMR_EN);
-	enetc_rxbdr_wr(hw, idx, ENETC_RBPIR, 0);
 	rx_ring->rcir = (void *)((size_t)hw->reg +
 			ENETC_BDR(RX, idx, ENETC_RBCIR));
@@ -500,4 +497,7 @@ enetc_setup_rxbdr(struct enetc_hw *hw, struct enetc_bdr *rx_ring,
 		   RTE_PKTMBUF_HEADROOM);
 	enetc_rxbdr_wr(hw, idx, ENETC_RBBSR, buf_size);
+	/* enable ring */
+	enetc_rxbdr_wr(hw, idx, ENETC_RBMR, ENETC_RBMR_EN);
+	enetc_rxbdr_wr(hw, idx, ENETC_RBPIR, 0);
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.275354431 +0100
+++ 0008-net-enetc-fix-SMMU-unhandled-context-fault.patch	2019-05-08 11:05:05.768934038 +0100
@@ -1 +1 @@
-From 63c34c299acf53e3fdfb5a9c30af8c9d0b7b6188 Mon Sep 17 00:00:00 2001
+From 49e645b59640b99c75edc1bb5a0eda140ff6a6db Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 63c34c299acf53e3fdfb5a9c30af8c9d0b7b6188 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 7a9a97deb..f1807b901 100644
+index 023fe7517..a21205af0 100644
@@ -21 +22 @@
-@@ -493,7 +493,4 @@ enetc_setup_rxbdr(struct enetc_hw *hw, struct enetc_bdr *rx_ring,
+@@ -491,7 +491,4 @@ enetc_setup_rxbdr(struct enetc_hw *hw, struct enetc_bdr *rx_ring,
@@ -29 +30 @@
-@@ -502,4 +499,7 @@ enetc_setup_rxbdr(struct enetc_hw *hw, struct enetc_bdr *rx_ring,
+@@ -500,4 +497,7 @@ enetc_setup_rxbdr(struct enetc_hw *hw, struct enetc_bdr *rx_ring,

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

* [dpdk-stable] patch 'net/enetc: fix big endian build and buffer allocation' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (6 preceding siblings ...)
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/enetc: fix SMMU unhandled context fault' " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/enetc: fix crash at high speed traffic' " Kevin Traynor
                   ` (42 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 3b306f2b1216d48f7568cf99acdee8214ec869d7 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Fri, 12 Apr 2019 12:28:56 +0000
Subject: [PATCH] net/enetc: fix big endian build and buffer allocation

[ upstream commit 389a450f377b6c5aed016f437eb6a6f78adb4cf1 ]

There was an error at rte_constant_bswap64 while compiling
with big endian toolchain. so fixing it by adding type cast.

Also, rte_pktmbuf_alloc API should be used to allocate mbuf
instead of rte_pktmbuf_raw_alloc to avoid use of stale mbuf
information.

Fixes: 469c6111a799 ("net/enetc: enable Rx and Tx")

Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/net/enetc/enetc_rxtx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enetc/enetc_rxtx.c b/drivers/net/enetc/enetc_rxtx.c
index 631e2430d..ce43a9efe 100644
--- a/drivers/net/enetc/enetc_rxtx.c
+++ b/drivers/net/enetc/enetc_rxtx.c
@@ -89,6 +89,7 @@ enetc_refill_rx_ring(struct enetc_bdr *rx_ring, const int buff_cnt)
 	rxbd = ENETC_RXBD(*rx_ring, i);
 	for (j = 0; j < buff_cnt; j++) {
-		rx_swbd->buffer_addr =
-			rte_cpu_to_le_64(rte_mbuf_raw_alloc(rx_ring->mb_pool));
+		rx_swbd->buffer_addr = (void *)(uintptr_t)
+			rte_cpu_to_le_64((uint64_t)(uintptr_t)
+					rte_pktmbuf_alloc(rx_ring->mb_pool));
 		rxbd->w.addr = (uint64_t)(uintptr_t)
 			       rx_swbd->buffer_addr->buf_addr +
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.320549650 +0100
+++ 0009-net-enetc-fix-big-endian-build-and-buffer-allocation.patch	2019-05-08 11:05:05.768934038 +0100
@@ -1 +1 @@
-From 389a450f377b6c5aed016f437eb6a6f78adb4cf1 Mon Sep 17 00:00:00 2001
+From 3b306f2b1216d48f7568cf99acdee8214ec869d7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 389a450f377b6c5aed016f437eb6a6f78adb4cf1 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index a31a38725..42f16cab1 100644
+index 631e2430d..ce43a9efe 100644
@@ -35 +36 @@
- 			       rx_swbd->buffer_addr->buf_iova +
+ 			       rx_swbd->buffer_addr->buf_addr +

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

* [dpdk-stable] patch 'net/enetc: fix crash at high speed traffic' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (7 preceding siblings ...)
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/enetc: fix big endian build and buffer allocation' " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'app/testpmd: set fixed flag for exact link speed' " Kevin Traynor
                   ` (41 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From b63e66626ce3b462dda963eeea5e6940ecf5af28 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Fri, 12 Apr 2019 12:29:11 +0000
Subject: [PATCH] net/enetc: fix crash at high speed traffic

[ upstream commit e091c6915e3ed468d4f5299e409afa4a89436735 ]

On xmit side, there should be a check whether BD ring
has free BDs available before transmit a packet to avoid
data corruption and buffer leak issue.

Fixes: 469c6111a799 ("net/enetc: enable Rx and Tx")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/net/enetc/enetc_rxtx.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/enetc/enetc_rxtx.c b/drivers/net/enetc/enetc_rxtx.c
index ce43a9efe..ce5a542a7 100644
--- a/drivers/net/enetc/enetc_rxtx.c
+++ b/drivers/net/enetc/enetc_rxtx.c
@@ -50,9 +50,14 @@ enetc_xmit_pkts(void *tx_queue,
 {
 	struct enetc_swbd *tx_swbd;
-	int i, start;
+	int i, start, bds_to_use;
 	struct enetc_tx_bd *txbd;
 	struct enetc_bdr *tx_ring = (struct enetc_bdr *)tx_queue;
 
 	i = tx_ring->next_to_use;
+
+	bds_to_use = enetc_bd_unused(tx_ring);
+	if (bds_to_use < nb_pkts)
+		nb_pkts = bds_to_use;
+
 	start = 0;
 	while (nb_pkts--) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.368391695 +0100
+++ 0010-net-enetc-fix-crash-at-high-speed-traffic.patch	2019-05-08 11:05:05.769934017 +0100
@@ -1 +1 @@
-From e091c6915e3ed468d4f5299e409afa4a89436735 Mon Sep 17 00:00:00 2001
+From b63e66626ce3b462dda963eeea5e6940ecf5af28 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e091c6915e3ed468d4f5299e409afa4a89436735 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 0ce7dbee7..81b0ef3b1 100644
+index ce43a9efe..ce5a542a7 100644

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

* [dpdk-stable] patch 'app/testpmd: set fixed flag for exact link speed' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (8 preceding siblings ...)
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/enetc: fix crash at high speed traffic' " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:20   ` Andrew Rybchenko
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/iavf: fix info get' " Kevin Traynor
                   ` (40 subsequent siblings)
  50 siblings, 1 reply; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From fee50d95b9f544f48487546cf597668ebfba6a6d Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Fri, 12 Apr 2019 14:12:33 +0100
Subject: [PATCH] app/testpmd: set fixed flag for exact link speed

[ upstream commit bdca79053b6aea504d02691d9319fa976062457f ]

Setting exact link speed makes sense if auto-negotiation is
disabled. Fixed flag is required to disable auto-negotiation.

Fixes: 88fbedcd5e5a ("app/testpmd: move speed and duplex parsing in a function")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/cmdline.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f17ca3282..5d719a186 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1430,15 +1430,15 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
 		}
 		if (!strcmp(speedstr, "1000")) {
-			*speed = ETH_LINK_SPEED_1G;
+			*speed = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_FIXED;
 		} else if (!strcmp(speedstr, "10000")) {
-			*speed = ETH_LINK_SPEED_10G;
+			*speed = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_FIXED;
 		} else if (!strcmp(speedstr, "25000")) {
-			*speed = ETH_LINK_SPEED_25G;
+			*speed = ETH_LINK_SPEED_25G | ETH_LINK_SPEED_FIXED;
 		} else if (!strcmp(speedstr, "40000")) {
-			*speed = ETH_LINK_SPEED_40G;
+			*speed = ETH_LINK_SPEED_40G | ETH_LINK_SPEED_FIXED;
 		} else if (!strcmp(speedstr, "50000")) {
-			*speed = ETH_LINK_SPEED_50G;
+			*speed = ETH_LINK_SPEED_50G | ETH_LINK_SPEED_FIXED;
 		} else if (!strcmp(speedstr, "100000")) {
-			*speed = ETH_LINK_SPEED_100G;
+			*speed = ETH_LINK_SPEED_100G | ETH_LINK_SPEED_FIXED;
 		} else if (!strcmp(speedstr, "auto")) {
 			*speed = ETH_LINK_SPEED_AUTONEG;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.412762791 +0100
+++ 0011-app-testpmd-set-fixed-flag-for-exact-link-speed.patch	2019-05-08 11:05:05.786933661 +0100
@@ -1 +1 @@
-From bdca79053b6aea504d02691d9319fa976062457f Mon Sep 17 00:00:00 2001
+From fee50d95b9f544f48487546cf597668ebfba6a6d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bdca79053b6aea504d02691d9319fa976062457f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 2ab03c111..691d818a6 100644
+index f17ca3282..5d719a186 100644
@@ -22 +23 @@
-@@ -1441,15 +1441,15 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
+@@ -1430,15 +1430,15 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)

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

* [dpdk-stable] patch 'net/iavf: fix info get' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (9 preceding siblings ...)
  2019-05-08 10:14 ` [dpdk-stable] patch 'app/testpmd: set fixed flag for exact link speed' " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'crypto/virtio: fix IV offset' " Kevin Traynor
                   ` (39 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Qiming Yang; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 42eead7ab2bae5ecce43dc94087b6a28cf86f483 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Thu, 18 Apr 2019 00:08:34 +0800
Subject: [PATCH] net/iavf: fix info get

[ upstream commit e2403c18bf34069b8beb9af8812bb26a554aca45 ]

iavf driver reset the dev_info structure. This action will clear
the setting in core library. This patch fix that issue.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/avf/avf_ethdev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
index 797f505a8..4dc61d9fe 100644
--- a/drivers/net/avf/avf_ethdev.c
+++ b/drivers/net/avf/avf_ethdev.c
@@ -499,5 +499,4 @@ avf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	struct avf_info *vf = AVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 
-	memset(dev_info, 0, sizeof(*dev_info));
 	dev_info->max_rx_queues = vf->vsi_res->num_queue_pairs;
 	dev_info->max_tx_queues = vf->vsi_res->num_queue_pairs;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.477365151 +0100
+++ 0012-net-iavf-fix-info-get.patch	2019-05-08 11:05:05.787933640 +0100
@@ -1 +1 @@
-From e2403c18bf34069b8beb9af8812bb26a554aca45 Mon Sep 17 00:00:00 2001
+From 42eead7ab2bae5ecce43dc94087b6a28cf86f483 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e2403c18bf34069b8beb9af8812bb26a554aca45 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- drivers/net/iavf/iavf_ethdev.c | 1 -
+ drivers/net/avf/avf_ethdev.c | 1 -
@@ -18,6 +19,6 @@
-diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
-index 846e604a6..7825cbc85 100644
---- a/drivers/net/iavf/iavf_ethdev.c
-+++ b/drivers/net/iavf/iavf_ethdev.c
-@@ -499,5 +499,4 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
- 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
+index 797f505a8..4dc61d9fe 100644
+--- a/drivers/net/avf/avf_ethdev.c
++++ b/drivers/net/avf/avf_ethdev.c
+@@ -499,5 +499,4 @@ avf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+ 	struct avf_info *vf = AVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);

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

* [dpdk-stable] patch 'crypto/virtio: fix IV offset' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (10 preceding siblings ...)
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/iavf: fix info get' " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/virtio: fix buffer leak on VLAN insert' " Kevin Traynor
                   ` (38 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Fan Zhang; +Cc: Konstantin Ananyev, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From e514982217091e1a2f1d03631a33b648ba4e6e48 Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Fri, 5 Apr 2019 17:04:24 +0100
Subject: [PATCH] crypto/virtio: fix IV offset

[ upstream commit fd4fa52cbf733164176269b5cce809403d2ef227 ]

This patch fixes the incorrect iv offset calculation.

Fixes: b063e843fa03 ("crypto/virtio: fix IV physical address")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/crypto/virtio/virtio_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index e32a1ecd6..e9a63cb5a 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -204,6 +204,6 @@ virtqueue_crypto_sym_enqueue_xmit(
 	uint32_t indirect_vring_addr_offset = req_data_len +
 		sizeof(struct virtio_crypto_inhdr);
-	uint32_t indirect_iv_addr_offset = indirect_vring_addr_offset +
-			sizeof(struct vring_desc) * NUM_ENTRY_VIRTIO_CRYPTO_OP;
+	uint32_t indirect_iv_addr_offset =
+			offsetof(struct virtio_crypto_op_cookie, iv);
 	struct rte_crypto_sym_op *sym_op = cop->sym;
 	struct virtio_crypto_session *session =
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.522257777 +0100
+++ 0013-crypto-virtio-fix-IV-offset.patch	2019-05-08 11:05:05.788933619 +0100
@@ -1 +1 @@
-From fd4fa52cbf733164176269b5cce809403d2ef227 Mon Sep 17 00:00:00 2001
+From e514982217091e1a2f1d03631a33b648ba4e6e48 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fd4fa52cbf733164176269b5cce809403d2ef227 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/virtio: fix buffer leak on VLAN insert' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (11 preceding siblings ...)
  2019-05-08 10:14 ` [dpdk-stable] patch 'crypto/virtio: fix IV offset' " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/virtio-user: fix return value check' " Kevin Traynor
                   ` (37 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Jens Freimann, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 719c8cc68f4d9abaea6e55f1e652353a42eaa108 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 5 Apr 2019 09:31:15 -0700
Subject: [PATCH] net/virtio: fix buffer leak on VLAN insert

[ upstream commit 8f37e38241f291f2ae8fa7e8d0d4ec3eae50b2de ]

The function rte_vlan_insert may allocate a new buffer for the
vlan header and return a different mbuf than originally passed.
In this case, the stored mbuf in txm[] array could point to wrong
buffer.

Fixes: dd856dfcb9e7 ("virtio: use any layout on Tx")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 66b2f9f35..7f7562ddc 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -1375,4 +1375,6 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 				continue;
 			}
+			/* vlan_insert may add a header mbuf */
+			tx_pkts[nb_tx] = txm;
 		}
 
@@ -1479,4 +1481,6 @@ virtio_xmit_pkts_inorder(void *tx_queue,
 				continue;
 			}
+			/* vlan_insert may add a header mbuf */
+			tx_pkts[nb_tx] = txm;
 		}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.570015938 +0100
+++ 0014-net-virtio-fix-buffer-leak-on-VLAN-insert.patch	2019-05-08 11:05:05.789933598 +0100
@@ -1 +1 @@
-From 8f37e38241f291f2ae8fa7e8d0d4ec3eae50b2de Mon Sep 17 00:00:00 2001
+From 719c8cc68f4d9abaea6e55f1e652353a42eaa108 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f37e38241f291f2ae8fa7e8d0d4ec3eae50b2de ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- drivers/net/virtio/virtio_rxtx.c | 6 ++++++
- 1 file changed, 6 insertions(+)
+ drivers/net/virtio/virtio_rxtx.c | 4 ++++
+ 1 file changed, 4 insertions(+)
@@ -22 +23 @@
-index e6f3706d6..8c56f238f 100644
+index 66b2f9f35..7f7562ddc 100644
@@ -25,8 +26 @@
-@@ -2004,4 +2004,6 @@ virtio_xmit_pkts_packed(void *tx_queue, struct rte_mbuf **tx_pkts,
- 				continue;
- 			}
-+			/* vlan_insert may add a header mbuf */
-+			tx_pkts[nb_tx] = txm;
- 		}
- 
-@@ -2091,4 +2093,6 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -1375,4 +1375,6 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
@@ -39 +33 @@
-@@ -2194,4 +2198,6 @@ virtio_xmit_pkts_inorder(void *tx_queue,
+@@ -1479,4 +1481,6 @@ virtio_xmit_pkts_inorder(void *tx_queue,

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

* [dpdk-stable] patch 'net/virtio-user: fix return value check' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (12 preceding siblings ...)
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/virtio: fix buffer leak on VLAN insert' " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'vhost: fix device leak on connection add failure' " Kevin Traynor
                   ` (36 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Chenbo Xia; +Cc: Rami Rosen, Jens Freimann, Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From fed050b4454806c62077fbf51b7a00fc1f8eea34 Mon Sep 17 00:00:00 2001
From: Chenbo Xia <chenbo.xia@intel.com>
Date: Wed, 10 Apr 2019 02:44:05 +0000
Subject: [PATCH] net/virtio-user: fix return value check

[ upstream commit 1e9868885f2ed388e827e8ce27d4b690c9b2fb90 ]

Fix unchecked return value for fcntl.

Coverity issue: 277210
Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 drivers/net/virtio/virtio_user/vhost_user.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c
index 2c6eba0a6..0a88d5957 100644
--- a/drivers/net/virtio/virtio_user/vhost_user.c
+++ b/drivers/net/virtio/virtio_user/vhost_user.c
@@ -394,5 +394,8 @@ virtio_user_start_server(struct virtio_user_dev *dev, struct sockaddr_un *un)
 
 	flag = fcntl(fd, F_GETFL);
-	fcntl(fd, F_SETFL, flag | O_NONBLOCK);
+	if (fcntl(fd, F_SETFL, flag | O_NONBLOCK) < 0) {
+		PMD_DRV_LOG(ERR, "fcntl failed, %s", strerror(errno));
+		return -1;
+	}
 
 	return 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.618319331 +0100
+++ 0015-net-virtio-user-fix-return-value-check.patch	2019-05-08 11:05:05.790933577 +0100
@@ -1 +1 @@
-From 1e9868885f2ed388e827e8ce27d4b690c9b2fb90 Mon Sep 17 00:00:00 2001
+From fed050b4454806c62077fbf51b7a00fc1f8eea34 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1e9868885f2ed388e827e8ce27d4b690c9b2fb90 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 827a48ad6..4b74bd2d8 100644
+index 2c6eba0a6..0a88d5957 100644
@@ -24 +25 @@
-@@ -395,5 +395,8 @@ virtio_user_start_server(struct virtio_user_dev *dev, struct sockaddr_un *un)
+@@ -394,5 +394,8 @@ virtio_user_start_server(struct virtio_user_dev *dev, struct sockaddr_un *un)

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

* [dpdk-stable] patch 'vhost: fix device leak on connection add failure' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (13 preceding siblings ...)
  2019-05-08 10:14 ` [dpdk-stable] patch 'net/virtio-user: fix return value check' " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:14 ` [dpdk-stable] patch 'vhost: fix null pointer checking' " Kevin Traynor
                   ` (35 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Ilya Maximets; +Cc: David Marchand, Jens Freimann, Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 839d3d6aa1f1c26a7611d4086e51469569e9028d Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@samsung.com>
Date: Thu, 11 Apr 2019 13:23:06 +0300
Subject: [PATCH] vhost: fix device leak on connection add failure

[ upstream commit a21510e750430914a5638a8925e87609a32cbbff ]

Need to destroy allocated device if application fails to
add new connection or we have fdset failure.

Fixes: acbff5c67ea7 ("vhost: fix crash when exceeding file descriptors")
Fixes: efba12a78ddf ("vhost: add user callbacks for socket open/close")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 lib/librte_vhost/socket.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 9883b0491..c2bf023d1 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -241,5 +241,5 @@ vhost_user_add_connection(int fd, struct vhost_user_socket *vsocket)
 				"failed to add vhost user connection with fd %d\n",
 				fd);
-			goto err;
+			goto err_cleanup;
 		}
 	}
@@ -258,5 +258,5 @@ vhost_user_add_connection(int fd, struct vhost_user_socket *vsocket)
 			vsocket->notify_ops->destroy_connection(conn->vid);
 
-		goto err;
+		goto err_cleanup;
 	}
 
@@ -268,4 +268,6 @@ vhost_user_add_connection(int fd, struct vhost_user_socket *vsocket)
 	return;
 
+err_cleanup:
+	vhost_destroy_device(vid);
 err:
 	free(conn);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.665890432 +0100
+++ 0016-vhost-fix-device-leak-on-connection-add-failure.patch	2019-05-08 11:05:05.791933556 +0100
@@ -1 +1 @@
-From a21510e750430914a5638a8925e87609a32cbbff Mon Sep 17 00:00:00 2001
+From 839d3d6aa1f1c26a7611d4086e51469569e9028d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a21510e750430914a5638a8925e87609a32cbbff ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 3da9de62c..f0fdb83f7 100644
+index 9883b0491..c2bf023d1 100644

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

* [dpdk-stable] patch 'vhost: fix null pointer checking' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (14 preceding siblings ...)
  2019-05-08 10:14 ` [dpdk-stable] patch 'vhost: fix device leak on connection add failure' " Kevin Traynor
@ 2019-05-08 10:14 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'vhost: fix passing destroyed device to destroy callback' " Kevin Traynor
                   ` (34 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:14 UTC (permalink / raw)
  To: Mohammad Abdul Awal; +Cc: Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From cee8e7e8d04eb6ef8b7235c05e4d82341ab55378 Mon Sep 17 00:00:00 2001
From: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Date: Thu, 11 Apr 2019 15:48:40 +0100
Subject: [PATCH] vhost: fix null pointer checking

[ upstream commit b045785f92d9a59d2ed3d27891201d1f07c051b3 ]

Null value for parameters will cause segfault.

Fixes: d7280c9fffcb ("vhost: support selective datapath")
Fixes: 72e8543093df ("vhost: add API to get MTU value")
Fixes: a277c7159876 ("vhost: refactor code structure")
Fixes: ca33faf9ef10 ("vhost: introduce API to fetch negotiated features")
Fixes: eb32247457fe ("vhost: export guest memory regions")
Fixes: 40ef286f236a ("vhost: export vhost vring info")
Fixes: bd2e0c3fe5ac ("vhost: add APIs for live migration")
Fixes: 0b8572a0c101 ("vhost: add external message handling to the API")
Fixes: b4953225cea4 ("vhost: add APIs for datapath configuration")
Fixes: 5fbb3941da9f ("vhost: introduce driver features related APIs")
Fixes: 292959c71961 ("vhost: cleanup unix socket")

Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 lib/librte_vhost/socket.c |  8 +++++++-
 lib/librte_vhost/vdpa.c   |  5 ++++-
 lib/librte_vhost/vhost.c  | 16 ++++++++--------
 3 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index c2bf023d1..4007d9d56 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -550,4 +550,7 @@ find_vhost_user_socket(const char *path)
 	int i;
 
+	if (path == NULL)
+		return NULL;
+
 	for (i = 0; i < vhost_user.vsocket_cnt; i++) {
 		struct vhost_user_socket *vsocket = vhost_user.vsockets[i];
@@ -565,5 +568,5 @@ rte_vhost_driver_attach_vdpa_device(const char *path, int did)
 	struct vhost_user_socket *vsocket;
 
-	if (rte_vdpa_get_device(did) == NULL)
+	if (rte_vdpa_get_device(did) == NULL || path == NULL)
 		return -1;
 
@@ -964,4 +967,7 @@ rte_vhost_driver_unregister(const char *path)
 	struct vhost_user_connection *conn, *next;
 
+	if (path == NULL)
+		return -1;
+
 again:
 	pthread_mutex_lock(&vhost_user.mutex);
diff --git a/lib/librte_vhost/vdpa.c b/lib/librte_vhost/vdpa.c
index ae721e06b..f560419b1 100644
--- a/lib/librte_vhost/vdpa.c
+++ b/lib/librte_vhost/vdpa.c
@@ -50,5 +50,5 @@ rte_vdpa_register_device(struct rte_vdpa_dev_addr *addr,
 	int i;
 
-	if (vdpa_device_num >= MAX_VHOST_DEVICE)
+	if (vdpa_device_num >= MAX_VHOST_DEVICE || addr == NULL || ops == NULL)
 		return -1;
 
@@ -100,4 +100,7 @@ rte_vdpa_find_device_id(struct rte_vdpa_dev_addr *addr)
 	int i;
 
+	if (addr == NULL)
+		return -1;
+
 	for (i = 0; i < MAX_VHOST_DEVICE; ++i) {
 		dev = vdpa_devices[i];
diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 70ac6bc9c..488cf1694 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -461,5 +461,5 @@ rte_vhost_get_mtu(int vid, uint16_t *mtu)
 	struct virtio_net *dev = get_device(vid);
 
-	if (!dev)
+	if (dev == NULL || mtu == NULL)
 		return -ENODEV;
 
@@ -529,5 +529,5 @@ rte_vhost_get_ifname(int vid, char *buf, size_t len)
 	struct virtio_net *dev = get_device(vid);
 
-	if (dev == NULL)
+	if (dev == NULL || buf == NULL)
 		return -1;
 
@@ -546,5 +546,5 @@ rte_vhost_get_negotiated_features(int vid, uint64_t *features)
 
 	dev = get_device(vid);
-	if (!dev)
+	if (dev == NULL || features == NULL)
 		return -1;
 
@@ -561,5 +561,5 @@ rte_vhost_get_mem_table(int vid, struct rte_vhost_memory **mem)
 
 	dev = get_device(vid);
-	if (!dev)
+	if (dev == NULL || mem == NULL)
 		return -1;
 
@@ -584,5 +584,5 @@ rte_vhost_get_vhost_vring(int vid, uint16_t vring_idx,
 
 	dev = get_device(vid);
-	if (!dev)
+	if (dev == NULL || vring == NULL)
 		return -1;
 
@@ -777,5 +777,5 @@ int rte_vhost_get_log_base(int vid, uint64_t *log_base,
 	struct virtio_net *dev = get_device(vid);
 
-	if (!dev)
+	if (dev == NULL || log_base == NULL || log_size == NULL)
 		return -1;
 
@@ -798,5 +798,5 @@ int rte_vhost_get_vring_base(int vid, uint16_t queue_id,
 	struct virtio_net *dev = get_device(vid);
 
-	if (!dev)
+	if (dev == NULL || last_avail_idx == NULL || last_used_idx == NULL)
 		return -1;
 
@@ -819,5 +819,5 @@ int rte_vhost_set_vring_base(int vid, uint16_t queue_id,
 	struct virtio_net *dev = get_device(vid);
 
-	if (!dev)
+	if (dev == NULL)
 		return -1;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.710360401 +0100
+++ 0017-vhost-fix-null-pointer-checking.patch	2019-05-08 11:05:05.793933515 +0100
@@ -1 +1 @@
-From b045785f92d9a59d2ed3d27891201d1f07c051b3 Mon Sep 17 00:00:00 2001
+From cee8e7e8d04eb6ef8b7235c05e4d82341ab55378 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b045785f92d9a59d2ed3d27891201d1f07c051b3 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index f0fdb83f7..c7a77a5d5 100644
+index c2bf023d1..4007d9d56 100644
@@ -48 +49 @@
-@@ -978,4 +981,7 @@ rte_vhost_driver_unregister(const char *path)
+@@ -964,4 +967,7 @@ rte_vhost_driver_unregister(const char *path)
@@ -57 +58 @@
-index 321e11f17..e91548843 100644
+index ae721e06b..f560419b1 100644
@@ -76 +77 @@
-index e480aeac9..163f4595e 100644
+index 70ac6bc9c..488cf1694 100644
@@ -79 +80 @@
-@@ -448,5 +448,5 @@ rte_vhost_get_mtu(int vid, uint16_t *mtu)
+@@ -461,5 +461,5 @@ rte_vhost_get_mtu(int vid, uint16_t *mtu)
@@ -86 +87 @@
-@@ -516,5 +516,5 @@ rte_vhost_get_ifname(int vid, char *buf, size_t len)
+@@ -529,5 +529,5 @@ rte_vhost_get_ifname(int vid, char *buf, size_t len)
@@ -93 +94 @@
-@@ -533,5 +533,5 @@ rte_vhost_get_negotiated_features(int vid, uint64_t *features)
+@@ -546,5 +546,5 @@ rte_vhost_get_negotiated_features(int vid, uint64_t *features)
@@ -100 +101 @@
-@@ -548,5 +548,5 @@ rte_vhost_get_mem_table(int vid, struct rte_vhost_memory **mem)
+@@ -561,5 +561,5 @@ rte_vhost_get_mem_table(int vid, struct rte_vhost_memory **mem)
@@ -107 +108 @@
-@@ -571,5 +571,5 @@ rte_vhost_get_vhost_vring(int vid, uint16_t vring_idx,
+@@ -584,5 +584,5 @@ rte_vhost_get_vhost_vring(int vid, uint16_t vring_idx,
@@ -114 +115 @@
-@@ -764,5 +764,5 @@ int rte_vhost_get_log_base(int vid, uint64_t *log_base,
+@@ -777,5 +777,5 @@ int rte_vhost_get_log_base(int vid, uint64_t *log_base,
@@ -121 +122 @@
-@@ -778,5 +778,5 @@ int rte_vhost_get_vring_base(int vid, uint16_t queue_id,
+@@ -798,5 +798,5 @@ int rte_vhost_get_vring_base(int vid, uint16_t queue_id,
@@ -128 +129 @@
-@@ -806,5 +806,5 @@ int rte_vhost_extern_callback_register(int vid,
+@@ -819,5 +819,5 @@ int rte_vhost_set_vring_base(int vid, uint16_t queue_id,
@@ -132 +133 @@
-+	if (dev == NULL || ops == NULL)
++	if (dev == NULL)

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

* [dpdk-stable] patch 'vhost: fix passing destroyed device to destroy callback' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (15 preceding siblings ...)
  2019-05-08 10:14 ` [dpdk-stable] patch 'vhost: fix null pointer checking' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'vhost: fix silent queue enabling with legacy guests' " Kevin Traynor
                   ` (33 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Ilya Maximets; +Cc: Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 9fc9960f7c61561c44c51cc8f6cf596f1a3f85f2 Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@samsung.com>
Date: Fri, 12 Apr 2019 11:32:28 +0300
Subject: [PATCH] vhost: fix passing destroyed device to destroy callback

[ upstream commit 2344395df2e944683df87b1a47f8b64eea050d2b ]

Application should be able to obtain information like 'ifname' from
the 'vid' passed to 'destroy_connection' callback. Currently, all the
API calls with passed 'vid' fails with 'device not found'.

Fixes: efba12a78ddf ("vhost: add user callbacks for socket open/close")

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 lib/librte_vhost/socket.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 4007d9d56..097995166 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -298,11 +298,17 @@ vhost_user_read_cb(int connfd, void *dat, int *remove)
 	ret = vhost_user_msg_handler(conn->vid, connfd);
 	if (ret < 0) {
+		struct virtio_net *dev = get_device(conn->vid);
+
 		close(connfd);
 		*remove = 1;
+
+		if (dev)
+			vhost_destroy_device_notify(dev);
+
+		if (vsocket->notify_ops->destroy_connection)
+			vsocket->notify_ops->destroy_connection(conn->vid);
+
 		vhost_destroy_device(conn->vid);
 
-		if (vsocket->notify_ops->destroy_connection)
-			vsocket->notify_ops->destroy_connection(conn->vid);
-
 		pthread_mutex_lock(&vsocket->conn_mutex);
 		TAILQ_REMOVE(&vsocket->conn_list, conn, next);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.759190028 +0100
+++ 0018-vhost-fix-passing-destroyed-device-to-destroy-callba.patch	2019-05-08 11:05:05.794933494 +0100
@@ -1 +1 @@
-From 2344395df2e944683df87b1a47f8b64eea050d2b Mon Sep 17 00:00:00 2001
+From 9fc9960f7c61561c44c51cc8f6cf596f1a3f85f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2344395df2e944683df87b1a47f8b64eea050d2b ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index c7a77a5d5..274988c4d 100644
+index 4007d9d56..097995166 100644

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

* [dpdk-stable] patch 'vhost: fix silent queue enabling with legacy guests' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (16 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'vhost: fix passing destroyed device to destroy callback' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/virtio: fix dangling pointer on failure' " Kevin Traynor
                   ` (32 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Ilya Maximets; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 467038a96eb99295286f38bd673d82ec7fb04f5e Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@samsung.com>
Date: Fri, 12 Apr 2019 16:09:49 +0300
Subject: [PATCH] vhost: fix silent queue enabling with legacy guests

[ upstream commit 966027b4b3a3e1059bf31ca07340914f6b8bb53a ]

vhost should notify the application in case of all vring state changes.

In general, application should not care about negotiation of
VHOST_USER_F_PROTOCOL_FEATURES. Protocol details like this should
be hidden by the vhost library.

With this patch applications like OVS will be able to assume that
all vrings disabled by default and only process 'vring_state_changed'
events.

Fixes: 321203a54ba7 ("vhost: enable rings at the right time")

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 7952ef700..5552f8bbf 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1232,6 +1232,10 @@ vhost_user_set_vring_kick(struct virtio_net **pdev, struct VhostUserMsg *msg,
 	 * the SET_VRING_ENABLE message.
 	 */
-	if (!(dev->features & (1ULL << VHOST_USER_F_PROTOCOL_FEATURES)))
+	if (!(dev->features & (1ULL << VHOST_USER_F_PROTOCOL_FEATURES))) {
 		vq->enabled = 1;
+		if (dev->notify_ops->vring_state_changed)
+			dev->notify_ops->vring_state_changed(
+				dev->vid, file.index, 1);
+	}
 
 	if (vq->kickfd >= 0)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.804225937 +0100
+++ 0019-vhost-fix-silent-queue-enabling-with-legacy-guests.patch	2019-05-08 11:05:05.796933452 +0100
@@ -1 +1 @@
-From 966027b4b3a3e1059bf31ca07340914f6b8bb53a Mon Sep 17 00:00:00 2001
+From 467038a96eb99295286f38bd673d82ec7fb04f5e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 966027b4b3a3e1059bf31ca07340914f6b8bb53a ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 23beed97d..c9e29ece8 100644
+index 7952ef700..5552f8bbf 100644

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

* [dpdk-stable] patch 'net/virtio: fix dangling pointer on failure' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (17 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'vhost: fix silent queue enabling with legacy guests' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/i40e: fix logging on VF close' " Kevin Traynor
                   ` (31 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Aaron Conole; +Cc: Michael Santana, Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 9960f97eba5b60118b7e2f7c17117fbf4a28730f Mon Sep 17 00:00:00 2001
From: Aaron Conole <aconole@redhat.com>
Date: Mon, 15 Apr 2019 10:48:18 -0400
Subject: [PATCH] net/virtio: fix dangling pointer on failure

[ upstream commit 7dee8c79483e370a346d68060b0b890b273e9a46 ]

When eth_virtio_dev_init() is cleaning up, it does not correctly set
the mac_addrs variable to NULL, which will lead to a double free.

Found during unit-test fixes.

Fixes: 43d18765c027 ("net/virtio: fix memory leak on failure")

Reported-by: Michael Santana <msantana@redhat.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index a1e3752a8..f938b7cef 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1709,4 +1709,5 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
 out:
 	rte_free(eth_dev->data->mac_addrs);
+	eth_dev->data->mac_addrs = NULL;
 	return ret;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.853650924 +0100
+++ 0020-net-virtio-fix-dangling-pointer-on-failure.patch	2019-05-08 11:05:05.798933410 +0100
@@ -1 +1 @@
-From 7dee8c79483e370a346d68060b0b890b273e9a46 Mon Sep 17 00:00:00 2001
+From 9960f97eba5b60118b7e2f7c17117fbf4a28730f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7dee8c79483e370a346d68060b0b890b273e9a46 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 2272bb2e5..d25c08f0a 100644
+index a1e3752a8..f938b7cef 100644
@@ -25 +26 @@
-@@ -1863,4 +1863,5 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1709,4 +1709,5 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)

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

* [dpdk-stable] patch 'net/i40e: fix logging on VF close' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (18 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/virtio: fix dangling pointer on failure' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/mlx5: fix memory region cleanup' " Kevin Traynor
                   ` (30 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 03f418f7f68ea6380bfbae4891f33e1c11bd01c5 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Thu, 18 Apr 2019 13:52:27 +0800
Subject: [PATCH] net/i40e: fix logging on VF close

[ upstream commit 108e9b0fec14b47127b79ef953af19cbf3b425d7 ]

When launch testpmd with VF and quit testpmd, there'll
be lots of messages "i40evf_handle_aq_msg(): Request 0
is not supported yet", which are triggered during VF
reset and VF needn't do anything. So cancel alarm handler
before VF reset to ignore the admin queue messages.

Fixes: e0e6a7f2154e ("net/i40e: cancel alarm handler at the end of closure")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index ae0812bff..551f6fa61 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2262,9 +2262,9 @@ i40evf_dev_close(struct rte_eth_dev *dev)
 	i40evf_dev_promiscuous_disable(dev);
 	i40evf_dev_allmulticast_disable(dev);
+	rte_eal_alarm_cancel(i40evf_dev_alarm_handler, dev);
 
 	i40evf_reset_vf(dev);
 	i40e_shutdown_adminq(hw);
 	i40evf_disable_irq0(hw);
-	rte_eal_alarm_cancel(i40evf_dev_alarm_handler, dev);
 	hw->adapter_closed = 1;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.901587277 +0100
+++ 0021-net-i40e-fix-logging-on-VF-close.patch	2019-05-08 11:05:05.801933347 +0100
@@ -1 +1 @@
-From 108e9b0fec14b47127b79ef953af19cbf3b425d7 Mon Sep 17 00:00:00 2001
+From 03f418f7f68ea6380bfbae4891f33e1c11bd01c5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 108e9b0fec14b47127b79ef953af19cbf3b425d7 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 87c45f278..a34897293 100644
+index ae0812bff..551f6fa61 100644
@@ -25 +26 @@
-@@ -2325,9 +2325,9 @@ i40evf_dev_close(struct rte_eth_dev *dev)
+@@ -2262,9 +2262,9 @@ i40evf_dev_close(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/mlx5: fix memory region cleanup' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (19 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/i40e: fix logging on VF close' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/mlx4: " Kevin Traynor
                   ` (29 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Yongseok Koh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From a4d0145b1b580f192de496feb5c8974dbaaa472f Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Fri, 12 Apr 2019 15:45:27 +0000
Subject: [PATCH] net/mlx5: fix memory region cleanup

[ upstream commit f8753eae84041a7f5ea19434e80651cc2a9a9162 ]

mlx5 driver has a global list of Memory Regions created by
device, and there is a ml5_mr_release() routine which makes
a memory cleanup at device closing. The head of device MR list
was fetched outside the rwlock protected section. Also some
noticed typos are fixed.

Fixes: 974f1e7ef146 ("net/mlx5: add new memory region support")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_mr.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c
index e255650ad..01bf59106 100644
--- a/drivers/net/mlx5/mlx5_mr.c
+++ b/drivers/net/mlx5/mlx5_mr.c
@@ -466,5 +466,5 @@ mr_free(struct mlx5_mr *mr)
 
 /**
- * Releass resources of detached MR having no online entry.
+ * Release resources of detached MR having no online entry.
  *
  * @param dev
@@ -516,5 +516,5 @@ mr_find_contig_memsegs_cb(const struct rte_memseg_list *msl,
 
 /**
- * Create a new global Memroy Region (MR) for a missing virtual address.
+ * Create a new global Memory Region (MR) for a missing virtual address.
  * Register entire virtually contiguous memory chunk around the address.
  *
@@ -624,5 +624,5 @@ alloc_resources:
 	mr->ms_bmp = rte_bitmap_init(ms_n, bmp_mem, bmp_size);
 	if (mr->ms_bmp == NULL) {
-		DEBUG("port %u unable to initialize bitamp for a new MR of"
+		DEBUG("port %u unable to initialize bitmap for a new MR of"
 		      " address (%p).",
 		      dev->data->port_id, (void *)addr);
@@ -1351,5 +1351,5 @@ mlx5_mr_release(struct rte_eth_dev *dev)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_mr *mr_next = LIST_FIRST(&priv->mr.mr_list);
+	struct mlx5_mr *mr_next;
 
 	/* Remove from memory callback device list. */
@@ -1361,4 +1361,5 @@ mlx5_mr_release(struct rte_eth_dev *dev)
 	rte_rwlock_write_lock(&priv->mr.rwlock);
 	/* Detach from MR list and move to free list. */
+	mr_next = LIST_FIRST(&priv->mr.mr_list);
 	while (mr_next != NULL) {
 		struct mlx5_mr *mr = mr_next;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.949187622 +0100
+++ 0022-net-mlx5-fix-memory-region-cleanup.patch	2019-05-08 11:05:05.802933326 +0100
@@ -1 +1 @@
-From f8753eae84041a7f5ea19434e80651cc2a9a9162 Mon Sep 17 00:00:00 2001
+From a4d0145b1b580f192de496feb5c8974dbaaa472f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f8753eae84041a7f5ea19434e80651cc2a9a9162 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- drivers/net/mlx5/mlx5_mr.c | 13 +++++++------
- 1 file changed, 7 insertions(+), 6 deletions(-)
+ drivers/net/mlx5/mlx5_mr.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
@@ -22 +23 @@
-index 44b65916d..a3732d47c 100644
+index e255650ad..01bf59106 100644
@@ -25 +26 @@
-@@ -467,5 +467,5 @@ mr_free(struct mlx5_mr *mr)
+@@ -466,5 +466,5 @@ mr_free(struct mlx5_mr *mr)
@@ -32,8 +33 @@
-@@ -517,5 +517,5 @@ mr_find_contig_memsegs_cb(const struct rte_memseg_list *msl,
- 
- /**
-- * Create a new global Memroy Region (MR) for a missing virtual address.
-+ * Create a new global Memory Region (MR) for a missing virtual address.
-  * This API should be called on a secondary process, then a request is sent to
-  * the primary process in order to create a MR for the address. As the global MR
-@@ -563,5 +563,5 @@ mlx5_mr_create_secondary(struct rte_eth_dev *dev, struct mlx5_mr_cache *entry,
+@@ -516,5 +516,5 @@ mr_find_contig_memsegs_cb(const struct rte_memseg_list *msl,
@@ -45,2 +39,2 @@
-  * This must be called from the primary process.
-@@ -674,5 +674,5 @@ alloc_resources:
+  *
+@@ -624,5 +624,5 @@ alloc_resources:
@@ -53,8 +47 @@
-@@ -812,5 +812,5 @@ err_nolock:
- 
- /**
-- * Create a new global Memroy Region (MR) for a missing virtual address.
-+ * Create a new global Memory Region (MR) for a missing virtual address.
-  * This can be called from primary and secondary process.
-  *
-@@ -1601,5 +1601,5 @@ mlx5_mr_release(struct rte_eth_dev *dev)
+@@ -1351,5 +1351,5 @@ mlx5_mr_release(struct rte_eth_dev *dev)
@@ -67 +54 @@
-@@ -1611,4 +1611,5 @@ mlx5_mr_release(struct rte_eth_dev *dev)
+@@ -1361,4 +1361,5 @@ mlx5_mr_release(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/mlx4: fix memory region cleanup' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (20 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/mlx5: fix memory region cleanup' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/cxgbe: fix colliding function names' " Kevin Traynor
                   ` (28 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Yongseok Koh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From eb4a74ffa52b4b23822abb9bbd6afaba2d424687 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Mon, 15 Apr 2019 08:40:58 +0000
Subject: [PATCH] net/mlx4: fix memory region cleanup

[ upstream commit 897dbd3c861d6c78e751a6bdc6061305f65bab00 ]

mlx4 driver has a global list of Memory Regions created by
device, and there is a ml4_mr_release() routine which makes
a memory cleanup at device closing. The head of device MR list
was fetched outside the rwlock protected section. Also some
noticed typos are fixed.

Fixes: 9797bfcce1c9 ("net/mlx4: add new memory region support")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx4/mlx4_mr.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx4/mlx4_mr.c b/drivers/net/mlx4/mlx4_mr.c
index 0d83d81e6..98c236fb7 100644
--- a/drivers/net/mlx4/mlx4_mr.c
+++ b/drivers/net/mlx4/mlx4_mr.c
@@ -478,5 +478,5 @@ mr_free(struct mlx4_mr *mr)
 
 /**
- * Releass resources of detached MR having no online entry.
+ * Release resources of detached MR having no online entry.
  *
  * @param dev
@@ -526,5 +526,5 @@ mr_find_contig_memsegs_cb(const struct rte_memseg_list *msl,
 
 /**
- * Create a new global Memroy Region (MR) for a missing virtual address.
+ * Create a new global Memory Region (MR) for a missing virtual address.
  * Register entire virtually contiguous memory chunk around the address.
  *
@@ -624,5 +624,5 @@ alloc_resources:
 	mr->ms_bmp = rte_bitmap_init(ms_n, bmp_mem, bmp_size);
 	if (mr->ms_bmp == NULL) {
-		WARN("port %u unable to initialize bitamp for a new MR of"
+		WARN("port %u unable to initialize bitmap for a new MR of"
 		     " address (%p).",
 		     dev->data->port_id, (void *)addr);
@@ -1330,5 +1330,5 @@ mlx4_mr_release(struct rte_eth_dev *dev)
 {
 	struct mlx4_priv *priv = dev->data->dev_private;
-	struct mlx4_mr *mr_next = LIST_FIRST(&priv->mr.mr_list);
+	struct mlx4_mr *mr_next;
 
 	/* Remove from memory callback device list. */
@@ -1341,4 +1341,5 @@ mlx4_mr_release(struct rte_eth_dev *dev)
 	rte_rwlock_write_lock(&priv->mr.rwlock);
 	/* Detach from MR list and move to free list. */
+	mr_next = LIST_FIRST(&priv->mr.mr_list);
 	while (mr_next != NULL) {
 		struct mlx4_mr *mr = mr_next;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:06.994157111 +0100
+++ 0023-net-mlx4-fix-memory-region-cleanup.patch	2019-05-08 11:05:05.804933284 +0100
@@ -1 +1 @@
-From 897dbd3c861d6c78e751a6bdc6061305f65bab00 Mon Sep 17 00:00:00 2001
+From eb4a74ffa52b4b23822abb9bbd6afaba2d424687 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 897dbd3c861d6c78e751a6bdc6061305f65bab00 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- drivers/net/mlx4/mlx4_mr.c | 13 +++++++------
- 1 file changed, 7 insertions(+), 6 deletions(-)
+ drivers/net/mlx4/mlx4_mr.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
@@ -22 +23 @@
-index ad7d4832f..48d458ad4 100644
+index 0d83d81e6..98c236fb7 100644
@@ -32,8 +33 @@
-@@ -528,5 +528,5 @@ mr_find_contig_memsegs_cb(const struct rte_memseg_list *msl,
- 
- /**
-- * Create a new global Memroy Region (MR) for a missing virtual address.
-+ * Create a new global Memory Region (MR) for a missing virtual address.
-  * This API should be called on a secondary process, then a request is sent to
-  * the primary process in order to create a MR for the address. As the global MR
-@@ -574,5 +574,5 @@ mlx4_mr_create_secondary(struct rte_eth_dev *dev, struct mlx4_mr_cache *entry,
+@@ -526,5 +526,5 @@ mr_find_contig_memsegs_cb(const struct rte_memseg_list *msl,
@@ -45,2 +39,2 @@
-  * This must be called from the primary process.
-@@ -683,5 +683,5 @@ alloc_resources:
+  *
+@@ -624,5 +624,5 @@ alloc_resources:
@@ -53,8 +47 @@
-@@ -821,5 +821,5 @@ err_nolock:
- 
- /**
-- * Create a new global Memroy Region (MR) for a missing virtual address.
-+ * Create a new global Memory Region (MR) for a missing virtual address.
-  * This can be called from primary and secondary process.
-  *
-@@ -1435,5 +1435,5 @@ mlx4_mr_release(struct rte_eth_dev *dev)
+@@ -1330,5 +1330,5 @@ mlx4_mr_release(struct rte_eth_dev *dev)
@@ -67 +54 @@
-@@ -1446,4 +1446,5 @@ mlx4_mr_release(struct rte_eth_dev *dev)
+@@ -1341,4 +1341,5 @@ mlx4_mr_release(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/cxgbe: fix colliding function names' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (21 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/mlx4: " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/tap: fix multi process reply buffer' " Kevin Traynor
                   ` (27 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, Rahul Lakkireddy, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 2a7dc0c595e48482888860ed4390511b0354cbf8 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 19 Apr 2019 12:44:25 +0100
Subject: [PATCH] net/cxgbe: fix colliding function names

[ upstream commit b7fd9ea8425acd6851663e148765c6612cbd3fbb ]

This driver defines lots of functions (like init_rss) which are intended
to only be used in this device. But when doing static linking these
global functions cause link failures when similar function name is
used in application.

This patch prefixes all functions defined in cxgbe.h with cxgbe_
to avoid these kind of conflicts.

Fixes: bfcb257d3014 ("net/cxgbe: enable RSS for VF")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/cxgbe.h        | 24 ++++++++++-----------
 drivers/net/cxgbe/cxgbe_ethdev.c | 15 ++++++-------
 drivers/net/cxgbe/cxgbe_main.c   | 36 ++++++++++++++++----------------
 drivers/net/cxgbe/cxgbevf_main.c | 10 ++++-----
 4 files changed, 42 insertions(+), 43 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index eb58f8802..cf2621344 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -53,5 +53,5 @@
 #define CXGBE_DEVARG_FORCE_LINK_UP "force_link_up"
 
-bool force_linkup(struct adapter *adap);
+bool cxgbe_force_linkup(struct adapter *adap);
 int cxgbe_probe(struct adapter *adapter);
 int cxgbevf_probe(struct adapter *adapter);
@@ -66,18 +66,16 @@ void cxgbe_stats_reset(struct port_info *pi);
 int cxgbe_poll_for_completion(struct sge_rspq *q, unsigned int us,
 			      unsigned int cnt, struct t4_completion *c);
-int link_start(struct port_info *pi);
-void init_rspq(struct adapter *adap, struct sge_rspq *q, unsigned int us,
-	       unsigned int cnt, unsigned int size, unsigned int iqe_size);
-int setup_sge_fwevtq(struct adapter *adapter);
-int setup_sge_ctrl_txq(struct adapter *adapter);
-void cfg_queues(struct rte_eth_dev *eth_dev);
-int cfg_queue_count(struct rte_eth_dev *eth_dev);
-int init_rss(struct adapter *adap);
-int setup_rss(struct port_info *pi);
+int cxgbe_link_start(struct port_info *pi);
+int cxgbe_setup_sge_fwevtq(struct adapter *adapter);
+int cxgbe_setup_sge_ctrl_txq(struct adapter *adapter);
+void cxgbe_cfg_queues(struct rte_eth_dev *eth_dev);
+int cxgbe_cfg_queue_count(struct rte_eth_dev *eth_dev);
+int cxgbe_init_rss(struct adapter *adap);
+int cxgbe_setup_rss(struct port_info *pi);
 void cxgbe_enable_rx_queues(struct port_info *pi);
-void print_port_info(struct adapter *adap);
-void print_adapter_info(struct adapter *adap);
+void cxgbe_print_port_info(struct adapter *adap);
+void cxgbe_print_adapter_info(struct adapter *adap);
 int cxgbe_get_devargs(struct rte_devargs *devargs, const char *key);
-void configure_max_ethqsets(struct adapter *adapter);
+void cxgbe_configure_max_ethqsets(struct adapter *adapter);
 
 #endif /* _CXGBE_H_ */
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index b2f83ea37..7babdfb49 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -201,5 +201,6 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
 
 		/* Exit if link status changed or always forced up */
-		if (pi->link_cfg.link_ok != old_link || force_linkup(adapter))
+		if (pi->link_cfg.link_ok != old_link ||
+		    cxgbe_force_linkup(adapter))
 			break;
 
@@ -210,5 +211,5 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
 	}
 
-	new_link.link_status = force_linkup(adapter) ?
+	new_link.link_status = cxgbe_force_linkup(adapter) ?
 			       ETH_LINK_UP : pi->link_cfg.link_ok;
 	new_link.link_autoneg = pi->link_cfg.autoneg;
@@ -357,5 +358,5 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
 	cxgbe_enable_rx_queues(pi);
 
-	err = setup_rss(pi);
+	err = cxgbe_setup_rss(pi);
 	if (err)
 		goto out;
@@ -373,5 +374,5 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
 	}
 
-	err = link_start(pi);
+	err = cxgbe_link_start(pi);
 	if (err)
 		goto out;
@@ -413,10 +414,10 @@ int cxgbe_dev_configure(struct rte_eth_dev *eth_dev)
 
 	if (!(adapter->flags & FW_QUEUE_BOUND)) {
-		err = setup_sge_fwevtq(adapter);
+		err = cxgbe_setup_sge_fwevtq(adapter);
 		if (err)
 			return err;
 		adapter->flags |= FW_QUEUE_BOUND;
 		if (is_pf4(adapter)) {
-			err = setup_sge_ctrl_txq(adapter);
+			err = cxgbe_setup_sge_ctrl_txq(adapter);
 			if (err)
 				return err;
@@ -424,5 +425,5 @@ int cxgbe_dev_configure(struct rte_eth_dev *eth_dev)
 	}
 
-	err = cfg_queue_count(eth_dev);
+	err = cxgbe_cfg_queue_count(eth_dev);
 	if (err)
 		return err;
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 5fa6cdd05..6a3cbc1e5 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -117,5 +117,5 @@ out:
  * Setup sge control queues to pass control information.
  */
-int setup_sge_ctrl_txq(struct adapter *adapter)
+int cxgbe_setup_sge_ctrl_txq(struct adapter *adapter)
 {
 	struct sge *s = &adapter->sge;
@@ -191,5 +191,5 @@ int cxgbe_poll_for_completion(struct sge_rspq *q, unsigned int ms,
 }
 
-int setup_sge_fwevtq(struct adapter *adapter)
+int cxgbe_setup_sge_fwevtq(struct adapter *adapter)
 {
 	struct sge *s = &adapter->sge;
@@ -466,5 +466,5 @@ static inline bool is_x_10g_port(const struct link_config *lc)
 }
 
-inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
+static inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
 		      unsigned int us, unsigned int cnt,
 		      unsigned int size, unsigned int iqe_size)
@@ -476,5 +476,5 @@ inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
 }
 
-int cfg_queue_count(struct rte_eth_dev *eth_dev)
+int cxgbe_cfg_queue_count(struct rte_eth_dev *eth_dev)
 {
 	struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
@@ -503,5 +503,5 @@ int cfg_queue_count(struct rte_eth_dev *eth_dev)
 }
 
-void cfg_queues(struct rte_eth_dev *eth_dev)
+void cxgbe_cfg_queues(struct rte_eth_dev *eth_dev)
 {
 	struct rte_config *config = rte_eal_get_configuration();
@@ -597,5 +597,5 @@ static void setup_memwin(struct adapter *adap)
 }
 
-int init_rss(struct adapter *adap)
+int cxgbe_init_rss(struct adapter *adap)
 {
 	unsigned int i;
@@ -624,5 +624,5 @@ int init_rss(struct adapter *adap)
  * Dump basic information about the adapter.
  */
-void print_adapter_info(struct adapter *adap)
+void cxgbe_print_adapter_info(struct adapter *adap)
 {
 	/**
@@ -632,5 +632,5 @@ void print_adapter_info(struct adapter *adap)
 }
 
-void print_port_info(struct adapter *adap)
+void cxgbe_print_port_info(struct adapter *adap)
 {
 	int i;
@@ -780,5 +780,5 @@ static void configure_pcie_ext_tag(struct adapter *adapter)
 
 /* Figure out how many Queue Sets we can support */
-void configure_max_ethqsets(struct adapter *adapter)
+void cxgbe_configure_max_ethqsets(struct adapter *adapter)
 {
 	unsigned int ethqsets;
@@ -1269,5 +1269,5 @@ static int adap_init0(struct adapter *adap)
 	configure_pcie_ext_tag(adap);
 	configure_vlan_types(adap);
-	configure_max_ethqsets(adap);
+	cxgbe_configure_max_ethqsets(adap);
 
 	adap->params.drv_memwin = MEMWIN_NIC;
@@ -1323,5 +1323,5 @@ void t4_os_portmod_changed(const struct adapter *adap, int port_id)
 }
 
-inline bool force_linkup(struct adapter *adap)
+bool cxgbe_force_linkup(struct adapter *adap)
 {
 	struct rte_pci_device *pdev = adap->pdev;
@@ -1341,5 +1341,5 @@ inline bool force_linkup(struct adapter *adap)
  * Performs the MAC and PHY actions needed to enable a port.
  */
-int link_start(struct port_info *pi)
+int cxgbe_link_start(struct port_info *pi)
 {
 	struct adapter *adapter = pi->adapter;
@@ -1383,5 +1383,5 @@ int link_start(struct port_info *pi)
 	}
 
-	if (ret == 0 && force_linkup(adapter))
+	if (ret == 0 && cxgbe_force_linkup(adapter))
 		pi->eth_dev->data->dev_link.link_status = ETH_LINK_UP;
 	return ret;
@@ -1491,5 +1491,5 @@ int cxgbe_write_rss(const struct port_info *pi, const u16 *queues)
  * table has plenty of entries.
  */
-int setup_rss(struct port_info *pi)
+int cxgbe_setup_rss(struct port_info *pi)
 {
 	int j, err;
@@ -1865,8 +1865,8 @@ allocate_mac:
 	}
 
-	cfg_queues(adapter->eth_dev);
+	cxgbe_cfg_queues(adapter->eth_dev);
 
-	print_adapter_info(adapter);
-	print_port_info(adapter);
+	cxgbe_print_adapter_info(adapter);
+	cxgbe_print_port_info(adapter);
 
 	adapter->clipt = t4_init_clip_tbl(adapter->clipt_start,
@@ -1910,5 +1910,5 @@ allocate_mac:
 	}
 
-	err = init_rss(adapter);
+	err = cxgbe_init_rss(adapter);
 	if (err)
 		goto out_free;
diff --git a/drivers/net/cxgbe/cxgbevf_main.c b/drivers/net/cxgbe/cxgbevf_main.c
index 61bd85193..c46bc98a4 100644
--- a/drivers/net/cxgbe/cxgbevf_main.c
+++ b/drivers/net/cxgbe/cxgbevf_main.c
@@ -51,5 +51,5 @@ static void size_nports_qsets(struct adapter *adapter)
 	}
 
-	configure_max_ethqsets(adapter);
+	cxgbe_configure_max_ethqsets(adapter);
 	if (adapter->sge.max_ethqsets < adapter->params.nports) {
 		dev_warn(adapter->pdev_dev, "only using %d of %d available"
@@ -269,7 +269,7 @@ allocate_mac:
 	}
 
-	cfg_queues(adapter->eth_dev);
-	print_adapter_info(adapter);
-	print_port_info(adapter);
+	cxgbe_cfg_queues(adapter->eth_dev);
+	cxgbe_print_adapter_info(adapter);
+	cxgbe_print_port_info(adapter);
 
 	adapter->mpstcam = t4_init_mpstcam(adapter);
@@ -278,5 +278,5 @@ allocate_mac:
 			 "VF could not allocate mps tcam table. Continuing\n");
 
-	err = init_rss(adapter);
+	err = cxgbe_init_rss(adapter);
 	if (err)
 		goto out_free;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.041527231 +0100
+++ 0024-net-cxgbe-fix-colliding-function-names.patch	2019-05-08 11:05:05.807933222 +0100
@@ -1 +1 @@
-From b7fd9ea8425acd6851663e148765c6612cbd3fbb Mon Sep 17 00:00:00 2001
+From 2a7dc0c595e48482888860ed4390511b0354cbf8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b7fd9ea8425acd6851663e148765c6612cbd3fbb ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 5a7490f91..6af3ee79b 100644
+index eb58f8802..cf2621344 100644
@@ -68 +69 @@
-index 833dd1f5f..01d256da0 100644
+index b2f83ea37..7babdfb49 100644
@@ -121 +122 @@
-index fd0707b95..28c3c66ba 100644
+index 5fa6cdd05..6a3cbc1e5 100644
@@ -242 +243 @@
-index f440b4345..0ac2d98eb 100644
+index 61bd85193..c46bc98a4 100644

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

* [dpdk-stable] patch 'net/tap: fix multi process reply buffer' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (22 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/cxgbe: fix colliding function names' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'bus/vmbus: fix resource leak on error' " Kevin Traynor
                   ` (26 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Herakliusz Lipiec; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 51c1632abb21c9e0f0b8fb8e5282fd3e55c050b7 Mon Sep 17 00:00:00 2001
From: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Date: Fri, 19 Apr 2019 11:28:52 +0100
Subject: [PATCH] net/tap: fix multi process reply buffer

[ upstream commit 7dccd4e02bcf6eff6480e6ddc8d066b38b3ffc89 ]

A successful call to rte_mp_request_sync does not guarantee that there
are any messages in the buffer, and this should be checked for before
accessing data in the message. Buffer can be empty if IPC is disabled or
if we decide to ignore replies.

Fixes: c9aa56edec8e ("net/tap: access primary process queues from secondary")

Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index d16bc8c7f..551f4d3a2 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2072,5 +2072,5 @@ tap_mp_attach_queues(const char *port_name, struct rte_eth_dev *dev)
 	/* Send request and receive reply */
 	ret = rte_mp_request_sync(&request, &replies, &timeout);
-	if (ret < 0) {
+	if (ret < 0 || replies.nb_received != 1) {
 		TAP_LOG(ERR, "Failed to request queues from primary: %d",
 			rte_errno);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.089298193 +0100
+++ 0025-net-tap-fix-multi-process-reply-buffer.patch	2019-05-08 11:05:05.809933180 +0100
@@ -1 +1 @@
-From 7dccd4e02bcf6eff6480e6ddc8d066b38b3ffc89 Mon Sep 17 00:00:00 2001
+From 51c1632abb21c9e0f0b8fb8e5282fd3e55c050b7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7dccd4e02bcf6eff6480e6ddc8d066b38b3ffc89 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index e9fda8cf6..7f74b5dc9 100644
+index d16bc8c7f..551f4d3a2 100644
@@ -24 +25 @@
-@@ -2102,5 +2102,5 @@ tap_mp_attach_queues(const char *port_name, struct rte_eth_dev *dev)
+@@ -2072,5 +2072,5 @@ tap_mp_attach_queues(const char *port_name, struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'bus/vmbus: fix resource leak on error' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (23 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/tap: fix multi process reply buffer' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'app/bbdev: replace sprintf with snprintf or strlcpy' " Kevin Traynor
                   ` (25 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 83280795ebec271266b3dd466685134ddef18888 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 17 Apr 2019 11:45:06 -0700
Subject: [PATCH] bus/vmbus: fix resource leak on error

[ upstream commit 26ed007067e86bb3d587c048d130cd13bee6b07a ]

If secondary process attempt to mmap the resource resulted in
the wrong address, then it would leave behind the bad mmap.

Coverity issue: 337675, 337664
Fixes: 2a28a502c607 ("bus/vmbus: map ring in secondary process")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
 drivers/bus/vmbus/linux/vmbus_uio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/vmbus/linux/vmbus_uio.c b/drivers/bus/vmbus/linux/vmbus_uio.c
index a6b3e9201..7cab5c19f 100644
--- a/drivers/bus/vmbus/linux/vmbus_uio.c
+++ b/drivers/bus/vmbus/linux/vmbus_uio.c
@@ -284,8 +284,10 @@ vmbus_uio_map_secondary_subchan(const struct rte_vmbus_device *dev,
 		VMBUS_LOG(ERR,
 			  "mmap subchan %u in secondary failed", chan->relid);
-	else
+	else {
 		VMBUS_LOG(ERR,
 			  "mmap subchan %u in secondary address mismatch",
 			  chan->relid);
+		vmbus_unmap_resource(mapaddr, 2 * ring_size);
+	}
 	return -1;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.137443768 +0100
+++ 0026-bus-vmbus-fix-resource-leak-on-error.patch	2019-05-08 11:05:05.810933159 +0100
@@ -1 +1 @@
-From 26ed007067e86bb3d587c048d130cd13bee6b07a Mon Sep 17 00:00:00 2001
+From 83280795ebec271266b3dd466685134ddef18888 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 26ed007067e86bb3d587c048d130cd13bee6b07a ]
+
@@ -14,3 +16,2 @@
- drivers/bus/vmbus/linux/vmbus_uio.c  | 4 +++-
- drivers/bus/vmbus/vmbus_common_uio.c | 4 +++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
+ drivers/bus/vmbus/linux/vmbus_uio.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
@@ -19 +20 @@
-index fb60ee126..be6b677f9 100644
+index a6b3e9201..7cab5c19f 100644
@@ -34,15 +34,0 @@
-diff --git a/drivers/bus/vmbus/vmbus_common_uio.c b/drivers/bus/vmbus/vmbus_common_uio.c
-index 1aa5cb2e4..8e476f2ea 100644
---- a/drivers/bus/vmbus/vmbus_common_uio.c
-+++ b/drivers/bus/vmbus/vmbus_common_uio.c
-@@ -76,7 +76,9 @@ vmbus_uio_map_secondary(struct rte_vmbus_device *dev)
- 			VMBUS_LOG(ERR,
- 				  "mmap resource %d in secondary failed", i);
--		else
-+		else {
- 			VMBUS_LOG(ERR,
- 				  "mmap resource %d address mismatch", i);
-+			vmbus_unmap_resource(mapaddr, uio_res->maps[i].size);
-+		}
- 
- 		close(fd);

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

* [dpdk-stable] patch 'app/bbdev: replace sprintf with snprintf or strlcpy' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (24 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'bus/vmbus: fix resource leak on error' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'power: fix thread-safety environment modification' " Kevin Traynor
                   ` (24 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Pallantla Poornima; +Cc: Amr Mokhtar, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 1fa39537a7b8c6df6de07fa2a245be93abd8a581 Mon Sep 17 00:00:00 2001
From: Pallantla Poornima <pallantlax.poornima@intel.com>
Date: Tue, 9 Apr 2019 14:05:40 +0100
Subject: [PATCH] app/bbdev: replace sprintf with snprintf or strlcpy

[ upstream commit cde417155fa3dd351c230731ddfc8db3f57db227 ]

sprintf function is not secure as it doesn't check the length of string.
More secure function snprintf and strlcpy is used.

Fixes: f714a18885 ("app/testbbdev: add test application for bbdev")

Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
---
 app/test-bbdev/test_bbdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c
index a914817bc..137c74cde 100644
--- a/app/test-bbdev/test_bbdev.c
+++ b/app/test-bbdev/test_bbdev.c
@@ -15,4 +15,6 @@
 #include <rte_bbdev_op.h>
 #include <rte_bbdev_pmd.h>
+#include<string.h>
+#include <rte_string_fns.h>
 
 #include "main.h"
@@ -789,5 +791,5 @@ test_bbdev_driver_init(void)
 	/* Initialize the maximum amount of devices */
 	do {
-		sprintf(name_tmp, "%s%i", "name_", num_devs);
+		snprintf(name_tmp, sizeof(name_tmp), "%s%i", "name_", num_devs);
 		dev2 = rte_bbdev_allocate(name_tmp);
 		TEST_ASSERT(dev2 != NULL,
@@ -796,5 +798,5 @@ test_bbdev_driver_init(void)
 	} while (num_devs < (RTE_BBDEV_MAX_DEVS - 1));
 
-	sprintf(name_tmp, "%s%i", "name_", num_devs);
+	snprintf(name_tmp, sizeof(name_tmp), "%s%i", "name_", num_devs);
 	dev2 = rte_bbdev_allocate(name_tmp);
 	TEST_ASSERT(dev2 == NULL, "Failed to initialize bbdev driver number %d "
@@ -805,5 +807,5 @@ test_bbdev_driver_init(void)
 
 	while (num_devs >= num_devs_tmp) {
-		sprintf(name_tmp, "%s%i", "name_", num_devs);
+		snprintf(name_tmp, sizeof(name_tmp), "%s%i", "name_", num_devs);
 		dev2 = rte_bbdev_get_named_dev(name_tmp);
 		TEST_ASSERT_SUCCESS(rte_bbdev_release(dev2),
@@ -826,5 +828,5 @@ test_bbdev_driver_init(void)
 			"Failed to uninitialize bbdev driver with NULL bbdev");
 
-	sprintf(name_tmp, "%s", "invalid_name");
+	strlcpy(name_tmp, "invalid_name", sizeof(name_tmp));
 	dev2 = rte_bbdev_get_named_dev(name_tmp);
 	TEST_ASSERT_FAIL(rte_bbdev_release(dev2),
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.181621673 +0100
+++ 0027-app-bbdev-replace-sprintf-with-snprintf-or-strlcpy.patch	2019-05-08 11:05:05.811933138 +0100
@@ -1 +1 @@
-From cde417155fa3dd351c230731ddfc8db3f57db227 Mon Sep 17 00:00:00 2001
+From 1fa39537a7b8c6df6de07fa2a245be93abd8a581 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cde417155fa3dd351c230731ddfc8db3f57db227 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'power: fix thread-safety environment modification' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (25 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'app/bbdev: replace sprintf with snprintf or strlcpy' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix resource leak' " Kevin Traynor
                   ` (23 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Marcin Hajkowski; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 3c2019093661e477b4b01753b9d0ad0b545b13e2 Mon Sep 17 00:00:00 2001
From: Marcin Hajkowski <marcinx.hajkowski@intel.com>
Date: Fri, 5 Apr 2019 16:35:35 +0200
Subject: [PATCH] power: fix thread-safety environment modification

[ upstream commit 92433e347326c4d438c69093bbfa6212b8b59d60 ]

Due to lack of thread safety in exisiting solution
use spinlock mechanism for atomic
modification of power environment related data.

Fixes: 445c6528b5 ("power: common interface for guest and host")

Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_power/rte_power.c | 30 +++++++++++++++++++++---------
 lib/librte_power/rte_power.h |  2 +-
 2 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/lib/librte_power/rte_power.c b/lib/librte_power/rte_power.c
index 208b79195..cc05b0faf 100644
--- a/lib/librte_power/rte_power.c
+++ b/lib/librte_power/rte_power.c
@@ -3,5 +3,5 @@
  */
 
-#include <rte_atomic.h>
+#include <rte_spinlock.h>
 
 #include "rte_power.h"
@@ -12,5 +12,5 @@
 enum power_management_env global_default_env = PM_ENV_NOT_SET;
 
-volatile uint32_t global_env_cfg_status = 0;
+static rte_spinlock_t global_env_cfg_lock = RTE_SPINLOCK_INITIALIZER;
 
 /* function pointers */
@@ -30,7 +30,13 @@ int
 rte_power_set_env(enum power_management_env env)
 {
-	if (rte_atomic32_cmpset(&global_env_cfg_status, 0, 1) == 0) {
+	rte_spinlock_lock(&global_env_cfg_lock);
+
+	if (global_default_env != PM_ENV_NOT_SET) {
+		rte_spinlock_unlock(&global_env_cfg_lock);
 		return 0;
 	}
+
+	int ret = 0;
+
 	if (env == PM_ENV_ACPI_CPUFREQ) {
 		rte_power_freqs = power_acpi_cpufreq_freqs;
@@ -60,9 +66,14 @@ rte_power_set_env(enum power_management_env env)
 		RTE_LOG(ERR, POWER, "Invalid Power Management Environment(%d) set\n",
 				env);
-		rte_power_unset_env();
-		return -1;
+		ret = -1;
 	}
-	global_default_env = env;
-	return 0;
+
+	if (ret == 0)
+		global_default_env = env;
+	else
+		global_default_env = PM_ENV_NOT_SET;
+
+	rte_spinlock_unlock(&global_env_cfg_lock);
+	return ret;
 
 }
@@ -71,6 +82,7 @@ void
 rte_power_unset_env(void)
 {
-	if (rte_atomic32_cmpset(&global_env_cfg_status, 1, 0) != 0)
-		global_default_env = PM_ENV_NOT_SET;
+	rte_spinlock_lock(&global_env_cfg_lock);
+	global_default_env = PM_ENV_NOT_SET;
+	rte_spinlock_unlock(&global_env_cfg_lock);
 }
 
diff --git a/lib/librte_power/rte_power.h b/lib/librte_power/rte_power.h
index d70bc0b33..d7542c3fa 100644
--- a/lib/librte_power/rte_power.h
+++ b/lib/librte_power/rte_power.h
@@ -26,5 +26,5 @@ enum power_management_env {PM_ENV_NOT_SET, PM_ENV_ACPI_CPUFREQ, PM_ENV_KVM_VM};
  * Set the default power management implementation. If this is not called prior
  * to rte_power_init(), then auto-detect of the environment will take place.
- * It is not thread safe.
+ * It is thread safe.
  *
  * @param env
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.230076661 +0100
+++ 0028-power-fix-thread-safety-environment-modification.patch	2019-05-08 11:05:05.812933117 +0100
@@ -1 +1 @@
-From 92433e347326c4d438c69093bbfa6212b8b59d60 Mon Sep 17 00:00:00 2001
+From 3c2019093661e477b4b01753b9d0ad0b545b13e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 92433e347326c4d438c69093bbfa6212b8b59d60 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16,4 +17,3 @@
- doc/guides/rel_notes/release_19_05.rst |  3 +++
- lib/librte_power/rte_power.c           | 30 ++++++++++++++++++--------
- lib/librte_power/rte_power.h           |  2 +-
- 3 files changed, 25 insertions(+), 10 deletions(-)
+ lib/librte_power/rte_power.c | 30 +++++++++++++++++++++---------
+ lib/librte_power/rte_power.h |  2 +-
+ 2 files changed, 22 insertions(+), 10 deletions(-)
@@ -21,12 +20,0 @@
-diff --git a/doc/guides/rel_notes/release_19_05.rst b/doc/guides/rel_notes/release_19_05.rst
-index 3c388da66..d5ed564ab 100644
---- a/doc/guides/rel_notes/release_19_05.rst
-+++ b/doc/guides/rel_notes/release_19_05.rst
-@@ -230,4 +230,7 @@ API Changes
-   request mapping or un-mapping to the default vfio container fd.
- 
-+* power: ``rte_power_set_env`` and ``rte_power_unset_env`` functions
-+  have been modified to be thread safe.
-+
- 
- ABI Changes
@@ -34 +22 @@
-index a05fbef94..540d69be7 100644
+index 208b79195..cc05b0faf 100644
@@ -44 +32 @@
-@@ -13,5 +13,5 @@
+@@ -12,5 +12,5 @@
@@ -51 +39 @@
-@@ -31,7 +31,13 @@ int
+@@ -30,7 +30,13 @@ int
@@ -66 +54 @@
-@@ -74,9 +80,14 @@ rte_power_set_env(enum power_management_env env)
+@@ -60,9 +66,14 @@ rte_power_set_env(enum power_management_env env)
@@ -83 +70,0 @@
- }
@@ -85 +72,2 @@
-@@ -84,6 +95,7 @@ void
+ }
+@@ -71,6 +82,7 @@ void
@@ -96 +84 @@
-index dee7af345..47db69f33 100644
+index d70bc0b33..d7542c3fa 100644
@@ -99 +87 @@
-@@ -27,5 +27,5 @@ enum power_management_env {PM_ENV_NOT_SET, PM_ENV_ACPI_CPUFREQ, PM_ENV_KVM_VM,
+@@ -26,5 +26,5 @@ enum power_management_env {PM_ENV_NOT_SET, PM_ENV_ACPI_CPUFREQ, PM_ENV_KVM_VM};

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

* [dpdk-stable] patch 'examples/power: fix resource leak' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (26 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'power: fix thread-safety environment modification' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix unreachable VF MAC init' " Kevin Traynor
                   ` (22 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: David Hunt; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From e371c69703aca32087a3e0ae1e07879300e21421 Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt@intel.com>
Date: Tue, 9 Apr 2019 10:43:26 +0100
Subject: [PATCH] examples/power: fix resource leak

[ upstream commit da4ac8e5991a05d06a1e009a83c232dd824eac77 ]

Coverity issue: 337674
Fixes: 99a968fac0cf ("examples/vm_power: add core list parameter")

Signed-off-by: David Hunt <david.hunt@intel.com>
---
 examples/vm_power_manager/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index 893bf4cdd..dd79a82fa 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -176,4 +176,5 @@ parse_args(int argc, char **argv)
 				printf("Invalid core-list - [%s]\n",
 						optarg);
+				free(oob_enable);
 				break;
 			}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.288365445 +0100
+++ 0029-examples-power-fix-resource-leak.patch	2019-05-08 11:05:05.813933096 +0100
@@ -1 +1 @@
-From da4ac8e5991a05d06a1e009a83c232dd824eac77 Mon Sep 17 00:00:00 2001
+From e371c69703aca32087a3e0ae1e07879300e21421 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit da4ac8e5991a05d06a1e009a83c232dd824eac77 ]
+
@@ -8 +9,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/power: fix unreachable VF MAC init' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (27 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix resource leak' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix string null termination' " Kevin Traynor
                   ` (21 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: David Hunt; +Cc: Rami Rosen, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 0bfc5e854317fde32824b5fcd65448de907db62a Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt@intel.com>
Date: Wed, 10 Apr 2019 14:13:48 +0100
Subject: [PATCH] examples/power: fix unreachable VF MAC init

[ upstream commit 958d14d38659d96859718657743a963bd6e9f1f4 ]

A for loop to MAX_VFS had a break as the last line, so the w++
would never get called, breaking out of the loop after the
first iteration. Remove the break so that the loop can execute
properly.

Coverity issue: 337682
Fixes: ace158c4a821 ("examples/vm_power: add check for port count")

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
---
 examples/vm_power_manager/main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index dd79a82fa..1a846af71 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -392,5 +392,4 @@ main(int argc, char **argv)
 				}
 				printf("\n");
-				break;
 			}
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.335128148 +0100
+++ 0030-examples-power-fix-unreachable-VF-MAC-init.patch	2019-05-08 11:05:05.813933096 +0100
@@ -1 +1 @@
-From 958d14d38659d96859718657743a963bd6e9f1f4 Mon Sep 17 00:00:00 2001
+From 0bfc5e854317fde32824b5fcd65448de907db62a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 958d14d38659d96859718657743a963bd6e9f1f4 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/power: fix string null termination' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (28 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix unreachable VF MAC init' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix string overflow' " Kevin Traynor
                   ` (20 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 72be583f5a51630f79572dc6066b0cd89ee3868c Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Tue, 9 Apr 2019 17:00:24 +0100
Subject: [PATCH] examples/power: fix string null termination

[ upstream commit 4c2caea070fb1ceb16688870d44bd4016ce5d0e4 ]

After the read() the jason_data null termination is missing
for the case "indent < 0", for "indent > 0" and "indent == 0"
cases null termination is already handled.

So add the missing case "indent < 0" to the existing "indent == 0"
case to fix null termination.

Coverity issue: 337680
Fixes: a63504a90f ("examples/power: add JSON string handling")

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 examples/vm_power_manager/channel_monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 5da531542..d45d8f74b 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -836,5 +836,5 @@ read_json_packet(struct channel_info *chan_info)
 			if ((indent > 0) || (idx > 0))
 				idx++;
-			if (indent == 0)
+			if (indent <= 0)
 				json_data[idx] = 0;
 			if (idx >= MAX_JSON_STRING_LEN-1)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.379828478 +0100
+++ 0031-examples-power-fix-string-null-termination.patch	2019-05-08 11:05:05.814933075 +0100
@@ -1 +1 @@
-From 4c2caea070fb1ceb16688870d44bd4016ce5d0e4 Mon Sep 17 00:00:00 2001
+From 72be583f5a51630f79572dc6066b0cd89ee3868c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4c2caea070fb1ceb16688870d44bd4016ce5d0e4 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index ad1ddde07..bc5679d4b 100644
+index 5da531542..d45d8f74b 100644
@@ -27 +28 @@
-@@ -816,5 +816,5 @@ read_json_packet(struct channel_info *chan_info)
+@@ -836,5 +836,5 @@ read_json_packet(struct channel_info *chan_info)

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

* [dpdk-stable] patch 'examples/power: fix string overflow' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (29 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix string null termination' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix overflowed value' " Kevin Traynor
                   ` (19 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 45790bfbd3c2ed64596e25fea9b3229a5ad096ab Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Wed, 10 Apr 2019 15:54:31 +0100
Subject: [PATCH] examples/power: fix string overflow

[ upstream commit 57fad3e25fee6400af07a917e876ef8e4ee0e653 ]

Use strlcpy instead of strcpy to fix string overflow.

Coverity issue: 337671
Fixes: a63504a90f ("examples/power: add JSON string handling")

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 examples/vm_power_manager/channel_monitor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index d45d8f74b..954bdf787 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -159,5 +159,6 @@ parse_json_to_pkt(json_t *element, struct channel_packet *pkt)
 				return ret;
 		} else if (!strcmp(key, "name")) {
-			strcpy(pkt->vm_name, json_string_value(value));
+			strlcpy(pkt->vm_name, json_string_value(value),
+					sizeof(pkt->vm_name));
 		} else if (!strcmp(key, "command")) {
 			char command[32];
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.428019816 +0100
+++ 0032-examples-power-fix-string-overflow.patch	2019-05-08 11:05:05.815933054 +0100
@@ -1 +1 @@
-From 57fad3e25fee6400af07a917e876ef8e4ee0e653 Mon Sep 17 00:00:00 2001
+From 45790bfbd3c2ed64596e25fea9b3229a5ad096ab Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57fad3e25fee6400af07a917e876ef8e4ee0e653 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index bc5679d4b..971e4f2bc 100644
+index d45d8f74b..954bdf787 100644
@@ -22 +23 @@
-@@ -160,5 +160,6 @@ parse_json_to_pkt(json_t *element, struct channel_packet *pkt)
+@@ -159,5 +159,6 @@ parse_json_to_pkt(json_t *element, struct channel_packet *pkt)

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

* [dpdk-stable] patch 'examples/power: fix overflowed value' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (30 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix string overflow' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix build with some disabled PMDs' " Kevin Traynor
                   ` (18 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From ef24b4826f540c0489aadd2c84d9c22e2510a014 Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Thu, 11 Apr 2019 12:13:36 +0100
Subject: [PATCH] examples/power: fix overflowed value

[ upstream commit 7e7b7a1f427013374f38e1b101969a1dbce5c9c1 ]

Fix the data type of last_branches, last_branch_misses
from uint32_t to uint64_t, and for hits_diff, miss_diff
from int to int64_t respectively to fix possible
overflow or truncation.

Coverity issue: 337677
Fixes: 4b1a631b8a ("examples/vm_power: add oob monitoring functions")

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 examples/vm_power_manager/oob_monitor_x86.c | 23 ++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/examples/vm_power_manager/oob_monitor_x86.c b/examples/vm_power_manager/oob_monitor_x86.c
index 589c604e5..ebd96b205 100644
--- a/examples/vm_power_manager/oob_monitor_x86.c
+++ b/examples/vm_power_manager/oob_monitor_x86.c
@@ -34,8 +34,8 @@ apply_policy(int core)
 {
 	struct core_info *ci;
-	uint64_t counter;
+	uint64_t counter = 0;
 	uint64_t branches, branch_misses;
-	uint32_t last_branches, last_branch_misses;
-	int hits_diff, miss_diff;
+	uint64_t last_branches, last_branch_misses;
+	int64_t hits_diff, miss_diff;
 	float ratio;
 	int ret;
@@ -55,4 +55,5 @@ apply_policy(int core)
 	branches = counter;
 
+	counter = 0;
 	ret = pread(ci->cd[core].msr_fd, &counter,
 			sizeof(counter), IA32_PERFCTR1);
@@ -67,5 +68,11 @@ apply_policy(int core)
 	ci->cd[core].last_branch_misses = branch_misses;
 
-	hits_diff = (int)branches - (int)last_branches;
+	/*
+	 * Intentional right shift to make MSB 0 to avoid
+	 * possible signed overflow or truncation.
+	 */
+	branches >>= 1;
+	last_branches >>= 1;
+	hits_diff = (int64_t)branches - (int64_t)last_branches;
 	if (hits_diff <= 0) {
 		/* Likely a counter overflow condition, skip this round */
@@ -73,5 +80,11 @@ apply_policy(int core)
 	}
 
-	miss_diff = (int)branch_misses - (int)last_branch_misses;
+	/*
+	 * Intentional right shift to make MSB 0 to avoid
+	 * possible signed overflow or truncation.
+	 */
+	branch_misses >>= 1;
+	last_branch_misses >>= 1;
+	miss_diff = (int64_t)branch_misses - (int64_t)last_branch_misses;
 	if (miss_diff <= 0) {
 		/* Likely a counter overflow condition, skip this round */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.473473845 +0100
+++ 0033-examples-power-fix-overflowed-value.patch	2019-05-08 11:05:05.815933054 +0100
@@ -1 +1 @@
-From 7e7b7a1f427013374f38e1b101969a1dbce5c9c1 Mon Sep 17 00:00:00 2001
+From ef24b4826f540c0489aadd2c84d9c22e2510a014 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7e7b7a1f427013374f38e1b101969a1dbce5c9c1 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/power: fix build with some disabled PMDs' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (31 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix overflowed value' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'examples/vhost_scsi: fix null-check for parameter' " Kevin Traynor
                   ` (17 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: David Christensen; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From a7f5ed7bb32e064a3ae3f1e723c0cefcb1bea888 Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Tue, 2 Apr 2019 14:46:12 -0400
Subject: [PATCH] examples/power: fix build with some disabled PMDs

[ upstream commit 70b2c7f12c2fbc32ca0f7784c69e52717483ea1b ]

Running the devtools/test-build.sh script on IBM Power systems fails
because the IXGBE_PMD is explicity disabled for Power as an untested
driver, but the examples/vm_power_manager application has a hard
dependency on a function call in the IXGBE_PMD.

Modify the example application so that all dependencies on PMD code
are conditionally compiled.

Bugzilla ID: 237
Fixes: c9a4779135c9 ("examples/vm_power_mgr: set MAC address of VF")

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 examples/vm_power_manager/main.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index 1a846af71..5fa13fe62 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -32,7 +32,13 @@
 #include "oob_monitor.h"
 #include "parse.h"
+#ifdef RTE_LIBRTE_IXGBE_PMD
 #include <rte_pmd_ixgbe.h>
+#endif
+#ifdef RTE_LIBRTE_I40E_PMD
 #include <rte_pmd_i40e.h>
+#endif
+#ifdef RTE_LIBRTE_BNXT_PMD
 #include <rte_pmd_bnxt.h>
+#endif
 
 #define RX_RING_SIZE 1024
@@ -371,12 +377,19 @@ main(int argc, char **argv)
 				eth.addr_bytes[5] = w + 0xf0;
 
+				ret = -ENOTSUP;
+#ifdef RTE_LIBRTE_IXGBE_PMD
 				ret = rte_pmd_ixgbe_set_vf_mac_addr(portid,
 							w, &eth);
+#endif
+#ifdef RTE_LIBRTE_I40E_PMD
 				if (ret == -ENOTSUP)
 					ret = rte_pmd_i40e_set_vf_mac_addr(
 							portid, w, &eth);
+#endif
+#ifdef RTE_LIBRTE_BNXT_PMD
 				if (ret == -ENOTSUP)
 					ret = rte_pmd_bnxt_set_vf_mac_addr(
 							portid, w, &eth);
+#endif
 
 				switch (ret) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.520284426 +0100
+++ 0034-examples-power-fix-build-with-some-disabled-PMDs.patch	2019-05-08 11:05:05.816933033 +0100
@@ -1 +1 @@
-From 70b2c7f12c2fbc32ca0f7784c69e52717483ea1b Mon Sep 17 00:00:00 2001
+From a7f5ed7bb32e064a3ae3f1e723c0cefcb1bea888 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,2 @@
+
+[ upstream commit 70b2c7f12c2fbc32ca0f7784c69e52717483ea1b ]

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

* [dpdk-stable] patch 'examples/vhost_scsi: fix null-check for parameter' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (32 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix build with some disabled PMDs' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/i40e: fix dereference before null check in mbuf release' " Kevin Traynor
                   ` (16 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 25b2cba8b463db828e4d669dc3f97572b3c3f0dc Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 8 Apr 2019 10:46:37 +0100
Subject: [PATCH] examples/vhost_scsi: fix null-check for parameter

[ upstream commit 6fd5b5734faf2f902aebf57e966e5adb0499a1ff ]

Coverity points out that there is a check in the main thread loop for the
ctrlr->bdev being NULL, but by that stage the pointer has already been
dereferenced. Therefore, for safety, before we enter the loop do an
initial check on the parameter structure.

Coverity issue: 158657
Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 examples/vhost_scsi/vhost_scsi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/examples/vhost_scsi/vhost_scsi.c b/examples/vhost_scsi/vhost_scsi.c
index 2908ff68b..513af0cca 100644
--- a/examples/vhost_scsi/vhost_scsi.c
+++ b/examples/vhost_scsi/vhost_scsi.c
@@ -286,4 +286,10 @@ ctrlr_worker(void *arg)
 	pthread_t thread;
 
+	if (ctrlr == NULL || ctrlr->bdev == NULL) {
+		fprintf(stderr, "%s: Error, invalid argument passed to worker thread\n",
+				__func__);
+		exit(0);
+	}
+
 	thread = pthread_self();
 	CPU_ZERO(&cpuset);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.564920267 +0100
+++ 0035-examples-vhost_scsi-fix-null-check-for-parameter.patch	2019-05-08 11:05:05.816933033 +0100
@@ -1 +1 @@
-From 6fd5b5734faf2f902aebf57e966e5adb0499a1ff Mon Sep 17 00:00:00 2001
+From 25b2cba8b463db828e4d669dc3f97572b3c3f0dc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6fd5b5734faf2f902aebf57e966e5adb0499a1ff ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/i40e: fix dereference before null check in mbuf release' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (33 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'examples/vhost_scsi: fix null-check for parameter' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/i40e: fix dereference before check when getting EEPROM' " Kevin Traynor
                   ` (15 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Rami Rosen, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 09e24483cf9ee83085f73fce14c2ca46f65148f0 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 8 Apr 2019 10:46:38 +0100
Subject: [PATCH] net/i40e: fix dereference before null check in mbuf release

[ upstream commit 3f1b8bf9139ab94aa5ba1334499c3928ec630359 ]

Coverity flags that the txq variable is used before it's checked for NULL.
Also fix typo in error message.

Coverity issue: 195023
Fixes: 24853544c84c ("net/i40e: fix mbuf free in vector Tx")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
---
 drivers/net/i40e/i40e_rxtx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 58ed8145d..1489552da 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2424,11 +2424,11 @@ i40e_tx_queue_release_mbufs(struct i40e_tx_queue *txq)
 	uint16_t i;
 
-	dev = &rte_eth_devices[txq->port_id];
-
 	if (!txq || !txq->sw_ring) {
-		PMD_DRV_LOG(DEBUG, "Pointer to rxq or sw_ring is NULL");
+		PMD_DRV_LOG(DEBUG, "Pointer to txq or sw_ring is NULL");
 		return;
 	}
 
+	dev = &rte_eth_devices[txq->port_id];
+
 	/**
 	 *  vPMD tx will not set sw_ring's mbuf to NULL after free,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.613541069 +0100
+++ 0036-net-i40e-fix-dereference-before-null-check-in-mbuf-r.patch	2019-05-08 11:05:05.818932991 +0100
@@ -1 +1 @@
-From 3f1b8bf9139ab94aa5ba1334499c3928ec630359 Mon Sep 17 00:00:00 2001
+From 09e24483cf9ee83085f73fce14c2ca46f65148f0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3f1b8bf9139ab94aa5ba1334499c3928ec630359 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/i40e: fix dereference before check when getting EEPROM' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (34 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/i40e: fix dereference before null check in mbuf release' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'app/testpmd: fix variable use before null check' " Kevin Traynor
                   ` (14 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Rami Rosen, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 3dda1ec6f6eab9c283a95cc3e110feb8c9df54af Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 8 Apr 2019 10:46:40 +0100
Subject: [PATCH] net/i40e: fix dereference before check when getting EEPROM

[ upstream commit f2088e785cca5d0d6471aaebe90c0f8dabc5d069 ]

As flagged by coverity, the "info" structure is being explicitly
dereferenced before being checked later for a NULL value.

Coverity issue: 277241
Fixes: 98e60c0d43f1 ("net/i40e: add module EEPROM callbacks for i40e")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
---
 drivers/net/i40e/i40e_ethdev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 3815aef6c..036c34d09 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -11892,9 +11892,9 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
 	bool is_sfp = false;
 	i40e_status status;
-	uint8_t *data = info->data;
+	uint8_t *data;
 	uint32_t value = 0;
 	uint32_t i;
 
-	if (!info || !info->length || !data)
+	if (!info || !info->length || !info->data)
 		return -EINVAL;
 
@@ -11902,4 +11902,5 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
 		is_sfp = true;
 
+	data = info->data;
 	for (i = 0; i < info->length; i++) {
 		u32 offset = i + info->offset;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.660552920 +0100
+++ 0037-net-i40e-fix-dereference-before-check-when-getting-E.patch	2019-05-08 11:05:05.830932740 +0100
@@ -1 +1 @@
-From f2088e785cca5d0d6471aaebe90c0f8dabc5d069 Mon Sep 17 00:00:00 2001
+From 3dda1ec6f6eab9c283a95cc3e110feb8c9df54af Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f2088e785cca5d0d6471aaebe90c0f8dabc5d069 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index f6fc0056c..301193492 100644
+index 3815aef6c..036c34d09 100644
@@ -23 +24 @@
-@@ -11901,9 +11901,9 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -11892,9 +11892,9 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
@@ -35 +36 @@
-@@ -11911,4 +11911,5 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -11902,4 +11902,5 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'app/testpmd: fix variable use before null check' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (35 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/i40e: fix dereference before check when getting EEPROM' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'bitrate: fix unchecked return value' " Kevin Traynor
                   ` (13 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Rami Rosen, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From b717bb833f6927a729d417ff998ead0d9aef9c14 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 8 Apr 2019 10:46:39 +0100
Subject: [PATCH] app/testpmd: fix variable use before null check

[ upstream commit 17250a2affdf88557911bbff086a00d05960a7ca ]

The value returned from rte_eth_dev_tx_offload_name() function is used
for string comparison before being checked for NULL. Move the NULL check
up to be done first.

Coverity issue: 279438
Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
---
 app/test-pmd/cmdline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 5d719a186..a5f1ae693 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -18197,4 +18197,6 @@ search_tx_offload(const char *name)
 	for (bit = 0; bit < sizeof(single_offload) * CHAR_BIT; bit++) {
 		single_name = rte_eth_dev_tx_offload_name(single_offload);
+		if (single_name == NULL)
+			break;
 		if (!strcasecmp(single_name, name)) {
 			found = 1;
@@ -18202,6 +18204,4 @@ search_tx_offload(const char *name)
 		} else if (!strcasecmp(single_name, "UNKNOWN"))
 			break;
-		else if (single_name == NULL)
-			break;
 		single_offload <<= 1;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.716528938 +0100
+++ 0038-app-testpmd-fix-variable-use-before-null-check.patch	2019-05-08 11:05:05.847932385 +0100
@@ -1 +1 @@
-From 17250a2affdf88557911bbff086a00d05960a7ca Mon Sep 17 00:00:00 2001
+From b717bb833f6927a729d417ff998ead0d9aef9c14 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 17250a2affdf88557911bbff086a00d05960a7ca ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 0558bc58a..5a10c5f38 100644
+index 5d719a186..a5f1ae693 100644
@@ -24 +25 @@
-@@ -18311,4 +18311,6 @@ search_tx_offload(const char *name)
+@@ -18197,4 +18197,6 @@ search_tx_offload(const char *name)
@@ -31 +32 @@
-@@ -18316,6 +18318,4 @@ search_tx_offload(const char *name)
+@@ -18202,6 +18204,4 @@ search_tx_offload(const char *name)

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

* [dpdk-stable] patch 'bitrate: fix unchecked return value' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (36 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'app/testpmd: fix variable use before null check' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'doc: fix heading levels in bbdev test guide' " Kevin Traynor
                   ` (12 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Andrius Sirvys; +Cc: Rami Rosen, John McNamara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 04f108be42876641c92ef8fe657f8963f9f2c31b Mon Sep 17 00:00:00 2001
From: Andrius Sirvys <andrius.sirvys@intel.com>
Date: Thu, 18 Apr 2019 09:52:06 +0100
Subject: [PATCH] bitrate: fix unchecked return value

[ upstream commit 72ec13b0a1192d7a1503c12474cb0f11d2efe087 ]

Checking the return value of rte_metrics_update_values, if failed
returning that value.
Coverity had picked up that that the return value wasn't being checked.

Coverity issue: 336863
Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library")

Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 lib/librte_bitratestats/rte_bitrate.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
index c4b28f624..639e47547 100644
--- a/lib/librte_bitratestats/rte_bitrate.c
+++ b/lib/librte_bitratestats/rte_bitrate.c
@@ -68,4 +68,5 @@ rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
 	const int64_t alpha_percent = 20;
 	uint64_t values[6];
+	int ret;
 
 	if (bitrate_data == NULL)
@@ -125,6 +126,9 @@ rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
 	values[4] = port_data->peak_ibits;
 	values[5] = port_data->peak_obits;
-	rte_metrics_update_values(port_id, bitrate_data->id_stats_set,
+	ret = rte_metrics_update_values(port_id, bitrate_data->id_stats_set,
 		values, ARRAY_SIZE(values));
+	if (ret < 0)
+		return ret;
+
 	return 0;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.780876148 +0100
+++ 0039-bitrate-fix-unchecked-return-value.patch	2019-05-08 11:05:05.847932385 +0100
@@ -1 +1 @@
-From 72ec13b0a1192d7a1503c12474cb0f11d2efe087 Mon Sep 17 00:00:00 2001
+From 04f108be42876641c92ef8fe657f8963f9f2c31b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 72ec13b0a1192d7a1503c12474cb0f11d2efe087 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'doc: fix heading levels in bbdev test guide' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (37 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'bitrate: fix unchecked return value' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/qat: fix null cipher algo for non 8-byte multiple' " Kevin Traynor
                   ` (11 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: John McNamara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From dc7ad46cf43eb07851c06aff3c4dfb9912f59812 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 15 Apr 2019 13:58:38 +0200
Subject: [PATCH] doc: fix heading levels in bbdev test guide

[ upstream commit c5e2e08529c4906b85717134b0fa9195564d3ba3 ]

The section "Test Vector files" should not be at the same level as
the main title "dpdk-test-bbdev Application".

Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/tools/testbbdev.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/guides/tools/testbbdev.rst b/doc/guides/tools/testbbdev.rst
index 5caa90239..af38b1632 100644
--- a/doc/guides/tools/testbbdev.rst
+++ b/doc/guides/tools/testbbdev.rst
@@ -308,5 +308,5 @@ baseband_null device does not have to be defined explicitly as it is created by
 
 Test Vector files
-=================
+-----------------
 
 Test Vector files contain the data which is used to set turbo decoder/encoder
@@ -317,5 +317,5 @@ the syntax of the test vector files is in the following section.
 
 Basic principles for test vector files
---------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Line started with ``#`` is treated as a comment and is ignored.
 
@@ -352,5 +352,5 @@ documented in *rte_bbdev_op.h*
 
 Turbo decoder test vectors template
------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 For turbo decoder it has to be always set to ``RTE_BBDEV_OP_TURBO_DEC``
@@ -529,5 +529,5 @@ Following statuses can be used:
 
 Turbo encoder test vectors template
------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 For turbo encoder it has to be always set to ``RTE_BBDEV_OP_TURBO_ENC``
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.825102804 +0100
+++ 0040-doc-fix-heading-levels-in-bbdev-test-guide.patch	2019-05-08 11:05:05.848932364 +0100
@@ -1 +1 @@
-From c5e2e08529c4906b85717134b0fa9195564d3ba3 Mon Sep 17 00:00:00 2001
+From dc7ad46cf43eb07851c06aff3c4dfb9912f59812 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c5e2e08529c4906b85717134b0fa9195564d3ba3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f3386472d..07da35e52 100644
+index 5caa90239..af38b1632 100644

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

* [dpdk-stable] patch 'crypto/qat: fix null cipher algo for non 8-byte multiple' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (38 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'doc: fix heading levels in bbdev test guide' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'eventdev: fix crypto adapter' " Kevin Traynor
                   ` (10 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Fiona Trahe; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From c7fb431ae3f658fdd87e834e3c5aedc87d3c715c Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe@intel.com>
Date: Fri, 26 Apr 2019 20:28:03 +0100
Subject: [PATCH] crypto/qat: fix null cipher algo for non 8-byte multiple

[ upstream commit 20f1cb1aaf77535d11526c5a1c165eeeeddeff6a ]

NULL cipher algo of 4-byte multiple and other sizes caused firmware hang
due to use of wrong mode. Changed from ECB mode to CTR mode to fix.

Fixes: 98f060891615 ("crypto/qat: add symmetric session file")

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
 drivers/crypto/qat/qat_sym_session.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 4d7ec01d4..e147572e1 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -243,5 +243,6 @@ qat_sym_session_configure_cipher(struct rte_cryptodev *dev,
 		break;
 	case RTE_CRYPTO_CIPHER_NULL:
-		session->qat_mode = ICP_QAT_HW_CIPHER_ECB_MODE;
+		session->qat_cipher_alg = ICP_QAT_HW_CIPHER_ALGO_NULL;
+		session->qat_mode = ICP_QAT_HW_CIPHER_CTR_MODE;
 		break;
 	case RTE_CRYPTO_CIPHER_KASUMI_F8:
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.871645389 +0100
+++ 0041-crypto-qat-fix-null-cipher-algo-for-non-8-byte-multi.patch	2019-05-08 11:05:05.850932322 +0100
@@ -1 +1 @@
-From 20f1cb1aaf77535d11526c5a1c165eeeeddeff6a Mon Sep 17 00:00:00 2001
+From c7fb431ae3f658fdd87e834e3c5aedc87d3c715c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 20f1cb1aaf77535d11526c5a1c165eeeeddeff6a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 5cc86f554..f66175d03 100644
+index 4d7ec01d4..e147572e1 100644

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

* [dpdk-stable] patch 'eventdev: fix crypto adapter' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (39 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/qat: fix null cipher algo for non 8-byte multiple' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/snow3g: add to meson build' " Kevin Traynor
                   ` (9 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Abhinandan Gujjar; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From efa820160c149ce77ccb4f047df80bff234a3a4d Mon Sep 17 00:00:00 2001
From: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Date: Wed, 24 Apr 2019 22:04:38 +0530
Subject: [PATCH] eventdev: fix crypto adapter

[ upstream commit 27e6cca81a6f77f1162e5f480d59b84483a4641f ]

This patch fixes null pointer dereference and control
flow issues reported in event crypto adapter by coverity

Coverity issue: 279439, 279446, 279450, 279462
Fixes: 7901eac3409 ("eventdev: add crypto adapter implementation")

Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/librte_eventdev/rte_event_crypto_adapter.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c b/lib/librte_eventdev/rte_event_crypto_adapter.c
index 11b28ca9b..5faf3c900 100644
--- a/lib/librte_eventdev/rte_event_crypto_adapter.c
+++ b/lib/librte_eventdev/rte_event_crypto_adapter.c
@@ -160,4 +160,7 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,
 	struct rte_event_crypto_adapter *adapter = eca_id_to_adapter(id);
 
+	if (adapter == NULL)
+		return -EINVAL;
+
 	dev = &rte_eventdevs[adapter->eventdev_id];
 	dev_conf = dev->data->dev_conf;
@@ -354,5 +357,5 @@ eca_enq_to_cryptodev(struct rte_event_crypto_adapter *adapter,
 			qp_id = m_data->request_info.queue_pair_id;
 			qp_info = &adapter->cdevs[cdev_id].qpairs[qp_id];
-			if (qp_info == NULL) {
+			if (!qp_info->qp_enabled) {
 				rte_pktmbuf_free(crypto_op->sym->m_src);
 				rte_crypto_op_free(crypto_op);
@@ -370,5 +373,5 @@ eca_enq_to_cryptodev(struct rte_event_crypto_adapter *adapter,
 			qp_id = m_data->request_info.queue_pair_id;
 			qp_info = &adapter->cdevs[cdev_id].qpairs[qp_id];
-			if (qp_info == NULL) {
+			if (!qp_info->qp_enabled) {
 				rte_pktmbuf_free(crypto_op->sym->m_src);
 				rte_crypto_op_free(crypto_op);
@@ -428,8 +431,7 @@ eca_crypto_enq_flush(struct rte_event_crypto_adapter *adapter)
 	for (cdev_id = 0; cdev_id < num_cdev; cdev_id++) {
 		curr_dev = &adapter->cdevs[cdev_id];
-		if (curr_dev == NULL)
-			continue;
 		dev = curr_dev->dev;
-
+		if (dev == NULL)
+			continue;
 		for (qp = 0; qp < dev->data->nb_queue_pairs; qp++) {
 
@@ -580,7 +582,7 @@ eca_crypto_adapter_deq_run(struct rte_event_crypto_adapter *adapter,
 			cdev_id < num_cdev; cdev_id++) {
 			curr_dev = &adapter->cdevs[cdev_id];
-			if (curr_dev == NULL)
-				continue;
 			dev = curr_dev->dev;
+			if (dev == NULL)
+				continue;
 			dev_qps = dev->data->nb_queue_pairs;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.917588504 +0100
+++ 0042-eventdev-fix-crypto-adapter.patch	2019-05-08 11:05:05.851932301 +0100
@@ -1 +1 @@
-From 27e6cca81a6f77f1162e5f480d59b84483a4641f Mon Sep 17 00:00:00 2001
+From efa820160c149ce77ccb4f047df80bff234a3a4d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 27e6cca81a6f77f1162e5f480d59b84483a4641f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 9e99cf475..22d910816 100644
+index 11b28ca9b..5faf3c900 100644

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

* [dpdk-stable] patch 'crypto/snow3g: add to meson build' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (40 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'eventdev: fix crypto adapter' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/kasumi: fix dependency check' " Kevin Traynor
                   ` (8 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From dbe0a4bc399585e8abe09447774a141f07826673 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 1 May 2019 16:53:27 +0100
Subject: [PATCH] crypto/snow3g: add to meson build

[ upstream commit 1999aeb3689e01c7644fd9c149b892d335a92069 ]

Snow3G driver is missing support for building with meson. Add a new
meson.build file so it can be included in the builds.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/crypto/meson.build        |  2 +-
 drivers/crypto/snow3g/meson.build | 13 +++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 drivers/crypto/snow3g/meson.build

diff --git a/drivers/crypto/meson.build b/drivers/crypto/meson.build
index bf1bd9286..83e78860e 100644
--- a/drivers/crypto/meson.build
+++ b/drivers/crypto/meson.build
@@ -4,5 +4,5 @@
 drivers = ['aesni_gcm', 'aesni_mb', 'caam_jr', 'ccp', 'dpaa_sec', 'dpaa2_sec',
 	'kasumi', 'mvsam', 'null', 'octeontx', 'openssl', 'qat', 'scheduler',
-	'virtio', 'zuc']
+	'snow3g', 'virtio', 'zuc']
 
 std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps
diff --git a/drivers/crypto/snow3g/meson.build b/drivers/crypto/snow3g/meson.build
new file mode 100644
index 000000000..c566a5f67
--- /dev/null
+++ b/drivers/crypto/snow3g/meson.build
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2019 Intel Corporation
+
+lib = cc.find_library('sso_snow3g', required: false)
+if not lib.found() or not cc.has_header('sso_snow3g.h')
+	build = false
+	subdir_done()
+endif
+
+allow_experimental_apis = true
+ext_deps += lib
+sources = files('rte_snow3g_pmd.c', 'rte_snow3g_pmd_ops.c')
+deps += ['bus_vdev', 'cryptodev']
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.965461874 +0100
+++ 0043-crypto-snow3g-add-to-meson-build.patch	2019-05-08 11:05:05.852932280 +0100
@@ -1 +1 @@
-From 1999aeb3689e01c7644fd9c149b892d335a92069 Mon Sep 17 00:00:00 2001
+From dbe0a4bc399585e8abe09447774a141f07826673 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1999aeb3689e01c7644fd9c149b892d335a92069 ]
+
@@ -8,2 +9,0 @@
-
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'crypto/kasumi: fix dependency check' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (41 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/snow3g: add to meson build' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/zuc: " Kevin Traynor
                   ` (7 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 8ec3ea45d73239f05f00bb70730352766159e2dd Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 1 May 2019 16:53:28 +0100
Subject: [PATCH] crypto/kasumi: fix dependency check

[ upstream commit 408bb7b07becf6002e92982888e020734c1f0241 ]

The check for the kasumi library dependency did not check for the include
file needed for compilation. It's also recommended when looking for a
library to use the name without the lib prefix.

Fixes: 2ec2d46c6255 ("crypto/kasumi: enable meson build")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/crypto/kasumi/meson.build | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/kasumi/meson.build b/drivers/crypto/kasumi/meson.build
index a09b0e251..9a8956a03 100644
--- a/drivers/crypto/kasumi/meson.build
+++ b/drivers/crypto/kasumi/meson.build
@@ -2,11 +2,11 @@
 # Copyright(c) 2018 Intel Corporation
 
-lib = cc.find_library('libsso_kasumi', required: false)
-if not lib.found()
+lib = cc.find_library('sso_kasumi', required: false)
+if not lib.found() or not cc.has_header('sso_kasumi.h')
 	build = false
-else
-	ext_deps += lib
+	subdir_done()
 endif
 
+ext_deps += lib
 sources = files('rte_kasumi_pmd.c', 'rte_kasumi_pmd_ops.c')
 deps += ['bus_vdev']
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:08.009533142 +0100
+++ 0044-crypto-kasumi-fix-dependency-check.patch	2019-05-08 11:05:05.852932280 +0100
@@ -1 +1 @@
-From 408bb7b07becf6002e92982888e020734c1f0241 Mon Sep 17 00:00:00 2001
+From 8ec3ea45d73239f05f00bb70730352766159e2dd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 408bb7b07becf6002e92982888e020734c1f0241 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 80f13cd24..0fa301740 100644
+index a09b0e251..9a8956a03 100644
@@ -22 +23 @@
-@@ -2,12 +2,12 @@
+@@ -2,11 +2,11 @@
@@ -35 +35,0 @@
- allow_experimental_apis = true

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

* [dpdk-stable] patch 'crypto/zuc: fix dependency check' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (42 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/kasumi: fix dependency check' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/ixgbe: fix warning with GCC 9' " Kevin Traynor
                   ` (6 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From e13b2e6963bea7c13840e34a526a0245daad91f3 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 1 May 2019 16:53:29 +0100
Subject: [PATCH] crypto/zuc: fix dependency check

[ upstream commit d0246e0fdc8fd8eeb43f1b0f28330516bdff31eb ]

The check for the zuc library dependency did not check for the include
file needed for compilation. It's also recommended when looking for a
library to use the name without the lib prefix.

Fixes: df1740a8db5f ("crypto/zuc: enable meson build")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/crypto/zuc/meson.build | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/zuc/meson.build b/drivers/crypto/zuc/meson.build
index b8ca7107e..2b48072c6 100644
--- a/drivers/crypto/zuc/meson.build
+++ b/drivers/crypto/zuc/meson.build
@@ -2,11 +2,11 @@
 # Copyright(c) 2018 Intel Corporation
 
-lib = cc.find_library('libsso_zuc', required: false)
-if not lib.found()
+lib = cc.find_library('sso_zuc', required: false)
+if not lib.found() or not cc.has_header('sso_zuc.h')
 	build = false
-else
-	ext_deps += lib
+	subdir_done()
 endif
 
+ext_deps += lib
 sources = files('rte_zuc_pmd.c', 'rte_zuc_pmd_ops.c')
 deps += ['bus_vdev']
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:08.057105236 +0100
+++ 0045-crypto-zuc-fix-dependency-check.patch	2019-05-08 11:05:05.852932280 +0100
@@ -1 +1 @@
-From d0246e0fdc8fd8eeb43f1b0f28330516bdff31eb Mon Sep 17 00:00:00 2001
+From e13b2e6963bea7c13840e34a526a0245daad91f3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d0246e0fdc8fd8eeb43f1b0f28330516bdff31eb ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 63f2a5298..fc2900244 100644
+index b8ca7107e..2b48072c6 100644
@@ -22 +23 @@
-@@ -2,12 +2,12 @@
+@@ -2,11 +2,11 @@
@@ -35 +35,0 @@
- allow_experimental_apis = true

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

* [dpdk-stable] patch 'net/ixgbe: fix warning with GCC 9' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (43 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/zuc: " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'bus/fslmc: " Kevin Traynor
                   ` (5 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 41be7288e378921fafbfdcee3e53bff4c414d60c Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 1 May 2019 20:50:11 +0100
Subject: [PATCH] net/ixgbe: fix warning with GCC 9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit e81b0569cc6855fb4d95635d0ae8a749da5d0aed ]

Compiling on Fedora 30, we get the following warning, causing build failure
when Werror flag is set:

../drivers/net/ixgbe/ixgbe_rxtx.c:2141:14: warning:
‘nmb’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 2141 |    rxe->mbuf = nmb;
      |    ~~~~~~~~~~^~~~~

Initializing the value to "NULL" fixes the issue.

Fixes: 8eecb3295aed ("ixgbe: add LRO support")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 63ca5dccf..46c93f595 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2030,5 +2030,5 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
 		struct rte_mbuf *first_seg;
 		struct rte_mbuf *rxm;
-		struct rte_mbuf *nmb;
+		struct rte_mbuf *nmb = NULL;
 		union ixgbe_adv_rx_desc rxd;
 		uint16_t data_len;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:08.100843685 +0100
+++ 0046-net-ixgbe-fix-warning-with-GCC-9.patch	2019-05-08 11:05:05.858932154 +0100
@@ -1 +1 @@
-From e81b0569cc6855fb4d95635d0ae8a749da5d0aed Mon Sep 17 00:00:00 2001
+From 41be7288e378921fafbfdcee3e53bff4c414d60c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit e81b0569cc6855fb4d95635d0ae8a749da5d0aed ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index e71d3c188..1fbc754ae 100644
+index 63ca5dccf..46c93f595 100644

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

* [dpdk-stable] patch 'bus/fslmc: fix warning with GCC 9' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (44 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'net/ixgbe: fix warning with GCC 9' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'raw/skeleton: fix warnings " Kevin Traynor
                   ` (4 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 87e4f8cc84ec7cd652bb761703daf85de52f7982 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 1 May 2019 20:50:12 +0100
Subject: [PATCH] bus/fslmc: fix warning with GCC 9

[ upstream commit 33832c1471e22afaf2e616a7a0325ea9958ce278 ]

Printing a null pointer with %s is flagged as a warning by GCC 9, and
should not be done. Replace the %s with the word "null" itself.

Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/bus/fslmc/fslmc_bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index c719bf7f6..9ee1bf862 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -196,5 +196,5 @@ scan_one_fslmc_device(char *dev_name)
 	t_ptr = strtok(NULL, ".");
 	if (!t_ptr) {
-		DPAA2_BUS_ERR("Incorrect device string observed (%s)", t_ptr);
+		DPAA2_BUS_ERR("Incorrect device string observed (null)");
 		goto cleanup;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:08.152855528 +0100
+++ 0047-bus-fslmc-fix-warning-with-GCC-9.patch	2019-05-08 11:05:05.858932154 +0100
@@ -1 +1 @@
-From 33832c1471e22afaf2e616a7a0325ea9958ce278 Mon Sep 17 00:00:00 2001
+From 87e4f8cc84ec7cd652bb761703daf85de52f7982 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 33832c1471e22afaf2e616a7a0325ea9958ce278 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index eaa39a209..f6e66d22c 100644
+index c719bf7f6..9ee1bf862 100644
@@ -21 +22 @@
-@@ -198,5 +198,5 @@ scan_one_fslmc_device(char *dev_name)
+@@ -196,5 +196,5 @@ scan_one_fslmc_device(char *dev_name)

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

* [dpdk-stable] patch 'raw/skeleton: fix warnings with GCC 9' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (45 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'bus/fslmc: " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'raw/dpaa2_cmdif: " Kevin Traynor
                   ` (3 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From edac099a3f0a1e5c35b04f75e71209c8972bd431 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 1 May 2019 20:50:13 +0100
Subject: [PATCH] raw/skeleton: fix warnings with GCC 9

[ upstream commit 3a66890a8ada0a35f9292b1b6ce0326a5c3ce384 ]

GCC9 gives warnings if the parameter passed to printf for "%s" could be
NULL, so we need to add checks in some cases to ensure that is not the
case.

Fixes: 61c592a8d035 ("raw/skeleton: introduce skeleton rawdev driver")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/raw/skeleton_rawdev/skeleton_rawdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/raw/skeleton_rawdev/skeleton_rawdev.c b/drivers/raw/skeleton_rawdev/skeleton_rawdev.c
index d7630fc69..63f2b9a09 100644
--- a/drivers/raw/skeleton_rawdev/skeleton_rawdev.c
+++ b/drivers/raw/skeleton_rawdev/skeleton_rawdev.c
@@ -706,4 +706,7 @@ skeleton_rawdev_probe(struct rte_vdev_device *vdev)
 
 	name = rte_vdev_device_name(vdev);
+	if (name == NULL)
+		return -EINVAL;
+
 	/* More than one instance is not supported */
 	if (skeldev_init_once) {
@@ -741,4 +744,6 @@ skeleton_rawdev_remove(struct rte_vdev_device *vdev)
 
 	name = rte_vdev_device_name(vdev);
+	if (name == NULL)
+		return -1;
 
 	SKELETON_PMD_INFO("Closing %s on NUMA node %d", name, rte_socket_id());
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:08.197110777 +0100
+++ 0048-raw-skeleton-fix-warnings-with-GCC-9.patch	2019-05-08 11:05:05.859932134 +0100
@@ -1 +1 @@
-From 3a66890a8ada0a35f9292b1b6ce0326a5c3ce384 Mon Sep 17 00:00:00 2001
+From edac099a3f0a1e5c35b04f75e71209c8972bd431 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3a66890a8ada0a35f9292b1b6ce0326a5c3ce384 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'raw/dpaa2_cmdif: fix warnings with GCC 9' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (46 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'raw/skeleton: fix warnings " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'build: fix meson binutils workaround' " Kevin Traynor
                   ` (2 subsequent siblings)
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 4a1b3238788869011c4212c3d27c2d7dac771874 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 1 May 2019 20:50:14 +0100
Subject: [PATCH] raw/dpaa2_cmdif: fix warnings with GCC 9

[ upstream commit a53f14f96112a0851a9c3788dd1e7b9d61c50191 ]

GCC9 gives warnings if the parameter passed to printf for "%s" could be
NULL, so we need to add checks in some cases to ensure that is not the
case.

Fixes: 3298fa4853b8 ("raw/dpaa2_cmdif: introduce DPAA2 command interface driver")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c
index 469960a3e..11951980f 100644
--- a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c
+++ b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c
@@ -275,4 +275,6 @@ dpaa2_cmdif_remove(struct rte_vdev_device *vdev)
 
 	name = rte_vdev_device_name(vdev);
+	if (name == NULL)
+		return -1;
 
 	DPAA2_CMDIF_INFO("Closing %s on NUMA node %d", name, rte_socket_id());
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:08.244935731 +0100
+++ 0049-raw-dpaa2_cmdif-fix-warnings-with-GCC-9.patch	2019-05-08 11:05:05.859932134 +0100
@@ -1 +1 @@
-From a53f14f96112a0851a9c3788dd1e7b9d61c50191 Mon Sep 17 00:00:00 2001
+From 4a1b3238788869011c4212c3d27c2d7dac771874 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a53f14f96112a0851a9c3788dd1e7b9d61c50191 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 7d311b2ee..da3c7d7a6 100644
+index 469960a3e..11951980f 100644
@@ -22 +23 @@
-@@ -271,4 +271,6 @@ dpaa2_cmdif_remove(struct rte_vdev_device *vdev)
+@@ -275,4 +275,6 @@ dpaa2_cmdif_remove(struct rte_vdev_device *vdev)

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

* [dpdk-stable] patch 'build: fix meson binutils workaround' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (47 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'raw/dpaa2_cmdif: " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'build: fix crash by disabling AVX512 with binutils 2.31' " Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'build: fix ninja install on FreeBSD' " Kevin Traynor
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From 1ea1fb6f7e978b39aa615f0d0d8d2ae1d227f6bd Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 2 May 2019 14:35:25 +0100
Subject: [PATCH] build: fix meson binutils workaround

[ upstream commit 6e625189f25ca56859715b07732491f829619ec1 ]

The '-mno-avx512f' compiler flag is not passed to the compiler,
detection of the binutils and setting flags works fine, but the flag
itself not used by compiler.

Removing the interim 'march_opt' variable and using directly
'machine_args' and setting '-mno-avx512f' to 'machine_args'

Fixes: 566b4d7a968f ("build: fix meson check for binutils 2.30")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/x86/meson.build | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/config/x86/meson.build b/config/x86/meson.build
index 9e5952aa3..c92ffec6f 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -2,12 +2,9 @@
 # Copyright(c) 2017 Intel Corporation
 
-# for checking defines we need to use the correct compiler flags
-march_opt = ['-march=@0@'.format(machine)]
-
 # get binutils version for the workaround of Bug 97
 ldver = run_command('ld', '-v').stdout().strip()
 if ldver.contains('2.30')
 	if cc.has_argument('-mno-avx512f')
-		march_opt += '-mno-avx512f'
+		machine_args += '-mno-avx512f'
 		message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97')
 	endif
@@ -18,5 +15,5 @@ sse_errormsg = '''SSE4.2 instruction set is required for DPDK.
 Please set the machine type to "nehalem" or "corei7" or higher value'''
 
-if cc.get_define('__SSE4_2__', args: march_opt) == ''
+if cc.get_define('__SSE4_2__', args: machine_args) == ''
 	error(sse_errormsg)
 endif
@@ -38,21 +35,21 @@ else
 endif
 
-if cc.get_define('__AES__', args: march_opt) != ''
+if cc.get_define('__AES__', args: machine_args) != ''
 	dpdk_conf.set('RTE_MACHINE_CPUFLAG_AES', 1)
 	compile_time_cpuflags += ['RTE_CPUFLAG_AES']
 endif
-if cc.get_define('__PCLMUL__', args: march_opt) != ''
+if cc.get_define('__PCLMUL__', args: machine_args) != ''
 	dpdk_conf.set('RTE_MACHINE_CPUFLAG_PCLMULQDQ', 1)
 	compile_time_cpuflags += ['RTE_CPUFLAG_PCLMULQDQ']
 endif
-if cc.get_define('__AVX__', args: march_opt) != ''
+if cc.get_define('__AVX__', args: machine_args) != ''
 	dpdk_conf.set('RTE_MACHINE_CPUFLAG_AVX', 1)
 	compile_time_cpuflags += ['RTE_CPUFLAG_AVX']
 endif
-if cc.get_define('__AVX2__', args: march_opt) != ''
+if cc.get_define('__AVX2__', args: machine_args) != ''
 	dpdk_conf.set('RTE_MACHINE_CPUFLAG_AVX2', 1)
 	compile_time_cpuflags += ['RTE_CPUFLAG_AVX2']
 endif
-if cc.get_define('__AVX512F__', args: march_opt) != ''
+if cc.get_define('__AVX512F__', args: machine_args) != ''
 	dpdk_conf.set('RTE_MACHINE_CPUFLAG_AVX512F', 1)
 	compile_time_cpuflags += ['RTE_CPUFLAG_AVX512F']
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:08.289223021 +0100
+++ 0050-build-fix-meson-binutils-workaround.patch	2019-05-08 11:05:05.860932113 +0100
@@ -1 +1 @@
-From 6e625189f25ca56859715b07732491f829619ec1 Mon Sep 17 00:00:00 2001
+From 1ea1fb6f7e978b39aa615f0d0d8d2ae1d227f6bd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6e625189f25ca56859715b07732491f829619ec1 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 2b2d06281..ca4d12506 100644
+index 9e5952aa3..c92ffec6f 100644
@@ -26,2 +27,2 @@
-@@ -2,7 +2,4 @@
- # Copyright(c) 2017-2019 Intel Corporation
+@@ -2,12 +2,9 @@
+ # Copyright(c) 2017 Intel Corporation
@@ -33,9 +34,8 @@
- if not is_windows
-@@ -10,5 +7,5 @@ if not is_windows
- 	if ldver.contains('2.30')
- 		if cc.has_argument('-mno-avx512f')
--			march_opt += '-mno-avx512f'
-+			machine_args += '-mno-avx512f'
- 			message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97')
- 		endif
-@@ -20,5 +17,5 @@ sse_errormsg = '''SSE4.2 instruction set is required for DPDK.
+ ldver = run_command('ld', '-v').stdout().strip()
+ if ldver.contains('2.30')
+ 	if cc.has_argument('-mno-avx512f')
+-		march_opt += '-mno-avx512f'
++		machine_args += '-mno-avx512f'
+ 		message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97')
+ 	endif
+@@ -18,5 +15,5 @@ sse_errormsg = '''SSE4.2 instruction set is required for DPDK.
@@ -48 +48 @@
-@@ -39,21 +36,21 @@ else
+@@ -38,21 +35,21 @@ else

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

* [dpdk-stable] patch 'build: fix crash by disabling AVX512 with binutils 2.31' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (48 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'build: fix meson binutils workaround' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  2019-05-08 10:15 ` [dpdk-stable] patch 'build: fix ninja install on FreeBSD' " Kevin Traynor
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From f5555cc6375884da8bc0094fb733b3448cf8948d Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 2 May 2019 14:35:26 +0100
Subject: [PATCH] build: fix crash by disabling AVX512 with binutils 2.31

[ upstream commit e19c6de3f2f12d0f49bdf9e787b3f43612c1df3c ]

On Skylake platform, with native build, KNI kernel module crashes
because of the corrupted values passed to kernel module.

The corruption occurs because the userspace kni library works
unexpectedly. Compiler [1] is using AVX512 instructions and generated
binary is wrong [2].

It turned around gcc does its job correct, but gas is generating binary
wrong. And expected binutils 2.30, 2.31 & 2.31.1 are affected. Issue has
been fixed in binutils 2.32 with:
Commit x86: don't mistakenly scale non-8-bit displacements

AVX512 was already disabled with bintuils 2.30 [3], extending it to
2.31 & 2.31.1 too.

[1] gcc (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2)

[2] gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90028

[3] Bugzilla ID 97 has the details.

Bugzilla ID: 249

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/x86/meson.build                   | 4 ++++
 mk/toolchain/gcc/rte.toolchain-compat.mk | 9 ++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/config/x86/meson.build b/config/x86/meson.build
index c92ffec6f..ae92f86a2 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -9,4 +9,8 @@ if ldver.contains('2.30')
 		message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97')
 	endif
+	if ldver.contains('2.31') and cc.has_argument('-mno-avx512f')
+		machine_args += '-mno-avx512f'
+		message('Binutils 2.31 detected, disabling AVX512 support as workaround for bug #249')
+	endif
 endif
 
diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
index df71e4a8b..ea40a11c0 100644
--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
@@ -28,5 +28,12 @@ FORCE_DISABLE_AVX512 := y
 # print warning only once for librte_eal
 ifneq ($(filter %librte_eal,$(CURDIR)),)
-$(warning AVX512 support disabled because of ld 2.30. See Bug 97)
+$(warning AVX512 support disabled because of binutils 2.30. See Bug 97)
+endif
+endif
+ifneq ($(filter 2.31%,$(LD_VERSION)),)
+FORCE_DISABLE_AVX512 := y
+# print warning only once for librte_eal
+ifneq ($(filter %librte_eal,$(CURDIR)),)
+$(warning AVX512 support disabled because of binutils 2.31. See Bug 249)
 endif
 endif
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:08.335322113 +0100
+++ 0051-build-fix-crash-by-disabling-AVX512-with-binutils-2..patch	2019-05-08 11:05:05.860932113 +0100
@@ -1 +1 @@
-From e19c6de3f2f12d0f49bdf9e787b3f43612c1df3c Mon Sep 17 00:00:00 2001
+From f5555cc6375884da8bc0094fb733b3448cf8948d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e19c6de3f2f12d0f49bdf9e787b3f43612c1df3c ]
+
@@ -28 +29,0 @@
-Cc: stable@dpdk.org
@@ -34 +34,0 @@
- doc/guides/rel_notes/release_19_05.rst   | 6 ++++++
@@ -36 +36 @@
- 3 files changed, 18 insertions(+), 1 deletion(-)
+ 2 files changed, 12 insertions(+), 1 deletion(-)
@@ -39 +39 @@
-index ca4d12506..0a7bed75e 100644
+index c92ffec6f..ae92f86a2 100644
@@ -42,2 +42,2 @@
-@@ -11,4 +11,8 @@ if not is_windows
- 		endif
+@@ -9,4 +9,8 @@ if ldver.contains('2.30')
+ 		message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97')
@@ -50,15 +49,0 @@
- 
-diff --git a/doc/guides/rel_notes/release_19_05.rst b/doc/guides/rel_notes/release_19_05.rst
-index 439725c8a..468e32539 100644
---- a/doc/guides/rel_notes/release_19_05.rst
-+++ b/doc/guides/rel_notes/release_19_05.rst
-@@ -369,4 +369,10 @@ Known Issues
-    =========================================================
- 
-+* **On x86 platforms, AVX512 support is disabled with binutils 2.31**
-+
-+  Because a defect in binutils 2.31 AVX512 support is disabled.
-+  DPDK defect: https://bugs.dpdk.org/show_bug.cgi?id=249
-+  GCC defect: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90028
-+
- * **No software AES-XTS implementation.**

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

* [dpdk-stable] patch 'build: fix ninja install on FreeBSD' has been queued to LTS release 18.11.2
  2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (49 preceding siblings ...)
  2019-05-08 10:15 ` [dpdk-stable] patch 'build: fix crash by disabling AVX512 with binutils 2.31' " Kevin Traynor
@ 2019-05-08 10:15 ` Kevin Traynor
  50 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:15 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

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

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

Thanks.

Kevin Traynor

---
From ac847cf0232b051bed999cb8c68b6cca3f7bcf72 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 2 May 2019 17:51:53 +0100
Subject: [PATCH] build: fix ninja install on FreeBSD

[ upstream commit e09848337cac0f18833557034b181a48af517193 ]

The post-install script to symlink the PMDs from their own PMD directory to
the regular lib directory (so they would be found by ld at runtime) was
using the "-r" flag to ln to create relative symlinks. This flag is
unsupported by ln on FreeBSD causing the ninja install step to fail.

Reworking the script to take the relative driver path as parameter removes
the need for ln to calculate the relative path ensuring compatibility with
FreeBSD.

As part of the fix, we move the registration of the install script to the
config/meson.build file, from the top level one. This improves readability
as the script takes as parameters the variables set in that file.

Fixes: ed4d43d73e2b ("build: symlink drivers to library directory")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 buildtools/symlink-drivers-solibs.sh | 7 ++++---
 config/meson.build                   | 7 +++++++
 meson.build                          | 7 -------
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/buildtools/symlink-drivers-solibs.sh b/buildtools/symlink-drivers-solibs.sh
index 9826c6ae3..42985e855 100644
--- a/buildtools/symlink-drivers-solibs.sh
+++ b/buildtools/symlink-drivers-solibs.sh
@@ -8,5 +8,6 @@
 
 # parameters to script are paths relative to install prefix:
-# 1. directory containing driver files e.g. lib64/dpdk/drivers
-# 2. directory for installed regular libs e.g. lib64
-ln -rsf ${DESTDIR}/${MESON_INSTALL_PREFIX}/$1/* ${DESTDIR}/${MESON_INSTALL_PREFIX}/$2
+# 1. directory for installed regular libs e.g. lib64
+# 2. subdirectory of libdir where the pmds are
+
+cd ${MESON_INSTALL_DESTDIR_PREFIX}/$1 && ln -sfv $2/librte_*.so* .
diff --git a/config/meson.build b/config/meson.build
index db32499b3..80d253828 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -2,4 +2,11 @@
 # Copyright(c) 2017 Intel Corporation
 
+# driver .so files often depend upon the bus drivers for their connect bus,
+# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
+# to be in the library path, so symlink the drivers from the main lib directory.
+meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
+		get_option('libdir'),
+		pmd_subdir_opt)
+
 # set the machine type and cflags for it
 if meson.is_cross_build()
diff --git a/meson.build b/meson.build
index c48ecb8aa..9ab3f8ccc 100644
--- a/meson.build
+++ b/meson.build
@@ -70,11 +70,4 @@ configure_file(output: build_cfg,
 dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive']
 
-# driver .so files often depend upon the bus drivers for their connect bus,
-# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
-# to be in the library path, so symlink the drivers from the main lib directory.
-meson.add_install_script('buildtools/symlink-drivers-solibs.sh',
-		driver_install_path,
-		get_option('libdir'))
-
 pkg = import('pkgconfig')
 pkg.generate(name: meson.project_name(),
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:08.380630700 +0100
+++ 0052-build-fix-ninja-install-on-FreeBSD.patch	2019-05-08 11:05:05.861932092 +0100
@@ -1 +1 @@
-From e09848337cac0f18833557034b181a48af517193 Mon Sep 17 00:00:00 2001
+From ac847cf0232b051bed999cb8c68b6cca3f7bcf72 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e09848337cac0f18833557034b181a48af517193 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -45 +46 @@
-index f8aded6ed..3678348de 100644
+index db32499b3..80d253828 100644
@@ -48,2 +49,2 @@
-@@ -43,4 +43,11 @@ driver_install_path = join_paths(get_option('libdir'), pmd_subdir_opt)
- eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
+@@ -2,4 +2,11 @@
+ # Copyright(c) 2017 Intel Corporation
@@ -61 +62 @@
-index a96486597..d1e8e5239 100644
+index c48ecb8aa..9ab3f8ccc 100644
@@ -64 +65 @@
-@@ -64,11 +64,4 @@ configure_file(output: build_cfg,
+@@ -70,11 +70,4 @@ configure_file(output: build_cfg,

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

* Re: [dpdk-stable] patch 'app/testpmd: set fixed flag for exact link speed' has been queued to LTS release 18.11.2
  2019-05-08 10:14 ` [dpdk-stable] patch 'app/testpmd: set fixed flag for exact link speed' " Kevin Traynor
@ 2019-05-08 10:20   ` Andrew Rybchenko
  2019-05-08 10:26     ` Kevin Traynor
  0 siblings, 1 reply; 54+ messages in thread
From: Andrew Rybchenko @ 2019-05-08 10:20 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Bernard Iremonger, dpdk stable

Hi Kevin,

The patch was rolled back recently in master since some Intel drivers
do not support fixed speed and it makes regressions.

Andrew.

On 5/8/19 1:14 PM, Kevin Traynor wrote:
> Hi,
>
> FYI, your patch has been queued to LTS release 18.11.2
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 05/13/19. So please
> shout if anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Queued patches are on a temporary branch at:
> https://github.com/kevintraynor/dpdk-stable-queue
>
> This queued commit can be viewed at:
> https://github.com/kevintraynor/dpdk-stable-queue/commit/fee50d95b9f544f48487546cf597668ebfba6a6d
>
> Thanks.
>
> Kevin Traynor
>
> ---
>  From fee50d95b9f544f48487546cf597668ebfba6a6d Mon Sep 17 00:00:00 2001
> From: Andrew Rybchenko <arybchenko@solarflare.com>
> Date: Fri, 12 Apr 2019 14:12:33 +0100
> Subject: [PATCH] app/testpmd: set fixed flag for exact link speed
>
> [ upstream commit bdca79053b6aea504d02691d9319fa976062457f ]
>
> Setting exact link speed makes sense if auto-negotiation is
> disabled. Fixed flag is required to disable auto-negotiation.
>
> Fixes: 88fbedcd5e5a ("app/testpmd: move speed and duplex parsing in a function")
>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
> ---
>   app/test-pmd/cmdline.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index f17ca3282..5d719a186 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -1430,15 +1430,15 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
>   		}
>   		if (!strcmp(speedstr, "1000")) {
> -			*speed = ETH_LINK_SPEED_1G;
> +			*speed = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_FIXED;
>   		} else if (!strcmp(speedstr, "10000")) {
> -			*speed = ETH_LINK_SPEED_10G;
> +			*speed = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_FIXED;
>   		} else if (!strcmp(speedstr, "25000")) {
> -			*speed = ETH_LINK_SPEED_25G;
> +			*speed = ETH_LINK_SPEED_25G | ETH_LINK_SPEED_FIXED;
>   		} else if (!strcmp(speedstr, "40000")) {
> -			*speed = ETH_LINK_SPEED_40G;
> +			*speed = ETH_LINK_SPEED_40G | ETH_LINK_SPEED_FIXED;
>   		} else if (!strcmp(speedstr, "50000")) {
> -			*speed = ETH_LINK_SPEED_50G;
> +			*speed = ETH_LINK_SPEED_50G | ETH_LINK_SPEED_FIXED;
>   		} else if (!strcmp(speedstr, "100000")) {
> -			*speed = ETH_LINK_SPEED_100G;
> +			*speed = ETH_LINK_SPEED_100G | ETH_LINK_SPEED_FIXED;
>   		} else if (!strcmp(speedstr, "auto")) {
>   			*speed = ETH_LINK_SPEED_AUTONEG;


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

* Re: [dpdk-stable] patch 'app/testpmd: set fixed flag for exact link speed' has been queued to LTS release 18.11.2
  2019-05-08 10:20   ` Andrew Rybchenko
@ 2019-05-08 10:26     ` Kevin Traynor
  0 siblings, 0 replies; 54+ messages in thread
From: Kevin Traynor @ 2019-05-08 10:26 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Bernard Iremonger, dpdk stable

On 08/05/2019 11:20, Andrew Rybchenko wrote:
> Hi Kevin,
> 

Hi Andrew,

> The patch was rolled back recently in master since some Intel drivers
> do not support fixed speed and it makes regressions.
> 

ok, thanks for letting me know. As it's just a straight revert in master
and not a fixup, I won't apply it on dpdk-stable in the first instance.

Kevin.

> Andrew.
> 
> On 5/8/19 1:14 PM, Kevin Traynor wrote:
>> Hi,
>>
>> FYI, your patch has been queued to LTS release 18.11.2
>>
>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>> It will be pushed if I get no objections before 05/13/19. So please
>> shout if anyone has objections.
>>
>> Also note that after the patch there's a diff of the upstream commit vs the
>> patch applied to the branch. This will indicate if there was any rebasing
>> needed to apply to the stable branch. If there were code changes for rebasing
>> (ie: not only metadata diffs), please double check that the rebase was
>> correctly done.
>>
>> Queued patches are on a temporary branch at:
>> https://github.com/kevintraynor/dpdk-stable-queue
>>
>> This queued commit can be viewed at:
>> https://github.com/kevintraynor/dpdk-stable-queue/commit/fee50d95b9f544f48487546cf597668ebfba6a6d
>>
>> Thanks.
>>
>> Kevin Traynor
>>
>> ---
>>  From fee50d95b9f544f48487546cf597668ebfba6a6d Mon Sep 17 00:00:00 2001
>> From: Andrew Rybchenko <arybchenko@solarflare.com>
>> Date: Fri, 12 Apr 2019 14:12:33 +0100
>> Subject: [PATCH] app/testpmd: set fixed flag for exact link speed
>>
>> [ upstream commit bdca79053b6aea504d02691d9319fa976062457f ]
>>
>> Setting exact link speed makes sense if auto-negotiation is
>> disabled. Fixed flag is required to disable auto-negotiation.
>>
>> Fixes: 88fbedcd5e5a ("app/testpmd: move speed and duplex parsing in a function")
>>
>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
>> ---
>>   app/test-pmd/cmdline.c | 12 ++++++------
>>   1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
>> index f17ca3282..5d719a186 100644
>> --- a/app/test-pmd/cmdline.c
>> +++ b/app/test-pmd/cmdline.c
>> @@ -1430,15 +1430,15 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
>>   		}
>>   		if (!strcmp(speedstr, "1000")) {
>> -			*speed = ETH_LINK_SPEED_1G;
>> +			*speed = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_FIXED;
>>   		} else if (!strcmp(speedstr, "10000")) {
>> -			*speed = ETH_LINK_SPEED_10G;
>> +			*speed = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_FIXED;
>>   		} else if (!strcmp(speedstr, "25000")) {
>> -			*speed = ETH_LINK_SPEED_25G;
>> +			*speed = ETH_LINK_SPEED_25G | ETH_LINK_SPEED_FIXED;
>>   		} else if (!strcmp(speedstr, "40000")) {
>> -			*speed = ETH_LINK_SPEED_40G;
>> +			*speed = ETH_LINK_SPEED_40G | ETH_LINK_SPEED_FIXED;
>>   		} else if (!strcmp(speedstr, "50000")) {
>> -			*speed = ETH_LINK_SPEED_50G;
>> +			*speed = ETH_LINK_SPEED_50G | ETH_LINK_SPEED_FIXED;
>>   		} else if (!strcmp(speedstr, "100000")) {
>> -			*speed = ETH_LINK_SPEED_100G;
>> +			*speed = ETH_LINK_SPEED_100G | ETH_LINK_SPEED_FIXED;
>>   		} else if (!strcmp(speedstr, "auto")) {
>>   			*speed = ETH_LINK_SPEED_AUTONEG;
> 
> 


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

end of thread, other threads:[~2019-05-08 10:26 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' has been queued to LTS release 18.11.2 Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix memory leak' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix ramrod timeout' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix DMAE " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix race for periodic flags' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix optic module verification' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/mlx5: fix RSS validation function' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/enetc: fix SMMU unhandled context fault' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/enetc: fix big endian build and buffer allocation' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/enetc: fix crash at high speed traffic' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'app/testpmd: set fixed flag for exact link speed' " Kevin Traynor
2019-05-08 10:20   ` Andrew Rybchenko
2019-05-08 10:26     ` Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/iavf: fix info get' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'crypto/virtio: fix IV offset' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/virtio: fix buffer leak on VLAN insert' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/virtio-user: fix return value check' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'vhost: fix device leak on connection add failure' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'vhost: fix null pointer checking' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'vhost: fix passing destroyed device to destroy callback' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'vhost: fix silent queue enabling with legacy guests' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/virtio: fix dangling pointer on failure' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/i40e: fix logging on VF close' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/mlx5: fix memory region cleanup' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/mlx4: " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/cxgbe: fix colliding function names' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/tap: fix multi process reply buffer' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'bus/vmbus: fix resource leak on error' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'app/bbdev: replace sprintf with snprintf or strlcpy' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'power: fix thread-safety environment modification' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix resource leak' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix unreachable VF MAC init' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix string null termination' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix string overflow' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix overflowed value' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix build with some disabled PMDs' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'examples/vhost_scsi: fix null-check for parameter' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/i40e: fix dereference before null check in mbuf release' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/i40e: fix dereference before check when getting EEPROM' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'app/testpmd: fix variable use before null check' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'bitrate: fix unchecked return value' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'doc: fix heading levels in bbdev test guide' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/qat: fix null cipher algo for non 8-byte multiple' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'eventdev: fix crypto adapter' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/snow3g: add to meson build' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/kasumi: fix dependency check' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/zuc: " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/ixgbe: fix warning with GCC 9' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'bus/fslmc: " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'raw/skeleton: fix warnings " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'raw/dpaa2_cmdif: " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'build: fix meson binutils workaround' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'build: fix crash by disabling AVX512 with binutils 2.31' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'build: fix ninja install on FreeBSD' " Kevin Traynor

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