patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2
@ 2022-06-24 15:01 Kevin Traynor
  2022-06-24 15:01 ` patch 'test: drop reference to removed tests' " Kevin Traynor
                   ` (38 more replies)
  0 siblings, 39 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: David Marchand, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From b55b2820d215b4a24cb402aeb4bdf2f4ab6f0870 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 17 Jun 2022 10:29:11 +0800
Subject: [PATCH] trace: fix init with long file prefix

[ upstream commit d59a940667989461e2916207e7fbb8148504c44f ]

Bug scenario:
1. start testpmd:
  $ dpdk-testpmd -l 4-6 -a 0000:7d:00.0 --trace=.* \
    --file-prefix=trace_autotest -- -i
2. then observed:
  EAL: eal_trace_init():93 failed to initialize trace [File exists]
  EAL: FATAL: Cannot init trace
  EAL: Cannot init trace
  EAL: Error - exiting with code: 1

The root cause it that the offset set wrong with long file-prefix and
then lead the strftime return failed.

At the same time, trace_session_name_generate() uses errno as the return
value, but the errno was not set if strftime returned zero.
A previously set errno (EEXIST or ENOENT from call to mkdir for creating
the runtime configuration directory) was returned in this case.
This is fragile and may lead to incorrect logic if errno was set
to 0 previously.
This also resulted in inaccurate prompting.
Set errno to ENOSPC if strftime return zero.

Fixes: 321dd5f8fa62 ("trace: add internal init and fini interface")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/eal/common/eal_common_trace_utils.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/eal/common/eal_common_trace_utils.c b/lib/eal/common/eal_common_trace_utils.c
index 64f58fb66a..2b55dbec65 100644
--- a/lib/eal/common/eal_common_trace_utils.c
+++ b/lib/eal/common/eal_common_trace_utils.c
@@ -105,11 +105,13 @@ trace_session_name_generate(char *trace_dir)
 			TRACE_PREFIX_LEN);
 	if (rc == -E2BIG)
-		rc = TRACE_PREFIX_LEN;
+		rc = TRACE_PREFIX_LEN - 1;
 	trace_dir[rc++] = '-';
 
 	rc = strftime(trace_dir + rc, TRACE_DIR_STR_LEN - rc,
 			"%Y-%m-%d-%p-%I-%M-%S", tm_result);
-	if (rc == 0)
+	if (rc == 0) {
+		errno = ENOSPC;
 		goto fail;
+	}
 
 	return rc;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:08.953407065 +0100
+++ 0001-trace-fix-init-with-long-file-prefix.patch	2022-06-24 15:51:08.764983794 +0100
@@ -1 +1 @@
-From d59a940667989461e2916207e7fbb8148504c44f Mon Sep 17 00:00:00 2001
+From b55b2820d215b4a24cb402aeb4bdf2f4ab6f0870 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d59a940667989461e2916207e7fbb8148504c44f ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org


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

* patch 'test: drop reference to removed tests' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'sched: remove unnecessary floating point' " Kevin Traynor
                   ` (37 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 03b38f5281298e31c9d99544cc07a00c668fd688 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 13 Jun 2022 09:37:00 +0200
Subject: [PATCH] test: drop reference to removed tests

[ upstream commit 9aa95b6fc4d0f166f8364f60c476f52dfcbe1082 ]

cycles_autotest and delay_us_sleep_autotest tests were removed in the
commit ee00af60170b ("test: remove strict timing requirements some tests")
and were wrongly reintroduced later.

Bugzilla ID: 1021
Fixes: 74822233bdc2 ("test: create a list of extra tests")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/meson.build | 2 --
 1 file changed, 2 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index f7ee8ebc57..c13776c0b9 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -289,6 +289,4 @@ fast_tests = [
 extra_test_names = [
         'alarm_autotest', # ee00af60170b ("test: remove strict timing requirements some tests")
-        'cycles_autotest', # ee00af60170b ("test: remove strict timing requirements some tests")
-        'delay_us_sleep_autotest', # ee00af60170b ("test: remove strict timing requirements some tests")
         'red_autotest', # https://bugs.dpdk.org/show_bug.cgi?id=826
 ]
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:08.973583530 +0100
+++ 0002-test-drop-reference-to-removed-tests.patch	2022-06-24 15:51:08.809983915 +0100
@@ -1 +1 @@
-From 9aa95b6fc4d0f166f8364f60c476f52dfcbe1082 Mon Sep 17 00:00:00 2001
+From 03b38f5281298e31c9d99544cc07a00c668fd688 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9aa95b6fc4d0f166f8364f60c476f52dfcbe1082 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index ddcc12a452..431c5bd318 100644
+index f7ee8ebc57..c13776c0b9 100644
@@ -23 +24 @@
-@@ -251,6 +251,4 @@ fast_tests = [
+@@ -289,6 +289,4 @@ fast_tests = [


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

* patch 'sched: remove unnecessary floating point' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
  2022-06-24 15:01 ` patch 'test: drop reference to removed tests' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'eal/x86: drop export of internal alignment macro' " Kevin Traynor
                   ` (36 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Jasvinder Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From bba01c7ab88dfac1a732b3fb12cf81921bec9da2 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 26 May 2022 13:26:52 -0700
Subject: [PATCH] sched: remove unnecessary floating point

[ upstream commit bb421e98c0c0f56f1adc68722a54d6d24abf137d ]

The qdelay variable is derived from and compared to 64 bit
value so it doesn't have to be floating point.

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 lib/sched/rte_pie.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/sched/rte_pie.h b/lib/sched/rte_pie.h
index 02a987f54a..3e2c1ef467 100644
--- a/lib/sched/rte_pie.h
+++ b/lib/sched/rte_pie.h
@@ -219,5 +219,5 @@ _rte_pie_drop(const struct rte_pie_config *pie_cfg,
 {
 	uint64_t rand_value;
-	double qdelay = pie_cfg->qdelay_ref * 0.5;
+	uint64_t qdelay = pie_cfg->qdelay_ref / 2;
 
 	/* PIE is active but the queue is not congested: return 0 */
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:08.993883078 +0100
+++ 0003-sched-remove-unnecessary-floating-point.patch	2022-06-24 15:51:08.811983920 +0100
@@ -1 +1 @@
-From bb421e98c0c0f56f1adc68722a54d6d24abf137d Mon Sep 17 00:00:00 2001
+From bba01c7ab88dfac1a732b3fb12cf81921bec9da2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bb421e98c0c0f56f1adc68722a54d6d24abf137d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'eal/x86: drop export of internal alignment macro' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
  2022-06-24 15:01 ` patch 'test: drop reference to removed tests' " Kevin Traynor
  2022-06-24 15:01 ` patch 'sched: remove unnecessary floating point' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 16:42   ` Kevin Traynor
  2022-06-24 15:01 ` patch 'baseband/acc100: update companion PF configure function' " Kevin Traynor
                   ` (35 subsequent siblings)
  38 siblings, 1 reply; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: David Marchand; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 4fb54298161f5e8ffa3dc05867f8c544828214e2 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/eal/x86/include/rte_memcpy.h | 2 ++
 1 file changed, 2 insertions(+)

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
@@ -852,4 +852,6 @@ rte_memcpy(void *dst, const void *src, size_t n)
 }
 
+#undef ALIGNMENT_MASK
+
 #if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
 #pragma GCC diagnostic pop
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.079732468 +0100
+++ 0004-eal-x86-drop-export-of-internal-alignment-macro.patch	2022-06-24 15:51:08.815983931 +0100
@@ -1 +1 @@
-From 11f61ea2f6fcdd88df2a81b82235ddb7033c3e5d Mon Sep 17 00:00:00 2001
+From 4fb54298161f5e8ffa3dc05867f8c544828214e2 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 11f61ea2f6fcdd88df2a81b82235ddb7033c3e5d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org


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

* patch 'baseband/acc100: update companion PF configure function' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (2 preceding siblings ...)
  2022-06-24 15:01 ` patch 'eal/x86: drop export of internal alignment macro' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'baseband/acc100: add protection for some negative scenario' " Kevin Traynor
                   ` (34 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Nicolas Chautru; +Cc: Hernan Vargas, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 4184a99adb238c9fb1ac95fd42ba8bc38b0c9193 Mon Sep 17 00:00:00 2001
From: Nicolas Chautru <nicolas.chautru@intel.com>
Date: Tue, 31 May 2022 15:31:42 -0700
Subject: [PATCH] baseband/acc100: update companion PF configure function

[ upstream commit 60a623408bf3df2e15f7d497b3c36359612fb183 ]

Update of the device configuration function from PF used for bbdev-test
to latest sequence for ACC199 PRQ device and matching version in
pf_bb_config 22.03.

Fixes: b17d70922d5d ("baseband/acc100: add configure function")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Hernan Vargas <hernan.vargas@intel.com>
---
 drivers/baseband/acc100/acc100_pf_enum.h |  18 +++
 drivers/baseband/acc100/rte_acc100_pmd.c | 163 +++++++++++++++++------
 drivers/baseband/acc100/rte_acc100_pmd.h |  20 ++-
 3 files changed, 153 insertions(+), 48 deletions(-)

diff --git a/drivers/baseband/acc100/acc100_pf_enum.h b/drivers/baseband/acc100/acc100_pf_enum.h
index a1ee416d26..2fba667627 100644
--- a/drivers/baseband/acc100/acc100_pf_enum.h
+++ b/drivers/baseband/acc100/acc100_pf_enum.h
@@ -239,4 +239,22 @@ enum {
 	HWPfPermonBTotalLatUpperBusMon        =  0x00BAC508,
 	HWPfPermonBTotalReqCntBusMon          =  0x00BAC50C,
+	HwPfFabI2MArbCntrlReg                 =  0x00BB0000,
+	HWPfFabricMode                        =  0x00BB1000,
+	HwPfFabI2MGrp0DebugReg                =  0x00BBF000,
+	HwPfFabI2MGrp1DebugReg                =  0x00BBF004,
+	HwPfFabI2MGrp2DebugReg                =  0x00BBF008,
+	HwPfFabI2MGrp3DebugReg                =  0x00BBF00C,
+	HwPfFabI2MBuf0DebugReg                =  0x00BBF010,
+	HwPfFabI2MBuf1DebugReg                =  0x00BBF014,
+	HwPfFabI2MBuf2DebugReg                =  0x00BBF018,
+	HwPfFabI2MBuf3DebugReg                =  0x00BBF01C,
+	HwPfFabM2IBuf0Grp0DebugReg            =  0x00BBF020,
+	HwPfFabM2IBuf1Grp0DebugReg            =  0x00BBF024,
+	HwPfFabM2IBuf0Grp1DebugReg            =  0x00BBF028,
+	HwPfFabM2IBuf1Grp1DebugReg            =  0x00BBF02C,
+	HwPfFabM2IBuf0Grp2DebugReg            =  0x00BBF030,
+	HwPfFabM2IBuf1Grp2DebugReg            =  0x00BBF034,
+	HwPfFabM2IBuf0Grp3DebugReg            =  0x00BBF038,
+	HwPfFabM2IBuf1Grp3DebugReg            =  0x00BBF03C,
 	HWPfFecUl5gCntrlReg                   =  0x00BC0000,
 	HWPfFecUl5gI2MThreshReg               =  0x00BC0004,
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index cc69c76d54..170eceb37b 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -142,6 +142,6 @@ aqDepth(int qg_idx, struct rte_acc100_conf *acc100_conf)
 	qtopFromAcc(&q_top, acc_enum, acc100_conf);
 	if (unlikely(q_top == NULL))
-		return 0;
-	return q_top->aq_depth_log2;
+		return 1;
+	return RTE_MAX(1, q_top->aq_depth_log2);
 }
 
@@ -4413,5 +4413,5 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	rte_bbdev_log(INFO, "rte_acc100_configure");
 	uint32_t value, address, status;
-	int qg_idx, template_idx, vf_idx, acc, i;
+	int qg_idx, template_idx, vf_idx, acc, i, j;
 	struct rte_bbdev *bbdev = rte_bbdev_get_named_dev(dev_name);
 
@@ -4433,4 +4433,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	rte_memcpy(&d->acc100_conf, conf, sizeof(d->acc100_conf));
 
+	value = acc100_reg_read(d, HwPfPcieGpexBridgeControl);
+	bool firstCfg = (value != ACC100_CFG_PCI_BRIDGE);
+
 	/* PCIe Bridge configuration */
 	acc100_reg_write(d, HwPfPcieGpexBridgeControl, ACC100_CFG_PCI_BRIDGE);
@@ -4453,18 +4456,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	acc100_reg_write(d, address, value);
 
-	/* DDR Configuration */
-	address = HWPfDdrBcTim6;
-	value = acc100_reg_read(d, address);
-	value &= 0xFFFFFFFB; /* Bit 2 */
-#ifdef ACC100_DDR_ECC_ENABLE
-	value |= 0x4;
-#endif
-	acc100_reg_write(d, address, value);
-	address = HWPfDdrPhyDqsCountNum;
-#ifdef ACC100_DDR_ECC_ENABLE
-	value = 9;
-#else
-	value = 8;
-#endif
+	/* Enable granular dynamic clock gating */
+	address = HWPfHiClkGateHystReg;
+	value = ACC100_CLOCK_GATING_EN;
 	acc100_reg_write(d, address, value);
 
@@ -4484,4 +4476,15 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	acc100_reg_write(d, address, value);
 
+	/* Adjust PCIe Lane adaptation */
+	for (i = 0; i < ACC100_QUAD_NUMS; i++)
+		for (j = 0; j < ACC100_LANES_PER_QUAD; j++)
+			acc100_reg_write(d, HwPfPcieLnAdaptctrl + i * ACC100_PCIE_QUAD_OFFSET
+					+ j * ACC100_PCIE_LANE_OFFSET, ACC100_ADAPT);
+
+	/* Enable PCIe live adaptation */
+	for (i = 0; i < ACC100_QUAD_NUMS; i++)
+		acc100_reg_write(d, HwPfPciePcsEqControl +
+				i * ACC100_PCIE_QUAD_OFFSET, ACC100_PCS_EQ);
+
 	/* Default DMA Configuration (Qmgr Enabled) */
 	address = HWPfDmaConfig0Reg;
@@ -4502,4 +4505,9 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	acc100_reg_write(d, address, value);
 
+	/* Default Fabric Mode */
+	address = HWPfFabricMode;
+	value = ACC100_FABRIC_MODE;
+	acc100_reg_write(d, address, value);
+
 	/* ===== Qmgr Configuration ===== */
 	/* Configuration of the AQueue Depth QMGR_GRP_0_DEPTH_LOG2 for UL */
@@ -4520,20 +4528,15 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 
 	/* Template Priority in incremental order */
-	for (template_idx = 0; template_idx < ACC100_NUM_TMPL;
-			template_idx++) {
-		address = HWPfQmgrGrpTmplateReg0Indx +
-		ACC100_BYTES_IN_WORD * (template_idx % 8);
+	for (template_idx = 0; template_idx < ACC100_NUM_TMPL; template_idx++) {
+		address = HWPfQmgrGrpTmplateReg0Indx + ACC100_BYTES_IN_WORD * template_idx;
 		value = ACC100_TMPL_PRI_0;
 		acc100_reg_write(d, address, value);
-		address = HWPfQmgrGrpTmplateReg1Indx +
-		ACC100_BYTES_IN_WORD * (template_idx % 8);
+		address = HWPfQmgrGrpTmplateReg1Indx + ACC100_BYTES_IN_WORD * template_idx;
 		value = ACC100_TMPL_PRI_1;
 		acc100_reg_write(d, address, value);
-		address = HWPfQmgrGrpTmplateReg2indx +
-		ACC100_BYTES_IN_WORD * (template_idx % 8);
+		address = HWPfQmgrGrpTmplateReg2indx + ACC100_BYTES_IN_WORD * template_idx;
 		value = ACC100_TMPL_PRI_2;
 		acc100_reg_write(d, address, value);
-		address = HWPfQmgrGrpTmplateReg3Indx +
-		ACC100_BYTES_IN_WORD * (template_idx % 8);
+		address = HWPfQmgrGrpTmplateReg3Indx + ACC100_BYTES_IN_WORD * template_idx;
 		value = ACC100_TMPL_PRI_3;
 		acc100_reg_write(d, address, value);
@@ -4586,7 +4589,4 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 		} else
 			acc100_reg_write(d, address, 0);
-#if RTE_ACC100_SINGLE_FEC == 1
-		value = 0;
-#endif
 	}
 	printf("Number of 5GUL engines %d\n", numEngines);
@@ -4603,7 +4603,4 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 				+ ACC100_BYTES_IN_WORD * template_idx;
 		acc100_reg_write(d, address, value);
-#if RTE_ACC100_SINGLE_FEC == 1
-			value = 0;
-#endif
 	}
 	/* 5GDL */
@@ -4619,11 +4616,8 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 				+ ACC100_BYTES_IN_WORD * template_idx;
 		acc100_reg_write(d, address, value);
-#if RTE_ACC100_SINGLE_FEC == 1
-		value = 0;
-#endif
 	}
 
 	/* Queue Group Function mapping */
-	int qman_func_id[5] = {0, 2, 1, 3, 4};
+	int qman_func_id[8] = {0, 2, 1, 3, 4, 0, 0, 0};
 	address = HWPfQmgrGrpFunction0;
 	value = 0;
@@ -4656,5 +4650,5 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	}
 
-	/* This pointer to ARAM (256kB) is shifted by 2 (4B per register) */
+	/* This pointer to ARAM (128kB) is shifted by 2 (4B per register) */
 	uint32_t aram_address = 0;
 	for (qg_idx = 0; qg_idx < totalQgs; qg_idx++) {
@@ -4681,4 +4675,9 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	/* ==== HI Configuration ==== */
 
+	/* No Info Ring/MSI by default */
+	acc100_reg_write(d, HWPfHiInfoRingIntWrEnRegPf, 0);
+	acc100_reg_write(d, HWPfHiInfoRingVf2pfLoWrEnReg, 0);
+	acc100_reg_write(d, HWPfHiCfgMsiIntWrEnRegPf, 0xFFFFFFFF);
+	acc100_reg_write(d, HWPfHiCfgMsiVf2pfLoWrEnReg, 0xFFFFFFFF);
 	/* Prevent Block on Transmit Error */
 	address = HWPfHiBlockTransmitOnErrorEn;
@@ -4693,8 +4692,4 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	value = (conf->pf_mode_en) ? ACC100_PF_VAL : 0;
 	acc100_reg_write(d, address, value);
-	/* Enable Error Detection in HW */
-	address = HWPfDmaErrorDetectionEn;
-	value = 0x3D7;
-	acc100_reg_write(d, address, value);
 
 	/* QoS overflow init */
@@ -4706,5 +4701,5 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 
 	/* HARQ DDR Configuration */
-	unsigned int ddrSizeInMb = 512; /* Fixed to 512 MB per VF for now */
+	unsigned int ddrSizeInMb = ACC100_HARQ_DDR;
 	for (vf_idx = 0; vf_idx < conf->num_vf_bundles; vf_idx++) {
 		address = HWPfDmaVfDdrBaseRw + vf_idx
@@ -4720,4 +4715,86 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 		poweron_cleanup(bbdev, d, conf);
 
+	uint32_t version = 0;
+	for (i = 0; i < 4; i++)
+		version += acc100_reg_read(d,
+				HWPfDdrPhyIdtmFwVersion + 4 * i) << (8 * i);
+	if (version != ACC100_PRQ_DDR_VER) {
+		printf("* Note: Not on DDR PRQ version %8x != %08x\n",
+				version, ACC100_PRQ_DDR_VER);
+	} else if (firstCfg) {
+		/* ---- DDR configuration at boot up --- */
+		/* Read Clear Ddr training status */
+		acc100_reg_read(d, HWPfChaDdrStDoneStatus);
+		/* Reset PHY/IDTM/UMMC */
+		acc100_reg_write(d, HWPfChaDdrWbRstCfg, 3);
+		acc100_reg_write(d, HWPfChaDdrApbRstCfg, 2);
+		acc100_reg_write(d, HWPfChaDdrPhyRstCfg, 2);
+		acc100_reg_write(d, HWPfChaDdrCpuRstCfg, 3);
+		acc100_reg_write(d, HWPfChaDdrSifRstCfg, 2);
+		usleep(ACC100_MS_IN_US);
+		/* Reset WB and APB resets */
+		acc100_reg_write(d, HWPfChaDdrWbRstCfg, 2);
+		acc100_reg_write(d, HWPfChaDdrApbRstCfg, 3);
+		/* Configure PHY-IDTM */
+		acc100_reg_write(d, HWPfDdrPhyIdletimeout, 0x3e8);
+		/* IDTM timing registers */
+		acc100_reg_write(d, HWPfDdrPhyRdLatency, 0x13);
+		acc100_reg_write(d, HWPfDdrPhyRdLatencyDbi, 0x15);
+		acc100_reg_write(d, HWPfDdrPhyWrLatency, 0x10011);
+		/* Configure SDRAM MRS registers */
+		acc100_reg_write(d, HWPfDdrPhyMr01Dimm, 0x3030b70);
+		acc100_reg_write(d, HWPfDdrPhyMr01DimmDbi, 0x3030b50);
+		acc100_reg_write(d, HWPfDdrPhyMr23Dimm, 0x30);
+		acc100_reg_write(d, HWPfDdrPhyMr67Dimm, 0xc00);
+		acc100_reg_write(d, HWPfDdrPhyMr45Dimm, 0x4000000);
+		/* Configure active lanes */
+		acc100_reg_write(d, HWPfDdrPhyDqsCountMax, 0x9);
+		acc100_reg_write(d, HWPfDdrPhyDqsCountNum, 0x9);
+		/* Configure WR/RD leveling timing registers */
+		acc100_reg_write(d, HWPfDdrPhyWrlvlWwRdlvlRr, 0x101212);
+		/* Configure what trainings to execute */
+		acc100_reg_write(d, HWPfDdrPhyTrngType, 0x2d3c);
+		/* Releasing PHY reset */
+		acc100_reg_write(d, HWPfChaDdrPhyRstCfg, 3);
+		/* Configure Memory Controller registers */
+		acc100_reg_write(d, HWPfDdrMemInitPhyTrng0, 0x3);
+		acc100_reg_write(d, HWPfDdrBcDram, 0x3c232003);
+		acc100_reg_write(d, HWPfDdrBcAddrMap, 0x31);
+		/* Configure UMMC BC timing registers */
+		acc100_reg_write(d, HWPfDdrBcRef, 0xa22);
+		acc100_reg_write(d, HWPfDdrBcTim0, 0x4050501);
+		acc100_reg_write(d, HWPfDdrBcTim1, 0xf0b0476);
+		acc100_reg_write(d, HWPfDdrBcTim2, 0x103);
+		acc100_reg_write(d, HWPfDdrBcTim3, 0x144050a1);
+		acc100_reg_write(d, HWPfDdrBcTim4, 0x23300);
+		acc100_reg_write(d, HWPfDdrBcTim5, 0x4230276);
+		acc100_reg_write(d, HWPfDdrBcTim6, 0x857914);
+		acc100_reg_write(d, HWPfDdrBcTim7, 0x79100232);
+		acc100_reg_write(d, HWPfDdrBcTim8, 0x100007ce);
+		acc100_reg_write(d, HWPfDdrBcTim9, 0x50020);
+		acc100_reg_write(d, HWPfDdrBcTim10, 0x40ee);
+		/* Configure UMMC DFI timing registers */
+		acc100_reg_write(d, HWPfDdrDfiInit, 0x5000);
+		acc100_reg_write(d, HWPfDdrDfiTim0, 0x15030006);
+		acc100_reg_write(d, HWPfDdrDfiTim1, 0x11305);
+		acc100_reg_write(d, HWPfDdrDfiPhyUpdEn, 0x1);
+		acc100_reg_write(d, HWPfDdrUmmcIntEn, 0x1f);
+		/* Release IDTM CPU out of reset */
+		acc100_reg_write(d, HWPfChaDdrCpuRstCfg, 0x2);
+		/* Wait PHY-IDTM to finish static training */
+		for (i = 0; i < ACC100_DDR_TRAINING_MAX; i++) {
+			usleep(ACC100_MS_IN_US);
+			value = acc100_reg_read(d,
+					HWPfChaDdrStDoneStatus);
+			if (value & 1)
+				break;
+		}
+		printf("DDR Training completed in %d ms", i);
+		/* Enable Memory Controller */
+		acc100_reg_write(d, HWPfDdrUmmcCtrl, 0x401);
+		/* Release AXI interface reset */
+		acc100_reg_write(d, HWPfChaDdrSifRstCfg, 3);
+	}
+
 	rte_bbdev_log_debug("PF Tip configuration complete for %s", dev_name);
 	return 0;
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.h b/drivers/baseband/acc100/rte_acc100_pmd.h
index cbcece2966..071b37cf9d 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.h
+++ b/drivers/baseband/acc100/rte_acc100_pmd.h
@@ -32,9 +32,4 @@
 #define RTE_ACC100_VF_DEVICE_ID        (0x0d5d)
 
-/* Define as 1 to use only a single FEC engine */
-#ifndef RTE_ACC100_SINGLE_FEC
-#define RTE_ACC100_SINGLE_FEC 0
-#endif
-
 /* Values used in filling in descriptors */
 #define ACC100_DMA_DESC_TYPE           2
@@ -154,4 +149,10 @@
 #define ACC100_CFG_PCI_AXI      0xC003
 #define ACC100_CFG_PCI_BRIDGE   0x40006033
+#define ACC100_QUAD_NUMS        4
+#define ACC100_LANES_PER_QUAD   4
+#define ACC100_PCIE_LANE_OFFSET 0x200
+#define ACC100_PCIE_QUAD_OFFSET 0x2000
+#define ACC100_PCS_EQ           0x6007
+#define ACC100_ADAPT            0x8400
 #define ACC100_ENGINE_OFFSET    0x1000
 #define ACC100_RESET_HI         0x20100
@@ -161,4 +162,13 @@
 #define ACC100_LONG_WAIT        1000
 #define ACC100_GPEX_AXIMAP_NUM  17
+#define ACC100_CLOCK_GATING_EN  0x30000
+#define ACC100_FABRIC_MODE      0xB
+/* DDR Size per VF - 512MB by default
+ * Can be increased up to 4 GB with single PF/VF
+ */
+#define ACC100_HARQ_DDR         (512 * 1)
+#define ACC100_PRQ_DDR_VER       0x10092020
+#define ACC100_MS_IN_US         (1000)
+#define ACC100_DDR_TRAINING_MAX (5000)
 
 /* ACC100 DMA Descriptor triplet */
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.141363562 +0100
+++ 0005-baseband-acc100-update-companion-PF-configure-functi.patch	2022-06-24 15:51:08.835983985 +0100
@@ -1 +1 @@
-From 60a623408bf3df2e15f7d497b3c36359612fb183 Mon Sep 17 00:00:00 2001
+From 4184a99adb238c9fb1ac95fd42ba8bc38b0c9193 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 60a623408bf3df2e15f7d497b3c36359612fb183 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -49 +50 @@
-index de7e4bcef4..79bee4345d 100644
+index cc69c76d54..170eceb37b 100644
@@ -61 +62 @@
-@@ -4412,5 +4412,5 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4413,5 +4413,5 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -68 +69 @@
-@@ -4432,4 +4432,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4433,4 +4433,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -76 +77 @@
-@@ -4452,18 +4455,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4453,18 +4456,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -98 +99 @@
-@@ -4483,4 +4475,15 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4484,4 +4476,15 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -114 +115 @@
-@@ -4501,4 +4504,9 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4502,4 +4505,9 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -124 +125 @@
-@@ -4519,20 +4527,15 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4520,20 +4528,15 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -150 +151 @@
-@@ -4585,7 +4588,4 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4586,7 +4589,4 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -158 +159 @@
-@@ -4602,7 +4602,4 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4603,7 +4603,4 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -166 +167 @@
-@@ -4618,11 +4615,8 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4619,11 +4616,8 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -179 +180 @@
-@@ -4655,5 +4649,5 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4656,5 +4650,5 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -186 +187 @@
-@@ -4680,4 +4674,9 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4681,4 +4675,9 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -196 +197 @@
-@@ -4692,8 +4691,4 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4693,8 +4692,4 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -205 +206 @@
-@@ -4705,5 +4700,5 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4706,5 +4701,5 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
@@ -212 +213 @@
-@@ -4719,4 +4714,86 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+@@ -4720,4 +4715,86 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)


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

* patch 'baseband/acc100: add protection for some negative scenario' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (3 preceding siblings ...)
  2022-06-24 15:01 ` patch 'baseband/acc100: update companion PF configure function' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'ipsec: fix NAT-T ports and length' " Kevin Traynor
                   ` (33 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Nicolas Chautru; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From fd2d725ae5b240642dc4aaa3ab1a11b0e529dfd8 Mon Sep 17 00:00:00 2001
From: Nicolas Chautru <nicolas.chautru@intel.com>
Date: Tue, 31 May 2022 15:31:43 -0700
Subject: [PATCH] baseband/acc100: add protection for some negative scenario

[ upstream commit 8454d94825181d7b833ea8346671e15b8dde5640 ]

Catch exception in PMD in case of invalid input parameter.

Fixes: 5ad5060f8f7a ("baseband/acc100: add LDPC processing functions")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc100/rte_acc100_pmd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 170eceb37b..6cdc6e65f7 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -1237,4 +1237,6 @@ get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index)
 	}
 	/* LBRM case - includes a division by N */
+	if (unlikely(z_c == 0))
+		return 0;
 	if (rv_index == 1)
 		return (((bg == 1 ? ACC100_K0_1_1 : ACC100_K0_1_2) * n_cb)
@@ -1765,4 +1767,8 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
 	/* Soft output */
 	if (check_bit(op->turbo_dec.op_flags, RTE_BBDEV_TURBO_SOFT_OUTPUT)) {
+		if (op->turbo_dec.soft_output.data == 0) {
+			rte_bbdev_log(ERR, "Soft output is not defined");
+			return -1;
+		}
 		if (check_bit(op->turbo_dec.op_flags,
 				RTE_BBDEV_TURBO_EQUALIZER))
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.184871634 +0100
+++ 0006-baseband-acc100-add-protection-for-some-negative-sce.patch	2022-06-24 15:51:08.843984006 +0100
@@ -1 +1 @@
-From 8454d94825181d7b833ea8346671e15b8dde5640 Mon Sep 17 00:00:00 2001
+From fd2d725ae5b240642dc4aaa3ab1a11b0e529dfd8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8454d94825181d7b833ea8346671e15b8dde5640 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 79bee4345d..32c8bc2b34 100644
+index 170eceb37b..6cdc6e65f7 100644


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

* patch 'ipsec: fix NAT-T ports and length' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (4 preceding siblings ...)
  2022-06-24 15:01 ` patch 'baseband/acc100: add protection for some negative scenario' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'examples/ipsec-secgw: fix NAT-T header fields' " Kevin Traynor
                   ` (32 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From d6a5fb4092c3f59726f76e777879d94a9477f3c9 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Wed, 25 May 2022 14:59:10 +0100
Subject: [PATCH] ipsec: fix NAT-T ports and length

[ upstream commit 778bbc089177f2e4cd9b3e66ec1a7940ffcab1e1 ]

Fix the UDP header fields, wrong byte order used for src and dst port
and wrong offset used when updating UDP datagram length.

Fixes: 01eef5907fc3 ("ipsec: support NAT-T")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 lib/ipsec/esp_outb.c | 2 +-
 lib/ipsec/sa.c       | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/ipsec/esp_outb.c b/lib/ipsec/esp_outb.c
index 672e56aba0..28bd58e3c7 100644
--- a/lib/ipsec/esp_outb.c
+++ b/lib/ipsec/esp_outb.c
@@ -198,5 +198,5 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
 	if (sa->type & RTE_IPSEC_SATP_NATT_ENABLE) {
 		struct rte_udp_hdr *udph = (struct rte_udp_hdr *)
-				(ph - sizeof(struct rte_udp_hdr));
+			(ph + sa->hdr_len - sizeof(struct rte_udp_hdr));
 		udph->dgram_len = rte_cpu_to_be_16(mb->pkt_len - sqh_len -
 				sa->hdr_l3_off - sa->hdr_len);
diff --git a/lib/ipsec/sa.c b/lib/ipsec/sa.c
index cdb70af0cb..c921699390 100644
--- a/lib/ipsec/sa.c
+++ b/lib/ipsec/sa.c
@@ -368,6 +368,6 @@ esp_outb_tun_init(struct rte_ipsec_sa *sa, const struct rte_ipsec_sa_prm *prm)
 				&sa->hdr[prm->tun.hdr_len];
 		sa->hdr_len += sizeof(struct rte_udp_hdr);
-		udph->src_port = prm->ipsec_xform.udp.sport;
-		udph->dst_port = prm->ipsec_xform.udp.dport;
+		udph->src_port = rte_cpu_to_be_16(prm->ipsec_xform.udp.sport);
+		udph->dst_port = rte_cpu_to_be_16(prm->ipsec_xform.udp.dport);
 		udph->dgram_cksum = 0;
 	}
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.210417380 +0100
+++ 0007-ipsec-fix-NAT-T-ports-and-length.patch	2022-06-24 15:51:08.846984014 +0100
@@ -1 +1 @@
-From 778bbc089177f2e4cd9b3e66ec1a7940ffcab1e1 Mon Sep 17 00:00:00 2001
+From d6a5fb4092c3f59726f76e777879d94a9477f3c9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 778bbc089177f2e4cd9b3e66ec1a7940ffcab1e1 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6925bb9945..5a5429a12b 100644
+index 672e56aba0..28bd58e3c7 100644
@@ -23 +24 @@
-@@ -197,5 +197,5 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
+@@ -198,5 +198,5 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
@@ -31 +32 @@
-index 1b673b6a18..59a547637d 100644
+index cdb70af0cb..c921699390 100644
@@ -34 +35 @@
-@@ -365,6 +365,6 @@ esp_outb_tun_init(struct rte_ipsec_sa *sa, const struct rte_ipsec_sa_prm *prm)
+@@ -368,6 +368,6 @@ esp_outb_tun_init(struct rte_ipsec_sa *sa, const struct rte_ipsec_sa_prm *prm)


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

* patch 'examples/ipsec-secgw: fix NAT-T header fields' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (5 preceding siblings ...)
  2022-06-24 15:01 ` patch 'ipsec: fix NAT-T ports and length' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'net/iavf: fix NAT-T payload length' " Kevin Traynor
                   ` (31 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From be3beb946efd3a028b5a901bcd2494b30d7f32ac Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Wed, 25 May 2022 14:59:11 +0100
Subject: [PATCH] examples/ipsec-secgw: fix NAT-T header fields

[ upstream commit 5051dc42a193551a837f7a4c0a1726babde46ae6 ]

Use the proper IP protocol (UDP instead of ESP) and set the ports when
UDP encapsulation is enabled.

Fixes: 9ae86b4cfc77 ("examples/ipsec-secgw: support UDP encap for inline crypto")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 examples/ipsec-secgw/sa.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 1839ac71af..45509c5c68 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -1459,4 +1459,6 @@ fill_ipsec_sa_prm(struct rte_ipsec_sa_prm *prm, const struct ipsec_sa *ss,
 		RTE_SECURITY_IPSEC_SA_MODE_TUNNEL;
 	prm->ipsec_xform.options.udp_encap = ss->udp_encap;
+	prm->ipsec_xform.udp.dport = ss->udp.dport;
+	prm->ipsec_xform.udp.sport = ss->udp.sport;
 	prm->ipsec_xform.options.ecn = 1;
 	prm->ipsec_xform.options.copy_dscp = 1;
@@ -1514,5 +1516,5 @@ ipsec_sa_init(struct ipsec_sa *lsa, struct rte_ipsec_sa *sa, uint32_t sa_size)
 			sizeof(v4) / RTE_IPV4_IHL_MULTIPLIER,
 		.time_to_live = IPDEFTTL,
-		.next_proto_id = IPPROTO_ESP,
+		.next_proto_id = lsa->udp_encap ? IPPROTO_UDP : IPPROTO_ESP,
 		.src_addr = lsa->src.ip.ip4,
 		.dst_addr = lsa->dst.ip.ip4,
@@ -1520,5 +1522,5 @@ ipsec_sa_init(struct ipsec_sa *lsa, struct rte_ipsec_sa *sa, uint32_t sa_size)
 	struct rte_ipv6_hdr v6 = {
 		.vtc_flow = htonl(IP6_VERSION << 28),
-		.proto = IPPROTO_ESP,
+		.proto = lsa->udp_encap ? IPPROTO_UDP : IPPROTO_ESP,
 	};
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.232330330 +0100
+++ 0008-examples-ipsec-secgw-fix-NAT-T-header-fields.patch	2022-06-24 15:51:08.848984020 +0100
@@ -1 +1 @@
-From 5051dc42a193551a837f7a4c0a1726babde46ae6 Mon Sep 17 00:00:00 2001
+From be3beb946efd3a028b5a901bcd2494b30d7f32ac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5051dc42a193551a837f7a4c0a1726babde46ae6 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 0b27f11fc0..fde263ca33 100644
+index 1839ac71af..45509c5c68 100644
@@ -22 +23 @@
-@@ -1486,4 +1486,6 @@ fill_ipsec_sa_prm(struct rte_ipsec_sa_prm *prm, const struct ipsec_sa *ss,
+@@ -1459,4 +1459,6 @@ fill_ipsec_sa_prm(struct rte_ipsec_sa_prm *prm, const struct ipsec_sa *ss,
@@ -29 +30 @@
-@@ -1536,5 +1538,5 @@ ipsec_sa_init(struct ipsec_sa *lsa, struct rte_ipsec_sa *sa, uint32_t sa_size)
+@@ -1514,5 +1516,5 @@ ipsec_sa_init(struct ipsec_sa *lsa, struct rte_ipsec_sa *sa, uint32_t sa_size)
@@ -36 +37 @@
-@@ -1542,5 +1544,5 @@ ipsec_sa_init(struct ipsec_sa *lsa, struct rte_ipsec_sa *sa, uint32_t sa_size)
+@@ -1520,5 +1522,5 @@ ipsec_sa_init(struct ipsec_sa *lsa, struct rte_ipsec_sa *sa, uint32_t sa_size)


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

* patch 'net/iavf: fix NAT-T payload length' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (6 preceding siblings ...)
  2022-06-24 15:01 ` patch 'examples/ipsec-secgw: fix NAT-T header fields' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'examples/ipsec-secgw: fix ESN setting' " Kevin Traynor
                   ` (30 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 362a219f40d67f802a0c9a5c0e72886d6a5be012 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Wed, 25 May 2022 14:59:12 +0100
Subject: [PATCH] net/iavf: fix NAT-T payload length

[ upstream commit 1d5e6bb6b964674bed75fcf954ea4cd6c796c8e4 ]

Correct the length calculation used for NAT-T

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

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/net/iavf/iavf_ipsec_crypto.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c
index fa1cecc1e1..75f05ee558 100644
--- a/drivers/net/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/iavf/iavf_ipsec_crypto.c
@@ -1119,9 +1119,12 @@ iavf_ipsec_crypto_compute_l4_payload_length(struct rte_mbuf *m,
 		 */
 
-	if (s->udp_encap.enabled)
+	if (s->udp_encap.enabled) {
 		ol4_len = sizeof(struct rte_udp_hdr);
-
-	l3_len = m->l3_len;
-	l4_len = m->l4_len;
+		l3_len = m->l3_len - ol4_len;
+		l4_len = l3_len;
+	} else {
+		l3_len = m->l3_len;
+		l4_len = m->l4_len;
+	}
 
 	return rte_pktmbuf_pkt_len(m) - (ol2_len + ol3_len + ol4_len +
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.255443633 +0100
+++ 0009-net-iavf-fix-NAT-T-payload-length.patch	2022-06-24 15:51:08.850984025 +0100
@@ -1 +1 @@
-From 1d5e6bb6b964674bed75fcf954ea4cd6c796c8e4 Mon Sep 17 00:00:00 2001
+From 362a219f40d67f802a0c9a5c0e72886d6a5be012 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1d5e6bb6b964674bed75fcf954ea4cd6c796c8e4 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org


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

* patch 'examples/ipsec-secgw: fix ESN setting' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (7 preceding siblings ...)
  2022-06-24 15:01 ` patch 'net/iavf: fix NAT-T payload length' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'common/cpt: fix build with GCC 12' " Kevin Traynor
                   ` (29 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From a9485fd00b862d031c46480126fb80dc579c229d Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Tue, 14 Jun 2022 13:43:13 +0100
Subject: [PATCH] examples/ipsec-secgw: fix ESN setting

[ upstream commit 3e534bc81a5479e90b76471ebe1ba4de80a68374 ]

Fix ESN option flag and initial value for the rte_ipsec library path.

Fixes: 560029d5cfc9 ("examples/ipsec-secgw: define initial ESN value")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 examples/ipsec-secgw/sa.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 45509c5c68..89131f71e5 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -1464,4 +1464,9 @@ fill_ipsec_sa_prm(struct rte_ipsec_sa_prm *prm, const struct ipsec_sa *ss,
 	prm->ipsec_xform.options.copy_dscp = 1;
 
+	if (ss->esn > 0) {
+		prm->ipsec_xform.options.esn = 1;
+		prm->ipsec_xform.esn.value = ss->esn;
+	}
+
 	if (IS_IP4_TUNNEL(ss->flags)) {
 		prm->ipsec_xform.tunnel.type = RTE_SECURITY_IPSEC_TUNNEL_IPV4;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.278071808 +0100
+++ 0010-examples-ipsec-secgw-fix-ESN-setting.patch	2022-06-24 15:51:08.851984028 +0100
@@ -1 +1 @@
-From 3e534bc81a5479e90b76471ebe1ba4de80a68374 Mon Sep 17 00:00:00 2001
+From a9485fd00b862d031c46480126fb80dc579c229d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e534bc81a5479e90b76471ebe1ba4de80a68374 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index fde263ca33..5d9cec97db 100644
+index 45509c5c68..89131f71e5 100644
@@ -21 +22 @@
-@@ -1491,4 +1491,9 @@ fill_ipsec_sa_prm(struct rte_ipsec_sa_prm *prm, const struct ipsec_sa *ss,
+@@ -1464,4 +1464,9 @@ fill_ipsec_sa_prm(struct rte_ipsec_sa_prm *prm, const struct ipsec_sa *ss,


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

* patch 'common/cpt: fix build with GCC 12' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (8 preceding siblings ...)
  2022-06-24 15:01 ` patch 'examples/ipsec-secgw: fix ESN setting' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'crypto/cnxk: " Kevin Traynor
                   ` (28 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 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 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 978835ed87a361a24e0c4424f1a352d13fb7bfac 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 f16ee44297..e6dcb7674c 100644
--- a/drivers/common/cpt/cpt_mcode_defines.h
+++ b/drivers/common/cpt/cpt_mcode_defines.h
@@ -388,5 +388,5 @@ typedef struct buf_ptr {
 typedef struct{
 	int buf_cnt;
-	buf_ptr_t bufs[0];
+	buf_ptr_t bufs[];
 } iov_ptr_t;
 
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index e1f2f6005d..22aabab6ac 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -395,25 +395,24 @@ fill_sg_comp_from_iov(sg_comp_t *list,
 	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;
 		}
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.300692427 +0100
+++ 0011-common-cpt-fix-build-with-GCC-12.patch	2022-06-24 15:51:08.855984039 +0100
@@ -1 +1 @@
-From 3aa16821ab3e0a21052880fbf4dcb76801380c31 Mon Sep 17 00:00:00 2001
+From 978835ed87a361a24e0c4424f1a352d13fb7bfac Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 3aa16821ab3e0a21052880fbf4dcb76801380c31 ]
+
@@ -44 +45,0 @@
-Cc: stable@dpdk.org


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

* patch 'crypto/cnxk: fix build with GCC 12' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (9 preceding siblings ...)
  2022-06-24 15:01 ` patch 'common/cpt: fix build with GCC 12' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'test/ipsec: " Kevin Traynor
                   ` (27 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 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 21.11.2

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

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

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

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

Thanks.

Kevin

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

[ upstream commit d82d2db2659411059c047a96e867666625a0f1f2 ]

The following warning is observed with GCC 12 compilation:

In file included from ../drivers/crypto/cnxk/cn10k_cryptodev_ops.c:17:
In function ‘fill_sg_comp_from_iov’,
    inlined from ‘cpt_pdcp_chain_alg_prep’ at
        ../drivers/crypto/cnxk/cnxk_se.h:1194:8,
    inlined from ‘cpt_fc_enc_hmac_prep’ at
        ../drivers/crypto/cnxk/cnxk_se.h:1871:9,
    inlined from ‘fill_digest_params’ at
        ../drivers/crypto/cnxk/cnxk_se.h:2829:8,
    inlined from ‘cpt_sym_inst_fill’ at
        ../drivers/crypto/cnxk/cn10k_cryptodev_ops.c:92:9,
    inlined from ‘cn10k_cpt_fill_inst.constprop’ at
        ../drivers/crypto/cnxk/cn10k_cryptodev_ops.c:146:10:
../drivers/crypto/cnxk/cnxk_se.h:222:52: warning: array subscript 0 is
outside array bounds of ‘struct roc_se_buf_ptr[0]’ [-Warray-bounds]
  222 |           e_vaddr = (uint64_t)bufs[j].vaddr;
      |                               ~~~~~~~^~~~~~
../drivers/crypto/cnxk/cnxk_se.h:223:48: warning: array subscript 0 is
outside array bounds of ‘struct roc_se_buf_ptr[0]’ [-Warray-bounds]
  223 |           e_len = (size > bufs[j].size) ? bufs[j].size : size;
      |                           ~~~~~~~^~~~~

This patch resolves the warning.

Fixes: 3de331795f73 ("crypto/cnxk: add flexi cipher 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/crypto/cnxk/cnxk_se.h | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index 37237de21a..99a2894fa6 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -180,25 +180,25 @@ fill_sg_comp_from_iov(struct roc_se_sglist_comp *list, uint32_t i,
 	uint32_t extra_len = extra_buf ? extra_buf->size : 0;
 	uint32_t size = *psize;
-	struct roc_se_buf_ptr *bufs;
 
-	bufs = from->bufs;
 	for (j = 0; (j < from->buf_cnt) && size; j++) {
+		struct roc_se_sglist_comp *to = &list[i >> 2];
+		uint32_t buf_sz = from->bufs[j].size;
+		void *vaddr = from->bufs[j].vaddr;
 		uint64_t e_vaddr;
 		uint32_t e_len;
-		struct roc_se_sglist_comp *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_vaddr = (uint64_t)bufs[j].vaddr + from_offset;
-			e_len = (size > (bufs[j].size - from_offset)) ?
-					(bufs[j].size - from_offset) :
+			e_vaddr = (uint64_t)vaddr + from_offset;
+			e_len = (size > (buf_sz - from_offset)) ?
+					(buf_sz - from_offset) :
 					size;
 			from_offset = 0;
 		} else {
-			e_vaddr = (uint64_t)bufs[j].vaddr;
-			e_len = (size > bufs[j].size) ? bufs[j].size : size;
+			e_vaddr = (uint64_t)vaddr;
+			e_len = (size > buf_sz) ? buf_sz : size;
 		}
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.324544490 +0100
+++ 0012-crypto-cnxk-fix-build-with-GCC-12.patch	2022-06-24 15:51:08.857984044 +0100
@@ -1 +1 @@
-From d82d2db2659411059c047a96e867666625a0f1f2 Mon Sep 17 00:00:00 2001
+From e0bff8480fce6437124558f49f608f214c9092be Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit d82d2db2659411059c047a96e867666625a0f1f2 ]
+
@@ -35 +36,0 @@
-Cc: stable@dpdk.org
@@ -46 +47 @@
-index 8ed3a8b2ef..5c61e4dfa4 100644
+index 37237de21a..99a2894fa6 100644
@@ -49 +50 @@
-@@ -189,25 +189,25 @@ fill_sg_comp_from_iov(struct roc_se_sglist_comp *list, uint32_t i,
+@@ -180,25 +180,25 @@ fill_sg_comp_from_iov(struct roc_se_sglist_comp *list, uint32_t i,


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

* patch 'test/ipsec: fix build with GCC 12' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (10 preceding siblings ...)
  2022-06-24 15:01 ` patch 'crypto/cnxk: " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'crypto/scheduler: fix queue pair in scheduler failover' " Kevin Traynor
                   ` (26 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 9445fcf1388068915ae4c0cebbac527482b39215 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 bc2a3dbc2e..3c6dcdc604 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -544,10 +544,12 @@ 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);
@@ -1355,5 +1357,6 @@ test_ipsec_crypto_outb_burst_null_null(int i)
 	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;
@@ -1473,5 +1476,6 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i)
 			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;
@@ -1541,7 +1545,7 @@ 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;
@@ -1550,5 +1554,6 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
 			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;
@@ -1650,5 +1655,6 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i)
 	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;
@@ -1728,5 +1734,6 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
 	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;
@@ -1735,6 +1742,7 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
 			/* 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;
@@ -1805,5 +1813,6 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)
 		/* 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.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.347085849 +0100
+++ 0013-test-ipsec-fix-build-with-GCC-12.patch	2022-06-24 15:51:08.860984052 +0100
@@ -1 +1 @@
-From 6e108b6a7c0c0699e6304f7b5706736b34d32607 Mon Sep 17 00:00:00 2001
+From 9445fcf1388068915ae4c0cebbac527482b39215 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 bc2a3dbc2e..3c6dcdc604 100644
@@ -49 +50 @@
-@@ -555,10 +555,12 @@ struct rte_ipv4_hdr ipv4_outer  = {
+@@ -544,10 +544,12 @@ struct rte_ipv4_hdr ipv4_outer  = {
@@ -64 +65 @@
-@@ -1366,5 +1368,6 @@ test_ipsec_crypto_outb_burst_null_null(int i)
+@@ -1355,5 +1357,6 @@ test_ipsec_crypto_outb_burst_null_null(int i)
@@ -72 +73 @@
-@@ -1484,5 +1487,6 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i)
+@@ -1473,5 +1476,6 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i)
@@ -80 +81 @@
-@@ -1552,7 +1556,7 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
+@@ -1541,7 +1545,7 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
@@ -91 +92 @@
-@@ -1561,5 +1565,6 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
+@@ -1550,5 +1554,6 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
@@ -99 +100 @@
-@@ -1661,5 +1666,6 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i)
+@@ -1650,5 +1655,6 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i)
@@ -107 +108 @@
-@@ -1739,5 +1745,6 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
+@@ -1728,5 +1734,6 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
@@ -115 +116 @@
-@@ -1746,6 +1753,7 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
+@@ -1735,6 +1742,7 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
@@ -125 +126 @@
-@@ -1816,5 +1824,6 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)
+@@ -1805,5 +1813,6 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)


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

* patch 'crypto/scheduler: fix queue pair in scheduler failover' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (11 preceding siblings ...)
  2022-06-24 15:01 ` patch 'test/ipsec: " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'test/crypto: fix cipher offset for ZUC' " Kevin Traynor
                   ` (25 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Jakub Wysocki; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From bf03e0341c3f3a2ee2865b4af38363f9d69d9160 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 5023577ef8..2a0e29fa72 100644
--- a/drivers/crypto/scheduler/scheduler_failover.c
+++ b/drivers/crypto/scheduler/scheduler_failover.c
@@ -158,4 +158,7 @@ scheduler_start(struct rte_cryptodev *dev)
 				dev->data->queue_pairs[i])->private_qp_ctx;
 
+		sched_ctx->workers[PRIMARY_WORKER_IDX].qp_id = i;
+		sched_ctx->workers[SECONDARY_WORKER_IDX].qp_id = i;
+
 		rte_memcpy(&qp_ctx->primary_worker,
 				&sched_ctx->workers[PRIMARY_WORKER_IDX],
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.370171120 +0100
+++ 0014-crypto-scheduler-fix-queue-pair-in-scheduler-failove.patch	2022-06-24 15:51:08.861984055 +0100
@@ -1 +1 @@
-From b302708673017b560644b954ed78ef6cdba1aa2d Mon Sep 17 00:00:00 2001
+From bf03e0341c3f3a2ee2865b4af38363f9d69d9160 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b302708673017b560644b954ed78ef6cdba1aa2d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'test/crypto: fix cipher offset for ZUC' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (12 preceding siblings ...)
  2022-06-24 15:01 ` patch 'crypto/scheduler: fix queue pair in scheduler failover' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'test/ipsec: fix performance test' " Kevin Traynor
                   ` (24 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Ciara Power; +Cc: Kai Ji, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 387d7f2a33b638ce3a5e1fad1a304cf3aa7521b1 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 553c52e0dd..0081578f04 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6031,5 +6031,5 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
 					tdata->cipher_iv.len,
 					tdata->plaintext.len,
-					0);
+					tdata->validCipherOffsetInBits.len);
 	if (retval < 0)
 		return retval;
@@ -6126,5 +6126,5 @@ test_zuc_encryption_sgl(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;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.391339839 +0100
+++ 0015-test-crypto-fix-cipher-offset-for-ZUC.patch	2022-06-24 15:51:08.876984095 +0100
@@ -1 +1 @@
-From 7a0f8fe76bd03dc8b61965040a66409996afa717 Mon Sep 17 00:00:00 2001
+From 387d7f2a33b638ce3a5e1fad1a304cf3aa7521b1 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 553c52e0dd..0081578f04 100644
@@ -23 +24 @@
-@@ -6034,5 +6034,5 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
+@@ -6031,5 +6031,5 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
@@ -30 +31 @@
-@@ -6129,5 +6129,5 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
+@@ -6126,5 +6126,5 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)


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

* patch 'test/ipsec: fix performance test' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (13 preceding siblings ...)
  2022-06-24 15:01 ` patch 'test/crypto: fix cipher offset for ZUC' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'event/octeontx: fix SSO fast path' " Kevin Traynor
                   ` (23 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From d1e2bd80a6b80b1039deb11a7eb64412e8e084d3 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Tue, 21 Jun 2022 13:30:45 +0000
Subject: [PATCH] test/ipsec: fix performance test

[ upstream commit 3ab95f3d1cebc1e064e30f83ddef1453fbcd9ae1 ]

This patch initializes with 0 rte_ipsec_sa_prm inside the
ipsec_sa struct.
Before it was passed uninitialized to rte_ipsec_sa_init(),
which does not check whether prm->ipsec_xform.esn.value is
greater than sa->sqn_mask.

Bugzilla ID: 1023
Fixes: f7f3ac6dcbe2 ("test/ipsec: add performance cases")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 app/test/test_ipsec_perf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/test_ipsec_perf.c b/app/test/test_ipsec_perf.c
index 92106bf374..7e07805ea3 100644
--- a/app/test/test_ipsec_perf.c
+++ b/app/test/test_ipsec_perf.c
@@ -581,6 +581,6 @@ static int
 test_libipsec_perf(void)
 {
-	struct ipsec_sa sa_out;
-	struct ipsec_sa sa_in;
+	struct ipsec_sa sa_out = { .sa_prm = { 0 } };
+	struct ipsec_sa sa_in = { .sa_prm = { 0 } };
 	uint32_t i;
 	int ret;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.421516361 +0100
+++ 0016-test-ipsec-fix-performance-test.patch	2022-06-24 15:51:08.878984101 +0100
@@ -1 +1 @@
-From 3ab95f3d1cebc1e064e30f83ddef1453fbcd9ae1 Mon Sep 17 00:00:00 2001
+From d1e2bd80a6b80b1039deb11a7eb64412e8e084d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3ab95f3d1cebc1e064e30f83ddef1453fbcd9ae1 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 0eca003282..b5d0c2e036 100644
+index 92106bf374..7e07805ea3 100644
@@ -25 +26 @@
-@@ -593,6 +593,6 @@ static int
+@@ -581,6 +581,6 @@ static int


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

* patch 'event/octeontx: fix SSO fast path' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (14 preceding siblings ...)
  2022-06-24 15:01 ` patch 'test/ipsec: fix performance test' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'event/dlb2: rework queue drain handling' " Kevin Traynor
                   ` (22 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Harman Kalra; +Cc: Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From d2c3d326d001605c8ba05ac61f8ce656754dc36f Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Tue, 24 May 2022 14:12:25 +0530
Subject: [PATCH] event/octeontx: fix SSO fast path

[ upstream commit d430b921a4d7c5449f6e99b5ba40671b27d87adb ]

Segmentation fault is observed as soon as any  application
with ethdev event is launched as ev->mbuf was not set properly.

Fixing sub event type violation as in OCTEONTX event device
sub_event_type is used to store the ethernet port identifier
when work is received from OCTEONTX ethernet device. This violates
the event device spec as sub_event_type should be 0 in the initial
receive stage. Setting sub_event_type to 0 after copying the port id
in single workslot mode.

Fixes: 44a2cebbd489 ("crypto/octeontx: add crypto adapter data path")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/event/octeontx/ssovf_worker.h | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/drivers/event/octeontx/ssovf_worker.h b/drivers/event/octeontx/ssovf_worker.h
index e6ee292688..57be476394 100644
--- a/drivers/event/octeontx/ssovf_worker.h
+++ b/drivers/event/octeontx/ssovf_worker.h
@@ -180,14 +180,20 @@ ssows_get_work(struct ssows *ws, struct rte_event *ev, const uint16_t flag)
 
 	if (get_work1) {
-		if (ev->event_type == RTE_EVENT_TYPE_ETHDEV)
-			get_work1 = (uintptr_t)ssovf_octeontx_wqe_to_pkt(
-				get_work1, (ev->event >> 20) & 0x7F, flag,
-				ws->lookup_mem);
-		else if (ev->event_type == RTE_EVENT_TYPE_CRYPTODEV)
+		if (ev->event_type == RTE_EVENT_TYPE_ETHDEV) {
+			uint16_t port = (ev->event >> 20) & 0x7F;
+
+			ev->sub_event_type = 0;
+			ev->mbuf = ssovf_octeontx_wqe_to_pkt(
+				get_work1, port, flag, ws->lookup_mem);
+		} else if (ev->event_type == RTE_EVENT_TYPE_CRYPTODEV) {
 			get_work1 = otx_crypto_adapter_dequeue(get_work1);
-		ev->u64 = get_work1;
-	} else if (unlikely((get_work0 & 0xFFFFFFFF) == 0xFFFFFFFF)) {
-		ssovf_octeontx_wqe_free(get_work1);
-		return 0;
+			ev->u64 = get_work1;
+		} else {
+			if (unlikely((get_work0 & 0xFFFFFFFF) == 0xFFFFFFFF)) {
+				ssovf_octeontx_wqe_free(get_work1);
+				return 0;
+			}
+			ev->u64 = get_work1;
+		}
 	}
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.554392156 +0100
+++ 0022-event-octeontx-fix-SSO-fast-path.patch	2022-06-24 15:51:08.886984122 +0100
@@ -1 +1 @@
-From d430b921a4d7c5449f6e99b5ba40671b27d87adb Mon Sep 17 00:00:00 2001
+From d2c3d326d001605c8ba05ac61f8ce656754dc36f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d430b921a4d7c5449f6e99b5ba40671b27d87adb ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org


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

* patch 'event/dlb2: rework queue drain handling' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (15 preceding siblings ...)
  2022-06-24 15:01 ` patch 'event/octeontx: fix SSO fast path' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'event/dlb2: fix check of QID in-flight' " Kevin Traynor
                   ` (21 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Timothy McDaniel; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 7c0439f319503ced6777f3e0d2da213ead816b79 Mon Sep 17 00:00:00 2001
From: Timothy McDaniel <timothy.mcdaniel@intel.com>
Date: Mon, 6 Jun 2022 10:55:17 -0500
Subject: [PATCH] event/dlb2: rework queue drain handling

[ upstream commit 82a710bccb209f7b5b0309f687741102f093234f ]

Previously, anything that prevented the CQs from being drained
would hang the PMD for an unacceptably long time. This commit updates
the drain logic to be resource and time based, thus eliminating
the potential for a long hang when draining the queues in preparation
for a reset.

Fixes: 1857f1922ce2 ("event/dlb2: use new implementation of resource file")

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 drivers/event/dlb2/pf/base/dlb2_hw_types.h |  2 +-
 drivers/event/dlb2/pf/base/dlb2_resource.c | 45 +++++++++++++++++-----
 2 files changed, 37 insertions(+), 10 deletions(-)

diff --git a/drivers/event/dlb2/pf/base/dlb2_hw_types.h b/drivers/event/dlb2/pf/base/dlb2_hw_types.h
index 6b8fee3416..9511521e67 100644
--- a/drivers/event/dlb2/pf/base/dlb2_hw_types.h
+++ b/drivers/event/dlb2/pf/base/dlb2_hw_types.h
@@ -28,5 +28,5 @@
 #define DLB2_MAX_NUM_SEQUENCE_NUMBER_MODES	5
 #define DLB2_MAX_CQ_COMP_CHECK_LOOPS		409600
-#define DLB2_MAX_QID_EMPTY_CHECK_LOOPS		(32 * 64 * 1024 * (800 / 30))
+#define DLB2_MAX_QID_EMPTY_CHECK_LOOPS		(4 * DLB2_MAX_NUM_LDB_CREDITS)
 
 #define DLB2_FUNC_BAR				0
diff --git a/drivers/event/dlb2/pf/base/dlb2_resource.c b/drivers/event/dlb2/pf/base/dlb2_resource.c
index d4c49c2992..8c57bdfff7 100644
--- a/drivers/event/dlb2/pf/base/dlb2_resource.c
+++ b/drivers/event/dlb2/pf/base/dlb2_resource.c
@@ -1058,5 +1058,5 @@ static u32 dlb2_dir_cq_token_count(struct dlb2_hw *hw,
 }
 
-static void dlb2_drain_dir_cq(struct dlb2_hw *hw,
+static int dlb2_drain_dir_cq(struct dlb2_hw *hw,
 			      struct dlb2_dir_pq_pair *port)
 {
@@ -1090,4 +1090,6 @@ static void dlb2_drain_dir_cq(struct dlb2_hw *hw,
 		os_unmap_producer_port(hw, pp_addr);
 	}
+
+	return cnt;
 }
 
@@ -1108,4 +1110,5 @@ static int dlb2_domain_drain_dir_cqs(struct dlb2_hw *hw,
 	struct dlb2_list_entry *iter;
 	struct dlb2_dir_pq_pair *port;
+	int drain_cnt = 0;
 	RTE_SET_USED(iter);
 
@@ -1121,5 +1124,5 @@ static int dlb2_domain_drain_dir_cqs(struct dlb2_hw *hw,
 			dlb2_dir_port_cq_disable(hw, port);
 
-		dlb2_drain_dir_cq(hw, port);
+		drain_cnt = dlb2_drain_dir_cq(hw, port);
 
 		if (toggle_port)
@@ -1127,5 +1130,5 @@ static int dlb2_domain_drain_dir_cqs(struct dlb2_hw *hw,
 	}
 
-	return 0;
+	return drain_cnt;
 }
 
@@ -1171,8 +1174,18 @@ static int dlb2_domain_drain_dir_queues(struct dlb2_hw *hw,
 
 	for (i = 0; i < DLB2_MAX_QID_EMPTY_CHECK_LOOPS; i++) {
-		dlb2_domain_drain_dir_cqs(hw, domain, true);
+		int drain_cnt;
+
+		drain_cnt = dlb2_domain_drain_dir_cqs(hw, domain, false);
 
 		if (dlb2_domain_dir_queues_empty(hw, domain))
 			break;
+
+		/*
+		 * Allow time for DLB to schedule QEs before draining
+		 * the CQs again.
+		 */
+		if (!drain_cnt)
+			rte_delay_us(1);
+
 	}
 
@@ -1250,5 +1263,5 @@ static u32 dlb2_ldb_cq_token_count(struct dlb2_hw *hw,
 }
 
-static void dlb2_drain_ldb_cq(struct dlb2_hw *hw, struct dlb2_ldb_port *port)
+static int dlb2_drain_ldb_cq(struct dlb2_hw *hw, struct dlb2_ldb_port *port)
 {
 	u32 infl_cnt, tkn_cnt;
@@ -1290,7 +1303,9 @@ static void dlb2_drain_ldb_cq(struct dlb2_hw *hw, struct dlb2_ldb_port *port)
 		os_unmap_producer_port(hw, pp_addr);
 	}
+
+	return tkn_cnt;
 }
 
-static void dlb2_domain_drain_ldb_cqs(struct dlb2_hw *hw,
+static int dlb2_domain_drain_ldb_cqs(struct dlb2_hw *hw,
 				      struct dlb2_hw_domain *domain,
 				      bool toggle_port)
@@ -1298,4 +1313,5 @@ static void dlb2_domain_drain_ldb_cqs(struct dlb2_hw *hw,
 	struct dlb2_list_entry *iter;
 	struct dlb2_ldb_port *port;
+	int drain_cnt = 0;
 	int i;
 	RTE_SET_USED(iter);
@@ -1303,5 +1319,5 @@ static void dlb2_domain_drain_ldb_cqs(struct dlb2_hw *hw,
 	/* If the domain hasn't been started, there's no traffic to drain */
 	if (!domain->started)
-		return;
+		return 0;
 
 	for (i = 0; i < DLB2_NUM_COS_DOMAINS; i++) {
@@ -1310,5 +1326,5 @@ static void dlb2_domain_drain_ldb_cqs(struct dlb2_hw *hw,
 				dlb2_ldb_port_cq_disable(hw, port);
 
-			dlb2_drain_ldb_cq(hw, port);
+			drain_cnt = dlb2_drain_ldb_cq(hw, port);
 
 			if (toggle_port)
@@ -1316,4 +1332,6 @@ static void dlb2_domain_drain_ldb_cqs(struct dlb2_hw *hw,
 		}
 	}
+
+	return drain_cnt;
 }
 
@@ -1376,8 +1394,17 @@ static int dlb2_domain_drain_mapped_queues(struct dlb2_hw *hw,
 
 	for (i = 0; i < DLB2_MAX_QID_EMPTY_CHECK_LOOPS; i++) {
-		dlb2_domain_drain_ldb_cqs(hw, domain, true);
+		int drain_cnt;
+
+		drain_cnt = dlb2_domain_drain_ldb_cqs(hw, domain, false);
 
 		if (dlb2_domain_mapped_queues_empty(hw, domain))
 			break;
+
+		/*
+		 * Allow time for DLB to schedule QEs before draining
+		 * the CQs again.
+		 */
+		if (!drain_cnt)
+			rte_delay_us(1);
 	}
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.576609319 +0100
+++ 0023-event-dlb2-rework-queue-drain-handling.patch	2022-06-24 15:51:08.889984130 +0100
@@ -1 +1 @@
-From 82a710bccb209f7b5b0309f687741102f093234f Mon Sep 17 00:00:00 2001
+From 7c0439f319503ced6777f3e0d2da213ead816b79 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 82a710bccb209f7b5b0309f687741102f093234f ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* patch 'event/dlb2: fix check of QID in-flight' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (16 preceding siblings ...)
  2022-06-24 15:01 ` patch 'event/dlb2: rework queue drain handling' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'event/cnxk: fix QoS parameter handling' " Kevin Traynor
                   ` (20 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Timothy McDaniel; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From e6f569043c5deef7d7052c82cdb5d442468bc8a0 Mon Sep 17 00:00:00 2001
From: Timothy McDaniel <timothy.mcdaniel@intel.com>
Date: Mon, 6 Jun 2022 11:03:11 -0500
Subject: [PATCH] event/dlb2: fix check of QID in-flight

[ upstream commit 7767b849ab028db51474dcbd2a51bff3b5f4f81d ]

If QID inflights is set to an invalid value, it can cause the
PMD to hang.  This commit adds checks to make sure that the
value is valid before programming the hardware.

Fixes: 1857f1922ce2 ("event/dlb2: use new implementation of resource file")

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 drivers/event/dlb2/pf/base/dlb2_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/event/dlb2/pf/base/dlb2_resource.c b/drivers/event/dlb2/pf/base/dlb2_resource.c
index 8c57bdfff7..4011c24aef 100644
--- a/drivers/event/dlb2/pf/base/dlb2_resource.c
+++ b/drivers/event/dlb2/pf/base/dlb2_resource.c
@@ -3729,5 +3729,5 @@ dlb2_verify_create_ldb_queue_args(struct dlb2_hw *hw,
 	}
 
-	if (args->num_qid_inflights > 4096) {
+	if (args->num_qid_inflights < 1 || args->num_qid_inflights > 2048) {
 		resp->status = DLB2_ST_INVALID_QID_INFLIGHT_ALLOCATION;
 		return -EINVAL;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.602031809 +0100
+++ 0024-event-dlb2-fix-check-of-QID-in-flight.patch	2022-06-24 15:51:08.891984136 +0100
@@ -1 +1 @@
-From 7767b849ab028db51474dcbd2a51bff3b5f4f81d Mon Sep 17 00:00:00 2001
+From e6f569043c5deef7d7052c82cdb5d442468bc8a0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7767b849ab028db51474dcbd2a51bff3b5f4f81d ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org


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

* patch 'event/cnxk: fix QoS parameter handling' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (17 preceding siblings ...)
  2022-06-24 15:01 ` patch 'event/dlb2: fix check of QID in-flight' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'event/cnxk: fix Tx adapter enqueue return for CN10K' " Kevin Traynor
                   ` (19 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Shijith Thotton; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 93b1138ccde149c0bfab0b0bbb806cd7b416cb08 Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton@marvell.com>
Date: Fri, 20 May 2022 12:41:05 +0530
Subject: [PATCH] event/cnxk: fix QoS parameter handling

[ upstream commit 448e2400fa8a2dd6169b6cb40a98b18d4e28fca9 ]

Fixed QoS parameters getting over written and IAQ/TAQ threshold
calculation.

Fixes: 910da32c53a9 ("event/cnxk: add device start")

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
 drivers/common/cnxk/roc_sso.c      | 4 ++--
 drivers/event/cnxk/cnxk_eventdev.c | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/common/cnxk/roc_sso.c b/drivers/common/cnxk/roc_sso.c
index 45ff16ca0e..ede0a8a3bb 100644
--- a/drivers/common/cnxk/roc_sso.c
+++ b/drivers/common/cnxk/roc_sso.c
@@ -379,8 +379,8 @@ roc_sso_hwgrp_qos_config(struct roc_sso *roc_sso, struct roc_sso_hwgrp_qos *qos,
 		req->grp = qos[i].hwgrp;
 		req->xaq_limit = (nb_xaq * (xaq_prcnt ? xaq_prcnt : 100)) / 100;
-		req->taq_thr = (SSO_HWGRP_IAQ_MAX_THR_MASK *
+		req->iaq_thr = (SSO_HWGRP_IAQ_MAX_THR_MASK *
 				(iaq_prcnt ? iaq_prcnt : 100)) /
 			       100;
-		req->iaq_thr = (SSO_HWGRP_TAQ_MAX_THR_MASK *
+		req->taq_thr = (SSO_HWGRP_TAQ_MAX_THR_MASK *
 				(taq_prcnt ? taq_prcnt : 100)) /
 			       100;
diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 6ad4e23e2b..46a788ef4e 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -418,8 +418,8 @@ cnxk_sso_start(struct rte_eventdev *event_dev, cnxk_sso_hws_reset_t reset_fn,
 	plt_sso_dbg();
 	for (i = 0; i < dev->qos_queue_cnt; i++) {
-		qos->hwgrp = dev->qos_parse_data[i].queue;
-		qos->iaq_prcnt = dev->qos_parse_data[i].iaq_prcnt;
-		qos->taq_prcnt = dev->qos_parse_data[i].taq_prcnt;
-		qos->xaq_prcnt = dev->qos_parse_data[i].xaq_prcnt;
+		qos[i].hwgrp = dev->qos_parse_data[i].queue;
+		qos[i].iaq_prcnt = dev->qos_parse_data[i].iaq_prcnt;
+		qos[i].taq_prcnt = dev->qos_parse_data[i].taq_prcnt;
+		qos[i].xaq_prcnt = dev->qos_parse_data[i].xaq_prcnt;
 	}
 	rc = roc_sso_hwgrp_qos_config(&dev->sso, qos, dev->qos_queue_cnt,
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.626865145 +0100
+++ 0025-event-cnxk-fix-QoS-parameter-handling.patch	2022-06-24 15:51:08.892984138 +0100
@@ -1 +1 @@
-From 448e2400fa8a2dd6169b6cb40a98b18d4e28fca9 Mon Sep 17 00:00:00 2001
+From 93b1138ccde149c0bfab0b0bbb806cd7b416cb08 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 448e2400fa8a2dd6169b6cb40a98b18d4e28fca9 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index d986abe573..7c86474809 100644
+index 45ff16ca0e..ede0a8a3bb 100644
@@ -22 +23 @@
-@@ -407,8 +407,8 @@ roc_sso_hwgrp_qos_config(struct roc_sso *roc_sso, struct roc_sso_hwgrp_qos *qos,
+@@ -379,8 +379,8 @@ roc_sso_hwgrp_qos_config(struct roc_sso *roc_sso, struct roc_sso_hwgrp_qos *qos,
@@ -34 +35 @@
-index a9e4201ed8..97dcf7b66e 100644
+index 6ad4e23e2b..46a788ef4e 100644
@@ -37 +38 @@
-@@ -541,8 +541,8 @@ cnxk_sso_start(struct rte_eventdev *event_dev, cnxk_sso_hws_reset_t reset_fn,
+@@ -418,8 +418,8 @@ cnxk_sso_start(struct rte_eventdev *event_dev, cnxk_sso_hws_reset_t reset_fn,


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

* patch 'event/cnxk: fix Tx adapter enqueue return for CN10K' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (18 preceding siblings ...)
  2022-06-24 15:01 ` patch 'event/cnxk: fix QoS parameter handling' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'event/dlb2: fix advertized capabilities' " Kevin Traynor
                   ` (18 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From f7b34f357ccc0c73038172c9341805bdef9a00f8 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Wed, 18 May 2022 19:34:11 +0530
Subject: [PATCH] event/cnxk: fix Tx adapter enqueue return for CN10K

[ upstream commit 7344c7db5d270d650fd8afb9f4293b683e0e222b ]

The `rte_event_eth_tx_adapter_enqueue()` function expects driver layer
to return the total number of events successfully transmitted.
Fix cn10k driver returning the number of packets transmitted in a
event vector instead of number of events.

Fixes: 761a321acf91 ("event/cnxk: support vectorized Tx event fast path")

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

diff --git a/drivers/event/cnxk/cn10k_worker.h b/drivers/event/cnxk/cn10k_worker.h
index 340708aae5..f67c36f888 100644
--- a/drivers/event/cnxk/cn10k_worker.h
+++ b/drivers/event/cnxk/cn10k_worker.h
@@ -525,5 +525,5 @@ cn10k_sso_hws_event_tx(struct cn10k_sso_hws *ws, struct rte_event *ev,
 		}
 		rte_mempool_put(rte_mempool_from_obj(ev->vec), ev->vec);
-		return (meta & 0xFFFF);
+		return 1;
 	}
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.648502191 +0100
+++ 0026-event-cnxk-fix-Tx-adapter-enqueue-return-for-CN10K.patch	2022-06-24 15:51:08.893984141 +0100
@@ -1 +1 @@
-From 7344c7db5d270d650fd8afb9f4293b683e0e222b Mon Sep 17 00:00:00 2001
+From f7b34f357ccc0c73038172c9341805bdef9a00f8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7344c7db5d270d650fd8afb9f4293b683e0e222b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 034f508dd8..0915f404e0 100644
+index 340708aae5..f67c36f888 100644
@@ -23 +24,2 @@
-@@ -652,5 +652,5 @@ cn10k_sso_hws_event_tx(struct cn10k_sso_hws *ws, struct rte_event *ev,
+@@ -525,5 +525,5 @@ cn10k_sso_hws_event_tx(struct cn10k_sso_hws *ws, struct rte_event *ev,
+ 		}
@@ -25 +26,0 @@
- 		rte_prefetch0(ws);


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

* patch 'event/dlb2: fix advertized capabilities' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (19 preceding siblings ...)
  2022-06-24 15:01 ` patch 'event/cnxk: fix Tx adapter enqueue return for CN10K' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'eventdev/eth_tx: fix adapter creation' " Kevin Traynor
                   ` (17 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Timothy McDaniel; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 19591ad643beff1329bed61d4556521586248123 Mon Sep 17 00:00:00 2001
From: Timothy McDaniel <timothy.mcdaniel@intel.com>
Date: Mon, 13 Jun 2022 13:19:14 -0500
Subject: [PATCH] event/dlb2: fix advertized capabilities

[ upstream commit d39e23f26e1ef27fa3402da321f98b307d8c9419 ]

This commit corrects the advertized capabilities reported by the DLB2 PMD.

Previously DLB2 reported supporting RTE_EVENT_DEV_CAP_QUEUE_QOS, but the
DLB2 hardware does not support such capability. This commit removes that
feature from the reported capabilities feature set.

Additionally, two capabilities that DLB2 does support were not being
reported in the capabilities feature set. This commit adds those.

RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT = Event device is capable of
setting up the link between multiple queues and a single port. If the
flag is not set, the eventdev can only map a single queue to each
port or map a single queue to many port

RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK = Event device is capable of
configuring the queue/port link at runtime. If the flag is not set,
the eventdev queue/port link is only can be configured during
initialization

Finally, the file doc/guides/eventdevs/features/dlb2.ini has been updated
to match the capabilities actually reported by the PMD.

Fixes: e7c9971a857a ("event/dlb2: add probe-time hardware init")

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 doc/guides/eventdevs/features/dlb2.ini | 3 ++-
 drivers/event/dlb2/dlb2.c              | 9 +++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/doc/guides/eventdevs/features/dlb2.ini b/doc/guides/eventdevs/features/dlb2.ini
index 29747b1c26..48a2a18aff 100644
--- a/doc/guides/eventdevs/features/dlb2.ini
+++ b/doc/guides/eventdevs/features/dlb2.ini
@@ -5,5 +5,4 @@
 ;
 [Scheduling Features]
-queue_qos                  = Y
 event_qos                  = Y
 distributed_sched          = Y
@@ -11,4 +10,6 @@ queue_all_types            = Y
 burst_mode                 = Y
 implicit_release_disable   = Y
+runtime_port_link          = Y
+multiple_queue_port        = Y
 maintenance_free           = Y
 
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 7789dd74e0..543f793ed1 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -62,10 +62,11 @@ static struct rte_event_dev_info evdev_dlb2_default_info = {
 	.max_single_link_event_port_queue_pairs =
 		DLB2_MAX_NUM_DIR_PORTS(DLB2_HW_V2),
-	.event_dev_cap = (RTE_EVENT_DEV_CAP_QUEUE_QOS |
-			  RTE_EVENT_DEV_CAP_EVENT_QOS |
-			  RTE_EVENT_DEV_CAP_BURST_MODE |
+	.event_dev_cap = (RTE_EVENT_DEV_CAP_EVENT_QOS |
 			  RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED |
-			  RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE |
 			  RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES |
+			  RTE_EVENT_DEV_CAP_BURST_MODE |
+			  RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE |
+			  RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK |
+			  RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT |
 			  RTE_EVENT_DEV_CAP_MAINTENANCE_FREE),
 };
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.670102397 +0100
+++ 0027-event-dlb2-fix-advertized-capabilities.patch	2022-06-24 15:51:08.896984149 +0100
@@ -1 +1 @@
-From d39e23f26e1ef27fa3402da321f98b307d8c9419 Mon Sep 17 00:00:00 2001
+From 19591ad643beff1329bed61d4556521586248123 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d39e23f26e1ef27fa3402da321f98b307d8c9419 ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -55 +56 @@
-index 3641ed2942..bc4e705e0b 100644
+index 7789dd74e0..543f793ed1 100644


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

* patch 'eventdev/eth_tx: fix adapter creation' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (20 preceding siblings ...)
  2022-06-24 15:01 ` patch 'event/dlb2: fix advertized capabilities' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'net/bonding: fix RSS inconsistency between ports' " Kevin Traynor
                   ` (16 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Naga Harish K S V; +Cc: Jay Jayatheerthan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From bd9ffc19616576754c457329406509dda74bdc6d 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/eventdev/rte_event_eth_tx_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
@@ -225,5 +225,5 @@ txa_service_data_init(void)
 		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)
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.694596541 +0100
+++ 0028-eventdev-eth_tx-fix-adapter-creation.patch	2022-06-24 15:51:08.897984152 +0100
@@ -1 +1 @@
-From 3d6e9dd493784d077b9a214a0937331fa05f8abf Mon Sep 17 00:00:00 2001
+From bd9ffc19616576754c457329406509dda74bdc6d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3d6e9dd493784d077b9a214a0937331fa05f8abf ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/bonding: fix RSS inconsistency between ports' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (21 preceding siblings ...)
  2022-06-24 15:01 ` patch 'eventdev/eth_tx: fix adapter creation' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'test/bonding: fix RSS test when disable RSS' " Kevin Traynor
                   ` (15 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 2b71d44b8012ad4944a25e42d3ab8bc4ddd315d4 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 b6fed1495b..9b3acde46c 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1708,4 +1708,10 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
 		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;
 	}
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.716049237 +0100
+++ 0029-net-bonding-fix-RSS-inconsistency-between-ports.patch	2022-06-24 15:51:08.899984157 +0100
@@ -1 +1 @@
-From 9e0fb72c75cd03c40fc7cedc39d3a342f447b6ee Mon Sep 17 00:00:00 2001
+From 2b71d44b8012ad4944a25e42d3ab8bc4ddd315d4 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 b6fed1495b..9b3acde46c 100644


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

* patch 'test/bonding: fix RSS test when disable RSS' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (22 preceding siblings ...)
  2022-06-24 15:01 ` patch 'net/bonding: fix RSS inconsistency between ports' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'net/hns3: fix an unreasonable memset' " Kevin Traynor
                   ` (14 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 8854374c9ed2eb371ba9e4816a89eaa19b369cb0 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 7228965ced..b3d71c6f3a 100644
--- a/app/test/test_link_bonding_rssconf.c
+++ b/app/test/test_link_bonding_rssconf.c
@@ -469,5 +469,5 @@ 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();
@@ -476,6 +476,76 @@ test_rss(void)
 }
 
+
 /**
- * Test propagation logic, when RX_RSS mq_mode is turned off for bonding port
+ * 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 RSS function logic, when RX_RSS mq_mode is turned off for bonding port
  */
 static int
@@ -498,7 +568,5 @@ test_rss_lazy(void)
 			"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.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.740055183 +0100
+++ 0030-test-bonding-fix-RSS-test-when-disable-RSS.patch	2022-06-24 15:51:08.900984160 +0100
@@ -1 +1 @@
-From 6496922368fe03be9ab4137f2d615dba1a766f39 Mon Sep 17 00:00:00 2001
+From 8854374c9ed2eb371ba9e4816a89eaa19b369cb0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6496922368fe03be9ab4137f2d615dba1a766f39 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/hns3: fix an unreasonable memset' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (23 preceding siblings ...)
  2022-06-24 15:01 ` patch 'test/bonding: fix RSS test when disable RSS' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'net/hns3: remove duplicate definition' " Kevin Traynor
                   ` (13 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From e885f508d92c90ebd4c139ac57f205e15b9e3f6a Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 1 Jun 2022 11:52:44 +0800
Subject: [PATCH] net/hns3: fix an unreasonable memset

[ upstream commit ea1ef0b937417f177fe50485f96122c1c2407848 ]

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")

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

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 7c184a5850..2f3bc836e3 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -777,5 +777,5 @@ hns3vf_reset_all_tqps(struct hns3_hw *hw)
 	int i;
 
-	memset(msg_data, 0, sizeof(uint16_t));
+	memset(msg_data, 0, sizeof(msg_data));
 	ret = hns3_send_mbx_msg(hw, HNS3_MBX_QUEUE_RESET, 0, msg_data,
 				sizeof(msg_data), true, &reset_status,
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.762258461 +0100
+++ 0031-net-hns3-fix-an-unreasonable-memset.patch	2022-06-24 15:51:08.902984165 +0100
@@ -1 +1 @@
-From ea1ef0b937417f177fe50485f96122c1c2407848 Mon Sep 17 00:00:00 2001
+From e885f508d92c90ebd4c139ac57f205e15b9e3f6a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ea1ef0b937417f177fe50485f96122c1c2407848 ]
+
@@ -7 +8,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
-index be4ab16dcc..dcb1cdf168 100644
+index 7c184a5850..2f3bc836e3 100644
@@ -19,2 +20,2 @@
-@@ -774,5 +774,5 @@ hns3vf_reset_all_tqps(struct hns3_hw *hw)
- 	uint16_t i;
+@@ -777,5 +777,5 @@ hns3vf_reset_all_tqps(struct hns3_hw *hw)
+ 	int i;


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

* patch 'net/hns3: remove duplicate definition' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (24 preceding siblings ...)
  2022-06-24 15:01 ` patch 'net/hns3: fix an unreasonable memset' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'net/hns3: fix code check warning' " Kevin Traynor
                   ` (12 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From fc61bd5d37935c3b7a306d99316e5e3481bc4ab6 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 4fc938cee0..24caf8e870 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -11,13 +11,4 @@
 #include "hns3_flow.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 d376486a1d..980fbe74e8 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -10,8 +10,6 @@
 #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,
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 55d5718ffc..56627cbd4c 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -89,4 +89,6 @@ static inline uint32_t roundup_pow_of_two(uint32_t x)
 }
 
+extern const uint8_t hns3_hash_key[];
+
 struct hns3_adapter;
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.786147090 +0100
+++ 0032-net-hns3-remove-duplicate-definition.patch	2022-06-24 15:51:08.904984171 +0100
@@ -1 +1 @@
-From d7050da870a9d259a6422e253d54fa552cbfa7c8 Mon Sep 17 00:00:00 2001
+From fc61bd5d37935c3b7a306d99316e5e3481bc4ab6 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 4fc938cee0..24caf8e870 100644
@@ -38 +39 @@
-index 4c546c9363..1003daf03e 100644
+index d376486a1d..980fbe74e8 100644


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

* patch 'net/hns3: fix code check warning' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (25 preceding siblings ...)
  2022-06-24 15:01 ` patch 'net/hns3: remove duplicate definition' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'net/hns3: fix return value for unsupported tuple' " Kevin Traynor
                   ` (11 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 332e5fca03263ea9078974ae3908633e5a9eaa81 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Wed, 1 Jun 2022 11:52:46 +0800
Subject: [PATCH] net/hns3: fix code check warning

[ upstream commit b902301e8a687416ec5d1fb65bc73513bcc2da2a ]

In bitwise operation, "val" should be an unsigned type.

Fixes: 38b539d96eb6 ("net/hns3: support IEEE 1588 PTP")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ptp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c
index 1442241a4e..0b0061bba5 100644
--- a/drivers/net/hns3/hns3_ptp.c
+++ b/drivers/net/hns3/hns3_ptp.c
@@ -82,5 +82,5 @@ hns3_timesync_configure(struct hns3_adapter *hns, bool en)
 	struct hns3_pf *pf = &hns->pf;
 	struct hns3_cmd_desc desc;
-	int val;
+	uint32_t val;
 	int ret;
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.809184376 +0100
+++ 0033-net-hns3-fix-code-check-warning.patch	2022-06-24 15:51:08.905984173 +0100
@@ -1 +1 @@
-From b902301e8a687416ec5d1fb65bc73513bcc2da2a Mon Sep 17 00:00:00 2001
+From 332e5fca03263ea9078974ae3908633e5a9eaa81 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b902301e8a687416ec5d1fb65bc73513bcc2da2a ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/hns3: fix return value for unsupported tuple' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (26 preceding siblings ...)
  2022-06-24 15:01 ` patch 'net/hns3: fix code check warning' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'net/hns3: fix crash from secondary process' " Kevin Traynor
                   ` (10 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From ba4aa140b32468c2ff31f3cb8ea8dc6dd3d60324 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 1 Jun 2022 11:52:47 +0800
Subject: [PATCH] net/hns3: fix return value for unsupported tuple

[ upstream commit 66689dc09f0cf92af03abcba58b7474fa8ac847e ]

Driver should return false for unsupported tuple.

Fixes: 18a4b4c3fa80 ("net/hns3: add default to switch when parsing fd tuple")

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

diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index d043f5786d..2426264138 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -632,5 +632,5 @@ static bool hns3_fd_convert_tuple(struct hns3_hw *hw,
 	default:
 		hns3_warn(hw, "not support tuple of (%u)", tuple);
-		break;
+		return false;
 	}
 	return true;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.831333123 +0100
+++ 0034-net-hns3-fix-return-value-for-unsupported-tuple.patch	2022-06-24 15:51:08.905984173 +0100
@@ -1 +1 @@
-From 66689dc09f0cf92af03abcba58b7474fa8ac847e Mon Sep 17 00:00:00 2001
+From ba4aa140b32468c2ff31f3cb8ea8dc6dd3d60324 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 66689dc09f0cf92af03abcba58b7474fa8ac847e ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 2a7978ac07..a0d6598e57 100644
+index d043f5786d..2426264138 100644


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

* patch 'net/hns3: fix crash from secondary process' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (27 preceding siblings ...)
  2022-06-24 15:01 ` patch 'net/hns3: fix return value for unsupported tuple' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'net/hns3: fix TM capability' " Kevin Traynor
                   ` (9 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 35582af08c0c141db6b5ddb4abcc893b7643fc98 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 1 Jun 2022 11:52:50 +0800
Subject: [PATCH] net/hns3: fix crash from secondary process

[ upstream commit 8ba42ce98dd45958354817c340796f3ce6496410 ]

If a hns3 device in the secondary process is attached to do probing
operation, 'rx_queues' and 'tx_queues' in dev->data are null in
eth_dev_fp_ops_setup when calling rte_eth_dev_probing_finish. The primary
process calls dev_start to re-setup their fp_ops. But the secondary process
can't call dev_start and has no chance to do it. If the application sends
and receives packets at this time, a segfault will occur. So this patch
uses the MP communication of the PMD to update the fp_ops of the device in
the secondary process.

Fixes: 96c33cfb06cf ("net/hns3: fix Rx/Tx functions update")

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

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 2f3bc836e3..f259791f0c 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -4425,4 +4425,6 @@ hns3_eth_dev_fp_ops_config(const struct rte_eth_dev *dev)
 	fpo[port_id].rx_descriptor_status = dev->rx_descriptor_status;
 	fpo[port_id].tx_descriptor_status = dev->tx_descriptor_status;
+	fpo[port_id].rxq.data = dev->data->rx_queues;
+	fpo[port_id].txq.data = dev->data->tx_queues;
 }
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.853261490 +0100
+++ 0035-net-hns3-fix-crash-from-secondary-process.patch	2022-06-24 15:51:08.908984181 +0100
@@ -1 +1 @@
-From 8ba42ce98dd45958354817c340796f3ce6496410 Mon Sep 17 00:00:00 2001
+From 35582af08c0c141db6b5ddb4abcc893b7643fc98 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8ba42ce98dd45958354817c340796f3ce6496410 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index bbf98fc90e..e25a91becf 100644
+index 2f3bc836e3..f259791f0c 100644
@@ -28 +29 @@
-@@ -4410,4 +4410,6 @@ hns3_eth_dev_fp_ops_config(const struct rte_eth_dev *dev)
+@@ -4425,4 +4425,6 @@ hns3_eth_dev_fp_ops_config(const struct rte_eth_dev *dev)


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

* patch 'net/hns3: fix TM capability' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (28 preceding siblings ...)
  2022-06-24 15:01 ` patch 'net/hns3: fix crash from secondary process' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'app/testpmd: add help messages for multi-process' " Kevin Traynor
                   ` (8 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From bfaaf994a59d7a0b2d845d63f521da20c7f47b38 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 1 Jun 2022 11:52:51 +0800
Subject: [PATCH] net/hns3: fix TM capability

[ upstream commit 24415ae34a1798df1cb0b0189aae30a92f82b9f5 ]

The TM capability should be bit-19 according to the user manual of
firmware.

Fixes: fc18d1b4b85f ("net/hns3: fix traffic management")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_cmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index f9addc6069..82c999061d 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -324,5 +324,5 @@ enum HNS3_CAPS_BITS {
 	HNS3_CAPS_RAS_IMP_B,
 	HNS3_CAPS_RXD_ADV_LAYOUT_B = 15,
-	HNS3_CAPS_TM_B = 17,
+	HNS3_CAPS_TM_B = 19,
 };
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.877768171 +0100
+++ 0036-net-hns3-fix-TM-capability.patch	2022-06-24 15:51:08.909984184 +0100
@@ -1 +1 @@
-From 24415ae34a1798df1cb0b0189aae30a92f82b9f5 Mon Sep 17 00:00:00 2001
+From bfaaf994a59d7a0b2d845d63f521da20c7f47b38 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 24415ae34a1798df1cb0b0189aae30a92f82b9f5 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'app/testpmd: add help messages for multi-process' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (29 preceding siblings ...)
  2022-06-24 15:01 ` patch 'net/hns3: fix TM capability' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'app/testpmd: fix bonding slave devices not released' " Kevin Traynor
                   ` (7 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, Dongdong Liu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From b3cfb3db85a1c047607b5e7fff0adb8d7dc6b5ff Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 9 Jun 2022 16:52:34 +0800
Subject: [PATCH] app/testpmd: add help messages for multi-process

[ upstream commit 48588943dc0986ac68d59152a322498de868bdd2 ]

This patch adds help messages for multi-process.
--num-procs=N: set the total number of multi-process instances.
--proc-id=id:  set the id of the current process from multi-process
instances(0 <= id < num-procs).

Fixes: a550baf24af9 ("app/testpmd: support multi-process")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 app/test-pmd/parameters.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 641c9c767e..e3c9757f3f 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -62,4 +62,7 @@ usage(char* progname)
 	       "specified or interactive commands that show Rx/Tx statistics "
 	       "(i.e. 'show port stats').\n");
+	printf("  --num-procs=N: set the total number of multi-process instances.\n");
+	printf("  --proc-id=id: set the id of the current process from "
+	       "multi-process instances (0 <= id < num-procs).\n");
 	printf("  --nb-cores=N: set the number of forwarding cores "
 	       "(1 <= N <= %d).\n", nb_lcores);
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.899421037 +0100
+++ 0037-app-testpmd-add-help-messages-for-multi-process.patch	2022-06-24 15:51:08.910984187 +0100
@@ -1 +1 @@
-From 48588943dc0986ac68d59152a322498de868bdd2 Mon Sep 17 00:00:00 2001
+From b3cfb3db85a1c047607b5e7fff0adb8d7dc6b5ff Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 48588943dc0986ac68d59152a322498de868bdd2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org


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

* patch 'app/testpmd: fix bonding slave devices not released' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (30 preceding siblings ...)
  2022-06-24 15:01 ` patch 'app/testpmd: add help messages for multi-process' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'net/txgbe: fix register polling' " Kevin Traynor
                   ` (6 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, Dongdong Liu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From f48795dea1590363dad8681291fda4af8c0d7653 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 9 Jun 2022 19:49:21 +0800
Subject: [PATCH] app/testpmd: fix bonding slave devices not released

[ upstream commit 3889a3220c9b93f07dfdf95e30b2661e6e3f698f ]

Currently, some eth devices are added to bond device, these devices are
not released when the quit command is executed in testpmd. This patch
adds the release operation for all active slaves under a bond device.

Fixes: 0e545d3047fe ("app/testpmd: check stopping port is not in bonding")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
 app/test-pmd/cmdline.c |  1 +
 app/test-pmd/testpmd.c | 41 +++++++++++++++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h |  2 ++
 3 files changed, 44 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 35da020129..d9bf0eb3b3 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8774,4 +8774,5 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result,
 {
 	cmdline_quit(cl);
+	cl_quit = 1;
 }
 
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 214763d65b..389b7c3c69 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -230,4 +230,5 @@ unsigned int xstats_display_num; /**< Size of extended statistics to show */
  */
 uint8_t f_quit;
+uint8_t cl_quit; /* Quit testpmd from cmdline. */
 
 /*
@@ -3203,4 +3204,30 @@ remove_invalid_ports(void)
 }
 
+static void
+clear_bonding_slave_device(portid_t *slave_pids, uint16_t num_slaves)
+{
+	struct rte_port *port;
+	portid_t slave_pid;
+	uint16_t i;
+
+	for (i = 0; i < num_slaves; i++) {
+		slave_pid = slave_pids[i];
+		if (port_is_started(slave_pid) == 1) {
+			if (rte_eth_dev_stop(slave_pid) != 0)
+				fprintf(stderr, "rte_eth_dev_stop failed for port %u\n",
+					slave_pid);
+
+			port = &ports[slave_pid];
+			port->port_status = RTE_PORT_STOPPED;
+		}
+
+		clear_port_slave_flag(slave_pid);
+
+		/* Close slave device when testpmd quit or is killed. */
+		if (cl_quit == 1 || f_quit == 1)
+			rte_eth_dev_close(slave_pid);
+	}
+}
+
 void
 close_port(portid_t pid)
@@ -3208,4 +3235,6 @@ close_port(portid_t pid)
 	portid_t pi;
 	struct rte_port *port;
+	portid_t slave_pids[RTE_MAX_ETHPORTS];
+	int num_slaves = 0;
 
 	if (port_id_is_invalid(pid, ENABLED_WARN))
@@ -3243,5 +3272,17 @@ close_port(portid_t pid)
 			port_flex_item_flush(pi);
 			port_action_handle_flush(pi);
+#ifdef RTE_NET_BOND
+			if (port->bond_flag == 1)
+				num_slaves = rte_eth_bond_slaves_get(pi,
+						slave_pids, RTE_MAX_ETHPORTS);
+#endif
 			rte_eth_dev_close(pi);
+			/*
+			 * If this port is bonded device, all slaves under the
+			 * device need to be removed or closed.
+			 */
+			if (port->bond_flag == 1 && num_slaves > 0)
+				clear_bonding_slave_device(slave_pids,
+							num_slaves);
 		}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 04bc7ffbc2..8fb3c3a3af 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -33,4 +33,6 @@
 #define RTE_PORT_HANDLING       (uint16_t)3
 
+extern uint8_t cl_quit;
+
 /*
  * It is used to allocate the memory for hash key.
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.921618766 +0100
+++ 0038-app-testpmd-fix-bonding-slave-devices-not-released.patch	2022-06-24 15:51:08.926984230 +0100
@@ -1 +1 @@
-From 3889a3220c9b93f07dfdf95e30b2661e6e3f698f Mon Sep 17 00:00:00 2001
+From f48795dea1590363dad8681291fda4af8c0d7653 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3889a3220c9b93f07dfdf95e30b2661e6e3f698f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 56a369e104..a59e6166d5 100644
+index 35da020129..d9bf0eb3b3 100644
@@ -27 +28 @@
-@@ -8919,4 +8919,5 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result,
+@@ -8774,4 +8774,5 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result,
@@ -34 +35 @@
-index 04c39adc21..205d98ee3d 100644
+index 214763d65b..389b7c3c69 100644
@@ -100 +101 @@
-index b90bba659a..ab333c7324 100644
+index 04bc7ffbc2..8fb3c3a3af 100644
@@ -103 +104 @@
-@@ -39,4 +39,6 @@
+@@ -33,4 +33,6 @@


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

* patch 'net/txgbe: fix register polling' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (31 preceding siblings ...)
  2022-06-24 15:01 ` patch 'app/testpmd: fix bonding slave devices not released' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'net/ngbe: add more packet statistics' " Kevin Traynor
                   ` (5 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From a92e31d35def19551752b7605646b9ab2abaf53b Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 22 Jun 2022 14:56:09 +0800
Subject: [PATCH] net/txgbe: fix register polling

[ upstream commit aa08f3eb4ecf0997fd30ac073fcd895db71ef8e3 ]

Fix to poll some specific registers, which expect bit value 0.

'w32w' is used in registers where the write command bit is set and
waits for the bit clear to complete the write.

Fixes: 24a4c76aff4d ("net/txgbe: add error types and registers")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_regs.h | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
index 144047ba62..dc22ef53e3 100644
--- a/drivers/net/txgbe/base/txgbe_regs.h
+++ b/drivers/net/txgbe/base/txgbe_regs.h
@@ -1863,6 +1863,11 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
 
 	do {
-		all |= rd32(hw, reg);
-		value |= mask & all;
+		if (expect != 0) {
+			all |= rd32(hw, reg);
+			value |= mask & all;
+		} else {
+			all = rd32(hw, reg);
+			value = mask & all;
+		}
 		if (value == expect)
 			break;
@@ -1897,5 +1902,5 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
 #define wr32w(hw, reg, val, mask, slice) do { \
 	wr32((hw), reg, val); \
-	po32m((hw), reg, mask, mask, NULL, 5, slice); \
+	po32m((hw), reg, mask, 0, NULL, 5, slice); \
 } while (0)
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.959188049 +0100
+++ 0039-net-txgbe-fix-register-polling.patch	2022-06-24 15:51:08.928984235 +0100
@@ -1 +1 @@
-From aa08f3eb4ecf0997fd30ac073fcd895db71ef8e3 Mon Sep 17 00:00:00 2001
+From a92e31d35def19551752b7605646b9ab2abaf53b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit aa08f3eb4ecf0997fd30ac073fcd895db71ef8e3 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 3139796911..911bb6e04e 100644
+index 144047ba62..dc22ef53e3 100644
@@ -23 +24 @@
-@@ -1865,6 +1865,11 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
+@@ -1863,6 +1863,11 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
@@ -37 +38 @@
-@@ -1899,5 +1904,5 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
+@@ -1897,5 +1902,5 @@ po32m(struct txgbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,


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

* patch 'net/ngbe: add more packet statistics' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (32 preceding siblings ...)
  2022-06-24 15:01 ` patch 'net/txgbe: fix register polling' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'app/testpmd: revert MAC update in checksum forwarding' " Kevin Traynor
                   ` (4 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 1901dc54929be1946c822aca2c2bd6998aa33738 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 22 Jun 2022 14:56:10 +0800
Subject: [PATCH] net/ngbe: add more packet statistics

[ upstream commit 51d365689158169a0ee8313f7140ec1e19dcecf9 ]

Add more hardware extended statistics.

Fixes: 8b433d04adc9 ("net/ngbe: support device xstats")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/ngbe_ethdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index ccb45ab92c..b930326379 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -165,4 +165,6 @@ static const struct rte_ngbe_xstats_name_off rte_ngbe_stats_strings[] = {
 	HW_XSTAT(tx_management_packets),
 	HW_XSTAT(rx_management_dropped),
+	HW_XSTAT(rx_dma_drop),
+	HW_XSTAT(tx_secdrp_packets),
 
 	/* Basic Error */
@@ -180,4 +182,10 @@ static const struct rte_ngbe_xstats_name_off rte_ngbe_stats_strings[] = {
 	HW_XSTAT(mac_remote_errors),
 
+	/* PB Stats */
+	HW_XSTAT(rx_up_dropped),
+	HW_XSTAT(rdb_pkt_cnt),
+	HW_XSTAT(rdb_repli_cnt),
+	HW_XSTAT(rdb_drp_cnt),
+
 	/* MACSEC */
 	HW_XSTAT(tx_macsec_pkts_untagged),
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:09.981699749 +0100
+++ 0040-net-ngbe-add-more-packet-statistics.patch	2022-06-24 15:51:08.930984241 +0100
@@ -1 +1 @@
-From 51d365689158169a0ee8313f7140ec1e19dcecf9 Mon Sep 17 00:00:00 2001
+From 1901dc54929be1946c822aca2c2bd6998aa33738 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 51d365689158169a0ee8313f7140ec1e19dcecf9 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index ee09d54c2f..308c231183 100644
+index ccb45ab92c..b930326379 100644


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

* patch 'app/testpmd: revert MAC update in checksum forwarding' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (33 preceding siblings ...)
  2022-06-24 15:01 ` patch 'net/ngbe: add more packet statistics' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'vhost: fix missing enqueue pseudo-header calculation' " Kevin Traynor
                   ` (3 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, Aman Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 76556a3128281b9d27d4b8fe2ee4fb1383830731 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 aaaec17841..d661e21e02 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -907,8 +907,4 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
 
 		eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
-		rte_ether_addr_copy(&peer_eth_addrs[fs->peer_addr],
-				&eth_hdr->dst_addr);
-		rte_ether_addr_copy(&ports[fs->tx_port].eth_addr,
-				&eth_hdr->src_addr);
 		parse_ethernet(eth_hdr, &info);
 		l3_hdr = (char *)eth_hdr + info.l2_len;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:10.004612536 +0100
+++ 0041-app-testpmd-revert-MAC-update-in-checksum-forwarding.patch	2022-06-24 15:51:08.931984243 +0100
@@ -1 +1 @@
-From 9b4ea7ae77faa8f8aba8c7510c821f75d7863b16 Mon Sep 17 00:00:00 2001
+From 76556a3128281b9d27d4b8fe2ee4fb1383830731 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 aaaec17841..d661e21e02 100644
@@ -28 +29 @@
-@@ -917,8 +917,4 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
+@@ -907,8 +907,4 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)


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

* patch 'vhost: fix missing enqueue pseudo-header calculation' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (34 preceding siblings ...)
  2022-06-24 15:01 ` patch 'app/testpmd: revert MAC update in checksum forwarding' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'vhost/crypto: fix build with GCC 12' " Kevin Traynor
                   ` (2 subsequent siblings)
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 361723acefa59e547588bca60d00bd4cebc6ad10 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/vhost/virtio_net.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index 568d6538ed..eed43658cf 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -416,4 +416,14 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
 
 	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.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:10.026626330 +0100
+++ 0042-vhost-fix-missing-enqueue-pseudo-header-calculation.patch	2022-06-24 15:51:08.932984246 +0100
@@ -1 +1 @@
-From 7316b4fd610fe945a0bc20054ba5ab61b98bb155 Mon Sep 17 00:00:00 2001
+From 361723acefa59e547588bca60d00bd4cebc6ad10 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7316b4fd610fe945a0bc20054ba5ab61b98bb155 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 68a26eb17d..ce22e3ac79 100644
+index 568d6538ed..eed43658cf 100644
@@ -31 +32 @@
-@@ -597,4 +597,14 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
+@@ -416,4 +416,14 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)


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

* patch 'vhost/crypto: fix build with GCC 12' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (35 preceding siblings ...)
  2022-06-24 15:01 ` patch 'vhost: fix missing enqueue pseudo-header calculation' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'vhost/crypto: fix descriptor processing' " Kevin Traynor
  2022-06-24 15:01 ` patch 'net/virtio: unmap PCI device in secondary process' " Kevin Traynor
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: David Marchand; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From f69a61bde0e2d72021fd3c609fd4b62edc8f8951 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/vhost/vhost_crypto.c | 127 +++++++++++++++------------------------
 1 file changed, 48 insertions(+), 79 deletions(-)

diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
index 926b5c0bd9..293960d350 100644
--- a/lib/vhost/vhost_crypto.c
+++ b/lib/vhost/vhost_crypto.c
@@ -566,92 +566,56 @@ get_data_ptr(struct vhost_crypto_data_req *vc_req,
 }
 
+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)
+{
+	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(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));
+
+	return RTE_MIN(desc->len, size);
+}
+
+
 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)
+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;
-	uint64_t remain, addr, dlen, len;
-	uint32_t to_copy;
-	uint8_t *data = dst_data;
-	uint8_t *src;
-	int left = size;
+	uint32_t 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;
+	do {
+		uint32_t copied;
 
-	rte_memcpy((uint8_t *)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;
-
-	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;
-		}
+		left -= copied;
+		data = RTE_PTR_ADD(data, copied);
+		desc++;
+	} while (desc < head + max_n_descs && left != 0);
 
-		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;
-	}
-
-	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
@@ -853,4 +817,5 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 	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,4 +849,5 @@ prepare_sym_cipher_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 				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,4 +973,5 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 	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,4 +1005,5 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 				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,4 +1090,5 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
 				chain->para.hash_result_len,
 				max_n_descs) < 0)) {
+			VC_LOG_ERR("Incorrect virtio descriptor");
 			ret = VIRTIO_CRYPTO_BADMSG;
 			goto error_exit;
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:10.050438195 +0100
+++ 0043-vhost-crypto-fix-build-with-GCC-12.patch	2022-06-24 15:51:08.933984249 +0100
@@ -1 +1 @@
-From 4414bb67010dfec2559af52efe8f479b26d55447 Mon Sep 17 00:00:00 2001
+From f69a61bde0e2d72021fd3c609fd4b62edc8f8951 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 4414bb67010dfec2559af52efe8f479b26d55447 ]
+
@@ -30 +31,0 @@
-Cc: stable@dpdk.org
@@ -39 +40 @@
-index b1c0eb6a0f..96ffb82a5d 100644
+index 926b5c0bd9..293960d350 100644


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

* patch 'vhost/crypto: fix descriptor processing' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (36 preceding siblings ...)
  2022-06-24 15:01 ` patch 'vhost/crypto: fix build with GCC 12' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  2022-06-24 15:01 ` patch 'net/virtio: unmap PCI device in secondary process' " Kevin Traynor
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 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 21.11.2

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

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

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

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

Thanks.

Kevin

---
From d6e4e0f46e27a5eae66ce436b522c7602accf346 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/vhost/vhost_crypto.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
index 293960d350..7d1d6a1861 100644
--- a/lib/vhost/vhost_crypto.c
+++ b/lib/vhost/vhost_crypto.c
@@ -611,6 +611,5 @@ copy_data(void *data, struct vhost_crypto_data_req *vc_req,
 		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))
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:10.072955313 +0100
+++ 0044-vhost-crypto-fix-descriptor-processing.patch	2022-06-24 15:51:08.934984252 +0100
@@ -1 +1 @@
-From 2fbada91545c004f04449500af0c6276900317ab Mon Sep 17 00:00:00 2001
+From d6e4e0f46e27a5eae66ce436b522c7602accf346 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2fbada91545c004f04449500af0c6276900317ab ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 96ffb82a5d..54946f46d9 100644
+index 293960d350..7d1d6a1861 100644


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

* patch 'net/virtio: unmap PCI device in secondary process' has been queued to stable release 21.11.2
  2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
                   ` (37 preceding siblings ...)
  2022-06-24 15:01 ` patch 'vhost/crypto: fix descriptor processing' " Kevin Traynor
@ 2022-06-24 15:01 ` Kevin Traynor
  38 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 15:01 UTC (permalink / raw)
  To: Yuan Wang; +Cc: Wei Ling, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.2

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

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

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

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

Thanks.

Kevin

---
From 7b610e0a8db8b27fe2ee988aed96a13e867ed192 Mon Sep 17 00:00:00 2001
From: Yuan Wang <yuanx.wang@intel.com>
Date: Mon, 6 Jun 2022 23:55:43 +0800
Subject: [PATCH] net/virtio: unmap PCI device in secondary process

[ upstream commit 5729407fa4d612b93ceefacef13f57c1de2ceaa6 ]

In multi-process, the secondary process will remap PCI during
initialization, but the mapping is not removed in the uninit path,
the device is not closed, and the device busy error will be reported
when the device is hotplugged.

This patch unmaps PCI device at secondary process uninitialization
based on virtio_rempa_pci.

Fixes: 36a7a2e7a53f ("net/virtio: move PCI device init in dedicated file")

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_pci_ethdev.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_pci_ethdev.c b/drivers/net/virtio/virtio_pci_ethdev.c
index 54645dc62e..1f6bdeddda 100644
--- a/drivers/net/virtio/virtio_pci_ethdev.c
+++ b/drivers/net/virtio/virtio_pci_ethdev.c
@@ -123,8 +123,18 @@ eth_virtio_pci_uninit(struct rte_eth_dev *eth_dev)
 {
 	int ret;
+	struct virtio_pci_dev *dev;
+	struct virtio_hw *hw;
 	PMD_INIT_FUNC_TRACE();
 
-	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+		dev = eth_dev->data->dev_private;
+		hw = &dev->hw;
+
+		if (dev->modern)
+			rte_pci_unmap_device(RTE_ETH_DEV_TO_PCI(eth_dev));
+		else
+			vtpci_legacy_ioport_unmap(hw);
 		return 0;
+	}
 
 	ret = virtio_dev_stop(eth_dev);
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 15:51:10.094772409 +0100
+++ 0045-net-virtio-unmap-PCI-device-in-secondary-process.patch	2022-06-24 15:51:08.935984254 +0100
@@ -1 +1 @@
-From 5729407fa4d612b93ceefacef13f57c1de2ceaa6 Mon Sep 17 00:00:00 2001
+From 7b610e0a8db8b27fe2ee988aed96a13e867ed192 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5729407fa4d612b93ceefacef13f57c1de2ceaa6 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org


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

* Re: patch 'eal/x86: drop export of internal alignment macro' has been queued to stable release 21.11.2
  2022-06-24 15:01 ` patch 'eal/x86: drop export of internal alignment macro' " Kevin Traynor
@ 2022-06-24 16:42   ` Kevin Traynor
  0 siblings, 0 replies; 41+ messages in thread
From: Kevin Traynor @ 2022-06-24 16:42 UTC (permalink / raw)
  To: David Marchand
  Cc: Morten Brørup, dpdk stable, Christian Ehrhardt, Luca Boccassi

On 24/06/2022 16:01, Kevin Traynor wrote:
> Hi,
> 
> FYI, your patch has been queued to stable release 21.11.2
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 06/27/22. So please
> shout if anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
> 
> Queued patches are on a temporary branch at:
> https://github.com/kevintraynor/dpdk-stable
> 
> This queued commit can be viewed at:
> https://github.com/kevintraynor/dpdk-stable/commit/4fb54298161f5e8ffa3dc05867f8c544828214e2
> 
> Thanks.
> 
> Kevin
> 
> ---
>  From 4fb54298161f5e8ffa3dc05867f8c544828214e2 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.
> 

Hi Christian, what do you think about having this backport? I can drop 
it from the queue if that is the preference.

> 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/eal/x86/include/rte_memcpy.h | 2 ++
>   1 file changed, 2 insertions(+)
> 
> 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
> @@ -852,4 +852,6 @@ rte_memcpy(void *dst, const void *src, size_t n)
>   }
>   
> +#undef ALIGNMENT_MASK
> +
>   #if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
>   #pragma GCC diagnostic pop


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

end of thread, other threads:[~2022-06-24 16:42 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-24 15:01 patch 'trace: fix init with long file prefix' has been queued to stable release 21.11.2 Kevin Traynor
2022-06-24 15:01 ` patch 'test: drop reference to removed tests' " Kevin Traynor
2022-06-24 15:01 ` patch 'sched: remove unnecessary floating point' " Kevin Traynor
2022-06-24 15:01 ` patch 'eal/x86: drop export of internal alignment macro' " Kevin Traynor
2022-06-24 16:42   ` Kevin Traynor
2022-06-24 15:01 ` patch 'baseband/acc100: update companion PF configure function' " Kevin Traynor
2022-06-24 15:01 ` patch 'baseband/acc100: add protection for some negative scenario' " Kevin Traynor
2022-06-24 15:01 ` patch 'ipsec: fix NAT-T ports and length' " Kevin Traynor
2022-06-24 15:01 ` patch 'examples/ipsec-secgw: fix NAT-T header fields' " Kevin Traynor
2022-06-24 15:01 ` patch 'net/iavf: fix NAT-T payload length' " Kevin Traynor
2022-06-24 15:01 ` patch 'examples/ipsec-secgw: fix ESN setting' " Kevin Traynor
2022-06-24 15:01 ` patch 'common/cpt: fix build with GCC 12' " Kevin Traynor
2022-06-24 15:01 ` patch 'crypto/cnxk: " Kevin Traynor
2022-06-24 15:01 ` patch 'test/ipsec: " Kevin Traynor
2022-06-24 15:01 ` patch 'crypto/scheduler: fix queue pair in scheduler failover' " Kevin Traynor
2022-06-24 15:01 ` patch 'test/crypto: fix cipher offset for ZUC' " Kevin Traynor
2022-06-24 15:01 ` patch 'test/ipsec: fix performance test' " Kevin Traynor
2022-06-24 15:01 ` patch 'event/octeontx: fix SSO fast path' " Kevin Traynor
2022-06-24 15:01 ` patch 'event/dlb2: rework queue drain handling' " Kevin Traynor
2022-06-24 15:01 ` patch 'event/dlb2: fix check of QID in-flight' " Kevin Traynor
2022-06-24 15:01 ` patch 'event/cnxk: fix QoS parameter handling' " Kevin Traynor
2022-06-24 15:01 ` patch 'event/cnxk: fix Tx adapter enqueue return for CN10K' " Kevin Traynor
2022-06-24 15:01 ` patch 'event/dlb2: fix advertized capabilities' " Kevin Traynor
2022-06-24 15:01 ` patch 'eventdev/eth_tx: fix adapter creation' " Kevin Traynor
2022-06-24 15:01 ` patch 'net/bonding: fix RSS inconsistency between ports' " Kevin Traynor
2022-06-24 15:01 ` patch 'test/bonding: fix RSS test when disable RSS' " Kevin Traynor
2022-06-24 15:01 ` patch 'net/hns3: fix an unreasonable memset' " Kevin Traynor
2022-06-24 15:01 ` patch 'net/hns3: remove duplicate definition' " Kevin Traynor
2022-06-24 15:01 ` patch 'net/hns3: fix code check warning' " Kevin Traynor
2022-06-24 15:01 ` patch 'net/hns3: fix return value for unsupported tuple' " Kevin Traynor
2022-06-24 15:01 ` patch 'net/hns3: fix crash from secondary process' " Kevin Traynor
2022-06-24 15:01 ` patch 'net/hns3: fix TM capability' " Kevin Traynor
2022-06-24 15:01 ` patch 'app/testpmd: add help messages for multi-process' " Kevin Traynor
2022-06-24 15:01 ` patch 'app/testpmd: fix bonding slave devices not released' " Kevin Traynor
2022-06-24 15:01 ` patch 'net/txgbe: fix register polling' " Kevin Traynor
2022-06-24 15:01 ` patch 'net/ngbe: add more packet statistics' " Kevin Traynor
2022-06-24 15:01 ` patch 'app/testpmd: revert MAC update in checksum forwarding' " Kevin Traynor
2022-06-24 15:01 ` patch 'vhost: fix missing enqueue pseudo-header calculation' " Kevin Traynor
2022-06-24 15:01 ` patch 'vhost/crypto: fix build with GCC 12' " Kevin Traynor
2022-06-24 15:01 ` patch 'vhost/crypto: fix descriptor processing' " Kevin Traynor
2022-06-24 15:01 ` patch 'net/virtio: unmap PCI device in secondary process' " Kevin Traynor

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