patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13
@ 2022-07-07  7:53 christian.ehrhardt
  2022-07-07  7:53 ` patch 'examples/bond: fix invalid use of trylock' " christian.ehrhardt
                   ` (85 more replies)
  0 siblings, 86 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:53 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: Dmitry Kozlyuk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 2a645b955cb1f0bac0d61e1755a24bb78e78737f Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Wed, 9 Mar 2022 23:35:08 -0800
Subject: [PATCH] eal/windows: fix data race when creating threads

[ upstream commit e4e983b975df700474309605b6adb5f2c6d83e2f ]

eal_thread_loop() uses lcore_config[i].thread_id,
which is stored upon the return from CreateThread().
Per documentation, eal_thread_loop() can start
before CreateThread() returns and the ID is stored.

Create lcore worker threads suspended and then subsequently resume to
allow &lcore_config[i].thread_id be stored before eal_thread_loop
execution.

Fixes: 53ffd9f080fc ("eal/windows: add minimum viable code")

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/librte_eal/windows/eal/eal_thread.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/windows/eal/eal_thread.c b/lib/librte_eal/windows/eal/eal_thread.c
index 90797edb6d..563988fe40 100644
--- a/lib/librte_eal/windows/eal/eal_thread.c
+++ b/lib/librte_eal/windows/eal/eal_thread.c
@@ -145,12 +145,17 @@ eal_thread_create(pthread_t *thread)
 	HANDLE th;
 
 	th = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)eal_thread_loop,
-						NULL, 0, (LPDWORD)thread);
+						NULL, CREATE_SUSPENDED, (LPDWORD)thread);
 	if (!th)
 		return -1;
 
 	SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
 	SetThreadPriority(th, THREAD_PRIORITY_NORMAL);
 
+	if (ResumeThread(th) == (DWORD)-1) {
+		(void)CloseHandle(th);
+		return -1;
+	}
+
 	return 0;
 }
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.112776857 +0200
+++ 0001-eal-windows-fix-data-race-when-creating-threads.patch	2022-07-07 09:54:10.765823382 +0200
@@ -1 +1 @@
-From e4e983b975df700474309605b6adb5f2c6d83e2f Mon Sep 17 00:00:00 2001
+From 2a645b955cb1f0bac0d61e1755a24bb78e78737f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e4e983b975df700474309605b6adb5f2c6d83e2f ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
- lib/eal/windows/eal_thread.c | 7 ++++++-
+ lib/librte_eal/windows/eal/eal_thread.c | 7 ++++++-
@@ -24,5 +25,6 @@
-diff --git a/lib/eal/windows/eal_thread.c b/lib/eal/windows/eal_thread.c
-index 54fa93fa62..ff84cb42af 100644
---- a/lib/eal/windows/eal_thread.c
-+++ b/lib/eal/windows/eal_thread.c
-@@ -150,13 +150,18 @@ eal_thread_create(pthread_t *thread)
+diff --git a/lib/librte_eal/windows/eal/eal_thread.c b/lib/librte_eal/windows/eal/eal_thread.c
+index 90797edb6d..563988fe40 100644
+--- a/lib/librte_eal/windows/eal/eal_thread.c
++++ b/lib/librte_eal/windows/eal/eal_thread.c
+@@ -145,12 +145,17 @@ eal_thread_create(pthread_t *thread)
+ 	HANDLE th;
@@ -30,2 +32 @@
- 	th = CreateThread(NULL, 0,
- 		(LPTHREAD_START_ROUTINE)(ULONG_PTR)eal_thread_loop,
+ 	th = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)eal_thread_loop,
@@ -47 +47,0 @@
- 

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

* patch 'examples/bond: fix invalid use of trylock' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
@ 2022-07-07  7:53 ` christian.ehrhardt
  2022-07-07  7:53 ` patch 'net/mlx5: fix Tx when inlining is impossible' " christian.ehrhardt
                   ` (84 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:53 UTC (permalink / raw)
  To: Mattias Rönnblom
  Cc: Bruce Richardson, Min Hu, Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 2b9663aec4d2eecf2eacc58f2936582ac4c2c5b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Mon, 11 Apr 2022 17:15:59 +0200
Subject: [PATCH] examples/bond: fix invalid use of trylock
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 03382cf4115019e6a82d6fca51a16a34a0824a90 ]

The conditional rte_spinlock_trylock() was used as if it is an
unconditional lock operation in a number of places.

Fixes: cc7e8ae84faa ("examples/bond: add example application for link bonding mode 6")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 examples/bond/main.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/examples/bond/main.c b/examples/bond/main.c
index d4de4b9e68..9243a85501 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -379,7 +379,7 @@ static int lcore_main(__attribute__((unused)) void *arg1)
 	bond_ip = BOND_IP_1 | (BOND_IP_2 << 8) |
 				(BOND_IP_3 << 16) | (BOND_IP_4 << 24);
 
-	rte_spinlock_trylock(&global_flag_stru_p->lock);
+	rte_spinlock_lock(&global_flag_stru_p->lock);
 
 	while (global_flag_stru_p->LcoreMainIsRunning) {
 		rte_spinlock_unlock(&global_flag_stru_p->lock);
@@ -460,7 +460,7 @@ static int lcore_main(__attribute__((unused)) void *arg1)
 			if (is_free == 0)
 				rte_pktmbuf_free(pkts[i]);
 		}
-		rte_spinlock_trylock(&global_flag_stru_p->lock);
+		rte_spinlock_lock(&global_flag_stru_p->lock);
 	}
 	rte_spinlock_unlock(&global_flag_stru_p->lock);
 	printf("BYE lcore_main\n");
@@ -575,7 +575,7 @@ static void cmd_start_parsed(__attribute__((unused)) void *parsed_result,
 {
 	int slave_core_id = rte_lcore_id();
 
-	rte_spinlock_trylock(&global_flag_stru_p->lock);
+	rte_spinlock_lock(&global_flag_stru_p->lock);
 	if (global_flag_stru_p->LcoreMainIsRunning == 0) {
 		if (rte_eal_get_lcore_state(global_flag_stru_p->LcoreMainCore)
 		    != WAIT) {
@@ -595,7 +595,7 @@ static void cmd_start_parsed(__attribute__((unused)) void *parsed_result,
 	if ((slave_core_id >= RTE_MAX_LCORE) || (slave_core_id == 0))
 		return;
 
-	rte_spinlock_trylock(&global_flag_stru_p->lock);
+	rte_spinlock_lock(&global_flag_stru_p->lock);
 	global_flag_stru_p->LcoreMainIsRunning = 1;
 	rte_spinlock_unlock(&global_flag_stru_p->lock);
 	cmdline_printf(cl,
@@ -663,7 +663,7 @@ static void cmd_stop_parsed(__attribute__((unused)) void *parsed_result,
 			    struct cmdline *cl,
 			    __attribute__((unused)) void *data)
 {
-	rte_spinlock_trylock(&global_flag_stru_p->lock);
+	rte_spinlock_lock(&global_flag_stru_p->lock);
 	if (global_flag_stru_p->LcoreMainIsRunning == 0)	{
 		cmdline_printf(cl,
 					"lcore_main not running on core:%d\n",
@@ -704,7 +704,7 @@ static void cmd_quit_parsed(__attribute__((unused)) void *parsed_result,
 			    struct cmdline *cl,
 			    __attribute__((unused)) void *data)
 {
-	rte_spinlock_trylock(&global_flag_stru_p->lock);
+	rte_spinlock_lock(&global_flag_stru_p->lock);
 	if (global_flag_stru_p->LcoreMainIsRunning == 0)	{
 		cmdline_printf(cl,
 					"lcore_main not running on core:%d\n",
@@ -766,7 +766,7 @@ static void cmd_show_parsed(__attribute__((unused)) void *parsed_result,
 		printf("\n");
 	}
 
-	rte_spinlock_trylock(&global_flag_stru_p->lock);
+	rte_spinlock_lock(&global_flag_stru_p->lock);
 	cmdline_printf(cl,
 			"Active_slaves:%d "
 			"packets received:Tot:%d Arp:%d IPv4:%d\n",
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.231336066 +0200
+++ 0002-examples-bond-fix-invalid-use-of-trylock.patch	2022-07-07 09:54:10.769823406 +0200
@@ -1 +1 @@
-From 03382cf4115019e6a82d6fca51a16a34a0824a90 Mon Sep 17 00:00:00 2001
+From 2b9663aec4d2eecf2eacc58f2936582ac4c2c5b4 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 03382cf4115019e6a82d6fca51a16a34a0824a90 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 335bde5c8d..4efebb3902 100644
+index d4de4b9e68..9243a85501 100644
@@ -27 +28 @@
-@@ -373,7 +373,7 @@ static int lcore_main(__rte_unused void *arg1)
+@@ -379,7 +379,7 @@ static int lcore_main(__attribute__((unused)) void *arg1)
@@ -36 +37 @@
-@@ -456,7 +456,7 @@ static int lcore_main(__rte_unused void *arg1)
+@@ -460,7 +460,7 @@ static int lcore_main(__attribute__((unused)) void *arg1)
@@ -45 +46 @@
-@@ -571,7 +571,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result,
+@@ -575,7 +575,7 @@ static void cmd_start_parsed(__attribute__((unused)) void *parsed_result,
@@ -47 +48 @@
- 	int worker_core_id = rte_lcore_id();
+ 	int slave_core_id = rte_lcore_id();
@@ -54,2 +55,2 @@
-@@ -591,7 +591,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result,
- 	if ((worker_core_id >= RTE_MAX_LCORE) || (worker_core_id == 0))
+@@ -595,7 +595,7 @@ static void cmd_start_parsed(__attribute__((unused)) void *parsed_result,
+ 	if ((slave_core_id >= RTE_MAX_LCORE) || (slave_core_id == 0))
@@ -63 +64 @@
-@@ -659,7 +659,7 @@ static void cmd_stop_parsed(__rte_unused void *parsed_result,
+@@ -663,7 +663,7 @@ static void cmd_stop_parsed(__attribute__((unused)) void *parsed_result,
@@ -65 +66 @@
- 			    __rte_unused void *data)
+ 			    __attribute__((unused)) void *data)
@@ -72 +73 @@
-@@ -700,7 +700,7 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result,
+@@ -704,7 +704,7 @@ static void cmd_quit_parsed(__attribute__((unused)) void *parsed_result,
@@ -74 +75 @@
- 			    __rte_unused void *data)
+ 			    __attribute__((unused)) void *data)
@@ -81 +82 @@
-@@ -762,7 +762,7 @@ static void cmd_show_parsed(__rte_unused void *parsed_result,
+@@ -766,7 +766,7 @@ static void cmd_show_parsed(__attribute__((unused)) void *parsed_result,

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

* patch 'net/mlx5: fix Tx when inlining is impossible' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
  2022-07-07  7:53 ` patch 'examples/bond: fix invalid use of trylock' " christian.ehrhardt
@ 2022-07-07  7:53 ` christian.ehrhardt
  2022-07-07  7:53 ` patch 'net/mlx5: fix GTP handling in header modify action' " christian.ehrhardt
                   ` (83 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:53 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 3901ebc4027b629f9d2c8a28fe16a5c89b7953f8 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Thu, 31 Mar 2022 17:38:41 +0300
Subject: [PATCH] net/mlx5: fix Tx when inlining is impossible

[ upstream commit e2259f93ef455c75bfeda9a7349689b7e9be5981 ]

When txq_inline_max is too large and an mbuf is multi-segment
it may be impossible to inline data and build a valid WQE,
because WQE length would be larger then HW can represent.
It is impossible to detect misconfiguration at startup,
because the condition depends on the mbuf composition.
The check on the data path to prevent the error
treated the length limit as expressed in 64B units,
while the calculated length and limit are in 16B units.
Fix the condition to avoid subsequent TxQ failure and recovery.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 87bfd832c5..a4f627e1a6 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -3427,7 +3427,7 @@ do_align:
 	if (unlikely(loc->wqe_free < ((ds + 3) / 4)))
 		return MLX5_TXCMP_CODE_EXIT;
 	/* Check for maximal WQE size. */
-	if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ((ds + 3) / 4)))
+	if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds))
 		return MLX5_TXCMP_CODE_ERROR;
 #ifdef MLX5_PMD_SOFT_COUNTERS
 	/* Update sent data bytes/packets counters. */
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.313010771 +0200
+++ 0003-net-mlx5-fix-Tx-when-inlining-is-impossible.patch	2022-07-07 09:54:10.777823456 +0200
@@ -1 +1 @@
-From e2259f93ef455c75bfeda9a7349689b7e9be5981 Mon Sep 17 00:00:00 2001
+From 3901ebc4027b629f9d2c8a28fe16a5c89b7953f8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e2259f93ef455c75bfeda9a7349689b7e9be5981 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
- drivers/net/mlx5/mlx5_tx.h | 2 +-
+ drivers/net/mlx5/mlx5_rxtx.c | 2 +-
@@ -25,5 +26,5 @@
-diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
-index 89dac0c65a..dfa04612ff 100644
---- a/drivers/net/mlx5/mlx5_tx.h
-+++ b/drivers/net/mlx5/mlx5_tx.h
-@@ -2070,7 +2070,7 @@ do_build:
+diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
+index 87bfd832c5..a4f627e1a6 100644
+--- a/drivers/net/mlx5/mlx5_rxtx.c
++++ b/drivers/net/mlx5/mlx5_rxtx.c
+@@ -3427,7 +3427,7 @@ do_align:

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

* patch 'net/mlx5: fix GTP handling in header modify action' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
  2022-07-07  7:53 ` patch 'examples/bond: fix invalid use of trylock' " christian.ehrhardt
  2022-07-07  7:53 ` patch 'net/mlx5: fix Tx when inlining is impossible' " christian.ehrhardt
@ 2022-07-07  7:53 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'test/table: fix buffer overflow on lpm entry' " christian.ehrhardt
                   ` (82 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:53 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From fa44459ab3bc5a94279ef1ff232d622cd9ad9573 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Wed, 13 Apr 2022 11:18:31 +0000
Subject: [PATCH] net/mlx5: fix GTP handling in header modify action

[ upstream commit 26f22fa64e9fd66fbdba560c177ea5c9baacba5c ]

GTP items were ignored during conversion of modify header actions. This
caused modify TTL action to generate a wrong modify header command when
tunnel and inner headers used different IP versions.

This patch adds GTP item handling to modify header action conversion.

Fixes: 04233f36c712 ("net/mlx5: fix layer type in header modify action")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index f7e3d92045..e4808abd64 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -135,6 +135,7 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr,
 		case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
 		case RTE_FLOW_ITEM_TYPE_GENEVE:
 		case RTE_FLOW_ITEM_TYPE_MPLS:
+		case RTE_FLOW_ITEM_TYPE_GTP:
 			if (tunnel_decap)
 				attr->attr = 0;
 			break;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.374306588 +0200
+++ 0004-net-mlx5-fix-GTP-handling-in-header-modify-action.patch	2022-07-07 09:54:10.785823505 +0200
@@ -1 +1 @@
-From 26f22fa64e9fd66fbdba560c177ea5c9baacba5c Mon Sep 17 00:00:00 2001
+From fa44459ab3bc5a94279ef1ff232d622cd9ad9573 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 26f22fa64e9fd66fbdba560c177ea5c9baacba5c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 1e9bd63635..da2ddd58cd 100644
+index f7e3d92045..e4808abd64 100644
@@ -25 +26 @@
-@@ -162,6 +162,7 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr,
+@@ -135,6 +135,7 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr,

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

* patch 'test/table: fix buffer overflow on lpm entry' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (2 preceding siblings ...)
  2022-07-07  7:53 ` patch 'net/mlx5: fix GTP handling in header modify action' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'mem: skip attaching external memory in secondary process' " christian.ehrhardt
                   ` (81 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f921474814ce2170eadaf2b62448f5ae19b3ef85 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Thu, 21 Apr 2022 17:35:27 +0000
Subject: [PATCH] test/table: fix buffer overflow on lpm entry

[ upstream commit a6699a6eb22a763ad4bc7498ca53cf89ab9917dd ]

This patch fixes stack buffer overflow reported by ASan.

Bugzilla ID: 820
Fixes: 5205954791cb ("app/test: packet framework unit tests")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 app/test/test_table_tables.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c
index 4ff6ab16aa..494fb6ffaa 100644
--- a/app/test/test_table_tables.c
+++ b/app/test/test_table_tables.c
@@ -290,10 +290,10 @@ test_table_lpm(void)
 	struct rte_mbuf *mbufs[RTE_PORT_IN_BURST_SIZE_MAX];
 	void *table;
 	char *entries[RTE_PORT_IN_BURST_SIZE_MAX];
-	char entry;
+	uint64_t entry;
 	void *entry_ptr;
 	int key_found;
-	uint32_t entry_size = 1;
+	uint32_t entry_size = sizeof(entry);
 
 	/* Initialize params and create tables */
 	struct rte_table_lpm_params lpm_params = {
@@ -355,7 +355,7 @@ test_table_lpm(void)
 	struct rte_table_lpm_key lpm_key;
 	lpm_key.ip = 0xadadadad;
 
-	table = rte_table_lpm_ops.f_create(&lpm_params, 0, 1);
+	table = rte_table_lpm_ops.f_create(&lpm_params, 0, entry_size);
 	if (table == NULL)
 		return -9;
 
@@ -456,10 +456,10 @@ test_table_lpm_ipv6(void)
 	struct rte_mbuf *mbufs[RTE_PORT_IN_BURST_SIZE_MAX];
 	void *table;
 	char *entries[RTE_PORT_IN_BURST_SIZE_MAX];
-	char entry;
+	uint64_t entry;
 	void *entry_ptr;
 	int key_found;
-	uint32_t entry_size = 1;
+	uint32_t entry_size = sizeof(entry);
 
 	/* Initialize params and create tables */
 	struct rte_table_lpm_ipv6_params lpm_params = {
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.426468404 +0200
+++ 0005-test-table-fix-buffer-overflow-on-lpm-entry.patch	2022-07-07 09:54:10.785823505 +0200
@@ -1 +1 @@
-From a6699a6eb22a763ad4bc7498ca53cf89ab9917dd Mon Sep 17 00:00:00 2001
+From f921474814ce2170eadaf2b62448f5ae19b3ef85 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a6699a6eb22a763ad4bc7498ca53cf89ab9917dd ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index d5c5a426bc..010dd5a794 100644
+index 4ff6ab16aa..494fb6ffaa 100644
@@ -22 +23 @@
-@@ -292,10 +292,10 @@ test_table_lpm(void)
+@@ -290,10 +290,10 @@ test_table_lpm(void)
@@ -35 +36 @@
-@@ -357,7 +357,7 @@ test_table_lpm(void)
+@@ -355,7 +355,7 @@ test_table_lpm(void)
@@ -44 +45 @@
-@@ -458,10 +458,10 @@ test_table_lpm_ipv6(void)
+@@ -456,10 +456,10 @@ test_table_lpm_ipv6(void)

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

* patch 'mem: skip attaching external memory in secondary process' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (3 preceding siblings ...)
  2022-07-07  7:54 ` patch 'test/table: fix buffer overflow on lpm entry' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'eal: fix C++ include for device event and DMA' " christian.ehrhardt
                   ` (80 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Deepak Khandelwal; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 6933433fea7c7f590eabd95865e4fbb05105a710 Mon Sep 17 00:00:00 2001
From: Deepak Khandelwal <deepak.khandelwal@intel.com>
Date: Thu, 21 Apr 2022 14:41:21 +0530
Subject: [PATCH] mem: skip attaching external memory in secondary process

[ upstream commit 90bf3f89ed33f78e9f41818caf123e13e508dee7 ]

Currently, EAL init in secondary processes will attach all fbarrays
in the memconfig to have access to the primary process's page tables.
However, fbarrays corresponding to external memory segments should
not be attached at initialization, because this will happen as part
of `rte_extmem_attach` [1] or `rte_malloc_heap_memory_attach` [2] calls.

1: https://doc.dpdk.org/api/rte__memory_8h.html#a2796da68de6825f8edf53759f8e4d230
2: https://doc.dpdk.org/api/rte__malloc_8h.html#af6360dea35bdf162feeb2b62cf149fd3

Fixes: ff3619d6244b ("malloc: allow attaching to external memory chunks")

Suggested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Deepak Khandelwal <deepak.khandelwal@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/freebsd/eal/eal_memory.c | 4 ++--
 lib/librte_eal/linux/eal/eal_memory.c   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/freebsd/eal/eal_memory.c b/lib/librte_eal/freebsd/eal/eal_memory.c
index fb1549fbe6..1cc36dff60 100644
--- a/lib/librte_eal/freebsd/eal/eal_memory.c
+++ b/lib/librte_eal/freebsd/eal/eal_memory.c
@@ -508,8 +508,8 @@ memseg_secondary_init(void)
 
 		msl = &mcfg->memsegs[msl_idx];
 
-		/* skip empty memseg lists */
-		if (msl->memseg_arr.len == 0)
+		/* skip empty and external memseg lists */
+		if (msl->memseg_arr.len == 0 || msl->external)
 			continue;
 
 		if (rte_fbarray_attach(&msl->memseg_arr)) {
diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
index c93d9bb2b8..e7ab3aaf17 100644
--- a/lib/librte_eal/linux/eal/eal_memory.c
+++ b/lib/librte_eal/linux/eal/eal_memory.c
@@ -2423,8 +2423,8 @@ memseg_secondary_init(void)
 
 		msl = &mcfg->memsegs[msl_idx];
 
-		/* skip empty memseg lists */
-		if (msl->memseg_arr.len == 0)
+		/* skip empty and external memseg lists */
+		if (msl->memseg_arr.len == 0 || msl->external)
 			continue;
 
 		if (rte_fbarray_attach(&msl->memseg_arr)) {
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.463943632 +0200
+++ 0006-mem-skip-attaching-external-memory-in-secondary-proc.patch	2022-07-07 09:54:10.789823530 +0200
@@ -1 +1 @@
-From 90bf3f89ed33f78e9f41818caf123e13e508dee7 Mon Sep 17 00:00:00 2001
+From 6933433fea7c7f590eabd95865e4fbb05105a710 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 90bf3f89ed33f78e9f41818caf123e13e508dee7 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -22,2 +23,2 @@
- lib/eal/freebsd/eal_memory.c | 4 ++--
- lib/eal/linux/eal_memory.c   | 4 ++--
+ lib/librte_eal/freebsd/eal/eal_memory.c | 4 ++--
+ lib/librte_eal/linux/eal/eal_memory.c   | 4 ++--
@@ -26,5 +27,5 @@
-diff --git a/lib/eal/freebsd/eal_memory.c b/lib/eal/freebsd/eal_memory.c
-index 78ac142b82..17ab10e0ca 100644
---- a/lib/eal/freebsd/eal_memory.c
-+++ b/lib/eal/freebsd/eal_memory.c
-@@ -446,8 +446,8 @@ memseg_secondary_init(void)
+diff --git a/lib/librte_eal/freebsd/eal/eal_memory.c b/lib/librte_eal/freebsd/eal/eal_memory.c
+index fb1549fbe6..1cc36dff60 100644
+--- a/lib/librte_eal/freebsd/eal/eal_memory.c
++++ b/lib/librte_eal/freebsd/eal/eal_memory.c
+@@ -508,8 +508,8 @@ memseg_secondary_init(void)
@@ -41,5 +42,5 @@
-diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
-index ee1a9e6800..c890c42106 100644
---- a/lib/eal/linux/eal_memory.c
-+++ b/lib/eal/linux/eal_memory.c
-@@ -1874,8 +1874,8 @@ memseg_secondary_init(void)
+diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
+index c93d9bb2b8..e7ab3aaf17 100644
+--- a/lib/librte_eal/linux/eal/eal_memory.c
++++ b/lib/librte_eal/linux/eal/eal_memory.c
+@@ -2423,8 +2423,8 @@ memseg_secondary_init(void)

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

* patch 'eal: fix C++ include for device event and DMA' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (4 preceding siblings ...)
  2022-07-07  7:54 ` patch 'mem: skip attaching external memory in secondary process' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'crypto/dpaa_sec: fix digest size' " christian.ehrhardt
                   ` (79 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Tianhao Chai; +Cc: Bruce Richardson, Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a2e44b157eacb14992251fc36adceb52ac50c5cd Mon Sep 17 00:00:00 2001
From: Tianhao Chai <cth451@gmail.com>
Date: Wed, 4 May 2022 23:39:35 -0500
Subject: [PATCH] eal: fix C++ include for device event and DMA

[ upstream commit 28c5d600723a9bb384a4b2f79bf6af8c40950bba ]

Currently the "extern C" section ends right before rte_dev_dma_unmap
and other DMA function declarations, causing some C++ compilers to
produce C++ mangled symbols to rte_dev_dma_unmap instead of C symbols.
This leads to build failures later when linking a final executable
against this object.

Fixes: a753e53d517b ("eal: add device event monitor framework")

Signed-off-by: Tianhao Chai <cth451@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/librte_eal/common/include/rte_dev.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index a5c35f00c0..606f4b7cc1 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -339,10 +339,6 @@ rte_dev_iterator_next(struct rte_dev_iterator *it);
 	     dev != NULL; \
 	     dev = rte_dev_iterator_next(it))
 
-#ifdef __cplusplus
-}
-#endif
-
 /**
  * @warning
  * @b EXPERIMENTAL: this API may change without prior notice
@@ -515,4 +511,8 @@ int
 rte_dev_dma_unmap(struct rte_device *dev, void *addr, uint64_t iova,
 		  size_t len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_DEV_H_ */
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.501421957 +0200
+++ 0007-eal-fix-C-include-for-device-event-and-DMA.patch	2022-07-07 09:54:10.789823530 +0200
@@ -1 +1 @@
-From 28c5d600723a9bb384a4b2f79bf6af8c40950bba Mon Sep 17 00:00:00 2001
+From a2e44b157eacb14992251fc36adceb52ac50c5cd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 28c5d600723a9bb384a4b2f79bf6af8c40950bba ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
- lib/eal/include/rte_dev.h | 8 ++++----
+ lib/librte_eal/common/include/rte_dev.h | 8 ++++----
@@ -22,5 +23,5 @@
-diff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h
-index 448a41cb0e..e6ff1218f9 100644
---- a/lib/eal/include/rte_dev.h
-+++ b/lib/eal/include/rte_dev.h
-@@ -320,10 +320,6 @@ rte_dev_iterator_next(struct rte_dev_iterator *it);
+diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
+index a5c35f00c0..606f4b7cc1 100644
+--- a/lib/librte_eal/common/include/rte_dev.h
++++ b/lib/librte_eal/common/include/rte_dev.h
+@@ -339,10 +339,6 @@ rte_dev_iterator_next(struct rte_dev_iterator *it);
@@ -37 +38 @@
-@@ -496,4 +492,8 @@ int
+@@ -515,4 +511,8 @@ int

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

* patch 'crypto/dpaa_sec: fix digest size' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (5 preceding siblings ...)
  2022-07-07  7:54 ` patch 'eal: fix C++ include for device event and DMA' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'crypto/dpaa2_sec: fix buffer pool ID check' " christian.ehrhardt
                   ` (78 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 69e05f69da5630d54d60783a10f4660188c69fda Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Thu, 17 Mar 2022 14:25:58 +0530
Subject: [PATCH] crypto/dpaa_sec: fix digest size

[ upstream commit 841147ef973b415e8e21b6521e93361001ee2fc1 ]

DPAA crypto driver can support 64 bytes size digest size
for SHA512-HMAC.
This patch changes the value of macro max supported digest size to
64.

Fixes: c3e85bdcc6e6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h
index 3ecc7eae51..4b07b7d5e7 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  *
- *   Copyright 2016 NXP
+ *   Copyright 2016-2022 NXP
  *
  */
 
@@ -207,7 +207,7 @@ struct dpaa_sec_job {
 	struct qm_sg_entry sg[MAX_JOB_SG_ENTRIES];
 };
 
-#define DPAA_MAX_NB_MAX_DIGEST	32
+#define DPAA_MAX_NB_MAX_DIGEST	64
 struct dpaa_sec_op_ctx {
 	struct dpaa_sec_job job;
 	struct rte_crypto_op *op;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.544509912 +0200
+++ 0008-crypto-dpaa_sec-fix-digest-size.patch	2022-07-07 09:54:10.789823530 +0200
@@ -1 +1 @@
-From 841147ef973b415e8e21b6521e93361001ee2fc1 Mon Sep 17 00:00:00 2001
+From 69e05f69da5630d54d60783a10f4660188c69fda Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 841147ef973b415e8e21b6521e93361001ee2fc1 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 7890687828..b3f2258ead 100644
+index 3ecc7eae51..4b07b7d5e7 100644
@@ -26 +27 @@
-- *   Copyright 2016-2021 NXP
+- *   Copyright 2016 NXP
@@ -31 +32 @@
-@@ -231,7 +231,7 @@ struct dpaa_sec_job {
+@@ -207,7 +207,7 @@ struct dpaa_sec_job {
@@ -39 +40 @@
- 	union {
+ 	struct rte_crypto_op *op;

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

* patch 'crypto/dpaa2_sec: fix buffer pool ID check' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (6 preceding siblings ...)
  2022-07-07  7:54 ` patch 'crypto/dpaa_sec: fix digest size' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'crypto/dpaa_sec: fix secondary process probing' " christian.ehrhardt
                   ` (77 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 003f602e622878405ba07c2a5b3c560ebb96c0c9 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Thu, 28 Apr 2022 17:17:21 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix buffer pool ID check

[ upstream commit e2b70a309f901b6aa947087a318ba0be3ea8782b ]

Simple fd rely on bpid of the buffers whereas
other FD types can support buffers without bpid
of pool.

So moving the bpid check to simple fd to mbuf
conversion function.

Fixes: 8d1f3a5d751b ("crypto/dpaa2_sec: support crypto operation")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index e6691c6cd0..634f94fe4e 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1530,6 +1530,10 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)
 	int16_t diff = 0;
 	dpaa2_sec_session *sess_priv __rte_unused;
 
+	if (unlikely(DPAA2_GET_FD_IVP(fd))) {
+		DPAA2_SEC_ERR("error: non inline buffer");
+		return NULL;
+	}
 	struct rte_mbuf *mbuf = DPAA2_INLINE_MBUF_FROM_BUF(
 		DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)),
 		rte_dpaa2_bpid_info[DPAA2_GET_FD_BPID(fd)].meta_data_size);
@@ -1576,11 +1580,6 @@ sec_fd_to_mbuf(const struct qbman_fd *fd)
 	 * We can have a better approach to use the inline Mbuf
 	 */
 
-	if (unlikely(DPAA2_GET_FD_IVP(fd))) {
-		/* TODO complete it. */
-		DPAA2_SEC_ERR("error: non inline buffer");
-		return NULL;
-	}
 	op = (struct rte_crypto_op *)DPAA2_GET_FLE_ADDR((fle - 1));
 
 	/* Prefeth op */
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.589491121 +0200
+++ 0009-crypto-dpaa2_sec-fix-buffer-pool-ID-check.patch	2022-07-07 09:54:10.793823555 +0200
@@ -1 +1 @@
-From e2b70a309f901b6aa947087a318ba0be3ea8782b Mon Sep 17 00:00:00 2001
+From 003f602e622878405ba07c2a5b3c560ebb96c0c9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e2b70a309f901b6aa947087a318ba0be3ea8782b ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 03fef5e500..2374d67978 100644
+index e6691c6cd0..634f94fe4e 100644
@@ -26 +27 @@
-@@ -1566,6 +1566,10 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)
+@@ -1530,6 +1530,10 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)
@@ -37 +38 @@
-@@ -1612,11 +1616,6 @@ sec_fd_to_mbuf(const struct qbman_fd *fd)
+@@ -1576,11 +1580,6 @@ sec_fd_to_mbuf(const struct qbman_fd *fd)

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

* patch 'crypto/dpaa_sec: fix secondary process probing' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (7 preceding siblings ...)
  2022-07-07  7:54 ` patch 'crypto/dpaa2_sec: fix buffer pool ID check' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'crypto/dpaa2_sec: fix operation status for simple FD' " christian.ehrhardt
                   ` (76 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Vanshika Shukla; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From cf5c06e209b699b1971b4378f66d16f522474231 Mon Sep 17 00:00:00 2001
From: Vanshika Shukla <vanshika.shukla@nxp.com>
Date: Thu, 28 Apr 2022 17:17:27 +0530
Subject: [PATCH] crypto/dpaa_sec: fix secondary process probing

[ upstream commit 96ec64f12db163b47c4a69613c7e7347919ff54f ]

DPAA hardware supports non-i/o performing secondary
applications only. So we do not have to probe crypto
devices in secondary applications.

Fixes: c3e85bdcc6e6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")

Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 1a4a296ae2..95dd58bfb3 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -3424,23 +3424,24 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
 
 	int retval;
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return 0;
+
 	snprintf(cryptodev_name, sizeof(cryptodev_name), "%s", dpaa_dev->name);
 
 	cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id());
 	if (cryptodev == NULL)
 		return -ENOMEM;
 
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
-		cryptodev->data->dev_private = rte_zmalloc_socket(
-					"cryptodev private structure",
-					sizeof(struct dpaa_sec_dev_private),
-					RTE_CACHE_LINE_SIZE,
-					rte_socket_id());
+	cryptodev->data->dev_private = rte_zmalloc_socket(
+				"cryptodev private structure",
+				sizeof(struct dpaa_sec_dev_private),
+				RTE_CACHE_LINE_SIZE,
+				rte_socket_id());
 
-		if (cryptodev->data->dev_private == NULL)
-			rte_panic("Cannot allocate memzone for private "
-					"device data");
-	}
+	if (cryptodev->data->dev_private == NULL)
+		rte_panic("Cannot allocate memzone for private "
+				"device data");
 
 	dpaa_dev->crypto_dev = cryptodev;
 	cryptodev->device = &dpaa_dev->device;
@@ -3478,8 +3479,7 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
 		return 0;
 
 	/* In case of error, cleanup is done */
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-		rte_free(cryptodev->data->dev_private);
+	rte_free(cryptodev->data->dev_private);
 
 	rte_cryptodev_pmd_release_device(cryptodev);
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.630620949 +0200
+++ 0010-crypto-dpaa_sec-fix-secondary-process-probing.patch	2022-07-07 09:54:10.797823580 +0200
@@ -1 +1 @@
-From 96ec64f12db163b47c4a69613c7e7347919ff54f Mon Sep 17 00:00:00 2001
+From cf5c06e209b699b1971b4378f66d16f522474231 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 96ec64f12db163b47c4a69613c7e7347919ff54f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 23a94d7e41..6f2b4baf57 100644
+index 1a4a296ae2..95dd58bfb3 100644
@@ -23 +24 @@
-@@ -3766,23 +3766,24 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
+@@ -3424,23 +3424,24 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
@@ -58,3 +59,3 @@
-@@ -3824,8 +3825,7 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
- 	retval = -ENXIO;
- out:
+@@ -3478,8 +3479,7 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
+ 		return 0;
+ 

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

* patch 'crypto/dpaa2_sec: fix operation status for simple FD' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (8 preceding siblings ...)
  2022-07-07  7:54 ` patch 'crypto/dpaa_sec: fix secondary process probing' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'common/dpaax: fix short MAC-I IV calculation for ZUC' " christian.ehrhardt
                   ` (75 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From dcc0986eba579fd645fd20f2fc4e52ceb0cb00ba Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Thu, 28 Apr 2022 17:17:30 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix operation status for simple FD

[ upstream commit 04408e461e9dde8c921c851e0ad1611b178ce630 ]

Driver is not filling the operation status on dequeue
in case the FD is simple.

So setting the status as per the results.

Fixes: 0a23d4b6f4c2 ("crypto/dpaa2_sec: support protocol offload IPsec")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 634f94fe4e..00a421f6f0 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1552,6 +1552,14 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)
 	else
 		mbuf->data_off += SEC_FLC_DHR_INBOUND;
 
+	if (unlikely(fd->simple.frc)) {
+		DPAA2_SEC_ERR("SEC returned Error - %x",
+				fd->simple.frc);
+		op->status = RTE_CRYPTO_OP_STATUS_ERROR;
+	} else {
+		op->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
+	}
+
 	return op;
 }
 #endif
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.673815334 +0200
+++ 0011-crypto-dpaa2_sec-fix-operation-status-for-simple-FD.patch	2022-07-07 09:54:10.801823604 +0200
@@ -1 +1 @@
-From 04408e461e9dde8c921c851e0ad1611b178ce630 Mon Sep 17 00:00:00 2001
+From dcc0986eba579fd645fd20f2fc4e52ceb0cb00ba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 04408e461e9dde8c921c851e0ad1611b178ce630 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 9f2b384af9..8444f1a795 100644
+index 634f94fe4e..00a421f6f0 100644
@@ -24 +25 @@
-@@ -1591,6 +1591,14 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)
+@@ -1552,6 +1552,14 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)

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

* patch 'common/dpaax: fix short MAC-I IV calculation for ZUC' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (9 preceding siblings ...)
  2022-07-07  7:54 ` patch 'crypto/dpaa2_sec: fix operation status for simple FD' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'examples/l2fwd-crypto: fix stats refresh rate' " christian.ehrhardt
                   ` (74 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 85d6c18a8260d0ff3bfa4f726fcfedbe8e998cdf Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Thu, 28 Apr 2022 17:17:33 +0530
Subject: [PATCH] common/dpaax: fix short MAC-I IV calculation for ZUC

[ upstream commit c54fb3f7f77fa919673966227fd8964dbfbb3781 ]

Fixing the IV calculation for ZUC based short MAC-I
as per the HW security engine guidelines.

Fixes: 73a24060cd70 ("crypto/dpaa2_sec: add sample PDCP descriptor APIs")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/common/dpaax/caamflib/desc/pdcp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index bf82bd53c8..595d0e0318 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -3771,7 +3771,7 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,
 			return -ENOTSUP;
 		}
 		iv[0] = 0xFFFFFFFF;
-		iv[1] = swap ? swab32(0xFC000000) : 0xFC000000;
+		iv[1] = swab32(0xFC000000);
 		iv[2] = 0x00000000; /* unused */
 
 		KEY(p, KEY2, authdata->key_enc_flags, authdata->key,
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.717844906 +0200
+++ 0012-common-dpaax-fix-short-MAC-I-IV-calculation-for-ZUC.patch	2022-07-07 09:54:10.805823629 +0200
@@ -1 +1 @@
-From c54fb3f7f77fa919673966227fd8964dbfbb3781 Mon Sep 17 00:00:00 2001
+From 85d6c18a8260d0ff3bfa4f726fcfedbe8e998cdf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c54fb3f7f77fa919673966227fd8964dbfbb3781 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 46153b9c29..289ee2a7d5 100644
+index bf82bd53c8..595d0e0318 100644
@@ -22,3 +23,3 @@
-@@ -3066,7 +3066,7 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,
- 
- 	case PDCP_AUTH_TYPE_ZUC:
+@@ -3771,7 +3771,7 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,
+ 			return -ENOTSUP;
+ 		}

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

* patch 'examples/l2fwd-crypto: fix stats refresh rate' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (10 preceding siblings ...)
  2022-07-07  7:54 ` patch 'common/dpaax: fix short MAC-I IV calculation for ZUC' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/nfp: remove unneeded header inclusion' " christian.ehrhardt
                   ` (73 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Raja Zidane; +Cc: Matan Azrad, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ea3fb95adc0304302497dd82dd5bb84343eeb9dc Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Thu, 7 Apr 2022 14:42:49 +0300
Subject: [PATCH] examples/l2fwd-crypto: fix stats refresh rate

[ upstream commit af676be9e6671b25c69af2aa5fc2d40d562137f6 ]

TIMER_MILLISECOND is defined as the number of cpu cycles per millisecond,
current definition is correct for cores with frequency of 2GHZ, for cores
with different frequency, it caused different periods between refresh,
(i.e. the definition is about 14ms on ARM cores).
The devarg that stated the period between stats print was not used,
instead, it was always defaulted to 10 seconds (on 2GHZ core).

Use DPDK API to get CPU frequency, to define TIMER_MILLISECOND.
Use the refresh period devarg instead of defaulting to 10s always.

Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/l2fwd-crypto/main.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 5d41e6cb91..d7692464e4 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -252,11 +252,9 @@ struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS];
 struct l2fwd_crypto_statistics crypto_statistics[RTE_CRYPTO_MAX_DEVS];
 
 /* A tsc-based timer responsible for triggering statistics printout */
-#define TIMER_MILLISECOND 2000000ULL /* around 1ms at 2 Ghz */
+#define TIMER_MILLISECOND (rte_get_tsc_hz() / 1000)
 #define MAX_TIMER_PERIOD 86400UL /* 1 day max */
-
-/* default period is 10 seconds */
-static int64_t timer_period = 10 * TIMER_MILLISECOND * 1000;
+#define DEFAULT_TIMER_PERIOD 10UL
 
 /* Print out statistics on packets dropped */
 static void
@@ -879,18 +877,17 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options)
 			}
 
 			/* if timer is enabled */
-			if (timer_period > 0) {
+			if (options->refresh_period > 0) {
 
 				/* advance the timer */
 				timer_tsc += diff_tsc;
 
 				/* if timer has reached its timeout */
 				if (unlikely(timer_tsc >=
-						(uint64_t)timer_period)) {
+						options->refresh_period)) {
 
 					/* do this only on master core */
-					if (lcore_id == rte_get_master_lcore()
-						&& options->refresh_period) {
+					if (lcore_id == rte_get_master_lcore()) {
 						print_stats();
 						timer_tsc = 0;
 					}
@@ -1451,7 +1448,8 @@ l2fwd_crypto_default_options(struct l2fwd_crypto_options *options)
 {
 	options->portmask = 0xffffffff;
 	options->nb_ports_per_lcore = 1;
-	options->refresh_period = 10000;
+	options->refresh_period = DEFAULT_TIMER_PERIOD *
+					TIMER_MILLISECOND * 1000;
 	options->single_lcore = 0;
 	options->sessionless = 0;
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.763087011 +0200
+++ 0013-examples-l2fwd-crypto-fix-stats-refresh-rate.patch	2022-07-07 09:54:10.805823629 +0200
@@ -1 +1 @@
-From af676be9e6671b25c69af2aa5fc2d40d562137f6 Mon Sep 17 00:00:00 2001
+From ea3fb95adc0304302497dd82dd5bb84343eeb9dc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af676be9e6671b25c69af2aa5fc2d40d562137f6 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index bbdb263143..b1e2613ccf 100644
+index 5d41e6cb91..d7692464e4 100644
@@ -44 +45 @@
-@@ -894,18 +892,17 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options)
+@@ -879,18 +877,17 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options)
@@ -59,2 +60,2 @@
- 					/* do this only on main core */
--					if (lcore_id == rte_get_main_lcore()
+ 					/* do this only on master core */
+-					if (lcore_id == rte_get_master_lcore()
@@ -62 +63 @@
-+					if (lcore_id == rte_get_main_lcore()) {
++					if (lcore_id == rte_get_master_lcore()) {
@@ -66 +67 @@
-@@ -1481,7 +1478,8 @@ l2fwd_crypto_default_options(struct l2fwd_crypto_options *options)
+@@ -1451,7 +1448,8 @@ l2fwd_crypto_default_options(struct l2fwd_crypto_options *options)

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

* patch 'net/nfp: remove unneeded header inclusion' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (11 preceding siblings ...)
  2022-07-07  7:54 ` patch 'examples/l2fwd-crypto: fix stats refresh rate' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/bonding: fix RSS key config with extended key length' " christian.ehrhardt
                   ` (72 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: David Marchand; +Cc: Niklas Söderlund, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 43f2d3abe831a1e8c99833f7f5b9612d8abc4ec6 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 8 Apr 2022 11:41:16 +0200
Subject: [PATCH] net/nfp: remove unneeded header inclusion
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit a866966bdf7080ad2bd18465dfd5585e1bc535d6 ]

Looking at this driver history, there was never a need for including
execinfo.h.

Fixes: bdbf45c24b07 ("net/nfp: fix build with musl libc")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
index 0b9db974e1..0fb3e7864b 100644
--- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
+++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
@@ -16,9 +16,6 @@
 
 #include <assert.h>
 #include <stdio.h>
-#if defined(RTE_BACKTRACE)
-#include <execinfo.h>
-#endif
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdint.h>
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.803722905 +0200
+++ 0014-net-nfp-remove-unneeded-header-inclusion.patch	2022-07-07 09:54:10.805823629 +0200
@@ -1 +1 @@
-From a866966bdf7080ad2bd18465dfd5585e1bc535d6 Mon Sep 17 00:00:00 2001
+From 43f2d3abe831a1e8c99833f7f5b9612d8abc4ec6 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit a866966bdf7080ad2bd18465dfd5585e1bc535d6 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index bad80a5a1c..08bc4e8ef2 100644
+index 0b9db974e1..0fb3e7864b 100644

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

* patch 'net/bonding: fix RSS key config with extended key length' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (12 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/nfp: remove unneeded header inclusion' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/cxgbe: fix port ID in Rx mbuf' " christian.ehrhardt
                   ` (71 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Ke Zhang; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b1355507e2197eff20d646146f4236f7e5b0cb11 Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang@intel.com>
Date: Mon, 11 Apr 2022 05:40:03 +0000
Subject: [PATCH] net/bonding: fix RSS key config with extended key length

[ upstream commit 94d9c7d45b43fd44af718b621fa52e556028aa3d ]

When creating a bonding device, if the slave device's
RSS key length = standard_rss_key length + extended_hash_key length,
then bonding device will be same as slave,
in function bond_ethdev_configure(), the default_rss_key length is 40,
it is not matched, so it should calculate a new key for bonding device
if the default key could not be used.

Fixes: 6b1a001ec546 ("net/bonding: fix RSS key length")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 5b1507e817..2c55621740 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3577,13 +3577,18 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 			       internals->rss_key_len);
 		} else {
 			if (internals->rss_key_len > sizeof(default_rss_key)) {
-				RTE_BOND_LOG(ERR,
-				       "There is no suitable default hash key");
-				return -EINVAL;
+				/*
+				 * If the rss_key includes standard_rss_key and
+				 * extended_hash_key, the rss key length will be
+				 * larger than default rss key length, so it should
+				 * re-calculate the hash key.
+				 */
+				for (i = 0; i < internals->rss_key_len; i++)
+					internals->rss_key[i] = (uint8_t)rte_rand();
+			} else {
+				memcpy(internals->rss_key, default_rss_key,
+					internals->rss_key_len);
 			}
-
-			memcpy(internals->rss_key, default_rss_key,
-			       internals->rss_key_len);
 		}
 
 		for (i = 0; i < RTE_DIM(internals->reta_conf); i++) {
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.842701445 +0200
+++ 0015-net-bonding-fix-RSS-key-config-with-extended-key-len.patch	2022-07-07 09:54:10.813823679 +0200
@@ -1 +1 @@
-From 94d9c7d45b43fd44af718b621fa52e556028aa3d Mon Sep 17 00:00:00 2001
+From b1355507e2197eff20d646146f4236f7e5b0cb11 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 94d9c7d45b43fd44af718b621fa52e556028aa3d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index b305b6a35b..5cbe89031b 100644
+index 5b1507e817..2c55621740 100644
@@ -26 +27 @@
-@@ -3617,13 +3617,18 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3577,13 +3577,18 @@ bond_ethdev_configure(struct rte_eth_dev *dev)

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

* patch 'net/cxgbe: fix port ID in Rx mbuf' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (13 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/bonding: fix RSS key config with extended key length' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/vhost: fix access to freed memory' " christian.ehrhardt
                   ` (70 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 41922761efef1c5fde2ed5ffded60ded85f051d8 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Tue, 19 Apr 2022 03:54:18 +0530
Subject: [PATCH] net/cxgbe: fix port ID in Rx mbuf

[ upstream commit 86b4d566467d06c66dd5ed2474e12bb17d8861f2 ]

Fill the correct DPDK ethdev port_id, instead of local adapter
physical port_id in mbufs allocated for Rx.

Fixes: 78fc1a716ae8 ("cxgbe: improve Rx performance")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/sge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index 7587c46aab..61ee218be2 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -1939,7 +1939,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
 	iq->stat = (void *)&iq->desc[iq->size * 8];
 	iq->eth_dev = eth_dev;
 	iq->handler = hnd;
-	iq->port_id = pi->pidx;
+	iq->port_id = eth_dev->data->port_id;
 	iq->mb_pool = mp;
 
 	/* set offset to -1 to distinguish ingress queues without FL */
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.890540169 +0200
+++ 0016-net-cxgbe-fix-port-ID-in-Rx-mbuf.patch	2022-07-07 09:54:10.813823679 +0200
@@ -1 +1 @@
-From 86b4d566467d06c66dd5ed2474e12bb17d8861f2 Mon Sep 17 00:00:00 2001
+From 41922761efef1c5fde2ed5ffded60ded85f051d8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 86b4d566467d06c66dd5ed2474e12bb17d8861f2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 1c76b8e4d0..5c176004f9 100644
+index 7587c46aab..61ee218be2 100644
@@ -21 +22 @@
-@@ -1910,7 +1910,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
+@@ -1939,7 +1939,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,

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

* patch 'net/vhost: fix access to freed memory' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (14 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/cxgbe: fix port ID in Rx mbuf' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/vhost: fix TSO feature default disablement' " christian.ehrhardt
                   ` (69 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Yuan Wang; +Cc: Wei Ling, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From c7926bd5b5bd0b67910eed63f17cc3f0bc8fb4de Mon Sep 17 00:00:00 2001
From: Yuan Wang <yuanx.wang@intel.com>
Date: Sat, 12 Mar 2022 00:35:12 +0800
Subject: [PATCH] net/vhost: fix access to freed memory

[ upstream commit 9dc6bb06824f3c5887f0436ddba5ab9116cb277e ]

This patch fixes heap-use-after-free reported by ASan.

It is possible for the rte_vhost_dequeue_burst() to access the vq
is freed when numa_realloc() gets called in the device running state.
The control plane will set the vq->access_lock to protected the vq
from the data plane. Unfortunately the lock will fail at the moment
the vq is freed, allowing the rte_vhost_dequeue_burst() to access
the fields of the vq, which will trigger a heap-use-after-free error.

In the case of multiple queues, the vhost pmd can access other queues
that are not ready when the first queue is ready, which makes no sense
and also allows numa_realloc() and rte_vhost_dequeue_burst() access to
vq to happen at the same time. By controlling vq->allow_queuing we can make
the pmd access only the queues that are ready.

Fixes: 1ce3c7fe149 ("net/vhost: emulate device start/stop behavior")

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 428aacf0a7..0926a43781 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -656,6 +656,7 @@ update_queuing_status(struct rte_eth_dev *dev)
 {
 	struct pmd_internal *internal = dev->data->dev_private;
 	struct vhost_queue *vq;
+	struct rte_vhost_vring_state *state;
 	unsigned int i;
 	int allow_queuing = 1;
 
@@ -666,12 +667,17 @@ update_queuing_status(struct rte_eth_dev *dev)
 	    rte_atomic32_read(&internal->dev_attached) == 0)
 		allow_queuing = 0;
 
+	state = vring_states[dev->data->port_id];
+
 	/* Wait until rx/tx_pkt_burst stops accessing vhost device */
 	for (i = 0; i < dev->data->nb_rx_queues; i++) {
 		vq = dev->data->rx_queues[i];
 		if (vq == NULL)
 			continue;
-		rte_atomic32_set(&vq->allow_queuing, allow_queuing);
+		if (allow_queuing && state->cur[vq->virtqueue_id])
+			rte_atomic32_set(&vq->allow_queuing, 1);
+		else
+			rte_atomic32_set(&vq->allow_queuing, 0);
 		while (rte_atomic32_read(&vq->while_queuing))
 			rte_pause();
 	}
@@ -680,7 +686,10 @@ update_queuing_status(struct rte_eth_dev *dev)
 		vq = dev->data->tx_queues[i];
 		if (vq == NULL)
 			continue;
-		rte_atomic32_set(&vq->allow_queuing, allow_queuing);
+		if (allow_queuing && state->cur[vq->virtqueue_id])
+			rte_atomic32_set(&vq->allow_queuing, 1);
+		else
+			rte_atomic32_set(&vq->allow_queuing, 0);
 		while (rte_atomic32_read(&vq->while_queuing))
 			rte_pause();
 	}
@@ -854,6 +863,8 @@ vring_state_changed(int vid, uint16_t vring, int enable)
 	state->max_vring = RTE_MAX(vring, state->max_vring);
 	rte_spinlock_unlock(&state->lock);
 
+	update_queuing_status(eth_dev);
+
 	VHOST_LOG(INFO, "vring%u is %s\n",
 			vring, enable ? "enabled" : "disabled");
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.930120095 +0200
+++ 0017-net-vhost-fix-access-to-freed-memory.patch	2022-07-07 09:54:10.817823702 +0200
@@ -1 +1 @@
-From 9dc6bb06824f3c5887f0436ddba5ab9116cb277e Mon Sep 17 00:00:00 2001
+From c7926bd5b5bd0b67910eed63f17cc3f0bc8fb4de Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9dc6bb06824f3c5887f0436ddba5ab9116cb277e ]
+
@@ -31 +33 @@
-index 070f0e6dfd..8a6595504a 100644
+index 428aacf0a7..0926a43781 100644
@@ -34 +36 @@
-@@ -720,6 +720,7 @@ update_queuing_status(struct rte_eth_dev *dev)
+@@ -656,6 +656,7 @@ update_queuing_status(struct rte_eth_dev *dev)
@@ -42 +44 @@
-@@ -730,12 +731,17 @@ update_queuing_status(struct rte_eth_dev *dev)
+@@ -666,12 +667,17 @@ update_queuing_status(struct rte_eth_dev *dev)
@@ -61 +63 @@
-@@ -744,7 +750,10 @@ update_queuing_status(struct rte_eth_dev *dev)
+@@ -680,7 +686,10 @@ update_queuing_status(struct rte_eth_dev *dev)
@@ -73 +75 @@
-@@ -967,6 +976,8 @@ vring_state_changed(int vid, uint16_t vring, int enable)
+@@ -854,6 +863,8 @@ vring_state_changed(int vid, uint16_t vring, int enable)

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

* patch 'net/vhost: fix TSO feature default disablement' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (15 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/vhost: fix access to freed memory' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'vhost: fix missing virtqueue lock protection' " christian.ehrhardt
                   ` (68 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a09c7ed8a235e2c0badd10eab88761987a8845f6 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Fri, 22 Apr 2022 11:35:43 +0200
Subject: [PATCH] net/vhost: fix TSO feature default disablement

[ upstream commit 6d7046215a3da334bac77d2b06e5ae1c208f3ca4 ]

By default, TSO feature should be disabled because it requires
application's support to be functional as mentioned in the
documentation.

However, if "tso" devarg was not specified, the feature did
not get disabled.

This patch fixes this issue, so that TSO is disabled, even if
"tso=0" is not passed as devarg.

Fixes: e289400669d5 ("net/vhost: support TSO disabling")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 0926a43781..35dcd84b8b 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1500,11 +1500,11 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
 				&open_int, &tso);
 		if (ret < 0)
 			goto out_free;
+	}
 
-		if (tso == 0) {
-			disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO4);
-			disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO6);
-		}
+	if (tso == 0) {
+		disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO4);
+		disable_flags |= (1ULL << VIRTIO_NET_F_HOST_TSO6);
 	}
 
 	if (dev->device.numa_node == SOCKET_ID_ANY)
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:11.971035427 +0200
+++ 0018-net-vhost-fix-TSO-feature-default-disablement.patch	2022-07-07 09:54:10.817823702 +0200
@@ -1 +1 @@
-From 6d7046215a3da334bac77d2b06e5ae1c208f3ca4 Mon Sep 17 00:00:00 2001
+From a09c7ed8a235e2c0badd10eab88761987a8845f6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6d7046215a3da334bac77d2b06e5ae1c208f3ca4 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 8a6595504a..a248a65df4 100644
+index 0926a43781..35dcd84b8b 100644
@@ -29 +30 @@
-@@ -1654,11 +1654,11 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
+@@ -1500,11 +1500,11 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
@@ -44 +45 @@
- 	if (rte_kvargs_count(kvlist, ETH_VHOST_LINEAR_BUF) == 1) {
+ 	if (dev->device.numa_node == SOCKET_ID_ANY)

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

* patch 'vhost: fix missing virtqueue lock protection' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (16 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/vhost: fix TSO feature default disablement' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/dpaa: fix event queue detach' " christian.ehrhardt
                   ` (67 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5189c8ebb88cd88996d52c2d51ec4e2350df5891 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 24 Mar 2022 13:46:34 +0100
Subject: [PATCH] vhost: fix missing virtqueue lock protection

[ upstream commit c5736998305def298e26f8fa73b9995f184fc983 ]

This patch ensures virtqueue metadata are not being
modified while rte_vhost_vring_call() is executed.

Fixes: 6c299bb7322f ("vhost: introduce vring call API")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_vhost/vhost.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index bb86e02d1e..0b88fc1a49 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -1248,11 +1248,15 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)
 	if (!vq)
 		return -1;
 
+	rte_spinlock_lock(&vq->access_lock);
+
 	if (vq_is_packed(dev))
 		vhost_vring_call_packed(dev, vq);
 	else
 		vhost_vring_call_split(dev, vq);
 
+	rte_spinlock_unlock(&vq->access_lock);
+
 	return 0;
 }
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.010787775 +0200
+++ 0019-vhost-fix-missing-virtqueue-lock-protection.patch	2022-07-07 09:54:10.817823702 +0200
@@ -1 +1 @@
-From c5736998305def298e26f8fa73b9995f184fc983 Mon Sep 17 00:00:00 2001
+From 5189c8ebb88cd88996d52c2d51ec4e2350df5891 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c5736998305def298e26f8fa73b9995f184fc983 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- lib/vhost/vhost.c | 4 ++++
+ lib/librte_vhost/vhost.c | 4 ++++
@@ -18,5 +19,5 @@
-diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
-index cf4bac277a..df0bb9d043 100644
---- a/lib/vhost/vhost.c
-+++ b/lib/vhost/vhost.c
-@@ -1291,11 +1291,15 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)
+diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
+index bb86e02d1e..0b88fc1a49 100644
+--- a/lib/librte_vhost/vhost.c
++++ b/lib/librte_vhost/vhost.c
+@@ -1248,11 +1248,15 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)

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

* patch 'net/dpaa: fix event queue detach' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (17 preceding siblings ...)
  2022-07-07  7:54 ` patch 'vhost: fix missing virtqueue lock protection' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'app/testpmd: check statistics query before printing' " christian.ehrhardt
                   ` (66 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 385c7b6b3b41f18fb66f85e094757dc19b698260 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Fri, 22 Apr 2022 10:27:29 +0530
Subject: [PATCH] net/dpaa: fix event queue detach

[ upstream commit ee6647e0169bae7bb3d3a53c309cd280e4740e11 ]

Calling the correct qman queue free APIs to de-attach the queue.

Fixes: 5e7455931442 ("net/dpaa: support Rx queue configurations with eventdev")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 4d5946103a..37dce2146f 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -811,23 +811,17 @@ int
 dpaa_eth_eventq_detach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id)
 {
-	struct qm_mcc_initfq opts;
+	struct qm_mcc_initfq opts = {0};
 	int ret;
 	u32 flags = 0;
 	struct dpaa_if *dpaa_intf = dev->data->dev_private;
 	struct qman_fq *rxq = &dpaa_intf->rx_queues[eth_rx_queue_id];
 
-	dpaa_poll_queue_default_config(&opts);
-
-	if (dpaa_intf->cgr_rx) {
-		opts.we_mask |= QM_INITFQ_WE_CGID;
-		opts.fqd.cgid = dpaa_intf->cgr_rx[eth_rx_queue_id].cgrid;
-		opts.fqd.fq_ctrl |= QM_FQCTRL_CGE;
-	}
-
+	qman_retire_fq(rxq, NULL);
+	qman_oos_fq(rxq);
 	ret = qman_init_fq(rxq, flags, &opts);
 	if (ret) {
-		DPAA_PMD_ERR("init rx fqid %d failed with ret: %d",
+		DPAA_PMD_ERR("detach rx fqid %d failed with ret: %d",
 			     rxq->fqid, ret);
 	}
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.060652788 +0200
+++ 0020-net-dpaa-fix-event-queue-detach.patch	2022-07-07 09:54:10.821823727 +0200
@@ -1 +1 @@
-From ee6647e0169bae7bb3d3a53c309cd280e4740e11 Mon Sep 17 00:00:00 2001
+From 385c7b6b3b41f18fb66f85e094757dc19b698260 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ee6647e0169bae7bb3d3a53c309cd280e4740e11 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index bddb3bb15c..e5a072cf49 100644
+index 4d5946103a..37dce2146f 100644
@@ -21 +22 @@
-@@ -1211,23 +1211,17 @@ int
+@@ -811,23 +811,17 @@ int

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

* patch 'app/testpmd: check statistics query before printing' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (18 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/dpaa: fix event queue detach' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/bnxt: remove unused macro' " christian.ehrhardt
                   ` (65 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Aman Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ee3e5f1825a67f387d455cbd91f803d44502bf0c Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Wed, 6 Apr 2022 16:45:36 +0800
Subject: [PATCH] app/testpmd: check statistics query before printing

[ upstream commit baef6bbfad1b9596c7051f5c1fcc308310296342 ]

In function 'fwd_stats_display', if function 'rte_eth_stats_get' fails,
'stats' is uncertainty value. The display result will be abnormal.

This patch check the return value of 'rte_eth_stats_get' to avoid
display abnormal stats.

Fixes: 53324971a14e ("app/testpmd: display/clear forwarding stats on demand")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
 app/test-pmd/config.c  | 10 ++++++++--
 app/test-pmd/testpmd.c | 16 ++++++++++++++--
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 7d826632dc..3eefc90bf4 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -141,14 +141,20 @@ nic_stats_display(portid_t port_id)
 	struct rte_eth_stats stats;
 	struct rte_port *port = &ports[port_id];
 	uint8_t i;
-
 	static const char *nic_stats_border = "########################";
+	int ret;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN)) {
 		print_valid_ports();
 		return;
 	}
-	rte_eth_stats_get(port_id, &stats);
+	ret = rte_eth_stats_get(port_id, &stats);
+	if (ret != 0) {
+		fprintf(stderr,
+			"%s: Error: failed to get stats (port %u): %d",
+			__func__, port_id, ret);
+		return;
+	}
 	printf("\n  %s NIC statistics for port %-2d %s\n",
 	       nic_stats_border, port_id, nic_stats_border);
 
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 2a182eda20..cb59c85c83 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1705,6 +1705,7 @@ fwd_stats_display(void)
 	struct rte_port *port;
 	streamid_t sm_id;
 	portid_t pt_id;
+	int ret;
 	int i;
 
 	memset(ports_stats, 0, sizeof(ports_stats));
@@ -1737,7 +1738,13 @@ fwd_stats_display(void)
 		pt_id = fwd_ports_ids[i];
 		port = &ports[pt_id];
 
-		rte_eth_stats_get(pt_id, &stats);
+		ret = rte_eth_stats_get(pt_id, &stats);
+		if (ret != 0) {
+			fprintf(stderr,
+				"%s: Error: failed to get stats (port %u): %d",
+				__func__, pt_id, ret);
+			continue;
+		}
 		stats.ipackets -= port->stats.ipackets;
 		stats.opackets -= port->stats.opackets;
 		stats.ibytes -= port->stats.ibytes;
@@ -1883,11 +1890,16 @@ fwd_stats_reset(void)
 {
 	streamid_t sm_id;
 	portid_t pt_id;
+	int ret;
 	int i;
 
 	for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
 		pt_id = fwd_ports_ids[i];
-		rte_eth_stats_get(pt_id, &ports[pt_id].stats);
+		ret = rte_eth_stats_get(pt_id, &ports[pt_id].stats);
+		if (ret != 0)
+			fprintf(stderr,
+				"%s: Error: failed to clear stats (port %u):%d",
+				__func__, pt_id, ret);
 	}
 	for (sm_id = 0; sm_id < cur_fwd_config.nb_fwd_streams; sm_id++) {
 		struct fwd_stream *fs = fwd_streams[sm_id];
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.107804215 +0200
+++ 0021-app-testpmd-check-statistics-query-before-printing.patch	2022-07-07 09:54:10.825823752 +0200
@@ -1 +1 @@
-From baef6bbfad1b9596c7051f5c1fcc308310296342 Mon Sep 17 00:00:00 2001
+From ee3e5f1825a67f387d455cbd91f803d44502bf0c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit baef6bbfad1b9596c7051f5c1fcc308310296342 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index cc8e7aa138..bd689f9f86 100644
+index 7d826632dc..3eefc90bf4 100644
@@ -26,3 +27 @@
-@@ -249,14 +249,20 @@ nic_stats_display(portid_t port_id)
- 								diff_ns;
- 	uint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx;
+@@ -141,14 +141,20 @@ nic_stats_display(portid_t port_id)
@@ -29,0 +29,2 @@
+ 	struct rte_port *port = &ports[port_id];
+ 	uint8_t i;
@@ -50 +51 @@
-index fe2ce19f99..79bb23264b 100644
+index 2a182eda20..cb59c85c83 100644
@@ -53 +54 @@
-@@ -1982,6 +1982,7 @@ fwd_stats_display(void)
+@@ -1705,6 +1705,7 @@ fwd_stats_display(void)
@@ -61 +62 @@
-@@ -2013,7 +2014,13 @@ fwd_stats_display(void)
+@@ -1737,7 +1738,13 @@ fwd_stats_display(void)
@@ -76 +77 @@
-@@ -2108,11 +2115,16 @@ fwd_stats_reset(void)
+@@ -1883,11 +1890,16 @@ fwd_stats_reset(void)

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

* patch 'net/bnxt: remove unused macro' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (19 preceding siblings ...)
  2022-07-07  7:54 ` patch 'app/testpmd: check statistics query before printing' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/bnxt: recheck FW readiness if in reset process' " christian.ehrhardt
                   ` (64 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From fd3e0ac14cef10dbee29e4980ee81d92778b1824 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:07 +0530
Subject: [PATCH] net/bnxt: remove unused macro

[ upstream commit c29aa80fb54addbda9a5c841472d7584d3ab9108 ]

BNXT_FLAG_UPDATE_HASH is redundant now, remove it.

Fixes: 1ebb765090a6 ("net/bnxt: fix config RSS update")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        | 1 -
 drivers/net/bnxt/bnxt_ethdev.c | 2 --
 drivers/net/bnxt/bnxt_rxq.c    | 3 ---
 3 files changed, 6 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index fd362524b3..5ddf60313d 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -549,7 +549,6 @@ struct bnxt {
 #define BNXT_FLAG_PORT_STATS		BIT(2)
 #define BNXT_FLAG_JUMBO			BIT(3)
 #define BNXT_FLAG_SHORT_CMD		BIT(4)
-#define BNXT_FLAG_UPDATE_HASH		BIT(5)
 #define BNXT_FLAG_PTP_SUPPORTED		BIT(6)
 #define BNXT_FLAG_MULTI_HOST    	BIT(7)
 #define BNXT_FLAG_EXT_RX_PORT_STATS	BIT(8)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 5994a33944..f51812f148 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1587,8 +1587,6 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
 			return -EINVAL;
 	}
 
-	bp->flags |= BNXT_FLAG_UPDATE_HASH;
-
 	/* Update the default RSS VNIC(s) */
 	vnic = &bp->vnic_info[0];
 	vnic->hash_type = bnxt_rte_to_hwrm_hash_types(rss_conf->rss_hf);
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 993219a2a6..9d8efe0185 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -139,9 +139,6 @@ skip_filter_allocation:
 	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
 		struct rte_eth_rss_conf *rss = &bp->rss_conf;
 
-		if (bp->flags & BNXT_FLAG_UPDATE_HASH)
-			bp->flags &= ~BNXT_FLAG_UPDATE_HASH;
-
 		for (i = 0; i < bp->nr_vnics; i++) {
 			vnic = &bp->vnic_info[i];
 			vnic->hash_type =
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.157151387 +0200
+++ 0022-net-bnxt-remove-unused-macro.patch	2022-07-07 09:54:10.833823802 +0200
@@ -1 +1 @@
-From c29aa80fb54addbda9a5c841472d7584d3ab9108 Mon Sep 17 00:00:00 2001
+From fd3e0ac14cef10dbee29e4980ee81d92778b1824 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c29aa80fb54addbda9a5c841472d7584d3ab9108 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 5eddb4f000..9e5ff7496e 100644
+index fd362524b3..5ddf60313d 100644
@@ -24 +25 @@
-@@ -648,7 +648,6 @@ struct bnxt {
+@@ -549,7 +549,6 @@ struct bnxt {
@@ -33 +34 @@
-index fac3925469..181de42d15 100644
+index 5994a33944..f51812f148 100644
@@ -36 +37 @@
-@@ -2125,8 +2125,6 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
+@@ -1587,8 +1587,6 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
@@ -43 +44 @@
- 	vnic = BNXT_GET_DEFAULT_VNIC(bp);
+ 	vnic = &bp->vnic_info[0];
@@ -46 +47 @@
-index 0cfd0e588f..3c2283b8c6 100644
+index 993219a2a6..9d8efe0185 100644
@@ -49,2 +50,2 @@
-@@ -175,9 +175,6 @@ skip_filter_allocation:
- 	if (dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
+@@ -139,9 +139,6 @@ skip_filter_allocation:
+ 	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
@@ -57,2 +58,2 @@
- 			uint32_t lvl = RTE_ETH_RSS_LEVEL(rss->rss_hf);
- 
+ 			vnic = &bp->vnic_info[i];
+ 			vnic->hash_type =

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

* patch 'net/bnxt: recheck FW readiness if in reset process' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (20 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/bnxt: remove unused macro' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/bnxt: fix freeing VNIC filters' " christian.ehrhardt
                   ` (63 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 66aae5fff0ee89ddf472eab7990fb5071f13afd2 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:19 +0530
Subject: [PATCH] net/bnxt: recheck FW readiness if in reset process

[ upstream commit 5591bb92ced3a841398eec4444f593a22b1ca6ea ]

If Firmware is still in reset process and returns the error
HWRM_ERR_CODE_HOT_RESET_PROGRESS, retry VER_GET command.
We have to do it in bnxt_handle_if_change_status().

Fixes: 0b533591238f ("net/bnxt: inform firmware about IF state changes")

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f51812f148..2acde85e96 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -133,6 +133,7 @@ static int bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev);
 static void bnxt_cancel_fw_health_check(struct bnxt *bp);
 static int bnxt_restore_vlan_filters(struct bnxt *bp);
 static void bnxt_dev_recover(void *arg);
+static int bnxt_check_fw_ready(struct bnxt *bp);
 
 int is_bnxt_in_error(struct bnxt *bp)
 {
@@ -888,6 +889,11 @@ static int bnxt_handle_if_change_status(struct bnxt *bp)
 
 	/* clear fatal flag so that re-init happens */
 	bp->flags &= ~BNXT_FLAG_FATAL_ERROR;
+
+	rc = bnxt_check_fw_ready(bp);
+	if (rc)
+		return rc;
+
 	rc = bnxt_init_resources(bp, true);
 
 	bp->flags &= ~BNXT_FLAG_IF_CHANGE_HOT_FW_RESET_DONE;
@@ -4301,7 +4307,7 @@ static int bnxt_restore_filters(struct bnxt *bp)
 
 static int bnxt_check_fw_ready(struct bnxt *bp)
 {
-	int timeout = bp->fw_reset_max_msecs;
+	int timeout = bp->fw_reset_max_msecs ? : BNXT_MAX_FW_RESET_TIMEOUT;
 	int rc = 0;
 
 	do {
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.197940246 +0200
+++ 0023-net-bnxt-recheck-FW-readiness-if-in-reset-process.patch	2022-07-07 09:54:10.837823826 +0200
@@ -1 +1 @@
-From 5591bb92ced3a841398eec4444f593a22b1ca6ea Mon Sep 17 00:00:00 2001
+From 66aae5fff0ee89ddf472eab7990fb5071f13afd2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5591bb92ced3a841398eec4444f593a22b1ca6ea ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 69f1117ffa..abcb534af6 100644
+index f51812f148..2acde85e96 100644
@@ -24 +25,3 @@
-@@ -177,6 +177,7 @@ static int bnxt_restore_vlan_filters(struct bnxt *bp);
+@@ -133,6 +133,7 @@ static int bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev);
+ static void bnxt_cancel_fw_health_check(struct bnxt *bp);
+ static int bnxt_restore_vlan_filters(struct bnxt *bp);
@@ -26,2 +28,0 @@
- static void bnxt_free_error_recovery_info(struct bnxt *bp);
- static void bnxt_free_rep_info(struct bnxt *bp);
@@ -32 +33 @@
-@@ -1350,6 +1351,11 @@ static int bnxt_handle_if_change_status(struct bnxt *bp)
+@@ -888,6 +889,11 @@ static int bnxt_handle_if_change_status(struct bnxt *bp)
@@ -44 +45 @@
-@@ -4324,7 +4330,7 @@ static int bnxt_restore_filters(struct bnxt *bp)
+@@ -4301,7 +4307,7 @@ static int bnxt_restore_filters(struct bnxt *bp)

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

* patch 'net/bnxt: fix freeing VNIC filters' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (21 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/bnxt: recheck FW readiness if in reset process' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'eal/x86: fix unaligned access for small memcpy' " christian.ehrhardt
                   ` (62 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Kalesh AP, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 0e67983b1e47a9b9c149275df0b91bb3fc307493 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Wed, 27 Apr 2022 20:28:20 +0530
Subject: [PATCH] net/bnxt: fix freeing VNIC filters

[ upstream commit 2df7dfffe3dc5d6b65c77a7fbe155e38a9e3dc24 ]

In bnxt_free_all_filters(), all the filters attached to a vnic are removed.
But each of these filters hold a backreference ptr to the vnic and they
need to be reset to NULL now. Otherwise, during a normal testpmd quit, as
part of dev_close_op(), first bnxt_free_all_filters() is invoked in
dev_stop, followed by bnxt_free_filter_mem() from bnxt_uninit_resources(),
which finds a filter with a vnic back reference ptr and now
bnxt_hwrm_clean_up_l2_filter() also tries to remove the filter from the
vnic's filter list which was already done as part of
bnxt_free_all_filters().

Fixes: f0f6b5e6cf94 ("net/bnxt: fix reusing L2 filter")

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

diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index 2b33d266c9..d8b2b68c56 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -99,6 +99,8 @@ void bnxt_free_all_filters(struct bnxt *bp)
 					bnxt_filter_info, next);
 			STAILQ_INSERT_TAIL(&bp->free_filter_list,
 					filter, next);
+			if (filter->vnic)
+				filter->vnic = NULL;
 			filter = temp_filter;
 		}
 		STAILQ_INIT(&vnic->filter);
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.244769042 +0200
+++ 0024-net-bnxt-fix-freeing-VNIC-filters.patch	2022-07-07 09:54:10.837823826 +0200
@@ -1 +1 @@
-From 2df7dfffe3dc5d6b65c77a7fbe155e38a9e3dc24 Mon Sep 17 00:00:00 2001
+From 0e67983b1e47a9b9c149275df0b91bb3fc307493 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2df7dfffe3dc5d6b65c77a7fbe155e38a9e3dc24 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 1d08e03b2f..b0c3bbd1b2 100644
+index 2b33d266c9..d8b2b68c56 100644

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

* patch 'eal/x86: fix unaligned access for small memcpy' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (22 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/bnxt: fix freeing VNIC filters' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'test: avoid hang if queues are full and Tx fails' " christian.ehrhardt
                   ` (61 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Luc Pelletier; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f584d5fb260ac4d0c50acfc5a9460070861b21c9 Mon Sep 17 00:00:00 2001
From: Luc Pelletier <lucp.at.work@gmail.com>
Date: Fri, 25 Feb 2022 11:38:05 -0500
Subject: [PATCH] eal/x86: fix unaligned access for small memcpy

[ upstream commit 00901e4d1a9ee7c7b43d0a3592683f0a420a331d ]

Calls to rte_memcpy for 1 < n < 16 could result in unaligned
loads/stores, which is undefined behaviour according to the C
standard, and strict aliasing violations.

The code was changed to use a packed structure that allows aliasing
(using the __may_alias__ attribute) to perform the load/store
operations. This results in code that has the same performance as the
original code and that is also C standards-compliant.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Luc Pelletier <lucp.at.work@gmail.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 .../common/include/arch/x86/rte_memcpy.h      | 133 +++++++-----------
 lib/librte_eal/common/include/rte_common.h    |   5 +
 2 files changed, 56 insertions(+), 82 deletions(-)

diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
index f1751dd41c..8c2e243d9e 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
@@ -45,6 +45,52 @@ extern "C" {
 static __rte_always_inline void *
 rte_memcpy(void *dst, const void *src, size_t n);
 
+/**
+ * Copy bytes from one location to another,
+ * locations should not overlap.
+ * Use with n <= 15.
+ */
+static __rte_always_inline void *
+rte_mov15_or_less(void *dst, const void *src, size_t n)
+{
+	/**
+	 * Use the following structs to avoid violating C standard
+	 * alignment requirements and to avoid strict aliasing bugs
+	 */
+	struct rte_uint64_alias {
+		uint64_t val;
+	} __rte_packed __rte_may_alias;
+	struct rte_uint32_alias {
+		uint32_t val;
+	} __rte_packed __rte_may_alias;
+	struct rte_uint16_alias {
+		uint16_t val;
+	} __rte_packed __rte_may_alias;
+
+	void *ret = dst;
+	if (n & 8) {
+		((struct rte_uint64_alias *)dst)->val =
+			((const struct rte_uint64_alias *)src)->val;
+		src = (const uint64_t *)src + 1;
+		dst = (uint64_t *)dst + 1;
+	}
+	if (n & 4) {
+		((struct rte_uint32_alias *)dst)->val =
+			((const struct rte_uint32_alias *)src)->val;
+		src = (const uint32_t *)src + 1;
+		dst = (uint32_t *)dst + 1;
+	}
+	if (n & 2) {
+		((struct rte_uint16_alias *)dst)->val =
+			((const struct rte_uint16_alias *)src)->val;
+		src = (const uint16_t *)src + 1;
+		dst = (uint16_t *)dst + 1;
+	}
+	if (n & 1)
+		*(uint8_t *)dst = *(const uint8_t *)src;
+	return ret;
+}
+
 #if defined RTE_MACHINE_CPUFLAG_AVX512F && defined RTE_MEMCPY_AVX512
 
 #define ALIGNMENT_MASK 0x3F
@@ -171,8 +217,6 @@ rte_mov512blocks(uint8_t *dst, const uint8_t *src, size_t n)
 static __rte_always_inline void *
 rte_memcpy_generic(void *dst, const void *src, size_t n)
 {
-	uintptr_t dstu = (uintptr_t)dst;
-	uintptr_t srcu = (uintptr_t)src;
 	void *ret = dst;
 	size_t dstofss;
 	size_t bits;
@@ -181,24 +225,7 @@ rte_memcpy_generic(void *dst, const void *src, size_t n)
 	 * Copy less than 16 bytes
 	 */
 	if (n < 16) {
-		if (n & 0x01) {
-			*(uint8_t *)dstu = *(const uint8_t *)srcu;
-			srcu = (uintptr_t)((const uint8_t *)srcu + 1);
-			dstu = (uintptr_t)((uint8_t *)dstu + 1);
-		}
-		if (n & 0x02) {
-			*(uint16_t *)dstu = *(const uint16_t *)srcu;
-			srcu = (uintptr_t)((const uint16_t *)srcu + 1);
-			dstu = (uintptr_t)((uint16_t *)dstu + 1);
-		}
-		if (n & 0x04) {
-			*(uint32_t *)dstu = *(const uint32_t *)srcu;
-			srcu = (uintptr_t)((const uint32_t *)srcu + 1);
-			dstu = (uintptr_t)((uint32_t *)dstu + 1);
-		}
-		if (n & 0x08)
-			*(uint64_t *)dstu = *(const uint64_t *)srcu;
-		return ret;
+		return rte_mov15_or_less(dst, src, n);
 	}
 
 	/**
@@ -379,8 +406,6 @@ rte_mov128blocks(uint8_t *dst, const uint8_t *src, size_t n)
 static __rte_always_inline void *
 rte_memcpy_generic(void *dst, const void *src, size_t n)
 {
-	uintptr_t dstu = (uintptr_t)dst;
-	uintptr_t srcu = (uintptr_t)src;
 	void *ret = dst;
 	size_t dstofss;
 	size_t bits;
@@ -389,25 +414,7 @@ rte_memcpy_generic(void *dst, const void *src, size_t n)
 	 * Copy less than 16 bytes
 	 */
 	if (n < 16) {
-		if (n & 0x01) {
-			*(uint8_t *)dstu = *(const uint8_t *)srcu;
-			srcu = (uintptr_t)((const uint8_t *)srcu + 1);
-			dstu = (uintptr_t)((uint8_t *)dstu + 1);
-		}
-		if (n & 0x02) {
-			*(uint16_t *)dstu = *(const uint16_t *)srcu;
-			srcu = (uintptr_t)((const uint16_t *)srcu + 1);
-			dstu = (uintptr_t)((uint16_t *)dstu + 1);
-		}
-		if (n & 0x04) {
-			*(uint32_t *)dstu = *(const uint32_t *)srcu;
-			srcu = (uintptr_t)((const uint32_t *)srcu + 1);
-			dstu = (uintptr_t)((uint32_t *)dstu + 1);
-		}
-		if (n & 0x08) {
-			*(uint64_t *)dstu = *(const uint64_t *)srcu;
-		}
-		return ret;
+		return rte_mov15_or_less(dst, src, n);
 	}
 
 	/**
@@ -672,8 +679,6 @@ static __rte_always_inline void *
 rte_memcpy_generic(void *dst, const void *src, size_t n)
 {
 	__m128i xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8;
-	uintptr_t dstu = (uintptr_t)dst;
-	uintptr_t srcu = (uintptr_t)src;
 	void *ret = dst;
 	size_t dstofss;
 	size_t srcofs;
@@ -682,25 +687,7 @@ rte_memcpy_generic(void *dst, const void *src, size_t n)
 	 * Copy less than 16 bytes
 	 */
 	if (n < 16) {
-		if (n & 0x01) {
-			*(uint8_t *)dstu = *(const uint8_t *)srcu;
-			srcu = (uintptr_t)((const uint8_t *)srcu + 1);
-			dstu = (uintptr_t)((uint8_t *)dstu + 1);
-		}
-		if (n & 0x02) {
-			*(uint16_t *)dstu = *(const uint16_t *)srcu;
-			srcu = (uintptr_t)((const uint16_t *)srcu + 1);
-			dstu = (uintptr_t)((uint16_t *)dstu + 1);
-		}
-		if (n & 0x04) {
-			*(uint32_t *)dstu = *(const uint32_t *)srcu;
-			srcu = (uintptr_t)((const uint32_t *)srcu + 1);
-			dstu = (uintptr_t)((uint32_t *)dstu + 1);
-		}
-		if (n & 0x08) {
-			*(uint64_t *)dstu = *(const uint64_t *)srcu;
-		}
-		return ret;
+		return rte_mov15_or_less(dst, src, n);
 	}
 
 	/**
@@ -818,27 +805,9 @@ rte_memcpy_aligned(void *dst, const void *src, size_t n)
 {
 	void *ret = dst;
 
-	/* Copy size <= 16 bytes */
+	/* Copy size < 16 bytes */
 	if (n < 16) {
-		if (n & 0x01) {
-			*(uint8_t *)dst = *(const uint8_t *)src;
-			src = (const uint8_t *)src + 1;
-			dst = (uint8_t *)dst + 1;
-		}
-		if (n & 0x02) {
-			*(uint16_t *)dst = *(const uint16_t *)src;
-			src = (const uint16_t *)src + 1;
-			dst = (uint16_t *)dst + 1;
-		}
-		if (n & 0x04) {
-			*(uint32_t *)dst = *(const uint32_t *)src;
-			src = (const uint32_t *)src + 1;
-			dst = (uint32_t *)dst + 1;
-		}
-		if (n & 0x08)
-			*(uint64_t *)dst = *(const uint64_t *)src;
-
-		return ret;
+		return rte_mov15_or_less(dst, src, n);
 	}
 
 	/* Copy 16 <= size <= 32 bytes */
diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
index fe7539af26..fc938eadcd 100644
--- a/lib/librte_eal/common/include/rte_common.h
+++ b/lib/librte_eal/common/include/rte_common.h
@@ -68,6 +68,11 @@ typedef uint16_t unaligned_uint16_t;
  */
 #define __rte_packed __attribute__((__packed__))
 
+/**
+ * Macro to mark a type that is not subject to type-based aliasing rules
+ */
+#define __rte_may_alias __attribute__((__may_alias__))
+
 /******* Macro to mark functions and fields scheduled for removal *****/
 #define __rte_deprecated	__attribute__((__deprecated__))
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.279469605 +0200
+++ 0025-eal-x86-fix-unaligned-access-for-small-memcpy.patch	2022-07-07 09:54:10.837823826 +0200
@@ -1 +1 @@
-From 00901e4d1a9ee7c7b43d0a3592683f0a420a331d Mon Sep 17 00:00:00 2001
+From f584d5fb260ac4d0c50acfc5a9460070861b21c9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 00901e4d1a9ee7c7b43d0a3592683f0a420a331d ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -22,2 +23,2 @@
- lib/eal/include/rte_common.h     |   5 ++
- lib/eal/x86/include/rte_memcpy.h | 133 ++++++++++++-------------------
+ .../common/include/arch/x86/rte_memcpy.h      | 133 +++++++-----------
+ lib/librte_eal/common/include/rte_common.h    |   5 +
@@ -26,20 +27,4 @@
-diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
-index d56a7570c0..a96cc2a138 100644
---- a/lib/eal/include/rte_common.h
-+++ b/lib/eal/include/rte_common.h
-@@ -85,6 +85,11 @@ typedef uint16_t unaligned_uint16_t;
-  */
- #define __rte_packed __attribute__((__packed__))
- 
-+/**
-+ * Macro to mark a type that is not subject to type-based aliasing rules
-+ */
-+#define __rte_may_alias __attribute__((__may_alias__))
-+
- /******* Macro to mark functions and fields scheduled for removal *****/
- #define __rte_deprecated	__attribute__((__deprecated__))
- #define __rte_deprecated_msg(msg)	__attribute__((__deprecated__(msg)))
-diff --git a/lib/eal/x86/include/rte_memcpy.h b/lib/eal/x86/include/rte_memcpy.h
-index 1b6c6e585f..18aa4e43a7 100644
---- a/lib/eal/x86/include/rte_memcpy.h
-+++ b/lib/eal/x86/include/rte_memcpy.h
+diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
+index f1751dd41c..8c2e243d9e 100644
+--- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
++++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
@@ -96 +81 @@
- #if defined __AVX512F__ && defined RTE_MEMCPY_AVX512
+ #if defined RTE_MACHINE_CPUFLAG_AVX512F && defined RTE_MEMCPY_AVX512
@@ -235,0 +221,16 @@
+diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
+index fe7539af26..fc938eadcd 100644
+--- a/lib/librte_eal/common/include/rte_common.h
++++ b/lib/librte_eal/common/include/rte_common.h
+@@ -68,6 +68,11 @@ typedef uint16_t unaligned_uint16_t;
+  */
+ #define __rte_packed __attribute__((__packed__))
+ 
++/**
++ * Macro to mark a type that is not subject to type-based aliasing rules
++ */
++#define __rte_may_alias __attribute__((__may_alias__))
++
+ /******* Macro to mark functions and fields scheduled for removal *****/
+ #define __rte_deprecated	__attribute__((__deprecated__))
+ 

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

* patch 'test: avoid hang if queues are full and Tx fails' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (23 preceding siblings ...)
  2022-07-07  7:54 ` patch 'eal/x86: fix unaligned access for small memcpy' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'acl: fix rules with 8-byte field size' " christian.ehrhardt
                   ` (60 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Rakesh Kudurumalla; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From c4b081a060c9ce4287a42480abe6ddd2c58454a2 Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Tue, 20 Jul 2021 22:20:52 +0530
Subject: [PATCH] test: avoid hang if queues are full and Tx fails

[ upstream commit 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 ]

Current pmd_perf_autotest() in continuous mode tries
to enqueue MAX_TRAFFIC_BURST completely before starting
the test. Some drivers cannot accept complete
MAX_TRAFFIC_BURST even though rx+tx desc count can fit it.
This patch changes behaviour to stop enqueuing after few
retries.

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

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 app/test/test_pmd_perf.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 60fa5d1ff6..832af747c6 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -459,6 +459,7 @@ main_loop(__rte_unused void *args)
 #define PACKET_SIZE 64
 #define FRAME_GAP 12
 #define MAC_PREAMBLE 8
+#define MAX_RETRY_COUNT 5
 	struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
 	unsigned lcore_id;
 	unsigned i, portid, nb_rx = 0, nb_tx = 0;
@@ -466,6 +467,8 @@ main_loop(__rte_unused void *args)
 	int pkt_per_port;
 	uint64_t diff_tsc;
 	uint64_t packets_per_second, total_packets;
+	int retry_cnt = 0;
+	int free_pkt = 0;
 
 	lcore_id = rte_lcore_id();
 	conf = &lcore_conf[lcore_id];
@@ -483,10 +486,19 @@ main_loop(__rte_unused void *args)
 			nb_tx = RTE_MIN(MAX_PKT_BURST, num);
 			nb_tx = rte_eth_tx_burst(portid, 0,
 						&tx_burst[idx], nb_tx);
+			if (nb_tx == 0)
+				retry_cnt++;
 			num -= nb_tx;
 			idx += nb_tx;
+			if (retry_cnt == MAX_RETRY_COUNT) {
+				retry_cnt = 0;
+				break;
+			}
 		}
 	}
+	for (free_pkt = idx; free_pkt < (MAX_TRAFFIC_BURST * conf->nb_ports);
+			free_pkt++)
+		rte_pktmbuf_free(tx_burst[free_pkt]);
 	printf("Total packets inject to prime ports = %u\n", idx);
 
 	packets_per_second = (link_mbps * 1000 * 1000) /
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.317141745 +0200
+++ 0026-test-avoid-hang-if-queues-are-full-and-Tx-fails.patch	2022-07-07 09:54:10.837823826 +0200
@@ -1 +1 @@
-From 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 Mon Sep 17 00:00:00 2001
+From c4b081a060c9ce4287a42480abe6ddd2c58454a2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 36edf3cc9ba18fb33c880518f5bb67765c3b99d4 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 25611bfe9b..ec3dc251d1 100644
+index 60fa5d1ff6..832af747c6 100644
@@ -25 +26 @@
-@@ -456,6 +456,7 @@ main_loop(__rte_unused void *args)
+@@ -459,6 +459,7 @@ main_loop(__rte_unused void *args)
@@ -33 +34 @@
-@@ -463,6 +464,8 @@ main_loop(__rte_unused void *args)
+@@ -466,6 +467,8 @@ main_loop(__rte_unused void *args)
@@ -42 +43 @@
-@@ -480,10 +483,19 @@ main_loop(__rte_unused void *args)
+@@ -483,10 +486,19 @@ main_loop(__rte_unused void *args)

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

* patch 'acl: fix rules with 8-byte field size' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (24 preceding siblings ...)
  2022-07-07  7:54 ` patch 'test: avoid hang if queues are full and Tx fails' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'rib: fix traversal with /32 route' " christian.ehrhardt
                   ` (59 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Ido Goshen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From c807a4cd6d1f24b320b009adc201c1e6cb79b846 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Date: Sun, 15 May 2022 21:03:18 +0100
Subject: [PATCH] acl: fix rules with 8-byte field size

[ upstream commit 451098159c2209bc5c395a30d2dae325af93e8c2 ]

In theory ACL library allows fields with 8B long.
Though in practice they usually not used, not tested,
and as was revealed by Ido, this functionality is not working properly.
There are few places inside ACL build code-path that need to be addressed.

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

Reported-by: Ido Goshen <ido@cgstowernetworks.com>
Signed-off-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Tested-by: Ido Goshen <ido@cgstowernetworks.com>
---
 lib/librte_acl/acl_bld.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/lib/librte_acl/acl_bld.c b/lib/librte_acl/acl_bld.c
index aeeaf040b8..1d6caf8984 100644
--- a/lib/librte_acl/acl_bld.c
+++ b/lib/librte_acl/acl_bld.c
@@ -12,6 +12,9 @@
 /* number of pointers per alloc */
 #define ACL_PTR_ALLOC	32
 
+/* account for situation when all fields are 8B long */
+#define ACL_MAX_INDEXES	(2 * RTE_ACL_MAX_FIELDS)
+
 /* macros for dividing rule sets heuristics */
 #define NODE_MAX	0x4000
 #define NODE_MIN	0x800
@@ -80,7 +83,7 @@ struct acl_build_context {
 	struct tb_mem_pool        pool;
 	struct rte_acl_trie       tries[RTE_ACL_MAX_TRIES];
 	struct rte_acl_bld_trie   bld_tries[RTE_ACL_MAX_TRIES];
-	uint32_t            data_indexes[RTE_ACL_MAX_TRIES][RTE_ACL_MAX_FIELDS];
+	uint32_t            data_indexes[RTE_ACL_MAX_TRIES][ACL_MAX_INDEXES];
 
 	/* memory free lists for nodes and blocks used for node ptrs */
 	struct acl_mem_block      blocks[MEM_BLOCK_NUM];
@@ -988,7 +991,7 @@ build_trie(struct acl_build_context *context, struct rte_acl_build_rule *head,
 				 */
 				uint64_t mask;
 				mask = RTE_ACL_MASKLEN_TO_BITMASK(
-					fld->mask_range.u32,
+					fld->mask_range.u64,
 					rule->config->defs[n].size);
 
 				/* gen a mini-trie for this field */
@@ -1301,6 +1304,9 @@ acl_build_index(const struct rte_acl_config *config, uint32_t *data_index)
 		if (last_header != config->defs[n].input_index) {
 			last_header = config->defs[n].input_index;
 			data_index[m++] = config->defs[n].offset;
+			if (config->defs[n].size > sizeof(uint32_t))
+				data_index[m++] = config->defs[n].offset +
+					sizeof(uint32_t);
 		}
 	}
 
@@ -1487,7 +1493,7 @@ acl_set_data_indexes(struct rte_acl_ctx *ctx)
 		memcpy(ctx->data_indexes + ofs, ctx->trie[i].data_index,
 			n * sizeof(ctx->data_indexes[0]));
 		ctx->trie[i].data_index = ctx->data_indexes + ofs;
-		ofs += RTE_ACL_MAX_FIELDS;
+		ofs += ACL_MAX_INDEXES;
 	}
 }
 
@@ -1612,7 +1618,7 @@ rte_acl_build(struct rte_acl_ctx *ctx, const struct rte_acl_config *cfg)
 			/* allocate and fill run-time  structures. */
 			rc = rte_acl_gen(ctx, bcx.tries, bcx.bld_tries,
 				bcx.num_tries, bcx.cfg.num_categories,
-				RTE_ACL_MAX_FIELDS * RTE_DIM(bcx.tries) *
+				ACL_MAX_INDEXES * RTE_DIM(bcx.tries) *
 				sizeof(ctx->data_indexes[0]), max_size);
 			if (rc == 0) {
 				/* set data indexes. */
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.356551364 +0200
+++ 0027-acl-fix-rules-with-8-byte-field-size.patch	2022-07-07 09:54:10.841823851 +0200
@@ -1 +1 @@
-From 451098159c2209bc5c395a30d2dae325af93e8c2 Mon Sep 17 00:00:00 2001
+From c807a4cd6d1f24b320b009adc201c1e6cb79b846 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 451098159c2209bc5c395a30d2dae325af93e8c2 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
- lib/acl/acl_bld.c | 14 ++++++++++----
+ lib/librte_acl/acl_bld.c | 14 ++++++++++----
@@ -22,4 +23,4 @@
-diff --git a/lib/acl/acl_bld.c b/lib/acl/acl_bld.c
-index 7ea30f4186..2816632803 100644
---- a/lib/acl/acl_bld.c
-+++ b/lib/acl/acl_bld.c
+diff --git a/lib/librte_acl/acl_bld.c b/lib/librte_acl/acl_bld.c
+index aeeaf040b8..1d6caf8984 100644
+--- a/lib/librte_acl/acl_bld.c
++++ b/lib/librte_acl/acl_bld.c
@@ -73 +74 @@
-@@ -1643,7 +1649,7 @@ rte_acl_build(struct rte_acl_ctx *ctx, const struct rte_acl_config *cfg)
+@@ -1612,7 +1618,7 @@ rte_acl_build(struct rte_acl_ctx *ctx, const struct rte_acl_config *cfg)

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

* patch 'rib: fix traversal with /32 route' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (25 preceding siblings ...)
  2022-07-07  7:54 ` patch 'acl: fix rules with 8-byte field size' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'devtools: fix null test for NUMA systems' " christian.ehrhardt
                   ` (58 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ec69d489241a77d433218fb0c0692fe19b8899d3 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 14 Apr 2022 13:01:04 -0700
Subject: [PATCH] rib: fix traversal with /32 route

[ upstream commit 1b984e98a3fd00e607ec14b8b9299a2f14698dc3 ]

If a /32 route is entered in the RIB the code to traverse
will not see end of the tree. This is due to trying
to do a negative shift which is an undefined in C.

Fix by checking for max depth as is already done in rib6.

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/librte_rib/rte_rib.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_rib/rte_rib.c b/lib/librte_rib/rte_rib.c
index 07b3c068ed..b502317f93 100644
--- a/lib/librte_rib/rte_rib.c
+++ b/lib/librte_rib/rte_rib.c
@@ -73,6 +73,8 @@ is_covered(uint32_t ip1, uint32_t ip2, uint8_t depth)
 static inline struct rte_rib_node *
 get_nxt_node(struct rte_rib_node *node, uint32_t ip)
 {
+	if (node->depth == RIB_MAXDEPTH)
+		return NULL;
 	return (ip & (1 << (31 - node->depth))) ? node->right : node->left;
 }
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.401403657 +0200
+++ 0028-rib-fix-traversal-with-32-route.patch	2022-07-07 09:54:10.841823851 +0200
@@ -1 +1 @@
-From 1b984e98a3fd00e607ec14b8b9299a2f14698dc3 Mon Sep 17 00:00:00 2001
+From ec69d489241a77d433218fb0c0692fe19b8899d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1b984e98a3fd00e607ec14b8b9299a2f14698dc3 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
- lib/rib/rte_rib.c | 2 ++
+ lib/librte_rib/rte_rib.c | 2 ++
@@ -21,5 +22,5 @@
-diff --git a/lib/rib/rte_rib.c b/lib/rib/rte_rib.c
-index cd9e823068..0603980cab 100644
---- a/lib/rib/rte_rib.c
-+++ b/lib/rib/rte_rib.c
-@@ -71,6 +71,8 @@ is_covered(uint32_t ip1, uint32_t ip2, uint8_t depth)
+diff --git a/lib/librte_rib/rte_rib.c b/lib/librte_rib/rte_rib.c
+index 07b3c068ed..b502317f93 100644
+--- a/lib/librte_rib/rte_rib.c
++++ b/lib/librte_rib/rte_rib.c
+@@ -73,6 +73,8 @@ is_covered(uint32_t ip1, uint32_t ip2, uint8_t depth)

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

* patch 'devtools: fix null test for NUMA systems' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (26 preceding siblings ...)
  2022-07-07  7:54 ` patch 'rib: fix traversal with /32 route' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'examples/ipsec-secgw: fix promiscuous mode option' " christian.ehrhardt
                   ` (57 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f616893e2a13e7b6cbe07aa40a2205e3d21cce7d Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 13 Apr 2022 13:19:44 +0200
Subject: [PATCH] devtools: fix null test for NUMA systems

[ upstream commit 924de7b8e64489231351c48767973a1042d8ffd3 ]

On NUMA systems, default cores (0 and 1) might be on different memory
nodes. Double the amount of memory.

Fixes: 9e6b36c34ce9 ("app/testpmd: reduce memory consumption")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/test-null.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/devtools/test-null.sh b/devtools/test-null.sh
index f39af2c064..6d763bc94f 100755
--- a/devtools/test-null.sh
+++ b/devtools/test-null.sh
@@ -27,6 +27,7 @@ else
 fi
 
 (sleep 1 && echo stop) |
-$testpmd -c $coremask --no-huge -m 20 \
+# testpmd only needs 20M, make it x2 (default number of cores) for NUMA systems
+$testpmd -c $coremask --no-huge -m 40 \
 	$libs -w 0:0.0 --vdev net_null1 --vdev net_null2 $eal_options -- \
 	--no-mlockall --total-num-mbufs=2048 $testpmd_options -ia
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.438487264 +0200
+++ 0029-devtools-fix-null-test-for-NUMA-systems.patch	2022-07-07 09:54:10.841823851 +0200
@@ -1 +1 @@
-From 924de7b8e64489231351c48767973a1042d8ffd3 Mon Sep 17 00:00:00 2001
+From f616893e2a13e7b6cbe07aa40a2205e3d21cce7d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 924de7b8e64489231351c48767973a1042d8ffd3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 4ba57a6829..6cd34f64f1 100755
+index f39af2c064..6d763bc94f 100755
@@ -28 +29 @@
- 	$libs -a 0:0.0 --vdev net_null1 --vdev net_null2 $eal_options -- \
+ 	$libs -w 0:0.0 --vdev net_null1 --vdev net_null2 $eal_options -- \

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

* patch 'examples/ipsec-secgw: fix promiscuous mode option' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (27 preceding siblings ...)
  2022-07-07  7:54 ` patch 'devtools: fix null test for NUMA systems' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'test/crypto: fix null check for ZUC authentication' " christian.ehrhardt
                   ` (56 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 386ada62c2c99588c96b61f4ebe0d49c6970de05 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Thu, 28 Apr 2022 20:48:30 +0530
Subject: [PATCH] examples/ipsec-secgw: fix promiscuous mode option

[ upstream commit 23d3a468c42ac8b63a36c9c4a6f01e459350f777 ]

Currently default value of promiscuous mode flag is true and
even there is command line argument to set it to true.
So it never is in non-promiscuous mode. Fix it by
changing default value to false.

Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 8e9b45493a..ce57787a14 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -170,7 +170,7 @@ static const struct option lgopts[] = {
 static uint32_t enabled_port_mask;
 static uint64_t enabled_cryptodev_mask = UINT64_MAX;
 static uint32_t unprotected_port_mask;
-static int32_t promiscuous_on = 1;
+static int32_t promiscuous_on;
 static int32_t numa_on = 1; /**< NUMA is enabled by default. */
 static uint32_t nb_lcores;
 static uint32_t single_sa;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.481509108 +0200
+++ 0030-examples-ipsec-secgw-fix-promiscuous-mode-option.patch	2022-07-07 09:54:10.845823876 +0200
@@ -1 +1 @@
-From 23d3a468c42ac8b63a36c9c4a6f01e459350f777 Mon Sep 17 00:00:00 2001
+From 386ada62c2c99588c96b61f4ebe0d49c6970de05 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 23d3a468c42ac8b63a36c9c4a6f01e459350f777 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ad1b55f85c..25255e053c 100644
+index 8e9b45493a..ce57787a14 100644
@@ -24,2 +25 @@
-@@ -168,7 +168,7 @@ uint32_t single_sa_idx;
- /* mask of enabled ports */
+@@ -170,7 +170,7 @@ static const struct option lgopts[] = {
@@ -27,0 +28 @@
+ static uint32_t unprotected_port_mask;
@@ -32 +33 @@
- uint32_t single_sa;
+ static uint32_t single_sa;

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

* patch 'test/crypto: fix null check for ZUC authentication' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (28 preceding siblings ...)
  2022-07-07  7:54 ` patch 'examples/ipsec-secgw: fix promiscuous mode option' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'drivers/crypto: fix warnings for OpenSSL version' " christian.ehrhardt
                   ` (55 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Ciara Power; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From e78ce8dd2376de008374c9f14f2bd43e3b8d955d Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 11 May 2022 13:29:24 +0000
Subject: [PATCH] test/crypto: fix null check for ZUC authentication

[ upstream commit e6d37ffa69ac7fb4eec9580af5b005e6c130b79d ]

Check if the returned op is NULL because of failure,
before using it and causing a segmentation fault.

Fixes: 4c99481f49c4 ("app/test: add ZUC")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test/test_cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index c1fee16861..7ecfe8fac0 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -4591,9 +4591,9 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata)
 	if (retval < 0)
 		return retval;
 
+	TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
 	ut_params->op = process_crypto_request(ts_params->valid_devs[0],
 			ut_params->op);
-	TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
 	ut_params->obuf = ut_params->op->sym->m_src;
 	if (ut_params->obuf)
 		ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *);
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.521388243 +0200
+++ 0031-test-crypto-fix-null-check-for-ZUC-authentication.patch	2022-07-07 09:54:10.853823925 +0200
@@ -1 +1 @@
-From e6d37ffa69ac7fb4eec9580af5b005e6c130b79d Mon Sep 17 00:00:00 2001
+From e78ce8dd2376de008374c9f14f2bd43e3b8d955d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e6d37ffa69ac7fb4eec9580af5b005e6c130b79d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f444144cc6..4ffaadc008 100644
+index c1fee16861..7ecfe8fac0 100644
@@ -22,9 +23,3 @@
-@@ -6238,8 +6238,8 @@ test_zuc_authentication(const struct wireless_test_data *tdata)
- 	else
- 		ut_params->op = process_crypto_request(ts_params->valid_devs[0],
- 				ut_params->op);
--	ut_params->obuf = ut_params->op->sym->m_src;
- 	TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
-+	ut_params->obuf = ut_params->op->sym->m_src;
- 	ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- 			+ plaintext_pad_len;
+@@ -4591,9 +4591,9 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata)
+ 	if (retval < 0)
+ 		return retval;
@@ -31,0 +27,7 @@
++	TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
+ 	ut_params->op = process_crypto_request(ts_params->valid_devs[0],
+ 			ut_params->op);
+-	TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
+ 	ut_params->obuf = ut_params->op->sym->m_src;
+ 	if (ut_params->obuf)
+ 		ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *);

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

* patch 'drivers/crypto: fix warnings for OpenSSL version' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (29 preceding siblings ...)
  2022-07-07  7:54 ` patch 'test/crypto: fix null check for ZUC authentication' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'app/testpmd: remove useless pointer checks' " christian.ehrhardt
                   ` (54 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Daxue Gao, David Marchand, Kai Ji, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 57ae04724a4a45ca27f776843fca798e89f99017 Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Date: Tue, 10 May 2022 17:06:35 +0200
Subject: [PATCH] drivers/crypto: fix warnings for OpenSSL version
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 7360749f167b9039f549818700db3f57d6f8a9fd ]

The API of the OpenSSL library has changed with version 3.0. This results
in a lot of compiler warnings like

    ../dpdk/drivers/crypto/ccp/ccp_crypto.c:182:9:
    warning: ‘SHA256_Transform’ is deprecated:
    Since OpenSSL 3.0 [-Wdeprecated-declarations]

As many Linux distributions still use elder OpenSSL libraries we cannot
change the used API now. Instead define OPENSSL_API_COMPAT to indicate
that we are using the OpenSSL 1.1.0 API.

OPENSSL_API_COMPAT is introduced in *.c files and not in *.h files as some
*.c files directly include OpenSSL headers.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kai Ji <kai.ji@intel.com>
---
 drivers/crypto/ccp/ccp_crypto.c              | 2 ++
 drivers/crypto/openssl/rte_openssl_pmd.c     | 2 ++
 drivers/crypto/openssl/rte_openssl_pmd_ops.c | 2 ++
 drivers/crypto/qat/qat_sym.c                 | 2 ++
 drivers/crypto/qat/qat_sym_session.c         | 2 ++
 5 files changed, 10 insertions(+)

diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 4256734d16..1536b1a647 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -2,6 +2,8 @@
  *   Copyright(c) 2018 Advanced Micro Devices, Inc. All rights reserved.
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <dirent.h>
 #include <fcntl.h>
 #include <stdio.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 3e0afd71a1..aee8dea0c6 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2016-2017 Intel Corporation
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index cbfb8149f9..4dda2e0c2f 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2016-2017 Intel Corporation
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <string.h>
 
 #include <rte_common.h>
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 696b231a00..150c6a8b52 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2015-2019 Intel Corporation
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <openssl/evp.h>
 
 #include <rte_mempool.h>
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index ab12c99716..17647ea7b5 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2015-2019 Intel Corporation
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <openssl/sha.h>	/* Needed to calculate pre-compute values */
 #include <openssl/aes.h>	/* Needed to calculate pre-compute values */
 #include <openssl/md5.h>	/* Needed to calculate pre-compute values */
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.568925220 +0200
+++ 0032-drivers-crypto-fix-warnings-for-OpenSSL-version.patch	2022-07-07 09:54:10.861823975 +0200
@@ -1 +1 @@
-From 7360749f167b9039f549818700db3f57d6f8a9fd Mon Sep 17 00:00:00 2001
+From 57ae04724a4a45ca27f776843fca798e89f99017 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 7360749f167b9039f549818700db3f57d6f8a9fd ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -39 +40 @@
-index 4ed91a7436..4bab18323b 100644
+index 4256734d16..1536b1a647 100644
@@ -52 +53 @@
-index d80e1052e2..4f331af157 100644
+index 3e0afd71a1..aee8dea0c6 100644
@@ -65 +66 @@
-index 1cb07794bd..87c395a836 100644
+index cbfb8149f9..4dda2e0c2f 100644
@@ -78 +79 @@
-index ca8c9a8124..3a6c9dcc0a 100644
+index 696b231a00..150c6a8b52 100644
@@ -82 +83 @@
-  * Copyright(c) 2015-2022 Intel Corporation
+  * Copyright(c) 2015-2019 Intel Corporation
@@ -91 +92 @@
-index 9d6a19c0be..737a180810 100644
+index ab12c99716..17647ea7b5 100644
@@ -95 +96 @@
-  * Copyright(c) 2015-2022 Intel Corporation
+  * Copyright(c) 2015-2019 Intel Corporation

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

* patch 'app/testpmd: remove useless pointer checks' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (30 preceding siblings ...)
  2022-07-07  7:54 ` patch 'drivers/crypto: fix warnings for OpenSSL version' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'ethdev: clarify null location case in xstats get' " christian.ehrhardt
                   ` (53 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From fa9bd2129ab34dfd1a2dcfdbdb2340fee2b83a21 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 24 Mar 2022 17:15:03 +0100
Subject: [PATCH] app/testpmd: remove useless pointer checks

[ upstream commit 2d8699ebb2a0638e8ae18fc0a83c56f984d0b270 ]

Parameters to this static helper can't be NULL.
str has already been dereferenced in caller.
dst and size point to variable in stack.

Fixes: 169a9fed1f4c ("app/testpmd: fix hex string parser support for flow API")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test-pmd/cmdline_flow.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 9f43f6c43f..7ad4d29536 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -5296,11 +5296,7 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)
 	const uint8_t *head = dst;
 	uint32_t left;
 
-	/* Check input parameters */
-	if ((src == NULL) ||
-		(dst == NULL) ||
-		(size == NULL) ||
-		(*size == 0))
+	if (*size == 0)
 		return -1;
 
 	left = *size;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.609708464 +0200
+++ 0033-app-testpmd-remove-useless-pointer-checks.patch	2022-07-07 09:54:10.865824000 +0200
@@ -1 +1 @@
-From 2d8699ebb2a0638e8ae18fc0a83c56f984d0b270 Mon Sep 17 00:00:00 2001
+From fa9bd2129ab34dfd1a2dcfdbdb2340fee2b83a21 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d8699ebb2a0638e8ae18fc0a83c56f984d0b270 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index fc4a6d9cca..e3269e278d 100644
+index 9f43f6c43f..7ad4d29536 100644
@@ -22 +23 @@
-@@ -9338,11 +9338,7 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)
+@@ -5296,11 +5296,7 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)

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

* patch 'ethdev: clarify null location case in xstats get' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (31 preceding siblings ...)
  2022-07-07  7:54 ` patch 'app/testpmd: remove useless pointer checks' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/hns3: fix xstats get return if xstats is null' " christian.ehrhardt
                   ` (52 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 530d754e63a4d9c5a5f9d55e8df57fca0c1e6d45 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:49 +0800
Subject: [PATCH] ethdev: clarify null location case in xstats get
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 485df8847a2c0ecf947a514f634b8180b725b827 ]

When xstats location is null in rte_eth_xstats_get() the return value
is not clearly specified.  Some PMDs (eg. hns3/ipn3ke/mvpp2/axgbe) return
zero while others return the required number of elements.

In this patch, special parameter combinations are restricted:
 1. highlight that xstats location may be null if and only if n is 0.
 2. amend n parameter description to specify that if n is lower than
    the required number of elements, the function returns the required
    number of elements.
 3. specify that if n is zero, the xstats must be NULL, the function
    returns the required number of elements (a duplicate which should
    help to not very attentive readers).

Add sanity check for null xstats and non-zero n case on API level to
make it unnecessary to care about it in drivers.

Fixes: ce757f5c9a4d ("ethdev: new method to retrieve extended statistics")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/librte_ethdev/rte_ethdev.c | 5 +++--
 lib/librte_ethdev/rte_ethdev.h | 6 +++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index abcc31c19e..76699cc10f 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -2862,7 +2862,8 @@ rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
 	int ret;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
-
+	if (xstats == NULL && n > 0)
+		return -EINVAL;
 	dev = &rte_eth_devices[port_id];
 
 	nb_rxqs = RTE_MIN(dev->data->nb_rx_queues, RTE_ETHDEV_QUEUE_STAT_CNTRS);
@@ -2878,7 +2879,7 @@ rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
 		 * xstats struct.
 		 */
 		xcount = (*dev->dev_ops->xstats_get)(dev,
-				     xstats ? xstats + count : NULL,
+				     (n > count) ? xstats + count : NULL,
 				     (n > count) ? n - count : 0);
 
 		if (xcount < 0)
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 9cc12ef97e..826339009b 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2363,9 +2363,13 @@ int rte_eth_xstats_get_names(uint16_t port_id,
  * @param xstats
  *   A pointer to a table of structure of type *rte_eth_xstat*
  *   to be filled with device statistics ids and values.
- *   This parameter can be set to NULL if n is 0.
+ *   This parameter can be set to NULL if and only if n is 0.
  * @param n
  *   The size of the xstats array (number of elements).
+ *   If lower than the required number of elements, the function returns
+ *   the required number of elements.
+ *   If equal to zero, the xstats must be NULL, the function returns the
+ *   required number of elements.
  * @return
  *   - A positive value lower or equal to n: success. The return value
  *     is the number of entries filled in the stats table.
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.654871176 +0200
+++ 0034-ethdev-clarify-null-location-case-in-xstats-get.patch	2022-07-07 09:54:10.873824049 +0200
@@ -1 +1 @@
-From 485df8847a2c0ecf947a514f634b8180b725b827 Mon Sep 17 00:00:00 2001
+From 530d754e63a4d9c5a5f9d55e8df57fca0c1e6d45 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 485df8847a2c0ecf947a514f634b8180b725b827 ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -32,9 +33,9 @@
- lib/ethdev/rte_ethdev.c | 4 +++-
- lib/ethdev/rte_ethdev.h | 6 +++++-
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
-index 8520aec561..af55edb6b9 100644
---- a/lib/ethdev/rte_ethdev.c
-+++ b/lib/ethdev/rte_ethdev.c
-@@ -2973,6 +2973,8 @@ rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
+ lib/librte_ethdev/rte_ethdev.c | 5 +++--
+ lib/librte_ethdev/rte_ethdev.h | 6 +++++-
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
+index abcc31c19e..76699cc10f 100644
+--- a/lib/librte_ethdev/rte_ethdev.c
++++ b/lib/librte_ethdev/rte_ethdev.c
+@@ -2862,7 +2862,8 @@ rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
@@ -43 +44,2 @@
- 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+ 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
+-
@@ -49 +51 @@
-@@ -2989,7 +2991,7 @@ rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
+@@ -2878,7 +2879,7 @@ rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
@@ -58,5 +60,5 @@
-diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
-index 04cff8ee10..04225bba4d 100644
---- a/lib/ethdev/rte_ethdev.h
-+++ b/lib/ethdev/rte_ethdev.h
-@@ -3174,9 +3174,13 @@ int rte_eth_xstats_get_names(uint16_t port_id,
+diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
+index 9cc12ef97e..826339009b 100644
+--- a/lib/librte_ethdev/rte_ethdev.h
++++ b/lib/librte_ethdev/rte_ethdev.h
+@@ -2363,9 +2363,13 @@ int rte_eth_xstats_get_names(uint16_t port_id,

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

* patch 'net/hns3: fix xstats get return if xstats is null' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (32 preceding siblings ...)
  2022-07-07  7:54 ` patch 'ethdev: clarify null location case in xstats get' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/ipn3ke: " christian.ehrhardt
                   ` (51 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 02922dbbf2ca897b8b706897acec42513d88c6e6 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:51 +0800
Subject: [PATCH] net/hns3: fix xstats get return if xstats is null
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit e15401f362779dba8623b4ee3db388fdf79dca7f ]

Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently hns3 PMD
returns zero when xstats is null.

Dedicated check for xstats vs null is not required, since ethdev layer
guarantees that it may be null only if number of entries n is 0 (which
is definitely smaller than total xstats count).

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

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/hns3/hns3_stats.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 97ca66e735..b4bc4f28f3 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -558,9 +558,13 @@ hns3_xstats_calc_num(struct rte_eth_dev *dev)
  * @praram xstats
  *   A pointer to a table of structure of type *rte_eth_xstat*
  *   to be filled with device statistics ids and values.
- *   This parameter can be set to NULL if n is 0.
+ *   This parameter can be set to NULL if and only if n is 0.
  * @param n
  *   The size of the xstats array (number of elements).
+ *   If lower than the required number of elements, the function returns the
+ *   required number of elements.
+ *   If equal to zero, the xstats parameter must be NULL, the function returns
+ *   the required number of elements.
  * @return
  *   0 on fail, count(The size of the statistics elements) on success.
  */
@@ -579,9 +583,6 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	int count;
 	int ret;
 
-	if (xstats == NULL)
-		return 0;
-
 	count = hns3_xstats_calc_num(dev);
 	if ((int)n < count)
 		return count;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.694278434 +0200
+++ 0035-net-hns3-fix-xstats-get-return-if-xstats-is-null.patch	2022-07-07 09:54:10.873824049 +0200
@@ -1 +1 @@
-From e15401f362779dba8623b4ee3db388fdf79dca7f Mon Sep 17 00:00:00 2001
+From 02922dbbf2ca897b8b706897acec42513d88c6e6 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit e15401f362779dba8623b4ee3db388fdf79dca7f ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 2799ff4432..07fad03485 100644
+index 97ca66e735..b4bc4f28f3 100644
@@ -31 +32 @@
-@@ -1031,9 +1031,13 @@ hns3_imissed_stats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+@@ -558,9 +558,13 @@ hns3_xstats_calc_num(struct rte_eth_dev *dev)
@@ -46 +47 @@
-@@ -1052,9 +1056,6 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+@@ -579,9 +583,6 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,

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

* patch 'net/ipn3ke: fix xstats get return if xstats is null' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (33 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/hns3: fix xstats get return if xstats is null' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/mvpp2: " christian.ehrhardt
                   ` (50 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From d00e51a7d1aae8cc9b6740de7bc26331c69a435d Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:52 +0800
Subject: [PATCH] net/ipn3ke: fix xstats get return if xstats is null
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit e17cb41db7656121f5809e353f8db126b026fbb4 ]

Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently ipn3ke PMD
returns zero when xstats is null.

Dedicated check for xstats vs null is not required, since ethdev layer
guarantees that it may be null only if number of entries n is 0 (which
is definitely smaller than total xstats count).

Fixes: 5a6d883878db ("net/ipn3ke: implement statistics")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/ipn3ke/ipn3ke_representor.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c
index 25726a48a6..31a6957868 100644
--- a/drivers/net/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
@@ -2224,9 +2224,6 @@ ipn3ke_rpst_xstats_get
 	struct ipn3ke_rpst_hw_port_stats hw_stats;
 	struct rte_eth_stats stats;
 
-	if (!xstats)
-		return 0;
-
 	if (!ethdev) {
 		IPN3KE_AFU_PMD_ERR("ethernet device to get statistics is NULL");
 		return -EINVAL;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.732062184 +0200
+++ 0036-net-ipn3ke-fix-xstats-get-return-if-xstats-is-null.patch	2022-07-07 09:54:10.877824074 +0200
@@ -1 +1 @@
-From e17cb41db7656121f5809e353f8db126b026fbb4 Mon Sep 17 00:00:00 2001
+From d00e51a7d1aae8cc9b6740de7bc26331c69a435d Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit e17cb41db7656121f5809e353f8db126b026fbb4 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index c9dde1d82e..abbecfdf2e 100644
+index 25726a48a6..31a6957868 100644
@@ -31 +32 @@
-@@ -2218,9 +2218,6 @@ ipn3ke_rpst_xstats_get
+@@ -2224,9 +2224,6 @@ ipn3ke_rpst_xstats_get

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

* patch 'net/mvpp2: fix xstats get return if xstats is null' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (34 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/ipn3ke: " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'app/testpmd: replace hardcoded min mbuf number with macro' " christian.ehrhardt
                   ` (49 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5894d7acdc5870f3399f6b8d33213626d264adfe Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 13 May 2022 10:53:53 +0800
Subject: [PATCH] net/mvpp2: fix xstats get return if xstats is null
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit d853d24b27d6524f26a2a830c7ef678ba739cfce ]

Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently mvpp2 PMD
returns zero when xstats is null.

Remove the logic of "return zero when xstats is NULL", and add the logic
of "return the required number of entries when n is lower than the
required number of entries".

Fixes: a77b5378cd41 ("net/mrvl: add extended statistics")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 7571e16343..3e12b4b119 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -1376,13 +1376,14 @@ mrvl_xstats_get(struct rte_eth_dev *dev,
 {
 	struct mrvl_priv *priv = dev->data->dev_private;
 	struct pp2_ppio_statistics ppio_stats;
-	unsigned int i;
+	unsigned int i, count;
 
-	if (!stats)
-		return 0;
+	count = RTE_DIM(mrvl_xstats_tbl);
+	if (n < count)
+		return count;
 
 	pp2_ppio_get_statistics(priv->ppio, &ppio_stats, 0);
-	for (i = 0; i < n && i < RTE_DIM(mrvl_xstats_tbl); i++) {
+	for (i = 0; i < count; i++) {
 		uint64_t val;
 
 		if (mrvl_xstats_tbl[i].size == sizeof(uint32_t))
@@ -1398,7 +1399,7 @@ mrvl_xstats_get(struct rte_eth_dev *dev,
 		stats[i].value = val;
 	}
 
-	return n;
+	return count;
 }
 
 /**
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.771625402 +0200
+++ 0037-net-mvpp2-fix-xstats-get-return-if-xstats-is-null.patch	2022-07-07 09:54:10.877824074 +0200
@@ -1 +1 @@
-From d853d24b27d6524f26a2a830c7ef678ba739cfce Mon Sep 17 00:00:00 2001
+From 5894d7acdc5870f3399f6b8d33213626d264adfe Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit d853d24b27d6524f26a2a830c7ef678ba739cfce ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index f86701d248..735efb6cfc 100644
+index 7571e16343..3e12b4b119 100644
@@ -31 +32 @@
-@@ -1626,13 +1626,14 @@ mrvl_xstats_get(struct rte_eth_dev *dev,
+@@ -1376,13 +1376,14 @@ mrvl_xstats_get(struct rte_eth_dev *dev,
@@ -50 +51 @@
-@@ -1648,7 +1649,7 @@ mrvl_xstats_get(struct rte_eth_dev *dev,
+@@ -1398,7 +1399,7 @@ mrvl_xstats_get(struct rte_eth_dev *dev,

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

* patch 'app/testpmd: replace hardcoded min mbuf number with macro' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (35 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/mvpp2: " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'app/testpmd: fix metering and policing command for RFC4115' " christian.ehrhardt
                   ` (48 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Mingxia Liu; +Cc: Yuying Zhang, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 0d9db8131162ce597f4b7952547d1cbd07bdb32a Mon Sep 17 00:00:00 2001
From: Mingxia Liu <mingxia.liu@intel.com>
Date: Thu, 31 Mar 2022 02:33:33 +0000
Subject: [PATCH] app/testpmd: replace hardcoded min mbuf number with macro

[ upstream commit 57d91f5b8dc589226a307560bd36181ac7a6b7df ]

Add macro MIN_TOTAL_NUM_MBUFS (1024) to indicate
what the value of total-num-mbufs should bigger than.

Fixes: c87988187fdb ("app/testpmd: add --total-num-mbufs option")

Signed-off-by: Mingxia Liu <mingxia.liu@intel.com>
Acked-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 app/test-pmd/parameters.c | 5 +++--
 app/test-pmd/testpmd.h    | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index e1e9af95ec..eff1cbb9a8 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -873,11 +873,12 @@ launch_args_parse(int argc, char** argv)
 			}
 			if (!strcmp(lgopts[opt_idx].name, "total-num-mbufs")) {
 				n = atoi(optarg);
-				if (n > 1024)
+				if (n > MIN_TOTAL_NUM_MBUFS)
 					param_total_num_mbufs = (unsigned)n;
 				else
 					rte_exit(EXIT_FAILURE,
-						 "total-num-mbufs should be > 1024\n");
+						 "total-num-mbufs should be > %d\n",
+						 MIN_TOTAL_NUM_MBUFS);
 			}
 			if (!strcmp(lgopts[opt_idx].name, "max-pkt-len")) {
 				n = atoi(optarg);
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 334bcc28e6..244b0c710a 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -53,6 +53,8 @@
 #define NUMA_NO_CONFIG 0xFF
 #define UMA_NO_CONFIG  0xFF
 
+#define MIN_TOTAL_NUM_MBUFS 1024
+
 typedef uint8_t  lcoreid_t;
 typedef uint16_t portid_t;
 typedef uint16_t queueid_t;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.808723882 +0200
+++ 0038-app-testpmd-replace-hardcoded-min-mbuf-number-with-m.patch	2022-07-07 09:54:10.881824099 +0200
@@ -1 +1 @@
-From 57d91f5b8dc589226a307560bd36181ac7a6b7df Mon Sep 17 00:00:00 2001
+From 0d9db8131162ce597f4b7952547d1cbd07bdb32a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57d91f5b8dc589226a307560bd36181ac7a6b7df ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index daf6a31b2b..641c9c767e 100644
+index e1e9af95ec..eff1cbb9a8 100644
@@ -24 +25 @@
-@@ -940,11 +940,12 @@ launch_args_parse(int argc, char** argv)
+@@ -873,11 +873,12 @@ launch_args_parse(int argc, char** argv)
@@ -40 +41 @@
-index 67f253b30e..f04a9a11b4 100644
+index 334bcc28e6..244b0c710a 100644
@@ -43 +44 @@
-@@ -72,6 +72,8 @@
+@@ -53,6 +53,8 @@

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

* patch 'app/testpmd: fix metering and policing command for RFC4115' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (36 preceding siblings ...)
  2022-07-07  7:54 ` patch 'app/testpmd: replace hardcoded min mbuf number with macro' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'ethdev: prohibit polling stopped queue' " christian.ehrhardt
                   ` (47 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Shun Hao; +Cc: Matan Azrad, Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ae3d483239e6c07ecf45e0323e13893585083bb7 Mon Sep 17 00:00:00 2001
From: Shun Hao <shunh@nvidia.com>
Date: Fri, 13 May 2022 06:57:38 +0300
Subject: [PATCH] app/testpmd: fix metering and policing command for RFC4115

[ upstream commit b4f94d758f9eadf45e3fbefcc8dc5701ab73bfca ]

Add CLI command support for metering and policing of trtcm_rfc4115.

Fixes: 30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing")

Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 app/test-pmd/cmdline.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 3a2ba414c8..50f5c1db7e 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -19373,6 +19373,7 @@ cmdline_parse_ctx_t main_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_show_port_meter_cap,
 	(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_srtcm,
 	(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm,
+	(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm_rfc4115,
 	(cmdline_parse_inst_t *)&cmd_del_port_meter_profile,
 	(cmdline_parse_inst_t *)&cmd_create_port_meter,
 	(cmdline_parse_inst_t *)&cmd_enable_port_meter,
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.842609413 +0200
+++ 0039-app-testpmd-fix-metering-and-policing-command-for-RF.patch	2022-07-07 09:54:10.897824197 +0200
@@ -1 +1 @@
-From b4f94d758f9eadf45e3fbefcc8dc5701ab73bfca Mon Sep 17 00:00:00 2001
+From ae3d483239e6c07ecf45e0323e13893585083bb7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b4f94d758f9eadf45e3fbefcc8dc5701ab73bfca ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 44ddf9bbc8..1e5b294ab3 100644
+index 3a2ba414c8..50f5c1db7e 100644
@@ -22 +23 @@
-@@ -17963,6 +17963,7 @@ cmdline_parse_ctx_t main_ctx[] = {
+@@ -19373,6 +19373,7 @@ cmdline_parse_ctx_t main_ctx[] = {

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

* patch 'ethdev: prohibit polling stopped queue' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (37 preceding siblings ...)
  2022-07-07  7:54 ` patch 'app/testpmd: fix metering and policing command for RFC4115' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/bonding: fix mbuf fast free usage' " christian.ehrhardt
                   ` (46 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 1e64fc63b5bef0c2437a3b9341c5320732288f6a Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Mon, 11 Apr 2022 00:35:50 +0300
Subject: [PATCH] ethdev: prohibit polling stopped queue

[ upstream commit b77d3318d6a3ca266751031ff04520b7ad485529 ]

Whether it is allowed to call Rx/Tx functions for a stopped queue
was undocumented. Some PMDs make this behavior a no-op
either by explicitly checking the queue state
or by the way how their routines are implemented or HW works.

No-op behavior may be convenient for application developers.
But it also means that pollers of stopped queues
would go all the way down to PMD Rx/Tx routines, wasting cycles.
Some PMDs would do a check for the queue state on data path,
even though it may never be needed for a particular application.
Also, use cases for stopping queues or starting them deferred
do not logically require polling stopped queues.

Use case 1: a secondary that was polling the queue has crashed,
the primary is doing a recovery to free all mbufs.
By definition the queue to be restarted is not polled.

Use case 2: deferred queue start or queue reconfiguration.
The polling thread must be synchronized anyway,
because queue start and stop are non-atomic.

Prohibit calling Rx/Tx functions on stopped queues.

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

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/librte_ethdev/rte_ethdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 826339009b..2aea6cb196 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -74,7 +74,7 @@
  * rte_eth_rx_queue_setup()), it must call rte_eth_dev_stop() first to stop the
  * device and then do the reconfiguration before calling rte_eth_dev_start()
  * again. The transmit and receive functions should not be invoked when the
- * device is stopped.
+ * device or the queue is stopped.
  *
  * Please note that some configuration is not stored between calls to
  * rte_eth_dev_stop()/rte_eth_dev_start(). The following configuration will
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.885410546 +0200
+++ 0040-ethdev-prohibit-polling-stopped-queue.patch	2022-07-07 09:54:10.909824271 +0200
@@ -1 +1 @@
-From b77d3318d6a3ca266751031ff04520b7ad485529 Mon Sep 17 00:00:00 2001
+From 1e64fc63b5bef0c2437a3b9341c5320732288f6a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b77d3318d6a3ca266751031ff04520b7ad485529 ]
+
@@ -30 +31,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
- lib/ethdev/rte_ethdev.h | 2 +-
+ lib/librte_ethdev/rte_ethdev.h | 2 +-
@@ -38,4 +39,4 @@
-diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
-index 04225bba4d..02df65d923 100644
---- a/lib/ethdev/rte_ethdev.h
-+++ b/lib/ethdev/rte_ethdev.h
+diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
+index 826339009b..2aea6cb196 100644
+--- a/lib/librte_ethdev/rte_ethdev.h
++++ b/lib/librte_ethdev/rte_ethdev.h

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

* patch 'net/bonding: fix mbuf fast free usage' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (38 preceding siblings ...)
  2022-07-07  7:54 ` patch 'ethdev: prohibit polling stopped queue' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/memif: fix overwriting of head segment' " christian.ehrhardt
                   ` (45 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 84ee8673e5ecea79eebb2a544dd025c16b7bd8dc Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Wed, 25 May 2022 09:08:28 +0800
Subject: [PATCH] net/bonding: fix mbuf fast free usage

[ upstream commit 18c41457cbaeaf44a87f88fe861de35c923ab702 ]

Usage of 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' offload has two
constraints: per-queue all mbufs comes from the same mempool and
has refcnt = 1.

Bonding mode Broadcast, Tx mbuf has more than one refcnt.
Bonding mode 8023AD, It contains two mempools separately for LACP
packets and other packets. In Tx or Rx, Fast mbuf free will operate
mbuf from different mempool.

This patch will prevent 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' offload
when in bonding mode Broadcast and mode 8023AD.

Fixes: 78aecefed955 ("bond: move param parsing in configure step")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 2c55621740..812bfb8bd3 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3540,6 +3540,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 	const char *name = dev->device->name;
 	struct bond_dev_private *internals = dev->data->dev_private;
 	struct rte_kvargs *kvlist = internals->kvlist;
+	uint64_t offloads;
 	int arg_count;
 	uint16_t port_id = dev - rte_eth_devices;
 	uint8_t agg_mode;
@@ -3600,6 +3601,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 		}
 	}
 
+	offloads = dev->data->dev_conf.txmode.offloads;
+	if ((offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) &&
+			(internals->mode == BONDING_MODE_8023AD ||
+			internals->mode == BONDING_MODE_BROADCAST)) {
+		RTE_BOND_LOG(WARNING,
+			"bond mode broadcast & 8023AD don't support MBUF_FAST_FREE offload, force disable it.");
+		offloads &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+		dev->data->dev_conf.txmode.offloads = offloads;
+	}
+
 	/* set the max_rx_pktlen */
 	internals->max_rx_pktlen = internals->candidate_max_rx_pktlen;
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.921571452 +0200
+++ 0041-net-bonding-fix-mbuf-fast-free-usage.patch	2022-07-07 09:54:10.913824296 +0200
@@ -1 +1 @@
-From 18c41457cbaeaf44a87f88fe861de35c923ab702 Mon Sep 17 00:00:00 2001
+From 84ee8673e5ecea79eebb2a544dd025c16b7bd8dc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 18c41457cbaeaf44a87f88fe861de35c923ab702 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index f0668a636f..ace8f8b45e 100644
+index 2c55621740..812bfb8bd3 100644
@@ -30 +31 @@
-@@ -3583,6 +3583,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3540,6 +3540,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
@@ -38 +39 @@
-@@ -3643,6 +3644,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3600,6 +3601,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
@@ -43 +44 @@
-+	if ((offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) &&
++	if ((offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) &&
@@ -48 +49 @@
-+		offloads &= ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
++		offloads &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;

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

* patch 'net/memif: fix overwriting of head segment' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (39 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/bonding: fix mbuf fast free usage' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/bnxt: fix compatibility with some old firmwares' " christian.ehrhardt
                   ` (44 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Joyce Kong; +Cc: Ferruh Yigit, Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 8abcce84f2eece557cbc254dd83c2bac9a7d137a Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Wed, 25 May 2022 05:56:35 +0000
Subject: [PATCH] net/memif: fix overwriting of head segment

[ upstream commit 10c4c4d4eac1b7def2d2e8a63f9d302cf42a606c ]

The 'dst_off' was reset in multi segment case.
This caused memif buffer segment to write to
beginning of mbuf, overwriting previous data.
Fix it with this patch.

Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

Reported-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/net/memif/rte_eth_memif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index fddf84a8fd..10aebadbd0 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -334,13 +334,13 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 			goto no_free_bufs;
 		mbuf = mbuf_head;
 		mbuf->port = mq->in_port;
+		dst_off = 0;
 
 next_slot:
 		s0 = cur_slot & mask;
 		d0 = &ring->desc[s0];
 
 		src_len = d0->length;
-		dst_off = 0;
 		src_off = 0;
 
 		do {
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.960499353 +0200
+++ 0042-net-memif-fix-overwriting-of-head-segment.patch	2022-07-07 09:54:10.913824296 +0200
@@ -1 +1 @@
-From 10c4c4d4eac1b7def2d2e8a63f9d302cf42a606c Mon Sep 17 00:00:00 2001
+From 8abcce84f2eece557cbc254dd83c2bac9a7d137a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 10c4c4d4eac1b7def2d2e8a63f9d302cf42a606c ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 587ad45576..dd951b8296 100644
+index fddf84a8fd..10aebadbd0 100644
@@ -25 +26 @@
-@@ -348,13 +348,13 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -334,13 +334,13 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)

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

* patch 'net/bnxt: fix compatibility with some old firmwares' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (40 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/memif: fix overwriting of head segment' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'examples/vhost: fix crash when no VMDq' " christian.ehrhardt
                   ` (43 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: David Marchand; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 4a9b088ed44643a9ad5682bc1f76f8b622ddde0d Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 18 Mar 2022 16:03:31 +0100
Subject: [PATCH] net/bnxt: fix compatibility with some old firmwares

[ upstream commit a43d0129579034af06314b6603d92a866d809eeb ]

This reverts commit 3972281f47b2cc0cf844698885f0e6b4228c0975.

Reported by Red Hat QE: with older firmware versions (at least versions
20.6.112.0 and 20.6.143.0), initialisation never succeeds following this
change.
Revert it for now, waiting for a more complete fix.

Fixes: 3972281f47b2 ("net/bnxt: fix device readiness check")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 90434d15b4..4ae1682920 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1038,11 +1038,6 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
 	else
 		HWRM_CHECK_RESULT();
 
-	if (resp->flags & HWRM_VER_GET_OUTPUT_FLAGS_DEV_NOT_RDY) {
-		rc = -EAGAIN;
-		goto error;
-	}
-
 	PMD_DRV_LOG(INFO, "%d.%d.%d:%d.%d.%d.%d\n",
 		resp->hwrm_intf_maj_8b, resp->hwrm_intf_min_8b,
 		resp->hwrm_intf_upd_8b, resp->hwrm_fw_maj_8b,
@@ -5221,10 +5216,6 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)
 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
 
 	HWRM_CHECK_RESULT_SILENT();
-
-	if (resp->flags & HWRM_VER_GET_OUTPUT_FLAGS_DEV_NOT_RDY)
-		rc = -EAGAIN;
-
 	HWRM_UNLOCK();
 
 	return rc;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.003426482 +0200
+++ 0043-net-bnxt-fix-compatibility-with-some-old-firmwares.patch	2022-07-07 09:54:10.917824320 +0200
@@ -1 +1 @@
-From a43d0129579034af06314b6603d92a866d809eeb Mon Sep 17 00:00:00 2001
+From 4a9b088ed44643a9ad5682bc1f76f8b622ddde0d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a43d0129579034af06314b6603d92a866d809eeb ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 6e4753c508..9eb8b8d56d 100644
+index 90434d15b4..4ae1682920 100644
@@ -26 +27 @@
-@@ -1249,11 +1249,6 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
+@@ -1038,11 +1038,6 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
@@ -38 +39 @@
-@@ -6154,10 +6149,6 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)
+@@ -5221,10 +5216,6 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)

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

* patch 'examples/vhost: fix crash when no VMDq' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (41 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/bnxt: fix compatibility with some old firmwares' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'kni: fix build with Linux 5.18' " christian.ehrhardt
                   ` (42 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Yuan Wang; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ac099749a9140b7aa93a22bcf2a6b21470c4a5a9 Mon Sep 17 00:00:00 2001
From: Yuan Wang <yuanx.wang@intel.com>
Date: Wed, 18 May 2022 21:36:33 +0800
Subject: [PATCH] examples/vhost: fix crash when no VMDq

[ upstream commit 6f3d83c7f207d435d960ad881f127e9971a81069 ]

If the VMDq limits is 0, a divide-by-zero error occurs.
This patch replaces throwing a floating point exception with
a normal error message.

Fixes: d19533e86f ("examples/vhost: copy old vhost example")

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 examples/vhost/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 135aafa5b4..073668022b 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -236,6 +236,10 @@ port_init(uint16_t port)
 
 		return retval;
 	}
+	if (dev_info.max_vmdq_pools == 0) {
+		RTE_LOG(ERR, VHOST_PORT, "Failed to get VMDq info.\n");
+		return -1;
+	}
 
 	rxconf = &dev_info.default_rxconf;
 	txconf = &dev_info.default_txconf;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.039296130 +0200
+++ 0044-examples-vhost-fix-crash-when-no-VMDq.patch	2022-07-07 09:54:10.921824345 +0200
@@ -1 +1 @@
-From 6f3d83c7f207d435d960ad881f127e9971a81069 Mon Sep 17 00:00:00 2001
+From ac099749a9140b7aa93a22bcf2a6b21470c4a5a9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6f3d83c7f207d435d960ad881f127e9971a81069 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 5bc34b0c52..e7fee5aa1b 100644
+index 135aafa5b4..073668022b 100644
@@ -23 +24 @@
-@@ -431,6 +431,10 @@ port_init(uint16_t port)
+@@ -236,6 +236,10 @@ port_init(uint16_t port)

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

* patch 'kni: fix build with Linux 5.18' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (42 preceding siblings ...)
  2022-07-07  7:54 ` patch 'examples/vhost: fix crash when no VMDq' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/ixgbe: add option for link up check on pin SDP3' " christian.ehrhardt
                   ` (41 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 104eedad56662727ead7c3375d6eba4a26c8734b Mon Sep 17 00:00:00 2001
From: Jiri Slaby <jslaby@suse.cz>
Date: Wed, 1 Jun 2022 08:53:58 +0200
Subject: [PATCH] kni: fix build with Linux 5.18

[ upstream commit c98600d4bed6d15599e448990f2ba117ca938a2d ]

Since commit 2655926aea9b (net: Remove netif_rx_any_context() and
netif_rx_ni().) in 5.18, netif_rx_ni() no longer exists as netif_rx()
can be called from any context. So define HAVE_NETIF_RX_NI for older
releases and call the appropriate function in kni_net.

netif_rx_ni() must be used on older kernel since netif_rx() might
might lead to deadlocks or other problems there.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 kernel/linux/kni/compat.h  | 4 ++++
 kernel/linux/kni/kni_net.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 664785674f..0db29a4a6f 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -141,3 +141,7 @@
 #if KERNEL_VERSION(5, 9, 0) > LINUX_VERSION_CODE
 #define HAVE_TSK_IN_GUP
 #endif
+
+#if KERNEL_VERSION(5, 18, 0) > LINUX_VERSION_CODE
+#define HAVE_NETIF_RX_NI
+#endif
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index c8bad5f197..e54864c977 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -411,7 +411,11 @@ kni_net_rx_normal(struct kni_dev *kni)
 		skb->ip_summed = CHECKSUM_UNNECESSARY;
 
 		/* Call netif interface */
+#ifdef HAVE_NETIF_RX_NI
 		netif_rx_ni(skb);
+#else
+		netif_rx(skb);
+#else
 
 		/* Update statistics */
 		dev->stats.rx_bytes += len;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.079372011 +0200
+++ 0045-kni-fix-build-with-Linux-5.18.patch	2022-07-07 09:54:10.921824345 +0200
@@ -1 +1 @@
-From c98600d4bed6d15599e448990f2ba117ca938a2d Mon Sep 17 00:00:00 2001
+From 104eedad56662727ead7c3375d6eba4a26c8734b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c98600d4bed6d15599e448990f2ba117ca938a2d ]
+
@@ -14,2 +15,0 @@
-Cc: stable@dpdk.org
-
@@ -36 +36 @@
-index 29e5b9e21f..a8b092b756 100644
+index c8bad5f197..e54864c977 100644
@@ -39 +39 @@
-@@ -441,7 +441,11 @@ kni_net_rx_normal(struct kni_dev *kni)
+@@ -411,7 +411,11 @@ kni_net_rx_normal(struct kni_dev *kni)

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

* patch 'net/ixgbe: add option for link up check on pin SDP3' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (43 preceding siblings ...)
  2022-07-07  7:54 ` patch 'kni: fix build with Linux 5.18' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/ice/base: fix getting sched node from ID type' " christian.ehrhardt
                   ` (40 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Jeff Daly; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 2ed9b68967bc8e8ec3e0af4aa046ffac911ab8d7 Mon Sep 17 00:00:00 2001
From: Jeff Daly <jeffd@silicom-usa.com>
Date: Tue, 10 May 2022 14:57:25 -0400
Subject: [PATCH] net/ixgbe: add option for link up check on pin SDP3

[ upstream commit 0f9fb100f6c6ed1dcadaf76352f4b4f2bd5501f6 ]

1ca05831b9b added a check that SDP3 (used as a TX_DISABLE output to the
SFP cage on these cards) is not asserted to avoid incorrectly reporting
link up when the SFP's laser is turned off.

ff8162cb957 limited this workaround to fiber ports

This patch:
* Adds devarg 'fiber_sdp3_no_tx_disable' not all fiber ixgbe devs use
  SDP3 as TX_DISABLE

Fixes: 1ca05831b9b ("net/ixgbe: fix link status")
Fixes: ff8162cb957 ("net/ixgbe: fix link status")

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 doc/guides/nics/ixgbe.rst        | 17 ++++++++++++++
 drivers/net/ixgbe/ixgbe_ethdev.c | 39 +++++++++++++++++++++++++++++++-
 drivers/net/ixgbe/ixgbe_ethdev.h |  3 +++
 3 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
index 6ca2a33f09..8305bf0dbb 100644
--- a/doc/guides/nics/ixgbe.rst
+++ b/doc/guides/nics/ixgbe.rst
@@ -82,6 +82,23 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
 
 fdir_conf->mode will also be checked.
 
+Disable SDP3 TX_DISABLE for Fiber Links
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The following ``devargs`` option can be enabled at runtime.  It must
+be passed as part of EAL arguments. For example,
+
+.. code-block:: console
+
+   dpdk-testpmd -a fiber_sdp3_no_tx_disable=1 -- -i
+
+- ``fiber_sdp3_no_tx_disable`` (default **0**)
+
+  Not all IXGBE implementations with SFP cages use the SDP3 signal as
+  TX_DISABLE as a means to disable the laser on fiber SFP modules.
+  This option informs the driver that in this case, SDP3 is not to be
+  used as a check for link up by testing for laser on/off.
+
 VF Runtime Options
 ^^^^^^^^^^^^^^^^^^
 
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index b06ff64faa..65d81c6cec 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -128,6 +128,13 @@
 #define IXGBE_EXVET_VET_EXT_SHIFT              16
 #define IXGBE_DMATXCTL_VT_MASK                 0xFFFF0000
 
+#define IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE	"fiber_sdp3_no_tx_disable"
+
+static const char * const ixgbe_valid_arguments[] = {
+	IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE,
+	NULL
+};
+
 #define IXGBEVF_DEVARG_PFLINK_FULLCHK		"pflink_fullchk"
 
 static const char * const ixgbevf_valid_arguments[] = {
@@ -381,6 +388,8 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
 static int ixgbe_filter_restore(struct rte_eth_dev *dev);
 static void ixgbe_l2_tunnel_conf(struct rte_eth_dev *dev);
 static int ixgbe_wait_for_link_up(struct ixgbe_hw *hw);
+static int devarg_handle_int(__rte_unused const char *key, const char *value,
+			     void *extra_args);
 
 /*
  * Define VF Stats MACRO for Non "cleared on read" register
@@ -1085,6 +1094,29 @@ ixgbe_swfw_lock_reset(struct ixgbe_hw *hw)
 	ixgbe_release_swfw_semaphore(hw, mask);
 }
 
+static void
+ixgbe_parse_devargs(struct ixgbe_adapter *adapter,
+		      struct rte_devargs *devargs)
+{
+	struct rte_kvargs *kvlist;
+	uint16_t sdp3_no_tx_disable;
+
+	if (devargs == NULL)
+		return;
+
+	kvlist = rte_kvargs_parse(devargs->args, ixgbe_valid_arguments);
+	if (kvlist == NULL)
+		return;
+
+	if (rte_kvargs_count(kvlist, IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE) == 1 &&
+	    rte_kvargs_process(kvlist, IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE,
+			       devarg_handle_int, &sdp3_no_tx_disable) == 0 &&
+	    sdp3_no_tx_disable == 1)
+		adapter->sdp3_no_tx_disable = 1;
+
+	rte_kvargs_free(kvlist);
+}
+
 /*
  * This function is based on code in ixgbe_attach() in base/ixgbe.c.
  * It returns 0 on success.
@@ -1145,6 +1177,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	}
 
 	rte_atomic32_clear(&ad->link_thread_running);
+	ixgbe_parse_devargs(eth_dev->data->dev_private,
+			    pci_dev->device.devargs);
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
 
 	/* Vendor and Device ID need to be set before init of shared code */
@@ -4321,7 +4355,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 		return rte_eth_linkstatus_set(dev, &link);
 	}
 
-	if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
+	if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber &&
+	    !ad->sdp3_no_tx_disable) {
 		esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
 		if ((esdp_reg & IXGBE_ESDP_SDP3))
 			link_up = 0;
@@ -9183,6 +9218,8 @@ ixgbe_dev_macsec_register_disable(struct rte_eth_dev *dev)
 RTE_PMD_REGISTER_PCI(net_ixgbe, rte_ixgbe_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe, pci_id_ixgbe_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe, "* igb_uio | uio_pci_generic | vfio-pci");
+RTE_PMD_REGISTER_PARAM_STRING(net_ixgbe,
+			      IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE "=<0|1>");
 RTE_PMD_REGISTER_PCI(net_ixgbe_vf, rte_ixgbevf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe_vf, pci_id_ixgbevf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe_vf, "* igb_uio | vfio-pci");
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index e406b754e8..77ed07cf4c 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -509,6 +509,9 @@ struct ixgbe_adapter {
 	/* For RSS reta table update */
 	uint8_t rss_reta_updated;
 
+	/* Used for limiting SDP3 TX_DISABLE checks */
+	uint8_t sdp3_no_tx_disable;
+
 	/* Used for VF link sync with PF's physical and logical (by checking
 	 * mailbox status) link status.
 	 */
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.118996628 +0200
+++ 0046-net-ixgbe-add-option-for-link-up-check-on-pin-SDP3.patch	2022-07-07 09:54:10.929824395 +0200
@@ -1 +1 @@
-From 0f9fb100f6c6ed1dcadaf76352f4b4f2bd5501f6 Mon Sep 17 00:00:00 2001
+From 2ed9b68967bc8e8ec3e0af4aa046ffac911ab8d7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0f9fb100f6c6ed1dcadaf76352f4b4f2bd5501f6 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 82fa453fa2..ad1a3da610 100644
+index 6ca2a33f09..8305bf0dbb 100644
@@ -32 +33 @@
-@@ -101,6 +101,23 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
+@@ -82,6 +82,23 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
@@ -57 +58 @@
-index 2da3f67bbc..f31bbb7895 100644
+index b06ff64faa..65d81c6cec 100644
@@ -74 +75 @@
-@@ -348,6 +355,8 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
+@@ -381,6 +388,8 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
@@ -83 +84 @@
-@@ -1032,6 +1041,29 @@ ixgbe_swfw_lock_reset(struct ixgbe_hw *hw)
+@@ -1085,6 +1094,29 @@ ixgbe_swfw_lock_reset(struct ixgbe_hw *hw)
@@ -113 +114 @@
-@@ -1095,6 +1127,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1145,6 +1177,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -120 +120,0 @@
- 	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
@@ -122 +122,2 @@
-@@ -4261,7 +4295,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+ 	/* Vendor and Device ID need to be set before init of shared code */
+@@ -4321,7 +4355,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
@@ -132 +133 @@
-@@ -8250,6 +8285,8 @@ ixgbe_dev_macsec_register_disable(struct rte_eth_dev *dev)
+@@ -9183,6 +9218,8 @@ ixgbe_dev_macsec_register_disable(struct rte_eth_dev *dev)
@@ -142 +143 @@
-index 69e0e82a5b..cc6049a66a 100644
+index e406b754e8..77ed07cf4c 100644
@@ -145 +146 @@
-@@ -501,6 +501,9 @@ struct ixgbe_adapter {
+@@ -509,6 +509,9 @@ struct ixgbe_adapter {

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

* patch 'net/ice/base: fix getting sched node from ID type' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (44 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/ixgbe: add option for link up check on pin SDP3' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/iavf: fix queue start exception handling' " christian.ehrhardt
                   ` (39 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 9b6b361ea7c87bdecd4ff6e783442097763333eb Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Tue, 17 May 2022 13:09:26 +0800
Subject: [PATCH] net/ice/base: fix getting sched node from ID type

[ upstream commit 8f7a83e19325be26207e4cb2f11856f0fe3dbeca ]

The function ice_sched_get_node_by_id_type needs to be called
with the scheduler lock held. However, the function
ice_sched_get_node also requests the scheduler lock.
It will cause the dead lock issue.

This patch replaces function ice_sched_get_node with
function ice_sched_find_node_by_teid to solve this problem.

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

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_sched.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 3669688bd8..5b1f3d1b3a 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -4759,12 +4759,12 @@ ice_sched_get_node_by_id_type(struct ice_port_info *pi, u32 id,
 
 	case ICE_AGG_TYPE_Q:
 		/* The current implementation allows single queue to modify */
-		node = ice_sched_get_node(pi, id);
+		node = ice_sched_find_node_by_teid(pi->root, id);
 		break;
 
 	case ICE_AGG_TYPE_QG:
 		/* The current implementation allows single qg to modify */
-		child_node = ice_sched_get_node(pi, id);
+		child_node = ice_sched_find_node_by_teid(pi->root, id);
 		if (!child_node)
 			break;
 		node = child_node->parent;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.164431348 +0200
+++ 0047-net-ice-base-fix-getting-sched-node-from-ID-type.patch	2022-07-07 09:54:10.933824419 +0200
@@ -1 +1 @@
-From 8f7a83e19325be26207e4cb2f11856f0fe3dbeca Mon Sep 17 00:00:00 2001
+From 9b6b361ea7c87bdecd4ff6e783442097763333eb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f7a83e19325be26207e4cb2f11856f0fe3dbeca ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 2620892c9e..e697c579be 100644
+index 3669688bd8..5b1f3d1b3a 100644
@@ -27 +28 @@
-@@ -4774,12 +4774,12 @@ ice_sched_get_node_by_id_type(struct ice_port_info *pi, u32 id,
+@@ -4759,12 +4759,12 @@ ice_sched_get_node_by_id_type(struct ice_port_info *pi, u32 id,

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

* patch 'net/iavf: fix queue start exception handling' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (45 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/ice/base: fix getting sched node from ID type' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/iavf: increase reset complete wait count' " christian.ehrhardt
                   ` (38 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 876ff3ffd902e0fc6d32d38367a2272a86ca25c7 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Thu, 19 May 2022 05:01:56 +0000
Subject: [PATCH] net/iavf: fix queue start exception handling

[ upstream commit 1fa739c3f2b3876d21e506c024a3c6bee6562943 ]

If any queue start fail during dev_start, all started queues
should be stopped.

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

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 583a8be760..3cb02bd1fb 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -433,28 +433,38 @@ iavf_start_queues(struct rte_eth_dev *dev)
 	struct iavf_rx_queue *rxq;
 	struct iavf_tx_queue *txq;
 	int i;
+	uint16_t nb_txq, nb_rxq;
 
-	for (i = 0; i < dev->data->nb_tx_queues; i++) {
-		txq = dev->data->tx_queues[i];
+	for (nb_txq = 0; nb_txq < dev->data->nb_tx_queues; nb_txq++) {
+		txq = dev->data->tx_queues[nb_txq];
 		if (txq->tx_deferred_start)
 			continue;
-		if (iavf_dev_tx_queue_start(dev, i) != 0) {
-			PMD_DRV_LOG(ERR, "Fail to start queue %u", i);
-			return -1;
+		if (iavf_dev_tx_queue_start(dev, nb_txq) != 0) {
+			PMD_DRV_LOG(ERR, "Fail to start tx queue %u", nb_txq);
+			goto tx_err;
 		}
 	}
 
-	for (i = 0; i < dev->data->nb_rx_queues; i++) {
-		rxq = dev->data->rx_queues[i];
+	for (nb_rxq = 0; nb_rxq < dev->data->nb_rx_queues; nb_rxq++) {
+		rxq = dev->data->rx_queues[nb_rxq];
 		if (rxq->rx_deferred_start)
 			continue;
-		if (iavf_dev_rx_queue_start(dev, i) != 0) {
-			PMD_DRV_LOG(ERR, "Fail to start queue %u", i);
-			return -1;
+		if (iavf_dev_rx_queue_start(dev, nb_rxq) != 0) {
+			PMD_DRV_LOG(ERR, "Fail to start rx queue %u", nb_rxq);
+			goto rx_err;
 		}
 	}
 
 	return 0;
+
+rx_err:
+	for (i = 0; i < nb_rxq; i++)
+		iavf_dev_rx_queue_stop(dev, i);
+tx_err:
+	for (i = 0; i < nb_txq; i++)
+		iavf_dev_tx_queue_stop(dev, i);
+
+	return -1;
 }
 
 static int
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.212614005 +0200
+++ 0048-net-iavf-fix-queue-start-exception-handling.patch	2022-07-07 09:54:10.937824444 +0200
@@ -1 +1 @@
-From 1fa739c3f2b3876d21e506c024a3c6bee6562943 Mon Sep 17 00:00:00 2001
+From 876ff3ffd902e0fc6d32d38367a2272a86ca25c7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1fa739c3f2b3876d21e506c024a3c6bee6562943 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 198d8299af..315ab15aad 100644
+index 583a8be760..3cb02bd1fb 100644
@@ -22 +23 @@
-@@ -926,28 +926,38 @@ iavf_start_queues(struct rte_eth_dev *dev)
+@@ -433,28 +433,38 @@ iavf_start_queues(struct rte_eth_dev *dev)

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

* patch 'net/iavf: increase reset complete wait count' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (46 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/iavf: fix queue start exception handling' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'bus/fslmc: fix VFIO setup' " christian.ehrhardt
                   ` (37 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 2c86293fd2f1f06c6d849d18f9c8230a93b54a5c Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Mon, 30 May 2022 13:34:58 +0800
Subject: [PATCH] net/iavf: increase reset complete wait count

[ upstream commit be7226980c9ad4963b92b489c8afb17f08899953 ]

Kernel iavf driver has sent patch to increase the completion
wait time to reduce the "Reset never finished" case.
Follow this action in DPDK iavf driver.
Kernel reference commit:
8e3e4b9da7e6 ("iavf: increase reset complete wait time")

Fixes: 22b123a36d07 ("net/avf: initialize PMD")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index 16480a76f6..297c69775b 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -10,7 +10,7 @@
 
 #define IAVF_AQ_LEN               32
 #define IAVF_AQ_BUF_SZ            4096
-#define IAVF_RESET_WAIT_CNT       50
+#define IAVF_RESET_WAIT_CNT       500
 #define IAVF_BUF_SIZE_MIN         1024
 #define IAVF_FRAME_SIZE_MAX       9728
 #define IAVF_QUEUE_BASE_ADDR_UNIT 128
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.249310150 +0200
+++ 0049-net-iavf-increase-reset-complete-wait-count.patch	2022-07-07 09:54:10.937824444 +0200
@@ -1 +1 @@
-From be7226980c9ad4963b92b489c8afb17f08899953 Mon Sep 17 00:00:00 2001
+From 2c86293fd2f1f06c6d849d18f9c8230a93b54a5c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit be7226980c9ad4963b92b489c8afb17f08899953 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index f1c2daa06e..025ab3ff60 100644
+index 16480a76f6..297c69775b 100644
@@ -25 +26 @@
-@@ -18,7 +18,7 @@
+@@ -10,7 +10,7 @@

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

* patch 'bus/fslmc: fix VFIO setup' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (47 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/iavf: increase reset complete wait count' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'kni: use dedicated function to set random MAC address' " christian.ehrhardt
                   ` (36 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Romain Delhomel; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 3ed306d01422fb8224f6d6314a1181b8d2451908 Mon Sep 17 00:00:00 2001
From: Romain Delhomel <romain.delhomel@6wind.com>
Date: Fri, 3 Jun 2022 17:18:30 +0200
Subject: [PATCH] bus/fslmc: fix VFIO setup

[ upstream commit 36c3c4df136f6d79c0ffaddec00696f5eddaef16 ]

At device probe, the fslmc bus driver calls rte_vfio_get_group_fd() to
get a fd associated to a vfio group. This function first checks if the
group is already opened, else it opens /dev/vfio/%u, and increases the
number of active groups in default_vfio_cfg (which references the
default vfio container).

When adding the first group to a vfio_cfg, the caller is supposed to
pick an IOMMU type and set up DMA mappings for container, as it's done
by pci bus, but it is not done here. Instead, a new container is created
and used.

This prevents the pci bus driver, which uses the default_vfio_cfg
container, to configure the container because
default_vfio_cfg->active_group > 1.

This patch fixes the issue by always creating a new container (and its
associated vfio_cfg) and binding the group to it.

Fixes: a69f79300262 ("bus/fslmc: support multi VFIO group")

Signed-off-by: Romain Delhomel <romain.delhomel@6wind.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/fslmc_vfio.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index bf9e3e49a5..95f7586ab5 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -903,6 +903,7 @@ fslmc_vfio_setup_group(void)
 {
 	int groupid;
 	int ret;
+	int vfio_container_fd;
 	struct vfio_group_status status = { .argsz = sizeof(status) };
 
 	/* if already done once */
@@ -921,8 +922,15 @@ fslmc_vfio_setup_group(void)
 		return 0;
 	}
 
+	ret = rte_vfio_container_create();
+	if (ret < 0) {
+		DPAA2_BUS_ERR("Failed to open VFIO container");
+		return ret;
+	}
+	vfio_container_fd = ret;
+
 	/* Get the actual group fd */
-	ret = rte_vfio_get_group_fd(groupid);
+	ret = rte_vfio_container_group_bind(vfio_container_fd, groupid);
 	if (ret < 0)
 		return ret;
 	vfio_group.fd = ret;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.289901956 +0200
+++ 0050-bus-fslmc-fix-VFIO-setup.patch	2022-07-07 09:54:10.937824444 +0200
@@ -1 +1 @@
-From 36c3c4df136f6d79c0ffaddec00696f5eddaef16 Mon Sep 17 00:00:00 2001
+From 3ed306d01422fb8224f6d6314a1181b8d2451908 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 36c3c4df136f6d79c0ffaddec00696f5eddaef16 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 1b89a56bbc..3d4e71a80a 100644
+index bf9e3e49a5..95f7586ab5 100644
@@ -37 +38 @@
-@@ -995,6 +995,7 @@ fslmc_vfio_setup_group(void)
+@@ -903,6 +903,7 @@ fslmc_vfio_setup_group(void)
@@ -45 +46 @@
-@@ -1013,8 +1014,15 @@ fslmc_vfio_setup_group(void)
+@@ -921,8 +922,15 @@ fslmc_vfio_setup_group(void)

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

* patch 'kni: use dedicated function to set random MAC address' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (48 preceding siblings ...)
  2022-07-07  7:54 ` patch 'bus/fslmc: fix VFIO setup' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'kni: use dedicated function to set " christian.ehrhardt
                   ` (35 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Ke Zhang; +Cc: Andrew Rybchenko, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 051010a32bbfa656279cfd86ff41160bac43c3f6 Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang@intel.com>
Date: Wed, 8 Jun 2022 15:11:16 +0300
Subject: [PATCH] kni: use dedicated function to set random MAC address
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 2ee8c67ef9399759cb0d3f34b2c9fb6ea0ecc832 ]

eth_hw_addr_random() sets address type correctly.

eth_hw_addr_random() is available since Linux v3.4, so
no compat is required.

Also fix the warning:
warning: passing argument 1 of ‘memcpy’ discards ‘const’
qualifier from pointer target type

Variable dev_addr is done const intentionally in Linux v5.17 to
prevent using it directly.

Fixes: ea6b39b5b847 ("kni: remove ethtool support")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 kernel/linux/kni/kni_misc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index 2067cb4841..f908ebcd82 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -403,8 +403,8 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
 	if (is_valid_ether_addr(dev_info.mac_addr))
 		memcpy(net_dev->dev_addr, dev_info.mac_addr, ETH_ALEN);
 	else
-		/* Generate random MAC address. */
-		eth_random_addr(net_dev->dev_addr);
+		/* Assign random MAC address. */
+		eth_hw_addr_random(net_dev);
 
 	if (dev_info.mtu)
 		net_dev->mtu = dev_info.mtu;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.336526896 +0200
+++ 0051-kni-use-dedicated-function-to-set-random-MAC-address.patch	2022-07-07 09:54:10.941824469 +0200
@@ -1 +1 @@
-From 2ee8c67ef9399759cb0d3f34b2c9fb6ea0ecc832 Mon Sep 17 00:00:00 2001
+From 051010a32bbfa656279cfd86ff41160bac43c3f6 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 2ee8c67ef9399759cb0d3f34b2c9fb6ea0ecc832 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 780187d8bf..4f6dd373a3 100644
+index 2067cb4841..f908ebcd82 100644
@@ -35 +36 @@
-@@ -405,8 +405,8 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
+@@ -403,8 +403,8 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,

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

* patch 'kni: use dedicated function to set MAC address' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (49 preceding siblings ...)
  2022-07-07  7:54 ` patch 'kni: use dedicated function to set random MAC address' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/ice: fix build with GCC 12' " christian.ehrhardt
                   ` (34 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Ke Zhang; +Cc: Andrew Rybchenko, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 1093a40bd849732e0bb5dba21cb10b8e13fae444 Mon Sep 17 00:00:00 2001
From: Ke Zhang <ke1x.zhang@intel.com>
Date: Wed, 8 Jun 2022 15:11:17 +0300
Subject: [PATCH] kni: use dedicated function to set MAC address
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit b99bd4a0aacab47165d045a6aeee88ee74744600 ]

The warning info:
warning: passing argument 1 of ‘memcpy’ discards ‘const’
qualifier from pointer target type

Variable dev_addr is done const intentionally in v5.17 to prevent using
it directly.  See the following Linux kernel changeset for details:

commit adeef3e32146 ("net: constify netdev->dev_addr")

Used helper function was introduced earlier in v5.15.

Fixes: ea6b39b5b847 ("kni: remove ethtool support")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 kernel/linux/kni/compat.h   | 4 ++++
 kernel/linux/kni/kni_misc.c | 9 +++++++--
 kernel/linux/kni/kni_net.c  | 4 ++++
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 0db29a4a6f..3a86d12bbc 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -142,6 +142,10 @@
 #define HAVE_TSK_IN_GUP
 #endif
 
+#if KERNEL_VERSION(5, 15, 0) <= LINUX_VERSION_CODE
+#define HAVE_ETH_HW_ADDR_SET
+#endif
+
 #if KERNEL_VERSION(5, 18, 0) > LINUX_VERSION_CODE
 #define HAVE_NETIF_RX_NI
 #endif
diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index f908ebcd82..12ece28a84 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -400,11 +400,16 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
 	pr_debug("mbuf_size:    %u\n", kni->mbuf_size);
 
 	/* if user has provided a valid mac address */
-	if (is_valid_ether_addr(dev_info.mac_addr))
+	if (is_valid_ether_addr(dev_info.mac_addr)) {
+#ifdef HAVE_ETH_HW_ADDR_SET
+		eth_hw_addr_set(net_dev, dev_info.mac_addr);
+#else
 		memcpy(net_dev->dev_addr, dev_info.mac_addr, ETH_ALEN);
-	else
+#endif
+	} else {
 		/* Assign random MAC address. */
 		eth_hw_addr_random(net_dev);
+	}
 
 	if (dev_info.mtu)
 		net_dev->mtu = dev_info.mtu;
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index e54864c977..1270c367d8 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -756,7 +756,11 @@ kni_net_set_mac(struct net_device *netdev, void *p)
 		return -EADDRNOTAVAIL;
 
 	memcpy(req.mac_addr, addr->sa_data, netdev->addr_len);
+#ifdef HAVE_ETH_HW_ADDR_SET
+	eth_hw_addr_set(netdev, addr->sa_data);
+#else
 	memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
+#endif
 
 	kni = netdev_priv(netdev);
 	ret = kni_net_process_request(kni, &req);
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.371636562 +0200
+++ 0052-kni-use-dedicated-function-to-set-MAC-address.patch	2022-07-07 09:54:10.941824469 +0200
@@ -1 +1 @@
-From b99bd4a0aacab47165d045a6aeee88ee74744600 Mon Sep 17 00:00:00 2001
+From 1093a40bd849732e0bb5dba21cb10b8e13fae444 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit b99bd4a0aacab47165d045a6aeee88ee74744600 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -48 +49 @@
-index 4f6dd373a3..0c3a86ee35 100644
+index f908ebcd82..12ece28a84 100644
@@ -51 +52 @@
-@@ -402,11 +402,16 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
+@@ -400,11 +400,16 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
@@ -71 +72 @@
-index 41805fcabf..779ee3451a 100644
+index e54864c977..1270c367d8 100644
@@ -74 +75 @@
-@@ -783,7 +783,11 @@ kni_net_set_mac(struct net_device *netdev, void *p)
+@@ -756,7 +756,11 @@ kni_net_set_mac(struct net_device *netdev, void *p)
@@ -84,2 +85,2 @@
- 	ret = kni_net_process_request(netdev, &req);
- 
+ 	kni = netdev_priv(netdev);
+ 	ret = kni_net_process_request(kni, &req);

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

* patch 'net/ice: fix build with GCC 12' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (50 preceding siblings ...)
  2022-07-07  7:54 ` patch 'kni: use dedicated function to set " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'vdpa/ifc: " christian.ehrhardt
                   ` (33 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: David Marchand; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b4c2dfe34bff5c973d38a96c18199ac549313b65 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 18 May 2022 12:16:51 +0200
Subject: [PATCH] net/ice: fix build with GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 20d6a017e148cc1944d85d4c80a0151a5b4c6436 ]

GCC 12 raises the following warning:

In file included from ../lib/mempool/rte_mempool.h:46,
                 from ../lib/mbuf/rte_mbuf.h:38,
                 from ../lib/net/rte_ether.h:22,
                 from ../lib/ethdev/rte_ethdev.h:172,
                 from ../lib/ethdev/ethdev_driver.h:22,
                 from ../lib/ethdev/ethdev_pci.h:17,
                 from ../drivers/net/ice/ice_ethdev.c:6:
../drivers/net/ice/ice_ethdev.c: In function ‘ice_dev_configure’:
../lib/eal/x86/include/rte_memcpy.h:370:9: warning: array subscript 64 is
        outside array bounds of ‘struct ice_aqc_get_set_rss_keys[1]’
        [-Warray-bounds]
  370 | rte_mov32((uint8_t *)dst + 2 * 32, (const uint8_t *)src + 2 * 32);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/ice/ice_ethdev.c:3202:41: note: while referencing ‘key’
 3202 |         struct ice_aqc_get_set_rss_keys key;
      |                                         ^~~

Restrict copy to minimum size.

Bugzilla ID: 850

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/ice/ice_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index f665a89f9c..5d40f359b9 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2544,7 +2544,8 @@ static int ice_init_rss(struct ice_pf *pf)
 			   RTE_MIN(rss_conf->rss_key_len,
 				   vsi->rss_key_size));
 
-	rte_memcpy(key.standard_rss_key, vsi->rss_key, vsi->rss_key_size);
+	rte_memcpy(key.standard_rss_key, vsi->rss_key,
+		RTE_MIN(sizeof(key.standard_rss_key), vsi->rss_key_size));
 	ret = ice_aq_set_rss_key(hw, vsi->idx, &key);
 	if (ret)
 		goto out;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.409094988 +0200
+++ 0053-net-ice-fix-build-with-GCC-12.patch	2022-07-07 09:54:10.945824494 +0200
@@ -1 +1 @@
-From 20d6a017e148cc1944d85d4c80a0151a5b4c6436 Mon Sep 17 00:00:00 2001
+From b4c2dfe34bff5c973d38a96c18199ac549313b65 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 20d6a017e148cc1944d85d4c80a0151a5b4c6436 ]
+
@@ -31 +32,0 @@
-Cc: stable@dpdk.org
@@ -40 +41 @@
-index 35ab542e61..4c658ce3dc 100644
+index f665a89f9c..5d40f359b9 100644
@@ -43 +44 @@
-@@ -3282,7 +3282,8 @@ static int ice_init_rss(struct ice_pf *pf)
+@@ -2544,7 +2544,8 @@ static int ice_init_rss(struct ice_pf *pf)

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

* patch 'vdpa/ifc: fix build with GCC 12' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (51 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/ice: fix build with GCC 12' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'eal/x86: drop export of internal alignment macro' " christian.ehrhardt
                   ` (32 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: David Marchand; +Cc: Xiao Wang, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 777f8832c69c86d8e1d96c6a97dd6e5596f3763f Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 18 May 2022 12:16:54 +0200
Subject: [PATCH] vdpa/ifc: fix build with GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 2a213b794fdd255fde7581a7c9bd034ab39e9b6a ]

GCC 12 raises the following warning:

../drivers/vdpa/ifc/ifcvf_vdpa.c: In function ‘vdpa_enable_vfio_intr’:
../drivers/vdpa/ifc/ifcvf_vdpa.c:383:62: error: writing 4 bytes into a
    region of size 0 [-Werror=stringop-overflow=]
  383 |                         fd_ptr[RTE_INTR_VEC_RXTX_OFFSET + i] = fd;
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
../drivers/vdpa/ifc/ifcvf_vdpa.c:348:14: note: at offset 32 into
    destination object ‘irq_set_buf’ of size 32
  348 |         char irq_set_buf[MSIX_IRQ_SET_BUF_LEN];
      |              ^~~~~~~~~~~

Validate number of vrings to avoid out of bound access.

Bugzilla ID: 855

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/ifc/ifcvf_vdpa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c
index da4667ba54..e0044ec29e 100644
--- a/drivers/net/ifc/ifcvf_vdpa.c
+++ b/drivers/net/ifc/ifcvf_vdpa.c
@@ -356,6 +356,8 @@ vdpa_enable_vfio_intr(struct ifcvf_internal *internal, bool m_rx)
 	vring.callfd = -1;
 
 	nr_vring = rte_vhost_get_vring_num(internal->vid);
+	if (nr_vring > IFCVF_MAX_QUEUES * 2)
+		return -1;
 
 	irq_set = (struct vfio_irq_set *)irq_set_buf;
 	irq_set->argsz = sizeof(irq_set_buf);
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.445765717 +0200
+++ 0054-vdpa-ifc-fix-build-with-GCC-12.patch	2022-07-07 09:54:10.945824494 +0200
@@ -1 +1 @@
-From 2a213b794fdd255fde7581a7c9bd034ab39e9b6a Mon Sep 17 00:00:00 2001
+From 777f8832c69c86d8e1d96c6a97dd6e5596f3763f Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 2a213b794fdd255fde7581a7c9bd034ab39e9b6a ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
- drivers/vdpa/ifc/ifcvf_vdpa.c | 2 ++
+ drivers/net/ifc/ifcvf_vdpa.c | 2 ++
@@ -33,5 +34,5 @@
-diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
-index 40a18b2507..8bc971cb12 100644
---- a/drivers/vdpa/ifc/ifcvf_vdpa.c
-+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
-@@ -388,6 +388,8 @@ vdpa_enable_vfio_intr(struct ifcvf_internal *internal, bool m_rx)
+diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c
+index da4667ba54..e0044ec29e 100644
+--- a/drivers/net/ifc/ifcvf_vdpa.c
++++ b/drivers/net/ifc/ifcvf_vdpa.c
+@@ -356,6 +356,8 @@ vdpa_enable_vfio_intr(struct ifcvf_internal *internal, bool m_rx)

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

* patch 'eal/x86: drop export of internal alignment macro' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (52 preceding siblings ...)
  2022-07-07  7:54 ` patch 'vdpa/ifc: " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'common/cpt: fix build with GCC 12' " christian.ehrhardt
                   ` (31 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: David Marchand; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 3ba04d598f8c1a1953a1f2a80d617346ba0f8734 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 21 Jun 2022 16:13:25 +0200
Subject: [PATCH] eal/x86: drop export of internal alignment macro
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 11f61ea2f6fcdd88df2a81b82235ddb7033c3e5d ]

ALIGNMENT_MASK is only used internally.
Besides it lacks a DPDK-related prefix.
Hide it from external eyes.

Fixes: f5472703c0bd ("eal: optimize aligned memcpy on x86")

Reported-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
index 8c2e243d9e..0c3a2caa91 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
@@ -851,6 +851,8 @@ rte_memcpy(void *dst, const void *src, size_t n)
 		return rte_memcpy_generic(dst, src, n);
 }
 
+#undef ALIGNMENT_MASK
+
 #if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
 #pragma GCC diagnostic pop
 #endif
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.482150060 +0200
+++ 0055-eal-x86-drop-export-of-internal-alignment-macro.patch	2022-07-07 09:54:10.949824519 +0200
@@ -1 +1 @@
-From 11f61ea2f6fcdd88df2a81b82235ddb7033c3e5d Mon Sep 17 00:00:00 2001
+From 3ba04d598f8c1a1953a1f2a80d617346ba0f8734 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 11f61ea2f6fcdd88df2a81b82235ddb7033c3e5d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
- lib/eal/x86/include/rte_memcpy.h | 2 ++
+ lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 2 ++
@@ -22,4 +23,4 @@
-diff --git a/lib/eal/x86/include/rte_memcpy.h b/lib/eal/x86/include/rte_memcpy.h
-index 18aa4e43a7..b678b5c942 100644
---- a/lib/eal/x86/include/rte_memcpy.h
-+++ b/lib/eal/x86/include/rte_memcpy.h
+diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
+index 8c2e243d9e..0c3a2caa91 100644
+--- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
++++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h

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

* patch 'common/cpt: fix build with GCC 12' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (53 preceding siblings ...)
  2022-07-07  7:54 ` patch 'eal/x86: drop export of internal alignment macro' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'test/ipsec: " christian.ehrhardt
                   ` (30 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Ankur Dwivedi; +Cc: Anoob Joseph, Jerin Jacob, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ad09a49f195f405df7308d39298dd8f5c612461b Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Fri, 17 Jun 2022 19:09:29 +0530
Subject: [PATCH] common/cpt: fix build with GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 3aa16821ab3e0a21052880fbf4dcb76801380c31 ]

The following warning is observed with GCC 12 compilation:

In function ‘fill_sg_comp_from_iov’,
    inlined from ‘cpt_zuc_snow3g_enc_prep’ at
        ../drivers/common/cpt/cpt_ucode.h:1672:9,
    inlined from ‘cpt_fc_enc_hmac_prep’ at
        ../drivers/common/cpt/cpt_ucode.h:2472:3,
    inlined from ‘fill_digest_params’ at
        ../drivers/common/cpt/cpt_ucode.h:3548:14,
    inlined from ‘otx_cpt_enq_single_sym’ at
        ../drivers/crypto/octeontx/otx_cryptodev_ops.c:541:9,
    inlined from ‘otx_cpt_enq_single_sym_sessless’ at
        ../drivers/crypto/octeontx/otx_cryptodev_ops.c:584:8,
    inlined from ‘otx_cpt_enq_single’ at
        ../drivers/crypto/octeontx/otx_cryptodev_ops.c:611:11,
    inlined from ‘otx_cpt_pkt_enqueue’ at
        ../drivers/crypto/octeontx/otx_cryptodev_ops.c:643:9,
    inlined from ‘otx_cpt_enqueue_sym’ at
        ../drivers/crypto/octeontx/otx_cryptodev_ops.c:668:9:
../drivers/common/cpt/cpt_ucode.h:415:36: warning: array subscript 0 is
outside array bounds of ‘buf_ptr_t[0]’ {aka ‘struct buf_ptr[]’}
[-Warray-bounds]
  415 |                         e_dma_addr = bufs[j].dma_addr;
      |                         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../drivers/common/cpt/cpt_ucode.h:416:48: warning: array subscript 0 is
outside array bounds of ‘buf_ptr_t[0]’ {aka ‘struct buf_ptr[]’}
[-Warray-bounds]
  416 |                         e_len = (size > bufs[j].size) ?
      |                                         ~~~~~~~^~~~~

This patch resolves the warning.

Bugzilla ID: 861
Fixes: 9be415daf469 ("common/cpt: add common defines for microcode")
Fixes: b74652f3a91f ("common/cpt: add microcode interface for encryption")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: David Marchand <david.marchand@redhat.com>
---
 drivers/common/cpt/cpt_mcode_defines.h |  2 +-
 drivers/common/cpt/cpt_ucode.h         | 21 ++++++++++-----------
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/common/cpt/cpt_mcode_defines.h b/drivers/common/cpt/cpt_mcode_defines.h
index f356e62811..305cb2fa33 100644
--- a/drivers/common/cpt/cpt_mcode_defines.h
+++ b/drivers/common/cpt/cpt_mcode_defines.h
@@ -348,7 +348,7 @@ typedef struct buf_ptr {
 /* IOV Pointer */
 typedef struct{
 	int buf_cnt;
-	buf_ptr_t bufs[0];
+	buf_ptr_t bufs[];
 } iov_ptr_t;
 
 typedef union opcode_info {
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 4d06625d4c..f634546823 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -378,27 +378,26 @@ fill_sg_comp_from_iov(sg_comp_t *list,
 	int32_t j;
 	uint32_t extra_len = extra_buf ? extra_buf->size : 0;
 	uint32_t size = *psize;
-	buf_ptr_t *bufs;
 
-	bufs = from->bufs;
 	for (j = 0; (j < from->buf_cnt) && size; j++) {
+		phys_addr_t dma_addr = from->bufs[j].dma_addr;
+		uint32_t buf_sz = from->bufs[j].size;
+		sg_comp_t *to = &list[i >> 2];
 		phys_addr_t e_dma_addr;
 		uint32_t e_len;
-		sg_comp_t *to = &list[i >> 2];
 
 		if (unlikely(from_offset)) {
-			if (from_offset >= bufs[j].size) {
-				from_offset -= bufs[j].size;
+			if (from_offset >= buf_sz) {
+				from_offset -= buf_sz;
 				continue;
 			}
-			e_dma_addr = bufs[j].dma_addr + from_offset;
-			e_len = (size > (bufs[j].size - from_offset)) ?
-				(bufs[j].size - from_offset) : size;
+			e_dma_addr = dma_addr + from_offset;
+			e_len = (size > (buf_sz - from_offset)) ?
+				(buf_sz - from_offset) : size;
 			from_offset = 0;
 		} else {
-			e_dma_addr = bufs[j].dma_addr;
-			e_len = (size > bufs[j].size) ?
-				bufs[j].size : size;
+			e_dma_addr = dma_addr;
+			e_len = (size > buf_sz) ? buf_sz : size;
 		}
 
 		to->u.s.len[i % 4] = rte_cpu_to_be_16(e_len);
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.516369142 +0200
+++ 0056-common-cpt-fix-build-with-GCC-12.patch	2022-07-07 09:54:10.949824519 +0200
@@ -1 +1 @@
-From 3aa16821ab3e0a21052880fbf4dcb76801380c31 Mon Sep 17 00:00:00 2001
+From ad09a49f195f405df7308d39298dd8f5c612461b Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 3aa16821ab3e0a21052880fbf4dcb76801380c31 ]
+
@@ -44 +45,0 @@
-Cc: stable@dpdk.org
@@ -56 +57 @@
-index f16ee44297..e6dcb7674c 100644
+index f356e62811..305cb2fa33 100644
@@ -59 +60 @@
-@@ -387,7 +387,7 @@ typedef struct buf_ptr {
+@@ -348,7 +348,7 @@ typedef struct buf_ptr {
@@ -67 +68 @@
- typedef struct fc_params {
+ typedef union opcode_info {
@@ -69 +70 @@
-index e1f2f6005d..22aabab6ac 100644
+index 4d06625d4c..f634546823 100644
@@ -72 +73 @@
-@@ -394,27 +394,26 @@ fill_sg_comp_from_iov(sg_comp_t *list,
+@@ -378,27 +378,26 @@ fill_sg_comp_from_iov(sg_comp_t *list,

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

* patch 'test/ipsec: fix build with GCC 12' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (54 preceding siblings ...)
  2022-07-07  7:54 ` patch 'common/cpt: fix build with GCC 12' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'crypto/scheduler: fix queue pair in scheduler failover' " christian.ehrhardt
                   ` (29 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 0d5d346bef5d2b971c6959738828729850e933e4 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 16 Jun 2022 11:33:20 +0200
Subject: [PATCH] test/ipsec: fix build with GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 6e108b6a7c0c0699e6304f7b5706736b34d32607 ]

GCC 12 raises the following warning:

In function ‘_mm256_loadu_si256’,
    inlined from ‘rte_mov32’ at
        ../lib/eal/x86/include/rte_memcpy.h:319:9,
    inlined from ‘rte_mov128’ at
        ../lib/eal/x86/include/rte_memcpy.h:344:2,
    inlined from ‘rte_memcpy_generic’ at
        ../lib/eal/x86/include/rte_memcpy.h:438:4,
    inlined from ‘rte_memcpy’ at
        ../lib/eal/x86/include/rte_memcpy.h:882:10,
    inlined from ‘setup_test_string.constprop’ at
        ../app/test/test_ipsec.c:572:4:
/usr/lib/gcc/x86_64-redhat-linux/12/include/avxintrin.h:929:10: error:
    array subscript ‘__m256i_u[3]’ is partly outside array bounds of
    ‘const char[108]’ [-Werror=array-bounds]
  929 |   return *__P;
      |          ^~~~
../app/test/test_ipsec.c: In function ‘setup_test_string.constprop’:
../app/test/test_ipsec.c:539:12: note: at offset 96 into object
    ‘null_plain_data’ of size 108
  539 | const char null_plain_data[] =
      |            ^~~~~~~~~~~~~~~

Add a hint so that the compiler understands the copied data is within
the passed string boundaries.

Bugzilla ID: 848
Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_ipsec.c | 35 ++++++++++++++++++++++-------------
 1 file changed, 22 insertions(+), 13 deletions(-)

diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index aa6d6db308..65924b0572 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -544,12 +544,14 @@ struct rte_ipv4_hdr ipv4_outer  = {
 };
 
 static struct rte_mbuf *
-setup_test_string(struct rte_mempool *mpool,
-		const char *string, size_t len, uint8_t blocksize)
+setup_test_string(struct rte_mempool *mpool, const char *string,
+	size_t string_len, size_t len, uint8_t blocksize)
 {
 	struct rte_mbuf *m = rte_pktmbuf_alloc(mpool);
 	size_t t_len = len - (blocksize ? (len % blocksize) : 0);
 
+	RTE_VERIFY(len <= string_len);
+
 	if (m) {
 		memset(m->buf_addr, 0, m->buf_len);
 		char *dst = rte_pktmbuf_append(m, t_len);
@@ -1354,7 +1356,8 @@ test_ipsec_crypto_outb_burst_null_null(int i)
 	/* Generate input mbuf data */
 	for (j = 0; j < num_pkts && rc == 0; j++) {
 		ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool,
-			null_plain_data, test_cfg[i].pkt_sz, 0);
+			null_plain_data, sizeof(null_plain_data),
+			test_cfg[i].pkt_sz, 0);
 		if (ut_params->ibuf[j] == NULL)
 			rc = TEST_FAILED;
 		else {
@@ -1472,7 +1475,8 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i)
 			/* Generate test mbuf data */
 			ut_params->obuf[j] = setup_test_string(
 				ts_params->mbuf_pool,
-				null_plain_data, test_cfg[i].pkt_sz, 0);
+				null_plain_data, sizeof(null_plain_data),
+				test_cfg[i].pkt_sz, 0);
 			if (ut_params->obuf[j] == NULL)
 				rc = TEST_FAILED;
 		}
@@ -1540,16 +1544,17 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
 
 	/* Generate inbound mbuf data */
 	for (j = 0; j < num_pkts && rc == 0; j++) {
-		ut_params->ibuf[j] = setup_test_string(
-			ts_params->mbuf_pool,
-			null_plain_data, test_cfg[i].pkt_sz, 0);
+		ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool,
+			null_plain_data, sizeof(null_plain_data),
+			test_cfg[i].pkt_sz, 0);
 		if (ut_params->ibuf[j] == NULL)
 			rc = TEST_FAILED;
 		else {
 			/* Generate test mbuf data */
 			ut_params->obuf[j] = setup_test_string(
 				ts_params->mbuf_pool,
-				null_plain_data, test_cfg[i].pkt_sz, 0);
+				null_plain_data, sizeof(null_plain_data),
+				test_cfg[i].pkt_sz, 0);
 			if (ut_params->obuf[j] == NULL)
 				rc = TEST_FAILED;
 		}
@@ -1649,7 +1654,8 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i)
 	/* Generate test mbuf data */
 	for (j = 0; j < num_pkts && rc == 0; j++) {
 		ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool,
-			null_plain_data, test_cfg[i].pkt_sz, 0);
+			null_plain_data, sizeof(null_plain_data),
+			test_cfg[i].pkt_sz, 0);
 		if (ut_params->ibuf[0] == NULL)
 			rc = TEST_FAILED;
 
@@ -1727,15 +1733,17 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
 	/* Generate test mbuf data */
 	for (j = 0; j < num_pkts && rc == 0; j++) {
 		ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool,
-			null_plain_data, test_cfg[i].pkt_sz, 0);
+			null_plain_data, sizeof(null_plain_data),
+			test_cfg[i].pkt_sz, 0);
 		if (ut_params->ibuf[0] == NULL)
 			rc = TEST_FAILED;
 
 		if (rc == 0) {
 			/* Generate test tunneled mbuf data for comparison */
 			ut_params->obuf[j] = setup_test_string(
-					ts_params->mbuf_pool,
-					null_plain_data, test_cfg[i].pkt_sz, 0);
+				ts_params->mbuf_pool, null_plain_data,
+				sizeof(null_plain_data), test_cfg[i].pkt_sz,
+				0);
 			if (ut_params->obuf[j] == NULL)
 				rc = TEST_FAILED;
 		}
@@ -1804,7 +1812,8 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)
 	for (j = 0; j < num_pkts && rc == 0; j++) {
 		/* packet with sequence number 0 is invalid */
 		ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool,
-			null_encrypted_data, test_cfg[i].pkt_sz, 0);
+			null_encrypted_data, sizeof(null_encrypted_data),
+			test_cfg[i].pkt_sz, 0);
 		if (ut_params->ibuf[j] == NULL)
 			rc = TEST_FAILED;
 	}
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.558870446 +0200
+++ 0057-test-ipsec-fix-build-with-GCC-12.patch	2022-07-07 09:54:10.953824544 +0200
@@ -1 +1 @@
-From 6e108b6a7c0c0699e6304f7b5706736b34d32607 Mon Sep 17 00:00:00 2001
+From 0d5d346bef5d2b971c6959738828729850e933e4 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 6e108b6a7c0c0699e6304f7b5706736b34d32607 ]
+
@@ -38 +39,0 @@
-Cc: stable@dpdk.org
@@ -46 +47 @@
-index 8da025bf66..7047e17960 100644
+index aa6d6db308..65924b0572 100644
@@ -49 +50 @@
-@@ -554,12 +554,14 @@ struct rte_ipv4_hdr ipv4_outer  = {
+@@ -544,12 +544,14 @@ struct rte_ipv4_hdr ipv4_outer  = {
@@ -66 +67 @@
-@@ -1365,7 +1367,8 @@ test_ipsec_crypto_outb_burst_null_null(int i)
+@@ -1354,7 +1356,8 @@ test_ipsec_crypto_outb_burst_null_null(int i)
@@ -76 +77 @@
-@@ -1483,7 +1486,8 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i)
+@@ -1472,7 +1475,8 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i)
@@ -86 +87 @@
-@@ -1551,16 +1555,17 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
+@@ -1540,16 +1544,17 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
@@ -108 +109 @@
-@@ -1660,7 +1665,8 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i)
+@@ -1649,7 +1654,8 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i)
@@ -118 +119 @@
-@@ -1738,15 +1744,17 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
+@@ -1727,15 +1733,17 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
@@ -139 +140 @@
-@@ -1815,7 +1823,8 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)
+@@ -1804,7 +1812,8 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)

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

* patch 'crypto/scheduler: fix queue pair in scheduler failover' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (55 preceding siblings ...)
  2022-07-07  7:54 ` patch 'test/ipsec: " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'test/crypto: fix cipher offset for ZUC' " christian.ehrhardt
                   ` (28 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Jakub Wysocki; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ae21e9dac01ee87a672e5648811b108a8bdd32f6 Mon Sep 17 00:00:00 2001
From: Jakub Wysocki <jakubx.wysocki@intel.com>
Date: Wed, 15 Jun 2022 14:13:49 +0100
Subject: [PATCH] crypto/scheduler: fix queue pair in scheduler failover

[ upstream commit b302708673017b560644b954ed78ef6cdba1aa2d ]

This commit fixes wrong qp_id value in cryptodev scheduler in failover
mode.

Fixes: 37f075dad1e9 ("crypto/scheduler: add fail-over scheduling mode")

Signed-off-by: Jakub Wysocki <jakubx.wysocki@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/crypto/scheduler/scheduler_failover.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/crypto/scheduler/scheduler_failover.c b/drivers/crypto/scheduler/scheduler_failover.c
index 3a023b8ad3..b355fa04fd 100644
--- a/drivers/crypto/scheduler/scheduler_failover.c
+++ b/drivers/crypto/scheduler/scheduler_failover.c
@@ -156,6 +156,9 @@ scheduler_start(struct rte_cryptodev *dev)
 			((struct scheduler_qp_ctx *)
 				dev->data->queue_pairs[i])->private_qp_ctx;
 
+		sched_ctx->slaves[PRIMARY_SLAVE_IDX].qp_id = i;
+		sched_ctx->slaves[SECONDARY_SLAVE_IDX].qp_id = i;
+
 		rte_memcpy(&qp_ctx->primary_slave,
 				&sched_ctx->slaves[PRIMARY_SLAVE_IDX],
 				sizeof(struct scheduler_slave));
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.598545021 +0200
+++ 0058-crypto-scheduler-fix-queue-pair-in-scheduler-failove.patch	2022-07-07 09:54:10.953824544 +0200
@@ -1 +1 @@
-From b302708673017b560644b954ed78ef6cdba1aa2d Mon Sep 17 00:00:00 2001
+From ae21e9dac01ee87a672e5648811b108a8bdd32f6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b302708673017b560644b954ed78ef6cdba1aa2d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 5023577ef8..2a0e29fa72 100644
+index 3a023b8ad3..b355fa04fd 100644
@@ -22 +23 @@
-@@ -157,6 +157,9 @@ scheduler_start(struct rte_cryptodev *dev)
+@@ -156,6 +156,9 @@ scheduler_start(struct rte_cryptodev *dev)
@@ -26,2 +27,2 @@
-+		sched_ctx->workers[PRIMARY_WORKER_IDX].qp_id = i;
-+		sched_ctx->workers[SECONDARY_WORKER_IDX].qp_id = i;
++		sched_ctx->slaves[PRIMARY_SLAVE_IDX].qp_id = i;
++		sched_ctx->slaves[SECONDARY_SLAVE_IDX].qp_id = i;
@@ -29,3 +30,3 @@
- 		rte_memcpy(&qp_ctx->primary_worker,
- 				&sched_ctx->workers[PRIMARY_WORKER_IDX],
- 				sizeof(struct scheduler_worker));
+ 		rte_memcpy(&qp_ctx->primary_slave,
+ 				&sched_ctx->slaves[PRIMARY_SLAVE_IDX],
+ 				sizeof(struct scheduler_slave));

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

* patch 'test/crypto: fix cipher offset for ZUC' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (56 preceding siblings ...)
  2022-07-07  7:54 ` patch 'crypto/scheduler: fix queue pair in scheduler failover' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'eventdev/eth_tx: fix adapter creation' " christian.ehrhardt
                   ` (27 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Ciara Power; +Cc: Kai Ji, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From d0fff9500afbd5ad34b6624e96107ec3b313de6f Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Tue, 21 Jun 2022 11:41:32 +0000
Subject: [PATCH] test/crypto: fix cipher offset for ZUC

[ upstream commit 7a0f8fe76bd03dc8b61965040a66409996afa717 ]

The cipher offset in bits was not being used in ZUC encryption test
functions when creating the operation, it was hardcoded to 0.
This is fixed to use the offset from the test vector as intended.

Fixes: fd01a9be38d5 ("test/crypto: move IV to crypto op private data")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
---
 app/test/test_cryptodev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 7ecfe8fac0..580702d6e3 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -5455,7 +5455,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
 	retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
 					tdata->cipher_iv.len,
 					tdata->plaintext.len,
-					0);
+					tdata->validCipherOffsetInBits.len);
 	if (retval < 0)
 		return retval;
 
@@ -5542,7 +5542,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
 	/* Create ZUC operation */
 	retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
 			tdata->cipher_iv.len, tdata->plaintext.len,
-			0);
+			tdata->validCipherOffsetInBits.len);
 	if (retval < 0)
 		return retval;
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.635056752 +0200
+++ 0059-test-crypto-fix-cipher-offset-for-ZUC.patch	2022-07-07 09:54:10.965824617 +0200
@@ -1 +1 @@
-From 7a0f8fe76bd03dc8b61965040a66409996afa717 Mon Sep 17 00:00:00 2001
+From d0fff9500afbd5ad34b6624e96107ec3b313de6f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7a0f8fe76bd03dc8b61965040a66409996afa717 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 15df53a1f0..1cac76a64a 100644
+index 7ecfe8fac0..580702d6e3 100644
@@ -23 +24 @@
-@@ -6033,7 +6033,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
+@@ -5455,7 +5455,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
@@ -32 +33 @@
-@@ -6128,7 +6128,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
+@@ -5542,7 +5542,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)

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

* patch 'eventdev/eth_tx: fix adapter creation' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (57 preceding siblings ...)
  2022-07-07  7:54 ` patch 'test/crypto: fix cipher offset for ZUC' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/bonding: fix RSS inconsistency between ports' " christian.ehrhardt
                   ` (26 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Naga Harish K S V; +Cc: Jay Jayatheerthan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ad8183f3cb3b2c1e0a386f16a2305e3a209c9790 Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Date: Thu, 16 Jun 2022 10:44:58 +0530
Subject: [PATCH] eventdev/eth_tx: fix adapter creation

[ upstream commit 3d6e9dd493784d077b9a214a0937331fa05f8abf ]

During adapter create, memory is allocated for storing event port
configuration which is freed during adapter free. The following
error is seen during free "EAL: Error: Invalid memory"

The service data pointer storage for txa_service_data_array is
allocated during adapter create with incorrect size which is less
than the required size.
Initialization of this memory causes buffer overflow and result in
metadata overwrite of event port config memory allocated above
and results in the above error message during free.

Allocating the correct size of memory for txa_service_data_array
prevents overwriting other memory areas like event port config
memory.

Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
---
 lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
index 38bc79c51b..cab4bd0811 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -223,7 +223,7 @@ txa_service_data_init(void)
 	if (txa_service_data_array == NULL) {
 		txa_service_data_array =
 				txa_memzone_array_get("txa_service_data_array",
-					sizeof(int),
+					sizeof(*txa_service_data_array),
 					RTE_EVENT_ETH_TX_ADAPTER_MAX_INSTANCE);
 		if (txa_service_data_array == NULL)
 			return -ENOMEM;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.682328126 +0200
+++ 0060-eventdev-eth_tx-fix-adapter-creation.patch	2022-07-07 09:54:10.965824617 +0200
@@ -1 +1 @@
-From 3d6e9dd493784d077b9a214a0937331fa05f8abf Mon Sep 17 00:00:00 2001
+From ad8183f3cb3b2c1e0a386f16a2305e3a209c9790 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3d6e9dd493784d077b9a214a0937331fa05f8abf ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
- lib/eventdev/rte_event_eth_tx_adapter.c | 2 +-
+ lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +-
@@ -30,5 +31,5 @@
-diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
-index 1b304f0a73..c700fb7b1f 100644
---- a/lib/eventdev/rte_event_eth_tx_adapter.c
-+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
-@@ -224,7 +224,7 @@ txa_service_data_init(void)
+diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+index 38bc79c51b..cab4bd0811 100644
+--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+@@ -223,7 +223,7 @@ txa_service_data_init(void)

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

* patch 'net/bonding: fix RSS inconsistency between ports' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (58 preceding siblings ...)
  2022-07-07  7:54 ` patch 'eventdev/eth_tx: fix adapter creation' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'test/bonding: fix RSS test when disable RSS' " christian.ehrhardt
                   ` (25 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 4ca26f407dd7942c20aa9c63daf3673ad36d0c54 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 8 Jun 2022 19:45:47 +0800
Subject: [PATCH] net/bonding: fix RSS inconsistency between ports

[ upstream commit 9e0fb72c75cd03c40fc7cedc39d3a342f447b6ee ]

Currently, RSS configuration of slave is set only when RSS is enabled for
bonded port. If RSS is enabled for the slaves port before adding to the
bonded port with disabling RSS, it will run into that the RSS enabled state
of bonded and slaves port is inconsistent after starting bonded port.
So the RSS configuration of slave should also be set when RSS is disabled
for bonded port.

Fixes: 734ce47f71e0 ("bonding: support RSS dynamic configuration")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 812bfb8bd3..2623650375 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1712,6 +1712,12 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
 				bonded_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf;
 		slave_eth_dev->data->dev_conf.rxmode.mq_mode =
 				bonded_eth_dev->data->dev_conf.rxmode.mq_mode;
+	} else {
+		slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len = 0;
+		slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key = NULL;
+		slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf = 0;
+		slave_eth_dev->data->dev_conf.rxmode.mq_mode =
+				bonded_eth_dev->data->dev_conf.rxmode.mq_mode;
 	}
 
 	if (bonded_eth_dev->data->dev_conf.rxmode.offloads &
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.713155438 +0200
+++ 0061-net-bonding-fix-RSS-inconsistency-between-ports.patch	2022-07-07 09:54:10.969824641 +0200
@@ -1 +1 @@
-From 9e0fb72c75cd03c40fc7cedc39d3a342f447b6ee Mon Sep 17 00:00:00 2001
+From 4ca26f407dd7942c20aa9c63daf3673ad36d0c54 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9e0fb72c75cd03c40fc7cedc39d3a342f447b6ee ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index ace8f8b45e..73e6972035 100644
+index 812bfb8bd3..2623650375 100644
@@ -27 +28 @@
-@@ -1707,6 +1707,12 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
+@@ -1712,6 +1712,12 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
@@ -39 +40 @@
- 	slave_eth_dev->data->dev_conf.rxmode.mtu =
+ 	if (bonded_eth_dev->data->dev_conf.rxmode.offloads &

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

* patch 'test/bonding: fix RSS test when disable RSS' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (59 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/bonding: fix RSS inconsistency between ports' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/hns3: remove duplicate definition' " christian.ehrhardt
                   ` (24 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 530bf55366b6aa2859154add679fd01955280d02 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 8 Jun 2022 19:45:48 +0800
Subject: [PATCH] test/bonding: fix RSS test when disable RSS

[ upstream commit 6496922368fe03be9ab4137f2d615dba1a766f39 ]

The "test_rss_lazy" test is used for testing bonding RSS functions
when bonded port disable RSS. Currently, this test case can update
RSS functions of bonded and slave port if bonded port turns off RSS.
It is unreasonable and has been adjusted to be non-updateable in
following patch:
"93e1ea6dfa99 ethdev: fix RSS update when RSS is disabled"

So this patch fixes this test code.

Fixes: 43b630244e7e ("app/test: add dynamic bonding RSS configuration")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 app/test/test_link_bonding_rssconf.c | 78 ++++++++++++++++++++++++++--
 1 file changed, 73 insertions(+), 5 deletions(-)

diff --git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c
index 1a9571e5c6..32391e7ad7 100644
--- a/app/test/test_link_bonding_rssconf.c
+++ b/app/test/test_link_bonding_rssconf.c
@@ -465,15 +465,85 @@ test_rss(void)
 
 	TEST_ASSERT_SUCCESS(test_propagate(), "Propagation test failed");
 
-	TEST_ASSERT(slave_remove_and_add() == 1, "New slave should be synced");
+	TEST_ASSERT(slave_remove_and_add() == 1, "remove and add slaves success.");
 
 	remove_slaves_and_stop_bonded_device();
 
 	return TEST_SUCCESS;
 }
 
+
+/**
+ * Test RSS configuration over bonded and slaves.
+ */
+static int
+test_rss_config_lazy(void)
+{
+	struct rte_eth_rss_conf bond_rss_conf = {0};
+	struct slave_conf *port;
+	uint8_t rss_key[40];
+	uint64_t rss_hf;
+	int retval;
+	uint16_t i;
+	uint8_t n;
+
+	retval = rte_eth_dev_info_get(test_params.bond_port_id,
+				      &test_params.bond_dev_info);
+	TEST_ASSERT((retval == 0), "Error during getting device (port %u) info: %s\n",
+		    test_params.bond_port_id, strerror(-retval));
+
+	rss_hf = test_params.bond_dev_info.flow_type_rss_offloads;
+	if (rss_hf != 0) {
+		bond_rss_conf.rss_key = NULL;
+		bond_rss_conf.rss_hf = rss_hf;
+		retval = rte_eth_dev_rss_hash_update(test_params.bond_port_id,
+						     &bond_rss_conf);
+		TEST_ASSERT(retval != 0, "Succeeded in setting bonded port hash function");
+	}
+
+	/* Set all keys to zero for all slaves */
+	FOR_EACH_PORT(n, port) {
+		port = &test_params.slave_ports[n];
+		retval = rte_eth_dev_rss_hash_conf_get(port->port_id,
+						       &port->rss_conf);
+		TEST_ASSERT_SUCCESS(retval, "Cannot get slaves RSS configuration");
+		memset(port->rss_key, 0, sizeof(port->rss_key));
+		port->rss_conf.rss_key = port->rss_key;
+		port->rss_conf.rss_key_len = sizeof(port->rss_key);
+		retval = rte_eth_dev_rss_hash_update(port->port_id,
+						     &port->rss_conf);
+		TEST_ASSERT(retval != 0, "Succeeded in setting slaves RSS keys");
+	}
+
+	/* Set RSS keys for bonded port */
+	memset(rss_key, 1, sizeof(rss_key));
+	bond_rss_conf.rss_hf = rss_hf;
+	bond_rss_conf.rss_key = rss_key;
+	bond_rss_conf.rss_key_len = sizeof(rss_key);
+
+	retval = rte_eth_dev_rss_hash_update(test_params.bond_port_id,
+					     &bond_rss_conf);
+	TEST_ASSERT(retval != 0, "Succeeded in setting bonded port RSS keys");
+
+	/*  Test RETA propagation */
+	for (i = 0; i < RXTX_QUEUE_COUNT; i++) {
+		FOR_EACH_PORT(n, port) {
+			port = &test_params.slave_ports[n];
+			retval = reta_set(port->port_id, (i + 1) % RXTX_QUEUE_COUNT,
+					  port->dev_info.reta_size);
+			TEST_ASSERT(retval != 0, "Succeeded in setting slaves RETA");
+		}
+
+		retval = reta_set(test_params.bond_port_id, i % RXTX_QUEUE_COUNT,
+				  test_params.bond_dev_info.reta_size);
+		TEST_ASSERT(retval != 0, "Succeeded in setting bonded port RETA");
+	}
+
+	return TEST_SUCCESS;
+}
+
 /**
- * Test propagation logic, when RX_RSS mq_mode is turned off for bonding port
+ * Test RSS function logic, when RX_RSS mq_mode is turned off for bonding port
  */
 static int
 test_rss_lazy(void)
@@ -494,9 +564,7 @@ test_rss_lazy(void)
 	TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params.bond_port_id),
 			"Failed to start bonding port (%d).", test_params.bond_port_id);
 
-	TEST_ASSERT_SUCCESS(test_propagate(), "Propagation test failed");
-
-	TEST_ASSERT(slave_remove_and_add() == 0, "New slave shouldn't be synced");
+	TEST_ASSERT_SUCCESS(test_rss_config_lazy(), "Succeeded in setting RSS hash when RX_RSS mq_mode is turned off");
 
 	remove_slaves_and_stop_bonded_device();
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.751841826 +0200
+++ 0062-test-bonding-fix-RSS-test-when-disable-RSS.patch	2022-07-07 09:54:10.969824641 +0200
@@ -1 +1 @@
-From 6496922368fe03be9ab4137f2d615dba1a766f39 Mon Sep 17 00:00:00 2001
+From 530bf55366b6aa2859154add679fd01955280d02 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6496922368fe03be9ab4137f2d615dba1a766f39 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 7228965ced..b3d71c6f3a 100644
+index 1a9571e5c6..32391e7ad7 100644
@@ -28 +29 @@
-@@ -468,15 +468,85 @@ test_rss(void)
+@@ -465,15 +465,85 @@ test_rss(void)
@@ -116 +117 @@
-@@ -497,9 +567,7 @@ test_rss_lazy(void)
+@@ -494,9 +564,7 @@ test_rss_lazy(void)

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

* patch 'net/hns3: remove duplicate definition' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (60 preceding siblings ...)
  2022-07-07  7:54 ` patch 'test/bonding: fix RSS test when disable RSS' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:54 ` patch 'net/nfp: fix initialization' " christian.ehrhardt
                   ` (23 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From bde6cacb5a1a30486809697100ed5cd55a6af9fd Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 1 Jun 2022 11:52:45 +0800
Subject: [PATCH] net/hns3: remove duplicate definition

[ upstream commit d7050da870a9d259a6422e253d54fa552cbfa7c8 ]

The default hash key array is defined twice. Remove the extra one.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 9 ---------
 drivers/net/hns3/hns3_rss.c  | 6 ++----
 drivers/net/hns3/hns3_rss.h  | 2 ++
 3 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index a3bc037062..7ac6e06e7b 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -11,15 +11,6 @@
 #include "hns3_ethdev.h"
 #include "hns3_logs.h"
 
-/* Default default keys */
-static uint8_t hns3_hash_key[] = {
-	0x6D, 0x5A, 0x56, 0xDA, 0x25, 0x5B, 0x0E, 0xC2,
-	0x41, 0x67, 0x25, 0x3D, 0x43, 0xA3, 0x8F, 0xB0,
-	0xD0, 0xCA, 0x2B, 0xCB, 0xAE, 0x7B, 0x30, 0xB4,
-	0x77, 0xCB, 0x2D, 0xA3, 0x80, 0x30, 0xF2, 0x0C,
-	0x6A, 0x42, 0xB7, 0x3B, 0xBE, 0xAC, 0x01, 0xFA
-};
-
 static const uint8_t full_mask[VNI_OR_TNI_LEN] = { 0xFF, 0xFF, 0xFF };
 static const uint8_t zero_mask[VNI_OR_TNI_LEN] = { 0x00, 0x00, 0x00 };
 
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 7aa57f054c..5b747a01ec 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -12,10 +12,8 @@
 #include "hns3_ethdev.h"
 #include "hns3_logs.h"
 
-/*
- * The hash key used for rss initialization.
- */
-static const uint8_t hns3_hash_key[] = {
+/* Default hash keys */
+const uint8_t hns3_hash_key[] = {
 	0x6D, 0x5A, 0x56, 0xDA, 0x25, 0x5B, 0x0E, 0xC2,
 	0x41, 0x67, 0x25, 0x3D, 0x43, 0xA3, 0x8F, 0xB0,
 	0xD0, 0xCA, 0x2B, 0xCB, 0xAE, 0x7B, 0x30, 0xB4,
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index a03e7df6bb..920abb3f31 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -100,6 +100,8 @@ static inline uint32_t roundup_pow_of_two(uint32_t x)
 	return 1UL << fls(x - 1);
 }
 
+extern const uint8_t hns3_hash_key[];
+
 struct hns3_adapter;
 
 int hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.787369668 +0200
+++ 0063-net-hns3-remove-duplicate-definition.patch	2022-07-07 09:54:10.973824666 +0200
@@ -1 +1 @@
-From d7050da870a9d259a6422e253d54fa552cbfa7c8 Mon Sep 17 00:00:00 2001
+From bde6cacb5a1a30486809697100ed5cd55a6af9fd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d7050da870a9d259a6422e253d54fa552cbfa7c8 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 86ebbf69b6..ca9edc5244 100644
+index a3bc037062..7ac6e06e7b 100644
@@ -23 +24,2 @@
-@@ -10,15 +10,6 @@
+@@ -11,15 +11,6 @@
+ #include "hns3_ethdev.h"
@@ -25 +26,0 @@
- #include "hns3_flow.h"
@@ -40 +41 @@
-index 4c546c9363..1003daf03e 100644
+index 7aa57f054c..5b747a01ec 100644
@@ -43 +44 @@
-@@ -9,10 +9,8 @@
+@@ -12,10 +12,8 @@
@@ -57 +58 @@
-index 55d5718ffc..56627cbd4c 100644
+index a03e7df6bb..920abb3f31 100644
@@ -60 +61 @@
-@@ -88,6 +88,8 @@ static inline uint32_t roundup_pow_of_two(uint32_t x)
+@@ -100,6 +100,8 @@ static inline uint32_t roundup_pow_of_two(uint32_t x)

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

* patch 'net/nfp: fix initialization' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (61 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/hns3: remove duplicate definition' " christian.ehrhardt
@ 2022-07-07  7:54 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'app/testpmd: revert MAC update in checksum forwarding' " christian.ehrhardt
                   ` (22 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:54 UTC (permalink / raw)
  To: Peng Zhang; +Cc: Chaoyong He, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5b7455b8fa07f64c4e7eb306bfcf318fecc81c60 Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Wed, 15 Jun 2022 12:14:17 +0200
Subject: [PATCH] net/nfp: fix initialization

[ upstream commit 5c305e218f15552d828e10293d19d9a06c4747f4 ]

When the testpmd start-up, it will check MTU range,
if MTU > flubfsz, it will lead testpmd start fail.
Because the hw->flbufsz doesn't have the initialized
value, so it will lead the bug.

Fixes: 417be15e5f11 ("net/nfp: make sure MTU is never larger than mbuf size")

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/nfp_net.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 978920f52e..46e1872927 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2919,6 +2919,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	hw->cap = nn_cfg_readl(hw, NFP_NET_CFG_CAP);
 	hw->max_mtu = nn_cfg_readl(hw, NFP_NET_CFG_MAX_MTU);
 	hw->mtu = RTE_ETHER_MTU;
+	hw->flbufsz = RTE_ETHER_MTU;
 
 	/* VLAN insertion is incompatible with LSOv2 */
 	if (hw->cap & NFP_NET_CFG_CTRL_LSO2)
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.826381455 +0200
+++ 0064-net-nfp-fix-initialization.patch	2022-07-07 09:54:10.973824666 +0200
@@ -1 +1 @@
-From 5c305e218f15552d828e10293d19d9a06c4747f4 Mon Sep 17 00:00:00 2001
+From 5b7455b8fa07f64c4e7eb306bfcf318fecc81c60 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5c305e218f15552d828e10293d19d9a06c4747f4 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,3 +18,2 @@
- drivers/net/nfp/nfp_ethdev.c    | 1 +
- drivers/net/nfp/nfp_ethdev_vf.c | 1 +
- 2 files changed, 2 insertions(+)
+ drivers/net/nfp/nfp_net.c | 1 +
+ 1 file changed, 1 insertion(+)
@@ -21,17 +21,5 @@
-diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
-index 7b8949ab2c..30039462f7 100644
---- a/drivers/net/nfp/nfp_ethdev.c
-+++ b/drivers/net/nfp/nfp_ethdev.c
-@@ -516,6 +516,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
- 	hw->cap = nn_cfg_readl(hw, NFP_NET_CFG_CAP);
- 	hw->max_mtu = nn_cfg_readl(hw, NFP_NET_CFG_MAX_MTU);
- 	hw->mtu = RTE_ETHER_MTU;
-+	hw->flbufsz = RTE_ETHER_MTU;
- 
- 	/* VLAN insertion is incompatible with LSOv2 */
- 	if (hw->cap & NFP_NET_CFG_CTRL_LSO2)
-diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c
-index bddb1ecedd..b666428a05 100644
---- a/drivers/net/nfp/nfp_ethdev_vf.c
-+++ b/drivers/net/nfp/nfp_ethdev_vf.c
-@@ -395,6 +395,7 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
+diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
+index 978920f52e..46e1872927 100644
+--- a/drivers/net/nfp/nfp_net.c
++++ b/drivers/net/nfp/nfp_net.c
+@@ -2919,6 +2919,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)

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

* patch 'app/testpmd: revert MAC update in checksum forwarding' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (62 preceding siblings ...)
  2022-07-07  7:54 ` patch 'net/nfp: fix initialization' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'vhost: fix missing enqueue pseudo-header calculation' " christian.ehrhardt
                   ` (21 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, Aman Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From faaab06d1120655e4dedc29645271f52f338eca1 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 8 Jun 2022 14:49:41 +0200
Subject: [PATCH] app/testpmd: revert MAC update in checksum forwarding

[ upstream commit 9b4ea7ae77faa8f8aba8c7510c821f75d7863b16 ]

This patch reverts
commit 10f4620f02e1 ("app/testpmd: modify mac in csum forwarding"),
as the checksum forwarding is expected to only perform
checksum and not also overwrites the source and destination MAC addresses.

Doing so, we can test checksum offloading with real traffic
without breaking broadcast packets.

Fixes: 10f4620f02e1 ("app/testpmd: modify mac in csum forwarding")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
 app/test-pmd/csumonly.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index ed18843d09..35beb2a954 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -846,10 +846,6 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
 		 * and inner headers */
 
 		eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
-		rte_ether_addr_copy(&peer_eth_addrs[fs->peer_addr],
-				&eth_hdr->d_addr);
-		rte_ether_addr_copy(&ports[fs->tx_port].eth_addr,
-				&eth_hdr->s_addr);
 		parse_ethernet(eth_hdr, &info);
 		l3_hdr = (char *)eth_hdr + info.l2_len;
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.862686338 +0200
+++ 0065-app-testpmd-revert-MAC-update-in-checksum-forwarding.patch	2022-07-07 09:54:10.977824691 +0200
@@ -1 +1 @@
-From 9b4ea7ae77faa8f8aba8c7510c821f75d7863b16 Mon Sep 17 00:00:00 2001
+From faaab06d1120655e4dedc29645271f52f338eca1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9b4ea7ae77faa8f8aba8c7510c821f75d7863b16 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 7df201e047..1a3fd9ce8a 100644
+index ed18843d09..35beb2a954 100644
@@ -28 +29 @@
-@@ -916,10 +916,6 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
+@@ -846,10 +846,6 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
@@ -33 +34 @@
--				&eth_hdr->dst_addr);
+-				&eth_hdr->d_addr);
@@ -35 +36 @@
--				&eth_hdr->src_addr);
+-				&eth_hdr->s_addr);

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

* patch 'vhost: fix missing enqueue pseudo-header calculation' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (63 preceding siblings ...)
  2022-07-07  7:55 ` patch 'app/testpmd: revert MAC update in checksum forwarding' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'vhost/crypto: fix build with GCC 12' " christian.ehrhardt
                   ` (20 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From bf77b580a98ac6975ea69b7878e0bf8ac6e421a6 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 8 Jun 2022 14:49:42 +0200
Subject: [PATCH] vhost: fix missing enqueue pseudo-header calculation

[ upstream commit 7316b4fd610fe945a0bc20054ba5ab61b98bb155 ]

The Virtio specification requires that in case of checksum
offloading, the pseudo-header checksum must be set in the
L4 header.

When received from another Vhost-user port, the packet
checksum might already contain the pseudo-header checksum
but we have no way to know it. So we have no other choice
than doing the pseudo-header checksum systematically.

This patch handles this using the rte_net_intel_cksum_prepare()
helper.

Fixes: 859b480d5afd ("vhost: add guest offload setting")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/virtio_net.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 62b7bbda96..ae4e54a442 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -8,6 +8,7 @@
 
 #include <rte_mbuf.h>
 #include <rte_memcpy.h>
+#include <rte_net.h>
 #include <rte_ether.h>
 #include <rte_ip.h>
 #include <rte_vhost.h>
@@ -402,6 +403,16 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
 		csum_l4 |= PKT_TX_TCP_CKSUM;
 
 	if (csum_l4) {
+		/*
+		 * Pseudo-header checksum must be set as per Virtio spec.
+		 *
+		 * Note: We don't propagate rte_net_intel_cksum_prepare()
+		 * errors, as it would have an impact on performance, and an
+		 * error would mean the packet is dropped by the guest instead
+		 * of being dropped here.
+		 */
+		rte_net_intel_cksum_prepare(m_buf);
+
 		net_hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
 		net_hdr->csum_start = m_buf->l2_len + m_buf->l3_len;
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.896445577 +0200
+++ 0066-vhost-fix-missing-enqueue-pseudo-header-calculation.patch	2022-07-07 09:54:10.977824691 +0200
@@ -1 +1 @@
-From 7316b4fd610fe945a0bc20054ba5ab61b98bb155 Mon Sep 17 00:00:00 2001
+From bf77b580a98ac6975ea69b7878e0bf8ac6e421a6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7316b4fd610fe945a0bc20054ba5ab61b98bb155 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -24,2 +25,2 @@
- lib/vhost/virtio_net.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
+ lib/librte_vhost/virtio_net.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
@@ -27,6 +28,14 @@
-diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
-index 68a26eb17d..ce22e3ac79 100644
---- a/lib/vhost/virtio_net.c
-+++ b/lib/vhost/virtio_net.c
-@@ -596,6 +596,16 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
- 		csum_l4 |= RTE_MBUF_F_TX_TCP_CKSUM;
+diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
+index 62b7bbda96..ae4e54a442 100644
+--- a/lib/librte_vhost/virtio_net.c
++++ b/lib/librte_vhost/virtio_net.c
+@@ -8,6 +8,7 @@
+ 
+ #include <rte_mbuf.h>
+ #include <rte_memcpy.h>
++#include <rte_net.h>
+ #include <rte_ether.h>
+ #include <rte_ip.h>
+ #include <rte_vhost.h>
+@@ -402,6 +403,16 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
+ 		csum_l4 |= PKT_TX_TCP_CKSUM;

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

* patch 'vhost/crypto: fix build with GCC 12' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (64 preceding siblings ...)
  2022-07-07  7:55 ` patch 'vhost: fix missing enqueue pseudo-header calculation' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'vhost/crypto: fix descriptor processing' " christian.ehrhardt
                   ` (19 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: David Marchand; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 9a6f9e34878ae119598c794061f7988215b51732 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 16 Jun 2022 16:46:50 +0200
Subject: [PATCH] vhost/crypto: fix build with GCC 12
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 4414bb67010dfec2559af52efe8f479b26d55447 ]

GCC 12 raises the following warning:

In file included from ../lib/mempool/rte_mempool.h:46,
                 from ../lib/mbuf/rte_mbuf.h:38,
                 from ../lib/vhost/vhost_crypto.c:7:
../lib/vhost/vhost_crypto.c: In function ‘rte_vhost_crypto_fetch_requests’:
../lib/eal/x86/include/rte_memcpy.h:371:9: warning: array subscript 1 is
     outside array bounds of ‘struct virtio_crypto_op_data_req[1]’
     [-Warray-bounds]
  371 | rte_mov32((uint8_t *)dst + 3 * 32, (const uint8_t *)src + 3 * 32);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/vhost/vhost_crypto.c:1178:42: note: while referencing ‘req’
 1178 |         struct virtio_crypto_op_data_req req;
      |                                          ^~~

Split this function and separate the per descriptor copy.
This makes the code clearer, and the compiler happier.

Note: logs for errors have been moved to callers to avoid duplicates.

Fixes: 3c79609fda7c ("vhost/crypto: handle virtually non-contiguous buffers")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_crypto.c | 123 ++++++++++++--------------------
 1 file changed, 46 insertions(+), 77 deletions(-)

diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index 0439b12bc7..b8bdfe4bc7 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -566,94 +566,58 @@ get_data_ptr(struct vhost_crypto_data_req *vc_req,
 	return data;
 }
 
-static __rte_always_inline int
-copy_data(void *dst_data, struct vhost_crypto_data_req *vc_req,
-		struct vhost_crypto_desc *head,
-		struct vhost_crypto_desc **cur_desc,
-		uint32_t size, uint32_t max_n_descs)
+static __rte_always_inline uint32_t
+copy_data_from_desc(void *dst, struct vhost_crypto_data_req *vc_req,
+	struct vhost_crypto_desc *desc, uint32_t size)
 {
-	struct vhost_crypto_desc *desc = *cur_desc;
-	uint64_t remain, addr, dlen, len;
-	uint32_t to_copy;
-	uint8_t *data = dst_data;
-	uint8_t *src;
-	int left = size;
-
-	to_copy = RTE_MIN(desc->len, (uint32_t)left);
-	dlen = to_copy;
-	src = IOVA_TO_VVA(uint8_t *, vc_req, desc->addr, &dlen,
-			VHOST_ACCESS_RO);
-	if (unlikely(!src || !dlen))
-		return -1;
+	uint64_t remain;
+	uint64_t addr;
+
+	remain = RTE_MIN(desc->len, size);
+	addr = desc->addr;
+	do {
+		uint64_t len;
+		void *src;
+
+		len = remain;
+		src = IOVA_TO_VVA(void *, vc_req, addr, &len, VHOST_ACCESS_RO);
+		if (unlikely(src == NULL || len == 0))
+			return 0;
 
-	rte_memcpy((uint8_t *)data, src, dlen);
-	data += dlen;
+		rte_memcpy(dst, src, len);
+		remain -= len;
+		/* cast is needed for 32-bit architecture */
+		dst = RTE_PTR_ADD(dst, (size_t)len);
+		addr += len;
+	} while (unlikely(remain != 0));
 
-	if (unlikely(dlen < to_copy)) {
-		remain = to_copy - dlen;
-		addr = desc->addr + dlen;
+	return RTE_MIN(desc->len, size);
+}
 
-		while (remain) {
-			len = remain;
-			src = IOVA_TO_VVA(uint8_t *, vc_req, addr, &len,
-					VHOST_ACCESS_RO);
-			if (unlikely(!src || !len)) {
-				VC_LOG_ERR("Failed to map descriptor");
-				return -1;
-			}
 
-			rte_memcpy(data, src, len);
-			addr += len;
-			remain -= len;
-			data += len;
-		}
-	}
+static __rte_always_inline int
+copy_data(void *data, struct vhost_crypto_data_req *vc_req,
+	struct vhost_crypto_desc *head, struct vhost_crypto_desc **cur_desc,
+	uint32_t size, uint32_t max_n_descs)
+{
+	struct vhost_crypto_desc *desc = *cur_desc;
+	uint32_t left = size;
 
-	left -= to_copy;
+	do {
+		uint32_t copied;
 
-	while (desc >= head && desc - head < (int)max_n_descs && left) {
-		desc++;
-		to_copy = RTE_MIN(desc->len, (uint32_t)left);
-		dlen = to_copy;
-		src = IOVA_TO_VVA(uint8_t *, vc_req, desc->addr, &dlen,
-				VHOST_ACCESS_RO);
-		if (unlikely(!src || !dlen)) {
-			VC_LOG_ERR("Failed to map descriptor");
+		copied = copy_data_from_desc(data, vc_req, desc, left);
+		if (copied == 0)
 			return -1;
-		}
-
-		rte_memcpy(data, src, dlen);
-		data += dlen;
-
-		if (unlikely(dlen < to_copy)) {
-			remain = to_copy - dlen;
-			addr = desc->addr + dlen;
-
-			while (remain) {
-				len = remain;
-				src = IOVA_TO_VVA(uint8_t *, vc_req, addr, &len,
-						VHOST_ACCESS_RO);
-				if (unlikely(!src || !len)) {
-					VC_LOG_ERR("Failed to map descriptor");
-					return -1;
-				}
-
-				rte_memcpy(data, src, len);
-				addr += len;
-				remain -= len;
-				data += len;
-			}
-		}
-
-		left -= to_copy;
-	}
+		left -= copied;
+		data = RTE_PTR_ADD(data, copied);
+		desc++;
+	} while (desc < head + max_n_descs && left != 0);
 
-	if (unlikely(left > 0)) {
-		VC_LOG_ERR("Incorrect virtio descriptor");
+	if (unlikely(left != 0))
 		return -1;
-	}
 
-	if (unlikely(desc - head == (int)max_n_descs))
+	if (unlikely(desc == head + max_n_descs))
 		*cur_desc = NULL;
 	else
 		*cur_desc = desc + 1;
@@ -853,6 +817,7 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 	/* iv */
 	if (unlikely(copy_data(iv_data, vc_req, head, &desc,
 			cipher->para.iv_len, max_n_descs))) {
+		VC_LOG_ERR("Incorrect virtio descriptor");
 		ret = VIRTIO_CRYPTO_BADMSG;
 		goto error_exit;
 	}
@@ -884,6 +849,7 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 		if (unlikely(copy_data(rte_pktmbuf_mtod(m_src, uint8_t *),
 				vc_req, head, &desc, cipher->para.src_data_len,
 				max_n_descs) < 0)) {
+			VC_LOG_ERR("Incorrect virtio descriptor");
 			ret = VIRTIO_CRYPTO_BADMSG;
 			goto error_exit;
 		}
@@ -1007,6 +973,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 	/* iv */
 	if (unlikely(copy_data(iv_data, vc_req, head, &desc,
 			chain->para.iv_len, max_n_descs) < 0)) {
+		VC_LOG_ERR("Incorrect virtio descriptor");
 		ret = VIRTIO_CRYPTO_BADMSG;
 		goto error_exit;
 	}
@@ -1038,6 +1005,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 		if (unlikely(copy_data(rte_pktmbuf_mtod(m_src, uint8_t *),
 				vc_req, head, &desc, chain->para.src_data_len,
 				max_n_descs) < 0)) {
+			VC_LOG_ERR("Incorrect virtio descriptor");
 			ret = VIRTIO_CRYPTO_BADMSG;
 			goto error_exit;
 		}
@@ -1122,6 +1090,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 		if (unlikely(copy_data(digest_addr, vc_req, head, &digest_desc,
 				chain->para.hash_result_len,
 				max_n_descs) < 0)) {
+			VC_LOG_ERR("Incorrect virtio descriptor");
 			ret = VIRTIO_CRYPTO_BADMSG;
 			goto error_exit;
 		}
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.938515549 +0200
+++ 0067-vhost-crypto-fix-build-with-GCC-12.patch	2022-07-07 09:54:10.981824716 +0200
@@ -1 +1 @@
-From 4414bb67010dfec2559af52efe8f479b26d55447 Mon Sep 17 00:00:00 2001
+From 9a6f9e34878ae119598c794061f7988215b51732 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 4414bb67010dfec2559af52efe8f479b26d55447 ]
+
@@ -30 +31,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
- lib/vhost/vhost_crypto.c | 123 +++++++++++++++------------------------
+ lib/librte_vhost/vhost_crypto.c | 123 ++++++++++++--------------------
@@ -38,5 +39,5 @@
-diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
-index b1c0eb6a0f..96ffb82a5d 100644
---- a/lib/vhost/vhost_crypto.c
-+++ b/lib/vhost/vhost_crypto.c
-@@ -565,94 +565,58 @@ get_data_ptr(struct vhost_crypto_data_req *vc_req,
+diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
+index 0439b12bc7..b8bdfe4bc7 100644
+--- a/lib/librte_vhost/vhost_crypto.c
++++ b/lib/librte_vhost/vhost_crypto.c
+@@ -566,94 +566,58 @@ get_data_ptr(struct vhost_crypto_data_req *vc_req,
@@ -178 +179 @@
-@@ -852,6 +816,7 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
+@@ -853,6 +817,7 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
@@ -186 +187 @@
-@@ -883,6 +848,7 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
+@@ -884,6 +849,7 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
@@ -194 +195 @@
-@@ -1006,6 +972,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
+@@ -1007,6 +973,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
@@ -202 +203 @@
-@@ -1037,6 +1004,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
+@@ -1038,6 +1005,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
@@ -210 +211 @@
-@@ -1121,6 +1089,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
+@@ -1122,6 +1090,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,

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

* patch 'vhost/crypto: fix descriptor processing' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (65 preceding siblings ...)
  2022-07-07  7:55 ` patch 'vhost/crypto: fix build with GCC 12' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'malloc: fix allocation of almost hugepage size' " christian.ehrhardt
                   ` (18 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: David Marchand; +Cc: Jakub Poczatek, Maxime Coquelin, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 05166062e73463e7e30ab36ded00e7bc86b81312 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 22 Jun 2022 17:30:20 +0200
Subject: [PATCH] vhost/crypto: fix descriptor processing

[ upstream commit 2fbada91545c004f04449500af0c6276900317ab ]

copy_data was returning a pointer to an increased (off by one) descriptor.
Subsequent calls to copy_data in the library were then failing.
Fix this by incrementing the descriptor only if there is some left data
to copy.

Fixes: 4414bb67010d ("vhost/crypto: fix build with GCC 12")

Reported-by: Jakub Poczatek <jakub.poczatek@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Jakub Poczatek <jakub.poczatek@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 lib/librte_vhost/vhost_crypto.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index b8bdfe4bc7..4f91715c33 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -611,8 +611,7 @@ copy_data(void *data, struct vhost_crypto_data_req *vc_req,
 			return -1;
 		left -= copied;
 		data = RTE_PTR_ADD(data, copied);
-		desc++;
-	} while (desc < head + max_n_descs && left != 0);
+	} while (left != 0 && ++desc < head + max_n_descs);
 
 	if (unlikely(left != 0))
 		return -1;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.975432505 +0200
+++ 0068-vhost-crypto-fix-descriptor-processing.patch	2022-07-07 09:54:10.981824716 +0200
@@ -1 +1 @@
-From 2fbada91545c004f04449500af0c6276900317ab Mon Sep 17 00:00:00 2001
+From 05166062e73463e7e30ab36ded00e7bc86b81312 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2fbada91545c004f04449500af0c6276900317ab ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
- lib/vhost/vhost_crypto.c | 3 +--
+ lib/librte_vhost/vhost_crypto.c | 3 +--
@@ -23,5 +24,5 @@
-diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
-index 96ffb82a5d..54946f46d9 100644
---- a/lib/vhost/vhost_crypto.c
-+++ b/lib/vhost/vhost_crypto.c
-@@ -610,8 +610,7 @@ copy_data(void *data, struct vhost_crypto_data_req *vc_req,
+diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
+index b8bdfe4bc7..4f91715c33 100644
+--- a/lib/librte_vhost/vhost_crypto.c
++++ b/lib/librte_vhost/vhost_crypto.c
+@@ -611,8 +611,7 @@ copy_data(void *data, struct vhost_crypto_data_req *vc_req,

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

* patch 'malloc: fix allocation of almost hugepage size' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (66 preceding siblings ...)
  2022-07-07  7:55 ` patch 'vhost/crypto: fix descriptor processing' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'net/octeontx: fix port close' " christian.ehrhardt
                   ` (17 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Fidaullah Noonari; +Cc: Dmitry Kozlyuk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 69b392322552189e89b66ee133a19575b4a5f2b9 Mon Sep 17 00:00:00 2001
From: Fidaullah Noonari <fidaullah.noonari@emumba.com>
Date: Wed, 25 May 2022 10:18:37 +0500
Subject: [PATCH] malloc: fix allocation of almost hugepage size

[ upstream commit ce2f7d472e80c1b6779f230a1c7b137157f5ff3d ]

If called to allocate memory of size is between multiple of hugepage
size minus malloc_header_len and hugepage size, rte_malloc fails.

This fix replaces malloc_elem_trailer_len with malloc_elem_overhead in
try_expand_heap() to include malloc_elem_header_len when calculating
n_seg.

Bugzilla ID: 800
Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug")

Signed-off-by: Fidaullah Noonari <fidaullah.noonari@emumba.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/librte_eal/common/malloc_heap.c | 2 +-
 lib/librte_eal/common/malloc_mp.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c
index bd5065698d..03a263a004 100644
--- a/lib/librte_eal/common/malloc_heap.c
+++ b/lib/librte_eal/common/malloc_heap.c
@@ -397,7 +397,7 @@ try_expand_heap_primary(struct malloc_heap *heap, uint64_t pg_sz,
 	bool callback_triggered = false;
 
 	alloc_sz = RTE_ALIGN_CEIL(align + elt_size +
-			MALLOC_ELEM_TRAILER_LEN, pg_sz);
+			MALLOC_ELEM_OVERHEAD, pg_sz);
 	n_segs = alloc_sz / pg_sz;
 
 	/* we can't know in advance how many pages we'll need, so we malloc */
diff --git a/lib/librte_eal/common/malloc_mp.c b/lib/librte_eal/common/malloc_mp.c
index dd814ef53a..f9d558ba64 100644
--- a/lib/librte_eal/common/malloc_mp.c
+++ b/lib/librte_eal/common/malloc_mp.c
@@ -186,7 +186,7 @@ handle_alloc_request(const struct malloc_mp_req *m,
 	void *map_addr;
 
 	alloc_sz = RTE_ALIGN_CEIL(ar->align + ar->elt_size +
-			MALLOC_ELEM_TRAILER_LEN, ar->page_sz);
+			MALLOC_ELEM_OVERHEAD, ar->page_sz);
 	n_segs = alloc_sz / ar->page_sz;
 
 	heap = ar->heap;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.010878901 +0200
+++ 0069-malloc-fix-allocation-of-almost-hugepage-size.patch	2022-07-07 09:54:10.985824740 +0200
@@ -1 +1 @@
-From ce2f7d472e80c1b6779f230a1c7b137157f5ff3d Mon Sep 17 00:00:00 2001
+From 69b392322552189e89b66ee133a19575b4a5f2b9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ce2f7d472e80c1b6779f230a1c7b137157f5ff3d ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20,2 +21,2 @@
- lib/eal/common/malloc_heap.c | 2 +-
- lib/eal/common/malloc_mp.c   | 2 +-
+ lib/librte_eal/common/malloc_heap.c | 2 +-
+ lib/librte_eal/common/malloc_mp.c   | 2 +-
@@ -24,5 +25,5 @@
-diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c
-index a3d26fcbea..27a52266ad 100644
---- a/lib/eal/common/malloc_heap.c
-+++ b/lib/eal/common/malloc_heap.c
-@@ -403,7 +403,7 @@ try_expand_heap_primary(struct malloc_heap *heap, uint64_t pg_sz,
+diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c
+index bd5065698d..03a263a004 100644
+--- a/lib/librte_eal/common/malloc_heap.c
++++ b/lib/librte_eal/common/malloc_heap.c
+@@ -397,7 +397,7 @@ try_expand_heap_primary(struct malloc_heap *heap, uint64_t pg_sz,
@@ -37,6 +38,6 @@
-diff --git a/lib/eal/common/malloc_mp.c b/lib/eal/common/malloc_mp.c
-index 207b90847e..2b8eb51067 100644
---- a/lib/eal/common/malloc_mp.c
-+++ b/lib/eal/common/malloc_mp.c
-@@ -250,7 +250,7 @@ handle_alloc_request(const struct malloc_mp_req *m,
- 	}
+diff --git a/lib/librte_eal/common/malloc_mp.c b/lib/librte_eal/common/malloc_mp.c
+index dd814ef53a..f9d558ba64 100644
+--- a/lib/librte_eal/common/malloc_mp.c
++++ b/lib/librte_eal/common/malloc_mp.c
+@@ -186,7 +186,7 @@ handle_alloc_request(const struct malloc_mp_req *m,
+ 	void *map_addr;
@@ -49 +50 @@
- 	/* we can't know in advance how many pages we'll need, so we malloc */
+ 	heap = ar->heap;

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

* patch 'net/octeontx: fix port close' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (67 preceding siblings ...)
  2022-07-07  7:55 ` patch 'malloc: fix allocation of almost hugepage size' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'net/qede: fix build with GCC 12' " christian.ehrhardt
                   ` (16 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Harman Kalra; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 07d9cd4f91aca2e67fa3dd776b7d43ad933546b1 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Tue, 24 May 2022 14:12:26 +0530
Subject: [PATCH] net/octeontx: fix port close

[ upstream commit 39e07170331f869c581ce4d3cdc0360f7b6b444a ]

Segmentation fault has been observed while closing the ethernet
port. Reason for the segfault is, eth port close also shuts down
event device while other ethernet port is still using the event
device.

Fixes: da6c687471a3 ("net/octeontx: add start and stop support")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index a496ee60cf..3fc405908d 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -24,6 +24,11 @@
 #include "octeontx_rxtx.h"
 #include "octeontx_logs.h"
 
+/* Useful in stopping/closing event device if no of
+ * eth ports are using it.
+ */
+uint16_t evdev_refcnt;
+
 struct octeontx_vdev_init_params {
 	uint8_t	nr_port;
 };
@@ -336,7 +341,11 @@ octeontx_dev_close(struct rte_eth_dev *dev)
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return;
 
-	rte_event_dev_close(nic->evdev);
+	/* Stopping/closing event device once all eth ports are closed. */
+	if (__atomic_sub_fetch(&evdev_refcnt, 1, __ATOMIC_ACQUIRE) == 0) {
+		rte_event_dev_stop(nic->evdev);
+		rte_event_dev_close(nic->evdev);
+	}
 
 	ret = octeontx_pko_channel_close(nic->base_ochan);
 	if (ret < 0) {
@@ -429,8 +438,6 @@ octeontx_dev_stop(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	rte_event_dev_stop(nic->evdev);
-
 	ret = octeontx_port_stop(nic);
 	if (ret < 0) {
 		octeontx_log_err("failed to req stop port %d res=%d",
@@ -1059,6 +1066,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
 	nic->pko_vfid = pko_vfid;
 	nic->port_id = port;
 	nic->evdev = evdev;
+	__atomic_add_fetch(&evdev_refcnt, 1, __ATOMIC_ACQUIRE);
 
 	res = octeontx_port_open(nic);
 	if (res < 0)
@@ -1287,6 +1295,7 @@ octeontx_probe(struct rte_vdev_device *dev)
 		}
 	}
 
+	__atomic_store_n(&evdev_refcnt, 0, __ATOMIC_RELEASE);
 	/*
 	 * Do 1:1 links for ports & queues. All queues would be mapped to
 	 * one port. If there are more ports than queues, then some ports
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.051085649 +0200
+++ 0070-net-octeontx-fix-port-close.patch	2022-07-07 09:54:10.985824740 +0200
@@ -1 +1 @@
-From 39e07170331f869c581ce4d3cdc0360f7b6b444a Mon Sep 17 00:00:00 2001
+From 07d9cd4f91aca2e67fa3dd776b7d43ad933546b1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 39e07170331f869c581ce4d3cdc0360f7b6b444a ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index f5ea9de8ef..6469fd0a96 100644
+index a496ee60cf..3fc405908d 100644
@@ -23 +24 @@
-@@ -26,6 +26,11 @@
+@@ -24,6 +24,11 @@
@@ -32,4 +33,4 @@
- struct evdev_priv_data {
- 	OFFLOAD_FLAGS; /*Sequence should not be changed */
- } __rte_cache_aligned;
-@@ -491,7 +496,11 @@ octeontx_dev_close(struct rte_eth_dev *dev)
+ struct octeontx_vdev_init_params {
+ 	uint8_t	nr_port;
+ };
+@@ -336,7 +341,11 @@ octeontx_dev_close(struct rte_eth_dev *dev)
@@ -37 +38 @@
- 		return 0;
+ 		return;
@@ -46,3 +47,3 @@
- 	octeontx_dev_flow_ctrl_fini(dev);
- 
-@@ -671,8 +680,6 @@ octeontx_dev_stop(struct rte_eth_dev *dev)
+ 	ret = octeontx_pko_channel_close(nic->base_ochan);
+ 	if (ret < 0) {
+@@ -429,8 +438,6 @@ octeontx_dev_stop(struct rte_eth_dev *dev)
@@ -57 +58 @@
-@@ -1333,6 +1340,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
+@@ -1059,6 +1066,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
@@ -65 +66 @@
-@@ -1582,6 +1590,7 @@ octeontx_probe(struct rte_vdev_device *dev)
+@@ -1287,6 +1295,7 @@ octeontx_probe(struct rte_vdev_device *dev)

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

* patch 'net/qede: fix build with GCC 12' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (68 preceding siblings ...)
  2022-07-07  7:55 ` patch 'net/octeontx: fix port close' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'test/hash: fix out of bound access' " christian.ehrhardt
                   ` (15 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ca638163716cacc167987ecd47eb0fbbdd46f092 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 7 Jun 2022 10:17:40 -0700
Subject: [PATCH] net/qede: fix build with GCC 12

[ upstream commit 4200c4d62586985d70ad69ed7bee526a282b8777 ]

The x86 version of rte_memcpy can cause warnings. The driver does
not need to use rte_memcpy for everything. Standard memcpy is
just as fast and safer; the compiler and static analysis tools
treat memcpy specially.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/qede/base/bcm_osal.h |  3 +--
 drivers/net/qede/qede_ethdev.c   |  2 +-
 drivers/net/qede/qede_filter.c   | 16 ++++++----------
 drivers/net/qede/qede_main.c     | 13 ++++++-------
 4 files changed, 14 insertions(+), 20 deletions(-)

diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h
index d9f507f233..1e4fe2db02 100644
--- a/drivers/net/qede/base/bcm_osal.h
+++ b/drivers/net/qede/base/bcm_osal.h
@@ -11,7 +11,6 @@
 #include <rte_spinlock.h>
 #include <rte_malloc.h>
 #include <rte_atomic.h>
-#include <rte_memcpy.h>
 #include <rte_log.h>
 #include <rte_cycles.h>
 #include <rte_debug.h>
@@ -98,7 +97,7 @@ typedef int bool;
 	} while (0)
 #define OSAL_VFREE(dev, memory) OSAL_FREE(dev, memory)
 #define OSAL_MEM_ZERO(mem, size) bzero(mem, size)
-#define OSAL_MEMCPY(dst, src, size) rte_memcpy(dst, src, size)
+#define OSAL_MEMCPY(dst, src, size) memcpy(dst, src, size)
 #define OSAL_MEMCMP(s1, s2, size) memcmp(s1, s2, size)
 #define OSAL_MEMSET(dst, val, length) \
 	memset(dst, val, length)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 0be9c5a211..0c50c61d97 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -270,7 +270,7 @@ qede_interrupt_handler(void *param)
 static void
 qede_alloc_etherdev(struct qede_dev *qdev, struct qed_dev_eth_info *info)
 {
-	rte_memcpy(&qdev->dev_info, info, sizeof(*info));
+	qdev->dev_info = *info;
 	qdev->ops = qed_ops;
 }
 
diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c
index b7ad59ad6d..0d50d38d52 100644
--- a/drivers/net/qede/qede_filter.c
+++ b/drivers/net/qede/qede_filter.c
@@ -519,10 +519,8 @@ qede_arfs_construct_pkt(struct rte_eth_dev *eth_dev,
 		ip6->vtc_flow =
 			rte_cpu_to_be_32(QEDE_FDIR_IPV6_DEFAULT_VTC_FLOW);
 
-		rte_memcpy(&ip6->src_addr, arfs->tuple.src_ipv6,
-			   IPV6_ADDR_LEN);
-		rte_memcpy(&ip6->dst_addr, arfs->tuple.dst_ipv6,
-			   IPV6_ADDR_LEN);
+		memcpy(&ip6->src_addr, arfs->tuple.src_ipv6, IPV6_ADDR_LEN);
+		memcpy(&ip6->dst_addr, arfs->tuple.dst_ipv6, IPV6_ADDR_LEN);
 		len += sizeof(struct rte_ipv6_hdr);
 		params->ipv6 = true;
 
@@ -1285,12 +1283,10 @@ qede_flow_parse_pattern(__attribute__((unused))struct rte_eth_dev *dev,
 				const struct rte_flow_item_ipv6 *spec;
 
 				spec = pattern->spec;
-				rte_memcpy(flow->entry.tuple.src_ipv6,
-					   spec->hdr.src_addr,
-					   IPV6_ADDR_LEN);
-				rte_memcpy(flow->entry.tuple.dst_ipv6,
-					   spec->hdr.dst_addr,
-					   IPV6_ADDR_LEN);
+				memcpy(flow->entry.tuple.src_ipv6,
+				       spec->hdr.src_addr, IPV6_ADDR_LEN);
+				memcpy(flow->entry.tuple.dst_ipv6,
+				       spec->hdr.dst_addr, IPV6_ADDR_LEN);
 				flow->entry.tuple.eth_proto =
 					RTE_ETHER_TYPE_IPV6;
 			}
diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index 67392d6aa4..08677c8546 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -372,7 +372,7 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info)
 	dev_info->mtu = ECORE_LEADING_HWFN(edev)->hw_info.mtu;
 	dev_info->dev_type = edev->type;
 
-	rte_memcpy(&dev_info->hw_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
+	memcpy(&dev_info->hw_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
 	       RTE_ETHER_ADDR_LEN);
 
 	dev_info->fw_major = FW_MAJOR_VERSION;
@@ -437,7 +437,7 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info)
 		info->num_vlan_filters = RESC_NUM(&edev->hwfns[0], ECORE_VLAN) -
 					 max_vf_vlan_filters;
 
-		rte_memcpy(&info->port_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
+		memcpy(&info->port_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
 			   RTE_ETHER_ADDR_LEN);
 	} else {
 		ecore_vf_get_num_rxqs(ECORE_LEADING_HWFN(edev),
@@ -468,7 +468,7 @@ static void qed_set_name(struct ecore_dev *edev, char name[NAME_SIZE])
 {
 	int i;
 
-	rte_memcpy(edev->name, name, NAME_SIZE);
+	memcpy(edev->name, name, NAME_SIZE);
 	for_each_hwfn(edev, i) {
 		snprintf(edev->hwfns[i].name, NAME_SIZE, "%s-%d", name, i);
 	}
@@ -510,10 +510,9 @@ static void qed_fill_link(struct ecore_hwfn *hwfn,
 
 	/* Prepare source inputs */
 	if (IS_PF(hwfn->p_dev)) {
-		rte_memcpy(&params, ecore_mcp_get_link_params(hwfn),
-		       sizeof(params));
-		rte_memcpy(&link, ecore_mcp_get_link_state(hwfn), sizeof(link));
-		rte_memcpy(&link_caps, ecore_mcp_get_link_capabilities(hwfn),
+		memcpy(&params, ecore_mcp_get_link_params(hwfn), sizeof(params));
+		memcpy(&link, ecore_mcp_get_link_state(hwfn), sizeof(link));
+		memcpy(&link_caps, ecore_mcp_get_link_capabilities(hwfn),
 		       sizeof(link_caps));
 	} else {
 		ecore_vf_read_bulletin(hwfn, &change);
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.091244398 +0200
+++ 0071-net-qede-fix-build-with-GCC-12.patch	2022-07-07 09:54:10.989824765 +0200
@@ -1 +1 @@
-From 4200c4d62586985d70ad69ed7bee526a282b8777 Mon Sep 17 00:00:00 2001
+From ca638163716cacc167987ecd47eb0fbbdd46f092 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4200c4d62586985d70ad69ed7bee526a282b8777 ]
+
@@ -11,2 +12,0 @@
-Cc: stable@dpdk.org
-
@@ -19,2 +19 @@
- drivers/net/qede/qede_sriov.c    |  6 +++---
- 5 files changed, 17 insertions(+), 23 deletions(-)
+ 4 files changed, 14 insertions(+), 20 deletions(-)
@@ -23 +22 @@
-index c5b5399282..9ea579bfc8 100644
+index d9f507f233..1e4fe2db02 100644
@@ -26 +25 @@
-@@ -14,7 +14,6 @@
+@@ -11,7 +11,6 @@
@@ -34 +33 @@
-@@ -99,7 +98,7 @@ typedef intptr_t osal_int_ptr_t;
+@@ -98,7 +97,7 @@ typedef int bool;
@@ -44 +43 @@
-index ea6b71f093..a4923670d6 100644
+index 0be9c5a211..0c50c61d97 100644
@@ -47 +46 @@
-@@ -358,7 +358,7 @@ qede_assign_rxtx_handlers(struct rte_eth_dev *dev, bool is_dummy)
+@@ -270,7 +270,7 @@ qede_interrupt_handler(void *param)
@@ -57 +56 @@
-index 440440423a..ca3165d972 100644
+index b7ad59ad6d..0d50d38d52 100644
@@ -60 +59 @@
-@@ -388,10 +388,8 @@ qede_arfs_construct_pkt(struct rte_eth_dev *eth_dev,
+@@ -519,10 +519,8 @@ qede_arfs_construct_pkt(struct rte_eth_dev *eth_dev,
@@ -73 +72 @@
-@@ -821,12 +819,10 @@ qede_flow_parse_pattern(__rte_unused struct rte_eth_dev *dev,
+@@ -1285,12 +1283,10 @@ qede_flow_parse_pattern(__attribute__((unused))struct rte_eth_dev *dev,
@@ -91 +90 @@
-index ad101194d6..03039038ad 100644
+index 67392d6aa4..08677c8546 100644
@@ -103 +102 @@
-@@ -440,7 +440,7 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info)
+@@ -437,7 +437,7 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info)
@@ -112 +111 @@
-@@ -471,7 +471,7 @@ static void qed_set_name(struct ecore_dev *edev, char name[NAME_SIZE])
+@@ -468,7 +468,7 @@ static void qed_set_name(struct ecore_dev *edev, char name[NAME_SIZE])
@@ -121 +120 @@
-@@ -513,10 +513,9 @@ static void qed_fill_link(struct ecore_hwfn *hwfn,
+@@ -510,10 +510,9 @@ static void qed_fill_link(struct ecore_hwfn *hwfn,
@@ -135,18 +133,0 @@
-diff --git a/drivers/net/qede/qede_sriov.c b/drivers/net/qede/qede_sriov.c
-index 0b99a8d6fe..937d339fb8 100644
---- a/drivers/net/qede/qede_sriov.c
-+++ b/drivers/net/qede/qede_sriov.c
-@@ -203,10 +203,10 @@ void qed_inform_vf_link_state(struct ecore_hwfn *hwfn)
- 	if (!hwfn->pf_iov_info)
- 		return;
- 
--	rte_memcpy(&params, ecore_mcp_get_link_params(lead_hwfn),
-+	memcpy(&params, ecore_mcp_get_link_params(lead_hwfn),
- 		   sizeof(params));
--	rte_memcpy(&link, ecore_mcp_get_link_state(lead_hwfn), sizeof(link));
--	rte_memcpy(&caps, ecore_mcp_get_link_capabilities(lead_hwfn),
-+	memcpy(&link, ecore_mcp_get_link_state(lead_hwfn), sizeof(link));
-+	memcpy(&caps, ecore_mcp_get_link_capabilities(lead_hwfn),
- 		   sizeof(caps));
- 
- 	/* Update bulletin of all future possible VFs with link configuration */

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

* patch 'test/hash: fix out of bound access' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (69 preceding siblings ...)
  2022-07-07  7:55 ` patch 'net/qede: fix build with GCC 12' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'test: check memory allocation for CRC' " christian.ehrhardt
                   ` (14 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 8caef8fee30e977e7abae526281dd17cf3f99d89 Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Date: Sat, 4 Jun 2022 10:37:11 +0200
Subject: [PATCH] test/hash: fix out of bound access

[ upstream commit 8343fd749ff7c494c2f303f20a83b8873c6f0797 ]

rwc_non_lf_results->multi_rw, rwc_lf_results->multi_rw, and
rwc_perf_results->multi_rw are accessed at indexes
[0..NUM_TEST-1][0..1][0..NUMTEST-1]. Currently the first index
overflows the array size in struct rwc_perf.

Fixes: c7eb0972e74b ("test/hash: add lock-free r/w concurrency")

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 app/test/test_hash_readwrite_lf_perf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_hash_readwrite_lf_perf.c b/app/test/test_hash_readwrite_lf_perf.c
index 7bfc067f4e..858c883f24 100644
--- a/app/test/test_hash_readwrite_lf_perf.c
+++ b/app/test/test_hash_readwrite_lf_perf.c
@@ -56,7 +56,7 @@ struct rwc_perf {
 	uint32_t w_ks_r_hit_nsp[2][NUM_TEST];
 	uint32_t w_ks_r_hit_sp[2][NUM_TEST];
 	uint32_t w_ks_r_miss[2][NUM_TEST];
-	uint32_t multi_rw[NUM_TEST - 1][2][NUM_TEST];
+	uint32_t multi_rw[NUM_TEST][2][NUM_TEST];
 	uint32_t w_ks_r_hit_extbkt[2][NUM_TEST];
 };
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.131260115 +0200
+++ 0072-test-hash-fix-out-of-bound-access.patch	2022-07-07 09:54:10.993824790 +0200
@@ -1 +1 @@
-From 8343fd749ff7c494c2f303f20a83b8873c6f0797 Mon Sep 17 00:00:00 2001
+From 8caef8fee30e977e7abae526281dd17cf3f99d89 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8343fd749ff7c494c2f303f20a83b8873c6f0797 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 8120cf43be..32f9ec9250 100644
+index 7bfc067f4e..858c883f24 100644
@@ -23 +24 @@
-@@ -59,7 +59,7 @@ struct rwc_perf {
+@@ -56,7 +56,7 @@ struct rwc_perf {
@@ -30 +30,0 @@
- 	uint32_t writer_add_del[NUM_TEST];
@@ -31,0 +32 @@
+ 

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

* patch 'test: check memory allocation for CRC' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (70 preceding siblings ...)
  2022-07-07  7:55 ` patch 'test/hash: fix out of bound access' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'examples/distributor: fix distributor on Rx core' " christian.ehrhardt
                   ` (13 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 91e1eb689bdee7d4b330df1b556beb12eee86857 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Mon, 19 Apr 2021 21:34:44 +0800
Subject: [PATCH] test: check memory allocation for CRC

[ upstream commit 52aab95476d69abb522b4a588b664281e8464a7b ]

The rte_zmalloc is called in test_crc_calc without null pointer
check. This patch adds null pointer checks on return value of
rte_zmalloc.

Fixes: 9c77b848b1c1 ("test: add CRC computation")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 app/test/test_crc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test/test_crc.c b/app/test/test_crc.c
index f8a74e04ee..d8b513de32 100644
--- a/app/test/test_crc.c
+++ b/app/test/test_crc.c
@@ -80,6 +80,8 @@ test_crc_calc(void)
 
 	/* 32-bit ethernet CRC: Test 2 */
 	test_data = rte_zmalloc(NULL, CRC32_VEC_LEN1, 0);
+	if (test_data == NULL)
+		return -7;
 
 	for (i = 0; i < CRC32_VEC_LEN1; i += 12)
 		rte_memcpy(&test_data[i], crc32_vec1, 12);
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.173843044 +0200
+++ 0073-test-check-memory-allocation-for-CRC.patch	2022-07-07 09:54:10.993824790 +0200
@@ -1 +1 @@
-From 52aab95476d69abb522b4a588b664281e8464a7b Mon Sep 17 00:00:00 2001
+From 91e1eb689bdee7d4b330df1b556beb12eee86857 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 52aab95476d69abb522b4a588b664281e8464a7b ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 0ed080e482..5edc8fb13b 100644
+index f8a74e04ee..d8b513de32 100644
@@ -23 +24 @@
-@@ -79,6 +79,8 @@ test_crc_calc(void)
+@@ -80,6 +80,8 @@ test_crc_calc(void)

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

* patch 'examples/distributor: fix distributor on Rx core' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (71 preceding siblings ...)
  2022-07-07  7:55 ` patch 'test: check memory allocation for CRC' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'net/bnxt: allow Tx only or Rx only' " christian.ehrhardt
                   ` (12 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  Cc: Abdullah Ömer Yamaç, Ferruh Yigit, David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a0d39201ac360a74675140dab25d0944b5222678 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdullah=20=C3=96mer=20Yama=C3=A7?=
 <omer.yamac@ceng.metu.edu.tr>
Date: Mon, 20 Jun 2022 19:31:46 +0300
Subject: [PATCH] examples/distributor: fix distributor on Rx core
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 29c1e90e65e9e1592b4a200afe8d2a7ff7a77742 ]

This patch fixes the syntax error when using the single-core
for both Rx and distributor functions.

Fixes: 4a7f40c0ff9a ("examples/distributor: add dedicated core")

Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Tested-by: David Hunt <david.hunt@intel.com>
---
 examples/distributor/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index db4bf7e399..4d5e137b99 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -265,8 +265,8 @@ lcore_rx(struct lcore_params *p)
  * packets are then send straight to the tx core.
  */
 #if 0
-	rte_distributor_process(d, bufs, nb_rx);
-	const uint16_t nb_ret = rte_distributor_returned_pktsd,
+		rte_distributor_process(p->d, bufs, nb_rx);
+		const uint16_t nb_ret = rte_distributor_returned_pkts(p->d,
 			bufs, BURST_SIZE*2);
 
 		app_stats.rx.returned_pkts += nb_ret;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.210677608 +0200
+++ 0074-examples-distributor-fix-distributor-on-Rx-core.patch	2022-07-07 09:54:10.993824790 +0200
@@ -1 +1 @@
-From 29c1e90e65e9e1592b4a200afe8d2a7ff7a77742 Mon Sep 17 00:00:00 2001
+From a0d39201ac360a74675140dab25d0944b5222678 Mon Sep 17 00:00:00 2001
@@ -9,0 +10,2 @@
+[ upstream commit 29c1e90e65e9e1592b4a200afe8d2a7ff7a77742 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 02bf91f555..8995806b4e 100644
+index db4bf7e399..4d5e137b99 100644
@@ -27 +28 @@
-@@ -261,8 +261,8 @@ lcore_rx(struct lcore_params *p)
+@@ -265,8 +265,8 @@ lcore_rx(struct lcore_params *p)

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

* patch 'net/bnxt: allow Tx only or Rx only' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (72 preceding siblings ...)
  2022-07-07  7:55 ` patch 'examples/distributor: fix distributor on Rx core' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'net/bnxt: cleanup MTU setting' " christian.ehrhardt
                   ` (11 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Damodharam Ammepalli; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 6986cbb030829a80429a862a6adc8b75e3997b83 Mon Sep 17 00:00:00 2001
From: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Date: Wed, 15 Jun 2022 20:26:59 +0530
Subject: [PATCH] net/bnxt: allow Tx only or Rx only

[ upstream commit 8b7e58a791ef7747266b77ed433f5d03a6abaad7 ]

Currently, we fail the init/probe of PMD if eth_dev->data->nb_tx_queues
or eth_dev->data->nb_rx_queues is 0. We are removing this check.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")

Signed-off-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 2acde85e96..9c1578e0e9 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -355,7 +355,7 @@ static int bnxt_alloc_prev_ring_stats(struct bnxt *bp)
 					     sizeof(struct bnxt_ring_stats) *
 					     bp->tx_cp_nr_rings,
 					     0);
-	if (bp->prev_tx_ring_stats == NULL)
+	if (bp->tx_cp_nr_rings > 0 && bp->prev_tx_ring_stats == NULL)
 		goto error;
 
 	return 0;
@@ -908,11 +908,6 @@ int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 	int vlan_mask = 0;
 	int rc, retry_cnt = BNXT_IF_CHANGE_RETRY_COUNT;
 
-	if (!eth_dev->data->nb_tx_queues || !eth_dev->data->nb_rx_queues) {
-		PMD_DRV_LOG(ERR, "Queues are not configured yet!\n");
-		return -EINVAL;
-	}
-
 	if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS) {
 		PMD_DRV_LOG(ERR,
 			"RxQ cnt %d > CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n",
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.250104853 +0200
+++ 0075-net-bnxt-allow-Tx-only-or-Rx-only.patch	2022-07-07 09:54:10.997824815 +0200
@@ -1 +1 @@
-From 8b7e58a791ef7747266b77ed433f5d03a6abaad7 Mon Sep 17 00:00:00 2001
+From 6986cbb030829a80429a862a6adc8b75e3997b83 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8b7e58a791ef7747266b77ed433f5d03a6abaad7 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 34f21496a4..8181e1f37a 100644
+index 2acde85e96..9c1578e0e9 100644
@@ -23 +24 @@
-@@ -723,7 +723,7 @@ static int bnxt_alloc_prev_ring_stats(struct bnxt *bp)
+@@ -355,7 +355,7 @@ static int bnxt_alloc_prev_ring_stats(struct bnxt *bp)
@@ -32 +33 @@
-@@ -1567,11 +1567,6 @@ int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+@@ -908,11 +908,6 @@ int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
@@ -41 +42 @@
- 	if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS)
+ 	if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS) {
@@ -43 +44 @@
- 			    "RxQ cnt %d > RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n",
+ 			"RxQ cnt %d > CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n",

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

* patch 'net/bnxt: cleanup MTU setting' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (73 preceding siblings ...)
  2022-07-07  7:55 ` patch 'net/bnxt: allow Tx only or Rx only' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'test/crypto: fix authentication IV for ZUC SGL' " christian.ehrhardt
                   ` (10 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Damodharam Ammepalli; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ccdd69c5dd08f7a776ee1d3af5b2c685998c00f4 Mon Sep 17 00:00:00 2001
From: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Date: Wed, 15 Jun 2022 20:27:02 +0530
Subject: [PATCH] net/bnxt: cleanup MTU setting

[ upstream commit 89670e3b0f852615c29c510d5f6c04d147675c7e ]

Minor cleanup in bnxt_mtu_set_op() to move pre-mature
setting of jumbo flag post mtu check and remove
a redundant mtu set operation from rxq vnic configs.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")

Signed-off-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 8 ++++----
 drivers/net/bnxt/bnxt_rxq.c    | 4 ----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 9c1578e0e9..1f50a449d9 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2428,6 +2428,10 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 	}
 #endif
 
+	/* Is there a change in mtu setting? */
+	if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len == new_pkt_size)
+		return rc;
+
 	if (new_mtu > RTE_ETHER_MTU) {
 		bp->flags |= BNXT_FLAG_JUMBO;
 		bp->eth_dev->data->dev_conf.rxmode.offloads |=
@@ -2438,10 +2442,6 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 		bp->flags &= ~BNXT_FLAG_JUMBO;
 	}
 
-	/* Is there a change in mtu setting? */
-	if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len == new_pkt_size)
-		return rc;
-
 	for (i = 0; i < bp->nr_vnics; i++) {
 		struct bnxt_vnic_info *vnic = &bp->vnic_info[i];
 		uint16_t size = 0;
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 9d8efe0185..616a0d2360 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -348,10 +348,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	}
 	eth_dev->data->rx_queue_state[queue_idx] = queue_state;
 
-	/* Configure mtu if it is different from what was configured before */
-	if (!queue_idx)
-		bnxt_mtu_set_op(eth_dev, eth_dev->data->mtu);
-
 	return 0;
 err:
 	bnxt_rx_queue_release_op(rxq);
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.292865623 +0200
+++ 0076-net-bnxt-cleanup-MTU-setting.patch	2022-07-07 09:54:11.005824864 +0200
@@ -1 +1 @@
-From 89670e3b0f852615c29c510d5f6c04d147675c7e Mon Sep 17 00:00:00 2001
+From ccdd69c5dd08f7a776ee1d3af5b2c685998c00f4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 89670e3b0f852615c29c510d5f6c04d147675c7e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index f040cdcf94..e275d3a53f 100644
+index 9c1578e0e9..1f50a449d9 100644
@@ -25,3 +26,3 @@
-@@ -3037,15 +3037,15 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
- 	if (!eth_dev->data->nb_rx_queues)
- 		return -ENOTSUP;
+@@ -2428,6 +2428,10 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
+ 	}
+ #endif
@@ -30,2 +31,2 @@
-+	if (eth_dev->data->mtu == new_mtu)
-+		return 0;
++	if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len == new_pkt_size)
++		return rc;
@@ -33 +34 @@
- 	if (new_mtu > RTE_ETHER_MTU)
+ 	if (new_mtu > RTE_ETHER_MTU) {
@@ -35 +36,2 @@
- 	else
+ 		bp->eth_dev->data->dev_conf.rxmode.offloads |=
+@@ -2438,10 +2442,6 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
@@ -36,0 +39 @@
+ 	}
@@ -39,2 +42,2 @@
--	if (eth_dev->data->mtu == new_mtu)
--		return 0;
+-	if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len == new_pkt_size)
+-		return rc;
@@ -46 +49 @@
-index f4b641773d..fabbbd4560 100644
+index 9d8efe0185..616a0d2360 100644
@@ -49,3 +52,3 @@
-@@ -402,10 +402,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
- 	rxq->rx_started = rxq->rx_deferred_start ? false : true;
- 	rxq->vnic = BNXT_GET_DEFAULT_VNIC(bp);
+@@ -348,10 +348,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
+ 	}
+ 	eth_dev->data->rx_queue_state[queue_idx] = queue_state;
@@ -59 +62 @@
- 	bnxt_rx_queue_release_op(eth_dev, queue_idx);
+ 	bnxt_rx_queue_release_op(rxq);

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

* patch 'test/crypto: fix authentication IV for ZUC SGL' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (74 preceding siblings ...)
  2022-07-07  7:55 ` patch 'net/bnxt: cleanup MTU setting' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'test/crypto: fix ZUC vector IV format' " christian.ehrhardt
                   ` (9 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Ciara Power; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 614f12684ba96232d818315e46419b75631dabdf Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Thu, 23 Jun 2022 14:31:42 +0000
Subject: [PATCH] test/crypto: fix authentication IV for ZUC SGL

[ upstream commit 5d170ccea5edb84eabff2c0e9b4b1df822615009 ]

The wireless operation for ZUC SGL tests was being passed NULL instead
of a pointer to the test data authentication IV, and IV length 0.
This is now corrected to use the IV from the test data.

Fixes: 11c5485bb276 ("test/crypto: add scatter-gather tests for IP and OOP")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test/test_cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 580702d6e3..8ad2f251e5 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -5918,7 +5918,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,
 	retval = create_wireless_algo_auth_cipher_operation(
 		tdata->digest.data, tdata->digest.len,
 		tdata->cipher_iv.data, tdata->cipher_iv.len,
-		NULL, 0,
+		tdata->auth_iv.data, tdata->auth_iv.len,
 		(tdata->digest.offset_bytes == 0 ?
 		(verify ? ciphertext_pad_len : plaintext_pad_len)
 			: tdata->digest.offset_bytes),
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.341222421 +0200
+++ 0077-test-crypto-fix-authentication-IV-for-ZUC-SGL.patch	2022-07-07 09:54:11.017824938 +0200
@@ -1 +1 @@
-From 5d170ccea5edb84eabff2c0e9b4b1df822615009 Mon Sep 17 00:00:00 2001
+From 614f12684ba96232d818315e46419b75631dabdf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5d170ccea5edb84eabff2c0e9b4b1df822615009 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index e6d8bcfb02..bd7e232847 100644
+index 580702d6e3..8ad2f251e5 100644
@@ -23 +24 @@
-@@ -6562,7 +6562,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,
+@@ -5918,7 +5918,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,

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

* patch 'test/crypto: fix ZUC vector IV format' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (75 preceding siblings ...)
  2022-07-07  7:55 ` patch 'test/crypto: fix authentication IV for ZUC SGL' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'test/crypto: fix SNOW3G " christian.ehrhardt
                   ` (8 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Ciara Power; +Cc: Tejasree Kondoj, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f2a1d83ee7902a0f890fcedaf0b3baf78e060eed Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Thu, 23 Jun 2022 14:42:49 +0000
Subject: [PATCH] test/crypto: fix ZUC vector IV format

[ upstream commit 3025fe291015686f3e954dd520e7cbc130439d33 ]

Some authentication and cipher IV formats were not following the spec [1].

For ZUC128 cipher IV, an 8 byte block is repeated,
with the last 3 bytes of each being 0x0.
IV[4] and IV[12] must have the last 2 bits set to 0.

Auth IVs must also have repeated bytes with the last 3 bytes
containing 0x0 in each 8 byte block.
IV[4] and IV[12] must have the last 3 bits set to 0.
IV[8] and IV[14] may have a flipped bit based on direction.

[1] https://www.gsma.com/security/wp-content/uploads/2019/05/EEA3_EIA3_specification_v1_8.pdf

Fixes: a81a81850fb1 ("test/crypto: add ZUC test cases for QAT")
Fixes: b1c1df46878d ("test/crypto: add ZUC test cases for auth-cipher")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 app/test/test_cryptodev_zuc_test_vectors.h | 54 +++++++++++-----------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/app/test/test_cryptodev_zuc_test_vectors.h b/app/test/test_cryptodev_zuc_test_vectors.h
index cc2338e107..067fb5eb34 100644
--- a/app/test/test_cryptodev_zuc_test_vectors.h
+++ b/app/test/test_cryptodev_zuc_test_vectors.h
@@ -558,13 +558,13 @@ static struct wireless_test_data zuc_test_case_cipher_200b_auth_200b = {
 	},
 	.auth_iv = {
 		.data = {
-			0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
-			0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
+			0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00,
+			0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
 	.digest = {
-		.data = {0x01, 0xFE, 0x5E, 0x38},
+		.data = {0x2F, 0x45, 0x7D, 0x7B},
 		.len  = 4
 	},
 	.validAuthLenInBits = {
@@ -631,13 +631,13 @@ static struct wireless_test_data zuc_test_case_cipher_800b_auth_120b = {
 	},
 	.auth_iv = {
 		.data = {
-			0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
-			0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
+			0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00,
+			0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
 	.digest = {
-		.data = {0x9D, 0x42, 0x1C, 0xEA},
+		.data = {0xCA, 0xBB, 0x8D, 0x94},
 		.len  = 4
 	},
 	.validAuthLenInBits = {
@@ -1056,15 +1056,15 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
 	},
 	.cipher_iv = {
 		.data = {
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+			0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00,
+			0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
 	.auth_iv = {
 		.data = {
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+			0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00,
+			0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
@@ -1091,22 +1091,22 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
 	},
 	.ciphertext = {
 		.data = {
-			0x5A, 0x5A, 0xDB, 0x3D, 0xD5, 0xB7, 0xB9, 0x58,
-			0xA5, 0xD3, 0xE3, 0xF9, 0x18, 0x73, 0xB4, 0x74,
-			0x05, 0xF0, 0xE9, 0xB6, 0x5D, 0x9A, 0xE3, 0xFA,
-			0x5D, 0xFD, 0x24, 0x51, 0xAD, 0x73, 0xCA, 0x64,
-			0x91, 0xD5, 0xB3, 0x94, 0x10, 0x91, 0x89, 0xEA,
-			0x73, 0x6F, 0xB0, 0x2A, 0x0A, 0x63, 0x0F, 0x8D,
-			0x64, 0x87, 0xA3, 0x14, 0x6B, 0x93, 0x31, 0x0F,
-			0x14, 0xAD, 0xEA, 0x62, 0x80, 0x3F, 0x44, 0xDD,
-			0x4E, 0x30, 0xFA, 0xC8, 0x0E, 0x5F, 0x46, 0xE7,
-			0x60, 0xEC, 0xDF, 0x8B, 0x94, 0x7D, 0x2E, 0x63,
-			0x48, 0xD9, 0x69, 0x06, 0x13, 0xF2, 0x20, 0x49,
-			0x54, 0xA6, 0xD4, 0x98, 0xF4, 0xF6, 0x1D, 0x4A,
-			0xC9, 0xA5, 0xDA, 0x46, 0x3D, 0xD9, 0x02, 0x47,
-			0x1C, 0x20, 0x73, 0x35, 0x17, 0x1D, 0x81, 0x8D,
-			0x2E, 0xCD, 0x70, 0x37, 0x22, 0x55, 0x3C, 0xF3,
-			0xDA, 0x70, 0x42, 0x12, 0x0E, 0xAA, 0xC4, 0xAB
+			0x5A, 0x5A, 0x94, 0xE7, 0xB8, 0xD7, 0x4E, 0xBB,
+			0x4C, 0xC3, 0xD1, 0x16, 0xFC, 0x8C, 0xE4, 0x27,
+			0x44, 0xEC, 0x04, 0x26, 0x60, 0x9C, 0xFF, 0x81,
+			0xB6, 0x2B, 0x48, 0x1D, 0xEE, 0x26, 0xF7, 0x58,
+			0x40, 0x38, 0x58, 0xEA, 0x22, 0x23, 0xE6, 0x34,
+			0x9A, 0x69, 0x32, 0x68, 0xBD, 0xDD, 0x7D, 0xA3,
+			0xC0, 0x04, 0x79, 0xF0, 0xF1, 0x58, 0x78, 0x5E,
+			0xD0, 0xDF, 0x27, 0x9A, 0x53, 0x70, 0x5D, 0xFB,
+			0x1B, 0xCA, 0xBA, 0x97, 0x12, 0x1F, 0x59, 0x6B,
+			0x75, 0x7B, 0x94, 0xF6, 0xE7, 0xFA, 0x49, 0x6B,
+			0x7D, 0x7F, 0x8F, 0x0F, 0x78, 0x56, 0x40, 0x52,
+			0x84, 0x3E, 0xA9, 0xE8, 0x84, 0x6F, 0xEF, 0xFB,
+			0x4A, 0x48, 0x3A, 0x4C, 0x81, 0x98, 0xDD, 0x17,
+			0x89, 0x66, 0x3B, 0xC0, 0xEC, 0x71, 0xDB, 0xF6,
+			0x44, 0xDF, 0xA7, 0x97, 0xB2, 0x9B, 0x84, 0xA7,
+			0x2D, 0x2D, 0xC1, 0x93, 0x12, 0x37, 0xEA, 0xD2
 		},
 		.len = 128 << 3
 	},
@@ -1123,7 +1123,7 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
 		.len = 2 << 3
 	},
 	.digest = {
-		.data = {0x0E, 0xAA, 0xC4, 0xAB},
+		.data = {0x12, 0x37, 0xEA, 0xD2},
 		.len  = 4,
 		.offset_bytes = 124
 	}
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.386156932 +0200
+++ 0078-test-crypto-fix-ZUC-vector-IV-format.patch	2022-07-07 09:54:11.017824938 +0200
@@ -1 +1 @@
-From 3025fe291015686f3e954dd520e7cbc130439d33 Mon Sep 17 00:00:00 2001
+From f2a1d83ee7902a0f890fcedaf0b3baf78e060eed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3025fe291015686f3e954dd520e7cbc130439d33 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 5d1d264579..299d7649fe 100644
+index cc2338e107..067fb5eb34 100644
@@ -67 +68 @@
-@@ -1166,15 +1166,15 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
+@@ -1056,15 +1056,15 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
@@ -87 +88 @@
-@@ -1201,22 +1201,22 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
+@@ -1091,22 +1091,22 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
@@ -126 +127 @@
-@@ -1233,7 +1233,7 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
+@@ -1123,7 +1123,7 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {

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

* patch 'test/crypto: fix SNOW3G vector IV format' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (76 preceding siblings ...)
  2022-07-07  7:55 ` patch 'test/crypto: fix ZUC vector IV format' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'examples/fips_validation: handle empty payload' " christian.ehrhardt
                   ` (7 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Ciara Power; +Cc: Tejasree Kondoj, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 9ea7a5a2cf74eeaa2c8a8c2f12b1b48b45a6035b Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Thu, 23 Jun 2022 14:42:50 +0000
Subject: [PATCH] test/crypto: fix SNOW3G vector IV format

[ upstream commit 3271c24b295caa7ee3fe227225a2ce962757d9c4 ]

Some of the cipher and authentication IVs did not follow the spec for
SNOW3G algorithm [1].

Cipher IVs must have the last 3 bytes of each 8 byte block as 0x0.
IV[4] and IV[12] must have the last 2 bits set to 0.
Each 8 byte block is repeated.

Auth IVs must also have a repeated 8 byte block.
IV[8] and IV[14] may have a flipped bit based on direction.

[1] https://www.gsma.com/aboutus/wp-content/uploads/2014/12/uea2uia2d1v21.pdf

Fixes: 8bdf665fe6c0 ("app/test: add SNOW 3G")
Fixes: 24342ade2c9d ("test/crypto: check SNOW3G when digest is encrypted")
Fixes: 02ed7b3871d6 ("test/crypto: add SNOW3G test cases for auth-cipher")
Fixes: 11c5485bb276 ("test/crypto: add scatter-gather tests for IP and OOP")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 app/test/test_cryptodev_snow3g_test_vectors.h | 142 +++++++++---------
 1 file changed, 71 insertions(+), 71 deletions(-)

diff --git a/app/test/test_cryptodev_snow3g_test_vectors.h b/app/test/test_cryptodev_snow3g_test_vectors.h
index bbe05662be..b49a07bcf2 100644
--- a/app/test/test_cryptodev_snow3g_test_vectors.h
+++ b/app/test/test_cryptodev_snow3g_test_vectors.h
@@ -138,11 +138,11 @@ struct snow3g_test_data snow3g_test_case_2 = {
 		.len = 16
 	},
 	.cipher_iv = {
-	       .data = {
+		.data = {
 			0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00,
 			0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00
 		},
-	       .len = 16
+		.len = 16
 	},
 	.plaintext = {
 		.data = {
@@ -359,8 +359,8 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_1 = {
 	},
 	.cipher_iv = {
 		.data = {
-			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
-			0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+			0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00,
+			0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
@@ -383,13 +383,13 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_1 = {
 		.len = 384
 	},
 	.ciphertext = {
-	   .data = {
-			0x95, 0x2E, 0x5A, 0xE1, 0x50, 0xB8, 0x59, 0x2A,
-			0x9B, 0xA0, 0x38, 0xA9, 0x8E, 0x2F, 0xED, 0xAB,
-			0xFD, 0xC8, 0x3B, 0x47, 0x46, 0x0B, 0x50, 0x16,
-			0xEC, 0x88, 0x45, 0xB6, 0x05, 0xC7, 0x54, 0xF8,
-			0xBD, 0x91, 0xAA, 0xB6, 0xA4, 0xDC, 0x64, 0xB4,
-			0xCB, 0xEB, 0x97, 0x06, 0x4C, 0xF7, 0x02, 0x3D
+	  .data = {
+			0x86, 0x4F, 0x4D, 0xE8, 0x86, 0xE6, 0x3E, 0x66,
+			0x52, 0x97, 0xC7, 0x62, 0xAE, 0x8E, 0xA2, 0xDB,
+			0x01, 0xD6, 0x33, 0xA9, 0xA4, 0xCE, 0x02, 0xD5,
+			0xC2, 0xC5, 0x5F, 0x90, 0xE0, 0x89, 0x48, 0xD4,
+			0x92, 0xF4, 0xE5, 0x9A, 0xDA, 0x13, 0x76, 0xFF,
+			0x6E, 0x76, 0x6B, 0x71, 0x62, 0x28, 0xB2, 0xEC
 		},
 		.len = 384
 	},
@@ -428,15 +428,15 @@ struct snow3g_test_data snow3g_test_case_7 = {
 	},
 	.cipher_iv = {
 		.data = {
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
+			0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00,
+			0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
 	.auth_iv = {
 		.data = {
-			 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+			0x36, 0xAF, 0x61, 0x44, 0x98, 0x38, 0xF0, 0x3A,
+			0x36, 0xAF, 0x61, 0x44, 0x98, 0x38, 0xF0, 0x3A
 		},
 		.len = 16
 	},
@@ -457,28 +457,28 @@ struct snow3g_test_data snow3g_test_case_7 = {
 			0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,
 			0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,
 			0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,  0x5A,
-			0x5A,  0x5A,  0x5A,  0x5A,  0xF1,  0x9E,  0x2B,  0x6F,
+			0x5A,  0x5A,  0x5A,  0x5A,  0xBB,  0x2B,  0x8B,  0x15,
 		},
 		.len = 128 << 3
 	},
 	.ciphertext = {
 		.data = {
-			0x5A,  0x5A,  0xE4,  0xAD,  0x29,  0xA2,  0x6A,  0xA6,
-			0x20,  0x1D,  0xCD,  0x08,  0x50,  0xD6,  0xE6,  0x47,
-			0xBC,  0x88,  0x08,  0x01,  0x17,  0xFA,  0x47,  0x5B,
-			0x90,  0x40,  0xBA,  0x0C,  0xB5,  0x58,  0xF3,  0x0C,
-			0xA0,  0xD4,  0x98,  0x83,  0x1B,  0xCE,  0x54,  0xE3,
-			0x29,  0x00,  0x3C,  0xA4,  0xAD,  0x74,  0xEE,  0x05,
-			0xA3,  0x6C,  0xD4,  0xAC,  0xC6,  0x30,  0x33,  0xC9,
-			0x37,  0x57,  0x41,  0x9B,  0xD4,  0x73,  0xB9,  0x77,
-			0x70,  0x8B,  0x63,  0xDD,  0x22,  0xB8,  0xE1,  0x85,
-			0xB2,  0x92,  0x7C,  0x37,  0xD3,  0x2E,  0xD9,  0xF4,
-			0x4A,  0x69,  0x25,  0x30,  0xE3,  0x5B,  0x8B,  0xF6,
-			0x0F,  0xDE,  0x0B,  0x92,  0xD5,  0x25,  0x52,  0x6D,
-			0x26,  0xEB,  0x2F,  0x8A,  0x3B,  0x8B,  0x38,  0xE2,
-			0x48,  0xD3,  0x4A,  0x98,  0xF7,  0x3A,  0xC2,  0x46,
-			0x69,  0x8D,  0x73,  0x3E,  0x57,  0x88,  0x2C,  0x80,
-			0xF0,  0xF2,  0x75,  0xB8,  0x7D,  0x27,  0xC6,  0xDA,
+			0x5A,  0x5A,  0x8A,  0x35,  0xF7,  0x36,  0xDA,  0xD7,
+			0xC4,  0x2C,  0x10,  0xEA,  0x92,  0x9C,  0x00,  0xF0,
+			0xAE,  0x35,  0x5E,  0x8D,  0xB6,  0x88,  0x30,  0x66,
+			0x74,  0x8B,  0xA2,  0x82,  0x5C,  0xA7,  0xF3,  0x54,
+			0x75,  0x02,  0xA9,  0x90,  0x6B,  0x4B,  0x6A,  0x63,
+			0xFF,  0x4B,  0x08,  0xFE,  0x11,  0x3C,  0x5A,  0x53,
+			0xEE,  0x68,  0x14,  0x41,  0x17,  0xCD,  0x7B,  0x27,
+			0x88,  0xAF,  0x99,  0xE2,  0x9C,  0x86,  0x42,  0x12,
+			0x97,  0x93,  0xF0,  0xE6,  0xE2,  0xB2,  0x2D,  0xDA,
+			0x2C,  0x59,  0xB0,  0xA7,  0x09,  0xF6,  0x32,  0xC0,
+			0x35,  0x9A,  0xD3,  0xBA,  0xDC,  0x8F,  0x2E,  0x18,
+			0x97,  0x87,  0x44,  0xD6,  0x43,  0xFA,  0x86,  0x5A,
+			0xB0,  0xA2,  0x5A,  0xB8,  0x5F,  0x57,  0xE3,  0x2F,
+			0x73,  0x9C,  0x01,  0x3A,  0x02,  0x08,  0x8C,  0xEB,
+			0xA0,  0x5D,  0x74,  0x58,  0x5A,  0xA1,  0x58,  0x17,
+			0x5E,  0x86,  0x96,  0xE6,  0x9C,  0xEE,  0x8C,  0xA8
 
 		},
 		.len = 128 << 3
@@ -493,7 +493,7 @@ struct snow3g_test_data snow3g_test_case_7 = {
 	},
 	.digest = {
 		.data = {
-			0x7D, 0x27, 0xC6, 0xDA
+			0x9C, 0xEE, 0x8C, 0xA8
 		},
 		.len = 4,
 		.offset_bytes = 124
@@ -520,15 +520,15 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_2 = {
 	},
 	.cipher_iv = {
 		.data = {
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
+			0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
+			0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
 	.auth_iv = {
 		.data = {
-			 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+			0x3E, 0xDC, 0x87, 0xE2, 0xA4, 0xF2, 0xD8, 0xE2,
+			0x3E, 0xDC, 0x87, 0xE2, 0xA4, 0xF2, 0xD8, 0xE2
 		},
 		.len = 16
 	},
@@ -556,22 +556,22 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_2 = {
 	},
 	.ciphertext = {
 		.data = {
-			0x5A,  0x5A,  0xE4,  0xAD,  0x29,  0xA2,  0x6A,  0xA6,
-			0x20,  0x1D,  0xCD,  0x08,  0x50,  0xD6,  0xE6,  0x47,
-			0xBC,  0x88,  0x08,  0x01,  0x17,  0xFA,  0x47,  0x5B,
-			0x90,  0x40,  0xBA,  0x0C,  0xB5,  0x58,  0xF3,  0x0C,
-			0xA0,  0xD4,  0x98,  0x83,  0x1B,  0xCE,  0x54,  0xE3,
-			0x29,  0x00,  0x3C,  0xA4,  0xAD,  0x74,  0xEE,  0x05,
-			0xA3,  0x6C,  0xD4,  0xAC,  0xC6,  0x30,  0x33,  0xC9,
-			0x37,  0x57,  0x41,  0x9B,  0xD4,  0x73,  0xB9,  0x77,
-			0x70,  0x8B,  0x63,  0xDD,  0x22,  0xB8,  0xE1,  0x85,
-			0xB2,  0x92,  0x7C,  0x37,  0xD3,  0x2E,  0xD9,  0xF4,
-			0x4A,  0x69,  0x25,  0x30,  0xE3,  0x5B,  0x8B,  0xF6,
-			0x0F,  0xDE,  0x0B,  0x92,  0xD5,  0x25,  0x52,  0x6D,
-			0x26,  0xEB,  0x2F,  0x8A,  0x3B,  0x8B,  0x38,  0xE2,
-			0x48,  0xD3,  0x4A,  0x98,  0xF7,  0x3A,  0xC2,  0x46,
-			0x69,  0x8D,  0x73,  0x3E,  0x57,  0x88,  0x2C,  0x80,
-			0xF0,  0xF2,  0x75,  0xB8,  0x7D,  0x27,  0xC6,  0xDA,
+			0x5A,  0x5A,  0xCF,  0xCF,  0x3D,  0x11,  0xBF,  0xD9,
+			0xC3,  0x7F,  0x7C,  0xA8,  0x1A,  0x9F,  0x9F,  0x34,
+			0xC5,  0x6E,  0x1B,  0x2C,  0xE0,  0x81,  0x4B,  0x66,
+			0x87,  0xCB,  0xD5,  0x61,  0x04,  0xED,  0xBC,  0x69,
+			0x79,  0x86,  0x73,  0x48,  0x69,  0x4A,  0xBA,  0x55,
+			0x44,  0x6C,  0xEF,  0xD9,  0x34,  0x61,  0x59,  0x67,
+			0x80,  0x4E,  0x03,  0x95,  0x0A,  0xA1,  0x6C,  0xBA,
+			0x74,  0xBD,  0xAF,  0x11,  0x4B,  0xE6,  0x98,  0x61,
+			0x4E,  0xD4,  0x3E,  0xE4,  0x99,  0x55,  0x5C,  0x3A,
+			0x8C,  0x3E,  0xC0,  0x01,  0x6E,  0x15,  0xE1,  0x0E,
+			0x71,  0x4C,  0x89,  0x43,  0x8A,  0x48,  0x69,  0x6D,
+			0x02,  0x10,  0xC6,  0x54,  0x37,  0x18,  0xAA,  0x10,
+			0x90,  0x80,  0x0B,  0x69,  0x08,  0xB4,  0xF9,  0x4D,
+			0xD1,  0x2E,  0x43,  0xD9,  0x92,  0xAF,  0x06,  0x4A,
+			0xAF,  0x26,  0x25,  0x77,  0x37,  0xD0,  0xFC,  0x3C,
+			0xA0,  0xCB,  0xAF,  0x06,  0x95,  0x26,  0x30,  0x38,
 
 		},
 		.len = 128 << 3
@@ -586,7 +586,7 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_2 = {
 	},
 	.digest = {
 		.data = {
-			0x7D, 0x27, 0xC6, 0xDA
+			0x95, 0x26, 0x30, 0x38
 		},
 		.len = 4,
 		.offset_bytes = 124
@@ -613,15 +613,15 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_3 = {
 	},
 	.cipher_iv = {
 		.data = {
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
+			0x39, 0x8A, 0x59, 0xB4, 0x2C, 0x00, 0x00, 0x00,
+			0x39, 0x8A, 0x59, 0xB4, 0x2C, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
 	.auth_iv = {
 		.data = {
-			 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+			0x29, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0x77, 0x37,
+			0x29, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0x77, 0x37
 		},
 		.len = 16
 	},
@@ -636,10 +636,10 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_3 = {
 	},
 	.ciphertext = {
 		.data = {
-			0x5A, 0x5A, 0xE4, 0xAD, 0x29, 0xA2, 0x6A, 0xA6,
-			0x20, 0x1D, 0xCD, 0x08, 0x50, 0xD6, 0xE6, 0x47,
-			0xBC, 0x88, 0x08, 0x01, 0x17, 0xFA, 0x47, 0x5B,
-			0x90, 0x40, 0xBA, 0x0C, 0xBA, 0x6D, 0x6A, 0x5E,
+			0x5A, 0x5A, 0x93, 0xB0, 0x3F, 0xA4, 0xEB, 0xD4,
+			0x51, 0x12, 0x3B, 0x95, 0x93, 0x12, 0xBF, 0xBE,
+			0xF2, 0xFE, 0xA5, 0xAE, 0xE7, 0xF4, 0x80, 0x3E,
+			0xB2, 0xD1, 0xFF, 0x5F, 0xD9, 0x32, 0x72, 0xFE,
 		},
 		.len = 32 << 3
 	},
@@ -653,7 +653,7 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_3 = {
 	},
 	.digest = {
 		.data = {
-			0xBA, 0x6D, 0x6A, 0x5E
+			0xD9, 0x32, 0x72, 0xFE
 		},
 		.len = 4,
 		.offset_bytes = 28
@@ -680,15 +680,15 @@ struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = {
 	},
 	.cipher_iv = {
 		.data = {
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
+			0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00,
+			0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00
 		},
 		.len = 16
 	},
 	.auth_iv = {
 		.data = {
-			 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-			 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+			0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD
 		},
 		.len = 16
 	},
@@ -704,9 +704,9 @@ struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = {
 	.ciphertext = {
 		.data = {
 			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
-			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0xE4, 0xAD,
-			0x29, 0xA2, 0x6A, 0xA6, 0x20, 0x1D, 0xCD, 0x08,
-			0x50, 0xD6, 0xE6, 0x47, 0xB3, 0xBD, 0xC3, 0x08
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0xA2, 0xB7,
+			0xDF, 0xA7, 0x98, 0xA1, 0xD8, 0xD4, 0x9B, 0x6E,
+			0x2C, 0x7A, 0x66, 0x15, 0xCC, 0x4C, 0xE5, 0xE0
 		},
 		.len = 32 << 3
 	},
@@ -720,7 +720,7 @@ struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = {
 	},
 	.digest = {
 		.data = {
-			0xB3, 0xBD, 0xC3, 0x08
+			0xCC, 0x4C, 0xE5, 0xE0
 		},
 		.len = 4,
 		.offset_bytes = 28
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.422321098 +0200
+++ 0079-test-crypto-fix-SNOW3G-vector-IV-format.patch	2022-07-07 09:54:11.021824964 +0200
@@ -1 +1 @@
-From 3271c24b295caa7ee3fe227225a2ce962757d9c4 Mon Sep 17 00:00:00 2001
+From 9ea7a5a2cf74eeaa2c8a8c2f12b1b48b45a6035b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3271c24b295caa7ee3fe227225a2ce962757d9c4 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org

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

* patch 'examples/fips_validation: handle empty payload' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (77 preceding siblings ...)
  2022-07-07  7:55 ` patch 'test/crypto: fix SNOW3G " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'crypto/qat: fix DOCSIS crash' " christian.ehrhardt
                   ` (6 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b5d8c94a0533303a7be6ce90d3c1433e47e73578 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Tue, 28 Jun 2022 18:41:09 +0530
Subject: [PATCH] examples/fips_validation: handle empty payload

[ upstream commit 0fab1428332bdfb213b51e068625d38419488646 ]

Allocate at least onebyte to handle empty payload in a test vector
when defined.

Fixes: 3d0fad56b74 ("examples/fips_validation: add crypto FIPS application")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 examples/fips_validation/fips_validation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index 701d87dc4d..0bed91a821 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -516,7 +516,7 @@ parse_uint8_hex_str(const char *key, char *src, struct fips_val *val)
 		val->val = NULL;
 	}
 
-	val->val = rte_zmalloc(NULL, len, 0);
+	val->val = rte_zmalloc(NULL, len + 1, 0);
 	if (!val->val)
 		return -ENOMEM;
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.455710835 +0200
+++ 0080-examples-fips_validation-handle-empty-payload.patch	2022-07-07 09:54:11.021824964 +0200
@@ -1 +1 @@
-From 0fab1428332bdfb213b51e068625d38419488646 Mon Sep 17 00:00:00 2001
+From b5d8c94a0533303a7be6ce90d3c1433e47e73578 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0fab1428332bdfb213b51e068625d38419488646 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 94e31abf83..324abccb14 100644
+index 701d87dc4d..0bed91a821 100644
@@ -22 +23 @@
-@@ -630,7 +630,7 @@ parse_uint8_hex_str(const char *key, char *src, struct fips_val *val)
+@@ -516,7 +516,7 @@ parse_uint8_hex_str(const char *key, char *src, struct fips_val *val)

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

* patch 'crypto/qat: fix DOCSIS crash' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (78 preceding siblings ...)
  2022-07-07  7:55 ` patch 'examples/fips_validation: handle empty payload' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'doc: fix grammar and formatting in compressdev guide' " christian.ehrhardt
                   ` (5 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Rebecca Troy; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 02686ad4e9e94929c4c0605856c21b68c22f37c2 Mon Sep 17 00:00:00 2001
From: Rebecca Troy <rebecca.troy@intel.com>
Date: Wed, 29 Jun 2022 16:10:36 +0000
Subject: [PATCH] crypto/qat: fix DOCSIS crash

[ upstream commit 03f0e3608d44d468b22ed17c30144d87edeb3ee9 ]

Currently if AES or DES algorithms fail for DOCSIS test suite,
a segmentation fault occurs when cryptodev_qat_autotest is ran.

This is due to a duplicate call of EVP_CIPHER_CTX_free for the
session context. Ctx is freed firstly in the bpi_cipher_ctx_init
function and then again at the end of qat_sym_session_configure_cipher
function.

This commit fixes this bug by removing the first instance
of EVP_CIPHER_CTX_free, leaving just the dedicated function in
the upper level to free the ctx.

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

Signed-off-by: Rebecca Troy <rebecca.troy@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/crypto/qat/qat_sym_session.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 17647ea7b5..8c148c9cef 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -97,8 +97,10 @@ bpi_cipher_ctx_init(enum rte_crypto_cipher_algorithm cryptodev_algo,
 	return 0;
 
 ctx_init_err:
-	if (*ctx != NULL)
+	if (*ctx != NULL) {
 		EVP_CIPHER_CTX_free(*ctx);
+		*ctx = NULL;
+	}
 	return ret;
 }
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.488468661 +0200
+++ 0081-crypto-qat-fix-DOCSIS-crash.patch	2022-07-07 09:54:11.021824964 +0200
@@ -1 +1 @@
-From 03f0e3608d44d468b22ed17c30144d87edeb3ee9 Mon Sep 17 00:00:00 2001
+From 02686ad4e9e94929c4c0605856c21b68c22f37c2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 03f0e3608d44d468b22ed17c30144d87edeb3ee9 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index e40c042ba9..b30396487e 100644
+index 17647ea7b5..8c148c9cef 100644
@@ -31 +32 @@
-@@ -136,8 +136,10 @@ bpi_cipher_ctx_init(enum rte_crypto_cipher_algorithm cryptodev_algo,
+@@ -97,8 +97,10 @@ bpi_cipher_ctx_init(enum rte_crypto_cipher_algorithm cryptodev_algo,

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

* patch 'doc: fix grammar and formatting in compressdev guide' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (79 preceding siblings ...)
  2022-07-07  7:55 ` patch 'crypto/qat: fix DOCSIS crash' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'eventdev/eth_tx: fix queue delete' " christian.ehrhardt
                   ` (4 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Ciara Power; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5f21992197eea43a00d265a7dabcf6f9ef232303 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Mon, 30 May 2022 16:03:42 +0000
Subject: [PATCH] doc: fix grammar and formatting in compressdev guide

[ upstream commit 4c9484373fcd0aa4a240fdb2e797269eb2f26b9b ]

Small improvements made to the compressdev programmer's guide.
This includes rephrasing some sentences, fixing grammar,
and aligning formatting.

Fixes: a584d3bea902 ("doc: add compressdev library guide")
Fixes: f7095d41bba6 ("doc: clarify data plane error handling in compressdev")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 doc/guides/prog_guide/compressdev.rst | 283 ++++++++++++++------------
 1 file changed, 148 insertions(+), 135 deletions(-)

diff --git a/doc/guides/prog_guide/compressdev.rst b/doc/guides/prog_guide/compressdev.rst
index dbdcbef4e6..18004e5ca2 100644
--- a/doc/guides/prog_guide/compressdev.rst
+++ b/doc/guides/prog_guide/compressdev.rst
@@ -2,7 +2,7 @@
     Copyright(c) 2017-2018 Cavium Networks.
 
 Compression Device Library
-===========================
+==========================
 
 The compression framework provides a generic set of APIs to perform compression services
 as well as to query and configure compression devices both physical(hardware) and virtual(software)
@@ -32,10 +32,10 @@ From the command line using the --vdev EAL option
 
 .. Note::
 
-   * If DPDK application requires multiple software compression PMD devices then required
-     number of ``--vdev`` with appropriate libraries are to be added.
+   * If a DPDK application requires multiple software compression PMD devices then the
+     required number of ``--vdev`` args with appropriate libraries are to be added.
 
-   * An Application with multiple compression device instances exposed by the same PMD must
+   * An application with multiple compression device instances exposed by the same PMD must
      specify a unique name for each device.
 
    Example: ``--vdev  'pmd0' --vdev  'pmd1'``
@@ -53,7 +53,7 @@ All virtual compression devices support the following initialization parameters:
 Device Identification
 ~~~~~~~~~~~~~~~~~~~~~
 
-Each device, whether virtual or physical is uniquely designated by two
+Each device, whether virtual or physical, is uniquely designated by two
 identifiers:
 
 - A unique device index used to designate the compression device in all functions
@@ -76,7 +76,7 @@ The ``rte_compressdev_configure`` API is used to configure a compression device.
 The ``rte_compressdev_config`` structure is used to pass the configuration
 parameters.
 
-See *DPDK API Reference* for details.
+See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details.
 
 Configuration of Queue Pairs
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -85,87 +85,88 @@ Each compression device queue pair is individually configured through the
 ``rte_compressdev_queue_pair_setup`` API.
 
 The ``max_inflight_ops`` is used to pass maximum number of
-rte_comp_op that could be present in a queue at-a-time.
-PMD then can allocate resources accordingly on a specified socket.
+``rte_comp_op`` that could be present in a queue at a time.
+The PMD can then allocate resources accordingly on a specified socket.
 
-See *DPDK API Reference* for details.
+See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details.
 
-Logical Cores, Memory and Queues Pair Relationships
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Logical Cores, Memory and Queue Pair Relationships
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Library supports NUMA similarly as described in Cryptodev library section.
+The Compressdev library supports NUMA similarly as described in Cryptodev library section.
 
-A queue pair cannot be shared and should be exclusively used by a single processing
-context for enqueuing operations or dequeuing operations on the same compression device
+A queue pair cannot be shared, and should be exclusively used by a single processing
+context for enqueuing operations or dequeuing operations on the same compression device,
 since sharing would require global locks and hinder performance. It is however possible
 to use a different logical core to dequeue an operation on a queue pair from the logical
-core on which it was enqueued. This means that a compression burst enqueue/dequeue
+core on which it was enqueued. This means that for a compression burst, enqueue/dequeue
 APIs are a logical place to transition from one logical core to another in a
 data processing pipeline.
 
 Device Features and Capabilities
----------------------------------
+--------------------------------
 
 Compression devices define their functionality through two mechanisms, global device
-features and algorithm features. Global devices features identify device
-wide level features which are applicable to the whole device such as supported hardware
+features and algorithm features. Global device features identify device
+wide level features which are applicable to the whole device, such as supported hardware
 acceleration and CPU features. List of compression device features can be seen in the
 RTE_COMPDEV_FF_XXX macros.
 
-The algorithm features lists individual algo feature which device supports per-algorithm,
-such as a stateful compression/decompression, checksums operation etc. List of algorithm
-features can be seen in the RTE_COMP_FF_XXX macros.
+The algorithm features are features which the device supports per-algorithm,
+such as a stateful compression/decompression, checksums operation etc.
+The list of algorithm features can be seen in the RTE_COMP_FF_XXX macros.
 
 Capabilities
 ~~~~~~~~~~~~
 Each PMD has a list of capabilities, including algorithms listed in
-enum ``rte_comp_algorithm`` and its associated feature flag and
-sliding window range in log base 2 value. Sliding window tells
-the minimum and maximum size of lookup window that algorithm uses
+the enum ``rte_comp_algorithm``, its associated feature flag, and
+sliding window range in log base 2 value. The sliding window range
+defines the minimum and maximum size of a lookup window that an algorithm uses
 to find duplicates.
 
-See *DPDK API Reference* for details.
+See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details.
 
 Each Compression poll mode driver defines its array of capabilities
-for each algorithm it supports. See PMD implementation for capability
+for each algorithm it supports. See the PMD implementation for capability
 initialization.
 
 Capabilities Discovery
 ~~~~~~~~~~~~~~~~~~~~~~
 
-PMD capability and features are discovered via ``rte_compressdev_info_get`` function.
+PMD capability and features are discovered via the ``rte_compressdev_info_get`` function.
 
 The ``rte_compressdev_info`` structure contains all the relevant information for the device.
 
-See *DPDK API Reference* for details.
+See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details.
 
 Compression Operation
-----------------------
+---------------------
 
 DPDK compression supports two types of compression methodologies:
 
-- Stateless, data associated to a compression operation is compressed without any reference
+- Stateless - data associated with a compression operation is compressed without any reference
   to another compression operation.
 
-- Stateful, data in each compression operation is compressed with reference to previous compression
+- Stateful - data in each compression operation is compressed with reference to previous compression
   operations in the same data stream i.e. history of data is maintained between the operations.
 
-For more explanation, please refer RFC https://www.ietf.org/rfc/rfc1951.txt
+For more explanation, please refer to the RFC https://www.ietf.org/rfc/rfc1951.txt
 
 Operation Representation
 ~~~~~~~~~~~~~~~~~~~~~~~~
 
-Compression operation is described via ``struct rte_comp_op``, which contains both input and
+A compression operation is described via ``struct rte_comp_op``, which contains both input and
 output data. The operation structure includes the operation type (stateless or stateful),
-the operation status and the priv_xform/stream handle, source, destination and checksum buffer
+the operation status, the priv_xform/stream handle, source, destination and checksum buffer
 pointers. It also contains the source mempool from which the operation is allocated.
-PMD updates consumed field with amount of data read from source buffer and produced
-field with amount of data of written into destination buffer along with status of
-operation. See section *Produced, Consumed And Operation Status* for more details.
-
-Compression operations mempool also has an ability to allocate private memory with the
-operation for application's purposes. Application software is responsible for specifying
-all the operation specific fields in the ``rte_comp_op`` structure which are then used
+The PMD updates the consumed field with the amount of data read from the source buffer,
+and the produced field with the amount of data written into the destination buffer,
+along with status of operation.
+See the section :ref:`compressdev_prod_cons_op_status`: for more details.
+
+The compression operations mempool also has the ability to allocate private memory with the
+operation for the application's use. The application software is responsible for specifying
+all the operation specific fields in the ``rte_comp_op`` structure, which are then used
 by the compression PMD to process the requested operation.
 
 
@@ -181,27 +182,27 @@ A ``rte_comp_op`` contains a field indicating the pool it originated from.
 
 ``rte_comp_op_alloc()`` and ``rte_comp_op_bulk_alloc()`` are used to allocate
 compression operations from a given compression operation mempool.
-The operation gets reset before being returned to a user so that operation
+The operation gets reset before being returned to a user so that the operation
 is always in a good known state before use by the application.
 
 ``rte_comp_op_free()`` is called by the application to return an operation to
 its allocating pool.
 
-See *DPDK API Reference* for details.
+See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details.
 
 Passing source data as mbuf-chain
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 If input data is scattered across several different buffers, then
-Application can either parse through all such buffers and make one
+the application can either parse through all such buffers and make one
 mbuf-chain and enqueue it for processing or, alternatively, it can
-make multiple sequential enqueue_burst() calls for each of them
-processing them statefully. See *Compression API Stateful Operation*
+make multiple sequential enqueue_burst() calls for each of them,
+processing them statefully. See :ref:`compressdev_stateful_op`:
 for stateful processing of ops.
 
 Operation Status
 ~~~~~~~~~~~~~~~~
-Each operation carries a status information updated by PMD after it is processed.
-Following are currently supported:
+Each operation carries status information updated by the PMD after it is processed.
+The following are currently supported:
 
 - RTE_COMP_OP_STATUS_SUCCESS,
     Operation is successfully completed
@@ -225,22 +226,25 @@ Following are currently supported:
 - RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE,
     Output buffer ran out of space before operation completed, but this
     is not an error case. Output data up to op.produced can be used and
-    next op in the stream should continue on from op.consumed+1.
+    the next op in the stream should continue on from op.consumed+1.
 
 Operation status after enqueue / dequeue
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Some of the above values may arise in the op after an
-``rte_compressdev_enqueue_burst()``. If number ops enqueued < number ops requested then
-the app should check the op.status of nb_enqd+1. If status is RTE_COMP_OP_STATUS_NOT_PROCESSED,
-it likely indicates a full-queue case for a hardware device and a retry after dequeuing some ops is likely
-to be successful. If the op holds any other status, e.g. RTE_COMP_OP_STATUS_INVALID_ARGS, a retry with
+``rte_compressdev_enqueue_burst()``. If the number of ops enqueued < the number of ops requested
+then the app should check the op.status of nb_enqd+1.
+If the status is RTE_COMP_OP_STATUS_NOT_PROCESSED, it likely indicates a full-queue case for a
+hardware device, and a retry after dequeuing some ops is likely to be successful.
+If the op holds any other status, e.g. RTE_COMP_OP_STATUS_INVALID_ARGS, a retry with
 the same op is unlikely to be successful.
 
 
+.. _compressdev_prod_cons_op_status:
+
 Produced, Consumed And Operation Status
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-- If status is RTE_COMP_OP_STATUS_SUCCESS,
+- If the status is RTE_COMP_OP_STATUS_SUCCESS,
     consumed = amount of data read from input buffer, and
     produced = amount of data written in destination buffer
 - If status is RTE_COMP_OP_STATUS_ERROR,
@@ -253,37 +257,37 @@ Produced, Consumed And Operation Status
 - If status is RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE,
     consumed = amount of data read, and
     produced = amount of data successfully produced until
-    out of space condition hit. PMD has ability to recover
-    from here, so application can submit next op from
-    consumed+1 and a destination buffer with available space.
+    out of space condition hit. The PMD has ability to recover
+    from here, so an application can submit the next op from
+    consumed+1, and a destination buffer with available space.
 
 Transforms
 ----------
 
 Compression transforms (``rte_comp_xform``) are the mechanism
 to specify the details of the compression operation such as algorithm,
-window size and checksum.
+window size, and checksum.
 
 Compression API Hash support
 ----------------------------
 
-Compression API allows application to enable digest calculation
+The compression API allows an application to enable digest calculation
 alongside compression and decompression of data. A PMD reflects its
 support for hash algorithms via capability algo feature flags.
-If supported, PMD calculates digest always on plaintext i.e.
+If supported, the PMD always calculates the digest on plaintext i.e.
 before compression and after decompression.
 
 Currently supported list of hash algos are SHA-1 and SHA2 family
 SHA256.
 
-See *DPDK API Reference* for details.
+See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details.
 
-If required, application should set valid hash algo in compress
+If required, the application should set the valid hash algo in compress
 or decompress xforms during ``rte_compressdev_stream_create()``
-or ``rte_compressdev_private_xform_create()`` and pass a valid
+or ``rte_compressdev_private_xform_create()``, and pass a valid
 output buffer in ``rte_comp_op`` hash field struct to store the
-resulting digest. Buffer passed should be contiguous and large
-enough to store digest which is 20 bytes for SHA-1 and
+resulting digest. The buffer passed should be contiguous and large
+enough to store digest, which is 20 bytes for SHA-1 and
 32 bytes for SHA2-256.
 
 Compression API Stateless operation
@@ -295,20 +299,21 @@ An op is processed stateless if it has
 (required only on compression side),
 - All required input in source buffer
 
-When all of the above conditions are met, PMD initiates stateless processing
+When all of the above conditions are met, the PMD initiates stateless processing
 and releases acquired resources after processing of current operation is
-complete. Application can enqueue multiple stateless ops in a single burst
+complete. The application can enqueue multiple stateless ops in a single burst
 and must attach priv_xform handle to such ops.
 
 priv_xform in Stateless operation
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-priv_xform is PMD internally managed private data that it maintains to do stateless processing.
-priv_xforms are initialized provided a generic xform structure by an application via making call
-to ``rte_compressdev_private_xform_create``, at an output PMD returns an opaque priv_xform reference.
-If PMD support SHAREABLE priv_xform indicated via algorithm feature flag, then application can
-attach same priv_xform with many stateless ops at-a-time. If not, then application needs to
-create as many priv_xforms as it expects to have stateless operations in-flight.
+A priv_xform is private data managed internally by the PMD to do stateless processing.
+A priv_xform is initialized by an application providing a generic xform structure
+to ``rte_compressdev_private_xform_create``, which returns an opaque priv_xform reference.
+If the PMD supports SHAREABLE priv_xform, indicated via algorithm feature flag,
+then the application can attach the same priv_xform with many stateless ops at a time.
+If not, then the application needs to create as many priv_xforms as it expects to have
+stateless operations in-flight.
 
 .. figure:: img/stateless-op.*
 
@@ -320,8 +325,9 @@ create as many priv_xforms as it expects to have stateless operations in-flight.
    Stateless Ops using Shareable priv_xform
 
 
-Application should call ``rte_compressdev_private_xform_create()`` and attach to stateless op before
-enqueuing them for processing and free via ``rte_compressdev_private_xform_free()`` during termination.
+The application should call ``rte_compressdev_private_xform_create()`` and attach it to a stateless
+op before enqueuing them for processing and free via ``rte_compressdev_private_xform_free()``
+during termination.
 
 An example pseudocode to setup and process NUM_OPS stateless ops with each of length OP_LEN
 using priv_xform would look like:
@@ -399,75 +405,80 @@ using priv_xform would look like:
 
 
 Stateless and OUT_OF_SPACE
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-OUT_OF_SPACE is a condition when output buffer runs out of space and where PMD
-still has more data to produce. If PMD runs into such condition, then PMD returns
-RTE_COMP_OP_OUT_OF_SPACE_TERMINATED error. In such case, PMD resets itself and can set
+OUT_OF_SPACE is a condition when the output buffer runs out of space and where the PMD
+still has more data to produce. If the PMD runs into such condition, then the PMD returns
+RTE_COMP_OP_OUT_OF_SPACE_TERMINATED error. In such case, the PMD resets itself and can set
 consumed=0 and produced=amount of output it could produce before hitting out_of_space.
-Application would need to resubmit the whole input with a larger output buffer, if it
+The application would need to resubmit the whole input with a larger output buffer, if it
 wants the operation to be completed.
 
 Hash in Stateless
 ~~~~~~~~~~~~~~~~~
-If hash is enabled, digest buffer will contain valid data after op is successfully
+If hash is enabled, the digest buffer will contain valid data after an op is successfully
 processed i.e. dequeued with status = RTE_COMP_OP_STATUS_SUCCESS.
 
 Checksum in Stateless
 ~~~~~~~~~~~~~~~~~~~~~
-If checksum is enabled, checksum will only be available after op is successfully
+If checksum is enabled, checksum will only be available after an op is successfully
 processed i.e. dequeued with status = RTE_COMP_OP_STATUS_SUCCESS.
 
+.. _compressdev_stateful_op:
+
 Compression API Stateful operation
 -----------------------------------
 
-Compression API provide RTE_COMP_FF_STATEFUL_COMPRESSION and
-RTE_COMP_FF_STATEFUL_DECOMPRESSION feature flag for PMD to reflect
+The compression API provides RTE_COMP_FF_STATEFUL_COMPRESSION and
+RTE_COMP_FF_STATEFUL_DECOMPRESSION feature flag for the PMD to reflect
 its support for Stateful operations.
 
-A Stateful operation in DPDK compression means application invokes enqueue
-burst() multiple times to process related chunk of data because
-application broke data into several ops.
+A Stateful operation in DPDK compression means the application invokes enqueue
+burst() multiple times to process a related chunk of data because the
+application broke the data into several ops.
 
-In such case
+In such cases
 - ops are setup with op_type RTE_COMP_OP_STATEFUL,
-- all ops except last set to flush value = RTE_COMP_FLUSH_NONE/SYNC
-and last set to flush value RTE_COMP_FLUSH_FULL/FINAL.
+- all ops except the last are set with flush value = RTE_COMP_FLUSH_NONE/SYNC
+and the last is set with flush value RTE_COMP_FLUSH_FULL/FINAL.
 
-In case of either one or all of the above conditions, PMD initiates
-stateful processing and releases acquired resources after processing
+In case of either one or all of the above conditions, the PMD initiates
+stateful processing and releases acquired resources after processing the
 operation with flush value = RTE_COMP_FLUSH_FULL/FINAL is complete.
-Unlike stateless, application can enqueue only one stateful op from
-a particular stream at a time and must attach stream handle
+Unlike stateless, the application can enqueue only one stateful op from
+a particular stream at a time and must attach a stream handle
 to each op.
 
 Stream in Stateful operation
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-`stream` in DPDK compression is a logical entity which identifies related set of ops, say, a one large
-file broken into multiple chunks then file is represented by a stream and each chunk of that file is
-represented by compression op `rte_comp_op`. Whenever application wants a stateful processing of such
-data, then it must get a stream handle via making call to ``rte_compressdev_stream_create()``
-with xform, at an output the target PMD will return an opaque stream handle to application which
-it must attach to all of the ops carrying data of that stream. In stateful processing, every op
-requires previous op data for compression/decompression. A PMD allocates and set up resources such
-as history, states, etc. within a stream, which are maintained during the processing of the related ops.
+A stream in DPDK compression is a logical entity which identifies a related set of ops.
+For example, one large file broken into multiple chunks, then the file is represented by a stream,
+and each chunk of that file is represented by a compression op ``rte_comp_op``.
+Whenever an application wants stateful processing of such data, then it must get a stream handle
+via making call to ``rte_compressdev_stream_create()`` with an xform, which will return an opaque
+stream handle to attach to all of the ops carrying data of that stream.
+In stateful processing, every op requires previous op data for compression/decompression.
+A PMD allocates and sets up resources such as history, states, etc. within a stream,
+which are maintained during the processing of related ops.
 
-Unlike priv_xforms, stream is always a NON_SHAREABLE entity. One stream handle must be attached to only
-one set of related ops and cannot be reused until all of them are processed with status Success or failure.
+Unlike priv_xforms, a stream is always a NON_SHAREABLE entity. One stream handle must be attached
+to only one set of related ops and cannot be reused until all of them are processed with a
+success/failure status.
 
 .. figure:: img/stateful-op.*
 
    Stateful Ops
 
 
-Application should call ``rte_compressdev_stream_create()`` and attach to op before
+An application should call ``rte_compressdev_stream_create()`` and attach it to the op before
 enqueuing them for processing and free via ``rte_compressdev_stream_free()`` during
-termination. All ops that are to be processed statefully should carry *same* stream.
+termination. All ops that are to be processed statefully should carry the *same* stream.
 
-See *DPDK API Reference* document for details.
+See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details.
 
-An example pseudocode to set up and process a stream having NUM_CHUNKS with each chunk size of CHUNK_LEN would look like:
+An example pseudocode to set up and process a stream having NUM_CHUNKS,
+with each chunk size of CHUNK_LEN, would look like:
 
 .. code-block:: c
 
@@ -549,64 +560,65 @@ An example pseudocode to set up and process a stream having NUM_CHUNKS with each
 
 
 Stateful and OUT_OF_SPACE
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~
 
-If PMD supports stateful operation, then OUT_OF_SPACE status is not an actual
-error for the PMD. In such case, PMD returns with status
+If a PMD supports stateful operation, then an OUT_OF_SPACE status is not an actual
+error for the PMD. In such a case, the PMD returns with status
 RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE with consumed = number of input bytes
-read and produced = length of complete output buffer.
-Application should enqueue next op with source starting at consumed+1 and an
+read, and produced = length of complete output buffer.
+The application should enqueue the next op with source starting at consumed+1, and an
 output buffer with available space.
 
 Hash in Stateful
 ~~~~~~~~~~~~~~~~
-If enabled, digest buffer will contain valid digest after last op in stream
+If enabled, the digest buffer will contain valid digest after the last op in a stream
 (having flush = RTE_COMP_FLUSH_FINAL) is successfully processed i.e. dequeued
 with status = RTE_COMP_OP_STATUS_SUCCESS.
 
 Checksum in Stateful
 ~~~~~~~~~~~~~~~~~~~~
-If enabled, checksum will only be available after last op in stream
+If enabled, the checksum will only be available after the last op in a stream
 (having flush = RTE_COMP_FLUSH_FINAL) is successfully processed i.e. dequeued
 with status = RTE_COMP_OP_STATUS_SUCCESS.
 
 Burst in compression API
--------------------------
+------------------------
 
 Scheduling of compression operations on DPDK's application data path is
 performed using a burst oriented asynchronous API set. A queue pair on a compression
-device accepts a burst of compression operations using enqueue burst API. On physical
-devices the enqueue burst API will place the operations to be processed
+device accepts a burst of compression operations using the enqueue burst API.
+On physical devices the enqueue burst API will place the operations to be processed
 on the device's hardware input queue, for virtual devices the processing of the
 operations is usually completed during the enqueue call to the compression
 device. The dequeue burst API will retrieve any processed operations available
 from the queue pair on the compression device, from physical devices this is usually
-directly from the devices processed queue, and for virtual device's from a
+directly from the devices processed queue, and for virtual device's from an
 ``rte_ring`` where processed operations are placed after being processed on the
 enqueue call.
 
-A burst in DPDK compression can be a combination of stateless and stateful operations with a condition
-that for stateful ops only one op at-a-time should be enqueued from a particular stream i.e. no-two ops
-should belong to same stream in a single burst. However a burst may contain multiple stateful ops as long
-as each op is attached to a different stream i.e. a burst can look like:
+A burst in DPDK compression can be a combination of stateless and stateful operations with a
+condition that for stateful ops only one op at a time should be enqueued from a particular stream
+i.e. two ops should never belong to the same stream in a single burst.
+However, a burst may contain multiple stateful ops, as long as each op is attached to a different
+stream, i.e. a burst can look like:
 
 +---------------+--------------+--------------+-----------------+--------------+--------------+
 | enqueue_burst | op1.no_flush | op2.no_flush | op3.flush_final | op4.no_flush | op5.no_flush |
 +---------------+--------------+--------------+-----------------+--------------+--------------+
 
-Where, op1 .. op5 all belong to different independent data units. op1, op2, op4, op5 must be stateful
-as stateless ops can only use flush full or final and op3 can be of type stateless or stateful.
-Every op with type set to RTE_COMP_OP_STATELESS must be attached to priv_xform and
-Every op with type set to RTE_COMP_OP_STATEFUL *must* be attached to stream.
+Where, op1 .. op5 all belong to different independent data units. op1, op2, op4, op5 must be
+stateful as stateless ops can only use flush full or final and op3 can be of type stateless or
+stateful. Every op with type set to RTE_COMP_OP_STATELESS must be attached to priv_xform and
+every op with type set to RTE_COMP_OP_STATEFUL *must* be attached to stream.
 
 Since each operation in a burst is independent and thus can be completed
-out-of-order, applications which need ordering, should setup per-op user data
-area with reordering information so that it can determine enqueue order at
+out of order, applications which need ordering should setup a per-op user data
+area, with reordering information so that it can determine enqueue order at
 dequeue.
 
-Also if multiple threads calls enqueue_burst() on same queue pair then it’s
-application onus to use proper locking mechanism to ensure exclusive enqueuing
-of operations.
+Also, if multiple threads calls enqueue_burst() on the same queue pair then it's
+the application's responsibility to use a proper locking mechanism to ensure
+exclusive enqueuing of operations.
 
 Enqueue / Dequeue Burst APIs
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -629,9 +641,10 @@ Sample code
 -----------
 
 There are unit test applications that show how to use the compressdev library inside
-app/test/test_compressdev.c
+``app/test/test_compressdev.c``
 
 Compression Device API
 ~~~~~~~~~~~~~~~~~~~~~~
 
-The compressdev Library API is described in the *DPDK API Reference* document.
+The compressdev Library API is described in the
+`DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_.
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.523921703 +0200
+++ 0082-doc-fix-grammar-and-formatting-in-compressdev-guide.patch	2022-07-07 09:54:11.025824987 +0200
@@ -1 +1 @@
-From 4c9484373fcd0aa4a240fdb2e797269eb2f26b9b Mon Sep 17 00:00:00 2001
+From 5f21992197eea43a00d265a7dabcf6f9ef232303 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4c9484373fcd0aa4a240fdb2e797269eb2f26b9b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 07d1a62a63..2a59c434c1 100644
+index dbdcbef4e6..18004e5ca2 100644

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

* patch 'eventdev/eth_tx: fix queue delete' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (80 preceding siblings ...)
  2022-07-07  7:55 ` patch 'doc: fix grammar and formatting in compressdev guide' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'net/vhost: fix deadlock on vring state change' " christian.ehrhardt
                   ` (3 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Naga Harish K S V; +Cc: Jay Jayatheerthan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 288097da2bac2fbec9069bc533f81534e2bc57ef Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Date: Thu, 23 Jun 2022 15:35:11 +0530
Subject: [PATCH] eventdev/eth_tx: fix queue delete

[ upstream commit 881d4b4d8587419197815db57b94fc58ee487445 ]

Add spinlock protection in queue delete function.
This protects the data path while the queue delete operation
is in progress.

Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
---
 lib/librte_eventdev/rte_event_eth_tx_adapter.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
index cab4bd0811..e64c7ff2b6 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -844,9 +844,10 @@ txa_service_queue_del(uint8_t id,
 
 	txa = txa_service_id_to_data(id);
 
+	rte_spinlock_lock(&txa->tx_lock);
 	tqi = txa_service_queue(txa, port_id, tx_queue_id);
 	if (tqi == NULL || !tqi->added)
-		return 0;
+		goto ret_unlock;
 
 	tb = tqi->tx_buf;
 	tqi->added = 0;
@@ -856,6 +857,9 @@ txa_service_queue_del(uint8_t id,
 	txa->txa_ethdev[port_id].nb_queues--;
 
 	txa_service_queue_array_free(txa, port_id);
+
+ret_unlock:
+	rte_spinlock_unlock(&txa->tx_lock);
 	return 0;
 }
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.564442746 +0200
+++ 0083-eventdev-eth_tx-fix-queue-delete.patch	2022-07-07 09:54:11.025824987 +0200
@@ -1 +1 @@
-From 881d4b4d8587419197815db57b94fc58ee487445 Mon Sep 17 00:00:00 2001
+From 288097da2bac2fbec9069bc533f81534e2bc57ef Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 881d4b4d8587419197815db57b94fc58ee487445 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- lib/eventdev/rte_event_eth_tx_adapter.c | 6 +++++-
+ lib/librte_eventdev/rte_event_eth_tx_adapter.c | 6 +++++-
@@ -19,5 +20,5 @@
-diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
-index c700fb7b1f..b4b37f1cae 100644
---- a/lib/eventdev/rte_event_eth_tx_adapter.c
-+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
-@@ -891,9 +891,10 @@ txa_service_queue_del(uint8_t id,
+diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+index cab4bd0811..e64c7ff2b6 100644
+--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+@@ -844,9 +844,10 @@ txa_service_queue_del(uint8_t id,
@@ -35 +36 @@
-@@ -903,6 +904,9 @@ txa_service_queue_del(uint8_t id,
+@@ -856,6 +857,9 @@ txa_service_queue_del(uint8_t id,

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

* patch 'net/vhost: fix deadlock on vring state change' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (81 preceding siblings ...)
  2022-07-07  7:55 ` patch 'eventdev/eth_tx: fix queue delete' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'vhost: add some trailing newline in log messages' " christian.ehrhardt
                   ` (2 subsequent siblings)
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Yuan Wang; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 48e451fe409e603da6e21b72163cb53c25284dd1 Mon Sep 17 00:00:00 2001
From: Yuan Wang <yuanx.wang@intel.com>
Date: Mon, 27 Jun 2022 13:51:25 +0800
Subject: [PATCH] net/vhost: fix deadlock on vring state change

[ upstream commit 193edd75a94fe8d0d633d1702109779fd7b7d6a0 ]

If vring state changes after pmd starts working, the locked vring
notifies pmd, thus calling update_queuing_status(), the latter
will wait for pmd to finish accessing vring, while pmd is also
waiting for vring to be unlocked, thus causing deadlock.

Actually, update_queuing_status() only needs to wait while
destroy/stopping the device, but not in other cases.

This patch adds a flag for whether or not to wait to fix this issue.

Fixes: 1ce3c7fe149f ("net/vhost: emulate device start/stop behavior")

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 35dcd84b8b..bb714a5c90 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -652,7 +652,7 @@ eth_vhost_install_intr(struct rte_eth_dev *dev)
 }
 
 static void
-update_queuing_status(struct rte_eth_dev *dev)
+update_queuing_status(struct rte_eth_dev *dev, bool wait_queuing)
 {
 	struct pmd_internal *internal = dev->data->dev_private;
 	struct vhost_queue *vq;
@@ -678,7 +678,7 @@ update_queuing_status(struct rte_eth_dev *dev)
 			rte_atomic32_set(&vq->allow_queuing, 1);
 		else
 			rte_atomic32_set(&vq->allow_queuing, 0);
-		while (rte_atomic32_read(&vq->while_queuing))
+		while (wait_queuing && rte_atomic32_read(&vq->while_queuing))
 			rte_pause();
 	}
 
@@ -690,7 +690,7 @@ update_queuing_status(struct rte_eth_dev *dev)
 			rte_atomic32_set(&vq->allow_queuing, 1);
 		else
 			rte_atomic32_set(&vq->allow_queuing, 0);
-		while (rte_atomic32_read(&vq->while_queuing))
+		while (wait_queuing && rte_atomic32_read(&vq->while_queuing))
 			rte_pause();
 	}
 }
@@ -772,7 +772,7 @@ new_device(int vid)
 	eth_dev->data->dev_link.link_status = ETH_LINK_UP;
 
 	rte_atomic32_set(&internal->dev_attached, 1);
-	update_queuing_status(eth_dev);
+	update_queuing_status(eth_dev, false);
 
 	VHOST_LOG(INFO, "Vhost device %d created\n", vid);
 
@@ -802,7 +802,7 @@ destroy_device(int vid)
 	internal = eth_dev->data->dev_private;
 
 	rte_atomic32_set(&internal->dev_attached, 0);
-	update_queuing_status(eth_dev);
+	update_queuing_status(eth_dev, true);
 
 	eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
 
@@ -863,7 +863,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
 	state->max_vring = RTE_MAX(vring, state->max_vring);
 	rte_spinlock_unlock(&state->lock);
 
-	update_queuing_status(eth_dev);
+	update_queuing_status(eth_dev, false);
 
 	VHOST_LOG(INFO, "vring%u is %s\n",
 			vring, enable ? "enabled" : "disabled");
@@ -1050,7 +1050,7 @@ eth_dev_start(struct rte_eth_dev *eth_dev)
 	}
 
 	rte_atomic32_set(&internal->started, 1);
-	update_queuing_status(eth_dev);
+	update_queuing_status(eth_dev, false);
 
 	return 0;
 }
@@ -1061,7 +1061,7 @@ eth_dev_stop(struct rte_eth_dev *dev)
 	struct pmd_internal *internal = dev->data->dev_private;
 
 	rte_atomic32_set(&internal->started, 0);
-	update_queuing_status(dev);
+	update_queuing_status(dev, true);
 }
 
 static void
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.600465371 +0200
+++ 0084-net-vhost-fix-deadlock-on-vring-state-change.patch	2022-07-07 09:54:11.025824987 +0200
@@ -1 +1 @@
-From 193edd75a94fe8d0d633d1702109779fd7b7d6a0 Mon Sep 17 00:00:00 2001
+From 48e451fe409e603da6e21b72163cb53c25284dd1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 193edd75a94fe8d0d633d1702109779fd7b7d6a0 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index d75d256040..7e512d94bf 100644
+index 35dcd84b8b..bb714a5c90 100644
@@ -29 +30 @@
-@@ -741,7 +741,7 @@ eth_vhost_install_intr(struct rte_eth_dev *dev)
+@@ -652,7 +652,7 @@ eth_vhost_install_intr(struct rte_eth_dev *dev)
@@ -38 +39 @@
-@@ -767,7 +767,7 @@ update_queuing_status(struct rte_eth_dev *dev)
+@@ -678,7 +678,7 @@ update_queuing_status(struct rte_eth_dev *dev)
@@ -47 +48 @@
-@@ -779,7 +779,7 @@ update_queuing_status(struct rte_eth_dev *dev)
+@@ -690,7 +690,7 @@ update_queuing_status(struct rte_eth_dev *dev)
@@ -56,2 +57,2 @@
-@@ -868,7 +868,7 @@ new_device(int vid)
- 	vhost_dev_csum_configure(eth_dev);
+@@ -772,7 +772,7 @@ new_device(int vid)
+ 	eth_dev->data->dev_link.link_status = ETH_LINK_UP;
@@ -65 +66 @@
-@@ -898,7 +898,7 @@ destroy_device(int vid)
+@@ -802,7 +802,7 @@ destroy_device(int vid)
@@ -72 +73 @@
- 	eth_dev->data->dev_link.link_status = RTE_ETH_LINK_DOWN;
+ 	eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
@@ -74 +75 @@
-@@ -1008,7 +1008,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
+@@ -863,7 +863,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
@@ -83 +84 @@
-@@ -1197,7 +1197,7 @@ eth_dev_start(struct rte_eth_dev *eth_dev)
+@@ -1050,7 +1050,7 @@ eth_dev_start(struct rte_eth_dev *eth_dev)
@@ -92 +93,2 @@
-@@ -1209,7 +1209,7 @@ eth_dev_stop(struct rte_eth_dev *dev)
+@@ -1061,7 +1061,7 @@ eth_dev_stop(struct rte_eth_dev *dev)
+ 	struct pmd_internal *internal = dev->data->dev_private;
@@ -94 +95,0 @@
- 	dev->data->dev_started = 0;
@@ -98,2 +98,0 @@
- 
- 	return 0;
@@ -100,0 +100,2 @@
+ 
+ static void

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

* patch 'vhost: add some trailing newline in log messages' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (82 preceding siblings ...)
  2022-07-07  7:55 ` patch 'net/vhost: fix deadlock on vring state change' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'service: fix lingering active status' " christian.ehrhardt
  2022-07-07  7:55 ` patch 'kni: fix build' " christian.ehrhardt
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: David Marchand; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 7c4c4a4adc9316e674f83bb5295ce6af6010c8a1 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 1 Jul 2022 09:55:08 +0200
Subject: [PATCH] vhost: add some trailing newline in log messages

[ upstream commit 1ef468a7e9ff1a9da50b809ae04bbf60b6fbe351 ]

VHOST_LOG_* macros don't append a newline.
Add missing ones.

Fixes: e623e0c6d8a5 ("vhost: add reconnect ability")
Fixes: af1475918124 ("vhost: introduce API to start a specific driver")
Fixes: 2dfeebe26546 ("vhost: check return of mutex initialization")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/socket.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index dc70ce154f..2d1f5f64ec 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -499,7 +499,7 @@ vhost_user_reconnect_init(void)
 
 	ret = pthread_mutex_init(&reconn_list.mutex, NULL);
 	if (ret < 0) {
-		RTE_LOG(ERR, VHOST_CONFIG, "failed to initialize mutex");
+		RTE_LOG(ERR, VHOST_CONFIG, "failed to initialize mutex\n");
 		return ret;
 	}
 	TAILQ_INIT(&reconn_list.head);
@@ -507,10 +507,10 @@ vhost_user_reconnect_init(void)
 	ret = rte_ctrl_thread_create(&reconn_tid, "vhost_reconn", NULL,
 			     vhost_user_client_reconnect, NULL);
 	if (ret != 0) {
-		RTE_LOG(ERR, VHOST_CONFIG, "failed to create reconnect thread");
+		RTE_LOG(ERR, VHOST_CONFIG, "failed to create reconnect thread\n");
 		if (pthread_mutex_destroy(&reconn_list.mutex)) {
 			RTE_LOG(ERR, VHOST_CONFIG,
-				"failed to destroy reconnect mutex");
+				"failed to destroy reconnect mutex\n");
 		}
 	}
 
@@ -1173,7 +1173,7 @@ rte_vhost_driver_start(const char *path)
 			&vhost_user.fdset);
 		if (ret != 0) {
 			RTE_LOG(ERR, VHOST_CONFIG,
-				"failed to create fdset handling thread");
+				"failed to create fdset handling thread\n");
 
 			fdset_pipe_uninit(&vhost_user.fdset);
 			return -1;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.628807533 +0200
+++ 0085-vhost-add-some-trailing-newline-in-log-messages.patch	2022-07-07 09:54:11.029825012 +0200
@@ -1 +1 @@
-From 1ef468a7e9ff1a9da50b809ae04bbf60b6fbe351 Mon Sep 17 00:00:00 2001
+From 7c4c4a4adc9316e674f83bb5295ce6af6010c8a1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1ef468a7e9ff1a9da50b809ae04bbf60b6fbe351 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- lib/vhost/socket.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
+ lib/librte_vhost/socket.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
@@ -20,4 +21,4 @@
-diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
-index 7a0f63af14..24d60ca149 100644
---- a/lib/vhost/socket.c
-+++ b/lib/vhost/socket.c
+diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
+index dc70ce154f..2d1f5f64ec 100644
+--- a/lib/librte_vhost/socket.c
++++ b/lib/librte_vhost/socket.c
@@ -28,2 +29,2 @@
--		VHOST_LOG_CONFIG(ERR, "%s: failed to initialize mutex", __func__);
-+		VHOST_LOG_CONFIG(ERR, "%s: failed to initialize mutex\n", __func__);
+-		RTE_LOG(ERR, VHOST_CONFIG, "failed to initialize mutex");
++		RTE_LOG(ERR, VHOST_CONFIG, "failed to initialize mutex\n");
@@ -33 +34 @@
-@@ -507,9 +507,9 @@ vhost_user_reconnect_init(void)
+@@ -507,10 +507,10 @@ vhost_user_reconnect_init(void)
@@ -37,5 +38,7 @@
--		VHOST_LOG_CONFIG(ERR, "failed to create reconnect thread");
-+		VHOST_LOG_CONFIG(ERR, "failed to create reconnect thread\n");
- 		if (pthread_mutex_destroy(&reconn_list.mutex))
--			VHOST_LOG_CONFIG(ERR, "%s: failed to destroy reconnect mutex", __func__);
-+			VHOST_LOG_CONFIG(ERR, "%s: failed to destroy reconnect mutex\n", __func__);
+-		RTE_LOG(ERR, VHOST_CONFIG, "failed to create reconnect thread");
++		RTE_LOG(ERR, VHOST_CONFIG, "failed to create reconnect thread\n");
+ 		if (pthread_mutex_destroy(&reconn_list.mutex)) {
+ 			RTE_LOG(ERR, VHOST_CONFIG,
+-				"failed to destroy reconnect mutex");
++				"failed to destroy reconnect mutex\n");
+ 		}
@@ -44,3 +47 @@
- 	return ret;
-@@ -1170,8 +1170,8 @@ rte_vhost_driver_start(const char *path)
- 			"vhost-events", NULL, fdset_event_dispatch,
+@@ -1173,7 +1173,7 @@ rte_vhost_driver_start(const char *path)
@@ -49,4 +50,4 @@
--			VHOST_LOG_CONFIG(ERR, "(%s) failed to create fdset handling thread", path);
--
-+			VHOST_LOG_CONFIG(ERR, "(%s) failed to create fdset handling thread\n",
-+				path);
+ 			RTE_LOG(ERR, VHOST_CONFIG,
+-				"failed to create fdset handling thread");
++				"failed to create fdset handling thread\n");
+ 
@@ -55 +55,0 @@
- 		}

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

* patch 'service: fix lingering active status' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (83 preceding siblings ...)
  2022-07-07  7:55 ` patch 'vhost: add some trailing newline in log messages' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  2022-07-07  7:55 ` patch 'kni: fix build' " christian.ehrhardt
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: Naga Harish K S V, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 3d3bcdcee414581a2eb959c14157f82684973295 Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Tue, 5 Jul 2022 13:32:07 +0000
Subject: [PATCH] service: fix lingering active status

[ upstream commit 6550113be62d1bd27b2f2dc07d7a888ad9499006 ]

This commit fixes an issue where calling rte_service_lcore_stop()
would result in a service's "active on lcore" status becoming stale.

The stale status would result in rte_service_may_be_active() always
returning "1", indicating that the service is not certainly stopped.

This is fixed by ensuring the "active on lcore" status of each service
is set to 0 when an lcore is stopped.

Fixes: e30dd31847d2 ("service: add mechanism for quiescing")
Fixes: 8929de043eb4 ("service: retrieve lcore active state")

Reported-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/common/rte_service.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index 8fcccac85c..d11027fcba 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -708,13 +708,20 @@ rte_service_lcore_stop(uint32_t lcore)
 		return -EALREADY;
 
 	uint32_t i;
-	uint64_t service_mask = lcore_states[lcore].service_mask;
+	struct core_state *cs = &lcore_states[lcore];
+	uint64_t service_mask = cs->service_mask;
+
 	for (i = 0; i < RTE_SERVICE_NUM_MAX; i++) {
 		int32_t enabled = service_mask & (UINT64_C(1) << i);
 		int32_t service_running = rte_service_runstate_get(i);
 		int32_t only_core = (1 ==
 			rte_atomic32_read(&rte_services[i].num_mapped_cores));
 
+		/* Switch off this core for all services, to ensure that future
+		 * calls to may_be_active() know this core is switched off.
+		 */
+		cs->service_active_on_lcore[i] = 0;
+
 		/* if the core is mapped, and the service is running, and this
 		 * is the only core that is mapped, the service would cease to
 		 * run if this core stopped, so fail instead.
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.662698591 +0200
+++ 0086-service-fix-lingering-active-status.patch	2022-07-07 09:54:11.029825012 +0200
@@ -1 +1 @@
-From 6550113be62d1bd27b2f2dc07d7a888ad9499006 Mon Sep 17 00:00:00 2001
+From 3d3bcdcee414581a2eb959c14157f82684973295 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6550113be62d1bd27b2f2dc07d7a888ad9499006 ]
+
@@ -21 +23 @@
- lib/eal/common/rte_service.c | 9 ++++++++-
+ lib/librte_eal/common/rte_service.c | 9 ++++++++-
@@ -24,5 +26,5 @@
-diff --git a/lib/eal/common/rte_service.c b/lib/eal/common/rte_service.c
-index ef31b1f63c..d2b7275ac0 100644
---- a/lib/eal/common/rte_service.c
-+++ b/lib/eal/common/rte_service.c
-@@ -758,7 +758,9 @@ rte_service_lcore_stop(uint32_t lcore)
+diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
+index 8fcccac85c..d11027fcba 100644
+--- a/lib/librte_eal/common/rte_service.c
++++ b/lib/librte_eal/common/rte_service.c
+@@ -708,13 +708,20 @@ rte_service_lcore_stop(uint32_t lcore)
@@ -39,3 +41,2 @@
-@@ -766,6 +768,11 @@ rte_service_lcore_stop(uint32_t lcore)
- 			__atomic_load_n(&rte_services[i].num_mapped_cores,
- 				__ATOMIC_RELAXED));
+ 		int32_t only_core = (1 ==
+ 			rte_atomic32_read(&rte_services[i].num_mapped_cores));

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

* patch 'kni: fix build' has been queued to stable release 19.11.13
  2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
                   ` (84 preceding siblings ...)
  2022-07-07  7:55 ` patch 'service: fix lingering active status' " christian.ehrhardt
@ 2022-07-07  7:55 ` christian.ehrhardt
  85 siblings, 0 replies; 87+ messages in thread
From: christian.ehrhardt @ 2022-07-07  7:55 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 47978fa1489abac299449fd51330c5c3a78a0d30 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 6 Jun 2022 12:39:49 +0200
Subject: [PATCH] kni: fix build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 327ef5065996356e1a4b77fb93c85737c99bb8fe ]

A previous fix had #else instead of #endif.
The error message is:
	kernel/linux/kni/kni_net.c: In function ‘kni_net_rx_normal’:
	kernel/linux/kni/kni_net.c:448:2: error: #else after #else

Bugzilla ID: 1025
Fixes: c98600d4bed6 ("kni: fix build with Linux 5.18")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 kernel/linux/kni/kni_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index 1270c367d8..46f3f5d669 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -415,7 +415,7 @@ kni_net_rx_normal(struct kni_dev *kni)
 		netif_rx_ni(skb);
 #else
 		netif_rx(skb);
-#else
+#endif
 
 		/* Update statistics */
 		dev->stats.rx_bytes += len;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.697387942 +0200
+++ 0087-kni-fix-build.patch	2022-07-07 09:54:11.029825012 +0200
@@ -1 +1 @@
-From 327ef5065996356e1a4b77fb93c85737c99bb8fe Mon Sep 17 00:00:00 2001
+From 47978fa1489abac299449fd51330c5c3a78a0d30 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 327ef5065996356e1a4b77fb93c85737c99bb8fe ]
+
@@ -24 +26 @@
-index a8b092b756..41805fcabf 100644
+index 1270c367d8..46f3f5d669 100644
@@ -27 +29 @@
-@@ -445,7 +445,7 @@ kni_net_rx_normal(struct kni_dev *kni)
+@@ -415,7 +415,7 @@ kni_net_rx_normal(struct kni_dev *kni)

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

end of thread, other threads:[~2022-07-07  7:59 UTC | newest]

Thread overview: 87+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07  7:53 patch 'eal/windows: fix data race when creating threads' has been queued to stable release 19.11.13 christian.ehrhardt
2022-07-07  7:53 ` patch 'examples/bond: fix invalid use of trylock' " christian.ehrhardt
2022-07-07  7:53 ` patch 'net/mlx5: fix Tx when inlining is impossible' " christian.ehrhardt
2022-07-07  7:53 ` patch 'net/mlx5: fix GTP handling in header modify action' " christian.ehrhardt
2022-07-07  7:54 ` patch 'test/table: fix buffer overflow on lpm entry' " christian.ehrhardt
2022-07-07  7:54 ` patch 'mem: skip attaching external memory in secondary process' " christian.ehrhardt
2022-07-07  7:54 ` patch 'eal: fix C++ include for device event and DMA' " christian.ehrhardt
2022-07-07  7:54 ` patch 'crypto/dpaa_sec: fix digest size' " christian.ehrhardt
2022-07-07  7:54 ` patch 'crypto/dpaa2_sec: fix buffer pool ID check' " christian.ehrhardt
2022-07-07  7:54 ` patch 'crypto/dpaa_sec: fix secondary process probing' " christian.ehrhardt
2022-07-07  7:54 ` patch 'crypto/dpaa2_sec: fix operation status for simple FD' " christian.ehrhardt
2022-07-07  7:54 ` patch 'common/dpaax: fix short MAC-I IV calculation for ZUC' " christian.ehrhardt
2022-07-07  7:54 ` patch 'examples/l2fwd-crypto: fix stats refresh rate' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/nfp: remove unneeded header inclusion' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/bonding: fix RSS key config with extended key length' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/cxgbe: fix port ID in Rx mbuf' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/vhost: fix access to freed memory' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/vhost: fix TSO feature default disablement' " christian.ehrhardt
2022-07-07  7:54 ` patch 'vhost: fix missing virtqueue lock protection' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/dpaa: fix event queue detach' " christian.ehrhardt
2022-07-07  7:54 ` patch 'app/testpmd: check statistics query before printing' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/bnxt: remove unused macro' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/bnxt: recheck FW readiness if in reset process' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/bnxt: fix freeing VNIC filters' " christian.ehrhardt
2022-07-07  7:54 ` patch 'eal/x86: fix unaligned access for small memcpy' " christian.ehrhardt
2022-07-07  7:54 ` patch 'test: avoid hang if queues are full and Tx fails' " christian.ehrhardt
2022-07-07  7:54 ` patch 'acl: fix rules with 8-byte field size' " christian.ehrhardt
2022-07-07  7:54 ` patch 'rib: fix traversal with /32 route' " christian.ehrhardt
2022-07-07  7:54 ` patch 'devtools: fix null test for NUMA systems' " christian.ehrhardt
2022-07-07  7:54 ` patch 'examples/ipsec-secgw: fix promiscuous mode option' " christian.ehrhardt
2022-07-07  7:54 ` patch 'test/crypto: fix null check for ZUC authentication' " christian.ehrhardt
2022-07-07  7:54 ` patch 'drivers/crypto: fix warnings for OpenSSL version' " christian.ehrhardt
2022-07-07  7:54 ` patch 'app/testpmd: remove useless pointer checks' " christian.ehrhardt
2022-07-07  7:54 ` patch 'ethdev: clarify null location case in xstats get' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/hns3: fix xstats get return if xstats is null' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/ipn3ke: " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/mvpp2: " christian.ehrhardt
2022-07-07  7:54 ` patch 'app/testpmd: replace hardcoded min mbuf number with macro' " christian.ehrhardt
2022-07-07  7:54 ` patch 'app/testpmd: fix metering and policing command for RFC4115' " christian.ehrhardt
2022-07-07  7:54 ` patch 'ethdev: prohibit polling stopped queue' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/bonding: fix mbuf fast free usage' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/memif: fix overwriting of head segment' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/bnxt: fix compatibility with some old firmwares' " christian.ehrhardt
2022-07-07  7:54 ` patch 'examples/vhost: fix crash when no VMDq' " christian.ehrhardt
2022-07-07  7:54 ` patch 'kni: fix build with Linux 5.18' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/ixgbe: add option for link up check on pin SDP3' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/ice/base: fix getting sched node from ID type' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/iavf: fix queue start exception handling' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/iavf: increase reset complete wait count' " christian.ehrhardt
2022-07-07  7:54 ` patch 'bus/fslmc: fix VFIO setup' " christian.ehrhardt
2022-07-07  7:54 ` patch 'kni: use dedicated function to set random MAC address' " christian.ehrhardt
2022-07-07  7:54 ` patch 'kni: use dedicated function to set " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/ice: fix build with GCC 12' " christian.ehrhardt
2022-07-07  7:54 ` patch 'vdpa/ifc: " christian.ehrhardt
2022-07-07  7:54 ` patch 'eal/x86: drop export of internal alignment macro' " christian.ehrhardt
2022-07-07  7:54 ` patch 'common/cpt: fix build with GCC 12' " christian.ehrhardt
2022-07-07  7:54 ` patch 'test/ipsec: " christian.ehrhardt
2022-07-07  7:54 ` patch 'crypto/scheduler: fix queue pair in scheduler failover' " christian.ehrhardt
2022-07-07  7:54 ` patch 'test/crypto: fix cipher offset for ZUC' " christian.ehrhardt
2022-07-07  7:54 ` patch 'eventdev/eth_tx: fix adapter creation' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/bonding: fix RSS inconsistency between ports' " christian.ehrhardt
2022-07-07  7:54 ` patch 'test/bonding: fix RSS test when disable RSS' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/hns3: remove duplicate definition' " christian.ehrhardt
2022-07-07  7:54 ` patch 'net/nfp: fix initialization' " christian.ehrhardt
2022-07-07  7:55 ` patch 'app/testpmd: revert MAC update in checksum forwarding' " christian.ehrhardt
2022-07-07  7:55 ` patch 'vhost: fix missing enqueue pseudo-header calculation' " christian.ehrhardt
2022-07-07  7:55 ` patch 'vhost/crypto: fix build with GCC 12' " christian.ehrhardt
2022-07-07  7:55 ` patch 'vhost/crypto: fix descriptor processing' " christian.ehrhardt
2022-07-07  7:55 ` patch 'malloc: fix allocation of almost hugepage size' " christian.ehrhardt
2022-07-07  7:55 ` patch 'net/octeontx: fix port close' " christian.ehrhardt
2022-07-07  7:55 ` patch 'net/qede: fix build with GCC 12' " christian.ehrhardt
2022-07-07  7:55 ` patch 'test/hash: fix out of bound access' " christian.ehrhardt
2022-07-07  7:55 ` patch 'test: check memory allocation for CRC' " christian.ehrhardt
2022-07-07  7:55 ` patch 'examples/distributor: fix distributor on Rx core' " christian.ehrhardt
2022-07-07  7:55 ` patch 'net/bnxt: allow Tx only or Rx only' " christian.ehrhardt
2022-07-07  7:55 ` patch 'net/bnxt: cleanup MTU setting' " christian.ehrhardt
2022-07-07  7:55 ` patch 'test/crypto: fix authentication IV for ZUC SGL' " christian.ehrhardt
2022-07-07  7:55 ` patch 'test/crypto: fix ZUC vector IV format' " christian.ehrhardt
2022-07-07  7:55 ` patch 'test/crypto: fix SNOW3G " christian.ehrhardt
2022-07-07  7:55 ` patch 'examples/fips_validation: handle empty payload' " christian.ehrhardt
2022-07-07  7:55 ` patch 'crypto/qat: fix DOCSIS crash' " christian.ehrhardt
2022-07-07  7:55 ` patch 'doc: fix grammar and formatting in compressdev guide' " christian.ehrhardt
2022-07-07  7:55 ` patch 'eventdev/eth_tx: fix queue delete' " christian.ehrhardt
2022-07-07  7:55 ` patch 'net/vhost: fix deadlock on vring state change' " christian.ehrhardt
2022-07-07  7:55 ` patch 'vhost: add some trailing newline in log messages' " christian.ehrhardt
2022-07-07  7:55 ` patch 'service: fix lingering active status' " christian.ehrhardt
2022-07-07  7:55 ` patch 'kni: fix build' " christian.ehrhardt

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