patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1
@ 2022-03-08 14:14 Kevin Traynor
  2022-03-08 14:14 ` patch 'event/cnxk: fix Rx adapter config check' " Kevin Traynor
                   ` (43 more replies)
  0 siblings, 44 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 9d5386447570c5bbf3f5bcd569b89603114cadf5 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Wed, 2 Mar 2022 04:23:08 +0530
Subject: [PATCH] event/cnxk: fix sub-event clearing mask length

[ upstream commit b4766203dd06bca2fe8eabde874bcda9b05b5792 ]

Fix incorrect mask used when clearing subevent type masking out
useful data.

Fixes: e239e0d3faf7 ("event/cnxk: add SSO HW device operations")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/event/cnxk/cnxk_eventdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/event/cnxk/cnxk_eventdev.h b/drivers/event/cnxk/cnxk_eventdev.h
index 4652b58a84..39c13b02fc 100644
--- a/drivers/event/cnxk/cnxk_eventdev.h
+++ b/drivers/event/cnxk/cnxk_eventdev.h
@@ -45,5 +45,5 @@
 #define CNXK_EVENT_TYPE_FROM_TAG(x) (((x) >> 28) & 0xf)
 #define CNXK_SUB_EVENT_FROM_TAG(x)  (((x) >> 20) & 0xff)
-#define CNXK_CLR_SUB_EVENT(x)	    (~(0xffu << 20) & x)
+#define CNXK_CLR_SUB_EVENT(x)	    (~(0xffull << 20) & x)
 #define CNXK_GRP_FROM_TAG(x)	    (((x) >> 36) & 0x3ff)
 #define CNXK_SWTAG_PEND(x)	    (BIT_ULL(62) & x)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.532349745 +0000
+++ 0001-event-cnxk-fix-sub-event-clearing-mask-length.patch	2022-03-08 13:55:28.377314835 +0000
@@ -1 +1 @@
-From b4766203dd06bca2fe8eabde874bcda9b05b5792 Mon Sep 17 00:00:00 2001
+From 9d5386447570c5bbf3f5bcd569b89603114cadf5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b4766203dd06bca2fe8eabde874bcda9b05b5792 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index b157fef096..5564746e6d 100644
+index 4652b58a84..39c13b02fc 100644
@@ -21 +22 @@
-@@ -44,5 +44,5 @@
+@@ -45,5 +45,5 @@


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

* patch 'event/cnxk: fix Rx adapter config check' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'event/dlb2: add shift value check in sparse dequeue' " Kevin Traynor
                   ` (42 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 759acf8ccbace7ee6a847ff341ee56726653261f Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Wed, 2 Mar 2022 04:23:09 +0530
Subject: [PATCH] event/cnxk: fix Rx adapter config check

[ upstream commit fc39f62560674668d00ef776c4885351249f7fbc ]

The rx_queue_flags should be checked against
RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID flag.

Fixes: cb4bfd6e7bdf ("event/cnxk: support Rx adapter")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/event/cnxk/cnxk_eventdev_adptr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/event/cnxk/cnxk_eventdev_adptr.c b/drivers/event/cnxk/cnxk_eventdev_adptr.c
index fdcd68ca63..54c3d6a3cb 100644
--- a/drivers/event/cnxk/cnxk_eventdev_adptr.c
+++ b/drivers/event/cnxk/cnxk_eventdev_adptr.c
@@ -231,5 +231,5 @@ cnxk_sso_rx_adapter_queue_add(
 			&queue_conf->ev,
 			!!(queue_conf->rx_queue_flags &
-			   RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID));
+			   RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID));
 		if (queue_conf->rx_queue_flags &
 		    RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.551344349 +0000
+++ 0002-event-cnxk-fix-Rx-adapter-config-check.patch	2022-03-08 13:55:28.379314840 +0000
@@ -1 +1 @@
-From fc39f62560674668d00ef776c4885351249f7fbc Mon Sep 17 00:00:00 2001
+From 759acf8ccbace7ee6a847ff341ee56726653261f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fc39f62560674668d00ef776c4885351249f7fbc ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 3b63d78d97..fa96090bfa 100644
+index fdcd68ca63..54c3d6a3cb 100644


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

* patch 'event/dlb2: add shift value check in sparse dequeue' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
  2022-03-08 14:14 ` patch 'event/cnxk: fix Rx adapter config check' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'app/compress-perf: fix cycle count operations allocation' " Kevin Traynor
                   ` (41 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Timothy McDaniel; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 308a87f73bd734a08f6d5d85af800b4d81f601ee Mon Sep 17 00:00:00 2001
From: Timothy McDaniel <timothy.mcdaniel@intel.com>
Date: Wed, 2 Mar 2022 09:12:08 -0600
Subject: [PATCH] event/dlb2: add shift value check in sparse dequeue

[ upstream commit 8eb6881c52cedf073295e3897d0d1b949802dac3 ]

Add a check to ensure that all shift counts are valid.
Shifting by more than 63 bits may result in undefined behavior, as
noted during coverity scan.

Coverity issue: 376527
Fixes: e697f35dbdd1 ("event/dlb2: update rolling mask used for dequeue")

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 drivers/event/dlb2/dlb2.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 09abdd1660..7789dd74e0 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -3917,13 +3917,15 @@ dlb2_hw_dequeue_sparse(struct dlb2_eventdev *dlb2,
 								&qes[0],
 								num_avail);
-			num += n_iter;
-			/* update rolling_mask for vector code support */
-			m_rshift = qm_port->cq_rolling_mask >> n_iter;
-			m_lshift = qm_port->cq_rolling_mask << (64 - n_iter);
-			m2_rshift = qm_port->cq_rolling_mask_2 >> n_iter;
-			m2_lshift = qm_port->cq_rolling_mask_2 <<
+			if (n_iter != 0) {
+				num += n_iter;
+				/* update rolling_mask for vector code support */
+				m_rshift = qm_port->cq_rolling_mask >> n_iter;
+				m_lshift = qm_port->cq_rolling_mask << (64 - n_iter);
+				m2_rshift = qm_port->cq_rolling_mask_2 >> n_iter;
+				m2_lshift = qm_port->cq_rolling_mask_2 <<
 					(64 - n_iter);
-			qm_port->cq_rolling_mask = (m_rshift | m2_lshift);
-			qm_port->cq_rolling_mask_2 = (m2_rshift | m_lshift);
+				qm_port->cq_rolling_mask = (m_rshift | m2_lshift);
+				qm_port->cq_rolling_mask_2 = (m2_rshift | m_lshift);
+			}
 		} else { /* !use_scalar */
 			num_avail = dlb2_recv_qe_sparse_vec(qm_port,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.571360822 +0000
+++ 0003-event-dlb2-add-shift-value-check-in-sparse-dequeue.patch	2022-03-08 13:55:28.386314860 +0000
@@ -1 +1 @@
-From 8eb6881c52cedf073295e3897d0d1b949802dac3 Mon Sep 17 00:00:00 2001
+From 308a87f73bd734a08f6d5d85af800b4d81f601ee Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8eb6881c52cedf073295e3897d0d1b949802dac3 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org


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

* patch 'app/compress-perf: fix cycle count operations allocation' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
  2022-03-08 14:14 ` patch 'event/cnxk: fix Rx adapter config check' " Kevin Traynor
  2022-03-08 14:14 ` patch 'event/dlb2: add shift value check in sparse dequeue' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'app/compress-perf: optimize operations pool " Kevin Traynor
                   ` (40 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Raja Zidane; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 03f2aeec2f65ae525f2fbca83befc90d3a433260 Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Wed, 23 Feb 2022 15:32:17 +0200
Subject: [PATCH] app/compress-perf: fix cycle count operations allocation

[ upstream commit 81353ea4dc2a57d8c4378fda6e3e0e6b6db6cd21 ]

In cyclecount main_loop function, each iteration it tries to
enqueue X ops, in case Y<X ops were enqueued, the rest of the
X-Y ops are moved to the beginning of the ops array, to preserve
ops order, and next Y ops are allocated for the next enqueue
action, the allocation of the ops occurs on the first Y entries
in the array, when it should have skipped the first X-Y
array entries and allocate the following Y entries.

Fix the allocation by adding the correct offset.

Fixes: 2695db95a147 ("test/compress: add cycle-count mode to perf tool")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 app/test-compress-perf/comp_perf_test_cyclecount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-compress-perf/comp_perf_test_cyclecount.c b/app/test-compress-perf/comp_perf_test_cyclecount.c
index 1d8e5fe6c2..c215547291 100644
--- a/app/test-compress-perf/comp_perf_test_cyclecount.c
+++ b/app/test-compress-perf/comp_perf_test_cyclecount.c
@@ -274,5 +274,5 @@ main_loop(struct cperf_cyclecount_ctx *ctx, enum rte_comp_xform_type type)
 			if (ops_needed && rte_mempool_get_bulk(
 						mem->op_pool,
-						(void **)ops,
+						(void **)&ops[ops_unused],
 						ops_needed) != 0) {
 				RTE_LOG(ERR, USER1,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.593936223 +0000
+++ 0004-app-compress-perf-fix-cycle-count-operations-allocat.patch	2022-03-08 13:55:28.387314862 +0000
@@ -1 +1 @@
-From 81353ea4dc2a57d8c4378fda6e3e0e6b6db6cd21 Mon Sep 17 00:00:00 2001
+From 03f2aeec2f65ae525f2fbca83befc90d3a433260 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 81353ea4dc2a57d8c4378fda6e3e0e6b6db6cd21 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org


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

* patch 'app/compress-perf: optimize operations pool allocation' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (2 preceding siblings ...)
  2022-03-08 14:14 ` patch 'app/compress-perf: fix cycle count operations allocation' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'compress/mlx5: support out-of-space status' " Kevin Traynor
                   ` (39 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Raja Zidane; +Cc: Matan Azrad, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 0fc99dc715acfcaea4c46f9196689aaac600ba6a Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Wed, 23 Feb 2022 15:33:07 +0200
Subject: [PATCH] app/compress-perf: optimize operations pool allocation

[ upstream commit 68d3287f4ef43318728e4a134b7aa33d5c52b12d ]

An array of the size of total operations needed for the de/compression is
reserved for ops while enqueueing, although only first burst_size entries
of the array are used.

Reduce the size of the array allocated.

Fixes: b68a82425da4 ("app/compress-perf: add performance measurement")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 app/test-compress-perf/comp_perf_test_cyclecount.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/test-compress-perf/comp_perf_test_cyclecount.c b/app/test-compress-perf/comp_perf_test_cyclecount.c
index c215547291..a3f6404eb2 100644
--- a/app/test-compress-perf/comp_perf_test_cyclecount.c
+++ b/app/test-compress-perf/comp_perf_test_cyclecount.c
@@ -176,5 +176,6 @@ main_loop(struct cperf_cyclecount_ctx *ctx, enum rte_comp_xform_type type)
 	/* one array for both enqueue and dequeue */
 	ops = rte_zmalloc_socket(NULL,
-		2 * mem->total_bufs * sizeof(struct rte_comp_op *),
+		(test_data->burst_sz + mem->total_bufs) *
+		sizeof(struct rte_comp_op *),
 		0, rte_socket_id());
 
@@ -185,5 +186,5 @@ main_loop(struct cperf_cyclecount_ctx *ctx, enum rte_comp_xform_type type)
 	}
 
-	deq_ops = &ops[mem->total_bufs];
+	deq_ops = &ops[test_data->burst_sz];
 
 	if (type == RTE_COMP_COMPRESS) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.613263348 +0000
+++ 0005-app-compress-perf-optimize-operations-pool-allocatio.patch	2022-03-08 13:55:28.388314865 +0000
@@ -1 +1 @@
-From 68d3287f4ef43318728e4a134b7aa33d5c52b12d Mon Sep 17 00:00:00 2001
+From 0fc99dc715acfcaea4c46f9196689aaac600ba6a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 68d3287f4ef43318728e4a134b7aa33d5c52b12d ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* patch 'compress/mlx5: support out-of-space status' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (3 preceding siblings ...)
  2022-03-08 14:14 ` patch 'app/compress-perf: optimize operations pool " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'app/compress-perf: fix socket ID type during init' " Kevin Traynor
                   ` (38 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Raja Zidane; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 7ea897faaefbaaa1a2b9deedbdc075b2519c87a2 Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Sun, 27 Feb 2022 16:00:52 +0200
Subject: [PATCH] compress/mlx5: support out-of-space status

[ upstream commit d2781de684dcbd6ba706332a2d93307fd3918c41 ]

When trying to dequeue, an OP may fail due to insufficient
space for the OP output, the compressdev API defines out-of-space
for OP status. The driver can detect out-of-space errors and
report them to the user. Check if hw_error_syndrome specifies
out-of-space and set the OP status accordingly.
Also added an error message for a case of missing B-final flag.

Fixes: f8c97babc9f4 ("compress/mlx5: add data-path functions")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/common/mlx5/mlx5_prm.h        |  5 +++++
 drivers/compress/mlx5/mlx5_compress.c | 13 ++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index b9e39aa717..58aa72df64 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -250,4 +250,7 @@
 #define MLX5_DSEG_MAX 63
 
+/* The 32 bit syndrome offset in struct mlx5_err_cqe. */
+#define MLX5_ERROR_CQE_SYNDROME_OFFSET 52
+
 /* The completion mode offset in the WQE control segment line 2. */
 #define MLX5_COMP_MODE_OFFSET 2
@@ -560,4 +563,6 @@ struct mlx5_rdma_write_wqe {
 #define MLX5_GGA_COMP_LOG_DYNAMIC_SIZE_MAX 15u
 #define MLX5_GGA_COMP_LOG_DYNAMIC_SIZE_MIN 0u
+#define MLX5_GGA_COMP_OUT_OF_SPACE_SYNDROME_BE 0x29D0084
+#define MLX5_GGA_COMP_MISSING_BFINAL_SYNDROME_BE 0x29D0011
 
 struct mlx5_wqe_metadata_seg {
diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c
index 82b871bd86..a18ec8a6cf 100644
--- a/drivers/compress/mlx5/mlx5_compress.c
+++ b/drivers/compress/mlx5/mlx5_compress.c
@@ -564,5 +564,16 @@ mlx5_compress_cqe_err_handle(struct mlx5_compress_qp *qp,
 	volatile struct mlx5_gga_compress_opaque *opaq = qp->opaque_mr.addr;
 
-	op->status = RTE_COMP_OP_STATUS_ERROR;
+	volatile uint32_t *synd_word = RTE_PTR_ADD(cqe, MLX5_ERROR_CQE_SYNDROME_OFFSET);
+	switch (*synd_word) {
+	case MLX5_GGA_COMP_OUT_OF_SPACE_SYNDROME_BE:
+		op->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;
+		DRV_LOG(DEBUG, "OUT OF SPACE error, output is bigger than dst buffer.");
+		break;
+	case MLX5_GGA_COMP_MISSING_BFINAL_SYNDROME_BE:
+		DRV_LOG(DEBUG, "The last compressed block missed the B-final flag; maybe the compressed data is not complete or garbaged?");
+		/* fallthrough */
+	default:
+		op->status = RTE_COMP_OP_STATUS_ERROR;
+	}
 	op->consumed = 0;
 	op->produced = 0;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.632148633 +0000
+++ 0006-compress-mlx5-support-out-of-space-status.patch	2022-03-08 13:55:28.394314882 +0000
@@ -1 +1 @@
-From d2781de684dcbd6ba706332a2d93307fd3918c41 Mon Sep 17 00:00:00 2001
+From 7ea897faaefbaaa1a2b9deedbdc075b2519c87a2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d2781de684dcbd6ba706332a2d93307fd3918c41 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index ce3e47059f..44b18225f6 100644
+index b9e39aa717..58aa72df64 100644
@@ -27 +28 @@
-@@ -263,4 +263,7 @@
+@@ -250,4 +250,7 @@
@@ -35 +36 @@
-@@ -582,4 +585,6 @@ struct mlx5_rdma_write_wqe {
+@@ -560,4 +563,6 @@ struct mlx5_rdma_write_wqe {
@@ -43 +44 @@
-index 7a482c3fbb..d64a628c74 100644
+index 82b871bd86..a18ec8a6cf 100644
@@ -46 +47 @@
-@@ -563,5 +563,16 @@ mlx5_compress_cqe_err_handle(struct mlx5_compress_qp *qp,
+@@ -564,5 +564,16 @@ mlx5_compress_cqe_err_handle(struct mlx5_compress_qp *qp,


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

* patch 'app/compress-perf: fix socket ID type during init' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (4 preceding siblings ...)
  2022-03-08 14:14 ` patch 'compress/mlx5: support out-of-space status' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'app/compress-perf: fix number of queue pairs to setup' " Kevin Traynor
                   ` (37 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Raja Zidane; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 5f8f691c0ce4839bbfa2e0c1b9df4b78fccd2b8f Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Wed, 2 Mar 2022 10:39:27 +0200
Subject: [PATCH] app/compress-perf: fix socket ID type during init

[ upstream commit 220b51f78b46bf773e513a09bf2fa67a9b8428ba ]

Socket ID is obtained by function rte_compressdev_socket_id, which
returns it as integer, but is interpreted as unsigned byte integer.

change type from uint8_t to int.

Fixes: ed7dd94f7f66 ("compressdev: add basic device management")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 app/test-compress-perf/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-compress-perf/main.c b/app/test-compress-perf/main.c
index 6ff6a2f04a..3402b65c63 100644
--- a/app/test-compress-perf/main.c
+++ b/app/test-compress-perf/main.c
@@ -169,5 +169,5 @@ comp_perf_initialize_compressdev(struct comp_test_data *test_data,
 
 		struct rte_compressdev_info cdev_info;
-		uint8_t socket_id = rte_compressdev_socket_id(cdev_id);
+		int socket_id = rte_compressdev_socket_id(cdev_id);
 
 		rte_compressdev_info_get(cdev_id, &cdev_info);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.654019287 +0000
+++ 0007-app-compress-perf-fix-socket-ID-type-during-init.patch	2022-03-08 13:55:28.394314882 +0000
@@ -1 +1 @@
-From 220b51f78b46bf773e513a09bf2fa67a9b8428ba Mon Sep 17 00:00:00 2001
+From 5f8f691c0ce4839bbfa2e0c1b9df4b78fccd2b8f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 220b51f78b46bf773e513a09bf2fa67a9b8428ba ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org


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

* patch 'app/compress-perf: fix number of queue pairs to setup' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (5 preceding siblings ...)
  2022-03-08 14:14 ` patch 'app/compress-perf: fix socket ID type during init' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'compressdev: fix socket ID type' " Kevin Traynor
                   ` (36 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Raja Zidane; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From b61330783c917bacdf8b040309ae9d68a5f417a6 Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Wed, 2 Mar 2022 10:41:31 +0200
Subject: [PATCH] app/compress-perf: fix number of queue pairs to setup

[ upstream commit e77e8b66d1f917419f9e6bea4148a3f246bbc75d ]

The number of QPs is limited by the number of cores, such that in
case the user requests more QPs than possible, the number of QPs
actually configured on the device is equal to the number of cores,
but the app tries to setup the original number of QPs.

Align the number of QPs setup'ed to the limited number.

Fixes: 424dd6c8c1a8 ("app/compress-perf: add weak functions for multicore test")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 app/test-compress-perf/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-compress-perf/main.c b/app/test-compress-perf/main.c
index 3402b65c63..ce9e80bedc 100644
--- a/app/test-compress-perf/main.c
+++ b/app/test-compress-perf/main.c
@@ -195,4 +195,5 @@ comp_perf_initialize_compressdev(struct comp_test_data *test_data,
 			.max_nb_streams = 0
 		};
+		test_data->nb_qps = config.nb_queue_pairs;
 
 		if (rte_compressdev_configure(cdev_id, &config) < 0) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.673539444 +0000
+++ 0008-app-compress-perf-fix-number-of-queue-pairs-to-setup.patch	2022-03-08 13:55:28.395314884 +0000
@@ -1 +1 @@
-From e77e8b66d1f917419f9e6bea4148a3f246bbc75d Mon Sep 17 00:00:00 2001
+From b61330783c917bacdf8b040309ae9d68a5f417a6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e77e8b66d1f917419f9e6bea4148a3f246bbc75d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org


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

* patch 'compressdev: fix socket ID type' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (6 preceding siblings ...)
  2022-03-08 14:14 ` patch 'app/compress-perf: fix number of queue pairs to setup' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/hns3: remove duplicate macro definition' " Kevin Traynor
                   ` (35 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Raja Zidane; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 2010aa750b9dfdda43ff89a1109b51dd0a9a0c79 Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Tue, 1 Mar 2022 16:15:02 +0200
Subject: [PATCH] compressdev: fix socket ID type

[ upstream commit c0941508b30618b9dd335fb4b533d451f8686f3b ]

Socket ID is used and interpreted as integer, one of the possible
values for socket id is -1 (SOCKET_ID_ANY).
here socket_id is defined as unsigned 8 bit integer, so when putting
-1, it is interpreted as 255, which causes allocation errors when
trying to allocate from socket_id (255).

change socket_id from unsigned 8 bit integer to integer.

Fixes: ed7dd94f7f66 ("compressdev: add basic device management")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 lib/compressdev/rte_compressdev_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/compressdev/rte_compressdev_internal.h b/lib/compressdev/rte_compressdev_internal.h
index 888c8f5c5c..25d8afbfb9 100644
--- a/lib/compressdev/rte_compressdev_internal.h
+++ b/lib/compressdev/rte_compressdev_internal.h
@@ -99,5 +99,5 @@ struct rte_compressdev_data {
 	uint8_t dev_id;
 	/**< Compress device identifier */
-	uint8_t socket_id;
+	int socket_id;
 	/**< Socket identifier where memory is allocated */
 	char name[RTE_COMPRESSDEV_NAME_MAX_LEN];
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.692491258 +0000
+++ 0009-compressdev-fix-socket-ID-type.patch	2022-03-08 13:55:28.395314884 +0000
@@ -1 +1 @@
-From c0941508b30618b9dd335fb4b533d451f8686f3b Mon Sep 17 00:00:00 2001
+From 2010aa750b9dfdda43ff89a1109b51dd0a9a0c79 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c0941508b30618b9dd335fb4b533d451f8686f3b ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/hns3: remove duplicate macro definition' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (7 preceding siblings ...)
  2022-03-08 14:14 ` patch 'compressdev: fix socket ID type' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/hns3: fix RSS TC mode entry' " Kevin Traynor
                   ` (34 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Jie Hai; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From a0f99531a65575042e630c96c632483024cf90b9 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Mon, 28 Feb 2022 11:21:41 +0800
Subject: [PATCH] net/hns3: remove duplicate macro definition

[ upstream commit 0983cdc1870f52a360eadb40eab84b34c20b464d ]

This patch fixes duplicate macro definition of HNS3_RSS_CFG_TBL_SIZE.

Fixes: 737f30e1c3ab ("net/hns3: support command interface with firmware")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_cmd.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index 81bc9e9d98..f9addc6069 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -604,5 +604,4 @@ struct hns3_cfg_gro_status_cmd {
 #define HNS3_RSS_HASH_KEY_OFFSET_B	4
 
-#define HNS3_RSS_CFG_TBL_SIZE	16
 #define HNS3_RSS_HASH_KEY_NUM	16
 /* Configure the algorithm mode and Hash Key, opcode:0x0D01 */
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.711353603 +0000
+++ 0010-net-hns3-remove-duplicate-macro-definition.patch	2022-03-08 13:55:28.396314887 +0000
@@ -1 +1 @@
-From 0983cdc1870f52a360eadb40eab84b34c20b464d Mon Sep 17 00:00:00 2001
+From a0f99531a65575042e630c96c632483024cf90b9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0983cdc1870f52a360eadb40eab84b34c20b464d ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/hns3: fix RSS TC mode entry' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (8 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/hns3: remove duplicate macro definition' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/hns3: fix VF " Kevin Traynor
                   ` (33 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From c58a1e2a88728ac8bedd8a89e6e4972afdbc5baa Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 28 Feb 2022 11:21:45 +0800
Subject: [PATCH] net/hns3: fix RSS TC mode entry

[ upstream commit cdb9a7ae5f8f3b59b6de9dc2b52387636245e3a5 ]

The driver allocates queues only to valid TCs. But the driver also
configure queues for invalid TCs, which is unreasonable.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rss.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 1782d63883..ebf3c60f07 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -602,6 +602,6 @@ hns3_set_rss_tc_mode(struct hns3_hw *hw)
 	for (i = 0; i < HNS3_MAX_TC_NUM; i++) {
 		tc_valid[i] = !!(hw->hw_tc_map & BIT(i));
-		tc_size[i] = roundup_size;
-		tc_offset[i] = rss_size * i;
+		tc_size[i] = tc_valid[i] ? roundup_size : 0;
+		tc_offset[i] = tc_valid[i] ? rss_size * i : 0;
 	}
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.731304337 +0000
+++ 0011-net-hns3-fix-RSS-TC-mode-entry.patch	2022-03-08 13:55:28.397314890 +0000
@@ -1 +1 @@
-From cdb9a7ae5f8f3b59b6de9dc2b52387636245e3a5 Mon Sep 17 00:00:00 2001
+From c58a1e2a88728ac8bedd8a89e6e4972afdbc5baa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cdb9a7ae5f8f3b59b6de9dc2b52387636245e3a5 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/hns3: fix VF RSS TC mode entry' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (9 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/hns3: fix RSS TC mode entry' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/hns3: increase time waiting for PF reset completion' " Kevin Traynor
                   ` (32 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 2c14175fe37dc6d22056246765b81d3f07544fca Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 28 Feb 2022 11:21:46 +0800
Subject: [PATCH] net/hns3: fix VF RSS TC mode entry

[ upstream commit 87f9628e2c786dff500139baf59720693e46b0bc ]

For packets with VLAN priorities destined for the VF, hardware still
assign Rx queue based on the Up-to-TC mapping PF configured. But VF has
only one TC. If other TC don't enable, it causes that the priority
packets that aren't destined for TC0 aren't received by RSS hash but is
destined for queue 0. So driver has to enable the unused TC by using TC0
queue mapping configuration.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rss.c | 58 +++++++++++++++++++++++++++----------
 1 file changed, 42 insertions(+), 16 deletions(-)

diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index ebf3c60f07..1493b10f96 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -579,11 +579,45 @@ hns3_dev_rss_reta_query(struct rte_eth_dev *dev,
 }
 
-/*
- * Used to configure the tc_size and tc_offset.
- */
-static int
-hns3_set_rss_tc_mode(struct hns3_hw *hw)
+static void
+hns3_set_rss_tc_mode_entry(struct hns3_hw *hw, uint8_t *tc_valid,
+			   uint16_t *tc_size, uint16_t *tc_offset,
+			   uint8_t tc_num)
 {
+	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	uint16_t rss_size = hw->alloc_rss_size;
+	uint16_t roundup_size;
+	uint16_t i;
+
+	roundup_size = roundup_pow_of_two(rss_size);
+	roundup_size = ilog2(roundup_size);
+
+	for (i = 0; i < tc_num; i++) {
+		if (hns->is_vf) {
+			/*
+			 * For packets with VLAN priorities destined for the VF,
+			 * hardware still assign Rx queue based on the Up-to-TC
+			 * mapping PF configured. But VF has only one TC. If
+			 * other TC don't enable, it causes that the priority
+			 * packets that aren't destined for TC0 aren't received
+			 * by RSS hash but is destined for queue 0. So driver
+			 * has to enable the unused TC by using TC0 queue
+			 * mapping configuration.
+			 */
+			tc_valid[i] = (hw->hw_tc_map & BIT(i)) ?
+					!!(hw->hw_tc_map & BIT(i)) : 1;
+			tc_size[i] = roundup_size;
+			tc_offset[i] = (hw->hw_tc_map & BIT(i)) ?
+					rss_size * i : 0;
+		} else {
+			tc_valid[i] = !!(hw->hw_tc_map & BIT(i));
+			tc_size[i] = tc_valid[i] ? roundup_size : 0;
+			tc_offset[i] = tc_valid[i] ? rss_size * i : 0;
+		}
+	}
+}
+
+static int
+hns3_set_rss_tc_mode(struct hns3_hw *hw)
+{
 	struct hns3_rss_tc_mode_cmd *req;
 	uint16_t tc_offset[HNS3_MAX_TC_NUM];
@@ -591,19 +625,11 @@ hns3_set_rss_tc_mode(struct hns3_hw *hw)
 	uint16_t tc_size[HNS3_MAX_TC_NUM];
 	struct hns3_cmd_desc desc;
-	uint16_t roundup_size;
 	uint16_t i;
 	int ret;
 
+	hns3_set_rss_tc_mode_entry(hw, tc_valid, tc_size,
+				   tc_offset, HNS3_MAX_TC_NUM);
+
 	req = (struct hns3_rss_tc_mode_cmd *)desc.data;
-
-	roundup_size = roundup_pow_of_two(rss_size);
-	roundup_size = ilog2(roundup_size);
-
-	for (i = 0; i < HNS3_MAX_TC_NUM; i++) {
-		tc_valid[i] = !!(hw->hw_tc_map & BIT(i));
-		tc_size[i] = tc_valid[i] ? roundup_size : 0;
-		tc_offset[i] = tc_valid[i] ? rss_size * i : 0;
-	}
-
 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_TC_MODE, false);
 	for (i = 0; i < HNS3_MAX_TC_NUM; i++) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.750695946 +0000
+++ 0012-net-hns3-fix-VF-RSS-TC-mode-entry.patch	2022-03-08 13:55:28.398314893 +0000
@@ -1 +1 @@
-From 87f9628e2c786dff500139baf59720693e46b0bc Mon Sep 17 00:00:00 2001
+From 2c14175fe37dc6d22056246765b81d3f07544fca Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 87f9628e2c786dff500139baf59720693e46b0bc ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/hns3: increase time waiting for PF reset completion' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (10 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/hns3: fix VF " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/ixgbe: fix FSP check for X550EM devices' " Kevin Traynor
                   ` (31 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 8502a8f135fbfac228b12ced50d2acb38b1eb33d Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 2 Mar 2022 08:35:01 +0800
Subject: [PATCH] net/hns3: increase time waiting for PF reset completion

[ upstream commit d6a9f8fb26b8d6adaac20d6a303faa5c5ba4d5bc ]

On the case that PF and VF need to be reset, after the hardware reset is
complete, VF needs wait for 1 second to restore the configuration so
that VF does not fail to recover because PF reset isn't complete. But
the estimated time is not sufficient. This patch fixes it to 5 seconds.

Fixes: 2790c6464725 ("net/hns3: support device reset")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 62675ed7d7..3be46c8f0a 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1926,4 +1926,5 @@ static int
 hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
 {
+#define HNS3_WAIT_PF_RESET_READY_TIME 5
 	struct hns3_hw *hw = &hns->hw;
 	struct hns3_wait_data *wait_data = hw->reset.wait_data;
@@ -1946,10 +1947,12 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
 
 		wait_data->check_completion = NULL;
-		wait_data->interval = 1 * MSEC_PER_SEC * USEC_PER_MSEC;
+		wait_data->interval = HNS3_WAIT_PF_RESET_READY_TIME *
+			MSEC_PER_SEC * USEC_PER_MSEC;
 		wait_data->count = 1;
 		wait_data->result = HNS3_WAIT_REQUEST;
 		rte_eal_alarm_set(wait_data->interval, hns3_wait_callback,
 				  wait_data);
-		hns3_warn(hw, "hardware is ready, delay 1 sec for PF reset complete");
+		hns3_warn(hw, "hardware is ready, delay %d sec for PF reset complete",
+				HNS3_WAIT_PF_RESET_READY_TIME);
 		return -EAGAIN;
 	} else if (wait_data->result == HNS3_WAIT_TIMEOUT) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.769884650 +0000
+++ 0013-net-hns3-increase-time-waiting-for-PF-reset-completi.patch	2022-03-08 13:55:28.400314898 +0000
@@ -1 +1 @@
-From d6a9f8fb26b8d6adaac20d6a303faa5c5ba4d5bc Mon Sep 17 00:00:00 2001
+From 8502a8f135fbfac228b12ced50d2acb38b1eb33d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d6a9f8fb26b8d6adaac20d6a303faa5c5ba4d5bc ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 06ddf64184..9091706fe5 100644
+index 62675ed7d7..3be46c8f0a 100644
@@ -24 +25 @@
-@@ -1878,4 +1878,5 @@ static int
+@@ -1926,4 +1926,5 @@ static int
@@ -30 +31 @@
-@@ -1898,10 +1899,12 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
+@@ -1946,10 +1947,12 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)


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

* patch 'net/ixgbe: fix FSP check for X550EM devices' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (11 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/hns3: increase time waiting for PF reset completion' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/iavf: support NAT-T / UDP encapsulation' " Kevin Traynor
                   ` (30 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Stephen Douthit; +Cc: Jeff Daly, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 04134338465957566ff35028bba8363743e600af Mon Sep 17 00:00:00 2001
From: Stephen Douthit <stephend@silicom-usa.com>
Date: Mon, 28 Feb 2022 10:29:35 -0500
Subject: [PATCH] net/ixgbe: fix FSP check for X550EM devices

[ upstream commit 05271b99a93ae306fe4abe09fa561f0220469724 ]

Currently all X500EM* MAC types fall through to the default case and get
reported as non-SFP regardless of media type, which isn't correct.

Fixes: 0790adeb5675 ("ixgbe/base: support X550em_a device")

Signed-off-by: Stephen Douthit <stephend@silicom-usa.com>
Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index d1d0bd13df..052fdb9639 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -782,4 +782,18 @@ ixgbe_is_sfp(struct ixgbe_hw *hw)
 		return 1;
 	default:
+		/* x550em devices may be SFP, check media type */
+		switch (hw->mac.type) {
+		case ixgbe_mac_X550EM_x:
+		case ixgbe_mac_X550EM_a:
+			switch (ixgbe_get_media_type(hw)) {
+			case ixgbe_media_type_fiber:
+			case ixgbe_media_type_fiber_qsfp:
+				return 1;
+			default:
+				break;
+			}
+		default:
+			break;
+		}
 		return 0;
 	}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.790548509 +0000
+++ 0014-net-ixgbe-fix-FSP-check-for-X550EM-devices.patch	2022-03-08 13:55:28.408314920 +0000
@@ -1 +1 @@
-From 05271b99a93ae306fe4abe09fa561f0220469724 Mon Sep 17 00:00:00 2001
+From 04134338465957566ff35028bba8363743e600af Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 05271b99a93ae306fe4abe09fa561f0220469724 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 7643842560..2da3f67bbc 100644
+index d1d0bd13df..052fdb9639 100644


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

* patch 'net/iavf: support NAT-T / UDP encapsulation' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (12 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/ixgbe: fix FSP check for X550EM devices' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/iavf: fix function pointer in multi-process' " Kevin Traynor
                   ` (29 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 9b441b496390b1109fd97a6d4366030304aafeb6 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Mon, 28 Feb 2022 15:00:22 +0000
Subject: [PATCH] net/iavf: support NAT-T / UDP encapsulation

[ upstream commit 578da1bd2025419f8d0fef420770cbdf419b4c29 ]

Add support for NAT-T / UDP encapsulated ESP.
This fixes the inline crypto feature for iAVF which will not
function properly without setting the UDP encapsulation options.

Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/common/iavf/virtchnl_inline_ipsec.h |  9 +++++++++
 drivers/net/iavf/iavf_ipsec_crypto.c        | 16 +++++++++++++---
 drivers/net/iavf/iavf_ipsec_crypto.h        |  4 +++-
 3 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/drivers/common/iavf/virtchnl_inline_ipsec.h b/drivers/common/iavf/virtchnl_inline_ipsec.h
index 1e9134501e..2f4bf15725 100644
--- a/drivers/common/iavf/virtchnl_inline_ipsec.h
+++ b/drivers/common/iavf/virtchnl_inline_ipsec.h
@@ -447,4 +447,13 @@ struct virtchnl_ipsec_sp_cfg {
 	/* Set TC (congestion domain) if true. For future use. */
 	u8 set_tc;
+
+	/* 0 for NAT-T unsupported, 1 for NAT-T supported */
+	u8 is_udp;
+
+	/* reserved */
+	u8 reserved;
+
+	/* NAT-T UDP port number. Only valid in case NAT-T supported */
+	u16 udp_port;
 } __rte_packed;
 
diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c
index a63e42f29a..d6875eb6aa 100644
--- a/drivers/net/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/iavf/iavf_ipsec_crypto.c
@@ -737,5 +737,7 @@ iavf_ipsec_crypto_inbound_security_policy_add(struct iavf_adapter *adapter,
 	rte_be32_t v4_dst_addr,
 	uint8_t *v6_dst_addr,
-	uint8_t drop)
+	uint8_t drop,
+	bool is_udp,
+	uint16_t udp_port)
 {
 	struct inline_ipsec_msg *request = NULL, *response = NULL;
@@ -782,4 +784,6 @@ iavf_ipsec_crypto_inbound_security_policy_add(struct iavf_adapter *adapter,
 	request->ipsec_data.sp_cfg->set_tc = 0;
 	request->ipsec_data.sp_cfg->cgd = 0;
+	request->ipsec_data.sp_cfg->is_udp = is_udp;
+	request->ipsec_data.sp_cfg->udp_port = htons(udp_port);
 
 	response_len = sizeof(struct inline_ipsec_msg) +
@@ -1626,4 +1630,5 @@ struct iavf_ipsec_flow_item {
 	};
 	struct rte_udp_hdr udp_hdr;
+	uint8_t is_udp;
 };
 
@@ -1738,4 +1743,5 @@ iavf_ipsec_flow_item_parse(struct rte_eth_dev *ethdev,
 				pattern[2].spec,
 			&ipsec_flow->udp_hdr);
+		ipsec_flow->is_udp = true;
 		ipsec_flow->spi =
 			((const struct rte_flow_item_esp *)
@@ -1807,5 +1813,7 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad,
 			ipsec_flow->ipv4_hdr.dst_addr,
 			NULL,
-			0);
+			0,
+			ipsec_flow->is_udp,
+			ipsec_flow->udp_hdr.dst_port);
 	} else {
 		ipsec_flow->id =
@@ -1815,5 +1823,7 @@ iavf_ipsec_flow_create(struct iavf_adapter *ad,
 			0,
 			ipsec_flow->ipv6_hdr.dst_addr,
-			0);
+			0,
+			ipsec_flow->is_udp,
+			ipsec_flow->udp_hdr.dst_port);
 	}
 
diff --git a/drivers/net/iavf/iavf_ipsec_crypto.h b/drivers/net/iavf/iavf_ipsec_crypto.h
index 687541077a..8ea0f9540e 100644
--- a/drivers/net/iavf/iavf_ipsec_crypto.h
+++ b/drivers/net/iavf/iavf_ipsec_crypto.h
@@ -146,5 +146,7 @@ iavf_ipsec_crypto_inbound_security_policy_add(struct iavf_adapter *adapter,
 	rte_be32_t v4_dst_addr,
 	uint8_t *v6_dst_addr,
-	uint8_t drop);
+	uint8_t drop,
+	bool is_udp,
+	uint16_t udp_port);
 
 /**
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.814465021 +0000
+++ 0015-net-iavf-support-NAT-T-UDP-encapsulation.patch	2022-03-08 13:55:28.410314926 +0000
@@ -1 +1 @@
-From 578da1bd2025419f8d0fef420770cbdf419b4c29 Mon Sep 17 00:00:00 2001
+From 9b441b496390b1109fd97a6d4366030304aafeb6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 578da1bd2025419f8d0fef420770cbdf419b4c29 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/iavf: fix function pointer in multi-process' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (13 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/iavf: support NAT-T / UDP encapsulation' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/mlx5: fix indexed pool fetch overlap' " Kevin Traynor
                   ` (28 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Steve Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From c431fe062378e7f3453aa41ffd7686230f63be8f Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 28 Feb 2022 09:48:59 +0000
Subject: [PATCH] net/iavf: fix function pointer in multi-process

[ upstream commit 0ed16e01313e1f8930dc6a52b22159b20269d4e0 ]

This patch uses the index value to call the function, instead of the
function pointer assignment to save the selection of Receive Flex
Descriptor profile ID.

Otherwise the secondary process will run with wrong function address
from primary process.

Fixes: 12b435bf8f2f ("net/iavf: support flex desc metadata extraction")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 40 +++++++++++++++++++-----------------
 drivers/net/iavf/iavf_rxtx.h |  2 --
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 29ab1b84f2..60d6b20004 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -477,52 +477,54 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct iavf_rx_queue *rxq,
 }
 
+static const
+iavf_rxd_to_pkt_fields_t rxd_to_pkt_fields_ops[] = {
+	[IAVF_RXDID_COMMS_AUX_VLAN] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
+	[IAVF_RXDID_COMMS_AUX_IPV4] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
+	[IAVF_RXDID_COMMS_AUX_IPV6] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
+	[IAVF_RXDID_COMMS_AUX_IPV6_FLOW] =
+		iavf_rxd_to_pkt_fields_by_comms_aux_v1,
+	[IAVF_RXDID_COMMS_AUX_TCP] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
+	[IAVF_RXDID_COMMS_AUX_IP_OFFSET] =
+		iavf_rxd_to_pkt_fields_by_comms_aux_v2,
+	[IAVF_RXDID_COMMS_IPSEC_CRYPTO] =
+		iavf_rxd_to_pkt_fields_by_comms_aux_v2,
+	[IAVF_RXDID_COMMS_OVS_1] = iavf_rxd_to_pkt_fields_by_comms_ovs,
+};
+
 static void
 iavf_select_rxd_to_pkt_fields_handler(struct iavf_rx_queue *rxq, uint32_t rxdid)
 {
+	rxq->rxdid = rxdid;
+
 	switch (rxdid) {
 	case IAVF_RXDID_COMMS_AUX_VLAN:
 		rxq->xtr_ol_flag = rte_pmd_ifd_dynflag_proto_xtr_vlan_mask;
-		rxq->rxd_to_pkt_fields =
-			iavf_rxd_to_pkt_fields_by_comms_aux_v1;
 		break;
 	case IAVF_RXDID_COMMS_AUX_IPV4:
 		rxq->xtr_ol_flag = rte_pmd_ifd_dynflag_proto_xtr_ipv4_mask;
-		rxq->rxd_to_pkt_fields =
-			iavf_rxd_to_pkt_fields_by_comms_aux_v1;
 		break;
 	case IAVF_RXDID_COMMS_AUX_IPV6:
 		rxq->xtr_ol_flag = rte_pmd_ifd_dynflag_proto_xtr_ipv6_mask;
-		rxq->rxd_to_pkt_fields =
-			iavf_rxd_to_pkt_fields_by_comms_aux_v1;
 		break;
 	case IAVF_RXDID_COMMS_AUX_IPV6_FLOW:
 		rxq->xtr_ol_flag =
 			rte_pmd_ifd_dynflag_proto_xtr_ipv6_flow_mask;
-		rxq->rxd_to_pkt_fields =
-			iavf_rxd_to_pkt_fields_by_comms_aux_v1;
 		break;
 	case IAVF_RXDID_COMMS_AUX_TCP:
 		rxq->xtr_ol_flag = rte_pmd_ifd_dynflag_proto_xtr_tcp_mask;
-		rxq->rxd_to_pkt_fields =
-			iavf_rxd_to_pkt_fields_by_comms_aux_v1;
 		break;
 	case IAVF_RXDID_COMMS_AUX_IP_OFFSET:
 		rxq->xtr_ol_flag =
 			rte_pmd_ifd_dynflag_proto_xtr_ip_offset_mask;
-		rxq->rxd_to_pkt_fields =
-			iavf_rxd_to_pkt_fields_by_comms_aux_v2;
 		break;
 	case IAVF_RXDID_COMMS_IPSEC_CRYPTO:
 		rxq->xtr_ol_flag =
 			rte_pmd_ifd_dynflag_proto_xtr_ipsec_crypto_said_mask;
-		rxq->rxd_to_pkt_fields =
-			iavf_rxd_to_pkt_fields_by_comms_aux_v2;
 		break;
 	case IAVF_RXDID_COMMS_OVS_1:
-		rxq->rxd_to_pkt_fields = iavf_rxd_to_pkt_fields_by_comms_ovs;
 		break;
 	default:
 		/* update this according to the RXDID for FLEX_DESC_NONE */
-		rxq->rxd_to_pkt_fields = iavf_rxd_to_pkt_fields_by_comms_ovs;
+		rxq->rxdid = IAVF_RXDID_COMMS_OVS_1;
 		break;
 	}
@@ -1485,5 +1487,5 @@ iavf_recv_pkts_flex_rxd(void *rx_queue,
 		iavf_flex_rxd_to_ipsec_crypto_status(rxm, &rxd,
 				&rxq->stats.ipsec_crypto);
-		rxq->rxd_to_pkt_fields(rxq, rxm, &rxd);
+		rxd_to_pkt_fields_ops[rxq->rxdid](rxq, rxm, &rxd);
 		pkt_flags = iavf_flex_rxd_error_to_pkt_flags(rx_stat_err0);
 		rxm->ol_flags |= pkt_flags;
@@ -1629,5 +1631,5 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
 		iavf_flex_rxd_to_ipsec_crypto_status(first_seg, &rxd,
 				&rxq->stats.ipsec_crypto);
-		rxq->rxd_to_pkt_fields(rxq, first_seg, &rxd);
+		rxd_to_pkt_fields_ops[rxq->rxdid](rxq, first_seg, &rxd);
 		pkt_flags = iavf_flex_rxd_error_to_pkt_flags(rx_stat_err0);
 
@@ -1887,5 +1889,5 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
 			iavf_flex_rxd_to_ipsec_crypto_status(mb, &rxdp[j],
 				&rxq->stats.ipsec_crypto);
-			rxq->rxd_to_pkt_fields(rxq, mb, &rxdp[j]);
+			rxd_to_pkt_fields_ops[rxq->rxdid](rxq, mb, &rxdp[j]);
 			stat_err0 = rte_le_to_cpu_16(rxdp[j].wb.status_error0);
 			pkt_flags = iavf_flex_rxd_error_to_pkt_flags(stat_err0);
diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index b610176b30..bf8aebbce8 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -218,6 +218,4 @@ struct iavf_rx_queue {
 	uint64_t xtr_ol_flag;
 		/* flexible descriptor metadata extraction offload flag */
-	iavf_rxd_to_pkt_fields_t rxd_to_pkt_fields;
-				/* handle flexible descriptor by RXDID */
 	struct iavf_rx_queue_stats stats;
 	uint64_t offloads;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.834876202 +0000
+++ 0016-net-iavf-fix-function-pointer-in-multi-process.patch	2022-03-08 13:55:28.413314934 +0000
@@ -1 +1 @@
-From 0ed16e01313e1f8930dc6a52b22159b20269d4e0 Mon Sep 17 00:00:00 2001
+From c431fe062378e7f3453aa41ffd7686230f63be8f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ed16e01313e1f8930dc6a52b22159b20269d4e0 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index ca54c70dd0..cb779879cb 100644
+index 29ab1b84f2..60d6b20004 100644
@@ -27 +28 @@
-@@ -476,52 +476,54 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct iavf_rx_queue *rxq,
+@@ -477,52 +477,54 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct iavf_rx_queue *rxq,
@@ -98 +99 @@
-@@ -1484,5 +1486,5 @@ iavf_recv_pkts_flex_rxd(void *rx_queue,
+@@ -1485,5 +1487,5 @@ iavf_recv_pkts_flex_rxd(void *rx_queue,
@@ -105 +106 @@
-@@ -1628,5 +1630,5 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -1629,5 +1631,5 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -112 +113 @@
-@@ -1886,5 +1888,5 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
+@@ -1887,5 +1889,5 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)


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

* patch 'net/mlx5: fix indexed pool fetch overlap' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (14 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/iavf: fix function pointer in multi-process' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/mlx5: fix destroying empty matchers list' " Kevin Traynor
                   ` (27 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From fc4aef6adefeb92cb0ef4ca0aca5f9b2b6333763 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Wed, 23 Feb 2022 08:26:11 +0200
Subject: [PATCH] net/mlx5: fix indexed pool fetch overlap

[ upstream commit 7bc528bac95a00e2462ae76b1f9e8610d4d67477 ]

For indexed pool with local cache, when a new trunk is allocated,
half of the trunk's index was fetched to the local cache. In case
of local cache size was less then half of the trunk size, memory
overlap happened.

This commit adds the check of the fetch size, if local cache size
is less than fetch size, adjust the fetch size to be local cache
size.

Fixes: d15c0946beea ("net/mlx5: add indexed pool local cache")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_utils.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c
index be33af96fe..4115a2ad77 100644
--- a/drivers/net/mlx5/mlx5_utils.c
+++ b/drivers/net/mlx5/mlx5_utils.c
@@ -341,4 +341,6 @@ check_again:
 	ts_idx = mlx5_trunk_idx_offset_get(pool, trunk_idx) + 1;
 	fetch_size = trunk->free >> 1;
+	if (fetch_size > pool->cfg.per_core_cache)
+		fetch_size = trunk->free - pool->cfg.per_core_cache;
 	for (i = 0; i < fetch_size; i++)
 		lc->idx[i] = ts_idx + i;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.856463933 +0000
+++ 0017-net-mlx5-fix-indexed-pool-fetch-overlap.patch	2022-03-08 13:55:28.414314937 +0000
@@ -1 +1 @@
-From 7bc528bac95a00e2462ae76b1f9e8610d4d67477 Mon Sep 17 00:00:00 2001
+From fc4aef6adefeb92cb0ef4ca0aca5f9b2b6333763 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7bc528bac95a00e2462ae76b1f9e8610d4d67477 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/mlx5: fix destroying empty matchers list' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (15 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/mlx5: fix indexed pool fetch overlap' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/mlx5: fix shared counter flag in flow validation' " Kevin Traynor
                   ` (26 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Adham Masarwah
  Cc: Viacheslav Ovsiienko, Tal Shnaiderman, Idan Hackmon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 10af65574b7f862f49744b6cb8a6b8e5aa77e1cb Mon Sep 17 00:00:00 2001
From: Adham Masarwah <adham@nvidia.com>
Date: Wed, 23 Feb 2022 11:32:05 +0200
Subject: [PATCH] net/mlx5: fix destroying empty matchers list

[ upstream commit dc065d6efdf1cabe042944aac457fa19235ad632 ]

The table remove callback function is trying to destroy the
matchers list associated with table entries without checking
if the list is valid, which causes null pointer dereference.
Fixed by validating the matchers list before destroying it.

Issue can be reproduced with testpmd on Windows, when you run:
port close all

Fixes: 1872635570be ("net/mlx5: make matcher list thread safe")

Signed-off-by: Adham Masarwah <adham@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Tested-by: Idan Hackmon <idanhac@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 5225978a3b..43d8db14ad 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -10519,5 +10519,6 @@ flow_dv_tbl_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry)
 			tbl_data->group_id);
 	}
-	mlx5_list_destroy(tbl_data->matchers);
+	if (tbl_data->matchers)
+		mlx5_list_destroy(tbl_data->matchers);
 	mlx5_ipool_free(sh->ipool[MLX5_IPOOL_JUMP], tbl_data->idx);
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.875916537 +0000
+++ 0018-net-mlx5-fix-destroying-empty-matchers-list.patch	2022-03-08 13:55:28.429314978 +0000
@@ -1 +1 @@
-From dc065d6efdf1cabe042944aac457fa19235ad632 Mon Sep 17 00:00:00 2001
+From 10af65574b7f862f49744b6cb8a6b8e5aa77e1cb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dc065d6efdf1cabe042944aac457fa19235ad632 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index ae88a1cc29..caee0f7c91 100644
+index 5225978a3b..43d8db14ad 100644
@@ -29 +30 @@
-@@ -10621,5 +10621,6 @@ flow_dv_tbl_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry)
+@@ -10519,5 +10519,6 @@ flow_dv_tbl_remove_cb(void *tool_ctx, struct mlx5_list_entry *entry)


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

* patch 'net/mlx5: fix shared counter flag in flow validation' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (16 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/mlx5: fix destroying empty matchers list' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/mlx5: fix check in count action " Kevin Traynor
                   ` (25 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 4de91bc1a8a19ccdea3cce67dff939ab34cf0275 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Mon, 28 Feb 2022 09:09:53 +0200
Subject: [PATCH] net/mlx5: fix shared counter flag in flow validation

[ upstream commit 8f53c7cf2660a2a5d2a61fefe987491bce50edde ]

The AGE action can be implemented by either counters or ASO mechanism.
When user ask count action in the flow rule, AGE action is implemented
by the same counter. However, if user ask indirect count action, it
cannot be used for AGE.

The flow_dv_validate() function has a flag named "shared_count" which
indicates whether AGE action validate depends on ASO support or not.
This flag is initialized to false and is updated if there is indirect
count action in the action list.
This flag is mistakenly set within the loop that reads the action list
and in each iteration it is reinitialized to false, regardless of the
existence of an indirect count action in the list.

This patch moves the flag initialization out of the loop.

Fixes: f3191849f2c2 ("net/mlx5: support flow count action handle")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 43d8db14ad..268673a265 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -6916,4 +6916,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	const struct rte_flow_item *port_id_item = NULL;
 	bool def_policy = false;
+	bool shared_count = false;
 	uint16_t udp_dport = 0;
 
@@ -7286,5 +7287,4 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) {
 		int type = actions->type;
-		bool shared_count = false;
 
 		if (!mlx5_flow_os_action_supported(type))
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.906524884 +0000
+++ 0019-net-mlx5-fix-shared-counter-flag-in-flow-validation.patch	2022-03-08 13:55:28.443315017 +0000
@@ -1 +1 @@
-From 8f53c7cf2660a2a5d2a61fefe987491bce50edde Mon Sep 17 00:00:00 2001
+From 4de91bc1a8a19ccdea3cce67dff939ab34cf0275 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f53c7cf2660a2a5d2a61fefe987491bce50edde ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index caee0f7c91..20e0af29c8 100644
+index 43d8db14ad..268673a265 100644
@@ -34 +35 @@
-@@ -6908,4 +6908,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -6916,4 +6916,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -40 +41 @@
-@@ -7285,5 +7286,4 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7286,5 +7287,4 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,


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

* patch 'net/mlx5: fix check in count action validation' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (17 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/mlx5: fix shared counter flag in flow validation' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/txgbe: fix queue statistics mapping' " Kevin Traynor
                   ` (24 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From e28e67f7d2b3c0f1ffc46da2943c86669a85fade Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Mon, 28 Feb 2022 09:09:54 +0200
Subject: [PATCH] net/mlx5: fix check in count action validation

[ upstream commit 57461cab161ac2c8cc1a96711efba9a8fa519358 ]

The AGE action can be implemented by either counters or ASO mechanism.
ASO is more efficient than generating counters just for the purpose of
aging, so when ASO is supported its use is preferable. On the other
hand, when there is count in the list of actions, the counter is already
generated, and it is best to use it for aging even if ASO is supported.
On the other hand, when the count action is "indirect", it cannot be
used for aging since it may be updated from other flow rules in which it
participates.

Checking whether ASO is supported depends on both the capability of the
device and the flow rule group number, ASO is not supported for group 0.
However, the flow_dv_validate() function only checks the capability and
ignores the group, allowing inadmissible flow rules.
For example, when the device supports ASO and a flow rule is set that
combines an indirect counter with aging for group 0, the rule should be
rejected, but it is created and does not function properly.

This patch updates the counter validation which will also consider the
group number when deciding if there is ASO support.

Fixes: daed4b6e3db2 ("net/mlx5: use aging by counter when counter exists")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 41 +++++++++++++++++++++++++--------
 1 file changed, 31 insertions(+), 10 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 268673a265..7d22ac388e 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -3282,4 +3282,23 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
 }
 
+/**
+ * Indicates whether ASO aging is supported.
+ *
+ * @param[in] sh
+ *   Pointer to shared device context structure.
+ * @param[in] attr
+ *   Attributes of flow that includes AGE action.
+ *
+ * @return
+ *   True when ASO aging is supported, false otherwise.
+ */
+static inline bool
+flow_hit_aso_supported(const struct mlx5_dev_ctx_shared *sh,
+		const struct rte_flow_attr *attr)
+{
+	MLX5_ASSERT(sh && attr);
+	return (sh->flow_hit_aso_en && (attr->transfer || attr->group));
+}
+
 /**
  * Validate count action.
@@ -3291,4 +3310,6 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
  * @param[in] action_flags
  *   Holds the actions detected until now.
+ * @param[in] attr
+ *   Attributes of flow that includes this action.
  * @param[out] error
  *   Pointer to error structure.
@@ -3300,4 +3321,5 @@ static int
 flow_dv_validate_action_count(struct rte_eth_dev *dev, bool shared,
 			      uint64_t action_flags,
+			      const struct rte_flow_attr *attr,
 			      struct rte_flow_error *error)
 {
@@ -3311,8 +3333,8 @@ flow_dv_validate_action_count(struct rte_eth_dev *dev, bool shared,
 					  "duplicate count actions set");
 	if (shared && (action_flags & MLX5_FLOW_ACTION_AGE) &&
-	    !priv->sh->flow_hit_aso_en)
+	    !flow_hit_aso_supported(priv->sh, attr))
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-					  "old age and shared count combination is not supported");
+					  "old age and indirect count combination is not supported");
 #ifdef HAVE_IBV_FLOW_DEVX_COUNTERS
 	return 0;
@@ -5682,5 +5704,5 @@ flow_dv_validate_action_sample(uint64_t *action_flags,
 			ret = flow_dv_validate_action_count
 				(dev, false, *action_flags | sub_action_flags,
-				 error);
+				 attr, error);
 			if (ret < 0)
 				return ret;
@@ -7443,5 +7465,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			ret = flow_dv_validate_action_count(dev, shared_count,
 							    action_flags,
-							    error);
+							    attr, error);
 			if (ret < 0)
 				return ret;
@@ -7758,7 +7780,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			/*
 			 * Validate the regular AGE action (using counter)
-			 * mutual exclusion with share counter actions.
+			 * mutual exclusion with indirect counter actions.
 			 */
-			if (!priv->sh->flow_hit_aso_en) {
+			if (!flow_hit_aso_supported(priv->sh, attr)) {
 				if (shared_count)
 					return rte_flow_error_set
@@ -7766,5 +7788,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 						RTE_FLOW_ERROR_TYPE_ACTION,
 						NULL,
-						"old age and shared count combination is not supported");
+						"old age and indirect count combination is not supported");
 				if (sample_count)
 					return rte_flow_error_set
@@ -13313,6 +13335,5 @@ flow_dv_translate(struct rte_eth_dev *dev,
 			if (action_flags & MLX5_FLOW_ACTION_AGE) {
 				if ((non_shared_age && count) ||
-				    !(priv->sh->flow_hit_aso_en &&
-				      (attr->group || attr->transfer))) {
+				    !flow_hit_aso_supported(priv->sh, attr)) {
 					/* Creates age by counters. */
 					cnt_act = flow_dv_prepare_counter
@@ -17646,5 +17667,5 @@ flow_dv_action_validate(struct rte_eth_dev *dev,
 		return flow_dv_validate_action_age(0, action, dev, err);
 	case RTE_FLOW_ACTION_TYPE_COUNT:
-		return flow_dv_validate_action_count(dev, true, 0, err);
+		return flow_dv_validate_action_count(dev, true, 0, NULL, err);
 	case RTE_FLOW_ACTION_TYPE_CONNTRACK:
 		if (!priv->sh->ct_aso_en)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.936425822 +0000
+++ 0020-net-mlx5-fix-check-in-count-action-validation.patch	2022-03-08 13:55:28.457315056 +0000
@@ -1 +1 @@
-From 57461cab161ac2c8cc1a96711efba9a8fa519358 Mon Sep 17 00:00:00 2001
+From e28e67f7d2b3c0f1ffc46da2943c86669a85fade Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57461cab161ac2c8cc1a96711efba9a8fa519358 ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
@@ -36 +37 @@
-index 20e0af29c8..0b9df5f6f1 100644
+index 268673a265..7d22ac388e 100644
@@ -39 +40 @@
-@@ -3278,4 +3278,23 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
+@@ -3282,4 +3282,23 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
@@ -63 +64 @@
-@@ -3287,4 +3306,6 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
+@@ -3291,4 +3310,6 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *dev,
@@ -70 +71 @@
-@@ -3296,4 +3317,5 @@ static int
+@@ -3300,4 +3321,5 @@ static int
@@ -76 +77 @@
-@@ -3307,8 +3329,8 @@ flow_dv_validate_action_count(struct rte_eth_dev *dev, bool shared,
+@@ -3311,8 +3333,8 @@ flow_dv_validate_action_count(struct rte_eth_dev *dev, bool shared,
@@ -87 +88 @@
-@@ -5680,5 +5702,5 @@ flow_dv_validate_action_sample(uint64_t *action_flags,
+@@ -5682,5 +5704,5 @@ flow_dv_validate_action_sample(uint64_t *action_flags,
@@ -94 +95 @@
-@@ -7442,5 +7464,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7443,5 +7465,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -101 +102 @@
-@@ -7757,7 +7779,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7758,7 +7780,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -111 +112 @@
-@@ -7765,5 +7787,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7766,5 +7788,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -118 +119 @@
-@@ -13417,6 +13439,5 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -13313,6 +13335,5 @@ flow_dv_translate(struct rte_eth_dev *dev,
@@ -126 +127 @@
-@@ -17711,5 +17732,5 @@ flow_dv_action_validate(struct rte_eth_dev *dev,
+@@ -17646,5 +17667,5 @@ flow_dv_action_validate(struct rte_eth_dev *dev,


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

* patch 'net/txgbe: fix queue statistics mapping' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (18 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/mlx5: fix check in count action " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/kni: fix config initialization' " Kevin Traynor
                   ` (23 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Weiguo Li; +Cc: Jiawen Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 0316ab01179c34b97d760a32a82975b2960ef117 Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Tue, 1 Mar 2022 14:08:30 +0800
Subject: [PATCH] net/txgbe: fix queue statistics mapping

[ upstream commit f69467177fa34afaeeeae81ad83142121ee1bc98 ]

Since boolean value is in 0 and 1, it's strange to combines a boolean
value with a bit operator.

Thus it's highly possible a typo error with "if (A & !B)", and more
probably to use "if (A & ~B)" instead.

Fixes: c1d4e9d37abd ("net/txgbe: add queue stats mapping")

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Acked-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 1d1dd430dc..49948e62bc 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -377,5 +377,5 @@ txgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
 		return -ENOSYS;
 
-	if (stat_idx & !QMAP_FIELD_RESERVED_BITS_MASK)
+	if (stat_idx & ~QMAP_FIELD_RESERVED_BITS_MASK)
 		return -EIO;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.966163873 +0000
+++ 0021-net-txgbe-fix-queue-statistics-mapping.patch	2022-03-08 13:55:28.461315067 +0000
@@ -1 +1 @@
-From f69467177fa34afaeeeae81ad83142121ee1bc98 Mon Sep 17 00:00:00 2001
+From 0316ab01179c34b97d760a32a82975b2960ef117 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f69467177fa34afaeeeae81ad83142121ee1bc98 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 19d4444748..f0994f028d 100644
+index 1d1dd430dc..49948e62bc 100644


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

* patch 'net/kni: fix config initialization' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (19 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/txgbe: fix queue statistics mapping' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'doc: fix typos and punctuation in flow API guide' " Kevin Traynor
                   ` (22 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Harold Huang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From a6025189d23ece5b16198364c0c75726a55d9181 Mon Sep 17 00:00:00 2001
From: Harold Huang <baymaxhuang@gmail.com>
Date: Thu, 3 Mar 2022 10:18:03 +0800
Subject: [PATCH] net/kni: fix config initialization

[ upstream commit dcd398f9466fc42f09e5c725c3188d8c41bd3fbf ]

When kni driver calls eth_kni_start to start device, some fields such as
min_mtu and max_mtu of rte_kni_conf are not initialized. It will cause
kni_ioctl_create create a kni netdevice with a random min_mtu and
max_mtu value. This is unexpected and sometimes we could not change the
kni device mtu with ip link command.

Fixes: ff1e35fb5f83 ("kni: calculate MTU from mbuf size")

Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/kni/rte_eth_kni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index c428caf441..0532de5315 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -125,5 +125,5 @@ eth_kni_start(struct rte_eth_dev *dev)
 	uint16_t port_id = dev->data->port_id;
 	struct rte_mempool *mb_pool;
-	struct rte_kni_conf conf;
+	struct rte_kni_conf conf = {{0}};
 	const char *name = dev->device->name + 4; /* remove net_ */
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:28.988071350 +0000
+++ 0022-net-kni-fix-config-initialization.patch	2022-03-08 13:55:28.461315067 +0000
@@ -1 +1 @@
-From dcd398f9466fc42f09e5c725c3188d8c41bd3fbf Mon Sep 17 00:00:00 2001
+From a6025189d23ece5b16198364c0c75726a55d9181 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dcd398f9466fc42f09e5c725c3188d8c41bd3fbf ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* patch 'doc: fix typos and punctuation in flow API guide' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (20 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/kni: fix config initialization' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/mlx5: fix GRE item translation in Verbs' " Kevin Traynor
                   ` (21 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Ali Alnubani; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 37a67dbb49719b18889d7b0cd4b62d8773ef176e Mon Sep 17 00:00:00 2001
From: Ali Alnubani <alialnu@nvidia.com>
Date: Tue, 1 Mar 2022 14:17:09 +0200
Subject: [PATCH] doc: fix typos and punctuation in flow API guide

[ upstream commit 00373909c8f0377f03969eabf530293a7af9e23f ]

This fixes typos and punctuation in the rte flow API guide.

Fixes: 2f82d143fb31 ("ethdev: add group jump action")
Fixes: 4d73b6fb9907 ("doc: add generic flow API guide")

Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 doc/guides/prog_guide/rte_flow.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index b4aa9c47c2..714769d0e4 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -61,10 +61,10 @@ group they belong to. All flow rules in a given group are thus processed within
 the context of that group. Groups are not linked by default, so the logical
 hierarchy of groups must be explicitly defined by flow rules themselves in each
-group using the JUMP action to define the next group to redirect too. Only flow
-rules defined in the default group 0 are guarantee to be matched against, this
+group using the JUMP action to define the next group to redirect to. Only flow
+rules defined in the default group 0 are guaranteed to be matched against. This
 makes group 0 the origin of any group hierarchy defined by an application.
 
 Support for multiple actions per rule may be implemented internally on top
-of non-default hardware priorities, as a result both features may not be
+of non-default hardware priorities. As a result, both features may not be
 simultaneously available to applications.
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.007541015 +0000
+++ 0023-doc-fix-typos-and-punctuation-in-flow-API-guide.patch	2022-03-08 13:55:28.464315075 +0000
@@ -1 +1 @@
-From 00373909c8f0377f03969eabf530293a7af9e23f Mon Sep 17 00:00:00 2001
+From 37a67dbb49719b18889d7b0cd4b62d8773ef176e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 00373909c8f0377f03969eabf530293a7af9e23f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f2deef95d8..588914b231 100644
+index b4aa9c47c2..714769d0e4 100644


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

* patch 'net/mlx5: fix GRE item translation in Verbs' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (21 preceding siblings ...)
  2022-03-08 14:14 ` patch 'doc: fix typos and punctuation in flow API guide' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/mlx5: reduce flex item flow handle size' " Kevin Traynor
                   ` (20 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From ac14a09ded84ddabd7bb3194297191646179181c Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Mon, 28 Feb 2022 11:53:01 +0200
Subject: [PATCH] net/mlx5: fix GRE item translation in Verbs

[ upstream commit df4986559f24fbf669aeaa33e5e23563f7fc90b3 ]

GRE item translation must set inner protocol value.
For that reason the item is not translated inplace when PMD
translation iterates over flow items, but moved after the loop, when
all inner types are discovered.

If PMD does not translate GRE flow item inside the translation loop
it must save the GRE item for access outside the loop.

Fixes: 985b479267aa ("net/mlx5: fix GRE protocol type translation for Verbs")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_verbs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index 90ccb9aaff..66a2711e8b 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -1680,4 +1680,5 @@ flow_verbs_translate(struct rte_eth_dev *dev,
 	struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace();
 	struct mlx5_flow_rss_desc *rss_desc;
+	const struct rte_flow_item *tunnel_item = NULL;
 
 	MLX5_ASSERT(wks);
@@ -1819,4 +1820,5 @@ flow_verbs_translate(struct rte_eth_dev *dev,
 			subpriority = MLX5_TUNNEL_PRIO_GET(rss_desc);
 			item_flags |= MLX5_FLOW_LAYER_GRE;
+			tunnel_item = items;
 			break;
 		case RTE_FLOW_ITEM_TYPE_MPLS:
@@ -1833,5 +1835,6 @@ flow_verbs_translate(struct rte_eth_dev *dev,
 	}
 	if (item_flags & MLX5_FLOW_LAYER_GRE)
-		flow_verbs_translate_item_gre(dev_flow, items, item_flags);
+		flow_verbs_translate_item_gre(dev_flow, tunnel_item,
+					      item_flags);
 	dev_flow->handle->layers = item_flags;
 	/* Other members of attr will be ignored. */
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.028810204 +0000
+++ 0024-net-mlx5-fix-GRE-item-translation-in-Verbs.patch	2022-03-08 13:55:28.465315078 +0000
@@ -1 +1 @@
-From df4986559f24fbf669aeaa33e5e23563f7fc90b3 Mon Sep 17 00:00:00 2001
+From ac14a09ded84ddabd7bb3194297191646179181c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit df4986559f24fbf669aeaa33e5e23563f7fc90b3 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index f08aa7a770..85f0788222 100644
+index 90ccb9aaff..66a2711e8b 100644


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

* patch 'net/mlx5: reduce flex item flow handle size' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (22 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/mlx5: fix GRE item translation in Verbs' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/mlx5: fix matcher priority with ICMP or ICMPv6' " Kevin Traynor
                   ` (19 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 949a09c9ba237e3820eed2595738ef69a721075a Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Mon, 28 Feb 2022 12:01:24 +0200
Subject: [PATCH] net/mlx5: reduce flex item flow handle size

[ upstream commit cfe337e7157e7b8f9e3d136f5a1882d2af8a1dc0 ]

Reduce flex item flow handle size from 32 bits to 8 bits for each
flow.
The patch will save memory in setups with millions of flows.

Fixes: a23e9b6e3ee9 ("net/mlx5: handle flex item in flows")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.h    | 2 +-
 drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 7fec79afb3..f8bce92e9f 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -699,5 +699,4 @@ struct mlx5_flow_handle {
 	uint32_t is_meter_flow_id:1; /**< Indicate if flow_id is for meter. */
 	uint32_t fate_action:3; /**< Fate action type. */
-	uint32_t flex_item; /**< referenced Flex Item bitmask. */
 	union {
 		uint32_t rix_hrxq; /**< Hash Rx queue object index. */
@@ -715,4 +714,5 @@ struct mlx5_flow_handle {
 	struct mlx5_flow_handle_dv dvh;
 #endif
+	uint8_t flex_item; /**< referenced Flex Item bitmask. */
 } __rte_packed;
 
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 7d22ac388e..ce0d5b1e37 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -10197,5 +10197,5 @@ flow_dv_translate_item_flex(struct rte_eth_dev *dev, void *matcher, void *key,
 		if (mlx5_flex_acquire_index(dev, spec->handle, true) != index)
 			MLX5_ASSERT(false);
-		dev_flow->handle->flex_item |= RTE_BIT32(index);
+		dev_flow->handle->flex_item |= (uint8_t)RTE_BIT32(index);
 	}
 	mlx5_flex_flow_translate_item(dev, matcher, key, item, is_inner);
@@ -14536,5 +14536,5 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
 
 			mlx5_flex_release_index(dev, index);
-			dev_handle->flex_item &= ~RTE_BIT32(index);
+			dev_handle->flex_item &= ~(uint8_t)RTE_BIT32(index);
 		}
 		if (dev_handle->dvh.matcher)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.049126827 +0000
+++ 0025-net-mlx5-reduce-flex-item-flow-handle-size.patch	2022-03-08 13:55:28.481315122 +0000
@@ -1 +1 @@
-From cfe337e7157e7b8f9e3d136f5a1882d2af8a1dc0 Mon Sep 17 00:00:00 2001
+From 949a09c9ba237e3820eed2595738ef69a721075a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cfe337e7157e7b8f9e3d136f5a1882d2af8a1dc0 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index e510921a3f..484ce5791e 100644
+index 7fec79afb3..f8bce92e9f 100644
@@ -24 +25 @@
-@@ -701,5 +701,4 @@ struct mlx5_flow_handle {
+@@ -699,5 +699,4 @@ struct mlx5_flow_handle {
@@ -30 +31 @@
-@@ -717,4 +716,5 @@ struct mlx5_flow_handle {
+@@ -715,4 +714,5 @@ struct mlx5_flow_handle {
@@ -37 +38 @@
-index 0b9df5f6f1..c4a9b022b7 100644
+index 7d22ac388e..ce0d5b1e37 100644
@@ -40 +41 @@
-@@ -10299,5 +10299,5 @@ flow_dv_translate_item_flex(struct rte_eth_dev *dev, void *matcher, void *key,
+@@ -10197,5 +10197,5 @@ flow_dv_translate_item_flex(struct rte_eth_dev *dev, void *matcher, void *key,
@@ -47 +48 @@
-@@ -14650,5 +14650,5 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
+@@ -14536,5 +14536,5 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)


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

* patch 'net/mlx5: fix matcher priority with ICMP or ICMPv6' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (23 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/mlx5: reduce flex item flow handle size' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/mlx5: fix flex item header length translation' " Kevin Traynor
                   ` (18 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 80f0ecc2738dbeea117c1c58ba94bfe3161c8759 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Mon, 28 Feb 2022 13:41:49 +0200
Subject: [PATCH] net/mlx5: fix matcher priority with ICMP or ICMPv6

[ upstream commit dfb8c448daaf29a10d6249fc045bd2eef9655684 ]

On TCP/IP-based layered network, ICMP is considered and implemented
as part of layer 3 IP protocol. Actually, it is a user of the IP
protocol and must be encapsulated within IP packets. There is no
layer 4 protocol over ICMP.

The rule with layer 4 should be matched prior to the rule only with
layer 3 pattern when:
  1. Both rules are created in the same table
  2. Both rules could be hit
  3. The rules has the same priority

The steering result of the packet is indeterministic if there are
rules with patterns IP and IP+ICMP in the same table with the same
priority. Like TCP / UDP, a packet should hit the rule with a longer
matching criterion.

By treating the priority of ICMP/ICMPv6 as a layer 4 priority in the
PMD internally, the IP+ICMP will be hit in prior to IP only.

Fixes: d53aa89aea91 ("net/mlx5: support matching on ICMP/ICMP6")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index ce0d5b1e37..7a5f17a8b7 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -13566,4 +13566,5 @@ flow_dv_translate(struct rte_eth_dev *dev,
 			flow_dv_translate_item_icmp(match_mask, match_value,
 						    items, tunnel);
+			matcher.priority = MLX5_PRIORITY_MAP_L4;
 			last_item = MLX5_FLOW_LAYER_ICMP;
 			break;
@@ -13571,4 +13572,5 @@ flow_dv_translate(struct rte_eth_dev *dev,
 			flow_dv_translate_item_icmp6(match_mask, match_value,
 						      items, tunnel);
+			matcher.priority = MLX5_PRIORITY_MAP_L4;
 			last_item = MLX5_FLOW_LAYER_ICMP6;
 			break;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.080401651 +0000
+++ 0026-net-mlx5-fix-matcher-priority-with-ICMP-or-ICMPv6.patch	2022-03-08 13:55:28.495315160 +0000
@@ -1 +1 @@
-From dfb8c448daaf29a10d6249fc045bd2eef9655684 Mon Sep 17 00:00:00 2001
+From 80f0ecc2738dbeea117c1c58ba94bfe3161c8759 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dfb8c448daaf29a10d6249fc045bd2eef9655684 ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index c4a9b022b7..7a7591144a 100644
+index ce0d5b1e37..7a5f17a8b7 100644
@@ -38 +39 @@
-@@ -13676,4 +13676,5 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -13566,4 +13566,5 @@ flow_dv_translate(struct rte_eth_dev *dev,
@@ -44 +45 @@
-@@ -13681,4 +13682,5 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -13571,4 +13572,5 @@ flow_dv_translate(struct rte_eth_dev *dev,


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

* patch 'net/mlx5: fix flex item header length translation' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (24 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/mlx5: fix matcher priority with ICMP or ICMPv6' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/iavf: fix AES-GMAC IV size' " Kevin Traynor
                   ` (17 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 49180a4530d637de5025003e48b0ebecc57059c0 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Tue, 1 Mar 2022 14:28:24 +0200
Subject: [PATCH] net/mlx5: fix flex item header length translation

[ upstream commit 7bda5beead88fbc8717f7cee770bd8d9baf4d20d ]

Flex item API provides support for network header with a fixed and
variable lengths.
When PMD compiles a new flex item object configuration it converts
RTE parameters into matching PMD PARSE_GRAPH parameters and checks
the parameter values against port capabilities.

Current implementation mismatched PARSE_GRAPH configuration fields
for the fixed size header.

Fixes: b293e8e49d78 ("net/mlx5: translate flex item configuration")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_flex.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_flex.c b/drivers/net/mlx5/mlx5_flow_flex.c
index 9413d4d817..3ef46db1f6 100644
--- a/drivers/net/mlx5/mlx5_flow_flex.c
+++ b/drivers/net/mlx5/mlx5_flow_flex.c
@@ -383,13 +383,9 @@ mlx5_flex_translate_length(struct mlx5_hca_flex_attr *attr,
 				(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, NULL,
 				 "unsupported header length field mode (FIXED)");
-		if (attr->header_length_mask_width < field->field_size)
+		if (field->field_size ||
+		    field->offset_mask || field->offset_shift)
 			return rte_flow_error_set
 				(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, NULL,
-				 "header length field width exceeds limit");
-		if (field->offset_shift < 0 ||
-		    field->offset_shift > attr->header_length_mask_width)
-			return rte_flow_error_set
-				(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, NULL,
-				 "invalid header length field shift (FIXED");
+				 "invalid fields for fixed mode");
 		if (field->field_base < 0)
 			return rte_flow_error_set
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.110230291 +0000
+++ 0027-net-mlx5-fix-flex-item-header-length-translation.patch	2022-03-08 13:55:28.496315163 +0000
@@ -1 +1 @@
-From 7bda5beead88fbc8717f7cee770bd8d9baf4d20d Mon Sep 17 00:00:00 2001
+From 49180a4530d637de5025003e48b0ebecc57059c0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7bda5beead88fbc8717f7cee770bd8d9baf4d20d ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 26f0dfa36f..fb08910ddb 100644
+index 9413d4d817..3ef46db1f6 100644


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

* patch 'net/iavf: fix AES-GMAC IV size' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (25 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/mlx5: fix flex item header length translation' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'common/cnxk: fix bitmap usage for TM' " Kevin Traynor
                   ` (16 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 0a15c3ff0082c03b1d0143fa9c5d592b63c03507 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Tue, 1 Mar 2022 13:41:31 +0000
Subject: [PATCH] net/iavf: fix AES-GMAC IV size

[ upstream commit e816a255f7795710e7d9a12029b766c7e72aedf2 ]

Fix AES-GMAC size, set it to the required value, unlike lookaside
where it also includes salt length.

Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ipsec_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c
index d6875eb6aa..b1949cee91 100644
--- a/drivers/net/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/iavf/iavf_ipsec_crypto.c
@@ -615,5 +615,5 @@ set_session_parameter(struct iavf_security_ctx *iavf_sctx,
 			sess->block_sz = get_auth_blocksize(iavf_sctx,
 				conf->crypto_xform->auth.algo);
-			sess->iv_sz = conf->crypto_xform->auth.iv.length;
+			sess->iv_sz = sizeof(uint64_t); /* iv len inc. salt */
 			sess->icv_sz = conf->crypto_xform->auth.digest_length;
 		} else {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.129865090 +0000
+++ 0028-net-iavf-fix-AES-GMAC-IV-size.patch	2022-03-08 13:55:28.497315166 +0000
@@ -1 +1 @@
-From e816a255f7795710e7d9a12029b766c7e72aedf2 Mon Sep 17 00:00:00 2001
+From 0a15c3ff0082c03b1d0143fa9c5d592b63c03507 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e816a255f7795710e7d9a12029b766c7e72aedf2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'common/cnxk: fix bitmap usage for TM' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (26 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/iavf: fix AES-GMAC IV size' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'common/cnxk: fix mbuf data offset for VF' " Kevin Traynor
                   ` (15 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 552ab1729a35c68e4c9c9c3d37370d3e3e058d57 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Thu, 3 Mar 2022 12:30:41 +0530
Subject: [PATCH] common/cnxk: fix bitmap usage for TM

[ upstream commit 66d485fb50d8de4e78deefebdadc4723c2db2ea2 ]

Revert change [1] to return error on case where no slab of free
resources is found. That error check break's a case where
there is a spare schedule queue to be reused that was just
allocated for sake of contiguous static TM nodes.

[1]
Fixes: 14f7e5d4bf2d ("common/cnxk: add missing checks of return values")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/common/cnxk/roc_nix_tm.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/common/cnxk/roc_nix_tm.c b/drivers/common/cnxk/roc_nix_tm.c
index e765fe703c..ebb27a3106 100644
--- a/drivers/common/cnxk/roc_nix_tm.c
+++ b/drivers/common/cnxk/roc_nix_tm.c
@@ -1017,8 +1017,6 @@ nix_tm_assign_hw_id(struct nix *nix, struct nix_tm_node *parent,
 		}
 
-		if (!slab) {
-			if (!plt_bitmap_scan(bmp, &pos, &slab))
-				return -ENOENT;
-		}
+		if (!slab)
+			plt_bitmap_scan(bmp, &pos, &slab);
 
 		if (child->priority == parent->rr_prio && spare_schq != -1) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.149273083 +0000
+++ 0029-common-cnxk-fix-bitmap-usage-for-TM.patch	2022-03-08 13:55:28.498315169 +0000
@@ -1 +1 @@
-From 66d485fb50d8de4e78deefebdadc4723c2db2ea2 Mon Sep 17 00:00:00 2001
+From 552ab1729a35c68e4c9c9c3d37370d3e3e058d57 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 66d485fb50d8de4e78deefebdadc4723c2db2ea2 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 7a17780058..5b70c7bfed 100644
+index e765fe703c..ebb27a3106 100644
@@ -25 +26 @@
-@@ -1043,8 +1043,6 @@ nix_tm_assign_hw_id(struct nix *nix, struct nix_tm_node *parent,
+@@ -1017,8 +1017,6 @@ nix_tm_assign_hw_id(struct nix *nix, struct nix_tm_node *parent,


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

* patch 'common/cnxk: fix mbuf data offset for VF' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (27 preceding siblings ...)
  2022-03-08 14:14 ` patch 'common/cnxk: fix bitmap usage for TM' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'net/ice: fix Tx offload path choice' " Kevin Traynor
                   ` (14 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Harman Kalra; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From c22759e121fb0d1cf8c3ea3b67e3616289c4066e Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Thu, 3 Mar 2022 12:30:42 +0530
Subject: [PATCH] common/cnxk: fix mbuf data offset for VF

[ upstream commit 8f98e3ecc55e02234f8bec7213b0b6a69c086949 ]

If PF has PTP enabled the data offset should be adjusted for VF to
skip extra 8 bytes of timestamp as the MAC inserts 8 bytes before
the ethernet header.

Fixes: c443e0d326e1 ("common/cnxk: support NIX PTP")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/common/cnxk/roc_nix.h     | 1 +
 drivers/common/cnxk/roc_nix_ptp.c | 8 ++++++++
 drivers/common/cnxk/version.map   | 1 +
 drivers/net/cnxk/cnxk_ethdev.c    | 4 ++++
 4 files changed, 14 insertions(+)

diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h
index 69a5e8e7b4..986aac9e57 100644
--- a/drivers/common/cnxk/roc_nix.h
+++ b/drivers/common/cnxk/roc_nix.h
@@ -809,4 +809,5 @@ int __roc_api roc_nix_ptp_info_cb_register(struct roc_nix *roc_nix,
 					   ptp_info_update_t ptp_update);
 void __roc_api roc_nix_ptp_info_cb_unregister(struct roc_nix *roc_nix);
+bool __roc_api roc_nix_ptp_is_enable(struct roc_nix *roc_nix);
 
 /* VLAN */
diff --git a/drivers/common/cnxk/roc_nix_ptp.c b/drivers/common/cnxk/roc_nix_ptp.c
index 03c4c6e5fd..05e4211de9 100644
--- a/drivers/common/cnxk/roc_nix_ptp.c
+++ b/drivers/common/cnxk/roc_nix_ptp.c
@@ -121,2 +121,10 @@ roc_nix_ptp_info_cb_unregister(struct roc_nix *roc_nix)
 	dev->ops->ptp_info_update = NULL;
 }
+
+bool
+roc_nix_ptp_is_enable(struct roc_nix *roc_nix)
+{
+	struct nix *nix = roc_nix_to_nix_priv(roc_nix);
+
+	return nix->ptp_en;
+}
diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map
index 07c6720f0c..556369bc02 100644
--- a/drivers/common/cnxk/version.map
+++ b/drivers/common/cnxk/version.map
@@ -199,4 +199,5 @@ INTERNAL {
 	roc_nix_ptp_info_cb_register;
 	roc_nix_ptp_info_cb_unregister;
+	roc_nix_ptp_is_enable;
 	roc_nix_ptp_rx_ena_dis;
 	roc_nix_ptp_sync_time_adjust;
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 0c38f013c2..a1da90be57 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -1132,4 +1132,8 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)
 	}
 
+	/* Check if ptp is enable in PF owning this VF*/
+	if (!roc_nix_is_pf(nix) && (!roc_nix_is_sdp(nix)))
+		dev->ptp_en = roc_nix_ptp_is_enable(nix);
+
 	dev->npc.channel = roc_nix_get_base_chan(nix);
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.169231799 +0000
+++ 0030-common-cnxk-fix-mbuf-data-offset-for-VF.patch	2022-03-08 13:55:28.501315177 +0000
@@ -1 +1 @@
-From 8f98e3ecc55e02234f8bec7213b0b6a69c086949 Mon Sep 17 00:00:00 2001
+From c22759e121fb0d1cf8c3ea3b67e3616289c4066e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f98e3ecc55e02234f8bec7213b0b6a69c086949 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 5e6eb58c0c..dbb816d961 100644
+index 69a5e8e7b4..986aac9e57 100644
@@ -26 +27 @@
-@@ -865,4 +865,5 @@ int __roc_api roc_nix_ptp_info_cb_register(struct roc_nix *roc_nix,
+@@ -809,4 +809,5 @@ int __roc_api roc_nix_ptp_info_cb_register(struct roc_nix *roc_nix,
@@ -48 +49 @@
-index d346e6f650..2a122e544d 100644
+index 07c6720f0c..556369bc02 100644
@@ -51 +52 @@
-@@ -207,4 +207,5 @@ INTERNAL {
+@@ -199,4 +199,5 @@ INTERNAL {
@@ -58 +59 @@
-index deb95ae4c4..1fa4131907 100644
+index 0c38f013c2..a1da90be57 100644
@@ -61 +62 @@
-@@ -1124,4 +1124,8 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)
+@@ -1132,4 +1132,8 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)


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

* patch 'net/ice: fix Tx offload path choice' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (28 preceding siblings ...)
  2022-03-08 14:14 ` patch 'common/cnxk: fix mbuf data offset for VF' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'vhost: fix linker script syntax' " Kevin Traynor
                   ` (13 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Kevin Liu; +Cc: Ting Xu, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 50e654bee488260ee53bfab105563b1fed20226e Mon Sep 17 00:00:00 2001
From: Kevin Liu <kevinx.liu@intel.com>
Date: Wed, 29 Dec 2021 09:37:01 +0000
Subject: [PATCH] net/ice: fix Tx offload path choice

[ upstream commit d852fec1be63126bb2c16be187340eb89a3d8a32 ]

Testpmd forwards packets in checksum mode that it needs to calculate
the checksum of each layer's protocol.

When setting the hardware calculates the outer UDP checksum and the
software calculates the outer IP checksum, the dev->tx_pkt_burst in
ice_set_tx_function is set to ice_xmit_pkts_vec_avx2.
The inner and outer UDP checksum of the tunnel packet after forwarding
is wrong.The dev->tx_pkt_burst should be set to ice_xmit_pkts.

The patch adds RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM to
ICE_TX_NO_VECTOR_FLAGS, set dev->tx_pkt_burst to ice_xmit_pkts. After
the tunnel packet is forwarded, the inner and outer UDP checksum is
correct.

At the same time, the patch of "net/ice: fix Tx Checksum offload" will
cause interrupt errors in a special case that only inner IP and inner
UDP checksum are set for hardware calculation. The patch is updating
ICE_TX_NO_VECTOR_FLAGS, the problem can be solved, so I will restore the
code modification of that patch.

Fixes: 28f9002ab67f ("net/ice: add Tx AVX512 offload path")
Fixes: 295968d17407 ("ethdev: add namespace")
Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")

Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
Acked-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c            | 41 ++++++-------------
 drivers/net/ice/ice_rxtx_vec_common.h | 57 +++++++++------------------
 2 files changed, 30 insertions(+), 68 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 4f218bcd0d..041f4bc91f 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2502,33 +2502,16 @@ ice_txd_enable_checksum(uint64_t ol_flags,
 
 	/* Enable L3 checksum offloads */
-	/*Tunnel package usage outer len enable L3 checksum offload*/
-	if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
-		if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
-			*td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4_CSUM;
-			*td_offset |= (tx_offload.outer_l3_len >> 2) <<
-				ICE_TX_DESC_LEN_IPLEN_S;
-		} else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
-			*td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4;
-			*td_offset |= (tx_offload.outer_l3_len >> 2) <<
-				ICE_TX_DESC_LEN_IPLEN_S;
-		} else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
-			*td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
-			*td_offset |= (tx_offload.outer_l3_len >> 2) <<
-				ICE_TX_DESC_LEN_IPLEN_S;
-		}
-	} else {
-		if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
-			*td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4_CSUM;
-			*td_offset |= (tx_offload.l3_len >> 2) <<
-				ICE_TX_DESC_LEN_IPLEN_S;
-		} else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
-			*td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4;
-			*td_offset |= (tx_offload.l3_len >> 2) <<
-				ICE_TX_DESC_LEN_IPLEN_S;
-		} else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
-			*td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
-			*td_offset |= (tx_offload.l3_len >> 2) <<
-				ICE_TX_DESC_LEN_IPLEN_S;
-		}
+	if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
+		*td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4_CSUM;
+		*td_offset |= (tx_offload.l3_len >> 2) <<
+			ICE_TX_DESC_LEN_IPLEN_S;
+	} else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
+		*td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4;
+		*td_offset |= (tx_offload.l3_len >> 2) <<
+			ICE_TX_DESC_LEN_IPLEN_S;
+	} else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
+		*td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
+		*td_offset |= (tx_offload.l3_len >> 2) <<
+			ICE_TX_DESC_LEN_IPLEN_S;
 	}
 
diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index 8ff01046e1..2dd2d83650 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -251,5 +251,6 @@ ice_rxq_vec_setup_default(struct ice_rx_queue *rxq)
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |		\
 		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |	\
-		RTE_ETH_TX_OFFLOAD_TCP_TSO)
+		RTE_ETH_TX_OFFLOAD_TCP_TSO |	\
+		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM)
 
 #define ICE_TX_VECTOR_OFFLOAD (				\
@@ -365,43 +366,21 @@ ice_txd_enable_offload(struct rte_mbuf *tx_pkt,
 
 	/* Tx Checksum Offload */
-	/*Tunnel package usage outer len enable L2/L3 checksum offload*/
-	if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
-		/* SET MACLEN */
-		td_offset |= (tx_pkt->outer_l2_len >> 1) <<
-			ICE_TX_DESC_LEN_MACLEN_S;
+	/* SET MACLEN */
+	td_offset |= (tx_pkt->l2_len >> 1) <<
+		ICE_TX_DESC_LEN_MACLEN_S;
 
-		/* Enable L3 checksum offload */
-		if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
-			td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4_CSUM;
-			td_offset |= (tx_pkt->outer_l3_len >> 2) <<
-				ICE_TX_DESC_LEN_IPLEN_S;
-		} else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
-			td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4;
-			td_offset |= (tx_pkt->outer_l3_len >> 2) <<
-				ICE_TX_DESC_LEN_IPLEN_S;
-		} else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
-			td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
-			td_offset |= (tx_pkt->outer_l3_len >> 2) <<
-				ICE_TX_DESC_LEN_IPLEN_S;
-		}
-	} else {
-		/* SET MACLEN */
-		td_offset |= (tx_pkt->l2_len >> 1) <<
-			ICE_TX_DESC_LEN_MACLEN_S;
-
-		/* Enable L3 checksum offload */
-		if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
-			td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4_CSUM;
-			td_offset |= (tx_pkt->l3_len >> 2) <<
-				ICE_TX_DESC_LEN_IPLEN_S;
-		} else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
-			td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4;
-			td_offset |= (tx_pkt->l3_len >> 2) <<
-				ICE_TX_DESC_LEN_IPLEN_S;
-		} else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
-			td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
-			td_offset |= (tx_pkt->l3_len >> 2) <<
-				ICE_TX_DESC_LEN_IPLEN_S;
-		}
+	/* Enable L3 checksum offload */
+	if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
+		td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4_CSUM;
+		td_offset |= (tx_pkt->l3_len >> 2) <<
+			ICE_TX_DESC_LEN_IPLEN_S;
+	} else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
+		td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4;
+		td_offset |= (tx_pkt->l3_len >> 2) <<
+			ICE_TX_DESC_LEN_IPLEN_S;
+	} else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
+		td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
+		td_offset |= (tx_pkt->l3_len >> 2) <<
+			ICE_TX_DESC_LEN_IPLEN_S;
 	}
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.190254911 +0000
+++ 0031-net-ice-fix-Tx-offload-path-choice.patch	2022-03-08 13:55:28.504315185 +0000
@@ -1 +1 @@
-From d852fec1be63126bb2c16be187340eb89a3d8a32 Mon Sep 17 00:00:00 2001
+From 50e654bee488260ee53bfab105563b1fed20226e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d852fec1be63126bb2c16be187340eb89a3d8a32 ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org


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

* patch 'vhost: fix linker script syntax' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (29 preceding siblings ...)
  2022-03-08 14:14 ` patch 'net/ice: fix Tx offload path choice' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'examples/vhost: fix launch with physical port' " Kevin Traynor
                   ` (12 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Peng Yu; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 36466e89e56a9685e783ce0247461c4f34664ba7 Mon Sep 17 00:00:00 2001
From: Peng Yu <penyu@amazon.com>
Date: Tue, 15 Feb 2022 05:55:52 +0000
Subject: [PATCH] vhost: fix linker script syntax

[ upstream commit 4f670c5af0253f5276fd19f38fdfa72772c68cd0 ]

The punctuation after the `global` keyword should be colon, not
semicolon. The default gcc linker accepts both colon and semicolon, but
the gold linker will report syntax error if we use semicolon after the
`global` keyword.

Fixes: 94c16e89d779 ("vhost: mark vDPA driver API as internal")

Signed-off-by: Peng Yu <penyu@amazon.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/vhost/version.map | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vhost/version.map b/lib/vhost/version.map
index a7ef7f1976..0f315ed2a5 100644
--- a/lib/vhost/version.map
+++ b/lib/vhost/version.map
@@ -88,5 +88,5 @@ EXPERIMENTAL {
 
 INTERNAL {
-	global;
+	global:
 
 	rte_vdpa_register_device;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.211901947 +0000
+++ 0032-vhost-fix-linker-script-syntax.patch	2022-03-08 13:55:28.504315185 +0000
@@ -1 +1 @@
-From 4f670c5af0253f5276fd19f38fdfa72772c68cd0 Mon Sep 17 00:00:00 2001
+From 36466e89e56a9685e783ce0247461c4f34664ba7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4f670c5af0253f5276fd19f38fdfa72772c68cd0 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 1202ba9c1a..0a66c5840c 100644
+index a7ef7f1976..0f315ed2a5 100644
@@ -24 +25 @@
-@@ -91,5 +91,5 @@ EXPERIMENTAL {
+@@ -88,5 +88,5 @@ EXPERIMENTAL {


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

* patch 'examples/vhost: fix launch with physical port' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (30 preceding siblings ...)
  2022-03-08 14:14 ` patch 'vhost: fix linker script syntax' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'eal/linux: fix device monitor stop return' " Kevin Traynor
                   ` (11 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Wenwu Ma; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 3325293096f13729ab10503003591564804f463c Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Fri, 4 Mar 2022 16:24:24 +0000
Subject: [PATCH] examples/vhost: fix launch with physical port

[ upstream commit 917229c24e871bbc3225a0227eb3f0faaa7aaa69 ]

dpdk-vhost will fail to launch with a 40G i40e port because
there are not enough mbufs. This patch adds a new option
--total-num-mbufs, through which the user can set larger
mbuf pool to avoid this problem.

Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application")

Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 examples/vhost/main.c | 83 +++++++++++++++----------------------------
 1 file changed, 29 insertions(+), 54 deletions(-)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 590a77c723..6c3bd9e4b0 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -33,4 +33,6 @@
 #endif
 
+#define NUM_MBUFS_DEFAULT 0x24000
+
 /* the maximum number of external ports supported */
 #define MAX_SUP_PORTS 1
@@ -58,4 +60,7 @@
 #define INVALID_PORT_ID 0xFF
 
+/* number of mbufs in all pools - if specified on command-line. */
+static int total_num_mbufs = NUM_MBUFS_DEFAULT;
+
 /* mask of enabled ports */
 static uint32_t enabled_port_mask = 0;
@@ -474,5 +479,6 @@ us_vhost_usage(const char *prgname)
 	"		--client register a vhost-user socket as client mode.\n"
 	"		--dma-type register dma type for your vhost async driver. For example \"ioat\" for now.\n"
-	"		--dmas register dma channel for specific vhost device.\n",
+	"		--dmas register dma channel for specific vhost device.\n"
+	"		--total-num-mbufs [0-N] set the number of mbufs to be allocated in mbuf pools, the default value is 147456.\n",
 	       prgname);
 }
@@ -505,4 +511,6 @@ enum {
 #define OPT_DMAS                "dmas"
 	OPT_DMAS_NUM,
+#define OPT_NUM_MBUFS           "total-num-mbufs"
+	OPT_NUM_MBUFS_NUM,
 };
 
@@ -544,4 +552,6 @@ us_vhost_parse_args(int argc, char **argv)
 		{OPT_DMAS, required_argument,
 				NULL, OPT_DMAS_NUM},
+		{OPT_NUM_MBUFS, required_argument,
+				NULL, OPT_NUM_MBUFS_NUM},
 		{NULL, 0, 0, 0},
 	};
@@ -676,4 +686,17 @@ us_vhost_parse_args(int argc, char **argv)
 			break;
 
+		case OPT_NUM_MBUFS_NUM:
+			ret = parse_num_opt(optarg, INT32_MAX);
+			if (ret == -1) {
+				RTE_LOG(INFO, VHOST_CONFIG,
+					"Invalid argument for total-num-mbufs [0..N]\n");
+				us_vhost_usage(prgname);
+				return -1;
+			}
+
+			if (total_num_mbufs < ret)
+				total_num_mbufs = ret;
+			break;
+
 		case OPT_CLIENT_NUM:
 			client_mode = 1;
@@ -1607,55 +1630,4 @@ sigint_handler(__rte_unused int signum)
 }
 
-/*
- * While creating an mbuf pool, one key thing is to figure out how
- * many mbuf entries is enough for our use. FYI, here are some
- * guidelines:
- *
- * - Each rx queue would reserve @nr_rx_desc mbufs at queue setup stage
- *
- * - For each switch core (A CPU core does the packet switch), we need
- *   also make some reservation for receiving the packets from virtio
- *   Tx queue. How many is enough depends on the usage. It's normally
- *   a simple calculation like following:
- *
- *       MAX_PKT_BURST * max packet size / mbuf size
- *
- *   So, we definitely need allocate more mbufs when TSO is enabled.
- *
- * - Similarly, for each switching core, we should serve @nr_rx_desc
- *   mbufs for receiving the packets from physical NIC device.
- *
- * - We also need make sure, for each switch core, we have allocated
- *   enough mbufs to fill up the mbuf cache.
- */
-static void
-create_mbuf_pool(uint16_t nr_port, uint32_t nr_switch_core, uint32_t mbuf_size,
-	uint32_t nr_queues, uint32_t nr_rx_desc, uint32_t nr_mbuf_cache)
-{
-	uint32_t nr_mbufs;
-	uint32_t nr_mbufs_per_core;
-	uint32_t mtu = 1500;
-
-	if (mergeable)
-		mtu = 9000;
-	if (enable_tso)
-		mtu = 64 * 1024;
-
-	nr_mbufs_per_core  = (mtu + mbuf_size) * MAX_PKT_BURST /
-			(mbuf_size - RTE_PKTMBUF_HEADROOM);
-	nr_mbufs_per_core += nr_rx_desc;
-	nr_mbufs_per_core  = RTE_MAX(nr_mbufs_per_core, nr_mbuf_cache);
-
-	nr_mbufs  = nr_queues * nr_rx_desc;
-	nr_mbufs += nr_mbufs_per_core * nr_switch_core;
-	nr_mbufs *= nr_port;
-
-	mbuf_pool = rte_pktmbuf_pool_create("MBUF_POOL", nr_mbufs,
-					    nr_mbuf_cache, 0, mbuf_size,
-					    rte_socket_id());
-	if (mbuf_pool == NULL)
-		rte_exit(EXIT_FAILURE, "Cannot create mbuf pool\n");
-}
-
 /*
  * Main function, does initialisation and calls the per-lcore functions.
@@ -1716,6 +1688,9 @@ main(int argc, char *argv[])
 	 * those queues we are going to use.
 	 */
-	create_mbuf_pool(valid_num_ports, rte_lcore_count() - 1, MBUF_DATA_SIZE,
-			 MAX_QUEUES, RTE_TEST_RX_DESC_DEFAULT, MBUF_CACHE_SIZE);
+	mbuf_pool = rte_pktmbuf_pool_create("MBUF_POOL", total_num_mbufs,
+					    MBUF_CACHE_SIZE, 0, MBUF_DATA_SIZE,
+					    rte_socket_id());
+	if (mbuf_pool == NULL)
+		rte_exit(EXIT_FAILURE, "Cannot create mbuf pool\n");
 
 	if (vm2vm_mode == VM2VM_HARDWARE) {
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.231011721 +0000
+++ 0033-examples-vhost-fix-launch-with-physical-port.patch	2022-03-08 13:55:28.505315188 +0000
@@ -1 +1 @@
-From 917229c24e871bbc3225a0227eb3f0faaa7aaa69 Mon Sep 17 00:00:00 2001
+From 3325293096f13729ab10503003591564804f463c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 917229c24e871bbc3225a0227eb3f0faaa7aaa69 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 68afd398bb..d94fabb060 100644
+index 590a77c723..6c3bd9e4b0 100644
@@ -24 +25 @@
-@@ -34,4 +34,6 @@
+@@ -33,4 +33,6 @@
@@ -31,2 +32,2 @@
-@@ -62,4 +64,7 @@
- #define DMA_RING_SIZE 4096
+@@ -58,4 +60,7 @@
+ #define INVALID_PORT_ID 0xFF
@@ -37,4 +38,3 @@
- struct dma_for_vhost dma_bind[RTE_MAX_VHOST_DEVICE];
- int16_t dmas_id[RTE_DMADEV_DEFAULT_MAX];
-@@ -609,5 +614,6 @@ us_vhost_usage(const char *prgname)
- 	"		--tso [0|1] disable/enable TCP segment offload.\n"
+ /* mask of enabled ports */
+ static uint32_t enabled_port_mask = 0;
+@@ -474,5 +479,6 @@ us_vhost_usage(const char *prgname)
@@ -41,0 +42 @@
+ 	"		--dma-type register dma type for your vhost async driver. For example \"ioat\" for now.\n"
@@ -47 +48 @@
-@@ -638,4 +644,6 @@ enum {
+@@ -505,4 +511,6 @@ enum {
@@ -54 +55 @@
-@@ -675,4 +683,6 @@ us_vhost_parse_args(int argc, char **argv)
+@@ -544,4 +552,6 @@ us_vhost_parse_args(int argc, char **argv)
@@ -61 +62 @@
-@@ -802,4 +812,17 @@ us_vhost_parse_args(int argc, char **argv)
+@@ -676,4 +686,17 @@ us_vhost_parse_args(int argc, char **argv)
@@ -79 +80 @@
-@@ -1731,55 +1754,4 @@ sigint_handler(__rte_unused int signum)
+@@ -1607,55 +1630,4 @@ sigint_handler(__rte_unused int signum)
@@ -133,3 +134,3 @@
- static void
- reset_dma(void)
-@@ -1861,6 +1833,9 @@ main(int argc, char *argv[])
+ /*
+  * Main function, does initialisation and calls the per-lcore functions.
+@@ -1716,6 +1688,9 @@ main(int argc, char *argv[])


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

* patch 'eal/linux: fix device monitor stop return' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (31 preceding siblings ...)
  2022-03-08 14:14 ` patch 'examples/vhost: fix launch with physical port' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'sched: remove useless malloc in PIE data init' " Kevin Traynor
                   ` (10 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Wenxuan Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From b399994654309a9d38da071079c0e0e0633ed2a4 Mon Sep 17 00:00:00 2001
From: Wenxuan Wu <wenxuanx.wu@intel.com>
Date: Fri, 11 Feb 2022 08:41:31 +0000
Subject: [PATCH] eal/linux: fix device monitor stop return

[ upstream commit 4e3582ab5b49aeace3949ea4b9c6b0fddf5097a5 ]

The ret value in rte_dev_event_monitor_stop stands for whether the
monitor has been successfully closed, and should not bind with
rte_intr_callback_unregister, so once it goes to the right exit point of
rte_dev_event_monitor, the ret value should be set to 0.

Also, the refmonitor count has been carefully evaluated, the value
change from 1 to 0, so there is no potential memory leak failure.

Fixes: 1fef6ced07f3 ("eal/linux: allow multiple starts of event monitor")

Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
---
 lib/eal/linux/eal_dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
index 851789e85c..52fe336572 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -385,4 +385,5 @@ rte_dev_event_monitor_stop(void)
 	rte_intr_instance_free(intr_handle);
 	intr_handle = NULL;
+	ret = 0;
 
 	monitor_refcount--;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.250879038 +0000
+++ 0034-eal-linux-fix-device-monitor-stop-return.patch	2022-03-08 13:55:28.506315191 +0000
@@ -1 +1 @@
-From 4e3582ab5b49aeace3949ea4b9c6b0fddf5097a5 Mon Sep 17 00:00:00 2001
+From b399994654309a9d38da071079c0e0e0633ed2a4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e3582ab5b49aeace3949ea4b9c6b0fddf5097a5 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index e6f509bcff..02ae1cde29 100644
+index 851789e85c..52fe336572 100644
@@ -26 +27 @@
-@@ -381,4 +381,5 @@ rte_dev_event_monitor_stop(void)
+@@ -385,4 +385,5 @@ rte_dev_event_monitor_stop(void)


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

* patch 'sched: remove useless malloc in PIE data init' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (32 preceding siblings ...)
  2022-03-08 14:14 ` patch 'eal/linux: fix device monitor stop return' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'gpu/cuda: fix dependency loading path' " Kevin Traynor
                   ` (9 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Weiguo Li; +Cc: Stephen Hemminger, Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From bcfadafe4a98b00dc6877caf034403724bbb90ba Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Wed, 2 Mar 2022 04:32:57 +0800
Subject: [PATCH] sched: remove useless malloc in PIE data init

[ upstream commit 79aab97c94024c4f969308ec806efb168cccc83d ]

'rte_pie_rt_data_init(NULL)' is not expected, and it's ought to
fail when this happen. The malloc inside the function didn't work.
So remove the malloc otherwise will lead to a memory leak.

Fixes: 44c730b0e37971 ("sched: add PIE based congestion management")

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/sched/rte_pie.c | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/lib/sched/rte_pie.c b/lib/sched/rte_pie.c
index 934e9aee50..79db6e96b1 100644
--- a/lib/sched/rte_pie.c
+++ b/lib/sched/rte_pie.c
@@ -4,4 +4,5 @@
 
 #include <stdlib.h>
+#include <string.h>
 
 #include "rte_pie.h"
@@ -18,24 +19,9 @@ rte_pie_rt_data_init(struct rte_pie *pie)
 {
 	if (pie == NULL) {
-		/* Allocate memory to use the PIE data structure */
-		pie = rte_malloc(NULL, sizeof(struct rte_pie), 0);
-
-		if (pie == NULL)
-			RTE_LOG(ERR, SCHED, "%s: Memory allocation fails\n", __func__);
-
-		return -1;
+		RTE_LOG(ERR, SCHED, "%s: Invalid addr for pie\n", __func__);
+		return -EINVAL;
 	}
 
-	pie->active = 0;
-	pie->in_measurement = 0;
-	pie->departed_bytes_count = 0;
-	pie->start_measurement = 0;
-	pie->last_measurement = 0;
-	pie->qlen = 0;
-	pie->avg_dq_time = 0;
-	pie->burst_allowance = 0;
-	pie->qdelay_old = 0;
-	pie->drop_prob = 0;
-	pie->accu_prob = 0;
+	memset(pie, 0, sizeof(*pie));
 
 	return 0;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.269952515 +0000
+++ 0035-sched-remove-useless-malloc-in-PIE-data-init.patch	2022-03-08 13:55:28.506315191 +0000
@@ -1 +1 @@
-From 79aab97c94024c4f969308ec806efb168cccc83d Mon Sep 17 00:00:00 2001
+From bcfadafe4a98b00dc6877caf034403724bbb90ba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 79aab97c94024c4f969308ec806efb168cccc83d ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index cdb7bab697..d37b79e6dd 100644
+index 934e9aee50..79db6e96b1 100644
@@ -30 +31 @@
-@@ -16,24 +17,9 @@ rte_pie_rt_data_init(struct rte_pie *pie)
+@@ -18,24 +19,9 @@ rte_pie_rt_data_init(struct rte_pie *pie)


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

* patch 'gpu/cuda: fix dependency loading path' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (33 preceding siblings ...)
  2022-03-08 14:14 ` patch 'sched: remove useless malloc in PIE data init' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'raw/ifpga: fix variable initialization in probing' " Kevin Traynor
                   ` (8 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Elena Agostini; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 6662207061b1d707d5a6e95488e8a7bcfe4a0d0c Mon Sep 17 00:00:00 2001
From: Elena Agostini <eagostini@nvidia.com>
Date: Tue, 1 Mar 2022 19:42:05 +0000
Subject: [PATCH] gpu/cuda: fix dependency loading path

[ upstream commit 0105d49e7e6e8e0442646f401f5bc61cf6a6ca14 ]

A slash was missing in libcuda.so path for dlopen.

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
---
 drivers/gpu/cuda/cuda.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/cuda/cuda.c b/drivers/gpu/cuda/cuda.c
index d3a7234a09..fd577f7167 100644
--- a/drivers/gpu/cuda/cuda.c
+++ b/drivers/gpu/cuda/cuda.c
@@ -164,5 +164,5 @@ cuda_loader(void)
 		snprintf(cuda_path, 1024, "%s", "libcuda.so");
 	else
-		snprintf(cuda_path, 1024, "%s%s", getenv("CUDA_PATH_L"), "libcuda.so");
+		snprintf(cuda_path, 1024, "%s/%s", getenv("CUDA_PATH_L"), "libcuda.so");
 
 	cudalib = dlopen(cuda_path, RTLD_LAZY);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.288936366 +0000
+++ 0036-gpu-cuda-fix-dependency-loading-path.patch	2022-03-08 13:55:28.507315194 +0000
@@ -1 +1 @@
-From 0105d49e7e6e8e0442646f401f5bc61cf6a6ca14 Mon Sep 17 00:00:00 2001
+From 6662207061b1d707d5a6e95488e8a7bcfe4a0d0c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0105d49e7e6e8e0442646f401f5bc61cf6a6ca14 ]
+
@@ -14 +16 @@
-index efb5d146f6..cf9e59535c 100644
+index d3a7234a09..fd577f7167 100644
@@ -17 +19 @@
-@@ -170,5 +170,5 @@ cuda_loader(void)
+@@ -164,5 +164,5 @@ cuda_loader(void)


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

* patch 'raw/ifpga: fix variable initialization in probing' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (34 preceding siblings ...)
  2022-03-08 14:14 ` patch 'gpu/cuda: fix dependency loading path' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'raw/ifpga: fix interrupt handle allocation' " Kevin Traynor
                   ` (7 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Wei Huang; +Cc: Tianfei Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 57759508e092300d4eb0bb655970a98bcafa516b Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Mon, 21 Feb 2022 02:52:22 -0500
Subject: [PATCH] raw/ifpga: fix variable initialization in probing

[ upstream commit aae56ac43bcb6b605df8435be2ff6f07788fb1cf ]

Scalar variable sub_brg_bdf may be used uninitialized in function
ifpga_rawdev_fill_info(). It is initialized now in this fix.

Coverity issue: 375805
Fixes: 9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree")

Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index fdf3c23d2c..5baa0bdd47 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -217,5 +217,5 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev,
 	char *c;
 	int ret;
-	char sub_brg_bdf[4][16];
+	char sub_brg_bdf[4][16] = {{0}};
 	int point;
 	DIR *dp = NULL;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.308100591 +0000
+++ 0037-raw-ifpga-fix-variable-initialization-in-probing.patch	2022-03-08 13:55:28.508315196 +0000
@@ -1 +1 @@
-From aae56ac43bcb6b605df8435be2ff6f07788fb1cf Mon Sep 17 00:00:00 2001
+From 57759508e092300d4eb0bb655970a98bcafa516b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit aae56ac43bcb6b605df8435be2ff6f07788fb1cf ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b73512d3ad..6beecb710a 100644
+index fdf3c23d2c..5baa0bdd47 100644


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

* patch 'raw/ifpga: fix interrupt handle allocation' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (35 preceding siblings ...)
  2022-03-08 14:14 ` patch 'raw/ifpga: fix variable initialization in probing' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'raw/ifpga: fix monitor thread' " Kevin Traynor
                   ` (6 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Wei Huang; +Cc: Tianfei Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 3d2cba4108dabd7fec774c0dfffb1b4e0876e4b8 Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Fri, 18 Feb 2022 02:38:48 -0500
Subject: [PATCH] raw/ifpga: fix interrupt handle allocation

[ upstream commit 20659eb38099033b9aa4f7476a7ba7b5d3258569 ]

Allocate FPGA interrupt handle instance for each card.

Fixes: e0a1aafe2af9 ("raw/ifpga: introduce IRQ functions")

Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 94 +++++++++++++++++++-------------
 drivers/raw/ifpga/ifpga_rawdev.h |  7 ++-
 2 files changed, 62 insertions(+), 39 deletions(-)

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 5baa0bdd47..c2e74518aa 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -72,8 +72,4 @@ static int ifpga_monitor_start;
 static pthread_t ifpga_monitor_start_thread;
 
-#define IFPGA_MAX_IRQ 12
-/* 0 for FME interrupt, others are reserved for AFU irq */
-static struct rte_intr_handle *ifpga_irq_handle[IFPGA_MAX_IRQ];
-
 static struct ifpga_rawdev *
 ifpga_rawdev_allocate(struct rte_rawdev *rawdev);
@@ -119,4 +115,5 @@ ifpga_rawdev_allocate(struct rte_rawdev *rawdev)
 	struct ifpga_rawdev *dev;
 	uint16_t dev_id;
+	int i = 0;
 
 	dev = ifpga_rawdev_get(rawdev);
@@ -135,4 +132,6 @@ ifpga_rawdev_allocate(struct rte_rawdev *rawdev)
 	dev->rawdev = rawdev;
 	dev->dev_id = dev_id;
+	for (i = 0; i < IFPGA_MAX_IRQ; i++)
+		dev->intr_handle[i] = NULL;
 
 	return dev;
@@ -1342,28 +1341,45 @@ fme_interrupt_handler(void *param)
 
 int
-ifpga_unregister_msix_irq(enum ifpga_irq_type type,
+ifpga_unregister_msix_irq(struct ifpga_rawdev *dev, enum ifpga_irq_type type,
 		int vec_start, rte_intr_callback_fn handler, void *arg)
 {
-	struct rte_intr_handle *intr_handle;
-	int rc, i;
+	struct rte_intr_handle **intr_handle;
+	int rc = 0;
+	int i = vec_start + 1;
+
+	if (!dev)
+		return -ENODEV;
 
 	if (type == IFPGA_FME_IRQ)
-		intr_handle = ifpga_irq_handle[0];
+		intr_handle = (struct rte_intr_handle **)&dev->intr_handle[0];
 	else if (type == IFPGA_AFU_IRQ)
-		intr_handle = ifpga_irq_handle[vec_start + 1];
+		intr_handle = (struct rte_intr_handle **)&dev->intr_handle[i];
 	else
-		return 0;
+		return -EINVAL;
 
-	rte_intr_efd_disable(intr_handle);
+	if ((*intr_handle) == NULL) {
+		IFPGA_RAWDEV_PMD_ERR("%s interrupt %d not registered\n",
+			type == IFPGA_FME_IRQ ? "FME" : "AFU",
+			type == IFPGA_FME_IRQ ? 0 : vec_start);
+		return -ENOENT;
+	}
 
-	rc = rte_intr_callback_unregister(intr_handle, handler, arg);
+	rte_intr_efd_disable(*intr_handle);
+
+	rc = rte_intr_callback_unregister(*intr_handle, handler, arg);
+	if (rc < 0) {
+		IFPGA_RAWDEV_PMD_ERR("Failed to unregister %s interrupt %d\n",
+			type == IFPGA_FME_IRQ ? "FME" : "AFU",
+			type == IFPGA_FME_IRQ ? 0 : vec_start);
+	} else {
+		rte_intr_instance_free(*intr_handle);
+		*intr_handle = NULL;
+	}
 
-	for (i = 0; i < IFPGA_MAX_IRQ; i++)
-		rte_intr_instance_free(ifpga_irq_handle[i]);
 	return rc;
 }
 
 int
-ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
 		enum ifpga_irq_type type, int vec_start, int count,
 		rte_intr_callback_fn handler, const char *name,
@@ -1371,5 +1387,5 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
 {
 	int ret;
-	struct rte_intr_handle *intr_handle;
+	struct rte_intr_handle **intr_handle;
 	struct opae_adapter *adapter;
 	struct opae_manager *mgr;
@@ -1377,12 +1393,8 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
 	int *intr_efds = NULL, nb_intr, i;
 
-	for (i = 0; i < IFPGA_MAX_IRQ; i++) {
-		ifpga_irq_handle[i] =
-			rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_PRIVATE);
-		if (ifpga_irq_handle[i] == NULL)
-			return -ENOMEM;
-	}
+	if (!dev || !dev->rawdev)
+		return -ENODEV;
 
-	adapter = ifpga_rawdev_get_priv(dev);
+	adapter = ifpga_rawdev_get_priv(dev->rawdev);
 	if (!adapter)
 		return -ENODEV;
@@ -1393,30 +1405,38 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
 
 	if (type == IFPGA_FME_IRQ) {
-		intr_handle = ifpga_irq_handle[0];
+		intr_handle = (struct rte_intr_handle **)&dev->intr_handle[0];
 		count = 1;
 	} else if (type == IFPGA_AFU_IRQ) {
-		intr_handle = ifpga_irq_handle[vec_start + 1];
+		i = vec_start + 1;
+		intr_handle = (struct rte_intr_handle **)&dev->intr_handle[i];
 	} else {
 		return -EINVAL;
 	}
 
-	if (rte_intr_type_set(intr_handle, RTE_INTR_HANDLE_VFIO_MSIX))
+	if (*intr_handle)
+		return -EBUSY;
+
+	*intr_handle = rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_PRIVATE);
+	if (!(*intr_handle))
+		return -ENOMEM;
+
+	if (rte_intr_type_set(*intr_handle, RTE_INTR_HANDLE_VFIO_MSIX))
 		return -rte_errno;
 
-	ret = rte_intr_efd_enable(intr_handle, count);
+	ret = rte_intr_efd_enable(*intr_handle, count);
 	if (ret)
 		return -ENODEV;
 
-	if (rte_intr_fd_set(intr_handle,
-			rte_intr_efds_index_get(intr_handle, 0)))
+	if (rte_intr_fd_set(*intr_handle,
+			rte_intr_efds_index_get(*intr_handle, 0)))
 		return -rte_errno;
 
 	IFPGA_RAWDEV_PMD_DEBUG("register %s irq, vfio_fd=%d, fd=%d\n",
-			name, rte_intr_dev_fd_get(intr_handle),
-			rte_intr_fd_get(intr_handle));
+			name, rte_intr_dev_fd_get(*intr_handle),
+			rte_intr_fd_get(*intr_handle));
 
 	if (type == IFPGA_FME_IRQ) {
 		struct fpga_fme_err_irq_set err_irq_set;
-		err_irq_set.evtfd = rte_intr_efds_index_get(intr_handle,
+		err_irq_set.evtfd = rte_intr_efds_index_get(*intr_handle,
 								   0);
 
@@ -1429,5 +1449,5 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
 			return -EINVAL;
 
-		nb_intr = rte_intr_nb_intr_get(intr_handle);
+		nb_intr = rte_intr_nb_intr_get(*intr_handle);
 
 		intr_efds = calloc(nb_intr, sizeof(int));
@@ -1436,5 +1456,5 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
 
 		for (i = 0; i < nb_intr; i++)
-			intr_efds[i] = rte_intr_efds_index_get(intr_handle, i);
+			intr_efds[i] = rte_intr_efds_index_get(*intr_handle, i);
 
 		ret = opae_acc_set_irq(acc, vec_start, count, intr_efds);
@@ -1446,5 +1466,5 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
 
 	/* register interrupt handler using DPDK API */
-	ret = rte_intr_callback_register(intr_handle,
+	ret = rte_intr_callback_register(*intr_handle,
 			handler, (void *)arg);
 	if (ret) {
@@ -1548,5 +1568,5 @@ ifpga_rawdev_create(struct rte_pci_device *pci_dev,
 	}
 
-	ret = ifpga_register_msix_irq(rawdev, 0, IFPGA_FME_IRQ, 0, 0,
+	ret = ifpga_register_msix_irq(dev, 0, IFPGA_FME_IRQ, 0, 0,
 			fme_interrupt_handler, "fme_irq", mgr);
 	if (ret)
@@ -1605,5 +1625,5 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)
 		return -ENODEV;
 
-	if (ifpga_unregister_msix_irq(IFPGA_FME_IRQ, 0,
+	if (ifpga_unregister_msix_irq(dev, IFPGA_FME_IRQ, 0,
 				fme_interrupt_handler, mgr) < 0)
 		return -EINVAL;
diff --git a/drivers/raw/ifpga/ifpga_rawdev.h b/drivers/raw/ifpga/ifpga_rawdev.h
index 61c8366707..6e09afead3 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.h
+++ b/drivers/raw/ifpga/ifpga_rawdev.h
@@ -51,4 +51,5 @@ ifpga_rawdev_get_priv(const struct rte_rawdev *rawdev)
 #define IFPGA_RAWDEV_MSIX_IRQ_NUM 7
 #define IFPGA_RAWDEV_NUM 32
+#define IFPGA_MAX_IRQ 12
 
 struct ifpga_rawdev {
@@ -60,4 +61,6 @@ struct ifpga_rawdev {
 	char fvl_bdf[8][16];
 	char parent_bdf[16];
+	/* 0 for FME interrupt, others are reserved for AFU irq */
+	void *intr_handle[IFPGA_MAX_IRQ];
 };
 
@@ -71,10 +74,10 @@ enum ifpga_irq_type {
 
 int
-ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
 		enum ifpga_irq_type type, int vec_start, int count,
 		rte_intr_callback_fn handler, const char *name,
 		void *arg);
 int
-ifpga_unregister_msix_irq(enum ifpga_irq_type type,
+ifpga_unregister_msix_irq(struct ifpga_rawdev *dev, enum ifpga_irq_type type,
 		int vec_start, rte_intr_callback_fn handler, void *arg);
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.328249914 +0000
+++ 0038-raw-ifpga-fix-interrupt-handle-allocation.patch	2022-03-08 13:55:28.509315199 +0000
@@ -1 +1 @@
-From 20659eb38099033b9aa4f7476a7ba7b5d3258569 Mon Sep 17 00:00:00 2001
+From 3d2cba4108dabd7fec774c0dfffb1b4e0876e4b8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 20659eb38099033b9aa4f7476a7ba7b5d3258569 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 6beecb710a..cc569c5e71 100644
+index 5baa0bdd47..c2e74518aa 100644
@@ -44 +45 @@
-@@ -1341,28 +1340,45 @@ fme_interrupt_handler(void *param)
+@@ -1342,28 +1341,45 @@ fme_interrupt_handler(void *param)
@@ -101 +102 @@
-@@ -1370,5 +1386,5 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+@@ -1371,5 +1387,5 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
@@ -108 +109 @@
-@@ -1376,12 +1392,8 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+@@ -1377,12 +1393,8 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
@@ -124 +125 @@
-@@ -1392,30 +1404,38 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+@@ -1393,30 +1405,38 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
@@ -172 +173 @@
-@@ -1428,5 +1448,5 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+@@ -1429,5 +1449,5 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
@@ -179 +180 @@
-@@ -1435,5 +1455,5 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+@@ -1436,5 +1456,5 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
@@ -186 +187 @@
-@@ -1445,5 +1465,5 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+@@ -1446,5 +1466,5 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
@@ -193 +194 @@
-@@ -1547,5 +1567,5 @@ ifpga_rawdev_create(struct rte_pci_device *pci_dev,
+@@ -1548,5 +1568,5 @@ ifpga_rawdev_create(struct rte_pci_device *pci_dev,
@@ -200 +201 @@
-@@ -1604,5 +1624,5 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)
+@@ -1605,5 +1625,5 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)


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

* patch 'raw/ifpga: fix monitor thread' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (36 preceding siblings ...)
  2022-03-08 14:14 ` patch 'raw/ifpga: fix interrupt handle allocation' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'app/pdump: abort on multi-core capture limit' " Kevin Traynor
                   ` (5 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Wei Huang; +Cc: Tianfei Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 415ad41107c755841c92221bde4fecf696c92b5e Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Tue, 1 Mar 2022 03:47:03 -0500
Subject: [PATCH] raw/ifpga: fix monitor thread

[ upstream commit 2479a1e9a8886c93ba4c8a7aa2a35a04302f1aae ]

Monitor thread handles graceful shutdown according to the value of
specific sensors in device, two issues are found below.
1. Thread is not created when card is probed.
2. Thread is canceled without checking presence of other cards.
To fix them, thread is created in pci device probe function, a reference
count is checked before canceling the thread.

Fixes: 9c006c45 ("raw/ifpga: scan PCIe BDF device tree")

Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 62 +++++++++++++++++++++-----------
 drivers/raw/ifpga/ifpga_rawdev.h |  2 ++
 2 files changed, 43 insertions(+), 21 deletions(-)

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index c2e74518aa..2d3c4fd229 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -69,5 +69,5 @@ static const struct rte_pci_id pci_ifpga_map[] = {
 static struct ifpga_rawdev ifpga_rawdevices[IFPGA_RAWDEV_NUM];
 
-static int ifpga_monitor_start;
+static int ifpga_monitor_refcnt;
 static pthread_t ifpga_monitor_start_thread;
 
@@ -134,4 +134,5 @@ ifpga_rawdev_allocate(struct rte_rawdev *rawdev)
 	for (i = 0; i < IFPGA_MAX_IRQ; i++)
 		dev->intr_handle[i] = NULL;
+	dev->poll_enabled = 0;
 
 	return dev;
@@ -208,8 +209,9 @@ static int ifpga_get_dev_vendor_id(const char *bdf,
 	return 0;
 }
-static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev,
-	const char *bdf)
+
+static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev)
 {
-	char path[1024] = "/sys/bus/pci/devices/0000:";
+	struct opae_adapter *adapter = NULL;
+	char path[1024] = "/sys/bus/pci/devices/";
 	char link[1024], link1[1024];
 	char dir[1024] = "/sys/devices/";
@@ -226,5 +228,9 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev,
 	uint32_t dev_id, vendor_id;
 
-	strlcat(path, bdf, sizeof(path));
+	adapter = ifpga_dev ? ifpga_rawdev_get_priv(ifpga_dev->rawdev) : NULL;
+	if (!adapter)
+		return -ENODEV;
+
+	strlcat(path, adapter->name, sizeof(path));
 	memset(link, 0, sizeof(link));
 	memset(link1, 0, sizeof(link1));
@@ -376,5 +382,5 @@ ifpga_monitor_sensor(struct rte_rawdev *raw_dev,
 		if (!strcmp(sensor->name, "Board Temperature") ||
 				!strcmp(sensor->name, "FPGA Die Temperature")) {
-			IFPGA_RAWDEV_PMD_INFO("read sensor %s %d %d %d\n",
+			IFPGA_RAWDEV_PMD_DEBUG("read sensor %s %d %d %d\n",
 					sensor->name, value, sensor->high_warn,
 					sensor->high_fatal);
@@ -418,5 +424,5 @@ static int set_surprise_link_check_aer(
 	uint32_t aer_new0, aer_new1;
 
-	if (!ifpga_rdev) {
+	if (!ifpga_rdev || !ifpga_rdev->rawdev) {
 		printf("\n device does not exist\n");
 		return -EFAULT;
@@ -497,9 +503,9 @@ ifpga_rawdev_gsd_handle(__rte_unused void *param)
 #define MS 1000
 
-	while (__atomic_load_n(&ifpga_monitor_start, __ATOMIC_RELAXED)) {
+	while (__atomic_load_n(&ifpga_monitor_refcnt, __ATOMIC_RELAXED)) {
 		gsd_enable = 0;
 		for (i = 0; i < IFPGA_RAWDEV_NUM; i++) {
 			ifpga_rdev = &ifpga_rawdevices[i];
-			if (ifpga_rdev->rawdev) {
+			if (ifpga_rdev->poll_enabled) {
 				ret = set_surprise_link_check_aer(ifpga_rdev,
 					gsd_enable);
@@ -521,30 +527,44 @@ ifpga_rawdev_gsd_handle(__rte_unused void *param)
 
 static int
-ifpga_monitor_start_func(void)
+ifpga_monitor_start_func(struct ifpga_rawdev *dev)
 {
 	int ret;
 
-	if (!__atomic_load_n(&ifpga_monitor_start, __ATOMIC_RELAXED)) {
+	if (!dev)
+		return -ENODEV;
+
+	ret = ifpga_rawdev_fill_info(dev);
+	if (ret)
+		return ret;
+
+	dev->poll_enabled = 1;
+
+	if (!__atomic_fetch_add(&ifpga_monitor_refcnt, 1, __ATOMIC_RELAXED)) {
 		ret = rte_ctrl_thread_create(&ifpga_monitor_start_thread,
 					     "ifpga-monitor", NULL,
 					     ifpga_rawdev_gsd_handle, NULL);
 		if (ret != 0) {
+			ifpga_monitor_start_thread = 0;
 			IFPGA_RAWDEV_PMD_ERR(
 				"Fail to create ifpga monitor thread");
 			return -1;
 		}
-		__atomic_store_n(&ifpga_monitor_start, 1, __ATOMIC_RELAXED);
 	}
 
 	return 0;
 }
+
 static int
-ifpga_monitor_stop_func(void)
+ifpga_monitor_stop_func(struct ifpga_rawdev *dev)
 {
 	int ret;
 
-	if (__atomic_load_n(&ifpga_monitor_start, __ATOMIC_RELAXED)) {
-		__atomic_store_n(&ifpga_monitor_start, 0, __ATOMIC_RELAXED);
+	if (!dev || !dev->poll_enabled)
+		return 0;
 
+	dev->poll_enabled = 0;
+
+	if (!__atomic_sub_fetch(&ifpga_monitor_refcnt, 1, __ATOMIC_RELAXED) &&
+		ifpga_monitor_start_thread) {
 		ret = pthread_cancel(ifpga_monitor_start_thread);
 		if (ret)
@@ -719,4 +739,5 @@ ifpga_rawdev_close(struct rte_rawdev *dev)
 
 	if (dev) {
+		ifpga_monitor_stop_func(ifpga_rawdev_get(dev));
 		adapter = ifpga_rawdev_get_priv(dev);
 		if (adapter) {
@@ -1573,4 +1594,8 @@ ifpga_rawdev_create(struct rte_pci_device *pci_dev,
 		goto free_adapter_data;
 
+	ret = ifpga_monitor_start_func(dev);
+	if (ret)
+		goto free_adapter_data;
+
 	return ret;
 
@@ -1648,5 +1673,5 @@ static int
 ifpga_rawdev_pci_remove(struct rte_pci_device *pci_dev)
 {
-	ifpga_monitor_stop_func();
+	IFPGA_RAWDEV_PMD_INFO("remove pci_dev %s", pci_dev->device.name);
 	return ifpga_rawdev_destroy(pci_dev);
 }
@@ -1699,5 +1724,4 @@ ifpga_cfg_probe(struct rte_vdev_device *dev)
 	int port;
 	char *name = NULL;
-	const char *bdf;
 	char dev_name[RTE_RAWDEV_NAME_MAX_LEN];
 	int ret = -1;
@@ -1748,8 +1772,4 @@ ifpga_cfg_probe(struct rte_vdev_device *dev)
 	if (!ifpga_dev)
 		goto end;
-	bdf = name;
-	ifpga_rawdev_fill_info(ifpga_dev, bdf);
-
-	ifpga_monitor_start_func();
 
 	memset(dev_name, 0, sizeof(dev_name));
diff --git a/drivers/raw/ifpga/ifpga_rawdev.h b/drivers/raw/ifpga/ifpga_rawdev.h
index 6e09afead3..857b73463d 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.h
+++ b/drivers/raw/ifpga/ifpga_rawdev.h
@@ -63,4 +63,6 @@ struct ifpga_rawdev {
 	/* 0 for FME interrupt, others are reserved for AFU irq */
 	void *intr_handle[IFPGA_MAX_IRQ];
+	/* enable monitor thread poll device's sensors or not */
+	int poll_enabled;
 };
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.348136534 +0000
+++ 0039-raw-ifpga-fix-monitor-thread.patch	2022-03-08 13:55:28.510315202 +0000
@@ -1 +1 @@
-From 2479a1e9a8886c93ba4c8a7aa2a35a04302f1aae Mon Sep 17 00:00:00 2001
+From 415ad41107c755841c92221bde4fecf696c92b5e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2479a1e9a8886c93ba4c8a7aa2a35a04302f1aae ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index cc569c5e71..26c1366a64 100644
+index c2e74518aa..2d3c4fd229 100644
@@ -147 +148 @@
-@@ -1572,4 +1593,8 @@ ifpga_rawdev_create(struct rte_pci_device *pci_dev,
+@@ -1573,4 +1594,8 @@ ifpga_rawdev_create(struct rte_pci_device *pci_dev,
@@ -156 +157 @@
-@@ -1647,5 +1672,5 @@ static int
+@@ -1648,5 +1673,5 @@ static int
@@ -163 +164 @@
-@@ -1698,5 +1723,4 @@ ifpga_cfg_probe(struct rte_vdev_device *dev)
+@@ -1699,5 +1724,4 @@ ifpga_cfg_probe(struct rte_vdev_device *dev)
@@ -169 +170 @@
-@@ -1747,8 +1771,4 @@ ifpga_cfg_probe(struct rte_vdev_device *dev)
+@@ -1748,8 +1772,4 @@ ifpga_cfg_probe(struct rte_vdev_device *dev)


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

* patch 'app/pdump: abort on multi-core capture limit' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (37 preceding siblings ...)
  2022-03-08 14:14 ` patch 'raw/ifpga: fix monitor thread' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'pcapng: handle failure of link status query' " Kevin Traynor
                   ` (4 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 8dc074672f2c05704dfd06614761b23d7cf4bd6d Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Mon, 28 Feb 2022 09:58:56 +0000
Subject: [PATCH] app/pdump: abort on multi-core capture limit

[ upstream commit 3ee04ebc91f3872c4c1d9f9911f0cdfa32377d8c ]

Check lcore id value is not the maximum core supported.
Using lcore id without this check might cause
out of bound access inside the rte_eal_wait_lcore.

Coverity issue: 375841
Fixes: b2854d5317e8 ("app/pdump: support multi-core capture")

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/pdump/main.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index 46f9d25db0..101ac7db9a 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -904,9 +904,19 @@ dump_packets_core(void *arg)
 }
 
+static unsigned int
+get_next_core(unsigned int lcore)
+{
+	lcore = rte_get_next_lcore(lcore, 1, 0);
+	if (lcore == RTE_MAX_LCORE)
+		rte_exit(EXIT_FAILURE,
+				"Max core limit %u reached for packet capture", lcore);
+	return lcore;
+}
+
 static inline void
 dump_packets(void)
 {
 	int i;
-	uint32_t lcore_id = 0;
+	unsigned int lcore_id = 0;
 
 	if (!multiple_core_capture) {
@@ -934,10 +944,10 @@ dump_packets(void)
 	}
 
-	lcore_id = rte_get_next_lcore(lcore_id, 1, 0);
+	lcore_id = get_next_core(lcore_id);
 
 	for (i = 0; i < num_tuples; i++) {
 		rte_eal_remote_launch(dump_packets_core,
 				&pdump_t[i], lcore_id);
-		lcore_id = rte_get_next_lcore(lcore_id, 1, 0);
+		lcore_id = get_next_core(lcore_id);
 
 		if (rte_eal_wait_lcore(lcore_id) < 0)
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.368067260 +0000
+++ 0040-app-pdump-abort-on-multi-core-capture-limit.patch	2022-03-08 13:55:28.511315205 +0000
@@ -1 +1 @@
-From 3ee04ebc91f3872c4c1d9f9911f0cdfa32377d8c Mon Sep 17 00:00:00 2001
+From 8dc074672f2c05704dfd06614761b23d7cf4bd6d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3ee04ebc91f3872c4c1d9f9911f0cdfa32377d8c ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 04a38e8911..96fa76f8da 100644
+index 46f9d25db0..101ac7db9a 100644
@@ -24 +25 @@
-@@ -901,9 +901,19 @@ dump_packets_core(void *arg)
+@@ -904,9 +904,19 @@ dump_packets_core(void *arg)
@@ -45 +46 @@
-@@ -931,10 +941,10 @@ dump_packets(void)
+@@ -934,10 +944,10 @@ dump_packets(void)


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

* patch 'pcapng: handle failure of link status query' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (38 preceding siblings ...)
  2022-03-08 14:14 ` patch 'app/pdump: abort on multi-core capture limit' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'test/bpf: skip dump if conversion fails' " Kevin Traynor
                   ` (3 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 23237c380ec2bff9ffdd5b657a983020cb7efb5f Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 10 Feb 2022 15:09:04 -0800
Subject: [PATCH] pcapng: handle failure of link status query

[ upstream commit 442878db2e35ab276a1cd78cd836008e15eccd8b ]

If rte_ethlink_get fails, the code can just not add speed
to the pcap file.

Coverity issue: 373664
Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/pcapng/rte_pcapng.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 03edabe73e..9db058fe42 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -178,6 +178,6 @@ pcapng_add_interface(rte_pcapng_t *self, uint16_t port)
 
 	/* DPDK reports in units of Mbps */
-	rte_eth_link_get(port, &link);
-	if (link.link_status == RTE_ETH_LINK_UP)
+	if (rte_eth_link_get(port, &link) == 0 &&
+	    link.link_status == RTE_ETH_LINK_UP)
 		speed = link.link_speed * PCAPNG_MBPS_SPEED;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.387710308 +0000
+++ 0041-pcapng-handle-failure-of-link-status-query.patch	2022-03-08 13:55:28.512315207 +0000
@@ -1 +1 @@
-From 442878db2e35ab276a1cd78cd836008e15eccd8b Mon Sep 17 00:00:00 2001
+From 23237c380ec2bff9ffdd5b657a983020cb7efb5f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 442878db2e35ab276a1cd78cd836008e15eccd8b ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 5ae96a5bc9..90b2f5bc69 100644
+index 03edabe73e..9db058fe42 100644
@@ -22 +23 @@
-@@ -177,6 +177,6 @@ pcapng_add_interface(rte_pcapng_t *self, uint16_t port)
+@@ -178,6 +178,6 @@ pcapng_add_interface(rte_pcapng_t *self, uint16_t port)


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

* patch 'test/bpf: skip dump if conversion fails' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (39 preceding siblings ...)
  2022-03-08 14:14 ` patch 'pcapng: handle failure of link status query' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'app/dumpcap: check for failure to set promiscuous' " Kevin Traynor
                   ` (2 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From e2b0823a95ba389906b46b90979fc0f2d142b87c Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 10 Feb 2022 15:09:05 -0800
Subject: [PATCH] test/bpf: skip dump if conversion fails

[ upstream commit 78e7b29ff10c234b44f20fe7d031d60748920c2d ]

If conversion of cBPF to eBPF fails (in rte_bpf_convert)
then the test should not try and print the result.

Coverity issue: 373661
Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 app/test/test_bpf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c
index 2d755a872f..c422fedf1f 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -3260,6 +3260,8 @@ test_bpf_dump(struct bpf_program *cbf, const struct rte_bpf_prm *prm)
 	bpf_dump(cbf, 1);
 
-	printf("\neBPF program (%u insns)\n", prm->nb_ins);
-	rte_bpf_dump(stdout, prm->ins, prm->nb_ins);
+	if (prm != NULL) {
+		printf("\neBPF program (%u insns)\n", prm->nb_ins);
+		rte_bpf_dump(stdout, prm->ins, prm->nb_ins);
+	}
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.406818767 +0000
+++ 0042-test-bpf-skip-dump-if-conversion-fails.patch	2022-03-08 13:55:28.514315213 +0000
@@ -1 +1 @@
-From 78e7b29ff10c234b44f20fe7d031d60748920c2d Mon Sep 17 00:00:00 2001
+From e2b0823a95ba389906b46b90979fc0f2d142b87c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 78e7b29ff10c234b44f20fe7d031d60748920c2d ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d1e10adab5..805cce6406 100644
+index 2d755a872f..c422fedf1f 100644
@@ -23 +24 @@
-@@ -3274,6 +3274,8 @@ test_bpf_dump(struct bpf_program *cbf, const struct rte_bpf_prm *prm)
+@@ -3260,6 +3260,8 @@ test_bpf_dump(struct bpf_program *cbf, const struct rte_bpf_prm *prm)


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

* patch 'app/dumpcap: check for failure to set promiscuous' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (40 preceding siblings ...)
  2022-03-08 14:14 ` patch 'test/bpf: skip dump if conversion fails' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:14 ` patch 'examples/distributor: reduce Tx queue number to 1' " Kevin Traynor
  2022-03-08 14:15 ` patch 'examples/flow_classify: fix failure message' " Kevin Traynor
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 8cac3f5d66cc79047967cd83148e6d569848fd9d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 10 Feb 2022 15:09:06 -0800
Subject: [PATCH] app/dumpcap: check for failure to set promiscuous

[ upstream commit 499b1cbcf9d376a1130550ee61461276c5138a1b ]

If the rte_eth_promiscuous_enable() fails, then log the error
and continue.

Coverity issue: 373662
Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/dumpcap/main.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index c5fe440302..536ec64711 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -680,6 +680,11 @@ static void enable_pdump(struct rte_ring *r, struct rte_mempool *mp)
 
 	TAILQ_FOREACH(intf, &interfaces, next) {
-		if (promiscuous_mode)
-			rte_eth_promiscuous_enable(intf->port);
+		if (promiscuous_mode) {
+			ret = rte_eth_promiscuous_enable(intf->port);
+			if (ret != 0)
+				fprintf(stderr,
+					"port %u set promiscuous enable failed: %d\n",
+					intf->port, ret);
+		}
 
 		ret = rte_pdump_enable_bpf(intf->port, RTE_PDUMP_ALL_QUEUES,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.427085544 +0000
+++ 0043-app-dumpcap-check-for-failure-to-set-promiscuous.patch	2022-03-08 13:55:28.514315213 +0000
@@ -1 +1 @@
-From 499b1cbcf9d376a1130550ee61461276c5138a1b Mon Sep 17 00:00:00 2001
+From 8cac3f5d66cc79047967cd83148e6d569848fd9d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 499b1cbcf9d376a1130550ee61461276c5138a1b ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org


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

* patch 'examples/distributor: reduce Tx queue number to 1' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (41 preceding siblings ...)
  2022-03-08 14:14 ` patch 'app/dumpcap: check for failure to set promiscuous' " Kevin Traynor
@ 2022-03-08 14:14 ` Kevin Traynor
  2022-03-08 14:15 ` patch 'examples/flow_classify: fix failure message' " Kevin Traynor
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:14 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: Ruifeng Wang, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From 784390ca4246eba2737e5e626c90b98126f876b9 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 7 Mar 2022 22:39:46 +0000
Subject: [PATCH] examples/distributor: reduce Tx queue number to 1

[ upstream commit e7f6d1289bc2d6880bcc708b7ba42976b8d4a3e8 ]

Distributor application creates one Tx queue per core. However
the transmit is done only from a single core. Hence creating
one Tx queue is enough.

Fixes: 07db4a975094 ("examples/distributor: new sample app")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/distributor/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index c681e237ea..02bf91f555 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -109,5 +109,5 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 {
 	struct rte_eth_conf port_conf = port_conf_default;
-	const uint16_t rxRings = 1, txRings = rte_lcore_count() - 1;
+	const uint16_t rxRings = 1, txRings = 1;
 	int retval;
 	uint16_t q;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.446159651 +0000
+++ 0044-examples-distributor-reduce-Tx-queue-number-to-1.patch	2022-03-08 13:55:28.515315216 +0000
@@ -1 +1 @@
-From e7f6d1289bc2d6880bcc708b7ba42976b8d4a3e8 Mon Sep 17 00:00:00 2001
+From 784390ca4246eba2737e5e626c90b98126f876b9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e7f6d1289bc2d6880bcc708b7ba42976b8d4a3e8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org


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

* patch 'examples/flow_classify: fix failure message' has been queued to stable release 21.11.1
  2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
                   ` (42 preceding siblings ...)
  2022-03-08 14:14 ` patch 'examples/distributor: reduce Tx queue number to 1' " Kevin Traynor
@ 2022-03-08 14:15 ` Kevin Traynor
  43 siblings, 0 replies; 45+ messages in thread
From: Kevin Traynor @ 2022-03-08 14:15 UTC (permalink / raw)
  To: Chuanshe Zhang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

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

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

Thanks.

Kevin

---
From a6fd71054fe1c5a5785a29a44e84d612b777ede8 Mon Sep 17 00:00:00 2001
From: Chuanshe Zhang <zhangchuanshe@icloudshield.com>
Date: Tue, 18 Jan 2022 10:49:34 +0800
Subject: [PATCH] examples/flow_classify: fix failure message

[ upstream commit 8d0b407d141a8e041e2e807104b7e2b98e11f8c5 ]

Fixes: bab16ddaf2c1 ("examples/flow_classify: add sample application")

Signed-off-by: Chuanshe Zhang <zhangchuanshe@icloudshield.com>
---
 examples/flow_classify/flow_classify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c
index 6185b34060..97708b7084 100644
--- a/examples/flow_classify/flow_classify.c
+++ b/examples/flow_classify/flow_classify.c
@@ -431,5 +431,5 @@ parse_ipv4_5tuple_rule(char *str, struct rte_eth_ntuple_filter *ntuple_filter)
 			&ntuple_filter->dst_ip_mask);
 	if (ret != 0) {
-		flow_classify_log("failed to read source address/mask: %s\n",
+		flow_classify_log("failed to read destination address/mask: %s\n",
 			in[CB_FLD_DST_ADDR]);
 		return ret;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.465298403 +0000
+++ 0045-examples-flow_classify-fix-failure-message.patch	2022-03-08 13:55:28.515315216 +0000
@@ -1 +1 @@
-From 8d0b407d141a8e041e2e807104b7e2b98e11f8c5 Mon Sep 17 00:00:00 2001
+From a6fd71054fe1c5a5785a29a44e84d612b777ede8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8d0b407d141a8e041e2e807104b7e2b98e11f8c5 ]
+
@@ -7 +8,0 @@
-Cc: stable@dpdk.org


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

end of thread, other threads:[~2022-03-08 14:16 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 14:14 patch 'event/cnxk: fix sub-event clearing mask length' has been queued to stable release 21.11.1 Kevin Traynor
2022-03-08 14:14 ` patch 'event/cnxk: fix Rx adapter config check' " Kevin Traynor
2022-03-08 14:14 ` patch 'event/dlb2: add shift value check in sparse dequeue' " Kevin Traynor
2022-03-08 14:14 ` patch 'app/compress-perf: fix cycle count operations allocation' " Kevin Traynor
2022-03-08 14:14 ` patch 'app/compress-perf: optimize operations pool " Kevin Traynor
2022-03-08 14:14 ` patch 'compress/mlx5: support out-of-space status' " Kevin Traynor
2022-03-08 14:14 ` patch 'app/compress-perf: fix socket ID type during init' " Kevin Traynor
2022-03-08 14:14 ` patch 'app/compress-perf: fix number of queue pairs to setup' " Kevin Traynor
2022-03-08 14:14 ` patch 'compressdev: fix socket ID type' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/hns3: remove duplicate macro definition' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/hns3: fix RSS TC mode entry' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/hns3: fix VF " Kevin Traynor
2022-03-08 14:14 ` patch 'net/hns3: increase time waiting for PF reset completion' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/ixgbe: fix FSP check for X550EM devices' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/iavf: support NAT-T / UDP encapsulation' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/iavf: fix function pointer in multi-process' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/mlx5: fix indexed pool fetch overlap' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/mlx5: fix destroying empty matchers list' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/mlx5: fix shared counter flag in flow validation' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/mlx5: fix check in count action " Kevin Traynor
2022-03-08 14:14 ` patch 'net/txgbe: fix queue statistics mapping' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/kni: fix config initialization' " Kevin Traynor
2022-03-08 14:14 ` patch 'doc: fix typos and punctuation in flow API guide' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/mlx5: fix GRE item translation in Verbs' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/mlx5: reduce flex item flow handle size' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/mlx5: fix matcher priority with ICMP or ICMPv6' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/mlx5: fix flex item header length translation' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/iavf: fix AES-GMAC IV size' " Kevin Traynor
2022-03-08 14:14 ` patch 'common/cnxk: fix bitmap usage for TM' " Kevin Traynor
2022-03-08 14:14 ` patch 'common/cnxk: fix mbuf data offset for VF' " Kevin Traynor
2022-03-08 14:14 ` patch 'net/ice: fix Tx offload path choice' " Kevin Traynor
2022-03-08 14:14 ` patch 'vhost: fix linker script syntax' " Kevin Traynor
2022-03-08 14:14 ` patch 'examples/vhost: fix launch with physical port' " Kevin Traynor
2022-03-08 14:14 ` patch 'eal/linux: fix device monitor stop return' " Kevin Traynor
2022-03-08 14:14 ` patch 'sched: remove useless malloc in PIE data init' " Kevin Traynor
2022-03-08 14:14 ` patch 'gpu/cuda: fix dependency loading path' " Kevin Traynor
2022-03-08 14:14 ` patch 'raw/ifpga: fix variable initialization in probing' " Kevin Traynor
2022-03-08 14:14 ` patch 'raw/ifpga: fix interrupt handle allocation' " Kevin Traynor
2022-03-08 14:14 ` patch 'raw/ifpga: fix monitor thread' " Kevin Traynor
2022-03-08 14:14 ` patch 'app/pdump: abort on multi-core capture limit' " Kevin Traynor
2022-03-08 14:14 ` patch 'pcapng: handle failure of link status query' " Kevin Traynor
2022-03-08 14:14 ` patch 'test/bpf: skip dump if conversion fails' " Kevin Traynor
2022-03-08 14:14 ` patch 'app/dumpcap: check for failure to set promiscuous' " Kevin Traynor
2022-03-08 14:14 ` patch 'examples/distributor: reduce Tx queue number to 1' " Kevin Traynor
2022-03-08 14:15 ` patch 'examples/flow_classify: fix failure message' " Kevin Traynor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).