patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7
@ 2020-02-19 15:55 Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'examples/ethtool: fix unchecked return value' " Kevin Traynor
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:55 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Ido Goshen, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/2527d59084537b2915aa6f80c45df404688fbba6

Thanks.

Kevin.

---
From 2527d59084537b2915aa6f80c45df404688fbba6 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Wed, 12 Feb 2020 13:47:44 +0000
Subject: [PATCH] acl: fix 32-bit match for range field

[ upstream commit dbed2c9ef8d3e0c99d026c5bd401c9e2c3d0bdcd ]

ACL build phase for range fields that are bigger then
16 bits might generate wrong trie.
For more details please refer to:
https://bugs.dpdk.org/show_bug.cgi?id=307

Bugzilla ID: 307
Fixes: dc276b5780c2 ("acl: new library")

Reported-by: Ido Goshen <ido@cgstowernetworks.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_acl/acl_bld.c | 148 ++++++++++++++++++++++++++++-----------
 1 file changed, 106 insertions(+), 42 deletions(-)

diff --git a/lib/librte_acl/acl_bld.c b/lib/librte_acl/acl_bld.c
index b06bbe9207..d1f920b09c 100644
--- a/lib/librte_acl/acl_bld.c
+++ b/lib/librte_acl/acl_bld.c
@@ -779,7 +779,6 @@ acl_build_reset(struct rte_acl_ctx *ctx)
 
 static void
-acl_gen_range(struct acl_build_context *context,
-	const uint8_t *hi, const uint8_t *lo, int size, int level,
-	struct rte_acl_node *root, struct rte_acl_node *end)
+acl_gen_full_range(struct acl_build_context *context, struct rte_acl_node *root,
+	struct rte_acl_node *end, int size, int level)
 {
 	struct rte_acl_node *node, *prev;
@@ -789,8 +788,69 @@ acl_gen_range(struct acl_build_context *context,
 	for (n = size - 1; n > 0; n--) {
 		node = acl_alloc_node(context, level++);
-		acl_add_ptr_range(context, prev, node, lo[n], hi[n]);
+		acl_add_ptr_range(context, prev, node, 0, UINT8_MAX);
 		prev = node;
 	}
-	acl_add_ptr_range(context, prev, end, lo[0], hi[0]);
+	acl_add_ptr_range(context, prev, end, 0, UINT8_MAX);
+}
+
+static void
+acl_gen_range_mdl(struct acl_build_context *context, struct rte_acl_node *root,
+	struct rte_acl_node *end, uint8_t lo, uint8_t hi, int size, int level)
+{
+	struct rte_acl_node *node;
+
+	node = acl_alloc_node(context, level++);
+	acl_add_ptr_range(context, root, node, lo, hi);
+	acl_gen_full_range(context, node, end, size - 1, level);
+}
+
+static void
+acl_gen_range_low(struct acl_build_context *context, struct rte_acl_node *root,
+	struct rte_acl_node *end, const uint8_t *lo, int size, int level)
+{
+	struct rte_acl_node *node;
+	uint32_t n;
+
+	n = size - 1;
+	if (n == 0) {
+		acl_add_ptr_range(context, root, end, lo[0], UINT8_MAX);
+		return;
+	}
+
+	node = acl_alloc_node(context, level++);
+	acl_add_ptr_range(context, root, node, lo[n], lo[n]);
+
+	/* generate lower-bound sub-trie */
+	acl_gen_range_low(context, node, end, lo, n, level);
+
+	/* generate middle sub-trie */
+	if (n > 1 && lo[n - 1] != UINT8_MAX)
+		acl_gen_range_mdl(context, node, end, lo[n - 1] + 1, UINT8_MAX,
+			n, level);
+}
+
+static void
+acl_gen_range_high(struct acl_build_context *context, struct rte_acl_node *root,
+	struct rte_acl_node *end, const uint8_t *hi, int size, int level)
+{
+	struct rte_acl_node *node;
+	uint32_t n;
+
+	n = size - 1;
+	if (n == 0) {
+		acl_add_ptr_range(context, root, end, 0, hi[0]);
+		return;
+	}
+
+	node = acl_alloc_node(context, level++);
+	acl_add_ptr_range(context, root, node, hi[n], hi[n]);
+
+	/* generate upper-bound sub-trie */
+	acl_gen_range_high(context, node, end, hi, n, level);
+
+	/* generate middle sub-trie */
+	if (n > 1 && hi[n - 1] != 0)
+		acl_gen_range_mdl(context, node, end, 0, hi[n - 1] - 1,
+			n, level);
 }
 
@@ -800,50 +860,54 @@ acl_gen_range_trie(struct acl_build_context *context,
 	int size, int level, struct rte_acl_node **pend)
 {
-	int32_t n;
-	struct rte_acl_node *root;
-	const uint8_t *lo = min;
-	const uint8_t *hi = max;
+	int32_t k, n;
+	uint8_t hi_ff, lo_00;
+	struct rte_acl_node *node, *prev, *root;
+	const uint8_t *lo;
+	const uint8_t *hi;
 
-	*pend = acl_alloc_node(context, level+size);
+	lo = min;
+	hi = max;
+
+	*pend = acl_alloc_node(context, level + size);
 	root = acl_alloc_node(context, level++);
+	prev = root;
 
-	if (lo[size - 1] == hi[size - 1]) {
-		acl_gen_range(context, hi, lo, size, level, root, *pend);
-	} else {
-		uint8_t limit_lo[64];
-		uint8_t limit_hi[64];
-		uint8_t hi_ff = UINT8_MAX;
-		uint8_t lo_00 = 0;
+	/* build common sub-trie till possible */
+	for (n = size - 1; n > 0 && lo[n] == hi[n]; n--) {
+		node = acl_alloc_node(context, level++);
+		acl_add_ptr_range(context, prev, node, lo[n], hi[n]);
+		prev = node;
+	}
 
-		memset(limit_lo, 0, RTE_DIM(limit_lo));
-		memset(limit_hi, UINT8_MAX, RTE_DIM(limit_hi));
+	/* no branch needed, just one sub-trie */
+	if (n == 0) {
+		acl_add_ptr_range(context, prev, *pend, lo[0], hi[0]);
+		return root;
+	}
 
-		for (n = size - 2; n >= 0; n--) {
-			hi_ff = (uint8_t)(hi_ff & hi[n]);
-			lo_00 = (uint8_t)(lo_00 | lo[n]);
-		}
+	/* gather information about divirgent paths */
+	lo_00 = 0;
+	hi_ff = UINT8_MAX;
+	for (k = n - 1; k >= 0; k--) {
+		hi_ff &= hi[k];
+		lo_00 |= lo[k];
+	}
 
-		if (hi_ff != UINT8_MAX) {
-			limit_lo[size - 1] = hi[size - 1];
-			acl_gen_range(context, hi, limit_lo, size, level,
-				root, *pend);
-		}
+	/* generate left (lower-bound) sub-trie */
+	if (lo_00 != 0)
+		acl_gen_range_low(context, prev, *pend, lo, n + 1, level);
 
-		if (lo_00 != 0) {
-			limit_hi[size - 1] = lo[size - 1];
-			acl_gen_range(context, limit_hi, lo, size, level,
-				root, *pend);
-		}
+	/* generate right (upper-bound) sub-trie */
+	if (hi_ff != UINT8_MAX)
+		acl_gen_range_high(context, prev, *pend, hi, n + 1, level);
 
-		if (hi[size - 1] - lo[size - 1] > 1 ||
-				lo_00 == 0 ||
-				hi_ff == UINT8_MAX) {
-			limit_lo[size-1] = (uint8_t)(lo[size-1] + (lo_00 != 0));
-			limit_hi[size-1] = (uint8_t)(hi[size-1] -
-				(hi_ff != UINT8_MAX));
-			acl_gen_range(context, limit_hi, limit_lo, size,
-				level, root, *pend);
-		}
+	/* generate sub-trie in the middle */
+	if (lo[n] + 1 != hi[n] || lo_00 == 0 || hi_ff == UINT8_MAX) {
+		lo_00 = lo[n] + (lo_00 != 0);
+		hi_ff = hi[n] - (hi_ff != UINT8_MAX);
+		acl_gen_range_mdl(context, prev, *pend, lo_00, hi_ff,
+			n + 1, level);
 	}
+
 	return root;
 }
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:49.810782365 +0000
+++ 0001-acl-fix-32-bit-match-for-range-field.patch	2020-02-19 15:43:49.713142357 +0000
@@ -1 +1 @@
-From dbed2c9ef8d3e0c99d026c5bd401c9e2c3d0bdcd Mon Sep 17 00:00:00 2001
+From 2527d59084537b2915aa6f80c45df404688fbba6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dbed2c9ef8d3e0c99d026c5bd401c9e2c3d0bdcd ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* [dpdk-stable] patch 'examples/ethtool: fix unchecked return value' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
@ 2020-02-19 15:55 ` Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'kni: fix build with Linux 5.6' " Kevin Traynor
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:55 UTC (permalink / raw)
  To: Gargi Sau; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/2042297f9d2e9c1b89167fea325ddaa5f7fccac2

Thanks.

Kevin.

---
From 2042297f9d2e9c1b89167fea325ddaa5f7fccac2 Mon Sep 17 00:00:00 2001
From: Gargi Sau <gargi.sau@intel.com>
Date: Mon, 9 Dec 2019 06:37:56 +0000
Subject: [PATCH] examples/ethtool: fix unchecked return value

[ upstream commit 899f6de24bb6504d56369aef5f55bb370d58784d ]

This checks the return value from the function
rte_eth_dev_set_vlan_offload.

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

Signed-off-by: Gargi Sau <gargi.sau@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/ethtool/lib/rte_ethtool.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c
index 63344376c8..eba7dd9ac8 100644
--- a/examples/ethtool/lib/rte_ethtool.c
+++ b/examples/ethtool/lib/rte_ethtool.c
@@ -371,4 +371,5 @@ rte_ethtool_net_set_rx_mode(uint16_t port_id)
 	struct rte_eth_dev_info dev_info;
 	uint16_t vf;
+	int ret;
 
 	rte_eth_dev_info_get(port_id, &dev_info);
@@ -384,5 +385,7 @@ rte_ethtool_net_set_rx_mode(uint16_t port_id)
 
 	/* Enable Rx vlan filter, VF unspport status is discard */
-	rte_eth_dev_set_vlan_offload(port_id, ETH_VLAN_FILTER_MASK);
+	ret = rte_eth_dev_set_vlan_offload(port_id, ETH_VLAN_FILTER_MASK);
+	if (ret != 0)
+		return ret;
 
 	return 0;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:49.857832385 +0000
+++ 0002-examples-ethtool-fix-unchecked-return-value.patch	2020-02-19 15:43:49.713142357 +0000
@@ -1 +1 @@
-From 899f6de24bb6504d56369aef5f55bb370d58784d Mon Sep 17 00:00:00 2001
+From 2042297f9d2e9c1b89167fea325ddaa5f7fccac2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 899f6de24bb6504d56369aef5f55bb370d58784d ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +17,2 @@
- examples/ethtool/lib/rte_ethtool.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
+ examples/ethtool/lib/rte_ethtool.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
@@ -20 +21 @@
-index 667d7eaf27..db8150efd5 100644
+index 63344376c8..eba7dd9ac8 100644
@@ -23 +24,7 @@
-@@ -403,5 +403,7 @@ rte_ethtool_net_set_rx_mode(uint16_t port_id)
+@@ -371,4 +371,5 @@ rte_ethtool_net_set_rx_mode(uint16_t port_id)
+ 	struct rte_eth_dev_info dev_info;
+ 	uint16_t vf;
++	int ret;
+ 
+ 	rte_eth_dev_info_get(port_id, &dev_info);
+@@ -384,5 +385,7 @@ rte_ethtool_net_set_rx_mode(uint16_t port_id)


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

* [dpdk-stable] patch 'kni: fix build with Linux 5.6' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'examples/ethtool: fix unchecked return value' " Kevin Traynor
@ 2020-02-19 15:55 ` Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'fix Mellanox copyright and SPDX tag' " Kevin Traynor
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:55 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/6ff755242707bbf6ff99edc58be5c1d8d791f8b8

Thanks.

Kevin.

---
From 6ff755242707bbf6ff99edc58be5c1d8d791f8b8 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Wed, 12 Feb 2020 17:14:24 +0000
Subject: [PATCH] kni: fix build with Linux 5.6

[ upstream commit 38ad54f3bc7614b53bd6ca3644a471a3842502fc ]

With the following Linux commit a new parameter 'txqueue' has been added
to 'ndo_tx_timeout' ndo:
commit 0290bd291cc0 ("netdev: pass the stuck queue to the timeout handler")

The change reflected to the KNI with version check.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 kernel/linux/kni/compat.h  | 4 ++++
 kernel/linux/kni/kni_net.c | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 3c575c70a2..3c3855dcfa 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -118,2 +118,6 @@
 #define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
 #endif
+
+#if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE
+#define HAVE_TX_TIMEOUT_TXQUEUE
+#endif
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index f3f2f73c7b..dba6a9c838 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -597,6 +597,11 @@ kni_net_rx(struct kni_dev *kni)
  * Deal with a transmit timeout.
  */
+#ifdef HAVE_TX_TIMEOUT_TXQUEUE
+static void
+kni_net_tx_timeout(struct net_device *dev, unsigned int txqueue)
+#else
 static void
 kni_net_tx_timeout(struct net_device *dev)
+#endif
 {
 	struct kni_dev *kni = netdev_priv(dev);
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:49.904839818 +0000
+++ 0003-kni-fix-build-with-Linux-5.6.patch	2020-02-19 15:43:49.715142317 +0000
@@ -1 +1 @@
-From 38ad54f3bc7614b53bd6ca3644a471a3842502fc Mon Sep 17 00:00:00 2001
+From 6ff755242707bbf6ff99edc58be5c1d8d791f8b8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 38ad54f3bc7614b53bd6ca3644a471a3842502fc ]
+
@@ -12,2 +13,0 @@
-Cc: stable@dpdk.org
-
@@ -22 +22 @@
-index 7109474ec5..9ee45dbf6f 100644
+index 3c575c70a2..3c3855dcfa 100644
@@ -25,2 +25,2 @@
-@@ -131,2 +131,6 @@
- #define HAVE_IOVA_TO_KVA_MAPPING_SUPPORT
+@@ -118,2 +118,6 @@
+ #define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
@@ -33 +33 @@
-index 97fe85be9a..c82c881a2c 100644
+index f3f2f73c7b..dba6a9c838 100644
@@ -36 +36 @@
-@@ -624,6 +624,11 @@ kni_net_rx(struct kni_dev *kni)
+@@ -597,6 +597,11 @@ kni_net_rx(struct kni_dev *kni)
@@ -47 +47 @@
- 	pr_debug("Transmit timeout at %ld, latency %ld\n", jiffies,
+ 	struct kni_dev *kni = netdev_priv(dev);


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

* [dpdk-stable] patch 'fix Mellanox copyright and SPDX tag' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'examples/ethtool: fix unchecked return value' " Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'kni: fix build with Linux 5.6' " Kevin Traynor
@ 2020-02-19 15:55 ` Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'kni: fix not contiguous FIFO' " Kevin Traynor
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:55 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/a4d52af54c274bf70f1098be553ed4da22d0dc74

Thanks.

Kevin.

---
From a4d52af54c274bf70f1098be553ed4da22d0dc74 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Sun, 9 Feb 2020 22:14:52 +0100
Subject: [PATCH] fix Mellanox copyright and SPDX tag

[ upstream commit 80139e35493286bce0568cee03f58762b4051120 ]

Mellanox owns Tilera and EZchip, so the copyrights can be converted.
At the same time, the license header is switched to SPDX tag format,
and a typo is fixed in another copyright line.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/test-pmd/flowgen.c | 34 ++--------------------------------
 app/test-pmd/macswap.c | 33 ++-------------------------------
 app/test-pmd/util.c    |  2 +-
 devtools/cocci.sh      | 32 ++------------------------------
 4 files changed, 7 insertions(+), 94 deletions(-)

diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index 3214e3c958..c50fcbf727 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -1,34 +1,4 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2013 Tilera Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Tilera Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2014-2020 Mellanox Technologies, Ltd
  */
 
diff --git a/app/test-pmd/macswap.c b/app/test-pmd/macswap.c
index a8384d5b81..f8989261d5 100644
--- a/app/test-pmd/macswap.c
+++ b/app/test-pmd/macswap.c
@@ -1,33 +1,4 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2014 Tilera Corporation. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Tilera Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2014-2020 Mellanox Technologies, Ltd
  */
 
diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
index 042dc6fb9f..c20c059bc2 100644
--- a/app/test-pmd/util.c
+++ b/app/test-pmd/util.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2010-2014 Intel Corporation
- * Copyright(c) 2018 Mellanox Technology
+ * Copyright 2018 Mellanox Technologies, Ltd
  */
 
diff --git a/devtools/cocci.sh b/devtools/cocci.sh
index 8b17a8ceba..ab9a6efe9a 100755
--- a/devtools/cocci.sh
+++ b/devtools/cocci.sh
@@ -1,33 +1,5 @@
 #! /bin/sh
-
-# BSD LICENSE
-#
-# Copyright 2015 EZchip Semiconductor Ltd.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-#   * Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#   * Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in
-#     the documentation and/or other materials provided with the
-#     distribution.
-#   * Neither the name of EZchip Semiconductor nor the names of its
-#     contributors may be used to endorse or promote products derived
-#     from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2015-2020 Mellanox Technologies, Ltd
 
 # Apply coccinelle transforms.
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:49.952373432 +0000
+++ 0004-fix-Mellanox-copyright-and-SPDX-tag.patch	2020-02-19 15:43:49.717142276 +0000
@@ -1 +1 @@
-From 80139e35493286bce0568cee03f58762b4051120 Mon Sep 17 00:00:00 2001
+From a4d52af54c274bf70f1098be553ed4da22d0dc74 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 80139e35493286bce0568cee03f58762b4051120 ]
+
@@ -19 +21 @@
-index ae50cdc9de..4bd351e675 100644
+index 3214e3c958..c50fcbf727 100644
@@ -60 +62 @@
-index 71af916fc3..8428c26d85 100644
+index a8384d5b81..f8989261d5 100644
@@ -100 +102 @@
-index 418d74e589..8488fa1a8f 100644
+index 042dc6fb9f..c20c059bc2 100644


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

* [dpdk-stable] patch 'kni: fix not contiguous FIFO' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (2 preceding siblings ...)
  2020-02-19 15:55 ` [dpdk-stable] patch 'fix Mellanox copyright and SPDX tag' " Kevin Traynor
@ 2020-02-19 15:55 ` Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'examples/l3fwd-power: fix a typo' " Kevin Traynor
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:55 UTC (permalink / raw)
  To: Scott Wasson; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/0e793ac50f77634154dd9ebcb96d824b2a177684

Thanks.

Kevin.

---
From 0e793ac50f77634154dd9ebcb96d824b2a177684 Mon Sep 17 00:00:00 2001
From: Scott Wasson <scott_wasson@affirmednetworks.com>
Date: Fri, 14 Feb 2020 10:00:52 +0000
Subject: [PATCH] kni: fix not contiguous FIFO

[ upstream commit eab71b8463c9d3aeeb8c222ff6159b4125d23019 ]

KNI requires FIFO to be physically contiguous, with existing
'rte_memzone_reserve()' API this is not guaranteed by default and as a
result KNI rings and packet delivery may be broken if reserved memory
is not physically contiguous.

Fixing it by providing 'RTE_MEMZONE_IOVA_CONTIG' flag to ask physically
contiguous memory.

Bugzilla ID: 389
Fixes: 23fa86e529e4 ("memzone: enable IOVA-contiguous reserving")

Signed-off-by: Scott Wasson <scott_wasson@affirmednetworks.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_kni/rte_kni.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
index 941bec9682..b7bd8773bc 100644
--- a/lib/librte_kni/rte_kni.c
+++ b/lib/librte_kni/rte_kni.c
@@ -143,29 +143,36 @@ kni_reserve_mz(struct rte_kni *kni)
 
 	snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_TX_Q_MZ_NAME_FMT, kni->name);
-	kni->m_tx_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0);
+	kni->m_tx_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY,
+			RTE_MEMZONE_IOVA_CONTIG);
 	KNI_MEM_CHECK(kni->m_tx_q == NULL, tx_q_fail);
 
 	snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_RX_Q_MZ_NAME_FMT, kni->name);
-	kni->m_rx_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0);
+	kni->m_rx_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY,
+			RTE_MEMZONE_IOVA_CONTIG);
 	KNI_MEM_CHECK(kni->m_rx_q == NULL, rx_q_fail);
 
 	snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_ALLOC_Q_MZ_NAME_FMT, kni->name);
-	kni->m_alloc_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0);
+	kni->m_alloc_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY,
+			RTE_MEMZONE_IOVA_CONTIG);
 	KNI_MEM_CHECK(kni->m_alloc_q == NULL, alloc_q_fail);
 
 	snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_FREE_Q_MZ_NAME_FMT, kni->name);
-	kni->m_free_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0);
+	kni->m_free_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY,
+			RTE_MEMZONE_IOVA_CONTIG);
 	KNI_MEM_CHECK(kni->m_free_q == NULL, free_q_fail);
 
 	snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_REQ_Q_MZ_NAME_FMT, kni->name);
-	kni->m_req_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0);
+	kni->m_req_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY,
+			RTE_MEMZONE_IOVA_CONTIG);
 	KNI_MEM_CHECK(kni->m_req_q == NULL, req_q_fail);
 
 	snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_RESP_Q_MZ_NAME_FMT, kni->name);
-	kni->m_resp_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0);
+	kni->m_resp_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY,
+			RTE_MEMZONE_IOVA_CONTIG);
 	KNI_MEM_CHECK(kni->m_resp_q == NULL, resp_q_fail);
 
 	snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_SYNC_ADDR_MZ_NAME_FMT, kni->name);
-	kni->m_sync_addr = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0);
+	kni->m_sync_addr = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY,
+			RTE_MEMZONE_IOVA_CONTIG);
 	KNI_MEM_CHECK(kni->m_sync_addr == NULL, sync_addr_fail);
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.000599158 +0000
+++ 0005-kni-fix-not-contiguous-FIFO.patch	2020-02-19 15:43:49.718142256 +0000
@@ -1 +1 @@
-From eab71b8463c9d3aeeb8c222ff6159b4125d23019 Mon Sep 17 00:00:00 2001
+From 0e793ac50f77634154dd9ebcb96d824b2a177684 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eab71b8463c9d3aeeb8c222ff6159b4125d23019 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index e388751e33..bcf82cc2d5 100644
+index 941bec9682..b7bd8773bc 100644
@@ -28 +29 @@
-@@ -146,29 +146,36 @@ kni_reserve_mz(struct rte_kni *kni)
+@@ -143,29 +143,36 @@ kni_reserve_mz(struct rte_kni *kni)


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

* [dpdk-stable] patch 'examples/l3fwd-power: fix a typo' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (3 preceding siblings ...)
  2020-02-19 15:55 ` [dpdk-stable] patch 'kni: fix not contiguous FIFO' " Kevin Traynor
@ 2020-02-19 15:55 ` Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'examples/l3fwd-power: fix interrupt disable' " Kevin Traynor
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:55 UTC (permalink / raw)
  To: Xiao Wang; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/ff9254b5a8ee7bfecc5f3e9d93a63a29bdd02426

Thanks.

Kevin.

---
From ff9254b5a8ee7bfecc5f3e9d93a63a29bdd02426 Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Mon, 20 Jan 2020 22:06:56 -0500
Subject: [PATCH] examples/l3fwd-power: fix a typo

[ upstream commit dd22d31721b38dd49b7eb7b6c7a3802c9c3cb02e ]

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

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 examples/l3fwd-power/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index ec06129c10..cbad7f7b59 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1153,5 +1153,5 @@ start_rx:
 				rte_delay_us(lcore_idle_hint);
 			else {
-				/* suspend until rx interrupt trigges */
+				/* suspend until rx interrupt triggers */
 				if (intr_en) {
 					turn_on_intr(qconf);
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.048226300 +0000
+++ 0006-examples-l3fwd-power-fix-a-typo.patch	2020-02-19 15:43:49.721142195 +0000
@@ -1 +1 @@
-From dd22d31721b38dd49b7eb7b6c7a3802c9c3cb02e Mon Sep 17 00:00:00 2001
+From ff9254b5a8ee7bfecc5f3e9d93a63a29bdd02426 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dd22d31721b38dd49b7eb7b6c7a3802c9c3cb02e ]
+
@@ -7 +8,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
-index e90d18b24f..e63abb1da8 100644
+index ec06129c10..cbad7f7b59 100644
@@ -19 +20 @@
-@@ -1329,5 +1329,5 @@ start_rx:
+@@ -1153,5 +1153,5 @@ start_rx:


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

* [dpdk-stable] patch 'examples/l3fwd-power: fix interrupt disable' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (4 preceding siblings ...)
  2020-02-19 15:55 ` [dpdk-stable] patch 'examples/l3fwd-power: fix a typo' " Kevin Traynor
@ 2020-02-19 15:55 ` Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'lib: fix unnecessary double negation' " Kevin Traynor
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:55 UTC (permalink / raw)
  To: Xiao Wang; +Cc: Harman Kalra, Liang Ma, David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/10fdbbc7af55e6d1aa5a4501848c1edb17c47b8c

Thanks.

Kevin.

---
From 10fdbbc7af55e6d1aa5a4501848c1edb17c47b8c Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Mon, 20 Jan 2020 22:06:57 -0500
Subject: [PATCH] examples/l3fwd-power: fix interrupt disable

[ upstream commit 49dcf7b98e87a5d2880693da4c09af11e58f3447 ]

Since all related queues' interrupts are turned on before epoll, we need
to turn off all the interrupts after wakeup. This patch fixes the issue
of only turning off the interrupted queues.

Fixes: b736d64787fc ("examples/l3fwd-power: disable Rx interrupt when waking up")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Tested-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Liang Ma <liang.j.ma@intel.com>
Tested-by: Liang Ma <liang.j.ma@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 examples/l3fwd-power/main.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index cbad7f7b59..77009ce809 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -815,7 +815,4 @@ sleep_until_rx_interrupt(int num)
 		queue_id = ((uintptr_t)data) &
 			RTE_LEN2MASK(CHAR_BIT, uint8_t);
-		rte_spinlock_lock(&(locks[port_id]));
-		rte_eth_dev_rx_intr_disable(port_id, queue_id);
-		rte_spinlock_unlock(&(locks[port_id]));
 		RTE_LOG(INFO, L3FWD_POWER,
 			"lcore %u is waked up from rx interrupt on"
@@ -827,5 +824,5 @@ sleep_until_rx_interrupt(int num)
 }
 
-static void turn_on_intr(struct lcore_conf *qconf)
+static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
 {
 	int i;
@@ -840,5 +837,8 @@ static void turn_on_intr(struct lcore_conf *qconf)
 
 		rte_spinlock_lock(&(locks[port_id]));
-		rte_eth_dev_rx_intr_enable(port_id, queue_id);
+		if (on)
+			rte_eth_dev_rx_intr_enable(port_id, queue_id);
+		else
+			rte_eth_dev_rx_intr_disable(port_id, queue_id);
 		rte_spinlock_unlock(&(locks[port_id]));
 	}
@@ -1155,7 +1155,8 @@ start_rx:
 				/* suspend until rx interrupt triggers */
 				if (intr_en) {
-					turn_on_intr(qconf);
+					turn_on_off_intr(qconf, 1);
 					sleep_until_rx_interrupt(
 						qconf->n_rx_queue);
+					turn_on_off_intr(qconf, 0);
 					/**
 					 * start receiving packets immediately
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.096863152 +0000
+++ 0007-examples-l3fwd-power-fix-interrupt-disable.patch	2020-02-19 15:43:49.724142135 +0000
@@ -1 +1 @@
-From 49dcf7b98e87a5d2880693da4c09af11e58f3447 Mon Sep 17 00:00:00 2001
+From 10fdbbc7af55e6d1aa5a4501848c1edb17c47b8c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 49dcf7b98e87a5d2880693da4c09af11e58f3447 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index e63abb1da8..c7fe0ec034 100644
+index cbad7f7b59..77009ce809 100644
@@ -26 +27 @@
-@@ -871,7 +871,4 @@ sleep_until_rx_interrupt(int num)
+@@ -815,7 +815,4 @@ sleep_until_rx_interrupt(int num)
@@ -34 +35 @@
-@@ -883,5 +880,5 @@ sleep_until_rx_interrupt(int num)
+@@ -827,5 +824,5 @@ sleep_until_rx_interrupt(int num)
@@ -41 +42 @@
-@@ -896,5 +893,8 @@ static void turn_on_intr(struct lcore_conf *qconf)
+@@ -840,5 +837,8 @@ static void turn_on_intr(struct lcore_conf *qconf)
@@ -51 +52 @@
-@@ -1331,7 +1331,8 @@ start_rx:
+@@ -1155,7 +1155,8 @@ start_rx:


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

* [dpdk-stable] patch 'lib: fix unnecessary double negation' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (5 preceding siblings ...)
  2020-02-19 15:55 ` [dpdk-stable] patch 'examples/l3fwd-power: fix interrupt disable' " Kevin Traynor
@ 2020-02-19 15:55 ` Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'crypto/ccp: fix queue alignment' " Kevin Traynor
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:55 UTC (permalink / raw)
  To: Ciara Power; +Cc: Ferruh Yigit, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/368b63ca65b313dde4e85d85ea5a926914c4b207

Thanks.

Kevin.

---
From 368b63ca65b313dde4e85d85ea5a926914c4b207 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Fri, 14 Feb 2020 16:17:25 +0000
Subject: [PATCH] lib: fix unnecessary double negation

[ upstream commit f42c9ac5b6b5fabd3c6bb124914af6704445e853 ]

An equality expression already returns either 0 or 1.
There is no need to use double negation for these cases.

Fixes: ea672a8b1655 ("mbuf: remove the rte_pktmbuf structure")
Fixes: a0fd91cefcc0 ("mempool: rename functions with confusing names")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf.h       | 2 +-
 lib/librte_mempool/rte_mempool.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 8eab5a836b..56406f15c9 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -2093,5 +2093,5 @@ static inline int rte_pktmbuf_is_contiguous(const struct rte_mbuf *m)
 {
 	__rte_mbuf_sanity_check(m, 1);
-	return !!(m->nb_segs == 1);
+	return m->nb_segs == 1;
 }
 
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index a22cef49e0..217fd34b57 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -1574,5 +1574,5 @@ static inline int
 rte_mempool_full(const struct rte_mempool *mp)
 {
-	return !!(rte_mempool_avail_count(mp) == mp->size);
+	return rte_mempool_avail_count(mp) == mp->size;
 }
 
@@ -1593,5 +1593,5 @@ static inline int
 rte_mempool_empty(const struct rte_mempool *mp)
 {
-	return !!(rte_mempool_avail_count(mp) == 0);
+	return rte_mempool_avail_count(mp) == 0;
 }
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.145205864 +0000
+++ 0008-lib-fix-unnecessary-double-negation.patch	2020-02-19 15:43:49.728142053 +0000
@@ -1 +1 @@
-From f42c9ac5b6b5fabd3c6bb124914af6704445e853 Mon Sep 17 00:00:00 2001
+From 368b63ca65b313dde4e85d85ea5a926914c4b207 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f42c9ac5b6b5fabd3c6bb124914af6704445e853 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 59023893a5..34679e0920 100644
+index 8eab5a836b..56406f15c9 100644
@@ -25 +26 @@
-@@ -1700,5 +1700,5 @@ static inline int rte_pktmbuf_is_contiguous(const struct rte_mbuf *m)
+@@ -2093,5 +2093,5 @@ static inline int rte_pktmbuf_is_contiguous(const struct rte_mbuf *m)
@@ -33 +34 @@
-index a2c92727a6..c90cf31467 100644
+index a22cef49e0..217fd34b57 100644
@@ -36 +37 @@
-@@ -1655,5 +1655,5 @@ static inline int
+@@ -1574,5 +1574,5 @@ static inline int
@@ -43 +44 @@
-@@ -1674,5 +1674,5 @@ static inline int
+@@ -1593,5 +1593,5 @@ static inline int


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

* [dpdk-stable] patch 'crypto/ccp: fix queue alignment' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (6 preceding siblings ...)
  2020-02-19 15:55 ` [dpdk-stable] patch 'lib: fix unnecessary double negation' " Kevin Traynor
@ 2020-02-19 15:55 ` Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'test/compress: replace test vector' " Kevin Traynor
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:55 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/ccd970ca9be7e969833f438643b6acf1453fb44c

Thanks.

Kevin.

---
From ccd970ca9be7e969833f438643b6acf1453fb44c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 7 Feb 2020 15:06:00 +0100
Subject: [PATCH] crypto/ccp: fix queue alignment

[ upstream commit b3bf2367d0edc11cae26572a7b13133840bf2184 ]

Caught by compiling with -fno-common.
A ____cacheline_aligned symbol can be found in the crypto/ccp driver
object files.

Looking at this driver source, the ____cacheline_aligned (kernel?)
alignment macro is undefined.
The compiler treats this as a symbol definition and generates a global
symbol.

Fixes: ef4b04f87fa6 ("crypto/ccp: support device init")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/crypto/ccp/ccp_dev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/ccp/ccp_dev.h b/drivers/crypto/ccp/ccp_dev.h
index f4ad9eafd5..37e04218ce 100644
--- a/drivers/crypto/ccp/ccp_dev.h
+++ b/drivers/crypto/ccp/ccp_dev.h
@@ -221,5 +221,5 @@ struct ccp_queue {
 	uint32_t sb_hmac;
 	/**< lsb assigned for hmac ctx */
-} ____cacheline_aligned;
+} __rte_cache_aligned;
 
 /**
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.198803865 +0000
+++ 0009-crypto-ccp-fix-queue-alignment.patch	2020-02-19 15:43:49.729142033 +0000
@@ -1 +1 @@
-From b3bf2367d0edc11cae26572a7b13133840bf2184 Mon Sep 17 00:00:00 2001
+From ccd970ca9be7e969833f438643b6acf1453fb44c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3bf2367d0edc11cae26572a7b13133840bf2184 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org


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

* [dpdk-stable] patch 'test/compress: replace test vector' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (7 preceding siblings ...)
  2020-02-19 15:55 ` [dpdk-stable] patch 'crypto/ccp: fix queue alignment' " Kevin Traynor
@ 2020-02-19 15:55 ` Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'drivers/crypto: fix session-less mode' " Kevin Traynor
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:55 UTC (permalink / raw)
  To: Artur Trybula; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/68f15f08842de990ac44a5edc07a0bc8b988d44a

Thanks.

Kevin.

---
From 68f15f08842de990ac44a5edc07a0bc8b988d44a Mon Sep 17 00:00:00 2001
From: Artur Trybula <arturx.trybula@intel.com>
Date: Thu, 6 Feb 2020 10:37:35 +0100
Subject: [PATCH] test/compress: replace test vector

[ upstream commit 1692bc53df07dcb1ab059ad6433e6273f37f79ab ]

This patch replaces an existing test vector with a new one containing
public domain text only. This is to avoid any potential issues
re-licensing content as BSD-3 which has no clear original license.

Fixes: b06aa643cac4 ("test/compress: add initial unit tests")

Signed-off-by: Artur Trybula <arturx.trybula@intel.com>
---
 test/test/test_compressdev_test_buffer.h | 182 ++++++++++++-----------
 1 file changed, 92 insertions(+), 90 deletions(-)

diff --git a/test/test/test_compressdev_test_buffer.h b/test/test/test_compressdev_test_buffer.h
index c0492f89a2..d241602445 100644
--- a/test/test/test_compressdev_test_buffer.h
+++ b/test/test/test_compressdev_test_buffer.h
@@ -1,2 +1,6 @@
+/* SPDX-License-Identifier: (BSD-3-Clause)
+ * Copyright(c) 2018-2020 Intel Corporation
+ */
+
 #ifndef TEST_COMPRESSDEV_TEST_BUFFERS_H_
 #define TEST_COMPRESSDEV_TEST_BUFFERS_H_
@@ -191,104 +195,102 @@ static const char test_buf_shakespeare[] =
 	"ORLANDO	Go apart, Adam, and thou shalt hear how he will\n";
 
-/* Snippet of source code in Pascal */
-static const char test_buf_pascal[] =
-	"	Ptr    = 1..DMem;\n"
-	"	Loc    = 1..IMem;\n"
-	"	Loc0   = 0..IMem;\n"
-	"	EdgeT  = (hout,lin,hin,lout); {Warning this order is important in}\n"
-	"				      {predicates such as gtS,geS}\n"
-	"	CardT  = (finite,infinite);\n"
-	"	ExpT   = Minexp..Maxexp;\n"
-	"	ManT   = Mininf..Maxinf; \n"
-	"	Pflag  = (PNull,PSoln,PTrace,PPrint);\n"
-	"	Sreal  = record\n"
-	"		    edge:EdgeT;\n"
-	"		    cardinality:CardT;\n"
-	"		    exp:ExpT; {exponent}\n"
-	"		    mantissa:ManT;\n"
-	"		 end;\n"
-	"	Int    = record\n"
-	"		    hi:Sreal;\n"
-	"		    lo:Sreal;\n"
-	"	 end;\n"
-	"	Instr  = record\n"
-	"		    Code:OpType;\n"
-	"		    Pars: array[0..Par] of 0..DMem;\n"
-	"		 end;\n"
-	"	DataMem= record\n"
-	"		    D        :array [Ptr] of Int;\n"
-	"		    S        :array [Loc] of State;\n"
-	"		    LastHalve:Loc;\n"
-	"		    RHalve   :array [Loc] of real;\n"
-	"		 end;\n"
-	"	DataFlags=record\n"
-	"		    PF	     :array [Ptr] of Pflag;\n"
-	"		 end;\n"
-	"var\n"
-	"	Debug  : (none,activity,post,trace,dump);\n"
-	"	Cut    : (once,all);\n"
-	"	GlobalEnd,Verifiable:boolean;\n"
-	"	HalveThreshold:real;\n"
-	"	I      : array [Loc] of Instr; {Memory holding instructions}\n"
-	"	End    : Loc; {last instruction in I}\n"
-	"	ParN   : array [OpType] of -1..Par; {number of parameters for each \n"
-	"			opcode. -1 means no result}\n"
-	"        ParIntersect : array [OpType] of boolean ;\n"
-	"	DInit  : DataMem; {initial memory which is cleared and \n"
-	"				used in first call}\n"
-	"	DF     : DataFlags; {hold flags for variables, e.g. print/trace}\n"
-	"	MaxDMem:0..DMem;\n"
-	"	Shift  : array[0..Digits] of 1..maxint;{array of constant multipliers}\n"
-	"						{used for alignment etc.}\n"
-	"	Dummy  :Positive;\n"
-	"	{constant intervals and Sreals}\n"
-	"	PlusInfS,MinusInfS,PlusSmallS,MinusSmallS,ZeroS,\n"
-	"	PlusFiniteS,MinusFiniteS:Sreal;\n"
-	"	Zero,All,AllFinite:Int;\n"
+/* Snippet of Alice's Adventures in Wonderland */
+static const char test_buf_alice2[] =
+	"`Curiouser and curiouser!' cried Alice (she was so much\n"
+	"surprised, that for the moment she quite forgot how to speak good\n"
+	"English); `now I'm opening out like the largest telescope that\n"
+	"ever was!  Good-bye, feet!' (for when she looked down at her\n"
+	"feet, they seemed to be almost out of sight, they were getting so\n"
+	"far off).  `Oh, my poor little feet, I wonder who will put on\n"
+	"your shoes and stockings for you now, dears?  I'm sure _I_ shan't\n"
+	"be able!  I shall be a great deal too far off to trouble myself\n"
+	"about you:  you must manage the best way you can; --but I must be\n"
+	"kind to them,' thought Alice, `or perhaps they won't walk the\n"
+	"way I want to go!  Let me see:  I'll give them a new pair of\n"
+	"boots every Christmas.'\n"
 	"\n"
-	"procedure deblank;\n"
-	"var Ch:char;\n"
-	"begin\n"
-	"   while (not eof) and (input^ in [' ','	']) do read(Ch);\n"
-	"end;\n"
+	"  And she went on planning to herself how she would manage it.\n"
+	"`They must go by the carrier,' she thought; `and how funny it'll\n"
+	"seem, sending presents to one's own feet!  And how odd the\n"
+	"directions will look!\n"
 	"\n"
-	"procedure InitialOptions;\n"
+	"	    ALICE'S RIGHT FOOT, ESQ.\n"
+	"		HEARTHRUG,\n"
+	"		    NEAR THE FENDER,\n"
+	"			(WITH ALICE'S LOVE).\n"
 	"\n"
-	"#include '/user/profs/cleary/bin/options.i';\n"
+	"Oh dear, what nonsense I'm talking!'\n"
 	"\n"
-	"   procedure Option;\n"
-	"   begin\n"
-	"      case Opt of\n"
-	"      'a','A':Debug:=activity;\n"
-	"      'd','D':Debug:=dump;\n"
-	"      'h','H':HalveThreshold:=StringNum/100;\n"
-	"      'n','N':Debug:=none;\n"
-	"      'p','P':Debug:=post;\n"
-	"      't','T':Debug:=trace;\n"
-	"      'v','V':Verifiable:=true;\n"
-	"      end;\n"
-	"   end;\n"
+	"  Just then her head struck against the roof of the hall:  in\n"
+	"fact she was now more than nine feet high, and she at once took\n"
+	"up the little golden key and hurried off to the garden door.\n"
 	"\n"
-	"begin\n"
-	"   Debug:=trace;\n"
-	"   Verifiable:=false;\n"
-	"   HalveThreshold:=67/100;\n"
-	"   Options;\n"
-	"   writeln(Debug);\n"
-	"   writeln('Verifiable:',Verifiable);\n"
-	"   writeln('Halve threshold',HalveThreshold);\n"
-	"end;{InitialOptions}\n"
+	"  Poor Alice!  It was as much as she could do, lying down on one\n"
+	"side, to look through into the garden with one eye; but to get\n"
+	"through was more hopeless than ever:  she sat down and began to\n"
+	"cry again.\n"
 	"\n"
-	"procedure NormalizeUp(E,M:integer;var S:Sreal;var Closed:boolean);\n"
-	"begin\n"
-	"with S do\n"
-	"begin\n"
-	"   if M=0 then S:=ZeroS else\n"
-	"   if M>0 then\n";
+	"  `You ought to be ashamed of yourself,' said Alice, `a great\n"
+	"girl like you,' (she might well say this), `to go on crying in\n"
+	"this way!  Stop this moment, I tell you!'  But she went on all\n"
+	"the same, shedding gallons of tears, until there was a large pool\n"
+	"all round her, about four inches deep and reaching half down the\n"
+	"hall.\n"
+	"\n"
+	" After a time she heard a little pattering of feet in the\n"
+	"distance, and she hastily dried her eyes to see what was coming.\n"
+	"It was the White Rabbit returning, splendidly dressed, with a\n"
+	"pair of white kid gloves in one hand and a large fan in the\n"
+	"other:  he came trotting along in a great hurry, muttering to\n"
+	"himself as he came, `Oh! the Duchess, the Duchess! Oh! won't she\n"
+	"be savage if I've kept her waiting!'  Alice felt so desperate\n"
+	"that she was ready to ask help of any one; so, when the Rabbit\n"
+	"came near her, she began, in a low, timid voice, `If you please,\n"
+	"sir--'  The Rabbit started violently, dropped the white kid\n"
+	"gloves and the fan, and skurried away into the darkness as hard\n"
+	"as he could go.\n"
+	"\n"
+	"  Alice took up the fan and gloves, and, as the hall was very\n"
+	"hot, she kept fanning herself all the time she went on talking:\n"
+	"`Dear, dear!  How queer everything is to-day!  And yesterday\n"
+	"things went on just as usual.  I wonder if I've been changed in\n"
+	"the night?  Let me think:  was I the same when I got up this\n"
+	"morning?  I almost think I can remember feeling a little\n"
+	"different.  But if I'm not the same, the next question is, Who in\n"
+	"the world am I?  Ah, THAT'S the great puzzle!'  And she began\n"
+	"thinking over all the children she knew that were of the same age\n"
+	"as herself, to see if she could have been changed for any of\n"
+	"them.\n"
+	"\n"
+	"  `I'm sure I'm not Ada,' she said, `for her hair goes in such\n"
+	"long ringlets, and mine doesn't go in ringlets at all; and I'm\n"
+	"sure I can't be Mabel, for I know all sorts of things, and she,\n"
+	"oh! she knows such a very little!  Besides, SHE'S she, and I'm I,\n"
+	"and--oh dear, how puzzling it all is!  I'll try if I know all the\n"
+	"things I used to know.  Let me see:  four times five is twelve,\n"
+	"and four times six is thirteen, and four times seven is--oh dear!\n"
+	"I shall never get to twenty at that rate!  However, the\n"
+	"Multiplication Table doesn't signify:  let's try Geography.\n"
+	"London is the capital of Paris, and Paris is the capital of Rome,\n"
+	"and Rome--no, THAT'S all wrong, I'm certain!  I must have been\n"
+	"changed for Mabel!  I'll try and say ''How doth the little--''\n"
+	"and she crossed her hands on her lap as if she were saying lessons,\n"
+	"and began to repeat it, but her voice sounded hoarse and\n"
+	"strange, and the words did not come the same as they used to do:--\n"
+	"\n"
+	"	    `How doth the little crocodile\n"
+	"	      Improve his shining tail,\n"
+	"	    And pour the waters of the Nile\n"
+	"	      On every golden scale!\n"
+	"\n"
+	"	    `How cheerfully he seems to grin,\n"
+	"	      How neatly spread his claws,\n"
+	"	    And welcome little fishes in\n"
+	"	      With gently smiling jaws!'\n";
 
 static const char * const compress_test_bufs[] = {
 	test_buf_alice,
 	test_buf_shakespeare,
-	test_buf_pascal
+	test_buf_alice2
 };
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.248462423 +0000
+++ 0010-test-compress-replace-test-vector.patch	2020-02-19 15:43:49.730142013 +0000
@@ -1 +1 @@
-From 1692bc53df07dcb1ab059ad6433e6273f37f79ab Mon Sep 17 00:00:00 2001
+From 68f15f08842de990ac44a5edc07a0bc8b988d44a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1692bc53df07dcb1ab059ad6433e6273f37f79ab ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- app/test/test_compressdev_test_buffer.h | 182 ++++++++++++------------
+ test/test/test_compressdev_test_buffer.h | 182 ++++++++++++-----------
@@ -18 +19 @@
-diff --git a/app/test/test_compressdev_test_buffer.h b/app/test/test_compressdev_test_buffer.h
+diff --git a/test/test/test_compressdev_test_buffer.h b/test/test/test_compressdev_test_buffer.h
@@ -20,2 +21,2 @@
---- a/app/test/test_compressdev_test_buffer.h
-+++ b/app/test/test_compressdev_test_buffer.h
+--- a/test/test/test_compressdev_test_buffer.h
++++ b/test/test/test_compressdev_test_buffer.h


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

* [dpdk-stable] patch 'drivers/crypto: fix session-less mode' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (8 preceding siblings ...)
  2020-02-19 15:55 ` [dpdk-stable] patch 'test/compress: replace test vector' " Kevin Traynor
@ 2020-02-19 15:55 ` Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'net/bnxt: fix buffer allocation reattempt' " Kevin Traynor
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:55 UTC (permalink / raw)
  To: Junxiao Shi; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/fc86473e334566d706198a26022ff8c617e3e806

Thanks.

Kevin.

---
From fc86473e334566d706198a26022ff8c617e3e806 Mon Sep 17 00:00:00 2001
From: Junxiao Shi <git@mail1.yoursunny.com>
Date: Mon, 27 Jan 2020 11:32:11 -0700
Subject: [PATCH] drivers/crypto: fix session-less mode

[ upstream commit a0c2b3d8ee501b90eb11c2a82da0aaca19362bd3 ]

When OpenSSL or AESNI-MB cryptodev is being used in sessionless mode
for symmetric crypto operation (e.g. SHA256 hash), the driver prints
error message:

    CRYPTODEV: set_sym_session_private_data() line 489:
               Set private data for driver 0 not allowed

Then, AESNI-MB driver segfaults in post_process_mb_job().

Bugzilla ID: 377
Fixes: b3bbd9e5f2 ("cryptodev: support device independent sessions")
Fixes: c68d7aa354 ("crypto/aesni_mb: use architecture independent macros")

Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 ++--
 drivers/crypto/openssl/rte_openssl_pmd.c   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 83250e32cc..45dd86a756 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -663,8 +663,8 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
 					cryptodev_driver_id);
 	} else {
-		void *_sess = NULL;
+		void *_sess = rte_cryptodev_sym_session_create(qp->sess_mp);
 		void *_sess_private_data = NULL;
 
-		if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
+		if (_sess == NULL)
 			return NULL;
 
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 90a91bd831..36122a43ce 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -763,8 +763,8 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
 
 		/* provide internal session */
-		void *_sess = NULL;
+		void *_sess = rte_cryptodev_sym_session_create(qp->sess_mp);
 		void *_sess_private_data = NULL;
 
-		if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
+		if (_sess == NULL)
 			return NULL;
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.295775677 +0000
+++ 0011-drivers-crypto-fix-session-less-mode.patch	2020-02-19 15:43:49.733141952 +0000
@@ -1 +1 @@
-From a0c2b3d8ee501b90eb11c2a82da0aaca19362bd3 Mon Sep 17 00:00:00 2001
+From fc86473e334566d706198a26022ff8c617e3e806 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a0c2b3d8ee501b90eb11c2a82da0aaca19362bd3 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 97d9f81766..33f4167452 100644
+index 83250e32cc..45dd86a756 100644
@@ -30 +31 @@
-@@ -730,8 +730,8 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
+@@ -663,8 +663,8 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
@@ -42 +43 @@
-index 91f028308c..199097bf8c 100644
+index 90a91bd831..36122a43ce 100644


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

* [dpdk-stable] patch 'net/bnxt: fix buffer allocation reattempt' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (9 preceding siblings ...)
  2020-02-19 15:55 ` [dpdk-stable] patch 'drivers/crypto: fix session-less mode' " Kevin Traynor
@ 2020-02-19 15:55 ` Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'net/netvsc: initialize link state' " Kevin Traynor
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:55 UTC (permalink / raw)
  To: Santoshkumar Karanappa Rastapur; +Cc: Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/19562f083ea2f118b61820482416db47aa88be19

Thanks.

Kevin.

---
From 19562f083ea2f118b61820482416db47aa88be19 Mon Sep 17 00:00:00 2001
From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Date: Thu, 6 Feb 2020 22:03:14 +0530
Subject: [PATCH] net/bnxt: fix buffer allocation reattempt

[ upstream commit 01829dea7303bc91063c461a675856dbbbcc6460 ]

In case of a buffer allocation failure, we reattempt buffer allocation
before the Rx handler exits. We were not attempting this when producer
index is greater than the number of buffers to allocate. Fixed it with
correct checks.

Fixes: d9dd0b29ed31 ("net/bnxt: fix Rx handling and buffer allocation logic")

Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index bcfbad135e..3a1d22354d 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -609,8 +609,9 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 	/* Attempt to alloc Rx buf in case of a previous allocation failure. */
 	if (rc == -ENOMEM) {
-		int i;
+		int i = RING_NEXT(rxr->rx_ring_struct, prod);
+		int cnt = nb_rx_pkts;
 
-		for (i = prod; i <= nb_rx_pkts;
-			i = RING_NEXT(rxr->rx_ring_struct, i)) {
+		for (; cnt;
+			i = RING_NEXT(rxr->rx_ring_struct, i), cnt--) {
 			struct bnxt_sw_rx_bd *rx_buf = &rxr->rx_buf_ring[i];
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.347081103 +0000
+++ 0012-net-bnxt-fix-buffer-allocation-reattempt.patch	2020-02-19 15:43:49.734141932 +0000
@@ -1 +1 @@
-From 01829dea7303bc91063c461a675856dbbbcc6460 Mon Sep 17 00:00:00 2001
+From 19562f083ea2f118b61820482416db47aa88be19 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 01829dea7303bc91063c461a675856dbbbcc6460 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 1f47db97ba..bef9720f59 100644
+index bcfbad135e..3a1d22354d 100644
@@ -24 +25 @@
-@@ -679,8 +679,9 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -609,8 +609,9 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,


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

* [dpdk-stable] patch 'net/netvsc: initialize link state' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (10 preceding siblings ...)
  2020-02-19 15:55 ` [dpdk-stable] patch 'net/bnxt: fix buffer allocation reattempt' " Kevin Traynor
@ 2020-02-19 15:55 ` Kevin Traynor
  2020-02-19 15:55 ` [dpdk-stable] patch 'net/ixgbe: remove dead code' " Kevin Traynor
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:55 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Mohammed Gamal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/29731e27bb433dab783e8ce7fa29ac32bc2095d1

Thanks.

Kevin.

---
From 29731e27bb433dab783e8ce7fa29ac32bc2095d1 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 7 Feb 2020 10:08:16 -0800
Subject: [PATCH] net/netvsc: initialize link state

[ upstream commit 047ad3787a2f5d99277e0d8d756580a1d5ea2891 ]

If application is using link state interrupt, the correct link state
needs to be filled in when device is started. This is similar to
how virtio updates link information.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Reported-by: Mohammed Gamal <mgamal@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Mohammed Gamal <mgamal@redhat.com>
---
 drivers/net/netvsc/hn_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 085a3f6350..04efd092ec 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -623,4 +623,8 @@ hn_dev_start(struct rte_eth_dev *dev)
 		hn_rndis_set_rxfilter(hv, 0);
 
+	/* Initialize Link state */
+	if (error == 0)
+		hn_dev_link_update(dev, 0);
+
 	return error;
 }
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.397887227 +0000
+++ 0013-net-netvsc-initialize-link-state.patch	2020-02-19 15:43:49.736141891 +0000
@@ -1 +1 @@
-From 047ad3787a2f5d99277e0d8d756580a1d5ea2891 Mon Sep 17 00:00:00 2001
+From 29731e27bb433dab783e8ce7fa29ac32bc2095d1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 047ad3787a2f5d99277e0d8d756580a1d5ea2891 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index c79f924379..564620748d 100644
+index 085a3f6350..04efd092ec 100644
@@ -24 +25 @@
-@@ -824,4 +824,8 @@ hn_dev_start(struct rte_eth_dev *dev)
+@@ -623,4 +623,8 @@ hn_dev_start(struct rte_eth_dev *dev)


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

* [dpdk-stable] patch 'net/ixgbe: remove dead code' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (11 preceding siblings ...)
  2020-02-19 15:55 ` [dpdk-stable] patch 'net/netvsc: initialize link state' " Kevin Traynor
@ 2020-02-19 15:55 ` Kevin Traynor
  2020-02-19 15:56 ` [dpdk-stable] patch 'net/mlx5: fix VLAN match for DV mode' " Kevin Traynor
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:55 UTC (permalink / raw)
  To: Shougang Wang; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/7c7b8326c127e09367da43d9f59549fc0f17aa7f

Thanks.

Kevin.

---
From 7c7b8326c127e09367da43d9f59549fc0f17aa7f Mon Sep 17 00:00:00 2001
From: Shougang Wang <shougangx.wang@intel.com>
Date: Tue, 11 Feb 2020 09:26:22 +0000
Subject: [PATCH] net/ixgbe: remove dead code

[ upstream commit e07e2ca9e565ebb6fa7c70e3b9718046a011cc7a ]

This patch fixes (Logically dead code) coverity issue.

Coverity issue: 353624
Fixes: ba7b12dd64e4 ("net/ixgbe: fix link up in FreeBSD")

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index fc7fc68120..e06cc433c7 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4097,10 +4097,7 @@ ixgbe_wait_for_link_up(struct ixgbe_hw *hw)
 {
 #ifdef RTE_EXEC_ENV_FREEBSD
-	const int nb_iter = 25;
-#else
-	const int nb_iter = 0;
-#endif
 	int err, i, link_up = 0;
 	uint32_t speed = 0;
+	const int nb_iter = 25;
 
 	for (i = 0; i < nb_iter; i++) {
@@ -4112,5 +4109,10 @@ ixgbe_wait_for_link_up(struct ixgbe_hw *hw)
 		msec_delay(200);
 	}
+
 	return 0;
+#else
+	RTE_SET_USED(hw);
+	return 0;
+#endif
 }
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.446823501 +0000
+++ 0014-net-ixgbe-remove-dead-code.patch	2020-02-19 15:43:49.746141688 +0000
@@ -1 +1 @@
-From e07e2ca9e565ebb6fa7c70e3b9718046a011cc7a Mon Sep 17 00:00:00 2001
+From 7c7b8326c127e09367da43d9f59549fc0f17aa7f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e07e2ca9e565ebb6fa7c70e3b9718046a011cc7a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 7ea1962f60..2a248a3f27 100644
+index fc7fc68120..e06cc433c7 100644
@@ -22 +23 @@
-@@ -4129,11 +4129,8 @@ ixgbe_wait_for_link_up(struct ixgbe_hw *hw)
+@@ -4097,10 +4097,7 @@ ixgbe_wait_for_link_up(struct ixgbe_hw *hw)
@@ -29,2 +30 @@
- 	int err, i;
- 	bool link_up = false;
+ 	int err, i, link_up = 0;
@@ -35 +35 @@
-@@ -4145,5 +4142,10 @@ ixgbe_wait_for_link_up(struct ixgbe_hw *hw)
+@@ -4112,5 +4109,10 @@ ixgbe_wait_for_link_up(struct ixgbe_hw *hw)


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

* [dpdk-stable] patch 'net/mlx5: fix VLAN match for DV mode' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (12 preceding siblings ...)
  2020-02-19 15:55 ` [dpdk-stable] patch 'net/ixgbe: remove dead code' " Kevin Traynor
@ 2020-02-19 15:56 ` Kevin Traynor
  2020-02-19 15:56 ` [dpdk-stable] patch 'vhost: check message header size read' " Kevin Traynor
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:56 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/3d79e4f2d563857344a06385ccfae412076d0704

Thanks.

Kevin.

---
From 3d79e4f2d563857344a06385ccfae412076d0704 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Tue, 11 Feb 2020 13:05:11 +0200
Subject: [PATCH] net/mlx5: fix VLAN match for DV mode

[ upstream commit 00f75a40576b28aa5633d2cadd86f23c30c7d220 ]

Currently MLX5 PMD can't match on untagged packets specifically.
Tagged traffic still hits the flows intended for untagged packets.
If the flow has ETH, it will catch all matching packets, tagged
and untagged.
The solution is to use cvlan_tag bit.
If mask=1 and value=0 it matches on untagged traffic.
If mask=1 and value=1 it matches on tagged traffic.
This is the kernel implementation.

This patch updated MLX5 PMD to set cvlan_tag mask and value according
to flow rule contents.
This update is relevant when using DV flow engine (dv_flow_en=1).

See example at https://doc.dpdk.org/guides/nics/mlx5.html#limitations.

Fixes: fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 doc/guides/nics/mlx5.rst        |  9 +++------
 drivers/net/mlx5/mlx5_flow_dv.c | 11 +++++++++++
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 6acbbca6e0..e566f44189 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -93,5 +93,6 @@ Limitations
     different virtual address in secondary process, unexpected error may happen.
 
-- Flow pattern without any specific vlan will match for vlan packets as well:
+- When using Verbs flow engine (``dv_flow_en`` = 0), flow pattern without any
+  specific VLAN will match for VLAN packets as well:
 
   When VLAN spec is not specified in the pattern, the matching rule will be created with VLAN as a wild card.
@@ -100,12 +101,8 @@ Limitations
         flow create 0 ingress pattern eth / vlan vid is 3 / ipv4 / end ...
 
-  Will only match vlan packets with vid=3. and the flow rules::
+  Will only match vlan packets with vid=3. and the flow rule::
 
         flow create 0 ingress pattern eth / ipv4 / end ...
 
-  Or::
-
-        flow create 0 ingress pattern eth / vlan / ipv4 / end ...
-
   Will match any ipv4 packet (VLAN included).
 
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 04c0a5813b..a6c9137079 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1189,4 +1189,13 @@ flow_dv_translate_item_eth(void *matcher, void *key,
 	l24_v = MLX5_ADDR_OF(fte_match_set_lyr_2_4, headers_v, ethertype);
 	*(uint16_t *)(l24_v) = eth_m->type & eth_v->type;
+	if (eth_v->type) {
+		/* When ethertype is present set mask for tagged VLAN. */
+		MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
+		/* Set value for tagged VLAN if ethertype is 802.1Q. */
+		if (eth_v->type == RTE_BE16(ETHER_TYPE_VLAN) ||
+		    eth_v->type == RTE_BE16(ETHER_TYPE_QINQ))
+			MLX5_SET(fte_match_set_lyr_2_4, headers_v, cvlan_tag,
+				 1);
+	}
 }
 
@@ -1315,4 +1324,5 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
 	MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
 		 ipv4_v->hdr.next_proto_id & ipv4_m->hdr.next_proto_id);
+	MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
 }
 
@@ -1414,4 +1424,5 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
 	MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
 		 ipv6_v->hdr.proto & ipv6_m->hdr.proto);
+	MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
 }
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.504928425 +0000
+++ 0015-net-mlx5-fix-VLAN-match-for-DV-mode.patch	2020-02-19 15:43:49.751141587 +0000
@@ -1 +1 @@
-From 00f75a40576b28aa5633d2cadd86f23c30c7d220 Mon Sep 17 00:00:00 2001
+From 3d79e4f2d563857344a06385ccfae412076d0704 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 00f75a40576b28aa5633d2cadd86f23c30c7d220 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -27,4 +28,3 @@
- doc/guides/nics/mlx5.rst               |  9 +++------
- doc/guides/rel_notes/release_20_02.rst |  1 +
- drivers/net/mlx5/mlx5_flow_dv.c        | 11 +++++++++++
- 3 files changed, 15 insertions(+), 6 deletions(-)
+ doc/guides/nics/mlx5.rst        |  9 +++------
+ drivers/net/mlx5/mlx5_flow_dv.c | 11 +++++++++++
+ 2 files changed, 14 insertions(+), 6 deletions(-)
@@ -33 +33 @@
-index 2411fb3461..2ea4fa9546 100644
+index 6acbbca6e0..e566f44189 100644
@@ -36 +36 @@
-@@ -111,5 +111,6 @@ Limitations
+@@ -93,5 +93,6 @@ Limitations
@@ -44 +44 @@
-@@ -118,12 +119,8 @@ Limitations
+@@ -100,12 +101,8 @@ Limitations
@@ -58,10 +57,0 @@
-diff --git a/doc/guides/rel_notes/release_20_02.rst b/doc/guides/rel_notes/release_20_02.rst
-index 2d28a04ab6..3c7b5d71c0 100644
---- a/doc/guides/rel_notes/release_20_02.rst
-+++ b/doc/guides/rel_notes/release_20_02.rst
-@@ -119,4 +119,5 @@ New Features
-   * Added support for RSS using L3/L4 source/destination only.
-   * Added support for matching on GTP tunnel header item.
-+  * Removed limitation of matching on tagged/untagged packets (when using DV flow engine).
- 
- * **Add new vDPA PMD based on Mellanox devices**
@@ -69 +59 @@
-index d88daeccbc..a9bb0b4f10 100644
+index 04c0a5813b..a6c9137079 100644
@@ -72 +62 @@
-@@ -5217,4 +5217,13 @@ flow_dv_translate_item_eth(void *matcher, void *key,
+@@ -1189,4 +1189,13 @@ flow_dv_translate_item_eth(void *matcher, void *key,
@@ -79,2 +69,2 @@
-+		if (eth_v->type == RTE_BE16(RTE_ETHER_TYPE_VLAN) ||
-+		    eth_v->type == RTE_BE16(RTE_ETHER_TYPE_QINQ))
++		if (eth_v->type == RTE_BE16(ETHER_TYPE_VLAN) ||
++		    eth_v->type == RTE_BE16(ETHER_TYPE_QINQ))
@@ -86 +76 @@
-@@ -5357,4 +5366,5 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
+@@ -1315,4 +1324,5 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
@@ -92 +82 @@
-@@ -5461,4 +5471,5 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
+@@ -1414,4 +1424,5 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,


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

* [dpdk-stable] patch 'vhost: check message header size read' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (13 preceding siblings ...)
  2020-02-19 15:56 ` [dpdk-stable] patch 'net/mlx5: fix VLAN match for DV mode' " Kevin Traynor
@ 2020-02-19 15:56 ` Kevin Traynor
  2020-02-19 15:56 ` [dpdk-stable] patch 'vhost: protect log address translation in IOTLB update' " Kevin Traynor
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:56 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Ilja Van Sprundel, Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/9f9f2da932f3a6f3d5fde901841ab46f79190aa7

Thanks.

Kevin.

---
From 9f9f2da932f3a6f3d5fde901841ab46f79190aa7 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 5 Feb 2020 16:05:29 +0100
Subject: [PATCH] vhost: check message header size read

[ upstream commit 966f89d998a20eddb45666f06dd42a3c3fc94574 ]

This patch adds a check to ensure the read size of
the Vhost-user message header is not smaller than
the expected size.

In case of unexpected read size, report an error
and close file descriptors passed with the message,
if any.

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

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 lib/librte_vhost/vhost_user.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 4c58880f8c..13606cea44 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1998,6 +1998,12 @@ read_vhost_message(int sockfd, struct VhostUserMsg *msg)
 	ret = read_fd_message(sockfd, (char *)msg, VHOST_USER_HDR_SIZE,
 		msg->fds, VHOST_MEMORY_MAX_NREGIONS, &msg->fd_num);
-	if (ret <= 0)
+	if (ret <= 0) {
 		return ret;
+	} else if (ret != VHOST_USER_HDR_SIZE) {
+		RTE_LOG(ERR, VHOST_CONFIG,
+			"Unexpected header size read\n");
+		close_msg_fds(msg);
+		return -1;
+	}
 
 	if (msg->size) {
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.562675531 +0000
+++ 0016-vhost-check-message-header-size-read.patch	2020-02-19 15:43:49.753141547 +0000
@@ -1 +1 @@
-From 966f89d998a20eddb45666f06dd42a3c3fc94574 Mon Sep 17 00:00:00 2001
+From 9f9f2da932f3a6f3d5fde901841ab46f79190aa7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 966f89d998a20eddb45666f06dd42a3c3fc94574 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -21,2 +22,2 @@
- lib/librte_vhost/vhost_user.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
+ lib/librte_vhost/vhost_user.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
@@ -25 +26 @@
-index 9f14ea6676..91482ccd67 100644
+index 4c58880f8c..13606cea44 100644
@@ -28 +29 @@
-@@ -2457,6 +2457,11 @@ read_vhost_message(int sockfd, struct VhostUserMsg *msg)
+@@ -1998,6 +1998,12 @@ read_vhost_message(int sockfd, struct VhostUserMsg *msg)
@@ -35 +36,2 @@
-+		VHOST_LOG_CONFIG(ERR, "Unexpected header size read\n");
++		RTE_LOG(ERR, VHOST_CONFIG,
++			"Unexpected header size read\n");


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

* [dpdk-stable] patch 'vhost: protect log address translation in IOTLB update' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (14 preceding siblings ...)
  2020-02-19 15:56 ` [dpdk-stable] patch 'vhost: check message header size read' " Kevin Traynor
@ 2020-02-19 15:56 ` Kevin Traynor
  2020-02-19 15:56 ` [dpdk-stable] patch 'app/testpmd: fix hot-unplug detaching' " Kevin Traynor
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:56 UTC (permalink / raw)
  To: Adrian Moreno; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/413c05126b5948bc1b14bdb3bcbfcd3fdd3583c3

Thanks.

Kevin.

---
From 413c05126b5948bc1b14bdb3bcbfcd3fdd3583c3 Mon Sep 17 00:00:00 2001
From: Adrian Moreno <amorenoz@redhat.com>
Date: Thu, 13 Feb 2020 11:04:58 +0100
Subject: [PATCH] vhost: protect log address translation in IOTLB update

[ upstream commit 4f37df14c405b754b5e971c75f4f67f4bb5bfdde ]

Currently, the log address translation only  happens in the vhost-user's
translate_ring_addresses(). However, the IOTLB update handler is not
checking if it was mapped to re-trigger that translation.

Since the log address mapping could fail, check it on iotlb updates.
Also, check it on vring_translate() so we do not dirty pages if the
logging address is not yet ready.

Additionally, properly protect the accesses to the iotlb structures.

Fixes: fbda9f145927 ("vhost: translate incoming log address to GPA")

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost.c      | 56 ++++++++++++++++++++++++++++++++++
 lib/librte_vhost/vhost.h      | 15 +++++++--
 lib/librte_vhost/vhost_user.c | 57 +++++++++++++++--------------------
 3 files changed, 93 insertions(+), 35 deletions(-)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index f00efb382c..0432b26638 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -324,4 +324,55 @@ free_device(struct virtio_net *dev)
 }
 
+static __rte_always_inline int
+log_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
+{
+	if (likely(!(vq->ring_addrs.flags & (1 << VHOST_VRING_F_LOG))))
+		return 0;
+
+	vq->log_guest_addr = translate_log_addr(dev, vq,
+						vq->ring_addrs.log_guest_addr);
+	if (vq->log_guest_addr == 0)
+		return -1;
+
+	return 0;
+}
+
+/*
+ * Converts vring log address to GPA
+ * If IOMMU is enabled, the log address is IOVA
+ * If IOMMU not enabled, the log address is already GPA
+ *
+ * Caller should have iotlb_lock read-locked
+ */
+uint64_t
+translate_log_addr(struct virtio_net *dev, struct vhost_virtqueue *vq,
+		uint64_t log_addr)
+{
+	if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) {
+		const uint64_t exp_size = sizeof(uint64_t);
+		uint64_t hva, gpa;
+		uint64_t size = exp_size;
+
+		hva = vhost_iova_to_vva(dev, vq, log_addr,
+					&size, VHOST_ACCESS_RW);
+
+		if (size != exp_size)
+			return 0;
+
+		gpa = hva_to_gpa(dev, hva, exp_size);
+		if (!gpa) {
+			RTE_LOG(ERR, VHOST_CONFIG,
+				"VQ: Failed to find GPA for log_addr: 0x%"
+				PRIx64 " hva: 0x%" PRIx64 "\n",
+				log_addr, hva);
+			return 0;
+		}
+		return gpa;
+
+	} else
+		return log_addr;
+}
+
+/* Caller should have iotlb_lock read-locked */
 static int
 vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
@@ -362,4 +413,5 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
 }
 
+/* Caller should have iotlb_lock read-locked */
 static int
 vring_translate_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)
@@ -408,4 +460,8 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
 			return -1;
 	}
+
+	if (log_translate(dev, vq) < 0)
+		return -1;
+
 	vq->access_ok = 1;
 
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 4279db95a2..535591927f 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -438,5 +438,10 @@ vhost_log_cache_used_vring(struct virtio_net *dev, struct vhost_virtqueue *vq,
 			uint64_t offset, uint64_t len)
 {
-	vhost_log_cache_write(dev, vq, vq->log_guest_addr + offset, len);
+	if (unlikely(dev->features & (1ULL << VHOST_F_LOG_ALL))) {
+		if (unlikely(vq->log_guest_addr == 0))
+			return;
+		__vhost_log_cache_write(dev, vq, vq->log_guest_addr + offset,
+					len);
+	}
 }
 
@@ -445,5 +450,9 @@ vhost_log_used_vring(struct virtio_net *dev, struct vhost_virtqueue *vq,
 		     uint64_t offset, uint64_t len)
 {
-	vhost_log_write(dev, vq->log_guest_addr + offset, len);
+	if (unlikely(dev->features & (1ULL << VHOST_F_LOG_ALL))) {
+		if (unlikely(vq->log_guest_addr == 0))
+			return;
+		__vhost_log_write(dev, vq->log_guest_addr + offset, len);
+	}
 }
 
@@ -594,4 +603,6 @@ void *vhost_alloc_copy_ind_table(struct virtio_net *dev,
 			uint64_t desc_addr, uint64_t desc_len);
 int vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq);
+uint64_t translate_log_addr(struct virtio_net *dev, struct vhost_virtqueue *vq,
+		uint64_t log_addr);
 void vring_invalidate(struct virtio_net *dev, struct vhost_virtqueue *vq);
 
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 13606cea44..2f4bbb342d 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -629,11 +629,9 @@ ring_addr_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
 	if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) {
 		uint64_t vva;
-		uint64_t req_size = *size;
 
-		vva = vhost_user_iotlb_cache_find(vq, ra,
+		vhost_user_iotlb_rd_lock(vq);
+		vva = vhost_iova_to_vva(dev, vq, ra,
 					size, VHOST_ACCESS_RW);
-		if (req_size != *size)
-			vhost_user_iotlb_miss(dev, (ra + *size),
-					      VHOST_ACCESS_RW);
+		vhost_user_iotlb_rd_unlock(vq);
 
 		return vva;
@@ -643,35 +641,14 @@ ring_addr_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
 }
 
-/*
- * Converts vring log address to GPA
- * If IOMMU is enabled, the log address is IOVA
- * If IOMMU not enabled, the log address is already GPA
- */
 static uint64_t
-translate_log_addr(struct virtio_net *dev, struct vhost_virtqueue *vq,
-		uint64_t log_addr)
+log_addr_to_gpa(struct virtio_net *dev, struct vhost_virtqueue *vq)
 {
-	if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) {
-		const uint64_t exp_size = sizeof(struct vring_used) +
-			sizeof(struct vring_used_elem) * vq->size;
-		uint64_t hva, gpa;
-		uint64_t size = exp_size;
+	uint64_t log_gpa;
 
-		hva = vhost_iova_to_vva(dev, vq, log_addr,
-					&size, VHOST_ACCESS_RW);
-		if (size != exp_size)
-			return 0;
+	vhost_user_iotlb_rd_lock(vq);
+	log_gpa = translate_log_addr(dev, vq, vq->ring_addrs.log_guest_addr);
+	vhost_user_iotlb_rd_unlock(vq);
 
-		gpa = hva_to_gpa(dev, hva, exp_size);
-		if (!gpa) {
-			RTE_LOG(ERR, VHOST_CONFIG,
-				"VQ: Failed to find GPA for log_addr: 0x%" PRIx64 " hva: 0x%" PRIx64 "\n",
-				log_addr, hva);
-			return 0;
-		}
-		return gpa;
-
-	} else
-		return log_addr;
+	return log_gpa;
 }
 
@@ -685,5 +662,5 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
 	if (addr->flags & (1 << VHOST_VRING_F_LOG)) {
 		vq->log_guest_addr =
-			translate_log_addr(dev, vq, addr->log_guest_addr);
+			log_addr_to_gpa(dev, vq);
 		if (vq->log_guest_addr == 0) {
 			RTE_LOG(DEBUG, VHOST_CONFIG,
@@ -1788,4 +1765,11 @@ is_vring_iotlb_split(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
 		return 1;
 
+	if (ra->flags & (1 << VHOST_VRING_F_LOG)) {
+		len = sizeof(uint64_t);
+		if (ra->log_guest_addr < end &&
+		    (ra->log_guest_addr + len) > start)
+			return 1;
+	}
+
 	return 0;
 }
@@ -1813,4 +1797,11 @@ is_vring_iotlb_packed(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
 		return 1;
 
+	if (ra->flags & (1 << VHOST_VRING_F_LOG)) {
+		len = sizeof(uint64_t);
+		if (ra->log_guest_addr < end &&
+		    (ra->log_guest_addr + len) > start)
+			return 1;
+	}
+
 	return 0;
 }
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.613352658 +0000
+++ 0017-vhost-protect-log-address-translation-in-IOTLB-updat.patch	2020-02-19 15:43:49.758141445 +0000
@@ -1 +1 @@
-From 4f37df14c405b754b5e971c75f4f67f4bb5bfdde Mon Sep 17 00:00:00 2001
+From 413c05126b5948bc1b14bdb3bcbfcd3fdd3583c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4f37df14c405b754b5e971c75f4f67f4bb5bfdde ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index c819a84774..0266318440 100644
+index f00efb382c..0432b26638 100644
@@ -31 +32 @@
-@@ -354,4 +354,55 @@ free_device(struct virtio_net *dev)
+@@ -324,4 +324,55 @@ free_device(struct virtio_net *dev)
@@ -72 +73 @@
-+			VHOST_LOG_CONFIG(ERR,
++			RTE_LOG(ERR, VHOST_CONFIG,
@@ -87 +88 @@
-@@ -392,4 +443,5 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -362,4 +413,5 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
@@ -93 +94 @@
-@@ -438,4 +490,8 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -408,4 +460,8 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
@@ -103 +104 @@
-index 686ce42a20..2087d1400e 100644
+index 4279db95a2..535591927f 100644
@@ -106 +107 @@
-@@ -463,5 +463,10 @@ vhost_log_cache_used_vring(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -438,5 +438,10 @@ vhost_log_cache_used_vring(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -118 +119 @@
-@@ -470,5 +475,9 @@ vhost_log_used_vring(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -445,5 +450,9 @@ vhost_log_used_vring(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -129 +130 @@
-@@ -627,4 +636,6 @@ void *vhost_alloc_copy_ind_table(struct virtio_net *dev,
+@@ -594,4 +603,6 @@ void *vhost_alloc_copy_ind_table(struct virtio_net *dev,
@@ -137 +138 @@
-index 9a7b8b3088..bd1be01040 100644
+index 13606cea44..2f4bbb342d 100644
@@ -140 +141 @@
-@@ -657,11 +657,9 @@ ring_addr_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -629,11 +629,9 @@ ring_addr_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -155 +156 @@
-@@ -671,35 +669,14 @@ ring_addr_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -643,35 +641,14 @@ ring_addr_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -185 +186 @@
--			VHOST_LOG_CONFIG(ERR,
+-			RTE_LOG(ERR, VHOST_CONFIG,
@@ -197 +198 @@
-@@ -713,5 +690,5 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
+@@ -685,5 +662,5 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
@@ -203,2 +204,2 @@
- 			VHOST_LOG_CONFIG(DEBUG,
-@@ -2252,4 +2229,11 @@ is_vring_iotlb_split(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
+ 			RTE_LOG(DEBUG, VHOST_CONFIG,
+@@ -1788,4 +1765,11 @@ is_vring_iotlb_split(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
@@ -216 +217 @@
-@@ -2277,4 +2261,11 @@ is_vring_iotlb_packed(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
+@@ -1813,4 +1797,11 @@ is_vring_iotlb_packed(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)


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

* [dpdk-stable] patch 'app/testpmd: fix hot-unplug detaching' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (15 preceding siblings ...)
  2020-02-19 15:56 ` [dpdk-stable] patch 'vhost: protect log address translation in IOTLB update' " Kevin Traynor
@ 2020-02-19 15:56 ` Kevin Traynor
  2020-02-19 15:56 ` [dpdk-stable] patch 'net/i40e: fix unchecked Tx cleanup error' " Kevin Traynor
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:56 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/b0edd2452e95ae8558787895d04b07dd0a2e672c

Thanks.

Kevin.

---
From b0edd2452e95ae8558787895d04b07dd0a2e672c Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 13 Feb 2020 16:52:26 +0100
Subject: [PATCH] app/testpmd: fix hot-unplug detaching

[ upstream commit 0654d4a8ad694821e3ce274e87b1ab89fd587f1c ]

There is a possible race condition in the hotplug path
in rmv_port_callback(). If a port is created between
close_port(port_id) and detach_port_device(port_id),
then the port_id will have been reallocated to a different
device which will be wrongly detached.

Since a check was added in detach_port_device() for
manual detach case, the hotplug path was even more broken.
It became impossible to run because the new check prevented
to run detach_port_device() after the port is closed.

The solution for both issues is to not rely on the port_id
for detaching the rte_device.
The function detach_port_device() is split to allow calling
detach_device() directly with the rte_device pointer, saved
before closing the port.

Fixes: cbb4c648c5df ("ethdev: use device handle to detach")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/testpmd.c | 49 +++++++++++++++++++++++++-----------------
 1 file changed, 29 insertions(+), 20 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 31d559494d..a910c06dc2 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2343,16 +2343,9 @@ setup_attached_port(portid_t pi)
 }
 
-void
-detach_port_device(portid_t port_id)
+static void
+detach_device(struct rte_device *dev)
 {
-	struct rte_device *dev;
 	portid_t sibling;
 
-	printf("Removing a device...\n");
-
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
-
-	dev = rte_eth_devices[port_id].device;
 	if (dev == NULL) {
 		printf("Device already removed\n");
@@ -2360,13 +2353,5 @@ detach_port_device(portid_t port_id)
 	}
 
-	if (ports[port_id].port_status != RTE_PORT_CLOSED) {
-		if (ports[port_id].port_status != RTE_PORT_STOPPED) {
-			printf("Port not stopped\n");
-			return;
-		}
-		printf("Port was not closed\n");
-		if (ports[port_id].flow_list)
-			port_flow_flush(port_id);
-	}
+	printf("Removing a device...\n");
 
 	if (rte_dev_remove(dev) < 0) {
@@ -2389,5 +2374,5 @@ detach_port_device(portid_t port_id)
 	remove_invalid_ports();
 
-	printf("Device of port %u is detached\n", port_id);
+	printf("Device is detached\n");
 	printf("Now total ports is %d\n", nb_ports);
 	printf("Done\n");
@@ -2395,4 +2380,23 @@ detach_port_device(portid_t port_id)
 }
 
+void
+detach_port_device(portid_t port_id)
+{
+	if (port_id_is_invalid(port_id, ENABLED_WARN))
+		return;
+
+	if (ports[port_id].port_status != RTE_PORT_CLOSED) {
+		if (ports[port_id].port_status != RTE_PORT_STOPPED) {
+			printf("Port not stopped\n");
+			return;
+		}
+		printf("Port was not closed\n");
+		if (ports[port_id].flow_list)
+			port_flow_flush(port_id);
+	}
+
+	detach_device(rte_eth_devices[port_id].device);
+}
+
 void
 pmd_test_exit(void)
@@ -2539,4 +2543,5 @@ rmv_port_callback(void *arg)
 	int org_no_link_check = no_link_check;
 	portid_t port_id = (intptr_t)arg;
+	struct rte_device *dev;
 
 	RTE_ETH_VALID_PORTID_OR_RET(port_id);
@@ -2549,6 +2554,10 @@ rmv_port_callback(void *arg)
 	stop_port(port_id);
 	no_link_check = org_no_link_check;
+
+	/* Save rte_device pointer before closing ethdev port */
+	dev = rte_eth_devices[port_id].device;
 	close_port(port_id);
-	detach_port_device(port_id);
+	detach_device(dev); /* might be already removed or have more ports */
+
 	if (need_to_start)
 		start_packet_forwarding(0);
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.666650093 +0000
+++ 0018-app-testpmd-fix-hot-unplug-detaching.patch	2020-02-19 15:43:49.761141384 +0000
@@ -1 +1 @@
-From 0654d4a8ad694821e3ce274e87b1ab89fd587f1c Mon Sep 17 00:00:00 2001
+From b0edd2452e95ae8558787895d04b07dd0a2e672c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0654d4a8ad694821e3ce274e87b1ab89fd587f1c ]
+
@@ -23,2 +25 @@
-Fixes: 43d0e304980a ("app/testpmd: fix invalid port detaching")
-Cc: stable@dpdk.org
+Fixes: cbb4c648c5df ("ethdev: use device handle to detach")
@@ -33 +34 @@
-index 031fe25f39..035836adfb 100644
+index 31d559494d..a910c06dc2 100644
@@ -36 +37 @@
-@@ -2634,16 +2634,9 @@ setup_attached_port(portid_t pi)
+@@ -2343,16 +2343,9 @@ setup_attached_port(portid_t pi)
@@ -55 +56 @@
-@@ -2651,13 +2644,5 @@ detach_port_device(portid_t port_id)
+@@ -2360,13 +2353,5 @@ detach_port_device(portid_t port_id)
@@ -70 +71 @@
-@@ -2677,5 +2662,5 @@ detach_port_device(portid_t port_id)
+@@ -2389,5 +2374,5 @@ detach_port_device(portid_t port_id)
@@ -77 +78 @@
-@@ -2683,4 +2668,23 @@ detach_port_device(portid_t port_id)
+@@ -2395,4 +2380,23 @@ detach_port_device(portid_t port_id)
@@ -100,2 +101,2 @@
- detach_devargs(char *identifier)
-@@ -2873,4 +2877,5 @@ rmv_port_callback(void *arg)
+ pmd_test_exit(void)
+@@ -2539,4 +2543,5 @@ rmv_port_callback(void *arg)
@@ -107 +108 @@
-@@ -2883,6 +2888,10 @@ rmv_port_callback(void *arg)
+@@ -2549,6 +2554,10 @@ rmv_port_callback(void *arg)


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

* [dpdk-stable] patch 'net/i40e: fix unchecked Tx cleanup error' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (16 preceding siblings ...)
  2020-02-19 15:56 ` [dpdk-stable] patch 'app/testpmd: fix hot-unplug detaching' " Kevin Traynor
@ 2020-02-19 15:56 ` Kevin Traynor
  2020-02-19 15:56 ` [dpdk-stable] patch 'app/eventdev: fix pipeline test with meson build' " Kevin Traynor
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:56 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/ef6860fb6586ab2f12c0ac120df0afa953b3883a

Thanks.

Kevin.

---
From ef6860fb6586ab2f12c0ac120df0afa953b3883a Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Wed, 12 Feb 2020 20:36:01 +0800
Subject: [PATCH] net/i40e: fix unchecked Tx cleanup error

[ upstream commit ba950e62762bd0198e53666ecc2a791767adc137 ]

Coverity complains of unchecked return value warning of
i40e_xmit_cleanup, while this cleanup is opportunistic and will not
cause problems if it fails. So instead of checking the return value of
i40e_xmit_cleanup and return in case of cleanup failure, we directly
cast it to void function to make the Coverity happy.

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

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/i40e/i40e_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 1642cf4948..e4a314f4ab 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1053,5 +1053,5 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	/* Check if the descriptor ring needs to be cleaned. */
 	if (txq->nb_tx_free < txq->tx_free_thresh)
-		i40e_xmit_cleanup(txq);
+		(void)i40e_xmit_cleanup(txq);
 
 	for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) {
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.716654569 +0000
+++ 0019-net-i40e-fix-unchecked-Tx-cleanup-error.patch	2020-02-19 15:43:49.765141303 +0000
@@ -1 +1 @@
-From ba950e62762bd0198e53666ecc2a791767adc137 Mon Sep 17 00:00:00 2001
+From ef6860fb6586ab2f12c0ac120df0afa953b3883a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ba950e62762bd0198e53666ecc2a791767adc137 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index fd1ae80da8..f6d23c9fb6 100644
+index 1642cf4948..e4a314f4ab 100644
@@ -26 +27 @@
-@@ -1040,5 +1040,5 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -1053,5 +1053,5 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)


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

* [dpdk-stable] patch 'app/eventdev: fix pipeline test with meson build' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (17 preceding siblings ...)
  2020-02-19 15:56 ` [dpdk-stable] patch 'net/i40e: fix unchecked Tx cleanup error' " Kevin Traynor
@ 2020-02-19 15:56 ` Kevin Traynor
  2020-02-19 15:56 ` [dpdk-stable] patch 'usertools: fix syntax warning in python 3.8' " Kevin Traynor
  2020-02-19 15:56 ` [dpdk-stable] patch 'usertools: fix telemetry client with python 3' " Kevin Traynor
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:56 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/1f134a08f4304bd6edceb42a9de71d3be98636e2

Thanks.

Kevin.

---
From 1f134a08f4304bd6edceb42a9de71d3be98636e2 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 3 Feb 2020 10:22:59 +0530
Subject: [PATCH] app/eventdev: fix pipeline test with meson build

[ upstream commit 0d4ba7496512b57e7e0c66d4041d1b339f132629 ]

Add missing pipeline test to meson build.

Fixes: 2ff67267b049 ("app/eventdev: build with meson")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 app/test-eventdev/meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index a81dcd1313..36934efdfb 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -12,4 +12,7 @@ sources = files('evt_main.c',
 		'test_perf_common.c',
 		'test_perf_atq.c',
-		'test_perf_queue.c')
+		'test_perf_queue.c',
+		'test_pipeline_common.c',
+		'test_pipeline_atq.c',
+		'test_pipeline_queue.c')
 deps += 'eventdev'
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.770593849 +0000
+++ 0020-app-eventdev-fix-pipeline-test-with-meson-build.patch	2020-02-19 15:43:49.765141303 +0000
@@ -1 +1 @@
-From 0d4ba7496512b57e7e0c66d4041d1b339f132629 Mon Sep 17 00:00:00 2001
+From 1f134a08f4304bd6edceb42a9de71d3be98636e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0d4ba7496512b57e7e0c66d4041d1b339f132629 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 7ff2b786cf..9e588d9ec7 100644
+index a81dcd1313..36934efdfb 100644
@@ -21 +22 @@
-@@ -11,4 +11,7 @@ sources = files('evt_main.c',
+@@ -12,4 +12,7 @@ sources = files('evt_main.c',


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

* [dpdk-stable] patch 'usertools: fix syntax warning in python 3.8' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (18 preceding siblings ...)
  2020-02-19 15:56 ` [dpdk-stable] patch 'app/eventdev: fix pipeline test with meson build' " Kevin Traynor
@ 2020-02-19 15:56 ` Kevin Traynor
  2020-02-19 15:56 ` [dpdk-stable] patch 'usertools: fix telemetry client with python 3' " Kevin Traynor
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:56 UTC (permalink / raw)
  To: Thomas Faivre; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/f9b34162ff487d8c3c59a246b785c9efc4cc987f

Thanks.

Kevin.

---
From f9b34162ff487d8c3c59a246b785c9efc4cc987f Mon Sep 17 00:00:00 2001
From: Thomas Faivre <thomas.faivre@6wind.com>
Date: Wed, 12 Feb 2020 13:31:56 +0100
Subject: [PATCH] usertools: fix syntax warning in python 3.8

[ upstream commit e1766e7b0c9b4ad30b330677f2376a05b3b46f0c ]

Silent the following warning when running script with python 3.8:

> /usr/bin/dpdk-pmdinfo:542: SyntaxWarning: "is" with a literal.
> Did you mean "=="?
>   if (autoload_path is None or autoload_path is ""):

As autoload_path can only be None or a string, directly check its bool
value.

Fixes: c67c9a5c646a ("tools: query binaries for HW and other support information")

Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
---
 usertools/dpdk-pmdinfo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py
index 069a3bf124..9d5c6369a0 100755
--- a/usertools/dpdk-pmdinfo.py
+++ b/usertools/dpdk-pmdinfo.py
@@ -540,5 +540,5 @@ def scan_for_autoload_pmds(dpdk_path):
 
     (autoload_path, scannedfile) = readelf.search_for_autoload_path()
-    if (autoload_path is None or autoload_path is ""):
+    if not autoload_path:
         if (raw_output is False):
             print("No autoload path configured in %s" % dpdk_path)
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.817113294 +0000
+++ 0021-usertools-fix-syntax-warning-in-python-3.8.patch	2020-02-19 15:43:49.766141283 +0000
@@ -1 +1 @@
-From e1766e7b0c9b4ad30b330677f2376a05b3b46f0c Mon Sep 17 00:00:00 2001
+From f9b34162ff487d8c3c59a246b785c9efc4cc987f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e1766e7b0c9b4ad30b330677f2376a05b3b46f0c ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org


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

* [dpdk-stable] patch 'usertools: fix telemetry client with python 3' has been queued to LTS release 18.11.7
  2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (19 preceding siblings ...)
  2020-02-19 15:56 ` [dpdk-stable] patch 'usertools: fix syntax warning in python 3.8' " Kevin Traynor
@ 2020-02-19 15:56 ` Kevin Traynor
  20 siblings, 0 replies; 22+ messages in thread
From: Kevin Traynor @ 2020-02-19 15:56 UTC (permalink / raw)
  To: Ciara Power; +Cc: Robin Jarry, Kevin Laatz, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/20. 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/412970816782faf3eedcf407482225dd70b7b856

Thanks.

Kevin.

---
From 412970816782faf3eedcf407482225dd70b7b856 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Tue, 21 Jan 2020 17:03:10 +0000
Subject: [PATCH] usertools: fix telemetry client with python 3

[ upstream commit af927da4d7d23f1050f23caf55f4ac2a995ab244 ]

The client script for use with the telemetry library did not support
Python3, as the data being sent over the socket was in string format.
Python3 requires the data be explicitly converted to bytes before being
sent. Similarly, the received bytes need to be decoded into string
format.

Fixes: 53f293c9a783 ("usertools: replace unsafe input function")
Fixes: fe35622659ed ("usertools: fix telemetry client with python 3")
Fixes: d1b94da4a4e0 ("usertools: add client script for telemetry")
Fixes: 4080e46c8078 ("telemetry: support global metrics")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Robin Jarry <robin.jarry@6wind.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
---
 usertools/dpdk-telemetry-client.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/usertools/dpdk-telemetry-client.py b/usertools/dpdk-telemetry-client.py
index 58174c0558..2f471d8411 100644
--- a/usertools/dpdk-telemetry-client.py
+++ b/usertools/dpdk-telemetry-client.py
@@ -3,4 +3,5 @@
 
 from __future__ import print_function
+from __future__ import unicode_literals
 
 import socket
@@ -64,16 +65,17 @@ class Client:
         self.socket.send_fd.connect("/var/run/dpdk/rte/telemetry")
         JSON = (API_REG + self.file_path + "\"}}")
-        self.socket.send_fd.sendall(JSON)
+        self.socket.send_fd.sendall(JSON.encode())
+
         self.socket.recv_fd.listen(1)
         self.socket.client_fd = self.socket.recv_fd.accept()[0]
 
     def unregister(self): # Unregister a given client
-        self.socket.client_fd.send(API_UNREG + self.file_path + "\"}}")
+        self.socket.client_fd.send((API_UNREG + self.file_path + "\"}}").encode())
         self.socket.client_fd.close()
 
     def requestMetrics(self): # Requests metrics for given client
-        self.socket.client_fd.send(METRICS_REQ)
-        data = self.socket.client_fd.recv(BUFFER_SIZE)
-        print("\nResponse: \n", str(data))
+        self.socket.client_fd.send(METRICS_REQ.encode())
+        data = self.socket.client_fd.recv(BUFFER_SIZE).decode()
+        print("\nResponse: \n", data)
 
     def repeatedlyRequestMetrics(self, sleep_time): # Recursively requests metrics for given client
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-19 15:43:50.867865687 +0000
+++ 0022-usertools-fix-telemetry-client-with-python-3.patch	2020-02-19 15:43:49.766141283 +0000
@@ -1 +1 @@
-From af927da4d7d23f1050f23caf55f4ac2a995ab244 Mon Sep 17 00:00:00 2001
+From 412970816782faf3eedcf407482225dd70b7b856 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af927da4d7d23f1050f23caf55f4ac2a995ab244 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -22,2 +23,2 @@
- usertools/dpdk-telemetry-client.py | 18 ++++++++++--------
- 1 file changed, 10 insertions(+), 8 deletions(-)
+ usertools/dpdk-telemetry-client.py | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
@@ -26 +27 @@
-index 290345dcc4..35edb7cd26 100755
+index 58174c0558..2f471d8411 100644
@@ -29 +30 @@
-@@ -4,4 +4,5 @@
+@@ -3,4 +3,5 @@
@@ -35 +36 @@
-@@ -66,16 +67,17 @@ class Client:
+@@ -64,16 +65,17 @@ class Client:
@@ -58,11 +58,0 @@
-@@ -89,7 +91,7 @@ class Client:
- 
-     def requestGlobalMetrics(self): #Requests global metrics for given client
--        self.socket.client_fd.send(GLOBAL_METRICS_REQ)
--        data = self.socket.client_fd.recv(BUFFER_SIZE)
--        print("\nResponse: \n", str(data))
-+        self.socket.client_fd.send(GLOBAL_METRICS_REQ.encode())
-+        data = self.socket.client_fd.recv(BUFFER_SIZE).decode()
-+        print("\nResponse: \n", data)
- 
-     def interactiveMenu(self, sleep_time): # Creates Interactive menu within the script


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

end of thread, other threads:[~2020-02-19 15:58 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 15:55 [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to LTS release 18.11.7 Kevin Traynor
2020-02-19 15:55 ` [dpdk-stable] patch 'examples/ethtool: fix unchecked return value' " Kevin Traynor
2020-02-19 15:55 ` [dpdk-stable] patch 'kni: fix build with Linux 5.6' " Kevin Traynor
2020-02-19 15:55 ` [dpdk-stable] patch 'fix Mellanox copyright and SPDX tag' " Kevin Traynor
2020-02-19 15:55 ` [dpdk-stable] patch 'kni: fix not contiguous FIFO' " Kevin Traynor
2020-02-19 15:55 ` [dpdk-stable] patch 'examples/l3fwd-power: fix a typo' " Kevin Traynor
2020-02-19 15:55 ` [dpdk-stable] patch 'examples/l3fwd-power: fix interrupt disable' " Kevin Traynor
2020-02-19 15:55 ` [dpdk-stable] patch 'lib: fix unnecessary double negation' " Kevin Traynor
2020-02-19 15:55 ` [dpdk-stable] patch 'crypto/ccp: fix queue alignment' " Kevin Traynor
2020-02-19 15:55 ` [dpdk-stable] patch 'test/compress: replace test vector' " Kevin Traynor
2020-02-19 15:55 ` [dpdk-stable] patch 'drivers/crypto: fix session-less mode' " Kevin Traynor
2020-02-19 15:55 ` [dpdk-stable] patch 'net/bnxt: fix buffer allocation reattempt' " Kevin Traynor
2020-02-19 15:55 ` [dpdk-stable] patch 'net/netvsc: initialize link state' " Kevin Traynor
2020-02-19 15:55 ` [dpdk-stable] patch 'net/ixgbe: remove dead code' " Kevin Traynor
2020-02-19 15:56 ` [dpdk-stable] patch 'net/mlx5: fix VLAN match for DV mode' " Kevin Traynor
2020-02-19 15:56 ` [dpdk-stable] patch 'vhost: check message header size read' " Kevin Traynor
2020-02-19 15:56 ` [dpdk-stable] patch 'vhost: protect log address translation in IOTLB update' " Kevin Traynor
2020-02-19 15:56 ` [dpdk-stable] patch 'app/testpmd: fix hot-unplug detaching' " Kevin Traynor
2020-02-19 15:56 ` [dpdk-stable] patch 'net/i40e: fix unchecked Tx cleanup error' " Kevin Traynor
2020-02-19 15:56 ` [dpdk-stable] patch 'app/eventdev: fix pipeline test with meson build' " Kevin Traynor
2020-02-19 15:56 ` [dpdk-stable] patch 'usertools: fix syntax warning in python 3.8' " Kevin Traynor
2020-02-19 15:56 ` [dpdk-stable] patch 'usertools: fix telemetry client with python 3' " 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).