patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7
@ 2021-02-04 11:27 Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'app/procinfo: fix _filters stats reporting' " Christian Ehrhardt
                   ` (139 more replies)
  0 siblings, 140 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/579a8b4fa111171133d32e2eb7cb20534cc33c1e

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 579a8b4fa111171133d32e2eb7cb20534cc33c1e Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Tue, 8 Dec 2020 17:00:04 +0000
Subject: [PATCH] rib: fix insertion in some cases

[ upstream commit e682b020840a9035beacd24cba4f6baabcfaf5ff ]

According to GCC documentation for __builtin_clz:
Returns the number of leading 0-bits in x,
starting at the most significant bit position.
If x is 0, the result is undefined.
__builtin_clz will be called with 0 if the existing
prefix address matches the one we want to insert.

Fixes: 5a5793a5ffa2 ("rib: add RIB library")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/librte_rib/rte_rib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_rib/rte_rib.c b/lib/librte_rib/rte_rib.c
index 55d612dc2e..07b3c068ed 100644
--- a/lib/librte_rib/rte_rib.c
+++ b/lib/librte_rib/rte_rib.c
@@ -301,7 +301,7 @@ rte_rib_insert(struct rte_rib *rib, uint32_t ip, uint8_t depth)
 	/* closest node found, new_node should be inserted in the middle */
 	common_depth = RTE_MIN(depth, (*tmp)->depth);
 	common_prefix = ip ^ (*tmp)->ip;
-	d = __builtin_clz(common_prefix);
+	d = (common_prefix == 0) ? 32 : __builtin_clz(common_prefix);
 
 	common_depth = RTE_MIN(d, common_depth);
 	common_prefix = ip & rte_rib_depth_to_mask(common_depth);
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.273878971 +0100
+++ 0001-rib-fix-insertion-in-some-cases.patch	2021-02-04 12:04:27.766789473 +0100
@@ -1 +1 @@
-From e682b020840a9035beacd24cba4f6baabcfaf5ff Mon Sep 17 00:00:00 2001
+From 579a8b4fa111171133d32e2eb7cb20534cc33c1e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e682b020840a9035beacd24cba4f6baabcfaf5ff ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 2a370d7f84..6c29e1c49a 100644
+index 55d612dc2e..07b3c068ed 100644

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

* [dpdk-stable] patch 'app/procinfo: fix _filters stats reporting' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'app/procinfo: fix check on xstats-ids' " Christian Ehrhardt
                   ` (138 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/6ac70ac9af775ef6eaf0d85200aba418b717fa0f

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 6ac70ac9af775ef6eaf0d85200aba418b717fa0f Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:51 +0000
Subject: [PATCH] app/procinfo: fix _filters stats reporting

[ upstream commit f7605e24baba5c614352ed3db0bf48d7f06e59b0 ]

'_filters' is compared twice, second one will be always false, removing
it using the message more relevant to the '_filters'.

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

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/proc-info/main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index abeca4aab4..df932292a2 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -429,11 +429,9 @@ static void collectd_resolve_cnt_type(char *cnt_type, size_t cnt_type_len,
 	} else if ((type_end != NULL) &&
 		   (strncmp(cnt_name, "flow_", strlen("flow_"))) == 0) {
 		if (strncmp(type_end, "_filters", strlen("_filters")) == 0)
-			strlcpy(cnt_type, "operations", cnt_type_len);
+			strlcpy(cnt_type, "filter_result", cnt_type_len);
 		else if (strncmp(type_end, "_errors", strlen("_errors")) == 0)
 			strlcpy(cnt_type, "errors", cnt_type_len);
-		else if (strncmp(type_end, "_filters", strlen("_filters")) == 0)
-			strlcpy(cnt_type, "filter_result", cnt_type_len);
 	} else if ((type_end != NULL) &&
 		   (strncmp(cnt_name, "mac_", strlen("mac_"))) == 0) {
 		if (strncmp(type_end, "_errors", strlen("_errors")) == 0)
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.301428155 +0100
+++ 0002-app-procinfo-fix-_filters-stats-reporting.patch	2021-02-04 12:04:27.770789476 +0100
@@ -1 +1 @@
-From f7605e24baba5c614352ed3db0bf48d7f06e59b0 Mon Sep 17 00:00:00 2001
+From 6ac70ac9af775ef6eaf0d85200aba418b717fa0f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f7605e24baba5c614352ed3db0bf48d7f06e59b0 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index d743209f0d..35e5b596eb 100644
+index abeca4aab4..df932292a2 100644
@@ -22 +23 @@
-@@ -420,11 +420,9 @@ static void collectd_resolve_cnt_type(char *cnt_type, size_t cnt_type_len,
+@@ -429,11 +429,9 @@ static void collectd_resolve_cnt_type(char *cnt_type, size_t cnt_type_len,

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

* [dpdk-stable] patch 'app/procinfo: fix check on xstats-ids' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'app/procinfo: fix _filters stats reporting' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'app/procinfo: remove useless memset' " Christian Ehrhardt
                   ` (137 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/34a1b3fe95b5cf95996d0313e46d62b05659162c

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 34a1b3fe95b5cf95996d0313e46d62b05659162c Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:52 +0000
Subject: [PATCH] app/procinfo: fix check on xstats-ids

[ upstream commit 59b981c6f69cb1c705bfb93890ce8cc2a8bcdfb5 ]

'parse_xstats_ids()' return 'int'. The return value is assigned to
'nb_xstats_ids' unsigned value, later negative check on this variable is
wrong.

Adding interim 'int' variable for negative check.

Fixes: 7ac16a3660c0 ("app/proc-info: support xstats by ID and by name")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/proc-info/main.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index df932292a2..79f02e7903 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -310,14 +310,13 @@ proc_info_parse_args(int argc, char **argv)
 			} else if (!strncmp(long_option[option_index].name,
 					"xstats-ids",
 					MAX_LONG_OPT_SZ))	{
-				nb_xstats_ids = parse_xstats_ids(optarg,
+				int ret = parse_xstats_ids(optarg,
 						xstats_ids, MAX_NB_XSTATS_IDS);
-
-				if (nb_xstats_ids <= 0) {
+				if (ret <= 0) {
 					printf("xstats-id list parse error.\n");
 					return -1;
 				}
-
+				nb_xstats_ids = ret;
 			}
 			break;
 		default:
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.342893188 +0100
+++ 0003-app-procinfo-fix-check-on-xstats-ids.patch	2021-02-04 12:04:27.774789480 +0100
@@ -1 +1 @@
-From 59b981c6f69cb1c705bfb93890ce8cc2a8bcdfb5 Mon Sep 17 00:00:00 2001
+From 34a1b3fe95b5cf95996d0313e46d62b05659162c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 59b981c6f69cb1c705bfb93890ce8cc2a8bcdfb5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 35e5b596eb..8ee30ddb71 100644
+index df932292a2..79f02e7903 100644
@@ -25 +26 @@
-@@ -301,14 +301,13 @@ proc_info_parse_args(int argc, char **argv)
+@@ -310,14 +310,13 @@ proc_info_parse_args(int argc, char **argv)

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

* [dpdk-stable] patch 'app/procinfo: remove useless memset' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'app/procinfo: fix _filters stats reporting' " Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'app/procinfo: fix check on xstats-ids' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/pcap: remove local variable shadowing outer one' " Christian Ehrhardt
                   ` (136 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/492dd37556a5dafb0e8c69ab796a64fcfe099827

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 492dd37556a5dafb0e8c69ab796a64fcfe099827 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:53 +0000
Subject: [PATCH] app/procinfo: remove useless memset

[ upstream commit c923be82e06844384c5a4b62df957bf4be6a0af3 ]

The intention with the "sizeof(0)" usage is not clear, but the 'stats'
already 'memset' by 'rte_cryptodev_stats_get()' API, removing 'memset'
in application.

Fixes: fe773600fe3e ("app/procinfo: add --show-crypto")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/proc-info/main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 79f02e7903..f6d19cdac2 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -1107,7 +1107,6 @@ show_crypto(void)
 
 		display_crypto_feature_info(dev_info.feature_flags);
 
-		memset(&stats, 0, sizeof(0));
 		if (rte_cryptodev_stats_get(i, &stats) == 0) {
 			printf("\t  -- stats\n");
 			printf("\t\t  + enqueue count (%"PRIu64")"
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.387358867 +0100
+++ 0004-app-procinfo-remove-useless-memset.patch	2021-02-04 12:04:27.782789488 +0100
@@ -1 +1 @@
-From c923be82e06844384c5a4b62df957bf4be6a0af3 Mon Sep 17 00:00:00 2001
+From 492dd37556a5dafb0e8c69ab796a64fcfe099827 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c923be82e06844384c5a4b62df957bf4be6a0af3 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 8ee30ddb71..106b44d6fb 100644
+index 79f02e7903..f6d19cdac2 100644
@@ -23 +24 @@
-@@ -1207,7 +1207,6 @@ show_crypto(void)
+@@ -1107,7 +1107,6 @@ show_crypto(void)

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

* [dpdk-stable] patch 'net/pcap: remove local variable shadowing outer one' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (2 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'app/procinfo: remove useless memset' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bonding: " Christian Ehrhardt
                   ` (135 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/9000db4b4eb6a9a61120280cd2e0bf2d6076a7a2

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 9000db4b4eb6a9a61120280cd2e0bf2d6076a7a2 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:55 +0000
Subject: [PATCH] net/pcap: remove local variable shadowing outer one

[ upstream commit a18f17470709d8a5f1cb918a8db6535890dee683 ]

'ret' is already defined in the function scope, removing the 'ret' in
the block scope.

Fixes: c9507cd0cada ("net/pcap: support physical interface MAC address")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index fbff559c0a..f0c900ba88 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -1298,9 +1298,8 @@ eth_from_pcaps(struct rte_vdev_device *vdev,
 
 		/* phy_mac arg is applied only only if "iface" devarg is provided */
 		if (rx_queues->phy_mac) {
-			int ret = eth_pcap_update_mac(rx_queues->queue[0].name,
-					eth_dev, vdev->device.numa_node);
-			if (ret == 0)
+			if (eth_pcap_update_mac(rx_queues->queue[0].name,
+					eth_dev, vdev->device.numa_node) == 0)
 				internals->phy_mac = 1;
 		}
 	}
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.427837733 +0100
+++ 0005-net-pcap-remove-local-variable-shadowing-outer-one.patch	2021-02-04 12:04:27.786789492 +0100
@@ -1 +1 @@
-From a18f17470709d8a5f1cb918a8db6535890dee683 Mon Sep 17 00:00:00 2001
+From 9000db4b4eb6a9a61120280cd2e0bf2d6076a7a2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a18f17470709d8a5f1cb918a8db6535890dee683 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 4930d7d382..a32b1f3f37 100644
+index fbff559c0a..f0c900ba88 100644
@@ -22 +23 @@
-@@ -1324,9 +1324,8 @@ eth_from_pcaps(struct rte_vdev_device *vdev,
+@@ -1298,9 +1298,8 @@ eth_from_pcaps(struct rte_vdev_device *vdev,

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

* [dpdk-stable] patch 'net/bonding: remove local variable shadowing outer one' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (3 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/pcap: remove local variable shadowing outer one' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/af_xdp: remove useless assignment' " Christian Ehrhardt
                   ` (134 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/42179eca78c0d256799d4c9688c5e1f4b5a6368b

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 42179eca78c0d256799d4c9688c5e1f4b5a6368b Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:56 +0000
Subject: [PATCH] net/bonding: remove local variable shadowing outer one

[ upstream commit b92b0018b17d3fb86392da58692a30b1c0997d92 ]

'retval' is already defined in the function scope, removing the 'retval'
in the block scope.

Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 67ca0730fa..5fe004e551 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1334,8 +1334,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
 		rte_eth_macaddr_get(slave_id, &m_hdr->eth_hdr.s_addr);
 
 		if (internals->mode4.dedicated_queues.enabled == 0) {
-			int retval = rte_ring_enqueue(port->tx_ring, pkt);
-			if (retval != 0) {
+			if (rte_ring_enqueue(port->tx_ring, pkt) != 0) {
 				/* reset timer */
 				port->rx_marker_timer = 0;
 				wrn = WRN_TX_QUEUE_FULL;
@@ -1355,8 +1354,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
 		}
 	} else if (likely(subtype == SLOW_SUBTYPE_LACP)) {
 		if (internals->mode4.dedicated_queues.enabled == 0) {
-			int retval = rte_ring_enqueue(port->rx_ring, pkt);
-			if (retval != 0) {
+			if (rte_ring_enqueue(port->rx_ring, pkt) != 0) {
 				/* If RX fing full free lacpdu message and drop packet */
 				wrn = WRN_RX_QUEUE_FULL;
 				goto free_out;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.466280281 +0100
+++ 0006-net-bonding-remove-local-variable-shadowing-outer-on.patch	2021-02-04 12:04:27.794789500 +0100
@@ -1 +1 @@
-From b92b0018b17d3fb86392da58692a30b1c0997d92 Mon Sep 17 00:00:00 2001
+From 42179eca78c0d256799d4c9688c5e1f4b5a6368b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b92b0018b17d3fb86392da58692a30b1c0997d92 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/af_xdp: remove useless assignment' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (4 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bonding: " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'app/crypto-perf: remove always true condition' " Christian Ehrhardt
                   ` (133 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a1534d40c1322e0b141118341038b43999102bb4 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:57 +0000
Subject: [PATCH] net/af_xdp: remove useless assignment

[ upstream commit c275321105aad89985bc5e207502625c069ca461 ]

Assignment of function parameter 'umem' removed.

Fixes: f0ce7af0e182 ("net/af_xdp: remove resources when port is closed")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index e0089212bd..ac253b1d81 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -696,7 +696,6 @@ xdp_umem_destroy(struct xsk_umem_info *umem)
 #endif
 
 	rte_free(umem);
-	umem = NULL;
 }
 
 static void
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.503436668 +0100
+++ 0007-net-af_xdp-remove-useless-assignment.patch	2021-02-04 12:04:27.798789504 +0100
@@ -1 +1 @@
-From c275321105aad89985bc5e207502625c069ca461 Mon Sep 17 00:00:00 2001
+From a1534d40c1322e0b141118341038b43999102bb4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c275321105aad89985bc5e207502625c069ca461 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 2c7892bd7e..7fc70df713 100644
+index e0089212bd..ac253b1d81 100644
@@ -21 +22 @@
-@@ -840,7 +840,6 @@ xdp_umem_destroy(struct xsk_umem_info *umem)
+@@ -696,7 +696,6 @@ xdp_umem_destroy(struct xsk_umem_info *umem)
@@ -28 +29 @@
- static int
+ static void

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

* [dpdk-stable] patch 'app/crypto-perf: remove always true condition' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (5 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/af_xdp: remove useless assignment' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 13:00   ` Zhang, Roy Fan
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/avp: " Christian Ehrhardt
                   ` (132 subsequent siblings)
  139 siblings, 1 reply; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/6c0a0f5e578eb67c9947d237eb5445f2c32511f8

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 6c0a0f5e578eb67c9947d237eb5445f2c32511f8 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:58:59 +0000
Subject: [PATCH] app/crypto-perf: remove always true condition

[ upstream commit 427ec3b7285d8e8b939f7e5db4976476c931c005 ]

This is already 'else' leg of the opposite comparison, simple 'else'
will be logically same.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 app/test-crypto-perf/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 7bb286ccbe..b065ab2acb 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -380,7 +380,7 @@ cperf_check_test_vector(struct cperf_options *opts,
 		if (opts->cipher_algo == RTE_CRYPTO_CIPHER_NULL) {
 			if (test_vec->plaintext.data == NULL)
 				return -1;
-		} else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
+		} else {
 			if (test_vec->plaintext.data == NULL)
 				return -1;
 			if (test_vec->plaintext.length < opts->max_buffer_size)
@@ -430,7 +430,7 @@ cperf_check_test_vector(struct cperf_options *opts,
 				return -1;
 			if (test_vec->plaintext.length < opts->max_buffer_size)
 				return -1;
-		} else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
+		} else {
 			if (test_vec->plaintext.data == NULL)
 				return -1;
 			if (test_vec->plaintext.length < opts->max_buffer_size)
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.540974655 +0100
+++ 0008-app-crypto-perf-remove-always-true-condition.patch	2021-02-04 12:04:27.802789508 +0100
@@ -1 +1 @@
-From 427ec3b7285d8e8b939f7e5db4976476c931c005 Mon Sep 17 00:00:00 2001
+From 6c0a0f5e578eb67c9947d237eb5445f2c32511f8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 427ec3b7285d8e8b939f7e5db4976476c931c005 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 5f035519c3..99f86e9019 100644
+index 7bb286ccbe..b065ab2acb 100644
@@ -22 +23 @@
-@@ -390,7 +390,7 @@ cperf_check_test_vector(struct cperf_options *opts,
+@@ -380,7 +380,7 @@ cperf_check_test_vector(struct cperf_options *opts,
@@ -31 +32 @@
-@@ -440,7 +440,7 @@ cperf_check_test_vector(struct cperf_options *opts,
+@@ -430,7 +430,7 @@ cperf_check_test_vector(struct cperf_options *opts,

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

* [dpdk-stable] patch 'net/avp: remove always true condition' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (6 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'app/crypto-perf: remove always true condition' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'eal/linux: fix handling of error events from epoll' " Christian Ehrhardt
                   ` (131 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Steven Webster, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 3d155a95ebb1fd92756035a65b01f84a882d12a4 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 19 Nov 2020 11:59:00 +0000
Subject: [PATCH] net/avp: remove always true condition

[ upstream commit e6b87501657e681f15b48837fdfcffabc0ed6bef ]

There is already a break above for the case "count >= 1", so at this
stage 'count' should be always '0'.

Fixes: 1a85922369c4 ("net/avp: add device configuration")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Steven Webster <steven.webster@windriver.com>
---
 drivers/net/avp/avp_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 1abe96ce50..8de05ec16f 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -269,7 +269,7 @@ avp_dev_process_request(struct avp_dev *avp, struct rte_avp_request *request)
 			break;
 		}
 
-		if ((count < 1) && (retry == 0)) {
+		if (retry == 0) {
 			PMD_DRV_LOG(ERR, "Timeout while waiting for a response for %u\n",
 				    request->req_id);
 			ret = -ETIME;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.578281469 +0100
+++ 0009-net-avp-remove-always-true-condition.patch	2021-02-04 12:04:27.810789516 +0100
@@ -1 +1 @@
-From e6b87501657e681f15b48837fdfcffabc0ed6bef Mon Sep 17 00:00:00 2001
+From 3d155a95ebb1fd92756035a65b01f84a882d12a4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e6b87501657e681f15b48837fdfcffabc0ed6bef ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 5f8187b905..f531e03c02 100644
+index 1abe96ce50..8de05ec16f 100644
@@ -22 +23 @@
-@@ -267,7 +267,7 @@ avp_dev_process_request(struct avp_dev *avp, struct rte_avp_request *request)
+@@ -269,7 +269,7 @@ avp_dev_process_request(struct avp_dev *avp, struct rte_avp_request *request)

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

* [dpdk-stable] patch 'eal/linux: fix handling of error events from epoll' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (7 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/avp: " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bonding: fix port id validity check on parsing' " Christian Ehrhardt
                   ` (130 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Harman Kalra, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 51a78a3d3f7b04df98373afb5eb1b6b0fc3e6648 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 15 Jul 2020 10:40:10 +0800
Subject: [PATCH] eal/linux: fix handling of error events from epoll

[ upstream commit e3e9c87c0fc7c8e65e8f13c7bef133a552d0a597 ]

The "rev->epdata.event" assigned to "events.epdata.event" directly, which
was wrong in case of epoll events. It should be set to the "evs.events".

Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
---
 lib/librte_eal/linux/eal/eal_interrupts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linux/eal/eal_interrupts.c b/lib/librte_eal/linux/eal/eal_interrupts.c
index 5a58f05fae..e570c0684e 100644
--- a/lib/librte_eal/linux/eal/eal_interrupts.c
+++ b/lib/librte_eal/linux/eal/eal_interrupts.c
@@ -1205,7 +1205,7 @@ eal_epoll_process_event(struct epoll_event *evs, unsigned int n,
 		events[count].status        = RTE_EPOLL_VALID;
 		events[count].fd            = rev->fd;
 		events[count].epfd          = rev->epfd;
-		events[count].epdata.event  = rev->epdata.event;
+		events[count].epdata.event  = evs[i].events;
 		events[count].epdata.data   = rev->epdata.data;
 		if (rev->epdata.cb_fun)
 			rev->epdata.cb_fun(rev->fd,
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.617851670 +0100
+++ 0010-eal-linux-fix-handling-of-error-events-from-epoll.patch	2021-02-04 12:04:27.810789516 +0100
@@ -1 +1 @@
-From e3e9c87c0fc7c8e65e8f13c7bef133a552d0a597 Mon Sep 17 00:00:00 2001
+From 51a78a3d3f7b04df98373afb5eb1b6b0fc3e6648 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e3e9c87c0fc7c8e65e8f13c7bef133a552d0a597 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- lib/librte_eal/linux/eal_interrupts.c | 2 +-
+ lib/librte_eal/linux/eal/eal_interrupts.c | 2 +-
@@ -18,5 +19,5 @@
-diff --git a/lib/librte_eal/linux/eal_interrupts.c b/lib/librte_eal/linux/eal_interrupts.c
-index 2f03a61254..1dd994bd1f 100644
---- a/lib/librte_eal/linux/eal_interrupts.c
-+++ b/lib/librte_eal/linux/eal_interrupts.c
-@@ -1241,7 +1241,7 @@ eal_epoll_process_event(struct epoll_event *evs, unsigned int n,
+diff --git a/lib/librte_eal/linux/eal/eal_interrupts.c b/lib/librte_eal/linux/eal/eal_interrupts.c
+index 5a58f05fae..e570c0684e 100644
+--- a/lib/librte_eal/linux/eal/eal_interrupts.c
++++ b/lib/librte_eal/linux/eal/eal_interrupts.c
+@@ -1205,7 +1205,7 @@ eal_epoll_process_event(struct epoll_event *evs, unsigned int n,

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

* [dpdk-stable] patch 'net/bonding: fix port id validity check on parsing' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (8 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'eal/linux: fix handling of error events from epoll' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix memory leak when mapping fails' " Christian Ehrhardt
                   ` (129 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 0fbbbfbb481429f6c0846ca4d0925746607d583b Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <grive@u256.net>
Date: Fri, 17 Apr 2020 18:42:06 +0200
Subject: [PATCH] net/bonding: fix port id validity check on parsing

[ upstream commit 44cd624a4b8c626fb5444199c06b5e05675c3cc1 ]

If the port_id is equal to RTE_MAX_ETHPORTS, it should be considered
invalid. Additionally, UNUSED ports are also not valid port ids to be
used afterward.

To simplify following the ethdev API rules, use the exposed function
checking whether a port id is valid.

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

Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_args.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index abdf552610..35616fb8bc 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -108,9 +108,8 @@ parse_port_id(const char *port_str)
 		}
 	}
 
-	if (port_id < 0 || port_id > RTE_MAX_ETHPORTS) {
-		RTE_BOND_LOG(ERR, "Slave port specified (%s) outside expected range",
-				port_str);
+	if (!rte_eth_dev_is_valid_port(port_id)) {
+		RTE_BOND_LOG(ERR, "Specified port (%s) is invalid", port_str);
 		return -1;
 	}
 	return port_id;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.659795211 +0100
+++ 0011-net-bonding-fix-port-id-validity-check-on-parsing.patch	2021-02-04 12:04:27.814789520 +0100
@@ -1 +1 @@
-From 44cd624a4b8c626fb5444199c06b5e05675c3cc1 Mon Sep 17 00:00:00 2001
+From 0fbbbfbb481429f6c0846ca4d0925746607d583b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 44cd624a4b8c626fb5444199c06b5e05675c3cc1 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bnxt: fix memory leak when mapping fails' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (9 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bonding: fix port id validity check on parsing' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: disable end of packet padding for Rx' " Christian Ehrhardt
                   ` (128 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/7d736428549de774906fe4bedaa9614fe3374aca

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 7d736428549de774906fe4bedaa9614fe3374aca Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 1 Dec 2020 08:59:34 +0800
Subject: [PATCH] net/bnxt: fix memory leak when mapping fails

[ upstream commit b9f0ad21f856b1d577f3369421559582639e53cf ]

We allocated memory for the 'buf' when sending message to HWRM,
but we don't free it when mapping the address to IO address
fails. It will lead to memory leak.

Fixes: 19e6af01bb36 ("net/bnxt: support get/set EEPROM")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 5e7b7f006c..d87605f7d7 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3888,6 +3888,7 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data)
 		return -ENOMEM;
 	dma_handle = rte_malloc_virt2iova(buf);
 	if (dma_handle == RTE_BAD_IOVA) {
+		rte_free(buf);
 		PMD_DRV_LOG(ERR,
 			"unable to map response address to physical memory\n");
 		return -ENOMEM;
@@ -3922,6 +3923,7 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index,
 
 	dma_handle = rte_malloc_virt2iova(buf);
 	if (dma_handle == RTE_BAD_IOVA) {
+		rte_free(buf);
 		PMD_DRV_LOG(ERR,
 			"unable to map response address to physical memory\n");
 		return -ENOMEM;
@@ -3975,6 +3977,7 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type,
 
 	dma_handle = rte_malloc_virt2iova(buf);
 	if (dma_handle == RTE_BAD_IOVA) {
+		rte_free(buf);
 		PMD_DRV_LOG(ERR,
 			"unable to map response address to physical memory\n");
 		return -ENOMEM;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.695437181 +0100
+++ 0012-net-bnxt-fix-memory-leak-when-mapping-fails.patch	2021-02-04 12:04:27.822789527 +0100
@@ -1 +1 @@
-From b9f0ad21f856b1d577f3369421559582639e53cf Mon Sep 17 00:00:00 2001
+From 7d736428549de774906fe4bedaa9614fe3374aca Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b9f0ad21f856b1d577f3369421559582639e53cf ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 24c33185b4..ebbf504c0c 100644
+index 5e7b7f006c..d87605f7d7 100644
@@ -23 +24 @@
-@@ -4320,6 +4320,7 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data)
+@@ -3888,6 +3888,7 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data)
@@ -31 +32 @@
-@@ -4354,6 +4355,7 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index,
+@@ -3922,6 +3923,7 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index,
@@ -39 +40 @@
-@@ -4407,6 +4409,7 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type,
+@@ -3975,6 +3977,7 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type,

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

* [dpdk-stable] patch 'net/bnxt: disable end of packet padding for Rx' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (10 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix memory leak when mapping fails' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/ice: fix outer UDP Tx checksum offload' " Christian Ehrhardt
                   ` (127 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/05648cbaa45ea55fc160590d429f23f859370cfb

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 05648cbaa45ea55fc160590d429f23f859370cfb Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Thu, 3 Dec 2020 09:16:21 -0500
Subject: [PATCH] net/bnxt: disable end of packet padding for Rx

[ upstream commit b4938fad44912967636b96990ddba01ef6bc3064 ]

Testing has shown that the packet forwarding rate for packet sizes
that are not a multiple of the cache line size is reduced when the
DMA size is padded to a multiple of the cache line size. Improve
performance for these packet sizes by disabling EOP padding.

Fixes: f4253e97e7b0 ("net/bnxt: set padding flags in Rx descriptor")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 5271d02366..c90ed517ce 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -842,7 +842,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 	size = rte_pktmbuf_data_room_size(rxq->mb_pool) - RTE_PKTMBUF_HEADROOM;
 	size = RTE_MIN(BNXT_MAX_PKT_LEN, size);
 
-	type = RX_PROD_PKT_BD_TYPE_RX_PROD_PKT | RX_PROD_PKT_BD_FLAGS_EOP_PAD;
+	type = RX_PROD_PKT_BD_TYPE_RX_PROD_PKT;
 
 	rxr = rxq->rx_ring;
 	ring = rxr->rx_ring_struct;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.747081889 +0100
+++ 0013-net-bnxt-disable-end-of-packet-padding-for-Rx.patch	2021-02-04 12:04:27.822789527 +0100
@@ -1 +1 @@
-From b4938fad44912967636b96990ddba01ef6bc3064 Mon Sep 17 00:00:00 2001
+From 05648cbaa45ea55fc160590d429f23f859370cfb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b4938fad44912967636b96990ddba01ef6bc3064 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index fdbe6f71ea..af1774844a 100644
+index 5271d02366..c90ed517ce 100644
@@ -25 +26 @@
-@@ -1113,7 +1113,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
+@@ -842,7 +842,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)

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

* [dpdk-stable] patch 'net/ice: fix outer UDP Tx checksum offload' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (11 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: disable end of packet padding for Rx' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/i40e: fix L4 checksum flag' " Christian Ehrhardt
                   ` (126 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Murphy Yang; +Cc: Wei Xie, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/5319ac800171dcb06cec001973e1ad23fa32ae0c

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5319ac800171dcb06cec001973e1ad23fa32ae0c Mon Sep 17 00:00:00 2001
From: Murphy Yang <murphyx.yang@intel.com>
Date: Mon, 23 Nov 2020 07:05:23 +0000
Subject: [PATCH] net/ice: fix outer UDP Tx checksum offload

[ upstream commit 2ed011776334a742296f2495e2e0c76a7354e7af ]

If hardware outer UDP Tx checksum offload enabled, it doesn't take
effect when 'IPv6/UDP/VXLAN' packet sent with wrong outer UDP checksum.

In order to take effect, set the 'L4T_CS' flag valid only when 'L4TUNT'
equals one and 'EIPT' is not zero. If 'L4T_CS' flag marked, the hardware
can calculate the outer tunneling UDP checksum.

Fixes: bd70c451532c ("net/ice: support Tx checksum offload for tunnel")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Tested-by: Wei Xie <weix.xie@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 3030550bdc..42c6b82d23 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2215,8 +2215,11 @@ ice_parse_tunneling_params(uint64_t ol_flags,
 	*cd_tunneling |= (tx_offload.l2_len >> 1) <<
 		ICE_TXD_CTX_QW0_NATLEN_S;
 
-	if ((ol_flags & PKT_TX_OUTER_UDP_CKSUM) &&
-	    (ol_flags & PKT_TX_OUTER_IP_CKSUM) &&
+	/**
+	 * Calculate the tunneling UDP checksum.
+	 * Shall be set only if L4TUNT = 01b and EIPT is not zero
+	 */
+	if (!(*cd_tunneling & ICE_TX_CTX_EIPT_NONE) &&
 	    (*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING))
 		*cd_tunneling |= ICE_TXD_CTX_QW0_L4T_CS_M;
 }
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.785900174 +0100
+++ 0014-net-ice-fix-outer-UDP-Tx-checksum-offload.patch	2021-02-04 12:04:27.830789535 +0100
@@ -1 +1 @@
-From 2ed011776334a742296f2495e2e0c76a7354e7af Mon Sep 17 00:00:00 2001
+From 5319ac800171dcb06cec001973e1ad23fa32ae0c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ed011776334a742296f2495e2e0c76a7354e7af ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 5fbd68eafc..9769e216bf 100644
+index 3030550bdc..42c6b82d23 100644
@@ -27 +28 @@
-@@ -2319,8 +2319,11 @@ ice_parse_tunneling_params(uint64_t ol_flags,
+@@ -2215,8 +2215,11 @@ ice_parse_tunneling_params(uint64_t ol_flags,

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

* [dpdk-stable] patch 'net/i40e: fix L4 checksum flag' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (12 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/ice: fix outer UDP Tx checksum offload' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/i40e: fix global register recovery' " Christian Ehrhardt
                   ` (125 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Murphy Yang; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ad3fff017f802ce4ab80057de0f4eab233c82015 Mon Sep 17 00:00:00 2001
From: Murphy Yang <murphyx.yang@intel.com>
Date: Thu, 3 Dec 2020 07:50:30 +0000
Subject: [PATCH] net/i40e: fix L4 checksum flag

[ upstream commit c17af95a19e30c8d89eb96ceca99f60474ca2ac4 ]

When tunneled packet received that inner L4 checksum value is correct,
the test_pmd output log shows 'ol_flags' value is
'PKT_RX_L4_CKSUM_UNKNOWN', but expected value is 'PKT_RX_L4_CKSUM_GOOD'.

If the inner l4 checksum is correct, mark the 'PKT_RX_L4_CKSUM_GOOD'
flag to 'l3_l4e_flags' for sse and 'l3_l4_flags_shuf' for avx2 to
ensure that the 'ol_flags' can match correct flags.

Fixes: 9966a00a0688 ("net/i40e: enable bad checksum flags in vector Rx")
Fixes: dafadd73762e ("net/i40e: add AVX2 Rx function")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_rxtx_vec_avx2.c | 40 ++++++++++++++++-----------
 drivers/net/i40e/i40e_rxtx_vec_sse.c  | 20 ++++++++------
 2 files changed, 35 insertions(+), 25 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
index 3bcef13638..1a8cd56484 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
@@ -342,24 +342,32 @@ _recv_raw_pkts_vec_avx2(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	 */
 	const __m256i l3_l4_flags_shuf = _mm256_set_epi8(0, 0, 0, 0, 0, 0, 0, 0,
 			/* shift right 1 bit to make sure it not exceed 255 */
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_EIP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_BAD) >> 1,
-			PKT_RX_IP_CKSUM_BAD >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD  |
+			 PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD  |
+			 PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
+			 PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
+			 PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_L4_CKSUM_BAD  | PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_L4_CKSUM_BAD  | PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1,
 			/* second 128-bits */
 			0, 0, 0, 0, 0, 0, 0, 0,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_EIP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_BAD) >> 1,
-			PKT_RX_IP_CKSUM_BAD >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD) >> 1);
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD  |
+			 PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD  |
+			 PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
+			 PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
+			 PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_L4_CKSUM_BAD  | PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_L4_CKSUM_BAD  | PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1);
 
 	const __m256i cksum_mask = _mm256_set1_epi32(
 			PKT_RX_IP_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD |
diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c
index 5a009146f3..b5c5fdb0a2 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_sse.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -254,16 +254,18 @@ desc_to_olflags_v(struct i40e_rx_queue *rxq, volatile union i40e_rx_desc *rxdp,
 
 	const __m128i l3_l4e_flags = _mm_set_epi8(0, 0, 0, 0, 0, 0, 0, 0,
 			/* shift right 1 bit to make sure it not exceed 255 */
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD |
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD  |
 			 PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_EIP_CKSUM_BAD |
-			 PKT_RX_L4_CKSUM_BAD) >> 1,
-			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_EIP_CKSUM_BAD) >> 1,
-			(PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD) >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_BAD) >> 1,
-			PKT_RX_IP_CKSUM_BAD >> 1,
-			(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD) >> 1);
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD  |
+			 PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
+			 PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_GOOD |
+			 PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_L4_CKSUM_BAD  | PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_L4_CKSUM_BAD  | PKT_RX_IP_CKSUM_GOOD) >> 1,
+			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_BAD) >> 1,
+			(PKT_RX_L4_CKSUM_GOOD | PKT_RX_IP_CKSUM_GOOD) >> 1);
 
 	/* Unpack "status" from quadword 1, bits 0:32 */
 	vlan0 = _mm_unpackhi_epi32(descs[0], descs[1]);
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.830919006 +0100
+++ 0015-net-i40e-fix-L4-checksum-flag.patch	2021-02-04 12:04:27.834789539 +0100
@@ -1 +1 @@
-From c17af95a19e30c8d89eb96ceca99f60474ca2ac4 Mon Sep 17 00:00:00 2001
+From ad3fff017f802ce4ab80057de0f4eab233c82015 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c17af95a19e30c8d89eb96ceca99f60474ca2ac4 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 7a558fc73a..fe6ec7deef 100644
+index 3bcef13638..1a8cd56484 100644
@@ -79 +80 @@
-index 4b2b6a28fc..0bcb48e24e 100644
+index 5a009146f3..b5c5fdb0a2 100644

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

* [dpdk-stable] patch 'net/i40e: fix global register recovery' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (13 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/i40e: fix L4 checksum flag' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/ixgbe: detect failed VF MTU set' " Christian Ehrhardt
                   ` (124 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From e80347c7113d86517f9c1fa86a376e7cec62c41f Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Fri, 20 Nov 2020 16:49:47 +0800
Subject: [PATCH] net/i40e: fix global register recovery

[ upstream commit ac241c74ac75b2670788635b1a8e6809afae0827 ]

PMD configures the global register I40E_GLINT_CTL during
device initialization to work around the Rx write back
issue. But when a device is bound from DPDK to kernel,
the global register is not recovered to the original
state, it will cause kernel driver performance drop issue.
This patch fixes this issue.

Fixes: be6c228d4da3 ("i40e: support Rx interrupt")
Fixes: 4ab831449a1c ("net/i40e: fix interrupt conflict with multi-driver")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index a8a534c6f8..ec9b16608c 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -777,6 +777,21 @@ static inline void i40e_config_automask(struct i40e_pf *pf)
 	I40E_WRITE_REG(hw, I40E_GLINT_CTL, val);
 }
 
+static inline void i40e_clear_automask(struct i40e_pf *pf)
+{
+	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
+	uint32_t val;
+
+	val = I40E_READ_REG(hw, I40E_GLINT_CTL);
+	val &= ~(I40E_GLINT_CTL_DIS_AUTOMASK_PF0_MASK |
+		 I40E_GLINT_CTL_DIS_AUTOMASK_VF0_MASK);
+
+	if (!pf->support_multi_driver)
+		val &= ~I40E_GLINT_CTL_DIS_AUTOMASK_N_MASK;
+
+	I40E_WRITE_REG(hw, I40E_GLINT_CTL, val);
+}
+
 #define I40E_FLOW_CONTROL_ETHERTYPE  0x8808
 
 /*
@@ -2632,6 +2647,8 @@ i40e_dev_close(struct rte_eth_dev *dev)
 	/* Remove all Traffic Manager configuration */
 	i40e_tm_conf_uninit(dev);
 
+	i40e_clear_automask(pf);
+
 	hw->adapter_closed = 1;
 }
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.867769705 +0100
+++ 0016-net-i40e-fix-global-register-recovery.patch	2021-02-04 12:04:27.846789551 +0100
@@ -1 +1 @@
-From ac241c74ac75b2670788635b1a8e6809afae0827 Mon Sep 17 00:00:00 2001
+From e80347c7113d86517f9c1fa86a376e7cec62c41f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ac241c74ac75b2670788635b1a8e6809afae0827 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index f54769c29d..2cb18ecc03 100644
+index a8a534c6f8..ec9b16608c 100644
@@ -27 +28 @@
-@@ -763,6 +763,21 @@ static inline void i40e_config_automask(struct i40e_pf *pf)
+@@ -777,6 +777,21 @@ static inline void i40e_config_automask(struct i40e_pf *pf)
@@ -49 +50 @@
-@@ -2741,6 +2756,8 @@ i40e_dev_close(struct rte_eth_dev *dev)
+@@ -2632,6 +2647,8 @@ i40e_dev_close(struct rte_eth_dev *dev)
@@ -56 +56,0 @@
- 	return ret;
@@ -57,0 +58 @@
+ 

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

* [dpdk-stable] patch 'net/ixgbe: detect failed VF MTU set' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (14 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/i40e: fix global register recovery' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix Rx rings in RSS redirection table' " Christian Ehrhardt
                   ` (123 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/2616ee630c974a9ef65f2c86e9a8d442214ed302

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 2616ee630c974a9ef65f2c86e9a8d442214ed302 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Wed, 2 Dec 2020 17:48:06 +0800
Subject: [PATCH] net/ixgbe: detect failed VF MTU set

[ upstream commit c77866a1690416c279c4153d0416c15e9a26547d ]

If a VF request to set a invalid maximum packet length value,
The PF kernel driver may disable its reception.

This patch add codes to output information and return the error status.

Fixes: 12cd0cccc3db ("ixgbevf: allow to set MTU")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 3 ++-
 drivers/net/ixgbe/ixgbe_rxtx.c   | 8 ++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index de528d242b..80bf06a1b4 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -6658,7 +6658,8 @@ ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 	 * prior to 3.11.33 which contains the following change:
 	 * "ixgbe: Enable jumbo frames support w/ SR-IOV"
 	 */
-	ixgbevf_rlpml_set_vf(hw, max_frame);
+	if (ixgbevf_rlpml_set_vf(hw, max_frame))
+		return -EINVAL;
 
 	/* update max frame size */
 	dev->data->dev_conf.rxmode.max_rx_pkt_len = max_frame;
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index a7b24cd053..8c78cc0589 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -5522,8 +5522,12 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)
 	 * ixgbevf_rlpml_set_vf even if jumbo frames are not used. This way,
 	 * VF packets received can work in all cases.
 	 */
-	ixgbevf_rlpml_set_vf(hw,
-		(uint16_t)dev->data->dev_conf.rxmode.max_rx_pkt_len);
+	if (ixgbevf_rlpml_set_vf(hw,
+	    (uint16_t)dev->data->dev_conf.rxmode.max_rx_pkt_len)) {
+		PMD_INIT_LOG(ERR, "Set max packet length to %d failed.",
+			     dev->data->dev_conf.rxmode.max_rx_pkt_len);
+		return -EINVAL;
+	}
 
 	/*
 	 * Assume no header split and no VLAN strip support
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.906743634 +0100
+++ 0017-net-ixgbe-detect-failed-VF-MTU-set.patch	2021-02-04 12:04:27.862789565 +0100
@@ -1 +1 @@
-From c77866a1690416c279c4153d0416c15e9a26547d Mon Sep 17 00:00:00 2001
+From 2616ee630c974a9ef65f2c86e9a8d442214ed302 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c77866a1690416c279c4153d0416c15e9a26547d ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 9a47a8b262..d7a1806ab8 100644
+index de528d242b..80bf06a1b4 100644
@@ -25 +26 @@
-@@ -6555,7 +6555,8 @@ ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -6658,7 +6658,8 @@ ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
@@ -36 +37 @@
-index 6cfbb582e2..7bb8460359 100644
+index a7b24cd053..8c78cc0589 100644
@@ -39 +40 @@
-@@ -5634,8 +5634,12 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)
+@@ -5522,8 +5522,12 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/bnxt: fix Rx rings in RSS redirection table' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (15 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/ixgbe: detect failed VF MTU set' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix VNIC config on Rx queue stop' " Christian Ehrhardt
                   ` (122 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Samik Gupta; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From bdae17156a190112880828fe963fc2806bb9e6b2 Mon Sep 17 00:00:00 2001
From: Samik Gupta <samik.gupta@broadcom.com>
Date: Thu, 12 Nov 2020 13:28:25 -0800
Subject: [PATCH] net/bnxt: fix Rx rings in RSS redirection table

[ upstream commit d424af43e6c32aec83be8f1380271ff33ed0b89a ]

This commit introduces a limit on the number of RX rings included in
the RSS redirection table to a value no larger than the size supported
by Thor as defined by BNXT_RSS_TBL_SIZE_THOR.

Fixes: d819382543f3 ("net/bnxt: add RSS redirection table operations")

Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Samik Gupta <samik.gupta@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  2 +-
 drivers/net/bnxt/bnxt_ethdev.c | 15 +++++++++++++--
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 3700a277c7..940b41767c 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -344,7 +344,7 @@ struct bnxt_coal {
 #define DBR_TYPE_NQ				(0xaULL << 60)
 #define DBR_TYPE_NQ_ARM				(0xbULL << 60)
 
-#define BNXT_RSS_TBL_SIZE_THOR		512
+#define BNXT_RSS_TBL_SIZE_THOR		512U
 #define BNXT_RSS_ENTRIES_PER_CTX_THOR	64
 #define BNXT_MAX_RSS_CTXTS_THOR \
 	(BNXT_RSS_TBL_SIZE_THOR / BNXT_RSS_ENTRIES_PER_CTX_THOR)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index fc8532a464..1579714b35 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -153,12 +153,15 @@ int is_bnxt_in_error(struct bnxt *bp)
 
 uint16_t bnxt_rss_ctxts(const struct bnxt *bp)
 {
+	unsigned int num_rss_rings = RTE_MIN(bp->rx_nr_rings,
+					     BNXT_RSS_TBL_SIZE_THOR);
+
 	if (!BNXT_CHIP_THOR(bp))
 		return 1;
 
-	return RTE_ALIGN_MUL_CEIL(bp->rx_nr_rings,
+	return RTE_ALIGN_MUL_CEIL(num_rss_rings,
 				  BNXT_RSS_ENTRIES_PER_CTX_THOR) /
-				    BNXT_RSS_ENTRIES_PER_CTX_THOR;
+				  BNXT_RSS_ENTRIES_PER_CTX_THOR;
 }
 
 static uint16_t  bnxt_rss_hash_tbl_size(const struct bnxt *bp)
@@ -254,6 +257,14 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
 	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS) {
 		int j, nr_ctxs = bnxt_rss_ctxts(bp);
 
+		if (bp->rx_nr_rings > BNXT_RSS_TBL_SIZE_THOR) {
+			PMD_DRV_LOG(ERR, "RxQ cnt %d > reta_size %d\n",
+				    bp->rx_nr_rings, BNXT_RSS_TBL_SIZE_THOR);
+			PMD_DRV_LOG(ERR,
+				    "Only queues 0-%d will be in RSS table\n",
+				    BNXT_RSS_TBL_SIZE_THOR - 1);
+		}
+
 		rc = 0;
 		for (j = 0; j < nr_ctxs; j++) {
 			rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic, j);
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.950927829 +0100
+++ 0018-net-bnxt-fix-Rx-rings-in-RSS-redirection-table.patch	2021-02-04 12:04:27.870789574 +0100
@@ -1 +1 @@
-From d424af43e6c32aec83be8f1380271ff33ed0b89a Mon Sep 17 00:00:00 2001
+From bdae17156a190112880828fe963fc2806bb9e6b2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d424af43e6c32aec83be8f1380271ff33ed0b89a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 90ced972c0..9bd4f1da97 100644
+index 3700a277c7..940b41767c 100644
@@ -24 +25 @@
-@@ -389,7 +389,7 @@ struct bnxt_coal {
+@@ -344,7 +344,7 @@ struct bnxt_coal {
@@ -34 +35 @@
-index 81c8f8d79d..c363c8427a 100644
+index fc8532a464..1579714b35 100644
@@ -37 +38 @@
-@@ -207,12 +207,15 @@ int is_bnxt_in_error(struct bnxt *bp)
+@@ -153,12 +153,15 @@ int is_bnxt_in_error(struct bnxt *bp)
@@ -39 +40 @@
- static uint16_t bnxt_rss_ctxts(const struct bnxt *bp)
+ uint16_t bnxt_rss_ctxts(const struct bnxt *bp)
@@ -54,2 +55,2 @@
- uint16_t bnxt_rss_hash_tbl_size(const struct bnxt *bp)
-@@ -424,6 +427,14 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
+ static uint16_t  bnxt_rss_hash_tbl_size(const struct bnxt *bp)
+@@ -254,6 +257,14 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)

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

* [dpdk-stable] patch 'net/bnxt: fix VNIC config on Rx queue stop' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (16 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix Rx rings in RSS redirection table' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: release HWRM lock in error' " Christian Ehrhardt
                   ` (121 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Samik Gupta; +Cc: Ajit Khaparde, Lance Richardson, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/6e5672c8f681d6dda9b2f170d21271055db06cc2

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 6e5672c8f681d6dda9b2f170d21271055db06cc2 Mon Sep 17 00:00:00 2001
From: Samik Gupta <samik.gupta@broadcom.com>
Date: Fri, 6 Nov 2020 16:41:21 -0500
Subject: [PATCH] net/bnxt: fix VNIC config on Rx queue stop

[ upstream commit e36b1cd6b8cd20dbb323be7a01b8152cbb07afd4 ]

Reconfigure a vnic's default ring if the current default ring is stopped
by the application. It picks the lowest numbered ring that is currently
active to be the new default, and issues the hwrm_vnic_cfg command to
update the configuration. Applies to adapters that are not Thor-based.

Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")

Signed-off-by: Samik Gupta <samik.gupta@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index d08ba6c3ca..d3a5ef5677 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -549,12 +549,12 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 		rc = bnxt_vnic_rss_configure(bp, vnic);
 	}
 
-	if (BNXT_CHIP_THOR(bp)) {
-		/* Compute current number of active receive queues. */
-		for (i = vnic->start_grp_id; i < vnic->end_grp_id; i++)
-			if (bp->rx_queues[i]->rx_started)
-				active_queue_cnt++;
+	/* Compute current number of active receive queues. */
+	for (i = vnic->start_grp_id; i < vnic->end_grp_id; i++)
+		if (bp->rx_queues[i]->rx_started)
+			active_queue_cnt++;
 
+	if (BNXT_CHIP_THOR(bp)) {
 		/*
 		 * For Thor, we need to ensure that the VNIC default receive
 		 * ring corresponds to an active receive queue. When no queue
@@ -574,6 +574,22 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 			/* Reconfigure default receive ring. */
 			bnxt_hwrm_vnic_cfg(bp, vnic);
 		}
+	} else if (active_queue_cnt) {
+		/*
+		 * If the queue being stopped is the current default queue and
+		 * there are other active queues, pick one of them as the
+		 * default and reconfigure the vnic.
+		 */
+		if (vnic->dflt_ring_grp == bp->grp_info[rx_queue_id].fw_grp_id) {
+			for (i = vnic->start_grp_id; i < vnic->end_grp_id; i++) {
+				if (bp->rx_queues[i]->rx_started) {
+					vnic->dflt_ring_grp =
+						bp->grp_info[i].fw_grp_id;
+					bnxt_hwrm_vnic_cfg(bp, vnic);
+					break;
+				}
+			}
+		}
 	}
 
 	if (rc == 0)
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:28.988030055 +0100
+++ 0019-net-bnxt-fix-VNIC-config-on-Rx-queue-stop.patch	2021-02-04 12:04:27.870789574 +0100
@@ -1 +1 @@
-From e36b1cd6b8cd20dbb323be7a01b8152cbb07afd4 Mon Sep 17 00:00:00 2001
+From 6e5672c8f681d6dda9b2f170d21271055db06cc2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e36b1cd6b8cd20dbb323be7a01b8152cbb07afd4 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index e0ec342162..61196eba93 100644
+index d08ba6c3ca..d3a5ef5677 100644
@@ -26 +27 @@
-@@ -557,12 +557,12 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -549,12 +549,12 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -44 +45 @@
-@@ -582,6 +582,22 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -574,6 +574,22 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)

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

* [dpdk-stable] patch 'net/bnxt: release HWRM lock in error' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (17 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix VNIC config on Rx queue stop' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: propagate FW command failure to application' " Christian Ehrhardt
                   ` (120 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/9481fba8fd2ab438d8e2a7a5d1f1240b3b7bc77e

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 9481fba8fd2ab438d8e2a7a5d1f1240b3b7bc77e Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 17 Nov 2020 12:40:24 +0530
Subject: [PATCH] net/bnxt: release HWRM lock in error

[ upstream commit ec0a96819d35070276f350c2488203e7ab72aed4 ]

In __bnxt_hwrm_func_qcaps, when memory allocations fails
driver is not releasing the hwrm lock. This patch fixes it
by calling hwrm_unlock in that error case.

Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index d87605f7d7..b2665089a6 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -634,6 +634,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 			    sizeof(bp->pf.vf_info[0]) * new_max_vfs, 0);
 			if (bp->pf.vf_info == NULL) {
 				PMD_DRV_LOG(ERR, "Alloc vf info fail\n");
+				HWRM_UNLOCK();
 				return -ENOMEM;
 			}
 			bp->pf.max_vfs = new_max_vfs;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.023300039 +0100
+++ 0020-net-bnxt-release-HWRM-lock-in-error.patch	2021-02-04 12:04:27.874789577 +0100
@@ -1 +1 @@
-From ec0a96819d35070276f350c2488203e7ab72aed4 Mon Sep 17 00:00:00 2001
+From 9481fba8fd2ab438d8e2a7a5d1f1240b3b7bc77e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ec0a96819d35070276f350c2488203e7ab72aed4 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ebbf504c0c..784e9778a3 100644
+index d87605f7d7..b2665089a6 100644
@@ -24,3 +25,3 @@
-@@ -718,6 +718,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
- 			    sizeof(bp->pf->vf_info[0]) * new_max_vfs, 0);
- 			if (bp->pf->vf_info == NULL) {
+@@ -634,6 +634,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+ 			    sizeof(bp->pf.vf_info[0]) * new_max_vfs, 0);
+ 			if (bp->pf.vf_info == NULL) {
@@ -31 +32 @@
- 			bp->pf->max_vfs = new_max_vfs;
+ 			bp->pf.max_vfs = new_max_vfs;

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

* [dpdk-stable] patch 'net/bnxt: propagate FW command failure to application' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (18 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: release HWRM lock in error' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix cleanup on mutex init failure' " Christian Ehrhardt
                   ` (119 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From c1420a7267a9451c4602acf0f4a4ae6fe3b9bccf Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 12 Nov 2020 16:17:54 +0530
Subject: [PATCH] net/bnxt: propagate FW command failure to application

[ upstream commit 4297cadef3a6eb42c32c12a1b3926316ee0e0f9a ]

In bnxt_reta_update_op() and bnxt_rss_hash_update_op(), driver does not
propagate the error back to the application when the fw command fails.

Fixes: 378ab645bb0b ("net/bnxt: fix RSS RETA indirection table ops")
Fixes: fcc0aa1edc10 ("net/bnxt: add RSS hash configuration")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 1579714b35..8b50474e18 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1375,8 +1375,8 @@ static int bnxt_reta_update_op(struct rte_eth_dev *eth_dev,
 		}
 	}
 
-	bnxt_hwrm_vnic_rss_cfg(bp, vnic);
-	return 0;
+	rc = bnxt_hwrm_vnic_rss_cfg(bp, vnic);
+	return rc;
 }
 
 static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
@@ -1478,8 +1478,8 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
 	memcpy(vnic->rss_hash_key, rss_conf->rss_key, rss_conf->rss_key_len);
 
 rss_config:
-	bnxt_hwrm_vnic_rss_cfg(bp, vnic);
-	return 0;
+	rc = bnxt_hwrm_vnic_rss_cfg(bp, vnic);
+	return rc;
 }
 
 static int bnxt_rss_hash_conf_get_op(struct rte_eth_dev *eth_dev,
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.059870741 +0100
+++ 0021-net-bnxt-propagate-FW-command-failure-to-application.patch	2021-02-04 12:04:27.878789581 +0100
@@ -1 +1 @@
-From 4297cadef3a6eb42c32c12a1b3926316ee0e0f9a Mon Sep 17 00:00:00 2001
+From c1420a7267a9451c4602acf0f4a4ae6fe3b9bccf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4297cadef3a6eb42c32c12a1b3926316ee0e0f9a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 8047b0b5d7..33358779bb 100644
+index 1579714b35..8b50474e18 100644
@@ -24 +25 @@
-@@ -1843,8 +1843,8 @@ static int bnxt_reta_update_op(struct rte_eth_dev *eth_dev,
+@@ -1375,8 +1375,8 @@ static int bnxt_reta_update_op(struct rte_eth_dev *eth_dev,
@@ -35 +36 @@
-@@ -1949,8 +1949,8 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
+@@ -1478,8 +1478,8 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,

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

* [dpdk-stable] patch 'net/bnxt: fix cleanup on mutex init failure' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (19 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: propagate FW command failure to application' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix VNIC RSS configure function' " Christian Ehrhardt
                   ` (118 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Lance Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/69eb5f9ff4ce2ce11720368ecb4ce5da78389af8

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 69eb5f9ff4ce2ce11720368ecb4ce5da78389af8 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 1 Dec 2020 12:52:53 -0800
Subject: [PATCH] net/bnxt: fix cleanup on mutex init failure

[ upstream commit 5bbf650b7105f867145664bfe1feeba06386a0d8 ]

In case mutex init fails during initialization, start cleanup and
fail the initialization process.

Fixes: a73b8e939f10 ("net/bnxt: fix race between start and interrupt handler")

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 8b50474e18..0279eeba8f 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4765,8 +4765,10 @@ bnxt_init_locks(struct bnxt *bp)
 	}
 
 	err = pthread_mutex_init(&bp->def_cp_lock, NULL);
-	if (err)
+	if (err) {
 		PMD_DRV_LOG(ERR, "Unable to initialize def_cp_lock\n");
+		return err;
+	}
 
 	err = pthread_mutex_init(&bp->health_check_lock, NULL);
 	if (err)
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.096333436 +0100
+++ 0022-net-bnxt-fix-cleanup-on-mutex-init-failure.patch	2021-02-04 12:04:27.882789586 +0100
@@ -1 +1 @@
-From 5bbf650b7105f867145664bfe1feeba06386a0d8 Mon Sep 17 00:00:00 2001
+From 69eb5f9ff4ce2ce11720368ecb4ce5da78389af8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5bbf650b7105f867145664bfe1feeba06386a0d8 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 33358779bb..0b14ca2342 100644
+index 8b50474e18..0279eeba8f 100644
@@ -22 +23 @@
-@@ -4739,8 +4739,10 @@ bnxt_init_locks(struct bnxt *bp)
+@@ -4765,8 +4765,10 @@ bnxt_init_locks(struct bnxt *bp)

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

* [dpdk-stable] patch 'net/bnxt: fix VNIC RSS configure function' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (20 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix cleanup on mutex init failure' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/netvsc: ignore unsupported packet on sync command' " Christian Ehrhardt
                   ` (117 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/5e20d2d465aa243f852adba41d90195ebe11b545

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5e20d2d465aa243f852adba41d90195ebe11b545 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 7 Oct 2020 09:11:50 +0530
Subject: [PATCH] net/bnxt: fix VNIC RSS configure function

[ upstream commit 5f0f9a45aca26d8462eb2dfce34c6d3561610915 ]

1. Moved invalid VNIC id check to the beginning of the function.
2. Removed a duplicate check which avoids unnecessary code indentation.

Fixes: 49d0709b257f ("net/bnxt: delete and flush L2 filters cleanly")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 42 +++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 22 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index b2665089a6..419f42ffef 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4464,37 +4464,35 @@ int bnxt_vnic_rss_configure(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 {
 	unsigned int rss_idx, fw_idx, i;
 
+	if (vnic->fw_vnic_id == INVALID_HW_RING_ID)
+		return 0;
+
 	if (!(vnic->rss_table && vnic->hash_type))
 		return 0;
 
 	if (BNXT_CHIP_THOR(bp))
 		return bnxt_vnic_rss_configure_thor(bp, vnic);
 
-	if (vnic->fw_vnic_id == INVALID_HW_RING_ID)
-		return 0;
-
-	if (vnic->rss_table && vnic->hash_type) {
-		/*
-		 * Fill the RSS hash & redirection table with
-		 * ring group ids for all VNICs
-		 */
-		for (rss_idx = 0, fw_idx = 0; rss_idx < HW_HASH_INDEX_SIZE;
-			rss_idx++, fw_idx++) {
-			for (i = 0; i < bp->rx_cp_nr_rings; i++) {
-				fw_idx %= bp->rx_cp_nr_rings;
-				if (vnic->fw_grp_ids[fw_idx] !=
-				    INVALID_HW_RING_ID)
-					break;
-				fw_idx++;
-			}
-			if (i == bp->rx_cp_nr_rings)
-				return 0;
-			vnic->rss_table[rss_idx] = vnic->fw_grp_ids[fw_idx];
+	/*
+	 * Fill the RSS hash & redirection table with
+	 * ring group ids for all VNICs
+	 */
+	for (rss_idx = 0, fw_idx = 0; rss_idx < HW_HASH_INDEX_SIZE;
+	     rss_idx++, fw_idx++) {
+		for (i = 0; i < bp->rx_cp_nr_rings; i++) {
+			fw_idx %= bp->rx_cp_nr_rings;
+			if (vnic->fw_grp_ids[fw_idx] != INVALID_HW_RING_ID)
+				break;
+			fw_idx++;
 		}
-		return bnxt_hwrm_vnic_rss_cfg(bp, vnic);
+
+		if (i == bp->rx_cp_nr_rings)
+			return 0;
+
+		vnic->rss_table[rss_idx] = vnic->fw_grp_ids[fw_idx];
 	}
 
-	return 0;
+	return bnxt_hwrm_vnic_rss_cfg(bp, vnic);
 }
 
 static void bnxt_hwrm_set_coal_params(struct bnxt_coal *hw_coal,
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.132071303 +0100
+++ 0023-net-bnxt-fix-VNIC-RSS-configure-function.patch	2021-02-04 12:04:27.886789589 +0100
@@ -1 +1 @@
-From 5f0f9a45aca26d8462eb2dfce34c6d3561610915 Mon Sep 17 00:00:00 2001
+From 5e20d2d465aa243f852adba41d90195ebe11b545 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5f0f9a45aca26d8462eb2dfce34c6d3561610915 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6f5402070f..cee2656c14 100644
+index b2665089a6..419f42ffef 100644
@@ -23 +24 @@
-@@ -4896,37 +4896,35 @@ int bnxt_vnic_rss_configure(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+@@ -4464,37 +4464,35 @@ int bnxt_vnic_rss_configure(struct bnxt *bp, struct bnxt_vnic_info *vnic)
@@ -33,2 +34,2 @@
- 	if (BNXT_CHIP_P5(bp))
- 		return bnxt_vnic_rss_configure_p5(bp, vnic);
+ 	if (BNXT_CHIP_THOR(bp))
+ 		return bnxt_vnic_rss_configure_thor(bp, vnic);

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

* [dpdk-stable] patch 'net/netvsc: ignore unsupported packet on sync command' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (21 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix VNIC RSS configure function' " Christian Ehrhardt
@ 2021-02-04 11:27 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/bonding: fix PCI address comparison on non-PCI ports' " Christian Ehrhardt
                   ` (116 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:27 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/216f57c06ccc8d5d1c5a438b89bfbc0e1578976a

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 216f57c06ccc8d5d1c5a438b89bfbc0e1578976a Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Fri, 11 Dec 2020 12:48:21 -0800
Subject: [PATCH] net/netvsc: ignore unsupported packet on sync command

[ upstream commit 0a4533facb49b0ca0d7520fee09270a82017e8fe ]

On netvsc initialization, the host VSP may send a NVS_TYPE_TXTBL_NOTE
packet while executing a VSP command synchronously.

Instead of returning an error, ignore this packet as we don't use it for
DPDK.

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/netvsc/hn_nvs.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c
index eeb82ab9ee..03b6cc1551 100644
--- a/drivers/net/netvsc/hn_nvs.c
+++ b/drivers/net/netvsc/hn_nvs.c
@@ -97,8 +97,13 @@ __hn_nvs_execute(struct hn_data *hv,
 	hdr = (struct hn_nvs_hdr *)buffer;
 
 	/* Silently drop received packets while waiting for response */
-	if (hdr->type == NVS_TYPE_RNDIS) {
+	switch (hdr->type) {
+	case NVS_TYPE_RNDIS:
 		hn_nvs_ack_rxbuf(chan, xactid);
+		/* fallthrough */
+
+	case NVS_TYPE_TXTBL_NOTE:
+		PMD_DRV_LOG(DEBUG, "discard packet type 0x%x", hdr->type);
 		goto retry;
 	}
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.167737710 +0100
+++ 0024-net-netvsc-ignore-unsupported-packet-on-sync-command.patch	2021-02-04 12:04:27.890789593 +0100
@@ -1 +1 @@
-From 0a4533facb49b0ca0d7520fee09270a82017e8fe Mon Sep 17 00:00:00 2001
+From 216f57c06ccc8d5d1c5a438b89bfbc0e1578976a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0a4533facb49b0ca0d7520fee09270a82017e8fe ]
+
@@ -11,2 +12,0 @@
-
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bonding: fix PCI address comparison on non-PCI ports' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (22 preceding siblings ...)
  2021-02-04 11:27 ` [dpdk-stable] patch 'net/netvsc: ignore unsupported packet on sync command' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix stats counters' " Christian Ehrhardt
                   ` (115 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/6734a7125b0405b6dfebc646fd4e93a1d3ae19f2

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 6734a7125b0405b6dfebc646fd4e93a1d3ae19f2 Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <grive@u256.net>
Date: Fri, 17 Apr 2020 18:42:07 +0200
Subject: [PATCH] net/bonding: fix PCI address comparison on non-PCI ports

[ upstream commit 3b37cc0c28f3d01ced424e72641aa63f494899b1 ]

The bonding PMD will iterate over all available ETH ports and for each,
compare a chunk of bytes at an offset that would correspond to the PCI
address in an rte_pci_device.

This is incorrect and unsafe. Also, the rte_device using this PCI
address is already found, no need to compare again the PCI address of
all eth devices.

Refactoring the code to fix this, the initial check to find the PCI bus
is out of scope.

Fixes: c848b518bbc7 ("net/bonding: support bifurcated driver in eal")

Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_args.c | 58 +++++++++++--------------
 1 file changed, 25 insertions(+), 33 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index 35616fb8bc..8c5f90dc63 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -22,23 +22,37 @@ const char *pmd_bond_init_valid_arguments[] = {
 	NULL
 };
 
+static inline int
+bond_pci_addr_cmp(const struct rte_device *dev, const void *_pci_addr)
+{
+	const struct rte_pci_device *pdev = RTE_DEV_TO_PCI_CONST(dev);
+	const struct rte_pci_addr *paddr = _pci_addr;
+
+	return rte_pci_addr_cmp(&pdev->addr, paddr);
+}
+
 static inline int
 find_port_id_by_pci_addr(const struct rte_pci_addr *pci_addr)
 {
-	struct rte_pci_device *pci_dev;
-	struct rte_pci_addr *eth_pci_addr;
+	struct rte_bus *pci_bus;
+	struct rte_device *dev;
 	unsigned i;
 
-	RTE_ETH_FOREACH_DEV(i) {
-		pci_dev = RTE_ETH_DEV_TO_PCI(&rte_eth_devices[i]);
-		eth_pci_addr = &pci_dev->addr;
+	pci_bus = rte_bus_find_by_name("pci");
+	if (pci_bus == NULL) {
+		RTE_BOND_LOG(ERR, "No PCI bus found");
+		return -1;
+	}
 
-		if (pci_addr->bus == eth_pci_addr->bus &&
-			pci_addr->devid == eth_pci_addr->devid &&
-			pci_addr->domain == eth_pci_addr->domain &&
-			pci_addr->function == eth_pci_addr->function)
-			return i;
+	dev = pci_bus->find_device(NULL, bond_pci_addr_cmp, pci_addr);
+	if (dev == NULL) {
+		RTE_BOND_LOG(ERR, "unable to find PCI device");
+		return -1;
 	}
+
+	RTE_ETH_FOREACH_DEV(i)
+		if (rte_eth_devices[i].device == dev)
+			return i;
 	return -1;
 }
 
@@ -57,15 +71,6 @@ find_port_id_by_dev_name(const char *name)
 	return -1;
 }
 
-static inline int
-bond_pci_addr_cmp(const struct rte_device *dev, const void *_pci_addr)
-{
-	const struct rte_pci_device *pdev = RTE_DEV_TO_PCI_CONST(dev);
-	const struct rte_pci_addr *paddr = _pci_addr;
-
-	return rte_pci_addr_cmp(&pdev->addr, paddr);
-}
-
 /**
  * Parses a port identifier string to a port id by pci address, then by name,
  * and finally port id.
@@ -74,23 +79,10 @@ static inline int
 parse_port_id(const char *port_str)
 {
 	struct rte_pci_addr dev_addr;
-	struct rte_bus *pci_bus;
-	struct rte_device *dev;
 	int port_id;
 
-	pci_bus = rte_bus_find_by_name("pci");
-	if (pci_bus == NULL) {
-		RTE_BOND_LOG(ERR, "unable to find PCI bus\n");
-		return -1;
-	}
-
 	/* try parsing as pci address, physical devices */
-	if (pci_bus->parse(port_str, &dev_addr) == 0) {
-		dev = pci_bus->find_device(NULL, bond_pci_addr_cmp, &dev_addr);
-		if (dev == NULL) {
-			RTE_BOND_LOG(ERR, "unable to find PCI device");
-			return -1;
-		}
+	if (rte_pci_addr_parse(port_str, &dev_addr) == 0) {
 		port_id = find_port_id_by_pci_addr(&dev_addr);
 		if (port_id < 0)
 			return -1;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.200977251 +0100
+++ 0025-net-bonding-fix-PCI-address-comparison-on-non-PCI-po.patch	2021-02-04 12:04:27.890789593 +0100
@@ -1 +1 @@
-From 3b37cc0c28f3d01ced424e72641aa63f494899b1 Mon Sep 17 00:00:00 2001
+From 6734a7125b0405b6dfebc646fd4e93a1d3ae19f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3b37cc0c28f3d01ced424e72641aa63f494899b1 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/i40e: fix stats counters' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (23 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/bonding: fix PCI address comparison on non-PCI ports' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix VLAN stripping in VF' " Christian Ehrhardt
                   ` (114 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From cb93e1ff837b77c8aeb7de5a985877f0856080b9 Mon Sep 17 00:00:00 2001
From: Igor Ryzhov <iryzhov@nfware.com>
Date: Tue, 17 Nov 2020 11:56:39 +0300
Subject: [PATCH] net/i40e: fix stats counters

[ upstream commit d8d652ec7266d9ea4c8763d4a71a2c7853b9c23b ]

When low and high registers are read separately, this opens the door to
a race condition:
- low register is read
- NIC updates the registers
- high register is read

Because of this, we may end up with an incorrect counter value.
Let's read the registers in one shot, as it is done in Linux kernel
since the introduction of the i40e driver.

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

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_osdep.h | 10 ++++++++++
 drivers/net/i40e/i40e_ethdev.c     | 10 +++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index 64b15e1b61..ebd6872400 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -133,6 +133,14 @@ static inline uint32_t i40e_read_addr(volatile void *addr)
 	return rte_le_to_cpu_32(I40E_PCI_REG(addr));
 }
 
+#define I40E_PCI_REG64(reg)		rte_read64(reg)
+#define I40E_PCI_REG64_ADDR(a, reg) \
+	((volatile uint64_t *)((char *)(a)->hw_addr + (reg)))
+static inline uint64_t i40e_read64_addr(volatile void *addr)
+{
+	return rte_le_to_cpu_64(I40E_PCI_REG64(addr));
+}
+
 #define I40E_PCI_REG_WRITE(reg, value)		\
 	rte_write32((rte_cpu_to_le_32(value)), reg)
 #define I40E_PCI_REG_WRITE_RELAXED(reg, value)	\
@@ -145,6 +153,8 @@ static inline uint32_t i40e_read_addr(volatile void *addr)
 #define I40E_WRITE_REG(hw, reg, value) \
 	I40E_PCI_REG_WRITE(I40E_PCI_REG_ADDR((hw), (reg)), (value))
 
+#define I40E_READ_REG64(hw, reg) i40e_read64_addr(I40E_PCI_REG64_ADDR((hw), (reg)))
+
 #define rd32(a, reg) i40e_read_addr(I40E_PCI_REG_ADDR((a), (reg)))
 #define wr32(a, reg, value) \
 	I40E_PCI_REG_WRITE(I40E_PCI_REG_ADDR((a), (reg)), (value))
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index ec9b16608c..e7a7e38bc9 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -6620,9 +6620,13 @@ i40e_stat_update_48(struct i40e_hw *hw,
 {
 	uint64_t new_data;
 
-	new_data = (uint64_t)I40E_READ_REG(hw, loreg);
-	new_data |= ((uint64_t)(I40E_READ_REG(hw, hireg) &
-			I40E_16_BIT_MASK)) << I40E_32_BIT_WIDTH;
+	if (hw->device_id == I40E_DEV_ID_QEMU) {
+		new_data = (uint64_t)I40E_READ_REG(hw, loreg);
+		new_data |= ((uint64_t)(I40E_READ_REG(hw, hireg) &
+				I40E_16_BIT_MASK)) << I40E_32_BIT_WIDTH;
+	} else {
+		new_data = I40E_READ_REG64(hw, loreg);
+	}
 
 	if (!offset_loaded)
 		*offset = new_data;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.233112447 +0100
+++ 0026-net-i40e-fix-stats-counters.patch	2021-02-04 12:04:27.902789605 +0100
@@ -1 +1 @@
-From d8d652ec7266d9ea4c8763d4a71a2c7853b9c23b Mon Sep 17 00:00:00 2001
+From cb93e1ff837b77c8aeb7de5a985877f0856080b9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d8d652ec7266d9ea4c8763d4a71a2c7853b9c23b ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 9b5033024f..c9287ff255 100644
+index 64b15e1b61..ebd6872400 100644
@@ -45 +46 @@
-@@ -150,6 +158,8 @@ static inline uint32_t i40e_read_addr(volatile void *addr)
+@@ -145,6 +153,8 @@ static inline uint32_t i40e_read_addr(volatile void *addr)
@@ -55 +56 @@
-index 2cb18ecc03..7f9bba4052 100644
+index ec9b16608c..e7a7e38bc9 100644

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

* [dpdk-stable] patch 'net/i40e: fix VLAN stripping in VF' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (24 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix stats counters' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ixgbe: fix flex bytes flow director rule' " Christian Ehrhardt
                   ` (113 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Souvik Dey; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 2e89d3c7d976045827b377205f809f09b93101ca Mon Sep 17 00:00:00 2001
From: Souvik Dey <sodey@rbbn.com>
Date: Tue, 15 Dec 2020 08:28:15 -0500
Subject: [PATCH] net/i40e: fix VLAN stripping in VF

[ upstream commit 95ba3f72110c10dd51517d6544be64854c5a1208 ]

When VF adds VLAN, Linux PF driver enables VLAN stripping by default,
this might have issues if the app configured DEV_RX_OFFLOAD_VLAN_STRIP.

This behavior of the Linux driver causes confusion with the DPDK app
using i40e_pmd. So it is better to reconfigure the vlan_offload, which
checks for DEV_RX_OFFLOAD_VLAN_STRIP flag in the dev_conf and enables or
disables the vlan strip in the PF.

Application cannot use rte_eth_dev_set_vlan_offload() to set
the VLAN_STRIP, as this will only work for the first time when
original and current config mismatch, but for all subsequent call
it will be ignored.

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

Signed-off-by: Souvik Dey <sodey@rbbn.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index f6a47d9a92..9ee1471e8e 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1056,8 +1056,18 @@ i40evf_add_vlan(struct rte_eth_dev *dev, uint16_t vlanid)
 	args.out_buffer = vf->aq_resp;
 	args.out_size = I40E_AQ_BUF_SZ;
 	err = i40evf_execute_vf_cmd(dev, &args);
-	if (err)
+	if (err) {
 		PMD_DRV_LOG(ERR, "fail to execute command OP_ADD_VLAN");
+		return err;
+	}
+	/**
+	 * In linux kernel driver on receiving ADD_VLAN it enables
+	 * VLAN_STRIP by default. So reconfigure the vlan_offload
+	 * as it was done by the app earlier.
+	 */
+	err = i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK);
+	if (err)
+		PMD_DRV_LOG(ERR, "fail to set vlan_strip");
 
 	return err;
 }
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.277298682 +0100
+++ 0027-net-i40e-fix-VLAN-stripping-in-VF.patch	2021-02-04 12:04:27.902789605 +0100
@@ -1 +1 @@
-From 95ba3f72110c10dd51517d6544be64854c5a1208 Mon Sep 17 00:00:00 2001
+From 2e89d3c7d976045827b377205f809f09b93101ca Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 95ba3f72110c10dd51517d6544be64854c5a1208 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index c26b036b85..2faee1d7e1 100644
+index f6a47d9a92..9ee1471e8e 100644
@@ -32 +33 @@
-@@ -1078,8 +1078,18 @@ i40evf_add_vlan(struct rte_eth_dev *dev, uint16_t vlanid)
+@@ -1056,8 +1056,18 @@ i40evf_add_vlan(struct rte_eth_dev *dev, uint16_t vlanid)

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

* [dpdk-stable] patch 'net/ixgbe: fix flex bytes flow director rule' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (25 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix VLAN stripping in VF' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix Rx bytes statistics' " Christian Ehrhardt
                   ` (112 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Jun W Zhou, Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From be95781389bf480ffe1c95bee59f2138648e36d2 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Tue, 15 Dec 2020 18:10:31 +0800
Subject: [PATCH] net/ixgbe: fix flex bytes flow director rule

[ upstream commit 06cad275fecf4e1892b076796065942cdc1ef44e ]

When a flexbytes flow director rule is created, the FDIRCTRL.FLEX_OFFSET
register is set, and it keeps its affect even after the flow director
flexbytes rule is destroyed, causing packets to be transferred to the
wrong place.

It is because setting FDIRCTRL shall only be permitted on Flow Director
initialization flow or clearing the Flow Director table according to the
datasheet, otherwise device may behave unexpectedly.

In order to evade this limitation, simulate the Flow Director
initialization flow or clearing the Flow Director table by setting
FDIRCMD.CLEARHT to 0x1B and then clear it back to 0x0B.

Fixes: f35fec63dde1 ("net/ixgbe: enable flex bytes for generic flow API")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Tested-by: Jun W Zhou <junx.w.zhou@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/ixgbe/ixgbe_fdir.c | 29 +++++++++++++++++++++++++++++
 drivers/net/ixgbe/ixgbe_flow.c | 15 ++++++++-------
 2 files changed, 37 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c
index 166dae1e03..9ff5aa8c72 100644
--- a/drivers/net/ixgbe/ixgbe_fdir.c
+++ b/drivers/net/ixgbe/ixgbe_fdir.c
@@ -515,9 +515,30 @@ ixgbe_fdir_set_flexbytes_offset(struct rte_eth_dev *dev,
 				uint16_t offset)
 {
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct ixgbe_hw_fdir_info *fdir_info =
+		IXGBE_DEV_PRIVATE_TO_FDIR_INFO(dev->data->dev_private);
 	uint32_t fdirctrl;
 	int i;
 
+	if (fdir_info->flex_bytes_offset == offset)
+		return 0;
+
+	/**
+	 * 82599 adapters flow director init flow cannot be restarted,
+	 * Workaround 82599 silicon errata by performing the following steps
+	 * before re-writing the FDIRCTRL control register with the same value.
+	 * - write 1 to bit 8 of FDIRCMD register &
+	 * - write 0 to bit 8 of FDIRCMD register
+	 */
+	IXGBE_WRITE_REG(hw, IXGBE_FDIRCMD,
+			(IXGBE_READ_REG(hw, IXGBE_FDIRCMD) |
+			 IXGBE_FDIRCMD_CLEARHT));
+	IXGBE_WRITE_FLUSH(hw);
+	IXGBE_WRITE_REG(hw, IXGBE_FDIRCMD,
+			(IXGBE_READ_REG(hw, IXGBE_FDIRCMD) &
+			 ~IXGBE_FDIRCMD_CLEARHT));
+	IXGBE_WRITE_FLUSH(hw);
+
 	fdirctrl = IXGBE_READ_REG(hw, IXGBE_FDIRCTRL);
 
 	fdirctrl &= ~IXGBE_FDIRCTRL_FLEX_MASK;
@@ -532,6 +553,14 @@ ixgbe_fdir_set_flexbytes_offset(struct rte_eth_dev *dev,
 			break;
 		msec_delay(1);
 	}
+
+	if (i >= IXGBE_FDIR_INIT_DONE_POLL) {
+		PMD_DRV_LOG(ERR, "Flow Director poll time exceeded!");
+		return -ETIMEDOUT;
+	}
+
+	fdir_info->flex_bytes_offset = offset;
+
 	return 0;
 }
 
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index faf67f1dfe..d539951896 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -3137,13 +3137,13 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
 				rte_memcpy(&fdir_info->mask,
 					&fdir_rule.mask,
 					sizeof(struct ixgbe_hw_fdir_mask));
-				fdir_info->flex_bytes_offset =
-					fdir_rule.flex_bytes_offset;
 
-				if (fdir_rule.mask.flex_bytes_mask)
-					ixgbe_fdir_set_flexbytes_offset(dev,
+				if (fdir_rule.mask.flex_bytes_mask) {
+					ret = ixgbe_fdir_set_flexbytes_offset(dev,
 						fdir_rule.flex_bytes_offset);
-
+					if (ret)
+						goto out;
+				}
 				ret = ixgbe_fdir_set_input_mask(dev);
 				if (ret)
 					goto out;
@@ -3161,8 +3161,9 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
 				if (ret)
 					goto out;
 
-				if (fdir_info->flex_bytes_offset !=
-						fdir_rule.flex_bytes_offset)
+				if (fdir_rule.mask.flex_bytes_mask &&
+				    fdir_info->flex_bytes_offset !=
+				    fdir_rule.flex_bytes_offset)
 					goto out;
 			}
 		}
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.311603662 +0100
+++ 0028-net-ixgbe-fix-flex-bytes-flow-director-rule.patch	2021-02-04 12:04:27.910789612 +0100
@@ -1 +1 @@
-From 06cad275fecf4e1892b076796065942cdc1ef44e Mon Sep 17 00:00:00 2001
+From be95781389bf480ffe1c95bee59f2138648e36d2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 06cad275fecf4e1892b076796065942cdc1ef44e ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index a0fab5070d..11b9effeba 100644
+index 166dae1e03..9ff5aa8c72 100644
@@ -34 +35 @@
-@@ -503,9 +503,30 @@ ixgbe_fdir_set_flexbytes_offset(struct rte_eth_dev *dev,
+@@ -515,9 +515,30 @@ ixgbe_fdir_set_flexbytes_offset(struct rte_eth_dev *dev,
@@ -65 +66 @@
-@@ -520,6 +541,14 @@ ixgbe_fdir_set_flexbytes_offset(struct rte_eth_dev *dev,
+@@ -532,6 +553,14 @@ ixgbe_fdir_set_flexbytes_offset(struct rte_eth_dev *dev,
@@ -81 +82 @@
-index 39f6ed73f6..9aeb2e4a49 100644
+index faf67f1dfe..d539951896 100644

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

* [dpdk-stable] patch 'net/i40e: fix Rx bytes statistics' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (26 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ixgbe: fix flex bytes flow director rule' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice: check Rx queue number on RSS init' " Christian Ehrhardt
                   ` (111 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Jun W Zhou, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/068c310f8bd5704abeee1186b37af1ef16baac85

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 068c310f8bd5704abeee1186b37af1ef16baac85 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Tue, 15 Dec 2020 17:50:59 +0800
Subject: [PATCH] net/i40e: fix Rx bytes statistics

[ upstream commit e8326d35d14406df936164bbac171563555a888b ]

Update the Rx-bytes statistics by subtract CRC bytes count from original
bytes count.

Fixes: bd7883c07d4a ("net/i40e: refactor some stats related functions")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Jun W Zhou <junx.w.zhou@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 9ee1471e8e..eb17c02af3 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2388,6 +2388,7 @@ i40evf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->imissed = pstats->rx_discards;
 		stats->oerrors = pstats->tx_errors + pstats->tx_discards;
 		stats->ibytes = pstats->rx_bytes;
+		stats->ibytes -= stats->ipackets * RTE_ETHER_CRC_LEN;
 		stats->obytes = pstats->tx_bytes;
 	} else {
 		PMD_DRV_LOG(ERR, "Get statistics failed");
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.354375994 +0100
+++ 0029-net-i40e-fix-Rx-bytes-statistics.patch	2021-02-04 12:04:27.910789612 +0100
@@ -1 +1 @@
-From e8326d35d14406df936164bbac171563555a888b Mon Sep 17 00:00:00 2001
+From 068c310f8bd5704abeee1186b37af1ef16baac85 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e8326d35d14406df936164bbac171563555a888b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 2faee1d7e1..dc076ae552 100644
+index 9ee1471e8e..eb17c02af3 100644
@@ -23 +24 @@
-@@ -2416,6 +2416,7 @@ i40evf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -2388,6 +2388,7 @@ i40evf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)

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

* [dpdk-stable] patch 'net/ice: check Rx queue number on RSS init' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (27 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix Rx bytes statistics' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice/base: fix tunnel destroy' " Christian Ehrhardt
                   ` (110 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/593797bd16ee8b886a9179723184c534b0ccfc23

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 593797bd16ee8b886a9179723184c534b0ccfc23 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Wed, 23 Dec 2020 13:30:18 +0800
Subject: [PATCH] net/ice: check Rx queue number on RSS init

[ upstream commit bfa4f648728a742f0b38edb628e2978fa5721b01 ]

When RSS is initialized, rx queues number is used as denominator to set
default value into the RSS lookup table. If it is zero, there will be
error of being divided by 0. So add value check to avoid the error.

Fixes: 50370662b727 ("net/ice: support device and queue ops")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 8acfce00aa..833a3ceac3 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2459,6 +2459,12 @@ static int ice_init_rss(struct ice_pf *pf)
 	vsi->rss_key_size = ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE;
 	vsi->rss_lut_size = pf->hash_lut_size;
 
+	if (nb_q == 0) {
+		PMD_DRV_LOG(WARNING,
+			"RSS is not supported as rx queues number is zero\n");
+		return 0;
+	}
+
 	if (is_safe_mode) {
 		PMD_DRV_LOG(WARNING, "RSS is not supported in safe mode\n");
 		return 0;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.391013145 +0100
+++ 0030-net-ice-check-Rx-queue-number-on-RSS-init.patch	2021-02-04 12:04:27.914789616 +0100
@@ -1 +1 @@
-From bfa4f648728a742f0b38edb628e2978fa5721b01 Mon Sep 17 00:00:00 2001
+From 593797bd16ee8b886a9179723184c534b0ccfc23 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bfa4f648728a742f0b38edb628e2978fa5721b01 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 9a5d6a559f..bbb8c14606 100644
+index 8acfce00aa..833a3ceac3 100644
@@ -23 +24 @@
-@@ -3182,6 +3182,12 @@ static int ice_init_rss(struct ice_pf *pf)
+@@ -2459,6 +2459,12 @@ static int ice_init_rss(struct ice_pf *pf)

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

* [dpdk-stable] patch 'net/ice/base: fix tunnel destroy' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (28 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice: check Rx queue number on RSS init' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice/base: fix null pointer dereference' " Christian Ehrhardt
                   ` (109 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Xiao Zhang, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 8f378c5febd57015a20444739e370b33df7b181a Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 15 Dec 2020 12:13:57 +0800
Subject: [PATCH] net/ice/base: fix tunnel destroy

[ upstream commit c7ff2213a5fe884d56adcd4a7b50ecd5810bebf2 ]

The TCAM information in AQ command buffer is not correct when destroying
the tunnel entries. The TCAM count was always ONE even multiple entries
are destroyed, and the offset of TCAM memory was also incorrect.
This patch is to fix this issue.

Fixes: 884efe3ca1f3 ("net/ice/base: add VXLAN/generic tunnel management")

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_flex_pipe.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index bf5a25d15b..cc95a2e0d0 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -2000,7 +2000,7 @@ enum ice_status ice_destroy_tunnel(struct ice_hw *hw, u16 port, bool all)
 	struct ice_buf_build *bld;
 	u16 count = 0;
 	u16 size;
-	u16 i;
+	u16 i, j;
 
 	/* determine count */
 	for (i = 0; i < hw->tnl.count && i < ICE_TUNNEL_MAX_ENTRIES; i++)
@@ -2027,30 +2027,31 @@ enum ice_status ice_destroy_tunnel(struct ice_hw *hw, u16 port, bool all)
 					  size);
 	if (!sect_rx)
 		goto ice_destroy_tunnel_err;
-	sect_rx->count = CPU_TO_LE16(1);
+	sect_rx->count = CPU_TO_LE16(count);
 
 	sect_tx = (struct ice_boost_tcam_section *)
 		ice_pkg_buf_alloc_section(bld, ICE_SID_TXPARSER_BOOST_TCAM,
 					  size);
 	if (!sect_tx)
 		goto ice_destroy_tunnel_err;
-	sect_tx->count = CPU_TO_LE16(1);
+	sect_tx->count = CPU_TO_LE16(count);
 
 	/* copy original boost entry to update package buffer, one copy to Rx
 	 * section, another copy to the Tx section
 	 */
-	for (i = 0; i < hw->tnl.count && i < ICE_TUNNEL_MAX_ENTRIES; i++)
+	for (i = 0, j = 0; i < hw->tnl.count && i < ICE_TUNNEL_MAX_ENTRIES; i++)
 		if (hw->tnl.tbl[i].valid && hw->tnl.tbl[i].in_use &&
 		    (all || hw->tnl.tbl[i].port == port)) {
-			ice_memcpy(sect_rx->tcam + i,
+			ice_memcpy(sect_rx->tcam + j,
 				   hw->tnl.tbl[i].boost_entry,
 				   sizeof(*sect_rx->tcam),
 				   ICE_NONDMA_TO_NONDMA);
-			ice_memcpy(sect_tx->tcam + i,
+			ice_memcpy(sect_tx->tcam + j,
 				   hw->tnl.tbl[i].boost_entry,
 				   sizeof(*sect_tx->tcam),
 				   ICE_NONDMA_TO_NONDMA);
 			hw->tnl.tbl[i].marked = true;
+			j++;
 		}
 
 	status = ice_update_pkg(hw, ice_pkg_buf(bld), 1);
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.432359426 +0100
+++ 0031-net-ice-base-fix-tunnel-destroy.patch	2021-02-04 12:04:27.922789624 +0100
@@ -1 +1 @@
-From c7ff2213a5fe884d56adcd4a7b50ecd5810bebf2 Mon Sep 17 00:00:00 2001
+From 8f378c5febd57015a20444739e370b33df7b181a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c7ff2213a5fe884d56adcd4a7b50ecd5810bebf2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 0812135cf5..6c7f83899d 100644
+index bf5a25d15b..cc95a2e0d0 100644
@@ -25 +26,2 @@
-@@ -2163,7 +2163,7 @@ enum ice_status ice_destroy_tunnel(struct ice_hw *hw, u16 port, bool all)
+@@ -2000,7 +2000,7 @@ enum ice_status ice_destroy_tunnel(struct ice_hw *hw, u16 port, bool all)
+ 	struct ice_buf_build *bld;
@@ -27 +28,0 @@
- 	u16 index;
@@ -32,3 +33,3 @@
- 	ice_acquire_lock(&hw->tnl_lock);
- 
-@@ -2203,30 +2203,31 @@ enum ice_status ice_destroy_tunnel(struct ice_hw *hw, u16 port, bool all)
+ 	/* determine count */
+ 	for (i = 0; i < hw->tnl.count && i < ICE_TUNNEL_MAX_ENTRIES; i++)
+@@ -2027,30 +2027,31 @@ enum ice_status ice_destroy_tunnel(struct ice_hw *hw, u16 port, bool all)

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

* [dpdk-stable] patch 'net/ice/base: fix null pointer dereference' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (29 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice/base: fix tunnel destroy' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/virtio-user: fix run closing stdin and close callfd' " Christian Ehrhardt
                   ` (108 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Jacek Bułatek, Haiyue Wang, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a11bbc4aff5df42a3baf7d899f51afac4551507a Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 15 Dec 2020 12:42:46 +0800
Subject: [PATCH] net/ice/base: fix null pointer dereference
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 09f918e8bc5131eb07d88e39c1e035716acf7d82 ]

Added handling of allocation fault for ice_vsi_list_map_info
Should also check dereference of NULL pointer to filters VSI list
information for FWD_TO_VSI_LISt type only, otherwise, the FWD_TO_VSI type
filters by the given VSI can't be located.

Also the point *pi should not be NULL pointer, it is a reference to raw
data field, so remove this variable, use the reference directly.

Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")

Signed-off-by: Jacek Bułatek <jacekx.bulatek@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 940e4ce405..71c6d9821c 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -2507,6 +2507,9 @@ ice_add_update_vsi_list(struct ice_hw *hw,
 			ice_create_vsi_list_map(hw, &vsi_handle_arr[0], 2,
 						vsi_list_id);
 
+		if (!m_entry->vsi_list_info)
+			return ICE_ERR_NO_MEMORY;
+
 		/* If this entry was large action then the large action needs
 		 * to be updated to point to FWD to VSI list
 		 */
@@ -3721,6 +3724,7 @@ ice_vsi_uses_fltr(struct ice_fltr_mgmt_list_entry *fm_entry, u16 vsi_handle)
 	return ((fm_entry->fltr_info.fltr_act == ICE_FWD_TO_VSI &&
 		 fm_entry->fltr_info.vsi_handle == vsi_handle) ||
 		(fm_entry->fltr_info.fltr_act == ICE_FWD_TO_VSI_LIST &&
+		 fm_entry->vsi_list_info &&
 		 (ice_is_bit_set(fm_entry->vsi_list_info->vsi_map,
 				 vsi_handle))));
 }
@@ -3795,14 +3799,12 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,
 
 	LIST_FOR_EACH_ENTRY(fm_entry, lkup_list_head,
 			    ice_fltr_mgmt_list_entry, list_entry) {
-		struct ice_fltr_info *fi;
-
-		fi = &fm_entry->fltr_info;
-		if (!fi || !ice_vsi_uses_fltr(fm_entry, vsi_handle))
+		if (!ice_vsi_uses_fltr(fm_entry, vsi_handle))
 			continue;
 
 		status = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,
-							vsi_list_head, fi);
+							vsi_list_head,
+							&fm_entry->fltr_info);
 		if (status)
 			return status;
 	}
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.470664906 +0100
+++ 0032-net-ice-base-fix-null-pointer-dereference.patch	2021-02-04 12:04:27.926789628 +0100
@@ -1 +1 @@
-From 09f918e8bc5131eb07d88e39c1e035716acf7d82 Mon Sep 17 00:00:00 2001
+From a11bbc4aff5df42a3baf7d899f51afac4551507a Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 09f918e8bc5131eb07d88e39c1e035716acf7d82 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 45c44ca256..fd2c1ccceb 100644
+index 940e4ce405..71c6d9821c 100644
@@ -32 +33 @@
-@@ -4090,6 +4090,9 @@ ice_add_update_vsi_list(struct ice_hw *hw,
+@@ -2507,6 +2507,9 @@ ice_add_update_vsi_list(struct ice_hw *hw,
@@ -42 +43 @@
-@@ -5423,6 +5426,7 @@ ice_vsi_uses_fltr(struct ice_fltr_mgmt_list_entry *fm_entry, u16 vsi_handle)
+@@ -3721,6 +3724,7 @@ ice_vsi_uses_fltr(struct ice_fltr_mgmt_list_entry *fm_entry, u16 vsi_handle)
@@ -50 +51 @@
-@@ -5497,14 +5501,12 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,
+@@ -3795,14 +3799,12 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,

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

* [dpdk-stable] patch 'net/virtio-user: fix run closing stdin and close callfd' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (30 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice/base: fix null pointer dereference' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice/base: fix memory handling' " Christian Ehrhardt
                   ` (107 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Jiawei Zhu; +Cc: Chenbo Xia, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 1b89a970cade3b88d13386fb07b6c14175bc918b Mon Sep 17 00:00:00 2001
From: Jiawei Zhu <zhujiawei12@huawei.com>
Date: Sat, 12 Dec 2020 00:53:18 +0800
Subject: [PATCH] net/virtio-user: fix run closing stdin and close callfd

[ upstream commit 97ed740c3498afab4162cb85492cd3109e21c604 ]

When i < VIRTIO_MAX_VIRTQUEUES and j == i,
dev->callfds[i] and dev->kickfds[i] are default 0.
So it will close(0), close the standard input (stdin).

And when the code fails in kickfd creation,
it will leaves one callfd not closed.

Fixes: e6e7ad8b3024 ("net/virtio-user: move eventfd open/close into init/uninit")
Cc: stable@dpdk.org:

Signed-off-by: Jiawei Zhu <zhujiawei12@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 1c6b26f8d3..ad5d2f3bf8 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -263,6 +263,7 @@ virtio_user_dev_init_notify(struct virtio_user_dev *dev)
 		}
 		kickfd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
 		if (kickfd < 0) {
+			close(callfd);
 			PMD_DRV_LOG(ERR, "kickfd error, %s", strerror(errno));
 			break;
 		}
@@ -271,7 +272,7 @@ virtio_user_dev_init_notify(struct virtio_user_dev *dev)
 	}
 
 	if (i < VIRTIO_MAX_VIRTQUEUES) {
-		for (j = 0; j <= i; ++j) {
+		for (j = 0; j < i; ++j) {
 			close(dev->callfds[j]);
 			close(dev->kickfds[j]);
 		}
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.516790121 +0100
+++ 0033-net-virtio-user-fix-run-closing-stdin-and-close-call.patch	2021-02-04 12:04:27.926789628 +0100
@@ -1 +1 @@
-From 97ed740c3498afab4162cb85492cd3109e21c604 Mon Sep 17 00:00:00 2001
+From 1b89a970cade3b88d13386fb07b6c14175bc918b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 97ed740c3498afab4162cb85492cd3109e21c604 ]
+
@@ -24 +26 @@
-index 053f0267ca..e1cbad0d90 100644
+index 1c6b26f8d3..ad5d2f3bf8 100644
@@ -27 +29 @@
-@@ -276,6 +276,7 @@ virtio_user_dev_init_notify(struct virtio_user_dev *dev)
+@@ -263,6 +263,7 @@ virtio_user_dev_init_notify(struct virtio_user_dev *dev)
@@ -35 +37 @@
-@@ -284,7 +285,7 @@ virtio_user_dev_init_notify(struct virtio_user_dev *dev)
+@@ -271,7 +272,7 @@ virtio_user_dev_init_notify(struct virtio_user_dev *dev)

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

* [dpdk-stable] patch 'net/ice/base: fix memory handling' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (31 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/virtio-user: fix run closing stdin and close callfd' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix returned code for RSS hardware failure' " Christian Ehrhardt
                   ` (106 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Andrii Pypchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/14bcbc5422fc05e1f40e7dd72fe28499a792c39d

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 14bcbc5422fc05e1f40e7dd72fe28499a792c39d Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Fri, 8 Jan 2021 12:03:52 +0800
Subject: [PATCH] net/ice/base: fix memory handling

[ upstream commit 964bafcf5e75cddfbd8bc49485922b01fc491182 ]

Fixed memory handling when memory allocated in user space was handled
as memory allocated in kernel space within QV os_dep implementation
of the ice_memdup function.

Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler")

Signed-off-by: Andrii Pypchenko <andrii.pypchenko@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index ef439c9ade..3669688bd8 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -1357,7 +1357,7 @@ enum ice_status ice_sched_query_res_alloc(struct ice_hw *hw)
 			 ice_memdup(hw, buf->layer_props,
 				    (hw->num_tx_sched_layers *
 				     sizeof(*hw->layer_info)),
-				    ICE_DMA_TO_DMA);
+				    ICE_NONDMA_TO_NONDMA);
 	if (!hw->layer_info) {
 		status = ICE_ERR_NO_MEMORY;
 		goto sched_query_out;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.548897288 +0100
+++ 0034-net-ice-base-fix-memory-handling.patch	2021-02-04 12:04:27.930789631 +0100
@@ -1 +1 @@
-From 964bafcf5e75cddfbd8bc49485922b01fc491182 Mon Sep 17 00:00:00 2001
+From 14bcbc5422fc05e1f40e7dd72fe28499a792c39d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 964bafcf5e75cddfbd8bc49485922b01fc491182 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b75a44f54c..1cce8eaff1 100644
+index ef439c9ade..3669688bd8 100644
@@ -23 +24 @@
-@@ -1361,7 +1361,7 @@ enum ice_status ice_sched_query_res_alloc(struct ice_hw *hw)
+@@ -1357,7 +1357,7 @@ enum ice_status ice_sched_query_res_alloc(struct ice_hw *hw)

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

* [dpdk-stable] patch 'net/i40e: fix returned code for RSS hardware failure' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (32 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice/base: fix memory handling' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'lpm: fix vector IPv4 lookup' " Christian Ehrhardt
                   ` (105 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a1b647389f4bfeaf912f99daaaa856720f731a5e Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Fri, 8 Jan 2021 13:35:39 +0800
Subject: [PATCH] net/i40e: fix returned code for RSS hardware failure

[ upstream commit c222d2a1d00719564526e5a14ca24622bebc0712 ]

The API should return the system error status, but it returned the
hardware error status, this is confuses the caller.
This patch adds check on hardware execution status and returns -EIO
in case of hardware execution failure.

Fixes: 1d4b2b4966bb ("net/i40e: fix VF overwrite PF RSS LUT for X722")
Fixes: d0a349409bd7 ("i40e: support AQ based RSS config")

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

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index e7a7e38bc9..f58749f84b 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4443,7 +4443,6 @@ i40e_set_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size)
 {
 	struct i40e_pf *pf;
 	struct i40e_hw *hw;
-	int ret;
 
 	if (!vsi || !lut)
 		return -EINVAL;
@@ -4452,12 +4451,16 @@ i40e_set_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size)
 	hw = I40E_VSI_TO_HW(vsi);
 
 	if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) {
-		ret = i40e_aq_set_rss_lut(hw, vsi->vsi_id,
-					  vsi->type != I40E_VSI_SRIOV,
-					  lut, lut_size);
-		if (ret) {
-			PMD_DRV_LOG(ERR, "Failed to set RSS lookup table");
-			return ret;
+		enum i40e_status_code status;
+
+		status = i40e_aq_set_rss_lut(hw, vsi->vsi_id,
+					     vsi->type != I40E_VSI_SRIOV,
+					     lut, lut_size);
+		if (status) {
+			PMD_DRV_LOG(ERR,
+				    "Failed to update RSS lookup table, error status: %d",
+				    status);
+			return -EIO;
 		}
 	} else {
 		uint32_t *lut_dw = (uint32_t *)lut;
@@ -7522,7 +7525,6 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len)
 	uint16_t key_idx = (vsi->type == I40E_VSI_SRIOV) ?
 			   I40E_VFQF_HKEY_MAX_INDEX :
 			   I40E_PFQF_HKEY_MAX_INDEX;
-	int ret = 0;
 
 	if (!key || key_len == 0) {
 		PMD_DRV_LOG(DEBUG, "No key to be configured");
@@ -7535,11 +7537,16 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len)
 
 	if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) {
 		struct i40e_aqc_get_set_rss_key_data *key_dw =
-			(struct i40e_aqc_get_set_rss_key_data *)key;
+				(struct i40e_aqc_get_set_rss_key_data *)key;
+		enum i40e_status_code status =
+				i40e_aq_set_rss_key(hw, vsi->vsi_id, key_dw);
 
-		ret = i40e_aq_set_rss_key(hw, vsi->vsi_id, key_dw);
-		if (ret)
-			PMD_INIT_LOG(ERR, "Failed to configure RSS key via AQ");
+		if (status) {
+			PMD_DRV_LOG(ERR,
+				    "Failed to configure RSS key via AQ, error status: %d",
+				    status);
+			return -EIO;
+		}
 	} else {
 		uint32_t *hash_key = (uint32_t *)key;
 		uint16_t i;
@@ -7559,7 +7566,7 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len)
 		I40E_WRITE_FLUSH(hw);
 	}
 
-	return ret;
+	return 0;
 }
 
 static int
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.585964426 +0100
+++ 0035-net-i40e-fix-returned-code-for-RSS-hardware-failure.patch	2021-02-04 12:04:27.946789647 +0100
@@ -1 +1 @@
-From c222d2a1d00719564526e5a14ca24622bebc0712 Mon Sep 17 00:00:00 2001
+From a1b647389f4bfeaf912f99daaaa856720f731a5e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c222d2a1d00719564526e5a14ca24622bebc0712 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 7f9bba4052..5984e52abd 100644
+index e7a7e38bc9..f58749f84b 100644
@@ -56 +57 @@
-@@ -7612,7 +7615,6 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len)
+@@ -7522,7 +7525,6 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len)
@@ -64 +65 @@
-@@ -7625,11 +7627,16 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len)
+@@ -7535,11 +7537,16 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len)
@@ -85 +86 @@
-@@ -7649,7 +7656,7 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len)
+@@ -7559,7 +7566,7 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len)

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

* [dpdk-stable] patch 'lpm: fix vector IPv4 lookup' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (33 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix returned code for RSS hardware failure' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/octeontx: fix build with SVE' " Christian Ehrhardt
                   ` (104 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: David Christensen, Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ea208479121be8941f95db4ba988e11c924465d3 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Thu, 14 Jan 2021 06:59:22 +0000
Subject: [PATCH] lpm: fix vector IPv4 lookup

[ upstream commit 5702b7bf1ce509d2f40d732ba4e2af5b1269e0d8 ]

rte_lpm_lookupx4 could return wrong next hop when more than 256 tbl8
groups are created. This is caused by incorrect type casting of tbl8
group index that been stored in tbl24 entry. The casting caused group
index truncation and hence wrong tbl8 group been searched.

Issue fixed by applying proper mask to tbl24 entry to get tbl8 group index.

Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field")
Fixes: cbc2f1dccfba ("lpm/arm: support NEON")
Fixes: d2cc7959342b ("lpm: add AltiVec for ppc64")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/librte_lpm/rte_lpm_altivec.h | 8 ++++----
 lib/librte_lpm/rte_lpm_neon.h    | 8 ++++----
 lib/librte_lpm/rte_lpm_sse.h     | 8 ++++----
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/lib/librte_lpm/rte_lpm_altivec.h b/lib/librte_lpm/rte_lpm_altivec.h
index 228c41b38e..4fbc1b595d 100644
--- a/lib/librte_lpm/rte_lpm_altivec.h
+++ b/lib/librte_lpm/rte_lpm_altivec.h
@@ -88,28 +88,28 @@ rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4],
 	if (unlikely((pt & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[0] = i8.u32[0] +
-			(uint8_t)tbl[0] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[0] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[0]];
 		tbl[0] = *ptbl;
 	}
 	if (unlikely((pt >> 32 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[1] = i8.u32[1] +
-			(uint8_t)tbl[1] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[1] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[1]];
 		tbl[1] = *ptbl;
 	}
 	if (unlikely((pt2 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[2] = i8.u32[2] +
-			(uint8_t)tbl[2] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[2] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[2]];
 		tbl[2] = *ptbl;
 	}
 	if (unlikely((pt2 >> 32 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[3] = i8.u32[3] +
-			(uint8_t)tbl[3] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[3] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[3]];
 		tbl[3] = *ptbl;
 	}
diff --git a/lib/librte_lpm/rte_lpm_neon.h b/lib/librte_lpm/rte_lpm_neon.h
index 6c131d3125..4642a866f1 100644
--- a/lib/librte_lpm/rte_lpm_neon.h
+++ b/lib/librte_lpm/rte_lpm_neon.h
@@ -81,28 +81,28 @@ rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4],
 	if (unlikely((pt & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[0] = i8.u32[0] +
-			(uint8_t)tbl[0] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[0] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[0]];
 		tbl[0] = *ptbl;
 	}
 	if (unlikely((pt >> 32 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[1] = i8.u32[1] +
-			(uint8_t)tbl[1] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[1] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[1]];
 		tbl[1] = *ptbl;
 	}
 	if (unlikely((pt2 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[2] = i8.u32[2] +
-			(uint8_t)tbl[2] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[2] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[2]];
 		tbl[2] = *ptbl;
 	}
 	if (unlikely((pt2 >> 32 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[3] = i8.u32[3] +
-			(uint8_t)tbl[3] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[3] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[3]];
 		tbl[3] = *ptbl;
 	}
diff --git a/lib/librte_lpm/rte_lpm_sse.h b/lib/librte_lpm/rte_lpm_sse.h
index 44770b6ff8..eaa863c522 100644
--- a/lib/librte_lpm/rte_lpm_sse.h
+++ b/lib/librte_lpm/rte_lpm_sse.h
@@ -82,28 +82,28 @@ rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4],
 	if (unlikely((pt & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[0] = i8.u32[0] +
-			(uint8_t)tbl[0] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[0] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[0]];
 		tbl[0] = *ptbl;
 	}
 	if (unlikely((pt >> 32 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[1] = i8.u32[1] +
-			(uint8_t)tbl[1] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[1] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[1]];
 		tbl[1] = *ptbl;
 	}
 	if (unlikely((pt2 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[2] = i8.u32[2] +
-			(uint8_t)tbl[2] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[2] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[2]];
 		tbl[2] = *ptbl;
 	}
 	if (unlikely((pt2 >> 32 & RTE_LPM_VALID_EXT_ENTRY_BITMASK) ==
 			RTE_LPM_VALID_EXT_ENTRY_BITMASK)) {
 		i8.u32[3] = i8.u32[3] +
-			(uint8_t)tbl[3] * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
+			(tbl[3] & 0x00FFFFFF) * RTE_LPM_TBL8_GROUP_NUM_ENTRIES;
 		ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[3]];
 		tbl[3] = *ptbl;
 	}
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.632702249 +0100
+++ 0036-lpm-fix-vector-IPv4-lookup.patch	2021-02-04 12:04:27.946789647 +0100
@@ -1 +1 @@
-From 5702b7bf1ce509d2f40d732ba4e2af5b1269e0d8 Mon Sep 17 00:00:00 2001
+From ea208479121be8941f95db4ba988e11c924465d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5702b7bf1ce509d2f40d732ba4e2af5b1269e0d8 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/octeontx: fix build with SVE' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (34 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'lpm: fix vector IPv4 lookup' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice: fix RSS lookup table initialization' " Christian Ehrhardt
                   ` (103 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f474bb5284782e3e62f23413884b693040a8b774 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Tue, 12 Jan 2021 02:57:06 +0000
Subject: [PATCH] net/octeontx: fix build with SVE

[ upstream commit e88bd4746737a1ca464b866d29f20ff5a739cd3f ]

Building with gcc 10.2 with SVE extension enabled got error:

{standard input}: Assembler messages:
{standard input}:91: Error: selected processor does not support `addvl x4,x8,#-1'
{standard input}:95: Error: selected processor does not support `ptrue p1.d,all'
{standard input}:135: Error: selected processor does not support `whilelo p2.d,xzr,x5'
{standard input}:137: Error: selected processor does not support `decb x1'

This is because inline assembly code explicitly resets cpu model to
not have SVE support. Thus SVE instructions generated by compiler
auto vectorization got rejected by assembler.

Added SVE to the cpu model specified by inline assembly for SVE support.
Not replacing the inline assembly with C atomics because the driver relies
on specific LSE instruction to interface to co-processor [1].

Fixes: f0c7bb1bf778 ("net/octeontx/base: add octeontx IO operations")

[1] https://mails.dpdk.org/archives/dev/2021-January/196092.html

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/octeontx/base/octeontx_io.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/octeontx/base/octeontx_io.h b/drivers/net/octeontx/base/octeontx_io.h
index 04b9ce1910..d0b9cfbc67 100644
--- a/drivers/net/octeontx/base/octeontx_io.h
+++ b/drivers/net/octeontx/base/octeontx_io.h
@@ -52,6 +52,11 @@ do {							\
 #endif
 
 #if defined(RTE_ARCH_ARM64)
+#if defined(__ARM_FEATURE_SVE)
+#define __LSE_PREAMBLE " .cpu	generic+lse+sve\n"
+#else
+#define __LSE_PREAMBLE " .cpu	generic+lse\n"
+#endif
 /**
  * Perform an atomic fetch-and-add operation.
  */
@@ -61,7 +66,7 @@ octeontx_reg_ldadd_u64(void *addr, int64_t off)
 	uint64_t old_val;
 
 	__asm__ volatile(
-		" .cpu		generic+lse\n"
+		__LSE_PREAMBLE
 		" ldadd	%1, %0, [%2]\n"
 		: "=r" (old_val) : "r" (off), "r" (addr) : "memory");
 
@@ -98,12 +103,13 @@ octeontx_reg_lmtst(void *lmtline_va, void *ioreg_va, const uint64_t cmdbuf[],
 
 		/* LDEOR initiates atomic transfer to I/O device */
 		__asm__ volatile(
-			" .cpu		generic+lse\n"
+			__LSE_PREAMBLE
 			" ldeor	xzr, %0, [%1]\n"
 			: "=r" (result) : "r" (ioreg_va) : "memory");
 	} while (!result);
 }
 
+#undef __LSE_PREAMBLE
 #else
 
 static inline uint64_t
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.672059047 +0100
+++ 0037-net-octeontx-fix-build-with-SVE.patch	2021-02-04 12:04:27.946789647 +0100
@@ -1 +1 @@
-From e88bd4746737a1ca464b866d29f20ff5a739cd3f Mon Sep 17 00:00:00 2001
+From f474bb5284782e3e62f23413884b693040a8b774 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e88bd4746737a1ca464b866d29f20ff5a739cd3f ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ice: fix RSS lookup table initialization' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (35 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/octeontx: fix build with SVE' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice: disable IPv4 checksum offload in vector Tx' " Christian Ehrhardt
                   ` (102 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Wei Xie, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f624f2e7a4c403023d9b17acff9e660ec2fdfde4 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Fri, 8 Jan 2021 15:29:10 +0800
Subject: [PATCH] net/ice: fix RSS lookup table initialization

[ upstream commit 7fe2fde05ac8766afaed4344659e39e8fc6b2514 ]

RSS look-up table initialization is done incorrectly due to
divide-by-zero error.
Add a check to rx-queue count.

Fixes: 50370662b727 ("net/ice: support device and queue ops")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Wei Xie <weix.xie@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 833a3ceac3..6723a21a7a 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2612,10 +2612,12 @@ ice_dev_configure(struct rte_eth_dev *dev)
 	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
 		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 
-	ret = ice_init_rss(pf);
-	if (ret) {
-		PMD_DRV_LOG(ERR, "Failed to enable rss for PF");
-		return ret;
+	if (dev->data->nb_rx_queues) {
+		ret = ice_init_rss(pf);
+		if (ret) {
+			PMD_DRV_LOG(ERR, "Failed to enable rss for PF");
+			return ret;
+		}
 	}
 
 	return 0;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.709710734 +0100
+++ 0038-net-ice-fix-RSS-lookup-table-initialization.patch	2021-02-04 12:04:27.950789652 +0100
@@ -1 +1 @@
-From 7fe2fde05ac8766afaed4344659e39e8fc6b2514 Mon Sep 17 00:00:00 2001
+From f624f2e7a4c403023d9b17acff9e660ec2fdfde4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7fe2fde05ac8766afaed4344659e39e8fc6b2514 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 587f485ee3..e2799a8eb2 100644
+index 833a3ceac3..6723a21a7a 100644
@@ -24 +25 @@
-@@ -3274,10 +3274,12 @@ ice_dev_configure(struct rte_eth_dev *dev)
+@@ -2612,10 +2612,12 @@ ice_dev_configure(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/ice: disable IPv4 checksum offload in vector Tx' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (36 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice: fix RSS lookup table initialization' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice: enlarge Rx queue rearm threshold to 64' " Christian Ehrhardt
                   ` (101 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Murphy Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 9d916364a176ffb68969d01a1b2305a141495e35 Mon Sep 17 00:00:00 2001
From: Murphy Yang <murphyx.yang@intel.com>
Date: Fri, 8 Jan 2021 07:17:52 +0000
Subject: [PATCH] net/ice: disable IPv4 checksum offload in vector Tx

[ upstream commit 30dc028802b440d6ce223078a1992ba77667af34 ]

ICE choices vector TX path or basic TX path by macro
'ICE_NO_VECTOR_FLAGS'.

This patch adds 'DEV_TX_OFFLOAD_IPV4_CKSUM' in 'ICE_NO_VECTOR_FLAGS'
to make IPv4 checksum offload processed by basic TX path.

Fixes: a22483208800 ("net/ice: disable TSO offload in vector path")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx_vec_common.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index 46e3be98a6..97e26d2968 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -244,6 +244,7 @@ ice_rx_vec_queue_default(struct ice_rx_queue *rxq)
 #define ICE_NO_VECTOR_FLAGS (				 \
 		DEV_TX_OFFLOAD_MULTI_SEGS |		 \
 		DEV_TX_OFFLOAD_VLAN_INSERT |		 \
+		DEV_TX_OFFLOAD_IPV4_CKSUM |		 \
 		DEV_TX_OFFLOAD_SCTP_CKSUM |		 \
 		DEV_TX_OFFLOAD_UDP_CKSUM |		 \
 		DEV_TX_OFFLOAD_TCP_TSO |		 \
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.754455845 +0100
+++ 0039-net-ice-disable-IPv4-checksum-offload-in-vector-Tx.patch	2021-02-04 12:04:27.950789652 +0100
@@ -1 +1 @@
-From 30dc028802b440d6ce223078a1992ba77667af34 Mon Sep 17 00:00:00 2001
+From 9d916364a176ffb68969d01a1b2305a141495e35 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 30dc028802b440d6ce223078a1992ba77667af34 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index ae2ac29f2a..c09ac7f667 100644
+index 46e3be98a6..97e26d2968 100644
@@ -25 +26 @@
-@@ -266,6 +266,7 @@ ice_rx_vec_queue_default(struct ice_rx_queue *rxq)
+@@ -244,6 +244,7 @@ ice_rx_vec_queue_default(struct ice_rx_queue *rxq)

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

* [dpdk-stable] patch 'net/ice: enlarge Rx queue rearm threshold to 64' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (37 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice: disable IPv4 checksum offload in vector Tx' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: add null input checks' " Christian Ehrhardt
                   ` (100 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Leyi Rong; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f5d4f7382f9143f92ae32cdd93571fa8d9ea57fd Mon Sep 17 00:00:00 2001
From: Leyi Rong <leyi.rong@intel.com>
Date: Wed, 6 Jan 2021 13:35:48 +0800
Subject: [PATCH] net/ice: enlarge Rx queue rearm threshold to 64

[ upstream commit 295906ffaad9bd8e730248fb24be8fb437df1769 ]

We observe performance drop on ice AVX512 data path after stop and
start by using testpmd.

As CPU polling is faster in AVX512 path, L3 contested accesses is
intensified when rxrearm_start is a random value after testpmd
stop/start.

Enlarge ICE_RXQ_REARM_THRESH to 64 to ease the contested accesses and
fix the performance drop issue.

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h
index 041f00970d..f80fdc1d6b 100644
--- a/drivers/net/ice/ice_rxtx.h
+++ b/drivers/net/ice/ice_rxtx.h
@@ -31,7 +31,7 @@
 
 #define ICE_VPMD_RX_BURST           32
 #define ICE_VPMD_TX_BURST           32
-#define ICE_RXQ_REARM_THRESH        32
+#define ICE_RXQ_REARM_THRESH        64
 #define ICE_MAX_RX_BURST            ICE_RXQ_REARM_THRESH
 #define ICE_TX_MAX_FREE_BUF_SZ      64
 #define ICE_DESCS_PER_LOOP          4
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.794411436 +0100
+++ 0040-net-ice-enlarge-Rx-queue-rearm-threshold-to-64.patch	2021-02-04 12:04:27.950789652 +0100
@@ -1 +1 @@
-From 295906ffaad9bd8e730248fb24be8fb437df1769 Mon Sep 17 00:00:00 2001
+From f5d4f7382f9143f92ae32cdd93571fa8d9ea57fd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 295906ffaad9bd8e730248fb24be8fb437df1769 ]
+
@@ -16,2 +17,0 @@
-Cc: stable@dpdk.org
-
@@ -25 +25 @@
-index 6b16716063..adfae016a9 100644
+index 041f00970d..f80fdc1d6b 100644

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

* [dpdk-stable] patch 'net/i40e: add null input checks' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (38 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice: enlarge Rx queue rearm threshold to 64' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/mvneta: check allocation in Rx queue flush' " Christian Ehrhardt
                   ` (99 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Murphy Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/4277f452e8dd4ad92983be36f2b372bff6c0c57f

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 4277f452e8dd4ad92983be36f2b372bff6c0c57f Mon Sep 17 00:00:00 2001
From: Murphy Yang <murphyx.yang@intel.com>
Date: Fri, 8 Jan 2021 08:30:11 +0000
Subject: [PATCH] net/i40e: add null input checks

[ upstream commit 696ad314ccfcd708534aeaefbd946f872278e023 ]

Pointer 'NULL' check for 'mac_addr' or 'conf' within i40e PMD APIs.

Fixes: 66c78f4799ff ("net/i40e: add support for packet template to flow director")
Fixes: 04b443fb2c43 ("net/i40e: fix port id type")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 759c370d7d..cd2ec58df7 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -2365,6 +2365,9 @@ rte_pmd_i40e_add_vf_mac_addr(uint16_t port, uint16_t vf_id,
 	struct i40e_mac_filter_info mac_filter;
 	int ret;
 
+	if (mac_addr == NULL)
+		return -EINVAL;
+
 	if (i40e_validate_mac_addr((u8 *)mac_addr) != I40E_SUCCESS)
 		return -EINVAL;
 
@@ -3041,6 +3044,9 @@ int rte_pmd_i40e_flow_add_del_packet_template(
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
 
+	if (conf == NULL)
+		return -EINVAL;
+
 	if (!is_i40e_supported(dev))
 		return -ENOTSUP;
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.834280828 +0100
+++ 0041-net-i40e-add-null-input-checks.patch	2021-02-04 12:04:27.954789655 +0100
@@ -1 +1 @@
-From 696ad314ccfcd708534aeaefbd946f872278e023 Mon Sep 17 00:00:00 2001
+From 4277f452e8dd4ad92983be36f2b372bff6c0c57f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 696ad314ccfcd708534aeaefbd946f872278e023 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 790d042002..2e34140c5b 100644
+index 759c370d7d..cd2ec58df7 100644
@@ -22 +23 @@
-@@ -2366,6 +2366,9 @@ rte_pmd_i40e_add_vf_mac_addr(uint16_t port, uint16_t vf_id,
+@@ -2365,6 +2365,9 @@ rte_pmd_i40e_add_vf_mac_addr(uint16_t port, uint16_t vf_id,
@@ -32 +33 @@
-@@ -3042,6 +3045,9 @@ int rte_pmd_i40e_flow_add_del_packet_template(
+@@ -3041,6 +3044,9 @@ int rte_pmd_i40e_flow_add_del_packet_template(

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

* [dpdk-stable] patch 'net/mvneta: check allocation in Rx queue flush' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (39 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: add null input checks' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/octeontx2: fix corruption in segments list' " Christian Ehrhardt
                   ` (98 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Liron Himi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/5a599a8a67c927aa632c55f18b26dd080b0dcd5a

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5a599a8a67c927aa632c55f18b26dd080b0dcd5a Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 7 Dec 2020 19:37:15 +0800
Subject: [PATCH] net/mvneta: check allocation in Rx queue flush

[ upstream commit 565789662e7bc7608681cb93e3ccf7a4a2744f0b ]

The function rte_malloc() could return NULL, the return value
need to be checked.

Fixes: ce7ea764597e ("net/mvneta: support Rx/Tx")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvneta/mvneta_rxtx.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/mvneta/mvneta_rxtx.c b/drivers/net/mvneta/mvneta_rxtx.c
index 10b6f57584..dfa7ecc090 100644
--- a/drivers/net/mvneta/mvneta_rxtx.c
+++ b/drivers/net/mvneta/mvneta_rxtx.c
@@ -872,7 +872,17 @@ mvneta_rx_queue_flush(struct mvneta_rxq *rxq)
 	int ret, i;
 
 	descs = rte_malloc("rxdesc", MRVL_NETA_RXD_MAX * sizeof(*descs), 0);
+	if (descs == NULL) {
+		MVNETA_LOG(ERR, "Failed to allocate descs.");
+		return;
+	}
+
 	bufs = rte_malloc("buffs", MRVL_NETA_RXD_MAX * sizeof(*bufs), 0);
+	if (bufs == NULL) {
+		MVNETA_LOG(ERR, "Failed to allocate bufs.");
+		rte_free(descs);
+		return;
+	}
 
 	do {
 		num = MRVL_NETA_RXD_MAX;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.870323167 +0100
+++ 0042-net-mvneta-check-allocation-in-Rx-queue-flush.patch	2021-02-04 12:04:27.954789655 +0100
@@ -1 +1 @@
-From 565789662e7bc7608681cb93e3ccf7a4a2744f0b Mon Sep 17 00:00:00 2001
+From 5a599a8a67c927aa632c55f18b26dd080b0dcd5a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 565789662e7bc7608681cb93e3ccf7a4a2744f0b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/octeontx2: fix corruption in segments list' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (40 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/mvneta: check allocation in Rx queue flush' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'common/mlx5: fix pointer cast on Windows' " Christian Ehrhardt
                   ` (97 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Sunil Kumar Kori; +Cc: Nithin Dabilpuram, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b4f38485f798b66aa2798182f9723fd23ddf03da Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Mon, 21 Dec 2020 19:33:08 +0530
Subject: [PATCH] net/octeontx2: fix corruption in segments list

[ upstream commit 54b79ac220b16465bf67d2bd65e3098379a5ce25 ]

On Tx, lastseg->next is not being reset to null for multi segmented
packet and same mbuf can be used on Rx which has a stale mbuf entry into
mbuf->next.

On Rx, application receives mbuf with mbuf->next uninitialized though
mbuf->nb_segs is correct. Application iterates over all segments using
mbuf->next ignoring mbuf->nb_segs which leads to undefined behavior.

So earlier assumption of just having right value in mbuf->nb_segs is
enough, is incorrect. Mbuf must contain valid and synced value in
nb_segs and next pointer.

Fixes: 364eb0e46683 ("net/octeontx2: avoid per packet barrier with multi segment")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/octeontx2/otx2_rx.c | 6 ++++++
 drivers/net/octeontx2/otx2_rx.h | 7 +++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_rx.c b/drivers/net/octeontx2/otx2_rx.c
index 48565db030..23d5c30b59 100644
--- a/drivers/net/octeontx2/otx2_rx.c
+++ b/drivers/net/octeontx2/otx2_rx.c
@@ -273,6 +273,12 @@ nix_recv_pkts_vector(void *rx_queue, struct rte_mbuf **rx_pkts,
 		vst1q_u64((uint64_t *)mbuf2->rearm_data, rearm2);
 		vst1q_u64((uint64_t *)mbuf3->rearm_data, rearm3);
 
+		/* Update that no more segments */
+		mbuf0->next = NULL;
+		mbuf1->next = NULL;
+		mbuf2->next = NULL;
+		mbuf3->next = NULL;
+
 		/* Store the mbufs to rx_pkts */
 		vst1q_u64((uint64_t *)&rx_pkts[packets], mbuf01);
 		vst1q_u64((uint64_t *)&rx_pkts[packets + 2], mbuf23);
diff --git a/drivers/net/octeontx2/otx2_rx.h b/drivers/net/octeontx2/otx2_rx.h
index 351ad0fcb4..1863bfde72 100644
--- a/drivers/net/octeontx2/otx2_rx.h
+++ b/drivers/net/octeontx2/otx2_rx.h
@@ -188,6 +188,7 @@ nix_cqe_xtract_mseg(const struct nix_rx_parse_s *rx,
 			iova_list = (const rte_iova_t *)(iova_list + 1);
 		}
 	}
+	mbuf->next = NULL;
 }
 
 static __rte_always_inline void
@@ -235,10 +236,12 @@ otx2_nix_cqe_to_mbuf(const struct nix_cqe_hdr_s *cq, const uint32_t tag,
 	*(uint64_t *)(&mbuf->rearm_data) = val;
 	mbuf->pkt_len = len;
 
-	if (flag & NIX_RX_MULTI_SEG_F)
+	if (flag & NIX_RX_MULTI_SEG_F) {
 		nix_cqe_xtract_mseg(rx, mbuf, val);
-	else
+	} else {
 		mbuf->data_len = len;
+		mbuf->next = NULL;
+	}
 }
 
 #define CKSUM_F NIX_RX_OFFLOAD_CHECKSUM_F
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.908512150 +0100
+++ 0043-net-octeontx2-fix-corruption-in-segments-list.patch	2021-02-04 12:04:27.954789655 +0100
@@ -1 +1 @@
-From 54b79ac220b16465bf67d2bd65e3098379a5ce25 Mon Sep 17 00:00:00 2001
+From b4f38485f798b66aa2798182f9723fd23ddf03da Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 54b79ac220b16465bf67d2bd65e3098379a5ce25 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 2da8efe77c..ffeade5952 100644
+index 48565db030..23d5c30b59 100644
@@ -32 +33 @@
-@@ -279,6 +279,12 @@ nix_recv_pkts_vector(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -273,6 +273,12 @@ nix_recv_pkts_vector(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -46 +47 @@
-index 926f614a4e..0ba3d3d96c 100644
+index 351ad0fcb4..1863bfde72 100644
@@ -49 +50 @@
-@@ -215,6 +215,7 @@ nix_cqe_xtract_mseg(const struct nix_rx_parse_s *rx,
+@@ -188,6 +188,7 @@ nix_cqe_xtract_mseg(const struct nix_rx_parse_s *rx,
@@ -56,2 +57,2 @@
- static __rte_always_inline uint16_t
-@@ -330,10 +331,12 @@ otx2_nix_cqe_to_mbuf(const struct nix_cqe_hdr_s *cq, const uint32_t tag,
+ static __rte_always_inline void
+@@ -235,10 +236,12 @@ otx2_nix_cqe_to_mbuf(const struct nix_cqe_hdr_s *cq, const uint32_t tag,

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

* [dpdk-stable] patch 'common/mlx5: fix pointer cast on Windows' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (41 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/octeontx2: fix corruption in segments list' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'ip_frag: remove padding length of fragment' " Christian Ehrhardt
                   ` (96 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Tal Shnaiderman; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/649eb1d637c374536622cdd0e58132d5d81afb59

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 649eb1d637c374536622cdd0e58132d5d81afb59 Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn@nvidia.com>
Date: Thu, 7 Jan 2021 13:45:45 +0200
Subject: [PATCH] common/mlx5: fix pointer cast on Windows

[ upstream commit 5a90a6e40db6e712fd9dc12dedd14d8feb690ff3 ]

While compiling with clang 11 the callers of the
__mlx5_bit_off macro warns on the cast of pointers to
unsigned long which is a smaller int type in Windows.

warning: cast to smaller integer type 'unsigned long'
from 'u8 (*)[16]' [-Wpointer-to-int-cast]

To resolve it the type is changed to uintptr_t to be
compatible for both Linux and Windows.

Fixes: 865a0c15672c ("net/mlx5: add Direct Verbs prepare function")

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_prm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
index c82a854bd4..1d13bbb009 100644
--- a/drivers/net/mlx5/mlx5_prm.h
+++ b/drivers/net/mlx5/mlx5_prm.h
@@ -515,7 +515,7 @@ typedef uint8_t u8;
 
 #define __mlx5_nullp(typ) ((struct mlx5_ifc_##typ##_bits *)0)
 #define __mlx5_bit_sz(typ, fld) sizeof(__mlx5_nullp(typ)->fld)
-#define __mlx5_bit_off(typ, fld) ((unsigned int)(unsigned long) \
+#define __mlx5_bit_off(typ, fld) ((unsigned int)(uintptr_t) \
 				  (&(__mlx5_nullp(typ)->fld)))
 #define __mlx5_dw_bit_off(typ, fld) (32 - __mlx5_bit_sz(typ, fld) - \
 				    (__mlx5_bit_off(typ, fld) & 0x1f))
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.948677976 +0100
+++ 0044-common-mlx5-fix-pointer-cast-on-Windows.patch	2021-02-04 12:04:27.958789659 +0100
@@ -1 +1 @@
-From 5a90a6e40db6e712fd9dc12dedd14d8feb690ff3 Mon Sep 17 00:00:00 2001
+From 649eb1d637c374536622cdd0e58132d5d81afb59 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5a90a6e40db6e712fd9dc12dedd14d8feb690ff3 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
- drivers/common/mlx5/mlx5_prm.h | 2 +-
+ drivers/net/mlx5/mlx5_prm.h | 2 +-
@@ -25,5 +26,5 @@
-diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
-index 7d5cf961b1..9e2d1d0c81 100644
---- a/drivers/common/mlx5/mlx5_prm.h
-+++ b/drivers/common/mlx5/mlx5_prm.h
-@@ -601,7 +601,7 @@ typedef uint8_t u8;
+diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
+index c82a854bd4..1d13bbb009 100644
+--- a/drivers/net/mlx5/mlx5_prm.h
++++ b/drivers/net/mlx5/mlx5_prm.h
+@@ -515,7 +515,7 @@ typedef uint8_t u8;

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

* [dpdk-stable] patch 'ip_frag: remove padding length of fragment' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (42 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'common/mlx5: fix pointer cast on Windows' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'test/mcslock: remove unneeded per lcore copy' " Christian Ehrhardt
                   ` (95 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Yicai Lu; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b29a3aaae73d8817ed2d3fe369b4d366b704b156 Mon Sep 17 00:00:00 2001
From: Yicai Lu <luyicai@huawei.com>
Date: Wed, 16 Dec 2020 21:36:30 +0800
Subject: [PATCH] ip_frag: remove padding length of fragment

[ upstream commit 324242fb510b65644f025a996404abcd0b8199a6 ]

In some situations, we would get several ip fragments, which total
data length is less than min_ip_len(64) and padding with zeros.
We simulated intermediate fragments by modifying the MTU.
To illustrate the problem, we simplify the packet format and
ignore the impact of the packet header.In namespace2,
a packet whose data length is 1520 is sent.
When the packet passes tap2, the packet is divided into two
fragments: fragment A and B, similar to (1520 = 1510 + 10).
When the packet passes tap3, the larger fragment packet A is
divided into two fragments A1 and A2, similar to (1510 = 1500 + 10).
Finally, the bond interface receives three fragments:
A1, A2, and B (1520 = 1500 + 10 + 10).
One fragmented packet A2 is smaller than the minimum Ethernet
frame length, so it needs to be padded.

|---------------------------------------------------|
|                      HOST                         |
| |--------------|   |----------------------------| |
| |      ns2     |   |      |--------------|      | |
| |  |--------|  |   |  |--------|    |--------|  | |
| |  |  tap1  |  |   |  |  tap2  | ns1|  tap3  |  | |
| |  |mtu=1510|  |   |  |mtu=1510|    |mtu=1500|  | |
| |--|1.1.1.1 |--|   |--|1.1.1.2 |----|2.1.1.1 |--| |
|    |--------|         |--------|    |--------|    |
|         |                 |              |        |
|         |-----------------|              |        |
|                                          |        |
|                                      |--------|   |
|                                      |  bond  |   |
|--------------------------------------|mtu=1500|---|
                                       |--------|

When processing the preceding packets above,
DPDK would aggregate fragmented packets A2 and B.
And error packets are generated, which padding(zero)
is displayed in the middle of the packet.

A2 + B:
0000   fa 16 3e 9f fb 82 fa 47 b2 57 dc 20 08 00 45 00
0010   00 33 b4 66 00 ba 3f 01 c1 a5 01 01 01 01 02 01
0020   01 02 c0 c1 c2 c3 c4 c5 c6 c7 00 00 00 00 00 00
0030   00 00 00 00 00 00 00 00 00 00 00 00 c8 c9 ca cb
0040   cc cd ce cf d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db
0050   dc dd de df e0 e1 e2 e3 e4 e5 e6

So, we would calculate the length of padding, and remove
the padding in pkt_len and data_len before aggregation.
And also we have the fix for both ipv4 and ipv6.

Fixes: 7f0983ee331c ("ip_frag: check fragment length of incoming packet")

Signed-off-by: Yicai Lu <luyicai@huawei.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_ip_frag/rte_ipv4_reassembly.c | 11 ++++++++---
 lib/librte_ip_frag/rte_ipv6_reassembly.c |  9 +++++++--
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/lib/librte_ip_frag/rte_ipv4_reassembly.c b/lib/librte_ip_frag/rte_ipv4_reassembly.c
index 1dda8aca02..69666c8b82 100644
--- a/lib/librte_ip_frag/rte_ipv4_reassembly.c
+++ b/lib/librte_ip_frag/rte_ipv4_reassembly.c
@@ -104,6 +104,7 @@ rte_ipv4_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 	const unaligned_uint64_t *psd;
 	uint16_t flag_offset, ip_ofs, ip_flag;
 	int32_t ip_len;
+	int32_t trim;
 
 	flag_offset = rte_be_to_cpu_16(ip_hdr->fragment_offset);
 	ip_ofs = (uint16_t)(flag_offset & RTE_IPV4_HDR_OFFSET_MASK);
@@ -117,14 +118,15 @@ rte_ipv4_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 
 	ip_ofs *= RTE_IPV4_HDR_OFFSET_UNITS;
 	ip_len = rte_be_to_cpu_16(ip_hdr->total_length) - mb->l3_len;
+	trim = mb->pkt_len - (ip_len + mb->l3_len + mb->l2_len);
 
 	IP_FRAG_LOG(DEBUG, "%s:%d:\n"
-		"mbuf: %p, tms: %" PRIu64
-		", key: <%" PRIx64 ", %#x>, ofs: %u, len: %d, flags: %#x\n"
+		"mbuf: %p, tms: %" PRIu64 ", key: <%" PRIx64 ", %#x>"
+		"ofs: %u, len: %d, padding: %d, flags: %#x\n"
 		"tbl: %p, max_cycles: %" PRIu64 ", entry_mask: %#x, "
 		"max_entries: %u, use_entries: %u\n\n",
 		__func__, __LINE__,
-		mb, tms, key.src_dst[0], key.id, ip_ofs, ip_len, ip_flag,
+		mb, tms, key.src_dst[0], key.id, ip_ofs, ip_len, trim, ip_flag,
 		tbl, tbl->max_cycles, tbl->entry_mask, tbl->max_entries,
 		tbl->use_entries);
 
@@ -134,6 +136,9 @@ rte_ipv4_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 		return NULL;
 	}
 
+	if (unlikely(trim > 0))
+		rte_pktmbuf_trim(mb, trim);
+
 	/* try to find/add entry into the fragment's table. */
 	if ((fp = ip_frag_find(tbl, dr, &key, tms)) == NULL) {
 		IP_FRAG_MBUF2DR(dr, mb);
diff --git a/lib/librte_ip_frag/rte_ipv6_reassembly.c b/lib/librte_ip_frag/rte_ipv6_reassembly.c
index ad01055184..6bc0bf792a 100644
--- a/lib/librte_ip_frag/rte_ipv6_reassembly.c
+++ b/lib/librte_ip_frag/rte_ipv6_reassembly.c
@@ -142,6 +142,7 @@ rte_ipv6_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 	struct ip_frag_key key;
 	uint16_t ip_ofs;
 	int32_t ip_len;
+	int32_t trim;
 
 	rte_memcpy(&key.src_dst[0], ip_hdr->src_addr, 16);
 	rte_memcpy(&key.src_dst[2], ip_hdr->dst_addr, 16);
@@ -158,16 +159,17 @@ rte_ipv6_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 	 * this is what we remove from the payload len.
 	 */
 	ip_len = rte_be_to_cpu_16(ip_hdr->payload_len) - sizeof(*frag_hdr);
+	trim = mb->pkt_len - (ip_len + mb->l3_len + mb->l2_len);
 
 	IP_FRAG_LOG(DEBUG, "%s:%d:\n"
 		"mbuf: %p, tms: %" PRIu64
 		", key: <" IPv6_KEY_BYTES_FMT ", %#x>, "
-		"ofs: %u, len: %d, flags: %#x\n"
+		"ofs: %u, len: %d, padding: %d, flags: %#x\n"
 		"tbl: %p, max_cycles: %" PRIu64 ", entry_mask: %#x, "
 		"max_entries: %u, use_entries: %u\n\n",
 		__func__, __LINE__,
 		mb, tms, IPv6_KEY_BYTES(key.src_dst), key.id, ip_ofs, ip_len,
-		RTE_IPV6_GET_MF(frag_hdr->frag_data),
+		trim, RTE_IPV6_GET_MF(frag_hdr->frag_data),
 		tbl, tbl->max_cycles, tbl->entry_mask, tbl->max_entries,
 		tbl->use_entries);
 
@@ -177,6 +179,9 @@ rte_ipv6_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 		return NULL;
 	}
 
+	if (unlikely(trim > 0))
+		rte_pktmbuf_trim(mb, trim);
+
 	/* try to find/add entry into the fragment's table. */
 	fp = ip_frag_find(tbl, dr, &key, tms);
 	if (fp == NULL) {
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:29.982596555 +0100
+++ 0045-ip_frag-remove-padding-length-of-fragment.patch	2021-02-04 12:04:27.958789659 +0100
@@ -1 +1 @@
-From 324242fb510b65644f025a996404abcd0b8199a6 Mon Sep 17 00:00:00 2001
+From b29a3aaae73d8817ed2d3fe369b4d366b704b156 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 324242fb510b65644f025a996404abcd0b8199a6 ]
+
@@ -56 +57,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/mcslock: remove unneeded per lcore copy' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (43 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'ip_frag: remove padding length of fragment' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'test: fix buffer overflow in Tx burst' " Christian Ehrhardt
                   ` (94 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/60e01fe034770aba98b182d6a9ff7ae8500e1983

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 60e01fe034770aba98b182d6a9ff7ae8500e1983 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 4 Nov 2020 18:04:25 +0100
Subject: [PATCH] test/mcslock: remove unneeded per lcore copy

[ upstream commit 5b3ada04f7d57b6770d41ccff4a2485e5616bc52 ]

Each core already comes with its local storage for mcslock (in its
stack), therefore there is no need to define an additional per-lcore
mcslock.

Fixes: 32dcb9fd2a22 ("test/mcslock: add MCS queued lock unit test")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 app/test/test_mcslock.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/app/test/test_mcslock.c b/app/test/test_mcslock.c
index e9359df2ee..b70dd4775b 100644
--- a/app/test/test_mcslock.c
+++ b/app/test/test_mcslock.c
@@ -37,10 +37,6 @@
  *   lock multiple times.
  */
 
-RTE_DEFINE_PER_LCORE(rte_mcslock_t, _ml_me);
-RTE_DEFINE_PER_LCORE(rte_mcslock_t, _ml_try_me);
-RTE_DEFINE_PER_LCORE(rte_mcslock_t, _ml_perf_me);
-
 rte_mcslock_t *p_ml;
 rte_mcslock_t *p_ml_try;
 rte_mcslock_t *p_ml_perf;
@@ -53,7 +49,7 @@ static int
 test_mcslock_per_core(__attribute__((unused)) void *arg)
 {
 	/* Per core me node. */
-	rte_mcslock_t ml_me = RTE_PER_LCORE(_ml_me);
+	rte_mcslock_t ml_me;
 
 	rte_mcslock_lock(&p_ml, &ml_me);
 	printf("MCS lock taken on core %u\n", rte_lcore_id());
@@ -77,7 +73,7 @@ load_loop_fn(void *func_param)
 	const unsigned int lcore = rte_lcore_id();
 
 	/**< Per core me node. */
-	rte_mcslock_t ml_perf_me = RTE_PER_LCORE(_ml_perf_me);
+	rte_mcslock_t ml_perf_me;
 
 	/* wait synchro */
 	while (rte_atomic32_read(&synchro) == 0)
@@ -151,8 +147,8 @@ static int
 test_mcslock_try(__attribute__((unused)) void *arg)
 {
 	/**< Per core me node. */
-	rte_mcslock_t ml_me     = RTE_PER_LCORE(_ml_me);
-	rte_mcslock_t ml_try_me = RTE_PER_LCORE(_ml_try_me);
+	rte_mcslock_t ml_me;
+	rte_mcslock_t ml_try_me;
 
 	/* Locked ml_try in the master lcore, so it should fail
 	 * when trying to lock it in the slave lcore.
@@ -178,8 +174,8 @@ test_mcslock(void)
 	int i;
 
 	/* Define per core me node. */
-	rte_mcslock_t ml_me     = RTE_PER_LCORE(_ml_me);
-	rte_mcslock_t ml_try_me = RTE_PER_LCORE(_ml_try_me);
+	rte_mcslock_t ml_me;
+	rte_mcslock_t ml_try_me;
 
 	/*
 	 * Test mcs lock & unlock on each core
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.018421561 +0100
+++ 0046-test-mcslock-remove-unneeded-per-lcore-copy.patch	2021-02-04 12:04:27.958789659 +0100
@@ -1 +1 @@
-From 5b3ada04f7d57b6770d41ccff4a2485e5616bc52 Mon Sep 17 00:00:00 2001
+From 60e01fe034770aba98b182d6a9ff7ae8500e1983 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5b3ada04f7d57b6770d41ccff4a2485e5616bc52 ]
+
@@ -19 +21 @@
-index fbca78707d..80eaecc90a 100644
+index e9359df2ee..b70dd4775b 100644
@@ -34 +36 @@
- test_mcslock_per_core(__rte_unused void *arg)
+ test_mcslock_per_core(__attribute__((unused)) void *arg)
@@ -52 +54 @@
- test_mcslock_try(__rte_unused void *arg)
+ test_mcslock_try(__attribute__((unused)) void *arg)
@@ -60,2 +62,2 @@
- 	/* Locked ml_try in the main lcore, so it should fail
- 	 * when trying to lock it in the worker lcore.
+ 	/* Locked ml_try in the master lcore, so it should fail
+ 	 * when trying to lock it in the slave lcore.

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

* [dpdk-stable] patch 'test: fix buffer overflow in Tx burst' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (44 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'test/mcslock: remove unneeded per lcore copy' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'fbarray: fix overlap check' " Christian Ehrhardt
                   ` (93 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Jeff Guo, Wei Ling, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/71aed37555a9b85e7f5f9a86b8c1746b61fcd9e0

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 71aed37555a9b85e7f5f9a86b8c1746b61fcd9e0 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Wed, 25 Nov 2020 17:46:22 +0800
Subject: [PATCH] test: fix buffer overflow in Tx burst

[ upstream commit 58325f094a059e8ef4e1085d322a46107aad468f ]

The Tx buffer may overflow when there is more than one port.

Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
---
 app/test/test_pmd_perf.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 352cd47156..de7e726429 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -609,10 +609,10 @@ timeout:
 static int
 exec_burst(uint32_t flags, int lcore)
 {
-	unsigned i, portid, nb_tx = 0;
+	unsigned int portid, nb_tx = 0;
 	struct lcore_conf *conf;
 	uint32_t pkt_per_port;
-	int num, idx = 0;
+	int num, i, idx = 0;
 	int diff_tsc;
 
 	conf = &lcore_conf[lcore];
@@ -631,16 +631,14 @@ exec_burst(uint32_t flags, int lcore)
 		rte_atomic64_set(&start, 1);
 
 	/* start xmit */
+	i = 0;
 	while (num) {
 		nb_tx = RTE_MIN(MAX_PKT_BURST, num);
-		for (i = 0; i < conf->nb_ports; i++) {
-			portid = conf->portlist[i];
-			nb_tx = rte_eth_tx_burst(portid, 0,
-					 &tx_burst[idx], nb_tx);
-			idx += nb_tx;
-			num -= nb_tx;
-		}
-
+		portid = conf->portlist[i];
+		nb_tx = rte_eth_tx_burst(portid, 0, &tx_burst[idx], nb_tx);
+		idx += nb_tx;
+		num -= nb_tx;
+		i = (i >= conf->nb_ports - 1) ? 0 : (i + 1);
 	}
 
 	sleep(5);
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.053757329 +0100
+++ 0047-test-fix-buffer-overflow-in-Tx-burst.patch	2021-02-04 12:04:27.958789659 +0100
@@ -1 +1 @@
-From 58325f094a059e8ef4e1085d322a46107aad468f Mon Sep 17 00:00:00 2001
+From 71aed37555a9b85e7f5f9a86b8c1746b61fcd9e0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 58325f094a059e8ef4e1085d322a46107aad468f ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 4db816a360..3a248d512c 100644
+index 352cd47156..de7e726429 100644
@@ -22 +23 @@
-@@ -606,10 +606,10 @@ timeout:
+@@ -609,10 +609,10 @@ timeout:
@@ -35 +36 @@
-@@ -628,16 +628,14 @@ exec_burst(uint32_t flags, int lcore)
+@@ -631,16 +631,14 @@ exec_burst(uint32_t flags, int lcore)

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

* [dpdk-stable] patch 'fbarray: fix overlap check' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (45 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'test: fix buffer overflow in Tx burst' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'examples/l3fwd: remove limitation on Tx queue count' " Christian Ehrhardt
                   ` (92 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Zhihong Peng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f5e732ef31ff37e43c69ff515875a0e628bd499f Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 14 Jan 2021 15:02:45 +0000
Subject: [PATCH] fbarray: fix overlap check

[ upstream commit 27ff8384deaca2f7727d0cedf2053aa13fbae1e2 ]

When we're attaching fbarrays in secondary processes, we check for
whether the intended memory address for the fbarray is already in use by
some other, local fbarray. However, the check for end-overlap (i.e. to
see if our memory area's end overlaps with some other fbarray) is
incorrectly counting end offset as part of the overlap. Fix the check.

Fixes: 5b61c62cfd76 ("fbarray: add internal tailq for mapped areas")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Zhihong Peng <zhihongx.peng@intel.com>
---
 lib/librte_eal/common/eal_common_fbarray.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c
index 4f8f1af73c..de7e772042 100644
--- a/lib/librte_eal/common/eal_common_fbarray.c
+++ b/lib/librte_eal/common/eal_common_fbarray.c
@@ -114,7 +114,7 @@ overlap(const struct mem_area *ma, const void *start, size_t len)
 	if (start >= ma_start && start < ma_end)
 		return 1;
 	/* end overlap? */
-	if (end >= ma_start && end < ma_end)
+	if (end > ma_start && end < ma_end)
 		return 1;
 	return 0;
 }
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.087337094 +0100
+++ 0048-fbarray-fix-overlap-check.patch	2021-02-04 12:04:27.962789662 +0100
@@ -1 +1 @@
-From 27ff8384deaca2f7727d0cedf2053aa13fbae1e2 Mon Sep 17 00:00:00 2001
+From f5e732ef31ff37e43c69ff515875a0e628bd499f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 27ff8384deaca2f7727d0cedf2053aa13fbae1e2 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 1220e2bae9..d974f3dab7 100644
+index 4f8f1af73c..de7e772042 100644
@@ -25 +26 @@
-@@ -110,7 +110,7 @@ overlap(const struct mem_area *ma, const void *start, size_t len)
+@@ -114,7 +114,7 @@ overlap(const struct mem_area *ma, const void *start, size_t len)

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

* [dpdk-stable] patch 'examples/l3fwd: remove limitation on Tx queue count' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (46 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'fbarray: fix overlap check' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'app/crypto-perf: fix spelling in output' " Christian Ehrhardt
                   ` (91 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Harman Kalra; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ccb444331b75fa32df6e4720f178c4c2241539f7 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Tue, 12 Jan 2021 23:54:46 +0530
Subject: [PATCH] examples/l3fwd: remove limitation on Tx queue count

[ upstream commit 88256ed85338c572d73006e4c4530a52d3b477ff ]

In l3fwd no of transmit queues is calculated based on no of
lcores with which it is launched. Hence maximum no of tx
queues possible per port should depend on RTE_MAX_LCORE value.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 examples/l3fwd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 3a8ec5a7f2..b98040df45 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -53,7 +53,7 @@
 #define RTE_TEST_RX_DESC_DEFAULT 1024
 #define RTE_TEST_TX_DESC_DEFAULT 1024
 
-#define MAX_TX_QUEUE_PER_PORT RTE_MAX_ETHPORTS
+#define MAX_TX_QUEUE_PER_PORT RTE_MAX_LCORE
 #define MAX_RX_QUEUE_PER_PORT 128
 
 #define MAX_LCORE_PARAMS 1024
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.124102119 +0100
+++ 0049-examples-l3fwd-remove-limitation-on-Tx-queue-count.patch	2021-02-04 12:04:27.962789662 +0100
@@ -1 +1 @@
-From 88256ed85338c572d73006e4c4530a52d3b477ff Mon Sep 17 00:00:00 2001
+From ccb444331b75fa32df6e4720f178c4c2241539f7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 88256ed85338c572d73006e4c4530a52d3b477ff ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d62dec434c..bb49e5faff 100644
+index 3a8ec5a7f2..b98040df45 100644
@@ -23,3 +24,3 @@
-@@ -48,7 +48,7 @@
- #include "l3fwd.h"
- #include "l3fwd_event.h"
+@@ -53,7 +53,7 @@
+ #define RTE_TEST_RX_DESC_DEFAULT 1024
+ #define RTE_TEST_TX_DESC_DEFAULT 1024

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

* [dpdk-stable] patch 'app/crypto-perf: fix spelling in output' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (47 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'examples/l3fwd: remove limitation on Tx queue count' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix X722 for 802.1ad frames ability' " Christian Ehrhardt
                   ` (90 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Ciara Power; +Cc: Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From e49b55961953d95e09562c77de97e671920f3123 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Mon, 18 Jan 2021 11:34:10 +0000
Subject: [PATCH] app/crypto-perf: fix spelling in output

[ upstream commit 7d3046ed73fdcf705d7c571f1b8e7ca9e9b53e33 ]

Fixes some spelling errors in app logs and help text.

Fixes: 7da018731c56 ("app/crypto-perf: add help option")
Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
 app/test-crypto-perf/cperf_options_parsing.c | 2 +-
 app/test-crypto-perf/main.c                  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index f43c5bede7..49b469781c 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -23,7 +23,7 @@ usage(char *progname)
 {
 	printf("%s [EAL options] --\n"
 		" --silent: disable options dump\n"
-		" --ptest throughput / latency / verify / pmd-cycleount :"
+		" --ptest throughput / latency / verify / pmd-cyclecount :"
 		" set test type\n"
 		" --pool_sz N: set the number of crypto ops/mbufs allocated\n"
 		" --total-ops N: set the number of total operations performed\n"
diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index b065ab2acb..048b10c652 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -520,14 +520,14 @@ main(int argc, char **argv)
 
 	ret = cperf_options_parse(&opts, argc, argv);
 	if (ret) {
-		RTE_LOG(ERR, USER1, "Parsing on or more user options failed\n");
+		RTE_LOG(ERR, USER1, "Parsing one or more user options failed\n");
 		goto err;
 	}
 
 	ret = cperf_options_check(&opts);
 	if (ret) {
 		RTE_LOG(ERR, USER1,
-				"Checking on or more user options failed\n");
+				"Checking one or more user options failed\n");
 		goto err;
 	}
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.166827519 +0100
+++ 0050-app-crypto-perf-fix-spelling-in-output.patch	2021-02-04 12:04:27.962789662 +0100
@@ -1 +1 @@
-From 7d3046ed73fdcf705d7c571f1b8e7ca9e9b53e33 Mon Sep 17 00:00:00 2001
+From e49b55961953d95e09562c77de97e671920f3123 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7d3046ed73fdcf705d7c571f1b8e7ca9e9b53e33 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 03ed6f5942..0466f7baf8 100644
+index f43c5bede7..49b469781c 100644
@@ -23 +24 @@
-@@ -24,7 +24,7 @@ usage(char *progname)
+@@ -23,7 +23,7 @@ usage(char *progname)
@@ -33 +34 @@
-index 99f86e9019..49af812d8b 100644
+index b065ab2acb..048b10c652 100644
@@ -36 +37 @@
-@@ -530,14 +530,14 @@ main(int argc, char **argv)
+@@ -520,14 +520,14 @@ main(int argc, char **argv)

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

* [dpdk-stable] patch 'net/i40e: fix X722 for 802.1ad frames ability' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (48 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'app/crypto-perf: fix spelling in output' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: fix interception with flow director' " Christian Ehrhardt
                   ` (89 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Weifeng Li; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/89eedd29d0a1ddfc595ef328d1bf89517266c632

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 89eedd29d0a1ddfc595ef328d1bf89517266c632 Mon Sep 17 00:00:00 2001
From: Weifeng Li <liweifeng96@126.com>
Date: Sun, 10 Jan 2021 16:34:17 +0800
Subject: [PATCH] net/i40e: fix X722 for 802.1ad frames ability

[ upstream commit 591bd5e4ae8c0256614417ee5f2645edf6d0f61c ]

I40E_DEV_ID_SFP_I_X722 does not support 802.1ad frames ability,
so I40E_HW_FLAG_802_1AD_CAPABLE should not be set.
The patch also correct the comment for I40E_HW_FLAG_802_1AD_CAPABLE
configure.

Fixes: 9efa8d28b4da ("net/i40e: fix SFP X722 with FW4.16")

Signed-off-by: Weifeng Li <liweifeng96@126.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f58749f84b..c94dd0e1b5 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1459,8 +1459,9 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 		PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
 		return -EIO;
 	}
-	/* Firmware of SFP x722 does not support adminq option */
-	if (hw->device_id == I40E_DEV_ID_SFP_X722)
+	/* Firmware of SFP x722 does not support 802.1ad frames ability */
+	if (hw->device_id == I40E_DEV_ID_SFP_X722 ||
+		hw->device_id == I40E_DEV_ID_SFP_I_X722)
 		hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
 
 	PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x",
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.213133173 +0100
+++ 0051-net-i40e-fix-X722-for-802.1ad-frames-ability.patch	2021-02-04 12:04:27.974789674 +0100
@@ -1 +1 @@
-From 591bd5e4ae8c0256614417ee5f2645edf6d0f61c Mon Sep 17 00:00:00 2001
+From 89eedd29d0a1ddfc595ef328d1bf89517266c632 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 591bd5e4ae8c0256614417ee5f2645edf6d0f61c ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ba1abc584f..acf7a0f010 100644
+index f58749f84b..c94dd0e1b5 100644
@@ -24 +25 @@
-@@ -1550,8 +1550,9 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
+@@ -1459,8 +1459,9 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)

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

* [dpdk-stable] patch 'net/hns3: fix interception with flow director' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (49 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix X722 for 802.1ad frames ability' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: fix error code in xstats' " Christian Ehrhardt
                   ` (88 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Lijun Ou; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/7313ffa29eed90936c7a4d7c114cd4be3f5211c5

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 7313ffa29eed90936c7a4d7c114cd4be3f5211c5 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Wed, 6 Jan 2021 11:46:27 +0800
Subject: [PATCH] net/hns3: fix interception with flow director

[ upstream commit 35ec45adf7a49d8ac2091e9f06dcf74d92083510 ]

The rte_fdir_conf structure has deprecated and users need
to use the specified rule parameters of rte_flow structure
when configure a flow rule. As a result, it is incorrectly
used in the rte_flow API.

Fixes: fcba820d9b9e ("net/hns3: support flow director")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index bd2d4ab3bc..2eaddf7076 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1121,11 +1121,6 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,
 					  RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 					  "Fdir not supported in VF");
 
-	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT)
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
-					  "fdir_conf.mode isn't perfect");
-
 	step_mngr.items = first_items;
 	step_mngr.count = ARRAY_SIZE(first_items);
 	for (item = pattern; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.252372747 +0100
+++ 0052-net-hns3-fix-interception-with-flow-director.patch	2021-02-04 12:04:27.978789678 +0100
@@ -1 +1 @@
-From 35ec45adf7a49d8ac2091e9f06dcf74d92083510 Mon Sep 17 00:00:00 2001
+From 7313ffa29eed90936c7a4d7c114cd4be3f5211c5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 35ec45adf7a49d8ac2091e9f06dcf74d92083510 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index ee6ec15498..f303df4ad8 100644
+index bd2d4ab3bc..2eaddf7076 100644
@@ -23 +24 @@
-@@ -1208,11 +1208,6 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,
+@@ -1121,11 +1121,6 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/hns3: fix error code in xstats' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (50 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: fix interception with flow director' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/qede: fix promiscuous enable' " Christian Ehrhardt
                   ` (87 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Huisong Li; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 4c52a6f070b7db5ac403b5f546b2ee4345b8dc8c Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 6 Jan 2021 11:46:29 +0800
Subject: [PATCH] net/hns3: fix error code in xstats

[ upstream commit dcb33fd7602408dbb7c3bc78537667b3ee33e05c ]

The ethdev API has processed the failure to obtain
xstats statistics. Therefore, driver should return
an error code instead of 0 in 'hns3_dev_xstats_get'
API.

Fixes: 8839c5e202f3 ("net/hns3: support device stats")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_stats.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 10cc7570c2..37f8c75f44 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -596,9 +596,9 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	if (!hns->is_vf) {
 		/* Update Mac stats */
 		ret = hns3_query_update_mac_stats(dev);
-		if (ret) {
+		if (ret < 0) {
 			hns3_err(hw, "Update Mac stats fail : %d", ret);
-			return 0;
+			return ret;
 		}
 
 		/* Get MAC stats from hw->hw_xstats.mac_stats struct */
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.287589189 +0100
+++ 0053-net-hns3-fix-error-code-in-xstats.patch	2021-02-04 12:04:27.978789678 +0100
@@ -1 +1 @@
-From dcb33fd7602408dbb7c3bc78537667b3ee33e05c Mon Sep 17 00:00:00 2001
+From 4c52a6f070b7db5ac403b5f546b2ee4345b8dc8c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dcb33fd7602408dbb7c3bc78537667b3ee33e05c ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 1597af3545..42ec9b870f 100644
+index 10cc7570c2..37f8c75f44 100644
@@ -24 +25 @@
-@@ -739,9 +739,9 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+@@ -596,9 +596,9 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,

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

* [dpdk-stable] patch 'net/qede: fix promiscuous enable' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (51 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: fix error code in xstats' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'ethdev: fix max Rx packet length check' " Christian Ehrhardt
                   ` (86 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Balazs Nemeth; +Cc: Rasesh Mody, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From d900b4d90f84b7b5e26a2b40797a33b7059b3fe0 Mon Sep 17 00:00:00 2001
From: Balazs Nemeth <bnemeth@redhat.com>
Date: Wed, 23 Dec 2020 15:15:49 +0100
Subject: [PATCH] net/qede: fix promiscuous enable

[ upstream commit a91fb48a8c248293f1035cdd8b36ad712ae9478f ]

When calling rte_eth_promiscuous_enable(port_id) followed by
rte_eth_allmulticast_enable(port_id), the port is not in promisc mode
anymore. This patch ensures that promisc mode takes precedence over
allmulticast mode fixing the regression introduced by b10231aed1ed.

Fixes: b10231aed1ed ("net/qede: fix multicast drop in promiscuous mode")

Signed-off-by: Balazs Nemeth <bnemeth@redhat.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/qede/qede_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 102451bbd3..2932f155af 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1796,6 +1796,8 @@ static int qede_allmulticast_enable(struct rte_eth_dev *eth_dev)
 	    QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC;
 	enum _ecore_status_t ecore_status;
 
+	if (rte_eth_promiscuous_get(eth_dev->data->port_id) == 1)
+		type = QED_FILTER_RX_MODE_TYPE_PROMISC;
 	ecore_status = qed_configure_filter_rx_mode(eth_dev, type);
 
 	return ecore_status >= ECORE_SUCCESS ? 0 : -EAGAIN;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.332457243 +0100
+++ 0054-net-qede-fix-promiscuous-enable.patch	2021-02-04 12:04:27.978789678 +0100
@@ -1 +1 @@
-From a91fb48a8c248293f1035cdd8b36ad712ae9478f Mon Sep 17 00:00:00 2001
+From d900b4d90f84b7b5e26a2b40797a33b7059b3fe0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a91fb48a8c248293f1035cdd8b36ad712ae9478f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 549013557c..3bec62d828 100644
+index 102451bbd3..2932f155af 100644
@@ -24 +25 @@
-@@ -1885,6 +1885,8 @@ static int qede_allmulticast_enable(struct rte_eth_dev *eth_dev)
+@@ -1796,6 +1796,8 @@ static int qede_allmulticast_enable(struct rte_eth_dev *eth_dev)

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

* [dpdk-stable] patch 'ethdev: fix max Rx packet length check' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (52 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/qede: fix promiscuous enable' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'app/testpmd: fix max Rx packet length for VLAN packets' " Christian Ehrhardt
                   ` (85 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/91f2ad5e8fbfdc65cbbb5fe21e02e71e7f107730

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 91f2ad5e8fbfdc65cbbb5fe21e02e71e7f107730 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:07 +0000
Subject: [PATCH] ethdev: fix max Rx packet length check

[ upstream commit bf0f90d92d3010431c9187ed9a2b412030cded4e ]

Ethdev is using default Ethernet overhead to decide if provided
'max_rx_pkt_len' value is bigger than max (non jumbo) MTU value,
and limits it to MAX if it is.

Since the application/driver used Ethernet overhead is different than
the ethdev one, check result is wrong.

If the driver is using Ethernet overhead bigger than the default one,
the provided 'max_rx_pkt_len' is trimmed down, and in the driver when
correct Ethernet overhead is used to convert back, the resulting MTU is
less than the intended one, causing some packets to be dropped.

Like,
app     -> max_rx_pkt_len = 1500/*mtu*/ + 22/*overhead*/ = 1522
ethdev  -> 1522 > 1518/*MAX*/; max_rx_pkt_len = 1518
driver  -> MTU = 1518 - 22 = 1496
Packets with size 1497-1500 are dropped although intention is to be able
to send/receive them.

The fix is to make ethdev use the correct Ethernet overhead for port,
instead of default one.

Fixes: 59d0ecdbf0e1 ("ethdev: MTU accessors")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ethdev/rte_ethdev.c | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index e7d786c5b4..fb0912a4a8 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1224,8 +1224,10 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_conf orig_conf;
+	uint16_t overhead_len;
 	int diag;
 	int ret;
+	uint16_t old_mtu;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
 
@@ -1251,10 +1253,20 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 		memcpy(&dev->data->dev_conf, dev_conf,
 		       sizeof(dev->data->dev_conf));
 
+	/* Backup mtu for rollback */
+	old_mtu = dev->data->mtu;
+
 	ret = rte_eth_dev_info_get(port_id, &dev_info);
 	if (ret != 0)
 		goto rollback;
 
+	/* Get the real Ethernet overhead length */
+	if (dev_info.max_mtu != UINT16_MAX &&
+	    dev_info.max_rx_pktlen > dev_info.max_mtu)
+		overhead_len = dev_info.max_rx_pktlen - dev_info.max_mtu;
+	else
+		overhead_len = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
+
 	/* If number of queues specified by application for both Rx and Tx is
 	 * zero, use driver preferred values. This cannot be done individually
 	 * as it is valid for either Tx or Rx (but not both) to be zero.
@@ -1341,12 +1353,17 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 			ret = -EINVAL;
 			goto rollback;
 		}
+
+		/* Scale the MTU size to adapt max_rx_pkt_len */
+		dev->data->mtu = dev->data->dev_conf.rxmode.max_rx_pkt_len -
+				overhead_len;
 	} else {
-		if (dev_conf->rxmode.max_rx_pkt_len < RTE_ETHER_MIN_LEN ||
-			dev_conf->rxmode.max_rx_pkt_len > RTE_ETHER_MAX_LEN)
+		uint16_t pktlen = dev_conf->rxmode.max_rx_pkt_len;
+		if (pktlen < RTE_ETHER_MIN_MTU + overhead_len ||
+		    pktlen > RTE_ETHER_MTU + overhead_len)
 			/* Use default value */
 			dev->data->dev_conf.rxmode.max_rx_pkt_len =
-							RTE_ETHER_MAX_LEN;
+						RTE_ETHER_MTU + overhead_len;
 	}
 
 	/*
@@ -1480,6 +1497,8 @@ reset_queues:
 	rte_eth_dev_tx_queue_config(dev, 0);
 rollback:
 	memcpy(&dev->data->dev_conf, &orig_conf, sizeof(dev->data->dev_conf));
+	if (old_mtu != dev->data->mtu)
+		dev->data->mtu = old_mtu;
 
 	return ret;
 }
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.369281209 +0100
+++ 0055-ethdev-fix-max-Rx-packet-length-check.patch	2021-02-04 12:04:27.986789686 +0100
@@ -1 +1 @@
-From bf0f90d92d3010431c9187ed9a2b412030cded4e Mon Sep 17 00:00:00 2001
+From 91f2ad5e8fbfdc65cbbb5fe21e02e71e7f107730 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bf0f90d92d3010431c9187ed9a2b412030cded4e ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index e19dbd838b..9fe1c9d769 100644
+index e7d786c5b4..fb0912a4a8 100644
@@ -41 +42 @@
-@@ -1292,8 +1292,10 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
+@@ -1224,8 +1224,10 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
@@ -50 +51 @@
- 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+ 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
@@ -52 +53 @@
-@@ -1319,10 +1321,20 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
+@@ -1251,10 +1253,20 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
@@ -73 +74 @@
-@@ -1409,12 +1421,17 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
+@@ -1341,12 +1353,17 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
@@ -94,2 +95,2 @@
-@@ -1549,6 +1566,8 @@ reset_queues:
- 	eth_dev_tx_queue_config(dev, 0);
+@@ -1480,6 +1497,8 @@ reset_queues:
+ 	rte_eth_dev_tx_queue_config(dev, 0);
@@ -101 +101,0 @@
- 	rte_ethdev_trace_configure(port_id, nb_rx_q, nb_tx_q, dev_conf, ret);
@@ -102,0 +103 @@
+ }

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

* [dpdk-stable] patch 'app/testpmd: fix max Rx packet length for VLAN packets' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (53 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'ethdev: fix max Rx packet length check' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/dpaa: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
                   ` (84 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a709e6b1df9bd90d7fe7a6f75f1448730b268848 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:08 +0000
Subject: [PATCH] app/testpmd: fix max Rx packet length for VLAN packets

[ upstream commit 761c4d66900fd7db6927f57eb610f543cc0908e4 ]

When the max rx packet length is smaller than the sum of mtu size and
ether overhead size, it should be enlarged, otherwise the VLAN packets
will be dropped.

Removed the rx_offloads assignment for jumbo frame during command line
parsing, and set the correct jumbo frame flag if MTU size is larger than
the default value 'RTE_ETHER_MTU' within 'init_config()'.

Fixes: 384161e00627 ("app/testpmd: adjust on the fly VLAN configuration")
Fixes: 35b2d13fd6fd ("net: add rte prefix to ether defines")
Fixes: ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
Fixes: 150c9ac2df13 ("app/testpmd: update Rx offload after setting MTU")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline.c    |  6 ------
 app/test-pmd/config.c     |  2 +-
 app/test-pmd/parameters.c |  7 ++-----
 app/test-pmd/testpmd.c    | 18 ++++++++++++++++++
 4 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 9287fa3ea4..7e1ced7c59 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1983,7 +1983,6 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
 
 	RTE_ETH_FOREACH_DEV(pid) {
 		struct rte_port *port = &ports[pid];
-		uint64_t rx_offloads = port->dev_conf.rxmode.offloads;
 
 		if (!strcmp(res->name, "max-pkt-len")) {
 			if (res->value < RTE_ETHER_MIN_LEN) {
@@ -1995,11 +1994,6 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
 				return;
 
 			port->dev_conf.rxmode.max_rx_pkt_len = res->value;
-			if (res->value > RTE_ETHER_MAX_LEN)
-				rx_offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
-			else
-				rx_offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
-			port->dev_conf.rxmode.offloads = rx_offloads;
 		} else {
 			printf("Unknown parameter\n");
 			return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 5f8905c06a..e14ff42745 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1287,7 +1287,7 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
 		 * device supports jumbo frame.
 		 */
 		eth_overhead = dev_info.max_rx_pktlen - dev_info.max_mtu;
-		if (mtu > RTE_ETHER_MAX_LEN - eth_overhead) {
+		if (mtu > RTE_ETHER_MTU) {
 			rte_port->dev_conf.rxmode.offloads |=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
 			rte_port->dev_conf.rxmode.max_rx_pkt_len =
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 0eb7844783..a1c08a411a 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -884,12 +884,9 @@ launch_args_parse(int argc, char** argv)
 			}
 			if (!strcmp(lgopts[opt_idx].name, "max-pkt-len")) {
 				n = atoi(optarg);
-				if (n >= RTE_ETHER_MIN_LEN) {
+				if (n >= RTE_ETHER_MIN_LEN)
 					rx_mode.max_rx_pkt_len = (uint32_t) n;
-					if (n > RTE_ETHER_MAX_LEN)
-						rx_offloads |=
-							DEV_RX_OFFLOAD_JUMBO_FRAME;
-				} else
+				else
 					rte_exit(EXIT_FAILURE,
 						 "Invalid max-pkt-len=%d - should be > %d\n",
 						 n, RTE_ETHER_MIN_LEN);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 8d3b7b2a3b..f93e459ccf 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1301,6 +1301,7 @@ init_config(void)
 	struct rte_gro_param gro_param;
 	uint32_t gso_types;
 	uint16_t data_size;
+	uint16_t eth_overhead;
 	bool warning = 0;
 	int k;
 	int ret;
@@ -1337,6 +1338,23 @@ init_config(void)
 			rte_exit(EXIT_FAILURE,
 				 "rte_eth_dev_info_get() failed\n");
 
+		/* Update the max_rx_pkt_len to have MTU as RTE_ETHER_MTU */
+		if (port->dev_info.max_mtu != UINT16_MAX &&
+		    port->dev_info.max_rx_pktlen > port->dev_info.max_mtu)
+			eth_overhead = port->dev_info.max_rx_pktlen -
+				port->dev_info.max_mtu;
+		else
+			eth_overhead =
+				RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
+
+		if (port->dev_conf.rxmode.max_rx_pkt_len <=
+			(uint32_t)(RTE_ETHER_MTU + eth_overhead))
+			port->dev_conf.rxmode.max_rx_pkt_len =
+					RTE_ETHER_MTU + eth_overhead;
+		else
+			port->dev_conf.rxmode.offloads |=
+					DEV_RX_OFFLOAD_JUMBO_FRAME;
+
 		if (!(port->dev_info.tx_offload_capa &
 		      DEV_TX_OFFLOAD_MBUF_FAST_FREE))
 			port->dev_conf.txmode.offloads &=
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.409753391 +0100
+++ 0056-app-testpmd-fix-max-Rx-packet-length-for-VLAN-packet.patch	2021-02-04 12:04:28.010789709 +0100
@@ -1 +1 @@
-From 761c4d66900fd7db6927f57eb610f543cc0908e4 Mon Sep 17 00:00:00 2001
+From a709e6b1df9bd90d7fe7a6f75f1448730b268848 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 761c4d66900fd7db6927f57eb610f543cc0908e4 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 855dbc2dec..89034c8b72 100644
+index 9287fa3ea4..7e1ced7c59 100644
@@ -33 +34 @@
-@@ -1886,7 +1886,6 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
+@@ -1983,7 +1983,6 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
@@ -41 +42 @@
-@@ -1898,11 +1897,6 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
+@@ -1995,11 +1994,6 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
@@ -54 +55 @@
-index a6a5baa4e1..0e2b9f7d3c 100644
+index 5f8905c06a..e14ff42745 100644
@@ -57 +58 @@
-@@ -1434,7 +1434,7 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
+@@ -1287,7 +1287,7 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
@@ -67 +68 @@
-index 414a0068fb..df5eb10d84 100644
+index 0eb7844783..a1c08a411a 100644
@@ -70 +71 @@
-@@ -834,12 +834,9 @@ launch_args_parse(int argc, char** argv)
+@@ -884,12 +884,9 @@ launch_args_parse(int argc, char** argv)
@@ -86 +87 @@
-index 2b60f6c5d3..c256e719ae 100644
+index 8d3b7b2a3b..f93e459ccf 100644
@@ -89 +90 @@
-@@ -1410,6 +1410,7 @@ init_config(void)
+@@ -1301,6 +1301,7 @@ init_config(void)
@@ -97 +98 @@
-@@ -1446,6 +1447,23 @@ init_config(void)
+@@ -1337,6 +1338,23 @@ init_config(void)

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

* [dpdk-stable] patch 'net/dpaa: fix jumbo frame flag condition for MTU set' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (54 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'app/testpmd: fix max Rx packet length for VLAN packets' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/e1000: " Christian Ehrhardt
                   ` (83 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From c9c7c11bb66d84b41844c6bae95c6f1585b61be6 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:09 +0000
Subject: [PATCH] net/dpaa: fix jumbo frame flag condition for MTU set

[ upstream commit 1d57225d0e6992d3671843cdfc3efe10cf5b068c ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports VLAN tag.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 25f854197abc ("net/dpaa: support jumbo frames")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 2 +-
 drivers/net/dpaa/dpaa_ethdev.h | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index a54ec0deb6..4d5946103a 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -173,7 +173,7 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EINVAL;
 	}
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > DPAA_ETH_MAX_LEN)
 		dev->data->dev_conf.rxmode.offloads |=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index da06f1faa1..9d27aa34bf 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -57,6 +57,10 @@
 #define VLAN_TAG_SIZE   4 /** < Vlan Header Length */
 #endif
 
+#define DPAA_ETH_MAX_LEN (RTE_ETHER_MTU + \
+			  RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + \
+			  VLAN_TAG_SIZE)
+
 /* PCD frame queues */
 #define DPAA_PCD_FQID_START		0x400
 #define DPAA_PCD_FQID_MULTIPLIER	0x100
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.459720462 +0100
+++ 0057-net-dpaa-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-04 12:04:28.010789709 +0100
@@ -1 +1 @@
-From 1d57225d0e6992d3671843cdfc3efe10cf5b068c Mon Sep 17 00:00:00 2001
+From c9c7c11bb66d84b41844c6bae95c6f1585b61be6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1d57225d0e6992d3671843cdfc3efe10cf5b068c ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index f00279e004..0c87c136d7 100644
+index a54ec0deb6..4d5946103a 100644
@@ -28 +29 @@
-@@ -184,7 +184,7 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -173,7 +173,7 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -38 +39 @@
-index 659bceb467..a858b1372c 100644
+index da06f1faa1..9d27aa34bf 100644
@@ -41 +42 @@
-@@ -51,6 +51,10 @@
+@@ -57,6 +57,10 @@
@@ -50,2 +51,2 @@
- #define DPAA_DEFAULT_NUM_PCD_QUEUES	1
- #define DPAA_VSP_PROFILE_MAX_NUM	8
+ #define DPAA_PCD_FQID_START		0x400
+ #define DPAA_PCD_FQID_MULTIPLIER	0x100

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

* [dpdk-stable] patch 'net/e1000: fix jumbo frame flag condition for MTU set' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (55 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/dpaa: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: " Christian Ehrhardt
                   ` (82 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From d369e76fdbb159cbb6c91d1949ba843b600f414f Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:11 +0000
Subject: [PATCH] net/e1000: fix jumbo frame flag condition for MTU set

[ upstream commit b6c4c94175e8a72b3de9781bff3453a143cd868f ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports VLAN tag.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: ef990fb56e55 ("net/e1000: convert to new Rx offloads API")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/e1000/e1000_ethdev.h | 2 +-
 drivers/net/e1000/em_ethdev.c    | 5 ++---
 drivers/net/e1000/igb_ethdev.c   | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/e1000/e1000_ethdev.h b/drivers/net/e1000/e1000_ethdev.h
index 1e41ae9de1..6b1e599441 100644
--- a/drivers/net/e1000/e1000_ethdev.h
+++ b/drivers/net/e1000/e1000_ethdev.h
@@ -97,7 +97,7 @@
  */
 #define E1000_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + \
 				VLAN_TAG_SIZE)
-
+#define E1000_ETH_MAX_LEN (RTE_ETHER_MTU + E1000_ETH_OVERHEAD)
 /*
  * Maximum number of Ring Descriptors.
  *
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index fc47993c83..4a6e6b8d73 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1795,8 +1795,7 @@ eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	if (ret != 0)
 		return ret;
 
-	frame_size = mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN +
-		VLAN_TAG_SIZE;
+	frame_size = mtu + E1000_ETH_OVERHEAD;
 
 	/* check that mtu is within the allowed range */
 	if (mtu < RTE_ETHER_MIN_MTU || frame_size > dev_info.max_rx_pktlen)
@@ -1812,7 +1811,7 @@ eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	rctl = E1000_READ_REG(hw, E1000_RCTL);
 
 	/* switch to jumbo mode if needed */
-	if (frame_size > RTE_ETHER_MAX_LEN) {
+	if (frame_size > E1000_ETH_MAX_LEN) {
 		dev->data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 		rctl |= E1000_RCTL_LPE;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index e061615b88..5fdeef5d3e 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -4543,7 +4543,7 @@ eth_igb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	rctl = E1000_READ_REG(hw, E1000_RCTL);
 
 	/* switch to jumbo mode if needed */
-	if (frame_size > RTE_ETHER_MAX_LEN) {
+	if (frame_size > E1000_ETH_MAX_LEN) {
 		dev->data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 		rctl |= E1000_RCTL_LPE;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.499478862 +0100
+++ 0058-net-e1000-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-04 12:04:28.022789721 +0100
@@ -1 +1 @@
-From b6c4c94175e8a72b3de9781bff3453a143cd868f Mon Sep 17 00:00:00 2001
+From d369e76fdbb159cbb6c91d1949ba843b600f414f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b6c4c94175e8a72b3de9781bff3453a143cd868f ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 4755a5f333..3b4d9c3ee6 100644
+index 1e41ae9de1..6b1e599441 100644
@@ -39 +40 @@
-index 8ee9422bf4..2036c6e917 100644
+index fc47993c83..4a6e6b8d73 100644
@@ -42 +43 @@
-@@ -1799,8 +1799,7 @@ eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -1795,8 +1795,7 @@ eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -52 +53 @@
-@@ -1816,7 +1815,7 @@ eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -1812,7 +1811,7 @@ eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -62 +63 @@
-index 647aa8d995..dfe87508c2 100644
+index e061615b88..5fdeef5d3e 100644
@@ -65 +66 @@
-@@ -4369,7 +4369,7 @@ eth_igb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -4543,7 +4543,7 @@ eth_igb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)

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

* [dpdk-stable] patch 'net/hns3: fix jumbo frame flag condition for MTU set' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (56 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/e1000: " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix jumbo frame flag condition' " Christian Ehrhardt
                   ` (81 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From cbb54eee49952a8ff572d0d3b854ab64571c1099 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:12 +0000
Subject: [PATCH] net/hns3: fix jumbo frame flag condition for MTU set

[ upstream commit 3ec35c64be8f93619a04e725bf4af9ecb5329ef0 ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'HSN3_DEFAULT_FRAME_LEN',
that perhaps impacts the cases of the jumbo frame related.

Fixes: 1f5ca0b460cd ("net/hns3: support some device operations")
Fixes: a5475d61fa34 ("net/hns3: support VF")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 2 +-
 drivers/net/hns3/hns3_ethdev_vf.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 0dadaefc72..343ee96d79 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2420,7 +2420,7 @@ hns3_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	}
 
 	rte_spinlock_lock(&hw->lock);
-	is_jumbo_frame = frame_size > RTE_ETHER_MAX_LEN ? true : false;
+	is_jumbo_frame = frame_size > HNS3_DEFAULT_FRAME_LEN ? true : false;
 	frame_size = RTE_MAX(frame_size, HNS3_DEFAULT_FRAME_LEN);
 
 	/*
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index ea0fed41d8..f392b62474 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -801,7 +801,7 @@ hns3vf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		rte_spinlock_unlock(&hw->lock);
 		return ret;
 	}
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (mtu > RTE_ETHER_MTU)
 		dev->data->dev_conf.rxmode.offloads |=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.542133637 +0100
+++ 0059-net-hns3-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-04 12:04:28.026789725 +0100
@@ -1 +1 @@
-From 3ec35c64be8f93619a04e725bf4af9ecb5329ef0 Mon Sep 17 00:00:00 2001
+From cbb54eee49952a8ff572d0d3b854ab64571c1099 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3ec35c64be8f93619a04e725bf4af9ecb5329ef0 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 90544fe328..bf633a3d71 100644
+index 0dadaefc72..343ee96d79 100644
@@ -29 +30 @@
-@@ -2467,7 +2467,7 @@ hns3_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -2420,7 +2420,7 @@ hns3_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -39 +40 @@
-index f09cabcd82..ef03fb1c4e 100644
+index ea0fed41d8..f392b62474 100644
@@ -42 +43 @@
-@@ -928,7 +928,7 @@ hns3vf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -801,7 +801,7 @@ hns3vf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)

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

* [dpdk-stable] patch 'net/i40e: fix jumbo frame flag condition' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (57 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/iavf: " Christian Ehrhardt
                   ` (80 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/5b2e0ced8d058873dc347f88308b29fd3a706bcd

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5b2e0ced8d058873dc347f88308b29fd3a706bcd Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:13 +0000
Subject: [PATCH] net/i40e: fix jumbo frame flag condition

[ upstream commit c12f0976cb2e915ab7c93a46310ba826ffb5496b ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: c1715402df8f ("i40evf: fix jumbo frame support")
Fixes: 43e5488c0ac6 ("net/i40e: support MTU configuration")
Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director")
Fixes: c3ac7c5b0b8a ("net/i40e: convert to new Rx offloads API")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c    |  2 +-
 drivers/net/i40e/i40e_ethdev.h    |  1 +
 drivers/net/i40e/i40e_ethdev_vf.c | 10 +++++-----
 drivers/net/i40e/i40e_fdir.c      |  2 +-
 drivers/net/i40e/i40e_rxtx.c      |  8 ++++----
 5 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index c94dd0e1b5..2e23631211 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12146,7 +12146,7 @@ i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EBUSY;
 	}
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > I40E_ETH_MAX_LEN)
 		dev_data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 50f8147b4c..91d6830a3c 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -269,6 +269,7 @@ enum i40e_flxpld_layer_idx {
  */
 #define I40E_ETH_OVERHEAD \
 	(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + I40E_VLAN_TAG_SIZE * 2)
+#define I40E_ETH_MAX_LEN (RTE_ETHER_MTU + I40E_ETH_OVERHEAD)
 
 #define I40E_RXTX_BYTES_H_16_BIT(bytes) ((bytes) & ~I40E_48_BIT_MASK)
 #define I40E_RXTX_BYTES_L_48_BIT(bytes) ((bytes) & I40E_48_BIT_MASK)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index eb17c02af3..9a8d2ed9b6 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1873,22 +1873,22 @@ i40evf_rxq_init(struct rte_eth_dev *dev, struct i40e_rx_queue *rxq)
 	 * Check if the jumbo frame and maximum packet length are set correctly
 	 */
 	if (dev_data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
-		if (rxq->max_pkt_len <= RTE_ETHER_MAX_LEN ||
+		if (rxq->max_pkt_len <= I40E_ETH_MAX_LEN ||
 		    rxq->max_pkt_len > I40E_FRAME_SIZE_MAX) {
 			PMD_DRV_LOG(ERR, "maximum packet length must be "
 				"larger than %u and smaller than %u, as jumbo "
-				"frame is enabled", (uint32_t)RTE_ETHER_MAX_LEN,
+				"frame is enabled", (uint32_t)I40E_ETH_MAX_LEN,
 					(uint32_t)I40E_FRAME_SIZE_MAX);
 			return I40E_ERR_CONFIG;
 		}
 	} else {
 		if (rxq->max_pkt_len < RTE_ETHER_MIN_LEN ||
-		    rxq->max_pkt_len > RTE_ETHER_MAX_LEN) {
+		    rxq->max_pkt_len > I40E_ETH_MAX_LEN) {
 			PMD_DRV_LOG(ERR, "maximum packet length must be "
 				"larger than %u and smaller than %u, as jumbo "
 				"frame is disabled",
 				(uint32_t)RTE_ETHER_MIN_LEN,
-				(uint32_t)RTE_ETHER_MAX_LEN);
+				(uint32_t)I40E_ETH_MAX_LEN);
 			return I40E_ERR_CONFIG;
 		}
 	}
@@ -2806,7 +2806,7 @@ i40evf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EBUSY;
 	}
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > I40E_ETH_MAX_LEN)
 		dev_data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index ce82a98a70..fb9f2c0fce 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -113,7 +113,7 @@ i40e_fdir_rx_queue_init(struct i40e_rx_queue *rxq)
 #endif
 	rx_ctx.dtype = i40e_header_split_none;
 	rx_ctx.hsplit_0 = I40E_HEADER_SPLIT_NONE;
-	rx_ctx.rxmax = RTE_ETHER_MAX_LEN;
+	rx_ctx.rxmax = I40E_ETH_MAX_LEN;
 	rx_ctx.tphrdesc_ena = 1;
 	rx_ctx.tphwdesc_ena = 1;
 	rx_ctx.tphdata_ena = 1;
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 249d0c7976..352fb426df 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2689,23 +2689,23 @@ i40e_rx_queue_config(struct i40e_rx_queue *rxq)
 		RTE_MIN((uint32_t)(hw->func_caps.rx_buf_chain_len *
 			rxq->rx_buf_len), data->dev_conf.rxmode.max_rx_pkt_len);
 	if (data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
-		if (rxq->max_pkt_len <= RTE_ETHER_MAX_LEN ||
+		if (rxq->max_pkt_len <= I40E_ETH_MAX_LEN ||
 			rxq->max_pkt_len > I40E_FRAME_SIZE_MAX) {
 			PMD_DRV_LOG(ERR, "maximum packet length must "
 				    "be larger than %u and smaller than %u,"
 				    "as jumbo frame is enabled",
-				    (uint32_t)RTE_ETHER_MAX_LEN,
+				    (uint32_t)I40E_ETH_MAX_LEN,
 				    (uint32_t)I40E_FRAME_SIZE_MAX);
 			return I40E_ERR_CONFIG;
 		}
 	} else {
 		if (rxq->max_pkt_len < RTE_ETHER_MIN_LEN ||
-			rxq->max_pkt_len > RTE_ETHER_MAX_LEN) {
+			rxq->max_pkt_len > I40E_ETH_MAX_LEN) {
 			PMD_DRV_LOG(ERR, "maximum packet length must be "
 				    "larger than %u and smaller than %u, "
 				    "as jumbo frame is disabled",
 				    (uint32_t)RTE_ETHER_MIN_LEN,
-				    (uint32_t)RTE_ETHER_MAX_LEN);
+				    (uint32_t)I40E_ETH_MAX_LEN);
 			return I40E_ERR_CONFIG;
 		}
 	}
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.581405426 +0100
+++ 0060-net-i40e-fix-jumbo-frame-flag-condition.patch	2021-02-04 12:04:28.046789744 +0100
@@ -1 +1 @@
-From c12f0976cb2e915ab7c93a46310ba826ffb5496b Mon Sep 17 00:00:00 2001
+From 5b2e0ced8d058873dc347f88308b29fd3a706bcd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c12f0976cb2e915ab7c93a46310ba826ffb5496b ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 42987c5dab..946994b80a 100644
+index c94dd0e1b5..2e23631211 100644
@@ -34 +35 @@
-@@ -11687,7 +11687,7 @@ i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -12146,7 +12146,7 @@ i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -44 +45 @@
-index cd484710b0..1e8f5d3a87 100644
+index 50f8147b4c..91d6830a3c 100644
@@ -47 +48 @@
-@@ -283,6 +283,7 @@ struct rte_flow {
+@@ -269,6 +269,7 @@ enum i40e_flxpld_layer_idx {
@@ -56 +57 @@
-index 346ec29cbe..5d7db7fe13 100644
+index eb17c02af3..9a8d2ed9b6 100644
@@ -59 +60 @@
-@@ -1900,22 +1900,22 @@ i40evf_rxq_init(struct rte_eth_dev *dev, struct i40e_rx_queue *rxq)
+@@ -1873,22 +1873,22 @@ i40evf_rxq_init(struct rte_eth_dev *dev, struct i40e_rx_queue *rxq)
@@ -86 +87 @@
-@@ -2837,7 +2837,7 @@ i40evf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -2806,7 +2806,7 @@ i40evf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -96 +97 @@
-index 0343e8b09a..f5defcf585 100644
+index ce82a98a70..fb9f2c0fce 100644
@@ -99 +100 @@
-@@ -116,7 +116,7 @@ i40e_fdir_rx_queue_init(struct i40e_rx_queue *rxq)
+@@ -113,7 +113,7 @@ i40e_fdir_rx_queue_init(struct i40e_rx_queue *rxq)
@@ -109 +110 @@
-index 3574867685..1ae62d4334 100644
+index 249d0c7976..352fb426df 100644
@@ -112 +113 @@
-@@ -2845,23 +2845,23 @@ i40e_rx_queue_config(struct i40e_rx_queue *rxq)
+@@ -2689,23 +2689,23 @@ i40e_rx_queue_config(struct i40e_rx_queue *rxq)

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

* [dpdk-stable] patch 'net/iavf: fix jumbo frame flag condition' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (58 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix jumbo frame flag condition' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ipn3ke: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
                   ` (79 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b72a8e010787b83a5c5ead0338397b2b1e9299e2 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:14 +0000
Subject: [PATCH] net/iavf: fix jumbo frame flag condition

[ upstream commit 7abd466423c356dfc45e1046c009f23ce0b02c49 ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 3fd7a3719c66 ("net/avf: enable ops for MTU setting")
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/iavf/iavf.h        |  1 +
 drivers/net/iavf/iavf_ethdev.c | 10 +++++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index eb144952a0..b343f58004 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -58,6 +58,7 @@
 #define IAVF_VLAN_TAG_SIZE               4
 #define IAVF_ETH_OVERHEAD \
 	(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + IAVF_VLAN_TAG_SIZE * 2)
+#define IAVF_ETH_MAX_LEN (RTE_ETHER_MTU + IAVF_ETH_OVERHEAD)
 
 #define IAVF_32_BIT_WIDTH (CHAR_BIT * 4)
 #define IAVF_48_BIT_WIDTH (CHAR_BIT * 6)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 042dd93641..386a53cfc9 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -275,23 +275,23 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
 	 * correctly.
 	 */
 	if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
-		if (max_pkt_len <= RTE_ETHER_MAX_LEN ||
+		if (max_pkt_len <= IAVF_ETH_MAX_LEN ||
 		    max_pkt_len > IAVF_FRAME_SIZE_MAX) {
 			PMD_DRV_LOG(ERR, "maximum packet length must be "
 				    "larger than %u and smaller than %u, "
 				    "as jumbo frame is enabled",
-				    (uint32_t)RTE_ETHER_MAX_LEN,
+				    (uint32_t)IAVF_ETH_MAX_LEN,
 				    (uint32_t)IAVF_FRAME_SIZE_MAX);
 			return -EINVAL;
 		}
 	} else {
 		if (max_pkt_len < RTE_ETHER_MIN_LEN ||
-		    max_pkt_len > RTE_ETHER_MAX_LEN) {
+		    max_pkt_len > IAVF_ETH_MAX_LEN) {
 			PMD_DRV_LOG(ERR, "maximum packet length must be "
 				    "larger than %u and smaller than %u, "
 				    "as jumbo frame is disabled",
 				    (uint32_t)RTE_ETHER_MIN_LEN,
-				    (uint32_t)RTE_ETHER_MAX_LEN);
+				    (uint32_t)IAVF_ETH_MAX_LEN);
 			return -EINVAL;
 		}
 	}
@@ -1007,7 +1007,7 @@ iavf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EBUSY;
 	}
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > IAVF_ETH_MAX_LEN)
 		dev->data->dev_conf.rxmode.offloads |=
 				DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.628130725 +0100
+++ 0061-net-iavf-fix-jumbo-frame-flag-condition.patch	2021-02-04 12:04:28.050789748 +0100
@@ -1 +1 @@
-From 7abd466423c356dfc45e1046c009f23ce0b02c49 Mon Sep 17 00:00:00 2001
+From b72a8e010787b83a5c5ead0338397b2b1e9299e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7abd466423c356dfc45e1046c009f23ce0b02c49 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index af11268fe3..c934d2e614 100644
+index eb144952a0..b343f58004 100644
@@ -29 +30 @@
-@@ -73,6 +73,7 @@
+@@ -58,6 +58,7 @@
@@ -38 +39 @@
-index 87e6062737..871c3ed126 100644
+index 042dd93641..386a53cfc9 100644
@@ -41 +42 @@
-@@ -460,23 +460,23 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
+@@ -275,23 +275,23 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
@@ -69 +70 @@
-@@ -1303,7 +1303,7 @@ iavf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -1007,7 +1007,7 @@ iavf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)

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

* [dpdk-stable] patch 'net/ipn3ke: fix jumbo frame flag condition for MTU set' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (59 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/iavf: " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/octeontx2: fix jumbo frame flag condition for MTU' " Christian Ehrhardt
                   ` (78 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Rosen Xu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/58f72dcc2d9b7fb4792460b765ce2f82b05d179c

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 58f72dcc2d9b7fb4792460b765ce2f82b05d179c Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:16 +0000
Subject: [PATCH] net/ipn3ke: fix jumbo frame flag condition for MTU set

[ upstream commit 6f4edbadeabb0a5204de972df99607046e79e77c ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/net/ipn3ke/ipn3ke_ethdev.h      | 1 +
 drivers/net/ipn3ke/ipn3ke_representor.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.h b/drivers/net/ipn3ke/ipn3ke_ethdev.h
index 9b0cf309c8..a6815a9cca 100644
--- a/drivers/net/ipn3ke/ipn3ke_ethdev.h
+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.h
@@ -640,6 +640,7 @@ ipn3ke_tm_ops_get(struct rte_eth_dev *ethdev,
  */
 #define IPN3KE_ETH_OVERHEAD \
 	(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + IPN3KE_VLAN_TAG_SIZE * 2)
+#define IPN3KE_ETH_MAX_LEN (RTE_ETHER_MTU + IPN3KE_ETH_OVERHEAD)
 
 #define IPN3KE_MAC_FRAME_SIZE_MAX    9728
 #define IPN3KE_MAC_RX_FRAME_MAXLENGTH    0x00AE
diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c
index b673c49149..d7dada7bde 100644
--- a/drivers/net/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
@@ -2794,7 +2794,7 @@ ipn3ke_rpst_mtu_set(struct rte_eth_dev *ethdev, uint16_t mtu)
 		return -EBUSY;
 	}
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > IPN3KE_ETH_MAX_LEN)
 		dev_data->dev_conf.rxmode.offloads |=
 			(uint64_t)(DEV_RX_OFFLOAD_JUMBO_FRAME);
 	else
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.666642466 +0100
+++ 0062-net-ipn3ke-fix-jumbo-frame-flag-condition-for-MTU-se.patch	2021-02-04 12:04:28.054789751 +0100
@@ -1 +1 @@
-From 6f4edbadeabb0a5204de972df99607046e79e77c Mon Sep 17 00:00:00 2001
+From 58f72dcc2d9b7fb4792460b765ce2f82b05d179c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6f4edbadeabb0a5204de972df99607046e79e77c ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -37 +38 @@
-index 8a53602576..9e15cce34f 100644
+index b673c49149..d7dada7bde 100644
@@ -40 +41 @@
-@@ -2801,7 +2801,7 @@ ipn3ke_rpst_mtu_set(struct rte_eth_dev *ethdev, uint16_t mtu)
+@@ -2794,7 +2794,7 @@ ipn3ke_rpst_mtu_set(struct rte_eth_dev *ethdev, uint16_t mtu)

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

* [dpdk-stable] patch 'net/octeontx2: fix jumbo frame flag condition for MTU' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (60 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/ipn3ke: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/qede: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
                   ` (77 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Nithin Dabilpuram, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/6d399d88e534e0482d8884d468819faebad28000

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 6d399d88e534e0482d8884d468819faebad28000 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:18 +0000
Subject: [PATCH] net/octeontx2: fix jumbo frame flag condition for MTU

[ upstream commit 3a921cd69bdbf39ba2a17af0c01f0000c6efb893 ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 0e2efd02db58 ("net/octeontx2: add MTU set operation")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev.h     | 2 ++
 drivers/net/octeontx2/otx2_ethdev_ops.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 48148ede4c..6855200fb2 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -50,6 +50,8 @@
 /* ETH_HLEN+ETH_FCS+2*VLAN_HLEN */
 #define NIX_L2_OVERHEAD \
 	(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + 8)
+#define NIX_L2_MAX_LEN \
+	(RTE_ETHER_MTU + NIX_L2_OVERHEAD)
 
 /* HW config of frame size doesn't include FCS */
 #define NIX_MAX_HW_FRS			9212
diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c
index 24a0d3f01d..beb4f58148 100644
--- a/drivers/net/octeontx2/otx2_ethdev_ops.c
+++ b/drivers/net/octeontx2/otx2_ethdev_ops.c
@@ -58,7 +58,7 @@ otx2_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 	if (rc)
 		return rc;
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > NIX_L2_MAX_LEN)
 		dev->rx_offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
 		dev->rx_offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.702466954 +0100
+++ 0063-net-octeontx2-fix-jumbo-frame-flag-condition-for-MTU.patch	2021-02-04 12:04:28.054789751 +0100
@@ -1 +1 @@
-From 3a921cd69bdbf39ba2a17af0c01f0000c6efb893 Mon Sep 17 00:00:00 2001
+From 6d399d88e534e0482d8884d468819faebad28000 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3a921cd69bdbf39ba2a17af0c01f0000c6efb893 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 3b9871f4dc..99f0469d89 100644
+index 48148ede4c..6855200fb2 100644
@@ -28 +29 @@
-@@ -51,6 +51,8 @@
+@@ -50,6 +50,8 @@
@@ -38 +39 @@
-index b36d37b9f7..963cc285ed 100644
+index 24a0d3f01d..beb4f58148 100644

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

* [dpdk-stable] patch 'net/qede: fix jumbo frame flag condition for MTU set' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (61 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/octeontx2: fix jumbo frame flag condition for MTU' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/sfc: " Christian Ehrhardt
                   ` (76 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From e9539bf53bfbe179a0d78091f3af08ecb5681a99 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:19 +0000
Subject: [PATCH] net/qede: fix jumbo frame flag condition for MTU set

[ upstream commit f9a69f8b5e94cae87d96ca5c160261687e0b9ec2 ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 200645ac7909 ("net/qede: set MTU")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/qede/qede_ethdev.c | 2 +-
 drivers/net/qede/qede_rxtx.h   | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 2932f155af..6f2f0051f6 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2282,7 +2282,7 @@ static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 			fp->rxq->rx_buf_size = rc;
 		}
 	}
-	if (max_rx_pkt_len > RTE_ETHER_MAX_LEN)
+	if (frame_size > QEDE_ETH_MAX_LEN)
 		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
 		dev->data->dev_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
diff --git a/drivers/net/qede/qede_rxtx.h b/drivers/net/qede/qede_rxtx.h
index 75cc930fd5..8dc669963b 100644
--- a/drivers/net/qede/qede_rxtx.h
+++ b/drivers/net/qede/qede_rxtx.h
@@ -71,6 +71,7 @@
 				 + (QEDE_LLC_SNAP_HDR_LEN) + 2)
 
 #define QEDE_MAX_ETHER_HDR_LEN	(RTE_ETHER_HDR_LEN + QEDE_ETH_OVERHEAD)
+#define QEDE_ETH_MAX_LEN	(RTE_ETHER_MTU + QEDE_MAX_ETHER_HDR_LEN)
 
 #define QEDE_RSS_OFFLOAD_ALL    (ETH_RSS_IPV4			|\
 				 ETH_RSS_NONFRAG_IPV4_TCP	|\
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.748749040 +0100
+++ 0064-net-qede-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-04 12:04:28.058789756 +0100
@@ -1 +1 @@
-From f9a69f8b5e94cae87d96ca5c160261687e0b9ec2 Mon Sep 17 00:00:00 2001
+From e9539bf53bfbe179a0d78091f3af08ecb5681a99 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f9a69f8b5e94cae87d96ca5c160261687e0b9ec2 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 3bec62d828..ab5f5b1065 100644
+index 2932f155af..6f2f0051f6 100644
@@ -28 +29 @@
-@@ -2369,7 +2369,7 @@ static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -2282,7 +2282,7 @@ static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
@@ -38 +39 @@
-index d7ff870b20..fcb564a1bb 100644
+index 75cc930fd5..8dc669963b 100644

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

* [dpdk-stable] patch 'net/sfc: fix jumbo frame flag condition for MTU set' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (62 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/qede: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/thunderx: " Christian Ehrhardt
                   ` (75 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ffce2b898da36ee81ecae9da7f2b2714559a265e Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:20 +0000
Subject: [PATCH] net/sfc: fix jumbo frame flag condition for MTU set

[ upstream commit 7910fd21211f402aac7b7e7d4b6d70f224f0f9be ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports VLAN tag.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU',
that perhaps impacts the cases of the jumbo frame related.

Fixes: ff6a1197c3b1 ("net/sfc: convert to new Rx offload API")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/sfc/sfc_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index d33c476bd7..9517cebd65 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -984,7 +984,7 @@ sfc_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 	 * The driver does not use it, but other PMDs update jumbo frame
 	 * flag and max_rx_pkt_len when MTU is set.
 	 */
-	if (mtu > RTE_ETHER_MAX_LEN) {
+	if (mtu > RTE_ETHER_MTU) {
 		struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
 		rxmode->offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
 	}
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.796957793 +0100
+++ 0065-net-sfc-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-04 12:04:28.058789756 +0100
@@ -1 +1 @@
-From 7910fd21211f402aac7b7e7d4b6d70f224f0f9be Mon Sep 17 00:00:00 2001
+From ffce2b898da36ee81ecae9da7f2b2714559a265e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7910fd21211f402aac7b7e7d4b6d70f224f0f9be ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 93fc7baa0d..f2f5336435 100644
+index d33c476bd7..9517cebd65 100644
@@ -27 +28 @@
-@@ -1017,7 +1017,7 @@ sfc_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -984,7 +984,7 @@ sfc_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)

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

* [dpdk-stable] patch 'net/thunderx: fix jumbo frame flag condition for MTU set' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (63 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/sfc: " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/cxgbe: fix jumbo frame flag condition' " Christian Ehrhardt
                   ` (74 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f9073f6ae382c0eddd970bdf1d859b429553b305 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:21 +0000
Subject: [PATCH] net/thunderx: fix jumbo frame flag condition for MTU set

[ upstream commit d2869184ae39d2773df12d1f7a0b96e5fb2d4ed4 ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports dual VLAN tags.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: 65d9804edc05 ("net/thunderx: support MTU configuration")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/thunderx/base/nicvf_hw_defs.h | 1 +
 drivers/net/thunderx/nicvf_ethdev.c       | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/thunderx/base/nicvf_hw_defs.h b/drivers/net/thunderx/base/nicvf_hw_defs.h
index b12c8ec50a..adc8ec943d 100644
--- a/drivers/net/thunderx/base/nicvf_hw_defs.h
+++ b/drivers/net/thunderx/base/nicvf_hw_defs.h
@@ -176,6 +176,7 @@
 #define NIC_HW_MAX_MTU                  (9190)
 #define NIC_HW_MAX_FRS                  (NIC_HW_MAX_MTU + NIC_HW_L2_OVERHEAD)
 #define NIC_HW_MAX_SEGS                 (12)
+#define NIC_HW_L2_MAX_LEN		(RTE_ETHER_MTU + NIC_HW_L2_OVERHEAD)
 
 /* Descriptor alignments */
 #define NICVF_RBDR_BASE_ALIGN_BYTES     (128) /* 7 bits */
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 770110eb1d..0fba26ac45 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -191,7 +191,7 @@ nicvf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 		(frame_size + 2 * VLAN_TAG_SIZE > buffsz * NIC_HW_MAX_SEGS))
 		return -EINVAL;
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > NIC_HW_L2_MAX_LEN)
 		rxmode->offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
 		rxmode->offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.841274404 +0100
+++ 0066-net-thunderx-fix-jumbo-frame-flag-condition-for-MTU-.patch	2021-02-04 12:04:28.062789760 +0100
@@ -1 +1 @@
-From d2869184ae39d2773df12d1f7a0b96e5fb2d4ed4 Mon Sep 17 00:00:00 2001
+From f9073f6ae382c0eddd970bdf1d859b429553b305 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d2869184ae39d2773df12d1f7a0b96e5fb2d4ed4 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -37 +38 @@
-index b6bb05e500..c2e7c334d4 100644
+index 770110eb1d..0fba26ac45 100644
@@ -40 +41 @@
-@@ -176,7 +176,7 @@ nicvf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -191,7 +191,7 @@ nicvf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)

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

* [dpdk-stable] patch 'net/cxgbe: fix jumbo frame flag condition' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (64 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/thunderx: " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/enetc: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
                   ` (73 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/249bec6cd52330b4dc8e23de68189bbb63062116

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 249bec6cd52330b4dc8e23de68189bbb63062116 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:23 +0000
Subject: [PATCH] net/cxgbe: fix jumbo frame flag condition

[ upstream commit 5dfbad550cafbc09aaaff07072cb2eb5f2a1fdaa ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition.
If the Ether overhead is larger than 18 when it supports VLAN tag,
that will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will normalize the boundary condition with 'RTE_ETHER_MTU'
and overhead even though current overhead is 18.

Fixes: 4b2eff452d2e ("cxgbe: enable jumbo frames")
Fixes: 0ec33be4c857 ("cxgbe: allow to change mtu")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/cxgbe/cxgbe.h        | 4 ++++
 drivers/net/cxgbe/cxgbe_ethdev.c | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index 75a2e9931b..8b8babc5e4 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -19,6 +19,10 @@
 #define CXGBE_MAX_RX_PKTLEN (9000 + RTE_ETHER_HDR_LEN + \
 				RTE_ETHER_CRC_LEN) /* max pkt */
 
+/* The max frame size with default MTU */
+#define CXGBE_ETH_MAX_LEN (RTE_ETHER_MTU + \
+		RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
+
 /* Max poll time is 100 * 100msec = 10 sec */
 #define CXGBE_LINK_STATUS_POLL_MS 100 /* 100ms */
 #define CXGBE_LINK_STATUS_POLL_CNT 100 /* Max number of times to poll */
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 502954c37c..352b47fdfb 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -304,7 +304,7 @@ int cxgbe_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 		return -EINVAL;
 
 	/* set to jumbo mode if needed */
-	if (new_mtu > RTE_ETHER_MAX_LEN)
+	if (new_mtu > CXGBE_ETH_MAX_LEN)
 		eth_dev->data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
@@ -648,7 +648,7 @@ int cxgbe_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
 		rxq->fl.size = temp_nb_desc;
 
 	/* Set to jumbo mode if necessary */
-	if (pkt_len > RTE_ETHER_MAX_LEN)
+	if (pkt_len > CXGBE_ETH_MAX_LEN)
 		eth_dev->data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.888867930 +0100
+++ 0067-net-cxgbe-fix-jumbo-frame-flag-condition.patch	2021-02-04 12:04:28.062789760 +0100
@@ -1 +1 @@
-From 5dfbad550cafbc09aaaff07072cb2eb5f2a1fdaa Mon Sep 17 00:00:00 2001
+From 249bec6cd52330b4dc8e23de68189bbb63062116 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5dfbad550cafbc09aaaff07072cb2eb5f2a1fdaa ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index ef62af1c3f..7c89a028bf 100644
+index 75a2e9931b..8b8babc5e4 100644
@@ -41 +42 @@
-index eb4258fe17..cfa385bab7 100644
+index 502954c37c..352b47fdfb 100644
@@ -44 +45 @@
-@@ -301,7 +301,7 @@ int cxgbe_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
+@@ -304,7 +304,7 @@ int cxgbe_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
@@ -53 +54 @@
-@@ -670,7 +670,7 @@ int cxgbe_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
+@@ -648,7 +648,7 @@ int cxgbe_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,

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

* [dpdk-stable] patch 'net/enetc: fix jumbo frame flag condition for MTU set' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (65 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/cxgbe: fix jumbo frame flag condition' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/nfp: " Christian Ehrhardt
                   ` (72 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/440d4667801bb5e8a0b5d668f6a4a14eb95948b5

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 440d4667801bb5e8a0b5d668f6a4a14eb95948b5 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:25 +0000
Subject: [PATCH] net/enetc: fix jumbo frame flag condition for MTU set

[ upstream commit 4d44217b0641c19e750b57c7392c4531c91dda7f ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition.
If the Ether overhead is larger than 18 when it supports VLAN tag,
that will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will normalize the boundary condition with 'RTE_ETHER_MTU'
and overhead even though current overhead is 18.

Fixes: 5d5589b0c858 ("net/enetc: support MTU update and jumbo frames")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/enetc/enetc.h        | 4 ++++
 drivers/net/enetc/enetc_ethdev.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/enetc/enetc.h b/drivers/net/enetc/enetc.h
index 8c830a5c06..6a2c4c68e5 100644
--- a/drivers/net/enetc/enetc.h
+++ b/drivers/net/enetc/enetc.h
@@ -29,6 +29,10 @@
 /* maximum frame size supported */
 #define ENETC_MAC_MAXFRM_SIZE	9600
 
+/* The max frame size with default MTU */
+#define ENETC_ETH_MAX_LEN (RTE_ETHER_MTU + \
+		RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
+
 /*
  * upper_32_bits - return bits 32-63 of a number
  * @n: the number we're accessing
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index eb637d0306..4f3e61cfdc 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -661,7 +661,7 @@ enetc_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EINVAL;
 	}
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > ENETC_ETH_MAX_LEN)
 		dev->data->dev_conf.rxmode.offloads &=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.927597280 +0100
+++ 0068-net-enetc-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-04 12:04:28.062789760 +0100
@@ -1 +1 @@
-From 4d44217b0641c19e750b57c7392c4531c91dda7f Mon Sep 17 00:00:00 2001
+From 440d4667801bb5e8a0b5d668f6a4a14eb95948b5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4d44217b0641c19e750b57c7392c4531c91dda7f ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 14ef3bc18b..7163633bce 100644
+index 8c830a5c06..6a2c4c68e5 100644
@@ -40 +41 @@
-index 6ff3022874..4d2c9c0474 100644
+index eb637d0306..4f3e61cfdc 100644
@@ -43 +44 @@
-@@ -677,7 +677,7 @@ enetc_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -661,7 +661,7 @@ enetc_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)

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

* [dpdk-stable] patch 'net/nfp: fix jumbo frame flag condition for MTU set' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (66 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/enetc: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/liquidio: " Christian Ehrhardt
                   ` (71 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 0fcce7e3606de7ad660915fdab254f8f69947d31 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:27 +0000
Subject: [PATCH] net/nfp: fix jumbo frame flag condition for MTU set

[ upstream commit a36974f43c69f7a714ffec237461854ae924ce29 ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition.
If the Ether overhead is larger than 18 when it supports VLAN tag,
that will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU',
that perhaps impacts the cases of the jumbo frame related.

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

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/nfp/nfp_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 54ea66b9d4..2aa3b2a103 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1501,7 +1501,7 @@ nfp_net_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	}
 
 	/* switch to jumbo mode if needed */
-	if ((uint32_t)mtu > RTE_ETHER_MAX_LEN)
+	if ((uint32_t)mtu > RTE_ETHER_MTU)
 		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
 		dev->data->dev_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:30.975858708 +0100
+++ 0069-net-nfp-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-04 12:04:28.066789763 +0100
@@ -1 +1 @@
-From a36974f43c69f7a714ffec237461854ae924ce29 Mon Sep 17 00:00:00 2001
+From 0fcce7e3606de7ad660915fdab254f8f69947d31 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a36974f43c69f7a714ffec237461854ae924ce29 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 1608bf5ea1..9ea24e5bda 100644
+index 54ea66b9d4..2aa3b2a103 100644
@@ -27 +28 @@
-@@ -1508,7 +1508,7 @@ nfp_net_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -1501,7 +1501,7 @@ nfp_net_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)

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

* [dpdk-stable] patch 'net/liquidio: fix jumbo frame flag condition for MTU set' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (67 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/nfp: " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'app/testpmd: fix IP checksum calculation' " Christian Ehrhardt
                   ` (70 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Steve Yang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/14dbe4a2f5e0889c07e430f4b83857a3f9d46721

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 14dbe4a2f5e0889c07e430f4b83857a3f9d46721 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:28 +0000
Subject: [PATCH] net/liquidio: fix jumbo frame flag condition for MTU set

[ upstream commit 92c87229a9b096a53a5a9763bfee0198d20a91ea ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition.
If the Ether overhead is larger than 18 when it supports VLAN tag,
that will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will normalize the boundary condition with 'RTE_ETHER_MTU'
and overhead even though current overhead is 18.

Fixes: 9f1c00266d82 ("net/liquidio: add API to set MTU")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/liquidio/lio_ethdev.c | 2 +-
 drivers/net/liquidio/lio_ethdev.h | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index ad4a51ecda..ac0472967c 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -484,7 +484,7 @@ lio_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 		return -1;
 	}
 
-	if (frame_len > RTE_ETHER_MAX_LEN)
+	if (frame_len > LIO_ETH_MAX_LEN)
 		eth_dev->data->dev_conf.rxmode.offloads |=
 			DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
diff --git a/drivers/net/liquidio/lio_ethdev.h b/drivers/net/liquidio/lio_ethdev.h
index 74cd2fb6c6..d33be1c44d 100644
--- a/drivers/net/liquidio/lio_ethdev.h
+++ b/drivers/net/liquidio/lio_ethdev.h
@@ -13,6 +13,9 @@
 #define LIO_LSC_TIMEOUT		100000 /* 100000us (100ms) */
 #define LIO_MAX_CMD_TIMEOUT     10000 /* 10000ms (10s) */
 
+/* The max frame size with default MTU */
+#define LIO_ETH_MAX_LEN (RTE_ETHER_MTU + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
+
 #define LIO_DEV(_eth_dev)		((_eth_dev)->data->dev_private)
 
 /* LIO Response condition variable */
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.021947254 +0100
+++ 0070-net-liquidio-fix-jumbo-frame-flag-condition-for-MTU-.patch	2021-02-04 12:04:28.070789767 +0100
@@ -1 +1 @@
-From 92c87229a9b096a53a5a9763bfee0198d20a91ea Mon Sep 17 00:00:00 2001
+From 14dbe4a2f5e0889c07e430f4b83857a3f9d46721 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 92c87229a9b096a53a5a9763bfee0198d20a91ea ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index d4dd3768cd..eb0fdab45a 100644
+index ad4a51ecda..ac0472967c 100644
@@ -28 +29 @@
-@@ -481,7 +481,7 @@ lio_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
+@@ -484,7 +484,7 @@ lio_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)

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

* [dpdk-stable] patch 'app/testpmd: fix IP checksum calculation' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (68 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/liquidio: " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: fix VF query link status in dev init' " Christian Ehrhardt
                   ` (69 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: George Prekas; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From d687db50e6917a6aa37b7a8c980ec8f15f0b067c Mon Sep 17 00:00:00 2001
From: George Prekas <prekageo@amazon.com>
Date: Thu, 7 Jan 2021 14:42:28 -0600
Subject: [PATCH] app/testpmd: fix IP checksum calculation

[ upstream commit d841ef857dac00657aeff0a764947e064f86f550 ]

Strict-aliasing rules are violated by cast to uint16_t* in flowgen.c and
the calculated IP checksum is wrong. Use attribute __may_alias__ to fix
the problem.

Fixes: e9e23a617eb8 ("app/testpmd: add flowgen forwarding engine")

Signed-off-by: George Prekas <prekageo@amazon.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/flowgen.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index 68931fdea6..3e1335b627 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -53,8 +53,11 @@ static struct rte_ether_addr cfg_ether_dst =
 
 #define IP_DEFTTL  64   /* from RFC 1340. */
 
+/* Use this type to inform GCC that ip_sum violates aliasing rules. */
+typedef unaligned_uint16_t alias_int16_t __attribute__((__may_alias__));
+
 static inline uint16_t
-ip_sum(const unaligned_uint16_t *hdr, int hdr_len)
+ip_sum(const alias_int16_t *hdr, int hdr_len)
 {
 	uint32_t sum = 0;
 
@@ -156,7 +159,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 							   next_flow);
 		ip_hdr->total_length	= RTE_CPU_TO_BE_16(pkt_size -
 							   sizeof(*eth_hdr));
-		ip_hdr->hdr_checksum	= ip_sum((unaligned_uint16_t *)ip_hdr,
+		ip_hdr->hdr_checksum	= ip_sum((const alias_int16_t *)ip_hdr,
 						 sizeof(*ip_hdr));
 
 		/* Initialize UDP header. */
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.063209505 +0100
+++ 0071-app-testpmd-fix-IP-checksum-calculation.patch	2021-02-04 12:04:28.070789767 +0100
@@ -1 +1 @@
-From d841ef857dac00657aeff0a764947e064f86f550 Mon Sep 17 00:00:00 2001
+From d687db50e6917a6aa37b7a8c980ec8f15f0b067c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d841ef857dac00657aeff0a764947e064f86f550 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index acf3e24605..cabfc688ff 100644
+index 68931fdea6..3e1335b627 100644
@@ -36 +37 @@
-@@ -150,7 +153,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
+@@ -156,7 +159,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)

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

* [dpdk-stable] patch 'net/hns3: fix VF query link status in dev init' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (69 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'app/testpmd: fix IP checksum calculation' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: use new opcode for clearing hardware resource' " Christian Ehrhardt
                   ` (68 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From fd45963eea28aad9fce2954754f491e8873d99a3 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 14 Jan 2021 21:33:32 +0800
Subject: [PATCH] net/hns3: fix VF query link status in dev init

[ upstream commit de63cf0d90a05edf911b2c7013d2651f5f6a92eb ]

Current hns3vf queried link status in dev init stage, but the link
status should be maintained in dev start stage, this patch fix this.

Also, in the dev start stage, we use quick query instead of delayed
query to make sure update the link status soon.

Fixes: a5475d61fa34 ("net/hns3: support VF")
Fixes: 958edf6627d5 ("net/hns3: fix VF link status")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index f392b62474..d8a2a8dcf3 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1439,7 +1439,6 @@ hns3vf_init_hardware(struct hns3_adapter *hns)
 		goto err_init_hardware;
 	}
 
-	hns3vf_request_link_info(hw);
 	return 0;
 
 err_init_hardware:
@@ -1848,7 +1847,7 @@ hns3vf_dev_start(struct rte_eth_dev *dev)
 
 	hns3_set_rxtx_function(dev);
 	hns3_mp_req_start_rxtx(dev);
-	rte_eal_alarm_set(HNS3VF_SERVICE_INTERVAL, hns3vf_service_handler, dev);
+	hns3vf_service_handler(dev);
 
 	hns3vf_restore_filter(dev);
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.093305665 +0100
+++ 0072-net-hns3-fix-VF-query-link-status-in-dev-init.patch	2021-02-04 12:04:28.070789767 +0100
@@ -1 +1 @@
-From de63cf0d90a05edf911b2c7013d2651f5f6a92eb Mon Sep 17 00:00:00 2001
+From fd45963eea28aad9fce2954754f491e8873d99a3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit de63cf0d90a05edf911b2c7013d2651f5f6a92eb ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index c126384ae7..ee895059d7 100644
+index f392b62474..d8a2a8dcf3 100644
@@ -26 +27 @@
-@@ -1749,7 +1749,6 @@ hns3vf_init_hardware(struct hns3_adapter *hns)
+@@ -1439,7 +1439,6 @@ hns3vf_init_hardware(struct hns3_adapter *hns)
@@ -34,2 +35,2 @@
-@@ -2238,7 +2237,7 @@ hns3vf_dev_start(struct rte_eth_dev *dev)
- 	hns3_rx_scattered_calc(dev);
+@@ -1848,7 +1847,7 @@ hns3vf_dev_start(struct rte_eth_dev *dev)
+ 

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

* [dpdk-stable] patch 'net/hns3: use new opcode for clearing hardware resource' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (70 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: fix VF query link status in dev init' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: fix register length when dumping registers' " Christian Ehrhardt
                   ` (67 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From d4234da00e40d435ee7e016289360b7a0cd6a66a Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Thu, 14 Jan 2021 21:33:33 +0800
Subject: [PATCH] net/hns3: use new opcode for clearing hardware resource

[ upstream commit e5d179078b611035395317c80a9285c8a2de18a2 ]

The original command opcode '0x700A' may cause firmware error,
so '0x700A' is deserted, now use '0x700B' to replace it.

Fixes: 223d9eceaeee ("net/hns3: clear residual hardware configurations on init")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_cmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index ab16b07a69..e7a220364d 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -208,7 +208,7 @@ enum hns3_opcode_type {
 	HNS3_OPC_FD_COUNTER_OP          = 0x1205,
 
 	/* Clear hardware state command */
-	HNS3_OPC_CLEAR_HW_STATE         = 0x700A,
+	HNS3_OPC_CLEAR_HW_STATE         = 0x700B,
 
 	/* SFP command */
 	HNS3_OPC_SFP_GET_SPEED          = 0x7104,
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.127201740 +0100
+++ 0073-net-hns3-use-new-opcode-for-clearing-hardware-resour.patch	2021-02-04 12:04:28.070789767 +0100
@@ -1 +1 @@
-From e5d179078b611035395317c80a9285c8a2de18a2 Mon Sep 17 00:00:00 2001
+From d4234da00e40d435ee7e016289360b7a0cd6a66a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e5d179078b611035395317c80a9285c8a2de18a2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 194c3a731b..e40293b309 100644
+index ab16b07a69..e7a220364d 100644
@@ -22 +23 @@
-@@ -203,7 +203,7 @@ enum hns3_opcode_type {
+@@ -208,7 +208,7 @@ enum hns3_opcode_type {

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

* [dpdk-stable] patch 'net/hns3: fix register length when dumping registers' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (71 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: use new opcode for clearing hardware resource' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'build: provide suitable error for "both" libraries option' " Christian Ehrhardt
                   ` (66 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/60c02f53c38f8fdbe481542bf718072d518f2e41

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 60c02f53c38f8fdbe481542bf718072d518f2e41 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Thu, 14 Jan 2021 21:33:34 +0800
Subject: [PATCH] net/hns3: fix register length when dumping registers

[ upstream commit 2d0467532b1a2c10739a89ead3bd03042486b1de ]

Currently, the reg length return by HNS3 is the total length of all the
registers. But for upper layer user, the total register length is the
length multiplied by width. This can lead to a waste of memory and print
some invalid information.

This patch corrects the length and width of the register.

Fixes: 936eda25e8da ("net/hns3: support dump register")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_regs.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 63c8602a87..e424d5abc4 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -118,6 +118,7 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
 	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	uint32_t cmdq_lines, common_lines, ring_lines, tqp_intr_lines;
 	uint32_t regs_num_32_bit, regs_num_64_bit;
+	uint32_t dfx_reg_lines;
 	uint32_t len;
 	int ret;
 
@@ -131,7 +132,7 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
 	tqp_intr_lines = sizeof(tqp_intr_reg_addrs) / REG_LEN_PER_LINE + 1;
 
 	len = (cmdq_lines + common_lines + ring_lines * hw->tqps_num +
-	      tqp_intr_lines * hw->num_msi) * REG_LEN_PER_LINE;
+	      tqp_intr_lines * hw->num_msi) * REG_NUM_PER_LINE;
 
 	if (!hns->is_vf) {
 		ret = hns3_get_regs_num(hw, &regs_num_32_bit, &regs_num_64_bit);
@@ -140,8 +141,11 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
 				 ret);
 			return -ENOTSUP;
 		}
-		len += regs_num_32_bit * sizeof(uint32_t) +
-		       regs_num_64_bit * sizeof(uint64_t);
+		dfx_reg_lines = regs_num_32_bit * sizeof(uint32_t) /
+					REG_LEN_PER_LINE + 1;
+		dfx_reg_lines += regs_num_64_bit * sizeof(uint64_t) /
+					REG_LEN_PER_LINE + 1;
+		len += dfx_reg_lines * REG_NUM_PER_LINE;
 	}
 
 	*length = len;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.158826693 +0100
+++ 0074-net-hns3-fix-register-length-when-dumping-registers.patch	2021-02-04 12:04:28.074789772 +0100
@@ -1 +1 @@
-From 2d0467532b1a2c10739a89ead3bd03042486b1de Mon Sep 17 00:00:00 2001
+From 60c02f53c38f8fdbe481542bf718072d518f2e41 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d0467532b1a2c10739a89ead3bd03042486b1de ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index b2cc599f12..32597fe21c 100644
+index 63c8602a87..e424d5abc4 100644
@@ -26 +27 @@
-@@ -104,6 +104,7 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
+@@ -118,6 +118,7 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
@@ -34 +35 @@
-@@ -117,7 +118,7 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
+@@ -131,7 +132,7 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
@@ -43 +44 @@
-@@ -126,8 +127,11 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
+@@ -140,8 +141,11 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)

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

* [dpdk-stable] patch 'build: provide suitable error for "both" libraries option' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (72 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: fix register length when dumping registers' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'eal: fix reciprocal header include' " Christian Ehrhardt
                   ` (65 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: Andrew Boyer, Honnappa Nagarahalli, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From de0465bb593d4c2003be65aa72b51b91c482120c Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 11 Jan 2021 13:55:59 +0000
Subject: [PATCH] build: provide suitable error for "both" libraries option

[ upstream commit 08895f10e7729c07ccd063501acd04e77c7730f5 ]

Rather than having the DPDK configuration error out when linking apps
and examples when "both" is select for "default_library" option, we can
detect that setting earlier in the build config and provide a suitable
error message to the user.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 config/meson.build | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/config/meson.build b/config/meson.build
index bab00f1489..9847746a72 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -280,3 +280,12 @@ if get_option('b_lto')
 		add_project_link_arguments('-Wno-lto-type-mismatch', language: 'c')
 	endif
 endif
+
+if get_option('default_library') == 'both'
+	error( '''
+    Unsupported value "both" for "default_library" option.
+
+    NOTE: DPDK always builds both shared and static libraries.  Please set
+    "default_library" to either "static" or "shared" to select default linkage
+    for apps and any examples.''')
+endif
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.192788529 +0100
+++ 0075-build-provide-suitable-error-for-both-libraries-opti.patch	2021-02-04 12:04:28.074789772 +0100
@@ -1 +1 @@
-From 08895f10e7729c07ccd063501acd04e77c7730f5 Mon Sep 17 00:00:00 2001
+From de0465bb593d4c2003be65aa72b51b91c482120c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 08895f10e7729c07ccd063501acd04e77c7730f5 ]
+
@@ -11,2 +12,0 @@
-Cc: stable@dpdk.org
-
@@ -22 +22 @@
-index 1e6dfe0753..9abb30c39f 100644
+index bab00f1489..9847746a72 100644
@@ -25 +25 @@
-@@ -330,3 +330,12 @@ if get_option('b_lto')
+@@ -280,3 +280,12 @@ if get_option('b_lto')

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

* [dpdk-stable] patch 'eal: fix reciprocal header include' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (73 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'build: provide suitable error for "both" libraries option' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'ethdev: fix missing " Christian Ehrhardt
                   ` (64 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a2758e749ca4932a38dfeb4de0058a2f8884ba8c Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:33 +0000
Subject: [PATCH] eal: fix reciprocal header include

[ upstream commit 8fc617099ec28e4690e460461f8872ae7b50e86a ]

The rte_reciprocal header file used standard __rte_always_inline from
rte_common.h but does not include that header file, leading to compiler
errors when the reciprocal header is included alone.

Fixes: 6d45659eacb8 ("eal: add u64-bit variant for reciprocal divide")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/common/include/rte_reciprocal.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/include/rte_reciprocal.h b/lib/librte_eal/common/include/rte_reciprocal.h
index 63e16fde0a..735adb029b 100644
--- a/lib/librte_eal/common/include/rte_reciprocal.h
+++ b/lib/librte_eal/common/include/rte_reciprocal.h
@@ -27,6 +27,8 @@
 
 #include <stdint.h>
 
+#include <rte_common.h>
+
 struct rte_reciprocal {
 	uint32_t m;
 	uint8_t sh1, sh2;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.228676860 +0100
+++ 0076-eal-fix-reciprocal-header-include.patch	2021-02-04 12:04:28.074789772 +0100
@@ -1 +1 @@
-From 8fc617099ec28e4690e460461f8872ae7b50e86a Mon Sep 17 00:00:00 2001
+From a2758e749ca4932a38dfeb4de0058a2f8884ba8c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8fc617099ec28e4690e460461f8872ae7b50e86a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- lib/librte_eal/include/rte_reciprocal.h | 2 ++
+ lib/librte_eal/common/include/rte_reciprocal.h | 2 ++
@@ -19 +20 @@
-diff --git a/lib/librte_eal/include/rte_reciprocal.h b/lib/librte_eal/include/rte_reciprocal.h
+diff --git a/lib/librte_eal/common/include/rte_reciprocal.h b/lib/librte_eal/common/include/rte_reciprocal.h
@@ -21,2 +22,2 @@
---- a/lib/librte_eal/include/rte_reciprocal.h
-+++ b/lib/librte_eal/include/rte_reciprocal.h
+--- a/lib/librte_eal/common/include/rte_reciprocal.h
++++ b/lib/librte_eal/common/include/rte_reciprocal.h

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

* [dpdk-stable] patch 'ethdev: fix missing header include' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (74 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'eal: fix reciprocal header include' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'rib: fix missing header includes' " Christian Ehrhardt
                   ` (63 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Andrew Rybchenko, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From bde221c8074df1b5da2391f0b3f530def5fe9191 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:35 +0000
Subject: [PATCH] ethdev: fix missing header include

[ upstream commit ebbd4d33d78555f083033d7bbf5668eecb285b94 ]

The define for RTE_ETH_FLOW_MAX is defined in rte_ethdev.h, so that
header should be included in rte_eth_ctrl.h to allow it to be compiled
independently.

Fixes: 7fa96d696f2c ("ethdev: unification of flow types")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_ethdev/rte_eth_ctrl.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_ethdev/rte_eth_ctrl.h b/lib/librte_ethdev/rte_eth_ctrl.h
index 1416c371fb..906cd4f458 100644
--- a/lib/librte_ethdev/rte_eth_ctrl.h
+++ b/lib/librte_ethdev/rte_eth_ctrl.h
@@ -9,6 +9,7 @@
 #include <rte_common.h>
 #include <rte_ether.h>
 #include "rte_flow.h"
+#include "rte_ethdev.h"
 
 /**
  * @deprecated Please use rte_flow API instead of this legacy one.
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.268821218 +0100
+++ 0077-ethdev-fix-missing-header-include.patch	2021-02-04 12:04:28.074789772 +0100
@@ -1 +1 @@
-From ebbd4d33d78555f083033d7bbf5668eecb285b94 Mon Sep 17 00:00:00 2001
+From bde221c8074df1b5da2391f0b3f530def5fe9191 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ebbd4d33d78555f083033d7bbf5668eecb285b94 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 1cca522fa3..8a50dbfef9 100644
+index 1416c371fb..906cd4f458 100644

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

* [dpdk-stable] patch 'rib: fix missing header includes' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (75 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'ethdev: fix missing " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'ipsec: fix missing header include' " Christian Ehrhardt
                   ` (62 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Vladimir Medvedkin, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From dc9f85a94179987012e07d025ac3f12086c51c6f Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:39 +0000
Subject: [PATCH] rib: fix missing header includes

[ upstream commit 585617c32008f1f75d8830b7b2f7e2b191e40508 ]

The standard integer types, and the size_t types are missing their
required header includes in the rib header file.

Fixes: 5a5793a5ffa2 ("rib: add RIB library")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_rib/rte_rib.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_rib/rte_rib.h b/lib/librte_rib/rte_rib.h
index 9369661dc4..93cd93b4ae 100644
--- a/lib/librte_rib/rte_rib.h
+++ b/lib/librte_rib/rte_rib.h
@@ -18,6 +18,9 @@
  * Level compressed tree implementation for IPv4 Longest Prefix Match
  */
 
+#include <stdlib.h>
+#include <stdint.h>
+
 #include <rte_compat.h>
 
 #ifdef __cplusplus
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.305196975 +0100
+++ 0078-rib-fix-missing-header-includes.patch	2021-02-04 12:04:28.074789772 +0100
@@ -1 +1 @@
-From 585617c32008f1f75d8830b7b2f7e2b191e40508 Mon Sep 17 00:00:00 2001
+From dc9f85a94179987012e07d025ac3f12086c51c6f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 585617c32008f1f75d8830b7b2f7e2b191e40508 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index f80752e5bd..ec97079c35 100644
+index 9369661dc4..93cd93b4ae 100644

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

* [dpdk-stable] patch 'ipsec: fix missing header include' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (76 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'rib: fix missing header includes' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'fib: fix missing header includes' " Christian Ehrhardt
                   ` (61 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: Konstantin Ananyev, Vladimir Medvedkin, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 0a48731e983d151eaf9ab2766c08ab40b0f94a00 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:41 +0000
Subject: [PATCH] ipsec: fix missing header include

[ upstream commit 071b9b78c441ee6f87775651fb2080061704d901 ]

The rte_ipsec_sad.h header used the standard uintXX_t types, but did not
include stdint.h header for them.

Fixes: 401633d9c112 ("ipsec: add inbound SAD API")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_ipsec/rte_ipsec_sad.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_ipsec/rte_ipsec_sad.h b/lib/librte_ipsec/rte_ipsec_sad.h
index 8386f73df7..cf50a11cb4 100644
--- a/lib/librte_ipsec/rte_ipsec_sad.h
+++ b/lib/librte_ipsec/rte_ipsec_sad.h
@@ -6,6 +6,8 @@
 #ifndef _RTE_IPSEC_SAD_H_
 #define _RTE_IPSEC_SAD_H_
 
+#include <stdint.h>
+
 #include <rte_compat.h>
 
 /**
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.343337210 +0100
+++ 0079-ipsec-fix-missing-header-include.patch	2021-02-04 12:04:28.074789772 +0100
@@ -1 +1 @@
-From 071b9b78c441ee6f87775651fb2080061704d901 Mon Sep 17 00:00:00 2001
+From 0a48731e983d151eaf9ab2766c08ab40b0f94a00 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 071b9b78c441ee6f87775651fb2080061704d901 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 3e67ab1e4b..b65d295831 100644
+index 8386f73df7..cf50a11cb4 100644

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

* [dpdk-stable] patch 'fib: fix missing header includes' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (77 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'ipsec: fix missing header include' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'app: fix build with extra include paths' " Christian Ehrhardt
                   ` (60 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Vladimir Medvedkin, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/148a3e362d9a85f836e28c666ef371ee9f401bac

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 148a3e362d9a85f836e28c666ef371ee9f401bac Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:42 +0000
Subject: [PATCH] fib: fix missing header includes

[ upstream commit f5bf8249d52527345100b2f3d703b15edaabf088 ]

Add stdint.h to get definitions of standard integer types

Fixes: 39e927248416 ("fib: add FIB library")
Fixes: 40d41a8a7b34 ("fib: support IPv6")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_fib/rte_fib.h  | 2 ++
 lib/librte_fib/rte_fib6.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/lib/librte_fib/rte_fib.h b/lib/librte_fib/rte_fib.h
index 84ee774d2d..04c490ed6e 100644
--- a/lib/librte_fib/rte_fib.h
+++ b/lib/librte_fib/rte_fib.h
@@ -19,6 +19,8 @@
  * for IPv4 Longest Prefix Match
  */
 
+#include <stdint.h>
+
 #include <rte_compat.h>
 
 #ifdef __cplusplus
diff --git a/lib/librte_fib/rte_fib6.h b/lib/librte_fib/rte_fib6.h
index bbfcf23a85..9228d87149 100644
--- a/lib/librte_fib/rte_fib6.h
+++ b/lib/librte_fib/rte_fib6.h
@@ -19,6 +19,8 @@
  * for IPv6 Longest Prefix Match
  */
 
+#include <stdint.h>
+
 #include <rte_compat.h>
 
 #ifdef __cplusplus
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.383473936 +0100
+++ 0080-fib-fix-missing-header-includes.patch	2021-02-04 12:04:28.078789775 +0100
@@ -1 +1 @@
-From f5bf8249d52527345100b2f3d703b15edaabf088 Mon Sep 17 00:00:00 2001
+From 148a3e362d9a85f836e28c666ef371ee9f401bac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f5bf8249d52527345100b2f3d703b15edaabf088 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index fef0749525..acad20963c 100644
+index 84ee774d2d..04c490ed6e 100644
@@ -34 +35 @@
-index 668bffb2ba..0e193b8e7b 100644
+index bbfcf23a85..9228d87149 100644

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

* [dpdk-stable] patch 'app: fix build with extra include paths' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (78 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'fib: fix missing header includes' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'eal/arm: fix debug build with gcc for 128-bit atomics' " Christian Ehrhardt
                   ` (59 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 2b5df8dcfb9cbbec84b5d751b84a905dd82fd672 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:47 +0000
Subject: [PATCH] app: fix build with extra include paths

[ upstream commit 64fd2124301eb246f12c316f9f619e36cf6d1bdc ]

The "includes" variable in the app/meson.build file was ignored when
building the executable, meaning that apps couldn't pass additional
include paths directly back. Fix this to align with drivers and libs.

Fixes: fa036e70d794 ("app: generalize meson build")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/meson.build b/app/meson.build
index 71109cc422..65d6bc7f85 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -62,6 +62,7 @@ foreach app:apps
 				c_args: cflags,
 				link_whole: link_libs,
 				dependencies: dep_objs,
+				include_directories: includes,
 				install_rpath: join_paths(get_option('prefix'),
 						 driver_install_path),
 				install: true)
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.419986749 +0100
+++ 0081-app-fix-build-with-extra-include-paths.patch	2021-02-04 12:04:28.078789775 +0100
@@ -1 +1 @@
-From 64fd2124301eb246f12c316f9f619e36cf6d1bdc Mon Sep 17 00:00:00 2001
+From 2b5df8dcfb9cbbec84b5d751b84a905dd82fd672 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 64fd2124301eb246f12c316f9f619e36cf6d1bdc ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 903117b866..87fc195dbf 100644
+index 71109cc422..65d6bc7f85 100644
@@ -23,2 +24,2 @@
-@@ -66,6 +66,7 @@ foreach app:apps
- 				link_args: ldflags,
+@@ -62,6 +62,7 @@ foreach app:apps
+ 				c_args: cflags,

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

* [dpdk-stable] patch 'eal/arm: fix debug build with gcc for 128-bit atomics' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (79 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'app: fix build with extra include paths' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'test/distributor: fix return buffer queue overload' " Christian Ehrhardt
                   ` (58 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Joyce Kong; +Cc: Ruifeng Wang, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/81d34ab59c67229f961d8d688ddaa690f5867110

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 81d34ab59c67229f961d8d688ddaa690f5867110 Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Fri, 15 Jan 2021 17:58:21 +0800
Subject: [PATCH] eal/arm: fix debug build with gcc for 128-bit atomics
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 36d406c5139fa0160a1d3686f5b2413a2f9ee83b ]

Compiling with "meson build -Dbuildtype=debug --cross-file
config/arm/arm64_thunderx2_linux_gcc" shows the warnings
"function returns an aggregate [-Waggregate-return]":
../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h: In
function ‘__cas_128_relaxed’:
../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:81:20:
error: function returns an aggregate [-Werror=aggregate-return]
 __ATOMIC128_CAS_OP(__cas_128_relaxed, "casp")
                    ^~~~~~~~~~~~~~~~~

Fix the compiling issue by defining __ATOMIC128_CAS_OP as a void
function and passing the address pointer into it.

Fixes: 7e2c3e17fe2c ("eal/arm64: add 128-bit atomic compare exchange")

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 .../common/include/arch/arm/rte_atomic_64.h   | 28 +++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
index 8da989dcca..3384934afa 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
@@ -54,15 +54,15 @@ extern "C" {
 #endif
 
 #define __ATOMIC128_CAS_OP(cas_op_name, op_string)                          \
-static __rte_noinline rte_int128_t                                          \
-cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated)      \
+static __rte_noinline void                                                  \
+cas_op_name(rte_int128_t *dst, rte_int128_t *old, rte_int128_t updated)     \
 {                                                                           \
 	/* caspX instructions register pair must start from even-numbered
 	 * register at operand 1.
 	 * So, specify registers for local variables here.
 	 */                                                                 \
-	register uint64_t x0 __asm("x0") = (uint64_t)old.val[0];            \
-	register uint64_t x1 __asm("x1") = (uint64_t)old.val[1];            \
+	register uint64_t x0 __asm("x0") = (uint64_t)old->val[0];           \
+	register uint64_t x1 __asm("x1") = (uint64_t)old->val[1];           \
 	register uint64_t x2 __asm("x2") = (uint64_t)updated.val[0];        \
 	register uint64_t x3 __asm("x3") = (uint64_t)updated.val[1];        \
 	asm volatile(                                                       \
@@ -74,9 +74,8 @@ cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated)      \
 		[upd1] "r" (x3),                                            \
 		[dst] "r" (dst)                                             \
 		: "memory");                                                \
-	old.val[0] = x0;                                                    \
-	old.val[1] = x1;                                                    \
-	return old;                                                         \
+	old->val[0] = x0;                                                   \
+	old->val[1] = x1;                                                   \
 }
 
 __ATOMIC128_CAS_OP(__cas_128_relaxed, "casp")
@@ -114,13 +113,14 @@ rte_atomic128_cmp_exchange(rte_int128_t *dst, rte_int128_t *exp,
 
 #if defined(__ARM_FEATURE_ATOMICS) || defined(RTE_ARM_FEATURE_ATOMICS)
 	if (success == __ATOMIC_RELAXED)
-		old = __cas_128_relaxed(dst, expected, desired);
+		__cas_128_relaxed(dst, exp, desired);
 	else if (success == __ATOMIC_ACQUIRE)
-		old = __cas_128_acquire(dst, expected, desired);
+		__cas_128_acquire(dst, exp, desired);
 	else if (success == __ATOMIC_RELEASE)
-		old = __cas_128_release(dst, expected, desired);
+		__cas_128_release(dst, exp, desired);
 	else
-		old = __cas_128_acq_rel(dst, expected, desired);
+		__cas_128_acq_rel(dst, exp, desired);
+	old = *exp;
 #else
 #define __HAS_ACQ(mo) ((mo) != __ATOMIC_RELAXED && (mo) != __ATOMIC_RELEASE)
 #define __HAS_RLS(mo) ((mo) == __ATOMIC_RELEASE || (mo) == __ATOMIC_ACQ_REL || \
@@ -184,12 +184,12 @@ rte_atomic128_cmp_exchange(rte_int128_t *dst, rte_int128_t *exp,
 #undef __STORE_128
 
 	} while (unlikely(ret));
-#endif
 
-	/* Unconditionally updating expected removes an 'if' statement.
-	 * expected should already be in register if not in the cache.
+	/* Unconditionally updating the value of exp removes an 'if' statement.
+	 * The value of exp should already be in register if not in the cache.
 	 */
 	*exp = old;
+#endif
 
 	return (old.int128 == expected.int128);
 }
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.454070996 +0100
+++ 0082-eal-arm-fix-debug-build-with-gcc-for-128-bit-atomics.patch	2021-02-04 12:04:28.078789775 +0100
@@ -1 +1 @@
-From 36d406c5139fa0160a1d3686f5b2413a2f9ee83b Mon Sep 17 00:00:00 2001
+From 81d34ab59c67229f961d8d688ddaa690f5867110 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 36d406c5139fa0160a1d3686f5b2413a2f9ee83b ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
- lib/librte_eal/arm/include/rte_atomic_64.h | 28 +++++++++++-----------
+ .../common/include/arch/arm/rte_atomic_64.h   | 28 +++++++++----------
@@ -32,5 +33,5 @@
-diff --git a/lib/librte_eal/arm/include/rte_atomic_64.h b/lib/librte_eal/arm/include/rte_atomic_64.h
-index 467d32a455..fa6f334c0d 100644
---- a/lib/librte_eal/arm/include/rte_atomic_64.h
-+++ b/lib/librte_eal/arm/include/rte_atomic_64.h
-@@ -53,15 +53,15 @@ rte_atomic_thread_fence(int memorder)
+diff --git a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
+index 8da989dcca..3384934afa 100644
+--- a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
++++ b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
+@@ -54,15 +54,15 @@ extern "C" {
@@ -56 +57 @@
-@@ -73,9 +73,8 @@ cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated)      \
+@@ -74,9 +74,8 @@ cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated)      \
@@ -68 +69 @@
-@@ -113,13 +112,14 @@ rte_atomic128_cmp_exchange(rte_int128_t *dst, rte_int128_t *exp,
+@@ -114,13 +113,14 @@ rte_atomic128_cmp_exchange(rte_int128_t *dst, rte_int128_t *exp,
@@ -87 +88 @@
-@@ -183,12 +183,12 @@ rte_atomic128_cmp_exchange(rte_int128_t *dst, rte_int128_t *exp,
+@@ -184,12 +184,12 @@ rte_atomic128_cmp_exchange(rte_int128_t *dst, rte_int128_t *exp,

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

* [dpdk-stable] patch 'test/distributor: fix return buffer queue overload' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (80 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'eal/arm: fix debug build with gcc for 128-bit atomics' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:28 ` [dpdk-stable] patch 'power: create guest channel public header file' " Christian Ehrhardt
                   ` (57 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Marchand, David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 09bc0f04c8210874e39e4e8c0eb095430dfca15b Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Tue, 19 Jan 2021 04:59:10 +0100
Subject: [PATCH] test/distributor: fix return buffer queue overload

[ upstream commit 95bb2477022e6153419adc41f829e69b83b18925 ]

The distributor library implementation uses a cyclic queue to store
packets returned from workers. These packets can be later collected
with rte_distributor_returned_pkts() call.
However the queue has limited capacity. It is able to contain only
127 packets (RTE_DISTRIB_RETURNS_MASK).

Big burst tests sent 1024 packets in 32 packets bursts without waiting
until they are processed by the distributor. In case when tests were
run with big number of worker threads, it happened that more than
127 packets were returned from workers and put into cyclic queue.
This caused packets to be dropped by the queue, making them impossible
to be collected later with rte_distributor_returned_pkts() calls.
However the test waited for all packets to be returned infinitely.

This patch fixes the big burst test by not allowing more than
queue capacity packets to be processed at the same time, making
impossible to drop any packets.
It also cleans up duplicated code in the same test.

Bugzilla ID: 612
Fixes: c0de0eb82e40 ("distributor: switch over to new API")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
---
 app/test/test_distributor.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
index 3b2a4cbcf9..acfe728f0c 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -207,6 +207,8 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 	clear_packet_count();
 	struct rte_mbuf *many_bufs[BIG_BATCH], *return_bufs[BIG_BATCH];
 	unsigned num_returned = 0;
+	unsigned int num_being_processed = 0;
+	unsigned int return_buffer_capacity = 127;/* RTE_DISTRIB_RETURNS_MASK */
 
 	/* flush out any remaining packets */
 	rte_distributor_flush(db);
@@ -223,16 +225,16 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 	for (i = 0; i < BIG_BATCH/BURST; i++) {
 		rte_distributor_process(db,
 				&many_bufs[i*BURST], BURST);
-		count = rte_distributor_returned_pkts(db,
-				&return_bufs[num_returned],
-				BIG_BATCH - num_returned);
-		num_returned += count;
+		num_being_processed += BURST;
+		do {
+			count = rte_distributor_returned_pkts(db,
+					&return_bufs[num_returned],
+					BIG_BATCH - num_returned);
+			num_being_processed -= count;
+			num_returned += count;
+			rte_distributor_flush(db);
+		} while (num_being_processed + BURST > return_buffer_capacity);
 	}
-	rte_distributor_flush(db);
-	count = rte_distributor_returned_pkts(db,
-		&return_bufs[num_returned],
-			BIG_BATCH - num_returned);
-	num_returned += count;
 	retries = 0;
 	do {
 		rte_distributor_flush(db);
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.488002814 +0100
+++ 0083-test-distributor-fix-return-buffer-queue-overload.patch	2021-02-04 12:04:28.078789775 +0100
@@ -1 +1 @@
-From 95bb2477022e6153419adc41f829e69b83b18925 Mon Sep 17 00:00:00 2001
+From 09bc0f04c8210874e39e4e8c0eb095430dfca15b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 95bb2477022e6153419adc41f829e69b83b18925 ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
@@ -37 +38 @@
-index f4c6229f16..961f326cd5 100644
+index 3b2a4cbcf9..acfe728f0c 100644
@@ -40 +41 @@
-@@ -217,6 +217,8 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
+@@ -207,6 +207,8 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
@@ -49 +50 @@
-@@ -233,16 +235,16 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
+@@ -223,16 +225,16 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)

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

* [dpdk-stable] patch 'power: create guest channel public header file' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (81 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'test/distributor: fix return buffer queue overload' " Christian Ehrhardt
@ 2021-02-04 11:28 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'power: make channel message functions public' " Christian Ehrhardt
                   ` (56 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:28 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/844c5689d7d98fcb65e96edeaca1d9ca78945dff

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 844c5689d7d98fcb65e96edeaca1d9ca78945dff Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 21 Jan 2021 17:21:56 +0000
Subject: [PATCH] power: create guest channel public header file

[ upstream commit 5f443cc0f905a9bf25f6274aff58e6e29f049466 ]

In preparation for making the header file public, we first rename
channel_commands.h as rte_power_guest_channel.h.

Fixes: 210c383e247b ("power: packet format for vm power management")
Fixes: cd0d5547e873 ("power: vm communication channels in guest")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
---
 examples/vm_power_manager/channel_manager.c              | 2 +-
 examples/vm_power_manager/channel_monitor.c              | 2 +-
 examples/vm_power_manager/channel_monitor.h              | 2 +-
 examples/vm_power_manager/guest_cli/vm_power_cli_guest.h | 2 +-
 examples/vm_power_manager/vm_power_cli.c                 | 2 +-
 lib/librte_power/guest_channel.c                         | 2 +-
 lib/librte_power/guest_channel.h                         | 2 +-
 lib/librte_power/power_kvm_vm.c                          | 2 +-
 .../{channel_commands.h => rte_power_guest_channel.h}    | 9 ++++-----
 9 files changed, 12 insertions(+), 13 deletions(-)
 rename lib/librte_power/{channel_commands.h => rte_power_guest_channel.h} (94%)

diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index a26315051b..c7d5bf5a87 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -27,7 +27,7 @@
 #include <libvirt/libvirt.h>
 
 #include "channel_manager.h"
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
 #include "channel_monitor.h"
 #include "power_manager.h"
 
diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 1d00a6cf6c..4788d50cfa 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -35,7 +35,7 @@
 
 #include <libvirt/libvirt.h>
 #include "channel_monitor.h"
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
 #include "channel_manager.h"
 #include "power_manager.h"
 #include "oob_monitor.h"
diff --git a/examples/vm_power_manager/channel_monitor.h b/examples/vm_power_manager/channel_monitor.h
index 7362a80d26..4a526ff670 100644
--- a/examples/vm_power_manager/channel_monitor.h
+++ b/examples/vm_power_manager/channel_monitor.h
@@ -6,7 +6,7 @@
 #define CHANNEL_MONITOR_H_
 
 #include "channel_manager.h"
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
 
 struct core_share {
 	unsigned int pcpu;
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
index 0c2cc1374d..0f82bac604 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
@@ -9,7 +9,7 @@
 extern "C" {
 #endif
 
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
 
 struct channel_packet *get_policy(void);
 
diff --git a/examples/vm_power_manager/vm_power_cli.c b/examples/vm_power_manager/vm_power_cli.c
index 5f64b83fb0..3df3626577 100644
--- a/examples/vm_power_manager/vm_power_cli.c
+++ b/examples/vm_power_manager/vm_power_cli.c
@@ -21,7 +21,7 @@
 #include "channel_manager.h"
 #include "channel_monitor.h"
 #include "power_manager.h"
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
 
 struct cmd_quit_result {
 	cmdline_fixed_string_t quit;
diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
index b984d55bc8..6eba632393 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
@@ -16,7 +16,7 @@
 #include <rte_log.h>
 
 #include "guest_channel.h"
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
 
 #define RTE_LOGTYPE_GUEST_CHANNEL RTE_LOGTYPE_USER1
 
diff --git a/lib/librte_power/guest_channel.h b/lib/librte_power/guest_channel.h
index 025961606c..7633e62756 100644
--- a/lib/librte_power/guest_channel.h
+++ b/lib/librte_power/guest_channel.h
@@ -8,7 +8,7 @@
 extern "C" {
 #endif
 
-#include <channel_commands.h>
+#include <rte_power_guest_channel.h>
 
 /**
  * Connect to the Virtio-Serial VM end-point located in path. It is
diff --git a/lib/librte_power/power_kvm_vm.c b/lib/librte_power/power_kvm_vm.c
index 277ebbeaeb..fa177b57ec 100644
--- a/lib/librte_power/power_kvm_vm.c
+++ b/lib/librte_power/power_kvm_vm.c
@@ -7,7 +7,7 @@
 #include <rte_log.h>
 
 #include "guest_channel.h"
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
 #include "power_kvm_vm.h"
 #include "power_common.h"
 
diff --git a/lib/librte_power/channel_commands.h b/lib/librte_power/rte_power_guest_channel.h
similarity index 94%
rename from lib/librte_power/channel_commands.h
rename to lib/librte_power/rte_power_guest_channel.h
index adc8e5ca27..ef3b064a85 100644
--- a/lib/librte_power/channel_commands.h
+++ b/lib/librte_power/rte_power_guest_channel.h
@@ -1,9 +1,8 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2010-2014 Intel Corporation
+ * Copyright(c) 2010-2021 Intel Corporation
  */
-
-#ifndef CHANNEL_COMMANDS_H_
-#define CHANNEL_COMMANDS_H_
+#ifndef RTE_POWER_GUEST_CHANNEL_H
+#define RTE_POWER_GUEST_CHANNEL_H
 
 #ifdef __cplusplus
 extern "C" {
@@ -122,4 +121,4 @@ struct channel_packet_caps_list {
 }
 #endif
 
-#endif /* CHANNEL_COMMANDS_H_ */
+#endif /* RTE_POWER_GUEST_CHANNEL_H_ */
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.524755809 +0100
+++ 0084-power-create-guest-channel-public-header-file.patch	2021-02-04 12:04:28.082789779 +0100
@@ -1 +1 @@
-From 5f443cc0f905a9bf25f6274aff58e6e29f049466 Mon Sep 17 00:00:00 2001
+From 844c5689d7d98fcb65e96edeaca1d9ca78945dff Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5f443cc0f905a9bf25f6274aff58e6e29f049466 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 9dca6f6863..58a243b230 100644
+index a26315051b..c7d5bf5a87 100644
@@ -42 +43 @@
-index 228f06803d..08306105d3 100644
+index 1d00a6cf6c..4788d50cfa 100644
@@ -68 +69 @@
-index 6ad14a3dea..2299d23dce 100644
+index 0c2cc1374d..0f82bac604 100644
@@ -81 +82 @@
-index ed0623a41d..f7e1b596ec 100644
+index 5f64b83fb0..3df3626577 100644
@@ -94 +95 @@
-index 7b5926e5c4..4cb5ae1ddf 100644
+index b984d55bc8..6eba632393 100644
@@ -97 +98 @@
-@@ -17,7 +17,7 @@
+@@ -16,7 +16,7 @@
@@ -107 +108 @@
-index e15db46fc7..d3d87f0ae2 100644
+index 025961606c..7633e62756 100644
@@ -118 +119 @@
-  * Check if any Virtio-Serial VM end-points exist in path.
+  * Connect to the Virtio-Serial VM end-point located in path. It is
@@ -120 +121 @@
-index 409c3e03ab..649ebe85c4 100644
+index 277ebbeaeb..fa177b57ec 100644

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

* [dpdk-stable] patch 'power: make channel message functions public' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (82 preceding siblings ...)
  2021-02-04 11:28 ` [dpdk-stable] patch 'power: create guest channel public header file' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'power: rename public structs' " Christian Ehrhardt
                   ` (55 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Hunt, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From fe40cc37a81a7fbb430a583e8339f15641288857 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 21 Jan 2021 17:21:57 +0000
Subject: [PATCH] power: make channel message functions public

[ upstream commit 4d3892dcd77b2f9dc657b426f4871f703cb819b6 ]

Move the 2 public functions into rte_power_guest_channel.h

Fixes: 210c383e247b ("power: packet format for vm power management")
Fixes: cd0d5547e873 ("power: vm communication channels in guest")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_power/guest_channel.h           | 40 -----------------
 lib/librte_power/rte_power_guest_channel.h | 50 ++++++++++++++++++++++
 lib/librte_power/rte_power_version.map     |  4 ++
 3 files changed, 54 insertions(+), 40 deletions(-)

diff --git a/lib/librte_power/guest_channel.h b/lib/librte_power/guest_channel.h
index 7633e62756..a55d5e6d4c 100644
--- a/lib/librte_power/guest_channel.h
+++ b/lib/librte_power/guest_channel.h
@@ -53,22 +53,6 @@ void guest_channel_host_disconnect(unsigned int lcore_id);
  */
 int guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id);
 
-/**
- * Send a message contained in pkt over the Virtio-Serial to the host endpoint.
- *
- * @param pkt
- *  Pointer to a populated struct channel_packet
- *
- * @param lcore_id
- *  lcore_id.
- *
- * @return
- *  - 0 on success.
- *  - Negative on error.
- */
-int rte_power_guest_channel_send_msg(struct channel_packet *pkt,
-			unsigned int lcore_id);
-
 /**
  * Read a message contained in pkt over the Virtio-Serial
  * from the host endpoint.
@@ -91,30 +75,6 @@ int power_guest_channel_read_msg(void *pkt,
 		size_t pkt_len,
 		unsigned int lcore_id);
 
-/**
- * Receive a message contained in pkt over the Virtio-Serial
- * from the host endpoint.
- *
- * @param pkt
- *  Pointer to channel_packet or
- *  channel_packet_freq_list struct.
- *
- * @param pkt_len
- *  Size of expected data packet.
- *
- * @param lcore_id
- *  lcore_id.
- *
- * @return
- *  - 0 on success.
- *  - Negative on error.
- */
-__rte_experimental
-int
-rte_power_guest_channel_receive_msg(void *pkt,
-		size_t pkt_len,
-		unsigned int lcore_id);
-
 
 #ifdef __cplusplus
 }
diff --git a/lib/librte_power/rte_power_guest_channel.h b/lib/librte_power/rte_power_guest_channel.h
index ef3b064a85..c500c0cda6 100644
--- a/lib/librte_power/rte_power_guest_channel.h
+++ b/lib/librte_power/rte_power_guest_channel.h
@@ -116,6 +116,56 @@ struct channel_packet_caps_list {
 	uint8_t num_vcpu;
 };
 
+/**
+ * @internal
+ *
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Send a message contained in pkt over the Virtio-Serial to the host endpoint.
+ *
+ * @param pkt
+ *  Pointer to a populated struct channel_packet.
+ *
+ * @param lcore_id
+ *  Use channel specific to this lcore_id.
+ *
+ * @return
+ *  - 0 on success.
+ *  - Negative on error.
+ */
+__rte_experimental
+int rte_power_guest_channel_send_msg(struct channel_packet *pkt,
+			unsigned int lcore_id);
+
+/**
+ * @internal
+ *
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Receive a message contained in pkt over the Virtio-Serial
+ * from the host endpoint.
+ *
+ * @param pkt
+ *  Pointer to channel_packet or
+ *  channel_packet_freq_list struct.
+ *
+ * @param pkt_len
+ *  Size of expected data packet.
+ *
+ * @param lcore_id
+ *  Use channel specific to this lcore_id.
+ *
+ * @return
+ *  - 0 on success.
+ *  - Negative on error.
+ */
+__rte_experimental
+int rte_power_guest_channel_receive_msg(void *pkt,
+		size_t pkt_len,
+		unsigned int lcore_id);
+
 
 #ifdef __cplusplus
 }
diff --git a/lib/librte_power/rte_power_version.map b/lib/librte_power/rte_power_version.map
index 55a168f56e..0fe85377ab 100644
--- a/lib/librte_power/rte_power_version.map
+++ b/lib/librte_power/rte_power_version.map
@@ -33,4 +33,8 @@ EXPERIMENTAL {
 	rte_power_guest_channel_receive_msg;
 	rte_power_poll_stat_fetch;
 	rte_power_poll_stat_update;
+
+	# added in 21.02
+	rte_power_guest_channel_receive_msg;
+	rte_power_guest_channel_send_msg;
 };
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.566856709 +0100
+++ 0085-power-make-channel-message-functions-public.patch	2021-02-04 12:04:28.082789779 +0100
@@ -1 +1 @@
-From 4d3892dcd77b2f9dc657b426f4871f703cb819b6 Mon Sep 17 00:00:00 2001
+From fe40cc37a81a7fbb430a583e8339f15641288857 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4d3892dcd77b2f9dc657b426f4871f703cb819b6 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
- lib/librte_power/version.map               |  4 ++
+ lib/librte_power/rte_power_version.map     |  4 ++
@@ -22 +23 @@
-index d3d87f0ae2..83186cfbba 100644
+index 7633e62756..a55d5e6d4c 100644
@@ -25 +26 @@
-@@ -65,22 +65,6 @@ void guest_channel_host_disconnect(unsigned int lcore_id);
+@@ -53,22 +53,6 @@ void guest_channel_host_disconnect(unsigned int lcore_id);
@@ -48 +49 @@
-@@ -103,30 +87,6 @@ int power_guest_channel_read_msg(void *pkt,
+@@ -91,30 +75,6 @@ int power_guest_channel_read_msg(void *pkt,
@@ -140,5 +141,5 @@
-diff --git a/lib/librte_power/version.map b/lib/librte_power/version.map
-index 69ca9af616..13f0af3b2d 100644
---- a/lib/librte_power/version.map
-+++ b/lib/librte_power/version.map
-@@ -34,4 +34,8 @@ EXPERIMENTAL {
+diff --git a/lib/librte_power/rte_power_version.map b/lib/librte_power/rte_power_version.map
+index 55a168f56e..0fe85377ab 100644
+--- a/lib/librte_power/rte_power_version.map
++++ b/lib/librte_power/rte_power_version.map
+@@ -33,4 +33,8 @@ EXPERIMENTAL {

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

* [dpdk-stable] patch 'power: rename public structs' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (83 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'power: make channel message functions public' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'power: rename constants' " Christian Ehrhardt
                   ` (54 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Hunt, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/042faf584653819d5aa5e2e29dbd5f850e08748c

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 042faf584653819d5aa5e2e29dbd5f850e08748c Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 21 Jan 2021 17:21:58 +0000
Subject: [PATCH] power: rename public structs

[ upstream commit bd5b6720fe6588ff2d48c70879f355243466f155 ]

Rename the public structs to have an rte_power_ prefix.

Fixes: 210c383e247b ("power: packet format for vm power management")
Fixes: cd0d5547e873 ("power: vm communication channels in guest")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 examples/vm_power_manager/channel_monitor.c   | 33 ++++++------
 examples/vm_power_manager/channel_monitor.h   |  2 +-
 examples/vm_power_manager/guest_cli/main.c    |  2 +-
 .../guest_cli/vm_power_cli_guest.c            | 38 +++++++-------
 .../guest_cli/vm_power_cli_guest.h            |  4 +-
 lib/librte_power/guest_channel.c              |  7 +--
 lib/librte_power/guest_channel.h              |  7 +--
 lib/librte_power/power_kvm_vm.c               |  2 +-
 lib/librte_power/rte_power_guest_channel.h    | 51 +++++++++----------
 9 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 4788d50cfa..ab68b8eb5b 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -108,7 +108,7 @@ str_to_ether_addr(const char *a, struct rte_ether_addr *ether_addr)
 }
 
 static int
-set_policy_mac(struct channel_packet *pkt, int idx, char *mac)
+set_policy_mac(struct rte_power_channel_packet *pkt, int idx, char *mac)
 {
 	union PFID pfid;
 	int ret;
@@ -165,7 +165,7 @@ get_resource_id_from_vmname(const char *vm_name)
 }
 
 static int
-parse_json_to_pkt(json_t *element, struct channel_packet *pkt,
+parse_json_to_pkt(json_t *element, struct rte_power_channel_packet *pkt,
 					const char *vm_name)
 {
 	const char *key;
@@ -173,7 +173,7 @@ parse_json_to_pkt(json_t *element, struct channel_packet *pkt,
 	int ret;
 	int resource_id;
 
-	memset(pkt, 0, sizeof(struct channel_packet));
+	memset(pkt, 0, sizeof(*pkt));
 
 	pkt->nb_mac_to_monitor = 0;
 	pkt->t_boost_status.tbEnabled = false;
@@ -463,7 +463,7 @@ get_pfid(struct policy *pol)
 }
 
 static int
-update_policy(struct channel_packet *pkt)
+update_policy(struct rte_power_channel_packet *pkt)
 {
 
 	unsigned int updated = 0;
@@ -512,7 +512,7 @@ update_policy(struct channel_packet *pkt)
 }
 
 static int
-remove_policy(struct channel_packet *pkt __rte_unused)
+remove_policy(struct rte_power_channel_packet *pkt __rte_unused)
 {
 	unsigned int i;
 
@@ -673,7 +673,7 @@ static void
 apply_policy(struct policy *pol)
 {
 
-	struct channel_packet *pkt = &pol->pkt;
+	struct rte_power_channel_packet *pkt = &pol->pkt;
 
 	/*Check policy to use*/
 	if (pkt->policy_to_use == TRAFFIC)
@@ -715,12 +715,12 @@ write_binary_packet(void *buffer,
 }
 
 static int
-send_freq(struct channel_packet *pkt,
+send_freq(struct rte_power_channel_packet *pkt,
 		struct channel_info *chan_info,
 		bool freq_list)
 {
 	unsigned int vcore_id = pkt->resource_id;
-	struct channel_packet_freq_list channel_pkt_freq_list;
+	struct rte_power_channel_packet_freq_list channel_pkt_freq_list;
 	struct vm_info info;
 
 	if (get_info_vm(pkt->vm_name, &info) != 0)
@@ -751,12 +751,12 @@ send_freq(struct channel_packet *pkt,
 }
 
 static int
-send_capabilities(struct channel_packet *pkt,
+send_capabilities(struct rte_power_channel_packet *pkt,
 		struct channel_info *chan_info,
 		bool list_requested)
 {
 	unsigned int vcore_id = pkt->resource_id;
-	struct channel_packet_caps_list channel_pkt_caps_list;
+	struct rte_power_channel_packet_caps_list channel_pkt_caps_list;
 	struct vm_info info;
 	struct rte_power_core_capabilities caps;
 	int ret;
@@ -805,18 +805,19 @@ send_capabilities(struct channel_packet *pkt,
 }
 
 static int
-send_ack_for_received_cmd(struct channel_packet *pkt,
+send_ack_for_received_cmd(struct rte_power_channel_packet *pkt,
 		struct channel_info *chan_info,
 		uint32_t command)
 {
 	pkt->command = command;
 	return write_binary_packet(pkt,
-			sizeof(struct channel_packet),
+			sizeof(*pkt),
 			chan_info);
 }
 
 static int
-process_request(struct channel_packet *pkt, struct channel_info *chan_info)
+process_request(struct rte_power_channel_packet *pkt,
+		struct channel_info *chan_info)
 {
 	int ret;
 
@@ -988,7 +989,7 @@ channel_monitor_init(void)
 static void
 read_binary_packet(struct channel_info *chan_info)
 {
-	struct channel_packet pkt;
+	struct rte_power_channel_packet pkt;
 	void *buffer = &pkt;
 	int buffer_len = sizeof(pkt);
 	int n_bytes, err = 0;
@@ -1019,7 +1020,7 @@ read_binary_packet(struct channel_info *chan_info)
 static void
 read_json_packet(struct channel_info *chan_info)
 {
-	struct channel_packet pkt;
+	struct rte_power_channel_packet pkt;
 	int n_bytes, ret;
 	json_t *root;
 	json_error_t error;
@@ -1063,7 +1064,7 @@ read_json_packet(struct channel_info *chan_info)
 			/*
 			 * Because our data is now in the json
 			 * object, we can overwrite the pkt
-			 * with a channel_packet struct, using
+			 * with a rte_power_channel_packet struct, using
 			 * parse_json_to_pkt()
 			 */
 			ret = parse_json_to_pkt(root, &pkt, resource_name);
diff --git a/examples/vm_power_manager/channel_monitor.h b/examples/vm_power_manager/channel_monitor.h
index 4a526ff670..0ca6207ad8 100644
--- a/examples/vm_power_manager/channel_monitor.h
+++ b/examples/vm_power_manager/channel_monitor.h
@@ -18,7 +18,7 @@ struct core_share {
 };
 
 struct policy {
-	struct channel_packet pkt;
+	struct rte_power_channel_packet pkt;
 	uint32_t pfid[MAX_VFS];
 	uint32_t port[MAX_VFS];
 	unsigned int enabled;
diff --git a/examples/vm_power_manager/guest_cli/main.c b/examples/vm_power_manager/guest_cli/main.c
index f63b3c988a..fc7a8c30af 100644
--- a/examples/vm_power_manager/guest_cli/main.c
+++ b/examples/vm_power_manager/guest_cli/main.c
@@ -48,7 +48,7 @@ parse_args(int argc, char **argv)
 		{ "policy", required_argument, 0, 'o'},
 		{NULL, 0, 0, 0}
 	};
-	struct channel_packet *policy;
+	struct rte_power_channel_packet *policy;
 	unsigned short int hours[MAX_HOURS];
 	unsigned short int cores[MAX_VCPU_PER_VM];
 	unsigned short int ports[MAX_VCPU_PER_VM];
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index f9b47186ee..3260dbd2bb 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -38,9 +38,9 @@ union PFID {
 	uint64_t pfid;
 };
 
-static struct channel_packet policy;
+static struct rte_power_channel_packet policy;
 
-struct channel_packet *
+struct rte_power_channel_packet *
 get_policy(void)
 {
 	return &policy;
@@ -49,7 +49,7 @@ get_policy(void)
 int
 set_policy_mac(int port, int idx)
 {
-	struct channel_packet *policy;
+	struct rte_power_channel_packet *policy;
 	union PFID pfid;
 	int ret;
 
@@ -73,7 +73,7 @@ set_policy_mac(int port, int idx)
 }
 
 int
-set_policy_defaults(struct channel_packet *pkt)
+set_policy_defaults(struct rte_power_channel_packet *pkt)
 {
 	int ret;
 
@@ -145,7 +145,7 @@ struct cmd_freq_list_result {
 };
 
 static int
-query_data(struct channel_packet *pkt, unsigned int lcore_id)
+query_data(struct rte_power_channel_packet *pkt, unsigned int lcore_id)
 {
 	int ret;
 	ret = rte_power_guest_channel_send_msg(pkt, lcore_id);
@@ -157,13 +157,13 @@ query_data(struct channel_packet *pkt, unsigned int lcore_id)
 }
 
 static int
-receive_freq_list(struct channel_packet_freq_list *pkt_freq_list,
+receive_freq_list(struct rte_power_channel_packet_freq_list *pkt_freq_list,
 		unsigned int lcore_id)
 {
 	int ret;
 
 	ret = rte_power_guest_channel_receive_msg(pkt_freq_list,
-			sizeof(struct channel_packet_freq_list),
+			sizeof(*pkt_freq_list),
 			lcore_id);
 	if (ret < 0) {
 		RTE_LOG(ERR, GUEST_CLI, "Error receiving message.\n");
@@ -183,14 +183,14 @@ cmd_query_freq_list_parsed(void *parsed_result,
 {
 	struct cmd_freq_list_result *res = parsed_result;
 	unsigned int lcore_id;
-	struct channel_packet_freq_list pkt_freq_list;
-	struct channel_packet pkt;
+	struct rte_power_channel_packet_freq_list pkt_freq_list;
+	struct rte_power_channel_packet pkt;
 	bool query_list = false;
 	int ret;
 	char *ep;
 
-	memset(&pkt, 0, sizeof(struct channel_packet));
-	memset(&pkt_freq_list, 0, sizeof(struct channel_packet_freq_list));
+	memset(&pkt, 0, sizeof(pkt));
+	memset(&pkt_freq_list, 0, sizeof(pkt_freq_list));
 
 	if (!strcmp(res->cpu_num, "all")) {
 
@@ -267,13 +267,13 @@ struct cmd_query_caps_result {
 };
 
 static int
-receive_capabilities(struct channel_packet_caps_list *pkt_caps_list,
+receive_capabilities(struct rte_power_channel_packet_caps_list *pkt_caps_list,
 		unsigned int lcore_id)
 {
 	int ret;
 
 	ret = rte_power_guest_channel_receive_msg(pkt_caps_list,
-		sizeof(struct channel_packet_caps_list),
+		sizeof(*pkt_caps_list),
 		lcore_id);
 	if (ret < 0) {
 		RTE_LOG(ERR, GUEST_CLI, "Error receiving message.\n");
@@ -293,14 +293,14 @@ cmd_query_caps_list_parsed(void *parsed_result,
 {
 	struct cmd_query_caps_result *res = parsed_result;
 	unsigned int lcore_id;
-	struct channel_packet_caps_list pkt_caps_list;
-	struct channel_packet pkt;
+	struct rte_power_channel_packet_caps_list pkt_caps_list;
+	struct rte_power_channel_packet pkt;
 	bool query_list = false;
 	int ret;
 	char *ep;
 
-	memset(&pkt, 0, sizeof(struct channel_packet));
-	memset(&pkt_caps_list, 0, sizeof(struct channel_packet_caps_list));
+	memset(&pkt, 0, sizeof(pkt));
+	memset(&pkt_caps_list, 0, sizeof(pkt_caps_list));
 
 	if (!strcmp(res->cpu_num, "all")) {
 
@@ -380,7 +380,7 @@ cmdline_parse_inst_t cmd_query_caps_list = {
 static int
 check_response_cmd(unsigned int lcore_id, int *result)
 {
-	struct channel_packet pkt;
+	struct rte_power_channel_packet pkt;
 	int ret;
 
 	ret = rte_power_guest_channel_receive_msg(&pkt, sizeof pkt, lcore_id);
@@ -473,7 +473,7 @@ struct cmd_send_policy_result {
 };
 
 static inline int
-send_policy(struct channel_packet *pkt, struct cmdline *cl)
+send_policy(struct rte_power_channel_packet *pkt, struct cmdline *cl)
 {
 	int ret;
 
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
index 0f82bac604..03af2cda7c 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
@@ -11,11 +11,11 @@ extern "C" {
 
 #include "rte_power_guest_channel.h"
 
-struct channel_packet *get_policy(void);
+struct rte_power_channel_packet *get_policy(void);
 
 int set_policy_mac(int port, int idx);
 
-int set_policy_defaults(struct channel_packet *pkt);
+int set_policy_defaults(struct rte_power_channel_packet *pkt);
 
 void run_cli(__attribute__((unused)) void *arg);
 
diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
index 6eba632393..373589863d 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
@@ -29,7 +29,7 @@ int
 guest_channel_host_connect(const char *path, unsigned int lcore_id)
 {
 	int flags, ret;
-	struct channel_packet pkt;
+	struct rte_power_channel_packet pkt;
 	char fd_path[PATH_MAX];
 	int fd = -1;
 
@@ -93,7 +93,8 @@ error:
 }
 
 int
-guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id)
+guest_channel_send_msg(struct rte_power_channel_packet *pkt,
+		unsigned int lcore_id)
 {
 	int ret, buffer_len = sizeof(*pkt);
 	void *buffer = pkt;
@@ -123,7 +124,7 @@ guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id)
 	return 0;
 }
 
-int rte_power_guest_channel_send_msg(struct channel_packet *pkt,
+int rte_power_guest_channel_send_msg(struct rte_power_channel_packet *pkt,
 			unsigned int lcore_id)
 {
 	return guest_channel_send_msg(pkt, lcore_id);
diff --git a/lib/librte_power/guest_channel.h b/lib/librte_power/guest_channel.h
index a55d5e6d4c..756b16c91d 100644
--- a/lib/librte_power/guest_channel.h
+++ b/lib/librte_power/guest_channel.h
@@ -51,15 +51,16 @@ void guest_channel_host_disconnect(unsigned int lcore_id);
  *  - Negative on channel not connected.
  *  - errno on write to channel error.
  */
-int guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id);
+int guest_channel_send_msg(struct rte_power_channel_packet *pkt,
+		unsigned int lcore_id);
 
 /**
  * Read a message contained in pkt over the Virtio-Serial
  * from the host endpoint.
  *
  * @param pkt
- *  Pointer to channel_packet or
- *  channel_packet_freq_list struct.
+ *  Pointer to rte_power_channel_packet or
+ *  rte_power_channel_packet_freq_list struct.
  *
  * @param pkt_len
  *  Size of expected data packet.
diff --git a/lib/librte_power/power_kvm_vm.c b/lib/librte_power/power_kvm_vm.c
index fa177b57ec..899d738a99 100644
--- a/lib/librte_power/power_kvm_vm.c
+++ b/lib/librte_power/power_kvm_vm.c
@@ -13,7 +13,7 @@
 
 #define FD_PATH "/dev/virtio-ports/virtio.serial.port.poweragent"
 
-static struct channel_packet pkt[RTE_MAX_LCORE];
+static struct rte_power_channel_packet pkt[RTE_MAX_LCORE];
 
 
 int
diff --git a/lib/librte_power/rte_power_guest_channel.h b/lib/librte_power/rte_power_guest_channel.h
index c500c0cda6..c9ab7bae81 100644
--- a/lib/librte_power/rte_power_guest_channel.h
+++ b/lib/librte_power/rte_power_guest_channel.h
@@ -11,7 +11,10 @@ extern "C" {
 #include <stdint.h>
 #include <stdbool.h>
 
-/* --- Incoming messages --- */
+#define MAX_VFS 10
+#define VM_MAX_NAME_SZ 32
+#define MAX_VCPU_PER_VM         8
+#define HOURS 24
 
 /* Valid Commands */
 #define CPU_POWER               1
@@ -19,6 +22,9 @@ extern "C" {
 #define PKT_POLICY              3
 #define PKT_POLICY_REMOVE       4
 
+#define CORE_TYPE_VIRTUAL 0
+#define CORE_TYPE_PHYSICAL 1
+
 /* CPU Power Command Scaling */
 #define CPU_POWER_SCALE_UP      1
 #define CPU_POWER_SCALE_DOWN    2
@@ -43,41 +49,32 @@ extern "C" {
 #define CPU_POWER_FREQ_LIST     3
 #define CPU_POWER_CAPS_LIST     4
 
-#define HOURS 24
-
-#define MAX_VFS 10
-#define VM_MAX_NAME_SZ 32
-
-#define MAX_VCPU_PER_VM         8
-
-struct t_boost_status {
-	bool tbEnabled;
-};
-
-struct timer_profile {
+struct rte_power_timer_profile {
 	int busy_hours[HOURS];
 	int quiet_hours[HOURS];
 	int hours_to_use_traffic_profile[HOURS];
 };
 
-enum workload {HIGH, MEDIUM, LOW};
-enum policy_to_use {
+enum rte_power_workload_level {HIGH, MEDIUM, LOW};
+
+enum rte_power_policy {
 	TRAFFIC,
 	TIME,
 	WORKLOAD,
 	BRANCH_RATIO
 };
 
-struct traffic {
+struct rte_power_traffic_policy {
 	uint32_t min_packet_thresh;
 	uint32_t avg_max_packet_thresh;
 	uint32_t max_max_packet_thresh;
 };
 
-#define CORE_TYPE_VIRTUAL 0
-#define CORE_TYPE_PHYSICAL 1
+struct rte_power_turbo_status {
+	bool tbEnabled;
+};
 
-struct channel_packet {
+struct rte_power_channel_packet {
 	uint64_t resource_id; /**< core_num, device */
 	uint32_t unit;        /**< scale down/up/min/max */
 	uint32_t command;     /**< Power, IO, etc */
@@ -85,17 +82,17 @@ struct channel_packet {
 
 	uint64_t vfid[MAX_VFS];
 	int nb_mac_to_monitor;
-	struct traffic traffic_policy;
+	struct rte_power_traffic_policy traffic_policy;
 	uint8_t vcpu_to_control[MAX_VCPU_PER_VM];
 	uint8_t num_vcpu;
-	struct timer_profile timer_policy;
+	struct rte_power_timer_profile timer_policy;
 	bool core_type;
-	enum workload workload;
-	enum policy_to_use policy_to_use;
-	struct t_boost_status t_boost_status;
+	enum rte_power_workload_level workload;
+	enum rte_power_policy policy_to_use;
+	struct rte_power_turbo_status t_boost_status;
 };
 
-struct channel_packet_freq_list {
+struct rte_power_channel_packet_freq_list {
 	uint64_t resource_id; /**< core_num, device */
 	uint32_t unit;        /**< scale down/up/min/max */
 	uint32_t command;     /**< Power, IO, etc */
@@ -105,7 +102,7 @@ struct channel_packet_freq_list {
 	uint8_t num_vcpu;
 };
 
-struct channel_packet_caps_list {
+struct rte_power_channel_packet_caps_list {
 	uint64_t resource_id; /**< core_num, device */
 	uint32_t unit;        /**< scale down/up/min/max */
 	uint32_t command;     /**< Power, IO, etc */
@@ -135,7 +132,7 @@ struct channel_packet_caps_list {
  *  - Negative on error.
  */
 __rte_experimental
-int rte_power_guest_channel_send_msg(struct channel_packet *pkt,
+int rte_power_guest_channel_send_msg(struct rte_power_channel_packet *pkt,
 			unsigned int lcore_id);
 
 /**
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.602467216 +0100
+++ 0086-power-rename-public-structs.patch	2021-02-04 12:04:28.086789783 +0100
@@ -1 +1 @@
-From bd5b6720fe6588ff2d48c70879f355243466f155 Mon Sep 17 00:00:00 2001
+From 042faf584653819d5aa5e2e29dbd5f850e08748c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bd5b6720fe6588ff2d48c70879f355243466f155 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 08306105d3..1b6041b6f8 100644
+index 4788d50cfa..ab68b8eb5b 100644
@@ -192 +193 @@
-index cf1636e784..125dfeb10a 100644
+index f9b47186ee..3260dbd2bb 100644
@@ -323 +324 @@
-index 2299d23dce..5d285ca9de 100644
+index 0f82bac604..03af2cda7c 100644
@@ -338 +339 @@
- void run_cli(__rte_unused void *arg);
+ void run_cli(__attribute__((unused)) void *arg);
@@ -341 +342 @@
-index 4cb5ae1ddf..9eb2f63306 100644
+index 6eba632393..373589863d 100644
@@ -344 +345 @@
-@@ -55,7 +55,7 @@ int
+@@ -29,7 +29,7 @@ int
@@ -353 +354 @@
-@@ -119,7 +119,8 @@ error:
+@@ -93,7 +93,8 @@ error:
@@ -363 +364 @@
-@@ -149,7 +150,7 @@ guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id)
+@@ -123,7 +124,7 @@ guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id)
@@ -373 +374 @@
-index 83186cfbba..a1db4b0580 100644
+index a55d5e6d4c..756b16c91d 100644
@@ -376 +377 @@
-@@ -63,15 +63,16 @@ void guest_channel_host_disconnect(unsigned int lcore_id);
+@@ -51,15 +51,16 @@ void guest_channel_host_disconnect(unsigned int lcore_id);
@@ -397 +398 @@
-index 649ebe85c4..9ae438489e 100644
+index fa177b57ec..899d738a99 100644
@@ -406,0 +408 @@
+ 
@@ -408 +409,0 @@
- power_kvm_vm_check_supported(void)

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

* [dpdk-stable] patch 'power: rename constants' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (84 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'power: rename public structs' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'power: clean up includes' " Christian Ehrhardt
                   ` (53 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Hunt, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b9f75f2721aeac4d1fa7962d2aa89feaa66b64c5 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 21 Jan 2021 17:21:59 +0000
Subject: [PATCH] power: rename constants

[ upstream commit 38d232b9b804eebd458d758f2face173220ee2f8 ]

Rename the #defines to have an RTE_POWER_ prefix

Fixes: 210c383e247b ("power: packet format for vm power management")
Fixes: cd0d5547e873 ("power: vm communication channels in guest")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 examples/vm_power_manager/channel_monitor.c   | 116 +++++++++---------
 examples/vm_power_manager/channel_monitor.h   |   6 +-
 examples/vm_power_manager/guest_cli/main.c    |  29 +++--
 .../guest_cli/vm_power_cli_guest.c            |  28 ++---
 examples/vm_power_manager/main.c              |   2 +-
 lib/librte_power/guest_channel.c              |   2 +-
 lib/librte_power/power_kvm_vm.c               |  14 +--
 lib/librte_power/rte_power_guest_channel.h    |  98 +++++++--------
 8 files changed, 155 insertions(+), 140 deletions(-)

diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index ab68b8eb5b..57a7155aad 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -177,10 +177,10 @@ parse_json_to_pkt(json_t *element, struct rte_power_channel_packet *pkt,
 
 	pkt->nb_mac_to_monitor = 0;
 	pkt->t_boost_status.tbEnabled = false;
-	pkt->workload = LOW;
-	pkt->policy_to_use = TIME;
-	pkt->command = PKT_POLICY;
-	pkt->core_type = CORE_TYPE_PHYSICAL;
+	pkt->workload = RTE_POWER_WL_LOW;
+	pkt->policy_to_use = RTE_POWER_POLICY_TIME;
+	pkt->command = RTE_POWER_PKT_POLICY;
+	pkt->core_type = RTE_POWER_CORE_TYPE_PHYSICAL;
 
 	if (vm_name == NULL) {
 		RTE_LOG(ERR, CHANNEL_MONITOR,
@@ -203,11 +203,11 @@ parse_json_to_pkt(json_t *element, struct rte_power_channel_packet *pkt,
 			char command[32];
 			strlcpy(command, json_string_value(value), 32);
 			if (!strcmp(command, "power")) {
-				pkt->command = CPU_POWER;
+				pkt->command = RTE_POWER_CPU_POWER;
 			} else if (!strcmp(command, "create")) {
-				pkt->command = PKT_POLICY;
+				pkt->command = RTE_POWER_PKT_POLICY;
 			} else if (!strcmp(command, "destroy")) {
-				pkt->command = PKT_POLICY_REMOVE;
+				pkt->command = RTE_POWER_PKT_POLICY_REMOVE;
 			} else {
 				RTE_LOG(ERR, CHANNEL_MONITOR,
 					"Invalid command received in JSON\n");
@@ -217,13 +217,17 @@ parse_json_to_pkt(json_t *element, struct rte_power_channel_packet *pkt,
 			char command[32];
 			strlcpy(command, json_string_value(value), 32);
 			if (!strcmp(command, "TIME")) {
-				pkt->policy_to_use = TIME;
+				pkt->policy_to_use =
+						RTE_POWER_POLICY_TIME;
 			} else if (!strcmp(command, "TRAFFIC")) {
-				pkt->policy_to_use = TRAFFIC;
+				pkt->policy_to_use =
+						RTE_POWER_POLICY_TRAFFIC;
 			} else if (!strcmp(command, "WORKLOAD")) {
-				pkt->policy_to_use = WORKLOAD;
+				pkt->policy_to_use =
+						RTE_POWER_POLICY_WORKLOAD;
 			} else if (!strcmp(command, "BRANCH_RATIO")) {
-				pkt->policy_to_use = BRANCH_RATIO;
+				pkt->policy_to_use =
+						RTE_POWER_POLICY_BRANCH_RATIO;
 			} else {
 				RTE_LOG(ERR, CHANNEL_MONITOR,
 					"Wrong policy_type received in JSON\n");
@@ -233,11 +237,11 @@ parse_json_to_pkt(json_t *element, struct rte_power_channel_packet *pkt,
 			char command[32];
 			strlcpy(command, json_string_value(value), 32);
 			if (!strcmp(command, "HIGH")) {
-				pkt->workload = HIGH;
+				pkt->workload = RTE_POWER_WL_HIGH;
 			} else if (!strcmp(command, "MEDIUM")) {
-				pkt->workload = MEDIUM;
+				pkt->workload = RTE_POWER_WL_MEDIUM;
 			} else if (!strcmp(command, "LOW")) {
-				pkt->workload = LOW;
+				pkt->workload = RTE_POWER_WL_LOW;
 			} else {
 				RTE_LOG(ERR, CHANNEL_MONITOR,
 					"Wrong workload received in JSON\n");
@@ -283,17 +287,17 @@ parse_json_to_pkt(json_t *element, struct rte_power_channel_packet *pkt,
 			char unit[32];
 			strlcpy(unit, json_string_value(value), 32);
 			if (!strcmp(unit, "SCALE_UP")) {
-				pkt->unit = CPU_POWER_SCALE_UP;
+				pkt->unit = RTE_POWER_SCALE_UP;
 			} else if (!strcmp(unit, "SCALE_DOWN")) {
-				pkt->unit = CPU_POWER_SCALE_DOWN;
+				pkt->unit = RTE_POWER_SCALE_DOWN;
 			} else if (!strcmp(unit, "SCALE_MAX")) {
-				pkt->unit = CPU_POWER_SCALE_MAX;
+				pkt->unit = RTE_POWER_SCALE_MAX;
 			} else if (!strcmp(unit, "SCALE_MIN")) {
-				pkt->unit = CPU_POWER_SCALE_MIN;
+				pkt->unit = RTE_POWER_SCALE_MIN;
 			} else if (!strcmp(unit, "ENABLE_TURBO")) {
-				pkt->unit = CPU_POWER_ENABLE_TURBO;
+				pkt->unit = RTE_POWER_ENABLE_TURBO;
 			} else if (!strcmp(unit, "DISABLE_TURBO")) {
-				pkt->unit = CPU_POWER_DISABLE_TURBO;
+				pkt->unit = RTE_POWER_DISABLE_TURBO;
 			} else {
 				RTE_LOG(ERR, CHANNEL_MONITOR,
 					"Invalid command received in JSON\n");
@@ -312,7 +316,7 @@ parse_json_to_pkt(json_t *element, struct rte_power_channel_packet *pkt,
 				vm_name);
 			return -1;
 		}
-		strlcpy(pkt->vm_name, vm_name, VM_MAX_NAME_SZ);
+		strlcpy(pkt->vm_name, vm_name, RTE_POWER_VM_MAX_NAME_SZ);
 		pkt->resource_id = resource_id;
 	}
 	return 0;
@@ -367,7 +371,7 @@ pcpu_monitor(struct policy *pol, struct core_info *ci, int pcpu, int count)
 {
 	int ret = 0;
 
-	if (pol->pkt.policy_to_use == BRANCH_RATIO) {
+	if (pol->pkt.policy_to_use == RTE_POWER_POLICY_BRANCH_RATIO) {
 		ci->cd[pcpu].oob_enabled = 1;
 		ret = add_core_to_monitor(pcpu);
 		if (ret == 0)
@@ -407,7 +411,7 @@ get_pcpu_to_control(struct policy *pol)
 	 * differenciate between them when adding them to the branch monitor.
 	 * Virtual cores need to be converted to physical cores.
 	 */
-	if (pol->pkt.core_type == CORE_TYPE_VIRTUAL) {
+	if (pol->pkt.core_type == RTE_POWER_CORE_TYPE_VIRTUAL) {
 		/*
 		 * If the cores in the policy are virtual, we need to map them
 		 * to physical core. We look up the vm info and use that for
@@ -479,7 +483,8 @@ update_policy(struct rte_power_channel_packet *pkt)
 			policies[i].pkt = *pkt;
 			get_pcpu_to_control(&policies[i]);
 			/* Check Eth dev only for Traffic policy */
-			if (policies[i].pkt.policy_to_use == TRAFFIC) {
+			if (policies[i].pkt.policy_to_use ==
+					RTE_POWER_POLICY_TRAFFIC) {
 				if (get_pfid(&policies[i]) < 0) {
 					updated = 1;
 					break;
@@ -496,7 +501,8 @@ update_policy(struct rte_power_channel_packet *pkt)
 				policies[i].pkt = *pkt;
 				get_pcpu_to_control(&policies[i]);
 				/* Check Eth dev only for Traffic policy */
-				if (policies[i].pkt.policy_to_use == TRAFFIC) {
+				if (policies[i].pkt.policy_to_use ==
+						RTE_POWER_POLICY_TRAFFIC) {
 					if (get_pfid(&policies[i]) < 0) {
 						updated = 1;
 						break;
@@ -615,7 +621,7 @@ apply_time_profile(struct policy *pol)
 	/* Format the date and time, down to a single second. */
 	strftime(time_string, sizeof(time_string), "%Y-%m-%d %H:%M:%S", ptm);
 
-	for (x = 0; x < HOURS; x++) {
+	for (x = 0; x < RTE_POWER_HOURS_PER_DAY; x++) {
 
 		if (ptm->tm_hour == pol->pkt.timer_policy.busy_hours[x]) {
 			for (count = 0; count < pol->pkt.num_vcpu; count++) {
@@ -648,19 +654,19 @@ apply_workload_profile(struct policy *pol)
 
 	int count;
 
-	if (pol->pkt.workload == HIGH) {
+	if (pol->pkt.workload == RTE_POWER_WL_HIGH) {
 		for (count = 0; count < pol->pkt.num_vcpu; count++) {
 			if (pol->core_share[count].status != 1)
 				power_manager_scale_core_max(
 						pol->core_share[count].pcpu);
 		}
-	} else if (pol->pkt.workload == MEDIUM) {
+	} else if (pol->pkt.workload == RTE_POWER_WL_MEDIUM) {
 		for (count = 0; count < pol->pkt.num_vcpu; count++) {
 			if (pol->core_share[count].status != 1)
 				power_manager_scale_core_med(
 						pol->core_share[count].pcpu);
 		}
-	} else if (pol->pkt.workload == LOW) {
+	} else if (pol->pkt.workload == RTE_POWER_WL_LOW) {
 		for (count = 0; count < pol->pkt.num_vcpu; count++) {
 			if (pol->core_share[count].status != 1)
 				power_manager_scale_core_min(
@@ -676,11 +682,11 @@ apply_policy(struct policy *pol)
 	struct rte_power_channel_packet *pkt = &pol->pkt;
 
 	/*Check policy to use*/
-	if (pkt->policy_to_use == TRAFFIC)
+	if (pkt->policy_to_use == RTE_POWER_POLICY_TRAFFIC)
 		apply_traffic_profile(pol);
-	else if (pkt->policy_to_use == TIME)
+	else if (pkt->policy_to_use == RTE_POWER_POLICY_TIME)
 		apply_time_profile(pol);
-	else if (pkt->policy_to_use == WORKLOAD)
+	else if (pkt->policy_to_use == RTE_POWER_POLICY_WORKLOAD)
 		apply_workload_profile(pol);
 }
 
@@ -726,13 +732,13 @@ send_freq(struct rte_power_channel_packet *pkt,
 	if (get_info_vm(pkt->vm_name, &info) != 0)
 		return -1;
 
-	if (!freq_list && vcore_id >= MAX_VCPU_PER_VM)
+	if (!freq_list && vcore_id >= RTE_POWER_MAX_VCPU_PER_VM)
 		return -1;
 
 	if (!info.allow_query)
 		return -1;
 
-	channel_pkt_freq_list.command = CPU_POWER_FREQ_LIST;
+	channel_pkt_freq_list.command = RTE_POWER_FREQ_LIST;
 	channel_pkt_freq_list.num_vcpu = info.num_vcpus;
 
 	if (freq_list) {
@@ -764,13 +770,13 @@ send_capabilities(struct rte_power_channel_packet *pkt,
 	if (get_info_vm(pkt->vm_name, &info) != 0)
 		return -1;
 
-	if (!list_requested && vcore_id >= MAX_VCPU_PER_VM)
+	if (!list_requested && vcore_id >= RTE_POWER_MAX_VCPU_PER_VM)
 		return -1;
 
 	if (!info.allow_query)
 		return -1;
 
-	channel_pkt_caps_list.command = CPU_POWER_CAPS_LIST;
+	channel_pkt_caps_list.command = RTE_POWER_CAPS_LIST;
 	channel_pkt_caps_list.num_vcpu = info.num_vcpus;
 
 	if (list_requested) {
@@ -828,10 +834,10 @@ process_request(struct rte_power_channel_packet *pkt,
 			CHANNEL_MGR_CHANNEL_PROCESSING) == 0)
 		return -1;
 
-	if (pkt->command == CPU_POWER) {
+	if (pkt->command == RTE_POWER_CPU_POWER) {
 		unsigned int core_num;
 
-		if (pkt->core_type == CORE_TYPE_VIRTUAL)
+		if (pkt->core_type == RTE_POWER_CORE_TYPE_VIRTUAL)
 			core_num = get_pcpu(chan_info, pkt->resource_id);
 		else
 			core_num = pkt->resource_id;
@@ -843,22 +849,22 @@ process_request(struct rte_power_channel_packet *pkt,
 		bool valid_unit = true;
 
 		switch (pkt->unit) {
-		case(CPU_POWER_SCALE_MIN):
+		case(RTE_POWER_SCALE_MIN):
 			scale_res = power_manager_scale_core_min(core_num);
 			break;
-		case(CPU_POWER_SCALE_MAX):
+		case(RTE_POWER_SCALE_MAX):
 			scale_res = power_manager_scale_core_max(core_num);
 			break;
-		case(CPU_POWER_SCALE_DOWN):
+		case(RTE_POWER_SCALE_DOWN):
 			scale_res = power_manager_scale_core_down(core_num);
 			break;
-		case(CPU_POWER_SCALE_UP):
+		case(RTE_POWER_SCALE_UP):
 			scale_res = power_manager_scale_core_up(core_num);
 			break;
-		case(CPU_POWER_ENABLE_TURBO):
+		case(RTE_POWER_ENABLE_TURBO):
 			scale_res = power_manager_enable_turbo_core(core_num);
 			break;
-		case(CPU_POWER_DISABLE_TURBO):
+		case(RTE_POWER_DISABLE_TURBO):
 			scale_res = power_manager_disable_turbo_core(core_num);
 			break;
 		default:
@@ -870,8 +876,8 @@ process_request(struct rte_power_channel_packet *pkt,
 			ret = send_ack_for_received_cmd(pkt,
 					chan_info,
 					scale_res >= 0 ?
-						CPU_POWER_CMD_ACK :
-						CPU_POWER_CMD_NACK);
+						RTE_POWER_CMD_ACK :
+						RTE_POWER_CMD_NACK);
 			if (ret < 0)
 				RTE_LOG(ERR, CHANNEL_MONITOR, "Error during sending ack command.\n");
 		} else
@@ -879,19 +885,19 @@ process_request(struct rte_power_channel_packet *pkt,
 
 	}
 
-	if (pkt->command == PKT_POLICY) {
+	if (pkt->command == RTE_POWER_PKT_POLICY) {
 		RTE_LOG(INFO, CHANNEL_MONITOR, "Processing policy request %s\n",
 				pkt->vm_name);
 		int ret = send_ack_for_received_cmd(pkt,
 				chan_info,
-				CPU_POWER_CMD_ACK);
+				RTE_POWER_CMD_ACK);
 		if (ret < 0)
 			RTE_LOG(ERR, CHANNEL_MONITOR, "Error during sending ack command.\n");
 		update_policy(pkt);
 		policy_is_set = 1;
 	}
 
-	if (pkt->command == PKT_POLICY_REMOVE) {
+	if (pkt->command == RTE_POWER_PKT_POLICY_REMOVE) {
 		ret = remove_policy(pkt);
 		if (ret == 0)
 			RTE_LOG(INFO, CHANNEL_MONITOR,
@@ -901,26 +907,26 @@ process_request(struct rte_power_channel_packet *pkt,
 				 "Policy %s does not exist\n", pkt->vm_name);
 	}
 
-	if (pkt->command == CPU_POWER_QUERY_FREQ_LIST ||
-		pkt->command == CPU_POWER_QUERY_FREQ) {
+	if (pkt->command == RTE_POWER_QUERY_FREQ_LIST ||
+		pkt->command == RTE_POWER_QUERY_FREQ) {
 
 		RTE_LOG(INFO, CHANNEL_MONITOR,
 			"Frequency for %s requested.\n", pkt->vm_name);
 		int ret = send_freq(pkt,
 				chan_info,
-				pkt->command == CPU_POWER_QUERY_FREQ_LIST);
+				pkt->command == RTE_POWER_QUERY_FREQ_LIST);
 		if (ret < 0)
 			RTE_LOG(ERR, CHANNEL_MONITOR, "Error during frequency sending.\n");
 	}
 
-	if (pkt->command == CPU_POWER_QUERY_CAPS_LIST ||
-		pkt->command == CPU_POWER_QUERY_CAPS) {
+	if (pkt->command == RTE_POWER_QUERY_CAPS_LIST ||
+		pkt->command == RTE_POWER_QUERY_CAPS) {
 
 		RTE_LOG(INFO, CHANNEL_MONITOR,
 			"Capabilities for %s requested.\n", pkt->vm_name);
 		int ret = send_capabilities(pkt,
 				chan_info,
-				pkt->command == CPU_POWER_QUERY_CAPS_LIST);
+				pkt->command == RTE_POWER_QUERY_CAPS_LIST);
 		if (ret < 0)
 			RTE_LOG(ERR, CHANNEL_MONITOR, "Error during sending capabilities.\n");
 	}
diff --git a/examples/vm_power_manager/channel_monitor.h b/examples/vm_power_manager/channel_monitor.h
index 0ca6207ad8..5d3537b911 100644
--- a/examples/vm_power_manager/channel_monitor.h
+++ b/examples/vm_power_manager/channel_monitor.h
@@ -19,10 +19,10 @@ struct core_share {
 
 struct policy {
 	struct rte_power_channel_packet pkt;
-	uint32_t pfid[MAX_VFS];
-	uint32_t port[MAX_VFS];
+	uint32_t pfid[RTE_POWER_MAX_VFS];
+	uint32_t port[RTE_POWER_MAX_VFS];
 	unsigned int enabled;
-	struct core_share core_share[MAX_VCPU_PER_VM];
+	struct core_share core_share[RTE_POWER_MAX_VCPU_PER_VM];
 };
 
 #ifdef __cplusplus
diff --git a/examples/vm_power_manager/guest_cli/main.c b/examples/vm_power_manager/guest_cli/main.c
index fc7a8c30af..4e17f7fb90 100644
--- a/examples/vm_power_manager/guest_cli/main.c
+++ b/examples/vm_power_manager/guest_cli/main.c
@@ -50,8 +50,8 @@ parse_args(int argc, char **argv)
 	};
 	struct rte_power_channel_packet *policy;
 	unsigned short int hours[MAX_HOURS];
-	unsigned short int cores[MAX_VCPU_PER_VM];
-	unsigned short int ports[MAX_VCPU_PER_VM];
+	unsigned short int cores[RTE_POWER_MAX_VCPU_PER_VM];
+	unsigned short int ports[RTE_POWER_MAX_VCPU_PER_VM];
 	int i, cnt, idx;
 
 	policy = get_policy();
@@ -69,7 +69,8 @@ parse_args(int argc, char **argv)
 		switch (opt) {
 		/* portmask */
 		case 'n':
-			strlcpy(policy->vm_name, optarg, VM_MAX_NAME_SZ);
+			strlcpy(policy->vm_name, optarg,
+					RTE_POWER_VM_MAX_NAME_SZ);
 			printf("Setting VM Name to [%s]\n", policy->vm_name);
 			break;
 		case 'b':
@@ -97,14 +98,15 @@ parse_args(int argc, char **argv)
 			}
 			break;
 		case 'l':
-			cnt = parse_set(optarg, cores, MAX_VCPU_PER_VM);
+			cnt = parse_set(optarg, cores,
+					RTE_POWER_MAX_VCPU_PER_VM);
 			if (cnt < 0) {
 				printf("Invalid value passed to vcpu-list - [%s]\n",
 						optarg);
 				break;
 			}
 			idx = 0;
-			for (i = 0; i < MAX_VCPU_PER_VM; i++) {
+			for (i = 0; i < RTE_POWER_MAX_VCPU_PER_VM; i++) {
 				if (cores[i]) {
 					printf("***Using core %d\n", i);
 					policy->vcpu_to_control[idx++] = i;
@@ -114,14 +116,15 @@ parse_args(int argc, char **argv)
 			printf("Total cores: %d\n", idx);
 			break;
 		case 'p':
-			cnt = parse_set(optarg, ports, MAX_VCPU_PER_VM);
+			cnt = parse_set(optarg, ports,
+					RTE_POWER_MAX_VCPU_PER_VM);
 			if (cnt < 0) {
 				printf("Invalid value passed to port-list - [%s]\n",
 						optarg);
 				break;
 			}
 			idx = 0;
-			for (i = 0; i < MAX_VCPU_PER_VM; i++) {
+			for (i = 0; i < RTE_POWER_MAX_VCPU_PER_VM; i++) {
 				if (ports[i]) {
 					printf("***Using port %d\n", i);
 					if (set_policy_mac(i, idx++) != 0) {
@@ -135,13 +138,17 @@ parse_args(int argc, char **argv)
 			break;
 		case 'o':
 			if (!strcmp(optarg, "TRAFFIC"))
-				policy->policy_to_use = TRAFFIC;
+				policy->policy_to_use =
+						RTE_POWER_POLICY_TRAFFIC;
 			else if (!strcmp(optarg, "TIME"))
-				policy->policy_to_use = TIME;
+				policy->policy_to_use =
+						RTE_POWER_POLICY_TIME;
 			else if (!strcmp(optarg, "WORKLOAD"))
-				policy->policy_to_use = WORKLOAD;
+				policy->policy_to_use =
+						RTE_POWER_POLICY_WORKLOAD;
 			else if (!strcmp(optarg, "BRANCH_RATIO"))
-				policy->policy_to_use = BRANCH_RATIO;
+				policy->policy_to_use =
+						RTE_POWER_POLICY_BRANCH_RATIO;
 			else {
 				printf("Invalid policy specified: %s\n",
 						optarg);
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index 3260dbd2bb..ceb59cad7b 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -103,10 +103,10 @@ set_policy_defaults(struct rte_power_channel_packet *pkt)
 	pkt->timer_policy.hours_to_use_traffic_profile[0] = 8;
 	pkt->timer_policy.hours_to_use_traffic_profile[1] = 10;
 
-	pkt->core_type = CORE_TYPE_VIRTUAL;
-	pkt->workload = LOW;
-	pkt->policy_to_use = TIME;
-	pkt->command = PKT_POLICY;
+	pkt->core_type = RTE_POWER_CORE_TYPE_VIRTUAL;
+	pkt->workload = RTE_POWER_WL_LOW;
+	pkt->policy_to_use = RTE_POWER_POLICY_TIME;
+	pkt->command = RTE_POWER_PKT_POLICY;
 	strlcpy(pkt->vm_name, "ubuntu2", sizeof(pkt->vm_name));
 
 	return 0;
@@ -169,7 +169,7 @@ receive_freq_list(struct rte_power_channel_packet_freq_list *pkt_freq_list,
 		RTE_LOG(ERR, GUEST_CLI, "Error receiving message.\n");
 		return -1;
 	}
-	if (pkt_freq_list->command != CPU_POWER_FREQ_LIST) {
+	if (pkt_freq_list->command != RTE_POWER_FREQ_LIST) {
 		RTE_LOG(ERR, GUEST_CLI, "Unexpected message received.\n");
 		return -1;
 	}
@@ -203,18 +203,18 @@ cmd_query_freq_list_parsed(void *parsed_result,
 			return;
 		}
 
-		pkt.command = CPU_POWER_QUERY_FREQ_LIST;
+		pkt.command = RTE_POWER_QUERY_FREQ_LIST;
 		strlcpy(pkt.vm_name, policy.vm_name, sizeof(pkt.vm_name));
 		query_list = true;
 	} else {
 		errno = 0;
 		lcore_id = (unsigned int)strtol(res->cpu_num, &ep, 10);
-		if (errno != 0 || lcore_id >= MAX_VCPU_PER_VM ||
+		if (errno != 0 || lcore_id >= RTE_POWER_MAX_VCPU_PER_VM ||
 			ep == res->cpu_num) {
 			cmdline_printf(cl, "Invalid parameter provided.\n");
 			return;
 		}
-		pkt.command = CPU_POWER_QUERY_FREQ;
+		pkt.command = RTE_POWER_QUERY_FREQ;
 		strlcpy(pkt.vm_name, policy.vm_name, sizeof(pkt.vm_name));
 		pkt.resource_id = lcore_id;
 	}
@@ -279,7 +279,7 @@ receive_capabilities(struct rte_power_channel_packet_caps_list *pkt_caps_list,
 		RTE_LOG(ERR, GUEST_CLI, "Error receiving message.\n");
 		return -1;
 	}
-	if (pkt_caps_list->command != CPU_POWER_CAPS_LIST) {
+	if (pkt_caps_list->command != RTE_POWER_CAPS_LIST) {
 		RTE_LOG(ERR, GUEST_CLI, "Unexpected message received.\n");
 		return -1;
 	}
@@ -313,18 +313,18 @@ cmd_query_caps_list_parsed(void *parsed_result,
 			return;
 		}
 
-		pkt.command = CPU_POWER_QUERY_CAPS_LIST;
+		pkt.command = RTE_POWER_QUERY_CAPS_LIST;
 		strlcpy(pkt.vm_name, policy.vm_name, sizeof(pkt.vm_name));
 		query_list = true;
 	} else {
 		errno = 0;
 		lcore_id = (unsigned int)strtol(res->cpu_num, &ep, 10);
-		if (errno != 0 || lcore_id >= MAX_VCPU_PER_VM ||
+		if (errno != 0 || lcore_id >= RTE_POWER_MAX_VCPU_PER_VM ||
 			ep == res->cpu_num) {
 			cmdline_printf(cl, "Invalid parameter provided.\n");
 			return;
 		}
-		pkt.command = CPU_POWER_QUERY_CAPS;
+		pkt.command = RTE_POWER_QUERY_CAPS;
 		strlcpy(pkt.vm_name, policy.vm_name, sizeof(pkt.vm_name));
 		pkt.resource_id = lcore_id;
 	}
@@ -388,10 +388,10 @@ check_response_cmd(unsigned int lcore_id, int *result)
 		return -1;
 
 	switch (pkt.command) {
-	case(CPU_POWER_CMD_ACK):
+	case(RTE_POWER_CMD_ACK):
 		*result = 1;
 		break;
-	case(CPU_POWER_CMD_NACK):
+	case(RTE_POWER_CMD_NACK):
 		*result = 0;
 		break;
 	default:
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index 0409a832b5..2316aace5a 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -395,7 +395,7 @@ main(int argc, char **argv)
 					"Cannot init port %"PRIu8 "\n",
 					portid);
 
-			for (w = 0; w < MAX_VFS; w++) {
+			for (w = 0; w < RTE_POWER_MAX_VFS; w++) {
 				eth.addr_bytes[5] = w + 0xf0;
 
 				ret = -ENOTSUP;
diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
index 373589863d..ff2ad38466 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
@@ -74,7 +74,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
 	/* Send a test packet, this command is ignored by the host, but a successful
 	 * send indicates that the host endpoint is monitoring.
 	 */
-	pkt.command = CPU_POWER_CONNECT;
+	pkt.command = RTE_POWER_CPU_POWER_CONNECT;
 	global_fds[lcore_id] = fd;
 	ret = guest_channel_send_msg(&pkt, lcore_id);
 	if (ret != 0) {
diff --git a/lib/librte_power/power_kvm_vm.c b/lib/librte_power/power_kvm_vm.c
index 899d738a99..86a349f493 100644
--- a/lib/librte_power/power_kvm_vm.c
+++ b/lib/librte_power/power_kvm_vm.c
@@ -24,7 +24,7 @@ power_kvm_vm_init(unsigned int lcore_id)
 				lcore_id, RTE_MAX_LCORE-1);
 		return -1;
 	}
-	pkt[lcore_id].command = CPU_POWER;
+	pkt[lcore_id].command = RTE_POWER_CPU_POWER;
 	pkt[lcore_id].resource_id = lcore_id;
 	return guest_channel_host_connect(FD_PATH, lcore_id);
 }
@@ -85,25 +85,25 @@ send_msg(unsigned int lcore_id, uint32_t scale_direction)
 int
 power_kvm_vm_freq_up(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_SCALE_UP);
+	return send_msg(lcore_id, RTE_POWER_SCALE_UP);
 }
 
 int
 power_kvm_vm_freq_down(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_SCALE_DOWN);
+	return send_msg(lcore_id, RTE_POWER_SCALE_DOWN);
 }
 
 int
 power_kvm_vm_freq_max(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_SCALE_MAX);
+	return send_msg(lcore_id, RTE_POWER_SCALE_MAX);
 }
 
 int
 power_kvm_vm_freq_min(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_SCALE_MIN);
+	return send_msg(lcore_id, RTE_POWER_SCALE_MIN);
 }
 
 int
@@ -116,13 +116,13 @@ power_kvm_vm_turbo_status(__attribute__((unused)) unsigned int lcore_id)
 int
 power_kvm_vm_enable_turbo(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_ENABLE_TURBO);
+	return send_msg(lcore_id, RTE_POWER_ENABLE_TURBO);
 }
 
 int
 power_kvm_vm_disable_turbo(unsigned int lcore_id)
 {
-	return send_msg(lcore_id, CPU_POWER_DISABLE_TURBO);
+	return send_msg(lcore_id, RTE_POWER_DISABLE_TURBO);
 }
 
 struct rte_power_core_capabilities;
diff --git a/lib/librte_power/rte_power_guest_channel.h b/lib/librte_power/rte_power_guest_channel.h
index c9ab7bae81..b9273a025c 100644
--- a/lib/librte_power/rte_power_guest_channel.h
+++ b/lib/librte_power/rte_power_guest_channel.h
@@ -11,63 +11,65 @@ extern "C" {
 #include <stdint.h>
 #include <stdbool.h>
 
-#define MAX_VFS 10
-#define VM_MAX_NAME_SZ 32
-#define MAX_VCPU_PER_VM         8
-#define HOURS 24
+#define RTE_POWER_MAX_VFS 10
+#define RTE_POWER_VM_MAX_NAME_SZ 32
+#define RTE_POWER_MAX_VCPU_PER_VM 8
+#define RTE_POWER_HOURS_PER_DAY 24
 
 /* Valid Commands */
-#define CPU_POWER               1
-#define CPU_POWER_CONNECT       2
-#define PKT_POLICY              3
-#define PKT_POLICY_REMOVE       4
+#define RTE_POWER_CPU_POWER               1
+#define RTE_POWER_CPU_POWER_CONNECT       2
+#define RTE_POWER_PKT_POLICY              3
+#define RTE_POWER_PKT_POLICY_REMOVE       4
 
-#define CORE_TYPE_VIRTUAL 0
-#define CORE_TYPE_PHYSICAL 1
+#define RTE_POWER_CORE_TYPE_VIRTUAL 0
+#define RTE_POWER_CORE_TYPE_PHYSICAL 1
 
 /* CPU Power Command Scaling */
-#define CPU_POWER_SCALE_UP      1
-#define CPU_POWER_SCALE_DOWN    2
-#define CPU_POWER_SCALE_MAX     3
-#define CPU_POWER_SCALE_MIN     4
-#define CPU_POWER_ENABLE_TURBO  5
-#define CPU_POWER_DISABLE_TURBO 6
+#define RTE_POWER_SCALE_UP      1
+#define RTE_POWER_SCALE_DOWN    2
+#define RTE_POWER_SCALE_MAX     3
+#define RTE_POWER_SCALE_MIN     4
+#define RTE_POWER_ENABLE_TURBO  5
+#define RTE_POWER_DISABLE_TURBO 6
 
 /* CPU Power Queries */
-#define CPU_POWER_QUERY_FREQ_LIST  7
-#define CPU_POWER_QUERY_FREQ       8
-#define CPU_POWER_QUERY_CAPS_LIST  9
-#define CPU_POWER_QUERY_CAPS       10
-
-/* --- Outgoing messages --- */
+#define RTE_POWER_QUERY_FREQ_LIST  7
+#define RTE_POWER_QUERY_FREQ       8
+#define RTE_POWER_QUERY_CAPS_LIST  9
+#define RTE_POWER_QUERY_CAPS       10
 
 /* Generic Power Command Response */
-#define CPU_POWER_CMD_ACK       1
-#define CPU_POWER_CMD_NACK      2
+#define RTE_POWER_CMD_ACK       1
+#define RTE_POWER_CMD_NACK      2
 
 /* CPU Power Query Responses */
-#define CPU_POWER_FREQ_LIST     3
-#define CPU_POWER_CAPS_LIST     4
+#define RTE_POWER_FREQ_LIST     3
+#define RTE_POWER_CAPS_LIST     4
 
-struct rte_power_timer_profile {
-	int busy_hours[HOURS];
-	int quiet_hours[HOURS];
-	int hours_to_use_traffic_profile[HOURS];
+struct rte_power_traffic_policy {
+	uint32_t min_packet_thresh;
+	uint32_t avg_max_packet_thresh;
+	uint32_t max_max_packet_thresh;
 };
 
-enum rte_power_workload_level {HIGH, MEDIUM, LOW};
+struct rte_power_timer_profile {
+	int busy_hours[RTE_POWER_HOURS_PER_DAY];
+	int quiet_hours[RTE_POWER_HOURS_PER_DAY];
+	int hours_to_use_traffic_profile[RTE_POWER_HOURS_PER_DAY];
+};
 
-enum rte_power_policy {
-	TRAFFIC,
-	TIME,
-	WORKLOAD,
-	BRANCH_RATIO
+enum rte_power_workload_level {
+	RTE_POWER_WL_HIGH,
+	RTE_POWER_WL_MEDIUM,
+	RTE_POWER_WL_LOW
 };
 
-struct rte_power_traffic_policy {
-	uint32_t min_packet_thresh;
-	uint32_t avg_max_packet_thresh;
-	uint32_t max_max_packet_thresh;
+enum rte_power_policy {
+	RTE_POWER_POLICY_TRAFFIC,
+	RTE_POWER_POLICY_TIME,
+	RTE_POWER_POLICY_WORKLOAD,
+	RTE_POWER_POLICY_BRANCH_RATIO
 };
 
 struct rte_power_turbo_status {
@@ -78,12 +80,12 @@ struct rte_power_channel_packet {
 	uint64_t resource_id; /**< core_num, device */
 	uint32_t unit;        /**< scale down/up/min/max */
 	uint32_t command;     /**< Power, IO, etc */
-	char vm_name[VM_MAX_NAME_SZ];
+	char vm_name[RTE_POWER_VM_MAX_NAME_SZ];
 
-	uint64_t vfid[MAX_VFS];
+	uint64_t vfid[RTE_POWER_MAX_VFS];
 	int nb_mac_to_monitor;
 	struct rte_power_traffic_policy traffic_policy;
-	uint8_t vcpu_to_control[MAX_VCPU_PER_VM];
+	uint8_t vcpu_to_control[RTE_POWER_MAX_VCPU_PER_VM];
 	uint8_t num_vcpu;
 	struct rte_power_timer_profile timer_policy;
 	bool core_type;
@@ -96,9 +98,9 @@ struct rte_power_channel_packet_freq_list {
 	uint64_t resource_id; /**< core_num, device */
 	uint32_t unit;        /**< scale down/up/min/max */
 	uint32_t command;     /**< Power, IO, etc */
-	char vm_name[VM_MAX_NAME_SZ];
+	char vm_name[RTE_POWER_VM_MAX_NAME_SZ];
 
-	uint32_t freq_list[MAX_VCPU_PER_VM];
+	uint32_t freq_list[RTE_POWER_MAX_VCPU_PER_VM];
 	uint8_t num_vcpu;
 };
 
@@ -106,10 +108,10 @@ struct rte_power_channel_packet_caps_list {
 	uint64_t resource_id; /**< core_num, device */
 	uint32_t unit;        /**< scale down/up/min/max */
 	uint32_t command;     /**< Power, IO, etc */
-	char vm_name[VM_MAX_NAME_SZ];
+	char vm_name[RTE_POWER_VM_MAX_NAME_SZ];
 
-	uint64_t turbo[MAX_VCPU_PER_VM];
-	uint64_t priority[MAX_VCPU_PER_VM];
+	uint64_t turbo[RTE_POWER_MAX_VCPU_PER_VM];
+	uint64_t priority[RTE_POWER_MAX_VCPU_PER_VM];
 	uint8_t num_vcpu;
 };
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.644000313 +0100
+++ 0087-power-rename-constants.patch	2021-02-04 12:04:28.090789786 +0100
@@ -1 +1 @@
-From 38d232b9b804eebd458d758f2face173220ee2f8 Mon Sep 17 00:00:00 2001
+From b9f75f2721aeac4d1fa7962d2aa89feaa66b64c5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 38d232b9b804eebd458d758f2face173220ee2f8 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 1b6041b6f8..7bb33e026c 100644
+index ab68b8eb5b..57a7155aad 100644
@@ -458 +459 @@
-index 125dfeb10a..ec6409abd7 100644
+index 3260dbd2bb..ceb59cad7b 100644
@@ -552 +553 @@
-index 75d5b5364f..799d7b9bc3 100644
+index 0409a832b5..2316aace5a 100644
@@ -555 +556 @@
-@@ -394,7 +394,7 @@ main(int argc, char **argv)
+@@ -395,7 +395,7 @@ main(int argc, char **argv)
@@ -565 +566 @@
-index 9eb2f63306..039cb18729 100644
+index 373589863d..ff2ad38466 100644
@@ -568 +569 @@
-@@ -100,7 +100,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
+@@ -74,7 +74,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
@@ -578 +579 @@
-index 9ae438489e..27f9937aab 100644
+index 899d738a99..86a349f493 100644
@@ -581 +582 @@
-@@ -29,7 +29,7 @@ power_kvm_vm_init(unsigned int lcore_id)
+@@ -24,7 +24,7 @@ power_kvm_vm_init(unsigned int lcore_id)
@@ -590 +591 @@
-@@ -90,25 +90,25 @@ send_msg(unsigned int lcore_id, uint32_t scale_direction)
+@@ -85,25 +85,25 @@ send_msg(unsigned int lcore_id, uint32_t scale_direction)
@@ -620 +621 @@
-@@ -121,13 +121,13 @@ power_kvm_vm_turbo_status(__rte_unused unsigned int lcore_id)
+@@ -116,13 +116,13 @@ power_kvm_vm_turbo_status(__attribute__((unused)) unsigned int lcore_id)

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

* [dpdk-stable] patch 'power: clean up includes' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (85 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'power: rename constants' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/eventdev: adjust event count order for pipeline test' " Christian Ehrhardt
                   ` (52 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Hunt, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b086808ceed59989b5e7b83ce99c98719f45a6bf Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 21 Jan 2021 17:22:01 +0000
Subject: [PATCH] power: clean up includes

[ upstream commit 825fddf651d49b991a5a08eb02bab90695ec85c7 ]

re-organise the including of the new public header file and
remove un-needed includes

Fixes: 210c383e247b ("power: packet format for vm power management")
Fixes: cd0d5547e873 ("power: vm communication channels in guest")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 examples/vm_power_manager/channel_manager.c              | 1 -
 examples/vm_power_manager/channel_monitor.c              | 1 -
 examples/vm_power_manager/channel_monitor.h              | 3 ++-
 examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 1 -
 examples/vm_power_manager/guest_cli/vm_power_cli_guest.h | 2 --
 examples/vm_power_manager/vm_power_cli.c                 | 1 -
 lib/librte_power/guest_channel.c                         | 2 +-
 lib/librte_power/guest_channel.h                         | 2 --
 lib/librte_power/power_kvm_vm.c                          | 2 +-
 lib/librte_power/rte_power.h                             | 1 +
 lib/librte_power/rte_power_guest_channel.h               | 3 ---
 11 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index c7d5bf5a87..0a28cb643b 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -27,7 +27,6 @@
 #include <libvirt/libvirt.h>
 
 #include "channel_manager.h"
-#include "rte_power_guest_channel.h"
 #include "channel_monitor.h"
 #include "power_manager.h"
 
diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 57a7155aad..fe5a183fd7 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -35,7 +35,6 @@
 
 #include <libvirt/libvirt.h>
 #include "channel_monitor.h"
-#include "rte_power_guest_channel.h"
 #include "channel_manager.h"
 #include "power_manager.h"
 #include "oob_monitor.h"
diff --git a/examples/vm_power_manager/channel_monitor.h b/examples/vm_power_manager/channel_monitor.h
index 5d3537b911..2b38c554b5 100644
--- a/examples/vm_power_manager/channel_monitor.h
+++ b/examples/vm_power_manager/channel_monitor.h
@@ -5,8 +5,9 @@
 #ifndef CHANNEL_MONITOR_H_
 #define CHANNEL_MONITOR_H_
 
+#include <rte_power.h>
+
 #include "channel_manager.h"
-#include "rte_power_guest_channel.h"
 
 struct core_share {
 	unsigned int pcpu;
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index ceb59cad7b..1618030627 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -19,7 +19,6 @@
 #include <rte_ethdev.h>
 
 #include <rte_power.h>
-#include <guest_channel.h>
 
 #include "vm_power_cli_guest.h"
 
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
index 03af2cda7c..50c435544e 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
@@ -9,8 +9,6 @@
 extern "C" {
 #endif
 
-#include "rte_power_guest_channel.h"
-
 struct rte_power_channel_packet *get_policy(void);
 
 int set_policy_mac(int port, int idx);
diff --git a/examples/vm_power_manager/vm_power_cli.c b/examples/vm_power_manager/vm_power_cli.c
index 3df3626577..8eb87217e9 100644
--- a/examples/vm_power_manager/vm_power_cli.c
+++ b/examples/vm_power_manager/vm_power_cli.c
@@ -21,7 +21,6 @@
 #include "channel_manager.h"
 #include "channel_monitor.h"
 #include "power_manager.h"
-#include "rte_power_guest_channel.h"
 
 struct cmd_quit_result {
 	cmdline_fixed_string_t quit;
diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
index ff2ad38466..4dadf5ef9f 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
@@ -14,9 +14,9 @@
 
 
 #include <rte_log.h>
+#include <rte_power.h>
 
 #include "guest_channel.h"
-#include "rte_power_guest_channel.h"
 
 #define RTE_LOGTYPE_GUEST_CHANNEL RTE_LOGTYPE_USER1
 
diff --git a/lib/librte_power/guest_channel.h b/lib/librte_power/guest_channel.h
index 756b16c91d..b790f3661a 100644
--- a/lib/librte_power/guest_channel.h
+++ b/lib/librte_power/guest_channel.h
@@ -8,8 +8,6 @@
 extern "C" {
 #endif
 
-#include <rte_power_guest_channel.h>
-
 /**
  * Connect to the Virtio-Serial VM end-point located in path. It is
  * thread safe for unique lcore_ids. This function must be only called once from
diff --git a/lib/librte_power/power_kvm_vm.c b/lib/librte_power/power_kvm_vm.c
index 86a349f493..b34773d9c6 100644
--- a/lib/librte_power/power_kvm_vm.c
+++ b/lib/librte_power/power_kvm_vm.c
@@ -6,8 +6,8 @@
 
 #include <rte_log.h>
 
-#include "guest_channel.h"
 #include "rte_power_guest_channel.h"
+#include "guest_channel.h"
 #include "power_kvm_vm.h"
 #include "power_common.h"
 
diff --git a/lib/librte_power/rte_power.h b/lib/librte_power/rte_power.h
index 427058b811..04dc4cb1da 100644
--- a/lib/librte_power/rte_power.h
+++ b/lib/librte_power/rte_power.h
@@ -14,6 +14,7 @@
 #include <rte_byteorder.h>
 #include <rte_log.h>
 #include <rte_string_fns.h>
+#include <rte_power_guest_channel.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/lib/librte_power/rte_power_guest_channel.h b/lib/librte_power/rte_power_guest_channel.h
index b9273a025c..adc9738174 100644
--- a/lib/librte_power/rte_power_guest_channel.h
+++ b/lib/librte_power/rte_power_guest_channel.h
@@ -8,9 +8,6 @@
 extern "C" {
 #endif
 
-#include <stdint.h>
-#include <stdbool.h>
-
 #define RTE_POWER_MAX_VFS 10
 #define RTE_POWER_VM_MAX_NAME_SZ 32
 #define RTE_POWER_MAX_VCPU_PER_VM 8
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.682022905 +0100
+++ 0088-power-clean-up-includes.patch	2021-02-04 12:04:28.094789791 +0100
@@ -1 +1 @@
-From 825fddf651d49b991a5a08eb02bab90695ec85c7 Mon Sep 17 00:00:00 2001
+From b086808ceed59989b5e7b83ce99c98719f45a6bf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 825fddf651d49b991a5a08eb02bab90695ec85c7 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 58a243b230..458e371672 100644
+index c7d5bf5a87..0a28cb643b 100644
@@ -43 +44 @@
-index 7bb33e026c..99f81544d7 100644
+index 57a7155aad..fe5a183fd7 100644
@@ -70 +71 @@
-index ec6409abd7..0bf5774ffc 100644
+index ceb59cad7b..1618030627 100644
@@ -82 +83 @@
-index 5d285ca9de..b578ec0723 100644
+index 03af2cda7c..50c435544e 100644
@@ -95 +96 @@
-index f7e1b596ec..1a55e553b9 100644
+index 3df3626577..8eb87217e9 100644
@@ -107 +108 @@
-index 039cb18729..2f7507a03c 100644
+index ff2ad38466..4dadf5ef9f 100644
@@ -110 +111 @@
-@@ -15,9 +15,9 @@
+@@ -14,9 +14,9 @@
@@ -122 +123 @@
-index a1db4b0580..43d532a5aa 100644
+index 756b16c91d..b790f3661a 100644
@@ -132,2 +133,2 @@
-  * Check if any Virtio-Serial VM end-points exist in path.
-  *
+  * Connect to the Virtio-Serial VM end-point located in path. It is
+  * thread safe for unique lcore_ids. This function must be only called once from
@@ -135 +136 @@
-index 27f9937aab..ab7d4b8cee 100644
+index 86a349f493..b34773d9c6 100644
@@ -149 +150 @@
-index bbbde4dfb4..c8086bf6ba 100644
+index 427058b811..04dc4cb1da 100644

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

* [dpdk-stable] patch 'app/eventdev: adjust event count order for pipeline test' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (86 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'power: clean up includes' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/eventdev: remove redundant enqueue in burst Tx' " Christian Ehrhardt
                   ` (51 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Ruifeng Wang, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f6b965da1d1e45f69848e15e31513471ef96b3e9 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Fri, 22 Jan 2021 13:19:15 +0800
Subject: [PATCH] app/eventdev: adjust event count order for pipeline test

[ upstream commit e0c0573783455288dbe2fd70c24acd1cd66d6cb6 ]

For the fwd mode (internal_port = false) in pipeline test,
processed-pkts increment should after enqueue. However, in
multi_stage_fwd and multi_stage_burst_fwd, "w->processed_pkts" is
increased before enqueue.

To fix this, move "w->processed_pkts" increment after enqueue, and then
the main core can load the correct number of processed packets.

Fixes: 314bcf58ca8f ("app/eventdev: add pipeline queue worker functions")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 app/test-eventdev/test_pipeline_queue.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/test_pipeline_queue.c
index 7bebac34fc..01f33e3b44 100644
--- a/app/test-eventdev/test_pipeline_queue.c
+++ b/app/test-eventdev/test_pipeline_queue.c
@@ -180,13 +180,13 @@ pipeline_queue_worker_multi_stage_fwd(void *arg)
 			ev.queue_id = tx_queue[ev.mbuf->port];
 			rte_event_eth_tx_adapter_txq_set(ev.mbuf, 0);
 			pipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC);
+			pipeline_event_enqueue(dev, port, &ev);
 			w->processed_pkts++;
 		} else {
 			ev.queue_id++;
 			pipeline_fwd_event(&ev, sched_type_list[cq_id]);
+			pipeline_event_enqueue(dev, port, &ev);
 		}
-
-		pipeline_event_enqueue(dev, port, &ev);
 	}
 
 	return 0;
@@ -237,6 +237,7 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg)
 	const uint8_t *tx_queue = t->tx_evqueue_id;
 
 	while (t->done == false) {
+		uint16_t processed_pkts = 0;
 		uint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev,
 				BURST_SIZE, 0);
 
@@ -254,7 +255,7 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg)
 				rte_event_eth_tx_adapter_txq_set(ev[i].mbuf, 0);
 				pipeline_fwd_event(&ev[i],
 						RTE_SCHED_TYPE_ATOMIC);
-				w->processed_pkts++;
+				processed_pkts++;
 			} else {
 				ev[i].queue_id++;
 				pipeline_fwd_event(&ev[i],
@@ -263,6 +264,7 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg)
 		}
 
 		pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
+		w->processed_pkts += processed_pkts;
 	}
 
 	return 0;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.722692828 +0100
+++ 0089-app-eventdev-adjust-event-count-order-for-pipeline-t.patch	2021-02-04 12:04:28.094789791 +0100
@@ -1 +1 @@
-From e0c0573783455288dbe2fd70c24acd1cd66d6cb6 Mon Sep 17 00:00:00 2001
+From f6b965da1d1e45f69848e15e31513471ef96b3e9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e0c0573783455288dbe2fd70c24acd1cd66d6cb6 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/eventdev: remove redundant enqueue in burst Tx' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (87 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/eventdev: adjust event count order for pipeline test' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'examples/eventdev: add info output for main core' " Christian Ehrhardt
                   ` (50 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Ruifeng Wang, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 3a6a49cdc667a13176a76218ba72ea11cf1e5ff9 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Fri, 22 Jan 2021 13:19:16 +0800
Subject: [PATCH] app/eventdev: remove redundant enqueue in burst Tx

[ upstream commit 21b1ca4843a09d822cf992872445beb73163f1fb ]

For eventdev pipeline test, in burst_tx cases, there is no needed to
set ev.op as RTE_EVENT_OP_RELEASE and call pipeline_event_enqueue_burst
to release events. This is because for tx mode(internal_port=true),
the capability "implicit_release" of dev is enabled, and the app can
release events by "rte_event_dequeue_burst" rather than enqueue.

Fixes: 314bcf58ca8f ("app/eventdev: add pipeline queue worker functions")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 app/test-eventdev/test_pipeline_queue.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/test_pipeline_queue.c
index 01f33e3b44..9a9febb199 100644
--- a/app/test-eventdev/test_pipeline_queue.c
+++ b/app/test-eventdev/test_pipeline_queue.c
@@ -83,16 +83,15 @@ pipeline_queue_worker_single_stage_burst_tx(void *arg)
 			rte_prefetch0(ev[i + 1].mbuf);
 			if (ev[i].sched_type == RTE_SCHED_TYPE_ATOMIC) {
 				pipeline_event_tx(dev, port, &ev[i]);
-				ev[i].op = RTE_EVENT_OP_RELEASE;
 				w->processed_pkts++;
 			} else {
 				ev[i].queue_id++;
 				pipeline_fwd_event(&ev[i],
 						RTE_SCHED_TYPE_ATOMIC);
+				pipeline_event_enqueue_burst(dev, port, ev,
+						nb_rx);
 			}
 		}
-
-		pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
 	}
 
 	return 0;
@@ -213,7 +212,6 @@ pipeline_queue_worker_multi_stage_burst_tx(void *arg)
 
 			if (ev[i].queue_id == tx_queue[ev[i].mbuf->port]) {
 				pipeline_event_tx(dev, port, &ev[i]);
-				ev[i].op = RTE_EVENT_OP_RELEASE;
 				w->processed_pkts++;
 				continue;
 			}
@@ -222,9 +220,8 @@ pipeline_queue_worker_multi_stage_burst_tx(void *arg)
 			pipeline_fwd_event(&ev[i], cq_id != last_queue ?
 					sched_type_list[cq_id] :
 					RTE_SCHED_TYPE_ATOMIC);
+			pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
 		}
-
-		pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
 	}
 
 	return 0;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.768811563 +0100
+++ 0090-app-eventdev-remove-redundant-enqueue-in-burst-Tx.patch	2021-02-04 12:04:28.094789791 +0100
@@ -1 +1 @@
-From 21b1ca4843a09d822cf992872445beb73163f1fb Mon Sep 17 00:00:00 2001
+From 3a6a49cdc667a13176a76218ba72ea11cf1e5ff9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 21b1ca4843a09d822cf992872445beb73163f1fb ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/eventdev: add info output for main core' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (88 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/eventdev: remove redundant enqueue in burst Tx' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/eventdev: fix SMP barrier in performance test' " Christian Ehrhardt
                   ` (49 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ba6a831fde754a09c9cd25dfae02d5a7e712dd4c Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Thu, 14 Jan 2021 18:31:00 +0800
Subject: [PATCH] examples/eventdev: add info output for main core

[ upstream commit 198b5448433ed329becaf47003faf038132fbb7f ]

When the main core is set as tx/rx/sched/worker core, it also needs to
print some information to show this. Thus, add info output for the main
core, and add a "dump" function to print core information for the sake
of code simplicity and easy maintenance.

In the meanwhile, fix the count error. For the variable "worker_idx", it
should be incremented when the core is set as worker core. However, when
the main core is set as rx/tx/sched core, the worker_idx is also
incremented. Though this error may not have a substantial impact due to
that the main core is the last launched core, but it should be corrected
from the perspective of code correctness.

Fixes: 1094ca96689c ("doc: add SW eventdev pipeline to sample app guide")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 examples/eventdev_pipeline/main.c | 55 +++++++++++++++++++------------
 1 file changed, 34 insertions(+), 21 deletions(-)

diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index 4ac5821539..6fc7c86dc9 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -22,6 +22,32 @@ struct config_data cdata = {
 	.worker_cq_depth = 16
 };
 
+static void
+dump_core_info(unsigned int lcore_id, struct worker_data *data,
+		unsigned int worker_idx)
+{
+	if (fdata->rx_core[lcore_id])
+		printf(
+			"[%s()] lcore %d executing NIC Rx\n",
+			__func__, lcore_id);
+
+	if (fdata->tx_core[lcore_id])
+		printf(
+			"[%s()] lcore %d executing NIC Tx\n",
+			__func__, lcore_id);
+
+	if (fdata->sched_core[lcore_id])
+		printf(
+			"[%s()] lcore %d executing scheduler\n",
+			__func__, lcore_id);
+
+	if (fdata->worker_core[lcore_id])
+		printf(
+			"[%s()] lcore %d executing worker, using eventdev port %u\n",
+			__func__, lcore_id,
+			data[worker_idx].port_id);
+}
+
 static bool
 core_in_use(unsigned int lcore_id) {
 	return (fdata->rx_core[lcore_id] || fdata->sched_core[lcore_id] ||
@@ -405,25 +431,7 @@ main(int argc, char **argv)
 			!fdata->sched_core[lcore_id])
 			continue;
 
-		if (fdata->rx_core[lcore_id])
-			printf(
-				"[%s()] lcore %d executing NIC Rx\n",
-				__func__, lcore_id);
-
-		if (fdata->tx_core[lcore_id])
-			printf(
-				"[%s()] lcore %d executing NIC Tx\n",
-				__func__, lcore_id);
-
-		if (fdata->sched_core[lcore_id])
-			printf("[%s()] lcore %d executing scheduler\n",
-					__func__, lcore_id);
-
-		if (fdata->worker_core[lcore_id])
-			printf(
-				"[%s()] lcore %d executing worker, using eventdev port %u\n",
-				__func__, lcore_id,
-				worker_data[worker_idx].port_id);
+		dump_core_info(lcore_id, worker_data, worker_idx);
 
 		err = rte_eal_remote_launch(fdata->cap.worker,
 				&worker_data[worker_idx], lcore_id);
@@ -438,8 +446,13 @@ main(int argc, char **argv)
 
 	lcore_id = rte_lcore_id();
 
-	if (core_in_use(lcore_id))
-		fdata->cap.worker(&worker_data[worker_idx++]);
+	if (core_in_use(lcore_id)) {
+		dump_core_info(lcore_id, worker_data, worker_idx);
+		fdata->cap.worker(&worker_data[worker_idx]);
+
+		if (fdata->worker_core[lcore_id])
+			worker_idx++;
+	}
 
 	rte_eal_mp_wait_lcore();
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.803112844 +0100
+++ 0091-examples-eventdev-add-info-output-for-main-core.patch	2021-02-04 12:04:28.098789794 +0100
@@ -1 +1 @@
-From 198b5448433ed329becaf47003faf038132fbb7f Mon Sep 17 00:00:00 2001
+From ba6a831fde754a09c9cd25dfae02d5a7e712dd4c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 198b5448433ed329becaf47003faf038132fbb7f ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index ae50591b88..9982d5bfb0 100644
+index 4ac5821539..6fc7c86dc9 100644
@@ -64 +65 @@
-@@ -413,25 +439,7 @@ main(int argc, char **argv)
+@@ -405,25 +431,7 @@ main(int argc, char **argv)
@@ -91 +92 @@
-@@ -446,8 +454,13 @@ main(int argc, char **argv)
+@@ -438,8 +446,13 @@ main(int argc, char **argv)

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

* [dpdk-stable] patch 'app/eventdev: fix SMP barrier in performance test' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (89 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'examples/eventdev: add info output for main core' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'test/event_crypto: set cipher operation in transform' " Christian Ehrhardt
                   ` (48 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Ruifeng Wang, Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From bd99c999510c1cca6f52a3efaca6842be63c77f6 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Thu, 14 Jan 2021 15:08:26 +0800
Subject: [PATCH] app/eventdev: fix SMP barrier in performance test

[ upstream commit c7c033d173f2d4f14834c0fb942b84725ac940e8 ]

This patch fixes RTE SMP barrier bugs for the perf test of eventdev.

For the "perf_process_last_stage" function, wmb after storing
processed_pkts should be moved before it. This is because the worker
lcore should ensure it has really finished data processing, e.g. event
stored into buffers, before the shared variables "w->processed_pkts"are
stored.

For the "perf_process_last_stage_latency", on the one hand, the wmb
should be moved before storing into "w->processed_pkts". The reason is
the same as above. But on the other hand, for "w->latency", wmb is
unnecessary due to data dependency.

Fixes: 2369f73329f8 ("app/testeventdev: add perf queue worker functions")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 app/test-eventdev/test_perf_common.h | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h
index d8fbee6d89..e095da9a47 100644
--- a/app/test-eventdev/test_perf_common.h
+++ b/app/test-eventdev/test_perf_common.h
@@ -97,8 +97,13 @@ perf_process_last_stage(struct rte_mempool *const pool,
 		void *bufs[], int const buf_sz, uint8_t count)
 {
 	bufs[count++] = ev->event_ptr;
-	w->processed_pkts++;
+
+	/* wmb here ensures event_prt is stored before
+	 * updating the number of processed packets
+	 * for worker lcores
+	 */
 	rte_smp_wmb();
+	w->processed_pkts++;
 
 	if (unlikely(count == buf_sz)) {
 		count = 0;
@@ -116,6 +121,12 @@ perf_process_last_stage_latency(struct rte_mempool *const pool,
 	struct perf_elt *const m = ev->event_ptr;
 
 	bufs[count++] = ev->event_ptr;
+
+	/* wmb here ensures event_prt is stored before
+	 * updating the number of processed packets
+	 * for worker lcores
+	 */
+	rte_smp_wmb();
 	w->processed_pkts++;
 
 	if (unlikely(count == buf_sz)) {
@@ -127,7 +138,6 @@ perf_process_last_stage_latency(struct rte_mempool *const pool,
 	}
 
 	w->latency += latency;
-	rte_smp_wmb();
 	return count;
 }
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.840364133 +0100
+++ 0092-app-eventdev-fix-SMP-barrier-in-performance-test.patch	2021-02-04 12:04:28.098789794 +0100
@@ -1 +1 @@
-From c7c033d173f2d4f14834c0fb942b84725ac940e8 Mon Sep 17 00:00:00 2001
+From bd99c999510c1cca6f52a3efaca6842be63c77f6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c7c033d173f2d4f14834c0fb942b84725ac940e8 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index ff9705df88..e7233e5a5b 100644
+index d8fbee6d89..e095da9a47 100644

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

* [dpdk-stable] patch 'test/event_crypto: set cipher operation in transform' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (90 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/eventdev: fix SMP barrier in performance test' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/crypto-perf: fix latency CSV output' " Christian Ehrhardt
                   ` (47 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Ankur Dwivedi; +Cc: Abhinandan Gujjar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From fed36a522e1ad88225e35ec14c732d0d6a8161c7 Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Mon, 18 Jan 2021 21:49:40 +0530
Subject: [PATCH] test/event_crypto: set cipher operation in transform

[ upstream commit 61ecfb0240bcf7bd8e9a26c67a554e21cf3e0bc3 ]

The symmetric session configure callback function in OCTEON TX2 crypto
PMD returns error if the cipher operation is not set to either encrypt
or decrypt. This patch sets the cipher operation for the null cipher
to encrypt.

Fixes: 74449375237f ("test/event_crypto_adapter: fix configuration")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
 app/test/test_event_crypto_adapter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 1a9aa06c7d..1c0a0fa5e3 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -183,6 +183,7 @@ test_op_forward_mode(uint8_t session_less)
 	cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
 	cipher_xform.next = NULL;
 	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -382,6 +383,7 @@ test_op_new_mode(uint8_t session_less)
 	cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
 	cipher_xform.next = NULL;
 	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.874537723 +0100
+++ 0093-test-event_crypto-set-cipher-operation-in-transform.patch	2021-02-04 12:04:28.098789794 +0100
@@ -1 +1 @@
-From 61ecfb0240bcf7bd8e9a26c67a554e21cf3e0bc3 Mon Sep 17 00:00:00 2001
+From fed36a522e1ad88225e35ec14c732d0d6a8161c7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 61ecfb0240bcf7bd8e9a26c67a554e21cf3e0bc3 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index a0169aa6cf..335211cd8c 100644
+index 1a9aa06c7d..1c0a0fa5e3 100644

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

* [dpdk-stable] patch 'app/crypto-perf: fix latency CSV output' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (91 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'test/event_crypto: set cipher operation in transform' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/crypto-perf: fix CSV output format' " Christian Ehrhardt
                   ` (46 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Ciara Power; +Cc: Declan Doherty, Adam Dybkowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a69da372e4d625b3cf5058bba6b778199cb75e22 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 20 Jan 2021 17:29:28 +0000
Subject: [PATCH] app/crypto-perf: fix latency CSV output

[ upstream commit 2f04e8248ac0cc88d86d913dab664cba60b27037 ]

The csv output for the latency performance test had an extra header,
"Packet Size", which is a duplicate of "Buffer Size", and had no
corresponding value in the output. This is now removed.

Fixes: f6cefe253cc8 ("app/crypto-perf: add range/list of sizes")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
---
 app/test-crypto-perf/cperf_test_latency.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c
index 62478a2df5..c3e006604b 100644
--- a/app/test-crypto-perf/cperf_test_latency.c
+++ b/app/test-crypto-perf/cperf_test_latency.c
@@ -313,7 +313,7 @@ cperf_latency_test_runner(void *arg)
 		if (ctx->options->csv) {
 			if (rte_atomic16_test_and_set(&display_once))
 				printf("\n# lcore, Buffer Size, Burst Size, Pakt Seq #, "
-						"Packet Size, cycles, time (us)");
+						"cycles, time (us)");
 
 			for (i = 0; i < ctx->options->total_ops; i++) {
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.909386604 +0100
+++ 0094-app-crypto-perf-fix-latency-CSV-output.patch	2021-02-04 12:04:28.098789794 +0100
@@ -1 +1 @@
-From 2f04e8248ac0cc88d86d913dab664cba60b27037 Mon Sep 17 00:00:00 2001
+From a69da372e4d625b3cf5058bba6b778199cb75e22 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2f04e8248ac0cc88d86d913dab664cba60b27037 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 0e4d0e1538..c2590a4dcf 100644
+index 62478a2df5..c3e006604b 100644
@@ -24 +25 @@
-@@ -310,7 +310,7 @@ cperf_latency_test_runner(void *arg)
+@@ -313,7 +313,7 @@ cperf_latency_test_runner(void *arg)

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

* [dpdk-stable] patch 'app/crypto-perf: fix CSV output format' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (92 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/crypto-perf: fix latency CSV output' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'test/ipsec: fix result code for not supported' " Christian Ehrhardt
                   ` (45 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Ciara Power; +Cc: Declan Doherty, Adam Dybkowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b23e86ea54fd71b1dfaef70c43d624a22a2f4c2d Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 20 Jan 2021 17:29:29 +0000
Subject: [PATCH] app/crypto-perf: fix CSV output format

[ upstream commit c6ddab873dbf066c40cd268a0216a913b1802b85 ]

The csv output for each ptest type used ";" instead of ",".
This has now been fixed to use the comma format that is used in the csv
headers.

Fixes: f6cefe253cc8 ("app/crypto-perf: add range/list of sizes")
Fixes: 96dfeb609be1 ("app/crypto-perf: add new PMD benchmarking mode")
Fixes: da40ebd6d383 ("app/crypto-perf: display results in test runner")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
---
 app/test-crypto-perf/cperf_test_latency.c        | 2 +-
 app/test-crypto-perf/cperf_test_pmd_cyclecount.c | 2 +-
 app/test-crypto-perf/cperf_test_throughput.c     | 4 ++--
 app/test-crypto-perf/cperf_test_verify.c         | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c
index c3e006604b..951b4d10ac 100644
--- a/app/test-crypto-perf/cperf_test_latency.c
+++ b/app/test-crypto-perf/cperf_test_latency.c
@@ -317,7 +317,7 @@ cperf_latency_test_runner(void *arg)
 
 			for (i = 0; i < ctx->options->total_ops; i++) {
 
-				printf("\n%u;%u;%u;%"PRIu64";%"PRIu64";%.3f",
+				printf("\n%u,%u,%u,%"PRIu64",%"PRIu64",%.3f",
 					ctx->lcore_id, ctx->options->test_buffer_size,
 					test_burst_size, i + 1,
 					ctx->res[i].tsc_end - ctx->res[i].tsc_start,
diff --git a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
index 74371faa8d..de01e3bc51 100644
--- a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
+++ b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
@@ -16,7 +16,7 @@
 #define PRETTY_HDR_FMT "%12s%12s%12s%12s%12s%12s%12s%12s%12s%12s\n\n"
 #define PRETTY_LINE_FMT "%12u%12u%12u%12u%12u%12u%12u%12.0f%12.0f%12.0f\n"
 #define CSV_HDR_FMT "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s\n"
-#define CSV_LINE_FMT "%10u;%10u;%u;%u;%u;%u;%u;%.3f;%.3f;%.3f\n"
+#define CSV_LINE_FMT "%10u,%10u,%u,%u,%u,%u,%u,%.3f,%.3f,%.3f\n"
 
 struct cperf_pmd_cyclecount_ctx {
 	uint8_t dev_id;
diff --git a/app/test-crypto-perf/cperf_test_throughput.c b/app/test-crypto-perf/cperf_test_throughput.c
index 35c51026fe..2528f39571 100644
--- a/app/test-crypto-perf/cperf_test_throughput.c
+++ b/app/test-crypto-perf/cperf_test_throughput.c
@@ -298,8 +298,8 @@ cperf_throughput_test_runner(void *test_ctx)
 					"Failed Deq,Ops(Millions),Throughput(Gbps),"
 					"Cycles/Buf\n\n");
 
-			printf("%u;%u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";"
-					"%.3f;%.3f;%.3f\n",
+			printf("%u,%u,%u,%"PRIu64",%"PRIu64",%"PRIu64",%"PRIu64","
+					"%.3f,%.3f,%.3f\n",
 					ctx->lcore_id,
 					ctx->options->test_buffer_size,
 					test_burst_size,
diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index 833bc9a552..2939aeaa93 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -406,7 +406,7 @@ cperf_verify_test_runner(void *test_ctx)
 				"Burst Size,Enqueued,Dequeued,Failed Enq,"
 				"Failed Deq,Failed Ops\n");
 
-		printf("%10u;%10u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";"
+		printf("%10u,%10u,%u,%"PRIu64",%"PRIu64",%"PRIu64",%"PRIu64","
 				"%"PRIu64"\n",
 				ctx->lcore_id,
 				ctx->options->max_buffer_size,
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.946677294 +0100
+++ 0095-app-crypto-perf-fix-CSV-output-format.patch	2021-02-04 12:04:28.098789794 +0100
@@ -1 +1 @@
-From c6ddab873dbf066c40cd268a0216a913b1802b85 Mon Sep 17 00:00:00 2001
+From b23e86ea54fd71b1dfaef70c43d624a22a2f4c2d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c6ddab873dbf066c40cd268a0216a913b1802b85 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index c2590a4dcf..159fe8492b 100644
+index c3e006604b..951b4d10ac 100644
@@ -29 +30 @@
-@@ -314,7 +314,7 @@ cperf_latency_test_runner(void *arg)
+@@ -317,7 +317,7 @@ cperf_latency_test_runner(void *arg)
@@ -39 +40 @@
-index 4e67d3aebd..844659aeca 100644
+index 74371faa8d..de01e3bc51 100644
@@ -52 +53 @@
-index f30f7d5c2c..f6eb8cf259 100644
+index 35c51026fe..2528f39571 100644
@@ -55 +56 @@
-@@ -299,8 +299,8 @@ cperf_throughput_test_runner(void *test_ctx)
+@@ -298,8 +298,8 @@ cperf_throughput_test_runner(void *test_ctx)

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

* [dpdk-stable] patch 'test/ipsec: fix result code for not supported' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (93 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/crypto-perf: fix CSV output format' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix memory allocation check' " Christian Ehrhardt
                   ` (44 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 3b08e23c300e4168ddbb581c759eb755c62501e8 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Mon, 25 Jan 2021 16:15:33 +0800
Subject: [PATCH] test/ipsec: fix result code for not supported

[ upstream commit 8dda080a0938e527c95ace0f3203a239edec48f5 ]

During SA creation, if the required algorithm is not supported,
drivers can return ENOTSUP. But in most of the IPsec test cases,
if the SA creation does not success, it just returns
TEST_FAILED.

This patch fixes this issue by returning the actual return values
from the driver to the application, so that it can make decisions
whether the test case is passed, failed or unsupported.

Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test/test_ipsec.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 79d00d7e02..6a4bd12f7f 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -743,7 +743,7 @@ create_sa(enum rte_security_session_action_type action_type,
 	ut->ss[j].type = action_type;
 	rc = create_session(ut, &ts->qp_conf, ts->valid_dev, j);
 	if (rc != 0)
-		return TEST_FAILED;
+		return rc;
 
 	rc = rte_ipsec_sa_init(ut->ss[j].sa, &ut->sa_prm, sz);
 	rc = (rc > 0 && (uint32_t)rc <= sz) ? 0 : -EINVAL;
@@ -1246,7 +1246,7 @@ test_ipsec_crypto_inb_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
@@ -1348,7 +1348,7 @@ test_ipsec_crypto_outb_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate input mbuf data */
@@ -1457,7 +1457,7 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate inbound mbuf data */
@@ -1535,7 +1535,7 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate inbound mbuf data */
@@ -1643,7 +1643,7 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
@@ -1721,7 +1721,7 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
@@ -1797,7 +1797,7 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
@@ -1910,7 +1910,7 @@ test_ipsec_replay_inb_inside_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate inbound mbuf data */
@@ -2003,7 +2003,7 @@ test_ipsec_replay_inb_outside_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
@@ -2103,7 +2103,7 @@ test_ipsec_replay_inb_repeat_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
@@ -2204,7 +2204,7 @@ test_ipsec_replay_inb_inside_burst_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate inbound mbuf data */
@@ -2337,7 +2337,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa 0 failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* create second rte_ipsec_sa */
@@ -2347,7 +2347,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i)
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa 1 failed, cfg %d\n", i);
 		destroy_sa(0);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
@@ -2423,7 +2423,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i)
 			test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa 0 failed, cfg %d\n", i);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* create second rte_ipsec_sa */
@@ -2433,7 +2433,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i)
 	if (rc != 0) {
 		RTE_LOG(ERR, USER1, "create_sa 1 failed, cfg %d\n", i);
 		destroy_sa(0);
-		return TEST_FAILED;
+		return rc;
 	}
 
 	/* Generate test mbuf data */
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:31.987764091 +0100
+++ 0096-test-ipsec-fix-result-code-for-not-supported.patch	2021-02-04 12:04:28.102789798 +0100
@@ -1 +1 @@
-From 8dda080a0938e527c95ace0f3203a239edec48f5 Mon Sep 17 00:00:00 2001
+From 3b08e23c300e4168ddbb581c759eb755c62501e8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8dda080a0938e527c95ace0f3203a239edec48f5 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 9ad07a1790..d18220a885 100644
+index 79d00d7e02..6a4bd12f7f 100644
@@ -28 +29 @@
-@@ -744,7 +744,7 @@ create_sa(enum rte_security_session_action_type action_type,
+@@ -743,7 +743,7 @@ create_sa(enum rte_security_session_action_type action_type,
@@ -37 +38 @@
-@@ -1247,7 +1247,7 @@ test_ipsec_crypto_inb_burst_null_null(int i)
+@@ -1246,7 +1246,7 @@ test_ipsec_crypto_inb_burst_null_null(int i)
@@ -46 +47 @@
-@@ -1349,7 +1349,7 @@ test_ipsec_crypto_outb_burst_null_null(int i)
+@@ -1348,7 +1348,7 @@ test_ipsec_crypto_outb_burst_null_null(int i)
@@ -55 +56 @@
-@@ -1458,7 +1458,7 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i)
+@@ -1457,7 +1457,7 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i)
@@ -64 +65 @@
-@@ -1536,7 +1536,7 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
+@@ -1535,7 +1535,7 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
@@ -73 +74 @@
-@@ -1644,7 +1644,7 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i)
+@@ -1643,7 +1643,7 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i)
@@ -82 +83 @@
-@@ -1722,7 +1722,7 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
+@@ -1721,7 +1721,7 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
@@ -91 +92 @@
-@@ -1798,7 +1798,7 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)
+@@ -1797,7 +1797,7 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)
@@ -100 +101 @@
-@@ -1911,7 +1911,7 @@ test_ipsec_replay_inb_inside_null_null(int i)
+@@ -1910,7 +1910,7 @@ test_ipsec_replay_inb_inside_null_null(int i)
@@ -109 +110 @@
-@@ -2004,7 +2004,7 @@ test_ipsec_replay_inb_outside_null_null(int i)
+@@ -2003,7 +2003,7 @@ test_ipsec_replay_inb_outside_null_null(int i)
@@ -118 +119 @@
-@@ -2104,7 +2104,7 @@ test_ipsec_replay_inb_repeat_null_null(int i)
+@@ -2103,7 +2103,7 @@ test_ipsec_replay_inb_repeat_null_null(int i)
@@ -127 +128 @@
-@@ -2205,7 +2205,7 @@ test_ipsec_replay_inb_inside_burst_null_null(int i)
+@@ -2204,7 +2204,7 @@ test_ipsec_replay_inb_inside_burst_null_null(int i)
@@ -136 +137 @@
-@@ -2338,7 +2338,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i)
+@@ -2337,7 +2337,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i)
@@ -145 +146 @@
-@@ -2348,7 +2348,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i)
+@@ -2347,7 +2347,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i)
@@ -154 +155 @@
-@@ -2424,7 +2424,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i)
+@@ -2423,7 +2423,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i)
@@ -163 +164 @@
-@@ -2434,7 +2434,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i)
+@@ -2433,7 +2433,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i)

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

* [dpdk-stable] patch 'crypto/dpaa2_sec: fix memory allocation check' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (94 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'test/ipsec: fix result code for not supported' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'eal: fix MCS lock header include' " Christian Ehrhardt
                   ` (43 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/3241c0dce2624ab5055b2bf7d487707ea4ad34c1

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 3241c0dce2624ab5055b2bf7d487707ea4ad34c1 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Mon, 25 Jan 2021 16:15:34 +0800
Subject: [PATCH] crypto/dpaa2_sec: fix memory allocation check

[ upstream commit 9a494a3b90aad48f5f3f4ced14104f3347723c1b ]

When key length is 0, zmalloc will return NULL pointer
and in that case it should not return NOMEM.
So in this patch, adding a check on key length.

Fixes: 8d1f3a5d751b ("crypto/dpaa2_sec: support crypto operation")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 5eb78eca57..8df915e610 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1847,7 +1847,7 @@ dpaa2_sec_cipher_init(struct rte_cryptodev *dev,
 	session->ctxt_type = DPAA2_SEC_CIPHER;
 	session->cipher_key.data = rte_zmalloc(NULL, xform->cipher.key.length,
 			RTE_CACHE_LINE_SIZE);
-	if (session->cipher_key.data == NULL) {
+	if (session->cipher_key.data == NULL && xform->cipher.key.length > 0) {
 		DPAA2_SEC_ERR("No Memory for cipher key");
 		rte_free(priv);
 		return -1;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.031373203 +0100
+++ 0097-crypto-dpaa2_sec-fix-memory-allocation-check.patch	2021-02-04 12:04:28.106789802 +0100
@@ -1 +1 @@
-From 9a494a3b90aad48f5f3f4ced14104f3347723c1b Mon Sep 17 00:00:00 2001
+From 3241c0dce2624ab5055b2bf7d487707ea4ad34c1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9a494a3b90aad48f5f3f4ced14104f3347723c1b ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index cab79db3dc..05b194ccff 100644
+index 5eb78eca57..8df915e610 100644
@@ -23 +24 @@
-@@ -1842,7 +1842,7 @@ dpaa2_sec_cipher_init(struct rte_cryptodev *dev,
+@@ -1847,7 +1847,7 @@ dpaa2_sec_cipher_init(struct rte_cryptodev *dev,
@@ -31 +32 @@
- 		return -ENOMEM;
+ 		return -1;

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

* [dpdk-stable] patch 'eal: fix MCS lock header include' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (95 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix memory allocation check' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'power: fix missing header includes' " Christian Ehrhardt
                   ` (42 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/7dd28f7f71f2048c3349684543e202a67c13e349

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 7dd28f7f71f2048c3349684543e202a67c13e349 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 29 Jan 2021 16:48:15 +0000
Subject: [PATCH] eal: fix MCS lock header include

[ upstream commit 3c2cca6a0da17c83716522084357731ab053172e ]

Include 'rte_branch_prediction.h' to get the likely/unlikely macro
definitions.

Fixes: 2173f3333b61 ("mcslock: add MCS queued lock implementation")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/librte_eal/common/include/generic/rte_mcslock.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/common/include/generic/rte_mcslock.h b/lib/librte_eal/common/include/generic/rte_mcslock.h
index ce553f5475..896dfbf10f 100644
--- a/lib/librte_eal/common/include/generic/rte_mcslock.h
+++ b/lib/librte_eal/common/include/generic/rte_mcslock.h
@@ -22,6 +22,7 @@
 #include <rte_lcore.h>
 #include <rte_common.h>
 #include <rte_pause.h>
+#include <rte_branch_prediction.h>
 
 /**
  * The rte_mcslock_t type.
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.075740278 +0100
+++ 0098-eal-fix-MCS-lock-header-include.patch	2021-02-04 12:04:28.106789802 +0100
@@ -1 +1 @@
-From 3c2cca6a0da17c83716522084357731ab053172e Mon Sep 17 00:00:00 2001
+From 7dd28f7f71f2048c3349684543e202a67c13e349 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3c2cca6a0da17c83716522084357731ab053172e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- lib/librte_eal/include/generic/rte_mcslock.h | 1 +
+ lib/librte_eal/common/include/generic/rte_mcslock.h | 1 +
@@ -18,4 +19,4 @@
-diff --git a/lib/librte_eal/include/generic/rte_mcslock.h b/lib/librte_eal/include/generic/rte_mcslock.h
-index d370bef17a..9f323bd2a2 100644
---- a/lib/librte_eal/include/generic/rte_mcslock.h
-+++ b/lib/librte_eal/include/generic/rte_mcslock.h
+diff --git a/lib/librte_eal/common/include/generic/rte_mcslock.h b/lib/librte_eal/common/include/generic/rte_mcslock.h
+index ce553f5475..896dfbf10f 100644
+--- a/lib/librte_eal/common/include/generic/rte_mcslock.h
++++ b/lib/librte_eal/common/include/generic/rte_mcslock.h

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

* [dpdk-stable] patch 'power: fix missing header includes' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (96 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'eal: fix MCS lock header include' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'rib: fix missing header include' " Christian Ehrhardt
                   ` (41 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/60b48df148829b5f2ebc1c734f0a5d46d9925dd5

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 60b48df148829b5f2ebc1c734f0a5d46d9925dd5 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 29 Jan 2021 16:48:17 +0000
Subject: [PATCH] power: fix missing header includes

[ upstream commit deb6ea1d2d3906c570e50b1da6160121a475878e ]

The rte_power_guest_channel.h file did not include its dependent
headers, so add them.

Fixes: 5f443cc0f905 ("power: create guest channel public header file")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_power/rte_power_guest_channel.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_power/rte_power_guest_channel.h b/lib/librte_power/rte_power_guest_channel.h
index adc9738174..ed4fbfdcd3 100644
--- a/lib/librte_power/rte_power_guest_channel.h
+++ b/lib/librte_power/rte_power_guest_channel.h
@@ -4,6 +4,12 @@
 #ifndef RTE_POWER_GUEST_CHANNEL_H
 #define RTE_POWER_GUEST_CHANNEL_H
 
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+
+#include <rte_compat.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.110519583 +0100
+++ 0099-power-fix-missing-header-includes.patch	2021-02-04 12:04:28.106789802 +0100
@@ -1 +1 @@
-From deb6ea1d2d3906c570e50b1da6160121a475878e Mon Sep 17 00:00:00 2001
+From 60b48df148829b5f2ebc1c734f0a5d46d9925dd5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit deb6ea1d2d3906c570e50b1da6160121a475878e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'rib: fix missing header include' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (97 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'power: fix missing header includes' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/e1000: fix flow control mode setting' " Christian Ehrhardt
                   ` (40 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a959e524a7cb1efc7c7110705fbcff40a223ddab Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 29 Jan 2021 16:48:18 +0000
Subject: [PATCH] rib: fix missing header include

[ upstream commit 5d1a53130ab7570d96cf7edd0b48413d3bba1bfc ]

The rte_rib6 header was using RTE_MIN macro from rte_common.h but not
including the header file.

Fixes: f7e861e21c46 ("rib: support IPv6")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/librte_rib/rte_rib6.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h
index e7560fa8ab..b80665bf44 100644
--- a/lib/librte_rib/rte_rib6.h
+++ b/lib/librte_rib/rte_rib6.h
@@ -20,6 +20,7 @@
 
 #include <rte_memcpy.h>
 #include <rte_compat.h>
+#include <rte_common.h>
 
 #ifdef __cplusplus
 extern "C" {
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.149915152 +0100
+++ 0100-rib-fix-missing-header-include.patch	2021-02-04 12:04:28.106789802 +0100
@@ -1 +1 @@
-From 5d1a53130ab7570d96cf7edd0b48413d3bba1bfc Mon Sep 17 00:00:00 2001
+From a959e524a7cb1efc7c7110705fbcff40a223ddab Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5d1a53130ab7570d96cf7edd0b48413d3bba1bfc ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index b5e10569b9..dbd52928a2 100644
+index e7560fa8ab..b80665bf44 100644

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

* [dpdk-stable] patch 'net/e1000: fix flow control mode setting' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (98 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'rib: fix missing header include' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx4: fix handling of probing failure' " Christian Ehrhardt
                   ` (39 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ef43da7b91b9a4f1000b4450a22cf5a8a07bcf05 Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Wed, 20 Jan 2021 14:53:37 +0800
Subject: [PATCH] net/e1000: fix flow control mode setting

[ upstream commit 9f3c2398ae8a31eac1d5e00696a7922b2531597b ]

E1000_CTRL register should be updated according to fc_conf->mode's
value.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/e1000/igb_ethdev.c | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 5fdeef5d3e..a7886041f6 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -3087,6 +3087,7 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	uint32_t rx_buf_size;
 	uint32_t max_high_water;
 	uint32_t rctl;
+	uint32_t ctrl;
 
 	hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	if (fc_conf->autoneg != hw->mac.autoneg)
@@ -3124,6 +3125,39 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 			rctl &= ~E1000_RCTL_PMCF;
 
 		E1000_WRITE_REG(hw, E1000_RCTL, rctl);
+
+		/*
+		 * check if we want to change flow control mode - driver doesn't have native
+		 * capability to do that, so we'll write the registers ourselves
+		 */
+		ctrl = E1000_READ_REG(hw, E1000_CTRL);
+
+		/*
+		 * set or clear E1000_CTRL_RFCE and E1000_CTRL_TFCE bits depending
+		 * on configuration
+		 */
+		switch (fc_conf->mode) {
+		case RTE_FC_NONE:
+			ctrl &= ~E1000_CTRL_RFCE & ~E1000_CTRL_TFCE;
+			break;
+		case RTE_FC_RX_PAUSE:
+			ctrl |= E1000_CTRL_RFCE;
+			ctrl &= ~E1000_CTRL_TFCE;
+			break;
+		case RTE_FC_TX_PAUSE:
+			ctrl |= E1000_CTRL_TFCE;
+			ctrl &= ~E1000_CTRL_RFCE;
+			break;
+		case RTE_FC_FULL:
+			ctrl |= E1000_CTRL_RFCE | E1000_CTRL_TFCE;
+			break;
+		default:
+			PMD_INIT_LOG(ERR, "invalid flow control mode");
+			return -EINVAL;
+		}
+
+		E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
+
 		E1000_WRITE_FLUSH(hw);
 
 		return 0;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.184414959 +0100
+++ 0101-net-e1000-fix-flow-control-mode-setting.patch	2021-02-04 12:04:28.110789806 +0100
@@ -1 +1 @@
-From 9f3c2398ae8a31eac1d5e00696a7922b2531597b Mon Sep 17 00:00:00 2001
+From ef43da7b91b9a4f1000b4450a22cf5a8a07bcf05 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9f3c2398ae8a31eac1d5e00696a7922b2531597b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ec355cbf35..5323504e98 100644
+index 5fdeef5d3e..a7886041f6 100644
@@ -22 +23 @@
-@@ -3064,6 +3064,7 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -3087,6 +3087,7 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -30 +31 @@
-@@ -3101,6 +3102,39 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -3124,6 +3125,39 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)

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

* [dpdk-stable] patch 'net/mlx4: fix handling of probing failure' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (99 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/e1000: fix flow control mode setting' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/bnxt: fix FW version log' " Christian Ehrhardt
                   ` (38 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/3d75b1ea4131dcf13054b2241996cd497c2f5457
each

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 3d75b1ea4131dcf13054b2241996cd497c2f5457 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 20 Jan 2021 08:14:51 +0000
Subject: [PATCH] net/mlx4: fix handling of probing failure

[ upstream commit bcf58b64dafe1a298ee5de2ae018876d2e5c1362 ]

In mlx4 PCI probing, there are some validations for the Ethernet device
configuration.
From each PCI device the function creates one or two Ethernet devices.

When one of validations fails during the creation of the second device,
the first device is not freed what caused a memory leak.

Free it.

Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tested-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/mlx4/mlx4.c | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 8de265230d..c14c357816 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -767,6 +767,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 	struct ibv_context *attr_ctx = NULL;
 	struct ibv_device_attr device_attr;
 	struct ibv_device_attr_ex device_attr_ex;
+	struct rte_eth_dev *prev_dev = NULL;
 	struct mlx4_conf conf = {
 		.ports.present = 0,
 		.mr_ext_memseg_en = 1,
@@ -881,7 +882,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 				ERROR("can not attach rte ethdev");
 				rte_errno = ENOMEM;
 				err = rte_errno;
-				goto error;
+				goto err_secondary;
 			}
 			priv = eth_dev->data->dev_private;
 			if (!priv->verbs_alloc_ctx.enabled) {
@@ -890,24 +891,24 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 				      " from Verbs");
 				rte_errno = ENOTSUP;
 				err = rte_errno;
-				goto error;
+				goto err_secondary;
 			}
 			eth_dev->device = &pci_dev->device;
 			eth_dev->dev_ops = &mlx4_dev_sec_ops;
 			err = mlx4_proc_priv_init(eth_dev);
 			if (err)
-				goto error;
+				goto err_secondary;
 			/* Receive command fd from primary process. */
 			err = mlx4_mp_req_verbs_cmd_fd(eth_dev);
 			if (err < 0) {
 				err = rte_errno;
-				goto error;
+				goto err_secondary;
 			}
 			/* Remap UAR for Tx queues. */
 			err = mlx4_tx_uar_init_secondary(eth_dev, err);
 			if (err) {
 				err = rte_errno;
-				goto error;
+				goto err_secondary;
 			}
 			/*
 			 * Ethdev pointer is still required as input since
@@ -919,7 +920,14 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 			claim_zero(mlx4_glue->close_device(ctx));
 			rte_eth_copy_pci_info(eth_dev, pci_dev);
 			rte_eth_dev_probing_finish(eth_dev);
+			prev_dev = eth_dev;
 			continue;
+err_secondary:
+			claim_zero(mlx4_glue->close_device(ctx));
+			rte_eth_dev_release_port(eth_dev);
+			if (prev_dev)
+				rte_eth_dev_release_port(prev_dev);
+			break;
 		}
 		/* Check port status. */
 		err = mlx4_glue->query_port(ctx, port, &port_attr);
@@ -1094,6 +1102,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 				 priv, mem_event_cb);
 		rte_rwlock_write_unlock(&mlx4_shared_data->mem_event_rwlock);
 		rte_eth_dev_probing_finish(eth_dev);
+		prev_dev = eth_dev;
 		continue;
 port_error:
 		rte_free(priv);
@@ -1108,14 +1117,10 @@ port_error:
 			eth_dev->data->mac_addrs = NULL;
 			rte_eth_dev_release_port(eth_dev);
 		}
+		if (prev_dev)
+			mlx4_dev_close(prev_dev);
 		break;
 	}
-	/*
-	 * XXX if something went wrong in the loop above, there is a resource
-	 * leak (ctx, pd, priv, dpdk ethdev) but we can do nothing about it as
-	 * long as the dpdk does not provide a way to deallocate a ethdev and a
-	 * way to enumerate the registered ethdevs to free the previous ones.
-	 */
 error:
 	if (attr_ctx)
 		claim_zero(mlx4_glue->close_device(attr_ctx));
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.228394851 +0100
+++ 0102-net-mlx4-fix-handling-of-probing-failure.patch	2021-02-04 12:04:28.114789810 +0100
@@ -1 +1 @@
-From bcf58b64dafe1a298ee5de2ae018876d2e5c1362 Mon Sep 17 00:00:00 2001
+From 3d75b1ea4131dcf13054b2241996cd497c2f5457 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bcf58b64dafe1a298ee5de2ae018876d2e5c1362 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index f520d32456..284dcb9dd0 100644
+index 8de265230d..c14c357816 100644
@@ -29 +30 @@
-@@ -766,6 +766,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
+@@ -767,6 +767,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
@@ -37 +38 @@
-@@ -880,7 +881,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
+@@ -881,7 +882,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
@@ -46 +47 @@
-@@ -889,24 +890,24 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
+@@ -890,24 +891,24 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
@@ -75 +76 @@
-@@ -918,7 +919,14 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
+@@ -919,7 +920,14 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
@@ -90 +91 @@
-@@ -1093,6 +1101,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
+@@ -1094,6 +1102,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
@@ -98 +99 @@
-@@ -1107,14 +1116,10 @@ port_error:
+@@ -1108,14 +1117,10 @@ port_error:

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

* [dpdk-stable] patch 'net/bnxt: fix FW version log' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (100 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx4: fix handling of probing failure' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/testpmd: fix key for RSS flow rule' " Christian Ehrhardt
                   ` (37 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/910cfd154663ce9e4d9dbcfdfc9f4a9525e407af

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 910cfd154663ce9e4d9dbcfdfc9f4a9525e407af Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 18 Jan 2021 09:42:11 +0530
Subject: [PATCH] net/bnxt: fix FW version log

[ upstream commit 51a7d362721e2fe60425d4c045306ac85f87cd2c ]

Driver is not logging the complete FW version along with HSI version.
Fix it to indicate complete FW version string.

Fixes: 9a891c1764ea ("net/bnxt: update HWRM to version 1.9.2")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 419f42ffef..8025d5ad78 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1005,10 +1005,11 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
 	else
 		HWRM_CHECK_RESULT();
 
-	PMD_DRV_LOG(INFO, "%d.%d.%d:%d.%d.%d\n",
+	PMD_DRV_LOG(INFO, "%d.%d.%d:%d.%d.%d.%d\n",
 		resp->hwrm_intf_maj_8b, resp->hwrm_intf_min_8b,
 		resp->hwrm_intf_upd_8b, resp->hwrm_fw_maj_8b,
-		resp->hwrm_fw_min_8b, resp->hwrm_fw_bld_8b);
+		resp->hwrm_fw_min_8b, resp->hwrm_fw_bld_8b,
+		resp->hwrm_fw_rsvd_8b);
 	bp->fw_ver = (resp->hwrm_fw_maj_8b << 24) |
 		     (resp->hwrm_fw_min_8b << 16) |
 		     (resp->hwrm_fw_bld_8b << 8) |
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.272580098 +0100
+++ 0103-net-bnxt-fix-FW-version-log.patch	2021-02-04 12:04:28.118789814 +0100
@@ -1 +1 @@
-From 51a7d362721e2fe60425d4c045306ac85f87cd2c Mon Sep 17 00:00:00 2001
+From 910cfd154663ce9e4d9dbcfdfc9f4a9525e407af Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 51a7d362721e2fe60425d4c045306ac85f87cd2c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6d54b16568..4d8ca9e478 100644
+index 419f42ffef..8025d5ad78 100644
@@ -23 +24 @@
-@@ -1102,10 +1102,11 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
+@@ -1005,10 +1005,11 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)

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

* [dpdk-stable] patch 'app/testpmd: fix key for RSS flow rule' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (101 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/bnxt: fix FW version log' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/bnxt: fix null termination of Rx mbuf chain' " Christian Ehrhardt
                   ` (36 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Jun W Zhou, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b93fbadbe60f768ac812e04603a6166732f53326 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 21 Jan 2021 17:41:54 +0800
Subject: [PATCH] app/testpmd: fix key for RSS flow rule

[ upstream commit b57927702a58685e46d87960aba25a7b1fa0279e ]

Since the patch '1848b117' has initialized the variable 'key' in
'struct rte_flow_action_rss' with 'NULL', the PMD cannot get the
RSS key now. Details as bellow:

testpmd> flow create 0 ingress pattern eth / ipv4 / end actions
         rss types ipv4-other end key
         1234567890123456789012345678901234567890FFFFFFFFFFFF123
         4567890123456789012345678901234567890FFFFFFFFFFFF
         queues end / end
Flow rule #1 created
testpmd> show port 0 rss-hash key
RSS functions:
         all ipv4-other ip
RSS key:
         4439796BB54C5023B675EA5B124F9F30B8A2C03DDFDC4D02A08C9B3
         34AF64A4C05C6FA343958D8557D99583AE138C92E81150366

This patch sets offset and size of the 'key' variable as the first
parameter of the token 'key'. Later, the address of the RSS key will
be copied to 'key' variable.

Fixes: 1848b117cca1 ("app/testpmd: fix RSS key for flow API RSS rule")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Jun W Zhou <junx.w.zhou@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline_flow.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index be39f4b746..da3533c557 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -2768,7 +2768,10 @@ static const struct token token_list[] = {
 		.name = "key",
 		.help = "RSS hash key",
 		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
-		.args = ARGS(ARGS_ENTRY_ARB(0, 0),
+		.args = ARGS(ARGS_ENTRY_ARB
+			     (offsetof(struct action_rss_data, conf) +
+			      offsetof(struct rte_flow_action_rss, key),
+			      sizeof(((struct rte_flow_action_rss *)0)->key)),
 			     ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.311366666 +0100
+++ 0104-app-testpmd-fix-key-for-RSS-flow-rule.patch	2021-02-04 12:04:28.122789817 +0100
@@ -1 +1 @@
-From b57927702a58685e46d87960aba25a7b1fa0279e Mon Sep 17 00:00:00 2001
+From b93fbadbe60f768ac812e04603a6166732f53326 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b57927702a58685e46d87960aba25a7b1fa0279e ]
+
@@ -28 +29,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 0618611ab1..067e120743 100644
+index be39f4b746..da3533c557 100644
@@ -41 +42 @@
-@@ -3541,7 +3541,10 @@ static const struct token token_list[] = {
+@@ -2768,7 +2768,10 @@ static const struct token token_list[] = {

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

* [dpdk-stable] patch 'net/bnxt: fix null termination of Rx mbuf chain' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (102 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/testpmd: fix key for RSS flow rule' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/octeontx2: fix PF flow action for Tx' " Christian Ehrhardt
                   ` (35 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a7d116fea431f3f5bfee35618fbb88be5ed75c08 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Fri, 22 Jan 2021 16:49:00 -0500
Subject: [PATCH] net/bnxt: fix null termination of Rx mbuf chain

[ upstream commit c711cc2a982d8849ab7ba2582b41c5a4ba5510ee ]

The last mbuf in a multi-segment packet needs to be
NULL-terminated.

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

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index c90ed517ce..572f581b89 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -262,6 +262,7 @@ static int bnxt_rx_pages(struct bnxt_rx_queue *rxq,
 		 */
 		rte_bitmap_set(rxr->ag_bitmap, ag_cons);
 	}
+	last->next = NULL;
 	bnxt_prod_ag_mbuf(rxq);
 	return 0;
 }
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.356596950 +0100
+++ 0105-net-bnxt-fix-null-termination-of-Rx-mbuf-chain.patch	2021-02-04 12:04:28.126789822 +0100
@@ -1 +1 @@
-From c711cc2a982d8849ab7ba2582b41c5a4ba5510ee Mon Sep 17 00:00:00 2001
+From a7d116fea431f3f5bfee35618fbb88be5ed75c08 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c711cc2a982d8849ab7ba2582b41c5a4ba5510ee ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 969cae19fc..c34a8905e7 100644
+index c90ed517ce..572f581b89 100644
@@ -23 +24 @@
-@@ -325,6 +325,7 @@ static int bnxt_rx_pages(struct bnxt_rx_queue *rxq,
+@@ -262,6 +262,7 @@ static int bnxt_rx_pages(struct bnxt_rx_queue *rxq,

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

* [dpdk-stable] patch 'net/octeontx2: fix PF flow action for Tx' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (103 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/bnxt: fix null termination of Rx mbuf chain' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx5: refuse empty VLAN in flow pattern' " Christian Ehrhardt
                   ` (34 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Liron Himi; +Cc: Kiran Kumar K, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/79c6f9e2a5395da0e872ce3007b2508063ee47f0

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 79c6f9e2a5395da0e872ce3007b2508063ee47f0 Mon Sep 17 00:00:00 2001
From: Liron Himi <lironh@marvell.com>
Date: Mon, 18 Jan 2021 12:50:31 +0200
Subject: [PATCH] net/octeontx2: fix PF flow action for Tx

[ upstream commit 701f94a60afbc7c3e28766cc88afa1b5397fdfba ]

pf-func is 16bit but the current reserved location
used in tx action is 8bits. Moved it to bits 63-48.

Fixes: 32e6aaa97c40 ("net/octeontx2: support flow parse actions")

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/net/octeontx2/otx2_flow_parse.c | 5 ++++-
 drivers/net/octeontx2/otx2_flow_utils.c | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c
index 2d9a5857c0..7a7cb29fbd 100644
--- a/drivers/net/octeontx2/otx2_flow_parse.c
+++ b/drivers/net/octeontx2/otx2_flow_parse.c
@@ -1034,7 +1034,10 @@ otx2_flow_parse_actions(struct rte_eth_dev *dev,
 
 set_pf_func:
 	/* Ideally AF must ensure that correct pf_func is set */
-	flow->npc_action |= (uint64_t)pf_func << 4;
+	if (attr->egress)
+		flow->npc_action |= (uint64_t)pf_func << 48;
+	else
+		flow->npc_action |= (uint64_t)pf_func << 4;
 
 	return 0;
 
diff --git a/drivers/net/octeontx2/otx2_flow_utils.c b/drivers/net/octeontx2/otx2_flow_utils.c
index 14625c9ad1..1adeff2563 100644
--- a/drivers/net/octeontx2/otx2_flow_utils.c
+++ b/drivers/net/octeontx2/otx2_flow_utils.c
@@ -940,7 +940,7 @@ otx2_flow_mcam_alloc_and_write(struct rte_flow *flow, struct otx2_mbox *mbox,
 		req->entry_data.kw[0] |= flow_info->channel;
 		req->entry_data.kw_mask[0] |=  (BIT_ULL(12) - 1);
 	} else {
-		uint16_t pf_func = (flow->npc_action >> 4) & 0xffff;
+		uint16_t pf_func = (flow->npc_action >> 48) & 0xffff;
 
 		pf_func = htons(pf_func);
 		req->entry_data.kw[0] |= ((uint64_t)pf_func << 32);
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.393541580 +0100
+++ 0106-net-octeontx2-fix-PF-flow-action-for-Tx.patch	2021-02-04 12:04:28.126789822 +0100
@@ -1 +1 @@
-From 701f94a60afbc7c3e28766cc88afa1b5397fdfba Mon Sep 17 00:00:00 2001
+From 79c6f9e2a5395da0e872ce3007b2508063ee47f0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 701f94a60afbc7c3e28766cc88afa1b5397fdfba ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 476195d634..e9b940f6c0 100644
+index 2d9a5857c0..7a7cb29fbd 100644
@@ -23 +24 @@
-@@ -1090,7 +1090,10 @@ otx2_flow_parse_actions(struct rte_eth_dev *dev,
+@@ -1034,7 +1034,10 @@ otx2_flow_parse_actions(struct rte_eth_dev *dev,
@@ -36 +37 @@
-index 9a0a5f9fb4..7ed86ba742 100644
+index 14625c9ad1..1adeff2563 100644
@@ -39 +40 @@
-@@ -944,7 +944,7 @@ otx2_flow_mcam_alloc_and_write(struct rte_flow *flow, struct otx2_mbox *mbox,
+@@ -940,7 +940,7 @@ otx2_flow_mcam_alloc_and_write(struct rte_flow *flow, struct otx2_mbox *mbox,

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

* [dpdk-stable] patch 'net/mlx5: refuse empty VLAN in flow pattern' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (104 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/octeontx2: fix PF flow action for Tx' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'doc: update flow mark action in mlx5 guide' " Christian Ehrhardt
                   ` (33 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Shiri Kuzin; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/324d37cda78779422cfd5193d96944f7ca2f56eb

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 324d37cda78779422cfd5193d96944f7ca2f56eb Mon Sep 17 00:00:00 2001
From: Shiri Kuzin <shirik@nvidia.com>
Date: Tue, 19 Jan 2021 19:07:00 +0200
Subject: [PATCH] net/mlx5: refuse empty VLAN in flow pattern

[ upstream commit b6aaaa22aeb66cda787d0e0280742da3d735def3 ]

In verbs, an empty VLAN is equivalent to a packet without VLAN layer,
hence, the VLAN item should not be empty and this case is rejected.

However, the case for ether type of VLAN without following VLAN item
was not validated, allowing the creation of a flow with empty
VLAN item.

To fix this issue a validation was added requiring ether type of VLAN
will be followed with VLAN item.

Fixes: 0b1edd21cd78 ("net/mlx5: refuse empty VLAN flow specification")

Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_verbs.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index 0c5e56e409..a670c5f3c5 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -1061,6 +1061,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
 	uint64_t last_item = 0;
 	uint8_t next_protocol = 0xff;
 	uint16_t ether_type = 0;
+	bool is_empty_vlan = false;
 
 	if (items == NULL)
 		return -1;
@@ -1088,6 +1089,8 @@ flow_verbs_validate(struct rte_eth_dev *dev,
 				ether_type &=
 					((const struct rte_flow_item_eth *)
 					 items->mask)->type;
+				if (ether_type == RTE_BE16(RTE_ETHER_TYPE_VLAN))
+					is_empty_vlan = true;
 				ether_type = rte_be_to_cpu_16(ether_type);
 			} else {
 				ether_type = 0;
@@ -1113,6 +1116,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
 			} else {
 				ether_type = 0;
 			}
+			is_empty_vlan = false;
 			break;
 		case RTE_FLOW_ITEM_TYPE_IPV4:
 			ret = mlx5_flow_validate_item_ipv4(items, item_flags,
@@ -1217,6 +1221,10 @@ flow_verbs_validate(struct rte_eth_dev *dev,
 		}
 		item_flags |= last_item;
 	}
+	if (is_empty_vlan)
+		return rte_flow_error_set(error, ENOTSUP,
+						 RTE_FLOW_ERROR_TYPE_ITEM, NULL,
+		    "VLAN matching without vid specification is not supported");
 	for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) {
 		switch (actions->type) {
 		case RTE_FLOW_ACTION_TYPE_VOID:
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.434577808 +0100
+++ 0107-net-mlx5-refuse-empty-VLAN-in-flow-pattern.patch	2021-02-04 12:04:28.130789826 +0100
@@ -1 +1 @@
-From b6aaaa22aeb66cda787d0e0280742da3d735def3 Mon Sep 17 00:00:00 2001
+From 324d37cda78779422cfd5193d96944f7ca2f56eb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b6aaaa22aeb66cda787d0e0280742da3d735def3 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 205b05783c..b442b9b91c 100644
+index 0c5e56e409..a670c5f3c5 100644
@@ -29 +30 @@
-@@ -1256,6 +1256,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
+@@ -1061,6 +1061,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
@@ -37 +38 @@
-@@ -1283,6 +1284,8 @@ flow_verbs_validate(struct rte_eth_dev *dev,
+@@ -1088,6 +1089,8 @@ flow_verbs_validate(struct rte_eth_dev *dev,
@@ -46 +47 @@
-@@ -1308,6 +1311,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
+@@ -1113,6 +1116,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
@@ -53,2 +54,2 @@
- 			ret = mlx5_flow_validate_item_ipv4
-@@ -1419,6 +1423,10 @@ flow_verbs_validate(struct rte_eth_dev *dev,
+ 			ret = mlx5_flow_validate_item_ipv4(items, item_flags,
+@@ -1217,6 +1221,10 @@ flow_verbs_validate(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'doc: update flow mark action in mlx5 guide' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (105 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx5: refuse empty VLAN in flow pattern' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx4: fix port attach in secondary process' " Christian Ehrhardt
                   ` (32 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/307c249c073f71c80edee895943d5df6005126cc

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 307c249c073f71c80edee895943d5df6005126cc Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Fri, 11 Dec 2020 12:05:40 +0000
Subject: [PATCH] doc: update flow mark action in mlx5 guide

[ upstream commit 3ceeed9f7855368cc755f440a938f199c9654253 ]

There some limitations added for the MARK action value range.

Fixes: 2d241515ebaf ("net/mlx5: add devarg for extensive metadata support")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 doc/guides/nics/mlx5.rst | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 5543850be2..9e4a659ab9 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -693,7 +693,7 @@ Run-time configuration
   +------+-----------+-----------+-------------+-------------+
   | 1    | 24 bits   | vary 0-32 | 32 bits     | yes         |
   +------+-----------+-----------+-------------+-------------+
-  | 2    | vary 0-32 | 32 bits   | 32 bits     | yes         |
+  | 2    | vary 0-24 | 32 bits   | 32 bits     | yes         |
   +------+-----------+-----------+-------------+-------------+
 
   If there is no E-Switch configuration the ``dv_xmeta_en`` parameter is
@@ -705,6 +705,15 @@ Run-time configuration
   of the extensive metadata features. The legacy Verbs supports FLAG and
   MARK metadata actions over NIC Rx steering domain only.
 
+  The setting MARK or META value to zero means there is no item provided and
+  receiving datapath will not report in mbufs these items are present.
+
+  For the MARK action the last 16 values in the full range are reserved for
+  internal PMD purposes (to emulate FLAG action). The valid range for the
+  MARK action values is 0-0xFFEF for the 16-bit mode and 0-xFFFFEF
+  for the 24-bit mode, the flows with the MARK action value outside
+  the specified range will be rejected.
+
 - ``dv_flow_en`` parameter [int]
 
   A nonzero value enables the DV flow steering assuming it is supported
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.471009956 +0100
+++ 0108-doc-update-flow-mark-action-in-mlx5-guide.patch	2021-02-04 12:04:28.130789826 +0100
@@ -1 +1 @@
-From 3ceeed9f7855368cc755f440a938f199c9654253 Mon Sep 17 00:00:00 2001
+From 307c249c073f71c80edee895943d5df6005126cc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3ceeed9f7855368cc755f440a938f199c9654253 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 17659521a9..13fd1d8a61 100644
+index 5543850be2..9e4a659ab9 100644
@@ -20 +21 @@
-@@ -840,7 +840,7 @@ Driver options
+@@ -693,7 +693,7 @@ Run-time configuration
@@ -29 +30 @@
-@@ -852,6 +852,15 @@ Driver options
+@@ -705,6 +705,15 @@ Run-time configuration

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

* [dpdk-stable] patch 'net/mlx4: fix port attach in secondary process' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (106 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'doc: update flow mark action in mlx5 guide' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/ixgbe: disable NFS filtering' " Christian Ehrhardt
                   ` (31 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/7bae8b8ba1a53e5a4a8edae243364c90dfd105e7

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 7bae8b8ba1a53e5a4a8edae243364c90dfd105e7 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Sun, 24 Jan 2021 19:02:06 +0800
Subject: [PATCH] net/mlx4: fix port attach in secondary process

[ upstream commit ed879add1ba7529d69c69a35d3260114f871750a ]

Currently, the secondary process port UAR register mapping used by Tx
queue is done during port initializing.

Unluckily, in port hot-plug case, the secondary process will be
requested to initialize the port when primary process probe the port.
At that time, the port Tx queue number is still not configured, the
secondary process get Tx queue number as 0. This causes the UAR register
not be mapped as secondary process get Tx queue number 0.

This commit adds the check of Tx queue number in secondary process when
port starts is requested. Once the Tx queue number is not matching, do
UAR mapping with the latest Tx queue number.

Fixes: 0203d33a1059 ("net/mlx4: support secondary process")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx4/mlx4.c      | 10 +++++-----
 drivers/net/mlx4/mlx4.h      |  4 ++++
 drivers/net/mlx4/mlx4_mp.c   | 24 ++++++++++++++++++++++++
 drivers/net/mlx4/mlx4_rxtx.h |  1 +
 drivers/net/mlx4/mlx4_txq.c  | 28 ++++++++++++++++++++++++++++
 5 files changed, 62 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index c14c357816..4479022a42 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -198,7 +198,7 @@ mlx4_free_verbs_buf(void *ptr, void *data __rte_unused)
  * @return
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
-static int
+int
 mlx4_proc_priv_init(struct rte_eth_dev *dev)
 {
 	struct mlx4_proc_priv *ppriv;
@@ -210,13 +210,13 @@ mlx4_proc_priv_init(struct rte_eth_dev *dev)
 	 */
 	ppriv_size = sizeof(struct mlx4_proc_priv) +
 		     dev->data->nb_tx_queues * sizeof(void *);
-	ppriv = rte_malloc_socket("mlx4_proc_priv", ppriv_size,
-				  RTE_CACHE_LINE_SIZE, dev->device->numa_node);
+	ppriv = rte_zmalloc_socket("mlx4_proc_priv", ppriv_size,
+				   RTE_CACHE_LINE_SIZE, dev->device->numa_node);
 	if (!ppriv) {
 		rte_errno = ENOMEM;
 		return -rte_errno;
 	}
-	ppriv->uar_table_sz = ppriv_size;
+	ppriv->uar_table_sz = dev->data->nb_tx_queues;
 	dev->process_private = ppriv;
 	return 0;
 }
@@ -227,7 +227,7 @@ mlx4_proc_priv_init(struct rte_eth_dev *dev)
  * @param dev
  *   Pointer to Ethernet device structure.
  */
-static void
+void
 mlx4_proc_priv_uninit(struct rte_eth_dev *dev)
 {
 	if (!dev->process_private)
diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h
index c6cb29493e..87710d3996 100644
--- a/drivers/net/mlx4/mlx4.h
+++ b/drivers/net/mlx4/mlx4.h
@@ -197,6 +197,10 @@ struct mlx4_priv {
 #define PORT_ID(priv) ((priv)->dev_data->port_id)
 #define ETH_DEV(priv) (&rte_eth_devices[PORT_ID(priv)])
 
+int mlx4_proc_priv_init(struct rte_eth_dev *dev);
+void mlx4_proc_priv_uninit(struct rte_eth_dev *dev);
+
+
 /* mlx4_ethdev.c */
 
 int mlx4_get_ifname(const struct mlx4_priv *priv, char (*ifname)[IF_NAMESIZE]);
diff --git a/drivers/net/mlx4/mlx4_mp.c b/drivers/net/mlx4/mlx4_mp.c
index cdb648517a..4da743d9e3 100644
--- a/drivers/net/mlx4/mlx4_mp.c
+++ b/drivers/net/mlx4/mlx4_mp.c
@@ -112,6 +112,9 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
 	const struct mlx4_mp_param *param =
 		(const struct mlx4_mp_param *)mp_msg->param;
 	struct rte_eth_dev *dev;
+#ifdef HAVE_IBV_MLX4_UAR_MMAP_OFFSET
+	struct mlx4_proc_priv *ppriv;
+#endif
 	int ret;
 
 	assert(rte_eal_process_type() == RTE_PROC_SECONDARY);
@@ -127,6 +130,21 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
 		rte_mb();
 		dev->tx_pkt_burst = mlx4_tx_burst;
 		dev->rx_pkt_burst = mlx4_rx_burst;
+#ifdef HAVE_IBV_MLX4_UAR_MMAP_OFFSET
+		ppriv = (struct mlx4_proc_priv *)dev->process_private;
+		if (ppriv->uar_table_sz != dev->data->nb_tx_queues) {
+			mlx4_tx_uar_uninit_secondary(dev);
+			mlx4_proc_priv_uninit(dev);
+			ret = mlx4_proc_priv_init(dev);
+			if (ret)
+				return -rte_errno;
+			ret = mlx4_tx_uar_init_secondary(dev, mp_msg->fds[0]);
+			if (ret) {
+				mlx4_proc_priv_uninit(dev);
+				return -rte_errno;
+			}
+		}
+#endif
 		mp_init_msg(dev, &mp_res, param->type);
 		res->result = 0;
 		ret = rte_mp_reply(&mp_res, peer);
@@ -164,6 +182,7 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx4_mp_req_type type)
 	struct rte_mp_reply mp_rep;
 	struct mlx4_mp_param *res __rte_unused;
 	struct timespec ts = {.tv_sec = MLX4_MP_REQ_TIMEOUT_SEC, .tv_nsec = 0};
+	struct mlx4_priv *priv;
 	int ret;
 	int i;
 
@@ -176,6 +195,11 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx4_mp_req_type type)
 		return;
 	}
 	mp_init_msg(dev, &mp_req, type);
+	if (type == MLX4_MP_REQ_START_RXTX) {
+		priv = dev->data->dev_private;
+		mp_req.num_fds = 1;
+		mp_req.fds[0] = priv->ctx->cmd_fd;
+	}
 	ret = rte_mp_request_sync(&mp_req, &mp_rep, &ts);
 	if (ret) {
 		if (rte_errno != ENOTSUP)
diff --git a/drivers/net/mlx4/mlx4_rxtx.h b/drivers/net/mlx4/mlx4_rxtx.h
index 9de6c59411..136ca56ca4 100644
--- a/drivers/net/mlx4/mlx4_rxtx.h
+++ b/drivers/net/mlx4/mlx4_rxtx.h
@@ -157,6 +157,7 @@ uint16_t mlx4_rx_burst_removed(void *dpdk_rxq, struct rte_mbuf **pkts,
 /* mlx4_txq.c */
 
 int mlx4_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd);
+void mlx4_tx_uar_uninit_secondary(struct rte_eth_dev *dev);
 uint64_t mlx4_get_tx_port_offloads(struct mlx4_priv *priv);
 int mlx4_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx,
 			uint16_t desc, unsigned int socket,
diff --git a/drivers/net/mlx4/mlx4_txq.c b/drivers/net/mlx4/mlx4_txq.c
index 01a5efd80d..824ddbd827 100644
--- a/drivers/net/mlx4/mlx4_txq.c
+++ b/drivers/net/mlx4/mlx4_txq.c
@@ -158,6 +158,27 @@ error:
 	} while (i--);
 	return -rte_errno;
 }
+
+void
+mlx4_tx_uar_uninit_secondary(struct rte_eth_dev *dev)
+{
+	struct mlx4_proc_priv *ppriv =
+			(struct mlx4_proc_priv *)dev->process_private;
+	const size_t page_size = sysconf(_SC_PAGESIZE);
+	void *addr;
+	size_t i;
+
+	if (page_size == (size_t)-1) {
+		ERROR("Failed to get mem page size");
+		return;
+	}
+	for (i = 0; i < ppriv->uar_table_sz; i++) {
+		addr = ppriv->uar_table[i];
+		if (addr)
+			munmap(RTE_PTR_ALIGN_FLOOR(addr, page_size), page_size);
+	}
+}
+
 #else
 int
 mlx4_tx_uar_init_secondary(struct rte_eth_dev *dev __rte_unused,
@@ -168,6 +189,13 @@ mlx4_tx_uar_init_secondary(struct rte_eth_dev *dev __rte_unused,
 	rte_errno = ENOTSUP;
 	return -rte_errno;
 }
+
+void
+mlx4_tx_uar_uninit_secondary(struct rte_eth_dev *dev __rte_unused)
+{
+	assert(rte_eal_process_type() == RTE_PROC_SECONDARY);
+	ERROR("UAR remap is not supported");
+}
 #endif
 
 /**
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.508204091 +0100
+++ 0109-net-mlx4-fix-port-attach-in-secondary-process.patch	2021-02-04 12:04:28.134789829 +0100
@@ -1 +1 @@
-From ed879add1ba7529d69c69a35d3260114f871750a Mon Sep 17 00:00:00 2001
+From 7bae8b8ba1a53e5a4a8edae243364c90dfd105e7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ed879add1ba7529d69c69a35d3260114f871750a ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index 284dcb9dd0..041c1934f5 100644
+index c14c357816..4479022a42 100644
@@ -36 +37 @@
-@@ -195,7 +195,7 @@ mlx4_free_verbs_buf(void *ptr, void *data __rte_unused)
+@@ -198,7 +198,7 @@ mlx4_free_verbs_buf(void *ptr, void *data __rte_unused)
@@ -45 +46 @@
-@@ -207,13 +207,13 @@ mlx4_proc_priv_init(struct rte_eth_dev *dev)
+@@ -210,13 +210,13 @@ mlx4_proc_priv_init(struct rte_eth_dev *dev)
@@ -62 +63 @@
-@@ -224,7 +224,7 @@ mlx4_proc_priv_init(struct rte_eth_dev *dev)
+@@ -227,7 +227,7 @@ mlx4_proc_priv_init(struct rte_eth_dev *dev)
@@ -72 +73 @@
-index 63df8fcf2b..e07b1d2386 100644
+index c6cb29493e..87710d3996 100644
@@ -87 +88 @@
-index e05da89c0e..ddf7bdb9ef 100644
+index cdb648517a..4da743d9e3 100644
@@ -90 +91 @@
-@@ -111,6 +111,9 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
+@@ -112,6 +112,9 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
@@ -99,2 +100,2 @@
- 	MLX4_ASSERT(rte_eal_process_type() == RTE_PROC_SECONDARY);
-@@ -126,6 +129,21 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
+ 	assert(rte_eal_process_type() == RTE_PROC_SECONDARY);
+@@ -127,6 +130,21 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
@@ -122 +123 @@
-@@ -163,6 +181,7 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx4_mp_req_type type)
+@@ -164,6 +182,7 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx4_mp_req_type type)
@@ -130 +131 @@
-@@ -175,6 +194,11 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx4_mp_req_type type)
+@@ -176,6 +195,11 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx4_mp_req_type type)
@@ -143 +144 @@
-index 7c72ce6d17..c838afc242 100644
+index 9de6c59411..136ca56ca4 100644
@@ -155 +156 @@
-index 8262071505..31ab308050 100644
+index 01a5efd80d..824ddbd827 100644
@@ -158 +159 @@
-@@ -157,6 +157,27 @@ error:
+@@ -158,6 +158,27 @@ error:
@@ -186 +187 @@
-@@ -167,6 +188,13 @@ mlx4_tx_uar_init_secondary(struct rte_eth_dev *dev __rte_unused,
+@@ -168,6 +189,13 @@ mlx4_tx_uar_init_secondary(struct rte_eth_dev *dev __rte_unused,

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

* [dpdk-stable] patch 'net/ixgbe: disable NFS filtering' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (107 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx4: fix port attach in secondary process' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/sfc: fix generic byte statistics to exclude FCS bytes' " Christian Ehrhardt
                   ` (30 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/79680bf831327270a301e518c895799f27dbf81b

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 79680bf831327270a301e518c895799f27dbf81b Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Tue, 26 Jan 2021 11:03:08 +0800
Subject: [PATCH] net/ixgbe: disable NFS filtering

[ upstream commit 68643843e79d2df54e8a6c148a29fd314a5e7897 ]

Disable NFS header filtering whether NFS packets coalescing are
required or not, in order to make RSS can work on NFS packets.

The code without the patch does follow datasheet, but not consistent
with the ixgbe kernel driver. It causes NFS packets to be filtered
and make them flow into queue 0, before RSS can work on them.

Fixes: b826efba6de4 ("net/ixgbe: align register setting when RSC is disabled")
Fixes: 8eecb3295aed ("ixgbe: add LRO support")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 8c78cc0589..7777dc17f1 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -4786,15 +4786,11 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)
 	/* RFCTL configuration  */
 	rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL);
 	if ((rsc_capable) && (rx_conf->offloads & DEV_RX_OFFLOAD_TCP_LRO))
-		/*
-		 * Since NFS packets coalescing is not supported - clear
-		 * RFCTL.NFSW_DIS and RFCTL.NFSR_DIS when RSC is
-		 * enabled.
-		 */
-		rfctl &= ~(IXGBE_RFCTL_RSC_DIS | IXGBE_RFCTL_NFSW_DIS |
-			   IXGBE_RFCTL_NFSR_DIS);
+		rfctl &= ~IXGBE_RFCTL_RSC_DIS;
 	else
 		rfctl |= IXGBE_RFCTL_RSC_DIS;
+	/* disable NFS filtering */
+	rfctl |= IXGBE_RFCTL_NFSW_DIS | IXGBE_RFCTL_NFSR_DIS;
 	IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
 
 	/* If LRO hasn't been requested - we are done here. */
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.543814708 +0100
+++ 0110-net-ixgbe-disable-NFS-filtering.patch	2021-02-04 12:04:28.138789833 +0100
@@ -1 +1 @@
-From 68643843e79d2df54e8a6c148a29fd314a5e7897 Mon Sep 17 00:00:00 2001
+From 79680bf831327270a301e518c895799f27dbf81b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 68643843e79d2df54e8a6c148a29fd314a5e7897 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 36e6ca9010..72d27f35ca 100644
+index 8c78cc0589..7777dc17f1 100644
@@ -27 +28 @@
-@@ -4923,15 +4923,11 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)
+@@ -4786,15 +4786,11 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/sfc: fix generic byte statistics to exclude FCS bytes' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (108 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/ixgbe: disable NFS filtering' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: fix stack corruption' " Christian Ehrhardt
                   ` (29 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Viacheslav Galaktionov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b30d651e4804acea8f5707d3759b16fa3fb80b52 Mon Sep 17 00:00:00 2001
From: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Date: Wed, 20 Jan 2021 15:44:18 +0300
Subject: [PATCH] net/sfc: fix generic byte statistics to exclude FCS bytes

[ upstream commit 8a6930361bcfb0374cb84e95d75ab7c01231c96e ]

Generic byte statistics should not include Ethernet FCS bytes.

Fixes: 1caab2f1e684 ("net/sfc: add basic statistics")

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/sfc/sfc_ethdev.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 9517cebd65..cc7eefb322 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -608,10 +608,19 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 			mac_stats[EFX_MAC_VADAPTER_TX_BROADCAST_BYTES];
 		stats->imissed = mac_stats[EFX_MAC_VADAPTER_RX_BAD_PACKETS];
 		stats->oerrors = mac_stats[EFX_MAC_VADAPTER_TX_BAD_PACKETS];
+
+		/* CRC is included in these stats, but shouldn't be */
+		stats->ibytes -= stats->ipackets * RTE_ETHER_CRC_LEN;
+		stats->obytes -= stats->opackets * RTE_ETHER_CRC_LEN;
 	} else {
 		stats->opackets = mac_stats[EFX_MAC_TX_PKTS];
 		stats->ibytes = mac_stats[EFX_MAC_RX_OCTETS];
 		stats->obytes = mac_stats[EFX_MAC_TX_OCTETS];
+
+		/* CRC is included in these stats, but shouldn't be */
+		stats->ibytes -= mac_stats[EFX_MAC_RX_PKTS] * RTE_ETHER_CRC_LEN;
+		stats->obytes -= mac_stats[EFX_MAC_TX_PKTS] * RTE_ETHER_CRC_LEN;
+
 		/*
 		 * Take into account stats which are whenever supported
 		 * on EF10. If some stat is not supported by current
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.581025397 +0100
+++ 0111-net-sfc-fix-generic-byte-statistics-to-exclude-FCS-b.patch	2021-02-04 12:04:28.142789836 +0100
@@ -1 +1 @@
-From 8a6930361bcfb0374cb84e95d75ab7c01231c96e Mon Sep 17 00:00:00 2001
+From b30d651e4804acea8f5707d3759b16fa3fb80b52 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a6930361bcfb0374cb84e95d75ab7c01231c96e ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index d6f6a84eab..479b4f4df6 100644
+index 9517cebd65..cc7eefb322 100644
@@ -21 +22 @@
-@@ -640,10 +640,19 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -608,10 +608,19 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)

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

* [dpdk-stable] patch 'net/mvpp2: fix stack corruption' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (109 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/sfc: fix generic byte statistics to exclude FCS bytes' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: remove debug log on fast-path' " Christian Ehrhardt
                   ` (28 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Yuri Chipchev; +Cc: Liron Himi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From abaa646aa09bd6fffb87611da6d2fdf2dc6f7c5c Mon Sep 17 00:00:00 2001
From: Yuri Chipchev <yuric@marvell.com>
Date: Wed, 27 Jan 2021 18:09:15 +0200
Subject: [PATCH] net/mvpp2: fix stack corruption

[ upstream commit 8ce3c5db531eaf339ed60fb0ef97eab05c77846b ]

Fixes stack corruption in mrvl_fill_bpool function
in case num > MRVL_PP2_RXD_MAX

Fixes: c3637258d894 ("net/mrvl: fix Rx descriptors number")

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.613163314 +0100
+++ 0112-net-mvpp2-fix-stack-corruption.patch	2021-02-04 12:04:28.142789836 +0100
@@ -1 +1 @@
-From 8ce3c5db531eaf339ed60fb0ef97eab05c77846b Mon Sep 17 00:00:00 2001
+From abaa646aa09bd6fffb87611da6d2fdf2dc6f7c5c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8ce3c5db531eaf339ed60fb0ef97eab05c77846b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 1d67f2abf1..2f5b2f256b 100644
+index 9037274327..6c9c5ef2f2 100644
@@ -22 +23 @@
-@@ -1614,8 +1614,8 @@ mrvl_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+@@ -1611,8 +1611,8 @@ mrvl_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)

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

* [dpdk-stable] patch 'net/mvpp2: remove debug log on fast-path' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (110 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: fix stack corruption' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: remove VLAN flush' " Christian Ehrhardt
                   ` (27 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Liron Himi; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/75f7ddce881c28c1a0a147526219234c34bf9940

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 75f7ddce881c28c1a0a147526219234c34bf9940 Mon Sep 17 00:00:00 2001
From: Liron Himi <lironh@marvell.com>
Date: Wed, 27 Jan 2021 18:09:16 +0200
Subject: [PATCH] net/mvpp2: remove debug log on fast-path

[ upstream commit fa876f3ae29885321c752468c22ad1c06a7a498c ]

In case of non-ip frame the current code reached the 'default'
case which result with function call to log a msg.
Those kind of calls should not be performed on fast-path.

The performance for this kind of frames increased by 50%

Fixes: acab7d58c81b ("net/mvpp2: convert to dynamic logging")

Signed-off-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 27 ++++-----------------------
 1 file changed, 4 insertions(+), 23 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 6c9c5ef2f2..5621ff8c60 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -2168,7 +2168,6 @@ mrvl_desc_to_packet_type_and_offset(struct pp2_ppio_desc *desc,
 		*l4_offset = *l3_offset + MRVL_ARP_LENGTH;
 		break;
 	default:
-		MRVL_LOG(DEBUG, "Failed to recognise l3 packet type");
 		break;
 	}
 
@@ -2180,7 +2179,6 @@ mrvl_desc_to_packet_type_and_offset(struct pp2_ppio_desc *desc,
 		packet_type |= RTE_PTYPE_L4_UDP;
 		break;
 	default:
-		MRVL_LOG(DEBUG, "Failed to recognise l4 packet type");
 		break;
 	}
 
@@ -2250,10 +2248,9 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 
 	ret = pp2_ppio_recv(q->priv->ppio, q->priv->rxq_map[q->queue_id].tc,
 			    q->priv->rxq_map[q->queue_id].inq, descs, &nb_pkts);
-	if (unlikely(ret < 0)) {
-		MRVL_LOG(ERR, "Failed to receive packets");
+	if (unlikely(ret < 0))
 		return 0;
-	}
+
 	mrvl_port_bpool_size[bpool->pp2_id][bpool->id][core_id] -= nb_pkts;
 
 	for (i = 0; i < nb_pkts; i++) {
@@ -2316,21 +2313,13 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 
 		if (unlikely(num <= q->priv->bpool_min_size ||
 			     (!rx_done && num < q->priv->bpool_init_size))) {
-			ret = mrvl_fill_bpool(q, MRVL_BURST_SIZE);
-			if (ret)
-				MRVL_LOG(ERR, "Failed to fill bpool");
+			mrvl_fill_bpool(q, MRVL_BURST_SIZE);
 		} else if (unlikely(num > q->priv->bpool_max_size)) {
 			int i;
 			int pkt_to_remove = num - q->priv->bpool_init_size;
 			struct rte_mbuf *mbuf;
 			struct pp2_buff_inf buff;
 
-			MRVL_LOG(DEBUG,
-				"port-%d:%d: bpool %d oversize - remove %d buffers (pool size: %d -> %d)",
-				bpool->pp2_id, q->priv->ppio->port_id,
-				bpool->id, pkt_to_remove, num,
-				q->priv->bpool_init_size);
-
 			for (i = 0; i < pkt_to_remove; i++) {
 				ret = pp2_bpool_get_buff(hif, bpool, &buff);
 				if (ret)
@@ -2523,12 +2512,8 @@ mrvl_tx_pkt_burst(void *txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 				       sq, q->queue_id, 0);
 
 	sq_free_size = MRVL_PP2_TX_SHADOWQ_SIZE - sq->size - 1;
-	if (unlikely(nb_pkts > sq_free_size)) {
-		MRVL_LOG(DEBUG,
-			"No room in shadow queue for %d packets! %d packets will be sent.",
-			nb_pkts, sq_free_size);
+	if (unlikely(nb_pkts > sq_free_size))
 		nb_pkts = sq_free_size;
-	}
 
 	for (i = 0; i < nb_pkts; i++) {
 		struct rte_mbuf *mbuf = tx_pkts[i];
@@ -2645,10 +2630,6 @@ mrvl_tx_sg_pkt_burst(void *txq, struct rte_mbuf **tx_pkts,
 		 */
 		if (unlikely(total_descs > sq_free_size)) {
 			total_descs -= nb_segs;
-			RTE_LOG(DEBUG, PMD,
-				"No room in shadow queue for %d packets! "
-				"%d packets will be sent.\n",
-				nb_pkts, i);
 			break;
 		}
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.657682227 +0100
+++ 0113-net-mvpp2-remove-debug-log-on-fast-path.patch	2021-02-04 12:04:28.146789841 +0100
@@ -1 +1 @@
-From fa876f3ae29885321c752468c22ad1c06a7a498c Mon Sep 17 00:00:00 2001
+From 75f7ddce881c28c1a0a147526219234c34bf9940 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fa876f3ae29885321c752468c22ad1c06a7a498c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 2f5b2f256b..a564752a57 100644
+index 6c9c5ef2f2..5621ff8c60 100644
@@ -24 +25 @@
-@@ -2171,7 +2171,6 @@ mrvl_desc_to_packet_type_and_offset(struct pp2_ppio_desc *desc,
+@@ -2168,7 +2168,6 @@ mrvl_desc_to_packet_type_and_offset(struct pp2_ppio_desc *desc,
@@ -32 +33 @@
-@@ -2183,7 +2182,6 @@ mrvl_desc_to_packet_type_and_offset(struct pp2_ppio_desc *desc,
+@@ -2180,7 +2179,6 @@ mrvl_desc_to_packet_type_and_offset(struct pp2_ppio_desc *desc,
@@ -40 +41 @@
-@@ -2253,10 +2251,9 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -2250,10 +2248,9 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
@@ -53 +54 @@
-@@ -2319,21 +2316,13 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -2316,21 +2313,13 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
@@ -76 +77 @@
-@@ -2526,12 +2515,8 @@ mrvl_tx_pkt_burst(void *txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -2523,12 +2512,8 @@ mrvl_tx_pkt_burst(void *txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
@@ -90 +91 @@
-@@ -2648,10 +2633,6 @@ mrvl_tx_sg_pkt_burst(void *txq, struct rte_mbuf **tx_pkts,
+@@ -2645,10 +2630,6 @@ mrvl_tx_sg_pkt_burst(void *txq, struct rte_mbuf **tx_pkts,

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

* [dpdk-stable] patch 'net/mvpp2: remove VLAN flush' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (111 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: remove debug log on fast-path' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: remove CRC length from MRU validation' " Christian Ehrhardt
                   ` (26 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Liron Himi; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/39733ffb65cc20ab5989ba07979523d2dd0bfebd

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 39733ffb65cc20ab5989ba07979523d2dd0bfebd Mon Sep 17 00:00:00 2001
From: Liron Himi <lironh@marvell.com>
Date: Wed, 27 Jan 2021 18:09:17 +0200
Subject: [PATCH] net/mvpp2: remove VLAN flush

[ upstream commit 8fb1d5eba05899fb2a4c46156546898fffe15917 ]

VLAN-flush in MUSDK is not supported yet.
Until it does, the code should be removed as currently
an redundant error message is displayed.

Fixes: a8f3d6783a3c ("net/mrvl: support VLAN filtering")

Signed-off-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 12 ------------
 drivers/net/mvpp2/mrvl_ethdev.h |  1 -
 2 files changed, 13 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 5621ff8c60..974a0fd142 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -673,18 +673,6 @@ mrvl_dev_start(struct rte_eth_dev *dev)
 		priv->uc_mc_flushed = 1;
 	}
 
-	if (!priv->vlan_flushed) {
-		ret = pp2_ppio_flush_vlan(priv->ppio);
-		if (ret) {
-			MRVL_LOG(ERR, "Failed to flush vlan list");
-			/*
-			 * TODO
-			 * once pp2_ppio_flush_vlan() is supported jump to out
-			 * goto out;
-			 */
-		}
-		priv->vlan_flushed = 1;
-	}
 	ret = mrvl_mtu_set(dev, dev->data->mtu);
 	if (ret)
 		MRVL_LOG(ERR, "Failed to set MTU to %d", dev->data->mtu);
diff --git a/drivers/net/mvpp2/mrvl_ethdev.h b/drivers/net/mvpp2/mrvl_ethdev.h
index db6632f5b6..eee5182ce8 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.h
+++ b/drivers/net/mvpp2/mrvl_ethdev.h
@@ -186,7 +186,6 @@ struct mrvl_priv {
 	uint8_t bpool_bit;
 	uint8_t rss_hf_tcp;
 	uint8_t uc_mc_flushed;
-	uint8_t vlan_flushed;
 	uint8_t isolated;
 	uint8_t multiseg;
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.691798387 +0100
+++ 0114-net-mvpp2-remove-VLAN-flush.patch	2021-02-04 12:04:28.146789841 +0100
@@ -1 +1 @@
-From 8fb1d5eba05899fb2a4c46156546898fffe15917 Mon Sep 17 00:00:00 2001
+From 39733ffb65cc20ab5989ba07979523d2dd0bfebd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8fb1d5eba05899fb2a4c46156546898fffe15917 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index a564752a57..e95c6e5992 100644
+index 5621ff8c60..974a0fd142 100644
@@ -23 +24 @@
-@@ -671,18 +671,6 @@ mrvl_dev_start(struct rte_eth_dev *dev)
+@@ -673,18 +673,6 @@ mrvl_dev_start(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/mvpp2: remove CRC length from MRU validation' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (112 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: remove VLAN flush' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: fix frame size checking' " Christian Ehrhardt
                   ` (25 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Liron Himi; +Cc: Yuri Chipchev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/0595f2abf5c6eea34ce1aacb7240ed675efb15e3

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 0595f2abf5c6eea34ce1aacb7240ed675efb15e3 Mon Sep 17 00:00:00 2001
From: Liron Himi <lironh@marvell.com>
Date: Wed, 27 Jan 2021 18:09:18 +0200
Subject: [PATCH] net/mvpp2: remove CRC length from MRU validation

[ upstream commit 31536a6892ef9dfe98be26b65d9235d82ea9f9f1 ]

CRC is being removed by HW before packet get
write to the buffer, so CRC len should not be
included in MRU validation

Fixes: 79ec62028b9a ("net/mvpp2: update MTU and MRU related calculations")

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Yuri Chipchev <yuric@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 974a0fd142..93e340679c 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -443,8 +443,8 @@ mrvl_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	 * when this feature has not been enabled/supported so far
 	 * (TODO check scattered_rx flag here once scattered RX is supported).
 	 */
-	if (mru + MRVL_PKT_OFFS > mbuf_data_size) {
-		mru = mbuf_data_size - MRVL_PKT_OFFS;
+	if (mru - RTE_ETHER_CRC_LEN + MRVL_PKT_OFFS > mbuf_data_size) {
+		mru = mbuf_data_size + RTE_ETHER_CRC_LEN - MRVL_PKT_OFFS;
 		mtu = MRVL_PP2_MRU_TO_MTU(mru);
 		MRVL_LOG(WARNING, "MTU too big, max MTU possible limitted "
 			"by current mbuf size: %u. Set MTU to %u, MRU to %u",
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.738958887 +0100
+++ 0115-net-mvpp2-remove-CRC-length-from-MRU-validation.patch	2021-02-04 12:04:28.150789845 +0100
@@ -1 +1 @@
-From 31536a6892ef9dfe98be26b65d9235d82ea9f9f1 Mon Sep 17 00:00:00 2001
+From 0595f2abf5c6eea34ce1aacb7240ed675efb15e3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 31536a6892ef9dfe98be26b65d9235d82ea9f9f1 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index e95c6e5992..476227b9a1 100644
+index 974a0fd142..93e340679c 100644
@@ -23 +24 @@
-@@ -441,8 +441,8 @@ mrvl_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -443,8 +443,8 @@ mrvl_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)

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

* [dpdk-stable] patch 'net/mvpp2: fix frame size checking' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (113 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: remove CRC length from MRU validation' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/hns3: adjust format specifier for enum' " Christian Ehrhardt
                   ` (24 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Liron Himi; +Cc: Yuri Chipchev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/6b5aae6fbf648e26e3316f68260339ab516cf3e6

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 6b5aae6fbf648e26e3316f68260339ab516cf3e6 Mon Sep 17 00:00:00 2001
From: Liron Himi <lironh@marvell.com>
Date: Wed, 27 Jan 2021 18:09:19 +0200
Subject: [PATCH] net/mvpp2: fix frame size checking

[ upstream commit 1c9a958a8bfb7cb4e2082b97d01849d4ba91c13b ]

Need to add CRC len to the frame-size to compare against
max_rx_pkt_len which includes it.

Fixes: 79ec62028b9a ("net/mvpp2: update MTU and MRU related calculations")

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Yuri Chipchev <yuric@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 93e340679c..fe4cadda04 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -1696,7 +1696,8 @@ mrvl_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 		return -EFAULT;
 	}
 
-	frame_size = buf_size - RTE_PKTMBUF_HEADROOM - MRVL_PKT_EFFEC_OFFS;
+	frame_size = buf_size - RTE_PKTMBUF_HEADROOM -
+		     MRVL_PKT_EFFEC_OFFS + RTE_ETHER_CRC_LEN;
 	if (frame_size < max_rx_pkt_len) {
 		MRVL_LOG(WARNING,
 			"Mbuf size must be increased to %u bytes to hold up "
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.780724928 +0100
+++ 0116-net-mvpp2-fix-frame-size-checking.patch	2021-02-04 12:04:28.154789849 +0100
@@ -1 +1 @@
-From 1c9a958a8bfb7cb4e2082b97d01849d4ba91c13b Mon Sep 17 00:00:00 2001
+From 6b5aae6fbf648e26e3316f68260339ab516cf3e6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1c9a958a8bfb7cb4e2082b97d01849d4ba91c13b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 476227b9a1..db81135f1b 100644
+index 93e340679c..fe4cadda04 100644
@@ -22 +23 @@
-@@ -1699,7 +1699,8 @@ mrvl_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1696,7 +1696,8 @@ mrvl_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,

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

* [dpdk-stable] patch 'net/hns3: adjust format specifier for enum' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (114 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: fix frame size checking' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/testpmd: avoid exit without terminal restore' " Christian Ehrhardt
                   ` (23 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Lijun Ou; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 4d528e4a4504ffe6a885c31a3694c363e68d3221 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Fri, 22 Jan 2021 18:18:51 +0800
Subject: [PATCH] net/hns3: adjust format specifier for enum

[ upstream commit 692a1d2735b99d91bf9de009c3f7c510bd735a85 ]

Here uses %d as printing output for enumeration member.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 2eaddf7076..3f4d9dbfe6 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1358,7 +1358,7 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function *func,
 		*hash_algo = HNS3_RSS_HASH_ALGO_SIMPLE;
 		break;
 	default:
-		hns3_err(hw, "Invalid RSS algorithm configuration(%u)",
+		hns3_err(hw, "Invalid RSS algorithm configuration(%d)",
 			 algo_func);
 		return -EINVAL;
 	}
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.820318435 +0100
+++ 0117-net-hns3-adjust-format-specifier-for-enum.patch	2021-02-04 12:04:28.154789849 +0100
@@ -1 +1 @@
-From 692a1d2735b99d91bf9de009c3f7c510bd735a85 Mon Sep 17 00:00:00 2001
+From 4d528e4a4504ffe6a885c31a3694c363e68d3221 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 692a1d2735b99d91bf9de009c3f7c510bd735a85 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index e9d0a0bc90..3e387ac0bf 100644
+index 2eaddf7076..3f4d9dbfe6 100644
@@ -20,2 +21,2 @@
-@@ -1447,7 +1447,7 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function *func,
- 		*hash_algo = HNS3_RSS_HASH_ALGO_SYMMETRIC_TOEP;
+@@ -1358,7 +1358,7 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function *func,
+ 		*hash_algo = HNS3_RSS_HASH_ALGO_SIMPLE;

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

* [dpdk-stable] patch 'app/testpmd: avoid exit without terminal restore' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (115 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/hns3: adjust format specifier for enum' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/nfp: read chip model from PluDevice register' " Christian Ehrhardt
                   ` (22 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/062df532dd0e0f63169173171708bb84186e138a

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 062df532dd0e0f63169173171708bb84186e138a Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Mon, 25 Jan 2021 11:29:53 +0800
Subject: [PATCH] app/testpmd: avoid exit without terminal restore

[ upstream commit b3e3d602a5ff6b91dd6006328b95e78ccd513f20 ]

In interactive mode, if testpmd exit by calling rte_exit without
restore terminal attributes, terminal will not echo keyboard input.

register a function with atexit() in prompt(), when exit() in
rte_exit() is called, the registered function restores terminal
attributes.

Fixes: 5a8fb55c48ab ("app/testpmd: support unidirectional configuration")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/cmdline.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 7e1ced7c59..21211907eb 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -19497,6 +19497,7 @@ cmdline_read_from_file(const char *filename)
 void
 prompt(void)
 {
+	int ret;
 	/* initialize non-constant commands */
 	cmd_set_fwd_mode_init();
 	cmd_set_fwd_retry_mode_init();
@@ -19504,15 +19505,23 @@ prompt(void)
 	testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> ");
 	if (testpmd_cl == NULL)
 		return;
+
+	ret = atexit(prompt_exit);
+	if (ret != 0)
+		printf("Cannot set exit function for cmdline\n");
+
 	cmdline_interact(testpmd_cl);
-	cmdline_stdin_exit(testpmd_cl);
+	if (ret != 0)
+		cmdline_stdin_exit(testpmd_cl);
 }
 
 void
 prompt_exit(void)
 {
-	if (testpmd_cl != NULL)
+	if (testpmd_cl != NULL) {
 		cmdline_quit(testpmd_cl);
+		cmdline_stdin_exit(testpmd_cl);
+	}
 }
 
 static void
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.860520114 +0100
+++ 0118-app-testpmd-avoid-exit-without-terminal-restore.patch	2021-02-04 12:04:28.174789868 +0100
@@ -1 +1 @@
-From b3e3d602a5ff6b91dd6006328b95e78ccd513f20 Mon Sep 17 00:00:00 2001
+From 062df532dd0e0f63169173171708bb84186e138a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3e3d602a5ff6b91dd6006328b95e78ccd513f20 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index b338f5fe63..789f35f099 100644
+index 7e1ced7c59..21211907eb 100644
@@ -26 +27 @@
-@@ -17131,6 +17131,7 @@ cmdline_read_from_file(const char *filename)
+@@ -19497,6 +19497,7 @@ cmdline_read_from_file(const char *filename)
@@ -34 +35 @@
-@@ -17138,15 +17139,23 @@ prompt(void)
+@@ -19504,15 +19505,23 @@ prompt(void)

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

* [dpdk-stable] patch 'net/nfp: read chip model from PluDevice register' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (116 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/testpmd: avoid exit without terminal restore' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/ena: flush Rx buffers memory pool cache' " Christian Ehrhardt
                   ` (21 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Heinrich Kuhn; +Cc: Simon Horman, Louis Peens, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/767ebfd18ba1529b81c3fe32d1b77216d5f6ea19

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 767ebfd18ba1529b81c3fe32d1b77216d5f6ea19 Mon Sep 17 00:00:00 2001
From: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Date: Mon, 25 Jan 2021 17:25:44 +0200
Subject: [PATCH] net/nfp: read chip model from PluDevice register

[ upstream commit c0a8b0247533ccae77af853600e58565ad94b0aa ]

For newer smartNIC NVRAM versions the chip model should be read from the
PluDevice register as it provides the authoritative chip model/revision.
This method of reading the chip model is backwards compatible with
legacy NVRAM versions too.

Since the model number is purely used for reporting purposes, follow the
hardware team convention of subtracting 0x10 from the PluDevice register
to obtain the chip model/revision number.

Fixes: c7e9729da6b5 ("net/nfp: support CPP")

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Louis Peens <louis.peens@netronome.com>
---
 drivers/net/nfp/nfpcore/nfp_cpp.h     |  2 +-
 drivers/net/nfp/nfpcore/nfp_cppcore.c | 49 ++++++++++++---------------
 2 files changed, 23 insertions(+), 28 deletions(-)

diff --git a/drivers/net/nfp/nfpcore/nfp_cpp.h b/drivers/net/nfp/nfpcore/nfp_cpp.h
index 1427954c17..08d656da14 100644
--- a/drivers/net/nfp/nfpcore/nfp_cpp.h
+++ b/drivers/net/nfp/nfpcore/nfp_cpp.h
@@ -170,7 +170,7 @@ void *nfp_cpp_priv(struct nfp_cpp *cpp);
  */
 void *nfp_cpp_area_priv(struct nfp_cpp_area *cpp_area);
 
-uint32_t __nfp_cpp_model_autodetect(struct nfp_cpp *cpp);
+uint32_t __nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model);
 
 /*
  * NFP CPP core interface for CPP clients.
diff --git a/drivers/net/nfp/nfpcore/nfp_cppcore.c b/drivers/net/nfp/nfpcore/nfp_cppcore.c
index dec4a8b6d1..6d629430d4 100644
--- a/drivers/net/nfp/nfpcore/nfp_cppcore.c
+++ b/drivers/net/nfp/nfpcore/nfp_cppcore.c
@@ -22,8 +22,9 @@
 
 #define NFP_PL_DEVICE_ID                        0x00000004
 #define NFP_PL_DEVICE_ID_MASK                   0xff
-
-#define NFP6000_ARM_GCSR_SOFTMODEL0             0x00400144
+#define NFP_PL_DEVICE_PART_MASK                 0xffff0000
+#define NFP_PL_DEVICE_MODEL_MASK               (NFP_PL_DEVICE_PART_MASK | \
+						NFP_PL_DEVICE_ID_MASK)
 
 void
 nfp_cpp_priv_set(struct nfp_cpp *cpp, void *priv)
@@ -46,13 +47,18 @@ nfp_cpp_model_set(struct nfp_cpp *cpp, uint32_t model)
 uint32_t
 nfp_cpp_model(struct nfp_cpp *cpp)
 {
+	int err;
+	uint32_t model;
+
 	if (!cpp)
 		return NFP_CPP_MODEL_INVALID;
 
-	if (cpp->model == 0)
-		cpp->model = __nfp_cpp_model_autodetect(cpp);
+	err = __nfp_cpp_model_autodetect(cpp, &model);
 
-	return cpp->model;
+	if (err < 0)
+		return err;
+
+	return model;
 }
 
 void
@@ -389,9 +395,6 @@ nfp_xpb_to_cpp(struct nfp_cpp *cpp, uint32_t *xpb_addr)
 	uint32_t xpb;
 	int island;
 
-	if (!NFP_CPP_MODEL_IS_6000(cpp->model))
-		return 0;
-
 	xpb = NFP_CPP_ID(14, NFP_CPP_ACTION_RW, 0);
 
 	/*
@@ -796,29 +799,21 @@ nfp_cpp_area_fill(struct nfp_cpp_area *area, unsigned long offset,
  * as those are model-specific
  */
 uint32_t
-__nfp_cpp_model_autodetect(struct nfp_cpp *cpp)
+__nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model)
 {
-	uint32_t arm_id = NFP_CPP_ID(NFP_CPP_TARGET_ARM, 0, 0);
-	uint32_t model = 0;
-
-	if (nfp_cpp_readl(cpp, arm_id, NFP6000_ARM_GCSR_SOFTMODEL0, &model))
-		return 0;
-
-	if (NFP_CPP_MODEL_IS_6000(model)) {
-		uint32_t tmp;
-
-		nfp_cpp_model_set(cpp, model);
+	uint32_t reg;
+	int err;
 
-		/* The PL's PluDeviceID revision code is authoratative */
-		model &= ~0xff;
-		if (nfp_xpb_readl(cpp, NFP_XPB_DEVICE(1, 1, 16) +
-				   NFP_PL_DEVICE_ID, &tmp))
-			return 0;
+	err = nfp_xpb_readl(cpp, NFP_XPB_DEVICE(1, 1, 16) + NFP_PL_DEVICE_ID,
+			    &reg);
+	if (err < 0)
+		return err;
 
-		model |= (NFP_PL_DEVICE_ID_MASK & tmp) - 0x10;
-	}
+	*model = reg & NFP_PL_DEVICE_MODEL_MASK;
+	if (*model & NFP_PL_DEVICE_ID_MASK)
+		*model -= 0x10;
 
-	return model;
+	return 0;
 }
 
 /*
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.909042059 +0100
+++ 0119-net-nfp-read-chip-model-from-PluDevice-register.patch	2021-02-04 12:04:28.174789868 +0100
@@ -1 +1 @@
-From c0a8b0247533ccae77af853600e58565ad94b0aa Mon Sep 17 00:00:00 2001
+From 767ebfd18ba1529b81c3fe32d1b77216d5f6ea19 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c0a8b0247533ccae77af853600e58565ad94b0aa ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 78f7b8ca2f..720d3989e6 100644
+index 1427954c17..08d656da14 100644
@@ -40 +41 @@
-index 848c452eab..f91049383e 100644
+index dec4a8b6d1..6d629430d4 100644

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

* [dpdk-stable] patch 'net/ena: flush Rx buffers memory pool cache' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (117 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/nfp: read chip model from PluDevice register' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/iavf: fix vector mapping with queue' " Christian Ehrhardt
                   ` (20 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Ido Segev; +Cc: Michal Krawczyk, Igor Chauskin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/5d475f9e0128151bf9614a46434b4c0784fd8859

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5d475f9e0128151bf9614a46434b4c0784fd8859 Mon Sep 17 00:00:00 2001
From: Ido Segev <idose@amazon.com>
Date: Tue, 26 Jan 2021 19:32:22 +0100
Subject: [PATCH] net/ena: flush Rx buffers memory pool cache

[ upstream commit 4387e81c94f4702ec2eb2037df2bfa19927309d7 ]

As the refill called as part of ena_start(), we end up the refill
progress with stuck buffers at the caller core cache.

Calling to flush the cache results with invalidate this cache and free
those stuck buffers.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")

Signed-off-by: Ido Segev <idose@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 2c19f6459f..d098387a8c 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1182,6 +1182,10 @@ static int ena_queue_start(struct ena_ring *ring)
 		PMD_INIT_LOG(ERR, "Failed to populate rx ring !");
 		return ENA_COM_FAULT;
 	}
+	/* Flush per-core RX buffers pools cache as they can be used on other
+	 * cores as well.
+	 */
+	rte_mempool_cache_flush(NULL, ring->mb_pool);
 
 	return 0;
 }
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.943691325 +0100
+++ 0120-net-ena-flush-Rx-buffers-memory-pool-cache.patch	2021-02-04 12:04:28.178789872 +0100
@@ -1 +1 @@
-From 4387e81c94f4702ec2eb2037df2bfa19927309d7 Mon Sep 17 00:00:00 2001
+From 5d475f9e0128151bf9614a46434b4c0784fd8859 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4387e81c94f4702ec2eb2037df2bfa19927309d7 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index c796af4aa7..dde6e9ce8b 100644
+index 2c19f6459f..d098387a8c 100644
@@ -26 +27 @@
-@@ -1246,6 +1246,10 @@ static int ena_queue_start(struct ena_ring *ring)
+@@ -1182,6 +1182,10 @@ static int ena_queue_start(struct ena_ring *ring)

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

* [dpdk-stable] patch 'net/iavf: fix vector mapping with queue' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (118 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/ena: flush Rx buffers memory pool cache' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'build: fix plugin load on static build' " Christian Ehrhardt
                   ` (19 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 4ebd01e0e358cf1f8b7e3ba1867beb67f508a76b Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Thu, 28 Jan 2021 23:00:21 +0800
Subject: [PATCH] net/iavf: fix vector mapping with queue

[ upstream commit b08728b4a001822d71e0a88487c3814c60a502c9 ]

Fix the vector mapping with queue by changing the recircle when
exceeds RX_VEC_START + nb_msix;

Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 386a53cfc9..717d6a242c 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -403,14 +403,14 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 			/* If Rx interrupt is reuquired, and we can use
 			 * multi interrupts, then the vec is from 1
 			 */
-			vf->nb_msix = RTE_MIN(vf->vf_res->max_vectors,
-					      intr_handle->nb_efd);
+			vf->nb_msix = RTE_MIN(intr_handle->nb_efd,
+				 (uint16_t)(vf->vf_res->max_vectors - 1));
 			vf->msix_base = IAVF_RX_VEC_START;
 			vec = IAVF_RX_VEC_START;
 			for (i = 0; i < dev->data->nb_rx_queues; i++) {
 				vf->rxq_map[vec] |= 1 << i;
 				intr_handle->intr_vec[i] = vec++;
-				if (vec >= vf->nb_msix)
+				if (vec >= vf->nb_msix + IAVF_RX_VEC_START)
 					vec = IAVF_RX_VEC_START;
 			}
 			PMD_DRV_LOG(DEBUG,
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:32.979675808 +0100
+++ 0121-net-iavf-fix-vector-mapping-with-queue.patch	2021-02-04 12:04:28.178789872 +0100
@@ -1 +1 @@
-From b08728b4a001822d71e0a88487c3814c60a502c9 Mon Sep 17 00:00:00 2001
+From 4ebd01e0e358cf1f8b7e3ba1867beb67f508a76b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b08728b4a001822d71e0a88487c3814c60a502c9 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 5309427082..b20657221a 100644
+index 386a53cfc9..717d6a242c 100644
@@ -22 +23 @@
-@@ -610,15 +610,15 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
+@@ -403,14 +403,14 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
@@ -33,2 +34 @@
- 				qv_map[i].queue_id = i;
- 				qv_map[i].vector_id = vec;
+ 				vf->rxq_map[vec] |= 1 << i;
@@ -40 +40 @@
- 			vf->qv_map = qv_map;
+ 			PMD_DRV_LOG(DEBUG,

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

* [dpdk-stable] patch 'build: fix plugin load on static build' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (119 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/iavf: fix vector mapping with queue' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'mbuf: add C++ include guard for dynamic fields header' " Christian Ehrhardt
                   ` (18 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 3f33f5056bba4d8e282a3ed677bd1c9993512a0a Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 18 Dec 2020 14:14:22 +0100
Subject: [PATCH] build: fix plugin load on static build

[ upstream commit b031e13d7f0dc7cba9bc5befe968b67832021a59 ]

When dpdk is compiled as static libraries, it is not possible
to load a plugin from an application. We get the following error:

  EAL: librte_pmd_xxxx.so: undefined symbol: per_lcore__rte_errno

This happens because the dpdk symbols are not exported. Add them to the
dynamic symbol table by using '-Wl,--export-dynamic'. This option was
previously present when compiled with Makefiles, it was introduced in
commit f9a08f650211 ("eal: add support for shared object drivers")

Also add it to the pkg-config file.

Fixes: 16ade738fd0d ("app/testpmd: build with meson")
Fixes: 89f0711f9ddf ("examples: build some samples with meson")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/meson.build                   | 6 ++++++
 buildtools/pkg-config/meson.build | 2 +-
 examples/meson.build              | 7 ++++++-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 65d6bc7f85..95c0ecae65 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -22,6 +22,10 @@ apps = [
 lib_execinfo = cc.find_library('execinfo', required: false)
 
 default_cflags = machine_args
+default_ldflags = []
+if get_option('default_library') == 'static'
+	default_ldflags += ['-Wl,--export-dynamic']
+endif
 
 foreach app:apps
 	build = true
@@ -30,6 +34,7 @@ foreach app:apps
 	sources = []
 	includes = []
 	cflags = default_cflags
+	ldflags = default_ldflags
 	objs = [] # other object files to link against, used e.g. for
 	          # instruction-set optimized versions of code
 
@@ -60,6 +65,7 @@ foreach app:apps
 		executable('dpdk-' + name,
 				sources,
 				c_args: cflags,
+				link_args: ldflags,
 				link_whole: link_libs,
 				dependencies: dep_objs,
 				include_directories: includes,
diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build
index 5f19304289..168ee08e58 100644
--- a/buildtools/pkg-config/meson.build
+++ b/buildtools/pkg-config/meson.build
@@ -47,7 +47,7 @@ This is required for a number of static inline functions in the public headers.'
 	                  # if libbsd is not enabled, then this is blank
 	libraries_private: ['-Wl,--whole-archive'] +
 			dpdk_drivers + dpdk_static_libraries +
-			['-Wl,--no-whole-archive']
+			['-Wl,--no-whole-archive', '-Wl,--export-dynamic']
 )
 
 # For static linking with dependencies as shared libraries,
diff --git a/examples/meson.build b/examples/meson.build
index eeeb217ada..25a23dc5da 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -62,6 +62,10 @@ default_cflags = machine_args
 if cc.has_argument('-Wno-format-truncation')
 	default_cflags += '-Wno-format-truncation'
 endif
+default_ldflags = dpdk_extra_ldflags
+if get_option('default_library') == 'static'
+	default_ldflags += ['-Wl,--export-dynamic']
+endif
 
 foreach example: examples
 	name = example.split('/')[-1]
@@ -69,6 +73,7 @@ foreach example: examples
 	sources = []
 	allow_experimental_apis = false
 	cflags = default_cflags
+	ldflags = default_ldflags
 
 	ext_deps = [execinfo]
 	includes = [include_directories(example)]
@@ -93,7 +98,7 @@ foreach example: examples
 		executable('dpdk-' + name, sources,
 			include_directories: includes,
 			link_whole: link_whole_libs,
-			link_args: dpdk_extra_ldflags,
+			link_args: ldflags,
 			c_args: cflags,
 			dependencies: dep_objs)
 	elif not allow_skips
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.014735273 +0100
+++ 0122-build-fix-plugin-load-on-static-build.patch	2021-02-04 12:04:28.178789872 +0100
@@ -1 +1 @@
-From b031e13d7f0dc7cba9bc5befe968b67832021a59 Mon Sep 17 00:00:00 2001
+From 3f33f5056bba4d8e282a3ed677bd1c9993512a0a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b031e13d7f0dc7cba9bc5befe968b67832021a59 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index eb74f215a3..fd72d7da68 100644
+index 65d6bc7f85..95c0ecae65 100644
@@ -34 +35 @@
-@@ -25,6 +25,10 @@ apps = [
+@@ -22,6 +22,10 @@ apps = [
@@ -37 +38 @@
- default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
+ default_cflags = machine_args
@@ -45 +46 @@
-@@ -32,6 +36,7 @@ foreach app:apps
+@@ -30,6 +34,7 @@ foreach app:apps
@@ -53 +54 @@
-@@ -58,6 +63,7 @@ foreach app:apps
+@@ -60,6 +65,7 @@ foreach app:apps
@@ -60 +61 @@
- 				install_rpath: join_paths(get_option('prefix'),
+ 				include_directories: includes,
@@ -75 +76 @@
-index 46ec80919e..f643ec1bad 100644
+index eeeb217ada..25a23dc5da 100644
@@ -78 +79 @@
-@@ -63,6 +63,10 @@ default_cflags = machine_args
+@@ -62,6 +62,10 @@ default_cflags = machine_args
@@ -89 +90 @@
-@@ -70,6 +74,7 @@ foreach example: examples
+@@ -69,6 +73,7 @@ foreach example: examples
@@ -97 +98 @@
-@@ -91,7 +96,7 @@ foreach example: examples
+@@ -93,7 +98,7 @@ foreach example: examples

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

* [dpdk-stable] patch 'mbuf: add C++ include guard for dynamic fields header' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (120 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'build: fix plugin load on static build' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/bnxt: fix max rings computation' " Christian Ehrhardt
                   ` (17 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Ashish Sadanandan; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ce45afae63c3ac21c1159463a832d78442ac9407 Mon Sep 17 00:00:00 2001
From: Ashish Sadanandan <ashish.sadanandan@gmail.com>
Date: Wed, 6 Jan 2021 18:31:14 -0700
Subject: [PATCH] mbuf: add C++ include guard for dynamic fields header

[ upstream commit 397fb6a8d96cf06fc83bd87cadf46d2226fc42ed ]

The header was missing the extern "C" directive which causes name
mangling of functions by C++ compilers, leading to linker errors
complaining of undefined references to these functions.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")

Signed-off-by: Ashish Sadanandan <ashish.sadanandan@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf_dyn.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h
index f9f6dbbac8..638444724c 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.h
+++ b/lib/librte_mbuf/rte_mbuf_dyn.h
@@ -67,6 +67,11 @@
  */
 
 #include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Maximum length of the dynamic field or flag string.
  */
@@ -250,4 +255,8 @@ void rte_mbuf_dyn_dump(FILE *out);
 #define RTE_MBUF_DYNFIELD_METADATA_NAME "rte_flow_dynfield_metadata"
 #define RTE_MBUF_DYNFLAG_METADATA_NAME "rte_flow_dynflag_metadata"
 
+#ifdef __cplusplus
+}
 #endif
+
+#endif /* _RTE_MBUF_DYN_H_ */
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.054449081 +0100
+++ 0123-mbuf-add-C-include-guard-for-dynamic-fields-header.patch	2021-02-04 12:04:28.178789872 +0100
@@ -1 +1 @@
-From 397fb6a8d96cf06fc83bd87cadf46d2226fc42ed Mon Sep 17 00:00:00 2001
+From ce45afae63c3ac21c1159463a832d78442ac9407 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 397fb6a8d96cf06fc83bd87cadf46d2226fc42ed ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d88e7bacc5..fc4eee71d0 100644
+index f9f6dbbac8..638444724c 100644
@@ -35,3 +36,3 @@
-@@ -326,4 +331,8 @@ int rte_mbuf_dyn_rx_timestamp_register(int *field_offset, uint64_t *rx_flag);
- __rte_experimental
- int rte_mbuf_dyn_tx_timestamp_register(int *field_offset, uint64_t *tx_flag);
+@@ -250,4 +255,8 @@ void rte_mbuf_dyn_dump(FILE *out);
+ #define RTE_MBUF_DYNFIELD_METADATA_NAME "rte_flow_dynfield_metadata"
+ #define RTE_MBUF_DYNFLAG_METADATA_NAME "rte_flow_dynflag_metadata"

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

* [dpdk-stable] patch 'net/bnxt: fix max rings computation' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (121 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'mbuf: add C++ include guard for dynamic fields header' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/testpmd: release flows left before port stop' " Christian Ehrhardt
                   ` (16 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Sriharsha Basavapatna; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From aa28e799271805406646dd6834a2001ace7eb80d Mon Sep 17 00:00:00 2001
From: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Date: Fri, 28 Aug 2020 07:13:22 -0400
Subject: [PATCH] net/bnxt: fix max rings computation

[ upstream commit c72fe7ac3b63629f1f46e4d91d9abc0d7c064d93 ]

The current max_rings computation does not take into account the case
when max_nq_rings is <= num_async_cpr. This results in a wrong value
like 0, when max_nq_rings is 1. Fix this by subtracting num_async_cpr
only when max_cp_rings > num_async_cpr.

Apart from this, the entire logic is currently spread across a few
macros, making it hard to read and debug this code. Move this code
into an inline function.

max_msix is not used in the max_rings calculation.
Apparently the max_msix field returned in HWRM_RESC_QCAPS is only valid
for Thor and newer chips. On Wh+ it will be equal to min_compl_rings.
Also, when a function reset is performed on an application quit, FW
will not reset the VF resource pool as per design.
This can lead to a strange condition wherein the max_msix field
on Wh+ keeps changing on each application re-load thereby throwing
throwing off the max_rings computation.

Fixes: f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray devices")

Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        | 41 +++++++++++++++++++++++-----------
 drivers/net/bnxt/bnxt_ethdev.c |  2 +-
 drivers/net/bnxt/bnxt_rxq.c    |  7 +++---
 drivers/net/bnxt/bnxt_txq.c    |  2 +-
 4 files changed, 34 insertions(+), 18 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 940b41767c..0a0ecaafa8 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -620,19 +620,6 @@ struct bnxt {
 	uint16_t		max_tx_rings;
 	uint16_t		max_rx_rings;
 #define MAX_STINGRAY_RINGS		128U
-/* For sake of symmetry, max Tx rings == max Rx rings, one stat ctx for each */
-#define BNXT_MAX_RX_RINGS(bp) \
-	(BNXT_STINGRAY(bp) ? RTE_MIN(RTE_MIN(bp->max_rx_rings / 2U, \
-					     MAX_STINGRAY_RINGS), \
-				     bp->max_stat_ctx / 2U) : \
-				RTE_MIN(bp->max_rx_rings / 2U, \
-					bp->max_stat_ctx / 2U))
-#define BNXT_MAX_TX_RINGS(bp) \
-	(RTE_MIN((bp)->max_tx_rings, BNXT_MAX_RX_RINGS(bp)))
-
-#define BNXT_MAX_RINGS(bp) \
-	(RTE_MIN((((bp)->max_cp_rings - BNXT_NUM_ASYNC_CPR(bp)) / 2U), \
-		 BNXT_MAX_TX_RINGS(bp)))
 	uint16_t		max_nq_rings;
 	uint16_t		max_l2_ctx;
 	uint16_t		max_rx_em_flows;
@@ -668,6 +655,34 @@ struct bnxt {
 	struct bnxt_error_recovery_info *recovery_info;
 };
 
+static
+inline uint16_t bnxt_max_rings(struct bnxt *bp)
+{
+	uint16_t max_tx_rings = bp->max_tx_rings;
+	uint16_t max_rx_rings = bp->max_rx_rings;
+	uint16_t max_cp_rings = bp->max_cp_rings;
+	uint16_t max_rings;
+
+	/* For the sake of symmetry:
+	 * max Tx rings == max Rx rings, one stat ctx for each.
+	 */
+	if (BNXT_STINGRAY(bp)) {
+		max_rx_rings = RTE_MIN(RTE_MIN(max_rx_rings / 2U,
+					       MAX_STINGRAY_RINGS),
+				       bp->max_stat_ctx / 2U);
+	} else {
+		max_rx_rings = RTE_MIN(max_rx_rings / 2U,
+				       bp->max_stat_ctx / 2U);
+	}
+
+	max_tx_rings = RTE_MIN(max_tx_rings, max_rx_rings);
+	if (max_cp_rings > BNXT_NUM_ASYNC_CPR(bp))
+		max_cp_rings -= BNXT_NUM_ASYNC_CPR(bp);
+	max_rings = RTE_MIN(max_cp_rings / 2U, max_tx_rings);
+
+	return max_rings;
+}
+
 int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu);
 int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
 		     bool exp_link_status);
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 0279eeba8f..b499ca5a00 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -526,7 +526,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
 	if (BNXT_PF(bp))
 		dev_info->max_vfs = pdev->max_vfs;
 
-	max_rx_rings = BNXT_MAX_RINGS(bp);
+	max_rx_rings = bnxt_max_rings(bp);
 	/* For the sake of symmetry, max_rx_queues = max_tx_queues */
 	dev_info->max_rx_queues = max_rx_rings;
 	dev_info->max_tx_queues = max_rx_rings;
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index d3a5ef5677..df00191c09 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -304,7 +304,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	if (rc)
 		return rc;
 
-	if (queue_idx >= BNXT_MAX_RINGS(bp)) {
+	if (queue_idx >= bnxt_max_rings(bp)) {
 		PMD_DRV_LOG(ERR,
 			"Cannot create Rx ring %d. Only %d rings available\n",
 			queue_idx, bp->max_rx_rings);
@@ -356,8 +356,9 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 
 	eth_dev->data->rx_queues[queue_idx] = rxq;
 	/* Allocate RX ring hardware descriptors */
-	if (bnxt_alloc_rings(bp, queue_idx, NULL, rxq, rxq->cp_ring, NULL,
-			     "rxr")) {
+	rc = bnxt_alloc_rings(bp, queue_idx, NULL, rxq, rxq->cp_ring, NULL,
+			     "rxr");
+	if (rc) {
 		PMD_DRV_LOG(ERR,
 			    "ring_dma_zone_reserve for rx_ring failed!\n");
 		goto err;
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index 160e841576..78625eef60 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -98,7 +98,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	if (rc)
 		return rc;
 
-	if (queue_idx >= BNXT_MAX_RINGS(bp)) {
+	if (queue_idx >= bnxt_max_rings(bp)) {
 		PMD_DRV_LOG(ERR,
 			"Cannot create Tx ring %d. Only %d rings available\n",
 			queue_idx, bp->max_tx_rings);
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.088997661 +0100
+++ 0124-net-bnxt-fix-max-rings-computation.patch	2021-02-04 12:04:28.186789880 +0100
@@ -1 +1 @@
-From c72fe7ac3b63629f1f46e4d91d9abc0d7c064d93 Mon Sep 17 00:00:00 2001
+From aa28e799271805406646dd6834a2001ace7eb80d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c72fe7ac3b63629f1f46e4d91d9abc0d7c064d93 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 9c1c87489e..bc0935272a 100644
+index 940b41767c..0a0ecaafa8 100644
@@ -41 +42 @@
-@@ -752,19 +752,6 @@ struct bnxt {
+@@ -620,19 +620,6 @@ struct bnxt {
@@ -58,5 +59,5 @@
- 
- #define BNXT_MAX_VF_REP_RINGS	8
- 
-@@ -822,6 +809,34 @@ struct bnxt {
- 	uint16_t		tx_cfa_action;
+ 	uint16_t		max_nq_rings;
+ 	uint16_t		max_l2_ctx;
+ 	uint16_t		max_rx_em_flows;
+@@ -668,6 +655,34 @@ struct bnxt {
+ 	struct bnxt_error_recovery_info *recovery_info;
@@ -93,3 +94,3 @@
- #define BNXT_FC_TIMER	1 /* Timer freq in Sec Flow Counters */
- 
- /**
+ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu);
+ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
+ 		     bool exp_link_status);
@@ -97 +98 @@
-index 0b14ca2342..bf89635776 100644
+index 0279eeba8f..b499ca5a00 100644
@@ -100 +101 @@
-@@ -920,7 +920,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -526,7 +526,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
@@ -110 +111 @@
-index 328cc994da..19e11e47bf 100644
+index d3a5ef5677..df00191c09 100644
@@ -113 +114 @@
-@@ -311,7 +311,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -304,7 +304,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -122 +123 @@
-@@ -364,8 +364,9 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -356,8 +356,9 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -135 +136 @@
-index c9792a2af2..99a31cef28 100644
+index 160e841576..78625eef60 100644

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

* [dpdk-stable] patch 'app/testpmd: release flows left before port stop' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (122 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/bnxt: fix max rings computation' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-03-09  8:33   ` Ali Alnubani
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx5: fix leak on Rx queue creation failure' " Christian Ehrhardt
                   ` (15 subsequent siblings)
  139 siblings, 1 reply; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Ori Kam, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ba53d40b4eb900d12beeb707c3cb163e421e6e85 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Thu, 26 Nov 2020 18:43:02 +0200
Subject: [PATCH] app/testpmd: release flows left before port stop

[ upstream commit 0f93edbf7c874480e21e365f527fecdb305984b9 ]

According to RTE flow user guide, PMD will not keep flow rules after
port stop. Application resources that refer to flow rules become
obsolete after port stop and must not be used.
Testpmd maintains linked list of active flows for each port. Entries in
that list are allocated dynamically and must be explicitly released to
prevent memory leak.
The patch releases testpmd port flow_list that holds remaining flows
before port is stopped.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 app/test-pmd/testpmd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index f93e459ccf..0797e634fe 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2552,6 +2552,9 @@ stop_port(portid_t pid)
 						RTE_PORT_HANDLING) == 0)
 			continue;
 
+		if (port->flow_list)
+			port_flow_flush(pi);
+
 		rte_eth_dev_stop(pi);
 
 		if (rte_atomic16_cmpset(&(port->port_status),
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.127196864 +0100
+++ 0125-app-testpmd-release-flows-left-before-port-stop.patch	2021-02-04 12:04:28.190789883 +0100
@@ -1 +1 @@
-From 0f93edbf7c874480e21e365f527fecdb305984b9 Mon Sep 17 00:00:00 2001
+From ba53d40b4eb900d12beeb707c3cb163e421e6e85 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0f93edbf7c874480e21e365f527fecdb305984b9 ]
+
@@ -15,2 +16,0 @@
-Cc: stable@dpdk.org
-
@@ -25 +25 @@
-index 33a060dffd..2b60f6c5d3 100644
+index f93e459ccf..0797e634fe 100644
@@ -28,3 +28,3 @@
-@@ -2734,6 +2734,9 @@ stop_port(portid_t pid)
- 			}
- 		}
+@@ -2552,6 +2552,9 @@ stop_port(portid_t pid)
+ 						RTE_PORT_HANDLING) == 0)
+ 			continue;
@@ -35,3 +35,3 @@
- 		if (rte_eth_dev_stop(pi) != 0)
- 			RTE_LOG(ERR, EAL, "rte_eth_dev_stop failed for port %u\n",
- 				pi);
+ 		rte_eth_dev_stop(pi);
+ 
+ 		if (rte_atomic16_cmpset(&(port->port_status),

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

* [dpdk-stable] patch 'net/mlx5: fix leak on Rx queue creation failure' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (123 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/testpmd: release flows left before port stop' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx5: fix leak on Tx " Christian Ehrhardt
                   ` (14 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 0d3dd1559d86733557582c391439b8f4f7510ff9 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Tue, 15 Dec 2020 08:48:31 +0000
Subject: [PATCH] net/mlx5: fix leak on Rx queue creation failure

[ upstream commit e28e6c63a99d67929dedd9e4cdaeaa6d9a9a995d ]

In Rx queue creation, there are some validations for the Rx
configuration.

When one of them fails, the MR btree memory was not freed what caused a
memory leak.

Free it.

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

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 104687db39..e3f41d121d 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1982,6 +1982,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	LIST_INSERT_HEAD(&priv->rxqsctrl, tmpl, next);
 	return tmpl;
 error:
+	mlx5_mr_btree_free(&tmpl->rxq.mr_ctrl.cache_bh);
 	rte_free(tmpl);
 	return NULL;
 }
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.166494383 +0100
+++ 0126-net-mlx5-fix-leak-on-Rx-queue-creation-failure.patch	2021-02-04 12:04:28.190789883 +0100
@@ -1 +1 @@
-From e28e6c63a99d67929dedd9e4cdaeaa6d9a9a995d Mon Sep 17 00:00:00 2001
+From 0d3dd1559d86733557582c391439b8f4f7510ff9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e28e6c63a99d67929dedd9e4cdaeaa6d9a9a995d ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index df08f977bf..787b2b74dd 100644
+index 104687db39..e3f41d121d 100644
@@ -27 +28 @@
-@@ -1620,6 +1620,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1982,6 +1982,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
@@ -32 +33 @@
- 	mlx5_free(tmpl);
+ 	rte_free(tmpl);

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

* [dpdk-stable] patch 'net/mlx5: fix leak on Tx queue creation failure' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (124 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx5: fix leak on Rx queue creation failure' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'build: fix linker flags on Windows' " Christian Ehrhardt
                   ` (13 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a73c3391bd85cfed48b1302239fcab88bd0a02ed Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Tue, 15 Dec 2020 08:48:32 +0000
Subject: [PATCH] net/mlx5: fix leak on Tx queue creation failure

[ upstream commit b689b00dd253356567c4d95f55921ce6c0e87d80 ]

In Tx queue creation, there are two validations for the Tx
configuration.

When one of them fails, the MR btree memory was not freed what caused a
memory leak.

Free it.

Fixes: f6d9ab4e769f ("net/mlx5: check Tx queue size overflow")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_txq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 36aa9b59f3..fd1edfff65 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -1317,6 +1317,7 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	LIST_INSERT_HEAD(&priv->txqsctrl, tmpl, next);
 	return tmpl;
 error:
+	mlx5_mr_btree_free(&tmpl->txq.mr_ctrl.cache_bh);
 	rte_free(tmpl);
 	return NULL;
 }
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.201899402 +0100
+++ 0127-net-mlx5-fix-leak-on-Tx-queue-creation-failure.patch	2021-02-04 12:04:28.194789887 +0100
@@ -1 +1 @@
-From b689b00dd253356567c4d95f55921ce6c0e87d80 Mon Sep 17 00:00:00 2001
+From a73c3391bd85cfed48b1302239fcab88bd0a02ed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b689b00dd253356567c4d95f55921ce6c0e87d80 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index d96abef883..b81bb4a12d 100644
+index 36aa9b59f3..fd1edfff65 100644
@@ -27 +28 @@
-@@ -1146,6 +1146,7 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1317,6 +1317,7 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
@@ -32 +33 @@
- 	mlx5_free(tmpl);
+ 	rte_free(tmpl);

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

* [dpdk-stable] patch 'build: fix linker flags on Windows' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (125 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx5: fix leak on Tx " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'common/octeontx2: fix build with SVE' " Christian Ehrhardt
                   ` (12 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Ranjit Menon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 4a2baf099901166d83f3cd1ad77223cdec29842b Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Tue, 12 Jan 2021 03:36:02 +0300
Subject: [PATCH] build: fix linker flags on Windows

[ upstream commit da042bcfc6c870fd067329a22e4084c4b2c4be2a ]

The --export-dynamic linker option is only applicable to ELF.
On Windows, where COFF is used, it causes warnings:

    x86_64-w64-mingw32-ld: warning: --export-dynamic is not supported
    for PE+ targets, did you mean --export-all-symbols? (MinGW)

    LINK : warning LNK4044: unrecognized option '/-export-dynamic';
    ignored (clang)

Don't add --export-dynamic on Windows anywhere.

Fixes: b031e13d7f0d ("build: fix plugin load on static build")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
---
 app/meson.build                   | 2 +-
 buildtools/pkg-config/meson.build | 6 +++++-
 examples/meson.build              | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 95c0ecae65..c7f689eb79 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -23,7 +23,7 @@ lib_execinfo = cc.find_library('execinfo', required: false)
 
 default_cflags = machine_args
 default_ldflags = []
-if get_option('default_library') == 'static'
+if get_option('default_library') == 'static' and not is_windows
 	default_ldflags += ['-Wl,--export-dynamic']
 endif
 
diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build
index 168ee08e58..39a8fd1c8e 100644
--- a/buildtools/pkg-config/meson.build
+++ b/buildtools/pkg-config/meson.build
@@ -37,6 +37,10 @@ Use libdpdk.pc instead of this file to query DPDK compile/link arguments''',
 	libraries: ['-Wl,--as-needed'] + dpdk_libraries,
 	libraries_private: dpdk_extra_ldflags)
 
+platform_flags = []
+if not is_windows
+	platform_flags += ['-Wl,--export-dynamic'] # ELF only
+endif
 pkg.generate(name: 'DPDK', # main DPDK pkgconfig file
 	filebase: 'libdpdk',
 	version: meson.project_version(),
@@ -47,7 +51,7 @@ This is required for a number of static inline functions in the public headers.'
 	                  # if libbsd is not enabled, then this is blank
 	libraries_private: ['-Wl,--whole-archive'] +
 			dpdk_drivers + dpdk_static_libraries +
-			['-Wl,--no-whole-archive', '-Wl,--export-dynamic']
+			['-Wl,--no-whole-archive'] + platform_flags
 )
 
 # For static linking with dependencies as shared libraries,
diff --git a/examples/meson.build b/examples/meson.build
index 25a23dc5da..9e081f3fb7 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -63,7 +63,7 @@ if cc.has_argument('-Wno-format-truncation')
 	default_cflags += '-Wno-format-truncation'
 endif
 default_ldflags = dpdk_extra_ldflags
-if get_option('default_library') == 'static'
+if get_option('default_library') == 'static' and not is_windows
 	default_ldflags += ['-Wl,--export-dynamic']
 endif
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.240844680 +0100
+++ 0128-build-fix-linker-flags-on-Windows.patch	2021-02-04 12:04:28.194789887 +0100
@@ -1 +1 @@
-From da042bcfc6c870fd067329a22e4084c4b2c4be2a Mon Sep 17 00:00:00 2001
+From 4a2baf099901166d83f3cd1ad77223cdec29842b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit da042bcfc6c870fd067329a22e4084c4b2c4be2a ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index fd72d7da68..903117b866 100644
+index 95c0ecae65..c7f689eb79 100644
@@ -32 +33 @@
-@@ -26,7 +26,7 @@ lib_execinfo = cc.find_library('execinfo', required: false)
+@@ -23,7 +23,7 @@ lib_execinfo = cc.find_library('execinfo', required: false)
@@ -34 +35 @@
- default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
+ default_cflags = machine_args
@@ -66 +67 @@
-index f643ec1bad..b9ab24223f 100644
+index 25a23dc5da..9e081f3fb7 100644
@@ -69 +70 @@
-@@ -64,7 +64,7 @@ if cc.has_argument('-Wno-format-truncation')
+@@ -63,7 +63,7 @@ if cc.has_argument('-Wno-format-truncation')

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

* [dpdk-stable] patch 'common/octeontx2: fix build with SVE' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (126 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'build: fix linker flags on Windows' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'test: fix terminal settings on exit' " Christian Ehrhardt
                   ` (11 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 4f99d060a3e316d05c676d6e4df86f67d1afb57c Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Tue, 12 Jan 2021 02:57:07 +0000
Subject: [PATCH] common/octeontx2: fix build with SVE

[ upstream commit fe558028140662ba8488399714d8fe21281851f0 ]

Building with gcc 10.2 with SVE extension enabled got error:

{standard input}: Assembler messages:
{standard input}:4002: Error: selected processor does not support `mov z3.b,#0'
{standard input}:4003: Error: selected processor does not support `whilelo p1.b,xzr,x7'
{standard input}:4005: Error: selected processor does not support `ld1b z0.b,p1/z,[x8]'
{standard input}:4006: Error: selected processor does not support `whilelo p4.s,wzr,w7'

This is because inline assembly code explicitly resets cpu model to
not have SVE support. Thus SVE instructions generated by compiler
auto vectorization got rejected by assembler.

Added SVE to the cpu model specified by inline assembly for SVE support.
Not replacing the inline assembly with C atomics because the driver relies
on specific LSE instruction to interface to co-processor [1].

Fixes: 8a4f835971f5 ("common/octeontx2: add IO handling APIs")

[1] https://mails.dpdk.org/archives/dev/2021-January/196092.html

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/common/octeontx2/otx2_io_arm64.h | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/common/octeontx2/otx2_io_arm64.h b/drivers/common/octeontx2/otx2_io_arm64.h
index 7e45329b38..3380c9874f 100644
--- a/drivers/common/octeontx2/otx2_io_arm64.h
+++ b/drivers/common/octeontx2/otx2_io_arm64.h
@@ -21,6 +21,12 @@
 #define otx2_prefetch_store_keep(ptr) ({\
 	asm volatile("prfm pstl1keep, [%x0]\n" : : "r" (ptr)); })
 
+#if defined(__ARM_FEATURE_SVE)
+#define __LSE_PREAMBLE " .cpu  generic+lse+sve\n"
+#else
+#define __LSE_PREAMBLE " .cpu  generic+lse\n"
+#endif
+
 static __rte_always_inline uint64_t
 otx2_atomic64_add_nosync(int64_t incr, int64_t *ptr)
 {
@@ -28,7 +34,7 @@ otx2_atomic64_add_nosync(int64_t incr, int64_t *ptr)
 
 	/* Atomic add with no ordering */
 	asm volatile (
-		".cpu  generic+lse\n"
+		__LSE_PREAMBLE
 		"ldadd %x[i], %x[r], [%[b]]"
 		: [r] "=r" (result), "+m" (*ptr)
 		: [i] "r" (incr), [b] "r" (ptr)
@@ -43,7 +49,7 @@ otx2_atomic64_add_sync(int64_t incr, int64_t *ptr)
 
 	/* Atomic add with ordering */
 	asm volatile (
-		".cpu  generic+lse\n"
+		__LSE_PREAMBLE
 		"ldadda %x[i], %x[r], [%[b]]"
 		: [r] "=r" (result), "+m" (*ptr)
 		: [i] "r" (incr), [b] "r" (ptr)
@@ -57,7 +63,7 @@ otx2_lmt_submit(rte_iova_t io_address)
 	uint64_t result;
 
 	asm volatile (
-		".cpu  generic+lse\n"
+		__LSE_PREAMBLE
 		"ldeor xzr,%x[rf],[%[rs]]" :
 		 [rf] "=r"(result): [rs] "r"(io_address));
 	return result;
@@ -92,4 +98,5 @@ otx2_lmt_mov_seg(void *out, const void *in, const uint16_t segdw)
 		dst128[i] = src128[i];
 }
 
+#undef __LSE_PREAMBLE
 #endif /* _OTX2_IO_ARM64_H_ */
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.274411928 +0100
+++ 0129-common-octeontx2-fix-build-with-SVE.patch	2021-02-04 12:04:28.194789887 +0100
@@ -1 +1 @@
-From fe558028140662ba8488399714d8fe21281851f0 Mon Sep 17 00:00:00 2001
+From 4f99d060a3e316d05c676d6e4df86f67d1afb57c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fe558028140662ba8488399714d8fe21281851f0 ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -30,2 +31,2 @@
- drivers/common/octeontx2/otx2_io_arm64.h | 15 +++++++++++----
- 1 file changed, 11 insertions(+), 4 deletions(-)
+ drivers/common/octeontx2/otx2_io_arm64.h | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
@@ -34 +35 @@
-index b5c85d9a6e..34268e3af3 100644
+index 7e45329b38..3380c9874f 100644
@@ -77,10 +78 @@
-@@ -69,7 +75,7 @@ otx2_lmt_submit_release(rte_iova_t io_address)
- 	uint64_t result;
- 
- 	asm volatile (
--		".cpu  generic+lse\n"
-+		__LSE_PREAMBLE
- 		"ldeorl xzr,%x[rf],[%[rs]]" :
- 		 [rf] "=r"(result) : [rs] "r"(io_address));
- 	return result;
-@@ -104,4 +110,5 @@ otx2_lmt_mov_seg(void *out, const void *in, const uint16_t segdw)
+@@ -92,4 +98,5 @@ otx2_lmt_mov_seg(void *out, const void *in, const uint16_t segdw)

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

* [dpdk-stable] patch 'test: fix terminal settings on exit' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (127 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'common/octeontx2: fix build with SVE' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/dpaa2: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
                   ` (10 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b54feaf376bf18d5ed8751f4e9c46017b41d493a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 14 Jan 2021 08:45:37 -0800
Subject: [PATCH] test: fix terminal settings on exit

[ upstream commit acdabc450ea087815f8d93cf139ac265c638f99f ]

When running one test (via DPDK_TEST) the test program
would leave the terminal in raw mode.  This was because
it was setting up cmdline to do interactive input.

The fix is to use cmdline_new() for the interactive case.

This also fixes a memory leak because the test
runner was never calling cmdline_free().

Fixes: 9b848774a5dc ("test: use env variable to run tests")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 app/test/test.c | 31 ++++++++++++++++++++-----------
 1 file changed, 20 insertions(+), 11 deletions(-)

diff --git a/app/test/test.c b/app/test/test.c
index d0826ca69e..4736a17ff3 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -164,29 +164,38 @@ main(int argc, char **argv)
 
 
 #ifdef RTE_LIBRTE_CMDLINE
-	cl = cmdline_stdin_new(main_ctx, "RTE>>");
-	if (cl == NULL) {
-		ret = -1;
-		goto out;
-	}
-
 	char *dpdk_test = getenv("DPDK_TEST");
 	if (dpdk_test && strlen(dpdk_test)) {
 		char buf[1024];
+
+		cl = cmdline_new(main_ctx, "RTE>>", 0, 1);
+		if (cl == NULL) {
+			ret = -1;
+			goto out;
+		}
+
 		snprintf(buf, sizeof(buf), "%s\n", dpdk_test);
 		if (cmdline_in(cl, buf, strlen(buf)) < 0) {
 			printf("error on cmdline input\n");
+
+			ret = -1;
+		} else {
+			ret = last_test_result;
+		}
+		cmdline_free(cl);
+		goto out;
+	} else {
+		/* if no DPDK_TEST env variable, go interactive */
+		cl = cmdline_stdin_new(main_ctx, "RTE>>");
+		if (cl == NULL) {
 			ret = -1;
 			goto out;
 		}
 
+		cmdline_interact(cl);
 		cmdline_stdin_exit(cl);
-		ret = last_test_result;
-		goto out;
+		cmdline_free(cl);
 	}
-	/* if no DPDK_TEST env variable, go interactive */
-	cmdline_interact(cl);
-	cmdline_stdin_exit(cl);
 #endif
 	ret = 0;
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.307974699 +0100
+++ 0130-test-fix-terminal-settings-on-exit.patch	2021-02-04 12:04:28.194789887 +0100
@@ -1 +1 @@
-From acdabc450ea087815f8d93cf139ac265c638f99f Mon Sep 17 00:00:00 2001
+From b54feaf376bf18d5ed8751f4e9c46017b41d493a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit acdabc450ea087815f8d93cf139ac265c638f99f ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index ba0b0309b5..624dd48042 100644
+index d0826ca69e..4736a17ff3 100644
@@ -31 +32 @@
- #ifdef RTE_LIB_CMDLINE
+ #ifdef RTE_LIBRTE_CMDLINE

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

* [dpdk-stable] patch 'net/dpaa2: fix jumbo frame flag condition for MTU set' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (128 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'test: fix terminal settings on exit' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/hns3: fix data overwriting during register dump' " Christian Ehrhardt
                   ` (9 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Steve Yang; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/5ded122157e83c424165e6683f83d520ebdac19f

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5ded122157e83c424165e6683f83d520ebdac19f Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 18 Jan 2021 07:04:10 +0000
Subject: [PATCH] net/dpaa2: fix jumbo frame flag condition for MTU set

[ upstream commit 043b57155615f4d046733c0c538bdf720f06f80e ]

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition,
but the Ether overhead is larger than 18 when it supports VLAN tag.
That will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will change the boundary condition with 'RTE_ETHER_MTU' and
overhead, that perhaps impacts the cases of the jumbo frame related.

Fixes: e16408499412 ("net/dpaa2: configure jumbo frames")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 2 +-
 drivers/net/dpaa2/dpaa2_ethdev.h | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 4443e0f133..5b7529690b 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -1277,7 +1277,7 @@ dpaa2_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	if (mtu < RTE_ETHER_MIN_MTU || frame_size > DPAA2_MAX_RX_PKT_LEN)
 		return -EINVAL;
 
-	if (frame_size > RTE_ETHER_MAX_LEN)
+	if (frame_size > DPAA2_ETH_MAX_LEN)
 		dev->data->dev_conf.rxmode.offloads |=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index 0030251b8a..a4807881fc 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -24,6 +24,10 @@
 #define MAX_TX_QUEUES		16
 #define MAX_DPNI		8
 
+#define DPAA2_ETH_MAX_LEN (RTE_ETHER_MTU + \
+			   RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + \
+			   VLAN_TAG_SIZE)
+
 /*default tc to be used for ,congestion, distribution etc configuration. */
 #define DPAA2_DEF_TC		0
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.342590165 +0100
+++ 0131-net-dpaa2-fix-jumbo-frame-flag-condition-for-MTU-set.patch	2021-02-04 12:04:28.198789892 +0100
@@ -1 +1 @@
-From 043b57155615f4d046733c0c538bdf720f06f80e Mon Sep 17 00:00:00 2001
+From 5ded122157e83c424165e6683f83d520ebdac19f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 043b57155615f4d046733c0c538bdf720f06f80e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index ab6863300e..6f38da3cce 100644
+index 4443e0f133..5b7529690b 100644
@@ -28 +29 @@
-@@ -1420,7 +1420,7 @@ dpaa2_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -1277,7 +1277,7 @@ dpaa2_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -38 +39 @@
-index 8d82f74684..cacb11bd3e 100644
+index 0030251b8a..a4807881fc 100644
@@ -41,3 +42,3 @@
-@@ -26,6 +26,10 @@
- 
- #define DPAA2_RX_DEFAULT_NBDESC 512
+@@ -24,6 +24,10 @@
+ #define MAX_TX_QUEUES		16
+ #define MAX_DPNI		8

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

* [dpdk-stable] patch 'net/hns3: fix data overwriting during register dump' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (129 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/dpaa2: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/hns3: fix dump register out of range' " Christian Ehrhardt
                   ` (8 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/5b76ddc9727187faadd006ebfa22506d296879d9

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5b76ddc9727187faadd006ebfa22506d296879d9 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Thu, 14 Jan 2021 21:33:35 +0800
Subject: [PATCH] net/hns3: fix data overwriting during register dump

[ upstream commit 6da903befad6a7da52ee6b80554f63bf74bb9ad1 ]

The data pointer has not moved after BAR register dumped. This causes
the later register to overwrite the previous data.

This patch fix the overwriting by move the pointer after every dump
function. And the missing separator between 32-bit register and the
64-bit register is also added to avoid a parsing error.

Fixes: 936eda25e8da ("net/hns3: support dump register")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_regs.c | 70 ++++++++++++++++++++----------------
 1 file changed, 40 insertions(+), 30 deletions(-)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index e424d5abc4..277404e692 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -266,63 +266,68 @@ hns3_get_64_bit_regs(struct hns3_hw *hw, uint32_t regs_num, void *data)
 	return 0;
 }
 
-static void
+static int
+hns3_insert_reg_separator(int reg_num, uint32_t *data)
+{
+	int separator_num;
+	int i;
+
+	separator_num = MAX_SEPARATE_NUM - reg_num % REG_NUM_PER_LINE;
+	for (i = 0; i < separator_num; i++)
+		*data++ = SEPARATOR_VALUE;
+	return separator_num;
+}
+
+static int
 hns3_direct_access_regs(struct hns3_hw *hw, uint32_t *data)
 {
 	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
+	uint32_t *origin_data_ptr = data;
 	uint32_t reg_offset;
-	int separator_num;
-	int reg_um;
+	int reg_num;
 	int i, j;
 
 	/* fetching per-PF registers values from PF PCIe register space */
-	reg_um = sizeof(cmdq_reg_addrs) / sizeof(uint32_t);
-	separator_num = MAX_SEPARATE_NUM - reg_um % REG_NUM_PER_LINE;
-	for (i = 0; i < reg_um; i++)
+	reg_num = sizeof(cmdq_reg_addrs) / sizeof(uint32_t);
+	for (i = 0; i < reg_num; i++)
 		*data++ = hns3_read_dev(hw, cmdq_reg_addrs[i]);
-	for (i = 0; i < separator_num; i++)
-		*data++ = SEPARATOR_VALUE;
+	data += hns3_insert_reg_separator(reg_num, data);
 
 	if (hns->is_vf)
-		reg_um = sizeof(common_vf_reg_addrs) / sizeof(uint32_t);
+		reg_num = sizeof(common_vf_reg_addrs) / sizeof(uint32_t);
 	else
-		reg_um = sizeof(common_reg_addrs) / sizeof(uint32_t);
-	separator_num = MAX_SEPARATE_NUM - reg_um % REG_NUM_PER_LINE;
-	for (i = 0; i < reg_um; i++)
+		reg_num = sizeof(common_reg_addrs) / sizeof(uint32_t);
+	for (i = 0; i < reg_num; i++)
 		if (hns->is_vf)
 			*data++ = hns3_read_dev(hw, common_vf_reg_addrs[i]);
 		else
 			*data++ = hns3_read_dev(hw, common_reg_addrs[i]);
-	for (i = 0; i < separator_num; i++)
-		*data++ = SEPARATOR_VALUE;
+	data += hns3_insert_reg_separator(reg_num, data);
 
-	reg_um = sizeof(ring_reg_addrs) / sizeof(uint32_t);
-	separator_num = MAX_SEPARATE_NUM - reg_um % REG_NUM_PER_LINE;
+	reg_num = sizeof(ring_reg_addrs) / sizeof(uint32_t);
 	for (j = 0; j < hw->tqps_num; j++) {
 		reg_offset = HNS3_TQP_REG_OFFSET + HNS3_TQP_REG_SIZE * j;
-		for (i = 0; i < reg_um; i++)
+		for (i = 0; i < reg_num; i++)
 			*data++ = hns3_read_dev(hw,
 						ring_reg_addrs[i] + reg_offset);
-		for (i = 0; i < separator_num; i++)
-			*data++ = SEPARATOR_VALUE;
+		data += hns3_insert_reg_separator(reg_num, data);
 	}
 
-	reg_um = sizeof(tqp_intr_reg_addrs) / sizeof(uint32_t);
-	separator_num = MAX_SEPARATE_NUM - reg_um % REG_NUM_PER_LINE;
+	reg_num = sizeof(tqp_intr_reg_addrs) / sizeof(uint32_t);
 	for (j = 0; j < hw->num_msi; j++) {
 		reg_offset = HNS3_TQP_INTR_REG_SIZE * j;
-		for (i = 0; i < reg_um; i++)
-			*data++ = hns3_read_dev(hw,
-						tqp_intr_reg_addrs[i] +
+		for (i = 0; i < reg_num; i++)
+			*data++ = hns3_read_dev(hw, tqp_intr_reg_addrs[i] +
 						reg_offset);
-		for (i = 0; i < separator_num; i++)
-			*data++ = SEPARATOR_VALUE;
+		data += hns3_insert_reg_separator(reg_num, data);
 	}
+	return data - origin_data_ptr;
 }
 
 int
 hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
 {
+#define HNS3_64_BIT_REG_SIZE (sizeof(uint64_t) / sizeof(uint32_t))
 	struct hns3_adapter *hns = eth_dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
 	uint32_t regs_num_32_bit;
@@ -352,7 +357,7 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
 		return -ENOTSUP;
 
 	/* fetching per-PF registers values from PF PCIe register space */
-	hns3_direct_access_regs(hw, data);
+	data += hns3_direct_access_regs(hw, data);
 
 	if (hns->is_vf)
 		return 0;
@@ -369,11 +374,16 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
 		hns3_err(hw, "Get 32 bit register failed, ret = %d", ret);
 		return ret;
 	}
-
 	data += regs_num_32_bit;
+	data += hns3_insert_reg_separator(regs_num_32_bit, data);
+
 	ret = hns3_get_64_bit_regs(hw, regs_num_64_bit, data);
-	if (ret)
+	if (ret) {
 		hns3_err(hw, "Get 64 bit register failed, ret = %d", ret);
-
+		return ret;
+	}
+	data += regs_num_64_bit * HNS3_64_BIT_REG_SIZE;
+	data += hns3_insert_reg_separator(regs_num_64_bit *
+					  HNS3_64_BIT_REG_SIZE, data);
 	return ret;
 }
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.379167587 +0100
+++ 0132-net-hns3-fix-data-overwriting-during-register-dump.patch	2021-02-04 12:04:28.202789895 +0100
@@ -1 +1 @@
-From 6da903befad6a7da52ee6b80554f63bf74bb9ad1 Mon Sep 17 00:00:00 2001
+From 5b76ddc9727187faadd006ebfa22506d296879d9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6da903befad6a7da52ee6b80554f63bf74bb9ad1 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 32597fe21c..775e0965f7 100644
+index e424d5abc4..277404e692 100644
@@ -26 +27 @@
-@@ -252,63 +252,68 @@ hns3_get_64_bit_regs(struct hns3_hw *hw, uint32_t regs_num, void *data)
+@@ -266,63 +266,68 @@ hns3_get_64_bit_regs(struct hns3_hw *hw, uint32_t regs_num, void *data)
@@ -86 +87 @@
- 		reg_offset = hns3_get_tqp_reg_offset(j);
+ 		reg_offset = HNS3_TQP_REG_OFFSET + HNS3_TQP_REG_SIZE * j;
@@ -121 +122 @@
-@@ -338,7 +343,7 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
+@@ -352,7 +357,7 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
@@ -130 +131 @@
-@@ -355,11 +360,16 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
+@@ -369,11 +374,16 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)

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

* [dpdk-stable] patch 'net/hns3: fix dump register out of range' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (130 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/hns3: fix data overwriting during register dump' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'mbuf: fix missing header include' " Christian Ehrhardt
                   ` (7 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 4ae7e3069a58554d0ddf8ef2b3a3c31ff11b31f3 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Thu, 14 Jan 2021 21:33:36 +0800
Subject: [PATCH] net/hns3: fix dump register out of range

[ upstream commit acb3260fac5c93d953876172ce322e9f2801a33c ]

Currently, when dump the queue interrupt registers, the number of
registers that should be dumped is calculated from num_msi. But the
value of num_msi includes the number of misc interrupts. So, for some
hardware version, like kupeng930, it will lead to an illegal access.

This patch replace num_msi with intr_tqps_num which indicate the
number of interrupts used by the tqps.

Fixes: 936eda25e8da ("net/hns3: support dump register")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_regs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 277404e692..2f34357d48 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -314,7 +314,7 @@ hns3_direct_access_regs(struct hns3_hw *hw, uint32_t *data)
 	}
 
 	reg_num = sizeof(tqp_intr_reg_addrs) / sizeof(uint32_t);
-	for (j = 0; j < hw->num_msi; j++) {
+	for (j = 0; j < hw->intr_tqps_num; j++) {
 		reg_offset = HNS3_TQP_INTR_REG_SIZE * j;
 		for (i = 0; i < reg_num; i++)
 			*data++ = hns3_read_dev(hw, tqp_intr_reg_addrs[i] +
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.412998273 +0100
+++ 0133-net-hns3-fix-dump-register-out-of-range.patch	2021-02-04 12:04:28.202789895 +0100
@@ -1 +1 @@
-From acb3260fac5c93d953876172ce322e9f2801a33c Mon Sep 17 00:00:00 2001
+From 4ae7e3069a58554d0ddf8ef2b3a3c31ff11b31f3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit acb3260fac5c93d953876172ce322e9f2801a33c ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 775e0965f7..f2cb465eed 100644
+index 277404e692..2f34357d48 100644
@@ -27 +28 @@
-@@ -300,7 +300,7 @@ hns3_direct_access_regs(struct hns3_hw *hw, uint32_t *data)
+@@ -314,7 +314,7 @@ hns3_direct_access_regs(struct hns3_hw *hw, uint32_t *data)

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

* [dpdk-stable] patch 'mbuf: fix missing header include' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (131 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/hns3: fix dump register out of range' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'power: export guest channel header file' " Christian Ehrhardt
                   ` (6 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Andrew Rybchenko, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/13315a758590a4b0abcea28405560206094dbdf6

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 13315a758590a4b0abcea28405560206094dbdf6 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 15 Jan 2021 11:10:37 +0000
Subject: [PATCH] mbuf: fix missing header include

[ upstream commit b7c0591fd6117be644b16fc85bfdb2bbb362820f ]

The rte_mbuf_dyn.h header file uses a number of types and macros without
including the required header files to get the definitions of those
macros/types.  Similarly, the rte_mbuf_core.h file was missing an
include for rte_byteorder.h header.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Fixes: 3eb860b08eb7 ("mbuf: move definitions into a separate file")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_mbuf/rte_mbuf_core.h | 2 ++
 lib/librte_mbuf/rte_mbuf_dyn.h  | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
index 9a8557d1cc..e7f38422e7 100644
--- a/lib/librte_mbuf/rte_mbuf_core.h
+++ b/lib/librte_mbuf/rte_mbuf_core.h
@@ -15,7 +15,9 @@
  */
 
 #include <stdint.h>
+
 #include <rte_compat.h>
+#include <rte_byteorder.h>
 #include <generic/rte_atomic.h>
 
 #ifdef __cplusplus
diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h
index 638444724c..2a87ef9217 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.h
+++ b/lib/librte_mbuf/rte_mbuf_dyn.h
@@ -66,8 +66,12 @@
  * - any name that does not start with "rte_" in an application
  */
 
+#include <stdio.h>
+#include <stdint.h>
 #include <sys/types.h>
 
+#include <rte_compat.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.443315887 +0100
+++ 0134-mbuf-fix-missing-header-include.patch	2021-02-04 12:04:28.202789895 +0100
@@ -1 +1 @@
-From b7c0591fd6117be644b16fc85bfdb2bbb362820f Mon Sep 17 00:00:00 2001
+From 13315a758590a4b0abcea28405560206094dbdf6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b7c0591fd6117be644b16fc85bfdb2bbb362820f ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 567551deab..a85cabdd18 100644
+index 9a8557d1cc..e7f38422e7 100644
@@ -27 +28 @@
-@@ -17,7 +17,9 @@
+@@ -15,7 +15,9 @@
@@ -38 +39 @@
-index fc4eee71d0..13f06d8ed2 100644
+index 638444724c..2a87ef9217 100644

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

* [dpdk-stable] patch 'power: export guest channel header file' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (132 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'mbuf: fix missing header include' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'examples/eventdev: check CPU core enabling' " Christian Ehrhardt
                   ` (5 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Hunt, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b00e2adc1d9baa282979c5778362c125b40752e7 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 21 Jan 2021 17:22:00 +0000
Subject: [PATCH] power: export guest channel header file

[ upstream commit d74b159e8c87dae9b5b8724345d155ceb58b63b2 ]

Adjust meson.build so that 'ninja install' copies the new header
file into the installation directory.

Fixes: 210c383e247b ("power: packet format for vm power management")
Fixes: cd0d5547e873 ("power: vm communication channels in guest")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_power/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_power/meson.build b/lib/librte_power/meson.build
index cdf08f6df3..6281adfe17 100644
--- a/lib/librte_power/meson.build
+++ b/lib/librte_power/meson.build
@@ -9,5 +9,6 @@ sources = files('rte_power.c', 'power_acpi_cpufreq.c',
 		'power_kvm_vm.c', 'guest_channel.c',
 		'rte_power_empty_poll.c',
 		'power_pstate_cpufreq.c')
-headers = files('rte_power.h','rte_power_empty_poll.h')
+headers = files('rte_power.h','rte_power_empty_poll.h',
+	'rte_power_guest_channel.h')
 deps += ['timer']
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.479825735 +0100
+++ 0135-power-export-guest-channel-header-file.patch	2021-02-04 12:04:28.202789895 +0100
@@ -1 +1 @@
-From d74b159e8c87dae9b5b8724345d155ceb58b63b2 Mon Sep 17 00:00:00 2001
+From b00e2adc1d9baa282979c5778362c125b40752e7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d74b159e8c87dae9b5b8724345d155ceb58b63b2 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 4b4cf1b90b..5415695281 100644
+index cdf08f6df3..6281adfe17 100644
@@ -24 +25,2 @@
-@@ -10,5 +10,6 @@ sources = files('rte_power.c', 'power_acpi_cpufreq.c',
+@@ -9,5 +9,6 @@ sources = files('rte_power.c', 'power_acpi_cpufreq.c',
+ 		'power_kvm_vm.c', 'guest_channel.c',
@@ -26,2 +28 @@
- 		'power_pstate_cpufreq.c',
- 		'power_common.c')
+ 		'power_pstate_cpufreq.c')

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

* [dpdk-stable] patch 'examples/eventdev: check CPU core enabling' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (133 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'power: export guest channel header file' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'examples/eventdev: move ethdev stop to the end' " Christian Ehrhardt
                   ` (4 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/02a5ce6b4b7d1eefb8bd1378e09b4c22f4099106

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 02a5ce6b4b7d1eefb8bd1378e09b4c22f4099106 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Thu, 14 Jan 2021 18:30:59 +0800
Subject: [PATCH] examples/eventdev: check CPU core enabling

[ upstream commit 3d15913432f12a2abcaa00122502eb944feeeb29 ]

In the case that the cores are isolated, if "-l" or "-c" parameter is not
added, the cores will not be enabled and can not launch worker function
correctly. In the meanwhile, no error information is reported.

For example:
totally CPUs:16
isolated CPUs:1-8
command: sudo gdb -args ./dpdk-eventdev_pipeline --vdev event_sw0 \
        -- -r1 -t1 -e4 -w F00 -s4 -n0 -c32 -W1000 -D

cores information:
rte_config->lcore_role = {ROLE_RTE, ROLE_OFF, ROLE_OFF, ROLE_OFF,
                          ROLE_OFF, ROLE_OFF, ROLE_OFF, ROLE_OFF,
                          ROLE_OFF, ROLE_RTE, ROLE_RTE, ROLE_RTE,
                          ROLE_RTE, ROLE_RTE, ROLE_RTE, ROLE_RTE}

output information:
...
[main()] lcore 9 executing worker, using eventdev port 0
[main()] lcore 10 executing worker, using eventdev port 1
[main()] lcore 11 executing worker, using eventdev port 2

This is because "RTE_LCORE_FOREACH_WORKER" chooses the enabled core. In
the case that the cores are isolated, "the lcore_role" flag of isolated
cores are set as "ROLE_OFF" by default(not enabled). So if we choose
these isolated cores as workers, "RTE_LCORE_FOREACH_WORKER" will ignore
these cores and not launch worker functions on them.

To fix this, add "-l" parameters to doc and add lcore enabled check.

Fixes: 1094ca96689c ("doc: add SW eventdev pipeline to sample app guide")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 doc/guides/sample_app_ug/eventdev_pipeline.rst | 4 +++-
 examples/eventdev_pipeline/main.c              | 9 ++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/doc/guides/sample_app_ug/eventdev_pipeline.rst b/doc/guides/sample_app_ug/eventdev_pipeline.rst
index dc7972aa9a..24fb23b898 100644
--- a/doc/guides/sample_app_ug/eventdev_pipeline.rst
+++ b/doc/guides/sample_app_ug/eventdev_pipeline.rst
@@ -34,6 +34,7 @@ options.
 An example eventdev pipeline running with the software eventdev PMD using
 these settings is shown below:
 
+ * ``-l 0,2,8-15``: lcore to use
  * ``-r1``: core mask 0x1 for RX
  * ``-t1``: core mask 0x1 for TX
  * ``-e4``: core mask 0x4 for the software scheduler
@@ -46,7 +47,8 @@ these settings is shown below:
 
 .. code-block:: console
 
-    ./build/eventdev_pipeline --vdev event_sw0 -- -r1 -t1 -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
+    ./build/eventdev_pipeline --vdev event_sw0 -l 0,2,8-15 -- -r1 -t1 \
+    -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
 
 The application has some sanity checking built-in, so if there is a function
 (e.g.; the RX core) which doesn't have a cpu core mask assigned, the application
diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index 6fc7c86dc9..71ee586c9a 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -265,8 +265,15 @@ parse_app_args(int argc, char **argv)
 
 		if (fdata->worker_core[i])
 			cdata.num_workers++;
-		if (core_in_use(i))
+		if (core_in_use(i)) {
+			if (!rte_lcore_is_enabled(i)) {
+				printf("lcore %d is not enabled in lcore list\n",
+					i);
+				rte_exit(EXIT_FAILURE,
+					"check lcore params failed\n");
+			}
 			cdata.active_cores++;
+		}
 	}
 }
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.513789100 +0100
+++ 0136-examples-eventdev-check-CPU-core-enabling.patch	2021-02-04 12:04:28.206789899 +0100
@@ -1 +1 @@
-From 3d15913432f12a2abcaa00122502eb944feeeb29 Mon Sep 17 00:00:00 2001
+From 02a5ce6b4b7d1eefb8bd1378e09b4c22f4099106 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3d15913432f12a2abcaa00122502eb944feeeb29 ]
+
@@ -37 +38,0 @@
-Cc: stable@dpdk.org
@@ -42 +43 @@
- doc/guides/sample_app_ug/eventdev_pipeline.rst | 5 +++--
+ doc/guides/sample_app_ug/eventdev_pipeline.rst | 4 +++-
@@ -44 +45 @@
- 2 files changed, 11 insertions(+), 3 deletions(-)
+ 2 files changed, 11 insertions(+), 2 deletions(-)
@@ -47 +48 @@
-index 4508c3dcc8..19ff53803e 100644
+index dc7972aa9a..24fb23b898 100644
@@ -58 +59 @@
-@@ -46,8 +47,8 @@ these settings is shown below:
+@@ -46,7 +47,8 @@ these settings is shown below:
@@ -62,4 +63,3 @@
--    ./<build_dir>/examples/dpdk-eventdev_pipeline --vdev event_sw0 -- -r1 -t1 \
--    -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
-+    ./<build_dir>/examples/dpdk-eventdev_pipeline -l 0,2,8-15 --vdev event_sw0 \
-+    -- -r1 -t1 -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
+-    ./build/eventdev_pipeline --vdev event_sw0 -- -r1 -t1 -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
++    ./build/eventdev_pipeline --vdev event_sw0 -l 0,2,8-15 -- -r1 -t1 \
++    -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
@@ -70 +70 @@
-index 823f8b51c2..ae50591b88 100644
+index 6fc7c86dc9..71ee586c9a 100644
@@ -73 +73 @@
-@@ -239,8 +239,15 @@ parse_app_args(int argc, char **argv)
+@@ -265,8 +265,15 @@ parse_app_args(int argc, char **argv)

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

* [dpdk-stable] patch 'examples/eventdev: move ethdev stop to the end' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (134 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'examples/eventdev: check CPU core enabling' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/hns3: fix memory leak on secondary process exit' " Christian Ehrhardt
                   ` (3 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Feifei Wang
  Cc: Ruifeng Wang, Honnappa Nagarahalli, Harry van Haaren,
	Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/035f49dfbe9e01643084bf5b38fc1c89f8650d26

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 035f49dfbe9e01643084bf5b38fc1c89f8650d26 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Thu, 14 Jan 2021 18:31:01 +0800
Subject: [PATCH] examples/eventdev: move ethdev stop to the end

[ upstream commit f3527e0b97ae4adf2e1871e6f67b17968b4a9486 ]

Move eth stop code from "signal_handler" function to the end of "main"
function. There are two reasons for this:

First, this improves code maintenance and makes code look simple and
clear. Based on this change, after receiving the interrupt signal,
"fdata->done" is set as 1. Then the main thread will wait all worker
lcores to jump out of the loop. Finally, the main thread will stop and
then close eth dev port.

Second, for older version, the main thread first stops eth dev port and
then waits the end of worker lcore. This may cause errors because it may
stop the eth dev port which worker lcores are using. This moving change
can fix this by waiting all worker threads to exit and then stop the
eth dev port.

In the meanwhile, remove wmb in signal_handler.

This is because when the main lcore receive the stop signal, it stores 1
into fdata->done. And then the worker lcores load "fdata->done" and jump
out of the loop to stop running. Nothing should be stored after updating
fdata->done, so the wmb is unnecessary.

Fixes: 085edac2ca38 ("examples/eventdev_pipeline: support Tx adapter")

Suggested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 examples/eventdev_pipeline/main.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index 71ee586c9a..a3eeb50a75 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -313,7 +313,6 @@ static void
 signal_handler(int signum)
 {
 	static uint8_t once;
-	uint16_t portid;
 
 	if (fdata->done)
 		rte_exit(1, "Exiting on signal %d\n", signum);
@@ -324,16 +323,6 @@ signal_handler(int signum)
 			rte_event_dev_dump(0, stdout);
 		once = 1;
 		fdata->done = 1;
-		rte_smp_wmb();
-
-		RTE_ETH_FOREACH_DEV(portid) {
-			rte_event_eth_rx_adapter_stop(portid);
-			rte_event_eth_tx_adapter_stop(portid);
-			rte_eth_dev_stop(portid);
-		}
-
-		rte_eal_mp_wait_lcore();
-
 	}
 	if (signum == SIGTSTP)
 		rte_event_dev_dump(0, stdout);
@@ -484,6 +473,9 @@ main(int argc, char **argv)
 	}
 
 	RTE_ETH_FOREACH_DEV(portid) {
+		rte_event_eth_rx_adapter_stop(portid);
+		rte_event_eth_tx_adapter_stop(portid);
+		rte_eth_dev_stop(portid);
 		rte_eth_dev_close(portid);
 	}
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.554167262 +0100
+++ 0137-examples-eventdev-move-ethdev-stop-to-the-end.patch	2021-02-04 12:04:28.206789899 +0100
@@ -1 +1 @@
-From f3527e0b97ae4adf2e1871e6f67b17968b4a9486 Mon Sep 17 00:00:00 2001
+From 035f49dfbe9e01643084bf5b38fc1c89f8650d26 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f3527e0b97ae4adf2e1871e6f67b17968b4a9486 ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -38,2 +39,2 @@
- examples/eventdev_pipeline/main.c | 16 ++++------------
- 1 file changed, 4 insertions(+), 12 deletions(-)
+ examples/eventdev_pipeline/main.c | 14 +++-----------
+ 1 file changed, 3 insertions(+), 11 deletions(-)
@@ -42 +43 @@
-index 9982d5bfb0..3dbef6ed45 100644
+index 71ee586c9a..a3eeb50a75 100644
@@ -53 +54 @@
-@@ -324,17 +323,6 @@ signal_handler(int signum)
+@@ -324,16 +323,6 @@ signal_handler(int signum)
@@ -62,2 +63 @@
--			if (rte_eth_dev_stop(portid) < 0)
--				printf("Failed to stop port %u", portid);
+-			rte_eth_dev_stop(portid);
@@ -71 +71 @@
-@@ -485,6 +473,10 @@ main(int argc, char **argv)
+@@ -484,6 +473,9 @@ main(int argc, char **argv)
@@ -77,2 +77 @@
-+		if (rte_eth_dev_stop(portid) < 0)
-+			printf("Failed to stop port %u", portid);
++		rte_eth_dev_stop(portid);

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

* [dpdk-stable] patch 'net/hns3: fix memory leak on secondary process exit' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (135 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'examples/eventdev: move ethdev stop to the end' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/testpmd: fix setting maximum packet length' " Christian Ehrhardt
                   ` (2 subsequent siblings)
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Lijun Ou; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/77c7e32d8737b2fe024bfcbe3703bec28201efac

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 77c7e32d8737b2fe024bfcbe3703bec28201efac Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Fri, 22 Jan 2021 18:18:46 +0800
Subject: [PATCH] net/hns3: fix memory leak on secondary process exit

[ upstream commit 4101114586e42e3dfb0dee2e5b054dee3074e63f ]

The secondary process is applied a memory for the process_private
during initialization. Therefore, the memory needs to be released
when exiting.

Fixes: c203571b3602 ("net/hns3: register and add log interface")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    |  7 +++++--
 drivers/net/hns3/hns3_ethdev_vf.c | 11 ++++++++---
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 343ee96d79..33b3ccc865 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5553,8 +5553,11 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return -EPERM;
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		rte_free(eth_dev->process_private);
+		eth_dev->process_private = NULL;
+		return 0;
+	}
 
 	eth_dev->dev_ops = NULL;
 	eth_dev->rx_pkt_burst = NULL;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index d8a2a8dcf3..f7bd2b4672 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1643,8 +1643,10 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
 	struct hns3_adapter *hns = eth_dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
 
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		rte_free(eth_dev->process_private);
 		return;
+    }
 
 	if (hw->adapter_state == HNS3_NIC_STARTED)
 		hns3vf_dev_stop(eth_dev);
@@ -2371,8 +2373,11 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return -EPERM;
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		rte_free(eth_dev->process_private);
+		eth_dev->process_private = NULL;
+		return 0;
+	}
 
 	eth_dev->dev_ops = NULL;
 	eth_dev->rx_pkt_burst = NULL;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.589353013 +0100
+++ 0138-net-hns3-fix-memory-leak-on-secondary-process-exit.patch	2021-02-04 12:04:28.214789907 +0100
@@ -1 +1 @@
-From 4101114586e42e3dfb0dee2e5b054dee3074e63f Mon Sep 17 00:00:00 2001
+From 77c7e32d8737b2fe024bfcbe3703bec28201efac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4101114586e42e3dfb0dee2e5b054dee3074e63f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +17,2 @@
- drivers/net/hns3/hns3_ethdev_vf.c | 12 +++++++++---
- 2 files changed, 14 insertions(+), 5 deletions(-)
+ drivers/net/hns3/hns3_ethdev_vf.c | 11 ++++++++---
+ 2 files changed, 13 insertions(+), 5 deletions(-)
@@ -20 +21 @@
-index c5dccec5ae..b89bc48714 100644
+index 343ee96d79..33b3ccc865 100644
@@ -23 +24 @@
-@@ -6263,8 +6263,11 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
+@@ -5553,8 +5553,11 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
@@ -35,2 +36,2 @@
- 	if (hw->adapter_state < HNS3_NIC_CLOSING)
- 		hns3_dev_close(eth_dev);
+ 	eth_dev->dev_ops = NULL;
+ 	eth_dev->rx_pkt_burst = NULL;
@@ -38 +39 @@
-index 063f2f5c2f..5bf8c2e8fd 100644
+index d8a2a8dcf3..f7bd2b4672 100644
@@ -41 +42,2 @@
-@@ -1971,8 +1971,11 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
+@@ -1643,8 +1643,10 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
+ 	struct hns3_adapter *hns = eth_dev->data->dev_private;
@@ -43 +44,0 @@
- 	int ret = 0;
@@ -48,3 +49,2 @@
-+		eth_dev->process_private = NULL;
- 		return 0;
-+	}
+ 		return;
++    }
@@ -53,2 +53,2 @@
- 		ret = hns3vf_dev_stop(eth_dev);
-@@ -2839,8 +2842,11 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
+ 		hns3vf_dev_stop(eth_dev);
+@@ -2371,8 +2373,11 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
@@ -66,2 +66,2 @@
- 	if (hw->adapter_state < HNS3_NIC_CLOSING)
- 		hns3vf_dev_close(eth_dev);
+ 	eth_dev->dev_ops = NULL;
+ 	eth_dev->rx_pkt_burst = NULL;

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

* [dpdk-stable] patch 'app/testpmd: fix setting maximum packet length' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (136 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'net/hns3: fix memory leak on secondary process exit' " Christian Ehrhardt
@ 2021-02-04 11:29 ` Christian Ehrhardt
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
  2021-02-15 13:28 ` [dpdk-stable] patch 'net/ixgbe: fix UDP zero checksum on x86' " Christian Ehrhardt
  139 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 11:29 UTC (permalink / raw)
  To: Steve Yang
  Cc: Ferruh Yigit, Lance Richardson, Wisam Jaddo, Xiaoyun Li, Bo Chen,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 8b8aa89e89b6d8e07d95cbd8b7c2815b1f6c73dd Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Thu, 28 Jan 2021 12:07:08 +0000
Subject: [PATCH] app/testpmd: fix setting maximum packet length

[ upstream commit 0c4abd368880349cf9df2770b1d18890b08441ae ]

"port config all max-pkt-len" command fails because it doesn't set the
'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag properly.

Commit in the fixes line moved the 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload
flag update from 'cmd_config_max_pkt_len_parsed()' to 'init_config()'.
'init_config()' function is only called during testpmd startup, but the
flag status needs to be calculated whenever 'max_rx_pkt_len' changes.

The issue can be reproduced as [1], where the 'max-pkt-len' reduced and
'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag should be cleared but it
didn't.

Adding the 'update_jumbo_frame_offload()' helper function to update
'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag and 'max_rx_pkt_len'. This
function is called both by 'init_config()' and
'cmd_config_max_pkt_len_parsed()'.

Default 'max-pkt-len' value set to zero, 'update_jumbo_frame_offload()'
updates it to "RTE_ETHER_MTU + PMD specific Ethernet overhead" when it
is zero.
If '--max-pkt-len=N' argument provided, it will be used instead.
And with each "port config all max-pkt-len" command, the
'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag, 'max-pkt-len' and MTU is
updated.

[1]
--------------------------------------------------------------------------
dpdk-testpmd -c 0xf -n 4 -- -i --max-pkt-len=9000 --tx-offloads=0x8000
	--rxq=4 --txq=4 --disable-rss
testpmd>  set verbose 3
testpmd>  port stop all
testpmd>  port config all max-pkt-len 1518
testpmd>  port start all

// Got fail error info without this patch
Configuring Port 0 (socket 1)
Ethdev port_id=0 rx_queue_id=0, new added offloads 0x800 must be
within per-queue offload capabilities 0x0 in rte_eth_rx_queue_setup()
Fail to configure port 0 rx queues //<-- Fail error info;
--------------------------------------------------------------------------

Bugzilla ID: 625
Fixes: 761c4d66900f ("app/testpmd: fix max Rx packet length for VLAN packets")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Wisam Jaddo <wisamm@nvidia.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Tested-by: Bo Chen <box.c.chen@intel.com>
---
 app/test-pmd/cmdline.c |  13 ++++++
 app/test-pmd/testpmd.c | 102 +++++++++++++++++++++++++++++++++--------
 app/test-pmd/testpmd.h |   2 +
 3 files changed, 98 insertions(+), 19 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 21211907eb..9a9da744a1 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1974,7 +1974,9 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
 				__attribute__((unused)) void *data)
 {
 	struct cmd_config_max_pkt_len_result *res = parsed_result;
+	uint32_t max_rx_pkt_len_backup = 0;
 	portid_t pid;
+	int ret;
 
 	if (!all_ports_stopped()) {
 		printf("Please stop all ports first\n");
@@ -1993,7 +1995,18 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
 			if (res->value == port->dev_conf.rxmode.max_rx_pkt_len)
 				return;
 
+			ret = eth_dev_info_get_print_err(pid, &port->dev_info);
+			if (ret != 0) {
+				printf("rte_eth_dev_info_get() failed for port %u\n",
+					pid);
+				return;
+			}
+
+			max_rx_pkt_len_backup = port->dev_conf.rxmode.max_rx_pkt_len;
+
 			port->dev_conf.rxmode.max_rx_pkt_len = res->value;
+			if (update_jumbo_frame_offload(pid) != 0)
+				port->dev_conf.rxmode.max_rx_pkt_len = max_rx_pkt_len_backup;
 		} else {
 			printf("Unknown parameter\n");
 			return;
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 0797e634fe..a1823e00d9 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -421,8 +421,11 @@ lcoreid_t latencystats_lcore_id = -1;
  * Ethernet device configuration.
  */
 struct rte_eth_rxmode rx_mode = {
-	.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
-		/**< Default maximum frame length. */
+	/* Default maximum frame length.
+	 * Zero is converted to "RTE_ETHER_MTU + PMD Ethernet overhead"
+	 * in init_config().
+	 */
+	.max_rx_pkt_len = 0,
 };
 
 struct rte_eth_txmode tx_mode = {
@@ -1301,7 +1304,6 @@ init_config(void)
 	struct rte_gro_param gro_param;
 	uint32_t gso_types;
 	uint16_t data_size;
-	uint16_t eth_overhead;
 	bool warning = 0;
 	int k;
 	int ret;
@@ -1338,22 +1340,10 @@ init_config(void)
 			rte_exit(EXIT_FAILURE,
 				 "rte_eth_dev_info_get() failed\n");
 
-		/* Update the max_rx_pkt_len to have MTU as RTE_ETHER_MTU */
-		if (port->dev_info.max_mtu != UINT16_MAX &&
-		    port->dev_info.max_rx_pktlen > port->dev_info.max_mtu)
-			eth_overhead = port->dev_info.max_rx_pktlen -
-				port->dev_info.max_mtu;
-		else
-			eth_overhead =
-				RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
-
-		if (port->dev_conf.rxmode.max_rx_pkt_len <=
-			(uint32_t)(RTE_ETHER_MTU + eth_overhead))
-			port->dev_conf.rxmode.max_rx_pkt_len =
-					RTE_ETHER_MTU + eth_overhead;
-		else
-			port->dev_conf.rxmode.offloads |=
-					DEV_RX_OFFLOAD_JUMBO_FRAME;
+		ret = update_jumbo_frame_offload(pid);
+		if (ret != 0)
+			printf("Updating jumbo frame offload failed for port %u\n",
+				pid);
 
 		if (!(port->dev_info.tx_offload_capa &
 		      DEV_TX_OFFLOAD_MBUF_FAST_FREE))
@@ -3261,6 +3251,80 @@ rxtx_port_config(struct rte_port *port)
 	}
 }
 
+/*
+ * Helper function to arrange max_rx_pktlen value and JUMBO_FRAME offload,
+ * MTU is also aligned if JUMBO_FRAME offload is not set.
+ *
+ * port->dev_info should be set before calling this function.
+ *
+ * return 0 on success, negative on error
+ */
+int
+update_jumbo_frame_offload(portid_t portid)
+{
+	struct rte_port *port = &ports[portid];
+	uint32_t eth_overhead;
+	uint64_t rx_offloads;
+	int ret;
+	bool on;
+
+	/* Update the max_rx_pkt_len to have MTU as RTE_ETHER_MTU */
+	if (port->dev_info.max_mtu != UINT16_MAX &&
+	    port->dev_info.max_rx_pktlen > port->dev_info.max_mtu)
+		eth_overhead = port->dev_info.max_rx_pktlen -
+				port->dev_info.max_mtu;
+	else
+		eth_overhead = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
+
+	rx_offloads = port->dev_conf.rxmode.offloads;
+
+	/* Default config value is 0 to use PMD specific overhead */
+	if (port->dev_conf.rxmode.max_rx_pkt_len == 0)
+		port->dev_conf.rxmode.max_rx_pkt_len = RTE_ETHER_MTU + eth_overhead;
+
+	if (port->dev_conf.rxmode.max_rx_pkt_len <= RTE_ETHER_MTU + eth_overhead) {
+		rx_offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
+		on = false;
+	} else {
+		if ((port->dev_info.rx_offload_capa & DEV_RX_OFFLOAD_JUMBO_FRAME) == 0) {
+			printf("Frame size (%u) is not supported by port %u\n",
+				port->dev_conf.rxmode.max_rx_pkt_len,
+				portid);
+			return -1;
+		}
+		rx_offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+		on = true;
+	}
+
+	if (rx_offloads != port->dev_conf.rxmode.offloads) {
+		uint16_t qid;
+
+		port->dev_conf.rxmode.offloads = rx_offloads;
+
+		/* Apply JUMBO_FRAME offload configuration to Rx queue(s) */
+		for (qid = 0; qid < port->dev_info.nb_rx_queues; qid++) {
+			if (on)
+				port->rx_conf[qid].offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+			else
+				port->rx_conf[qid].offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
+		}
+	}
+
+	/* If JUMBO_FRAME is set MTU conversion done by ethdev layer,
+	 * if unset do it here
+	 */
+	if ((rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) == 0) {
+		ret = rte_eth_dev_set_mtu(portid,
+				port->dev_conf.rxmode.max_rx_pkt_len - eth_overhead);
+		if (ret)
+			printf("Failed to set MTU to %u for port %u\n",
+				port->dev_conf.rxmode.max_rx_pkt_len - eth_overhead,
+				portid);
+	}
+
+	return 0;
+}
+
 void
 init_port_config(void)
 {
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 2b1e9a24f9..4dbcee3a62 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -883,6 +883,8 @@ uint16_t tx_pkt_set_md(uint16_t port_id, __rte_unused uint16_t queue,
 void add_tx_md_callback(portid_t portid);
 void remove_tx_md_callback(portid_t portid);
 
+int update_jumbo_frame_offload(portid_t portid);
+
 /*
  * Work-around of a compilation error with ICC on invocations of the
  * rte_be_to_cpu_16() function.
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-04 12:04:33.631358784 +0100
+++ 0139-app-testpmd-fix-setting-maximum-packet-length.patch	2021-02-04 12:04:28.238789930 +0100
@@ -1 +1 @@
-From 0c4abd368880349cf9df2770b1d18890b08441ae Mon Sep 17 00:00:00 2001
+From 8b8aa89e89b6d8e07d95cbd8b7c2815b1f6c73dd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0c4abd368880349cf9df2770b1d18890b08441ae ]
+
@@ -49 +50,0 @@
-Cc: stable@dpdk.org
@@ -60,2 +61,2 @@
- app/test-pmd/testpmd.h |   1 +
- 3 files changed, 97 insertions(+), 19 deletions(-)
+ app/test-pmd/testpmd.h |   2 +
+ 3 files changed, 98 insertions(+), 19 deletions(-)
@@ -64 +65 @@
-index c6ace2dd25..b338f5fe63 100644
+index 21211907eb..9a9da744a1 100644
@@ -67,2 +68,2 @@
-@@ -1877,7 +1877,9 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
- 				__rte_unused void *data)
+@@ -1974,7 +1974,9 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
+ 				__attribute__((unused)) void *data)
@@ -77 +78 @@
-@@ -1896,7 +1898,18 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
+@@ -1993,7 +1995,18 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
@@ -97 +98 @@
-index c256e719ae..555852ae5e 100644
+index 0797e634fe..a1823e00d9 100644
@@ -100 +101 @@
-@@ -443,8 +443,11 @@ lcoreid_t latencystats_lcore_id = -1;
+@@ -421,8 +421,11 @@ lcoreid_t latencystats_lcore_id = -1;
@@ -114 +115 @@
-@@ -1410,7 +1413,6 @@ init_config(void)
+@@ -1301,7 +1304,6 @@ init_config(void)
@@ -122 +123 @@
-@@ -1447,22 +1449,10 @@ init_config(void)
+@@ -1338,22 +1340,10 @@ init_config(void)
@@ -149 +150 @@
-@@ -3358,6 +3348,80 @@ rxtx_port_config(struct rte_port *port)
+@@ -3261,6 +3251,80 @@ rxtx_port_config(struct rte_port *port)
@@ -231 +232 @@
-index 5f23162107..2f8f5a92e4 100644
+index 2b1e9a24f9..4dbcee3a62 100644
@@ -234,5 +235,3 @@
-@@ -1005,6 +1005,7 @@ uint16_t tx_pkt_set_dynf(uint16_t port_id, __rte_unused uint16_t queue,
- 			 __rte_unused void *user_param);
- void add_tx_dynf_callback(portid_t portid);
- void remove_tx_dynf_callback(portid_t portid);
-+int update_jumbo_frame_offload(portid_t portid);
+@@ -883,6 +883,8 @@ uint16_t tx_pkt_set_md(uint16_t port_id, __rte_unused uint16_t queue,
+ void add_tx_md_callback(portid_t portid);
+ void remove_tx_md_callback(portid_t portid);
@@ -239,0 +239,2 @@
++int update_jumbo_frame_offload(portid_t portid);
++
@@ -241,0 +243 @@
+  * rte_be_to_cpu_16() function.

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

* Re: [dpdk-stable] patch 'app/crypto-perf: remove always true condition' has been queued to stable release 19.11.7
  2021-02-04 11:27 ` [dpdk-stable] patch 'app/crypto-perf: remove always true condition' " Christian Ehrhardt
@ 2021-02-04 13:00   ` Zhang, Roy Fan
  2021-02-04 13:12     ` Christian Ehrhardt
  0 siblings, 1 reply; 166+ messages in thread
From: Zhang, Roy Fan @ 2021-02-04 13:00 UTC (permalink / raw)
  To: Christian Ehrhardt, Yigit, Ferruh; +Cc: dpdk stable

Hi Christian,

The queued change looks good. So do you think we need a patch on master to change this too?

Regards,
Fan

> -----Original Message-----
> From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> Sent: Thursday, February 4, 2021 11:28 AM
> To: Yigit, Ferruh <ferruh.yigit@intel.com>
> Cc: Zhang, Roy Fan <roy.fan.zhang@intel.com>; dpdk stable
> <stable@dpdk.org>
> Subject: patch 'app/crypto-perf: remove always true condition' has been
> queued to stable release 19.11.7
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue
> 
> This queued commit can be viewed at:
> https://github.com/cpaelzer/dpdk-stable-
> queue/commit/6c0a0f5e578eb67c9947d237eb5445f2c32511f8
> 
> Thanks.
> 
> Christian Ehrhardt <christian.ehrhardt@canonical.com>
> 
> ---
> From 6c0a0f5e578eb67c9947d237eb5445f2c32511f8 Mon Sep 17 00:00:00
> 2001
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Date: Thu, 19 Nov 2020 11:58:59 +0000
> Subject: [PATCH] app/crypto-perf: remove always true condition
> 
> [ upstream commit 427ec3b7285d8e8b939f7e5db4976476c931c005 ]
> 
> This is already 'else' leg of the opposite comparison, simple 'else'
> will be logically same.
> 
> Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test
> application")
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>  app/test-crypto-perf/main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
> index 7bb286ccbe..b065ab2acb 100644
> --- a/app/test-crypto-perf/main.c
> +++ b/app/test-crypto-perf/main.c
> @@ -380,7 +380,7 @@ cperf_check_test_vector(struct cperf_options *opts,
>  		if (opts->cipher_algo == RTE_CRYPTO_CIPHER_NULL) {
>  			if (test_vec->plaintext.data == NULL)
>  				return -1;
> -		} else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
> +		} else {
>  			if (test_vec->plaintext.data == NULL)
>  				return -1;
>  			if (test_vec->plaintext.length < opts-
> >max_buffer_size)
> @@ -430,7 +430,7 @@ cperf_check_test_vector(struct cperf_options *opts,
>  				return -1;
>  			if (test_vec->plaintext.length < opts-
> >max_buffer_size)
>  				return -1;
> -		} else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
> +		} else {
>  			if (test_vec->plaintext.data == NULL)
>  				return -1;
>  			if (test_vec->plaintext.length < opts-
> >max_buffer_size)
> --
> 2.30.0
> 
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- -	2021-02-04 12:04:28.540974655 +0100
> +++ 0008-app-crypto-perf-remove-always-true-condition.patch	2021-
> 02-04 12:04:27.802789508 +0100
> @@ -1 +1 @@
> -From 427ec3b7285d8e8b939f7e5db4976476c931c005 Mon Sep 17 00:00:00
> 2001
> +From 6c0a0f5e578eb67c9947d237eb5445f2c32511f8 Mon Sep 17 00:00:00
> 2001
> @@ -5,0 +6,2 @@
> +[ upstream commit 427ec3b7285d8e8b939f7e5db4976476c931c005 ]
> +
> @@ -10 +11,0 @@
> -Cc: stable@dpdk.org
> @@ -19 +20 @@
> -index 5f035519c3..99f86e9019 100644
> +index 7bb286ccbe..b065ab2acb 100644
> @@ -22 +23 @@
> -@@ -390,7 +390,7 @@ cperf_check_test_vector(struct cperf_options *opts,
> +@@ -380,7 +380,7 @@ cperf_check_test_vector(struct cperf_options *opts,
> @@ -31 +32 @@
> -@@ -440,7 +440,7 @@ cperf_check_test_vector(struct cperf_options *opts,
> +@@ -430,7 +430,7 @@ cperf_check_test_vector(struct cperf_options *opts,

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

* Re: [dpdk-stable] patch 'app/crypto-perf: remove always true condition' has been queued to stable release 19.11.7
  2021-02-04 13:00   ` Zhang, Roy Fan
@ 2021-02-04 13:12     ` Christian Ehrhardt
  0 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-04 13:12 UTC (permalink / raw)
  To: Zhang, Roy Fan; +Cc: Yigit, Ferruh, dpdk stable

On Thu, Feb 4, 2021 at 2:01 PM Zhang, Roy Fan <roy.fan.zhang@intel.com> wrote:
>
> Hi Christian,
>
> The queued change looks good. So do you think we need a patch on master to change this too?

Hi,
as you can derive from

> > [ upstream commit 427ec3b7285d8e8b939f7e5db4976476c931c005 ]

This already is on upstream/main branch as:

http://git.dpdk.org/dpdk/commit/?id=427ec3b7285d8e8b939f7e5db4976476c931c005

All these mails are about patches that are on the main branch and do
not contain "new code" but only "backported fixes".
Therefore the answer will always be "it already is there".

> Regards,
> Fan
>
> > -----Original Message-----
> > From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> > Sent: Thursday, February 4, 2021 11:28 AM
> > To: Yigit, Ferruh <ferruh.yigit@intel.com>
> > Cc: Zhang, Roy Fan <roy.fan.zhang@intel.com>; dpdk stable
> > <stable@dpdk.org>
> > Subject: patch 'app/crypto-perf: remove always true condition' has been
> > queued to stable release 19.11.7
> >
> > Hi,
> >
> > FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue
> >
> > This queued commit can be viewed at:
> > https://github.com/cpaelzer/dpdk-stable-
> > queue/commit/6c0a0f5e578eb67c9947d237eb5445f2c32511f8
> >
> > Thanks.
> >
> > Christian Ehrhardt <christian.ehrhardt@canonical.com>
> >
> > ---
> > From 6c0a0f5e578eb67c9947d237eb5445f2c32511f8 Mon Sep 17 00:00:00
> > 2001
> > From: Ferruh Yigit <ferruh.yigit@intel.com>
> > Date: Thu, 19 Nov 2020 11:58:59 +0000
> > Subject: [PATCH] app/crypto-perf: remove always true condition
> >
> > [ upstream commit 427ec3b7285d8e8b939f7e5db4976476c931c005 ]
> >
> > This is already 'else' leg of the opposite comparison, simple 'else'
> > will be logically same.
> >
> > Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test
> > application")
> >
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
> > ---
> >  app/test-crypto-perf/main.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
> > index 7bb286ccbe..b065ab2acb 100644
> > --- a/app/test-crypto-perf/main.c
> > +++ b/app/test-crypto-perf/main.c
> > @@ -380,7 +380,7 @@ cperf_check_test_vector(struct cperf_options *opts,
> >               if (opts->cipher_algo == RTE_CRYPTO_CIPHER_NULL) {
> >                       if (test_vec->plaintext.data == NULL)
> >                               return -1;
> > -             } else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
> > +             } else {
> >                       if (test_vec->plaintext.data == NULL)
> >                               return -1;
> >                       if (test_vec->plaintext.length < opts-
> > >max_buffer_size)
> > @@ -430,7 +430,7 @@ cperf_check_test_vector(struct cperf_options *opts,
> >                               return -1;
> >                       if (test_vec->plaintext.length < opts-
> > >max_buffer_size)
> >                               return -1;
> > -             } else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
> > +             } else {
> >                       if (test_vec->plaintext.data == NULL)
> >                               return -1;
> >                       if (test_vec->plaintext.length < opts-
> > >max_buffer_size)
> > --
> > 2.30.0
> >
> > ---
> >   Diff of the applied patch vs upstream commit (please double-check if non-
> > empty:
> > ---
> > --- - 2021-02-04 12:04:28.540974655 +0100
> > +++ 0008-app-crypto-perf-remove-always-true-condition.patch   2021-
> > 02-04 12:04:27.802789508 +0100
> > @@ -1 +1 @@
> > -From 427ec3b7285d8e8b939f7e5db4976476c931c005 Mon Sep 17 00:00:00
> > 2001
> > +From 6c0a0f5e578eb67c9947d237eb5445f2c32511f8 Mon Sep 17 00:00:00
> > 2001
> > @@ -5,0 +6,2 @@
> > +[ upstream commit 427ec3b7285d8e8b939f7e5db4976476c931c005 ]
> > +
> > @@ -10 +11,0 @@
> > -Cc: stable@dpdk.org
> > @@ -19 +20 @@
> > -index 5f035519c3..99f86e9019 100644
> > +index 7bb286ccbe..b065ab2acb 100644
> > @@ -22 +23 @@
> > -@@ -390,7 +390,7 @@ cperf_check_test_vector(struct cperf_options *opts,
> > +@@ -380,7 +380,7 @@ cperf_check_test_vector(struct cperf_options *opts,
> > @@ -31 +32 @@
> > -@@ -440,7 +440,7 @@ cperf_check_test_vector(struct cperf_options *opts,
> > +@@ -430,7 +430,7 @@ cperf_check_test_vector(struct cperf_options *opts,



-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd

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

* [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (137 preceding siblings ...)
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/testpmd: fix setting maximum packet length' " Christian Ehrhardt
@ 2021-02-08 11:14 ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/mlx5: fix port attach in secondary process' " Christian Ehrhardt
                     ` (15 more replies)
  2021-02-15 13:28 ` [dpdk-stable] patch 'net/ixgbe: fix UDP zero checksum on x86' " Christian Ehrhardt
  139 siblings, 16 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 0db4935be6c3834c61aac3cda1fc08f20eb11a3e Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Mon, 8 Feb 2021 11:04:00 +0800
Subject: [PATCH] net/mlx5: fix crash on secondary process port close

[ upstream commit 84a22cbcc467a02772dd24156773940331994c84 ]

When secondary process starts, in rte_eth_dev_attach_secondary()
function, the secondary process port device data in struct rte_eth_dev
will be initialized to be shared with primary process port.

When failsafe sub-port hot-plug happens, both primary and secondary
process will release the sub-port, and primary process will clear the
sub-port device data in fs_dev_remove() deactivate stage first before
request secondary process to release the sub-port. In this case, the
secondary process will not be able to get the priv memory pointer from
the shared device data memory anymore, since the device data memory
has been cleared.

Since what secondary process needs in port detach is the UAR table size
to unmap the UAR addresses. It used Tx queue number as size of UAR table
in priv. In fact the uar_table_sz in struct mlx5_proc_priv means the
size of UAR register table - the number of UAR records. However, the
code set this field incorrectly to the size of mlx5_proc_priv structure.

This commit fixes UAR table size to match with relevant Tx queue number,
uses the UAR table size directly to avoid the secondary process to
access the priv pointer in the shared device data memory when unmapping
the UAR address.

Fixes: 120dc4a7dcd3 ("net/mlx5: remove device register remap")
Cc: stable@dpdk.org

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5.c     |  4 ++--
 drivers/net/mlx5/mlx5_txq.c | 21 +++++++++++++--------
 2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 4307005865..ac4745295c 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1251,13 +1251,13 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
 	 */
 	ppriv_size =
 		sizeof(struct mlx5_proc_priv) + priv->txqs_n * sizeof(void *);
-	ppriv = rte_malloc_socket("mlx5_proc_priv", ppriv_size,
+	ppriv = rte_zmalloc_socket("mlx5_proc_priv", ppriv_size,
 				  RTE_CACHE_LINE_SIZE, dev->device->numa_node);
 	if (!ppriv) {
 		rte_errno = ENOMEM;
 		return -rte_errno;
 	}
-	ppriv->uar_table_sz = ppriv_size;
+	ppriv->uar_table_sz = priv->txqs_n;
 	dev->process_private = ppriv;
 	return 0;
 }
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index fd1edfff65..9c929a57ea 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -433,18 +433,23 @@ txq_uar_uninit_secondary(struct mlx5_txq_ctrl *txq_ctrl)
 void
 mlx5_tx_uar_uninit_secondary(struct rte_eth_dev *dev)
 {
-	struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_txq_data *txq;
-	struct mlx5_txq_ctrl *txq_ctrl;
+	struct mlx5_proc_priv *ppriv = (struct mlx5_proc_priv *)
+					dev->process_private;
+	const size_t page_size = sysconf(_SC_PAGESIZE);
+	void *addr;
 	unsigned int i;
 
+	if (page_size == (size_t)-1) {
+		DRV_LOG(ERR, "Failed to get mem page size");
+		return;
+	}
 	assert(rte_eal_process_type() == RTE_PROC_SECONDARY);
-	for (i = 0; i != priv->txqs_n; ++i) {
-		if (!(*priv->txqs)[i])
+	for (i = 0; i != ppriv->uar_table_sz; ++i) {
+		if (!ppriv->uar_table[i])
 			continue;
-		txq = (*priv->txqs)[i];
-		txq_ctrl = container_of(txq, struct mlx5_txq_ctrl, txq);
-		txq_uar_uninit_secondary(txq_ctrl);
+		addr = ppriv->uar_table[i];
+		munmap(RTE_PTR_ALIGN_FLOOR(addr, page_size), page_size);
+
 	}
 }
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:29.587570377 +0100
+++ 0001-net-mlx5-fix-crash-on-secondary-process-port-close.patch	2021-02-08 12:04:29.515496791 +0100
@@ -1 +1 @@
-From 84a22cbcc467a02772dd24156773940331994c84 Mon Sep 17 00:00:00 2001
+From 0db4935be6c3834c61aac3cda1fc08f20eb11a3e Mon Sep 17 00:00:00 2001
@@ -3 +3 @@
-Date: Sun, 24 Jan 2021 19:02:04 +0800
+Date: Mon, 8 Feb 2021 11:04:00 +0800
@@ -5,0 +6,2 @@
+[ upstream commit 84a22cbcc467a02772dd24156773940331994c84 ]
+
@@ -35 +37 @@
- drivers/net/mlx5/mlx5.c     |  6 +++---
+ drivers/net/mlx5/mlx5.c     |  4 ++--
@@ -37 +39 @@
- 2 files changed, 16 insertions(+), 11 deletions(-)
+ 2 files changed, 15 insertions(+), 10 deletions(-)
@@ -40 +42 @@
-index 50a6d2b19f..93629e5b05 100644
+index 4307005865..ac4745295c 100644
@@ -47,4 +49,3 @@
--	ppriv = mlx5_malloc(MLX5_MEM_RTE, ppriv_size, RTE_CACHE_LINE_SIZE,
--			    dev->device->numa_node);
-+	ppriv = mlx5_malloc(MLX5_MEM_RTE | MLX5_MEM_ZERO, ppriv_size,
-+			    RTE_CACHE_LINE_SIZE, dev->device->numa_node);
+-	ppriv = rte_malloc_socket("mlx5_proc_priv", ppriv_size,
++	ppriv = rte_zmalloc_socket("mlx5_proc_priv", ppriv_size,
+ 				  RTE_CACHE_LINE_SIZE, dev->device->numa_node);
@@ -61 +62 @@
-index 5142e50858..15624428aa 100644
+index fd1edfff65..9c929a57ea 100644
@@ -64 +65 @@
-@@ -634,18 +634,23 @@ txq_uar_uninit_secondary(struct mlx5_txq_ctrl *txq_ctrl)
+@@ -433,18 +433,23 @@ txq_uar_uninit_secondary(struct mlx5_txq_ctrl *txq_ctrl)
@@ -73 +74 @@
-+	const size_t page_size = rte_mem_page_size();
++	const size_t page_size = sysconf(_SC_PAGESIZE);
@@ -81 +82 @@
- 	MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_SECONDARY);
+ 	assert(rte_eal_process_type() == RTE_PROC_SECONDARY);
@@ -91 +92 @@
-+		rte_mem_unmap(RTE_PTR_ALIGN_FLOOR(addr, page_size), page_size);
++		munmap(RTE_PTR_ALIGN_FLOOR(addr, page_size), page_size);

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

* [dpdk-stable] patch 'net/mlx5: fix port attach in secondary process' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'doc: fix QinQ flow rules in testpmd guide' " Christian Ehrhardt
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/740893f42b87432184a73ee0c713051ae56be614

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 740893f42b87432184a73ee0c713051ae56be614 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Mon, 8 Feb 2021 11:04:01 +0800
Subject: [PATCH] net/mlx5: fix port attach in secondary process

[ upstream commit 2b36c30b8cd87585502dec0d2b89e76193f13fc3 ]

Currently, the secondary process port UAR register mapping used by Tx
queue is done during port initializing.

Unluckily, in port hot-plug case, the secondary process was requested
to initialize the port when primary process did not complete the
device configuration and the port Tx queue number is not configured
yet. Hence, the secondary process gets the zero Tx queue number during
probing, causing the UAR registers not be mapped in the correct
fashion.

This commit checks the configured number of Tx queues in secondary
process when the port start is requested. In case the Tx queue
number mismatch found the UAR mapping is reinitialized accordingly.

Fixes: 2aac5b5d119f ("net/mlx5: sync stop/start with secondary process")
Cc: stable@dpdk.org

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5.c    |  2 +-
 drivers/net/mlx5/mlx5.h    |  6 +++++-
 drivers/net/mlx5/mlx5_mp.c | 22 ++++++++++++++++++++++
 3 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index ac4745295c..f8de9e329e 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1268,7 +1268,7 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
  * @param dev
  *   Pointer to Ethernet device structure.
  */
-static void
+void
 mlx5_proc_priv_uninit(struct rte_eth_dev *dev)
 {
 	if (!dev->process_private)
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 206c8e9fa8..0e4a5f870d 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -699,7 +699,10 @@ struct mlx5_ibv_shared {
 	struct mlx5_ibv_shared_port port[]; /* per device port data array. */
 };
 
-/* Per-process private structure. */
+/*
+ * Per-process private structure.
+ * Caution, secondary process may rebuild the struct during port start.
+ */
 struct mlx5_proc_priv {
 	size_t uar_table_sz;
 	/* Size of UAR register table. */
@@ -799,6 +802,7 @@ int64_t mlx5_get_dbr(struct rte_eth_dev *dev,
 		     struct mlx5_devx_dbr_page **dbr_page);
 int32_t mlx5_release_dbr(struct rte_eth_dev *dev, uint32_t umem_id,
 			 uint64_t offset);
+void mlx5_proc_priv_uninit(struct rte_eth_dev *dev);
 int mlx5_udp_tunnel_port_add(struct rte_eth_dev *dev,
 			      struct rte_eth_udp_tunnel *udp_tunnel);
 uint16_t mlx5_eth_find_next(uint16_t port_id, struct rte_pci_device *pci_dev);
diff --git a/drivers/net/mlx5/mlx5_mp.c b/drivers/net/mlx5/mlx5_mp.c
index 2a031e2610..e889247871 100644
--- a/drivers/net/mlx5/mlx5_mp.c
+++ b/drivers/net/mlx5/mlx5_mp.c
@@ -119,6 +119,8 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
 	const struct mlx5_mp_param *param =
 		(const struct mlx5_mp_param *)mp_msg->param;
 	struct rte_eth_dev *dev;
+	struct mlx5_proc_priv *ppriv;
+	struct mlx5_priv *priv;
 	int ret;
 
 	assert(rte_eal_process_type() == RTE_PROC_SECONDARY);
@@ -128,12 +130,27 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
 		return -rte_errno;
 	}
 	dev = &rte_eth_devices[param->port_id];
+	priv = dev->data->dev_private;
 	switch (param->type) {
 	case MLX5_MP_REQ_START_RXTX:
 		DRV_LOG(INFO, "port %u starting datapath", dev->data->port_id);
 		rte_mb();
 		dev->rx_pkt_burst = mlx5_select_rx_function(dev);
 		dev->tx_pkt_burst = mlx5_select_tx_function(dev);
+		ppriv = (struct mlx5_proc_priv *)dev->process_private;
+		/* If Tx queue number changes, re-initialize UAR. */
+		if (ppriv->uar_table_sz != priv->txqs_n) {
+			mlx5_tx_uar_uninit_secondary(dev);
+			mlx5_proc_priv_uninit(dev);
+			ret = mlx5_proc_priv_init(dev);
+			if (ret)
+				return -rte_errno;
+			ret = mlx5_tx_uar_init_secondary(dev, mp_msg->fds[0]);
+			if (ret) {
+				mlx5_proc_priv_uninit(dev);
+				return -rte_errno;
+			}
+		}
 		mp_init_msg(dev, &mp_res, param->type);
 		res->result = 0;
 		ret = rte_mp_reply(&mp_res, peer);
@@ -172,6 +189,7 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx5_mp_req_type type)
 	struct rte_mp_reply mp_rep;
 	struct mlx5_mp_param *res;
 	struct timespec ts = {.tv_sec = MLX5_MP_REQ_TIMEOUT_SEC, .tv_nsec = 0};
+	struct mlx5_priv *priv = dev->data->dev_private;
 	int ret;
 	int i;
 
@@ -184,6 +202,10 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx5_mp_req_type type)
 		return;
 	}
 	mp_init_msg(dev, &mp_req, type);
+	if (type == MLX5_MP_REQ_START_RXTX) {
+		mp_req.num_fds = 1;
+		mp_req.fds[0] = ((struct ibv_context *)priv->sh->ctx)->cmd_fd;
+	}
 	ret = rte_mp_request_sync(&mp_req, &mp_rep, &ts);
 	if (ret) {
 		if (rte_errno != ENOTSUP)
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:29.626003442 +0100
+++ 0002-net-mlx5-fix-port-attach-in-secondary-process.patch	2021-02-08 12:04:29.523496792 +0100
@@ -1 +1 @@
-From 2b36c30b8cd87585502dec0d2b89e76193f13fc3 Mon Sep 17 00:00:00 2001
+From 740893f42b87432184a73ee0c713051ae56be614 Mon Sep 17 00:00:00 2001
@@ -3 +3 @@
-Date: Sun, 24 Jan 2021 19:02:05 +0800
+Date: Mon, 8 Feb 2021 11:04:01 +0800
@@ -5,0 +6,2 @@
+[ upstream commit 2b36c30b8cd87585502dec0d2b89e76193f13fc3 ]
+
@@ -26,10 +28,47 @@
- drivers/net/mlx5/linux/mlx5_mp_os.c | 19 +++++++++++++++++++
- drivers/net/mlx5/mlx5.c             |  2 +-
- drivers/net/mlx5/mlx5.h             |  6 +++++-
- 3 files changed, 25 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/net/mlx5/linux/mlx5_mp_os.c b/drivers/net/mlx5/linux/mlx5_mp_os.c
-index 60fdee22a1..8011ca87d7 100644
---- a/drivers/net/mlx5/linux/mlx5_mp_os.c
-+++ b/drivers/net/mlx5/linux/mlx5_mp_os.c
-@@ -115,6 +115,7 @@ struct rte_mp_msg mp_res;
+ drivers/net/mlx5/mlx5.c    |  2 +-
+ drivers/net/mlx5/mlx5.h    |  6 +++++-
+ drivers/net/mlx5/mlx5_mp.c | 22 ++++++++++++++++++++++
+ 3 files changed, 28 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
+index ac4745295c..f8de9e329e 100644
+--- a/drivers/net/mlx5/mlx5.c
++++ b/drivers/net/mlx5/mlx5.c
+@@ -1268,7 +1268,7 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
+  * @param dev
+  *   Pointer to Ethernet device structure.
+  */
+-static void
++void
+ mlx5_proc_priv_uninit(struct rte_eth_dev *dev)
+ {
+ 	if (!dev->process_private)
+diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
+index 206c8e9fa8..0e4a5f870d 100644
+--- a/drivers/net/mlx5/mlx5.h
++++ b/drivers/net/mlx5/mlx5.h
+@@ -699,7 +699,10 @@ struct mlx5_ibv_shared {
+ 	struct mlx5_ibv_shared_port port[]; /* per device port data array. */
+ };
+ 
+-/* Per-process private structure. */
++/*
++ * Per-process private structure.
++ * Caution, secondary process may rebuild the struct during port start.
++ */
+ struct mlx5_proc_priv {
+ 	size_t uar_table_sz;
+ 	/* Size of UAR register table. */
+@@ -799,6 +802,7 @@ int64_t mlx5_get_dbr(struct rte_eth_dev *dev,
+ 		     struct mlx5_devx_dbr_page **dbr_page);
+ int32_t mlx5_release_dbr(struct rte_eth_dev *dev, uint32_t umem_id,
+ 			 uint64_t offset);
++void mlx5_proc_priv_uninit(struct rte_eth_dev *dev);
+ int mlx5_udp_tunnel_port_add(struct rte_eth_dev *dev,
+ 			      struct rte_eth_udp_tunnel *udp_tunnel);
+ uint16_t mlx5_eth_find_next(uint16_t port_id, struct rte_pci_device *pci_dev);
+diff --git a/drivers/net/mlx5/mlx5_mp.c b/drivers/net/mlx5/mlx5_mp.c
+index 2a031e2610..e889247871 100644
+--- a/drivers/net/mlx5/mlx5_mp.c
++++ b/drivers/net/mlx5/mlx5_mp.c
+@@ -119,6 +119,8 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
@@ -40 +79 @@
- 	struct mlx5_priv *priv;
++	struct mlx5_priv *priv;
@@ -43 +82,9 @@
-@@ -132,6 +133,20 @@ struct rte_mp_msg mp_res;
+ 	assert(rte_eal_process_type() == RTE_PROC_SECONDARY);
+@@ -128,12 +130,27 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
+ 		return -rte_errno;
+ 	}
+ 	dev = &rte_eth_devices[param->port_id];
++	priv = dev->data->dev_private;
+ 	switch (param->type) {
+ 	case MLX5_MP_REQ_START_RXTX:
+ 		DRV_LOG(INFO, "port %u starting datapath", dev->data->port_id);
@@ -61 +108 @@
- 		mp_init_msg(&priv->mp_id, &mp_res, param->type);
+ 		mp_init_msg(dev, &mp_res, param->type);
@@ -64 +111,9 @@
-@@ -183,6 +198,10 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx5_mp_req_type type)
+@@ -172,6 +189,7 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx5_mp_req_type type)
+ 	struct rte_mp_reply mp_rep;
+ 	struct mlx5_mp_param *res;
+ 	struct timespec ts = {.tv_sec = MLX5_MP_REQ_TIMEOUT_SEC, .tv_nsec = 0};
++	struct mlx5_priv *priv = dev->data->dev_private;
+ 	int ret;
+ 	int i;
+ 
+@@ -184,6 +202,10 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum mlx5_mp_req_type type)
@@ -67 +122 @@
- 	mp_init_msg(&priv->mp_id, &mp_req, type);
+ 	mp_init_msg(dev, &mp_req, type);
@@ -75,37 +129,0 @@
-diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index 93629e5b05..aae2ef9af7 100644
---- a/drivers/net/mlx5/mlx5.c
-+++ b/drivers/net/mlx5/mlx5.c
-@@ -1268,7 +1268,7 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
-  * @param dev
-  *   Pointer to Ethernet device structure.
-  */
--static void
-+void
- mlx5_proc_priv_uninit(struct rte_eth_dev *dev)
- {
- 	if (!dev->process_private)
-diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
-index 4bbf628885..5196a9ea76 100644
---- a/drivers/net/mlx5/mlx5.h
-+++ b/drivers/net/mlx5/mlx5.h
-@@ -743,7 +743,10 @@ struct mlx5_dev_ctx_shared {
- 	struct mlx5_dev_shared_port port[]; /* per device port data array. */
- };
- 
--/* Per-process private structure. */
-+/*
-+ * Per-process private structure.
-+ * Caution, secondary process may rebuild the struct during port start.
-+ */
- struct mlx5_proc_priv {
- 	size_t uar_table_sz;
- 	/* Size of UAR register table. */
-@@ -998,6 +1001,7 @@ struct rte_hairpin_peer_info {
- 
- int mlx5_getenv_int(const char *);
- int mlx5_proc_priv_init(struct rte_eth_dev *dev);
-+void mlx5_proc_priv_uninit(struct rte_eth_dev *dev);
- int mlx5_udp_tunnel_port_add(struct rte_eth_dev *dev,
- 			      struct rte_eth_udp_tunnel *udp_tunnel);
- uint16_t mlx5_eth_find_next(uint16_t port_id, struct rte_pci_device *pci_dev);

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

* [dpdk-stable] patch 'doc: fix QinQ flow rules in testpmd guide' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/mlx5: fix port attach in secondary process' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/enic: fix filter type used for flow API' " Christian Ehrhardt
                     ` (13 subsequent siblings)
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Bernard Iremonger; +Cc: Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b6b428b9ea5d72974958ed607de878b9d05220ab Mon Sep 17 00:00:00 2001
From: Bernard Iremonger <bernard.iremonger@intel.com>
Date: Tue, 19 Jan 2021 13:00:52 +0000
Subject: [PATCH] doc: fix QinQ flow rules in testpmd guide

[ upstream commit 836cdce48822f31316849adc00086e17131908d7 ]

In the Testpmd Flow rules management section, correct
the TPID values in the Sample QinQ flow rules sub section.
Also replace the keyword qinq_strip with extend in the
vlan set command.

Fixes: bef3bfe7d5f4 ("doc: revise sample testpmd flow commands")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 4dd29ee929..17a41c21e5 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -4435,14 +4435,14 @@ Sample QinQ flow rules
 Before creating QinQ rule(s) the following commands should be issued to enable QinQ::
 
    testpmd> port stop 0
-   testpmd> vlan set qinq_strip on 0
+   testpmd> vlan set extend on 0
 
 The above command sets the inner and outer TPID's to 0x8100.
 
 To change the TPID's the following commands should be used::
 
-   testpmd> vlan set outer tpid 0xa100 0
-   testpmd> vlan set inner tpid 0x9100 0
+   testpmd> vlan set outer tpid 0x88A8 0
+   testpmd> vlan set inner tpid 0x8100 0
    testpmd> port start 0
 
 Validate and create a QinQ rule on port 0 to steer traffic to a VF queue in a VM.
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:29.673712753 +0100
+++ 0003-doc-fix-QinQ-flow-rules-in-testpmd-guide.patch	2021-02-08 12:04:29.527496792 +0100
@@ -1 +1 @@
-From 836cdce48822f31316849adc00086e17131908d7 Mon Sep 17 00:00:00 2001
+From b6b428b9ea5d72974958ed607de878b9d05220ab Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 836cdce48822f31316849adc00086e17131908d7 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 3ccc9fc300..a45910b81e 100644
+index 4dd29ee929..17a41c21e5 100644
@@ -24 +25 @@
-@@ -4434,14 +4434,14 @@ Sample QinQ flow rules
+@@ -4435,14 +4435,14 @@ Sample QinQ flow rules

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

* [dpdk-stable] patch 'net/enic: fix filter type used for flow API' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/mlx5: fix port attach in secondary process' " Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'doc: fix QinQ flow rules in testpmd guide' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'doc: fix product link in hns3 guide' " Christian Ehrhardt
                     ` (12 subsequent siblings)
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: John Daley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From fbfb7e55fd74f15199df359f342f09ae642d196b Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Mon, 1 Feb 2021 16:24:23 -0800
Subject: [PATCH] net/enic: fix filter type used for flow API

[ upstream commit d700f0d0d7074c76a94c0278315acb86f9ea30ba ]

The filter type (struct filter_v2.type) should always be set to
FILTER_DPDK_1, when advanced filtering is enabled in firmware.
Otherwise, for some old firmware versions, the driver sets
it to FILTER_USNIC_IP, and attempts to install filters fail. This
behavior matches that of the now-removed flow director implementation
(enic_clsf.c).

Fixes: 26faa126d87e ("net/enic: flow API for NICs with advanced filters disabled")

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

diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
index 6cd3640174..d8ba35e055 100644
--- a/drivers/net/enic/enic_flow.c
+++ b/drivers/net/enic/enic_flow.c
@@ -1595,6 +1595,8 @@ enic_flow_parse(struct rte_eth_dev *dev,
 		return -rte_errno;
 	}
 	enic_filter->type = enic->flow_filter_mode;
+	if (enic->adv_filters)
+		enic_filter->type = FILTER_DPDK_1;
 	ret = enic_copy_filter(pattern, enic_filter_cap, enic,
 				       enic_filter, error);
 	return ret;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:29.710927626 +0100
+++ 0004-net-enic-fix-filter-type-used-for-flow-API.patch	2021-02-08 12:04:29.531496793 +0100
@@ -1 +1 @@
-From d700f0d0d7074c76a94c0278315acb86f9ea30ba Mon Sep 17 00:00:00 2001
+From fbfb7e55fd74f15199df359f342f09ae642d196b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d700f0d0d7074c76a94c0278315acb86f9ea30ba ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 97ee7509ce..7eb06f889e 100644
+index 6cd3640174..d8ba35e055 100644
@@ -26 +27 @@
-@@ -1598,6 +1598,8 @@ enic_flow_parse(struct rte_eth_dev *dev,
+@@ -1595,6 +1595,8 @@ enic_flow_parse(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'doc: fix product link in hns3 guide' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
                     ` (2 preceding siblings ...)
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/enic: fix filter type used for flow API' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/sfc: fix TSO and checksum offloads for EF10' " Christian Ehrhardt
                     ` (11 subsequent siblings)
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Lijun Ou; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/680a3321bca1ef6e91df27d02cee8c6ffc9cce74

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 680a3321bca1ef6e91df27d02cee8c6ffc9cce74 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Fri, 29 Jan 2021 17:22:05 +0800
Subject: [PATCH] doc: fix product link in hns3 guide

[ upstream commit a951fbbe91d6edd30ef01320b960162c33a2b46e ]

Here fixes the Kunpeng introduction address link with hns3.rst

Fixes: 565829db8b8f ("net/hns3: add build and doc infrastructure")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 doc/guides/nics/hns3.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
index 8d19f48515..567c65d536 100644
--- a/doc/guides/nics/hns3.rst
+++ b/doc/guides/nics/hns3.rst
@@ -29,7 +29,7 @@ Features of the HNS3 PMD are:
 Prerequisites
 -------------
 - Get the information about Kunpeng920 chip using
-  `<http://www.hisilicon.com/en/Products/ProductList/Kunpeng>`_.
+  `<https://www.hisilicon.com/en/products/Kunpeng>`_.
 
 - Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup the basic DPDK environment.
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:29.746494673 +0100
+++ 0005-doc-fix-product-link-in-hns3-guide.patch	2021-02-08 12:04:29.531496793 +0100
@@ -1 +1 @@
-From a951fbbe91d6edd30ef01320b960162c33a2b46e Mon Sep 17 00:00:00 2001
+From 680a3321bca1ef6e91df27d02cee8c6ffc9cce74 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a951fbbe91d6edd30ef01320b960162c33a2b46e ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 8db8867c15..84bd7a3c92 100644
+index 8d19f48515..567c65d536 100644
@@ -20 +21 @@
-@@ -41,7 +41,7 @@ Features of the HNS3 PMD are:
+@@ -29,7 +29,7 @@ Features of the HNS3 PMD are:

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

* [dpdk-stable] patch 'net/sfc: fix TSO and checksum offloads for EF10' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
                     ` (3 preceding siblings ...)
  2021-02-08 11:14   ` [dpdk-stable] patch 'doc: fix product link in hns3 guide' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'vhost: fix vid allocation race' " Christian Ehrhardt
                     ` (10 subsequent siblings)
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/75f749e02978f165a5cdd648820dd2a076994a33

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 75f749e02978f165a5cdd648820dd2a076994a33 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Tue, 2 Feb 2021 18:23:45 +0300
Subject: [PATCH] net/sfc: fix TSO and checksum offloads for EF10

[ upstream commit be56d20ff17fdba2568a56e35abf1706cb48bb85 ]

This is workaround for 8000-series EF10 hardware TSO bug.
Innermost IP length and outer UDP datagram length must be
greater than or equal to the corresponding values derived
from the MSS; otherwise, the checksum offloads will break.

Fixes: c1ce2ba218f8 ("net/sfc: support tunnel TSO on EF10 native Tx datapath")
Fixes: 6bc985e41155 ("net/sfc: support TSO in EF10 Tx datapath")
Fixes: fec33d5bb3eb ("net/sfc: support firmware-assisted TSO")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/net/sfc/sfc_ef10_tx.c | 19 +++++++++++++++++++
 drivers/net/sfc/sfc_tso.c     |  7 +++++++
 drivers/net/sfc/sfc_tso.h     | 30 ++++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+)

diff --git a/drivers/net/sfc/sfc_ef10_tx.c b/drivers/net/sfc/sfc_ef10_tx.c
index 43e3447805..b57c9afb71 100644
--- a/drivers/net/sfc/sfc_ef10_tx.c
+++ b/drivers/net/sfc/sfc_ef10_tx.c
@@ -477,6 +477,25 @@ sfc_ef10_xmit_tso_pkt(struct sfc_ef10_txq * const txq, struct rte_mbuf *m_seg,
 			needed_desc--;
 	}
 
+	/*
+	 * 8000-series EF10 hardware requires that innermost IP length
+	 * be greater than or equal to the value which each segment is
+	 * supposed to have; otherwise, TCP checksum will be incorrect.
+	 *
+	 * The same concern applies to outer UDP datagram length field.
+	 */
+	switch (m_seg->ol_flags & PKT_TX_TUNNEL_MASK) {
+	case PKT_TX_TUNNEL_VXLAN:
+		/* FALLTHROUGH */
+	case PKT_TX_TUNNEL_GENEVE:
+		sfc_tso_outer_udp_fix_len(first_m_seg, hdr_addr);
+		break;
+	default:
+		break;
+	}
+
+	sfc_tso_innermost_ip_fix_len(first_m_seg, hdr_addr, iph_off);
+
 	/*
 	 * Tx prepare has debug-only checks that offload flags are correctly
 	 * filled in in TSO mbuf. Use zero IPID if there is no IPv4 flag.
diff --git a/drivers/net/sfc/sfc_tso.c b/drivers/net/sfc/sfc_tso.c
index 2e34fc0450..b1949004bb 100644
--- a/drivers/net/sfc/sfc_tso.c
+++ b/drivers/net/sfc/sfc_tso.c
@@ -140,6 +140,13 @@ sfc_efx_tso_do(struct sfc_efx_txq *txq, unsigned int idx,
 		tsoh = rte_pktmbuf_mtod(m, uint8_t *);
 	}
 
+	/*
+	 * 8000-series EF10 hardware requires that innermost IP length
+	 * be greater than or equal to the value which each segment is
+	 * supposed to have; otherwise, TCP checksum will be incorrect.
+	 */
+	sfc_tso_innermost_ip_fix_len(m, tsoh, nh_off);
+
 	/*
 	 * Handle IP header. Tx prepare has debug-only checks that offload flags
 	 * are correctly filled in in TSO mbuf. Use zero IPID if there is no
diff --git a/drivers/net/sfc/sfc_tso.h b/drivers/net/sfc/sfc_tso.h
index ef257519ac..3d1c3e46c3 100644
--- a/drivers/net/sfc/sfc_tso.h
+++ b/drivers/net/sfc/sfc_tso.h
@@ -38,6 +38,36 @@ sfc_tso_ip4_get_ipid(const uint8_t *pkt_hdrp, size_t ip_hdr_off)
 	return rte_be_to_cpu_16(ipid);
 }
 
+static inline void
+sfc_tso_outer_udp_fix_len(const struct rte_mbuf *m, uint8_t *tsoh)
+{
+	rte_be16_t len = rte_cpu_to_be_16(m->l2_len + m->l3_len + m->l4_len +
+					  m->tso_segsz);
+
+	rte_memcpy(tsoh + m->outer_l2_len + m->outer_l3_len +
+		   offsetof(struct rte_udp_hdr, dgram_len),
+		   &len, sizeof(len));
+}
+
+static inline void
+sfc_tso_innermost_ip_fix_len(const struct rte_mbuf *m, uint8_t *tsoh,
+			     size_t iph_ofst)
+{
+	size_t ip_payload_len = m->l4_len + m->tso_segsz;
+	size_t field_ofst;
+	rte_be16_t len;
+
+	if (m->ol_flags & PKT_TX_IPV4) {
+		field_ofst = offsetof(struct rte_ipv4_hdr, total_length);
+		len = rte_cpu_to_be_16(m->l3_len + ip_payload_len);
+	} else {
+		field_ofst = offsetof(struct rte_ipv6_hdr, payload_len);
+		len = rte_cpu_to_be_16(ip_payload_len);
+	}
+
+	rte_memcpy(tsoh + iph_ofst + field_ofst, &len, sizeof(len));
+}
+
 unsigned int sfc_tso_prepare_header(uint8_t *tsoh, size_t header_len,
 				    struct rte_mbuf **in_seg, size_t *in_off);
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:29.779766884 +0100
+++ 0006-net-sfc-fix-TSO-and-checksum-offloads-for-EF10.patch	2021-02-08 12:04:29.535496792 +0100
@@ -1 +1 @@
-From be56d20ff17fdba2568a56e35abf1706cb48bb85 Mon Sep 17 00:00:00 2001
+From 75f749e02978f165a5cdd648820dd2a076994a33 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit be56d20ff17fdba2568a56e35abf1706cb48bb85 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 87fa40f3eb..33d2d637c2 100644
+index 43e3447805..b57c9afb71 100644
@@ -29 +30 @@
-@@ -481,6 +481,25 @@ sfc_ef10_xmit_tso_pkt(struct sfc_ef10_txq * const txq, struct rte_mbuf *m_seg,
+@@ -477,6 +477,25 @@ sfc_ef10_xmit_tso_pkt(struct sfc_ef10_txq * const txq, struct rte_mbuf *m_seg,
@@ -56 +57 @@
-index d6f1119890..b090ef14db 100644
+index 2e34fc0450..b1949004bb 100644
@@ -74 +75 @@
-index 8597c2868a..361aa22192 100644
+index ef257519ac..3d1c3e46c3 100644

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

* [dpdk-stable] patch 'vhost: fix vid allocation race' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
                     ` (4 preceding siblings ...)
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/sfc: fix TSO and checksum offloads for EF10' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: remove MPLS from supported flow items' " Christian Ehrhardt
                     ` (9 subsequent siblings)
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Fei Chen; +Cc: Peng He, Zhihong Wang, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/5bac4b5bbdc7349e5d9f53e8464e554eddc80985

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5bac4b5bbdc7349e5d9f53e8464e554eddc80985 Mon Sep 17 00:00:00 2001
From: Fei Chen <chenwei.0515@bytedance.com>
Date: Mon, 1 Feb 2021 16:48:44 +0800
Subject: [PATCH] vhost: fix vid allocation race

[ upstream commit 9944bddf80d692ade5ef6f7326541b13881cbbb9 ]

vhost_new_device might be called in different threads at
the same time.

thread 1(config thread)
            rte_vhost_driver_start
               ->vhost_user_start_client
                   ->vhost_user_add_connection
                     -> vhost_new_device

thread 2(vhost-events)
	vhost_user_read_cb
           ->vhost_user_msg_handler (return value < 0)
             -> vhost_user_start_client
                 -> vhost_new_device

So there could be a case that a same vid has been allocated
twice, or some vid might be lost in DPDK lib however still
held by the upper applications.

Another place where race would happen is at the func
*vhost_destroy_device*, but after a detailed investigation,
the race does not exist as long as no two devices have the
same vid: Calling vhost_destroy_devices in different
threads with different vids is actually safe.

Fixes: a277c7159876 ("vhost: refactor code structure")

Reported-by: Peng He <hepeng.0320@bytedance.com>
Signed-off-by: Fei Chen <chenwei.0515@bytedance.com>
Reviewed-by: Zhihong Wang <wangzhihong.wzh@bytedance.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/vhost.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 3dd278f8f8..2d5bb2cfde 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -26,6 +26,7 @@
 #include "vhost_user.h"
 
 struct virtio_net *vhost_devices[MAX_VHOST_DEVICE];
+pthread_mutex_t vhost_dev_lock = PTHREAD_MUTEX_INITIALIZER;
 
 /* Called with iotlb_lock read-locked */
 uint64_t
@@ -615,6 +616,7 @@ vhost_new_device(void)
 	struct virtio_net *dev;
 	int i;
 
+	pthread_mutex_lock(&vhost_dev_lock);
 	for (i = 0; i < MAX_VHOST_DEVICE; i++) {
 		if (vhost_devices[i] == NULL)
 			break;
@@ -623,6 +625,7 @@ vhost_new_device(void)
 	if (i == MAX_VHOST_DEVICE) {
 		RTE_LOG(ERR, VHOST_CONFIG,
 			"Failed to find a free slot for new device.\n");
+		pthread_mutex_unlock(&vhost_dev_lock);
 		return -1;
 	}
 
@@ -630,10 +633,13 @@ vhost_new_device(void)
 	if (dev == NULL) {
 		RTE_LOG(ERR, VHOST_CONFIG,
 			"Failed to allocate memory for new dev.\n");
+		pthread_mutex_unlock(&vhost_dev_lock);
 		return -1;
 	}
 
 	vhost_devices[i] = dev;
+	pthread_mutex_unlock(&vhost_dev_lock);
+
 	dev->vid = i;
 	dev->flags = VIRTIO_DEV_BUILTIN_VIRTIO_NET;
 	dev->slave_req_fd = -1;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:29.815300809 +0100
+++ 0007-vhost-fix-vid-allocation-race.patch	2021-02-08 12:04:29.535496792 +0100
@@ -1 +1 @@
-From 9944bddf80d692ade5ef6f7326541b13881cbbb9 Mon Sep 17 00:00:00 2001
+From 5bac4b5bbdc7349e5d9f53e8464e554eddc80985 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9944bddf80d692ade5ef6f7326541b13881cbbb9 ]
+
@@ -32 +33,0 @@
-Cc: stable@dpdk.org
@@ -43 +44 @@
-index efb136edd1..52ab93d1ec 100644
+index 3dd278f8f8..2d5bb2cfde 100644
@@ -54 +55 @@
-@@ -645,6 +646,7 @@ vhost_new_device(void)
+@@ -615,6 +616,7 @@ vhost_new_device(void)
@@ -62 +63 @@
-@@ -653,6 +655,7 @@ vhost_new_device(void)
+@@ -623,6 +625,7 @@ vhost_new_device(void)
@@ -64 +65 @@
- 		VHOST_LOG_CONFIG(ERR,
+ 		RTE_LOG(ERR, VHOST_CONFIG,
@@ -70 +71 @@
-@@ -660,10 +663,13 @@ vhost_new_device(void)
+@@ -630,10 +633,13 @@ vhost_new_device(void)
@@ -72 +73 @@
- 		VHOST_LOG_CONFIG(ERR,
+ 		RTE_LOG(ERR, VHOST_CONFIG,

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

* [dpdk-stable] patch 'net/hns3: remove MPLS from supported flow items' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
                     ` (5 preceding siblings ...)
  2021-02-08 11:14   ` [dpdk-stable] patch 'vhost: fix vid allocation race' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: fix flow director rule residue on malloc failure' " Christian Ehrhardt
                     ` (8 subsequent siblings)
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/73d183306dc9c1666dd729e9b2a2a69b98b71d6e

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 73d183306dc9c1666dd729e9b2a2a69b98b71d6e Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 3 Feb 2021 20:23:51 +0800
Subject: [PATCH] net/hns3: remove MPLS from supported flow items

[ upstream commit e9550856f8c65b6e15f8f59810560bc6d240a1f8 ]

The Kunpeng920 and Kunpeng930 don't support parse MPLS packet, so
remove the type from supported flow items.

Fixes: fcba820d9b9e ("net/hns3: support flow director")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 3f4d9dbfe6..2147da73cd 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -46,8 +46,7 @@ static enum rte_flow_item_type first_items[] = {
 	RTE_FLOW_ITEM_TYPE_NVGRE,
 	RTE_FLOW_ITEM_TYPE_VXLAN,
 	RTE_FLOW_ITEM_TYPE_GENEVE,
-	RTE_FLOW_ITEM_TYPE_VXLAN_GPE,
-	RTE_FLOW_ITEM_TYPE_MPLS
+	RTE_FLOW_ITEM_TYPE_VXLAN_GPE
 };
 
 static enum rte_flow_item_type L2_next_items[] = {
@@ -67,8 +66,7 @@ static enum rte_flow_item_type L3_next_items[] = {
 static enum rte_flow_item_type L4_next_items[] = {
 	RTE_FLOW_ITEM_TYPE_VXLAN,
 	RTE_FLOW_ITEM_TYPE_GENEVE,
-	RTE_FLOW_ITEM_TYPE_VXLAN_GPE,
-	RTE_FLOW_ITEM_TYPE_MPLS
+	RTE_FLOW_ITEM_TYPE_VXLAN_GPE
 };
 
 static enum rte_flow_item_type tunnel_next_items[] = {
@@ -1059,8 +1057,7 @@ is_tunnel_packet(enum rte_flow_item_type type)
 	if (type == RTE_FLOW_ITEM_TYPE_VXLAN_GPE ||
 	    type == RTE_FLOW_ITEM_TYPE_VXLAN ||
 	    type == RTE_FLOW_ITEM_TYPE_NVGRE ||
-	    type == RTE_FLOW_ITEM_TYPE_GENEVE ||
-	    type == RTE_FLOW_ITEM_TYPE_MPLS)
+	    type == RTE_FLOW_ITEM_TYPE_GENEVE)
 		return true;
 	return false;
 }
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:29.850193591 +0100
+++ 0008-net-hns3-remove-MPLS-from-supported-flow-items.patch	2021-02-08 12:04:29.535496792 +0100
@@ -1 +1 @@
-From e9550856f8c65b6e15f8f59810560bc6d240a1f8 Mon Sep 17 00:00:00 2001
+From 73d183306dc9c1666dd729e9b2a2a69b98b71d6e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e9550856f8c65b6e15f8f59810560bc6d240a1f8 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a6011245c5..c484114b32 100644
+index 3f4d9dbfe6..2147da73cd 100644
@@ -22 +23 @@
-@@ -44,8 +44,7 @@ static enum rte_flow_item_type first_items[] = {
+@@ -46,8 +46,7 @@ static enum rte_flow_item_type first_items[] = {
@@ -32 +33 @@
-@@ -65,8 +64,7 @@ static enum rte_flow_item_type L3_next_items[] = {
+@@ -67,8 +66,7 @@ static enum rte_flow_item_type L3_next_items[] = {
@@ -42 +43 @@
-@@ -1118,8 +1116,7 @@ is_tunnel_packet(enum rte_flow_item_type type)
+@@ -1059,8 +1057,7 @@ is_tunnel_packet(enum rte_flow_item_type type)

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

* [dpdk-stable] patch 'net/hns3: fix flow director rule residue on malloc failure' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
                     ` (6 preceding siblings ...)
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: remove MPLS from supported flow items' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: fix firmware exceptions by concurrent commands' " Christian Ehrhardt
                     ` (7 subsequent siblings)
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From cad35dadfc62028948182a893c6c76cd6baa4fb4 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 3 Feb 2021 20:23:54 +0800
Subject: [PATCH] net/hns3: fix flow director rule residue on malloc failure

[ upstream commit 2b9a66e1b606d3813d72dd81c626949e09706e27 ]

After FD rule config success, driver will malloc fdir_rule to hold the
rule info, if malloc fail the FD rule in hardware was not cleanup.

Fixes: fcba820d9b9e ("net/hns3: support flow director")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 2147da73cd..b1d3d81aee 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1742,17 +1742,18 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 
 		flow->counter_id = fdir_rule.act_cnt.id;
 	}
+
+	fdir_rule_ptr = rte_zmalloc("hns3 fdir rule",
+				    sizeof(struct hns3_fdir_rule_ele),
+				    0);
+	if (fdir_rule_ptr == NULL) {
+		hns3_err(hw, "failed to allocate fdir_rule memory.");
+		ret = -ENOMEM;
+		goto err_fdir;
+	}
+
 	ret = hns3_fdir_filter_program(hns, &fdir_rule, false);
 	if (!ret) {
-		fdir_rule_ptr = rte_zmalloc("hns3 fdir rule",
-					    sizeof(struct hns3_fdir_rule_ele),
-					    0);
-		if (fdir_rule_ptr == NULL) {
-			hns3_err(hw, "Failed to allocate fdir_rule memory");
-			ret = -ENOMEM;
-			goto err_fdir;
-		}
-
 		memcpy(&fdir_rule_ptr->fdir_conf, &fdir_rule,
 			sizeof(struct hns3_fdir_rule));
 		TAILQ_INSERT_TAIL(&process_list->fdir_list,
@@ -1763,10 +1764,10 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 		return flow;
 	}
 
+	rte_free(fdir_rule_ptr);
 err_fdir:
 	if (fdir_rule.flags & HNS3_RULE_FLAG_COUNTER)
 		hns3_counter_release(dev, fdir_rule.act_cnt.id);
-
 err:
 	rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 			   "Failed to create flow");
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:29.885154692 +0100
+++ 0009-net-hns3-fix-flow-director-rule-residue-on-malloc-fa.patch	2021-02-08 12:04:29.539496793 +0100
@@ -1 +1 @@
-From 2b9a66e1b606d3813d72dd81c626949e09706e27 Mon Sep 17 00:00:00 2001
+From cad35dadfc62028948182a893c6c76cd6baa4fb4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2b9a66e1b606d3813d72dd81c626949e09706e27 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index c484114b32..a016857aa5 100644
+index 2147da73cd..b1d3d81aee 100644
@@ -22 +23 @@
-@@ -1806,17 +1806,18 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -1742,17 +1742,18 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -50 +51 @@
-@@ -1827,10 +1828,10 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -1763,10 +1764,10 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,

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

* [dpdk-stable] patch 'net/hns3: fix firmware exceptions by concurrent commands' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
                     ` (7 preceding siblings ...)
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: fix flow director rule residue on malloc failure' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: fix VF reset on mailbox failure' " Christian Ehrhardt
                     ` (6 subsequent siblings)
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/209e4839a3a8164c9f7b0ab346fdbdd1744920f2

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 209e4839a3a8164c9f7b0ab346fdbdd1744920f2 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Wed, 3 Feb 2021 20:23:55 +0800
Subject: [PATCH] net/hns3: fix firmware exceptions by concurrent commands

[ upstream commit 5ef63df1286861530d23da828415411a4c0a48a5 ]

There are two scenarios that command queue uninit performed
concurrently with the firmware command: asynchronous command
and timeout command.

For asynchronous command, if a large number of functions send
commands, these commands may need to be queued to wait for
firmware processing. If a function is uninited suddenly, CMDQ
clearing and firmware processing may be performed concurrently.

For timeout command, if the command failed due to busy scheduling
of firmware, this command will be processed in the next scheduling.
And this may lead to concurrency.

The preceding concurrency may lead to a firmware exceptions.

This patch add a waiting time to ensure the firmware complete the
processing of left over command when PMD uninit.

Fixes: 737f30e1c3ab ("net/hns3: support command interface with firmware")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_cmd.c | 14 +++++++++++++-
 drivers/net/hns3/hns3_cmd.h |  1 +
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index c7993634e3..dc2473a0f7 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -553,9 +553,21 @@ hns3_cmd_destroy_queue(struct hns3_hw *hw)
 void
 hns3_cmd_uninit(struct hns3_hw *hw)
 {
+	rte_atomic16_set(&hw->reset.disable_cmd, 1);
+
+	/*
+	 * A delay is added to ensure that the register cleanup operations
+	 * will not be performed concurrently with the firmware command and
+	 * ensure that all the reserved commands are executed.
+	 * Concurrency may occur in two scenarios: asynchronous command and
+	 * timeout command. If the command fails to be executed due to busy
+	 * scheduling, the command will be processed in the next scheduling
+	 * of the firmware.
+	 */
+	rte_delay_ms(HNS3_CMDQ_CLEAR_WAIT_TIME);
+
 	rte_spinlock_lock(&hw->cmq.csq.lock);
 	rte_spinlock_lock(&hw->cmq.crq.lock);
-	rte_atomic16_set(&hw->reset.disable_cmd, 1);
 	hns3_cmd_clear_regs(hw);
 	rte_spinlock_unlock(&hw->cmq.crq.lock);
 	rte_spinlock_unlock(&hw->cmq.csq.lock);
diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index e7a220364d..5a7b7a44e0 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -6,6 +6,7 @@
 #define _HNS3_CMD_H_
 
 #define HNS3_CMDQ_TX_TIMEOUT		30000
+#define HNS3_CMDQ_CLEAR_WAIT_TIME	200
 #define HNS3_CMDQ_RX_INVLD_B		0
 #define HNS3_CMDQ_RX_OUTVLD_B		1
 #define HNS3_CMD_DESC_ALIGNMENT		4096
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:29.920749136 +0100
+++ 0010-net-hns3-fix-firmware-exceptions-by-concurrent-comma.patch	2021-02-08 12:04:29.539496793 +0100
@@ -1 +1 @@
-From 5ef63df1286861530d23da828415411a4c0a48a5 Mon Sep 17 00:00:00 2001
+From 209e4839a3a8164c9f7b0ab346fdbdd1744920f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5ef63df1286861530d23da828415411a4c0a48a5 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index 3d6ffc090f..32cd56b478 100644
+index c7993634e3..dc2473a0f7 100644
@@ -38 +39 @@
-@@ -582,9 +582,21 @@ hns3_cmd_destroy_queue(struct hns3_hw *hw)
+@@ -553,9 +553,21 @@ hns3_cmd_destroy_queue(struct hns3_hw *hw)
@@ -42 +43 @@
-+	__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
++	rte_atomic16_set(&hw->reset.disable_cmd, 1);
@@ -57 +58 @@
--	__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
+-	rte_atomic16_set(&hw->reset.disable_cmd, 1);
@@ -62 +63 @@
-index 5640fe4ead..5010278e22 100644
+index e7a220364d..5a7b7a44e0 100644
@@ -65,2 +66,2 @@
-@@ -8,6 +8,7 @@
- #include <stdint.h>
+@@ -6,6 +6,7 @@
+ #define _HNS3_CMD_H_

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

* [dpdk-stable] patch 'net/hns3: fix VF reset on mailbox failure' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
                     ` (8 preceding siblings ...)
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: fix firmware exceptions by concurrent commands' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: validate requested maximum Rx frame length' " Christian Ehrhardt
                     ` (5 subsequent siblings)
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/47f2ed5d5fb019e86e6955a638a7c19331d7d46e

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 47f2ed5d5fb019e86e6955a638a7c19331d7d46e Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Wed, 3 Feb 2021 20:23:56 +0800
Subject: [PATCH] net/hns3: fix VF reset on mailbox failure

[ upstream commit ff81c6b7d053d19fa5d766de449e9a1a462661f5 ]

Currently, during the VF reset, the VF will send a MBX to inform
PF to reset it and the disable command bit will be set whether
the MBX is successful. Generally, multiple reset attempts are made
after a failure. However, because the command is disabled, all
subsequent reset will all fail.

This patch disable the command only after the MBX message is
successfully.

Fixes: 2790c6464725 ("net/hns3: support device reset")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index f7bd2b4672..09a8d31ff4 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1970,15 +1970,17 @@ static int
 hns3vf_prepare_reset(struct hns3_adapter *hns)
 {
 	struct hns3_hw *hw = &hns->hw;
-	int ret = 0;
+	int ret;
 
 	if (hw->reset.level == HNS3_VF_FUNC_RESET) {
 		ret = hns3_send_mbx_msg(hw, HNS3_MBX_RESET, 0, NULL,
 					0, true, NULL, 0);
+		if (ret)
+			return ret;
 	}
 	rte_atomic16_set(&hw->reset.disable_cmd, 1);
 
-	return ret;
+	return 0;
 }
 
 static int
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:29.958796357 +0100
+++ 0011-net-hns3-fix-VF-reset-on-mailbox-failure.patch	2021-02-08 12:04:29.543496793 +0100
@@ -1 +1 @@
-From ff81c6b7d053d19fa5d766de449e9a1a462661f5 Mon Sep 17 00:00:00 2001
+From 47f2ed5d5fb019e86e6955a638a7c19331d7d46e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff81c6b7d053d19fa5d766de449e9a1a462661f5 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 4f9da4a56c..a607bd3a91 100644
+index f7bd2b4672..09a8d31ff4 100644
@@ -28 +29 @@
-@@ -2404,15 +2404,17 @@ static int
+@@ -1970,15 +1970,17 @@ static int
@@ -41 +42 @@
- 	__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
+ 	rte_atomic16_set(&hw->reset.disable_cmd, 1);

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

* [dpdk-stable] patch 'net/hns3: validate requested maximum Rx frame length' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
                     ` (9 preceding siblings ...)
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: fix VF reset on mailbox failure' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/pcap: fix byte stats for drop Tx' " Christian Ehrhardt
                     ` (4 subsequent siblings)
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Huisong Li; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From d00bf9bf70cfcc925ecf115ff316d1ebc591b22b Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 3 Feb 2021 20:23:57 +0800
Subject: [PATCH] net/hns3: validate requested maximum Rx frame length

[ upstream commit b8a67b10ee616e4635d3f6f8c8c25d0fdb987b6c ]

When jumbo frame is enabled, the MTU size needs to be modified
based on 'max_rx_pkt_len'. Driver needs to check the validity
of 'max_rx_pkt_len'. And it should be in the range of
HNS3_DEFAULT_FRAME_LEN and HNS3_MAX_FRAME_LEN. Otherwise, it may
cause that the MTU size is inconsistent with jumbo frame offload.

Fixes: 19a3ca4c99cf ("net/hns3: add start/stop and configure operations")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 19 +++++++++++++------
 drivers/net/hns3/hns3_ethdev_vf.c | 19 +++++++++++++------
 2 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 33b3ccc865..66be58dc26 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2290,6 +2290,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 	uint16_t nb_rx_q = dev->data->nb_rx_queues;
 	uint16_t nb_tx_q = dev->data->nb_tx_queues;
 	struct rte_eth_rss_conf rss_conf;
+	uint32_t max_rx_pkt_len;
 	uint16_t mtu;
 	int ret;
 
@@ -2342,12 +2343,18 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 	 * according to the maximum RX packet length.
 	 */
 	if (conf->rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
-		/*
-		 * Security of max_rx_pkt_len is guaranteed in dpdk frame.
-		 * Maximum value of max_rx_pkt_len is HNS3_MAX_FRAME_LEN, so it
-		 * can safely assign to "uint16_t" type variable.
-		 */
-		mtu = (uint16_t)HNS3_PKTLEN_TO_MTU(conf->rxmode.max_rx_pkt_len);
+		max_rx_pkt_len = conf->rxmode.max_rx_pkt_len;
+		if (max_rx_pkt_len > HNS3_MAX_FRAME_LEN ||
+		    max_rx_pkt_len <= HNS3_DEFAULT_FRAME_LEN) {
+			hns3_err(hw, "maximum Rx packet length must be greater "
+				 "than %u and less than %u when jumbo frame enabled.",
+				 (uint16_t)HNS3_DEFAULT_FRAME_LEN,
+				 (uint16_t)HNS3_MAX_FRAME_LEN);
+			ret = -EINVAL;
+			goto cfg_err;
+		}
+
+		mtu = (uint16_t)HNS3_PKTLEN_TO_MTU(max_rx_pkt_len);
 		ret = hns3_dev_mtu_set(dev, mtu);
 		if (ret)
 			goto cfg_err;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 09a8d31ff4..c936114075 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -690,6 +690,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
 	uint16_t nb_rx_q = dev->data->nb_rx_queues;
 	uint16_t nb_tx_q = dev->data->nb_tx_queues;
 	struct rte_eth_rss_conf rss_conf;
+	uint32_t max_rx_pkt_len;
 	uint16_t mtu;
 	int ret;
 
@@ -736,12 +737,18 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
 	 * according to the maximum RX packet length.
 	 */
 	if (conf->rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
-		/*
-		 * Security of max_rx_pkt_len is guaranteed in dpdk frame.
-		 * Maximum value of max_rx_pkt_len is HNS3_MAX_FRAME_LEN, so it
-		 * can safely assign to "uint16_t" type variable.
-		 */
-		mtu = (uint16_t)HNS3_PKTLEN_TO_MTU(conf->rxmode.max_rx_pkt_len);
+		max_rx_pkt_len = conf->rxmode.max_rx_pkt_len;
+		if (max_rx_pkt_len > HNS3_MAX_FRAME_LEN ||
+		    max_rx_pkt_len <= HNS3_DEFAULT_FRAME_LEN) {
+			hns3_err(hw, "maximum Rx packet length must be greater "
+				 "than %u and less than %u when jumbo frame enabled.",
+				 (uint16_t)HNS3_DEFAULT_FRAME_LEN,
+				 (uint16_t)HNS3_MAX_FRAME_LEN);
+			ret = -EINVAL;
+			goto cfg_err;
+		}
+
+		mtu = (uint16_t)HNS3_PKTLEN_TO_MTU(max_rx_pkt_len);
 		ret = hns3vf_dev_mtu_set(dev, mtu);
 		if (ret)
 			goto cfg_err;
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:29.993383198 +0100
+++ 0012-net-hns3-validate-requested-maximum-Rx-frame-length.patch	2021-02-08 12:04:29.551496794 +0100
@@ -1 +1 @@
-From b8a67b10ee616e4635d3f6f8c8c25d0fdb987b6c Mon Sep 17 00:00:00 2001
+From d00bf9bf70cfcc925ecf115ff316d1ebc591b22b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b8a67b10ee616e4635d3f6f8c8c25d0fdb987b6c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index a7ae8f81d8..dbd48deb3a 100644
+index 33b3ccc865..66be58dc26 100644
@@ -26 +27 @@
-@@ -2343,6 +2343,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2290,6 +2290,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
@@ -32 +32,0 @@
- 	bool gro_en;
@@ -34 +34,2 @@
-@@ -2396,12 +2397,18 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+ 
+@@ -2342,12 +2343,18 @@ hns3_dev_configure(struct rte_eth_dev *dev)
@@ -60 +61 @@
-index a607bd3a91..3f9f328170 100644
+index 09a8d31ff4..c936114075 100644
@@ -63 +64 @@
-@@ -778,6 +778,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
+@@ -690,6 +690,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
@@ -69 +69,0 @@
- 	bool gro_en;
@@ -71 +71,2 @@
-@@ -825,12 +826,18 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
+ 
+@@ -736,12 +737,18 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/pcap: fix byte stats for drop Tx' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
                     ` (10 preceding siblings ...)
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: validate requested maximum Rx frame length' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/pcap: fix infinite Rx with large files' " Christian Ehrhardt
                     ` (3 subsequent siblings)
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Cian Ferriter, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From de27f6be212feb50f8a8d7e4f8bcd3d068c795c4 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Wed, 3 Feb 2021 17:30:25 +0000
Subject: [PATCH] net/pcap: fix byte stats for drop Tx

[ upstream commit cec222d6e55d9bd15eff7fbbf45464c0c6a941c0 ]

Drop Tx path in pcap is Tx that just drops the packets, which is used
for the case only Rx from a pcap file is requested/matters.

The byte stats was calculated using first mbuf segment, which gives
wrong values for multi segmented mbufs, updated to use packet length
instead.

Bugzilla ID: 597
Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")

Reported-by: Cian Ferriter <cian.ferriter@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Cian Ferriter <cian.ferriter@intel.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index f0c900ba88..6fbf61f819 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -377,7 +377,7 @@ eth_tx_drop(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		return 0;
 
 	for (i = 0; i < nb_pkts; i++) {
-		tx_bytes += bufs[i]->data_len;
+		tx_bytes += bufs[i]->pkt_len;
 		rte_pktmbuf_free(bufs[i]);
 	}
 
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:30.029288623 +0100
+++ 0013-net-pcap-fix-byte-stats-for-drop-Tx.patch	2021-02-08 12:04:29.551496794 +0100
@@ -1 +1 @@
-From cec222d6e55d9bd15eff7fbbf45464c0c6a941c0 Mon Sep 17 00:00:00 2001
+From de27f6be212feb50f8a8d7e4f8bcd3d068c795c4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cec222d6e55d9bd15eff7fbbf45464c0c6a941c0 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index ff02ade70d..c7751b7ba7 100644
+index f0c900ba88..6fbf61f819 100644
@@ -28 +29 @@
-@@ -386,7 +386,7 @@ eth_tx_drop(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -377,7 +377,7 @@ eth_tx_drop(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)

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

* [dpdk-stable] patch 'net/pcap: fix infinite Rx with large files' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
                     ` (11 preceding siblings ...)
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/pcap: fix byte stats for drop Tx' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/enic: fix filter log message' " Christian Ehrhardt
                     ` (2 subsequent siblings)
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Cian Ferriter, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/484d7fbe37f01174993cb3e73ff25d6fb492fc59

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 484d7fbe37f01174993cb3e73ff25d6fb492fc59 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 4 Feb 2021 16:51:03 +0000
Subject: [PATCH] net/pcap: fix infinite Rx with large files

[ upstream commit f62490e64d60cb564240721d55f8b51d2bd719a9 ]

Packet forwarding is not working when infinite Rx feature is used with
large .pcap files that has high number of packets.

The problem is number of allocated mbufs are less than the infinite Rx
ring size, and all mbufs consumed to fill the ring, so there is no mbuf
left for forwarding.

Current logic can not detect that infinite Rx ring is not filled
completely and no more mbufs left, and setup continues which leads
silent fail on packet forwarding.

There isn't much can be done when there is not enough mbuf for the given
.pcap file, so additional checks added to detect the case and fail
explicitly with an error log.

Bugzilla ID: 595
Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")

Reported-by: Cian Ferriter <cian.ferriter@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Cian Ferriter <cian.ferriter@intel.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 40 ++++++++++++++++++++-------------
 1 file changed, 25 insertions(+), 15 deletions(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 6fbf61f819..f4afe67116 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -723,6 +723,17 @@ eth_stats_reset(struct rte_eth_dev *dev)
 	return 0;
 }
 
+static inline void
+infinite_rx_ring_free(struct rte_ring *pkts)
+{
+	struct rte_mbuf *bufs;
+
+	while (!rte_ring_dequeue(pkts, (void **)&bufs))
+		rte_pktmbuf_free(bufs);
+
+	rte_ring_free(pkts);
+}
+
 static void
 eth_dev_close(struct rte_eth_dev *dev)
 {
@@ -733,7 +744,6 @@ eth_dev_close(struct rte_eth_dev *dev)
 	if (internals->infinite_rx) {
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
 			struct pcap_rx_queue *pcap_q = &internals->rx_queue[i];
-			struct rte_mbuf *pcap_buf;
 
 			/*
 			 * 'pcap_q->pkts' can be NULL if 'eth_dev_close()'
@@ -742,11 +752,7 @@ eth_dev_close(struct rte_eth_dev *dev)
 			if (pcap_q->pkts == NULL)
 				continue;
 
-			while (!rte_ring_dequeue(pcap_q->pkts,
-					(void **)&pcap_buf))
-				rte_pktmbuf_free(pcap_buf);
-
-			rte_ring_free(pcap_q->pkts);
+			infinite_rx_ring_free(pcap_q->pkts);
 		}
 	}
 
@@ -810,21 +816,25 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
 		while (eth_pcap_rx(pcap_q, bufs, 1)) {
 			/* Check for multiseg mbufs. */
 			if (bufs[0]->nb_segs != 1) {
-				rte_pktmbuf_free(*bufs);
-
-				while (!rte_ring_dequeue(pcap_q->pkts,
-						(void **)bufs))
-					rte_pktmbuf_free(*bufs);
-
-				rte_ring_free(pcap_q->pkts);
-				PMD_LOG(ERR, "Multiseg mbufs are not supported in infinite_rx "
-						"mode.");
+				infinite_rx_ring_free(pcap_q->pkts);
+				PMD_LOG(ERR,
+					"Multiseg mbufs are not supported in infinite_rx mode.");
 				return -EINVAL;
 			}
 
 			rte_ring_enqueue_bulk(pcap_q->pkts,
 					(void * const *)bufs, 1, NULL);
 		}
+
+		if (rte_ring_count(pcap_q->pkts) < pcap_pkt_count) {
+			infinite_rx_ring_free(pcap_q->pkts);
+			PMD_LOG(ERR,
+				"Not enough mbufs to accommodate packets in pcap file. "
+				"At least %" PRIu64 " mbufs per queue is required.",
+				pcap_pkt_count);
+			return -EINVAL;
+		}
+
 		/*
 		 * Reset the stats for this queue since eth_pcap_rx calls above
 		 * didn't result in the application receiving packets.
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:30.069798711 +0100
+++ 0014-net-pcap-fix-infinite-Rx-with-large-files.patch	2021-02-08 12:04:29.551496794 +0100
@@ -1 +1 @@
-From f62490e64d60cb564240721d55f8b51d2bd719a9 Mon Sep 17 00:00:00 2001
+From 484d7fbe37f01174993cb3e73ff25d6fb492fc59 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f62490e64d60cb564240721d55f8b51d2bd719a9 ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index c7751b7ba7..90f5d75ea8 100644
+index 6fbf61f819..f4afe67116 100644
@@ -36 +37 @@
-@@ -735,6 +735,17 @@ eth_stats_reset(struct rte_eth_dev *dev)
+@@ -723,6 +723,17 @@ eth_stats_reset(struct rte_eth_dev *dev)
@@ -51 +52 @@
- static int
+ static void
@@ -54 +55 @@
-@@ -753,7 +764,6 @@ eth_dev_close(struct rte_eth_dev *dev)
+@@ -733,7 +744,6 @@ eth_dev_close(struct rte_eth_dev *dev)
@@ -62 +63 @@
-@@ -762,11 +772,7 @@ eth_dev_close(struct rte_eth_dev *dev)
+@@ -742,11 +752,7 @@ eth_dev_close(struct rte_eth_dev *dev)
@@ -75 +76 @@
-@@ -835,21 +841,25 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -810,21 +816,25 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/enic: fix filter log message' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
                     ` (12 preceding siblings ...)
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/pcap: fix infinite Rx with large files' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'eventdev: fix a return value comment' " Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'mempool: fix panic on dump or audit' " Christian Ehrhardt
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: Hanoch Haim, John Daley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From d0ddc85f5db5e57a2102e68051819a6bf03d2bf2 Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Thu, 4 Feb 2021 17:35:03 -0800
Subject: [PATCH] net/enic: fix filter log message

[ upstream commit 89ce72c6ffb4337273bb292dc419511f1d619879 ]

A debug message for filter API is using a wrong flag. Use the correct
one.

Fixes: 936a9b9975e7 ("net/enic: flow API debug")

Reported-by: Hanoch Haim <hhaim@cisco.com>
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
index d8ba35e055..a845dd4b41 100644
--- a/drivers/net/enic/enic_flow.c
+++ b/drivers/net/enic/enic_flow.c
@@ -1389,7 +1389,7 @@ enic_dump_filter(const struct filter_v2 *filt)
 
 		if (gp->mask_flags & FILTER_GENERIC_1_IPV6)
 			sprintf(ip6, "%s ",
-				(gp->val_flags & FILTER_GENERIC_1_IPV4)
+				(gp->val_flags & FILTER_GENERIC_1_IPV6)
 				 ? "ip6(y)" : "ip6(n)");
 		else
 			sprintf(ip6, "%s ", "ip6(x)");
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:30.104098910 +0100
+++ 0015-net-enic-fix-filter-log-message.patch	2021-02-08 12:04:29.555496794 +0100
@@ -1 +1 @@
-From 89ce72c6ffb4337273bb292dc419511f1d619879 Mon Sep 17 00:00:00 2001
+From d0ddc85f5db5e57a2102e68051819a6bf03d2bf2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 89ce72c6ffb4337273bb292dc419511f1d619879 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 7eb06f889e..cdfdc904a6 100644
+index d8ba35e055..a845dd4b41 100644
@@ -23 +24 @@
-@@ -1392,7 +1392,7 @@ enic_dump_filter(const struct filter_v2 *filt)
+@@ -1389,7 +1389,7 @@ enic_dump_filter(const struct filter_v2 *filt)

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

* [dpdk-stable] patch 'eventdev: fix a return value comment' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
                     ` (13 preceding siblings ...)
  2021-02-08 11:14   ` [dpdk-stable] patch 'net/enic: fix filter log message' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  2021-02-08 11:14   ` [dpdk-stable] patch 'mempool: fix panic on dump or audit' " Christian Ehrhardt
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: Fredrik A Lindgren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/11e3377fef5dd96833aaa85a9a9cd6f2b766652b

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 11e3377fef5dd96833aaa85a9a9cd6f2b766652b Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Mon, 1 Feb 2021 13:19:46 +0000
Subject: [PATCH] eventdev: fix a return value comment

[ upstream commit b07b80fe1cbd7bdaffa75d4d34417aca536c1aba ]

The PMD info get API has a void return type. Remove the
@return 0 Success doxygen comment as it doesn't make sense here.

Fixes: 5223a1f3b8de ("eventdev: define southbound driver interface")

Reported-by: Fredrik A Lindgren <fredrik.a.lindgren@tietoevry.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eventdev/rte_eventdev_pmd.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index d118b9e5ba..c5d41ddad8 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -155,9 +155,6 @@ rte_event_pmd_is_valid_dev(uint8_t dev_id)
  *   Event device pointer
  * @param dev_info
  *   Event device information structure
- *
- * @return
- *   Returns 0 on success
  */
 typedef void (*eventdev_info_get_t)(struct rte_eventdev *dev,
 		struct rte_event_dev_info *dev_info);
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:30.145835776 +0100
+++ 0016-eventdev-fix-a-return-value-comment.patch	2021-02-08 12:04:29.555496794 +0100
@@ -1 +1 @@
-From b07b80fe1cbd7bdaffa75d4d34417aca536c1aba Mon Sep 17 00:00:00 2001
+From 11e3377fef5dd96833aaa85a9a9cd6f2b766652b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b07b80fe1cbd7bdaffa75d4d34417aca536c1aba ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- lib/librte_eventdev/eventdev_pmd.h | 3 ---
+ lib/librte_eventdev/rte_eventdev_pmd.h | 3 ---
@@ -18,5 +19,5 @@
-diff --git a/lib/librte_eventdev/eventdev_pmd.h b/lib/librte_eventdev/eventdev_pmd.h
-index 9e83993efa..7eb9a77393 100644
---- a/lib/librte_eventdev/eventdev_pmd.h
-+++ b/lib/librte_eventdev/eventdev_pmd.h
-@@ -158,9 +158,6 @@ rte_event_pmd_is_valid_dev(uint8_t dev_id)
+diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
+index d118b9e5ba..c5d41ddad8 100644
+--- a/lib/librte_eventdev/rte_eventdev_pmd.h
++++ b/lib/librte_eventdev/rte_eventdev_pmd.h
+@@ -155,9 +155,6 @@ rte_event_pmd_is_valid_dev(uint8_t dev_id)

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

* [dpdk-stable] patch 'mempool: fix panic on dump or audit' has been queued to stable release 19.11.7
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
                     ` (14 preceding siblings ...)
  2021-02-08 11:14   ` [dpdk-stable] patch 'eventdev: fix a return value comment' " Christian Ehrhardt
@ 2021-02-08 11:14   ` Christian Ehrhardt
  15 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-08 11:14 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/10/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From fd0254ee353479e9bc7e17fd2ffa1e2e59eba572 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 3 Feb 2021 10:01:01 +0100
Subject: [PATCH] mempool: fix panic on dump or audit

[ upstream commit daeb7c7f412a4d24d2d9a7d9f1344ef2338b12f4 ]

When doing a mempool dump or an audit, the application can panic because
the length of the cache is greater than the flush threshold, which is
seen as a fatal error. But this can temporarily happen when the mempool
is in use.

Fix the panic condition to abort only when the cache length is greater
than the array.

Fixes: ea5dd2744b90 ("mempool: cache optimisations")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/librte_mempool/rte_mempool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index e39135d474..89b6d39ac0 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -1160,7 +1160,7 @@ mempool_audit_cache(const struct rte_mempool *mp)
 	for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
 		const struct rte_mempool_cache *cache;
 		cache = &mp->local_cache[lcore_id];
-		if (cache->len > cache->flushthresh) {
+		if (cache->len > RTE_DIM(cache->objs)) {
 			RTE_LOG(CRIT, MEMPOOL, "badness on cache[%u]\n",
 				lcore_id);
 			rte_panic("MEMPOOL: invalid cache len\n");
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-08 12:04:30.183432327 +0100
+++ 0017-mempool-fix-panic-on-dump-or-audit.patch	2021-02-08 12:04:29.555496794 +0100
@@ -1 +1 @@
-From daeb7c7f412a4d24d2d9a7d9f1344ef2338b12f4 Mon Sep 17 00:00:00 2001
+From fd0254ee353479e9bc7e17fd2ffa1e2e59eba572 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit daeb7c7f412a4d24d2d9a7d9f1344ef2338b12f4 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index b9f3fbd614..afb1239c8d 100644
+index e39135d474..89b6d39ac0 100644
@@ -27 +28 @@
-@@ -1167,7 +1167,7 @@ mempool_audit_cache(const struct rte_mempool *mp)
+@@ -1160,7 +1160,7 @@ mempool_audit_cache(const struct rte_mempool *mp)

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

* [dpdk-stable] patch 'net/ixgbe: fix UDP zero checksum on x86' has been queued to stable release 19.11.7
  2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
                   ` (138 preceding siblings ...)
  2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
@ 2021-02-15 13:28 ` Christian Ehrhardt
  2021-02-15 13:28   ` [dpdk-stable] patch 'vhost: fix packed ring dequeue offloading' " Christian Ehrhardt
                     ` (3 more replies)
  139 siblings, 4 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-15 13:28 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: Paolo Valerio, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/17/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/19e34170ca42803f9179053b55c843041bad4768

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 19e34170ca42803f9179053b55c843041bad4768 Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Thu, 4 Feb 2021 22:39:48 +0800
Subject: [PATCH] net/ixgbe: fix UDP zero checksum on x86

[ upstream commit 9a40edb599d76f7f9d116bb2f91b23c082b5f154 ]

There is an 82599 errata that UDP frames with a zero checksum are
incorrectly marked as checksum invalid by the hardware.  This was
leading to misleading PKT_RX_L4_CKSUM_BAD flag.

This patch changes the bad UDP checksum to PKT_RX_L4_CKSUM_UNKNOWN,
so the software application will then have to recompute the checksum
itself if needed.

Bugzilla ID: 629
Fixes: af75078fece3 ("first public release")

Reported-by: Paolo Valerio <pvalerio@redhat.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Paolo Valerio <pvalerio@redhat.com>
---
 doc/guides/nics/ixgbe.rst              | 10 ++++++++
 drivers/net/ixgbe/ixgbe_rxtx.c         | 30 ++++++++++++++++++++----
 drivers/net/ixgbe/ixgbe_rxtx.h         |  2 ++
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 32 +++++++++++++++++++++++---
 4 files changed, 67 insertions(+), 7 deletions(-)

diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
index 5c3a7e4f26..6ca2a33f09 100644
--- a/doc/guides/nics/ixgbe.rst
+++ b/doc/guides/nics/ixgbe.rst
@@ -253,6 +253,16 @@ Before binding ``vfio`` with legacy mode in X550 NICs, use ``modprobe vfio ``
 ``nointxmask=1`` to load ``vfio`` module if the intx is not shared with other
 devices.
 
+UDP with zero checksum is reported as error
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Intel 82599 10 Gigabit Ethernet Controller Specification Update (Revision 2.87)
+Errata: 44 Integrity Error Reported for IPv4/UDP Packets With Zero Checksum
+
+To support UDP zero checksum, the zero and bad UDP checksum packet is marked as
+PKT_RX_L4_CKSUM_UNKNOWN, so the application needs to recompute the checksum to
+validate it.
+
 Inline crypto processing support
 --------------------------------
 
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 7777dc17f1..8b9b009396 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1440,7 +1440,8 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status, uint64_t vlan_flags)
 }
 
 static inline uint64_t
-rx_desc_error_to_pkt_flags(uint32_t rx_status)
+rx_desc_error_to_pkt_flags(uint32_t rx_status, uint16_t pkt_info,
+			   uint8_t rx_udp_csum_zero_err)
 {
 	uint64_t pkt_flags;
 
@@ -1457,6 +1458,15 @@ rx_desc_error_to_pkt_flags(uint32_t rx_status)
 	pkt_flags = error_to_pkt_flags_map[(rx_status >>
 		IXGBE_RXDADV_ERR_CKSUM_BIT) & IXGBE_RXDADV_ERR_CKSUM_MSK];
 
+	/* Mask out the bad UDP checksum error if the hardware has UDP zero
+	 * checksum error issue, so that the software application will then
+	 * have to recompute the checksum itself if needed.
+	 */
+	if ((rx_status & IXGBE_RXDADV_ERR_TCPE) &&
+	    (pkt_info & IXGBE_RXDADV_PKTTYPE_UDP) &&
+	    rx_udp_csum_zero_err)
+		pkt_flags &= ~PKT_RX_L4_CKSUM_BAD;
+
 	if ((rx_status & IXGBE_RXD_STAT_OUTERIPCS) &&
 	    (rx_status & IXGBE_RXDADV_ERR_OUTERIPER)) {
 		pkt_flags |= PKT_RX_EIP_CKSUM_BAD;
@@ -1543,7 +1553,9 @@ ixgbe_rx_scan_hw_ring(struct ixgbe_rx_queue *rxq)
 			/* convert descriptor fields to rte mbuf flags */
 			pkt_flags = rx_desc_status_to_pkt_flags(s[j],
 				vlan_flags);
-			pkt_flags |= rx_desc_error_to_pkt_flags(s[j]);
+			pkt_flags |= rx_desc_error_to_pkt_flags(s[j],
+					(uint16_t)pkt_info[j],
+					rxq->rx_udp_csum_zero_err);
 			pkt_flags |= ixgbe_rxd_pkt_info_to_pkt_flags
 					((uint16_t)pkt_info[j]);
 			mb->ol_flags = pkt_flags;
@@ -1876,7 +1888,9 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		rxm->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan);
 
 		pkt_flags = rx_desc_status_to_pkt_flags(staterr, vlan_flags);
-		pkt_flags = pkt_flags | rx_desc_error_to_pkt_flags(staterr);
+		pkt_flags = pkt_flags |
+			rx_desc_error_to_pkt_flags(staterr, (uint16_t)pkt_info,
+						   rxq->rx_udp_csum_zero_err);
 		pkt_flags = pkt_flags |
 			ixgbe_rxd_pkt_info_to_pkt_flags((uint16_t)pkt_info);
 		rxm->ol_flags = pkt_flags;
@@ -1969,7 +1983,8 @@ ixgbe_fill_cluster_head_buf(
 	head->vlan_tci = rte_le_to_cpu_16(desc->wb.upper.vlan);
 	pkt_info = rte_le_to_cpu_32(desc->wb.lower.lo_dword.data);
 	pkt_flags = rx_desc_status_to_pkt_flags(staterr, rxq->vlan_flags);
-	pkt_flags |= rx_desc_error_to_pkt_flags(staterr);
+	pkt_flags |= rx_desc_error_to_pkt_flags(staterr, (uint16_t)pkt_info,
+						rxq->rx_udp_csum_zero_err);
 	pkt_flags |= ixgbe_rxd_pkt_info_to_pkt_flags((uint16_t)pkt_info);
 	head->ol_flags = pkt_flags;
 	head->packet_type =
@@ -2981,6 +2996,13 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	else
 		rxq->pkt_type_mask = IXGBE_PACKET_TYPE_MASK_82599;
 
+	/*
+	 * 82599 errata, UDP frames with a 0 checksum can be marked as checksum
+	 * errors.
+	 */
+	if (hw->mac.type == ixgbe_mac_82599EB)
+		rxq->rx_udp_csum_zero_err = 1;
+
 	/*
 	 * Allocate RX ring hardware descriptors. A memzone large enough to
 	 * handle the maximum ring size is allocated in order to allow for
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h
index 5e1ac44942..4adfbb3089 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx.h
@@ -129,6 +129,8 @@ struct ixgbe_rx_queue {
 	uint8_t             crc_len;  /**< 0 if CRC stripped, 4 otherwise. */
 	uint8_t             drop_en;  /**< If not 0, set SRRCTL.Drop_En. */
 	uint8_t             rx_deferred_start; /**< not in global dev start. */
+	/** UDP frames with a 0 checksum can be marked as checksum errors. */
+	uint8_t             rx_udp_csum_zero_err;
 	/** flags to set in mbuf when a vlan is detected. */
 	uint64_t            vlan_flags;
 	uint64_t	    offloads; /**< Rx offloads with DEV_RX_OFFLOAD_* */
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
index 03eacfd86b..4b658605bf 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -132,9 +132,9 @@ desc_to_olflags_v_ipsec(__m128i descs[4], struct rte_mbuf **rx_pkts)
 
 static inline void
 desc_to_olflags_v(__m128i descs[4], __m128i mbuf_init, uint8_t vlan_flags,
-	struct rte_mbuf **rx_pkts)
+		  uint16_t udp_p_flag, struct rte_mbuf **rx_pkts)
 {
-	__m128i ptype0, ptype1, vtag0, vtag1, csum;
+	__m128i ptype0, ptype1, vtag0, vtag1, csum, udp_csum_skip;
 	__m128i rearm0, rearm1, rearm2, rearm3;
 
 	/* mask everything except rss type */
@@ -161,6 +161,7 @@ desc_to_olflags_v(__m128i descs[4], __m128i mbuf_init, uint8_t vlan_flags,
 		(IXGBE_RXDADV_ERR_TCPE | IXGBE_RXDADV_ERR_IPE) >> 16,
 		IXGBE_RXD_STAT_VP, IXGBE_RXD_STAT_VP,
 		IXGBE_RXD_STAT_VP, IXGBE_RXD_STAT_VP);
+
 	/* map vlan present (0x8), IPE (0x2), L4E (0x1) to ol_flags */
 	const __m128i vlan_csum_map_lo = _mm_set_epi8(
 		0, 0, 0, 0,
@@ -182,12 +183,23 @@ desc_to_olflags_v(__m128i descs[4], __m128i mbuf_init, uint8_t vlan_flags,
 		0, PKT_RX_L4_CKSUM_GOOD >> sizeof(uint8_t), 0,
 		PKT_RX_L4_CKSUM_GOOD >> sizeof(uint8_t));
 
+	/* mask everything except UDP header present if specified */
+	const __m128i udp_hdr_p_msk = _mm_set_epi16
+		(0, 0, 0, 0,
+		 udp_p_flag, udp_p_flag, udp_p_flag, udp_p_flag);
+
+	const __m128i udp_csum_bad_shuf = _mm_set_epi8
+		(0, 0, 0, 0, 0, 0, 0, 0,
+		 0, 0, 0, 0, 0, 0, ~(uint8_t)PKT_RX_L4_CKSUM_BAD, 0xFF);
+
 	ptype0 = _mm_unpacklo_epi16(descs[0], descs[1]);
 	ptype1 = _mm_unpacklo_epi16(descs[2], descs[3]);
 	vtag0 = _mm_unpackhi_epi16(descs[0], descs[1]);
 	vtag1 = _mm_unpackhi_epi16(descs[2], descs[3]);
 
 	ptype0 = _mm_unpacklo_epi32(ptype0, ptype1);
+	/* save the UDP header present information */
+	udp_csum_skip = _mm_and_si128(ptype0, udp_hdr_p_msk);
 	ptype0 = _mm_and_si128(ptype0, rsstype_msk);
 	ptype0 = _mm_shuffle_epi8(rss_flags, ptype0);
 
@@ -215,6 +227,15 @@ desc_to_olflags_v(__m128i descs[4], __m128i mbuf_init, uint8_t vlan_flags,
 
 	vtag1 = _mm_or_si128(ptype0, vtag1);
 
+	/* convert the UDP header present 0x200 to 0x1 for aligning with each
+	 * PKT_RX_L4_CKSUM_BAD value in low byte of 16 bits word ol_flag in
+	 * vtag1 (4x16). Then mask out the bad checksum value by shuffle and
+	 * bit-mask.
+	 */
+	udp_csum_skip = _mm_srli_epi16(udp_csum_skip, 9);
+	udp_csum_skip = _mm_shuffle_epi8(udp_csum_bad_shuf, udp_csum_skip);
+	vtag1 = _mm_and_si128(vtag1, udp_csum_skip);
+
 	/*
 	 * At this point, we have the 4 sets of flags in the low 64-bits
 	 * of vtag1 (4x16).
@@ -341,6 +362,7 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	__m128i dd_check, eop_check;
 	__m128i mbuf_init;
 	uint8_t vlan_flags;
+	uint16_t udp_p_flag = 0; /* Rx Descriptor UDP header present */
 
 	/* nb_pkts has to be floor-aligned to RTE_IXGBE_DESCS_PER_LOOP */
 	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_IXGBE_DESCS_PER_LOOP);
@@ -365,6 +387,9 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 				rte_cpu_to_le_32(IXGBE_RXDADV_STAT_DD)))
 		return 0;
 
+	if (rxq->rx_udp_csum_zero_err)
+		udp_p_flag = IXGBE_RXDADV_PKTTYPE_UDP;
+
 	/* 4 packets DD mask */
 	dd_check = _mm_set_epi64x(0x0000000100000001LL, 0x0000000100000001LL);
 
@@ -477,7 +502,8 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		sterr_tmp1 = _mm_unpackhi_epi32(descs[1], descs[0]);
 
 		/* set ol_flags with vlan packet type */
-		desc_to_olflags_v(descs, mbuf_init, vlan_flags, &rx_pkts[pos]);
+		desc_to_olflags_v(descs, mbuf_init, vlan_flags, udp_p_flag,
+				  &rx_pkts[pos]);
 
 #ifdef RTE_LIBRTE_SECURITY
 		if (unlikely(use_ipsec))
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-15 14:24:49.349925566 +0100
+++ 0001-net-ixgbe-fix-UDP-zero-checksum-on-x86.patch	2021-02-15 14:24:49.277482176 +0100
@@ -1 +1 @@
-From 9a40edb599d76f7f9d116bb2f91b23c082b5f154 Mon Sep 17 00:00:00 2001
+From 19e34170ca42803f9179053b55c843041bad4768 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9a40edb599d76f7f9d116bb2f91b23c082b5f154 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 696cbd93ba..4c644c0e68 100644
+index 5c3a7e4f26..6ca2a33f09 100644
@@ -33,3 +34,3 @@
-@@ -257,6 +257,16 @@ RSS isn't supported when QinQ is enabled
- 
- Due to FW limitation, IXGBE doesn't support RSS when QinQ is enabled currently.
+@@ -253,6 +253,16 @@ Before binding ``vfio`` with legacy mode in X550 NICs, use ``modprobe vfio ``
+ ``nointxmask=1`` to load ``vfio`` module if the intx is not shared with other
+ devices.
@@ -51 +52 @@
-index 72d27f35ca..950b7894e0 100644
+index 7777dc17f1..8b9b009396 100644
@@ -54 +55 @@
-@@ -1466,7 +1466,8 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status, uint64_t vlan_flags)
+@@ -1440,7 +1440,8 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status, uint64_t vlan_flags)
@@ -64 +65 @@
-@@ -1483,6 +1484,15 @@ rx_desc_error_to_pkt_flags(uint32_t rx_status)
+@@ -1457,6 +1458,15 @@ rx_desc_error_to_pkt_flags(uint32_t rx_status)
@@ -80 +81 @@
-@@ -1569,7 +1579,9 @@ ixgbe_rx_scan_hw_ring(struct ixgbe_rx_queue *rxq)
+@@ -1543,7 +1553,9 @@ ixgbe_rx_scan_hw_ring(struct ixgbe_rx_queue *rxq)
@@ -91 +92 @@
-@@ -1902,7 +1914,9 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -1876,7 +1888,9 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -102 +103 @@
-@@ -1995,7 +2009,8 @@ ixgbe_fill_cluster_head_buf(
+@@ -1969,7 +1983,8 @@ ixgbe_fill_cluster_head_buf(
@@ -112 +113 @@
-@@ -3116,6 +3131,13 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -2981,6 +2996,13 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -127 +128 @@
-index 8a25e98df6..476ef62cfd 100644
+index 5e1ac44942..4adfbb3089 100644
@@ -140 +141 @@
-index 9bbffe6119..7610fd93db 100644
+index 03eacfd86b..4b658605bf 100644
@@ -229 +230 @@
- #ifdef RTE_LIB_SECURITY
+ #ifdef RTE_LIBRTE_SECURITY

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

* [dpdk-stable] patch 'vhost: fix packed ring dequeue offloading' has been queued to stable release 19.11.7
  2021-02-15 13:28 ` [dpdk-stable] patch 'net/ixgbe: fix UDP zero checksum on x86' " Christian Ehrhardt
@ 2021-02-15 13:28   ` Christian Ehrhardt
  2021-02-15 13:28   ` [dpdk-stable] patch 'doc: fix mark action zero value in mlx5 guide' " Christian Ehrhardt
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-15 13:28 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/17/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/581e235cf62e8336d8f21f611a0fce251caafda5

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 581e235cf62e8336d8f21f611a0fce251caafda5 Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu@intel.com>
Date: Fri, 5 Feb 2021 15:47:58 +0800
Subject: [PATCH] vhost: fix packed ring dequeue offloading

[ upstream commit 894028ace2c5af2506897898f407cbdf24cef0c5 ]

When vhost is doing dequeue offloading, it parses ethernet and L3/L4
headers of the packet. Then vhost will set corresponding value in mbuf
attributes. It means offloading action should be after packet data copy.

Fixes: 75ed51697820 ("vhost: add packed ring batch dequeue")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index b8237f2eb4..f397e9a13a 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1810,7 +1810,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
 {
 	bool wrap = vq->avail_wrap_counter;
 	struct vring_packed_desc *descs = vq->desc_packed;
-	struct virtio_net_hdr *hdr;
 	uint64_t lens[PACKED_BATCH_SIZE];
 	uint64_t buf_lens[PACKED_BATCH_SIZE];
 	uint32_t buf_offset = dev->vhost_hlen;
@@ -1867,13 +1866,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
 		ids[i] = descs[avail_idx + i].id;
 	}
 
-	if (virtio_net_with_host_offload(dev)) {
-		vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {
-			hdr = (struct virtio_net_hdr *)(desc_addrs[i]);
-			vhost_dequeue_offload(hdr, pkts[i]);
-		}
-	}
-
 	return 0;
 
 free_buf:
@@ -1891,6 +1883,7 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,
 {
 	uint16_t avail_idx = vq->last_avail_idx;
 	uint32_t buf_offset = dev->vhost_hlen;
+	struct virtio_net_hdr *hdr;
 	uintptr_t desc_addrs[PACKED_BATCH_SIZE];
 	uint16_t ids[PACKED_BATCH_SIZE];
 	uint16_t i;
@@ -1907,6 +1900,13 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,
 			   (void *)(uintptr_t)(desc_addrs[i] + buf_offset),
 			   pkts[i]->pkt_len);
 
+	if (virtio_net_with_host_offload(dev)) {
+		vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {
+			hdr = (struct virtio_net_hdr *)(desc_addrs[i]);
+			vhost_dequeue_offload(hdr, pkts[i]);
+		}
+	}
+
 	if (virtio_net_is_inorder(dev))
 		vhost_shadow_dequeue_batch_packed_inorder(vq,
 			ids[PACKED_BATCH_SIZE - 1]);
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-15 14:24:49.416972864 +0100
+++ 0002-vhost-fix-packed-ring-dequeue-offloading.patch	2021-02-15 14:24:49.285482159 +0100
@@ -1 +1 @@
-From 894028ace2c5af2506897898f407cbdf24cef0c5 Mon Sep 17 00:00:00 2001
+From 581e235cf62e8336d8f21f611a0fce251caafda5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 894028ace2c5af2506897898f407cbdf24cef0c5 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6580983c82..583bf379c6 100644
+index b8237f2eb4..f397e9a13a 100644
@@ -23 +24 @@
-@@ -2263,7 +2263,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
+@@ -1810,7 +1810,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
@@ -30,2 +31,2 @@
- 	uint32_t buf_offset = sizeof(struct virtio_net_hdr_mrg_rxbuf);
-@@ -2320,13 +2319,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
+ 	uint32_t buf_offset = dev->vhost_hlen;
+@@ -1867,13 +1866,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
@@ -45 +46 @@
-@@ -2344,6 +2336,7 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,
+@@ -1891,6 +1883,7 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,
@@ -48 +49 @@
- 	uint32_t buf_offset = sizeof(struct virtio_net_hdr_mrg_rxbuf);
+ 	uint32_t buf_offset = dev->vhost_hlen;
@@ -53 +54 @@
-@@ -2360,6 +2353,13 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,
+@@ -1907,6 +1900,13 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,

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

* [dpdk-stable] patch 'doc: fix mark action zero value in mlx5 guide' has been queued to stable release 19.11.7
  2021-02-15 13:28 ` [dpdk-stable] patch 'net/ixgbe: fix UDP zero checksum on x86' " Christian Ehrhardt
  2021-02-15 13:28   ` [dpdk-stable] patch 'vhost: fix packed ring dequeue offloading' " Christian Ehrhardt
@ 2021-02-15 13:28   ` Christian Ehrhardt
  2021-02-15 13:28   ` [dpdk-stable] patch 'app/testpmd: fix help of metering commands' " Christian Ehrhardt
  2021-02-15 13:28   ` [dpdk-stable] patch 'usertools: fix binding built-in kernel driver' " Christian Ehrhardt
  3 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-15 13:28 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/17/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 9abe59fcf1f5bf6ef7a04ed0358fa53d768e9319 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Fri, 5 Feb 2021 14:15:04 +0200
Subject: [PATCH] doc: fix mark action zero value in mlx5 guide

[ upstream commit b8ee0a16cb844027495968941a101f37964073cc ]

The zero value in flow MARK action is reported in Rx datapath
as tagged with zero FDIR ID. Once packet is marked in flow engine
it will be always reported as tagged. For metadata only the zero
value means there is "no metadata" in the packet and the metadata
flag is not set for the case.

Fixes: 3ceeed9f7855 ("doc: update flow mark action in mlx5 guide")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 doc/guides/nics/mlx5.rst | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 9e4a659ab9..bbad7d0d5b 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -705,8 +705,10 @@ Run-time configuration
   of the extensive metadata features. The legacy Verbs supports FLAG and
   MARK metadata actions over NIC Rx steering domain only.
 
-  The setting MARK or META value to zero means there is no item provided and
-  receiving datapath will not report in mbufs these items are present.
+  Setting META value to zero in flow action means there is no item provided
+  and receiving datapath will not report in mbufs the metadata are present.
+  Setting MARK value to zero in flow action means the zero FDIR ID value
+  will be reported on packet receiving.
 
   For the MARK action the last 16 values in the full range are reserved for
   internal PMD purposes (to emulate FLAG action). The valid range for the
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-15 14:24:49.473914088 +0100
+++ 0003-doc-fix-mark-action-zero-value-in-mlx5-guide.patch	2021-02-15 14:24:49.289482150 +0100
@@ -1 +1 @@
-From b8ee0a16cb844027495968941a101f37964073cc Mon Sep 17 00:00:00 2001
+From 9abe59fcf1f5bf6ef7a04ed0358fa53d768e9319 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b8ee0a16cb844027495968941a101f37964073cc ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 51d81a0206..ff5c8c15d9 100644
+index 9e4a659ab9..bbad7d0d5b 100644
@@ -24 +25 @@
-@@ -875,8 +875,10 @@ Driver options
+@@ -705,8 +705,10 @@ Run-time configuration

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

* [dpdk-stable] patch 'app/testpmd: fix help of metering commands' has been queued to stable release 19.11.7
  2021-02-15 13:28 ` [dpdk-stable] patch 'net/ixgbe: fix UDP zero checksum on x86' " Christian Ehrhardt
  2021-02-15 13:28   ` [dpdk-stable] patch 'vhost: fix packed ring dequeue offloading' " Christian Ehrhardt
  2021-02-15 13:28   ` [dpdk-stable] patch 'doc: fix mark action zero value in mlx5 guide' " Christian Ehrhardt
@ 2021-02-15 13:28   ` Christian Ehrhardt
  2021-02-15 13:28   ` [dpdk-stable] patch 'usertools: fix binding built-in kernel driver' " Christian Ehrhardt
  3 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-15 13:28 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Jasvinder Singh, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/17/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/8457def245a0a3521c034c13d775b10c0f1335c3

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 8457def245a0a3521c034c13d775b10c0f1335c3 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 9 Feb 2021 14:15:06 +0000
Subject: [PATCH] app/testpmd: fix help of metering commands

[ upstream commit 618f0f4ac689f9255eecbef9202e77e35a9a7ceb ]

Helps strings syntax is "command : description", the 'command' part was
missing, updated command help strings.

Fixes: 281eeb8afc55 ("app/testpmd: add commands for metering and policing")
Fixes: 30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing")
Fixes: e63b50162aa3 ("app/testpmd: clean metering and policing commands")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/cmdline_mtr.c | 33 +++++++++++++++++++--------------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c
index 045c2e28dd..c6e7529b3d 100644
--- a/app/test-pmd/cmdline_mtr.c
+++ b/app/test-pmd/cmdline_mtr.c
@@ -312,7 +312,7 @@ static void cmd_show_port_meter_cap_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_show_port_meter_cap = {
 	.f = cmd_show_port_meter_cap_parsed,
 	.data = NULL,
-	.help_str = "Show port meter cap",
+	.help_str = "show port meter cap <port_id>",
 	.tokens = {
 		(void *)&cmd_show_port_meter_cap_show,
 		(void *)&cmd_show_port_meter_cap_port,
@@ -408,7 +408,7 @@ static void cmd_add_port_meter_profile_srtcm_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_add_port_meter_profile_srtcm = {
 	.f = cmd_add_port_meter_profile_srtcm_parsed,
 	.data = NULL,
-	.help_str = "Add port meter profile srtcm (rfc2697)",
+	.help_str = "add port meter profile srtcm_rfc2697 <port_id> <profile_id> <cir> <cbs> <ebs>",
 	.tokens = {
 		(void *)&cmd_add_port_meter_profile_srtcm_add,
 		(void *)&cmd_add_port_meter_profile_srtcm_port,
@@ -515,7 +515,7 @@ static void cmd_add_port_meter_profile_trtcm_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm = {
 	.f = cmd_add_port_meter_profile_trtcm_parsed,
 	.data = NULL,
-	.help_str = "Add port meter profile trtcm (rfc2698)",
+	.help_str = "add port meter profile trtcm_rfc2698 <port_id> <profile_id> <cir> <pir> <cbs> <pbs>",
 	.tokens = {
 		(void *)&cmd_add_port_meter_profile_trtcm_add,
 		(void *)&cmd_add_port_meter_profile_trtcm_port,
@@ -627,7 +627,7 @@ static void cmd_add_port_meter_profile_trtcm_rfc4115_parsed(
 cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm_rfc4115 = {
 	.f = cmd_add_port_meter_profile_trtcm_rfc4115_parsed,
 	.data = NULL,
-	.help_str = "Add port meter profile trtcm (rfc4115)",
+	.help_str = "add port meter profile trtcm_rfc4115 <port_id> <profile_id> <cir> <eir> <cbs> <ebs>",
 	.tokens = {
 		(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_add,
 		(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_port,
@@ -702,7 +702,7 @@ static void cmd_del_port_meter_profile_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_del_port_meter_profile = {
 	.f = cmd_del_port_meter_profile_parsed,
 	.data = NULL,
-	.help_str = "Delete port meter profile",
+	.help_str = "del port meter profile <port_id> <profile_id>",
 	.tokens = {
 		(void *)&cmd_del_port_meter_profile_del,
 		(void *)&cmd_del_port_meter_profile_port,
@@ -827,7 +827,10 @@ static void cmd_create_port_meter_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_create_port_meter = {
 	.f = cmd_create_port_meter_parsed,
 	.data = NULL,
-	.help_str = "Create port meter",
+	.help_str = "create port meter <port_id> <mtr_id> <profile_id> <meter_enable>(yes|no) "
+		"<g_action>(R|Y|G|D) <y_action>(R|Y|G|D) <r_action>(R|Y|G|D) "
+		"<stats_mask> <shared> <use_pre_meter_color> "
+		"[<dscp_tbl_entry0> <dscp_tbl_entry1> ...<dscp_tbl_entry63>]",
 	.tokens = {
 		(void *)&cmd_create_port_meter_create,
 		(void *)&cmd_create_port_meter_port,
@@ -896,7 +899,7 @@ static void cmd_enable_port_meter_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_enable_port_meter = {
 	.f = cmd_enable_port_meter_parsed,
 	.data = NULL,
-	.help_str = "Enable port meter",
+	.help_str = "enable port meter <port_id> <mtr_id>",
 	.tokens = {
 		(void *)&cmd_enable_port_meter_enable,
 		(void *)&cmd_enable_port_meter_port,
@@ -957,7 +960,7 @@ static void cmd_disable_port_meter_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_disable_port_meter = {
 	.f = cmd_disable_port_meter_parsed,
 	.data = NULL,
-	.help_str = "Disable port meter",
+	.help_str = "disable port meter <port_id> <mtr_id>",
 	.tokens = {
 		(void *)&cmd_disable_port_meter_disable,
 		(void *)&cmd_disable_port_meter_port,
@@ -1018,7 +1021,7 @@ static void cmd_del_port_meter_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_del_port_meter = {
 	.f = cmd_del_port_meter_parsed,
 	.data = NULL,
-	.help_str = "Delete port meter",
+	.help_str = "del port meter <port_id> <mtr_id>",
 	.tokens = {
 		(void *)&cmd_del_port_meter_del,
 		(void *)&cmd_del_port_meter_port,
@@ -1089,7 +1092,7 @@ static void cmd_set_port_meter_profile_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_set_port_meter_profile = {
 	.f = cmd_set_port_meter_profile_parsed,
 	.data = NULL,
-	.help_str = "Set port meter profile",
+	.help_str = "set port meter profile <port_id> <mtr_id> <profile_id>",
 	.tokens = {
 		(void *)&cmd_set_port_meter_profile_set,
 		(void *)&cmd_set_port_meter_profile_port,
@@ -1163,7 +1166,8 @@ free_table:
 cmdline_parse_inst_t cmd_set_port_meter_dscp_table = {
 	.f = cmd_set_port_meter_dscp_table_parsed,
 	.data = NULL,
-	.help_str = "Update port meter dscp table",
+	.help_str = "set port meter dscp table <port_id> <mtr_id> "
+		"[<dscp_tbl_entry0> <dscp_tbl_entry1> ... <dscp_tbl_entry63>]",
 	.tokens = {
 		(void *)&cmd_set_port_meter_dscp_table_set,
 		(void *)&cmd_set_port_meter_dscp_table_port,
@@ -1273,7 +1277,8 @@ static void cmd_set_port_meter_policer_action_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_set_port_meter_policer_action = {
 	.f = cmd_set_port_meter_policer_action_parsed,
 	.data = NULL,
-	.help_str = "Set port meter policer action",
+	.help_str = "set port meter policer action <port_id> <mtr_id> "
+		"<action_mask> <action0> [<action1> <action2>]",
 	.tokens = {
 		(void *)&cmd_set_port_meter_policer_action_set,
 		(void *)&cmd_set_port_meter_policer_action_port,
@@ -1350,7 +1355,7 @@ static void cmd_set_port_meter_stats_mask_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_set_port_meter_stats_mask = {
 	.f = cmd_set_port_meter_stats_mask_parsed,
 	.data = NULL,
-	.help_str = "Set port meter stats mask",
+	.help_str = "set port meter stats mask <port_id> <mtr_id> <stats_mask>",
 	.tokens = {
 		(void *)&cmd_set_port_meter_stats_mask_set,
 		(void *)&cmd_set_port_meter_stats_mask_port,
@@ -1454,7 +1459,7 @@ static void cmd_show_port_meter_stats_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_show_port_meter_stats = {
 	.f = cmd_show_port_meter_stats_parsed,
 	.data = NULL,
-	.help_str = "Show port meter stats",
+	.help_str = "show port meter stats <port_id> <mtr_id> <clear>(yes|no)",
 	.tokens = {
 		(void *)&cmd_show_port_meter_stats_show,
 		(void *)&cmd_show_port_meter_stats_port,
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-15 14:24:49.530134890 +0100
+++ 0004-app-testpmd-fix-help-of-metering-commands.patch	2021-02-15 14:24:49.293482142 +0100
@@ -1 +1 @@
-From 618f0f4ac689f9255eecbef9202e77e35a9a7ceb Mon Sep 17 00:00:00 2001
+From 8457def245a0a3521c034c13d775b10c0f1335c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 618f0f4ac689f9255eecbef9202e77e35a9a7ceb ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 399ee56e07..3982787d20 100644
+index 045c2e28dd..c6e7529b3d 100644
@@ -109 +110 @@
-@@ -1092,7 +1095,7 @@ static void cmd_set_port_meter_profile_parsed(void *parsed_result,
+@@ -1089,7 +1092,7 @@ static void cmd_set_port_meter_profile_parsed(void *parsed_result,
@@ -118 +119 @@
-@@ -1166,7 +1169,8 @@ free_table:
+@@ -1163,7 +1166,8 @@ free_table:
@@ -128 +129 @@
-@@ -1276,7 +1280,8 @@ static void cmd_set_port_meter_policer_action_parsed(void *parsed_result,
+@@ -1273,7 +1277,8 @@ static void cmd_set_port_meter_policer_action_parsed(void *parsed_result,
@@ -138 +139 @@
-@@ -1355,7 +1360,7 @@ static void cmd_set_port_meter_stats_mask_parsed(void *parsed_result,
+@@ -1350,7 +1355,7 @@ static void cmd_set_port_meter_stats_mask_parsed(void *parsed_result,
@@ -147 +148 @@
-@@ -1459,7 +1464,7 @@ static void cmd_show_port_meter_stats_parsed(void *parsed_result,
+@@ -1454,7 +1459,7 @@ static void cmd_show_port_meter_stats_parsed(void *parsed_result,

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

* [dpdk-stable] patch 'usertools: fix binding built-in kernel driver' has been queued to stable release 19.11.7
  2021-02-15 13:28 ` [dpdk-stable] patch 'net/ixgbe: fix UDP zero checksum on x86' " Christian Ehrhardt
                     ` (2 preceding siblings ...)
  2021-02-15 13:28   ` [dpdk-stable] patch 'app/testpmd: fix help of metering commands' " Christian Ehrhardt
@ 2021-02-15 13:28   ` Christian Ehrhardt
  3 siblings, 0 replies; 166+ messages in thread
From: Christian Ehrhardt @ 2021-02-15 13:28 UTC (permalink / raw)
  To: Yongxin Liu; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.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/17/21. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 42d652dafbc1e90c3d40096d077929edf346c8f5 Mon Sep 17 00:00:00 2001
From: Yongxin Liu <yongxin.liu@windriver.com>
Date: Mon, 23 Nov 2020 11:05:33 +0800
Subject: [PATCH] usertools: fix binding built-in kernel driver

[ upstream commit 7a016af4aa6bd2f8425b4fb2d59e5dd19f12bceb ]

A driver can be loaded as a dynamic module or a built-in module.
In commit 681a67288655 ("usertools: check if module is loaded
before binding"), the script only checks modules in /sys/module/.

However, for built-in kernel driver, it only shows up in /sys/module/,
if it has a version or at least one parameter. So add check for
modules in /lib/modules/$(uname -r)/modules.builtin.

Fixes: 681a67288655 ("usertools: check if module is loaded before binding")

Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 usertools/dpdk-devbind.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index b1d1498768..262a5ff3a9 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -7,6 +7,7 @@ from __future__ import print_function
 import sys
 import os
 import getopt
+import platform
 import subprocess
 from os.path import exists, abspath, dirname, basename
 
@@ -172,7 +173,17 @@ def module_is_loaded(module):
 
     loaded_modules = sysfs_mods
 
-    return module in sysfs_mods
+    # add built-in modules as loaded
+    release = platform.uname().release
+    filename = os.path.join("/lib/modules/", release, "modules.builtin")
+    if os.path.exists(filename):
+        try:
+            with open(filename) as f:
+                loaded_modules += [os.path.splitext(os.path.basename(mod))[0] for mod in f]
+        except IOError:
+            print("Warning: cannot read list of built-in kernel modules")
+
+    return module in loaded_modules
 
 
 def check_modules():
-- 
2.30.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-15 14:24:49.581013162 +0100
+++ 0005-usertools-fix-binding-built-in-kernel-driver.patch	2021-02-15 14:24:49.297482133 +0100
@@ -1 +1 @@
-From 7a016af4aa6bd2f8425b4fb2d59e5dd19f12bceb Mon Sep 17 00:00:00 2001
+From 42d652dafbc1e90c3d40096d077929edf346c8f5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7a016af4aa6bd2f8425b4fb2d59e5dd19f12bceb ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index c2ede3d4df..98bd1b7e4d 100755
+index b1d1498768..262a5ff3a9 100755
@@ -27 +28,2 @@
-@@ -7,6 +7,7 @@ import sys
+@@ -7,6 +7,7 @@ from __future__ import print_function
+ import sys
@@ -29,2 +31 @@
- import subprocess
- import argparse
+ import getopt
@@ -31,0 +33,2 @@
+ import subprocess
+ from os.path import exists, abspath, dirname, basename
@@ -33,3 +36 @@
- from glob import glob
- from os.path import exists, basename
-@@ -107,7 +108,17 @@ def module_is_loaded(module):
+@@ -172,7 +173,17 @@ def module_is_loaded(module):

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

* Re: [dpdk-stable] patch 'app/testpmd: release flows left before port stop' has been queued to stable release 19.11.7
  2021-02-04 11:29 ` [dpdk-stable] patch 'app/testpmd: release flows left before port stop' " Christian Ehrhardt
@ 2021-03-09  8:33   ` Ali Alnubani
  2021-03-10  9:34     ` Christian Ehrhardt
  0 siblings, 1 reply; 166+ messages in thread
From: Ali Alnubani @ 2021-03-09  8:33 UTC (permalink / raw)
  To: Christian Ehrhardt
  Cc: Ori Kam, Ajit Khaparde, dpdk stable, Asaf Penso, Gregory Etelson

> -----Original Message-----
> From: stable <stable-bounces@dpdk.org> On Behalf Of Christian Ehrhardt
> Sent: Thursday, February 4, 2021 1:30 PM
> To: Gregory Etelson <getelson@nvidia.com>
> Cc: Ori Kam <orika@nvidia.com>; Ajit Khaparde
> <ajit.khaparde@broadcom.com>; dpdk stable <stable@dpdk.org>
> Subject: [dpdk-stable] patch 'app/testpmd: release flows left before port
> stop' has been queued to stable release 19.11.7
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue
> 
> This queued commit can be viewed at:
> https://github.com/cpaelzer/dpdk-stable-
> queue/commit/ba53d40b4eb900d12beeb707c3cb163e421e6e85
> 
> Thanks.
> 
> Christian Ehrhardt <christian.ehrhardt@canonical.com>
> 
> ---

Hi Christian,

We would like to drop this patch from 19.11 since it's a new feature. Would that be possible? Should we send a patch that reverts it?

Sorry we didn't respond ahead of time.

Thanks,
Ali

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

* Re: [dpdk-stable] patch 'app/testpmd: release flows left before port stop' has been queued to stable release 19.11.7
  2021-03-09  8:33   ` Ali Alnubani
@ 2021-03-10  9:34     ` Christian Ehrhardt
  2021-03-10 10:02       ` Gregory Etelson
  0 siblings, 1 reply; 166+ messages in thread
From: Christian Ehrhardt @ 2021-03-10  9:34 UTC (permalink / raw)
  To: Ali Alnubani
  Cc: Ori Kam, Ajit Khaparde, dpdk stable, Asaf Penso, Gregory Etelson

On Tue, Mar 9, 2021 at 9:33 AM Ali Alnubani <alialnu@nvidia.com> wrote:
>
> > -----Original Message-----
> > From: stable <stable-bounces@dpdk.org> On Behalf Of Christian Ehrhardt
> > Sent: Thursday, February 4, 2021 1:30 PM
> > To: Gregory Etelson <getelson@nvidia.com>
> > Cc: Ori Kam <orika@nvidia.com>; Ajit Khaparde
> > <ajit.khaparde@broadcom.com>; dpdk stable <stable@dpdk.org>
> > Subject: [dpdk-stable] patch 'app/testpmd: release flows left before port
> > stop' has been queued to stable release 19.11.7
> >
> > Hi,
> >
> > FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue
> >
> > This queued commit can be viewed at:
> > https://github.com/cpaelzer/dpdk-stable-
> > queue/commit/ba53d40b4eb900d12beeb707c3cb163e421e6e85
> >
> > Thanks.
> >
> > Christian Ehrhardt <christian.ehrhardt@canonical.com>
> >
> > ---
>
> Hi Christian,
>
> We would like to drop this patch from 19.11 since it's a new feature. Would that be possible? Should we send a patch that reverts it?

Hi,
you don't need to send a revert, I can do that.
Thanks for the IRC discussion btw!
The one thing that might be worth is that you've said it is a new
feature that should not be
added, but just reading the patch description it sounds like just a
fix. If you would not mind
for some kind of trail (if we ever wonder) replying here with a bit
more extended reasoning
would be helpful.

> Sorry we didn't respond ahead of time.
>
> Thanks,
> Ali



-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd

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

* Re: [dpdk-stable] patch 'app/testpmd: release flows left before port stop' has been queued to stable release 19.11.7
  2021-03-10  9:34     ` Christian Ehrhardt
@ 2021-03-10 10:02       ` Gregory Etelson
  0 siblings, 0 replies; 166+ messages in thread
From: Gregory Etelson @ 2021-03-10 10:02 UTC (permalink / raw)
  To: Christian Ehrhardt, Ali Alnubani
  Cc: Ori Kam, Ajit Khaparde, dpdk stable, Asaf Penso

Hello Christian,

> > > -----Original Message-----
> > > From: stable <stable-bounces@dpdk.org> On Behalf Of Christian
> > > Ehrhardt
> > > Sent: Thursday, February 4, 2021 1:30 PM
> > > To: Gregory Etelson <getelson@nvidia.com>
> > > Cc: Ori Kam <orika@nvidia.com>; Ajit Khaparde
> > > <ajit.khaparde@broadcom.com>; dpdk stable <stable@dpdk.org>
> > > Subject: [dpdk-stable] patch 'app/testpmd: release flows left before
> > > port stop' has been queued to stable release 19.11.7
> > >
> > > Hi,
> > >
> > > FYI, your patch has been queued to stable release 19.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/06/21. 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/cpaelzer/dpdk-stable-queue
> > >
> > > This queued commit can be viewed at:
> > > https://github.com/cpaelzer/dpdk-stable-
> > > queue/commit/ba53d40b4eb900d12beeb707c3cb163e421e6e85
> > >
> > > Thanks.
> > >
> > > Christian Ehrhardt <christian.ehrhardt@canonical.com>
> > >
> > > ---
> >
> > Hi Christian,
> >
> > We would like to drop this patch from 19.11 since it's a new feature.
> Would that be possible? Should we send a patch that reverts it?
> 
> Hi,
> you don't need to send a revert, I can do that.
> Thanks for the IRC discussion btw!
> The one thing that might be worth is that you've said it is a new feature
> that should not be added, but just reading the patch description it sounds
> like just a fix. If you would not mind for some kind of trail (if we ever
> wonder) replying here with a bit more extended reasoning would be helpful.
> 

This testpmd patch is aligned with an update in RTE flows documentation described in
https://patchwork.dpdk.org/project/dpdk/patch/20200916111854.1949-1-getelson@nvidia.com/
The documentation update was introduced in dpdk-20.11. Earlier PMD releases do not function
according to proposed specification.

Regards,
Gregory 
   
> > Sorry we didn't respond ahead of time.
> >
> > Thanks,
> > Ali
> 
> 
> 
> --
> Christian Ehrhardt
> Staff Engineer, Ubuntu Server
> Canonical Ltd

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

end of thread, other threads:[~2021-03-10 10:02 UTC | newest]

Thread overview: 166+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 11:27 [dpdk-stable] patch 'rib: fix insertion in some cases' has been queued to stable release 19.11.7 Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'app/procinfo: fix _filters stats reporting' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'app/procinfo: fix check on xstats-ids' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'app/procinfo: remove useless memset' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/pcap: remove local variable shadowing outer one' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/bonding: " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/af_xdp: remove useless assignment' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'app/crypto-perf: remove always true condition' " Christian Ehrhardt
2021-02-04 13:00   ` Zhang, Roy Fan
2021-02-04 13:12     ` Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/avp: " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'eal/linux: fix handling of error events from epoll' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/bonding: fix port id validity check on parsing' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix memory leak when mapping fails' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: disable end of packet padding for Rx' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/ice: fix outer UDP Tx checksum offload' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/i40e: fix L4 checksum flag' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/i40e: fix global register recovery' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/ixgbe: detect failed VF MTU set' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix Rx rings in RSS redirection table' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix VNIC config on Rx queue stop' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: release HWRM lock in error' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: propagate FW command failure to application' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix cleanup on mutex init failure' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/bnxt: fix VNIC RSS configure function' " Christian Ehrhardt
2021-02-04 11:27 ` [dpdk-stable] patch 'net/netvsc: ignore unsupported packet on sync command' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/bonding: fix PCI address comparison on non-PCI ports' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix stats counters' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix VLAN stripping in VF' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/ixgbe: fix flex bytes flow director rule' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix Rx bytes statistics' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice: check Rx queue number on RSS init' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice/base: fix tunnel destroy' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice/base: fix null pointer dereference' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/virtio-user: fix run closing stdin and close callfd' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice/base: fix memory handling' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix returned code for RSS hardware failure' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'lpm: fix vector IPv4 lookup' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/octeontx: fix build with SVE' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice: fix RSS lookup table initialization' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice: disable IPv4 checksum offload in vector Tx' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/ice: enlarge Rx queue rearm threshold to 64' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: add null input checks' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/mvneta: check allocation in Rx queue flush' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/octeontx2: fix corruption in segments list' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'common/mlx5: fix pointer cast on Windows' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'ip_frag: remove padding length of fragment' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'test/mcslock: remove unneeded per lcore copy' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'test: fix buffer overflow in Tx burst' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'fbarray: fix overlap check' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'examples/l3fwd: remove limitation on Tx queue count' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'app/crypto-perf: fix spelling in output' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix X722 for 802.1ad frames ability' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: fix interception with flow director' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: fix error code in xstats' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/qede: fix promiscuous enable' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'ethdev: fix max Rx packet length check' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'app/testpmd: fix max Rx packet length for VLAN packets' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/dpaa: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/e1000: " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/i40e: fix jumbo frame flag condition' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/iavf: " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/ipn3ke: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/octeontx2: fix jumbo frame flag condition for MTU' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/qede: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/sfc: " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/thunderx: " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/cxgbe: fix jumbo frame flag condition' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/enetc: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/nfp: " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/liquidio: " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'app/testpmd: fix IP checksum calculation' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: fix VF query link status in dev init' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: use new opcode for clearing hardware resource' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'net/hns3: fix register length when dumping registers' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'build: provide suitable error for "both" libraries option' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'eal: fix reciprocal header include' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'ethdev: fix missing " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'rib: fix missing header includes' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'ipsec: fix missing header include' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'fib: fix missing header includes' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'app: fix build with extra include paths' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'eal/arm: fix debug build with gcc for 128-bit atomics' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'test/distributor: fix return buffer queue overload' " Christian Ehrhardt
2021-02-04 11:28 ` [dpdk-stable] patch 'power: create guest channel public header file' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'power: make channel message functions public' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'power: rename public structs' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'power: rename constants' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'power: clean up includes' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'app/eventdev: adjust event count order for pipeline test' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'app/eventdev: remove redundant enqueue in burst Tx' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'examples/eventdev: add info output for main core' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'app/eventdev: fix SMP barrier in performance test' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'test/event_crypto: set cipher operation in transform' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'app/crypto-perf: fix latency CSV output' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'app/crypto-perf: fix CSV output format' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'test/ipsec: fix result code for not supported' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix memory allocation check' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'eal: fix MCS lock header include' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'power: fix missing header includes' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'rib: fix missing header include' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/e1000: fix flow control mode setting' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx4: fix handling of probing failure' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/bnxt: fix FW version log' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'app/testpmd: fix key for RSS flow rule' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/bnxt: fix null termination of Rx mbuf chain' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/octeontx2: fix PF flow action for Tx' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx5: refuse empty VLAN in flow pattern' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'doc: update flow mark action in mlx5 guide' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx4: fix port attach in secondary process' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/ixgbe: disable NFS filtering' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/sfc: fix generic byte statistics to exclude FCS bytes' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: fix stack corruption' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: remove debug log on fast-path' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: remove VLAN flush' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: remove CRC length from MRU validation' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/mvpp2: fix frame size checking' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/hns3: adjust format specifier for enum' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'app/testpmd: avoid exit without terminal restore' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/nfp: read chip model from PluDevice register' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/ena: flush Rx buffers memory pool cache' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/iavf: fix vector mapping with queue' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'build: fix plugin load on static build' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'mbuf: add C++ include guard for dynamic fields header' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/bnxt: fix max rings computation' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'app/testpmd: release flows left before port stop' " Christian Ehrhardt
2021-03-09  8:33   ` Ali Alnubani
2021-03-10  9:34     ` Christian Ehrhardt
2021-03-10 10:02       ` Gregory Etelson
2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx5: fix leak on Rx queue creation failure' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/mlx5: fix leak on Tx " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'build: fix linker flags on Windows' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'common/octeontx2: fix build with SVE' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'test: fix terminal settings on exit' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/dpaa2: fix jumbo frame flag condition for MTU set' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/hns3: fix data overwriting during register dump' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/hns3: fix dump register out of range' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'mbuf: fix missing header include' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'power: export guest channel header file' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'examples/eventdev: check CPU core enabling' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'examples/eventdev: move ethdev stop to the end' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'net/hns3: fix memory leak on secondary process exit' " Christian Ehrhardt
2021-02-04 11:29 ` [dpdk-stable] patch 'app/testpmd: fix setting maximum packet length' " Christian Ehrhardt
2021-02-08 11:14 ` [dpdk-stable] patch 'net/mlx5: fix crash on secondary process port close' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'net/mlx5: fix port attach in secondary process' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'doc: fix QinQ flow rules in testpmd guide' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'net/enic: fix filter type used for flow API' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'doc: fix product link in hns3 guide' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'net/sfc: fix TSO and checksum offloads for EF10' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'vhost: fix vid allocation race' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: remove MPLS from supported flow items' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: fix flow director rule residue on malloc failure' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: fix firmware exceptions by concurrent commands' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: fix VF reset on mailbox failure' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'net/hns3: validate requested maximum Rx frame length' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'net/pcap: fix byte stats for drop Tx' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'net/pcap: fix infinite Rx with large files' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'net/enic: fix filter log message' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'eventdev: fix a return value comment' " Christian Ehrhardt
2021-02-08 11:14   ` [dpdk-stable] patch 'mempool: fix panic on dump or audit' " Christian Ehrhardt
2021-02-15 13:28 ` [dpdk-stable] patch 'net/ixgbe: fix UDP zero checksum on x86' " Christian Ehrhardt
2021-02-15 13:28   ` [dpdk-stable] patch 'vhost: fix packed ring dequeue offloading' " Christian Ehrhardt
2021-02-15 13:28   ` [dpdk-stable] patch 'doc: fix mark action zero value in mlx5 guide' " Christian Ehrhardt
2021-02-15 13:28   ` [dpdk-stable] patch 'app/testpmd: fix help of metering commands' " Christian Ehrhardt
2021-02-15 13:28   ` [dpdk-stable] patch 'usertools: fix binding built-in kernel driver' " Christian Ehrhardt

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