patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5
@ 2023-07-20 15:17 Kevin Traynor
  2023-07-20 15:17 ` patch 'examples/ip_pipeline: fix build with GCC 13' " Kevin Traynor
                   ` (139 more replies)
  0 siblings, 140 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/b22ddfe63aec6ee9d178985d1e51973c489afe40

Thanks.

Kevin

---
From b22ddfe63aec6ee9d178985d1e51973c489afe40 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Fri, 14 Apr 2023 16:25:22 +0100
Subject: [PATCH] kni: fix build with Linux 6.3

[ upstream commit 5f34cc454df420b9b2da8deb949fb76cba058b87 ]

KNI calls `get_user_pages_remote()` API which is using `FOLL_TOUCH`
flag, but `FOLL_TOUCH` is no more in public headers since v6.3,
causing a build error.

`FOLL_*` defines in Linux kernel first moved to another header [1],
later some of them moved to memory subsystem internal header [2] for 6.3

`get_user_pages_remote()` already sets `FOLL_TOUCH` internally,
no need to set this flag externally anyway, moving flag from the call
altogether.

[1]
Commit b5054174ac7c ("mm: move FOLL_* defs to mm_types.h")

[2]
Commit 2c2241081f7d ("mm/gup: move private gup FOLL_ flags to internal.h")

Fixes: e73831dc6c26 ("kni: support userspace VA")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 kernel/linux/kni/kni_dev.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h
index e8633486ee..6e64380d06 100644
--- a/kernel/linux/kni/kni_dev.h
+++ b/kernel/linux/kni/kni_dev.h
@@ -106,9 +106,7 @@ static inline phys_addr_t iova_to_phys(struct task_struct *tsk,
 	/* Read one page struct info */
 #ifdef HAVE_TSK_IN_GUP
-	ret = get_user_pages_remote(tsk, tsk->mm, iova, 1,
-				    FOLL_TOUCH, &page, NULL, NULL);
+	ret = get_user_pages_remote(tsk, tsk->mm, iova, 1, 0, &page, NULL, NULL);
 #else
-	ret = get_user_pages_remote(tsk->mm, iova, 1,
-				    FOLL_TOUCH, &page, NULL, NULL);
+	ret = get_user_pages_remote(tsk->mm, iova, 1, 0, &page, NULL, NULL);
 #endif
 	if (ret < 0)
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:55.298276656 +0100
+++ 0001-kni-fix-build-with-Linux-6.3.patch	2023-07-20 16:17:54.407749470 +0100
@@ -1 +1 @@
-From 5f34cc454df420b9b2da8deb949fb76cba058b87 Mon Sep 17 00:00:00 2001
+From b22ddfe63aec6ee9d178985d1e51973c489afe40 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5f34cc454df420b9b2da8deb949fb76cba058b87 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index a2c6d9fc1a..21bfb6890e 100644
+index e8633486ee..6e64380d06 100644


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

* patch 'examples/ip_pipeline: fix build with GCC 13' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'examples/ntb: " Kevin Traynor
                   ` (138 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Cristian Dumitrescu, Ali Alnubani, Daxue Gao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/43a3d772b3fe7004a2136d841364a357f4d88695

Thanks.

Kevin

---
From 43a3d772b3fe7004a2136d841364a357f4d88695 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerinj@marvell.com>
Date: Tue, 2 May 2023 19:20:44 +0530
Subject: [PATCH] examples/ip_pipeline: fix build with GCC 13

[ upstream commit aae10e97710eb3b6a43a61e733ca0bbff47ab0c4 ]

Fix the following build issue by initializing req to NULL for
the local variable.

In function 'thread_msg_handle', inlined from 'thread_main' at
../examples/ip_pipeline/thread.c:3130:6:
../examples/ip_pipeline/thread.c:535:20: warning: 'req' may be used
uninitialized [-Wmaybe-uninitialized]
  535 |                 if (req == NULL)
      |                    ^
../examples/ip_pipeline/thread.c: In function 'thread_main':
../examples/ip_pipeline/thread.c:433:32: note: 'req' was declared here
  433 |         struct thread_msg_req *req;

Bugzilla ID: 1220
Fixes: a8bd581de397 ("examples/ip_pipeline: add thread runtime")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
---
 examples/ip_pipeline/thread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c
index b2e9732705..aeec954394 100644
--- a/examples/ip_pipeline/thread.c
+++ b/examples/ip_pipeline/thread.c
@@ -433,5 +433,5 @@ static inline struct thread_msg_req *
 thread_msg_recv(struct rte_ring *msgq_req)
 {
-	struct thread_msg_req *req;
+	struct thread_msg_req *req = NULL;
 
 	int status = rte_ring_sc_dequeue(msgq_req, (void **) &req);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:55.403816446 +0100
+++ 0002-examples-ip_pipeline-fix-build-with-GCC-13.patch	2023-07-20 16:17:54.411749487 +0100
@@ -1 +1 @@
-From aae10e97710eb3b6a43a61e733ca0bbff47ab0c4 Mon Sep 17 00:00:00 2001
+From 43a3d772b3fe7004a2136d841364a357f4d88695 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit aae10e97710eb3b6a43a61e733ca0bbff47ab0c4 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 82d5f87c38..9817657ca9 100644
+index b2e9732705..aeec954394 100644
@@ -35 +36 @@
-@@ -431,5 +431,5 @@ static inline struct thread_msg_req *
+@@ -433,5 +433,5 @@ static inline struct thread_msg_req *


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

* patch 'examples/ntb: fix build with GCC 13' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
  2023-07-20 15:17 ` patch 'examples/ip_pipeline: fix build with GCC 13' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'ring: fix use after free' " Kevin Traynor
                   ` (137 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Ali Alnubani, Junfeng Guo, Daxue Gao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/27f385ccbd148a353d230e180762d96000e93a3c

Thanks.

Kevin

---
From 27f385ccbd148a353d230e180762d96000e93a3c Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerinj@marvell.com>
Date: Thu, 4 May 2023 14:23:37 +0530
Subject: [PATCH] examples/ntb: fix build with GCC 13

[ upstream commit dbff181d62c997f128b75db2bbac9f42e8dd0f8f ]

Fix the following build issue by not allowing nb_ids to be zero.
nb_ids can be zero based on rte_rawdev_xstats_get() API
documentation but it is not valid for the case when second
argument is NULL.

examples/ntb/ntb_fwd.c: In function 'ntb_stats_display':
examples/ntb/ntb_fwd.c:945:23: error: 'rte_rawdev_xstats_get'
accessing 8 bytes in a region of size 0 [-Werror=stringop-overflow=]
  945 | if (nb_ids != rte_rawdev_xstats_get(dev_id, ids, values, nb_ids)) {
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

examples/ntb/ntb_fwd.c:945:23: note: referencing argument 3
of type 'uint64_t[0]' {aka 'long unsigned int[]'}
In file included from ../examples/ntb/ntb_fwd.c:17:
lib/rawdev/rte_rawdev.h:504:1: note: in a call to function
'rte_rawdev_xstats_get'
  504 | rte_rawdev_xstats_get(uint16_t dev_id,

Fixes: 5194299d6ef5 ("examples/ntb: support more functions")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
---
 examples/ntb/ntb_fwd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c
index 81964d0308..41bb536141 100644
--- a/examples/ntb/ntb_fwd.c
+++ b/examples/ntb/ntb_fwd.c
@@ -866,5 +866,5 @@ ntb_stats_clear(void)
 	/* Clear NTB dev stats */
 	nb_ids = rte_rawdev_xstats_names_get(dev_id, NULL, 0);
-	if (nb_ids  < 0) {
+	if (nb_ids <= 0) {
 		printf("Error: Cannot get count of xstats\n");
 		return;
@@ -924,5 +924,5 @@ ntb_stats_display(void)
 	/* Get NTB dev stats and stats names */
 	nb_ids = rte_rawdev_xstats_names_get(dev_id, NULL, 0);
-	if (nb_ids  < 0) {
+	if (nb_ids <= 0) {
 		printf("Error: Cannot get count of xstats\n");
 		return;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:55.526292559 +0100
+++ 0003-examples-ntb-fix-build-with-GCC-13.patch	2023-07-20 16:17:54.414749499 +0100
@@ -1 +1 @@
-From dbff181d62c997f128b75db2bbac9f42e8dd0f8f Mon Sep 17 00:00:00 2001
+From 27f385ccbd148a353d230e180762d96000e93a3c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dbff181d62c997f128b75db2bbac9f42e8dd0f8f ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -36 +37 @@
-index f9abed28e4..585aad9d70 100644
+index 81964d0308..41bb536141 100644


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

* patch 'ring: fix use after free' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
  2023-07-20 15:17 ` patch 'examples/ip_pipeline: fix build with GCC 13' " Kevin Traynor
  2023-07-20 15:17 ` patch 'examples/ntb: " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'vfio: fix include with musl runtime' " Kevin Traynor
                   ` (136 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Konstantin Ananyev, Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/096ec31efd0f93756bbb4fe4d0876aef162a656c

Thanks.

Kevin

---
From 096ec31efd0f93756bbb4fe4d0876aef162a656c Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 5 May 2023 14:48:34 +0800
Subject: [PATCH] ring: fix use after free

[ upstream commit ce4bd6e14aa693c80c5218f7d896c98b3b85b54a ]

After the memzone is freed, it is not removed from the 'rte_ring_tailq'.
If rte_ring_lookup is called at this time, it will cause a use-after-free
problem. This change prevents that from happening.

Fixes: 4e32101f9b01 ("ring: support freeing")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/ring/rte_ring.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib/ring/rte_ring.c b/lib/ring/rte_ring.c
index 6a94a038c4..40d29c1bc5 100644
--- a/lib/ring/rte_ring.c
+++ b/lib/ring/rte_ring.c
@@ -342,9 +342,4 @@ rte_ring_free(struct rte_ring *r)
 	}
 
-	if (rte_memzone_free(r->memzone) != 0) {
-		RTE_LOG(ERR, RING, "Cannot free memory\n");
-		return;
-	}
-
 	ring_list = RTE_TAILQ_CAST(rte_ring_tailq.head, rte_ring_list);
 	rte_mcfg_tailq_write_lock();
@@ -365,4 +360,7 @@ rte_ring_free(struct rte_ring *r)
 	rte_mcfg_tailq_write_unlock();
 
+	if (rte_memzone_free(r->memzone) != 0)
+		RTE_LOG(ERR, RING, "Cannot free memory\n");
+
 	rte_free(te);
 }
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:55.681995558 +0100
+++ 0004-ring-fix-use-after-free.patch	2023-07-20 16:17:54.415749503 +0100
@@ -1 +1 @@
-From ce4bd6e14aa693c80c5218f7d896c98b3b85b54a Mon Sep 17 00:00:00 2001
+From 096ec31efd0f93756bbb4fe4d0876aef162a656c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ce4bd6e14aa693c80c5218f7d896c98b3b85b54a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 8ed455043d..057d25ff6f 100644
+index 6a94a038c4..40d29c1bc5 100644
@@ -24 +25 @@
-@@ -334,9 +334,4 @@ rte_ring_free(struct rte_ring *r)
+@@ -342,9 +342,4 @@ rte_ring_free(struct rte_ring *r)
@@ -34 +35 @@
-@@ -357,4 +352,7 @@ rte_ring_free(struct rte_ring *r)
+@@ -365,4 +360,7 @@ rte_ring_free(struct rte_ring *r)


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

* patch 'vfio: fix include with musl runtime' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (2 preceding siblings ...)
  2023-07-20 15:17 ` patch 'ring: fix use after free' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'kernel/freebsd: fix function parameter list' " Kevin Traynor
                   ` (135 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/ae3de8c27c5ac11db88eaadae09e4d6d254289cb

Thanks.

Kevin

---
From ae3de8c27c5ac11db88eaadae09e4d6d254289cb Mon Sep 17 00:00:00 2001
From: Philip Prindeville <philipp@redfish-solutions.com>
Date: Sat, 20 May 2023 12:07:30 -0600
Subject: [PATCH] vfio: fix include with musl runtime

[ upstream commit c41a103c961ded5a0966652f4daf0a661a947352 ]

pread64() and pwrite64() are declared in <unistd.h> in MUSL and
other (i.e. not glibc) C runtimes.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 .mailmap                         | 1 +
 drivers/bus/pci/linux/pci_vfio.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/.mailmap b/.mailmap
index c1b73055da..c94dacfdb1 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1051,4 +1051,5 @@ Petr Houska <t-pehous@microsoft.com>
 Phanendra Vukkisala <pvukkisala@marvell.com>
 Phil Yang <phil.yang@arm.com>
+Philip Prindeville <philipp@redfish-solutions.com>
 Pierre Pfister <ppfister@cisco.com>
 Piotr Azarewicz <piotr.azarewicz@intel.com> <piotrx.t.azarewicz@intel.com>
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index cd0d0b1670..822aa41f9e 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -3,4 +3,5 @@
  */
 
+#include <unistd.h>
 #include <string.h>
 #include <fcntl.h>
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:55.818025940 +0100
+++ 0005-vfio-fix-include-with-musl-runtime.patch	2023-07-20 16:17:54.427749552 +0100
@@ -1 +1 @@
-From c41a103c961ded5a0966652f4daf0a661a947352 Mon Sep 17 00:00:00 2001
+From ae3de8c27c5ac11db88eaadae09e4d6d254289cb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c41a103c961ded5a0966652f4daf0a661a947352 ]
+
@@ -9,2 +10,0 @@
-Cc: stable@dpdk.org
-
@@ -19 +19 @@
-index 0443e461a9..db85cc66c6 100644
+index c1b73055da..c94dacfdb1 100644
@@ -22 +22 @@
-@@ -1059,4 +1059,5 @@ Petr Houska <t-pehous@microsoft.com>
+@@ -1051,4 +1051,5 @@ Petr Houska <t-pehous@microsoft.com>
@@ -29 +29 @@
-index fab3483d9f..fe83e1a04e 100644
+index cd0d0b1670..822aa41f9e 100644


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

* patch 'kernel/freebsd: fix function parameter list' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (3 preceding siblings ...)
  2023-07-20 15:17 ` patch 'vfio: fix include with musl runtime' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'build: fix case of project language name' " Kevin Traynor
                   ` (134 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: John Baldwin, Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/e8393bfd7bb3b9798f31baa9cc89fae6b933ab50

Thanks.

Kevin

---
From e8393bfd7bb3b9798f31baa9cc89fae6b933ab50 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 22 May 2023 10:22:41 +0100
Subject: [PATCH] kernel/freebsd: fix function parameter list

[ upstream commit 12b7ef3c4a6262e1c0f747bd0037a3a8df38ab4c ]

Functions which take no parameters should explicitly have "(void)" as
the parameter list, rather than "()".

Reported upstream on FreeBSD ports collection [1].

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271524

Fixes: 764bf26873b9 ("add FreeBSD support")

Reported-by: John Baldwin <jhb@freebsd.org>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 kernel/freebsd/contigmem/contigmem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/freebsd/contigmem/contigmem.c b/kernel/freebsd/contigmem/contigmem.c
index bd72f4d620..7dd87599d9 100644
--- a/kernel/freebsd/contigmem/contigmem.c
+++ b/kernel/freebsd/contigmem/contigmem.c
@@ -112,5 +112,5 @@ static struct cdevsw contigmem_ops = {
 
 static int
-contigmem_load()
+contigmem_load(void)
 {
 	char index_string[8], description[32];
@@ -179,5 +179,5 @@ error:
 
 static int
-contigmem_unload()
+contigmem_unload(void)
 {
 	int i;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:55.972662181 +0100
+++ 0006-kernel-freebsd-fix-function-parameter-list.patch	2023-07-20 16:17:54.428749556 +0100
@@ -1 +1 @@
-From 12b7ef3c4a6262e1c0f747bd0037a3a8df38ab4c Mon Sep 17 00:00:00 2001
+From e8393bfd7bb3b9798f31baa9cc89fae6b933ab50 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 12b7ef3c4a6262e1c0f747bd0037a3a8df38ab4c ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org


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

* patch 'build: fix case of project language name' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (4 preceding siblings ...)
  2023-07-20 15:17 ` patch 'kernel/freebsd: fix function parameter list' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'telemetry: fix autotest on Alpine' " Kevin Traynor
                   ` (133 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/16e1d054e4be0cbc98a0bcb00b77ee04a1758422

Thanks.

Kevin

---
From 16e1d054e4be0cbc98a0bcb00b77ee04a1758422 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 10 Mar 2023 11:11:37 +0000
Subject: [PATCH] build: fix case of project language name

[ upstream commit f6da046a1528895a96e1fbb7deef2c668efd0a56 ]

According to the meson manual [1], the project language should be given
as 'c', rather than 'C' in the initial "project" function call. While
meson itself does not complain about this, the "muon" project, which
attempts to re-implement meson in C, does complain.

/home/bruce/dpdk/meson.build:4:17: error 'C' is not a valid language
  4 | project('DPDK', 'C',
                      ^

[1] https://mesonbuild.com/Reference-manual_functions.html#project

Fixes: a25a650be5f0 ("build: add infrastructure for meson and ninja builds")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index dff7cff4aa..19234656fb 100644
--- a/meson.build
+++ b/meson.build
@@ -2,5 +2,5 @@
 # Copyright(c) 2017-2019 Intel Corporation
 
-project('DPDK', 'C',
+project('DPDK', 'c',
         # Get version number from file.
         # Fallback to "more" for Windows compatibility.
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:56.070261612 +0100
+++ 0007-build-fix-case-of-project-language-name.patch	2023-07-20 16:17:54.428749556 +0100
@@ -1 +1 @@
-From f6da046a1528895a96e1fbb7deef2c668efd0a56 Mon Sep 17 00:00:00 2001
+From 16e1d054e4be0cbc98a0bcb00b77ee04a1758422 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f6da046a1528895a96e1fbb7deef2c668efd0a56 ]
+
@@ -26 +28 @@
-index f91d652bc5..992ca91e88 100644
+index dff7cff4aa..19234656fb 100644


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

* patch 'telemetry: fix autotest on Alpine' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (5 preceding siblings ...)
  2023-07-20 15:17 ` patch 'build: fix case of project language name' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'ring: fix dequeue parameter name' " Kevin Traynor
                   ` (132 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/c95d48b0d4e2f9eb5cdb4d2b2e7a1da22b534e94

Thanks.

Kevin

---
From c95d48b0d4e2f9eb5cdb4d2b2e7a1da22b534e94 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 5 Apr 2023 17:03:22 +0100
Subject: [PATCH] telemetry: fix autotest on Alpine

[ upstream commit 6ffce64857216344f02ee88d92cb69ee241b3c7b ]

On Alpine linux, the telemetry_data_autotest was failing for the
test where we had dictionaries embedded in other dictionaries up
to three levels deep. Indications are that this issue is due to
excess data being stored on the stack, so replace stack-allocated
buffer data with dynamically allocated data in the case where we
are doing recursive processing of telemetry data structures into
json.

Bugzilla ID: 1177
Fixes: c933bb5177ca ("telemetry: support array values in data object")
Fixes: d2671e642a8e ("telemetry: support dict of dicts")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/telemetry/telemetry.c | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index 9ff0def182..e73f4a593e 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -198,5 +198,9 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
 			case RTE_TEL_CONTAINER:
 			{
-				char temp[buf_len];
+				char *temp = malloc(buf_len);
+				if (temp == NULL)
+					break;
+				*temp = '\0';  /* ensure valid string */
+
 				const struct container *cont =
 						&v->value.container;
@@ -209,4 +213,5 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
 				if (!cont->keep)
 					rte_tel_data_free(cont->data);
+				free(temp);
 				break;
 			}
@@ -265,5 +270,9 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
 			case RTE_TEL_CONTAINER:
 			{
-				char temp[buf_len];
+				char *temp = malloc(buf_len);
+				if (temp == NULL)
+					break;
+				*temp = '\0';  /* ensure valid string */
+
 				const struct container *cont =
 						&v->value.container;
@@ -276,4 +285,5 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
 				if (!cont->keep)
 					rte_tel_data_free(cont->data);
+				free(temp);
 			}
 			}
@@ -307,5 +317,9 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
 						d->data.array[i].u64val);
 			else if (d->type == RTE_TEL_ARRAY_CONTAINER) {
-				char temp[buf_len];
+				char *temp = malloc(buf_len);
+				if (temp == NULL)
+					break;
+				*temp = '\0';  /* ensure valid string */
+
 				const struct container *rec_data =
 						&d->data.array[i].container;
@@ -317,4 +331,5 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
 				if (!rec_data->keep)
 					rte_tel_data_free(rec_data->data);
+				free(temp);
 			}
 		used += prefix_used;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:56.195946273 +0100
+++ 0008-telemetry-fix-autotest-on-Alpine.patch	2023-07-20 16:17:54.430749564 +0100
@@ -1 +1 @@
-From 6ffce64857216344f02ee88d92cb69ee241b3c7b Mon Sep 17 00:00:00 2001
+From c95d48b0d4e2f9eb5cdb4d2b2e7a1da22b534e94 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6ffce64857216344f02ee88d92cb69ee241b3c7b ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index deba7f34a3..590720bfa6 100644
+index 9ff0def182..e73f4a593e 100644
@@ -29 +30 @@
-@@ -209,5 +209,9 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
+@@ -198,5 +198,9 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
@@ -40 +41 @@
-@@ -220,4 +224,5 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
+@@ -209,4 +213,5 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
@@ -46 +47 @@
-@@ -276,5 +281,9 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
+@@ -265,5 +270,9 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
@@ -57 +58 @@
-@@ -287,4 +296,5 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
+@@ -276,4 +285,5 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
@@ -63,3 +64,3 @@
-@@ -312,5 +322,9 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
- 						d->data.array[i].uval);
- 			else if (d->type == TEL_ARRAY_CONTAINER) {
+@@ -307,5 +317,9 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
+ 						d->data.array[i].u64val);
+ 			else if (d->type == RTE_TEL_ARRAY_CONTAINER) {
@@ -74 +75 @@
-@@ -322,4 +336,5 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
+@@ -317,4 +331,5 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s)
@@ -79 +80 @@
- 		break;
+ 		used += prefix_used;


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

* patch 'ring: fix dequeue parameter name' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (6 preceding siblings ...)
  2023-07-20 15:17 ` patch 'telemetry: fix autotest on Alpine' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'pipeline: fix double free for table stats' " Kevin Traynor
                   ` (131 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Ruifeng Wang, Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/4b8a60276bb67e4fba40fcb285b5b21d20907533

Thanks.

Kevin

---
From 4b8a60276bb67e4fba40fcb285b5b21d20907533 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Fri, 7 Apr 2023 16:48:25 +0800
Subject: [PATCH] ring: fix dequeue parameter name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit b632e76751ff9797e36531305638e1cbd14ffa09 ]

Ring dequeue operation's parameters name should be 'cons_xx',
rather than 'prod_xxx'.

Fixes: 1fc73390bcf5 ("ring: refactor exported headers")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/ring/rte_ring_elem_pvt.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/ring/rte_ring_elem_pvt.h b/lib/ring/rte_ring_elem_pvt.h
index 04b55c34a4..99786cca95 100644
--- a/lib/ring/rte_ring_elem_pvt.h
+++ b/lib/ring/rte_ring_elem_pvt.h
@@ -195,10 +195,10 @@ __rte_ring_dequeue_elems_32(struct rte_ring *r, const uint32_t size,
 
 static __rte_always_inline void
-__rte_ring_dequeue_elems_64(struct rte_ring *r, uint32_t prod_head,
+__rte_ring_dequeue_elems_64(struct rte_ring *r, uint32_t cons_head,
 		void *obj_table, uint32_t n)
 {
 	unsigned int i;
 	const uint32_t size = r->size;
-	uint32_t idx = prod_head & r->mask;
+	uint32_t idx = cons_head & r->mask;
 	uint64_t *ring = (uint64_t *)&r[1];
 	unaligned_uint64_t *obj = (unaligned_uint64_t *)obj_table;
@@ -228,10 +228,10 @@ __rte_ring_dequeue_elems_64(struct rte_ring *r, uint32_t prod_head,
 
 static __rte_always_inline void
-__rte_ring_dequeue_elems_128(struct rte_ring *r, uint32_t prod_head,
+__rte_ring_dequeue_elems_128(struct rte_ring *r, uint32_t cons_head,
 		void *obj_table, uint32_t n)
 {
 	unsigned int i;
 	const uint32_t size = r->size;
-	uint32_t idx = prod_head & r->mask;
+	uint32_t idx = cons_head & r->mask;
 	rte_int128_t *ring = (rte_int128_t *)&r[1];
 	rte_int128_t *obj = (rte_int128_t *)obj_table;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:56.300898944 +0100
+++ 0009-ring-fix-dequeue-parameter-name.patch	2023-07-20 16:17:54.431749568 +0100
@@ -1 +1 @@
-From b632e76751ff9797e36531305638e1cbd14ffa09 Mon Sep 17 00:00:00 2001
+From 4b8a60276bb67e4fba40fcb285b5b21d20907533 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit b632e76751ff9797e36531305638e1cbd14ffa09 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index e24e4492ff..4b80f58980 100644
+index 04b55c34a4..99786cca95 100644


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

* patch 'pipeline: fix double free for table stats' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (7 preceding siblings ...)
  2023-07-20 15:17 ` patch 'ring: fix dequeue parameter name' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'test/malloc: fix missing free' " Kevin Traynor
                   ` (130 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Kamalakannan R; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/e531825d4eb211c97b402b602bafe5dc6de5e740

Thanks.

Kevin

---
From e531825d4eb211c97b402b602bafe5dc6de5e740 Mon Sep 17 00:00:00 2001
From: Kamalakannan R <kamalakannan.r@intel.com>
Date: Mon, 17 Apr 2023 16:52:43 +0530
Subject: [PATCH] pipeline: fix double free for table stats

[ upstream commit 2d9e10932d535ea553081b489a25f6fce7ec7996 ]

The pointer to the table statistics data structure needs to be set
to NULL after free inside the table_build_free(), as this function is
called from multiple places, leading to double memory free error.

Similar fix for the learner_build_free() function.

Fixes: 742b0a57f50e ("pipeline: add table statistics to SWX")
Fixes: 4f59d3726147 ("pipeline: support learner tables")

Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/pipeline/rte_swx_pipeline.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c
index 8d5073cf19..25b5b0955d 100644
--- a/lib/pipeline/rte_swx_pipeline.c
+++ b/lib/pipeline/rte_swx_pipeline.c
@@ -7636,4 +7636,5 @@ table_build_free(struct rte_swx_pipeline *p)
 
 		free(p->table_stats);
+		p->table_stats = NULL;
 	}
 }
@@ -8444,4 +8445,5 @@ learner_build_free(struct rte_swx_pipeline *p)
 
 		free(p->learner_stats);
+		p->learner_stats = NULL;
 	}
 }
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:56.423214272 +0100
+++ 0010-pipeline-fix-double-free-for-table-stats.patch	2023-07-20 16:17:54.449749642 +0100
@@ -1 +1 @@
-From 2d9e10932d535ea553081b489a25f6fce7ec7996 Mon Sep 17 00:00:00 2001
+From e531825d4eb211c97b402b602bafe5dc6de5e740 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d9e10932d535ea553081b489a25f6fce7ec7996 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index dea1378095..da37eda231 100644
+index 8d5073cf19..25b5b0955d 100644
@@ -26 +27 @@
-@@ -8666,4 +8666,5 @@ table_build_free(struct rte_swx_pipeline *p)
+@@ -7636,4 +7636,5 @@ table_build_free(struct rte_swx_pipeline *p)
@@ -32 +33 @@
-@@ -9580,4 +9581,5 @@ learner_build_free(struct rte_swx_pipeline *p)
+@@ -8444,4 +8445,5 @@ learner_build_free(struct rte_swx_pipeline *p)


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

* patch 'test/malloc: fix missing free' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (8 preceding siblings ...)
  2023-07-20 15:17 ` patch 'pipeline: fix double free for table stats' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'test/malloc: fix statistics checks' " Kevin Traynor
                   ` (129 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Feifei Wang, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/13c7286a695c142f4f8cc8238485c2b68a1acf1d

Thanks.

Kevin

---
From 13c7286a695c142f4f8cc8238485c2b68a1acf1d Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Fri, 19 May 2023 12:29:22 +0800
Subject: [PATCH] test/malloc: fix missing free

[ upstream commit ec8ef136b8d9340003118bb25390d7c6989178bf ]

Free the allocated buffer before returning.

Fixes: a40a1f8231b4 ("app: various tests update")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Feifei Wang <feifei.wang2@arm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_malloc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
index 6d9249f831..cf1af6285f 100644
--- a/app/test/test_malloc.c
+++ b/app/test/test_malloc.c
@@ -928,4 +928,5 @@ test_alloc_single_socket(int32_t socket)
 		return -1;
 	if (addr_to_socket(mem) != desired_socket) {
+		rte_free(mem);
 		return -1;
 	}
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:56.570564241 +0100
+++ 0011-test-malloc-fix-missing-free.patch	2023-07-20 16:17:54.450749646 +0100
@@ -1 +1 @@
-From ec8ef136b8d9340003118bb25390d7c6989178bf Mon Sep 17 00:00:00 2001
+From 13c7286a695c142f4f8cc8238485c2b68a1acf1d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ec8ef136b8d9340003118bb25390d7c6989178bf ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index de40e50611..f144b89d88 100644
+index 6d9249f831..cf1af6285f 100644
@@ -22 +23 @@
-@@ -938,4 +938,5 @@ test_alloc_single_socket(int32_t socket)
+@@ -928,4 +928,5 @@ test_alloc_single_socket(int32_t socket)


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

* patch 'test/malloc: fix statistics checks' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (9 preceding siblings ...)
  2023-07-20 15:17 ` patch 'test/malloc: fix missing free' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'eal: avoid calling cleanup twice' " Kevin Traynor
                   ` (128 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Feifei Wang, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/c2f6df57e20bf422f49890711f8fb62ea9f178fd

Thanks.

Kevin

---
From c2f6df57e20bf422f49890711f8fb62ea9f178fd Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Fri, 19 May 2023 12:29:23 +0800
Subject: [PATCH] test/malloc: fix statistics checks

[ upstream commit 19606f83e6c1dffea9bda42a792e1cbbc6d5a043 ]

The case expects all stats to be equal.
Therefore the negative conditions in check should be logically or'ed.

Fixes: a40a1f8231b4 ("app: various tests update")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Feifei Wang <feifei.wang2@arm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_malloc.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
index cf1af6285f..9008038bfa 100644
--- a/app/test/test_malloc.c
+++ b/app/test/test_malloc.c
@@ -302,9 +302,9 @@ test_multi_alloc_statistics(void)
 	/* Check statistics reported are correct */
 	/* All post stats should be equal to pre stats after alloc freed */
-	if ((post_stats.heap_totalsz_bytes != pre_stats.heap_totalsz_bytes) &&
-			(post_stats.heap_freesz_bytes!=pre_stats.heap_freesz_bytes) &&
-			(post_stats.heap_allocsz_bytes!=pre_stats.heap_allocsz_bytes)&&
-			(post_stats.alloc_count!=pre_stats.alloc_count)&&
-			(post_stats.free_count!=pre_stats.free_count)) {
+	if ((post_stats.heap_totalsz_bytes != pre_stats.heap_totalsz_bytes) ||
+			(post_stats.heap_freesz_bytes != pre_stats.heap_freesz_bytes) ||
+			(post_stats.heap_allocsz_bytes != pre_stats.heap_allocsz_bytes) ||
+			(post_stats.alloc_count != pre_stats.alloc_count) ||
+			(post_stats.free_count != pre_stats.free_count)) {
 		printf("Malloc statistics are incorrect - freed alloc\n");
 		return -1;
@@ -363,9 +363,9 @@ test_multi_alloc_statistics(void)
 	}
 
-	if ((post_stats.heap_totalsz_bytes != pre_stats.heap_totalsz_bytes) &&
-			(post_stats.heap_freesz_bytes!=pre_stats.heap_freesz_bytes) &&
-			(post_stats.heap_allocsz_bytes!=pre_stats.heap_allocsz_bytes)&&
-			(post_stats.alloc_count!=pre_stats.alloc_count)&&
-			(post_stats.free_count!=pre_stats.free_count)) {
+	if ((post_stats.heap_totalsz_bytes != pre_stats.heap_totalsz_bytes) ||
+			(post_stats.heap_freesz_bytes != pre_stats.heap_freesz_bytes) ||
+			(post_stats.heap_allocsz_bytes != pre_stats.heap_allocsz_bytes) ||
+			(post_stats.alloc_count != pre_stats.alloc_count) ||
+			(post_stats.free_count != pre_stats.free_count)) {
 		printf("Malloc statistics are incorrect - freed alloc\n");
 		return -1;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:56.698290928 +0100
+++ 0012-test-malloc-fix-statistics-checks.patch	2023-07-20 16:17:54.452749654 +0100
@@ -1 +1 @@
-From 19606f83e6c1dffea9bda42a792e1cbbc6d5a043 Mon Sep 17 00:00:00 2001
+From c2f6df57e20bf422f49890711f8fb62ea9f178fd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 19606f83e6c1dffea9bda42a792e1cbbc6d5a043 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index f144b89d88..ff081dd931 100644
+index cf1af6285f..9008038bfa 100644
@@ -23 +24 @@
-@@ -303,9 +303,9 @@ test_multi_alloc_statistics(void)
+@@ -302,9 +302,9 @@ test_multi_alloc_statistics(void)
@@ -38 +39 @@
-@@ -364,9 +364,9 @@ test_multi_alloc_statistics(void)
+@@ -363,9 +363,9 @@ test_multi_alloc_statistics(void)


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

* patch 'eal: avoid calling cleanup twice' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (10 preceding siblings ...)
  2023-07-20 15:17 ` patch 'test/malloc: fix statistics checks' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'pci: fix comment referencing renamed function' " Kevin Traynor
                   ` (127 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/e506470227c99f0112b5ecf933f68b6fa876c1b7

Thanks.

Kevin

---
From e506470227c99f0112b5ecf933f68b6fa876c1b7 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 1 Jun 2023 17:08:55 +0100
Subject: [PATCH] eal: avoid calling cleanup twice

[ upstream commit a4a2ac988679b3802a574e7bb72154da177449a4 ]

If an app calls rte_eal_cleanup() inside it's own code, then cleanup
could be called a second time automatically when the app exits. While
mostly harmless, we can avoid any potential issues by guaranteeing that
cleanup only gets called once, in the same way that eal_init only ever
gets called once.

Note: This patch only touches Linux and FreeBSD. Windows EAL does not
have run-once guard on the init function, so omitting it in the cleanup
function.

Fixes: aec9c13c5257 ("eal: add function to release internal resources")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/eal/common/eal_common_debug.c |  5 ++++-
 lib/eal/freebsd/eal.c             | 10 ++++++++++
 lib/eal/linux/eal.c               | 10 ++++++++++
 3 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/lib/eal/common/eal_common_debug.c b/lib/eal/common/eal_common_debug.c
index 15418e957f..37c7c308b9 100644
--- a/lib/eal/common/eal_common_debug.c
+++ b/lib/eal/common/eal_common_debug.c
@@ -4,7 +4,10 @@
 
 #include <stdarg.h>
+#include <errno.h>
+
 #include <rte_eal.h>
 #include <rte_log.h>
 #include <rte_debug.h>
+#include <rte_errno.h>
 
 void
@@ -38,5 +41,5 @@ rte_exit(int exit_code, const char *format, ...)
 	va_end(ap);
 
-	if (rte_eal_cleanup() != 0)
+	if (rte_eal_cleanup() != 0 && rte_errno != EALREADY)
 		RTE_LOG(CRIT, EAL,
 			"EAL could not release all resources\n");
diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
index 717d1f0b9a..66553089fa 100644
--- a/lib/eal/freebsd/eal.c
+++ b/lib/eal/freebsd/eal.c
@@ -983,4 +983,14 @@ int
 rte_eal_cleanup(void)
 {
+	static uint32_t run_once;
+	uint32_t has_run = 0;
+
+	if (!__atomic_compare_exchange_n(&run_once, &has_run, 1, 0,
+			__ATOMIC_RELAXED, __ATOMIC_RELAXED)) {
+		RTE_LOG(WARNING, EAL, "Already called cleanup\n");
+		rte_errno = EALREADY;
+		return -1;
+	}
+
 	struct internal_config *internal_conf =
 		eal_get_internal_configuration();
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 84c42679bf..862d526658 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -1355,4 +1355,14 @@ int
 rte_eal_cleanup(void)
 {
+	static uint32_t run_once;
+	uint32_t has_run = 0;
+
+	if (!__atomic_compare_exchange_n(&run_once, &has_run, 1, 0,
+					__ATOMIC_RELAXED, __ATOMIC_RELAXED)) {
+		RTE_LOG(WARNING, EAL, "Already called cleanup\n");
+		rte_errno = EALREADY;
+		return -1;
+	}
+
 	/* if we're in a primary process, we need to mark hugepages as freeable
 	 * so that finalization can release them back to the system.
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:56.817039384 +0100
+++ 0013-eal-avoid-calling-cleanup-twice.patch	2023-07-20 16:17:54.456749670 +0100
@@ -1 +1 @@
-From a4a2ac988679b3802a574e7bb72154da177449a4 Mon Sep 17 00:00:00 2001
+From e506470227c99f0112b5ecf933f68b6fa876c1b7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a4a2ac988679b3802a574e7bb72154da177449a4 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
- lib/eal/common/eal_common_debug.c |  4 +++-
+ lib/eal/common/eal_common_debug.c |  5 ++++-
@@ -24 +25 @@
- 3 files changed, 23 insertions(+), 1 deletion(-)
+ 3 files changed, 24 insertions(+), 1 deletion(-)
@@ -27 +28 @@
-index dcb554af1e..9cac9c6390 100644
+index 15418e957f..37c7c308b9 100644
@@ -30 +31,2 @@
-@@ -5,8 +5,10 @@
+@@ -4,7 +4,10 @@
+ 
@@ -32 +33,0 @@
- #include <stdlib.h>
@@ -34 +35 @@
- 
++
@@ -41 +42 @@
-@@ -40,5 +42,5 @@ rte_exit(int exit_code, const char *format, ...)
+@@ -38,5 +41,5 @@ rte_exit(int exit_code, const char *format, ...)
@@ -49 +50 @@
-index 7daf22e314..78ffb45c59 100644
+index 717d1f0b9a..66553089fa 100644
@@ -52 +53 @@
-@@ -903,4 +903,14 @@ int
+@@ -983,4 +983,14 @@ int
@@ -68 +69 @@
-index ae323cd492..90e05fe4de 100644
+index 84c42679bf..862d526658 100644
@@ -71 +72 @@
-@@ -1366,4 +1366,14 @@ int
+@@ -1355,4 +1355,14 @@ int


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

* patch 'pci: fix comment referencing renamed function' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (11 preceding siblings ...)
  2023-07-20 15:17 ` patch 'eal: avoid calling cleanup twice' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'eventdev/timer: fix timeout event wait behavior' " Kevin Traynor
                   ` (126 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/e248dac54f16c16855b21a07a17af6af75f3b0bf

Thanks.

Kevin

---
From e248dac54f16c16855b21a07a17af6af75f3b0bf Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Tue, 30 May 2023 18:02:15 +0200
Subject: [PATCH] pci: fix comment referencing renamed function

[ upstream commit 61f551995030e2d114ccbcaa8a63c8cc052d21b5 ]

When renaming functions eal_parse_pci_*,
a referencing comment was missed in the function rte_pci_device_name().

Fixes: ca52fccbb3b9 ("pci: remove deprecated functions")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/pci/rte_pci.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/pci/rte_pci.h b/lib/pci/rte_pci.h
index 71cbd441c7..60f641fa61 100644
--- a/lib/pci/rte_pci.h
+++ b/lib/pci/rte_pci.h
@@ -106,6 +106,5 @@ struct rte_pci_addr {
 /**
  * Utility function to write a pci device name, this device name can later be
- * used to retrieve the corresponding rte_pci_addr using eal_parse_pci_*
- * BDF helpers.
+ * used to retrieve the corresponding rte_pci_addr using rte_pci_addr_parse().
  *
  * @param addr
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:56.947257585 +0100
+++ 0014-pci-fix-comment-referencing-renamed-function.patch	2023-07-20 16:17:54.457749675 +0100
@@ -1 +1 @@
-From 61f551995030e2d114ccbcaa8a63c8cc052d21b5 Mon Sep 17 00:00:00 2001
+From e248dac54f16c16855b21a07a17af6af75f3b0bf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 61f551995030e2d114ccbcaa8a63c8cc052d21b5 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 5088157e74..aab761b918 100644
+index 71cbd441c7..60f641fa61 100644
@@ -22 +23 @@
-@@ -105,6 +105,5 @@ struct rte_pci_addr {
+@@ -106,6 +106,5 @@ struct rte_pci_addr {


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

* patch 'eventdev/timer: fix timeout event wait behavior' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (12 preceding siblings ...)
  2023-07-20 15:17 ` patch 'pci: fix comment referencing renamed function' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'doc: fix event timer adapter guide' " Kevin Traynor
                   ` (125 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Shijith Thotton; +Cc: Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/84d280e276f6ffbbc821cb1e69d4ea156628933c

Thanks.

Kevin

---
From 84d280e276f6ffbbc821cb1e69d4ea156628933c Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton@marvell.com>
Date: Tue, 21 Mar 2023 10:50:23 +0530
Subject: [PATCH] eventdev/timer: fix timeout event wait behavior

[ upstream commit fb9c213317b5e07918c9306f2036f8cc07126a85 ]

Improved the accuracy and consistency of timeout event wait behavior by
refactoring it. Previously, the delay function used for waiting could be
inaccurate, leading to inconsistent results. This commit updates the
wait behavior to use a timeout-based approach, enabling the wait for the
exact number of timer ticks before proceeding.

The new function timeout_event_dequeue mimics the behavior of the tested
systems closely. It dequeues timer expiry events until either the
expected number of events have been dequeued or the specified time has
elapsed. The WAIT_TICKS macro defines the waiting behavior based on the
type of timer being used (software or hardware).

Fixes: d1f3385d0076 ("test: add event timer adapter auto-test")

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 app/test/test_event_timer_adapter.c | 165 +++++++++++-----------------
 1 file changed, 67 insertions(+), 98 deletions(-)

diff --git a/app/test/test_event_timer_adapter.c b/app/test/test_event_timer_adapter.c
index dfec499d60..3ded1c1efa 100644
--- a/app/test/test_event_timer_adapter.c
+++ b/app/test/test_event_timer_adapter.c
@@ -47,7 +47,8 @@ static uint64_t global_info_bkt_tck_ns;
 static volatile uint8_t arm_done;
 
-#define CALC_TICKS(tks)					\
-	ceil((double)(tks * global_bkt_tck_ns) / global_info_bkt_tck_ns)
+#define CALC_TICKS(tks) ceil((double)((tks) * global_bkt_tck_ns) / global_info_bkt_tck_ns)
 
+/* Wait double timeout ticks for software and an extra tick for hardware */
+#define WAIT_TICKS(tks) (using_services ? 2 * (tks) : tks + 1)
 
 static bool using_services;
@@ -420,8 +421,29 @@ timdev_teardown(void)
 }
 
+static inline uint16_t
+timeout_event_dequeue(struct rte_event *evs, uint64_t nb_evs, uint64_t ticks)
+{
+	uint16_t ev_cnt = 0;
+	uint64_t end_cycle;
+
+	if (using_services && nb_evs == MAX_TIMERS)
+		ticks = 2 * ticks;
+
+	end_cycle = rte_rdtsc() + ticks * global_bkt_tck_ns * rte_get_tsc_hz() / 1E9;
+
+	while (ev_cnt < nb_evs && rte_rdtsc() < end_cycle) {
+		ev_cnt += rte_event_dequeue_burst(evdev, TEST_PORT_ID, &evs[ev_cnt], nb_evs, 0);
+		rte_pause();
+	}
+
+	return ev_cnt;
+}
+
 static inline int
 test_timer_state(void)
 {
 	struct rte_event_timer *ev_tim;
+	const uint64_t max_ticks = 100;
+	uint64_t ticks, wait_ticks;
 	struct rte_event ev;
 	const struct rte_event_timer tim = {
@@ -434,9 +456,8 @@ test_timer_state(void)
 	};
 
-
 	rte_mempool_get(eventdev_test_mempool, (void **)&ev_tim);
 	*ev_tim = tim;
 	ev_tim->ev.event_ptr = ev_tim;
-	ev_tim->timeout_ticks = CALC_TICKS(120);
+	ev_tim->timeout_ticks = CALC_TICKS(max_ticks + 20);
 
 	TEST_ASSERT_EQUAL(rte_event_timer_arm_burst(timdev, &ev_tim, 1), 0,
@@ -446,6 +467,7 @@ test_timer_state(void)
 			RTE_EVENT_TIMER_ERROR_TOOLATE, ev_tim->state);
 
+	ticks = 10;
 	ev_tim->state = RTE_EVENT_TIMER_NOT_ARMED;
-	ev_tim->timeout_ticks = CALC_TICKS(10);
+	ev_tim->timeout_ticks = CALC_TICKS(ticks);
 
 	TEST_ASSERT_EQUAL(rte_event_timer_arm_burst(timdev, &ev_tim, 1), 1,
@@ -456,12 +478,13 @@ test_timer_state(void)
 
 	if (!using_services)
-		rte_delay_us(20);
+		wait_ticks = 2 * ticks;
 	else
-		rte_delay_us(1000 + 200);
-	TEST_ASSERT_EQUAL(rte_event_dequeue_burst(evdev, 0, &ev, 1, 0), 1,
-			"Armed timer failed to trigger.");
+		wait_ticks = ticks;
+
+	TEST_ASSERT_EQUAL(timeout_event_dequeue(&ev, 1, WAIT_TICKS(wait_ticks)), 1,
+			  "Armed timer failed to trigger.");
 
 	ev_tim->state = RTE_EVENT_TIMER_NOT_ARMED;
-	ev_tim->timeout_ticks = CALC_TICKS(90);
+	ev_tim->timeout_ticks = CALC_TICKS(max_ticks - 10);
 	TEST_ASSERT_EQUAL(rte_event_timer_arm_burst(timdev, &ev_tim, 1), 1,
 			"Failed to arm timer with proper timeout.");
@@ -1165,6 +1188,7 @@ stat_inc_reset_ev_enq(void)
 	int num_evtims = MAX_TIMERS;
 	struct rte_event_timer *evtims[num_evtims];
-	struct rte_event evs[BATCH_SIZE];
+	struct rte_event evs[num_evtims];
 	struct rte_event_timer_adapter_stats stats;
+	uint64_t ticks = 5;
 	const struct rte_event_timer init_tim = {
 		.ev.op = RTE_EVENT_OP_NEW,
@@ -1174,5 +1198,5 @@ stat_inc_reset_ev_enq(void)
 		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
-		.timeout_ticks = CALC_TICKS(5), // expire in .5 sec
+		.timeout_ticks = CALC_TICKS(ticks), /**< expire in .5 sec */
 	};
 
@@ -1199,29 +1223,10 @@ stat_inc_reset_ev_enq(void)
 			  num_evtims, ret, rte_strerror(rte_errno));
 
-	rte_delay_ms(1000);
-
-#define MAX_TRIES num_evtims
-	int sum = 0;
-	int tries = 0;
-	bool done = false;
-	while (!done) {
-		sum += rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs,
-					       RTE_DIM(evs), 10);
-		if (sum >= num_evtims || ++tries >= MAX_TRIES)
-			done = true;
-
-		rte_delay_ms(10);
-	}
-
-	TEST_ASSERT_EQUAL(sum, num_evtims, "Expected %d timer expiry events, "
-			  "got %d", num_evtims, sum);
-
-	TEST_ASSERT(tries < MAX_TRIES, "Exceeded max tries");
-
-	rte_delay_ms(100);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
+	TEST_ASSERT_EQUAL(n, num_evtims, "Expected %d timer expiry events, got %d",
+			  num_evtims, n);
 
 	/* Make sure the eventdev is still empty */
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs),
-				      10);
+	n = timeout_event_dequeue(evs, 1, WAIT_TICKS(1));
 
 	TEST_ASSERT_EQUAL(n, 0, "Dequeued unexpected number of timer expiry "
@@ -1260,4 +1265,5 @@ event_timer_arm(void)
 	struct rte_event_timer *evtim = NULL;
 	struct rte_event evs[BATCH_SIZE];
+	uint64_t ticks = 5;
 	const struct rte_event_timer init_tim = {
 		.ev.op = RTE_EVENT_OP_NEW,
@@ -1267,5 +1273,5 @@ event_timer_arm(void)
 		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
-		.timeout_ticks = CALC_TICKS(5), // expire in .5 sec
+		.timeout_ticks = CALC_TICKS(ticks), /**< expire in .5 sec */
 	};
 
@@ -1294,8 +1300,5 @@ event_timer_arm(void)
 			  "after arming already armed timer");
 
-	/* Let timer expire */
-	rte_delay_ms(1000);
-
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
 	TEST_ASSERT_EQUAL(n, 1, "Failed to dequeue expected number of expiry "
 			  "events from event device");
@@ -1317,4 +1320,5 @@ event_timer_arm_double(void)
 	struct rte_event_timer *evtim = NULL;
 	struct rte_event evs[BATCH_SIZE];
+	uint64_t ticks = 5;
 	const struct rte_event_timer init_tim = {
 		.ev.op = RTE_EVENT_OP_NEW,
@@ -1324,5 +1328,5 @@ event_timer_arm_double(void)
 		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
-		.timeout_ticks = CALC_TICKS(5), // expire in .5 sec
+		.timeout_ticks = CALC_TICKS(ticks), /**< expire in .5 sec */
 	};
 
@@ -1344,8 +1348,5 @@ event_timer_arm_double(void)
 			  "after double-arm");
 
-	/* Let timer expire */
-	rte_delay_ms(600);
-
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
 	TEST_ASSERT_EQUAL(n, 1, "Dequeued incorrect number of expiry events - "
 			  "expected: 1, actual: %d", n);
@@ -1374,4 +1375,5 @@ event_timer_arm_expiry(void)
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
 	};
+	uint64_t ticks = 30;
 
 	rte_mempool_get(eventdev_test_mempool, (void **)&evtim);
@@ -1383,5 +1385,5 @@ event_timer_arm_expiry(void)
 	/* Set up an event timer */
 	*evtim = init_tim;
-	evtim->timeout_ticks = CALC_TICKS(30),	// expire in 3 secs
+	evtim->timeout_ticks = CALC_TICKS(ticks); /**< expire in 3 secs */
 	evtim->ev.event_ptr = evtim;
 
@@ -1392,15 +1394,8 @@ event_timer_arm_expiry(void)
 			  "timer in incorrect state");
 
-	rte_delay_ms(2999);
-
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), ticks - 1);
 	TEST_ASSERT_EQUAL(n, 0, "Dequeued unexpected timer expiry event");
 
-	/* Delay 100 ms to account for the adapter tick window - should let us
-	 * dequeue one event
-	 */
-	rte_delay_ms(100);
-
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(1));
 	TEST_ASSERT_EQUAL(n, 1, "Dequeued incorrect number (%d) of timer "
 			  "expiry events", n);
@@ -1434,4 +1429,5 @@ event_timer_arm_rearm(void)
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
 	};
+	uint64_t ticks = 1;
 
 	rte_mempool_get(eventdev_test_mempool, (void **)&evtim);
@@ -1443,5 +1439,5 @@ event_timer_arm_rearm(void)
 	/* Set up a timer */
 	*evtim = init_tim;
-	evtim->timeout_ticks = CALC_TICKS(1);  // expire in 0.1 sec
+	evtim->timeout_ticks = CALC_TICKS(ticks); /**< expire in 0.1 sec */
 	evtim->ev.event_ptr = evtim;
 
@@ -1451,8 +1447,5 @@ event_timer_arm_rearm(void)
 			  rte_strerror(rte_errno));
 
-	/* Add 100ms to account for the adapter tick window */
-	rte_delay_ms(100 + 100);
-
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
 	TEST_ASSERT_EQUAL(n, 1, "Failed to dequeue expected number of expiry "
 			  "events from event device");
@@ -1471,8 +1464,5 @@ event_timer_arm_rearm(void)
 			  rte_strerror(rte_errno));
 
-	/* Add 100ms to account for the adapter tick window */
-	rte_delay_ms(100 + 100);
-
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
 	TEST_ASSERT_EQUAL(n, 1, "Failed to dequeue expected number of expiry "
 			  "events from event device");
@@ -1496,5 +1486,6 @@ event_timer_arm_max(void)
 	int num_evtims = MAX_TIMERS;
 	struct rte_event_timer *evtims[num_evtims];
-	struct rte_event evs[BATCH_SIZE];
+	struct rte_event evs[num_evtims];
+	uint64_t ticks = 5;
 	const struct rte_event_timer init_tim = {
 		.ev.op = RTE_EVENT_OP_NEW,
@@ -1504,5 +1495,5 @@ event_timer_arm_max(void)
 		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
-		.timeout_ticks = CALC_TICKS(5), // expire in .5 sec
+		.timeout_ticks = CALC_TICKS(ticks), /**< expire in .5 sec */
 	};
 
@@ -1524,29 +1515,10 @@ event_timer_arm_max(void)
 			  num_evtims, ret, rte_strerror(rte_errno));
 
-	rte_delay_ms(1000);
-
-#define MAX_TRIES num_evtims
-	int sum = 0;
-	int tries = 0;
-	bool done = false;
-	while (!done) {
-		sum += rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs,
-					       RTE_DIM(evs), 10);
-		if (sum >= num_evtims || ++tries >= MAX_TRIES)
-			done = true;
-
-		rte_delay_ms(10);
-	}
-
-	TEST_ASSERT_EQUAL(sum, num_evtims, "Expected %d timer expiry events, "
-			  "got %d", num_evtims, sum);
-
-	TEST_ASSERT(tries < MAX_TRIES, "Exceeded max tries");
-
-	rte_delay_ms(100);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
+	TEST_ASSERT_EQUAL(n, num_evtims, "Expected %d timer expiry events, got %d",
+			  num_evtims, n);
 
 	/* Make sure the eventdev is still empty */
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs),
-				    10);
+	n = timeout_event_dequeue(evs, 1, WAIT_TICKS(1));
 
 	TEST_ASSERT_EQUAL(n, 0, "Dequeued unexpected number of timer expiry "
@@ -1668,4 +1640,5 @@ event_timer_cancel(void)
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
 	};
+	uint64_t ticks = 30;
 
 	rte_mempool_get(eventdev_test_mempool, (void **)&evtim);
@@ -1685,5 +1658,5 @@ event_timer_cancel(void)
 	*evtim = init_tim;
 	evtim->ev.event_ptr = evtim;
-	evtim->timeout_ticks = CALC_TICKS(30);  // expire in 3 sec
+	evtim->timeout_ticks = CALC_TICKS(ticks); /**< expire in 3 sec */
 
 	/* Check that cancelling an inited but unarmed timer fails */
@@ -1709,8 +1682,6 @@ event_timer_cancel(void)
 			  "evtim in incorrect state");
 
-	rte_delay_ms(3000);
-
 	/* Make sure that no expiry event was generated */
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
 	TEST_ASSERT_EQUAL(n, 0, "Dequeued unexpected timer expiry event\n");
 
@@ -1735,6 +1706,6 @@ event_timer_cancel_double(void)
 		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
 		.state = RTE_EVENT_TIMER_NOT_ARMED,
-		.timeout_ticks = CALC_TICKS(5), // expire in .5 sec
 	};
+	uint64_t ticks = 30;
 
 	rte_mempool_get(eventdev_test_mempool, (void **)&evtim);
@@ -1747,5 +1718,5 @@ event_timer_cancel_double(void)
 	*evtim = init_tim;
 	evtim->ev.event_ptr = evtim;
-	evtim->timeout_ticks = CALC_TICKS(30);  // expire in 3 sec
+	evtim->timeout_ticks = CALC_TICKS(ticks); /**< expire in 3 sec */
 
 	ret = rte_event_timer_arm_burst(adapter, &evtim, 1);
@@ -1769,8 +1740,6 @@ event_timer_cancel_double(void)
 			  "after double-cancel: rte_errno = %d", rte_errno);
 
-	rte_delay_ms(3000);
-
 	/* Still make sure that no expiry event was generated */
-	n = rte_event_dequeue_burst(evdev, TEST_PORT_ID, evs, RTE_DIM(evs), 0);
+	n = timeout_event_dequeue(evs, RTE_DIM(evs), WAIT_TICKS(ticks));
 	TEST_ASSERT_EQUAL(n, 0, "Dequeued unexpected timer expiry event\n");
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:57.045275211 +0100
+++ 0015-eventdev-timer-fix-timeout-event-wait-behavior.patch	2023-07-20 16:17:54.460749687 +0100
@@ -1 +1 @@
-From fb9c213317b5e07918c9306f2036f8cc07126a85 Mon Sep 17 00:00:00 2001
+From 84d280e276f6ffbbc821cb1e69d4ea156628933c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fb9c213317b5e07918c9306f2036f8cc07126a85 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -24,2 +25,2 @@
- app/test/test_event_timer_adapter.c | 169 +++++++++++-----------------
- 1 file changed, 68 insertions(+), 101 deletions(-)
+ app/test/test_event_timer_adapter.c | 165 +++++++++++-----------------
+ 1 file changed, 67 insertions(+), 98 deletions(-)
@@ -28 +29 @@
-index 5e7feec1c7..510bebcf86 100644
+index dfec499d60..3ded1c1efa 100644
@@ -31 +32 @@
-@@ -58,7 +58,8 @@ static uint64_t global_info_bkt_tck_ns;
+@@ -47,7 +47,8 @@ static uint64_t global_info_bkt_tck_ns;
@@ -42 +43 @@
-@@ -442,8 +443,29 @@ timdev_teardown(void)
+@@ -420,8 +421,29 @@ timdev_teardown(void)
@@ -72 +73 @@
-@@ -456,9 +478,8 @@ test_timer_state(void)
+@@ -434,9 +456,8 @@ test_timer_state(void)
@@ -83 +84 @@
-@@ -468,6 +489,7 @@ test_timer_state(void)
+@@ -446,6 +467,7 @@ test_timer_state(void)
@@ -92 +93 @@
-@@ -478,12 +500,13 @@ test_timer_state(void)
+@@ -456,12 +478,13 @@ test_timer_state(void)
@@ -111 +112 @@
-@@ -1209,6 +1232,7 @@ stat_inc_reset_ev_enq(void)
+@@ -1165,6 +1188,7 @@ stat_inc_reset_ev_enq(void)
@@ -120 +121 @@
-@@ -1218,5 +1242,5 @@ stat_inc_reset_ev_enq(void)
+@@ -1174,5 +1198,5 @@ stat_inc_reset_ev_enq(void)
@@ -127 +128 @@
-@@ -1243,29 +1267,10 @@ stat_inc_reset_ev_enq(void)
+@@ -1199,29 +1223,10 @@ stat_inc_reset_ev_enq(void)
@@ -161 +162 @@
-@@ -1304,4 +1309,5 @@ event_timer_arm(void)
+@@ -1260,4 +1265,5 @@ event_timer_arm(void)
@@ -167 +168 @@
-@@ -1311,5 +1317,5 @@ event_timer_arm(void)
+@@ -1267,5 +1273,5 @@ event_timer_arm(void)
@@ -174 +175 @@
-@@ -1338,8 +1344,5 @@ event_timer_arm(void)
+@@ -1294,8 +1300,5 @@ event_timer_arm(void)
@@ -184 +185 @@
-@@ -1361,4 +1364,5 @@ event_timer_arm_double(void)
+@@ -1317,4 +1320,5 @@ event_timer_arm_double(void)
@@ -190 +191 @@
-@@ -1368,5 +1372,5 @@ event_timer_arm_double(void)
+@@ -1324,5 +1328,5 @@ event_timer_arm_double(void)
@@ -197 +198 @@
-@@ -1388,8 +1392,5 @@ event_timer_arm_double(void)
+@@ -1344,8 +1348,5 @@ event_timer_arm_double(void)
@@ -207 +208 @@
-@@ -1418,4 +1419,5 @@ event_timer_arm_expiry(void)
+@@ -1374,4 +1375,5 @@ event_timer_arm_expiry(void)
@@ -213 +214 @@
-@@ -1427,5 +1429,5 @@ event_timer_arm_expiry(void)
+@@ -1383,5 +1385,5 @@ event_timer_arm_expiry(void)
@@ -220 +221 @@
-@@ -1436,15 +1438,8 @@ event_timer_arm_expiry(void)
+@@ -1392,15 +1394,8 @@ event_timer_arm_expiry(void)
@@ -238 +239 @@
-@@ -1478,4 +1473,5 @@ event_timer_arm_rearm(void)
+@@ -1434,4 +1429,5 @@ event_timer_arm_rearm(void)
@@ -244 +245 @@
-@@ -1487,5 +1483,5 @@ event_timer_arm_rearm(void)
+@@ -1443,5 +1439,5 @@ event_timer_arm_rearm(void)
@@ -251 +252 @@
-@@ -1495,8 +1491,5 @@ event_timer_arm_rearm(void)
+@@ -1451,8 +1447,5 @@ event_timer_arm_rearm(void)
@@ -261 +262 @@
-@@ -1515,8 +1508,5 @@ event_timer_arm_rearm(void)
+@@ -1471,8 +1464,5 @@ event_timer_arm_rearm(void)
@@ -271 +272 @@
-@@ -1540,5 +1530,6 @@ event_timer_arm_max(void)
+@@ -1496,5 +1486,6 @@ event_timer_arm_max(void)
@@ -279 +280 @@
-@@ -1548,5 +1539,5 @@ event_timer_arm_max(void)
+@@ -1504,5 +1495,5 @@ event_timer_arm_max(void)
@@ -286 +287 @@
-@@ -1568,29 +1559,10 @@ event_timer_arm_max(void)
+@@ -1524,29 +1515,10 @@ event_timer_arm_max(void)
@@ -320 +321 @@
-@@ -1712,4 +1684,5 @@ event_timer_cancel(void)
+@@ -1668,4 +1640,5 @@ event_timer_cancel(void)
@@ -326 +327 @@
-@@ -1729,5 +1702,5 @@ event_timer_cancel(void)
+@@ -1685,5 +1658,5 @@ event_timer_cancel(void)
@@ -333 +334 @@
-@@ -1753,8 +1726,6 @@ event_timer_cancel(void)
+@@ -1709,8 +1682,6 @@ event_timer_cancel(void)
@@ -343 +344 @@
-@@ -1779,6 +1750,6 @@ event_timer_cancel_double(void)
+@@ -1735,6 +1706,6 @@ event_timer_cancel_double(void)
@@ -351 +352 @@
-@@ -1791,5 +1762,5 @@ event_timer_cancel_double(void)
+@@ -1747,5 +1718,5 @@ event_timer_cancel_double(void)
@@ -358 +359 @@
-@@ -1813,8 +1784,6 @@ event_timer_cancel_double(void)
+@@ -1769,8 +1740,6 @@ event_timer_cancel_double(void)
@@ -368,9 +368,0 @@
-@@ -1974,7 +1943,5 @@ test_timer_ticks_remaining(void)
- 	}
- 
--	rte_delay_ms(100);
--
--	TEST_ASSERT_EQUAL(rte_event_dequeue_burst(evdev, 0, &ev, 1, 0), 1,
-+	TEST_ASSERT_EQUAL(timeout_event_dequeue(&ev, 1, WAIT_TICKS(1)), 1,
- 			  "Armed timer failed to trigger.");
- 	TEST_ASSERT_EQUAL(ev_tim->state, RTE_EVENT_TIMER_NOT_ARMED,


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

* patch 'doc: fix event timer adapter guide' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (13 preceding siblings ...)
  2023-07-20 15:17 ` patch 'eventdev/timer: fix timeout event wait behavior' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'event/dsw: free rings on close' " Kevin Traynor
                   ` (124 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/87c6203836ffb03cd1e799b89620884b9bf32f6a

Thanks.

Kevin

---
From 87c6203836ffb03cd1e799b89620884b9bf32f6a Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Fri, 7 Apr 2023 13:44:10 +0530
Subject: [PATCH] doc: fix event timer adapter guide

[ upstream commit 4b6fad5cc8a54647a2ea0c0792b25932da9504fc ]

Remove incorrect spec definition from programmers guide, it is
applications responsibility to set ev.event_ptr to a valid value.

Fixes: 30e7fbd62839 ("doc: add event timer adapter guide")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 doc/guides/prog_guide/event_timer_adapter.rst | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/doc/guides/prog_guide/event_timer_adapter.rst b/doc/guides/prog_guide/event_timer_adapter.rst
index 9106092f2d..7733424aac 100644
--- a/doc/guides/prog_guide/event_timer_adapter.rst
+++ b/doc/guides/prog_guide/event_timer_adapter.rst
@@ -230,7 +230,5 @@ RTE_EVENT_TIMER_NOT_ARMED.  Also note that we have saved a pointer to the
 ``conn`` object in the timer's event payload. This will allow us to locate
 the connection object again once we dequeue the timer expiry event from the
-event device later.  As a convenience, the application may specify no value for
-ev.event_ptr, and the adapter will by default set it to point at the event
-timer itself.
+event device later.
 
 Now we can arm the event timer with ``rte_event_timer_arm_burst()``:
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:57.151986705 +0100
+++ 0016-doc-fix-event-timer-adapter-guide.patch	2023-07-20 16:17:54.461749691 +0100
@@ -1 +1 @@
-From 4b6fad5cc8a54647a2ea0c0792b25932da9504fc Mon Sep 17 00:00:00 2001
+From 87c6203836ffb03cd1e799b89620884b9bf32f6a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4b6fad5cc8a54647a2ea0c0792b25932da9504fc ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 2a15ed8f5c..adeddbedfc 100644
+index 9106092f2d..7733424aac 100644
@@ -22 +23 @@
-@@ -248,7 +248,5 @@ RTE_EVENT_TIMER_NOT_ARMED.  Also note that we have saved a pointer to the
+@@ -230,7 +230,5 @@ RTE_EVENT_TIMER_NOT_ARMED.  Also note that we have saved a pointer to the


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

* patch 'event/dsw: free rings on close' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (14 preceding siblings ...)
  2023-07-20 15:17 ` patch 'doc: fix event timer adapter guide' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'eventdev/timer: fix buffer flush' " Kevin Traynor
                   ` (123 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/63daa716221358607f925d392f923fdedb649bac

Thanks.

Kevin

---
From 63daa716221358607f925d392f923fdedb649bac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Thu, 11 May 2023 08:40:29 +0200
Subject: [PATCH] event/dsw: free rings on close
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 61e4cd6d0ad118c6f4d2724a840b651af9e9ec98 ]

The per-port data and control rings were not freed when the event
device was closed.

Fixes: 1c8e3caa3bfb ("event/dsw: add event scheduling and device start/stop")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 drivers/event/dsw/dsw_evdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
index ffabf0d23d..6c5cde2468 100644
--- a/drivers/event/dsw/dsw_evdev.c
+++ b/drivers/event/dsw/dsw_evdev.c
@@ -364,4 +364,8 @@ dsw_close(struct rte_eventdev *dev)
 {
 	struct dsw_evdev *dsw = dsw_pmd_priv(dev);
+	uint16_t port_id;
+
+	for (port_id = 0; port_id < dsw->num_ports; port_id++)
+		dsw_port_release(&dsw->ports[port_id]);
 
 	dsw->num_ports = 0;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:57.271602146 +0100
+++ 0017-event-dsw-free-rings-on-close.patch	2023-07-20 16:17:54.462749695 +0100
@@ -1 +1 @@
-From 61e4cd6d0ad118c6f4d2724a840b651af9e9ec98 Mon Sep 17 00:00:00 2001
+From 63daa716221358607f925d392f923fdedb649bac Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 61e4cd6d0ad118c6f4d2724a840b651af9e9ec98 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* patch 'eventdev/timer: fix buffer flush' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (15 preceding siblings ...)
  2023-07-20 15:17 ` patch 'event/dsw: free rings on close' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'event/cnxk: fix nanoseconds to ticks conversion' " Kevin Traynor
                   ` (122 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Erik Gabriel Carrillo; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/44a0ae78404d1d1130a2b4cab1a8cdf667b1ce0e

Thanks.

Kevin

---
From 44a0ae78404d1d1130a2b4cab1a8cdf667b1ce0e Mon Sep 17 00:00:00 2001
From: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Date: Wed, 12 Apr 2023 14:56:37 -0500
Subject: [PATCH] eventdev/timer: fix buffer flush

[ upstream commit 53b97347cc84e8df53426c7917a4b65296264c02 ]

The SW event timer adapter attempts to flush its event buffer on every
adapter tick. If events remain in the buffer after the attempt, another
attempt to flush won't occur until the next adapter tick, which delays
the enqueue of those events to the event device unnecessarily.

Move the buffer flush call so that it happens with every invocation of
the service function, rather than on every adapter tick, to avoid the
delay.

Fixes: cc7b73ea9e3b ("eventdev: add new software timer adapter")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 lib/eventdev/rte_event_timer_adapter.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index 5fad079be2..5e7d101470 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -798,15 +798,16 @@ swtim_service_func(void *arg)
 		sw->n_expired_timers = 0;
 
-		event_buffer_flush(&sw->buffer,
-				   adapter->data->event_dev_id,
-				   adapter->data->event_port_id,
-				   &nb_evs_flushed,
-				   &nb_evs_invalid);
-
-		sw->stats.ev_enq_count += nb_evs_flushed;
-		sw->stats.ev_inv_count += nb_evs_invalid;
 		sw->stats.adapter_tick_count++;
 	}
 
+	event_buffer_flush(&sw->buffer,
+			   adapter->data->event_dev_id,
+			   adapter->data->event_port_id,
+			   &nb_evs_flushed,
+			   &nb_evs_invalid);
+
+	sw->stats.ev_enq_count += nb_evs_flushed;
+	sw->stats.ev_inv_count += nb_evs_invalid;
+
 	rte_event_maintain(adapter->data->event_dev_id,
 			   adapter->data->event_port_id, 0);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:57.376889952 +0100
+++ 0018-eventdev-timer-fix-buffer-flush.patch	2023-07-20 16:17:54.465749707 +0100
@@ -1 +1 @@
-From 53b97347cc84e8df53426c7917a4b65296264c02 Mon Sep 17 00:00:00 2001
+From 44a0ae78404d1d1130a2b4cab1a8cdf667b1ce0e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 53b97347cc84e8df53426c7917a4b65296264c02 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 23eb1d4a7d..427c4c6287 100644
+index 5fad079be2..5e7d101470 100644
@@ -27 +28 @@
-@@ -856,15 +856,16 @@ swtim_service_func(void *arg)
+@@ -798,15 +798,16 @@ swtim_service_func(void *arg)


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

* patch 'event/cnxk: fix nanoseconds to ticks conversion' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (16 preceding siblings ...)
  2023-07-20 15:17 ` patch 'eventdev/timer: fix buffer flush' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'eal/linux: fix secondary process crash for mp hotplug' " Kevin Traynor
                   ` (121 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/15aac364505471ddb651c525d81d3165bf1bafd5

Thanks.

Kevin

---
From 15aac364505471ddb651c525d81d3165bf1bafd5 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Wed, 24 May 2023 14:22:32 +0530
Subject: [PATCH] event/cnxk: fix nanoseconds to ticks conversion

[ upstream commit 8fecf1febf2c7914f642c50bc03f7860c1787426 ]

The number of timeout ticks is dependent on the global dequeue
timeout configured.

Fixes: 6223ede20361 ("event/cnxk: add event port link and unlink")

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

diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index d543fdd14e..74bf39205a 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -357,7 +357,7 @@ cnxk_sso_timeout_ticks(struct rte_eventdev *event_dev, uint64_t ns,
 		       uint64_t *tmo_ticks)
 {
-	RTE_SET_USED(event_dev);
-	*tmo_ticks = NSEC2TICK(ns, rte_get_timer_hz());
+	struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
 
+	*tmo_ticks = dev->deq_tmo_ns ? ns / dev->deq_tmo_ns : 0;
 	return 0;
 }
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:57.462305889 +0100
+++ 0019-event-cnxk-fix-nanoseconds-to-ticks-conversion.patch	2023-07-20 16:17:54.466749711 +0100
@@ -1 +1 @@
-From 8fecf1febf2c7914f642c50bc03f7860c1787426 Mon Sep 17 00:00:00 2001
+From 15aac364505471ddb651c525d81d3165bf1bafd5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8fecf1febf2c7914f642c50bc03f7860c1787426 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 99f9cdcd0d..3a05a59c75 100644
+index d543fdd14e..74bf39205a 100644
@@ -21 +22 @@
-@@ -324,7 +324,7 @@ cnxk_sso_timeout_ticks(struct rte_eventdev *event_dev, uint64_t ns,
+@@ -357,7 +357,7 @@ cnxk_sso_timeout_ticks(struct rte_eventdev *event_dev, uint64_t ns,


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

* patch 'eal/linux: fix secondary process crash for mp hotplug' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (17 preceding siblings ...)
  2023-07-20 15:17 ` patch 'event/cnxk: fix nanoseconds to ticks conversion' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'eal/linux: fix legacy mem init with many segments' " Kevin Traynor
                   ` (120 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Zhihong Wang; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/3ca06320cd8beed7b91d7b950a774bc891509e92

Thanks.

Kevin

---
From 3ca06320cd8beed7b91d7b950a774bc891509e92 Mon Sep 17 00:00:00 2001
From: Zhihong Wang <wangzhihong.wzh@bytedance.com>
Date: Thu, 8 Jun 2023 15:25:53 +0800
Subject: [PATCH] eal/linux: fix secondary process crash for mp hotplug
 requests

[ upstream commit 66f7ee3f7ab1a7d0295464ab236d4ada08eedee3 ]

Secondary would crash if it tries to handle mp requests before memory
init, since globals such as eth_dev_shared_data_lock are not accessible
to it at this moment.

Fixes: 244d5130719c ("eal: enable hotplug on multi-process")

Signed-off-by: Zhihong Wang <wangzhihong.wzh@bytedance.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/eal/linux/eal.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 862d526658..6f7e8641d3 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -1062,10 +1062,4 @@ rte_eal_init(int argc, char **argv)
 	}
 
-	/* register multi-process action callbacks for hotplug */
-	if (eal_mp_dev_hotplug_init() < 0) {
-		rte_eal_init_alert("failed to register mp callback for hotplug");
-		return -1;
-	}
-
 	if (rte_bus_scan()) {
 		rte_eal_init_alert("Cannot scan the buses for devices");
@@ -1206,4 +1200,10 @@ rte_eal_init(int argc, char **argv)
 	}
 
+	/* register multi-process action callbacks for hotplug after memory init */
+	if (eal_mp_dev_hotplug_init() < 0) {
+		rte_eal_init_alert("failed to register mp callback for hotplug");
+		return -1;
+	}
+
 	if (rte_eal_tailqs_init() < 0) {
 		rte_eal_init_alert("Cannot init tail queues for objects");
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:57.562922481 +0100
+++ 0020-eal-linux-fix-secondary-process-crash-for-mp-hotplug.patch	2023-07-20 16:17:54.469749723 +0100
@@ -1 +1 @@
-From 66f7ee3f7ab1a7d0295464ab236d4ada08eedee3 Mon Sep 17 00:00:00 2001
+From 3ca06320cd8beed7b91d7b950a774bc891509e92 Mon Sep 17 00:00:00 2001
@@ -6,0 +7,2 @@
+[ upstream commit 66f7ee3f7ab1a7d0295464ab236d4ada08eedee3 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 90e05fe4de..99b0a59706 100644
+index 862d526658..6f7e8641d3 100644
@@ -24 +25 @@
-@@ -1059,10 +1059,4 @@ rte_eal_init(int argc, char **argv)
+@@ -1062,10 +1062,4 @@ rte_eal_init(int argc, char **argv)
@@ -35 +36 @@
-@@ -1222,4 +1216,10 @@ rte_eal_init(int argc, char **argv)
+@@ -1206,4 +1200,10 @@ rte_eal_init(int argc, char **argv)


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

* patch 'eal/linux: fix legacy mem init with many segments' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (18 preceding siblings ...)
  2023-07-20 15:17 ` patch 'eal/linux: fix secondary process crash for mp hotplug' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix build warning' " Kevin Traynor
                   ` (119 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Fengnan Chang; +Cc: Lin Li, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/b75ffdb751b64c23df0ba28ff13e512d112c8f84

Thanks.

Kevin

---
From b75ffdb751b64c23df0ba28ff13e512d112c8f84 Mon Sep 17 00:00:00 2001
From: Fengnan Chang <changfengnan@bytedance.com>
Date: Mon, 29 May 2023 19:21:30 +0800
Subject: [PATCH] eal/linux: fix legacy mem init with many segments

[ upstream commit 51a5a72e2a82986b02244fcdd89c6571bc503de3 ]

Under legacy mode, if the number of continuous memsegs greater
than RTE_MAX_MEMSEG_PER_LIST, eal init will failed even though
another memseg list is empty, because only one memseg list used
to check in remap_needed_hugepages.
Fix this by make remap_segment return how many segments mapped,
remap_segment try to map most contiguous segments it can, if it
exceed its capacity, remap_needed_hugepages will continue to
map other left pages.

For example:
hugepage configure:
cat /sys/devices/system/node/node*/hugepages/hugepages-2048kB/nr_hugepages
10241
10239

startup log:
EAL: Detected memory type: socket_id:0 hugepage_sz:2097152
EAL: Detected memory type: socket_id:1 hugepage_sz:2097152
EAL: Creating 4 segment lists: n_segs:8192 socket_id:0 hugepage_sz:2097152
EAL: Creating 4 segment lists: n_segs:8192 socket_id:1 hugepage_sz:2097152
EAL: Requesting 13370 pages of size 2MB from socket 0
EAL: Requesting 7110 pages of size 2MB from socket 1
EAL: Attempting to map 14220M on socket 1
EAL: Allocated 14220M on socket 1
EAL: Attempting to map 26740M on socket 0
EAL: Could not find space for memseg. Please increase 32768 and/or 65536 in
configuration.
EAL: Couldn't remap hugepage files into memseg lists
EAL: FATAL: Cannot init memory
EAL: Cannot init memory

Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")

Signed-off-by: Fengnan Chang <changfengnan@bytedance.com>
Signed-off-by: Lin Li <lilintjpu@bytedance.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 .mailmap                   |  2 +-
 lib/eal/linux/eal_memory.c | 51 +++++++++++++++++++++++++++-----------
 2 files changed, 37 insertions(+), 16 deletions(-)

diff --git a/.mailmap b/.mailmap
index c94dacfdb1..575405b454 100644
--- a/.mailmap
+++ b/.mailmap
@@ -760,5 +760,5 @@ Linfan Hu <zhongdahulinfan@163.com>
 Lingli Chen <linglix.chen@intel.com>
 Lingyu Liu <lingyu.liu@intel.com>
-Lin Li <lilin24@baidu.com>
+Lin Li <lilintjpu@bytedance.com> <lilin24@baidu.com>
 Linsi Yuan <yuanlinsi01@baidu.com>
 Lior Margalit <lmargalit@nvidia.com>
diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
index fda6a159d5..3bd0bc17c5 100644
--- a/lib/eal/linux/eal_memory.c
+++ b/lib/eal/linux/eal_memory.c
@@ -687,4 +687,5 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
 	/* find free space in memseg lists */
 	for (msl_idx = 0; msl_idx < RTE_MAX_MEMSEG_LISTS; msl_idx++) {
+		int free_len;
 		bool empty;
 		msl = &mcfg->memsegs[msl_idx];
@@ -698,16 +699,24 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
 		/* leave space for a hole if array is not empty */
 		empty = arr->count == 0;
-		ms_idx = rte_fbarray_find_next_n_free(arr, 0,
-				seg_len + (empty ? 0 : 1));
-
-		/* memseg list is full? */
+		/* find start of the biggest contiguous block and its size */
+		ms_idx = rte_fbarray_find_biggest_free(arr, 0);
 		if (ms_idx < 0)
 			continue;
-
+		/* hole is 1 segment long, so at least two segments long. */
+		free_len = rte_fbarray_find_contig_free(arr, ms_idx);
+		if (free_len < 2)
+			continue;
 		/* leave some space between memsegs, they are not IOVA
 		 * contiguous, so they shouldn't be VA contiguous either.
 		 */
-		if (!empty)
+		if (!empty) {
 			ms_idx++;
+			free_len--;
+		}
+
+		/* we might not get all of the space we wanted */
+		free_len = RTE_MIN(seg_len, free_len);
+		seg_end = seg_start + free_len;
+		seg_len = seg_end - seg_start;
 		break;
 	}
@@ -793,5 +802,5 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
 	RTE_LOG(DEBUG, EAL, "Allocated %" PRIu64 "M on socket %i\n",
 			(seg_len * page_sz) >> 20, socket_id);
-	return 0;
+	return seg_len;
 }
 
@@ -1028,8 +1037,14 @@ remap_needed_hugepages(struct hugepage_file *hugepages, int n_pages)
 			/* if this isn't the first time, remap segment */
 			if (cur_page != 0) {
-				ret = remap_segment(hugepages, seg_start_page,
-						cur_page);
-				if (ret != 0)
-					return -1;
+				int n_remapped = 0;
+				int n_needed = cur_page - seg_start_page;
+				while (n_remapped < n_needed) {
+					ret = remap_segment(hugepages, seg_start_page,
+							cur_page);
+					if (ret < 0)
+						return -1;
+					n_remapped += ret;
+					seg_start_page += ret;
+				}
 			}
 			/* remember where we started */
@@ -1040,8 +1055,14 @@ remap_needed_hugepages(struct hugepage_file *hugepages, int n_pages)
 	/* we were stopped, but we didn't remap the last segment, do it now */
 	if (cur_page != 0) {
-		ret = remap_segment(hugepages, seg_start_page,
-				cur_page);
-		if (ret != 0)
-			return -1;
+		int n_remapped = 0;
+		int n_needed = cur_page - seg_start_page;
+		while (n_remapped < n_needed) {
+			ret = remap_segment(hugepages, seg_start_page,
+					cur_page);
+			if (ret < 0)
+				return -1;
+			n_remapped += ret;
+			seg_start_page += ret;
+		}
 	}
 	return 0;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:57.687115271 +0100
+++ 0021-eal-linux-fix-legacy-mem-init-with-many-segments.patch	2023-07-20 16:17:54.476749752 +0100
@@ -1 +1 @@
-From 51a5a72e2a82986b02244fcdd89c6571bc503de3 Mon Sep 17 00:00:00 2001
+From b75ffdb751b64c23df0ba28ff13e512d112c8f84 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 51a5a72e2a82986b02244fcdd89c6571bc503de3 ]
+
@@ -38 +39,0 @@
-Cc: stable@dpdk.org
@@ -49 +50 @@
-index 13167dc28b..853a89e9a4 100644
+index c94dacfdb1..575405b454 100644
@@ -52 +53 @@
-@@ -767,5 +767,5 @@ Linfan Hu <zhongdahulinfan@163.com>
+@@ -760,5 +760,5 @@ Linfan Hu <zhongdahulinfan@163.com>
@@ -60 +61 @@
-index 60fc8cc6ca..0876974631 100644
+index fda6a159d5..3bd0bc17c5 100644
@@ -63 +64 @@
-@@ -682,4 +682,5 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
+@@ -687,4 +687,5 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
@@ -69 +70 @@
-@@ -693,16 +694,24 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
+@@ -698,16 +699,24 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
@@ -100 +101 @@
-@@ -788,5 +797,5 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
+@@ -793,5 +802,5 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
@@ -107 +108 @@
-@@ -1023,8 +1032,14 @@ remap_needed_hugepages(struct hugepage_file *hugepages, int n_pages)
+@@ -1028,8 +1037,14 @@ remap_needed_hugepages(struct hugepage_file *hugepages, int n_pages)
@@ -126 +127 @@
-@@ -1035,8 +1050,14 @@ remap_needed_hugepages(struct hugepage_file *hugepages, int n_pages)
+@@ -1040,8 +1055,14 @@ remap_needed_hugepages(struct hugepage_file *hugepages, int n_pages)


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

* patch 'net/hns3: fix build warning' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (19 preceding siblings ...)
  2023-07-20 15:17 ` patch 'eal/linux: fix legacy mem init with many segments' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/sfc: stop misuse of Rx ingress m-port metadata on EF100' " Kevin Traynor
                   ` (118 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/f400487830aed167fb2935ebfc7855139819f05b

Thanks.

Kevin

---
From f400487830aed167fb2935ebfc7855139819f05b Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerinj@marvell.com>
Date: Tue, 4 Apr 2023 12:25:25 +0530
Subject: [PATCH] net/hns3: fix build warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 60fe5c3cfc3c28952448d2163c4eb1d22d86ccac ]

aarch64 gcc 12.2.0 build complain with below warning[1].
Move the new_link initialization upwards to fix the warning.

[1]
drivers/net/hns3/hns3_ethdev.c: In function ‘hns3_dev_link_update’:
drivers/net/hns3/hns3_ethdev.c:2249:1:
  warning: ‘new_link’ may be used uninitialized [-Wmaybe-uninitialized]

Fixes: 64308555d5bf ("net/hns3: fix link status when port is stopped")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index fd82e98693..696530f779 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2269,4 +2269,5 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)
 	int ret;
 
+	memset(&new_link, 0, sizeof(new_link));
 	/* When port is stopped, report link down. */
 	if (eth_dev->data->dev_started == 0) {
@@ -2292,5 +2293,4 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)
 	} while (retry_cnt--);
 
-	memset(&new_link, 0, sizeof(new_link));
 	hns3_setup_linkstatus(eth_dev, &new_link);
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:57.803021006 +0100
+++ 0022-net-hns3-fix-build-warning.patch	2023-07-20 16:17:54.486749793 +0100
@@ -1 +1 @@
-From 60fe5c3cfc3c28952448d2163c4eb1d22d86ccac Mon Sep 17 00:00:00 2001
+From f400487830aed167fb2935ebfc7855139819f05b Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 60fe5c3cfc3c28952448d2163c4eb1d22d86ccac ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 36896f8989..a872cb8dd7 100644
+index fd82e98693..696530f779 100644
@@ -30 +31 @@
-@@ -2258,4 +2258,5 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)
+@@ -2269,4 +2269,5 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)
@@ -36 +37 @@
-@@ -2281,5 +2282,4 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)
+@@ -2292,5 +2293,4 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)


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

* patch 'net/sfc: stop misuse of Rx ingress m-port metadata on EF100' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (20 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix build warning' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/tap: set locally administered bit for fixed MAC address' " Kevin Traynor
                   ` (117 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andy Moreton, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/ed992acac3c02878f8150686df67e1540e13b13b

Thanks.

Kevin

---
From ed992acac3c02878f8150686df67e1540e13b13b Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@arknetworks.am>
Date: Wed, 12 Apr 2023 17:57:57 +0400
Subject: [PATCH] net/sfc: stop misuse of Rx ingress m-port metadata on EF100

[ upstream commit 462c4f083c464e2d10391c78e7f67f178dbefb27 ]

The driver supports representor functionality. In it,
packets coming from VFs to the dedicated back-end Rx
queue get demultiplexed into front-end Rx queues of
representor ethdevs as per the per-packet metadata
indicating logical HW ingress ports. On transmit,
packets are provided with symmetrical metadata
by front-end Tx queues, and the back-end queue
transforms the data into so-called Tx override
descriptors. These let the packets bypass flow
lookup and go directly to the represented VFs.

However, in the Rx part, the driver extracts
the said metadata on every HW Rx queue, that
is, not just on the one used by representors.
Doing so leads to a buggy behaviour. It is
revealed by operating testpmd as follows:

dpdk-testpmd -a 0000:c6:00.0 -a 0000:c6:00.1 -- -i

testpmd> flow create 0 transfer pattern port_representor \
 port_id is 0 / end actions port_representor port_id 1 / end
Flow rule #0 created

testpmd> set fwd io
testpmd> start tx_first

testpmd> flow destroy 0 rule 0
Flow rule #0 destroyed

testpmd> stop

  ---------------------- Forward statistics for port 0  -----------------
  RX-packets: 19196498       RX-dropped: 0             RX-total: 19196498
  TX-packets: 19196535       TX-dropped: 0             TX-total: 19196535
  -----------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  -----------------
  RX-packets: 19196503       RX-dropped: 0             RX-total: 19196503
  TX-packets: 19196530       TX-dropped: 0             TX-total: 19196530
  -----------------------------------------------------------------------

In this scenario, two physical functions of the adapter
do not have any corresponding "back-to-back" forwarder
on peer host. Packets transmitted from port 0 can only
be forwarded to port 1 by means of a special flow rule.

The flow rule indeed works, but destroying it does not
stop forwarding. Port statistics carry on incrementing.

Also, it is apparent that forwarding in the opposite
direction must not have worked in this case as the
flow is meant to target only one of the directions.

Because of the bug, the first 32 mbufs received
as a result of the flow rule operation have the
said metadata present. In io mode, testpmd does
not tamper with mbufs and passes them directly
to transmit path, so this data remains in them
instructing the PMD to override destinations
of the packets via Tx option descriptors.

Expected behaviour is as follows:

  ---------------------- Forward statistics for port 0  -----------------
  RX-packets: 0              RX-dropped: 0             RX-total: 0
  TX-packets: 15787496       TX-dropped: 0             TX-total: 15787496
  -----------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  -----------------
  RX-packets: 15787464       RX-dropped: 0             RX-total: 15787464
  TX-packets: 32             TX-dropped: 0             TX-total: 32
  -----------------------------------------------------------------------

These figures show the rule work only for one direction.
Also, removing the flow shall cause forwarding to cease.

Provided patch fixes the bug accordingly.

Fixes: d0f981a3efd8 ("net/sfc: handle ingress mport in EF100 Rx prefix")

Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/sfc/sfc_dp_rx.h    |  1 +
 drivers/net/sfc/sfc_ef100_rx.c | 18 ++++++++++++++----
 drivers/net/sfc/sfc_rx.c       |  3 +++
 3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/drivers/net/sfc/sfc_dp_rx.h b/drivers/net/sfc/sfc_dp_rx.h
index 246adbd87c..8a504bdcf1 100644
--- a/drivers/net/sfc/sfc_dp_rx.h
+++ b/drivers/net/sfc/sfc_dp_rx.h
@@ -70,4 +70,5 @@ struct sfc_dp_rx_qcreate_info {
 	unsigned int		flags;
 #define SFC_RXQ_FLAG_RSS_HASH	0x1
+#define SFC_RXQ_FLAG_INGRESS_MPORT	0x2
 
 	/** Rx queue size */
diff --git a/drivers/net/sfc/sfc_ef100_rx.c b/drivers/net/sfc/sfc_ef100_rx.c
index 45253ed7dc..969878bb28 100644
--- a/drivers/net/sfc/sfc_ef100_rx.c
+++ b/drivers/net/sfc/sfc_ef100_rx.c
@@ -811,4 +811,7 @@ sfc_ef100_rx_qcreate(uint16_t port_id, uint16_t queue_id,
 		rxq->flags |= SFC_EF100_RXQ_NIC_DMA_MAP;
 
+	if (info->flags & SFC_RXQ_FLAG_INGRESS_MPORT)
+		rxq->flags |= SFC_EF100_RXQ_INGRESS_MPORT;
+
 	sfc_ef100_rx_debug(rxq, "RxQ doorbell is %p", rxq->doorbell);
 
@@ -877,9 +880,16 @@ sfc_ef100_rx_qstart(struct sfc_dp_rxq *dp_rxq, unsigned int evq_read_ptr,
 		rxq->flags &= ~SFC_EF100_RXQ_USER_MARK;
 
+
+	/*
+	 * At the moment, this feature is used only
+	 * by the representor proxy Rx queue and is
+	 * essential for representor support, so if
+	 * it has been requested but is unsupported,
+	 * point this inconsistency out to the user.
+	 */
 	if ((unsup_rx_prefix_fields &
-	     (1U << EFX_RX_PREFIX_FIELD_INGRESS_MPORT)) == 0)
-		rxq->flags |= SFC_EF100_RXQ_INGRESS_MPORT;
-	else
-		rxq->flags &= ~SFC_EF100_RXQ_INGRESS_MPORT;
+	     (1U << EFX_RX_PREFIX_FIELD_INGRESS_MPORT)) &&
+	    (rxq->flags & SFC_EF100_RXQ_INGRESS_MPORT))
+		return ENOTSUP;
 
 	rxq->prefix_size = pinfo->erpl_length;
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index cd58d60a36..d9a57ed80f 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -1222,4 +1222,7 @@ sfc_rx_qinit(struct sfc_adapter *sa, sfc_sw_index_t sw_index,
 		rxq_info->rxq_flags = 0;
 
+	if (rxq_info->type_flags & EFX_RXQ_FLAG_INGRESS_MPORT)
+		rxq_info->rxq_flags |= SFC_RXQ_FLAG_INGRESS_MPORT;
+
 	rxq->buf_size = buf_size;
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:57.937591111 +0100
+++ 0023-net-sfc-stop-misuse-of-Rx-ingress-m-port-metadata-on.patch	2023-07-20 16:17:54.492749817 +0100
@@ -1 +1 @@
-From 462c4f083c464e2d10391c78e7f67f178dbefb27 Mon Sep 17 00:00:00 2001
+From ed992acac3c02878f8150686df67e1540e13b13b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 462c4f083c464e2d10391c78e7f67f178dbefb27 ]
+
@@ -85 +86,0 @@
-Cc: stable@dpdk.org
@@ -107 +108 @@
-index 16cd8524d3..37b754fa33 100644
+index 45253ed7dc..969878bb28 100644
@@ -140 +141 @@
-index 5ea98187c3..edd0f0c038 100644
+index cd58d60a36..d9a57ed80f 100644
@@ -143 +144 @@
-@@ -1226,4 +1226,7 @@ sfc_rx_qinit(struct sfc_adapter *sa, sfc_sw_index_t sw_index,
+@@ -1222,4 +1222,7 @@ sfc_rx_qinit(struct sfc_adapter *sa, sfc_sw_index_t sw_index,


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

* patch 'net/tap: set locally administered bit for fixed MAC address' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (21 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/sfc: stop misuse of Rx ingress m-port metadata on EF100' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/dpaa2: fix checksum good flags' " Kevin Traynor
                   ` (116 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: David Christensen; +Cc: Stephen Hemminger, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/aae992cbfb060f84c39dd3ac59b067ae35c097b3

Thanks.

Kevin

---
From aae992cbfb060f84c39dd3ac59b067ae35c097b3 Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Tue, 25 Apr 2023 16:58:06 -0400
Subject: [PATCH] net/tap: set locally administered bit for fixed MAC address

[ upstream commit c3006be2acab49c6b77ae9c9ef04b061e5dacbd6 ]

When the tap driver is loaded and the user selects the optional
"mac=fixed" setting, the tap driver incorrectly uses a globally
unique EUI-48 identifier (as documented in RFC 7042) of
00:64:74:61:70:<iface_idx>. Since this is a locally generated ID,
the Local bit in the MAC address should be set to 1, resulting in
the new address 02:64:74:61:70:<iface_idx>.

Bugzilla ID: 1198
Fixes: f6921783fee6 ("net/tap: add support for fixed MAC addresses")

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 doc/guides/nics/tap.rst       | 8 ++++----
 drivers/net/tap/rte_eth_tap.c | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst
index 681010d9ed..84ec805170 100644
--- a/doc/guides/nics/tap.rst
+++ b/doc/guides/nics/tap.rst
@@ -35,12 +35,12 @@ Using the option ``mac=fixed`` you can create a fixed known MAC address::
 The MAC address will have a fixed value with the last octet incrementing by one
 for each interface string containing ``mac=fixed``. The MAC address is formatted
-as 00:'d':'t':'a':'p':[00-FF]. Convert the characters to hex and you get the
-actual MAC address: ``00:64:74:61:70:[00-FF]``.
+as 02:'d':'t':'a':'p':[00-FF]. Convert the characters to hex and you get the
+actual MAC address: ``02:64:74:61:70:[00-FF]``.
 
-   --vdev=net_tap0,mac="00:64:74:61:70:11"
+   --vdev=net_tap0,mac="02:64:74:61:70:11"
 
 The MAC address will have a user value passed as string. The MAC address is in
 format with delimiter ``:``. The string is byte converted to hex and you get
-the actual MAC address: ``00:64:74:61:70:11``.
+the actual MAC address: ``02:64:74:61:70:11``.
 
 It is possible to specify a remote netdevice to capture packets from by adding
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index e020a2417b..2dbb25f85d 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2276,6 +2276,6 @@ set_mac_type(const char *key __rte_unused,
 		static int iface_idx;
 
-		/* fixed mac = 00:64:74:61:70:<iface_idx> */
-		memcpy((char *)user_mac->addr_bytes, "\0dtap",
+		/* fixed mac = 02:64:74:61:70:<iface_idx> */
+		memcpy((char *)user_mac->addr_bytes, "\002dtap",
 			RTE_ETHER_ADDR_LEN);
 		user_mac->addr_bytes[RTE_ETHER_ADDR_LEN - 1] =
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:58.043203598 +0100
+++ 0024-net-tap-set-locally-administered-bit-for-fixed-MAC-a.patch	2023-07-20 16:17:54.497749838 +0100
@@ -1 +1 @@
-From c3006be2acab49c6b77ae9c9ef04b061e5dacbd6 Mon Sep 17 00:00:00 2001
+From aae992cbfb060f84c39dd3ac59b067ae35c097b3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c3006be2acab49c6b77ae9c9ef04b061e5dacbd6 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 2f7417bddd..07df0d35a2 100644
+index 681010d9ed..84ec805170 100644
@@ -47 +48 @@
-index 089ac202fa..bf98f75559 100644
+index e020a2417b..2dbb25f85d 100644
@@ -50 +51 @@
-@@ -2304,6 +2304,6 @@ set_mac_type(const char *key __rte_unused,
+@@ -2276,6 +2276,6 @@ set_mac_type(const char *key __rte_unused,


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

* patch 'net/dpaa2: fix checksum good flags' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (22 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/tap: set locally administered bit for fixed MAC address' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'app/testpmd: fix GTP L2 length in checksum engine' " Kevin Traynor
                   ` (115 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Tianli Lai; +Cc: Sachin Saxena, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/f297d8681db8eb7a373d67e363d2b3ceab39ea8c

Thanks.

Kevin

---
From f297d8681db8eb7a373d67e363d2b3ceab39ea8c Mon Sep 17 00:00:00 2001
From: Tianli Lai <laitianli@tom.com>
Date: Mon, 8 May 2023 18:57:25 +0800
Subject: [PATCH] net/dpaa2: fix checksum good flags

[ upstream commit 7d83632b28db9f0b9bd36d974798aa14627f822b ]

Set check sum good flags when dpaa2 hardware set check result.

Fixes: d2ef05d5c13e ("net/dpaa2: optimize Rx/Tx path")
Fixes: 94d31549c380 ("net/dpaa2: support Rx checksum offload in slow parsing")

Signed-off-by: Tianli Lai <laitianli@tom.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
---
 drivers/net/dpaa2/dpaa2_rxtx.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 2afa2d2a78..46c47fe36a 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -193,6 +193,10 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
 	if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L3CE))
 		mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
-	else if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
+	else
+		mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD;
+	if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
 		mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
+	else
+		mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
 
 	if (BIT_ISSET_AT_POS(annotation->word4, L3_IP_1_FIRST_FRAGMENT |
@@ -236,6 +240,10 @@ dpaa2_dev_rx_parse(struct rte_mbuf *mbuf, void *hw_annot_addr)
 	if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L3CE))
 		mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
-	else if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
+	else
+		mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD;
+	if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
 		mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
+	else
+		mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
 
 	if (dpaa2_enable_ts[mbuf->port]) {
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:58.136262310 +0100
+++ 0025-net-dpaa2-fix-checksum-good-flags.patch	2023-07-20 16:17:54.500749850 +0100
@@ -1 +1 @@
-From 7d83632b28db9f0b9bd36d974798aa14627f822b Mon Sep 17 00:00:00 2001
+From f297d8681db8eb7a373d67e363d2b3ceab39ea8c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7d83632b28db9f0b9bd36d974798aa14627f822b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f60e78e1fd..85910bbd8f 100644
+index 2afa2d2a78..46c47fe36a 100644
@@ -22 +23 @@
-@@ -199,6 +199,10 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
+@@ -193,6 +193,10 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
@@ -34 +35 @@
-@@ -242,6 +246,10 @@ dpaa2_dev_rx_parse(struct rte_mbuf *mbuf, void *hw_annot_addr)
+@@ -236,6 +240,10 @@ dpaa2_dev_rx_parse(struct rte_mbuf *mbuf, void *hw_annot_addr)


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

* patch 'app/testpmd: fix GTP L2 length in checksum engine' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (23 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/dpaa2: fix checksum good flags' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/vmxnet3: fix drop of empty segments in Tx' " Kevin Traynor
                   ` (114 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Aman Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/b23b2580e3afba41f43b4fb5aed04cebb44869f2

Thanks.

Kevin

---
From b23b2580e3afba41f43b4fb5aed04cebb44869f2 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@nvidia.com>
Date: Sun, 2 Apr 2023 15:26:19 +0300
Subject: [PATCH] app/testpmd: fix GTP L2 length in checksum engine

[ upstream commit dd827fa42a30a9b0aa87a1d5614af83ea32b19e0 ]

GTP header can be followed by an optional 32 bits extension.

But, l2_len value statically set to RTE_ETHER_GTP_HLEN
which is defined to be
        (sizeof(struct rte_udp_hdr) + sizeof(struct rte_gtp_hdr))

This fixes the l2_len to take into consideration the extension size.

Fixes: d8e5e69f3a9b ("app/testpmd: add GTP parsing and Tx checksum offload")

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
 app/test-pmd/csumonly.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 80d4d415bd..16c05b3527 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -251,5 +251,5 @@ parse_gtp(struct rte_udp_hdr *udp_hdr,
 	}
 
-	info->l2_len += RTE_ETHER_GTP_HLEN;
+	info->l2_len += gtp_len + sizeof(udp_hdr);
 }
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:58.211196267 +0100
+++ 0026-app-testpmd-fix-GTP-L2-length-in-checksum-engine.patch	2023-07-20 16:17:54.502749858 +0100
@@ -1 +1 @@
-From dd827fa42a30a9b0aa87a1d5614af83ea32b19e0 Mon Sep 17 00:00:00 2001
+From b23b2580e3afba41f43b4fb5aed04cebb44869f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dd827fa42a30a9b0aa87a1d5614af83ea32b19e0 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index fc85c22a77..b50b89367a 100644
+index 80d4d415bd..16c05b3527 100644


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

* patch 'net/vmxnet3: fix drop of empty segments in Tx' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (24 preceding siblings ...)
  2023-07-20 15:17 ` patch 'app/testpmd: fix GTP L2 length in checksum engine' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/txgbe: fix use-after-free on remove' " Kevin Traynor
                   ` (113 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Ronak Doshi; +Cc: Jochen Behrens, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/6de921b8d6ceabaa907da2c84c5dfbb23f58bbad

Thanks.

Kevin

---
From 6de921b8d6ceabaa907da2c84c5dfbb23f58bbad Mon Sep 17 00:00:00 2001
From: Ronak Doshi <doshir@vmware.com>
Date: Mon, 8 May 2023 19:21:06 -0700
Subject: [PATCH] net/vmxnet3: fix drop of empty segments in Tx

[ upstream commit b44f3e1381f3910be50d03c784f5c073c25245dd ]

When empty segments are dropped, some descriptor variable values are
updated in the segment processing loop before it is exited. This can
lead to a wedged queue where all subsequent packets are dropped for
this queue.

Also move the check for empty packet to catch the case of a zero
length packet with multiple segments.

Fixes: d863f19efa4f ("net/vmxnet3: skip empty segments in transmission")

Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Jochen Behrens <jbehrens@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 33 +++++++++++++++++-------------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index d745064bc4..76bfdbaaa3 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -413,6 +413,6 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	nb_tx = 0;
 	while (nb_tx < nb_pkts) {
-		Vmxnet3_GenericDesc *gdesc;
-		vmxnet3_buf_info_t *tbi;
+		Vmxnet3_GenericDesc *gdesc = NULL;
+		vmxnet3_buf_info_t *tbi = NULL;
 		uint32_t first2fill, avail, dw2;
 		struct rte_mbuf *txm = tx_pkts[nb_tx];
@@ -458,16 +458,16 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		}
 
+		/* Skip empty packets */
+		if (unlikely(rte_pktmbuf_pkt_len(txm) == 0)) {
+			txq->stats.drop_total++;
+			rte_pktmbuf_free(txm);
+			nb_tx++;
+			continue;
+		}
+
 		if (txm->nb_segs == 1 &&
 		    rte_pktmbuf_pkt_len(txm) <= txq->txdata_desc_size) {
 			struct Vmxnet3_TxDataDesc *tdd;
 
-			/* Skip empty packets */
-			if (unlikely(rte_pktmbuf_pkt_len(txm) == 0)) {
-				txq->stats.drop_total++;
-				rte_pktmbuf_free(txm);
-				nb_tx++;
-				continue;
-			}
-
 			tdd = (struct Vmxnet3_TxDataDesc *)
 				((uint8 *)txq->data_ring.base +
@@ -482,4 +482,8 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		first2fill = txq->cmd_ring.next2fill;
 		do {
+			/* Skip empty segments */
+			if (unlikely(m_seg->data_len == 0))
+				continue;
+
 			/* Remember the transmit buffer for cleanup */
 			tbi = txq->cmd_ring.buf_info + txq->cmd_ring.next2fill;
@@ -491,8 +495,4 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			gdesc = txq->cmd_ring.base + txq->cmd_ring.next2fill;
 
-			/* Skip empty segments */
-			if (unlikely(m_seg->data_len == 0))
-				continue;
-
 			if (copy_size) {
 				uint64 offset =
@@ -515,4 +515,9 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			dw2 = txq->cmd_ring.gen << VMXNET3_TXD_GEN_SHIFT;
 		} while ((m_seg = m_seg->next) != NULL);
+		/* We must have executed the complete preceding loop at least
+		 * once without skipping an empty segment, as we can't have
+		 * a packet with only empty segments.
+		 * Thus, tbi and gdesc have been initialized.
+		 */
 
 		/* set the last buf_info for the pkt */
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:58.316516384 +0100
+++ 0027-net-vmxnet3-fix-drop-of-empty-segments-in-Tx.patch	2023-07-20 16:17:54.504749867 +0100
@@ -1 +1 @@
-From b44f3e1381f3910be50d03c784f5c073c25245dd Mon Sep 17 00:00:00 2001
+From 6de921b8d6ceabaa907da2c84c5dfbb23f58bbad Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b44f3e1381f3910be50d03c784f5c073c25245dd ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 39ad0726cb..148f65383e 100644
+index d745064bc4..76bfdbaaa3 100644
@@ -27 +28 @@
-@@ -419,6 +419,6 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -413,6 +413,6 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -36 +37 @@
-@@ -466,16 +466,16 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -458,16 +458,16 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -61 +62 @@
-@@ -490,4 +490,8 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -482,4 +482,8 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -70 +71 @@
-@@ -499,8 +503,4 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -491,8 +495,4 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -79 +80 @@
-@@ -523,4 +523,9 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -515,4 +515,9 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,


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

* patch 'net/txgbe: fix use-after-free on remove' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (25 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/vmxnet3: fix drop of empty segments in Tx' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'ethdev: fix MAC address occupies two entries' " Kevin Traynor
                   ` (112 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Pengfei Sun, Jiawen Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/80e17cb702e2cf0cd808b31606c089762b4f03c0

Thanks.

Kevin

---
From 80e17cb702e2cf0cd808b31606c089762b4f03c0 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 18 May 2023 15:11:24 +0800
Subject: [PATCH] net/txgbe: fix use-after-free on remove

[ upstream commit 0105788ebac6c796f30361912377550207084a17 ]

When cleaning up NIC's interrupts, it is possible to add some alarms
at the same time. However, if these alarms are not canceled, it may
cause use-after-free problems. Therefore, after cleaning up NIC's
interrupts, these alarms should also be canceled.

Fixes: d3bb4a04eac1 ("net/txgbe: add SFP hotplug identification")
Fixes: e0d876ef6bbc ("net/txgbe: support device stop and close")

Reported-by: Pengfei Sun <sunpengfei16@huawei.com>
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index af2bf00ebd..acc29071f0 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -2010,6 +2010,7 @@ txgbe_dev_close(struct rte_eth_dev *dev)
 	} while (retries++ < (10 + TXGBE_LINK_UP_TIME));
 
-	/* cancel the delay handler before remove dev */
+	/* cancel all alarm handler before remove dev */
 	rte_eal_alarm_cancel(txgbe_dev_interrupt_delayed_handler, dev);
+	rte_eal_alarm_cancel(txgbe_dev_setup_link_alarm_handler, dev);
 
 	/* uninitialize PF if max_vfs not zero */
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:58.402975735 +0100
+++ 0028-net-txgbe-fix-use-after-free-on-remove.patch	2023-07-20 16:17:54.512749899 +0100
@@ -1 +1 @@
-From 0105788ebac6c796f30361912377550207084a17 Mon Sep 17 00:00:00 2001
+From 80e17cb702e2cf0cd808b31606c089762b4f03c0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0105788ebac6c796f30361912377550207084a17 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -19,3 +20,2 @@
- .mailmap                         | 1 +
- drivers/net/txgbe/txgbe_ethdev.c | 4 +++-
- 2 files changed, 4 insertions(+), 1 deletion(-)
+ drivers/net/txgbe/txgbe_ethdev.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
@@ -23,10 +22,0 @@
-diff --git a/.mailmap b/.mailmap
-index c5dd75633d..034fb27843 100644
---- a/.mailmap
-+++ b/.mailmap
-@@ -1050,4 +1050,5 @@ Pawel Wodkowski <pawelwod@gmail.com> <pawelx.wodkowski@intel.com> <pawelx.wdkows
- Pei Chao <peichao85@gmail.com>
- Pei Zhang <pezhang@redhat.com>
-+Pengfei Sun <sunpengfei16@huawei.com>
- Peng He <hepeng.0320@bytedance.com> <xnhp0320@icloud.com>
- Peng Huang <peng.huang@intel.com>
@@ -34 +24 @@
-index a502618bc5..a3d7461951 100644
+index af2bf00ebd..acc29071f0 100644
@@ -37 +27 @@
-@@ -2033,6 +2033,8 @@ txgbe_dev_close(struct rte_eth_dev *dev)
+@@ -2010,6 +2010,7 @@ txgbe_dev_close(struct rte_eth_dev *dev)
@@ -43 +32,0 @@
-+	rte_eal_alarm_cancel(txgbe_dev_detect_sfp, dev);


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

* patch 'ethdev: fix MAC address occupies two entries' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (26 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/txgbe: fix use-after-free on remove' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/sfc: invalidate dangling MAE flow action FW resource IDs' " Kevin Traynor
                   ` (111 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Huisong Li; +Cc: Chengwen Feng, Thomas Monjalon, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/b3741dfb480bba7addb4dc82a863d4904fdc3bb2

Thanks.

Kevin

---
From b3741dfb480bba7addb4dc82a863d4904fdc3bb2 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 19 May 2023 17:31:55 +0800
Subject: [PATCH] ethdev: fix MAC address occupies two entries

[ upstream commit 8f02f472a29432650d999969359d6a49ea6aadca ]

The dev->data->mac_addrs[0] will be changed to a new MAC address when
applications modify the default MAC address by .mac_addr_set(). However,
if the new default one has been added as a non-default MAC address by
.mac_addr_add(), the .mac_addr_set() didn't check this address.
As a result, this MAC address occupies two entries in the list. Like:
add(MAC1)
add(MAC2)
add(MAC3)
add(MAC4)
set_default(MAC3)
default=MAC3, the rest of the list=MAC1, MAC2, MAC3, MAC4
Note: MAC3 occupies two entries.

But .mac_addr_set() cannot remove it implicitly in case of MAC address
shrinking in the list.
So this patch adds a check on whether the new default address was
already in the list and if so requires the user to remove it first.

In addition, this patch documents the position of the default MAC
address and address unique in the list.

Fixes: 854d8ad4ef68 ("ethdev: add default mac address modifier")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/rte_ethdev.c | 10 ++++++++++
 lib/ethdev/rte_ethdev.h |  4 ++++
 2 files changed, 14 insertions(+)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 3796cc02f6..7e29982a4e 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -4486,4 +4486,5 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr)
 {
 	struct rte_eth_dev *dev;
+	int index;
 	int ret;
 
@@ -4503,4 +4504,13 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr)
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->mac_addr_set, -ENOTSUP);
 
+	/* Keep address unique in dev->data->mac_addrs[]. */
+	index = eth_dev_get_mac_addr_index(port_id, addr);
+	if (index > 0) {
+		RTE_ETHDEV_LOG(ERR,
+			"New default address for port %u was already in the address list. Please remove it first.\n",
+			port_id);
+		return -EEXIST;
+	}
+
 	ret = (*dev->dev_ops->mac_addr_set)(dev, addr);
 	if (ret < 0)
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 0be04c5809..d4a576965b 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -4164,4 +4164,7 @@ int rte_eth_dev_mac_addr_remove(uint16_t port_id,
 /**
  * Set the default MAC address.
+ * It replaces the address at index 0 of the MAC address list.
+ * If the address was already in the MAC address list,
+ * please remove it first.
  *
  * @param port_id
@@ -4174,4 +4177,5 @@ int rte_eth_dev_mac_addr_remove(uint16_t port_id,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if MAC address is invalid.
+ *   - (-EEXIST) if MAC address was already in the address list.
  */
 int rte_eth_dev_default_mac_addr_set(uint16_t port_id,
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:58.541473020 +0100
+++ 0029-ethdev-fix-MAC-address-occupies-two-entries.patch	2023-07-20 16:17:54.532749981 +0100
@@ -1 +1 @@
-From 8f02f472a29432650d999969359d6a49ea6aadca Mon Sep 17 00:00:00 2001
+From b3741dfb480bba7addb4dc82a863d4904fdc3bb2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f02f472a29432650d999969359d6a49ea6aadca ]
+
@@ -28 +29,0 @@
-Cc: stable@dpdk.org
@@ -35,36 +36,4 @@
- doc/guides/rel_notes/release_23_07.rst |  6 ++++++
- lib/ethdev/ethdev_driver.h             |  6 +++++-
- lib/ethdev/rte_ethdev.c                | 10 ++++++++++
- lib/ethdev/rte_ethdev.h                |  4 ++++
- 4 files changed, 25 insertions(+), 1 deletion(-)
-
-diff --git a/doc/guides/rel_notes/release_23_07.rst b/doc/guides/rel_notes/release_23_07.rst
-index 11cf5c6a0c..58d4e59487 100644
---- a/doc/guides/rel_notes/release_23_07.rst
-+++ b/doc/guides/rel_notes/release_23_07.rst
-@@ -109,4 +109,10 @@ API Changes
-    =======================================================
- 
-+* ethdev: Ensured all entries in MAC address list are uniques.
-+  When setting a default MAC address with the function
-+  ``rte_eth_dev_default_mac_addr_set``,
-+  the default one needs to be removed by the user
-+  if it was already in the address list.
-+
- 
- ABI Changes
-diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
-index 2c9d615fb5..367c0c4878 100644
---- a/lib/ethdev/ethdev_driver.h
-+++ b/lib/ethdev/ethdev_driver.h
-@@ -118,5 +118,9 @@ struct rte_eth_dev_data {
- 	uint64_t rx_mbuf_alloc_failed; /**< Rx ring mbuf allocation failures */
- 
--	/** Device Ethernet link address. @see rte_eth_dev_release_port() */
-+	/**
-+	 * Device Ethernet link addresses.
-+	 * All entries are unique.
-+	 * The first entry (index zero) is the default address.
-+	 */
- 	struct rte_ether_addr *mac_addrs;
- 	/** Bitmap associating MAC addresses to pools */
+ lib/ethdev/rte_ethdev.c | 10 ++++++++++
+ lib/ethdev/rte_ethdev.h |  4 ++++
+ 2 files changed, 14 insertions(+)
+
@@ -72 +41 @@
-index 4d03255683..d46e74504e 100644
+index 3796cc02f6..7e29982a4e 100644
@@ -75 +44 @@
-@@ -4899,4 +4899,5 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr)
+@@ -4486,4 +4486,5 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr)
@@ -81,2 +50,2 @@
-@@ -4917,4 +4918,13 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr)
- 		return -ENOTSUP;
+@@ -4503,4 +4504,13 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr)
+ 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->mac_addr_set, -ENOTSUP);
@@ -96 +65 @@
-index 99fe9e238b..fe8f7466c8 100644
+index 0be04c5809..d4a576965b 100644
@@ -99 +68 @@
-@@ -4382,4 +4382,7 @@ int rte_eth_dev_mac_addr_remove(uint16_t port_id,
+@@ -4164,4 +4164,7 @@ int rte_eth_dev_mac_addr_remove(uint16_t port_id,
@@ -107 +76 @@
-@@ -4392,4 +4395,5 @@ int rte_eth_dev_mac_addr_remove(uint16_t port_id,
+@@ -4174,4 +4177,5 @@ int rte_eth_dev_mac_addr_remove(uint16_t port_id,


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

* patch 'net/sfc: invalidate dangling MAE flow action FW resource IDs' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (27 preceding siblings ...)
  2023-07-20 15:17 ` patch 'ethdev: fix MAC address occupies two entries' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix never set MAC flow control' " Kevin Traynor
                   ` (110 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Ivan Malov
  Cc: Andy Moreton, Denis Pryazhennikov, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/fbfa671cbf1613e01b5fe25dd721821a9d768f7c

Thanks.

Kevin

---
From fbfa671cbf1613e01b5fe25dd721821a9d768f7c Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@arknetworks.am>
Date: Sun, 21 May 2023 12:36:31 +0400
Subject: [PATCH] net/sfc: invalidate dangling MAE flow action FW resource IDs

[ upstream commit cf1e1a8e869b49ac9e2e097bbd272e94cc4f2c74 ]

When reinserting a flow (on port restart, for instance)
FW resource IDs found in the action set specification
need to be invalidated so that the new (reallocated)
FW resource IDs can be accepted by libefx again.

Fixes: 1bbd1ec2348a ("net/sfc: support action VXLAN encap in MAE backend")

Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Tested-by: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 .mailmap                               |  1 +
 drivers/common/sfc_efx/base/efx.h      | 14 ++++++++++++++
 drivers/common/sfc_efx/base/efx_impl.h |  4 ++++
 drivers/common/sfc_efx/base/efx_mae.c  | 15 +++++++++++----
 drivers/common/sfc_efx/version.map     |  1 +
 drivers/net/sfc/sfc_mae.c              |  2 ++
 6 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/.mailmap b/.mailmap
index 575405b454..5e85db906b 100644
--- a/.mailmap
+++ b/.mailmap
@@ -298,4 +298,5 @@ Deepak Kumar Jain <deepak.k.jain@intel.com>
 Deirdre O'Connor <deirdre.o.connor@intel.com>
 Dekel Peled <dekelp@nvidia.com> <dekelp@mellanox.com>
+Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
 Dennis Marinus <dmarinus@amazon.com>
 Derek Chickles <derek.chickles@caviumnetworks.com>
diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index d70060c18b..398eb8dbd2 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -4702,4 +4702,18 @@ efx_mae_action_set_fill_in_counter_id(
 	__in				const efx_counter_t *counter_idp);
 
+/*
+ * Clears dangling FW object IDs (counter ID, for instance) in
+ * the action set specification. Useful for adapter restarts,
+ * when all MAE objects need to be reallocated by the driver.
+ *
+ * This method only clears the IDs in the specification.
+ * The driver is still responsible for keeping the IDs
+ * separately and freeing them when stopping the port.
+ */
+LIBEFX_API
+extern					void
+efx_mae_action_set_clear_fw_rsrc_ids(
+	__in				efx_mae_actions_t *spec);
+
 /* Action set ID */
 typedef struct efx_mae_aset_id_s {
diff --git a/drivers/common/sfc_efx/base/efx_impl.h b/drivers/common/sfc_efx/base/efx_impl.h
index ba00eeeb47..99a6a732f4 100644
--- a/drivers/common/sfc_efx/base/efx_impl.h
+++ b/drivers/common/sfc_efx/base/efx_impl.h
@@ -1800,4 +1800,8 @@ typedef struct efx_mae_action_vlan_push_s {
 } efx_mae_action_vlan_push_t;
 
+/*
+ * Helper efx_mae_action_set_clear_fw_rsrc_ids() is responsible
+ * to initialise every field in this structure to INVALID value.
+ */
 typedef struct efx_mae_actions_rsrc_s {
 	efx_mae_mac_id_t		emar_dst_mac_id;
diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index 7732d99992..4c33471f28 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -1395,8 +1395,5 @@ efx_mae_action_set_spec_init(
 	}
 
-	spec->ema_rsrc.emar_dst_mac_id.id = EFX_MAE_RSRC_ID_INVALID;
-	spec->ema_rsrc.emar_src_mac_id.id = EFX_MAE_RSRC_ID_INVALID;
-	spec->ema_rsrc.emar_eh_id.id = EFX_MAE_RSRC_ID_INVALID;
-	spec->ema_rsrc.emar_counter_id.id = EFX_MAE_RSRC_ID_INVALID;
+	efx_mae_action_set_clear_fw_rsrc_ids(spec);
 
 	/*
@@ -3028,4 +3025,14 @@ fail1:
 }
 
+					void
+efx_mae_action_set_clear_fw_rsrc_ids(
+	__in				efx_mae_actions_t *spec)
+{
+	spec->ema_rsrc.emar_dst_mac_id.id = EFX_MAE_RSRC_ID_INVALID;
+	spec->ema_rsrc.emar_src_mac_id.id = EFX_MAE_RSRC_ID_INVALID;
+	spec->ema_rsrc.emar_eh_id.id = EFX_MAE_RSRC_ID_INVALID;
+	spec->ema_rsrc.emar_counter_id.id = EFX_MAE_RSRC_ID_INVALID;
+}
+
 	__checkReturn			efx_rc_t
 efx_mae_counters_alloc(
diff --git a/drivers/common/sfc_efx/version.map b/drivers/common/sfc_efx/version.map
index 9ce76ea6e8..9387bc6ce8 100644
--- a/drivers/common/sfc_efx/version.map
+++ b/drivers/common/sfc_efx/version.map
@@ -90,4 +90,5 @@ INTERNAL {
 	efx_mae_action_rule_remove;
 	efx_mae_action_set_alloc;
+	efx_mae_action_set_clear_fw_rsrc_ids;
 	efx_mae_action_set_fill_in_counter_id;
 	efx_mae_action_set_fill_in_dst_mac_id;
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index 733105bc6e..76b7c59ac0 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -1181,4 +1181,6 @@ sfc_mae_action_set_disable(struct sfc_adapter *sa,
 
 	if (fw_rsrc->refcnt == 1) {
+		efx_mae_action_set_clear_fw_rsrc_ids(action_set->spec);
+
 		rc = efx_mae_action_set_free(sa->nic, &fw_rsrc->aset_id);
 		if (rc == 0) {
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:58.676024334 +0100
+++ 0030-net-sfc-invalidate-dangling-MAE-flow-action-FW-resou.patch	2023-07-20 16:17:54.555750075 +0100
@@ -1 +1 @@
-From cf1e1a8e869b49ac9e2e097bbd272e94cc4f2c74 Mon Sep 17 00:00:00 2001
+From fbfa671cbf1613e01b5fe25dd721821a9d768f7c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cf1e1a8e869b49ac9e2e097bbd272e94cc4f2c74 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 034fb27843..863dbecdb0 100644
+index 575405b454..5e85db906b 100644
@@ -31 +32 @@
-@@ -302,4 +302,5 @@ Deepak Kumar Jain <deepak.k.jain@intel.com>
+@@ -298,4 +298,5 @@ Deepak Kumar Jain <deepak.k.jain@intel.com>
@@ -38 +39 @@
-index f4fa88f169..49e29dcc1c 100644
+index d70060c18b..398eb8dbd2 100644
@@ -41 +42 @@
-@@ -4749,4 +4749,18 @@ efx_mae_action_set_fill_in_counter_id(
+@@ -4702,4 +4702,18 @@ efx_mae_action_set_fill_in_counter_id(
@@ -61 +62 @@
-index 9a5d465fa0..45e99d01c5 100644
+index ba00eeeb47..99a6a732f4 100644
@@ -64 +65 @@
-@@ -1801,4 +1801,8 @@ typedef struct efx_mae_action_vlan_push_s {
+@@ -1800,4 +1800,8 @@ typedef struct efx_mae_action_vlan_push_s {
@@ -103 +104 @@
-index aabc354118..d9b04a611d 100644
+index 9ce76ea6e8..9387bc6ce8 100644
@@ -113 +114 @@
-index e5e9257998..60b9fdc290 100644
+index 733105bc6e..76b7c59ac0 100644


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

* patch 'net/hns3: fix never set MAC flow control' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (28 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/sfc: invalidate dangling MAE flow action FW resource IDs' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix variable type mismatch' " Kevin Traynor
                   ` (109 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/40779432859e80e96f6be30e84df6866abe95c1a

Thanks.

Kevin

---
From 40779432859e80e96f6be30e84df6866abe95c1a Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 22 May 2023 21:17:36 +0800
Subject: [PATCH] net/hns3: fix never set MAC flow control

[ upstream commit 2350eb39f337f9e8d798f8dd1d658834e3981e9e ]

When some hardware and firmware support speed auto-negotiation
but do not support flow control auto-negotiation, driver can
never successfully set MAC flow control by flow_ctrl_set() API.
So only tell user driver doesn't support flow control autoneg
when user enable it.

Fixes: 1f411e31a826 ("net/hns3: support flow control autoneg for copper port")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 696530f779..6382384301 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5330,14 +5330,5 @@ hns3_check_fc_autoneg_valid(struct hns3_hw *hw, uint8_t autoneg)
 	if (!pf->support_fc_autoneg) {
 		if (autoneg != 0) {
-			hns3_err(hw, "unsupported fc auto-negotiation setting.");
-			return -EOPNOTSUPP;
-		}
-
-		/*
-		 * Flow control auto-negotiation of the NIC is not supported,
-		 * but other auto-negotiation features may be supported.
-		 */
-		if (autoneg != hw->mac.link_autoneg) {
-			hns3_err(hw, "please use 'link_speeds' in struct rte_eth_conf to disable autoneg!");
+			hns3_err(hw, "unsupported fc auto-negotiation.");
 			return -EOPNOTSUPP;
 		}
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:58.788548805 +0100
+++ 0031-net-hns3-fix-never-set-MAC-flow-control.patch	2023-07-20 16:17:54.567750124 +0100
@@ -1 +1 @@
-From 2350eb39f337f9e8d798f8dd1d658834e3981e9e Mon Sep 17 00:00:00 2001
+From 40779432859e80e96f6be30e84df6866abe95c1a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2350eb39f337f9e8d798f8dd1d658834e3981e9e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index d97280e647..8f819d5f23 100644
+index 696530f779..6382384301 100644
@@ -25 +26 @@
-@@ -5305,14 +5305,5 @@ hns3_check_fc_autoneg_valid(struct hns3_hw *hw, uint8_t autoneg)
+@@ -5330,14 +5330,5 @@ hns3_check_fc_autoneg_valid(struct hns3_hw *hw, uint8_t autoneg)


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

* patch 'net/hns3: fix variable type mismatch' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (29 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix never set MAC flow control' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix Rx multiple firmware reset interrupts' " Kevin Traynor
                   ` (108 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/5c105051b9af46113f5798fcc5f8881b0c28554d

Thanks.

Kevin

---
From 5c105051b9af46113f5798fcc5f8881b0c28554d Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Mon, 22 May 2023 21:17:38 +0800
Subject: [PATCH] net/hns3: fix variable type mismatch

[ upstream commit 1bbac8785cdf51bc6c5005c6754eab4d517cc4b0 ]

Loop conditions are compared with different variable types,
which may cause overflow risks.

Fixes: 67d010346933 ("net/hns3: adjust data type of some variables")
Fixes: 6ee07e3cb589 ("net/hns3: fix insecure way to query MAC statistics")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_regs.c  | 5 +++--
 drivers/net/hns3/hns3_stats.c | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 86a4cf74d5..95b93af733 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -295,6 +295,7 @@ hns3_direct_access_regs(struct hns3_hw *hw, uint32_t *data)
 	uint32_t *origin_data_ptr = data;
 	uint32_t reg_offset;
-	int reg_num;
-	int i, j;
+	size_t reg_num;
+	uint16_t j;
+	size_t i;
 
 	/* fetching per-PF registers values from PF PCIe register space */
diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 767e3728f1..169bad1412 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -318,5 +318,5 @@ hns3_update_mac_stats(struct hns3_hw *hw)
 	uint64_t *desc_data;
 	uint32_t desc_num;
-	uint16_t i;
+	uint32_t i;
 	int ret;
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:58.921077190 +0100
+++ 0032-net-hns3-fix-variable-type-mismatch.patch	2023-07-20 16:17:54.570750136 +0100
@@ -1 +1 @@
-From 1bbac8785cdf51bc6c5005c6754eab4d517cc4b0 Mon Sep 17 00:00:00 2001
+From 5c105051b9af46113f5798fcc5f8881b0c28554d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1bbac8785cdf51bc6c5005c6754eab4d517cc4b0 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +17 @@
- .mailmap                      | 1 +
- drivers/net/hns3/hns3_regs.c  | 3 ++-
+ drivers/net/hns3/hns3_regs.c  | 5 +++--
@@ -19 +19 @@
- 3 files changed, 4 insertions(+), 2 deletions(-)
+ 2 files changed, 4 insertions(+), 3 deletions(-)
@@ -21,10 +20,0 @@
-diff --git a/.mailmap b/.mailmap
-index 863dbecdb0..f00c1e5457 100644
---- a/.mailmap
-+++ b/.mailmap
-@@ -302,4 +302,5 @@ Deepak Kumar Jain <deepak.k.jain@intel.com>
- Deirdre O'Connor <deirdre.o.connor@intel.com>
- Dekel Peled <dekelp@nvidia.com> <dekelp@mellanox.com>
-+Dengdui Huang <huangdengdui@huawei.com>
- Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
- Dennis Marinus <dmarinus@amazon.com>
@@ -32 +22 @@
-index 33392fd1f0..5d6f92e4bb 100644
+index 86a4cf74d5..95b93af733 100644
@@ -38,2 +28,3 @@
--	uint16_t i, j;
- 	size_t reg_num;
+-	int reg_num;
+-	int i, j;
++	size_t reg_num;
@@ -45 +36 @@
-index bad65fcbed..c2e692a2c5 100644
+index 767e3728f1..169bad1412 100644


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

* patch 'net/hns3: fix Rx multiple firmware reset interrupts' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (30 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix variable type mismatch' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'ethdev: fix indirect action conversion' " Kevin Traynor
                   ` (107 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/b374bc7b0e8bb54f60d79d51d07f02d96882f666

Thanks.

Kevin

---
From b374bc7b0e8bb54f60d79d51d07f02d96882f666 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 22 May 2023 21:17:39 +0800
Subject: [PATCH] net/hns3: fix Rx multiple firmware reset interrupts

[ upstream commit e3c71325cec3353c4b9623310ece363a7c79604f ]

In the firmware (also known as IMP) reset scenario, driver interrupt
processing and firmware watchdog initialization are asynchronous.

If the driver interrupt processing is faster than firmware watchdog
initialization (that is, the driver clears the firmware reset
interrupt source before the firmware watchdog is initialized), the
driver will receive multiple firmware reset interrupts.

In the Kunpeng 920 platform, the above situation does not exist. But
it does on the newer platforms. So we add 5ms delay before drivers
clears the IMP reset interrupt source.

As for the impact of 5ms, the number of PFs managed by a firmware is
limited. Therefore, even if a DPDK process takes over all the PFs
which managed by the firmware, the delay is controllable.

Fixes: ee930d38ffca ("net/hns3: fix timing of clearing interrupt source")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 6382384301..3f04586a34 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -287,4 +287,17 @@ hns3_handle_mac_tnl(struct hns3_hw *hw)
 }
 
+static void
+hns3_delay_before_clear_event_cause(struct hns3_hw *hw, uint32_t event_type, uint32_t regclr)
+{
+#define IMPRESET_WAIT_MS_TIME	5
+
+	if (event_type == HNS3_VECTOR0_EVENT_RST &&
+	    regclr & BIT(HNS3_VECTOR0_IMPRESET_INT_B) &&
+	    hw->revision >= PCI_REVISION_ID_HIP09_A) {
+		rte_delay_ms(IMPRESET_WAIT_MS_TIME);
+		hns3_dbg(hw, "wait firmware watchdog initialization completed.");
+	}
+}
+
 static void
 hns3_interrupt_handler(void *param)
@@ -306,4 +319,5 @@ hns3_interrupt_handler(void *param)
 	ras_int = hns3_read_dev(hw, HNS3_RAS_PF_OTHER_INT_STS_REG);
 	cmdq_int = hns3_read_dev(hw, HNS3_VECTOR0_CMDQ_SRC_REG);
+	hns3_delay_before_clear_event_cause(hw, event_cause, clearval);
 	hns3_clear_event_cause(hw, event_cause, clearval);
 	/* vector 0 interrupt is shared with reset and mailbox source events. */
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:59.035956100 +0100
+++ 0033-net-hns3-fix-Rx-multiple-firmware-reset-interrupts.patch	2023-07-20 16:17:54.581750181 +0100
@@ -1 +1 @@
-From e3c71325cec3353c4b9623310ece363a7c79604f Mon Sep 17 00:00:00 2001
+From b374bc7b0e8bb54f60d79d51d07f02d96882f666 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e3c71325cec3353c4b9623310ece363a7c79604f ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 5ef66f96c6..664226a6ef 100644
+index 6382384301..3f04586a34 100644


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

* patch 'ethdev: fix indirect action conversion' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (31 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix Rx multiple firmware reset interrupts' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix FEC mode for 200G ports' " Kevin Traynor
                   ` (106 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/c11ee881c2f6e0fa282e0814d999c82da99cad23

Thanks.

Kevin

---
From c11ee881c2f6e0fa282e0814d999c82da99cad23 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Fri, 26 May 2023 06:18:00 +0300
Subject: [PATCH] ethdev: fix indirect action conversion

[ upstream commit fb131e295ea838f062278fa63f21c89a4f080d21 ]

As indirect action conf fills the indirect action handler, while
converting indirect action, the action conf(action handler) should
be copied from original indirect action conf instead of duplicating
the action handler memory.

Fixes: 4b61b8774be9 ("ethdev: introduce indirect flow action")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 lib/ethdev/rte_flow.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index a93f68abbc..b311dd2a00 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -858,5 +858,13 @@ rte_flow_conv_actions(struct rte_flow_action *dst,
 	dst -= num;
 	do {
-		if (src->conf) {
+		if (src->type == RTE_FLOW_ACTION_TYPE_INDIRECT) {
+			/*
+			 * Indirect action conf fills the indirect action
+			 * handler. Copy the action handle directly instead
+			 * of duplicating the pointer memory.
+			 */
+			if (size)
+				dst->conf = src->conf;
+		} else if (src->conf) {
 			off = RTE_ALIGN_CEIL(off, sizeof(double));
 			ret = rte_flow_conv_action_conf
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:59.173538880 +0100
+++ 0034-ethdev-fix-indirect-action-conversion.patch	2023-07-20 16:17:54.585750197 +0100
@@ -1 +1 @@
-From fb131e295ea838f062278fa63f21c89a4f080d21 Mon Sep 17 00:00:00 2001
+From c11ee881c2f6e0fa282e0814d999c82da99cad23 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fb131e295ea838f062278fa63f21c89a4f080d21 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index bcc1982224..494c82932d 100644
+index a93f68abbc..b311dd2a00 100644
@@ -24 +25 @@
-@@ -920,5 +920,13 @@ rte_flow_conv_actions(struct rte_flow_action *dst,
+@@ -858,5 +858,13 @@ rte_flow_conv_actions(struct rte_flow_action *dst,


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

* patch 'net/hns3: fix FEC mode for 200G ports' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (32 preceding siblings ...)
  2023-07-20 15:17 ` patch 'ethdev: fix indirect action conversion' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix FEC mode check' " Kevin Traynor
                   ` (105 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Jie Hai; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/3e8f218194c78a6e048044e6f8d238338700340e

Thanks.

Kevin

---
From 3e8f218194c78a6e048044e6f8d238338700340e Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Sat, 8 Apr 2023 10:27:33 +0800
Subject: [PATCH] net/hns3: fix FEC mode for 200G ports

[ upstream commit 0f015da9e207d43a8676714661209b76a8f062d1 ]

The hardware does not support NOFEC for 200G ports. So delete this
bit.

Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 3f04586a34..f812926738 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -84,6 +84,5 @@ static const struct rte_eth_fec_capa speed_fec_capa_tbl[] = {
 			      RTE_ETH_FEC_MODE_CAPA_MASK(RS) },
 
-	{ RTE_ETH_SPEED_NUM_200G, RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC) |
-			      RTE_ETH_FEC_MODE_CAPA_MASK(AUTO) |
+	{ RTE_ETH_SPEED_NUM_200G, RTE_ETH_FEC_MODE_CAPA_MASK(AUTO) |
 			      RTE_ETH_FEC_MODE_CAPA_MASK(RS) }
 };
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:59.282284833 +0100
+++ 0035-net-hns3-fix-FEC-mode-for-200G-ports.patch	2023-07-20 16:17:54.596750242 +0100
@@ -1 +1 @@
-From 0f015da9e207d43a8676714661209b76a8f062d1 Mon Sep 17 00:00:00 2001
+From 3e8f218194c78a6e048044e6f8d238338700340e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0f015da9e207d43a8676714661209b76a8f062d1 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 07d907d6a1..94eadefb8e 100644
+index 3f04586a34..f812926738 100644


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

* patch 'net/hns3: fix FEC mode check' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (33 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix FEC mode for 200G ports' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'doc: fix format in flow API guide' " Kevin Traynor
                   ` (104 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Jie Hai; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/65193aced092c035dfc6bac37069f5474f62f08e

Thanks.

Kevin

---
From 65193aced092c035dfc6bac37069f5474f62f08e Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Sat, 8 Apr 2023 10:27:34 +0800
Subject: [PATCH] net/hns3: fix FEC mode check

[ upstream commit 0cf0f931267ae751c503dba929307bb2a6acbbfa ]

The function is_fec_mode_one_bit_set() is used to check whether
the binary of the mode from user only contains one '1'. But it
uses the bytes number this mode variable occupied to calculate
the count. So this patch uses __builtin_popcount() to replace it.

This patch also extracts the code for verifying mode parameter into
a function.

Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 51 ++++++++++++++++------------------
 1 file changed, 24 insertions(+), 27 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index f812926738..c70cf12b01 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6198,41 +6198,23 @@ get_current_speed_fec_cap(struct hns3_hw *hw, struct rte_eth_fec_capa *fec_capa)
 }
 
-static bool
-is_fec_mode_one_bit_set(uint32_t mode)
-{
-	int cnt = 0;
-	uint8_t i;
-
-	for (i = 0; i < sizeof(mode); i++)
-		if (mode >> i & 0x1)
-			cnt++;
-
-	return cnt == 1 ? true : false;
-}
-
 static int
-hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
+hns3_fec_mode_valid(struct rte_eth_dev *dev, uint32_t mode)
 {
 #define FEC_CAPA_NUM 2
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(hns);
-	struct hns3_pf *pf = &hns->pf;
-
 	struct rte_eth_fec_capa fec_capa[FEC_CAPA_NUM];
-	uint32_t cur_capa;
 	uint32_t num = FEC_CAPA_NUM;
+	uint32_t cur_capa;
 	int ret;
 
+	if (__builtin_popcount(mode) != 1) {
+		hns3_err(hw, "FEC mode(0x%x) should be only one bit set", mode);
+		return -EINVAL;
+	}
+
 	ret = hns3_fec_get_capability(dev, fec_capa, num);
 	if (ret < 0)
 		return ret;
-
-	/* HNS3 PMD only support one bit set mode, e.g. 0x1, 0x4 */
-	if (!is_fec_mode_one_bit_set(mode)) {
-		hns3_err(hw, "FEC mode(0x%x) not supported in HNS3 PMD, "
-			     "FEC mode should be only one bit set", mode);
-		return -EINVAL;
-	}
-
 	/*
 	 * Check whether the configured mode is within the FEC capability.
@@ -6240,9 +6222,24 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
 	 */
 	cur_capa = get_current_speed_fec_cap(hw, fec_capa);
-	if (!(cur_capa & mode)) {
-		hns3_err(hw, "unsupported FEC mode = 0x%x", mode);
+	if ((cur_capa & mode) == 0) {
+		hns3_err(hw, "unsupported FEC mode(0x%x)", mode);
 		return -EINVAL;
 	}
 
+	return 0;
+}
+
+static int
+hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
+{
+	struct hns3_adapter *hns = dev->data->dev_private;
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(hns);
+	struct hns3_pf *pf = &hns->pf;
+	int ret;
+
+	ret = hns3_fec_mode_valid(dev, mode);
+	if (ret != 0)
+		return ret;
+
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_set_fec_hw(hw, mode);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:59.436038642 +0100
+++ 0036-net-hns3-fix-FEC-mode-check.patch	2023-07-20 16:17:54.607750287 +0100
@@ -1 +1 @@
-From 0cf0f931267ae751c503dba929307bb2a6acbbfa Mon Sep 17 00:00:00 2001
+From 65193aced092c035dfc6bac37069f5474f62f08e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0cf0f931267ae751c503dba929307bb2a6acbbfa ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20,2 +21,2 @@
- drivers/net/hns3/hns3_ethdev.c | 50 ++++++++++++++++------------------
- 1 file changed, 24 insertions(+), 26 deletions(-)
+ drivers/net/hns3/hns3_ethdev.c | 51 ++++++++++++++++------------------
+ 1 file changed, 24 insertions(+), 27 deletions(-)
@@ -24 +25 @@
-index 94eadefb8e..4e8efa468d 100644
+index f812926738..c70cf12b01 100644
@@ -27 +28 @@
-@@ -6140,40 +6140,23 @@ get_current_speed_fec_cap(struct hns3_hw *hw, struct rte_eth_fec_capa *fec_capa)
+@@ -6198,41 +6198,23 @@ get_current_speed_fec_cap(struct hns3_hw *hw, struct rte_eth_fec_capa *fec_capa)
@@ -50,0 +52 @@
+-
@@ -75 +77 @@
-@@ -6181,9 +6164,24 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
+@@ -6240,9 +6222,24 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)


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

* patch 'doc: fix format in flow API guide' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (34 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix FEC mode check' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix RTC time on initialization' " Kevin Traynor
                   ` (103 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Michael Baum; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/57a458ded6c02c49ff7fefb8682d992f903fba00

Thanks.

Kevin

---
From 57a458ded6c02c49ff7fefb8682d992f903fba00 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 24 May 2023 00:31:53 +0300
Subject: [PATCH] doc: fix format in flow API guide

[ upstream commit 5d254667810fffe59190ca208a078bcb666a2a71 ]

The modify field action description inside "Generic flow API (rte_flow)"
documentation, lists all operations supported for a destination field.
In addition, it lists the values supported for a encapsulation level
field.
Before the lists, in both cases, miss a blank line causing them to look
regular text lines.
This patch adds the blank lines.

The asynchronous operations description inside "Generic flow API
(rte_flow)" documentation, adds some bullets to describe asynchronous
operations behavior.
Before the first bullet, miss a blank line causing it to look a regular
text line.
This patch adds the blank line.

The RSS action description inside "Generic flow API (rte_flow)"
documentation, lists the values supported for a encapsulation level
field.
For "2" value, it uses 3 spaces as an indentation instead of 2 after
line breaking, causing the first line to be bold.
This patch updates the number of spaces in the indentation.

Fixes: 73b68f4c54a0 ("ethdev: introduce generic modify flow action")
Fixes: 197e820c6685 ("ethdev: bring in async queue-based flow rules operations")
Fixes: 18aee2861a1f ("ethdev: add encap level to RSS flow API action")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 doc/guides/prog_guide/rte_flow.rst | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 7984e889c4..61d0d0899a 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -2009,6 +2009,6 @@ Also, regarding packet encapsulation ``level``:
 
 - ``2`` and subsequent values request RSS to be performed on the specified
-   inner packet encapsulation level, from outermost to innermost (lower to
-   higher values).
+  inner packet encapsulation level, from outermost to innermost (lower to
+  higher values).
 
 Values other than ``0`` are not necessarily supported.
@@ -3067,18 +3067,21 @@ The immediate value ``RTE_FLOW_FIELD_VALUE`` (or a pointer to it
 See ``enum rte_flow_field_id`` for the list of supported fields.
 
-``op`` selects the operation to perform on a destination field.
+``op`` selects the operation to perform on a destination field:
+
 - ``set`` copies the data from ``src`` field to ``dst`` field.
 - ``add`` adds together ``dst`` and ``src`` and stores the result into ``dst``.
-- ``sub`` subtracts ``src`` from ``dst`` and stores the result into ``dst``
+- ``sub`` subtracts ``src`` from ``dst`` and stores the result into ``dst``.
 
 ``width`` defines a number of bits to use from ``src`` field.
 
 ``level`` is used to access any packet field on any encapsulation level
-as well as any tag element in the tag array.
-- ``0`` means the default behaviour. Depending on the packet type, it can
-mean outermost, innermost or anything in between.
+as well as any tag element in the tag array:
+
+- ``0`` means the default behaviour. Depending on the packet type,
+  it can mean outermost, innermost or anything in between.
 - ``1`` requests access to the outermost packet encapsulation level.
 - ``2`` and subsequent values requests access to the specified packet
-encapsulation level, from outermost to innermost (lower to higher values).
+  encapsulation level, from outermost to innermost (lower to higher values).
+
 For the tag array (in case of multiple tags are supported and present)
 ``level`` translates directly into the array index.
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:59.536281745 +0100
+++ 0037-doc-fix-format-in-flow-API-guide.patch	2023-07-20 16:17:54.615750320 +0100
@@ -1 +1 @@
-From 5d254667810fffe59190ca208a078bcb666a2a71 Mon Sep 17 00:00:00 2001
+From 57a458ded6c02c49ff7fefb8682d992f903fba00 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5d254667810fffe59190ca208a078bcb666a2a71 ]
+
@@ -31 +32,0 @@
-Cc: stable@dpdk.org
@@ -36,2 +37,2 @@
- doc/guides/prog_guide/rte_flow.rst | 20 ++++++++++++--------
- 1 file changed, 12 insertions(+), 8 deletions(-)
+ doc/guides/prog_guide/rte_flow.rst | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
@@ -40 +41 @@
-index 27fa3dd304..7116c9ce23 100644
+index 7984e889c4..61d0d0899a 100644
@@ -43 +44 @@
-@@ -1969,6 +1969,6 @@ Also, regarding packet encapsulation ``level``:
+@@ -2009,6 +2009,6 @@ Also, regarding packet encapsulation ``level``:
@@ -52 +53 @@
-@@ -3050,18 +3050,21 @@ The immediate value ``RTE_FLOW_FIELD_VALUE`` (or a pointer to it
+@@ -3067,18 +3067,21 @@ The immediate value ``RTE_FLOW_FIELD_VALUE`` (or a pointer to it
@@ -80,6 +80,0 @@
-@@ -3857,4 +3860,5 @@ Asynchronous operations
- 
- Flow rules management can be done via special lockless flow management queues.
-+
- - Queue operations are asynchronous and not thread-safe.
- 


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

* patch 'net/hns3: fix RTC time on initialization' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (35 preceding siblings ...)
  2023-07-20 15:17 ` patch 'doc: fix format in flow API guide' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix RTC time after reset' " Kevin Traynor
                   ` (102 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/bf28f06d51f5449623f36474ec2a42186fbb3a58

Thanks.

Kevin

---
From bf28f06d51f5449623f36474ec2a42186fbb3a58 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 2 Jun 2023 19:41:55 +0800
Subject: [PATCH] net/hns3: fix RTC time on initialization

[ upstream commit f901c570e50d042f466de29b186db68e177f93ab ]

Driver doesn't initialize RTC time during probe phase, which
lead to an inaccurate time.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ptp.c | 26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c
index db3c007b12..1e27e4aeca 100644
--- a/drivers/net/hns3/hns3_ptp.c
+++ b/drivers/net/hns3/hns3_ptp.c
@@ -57,7 +57,21 @@ hns3_ptp_int_en(struct hns3_hw *hw, bool en)
 }
 
+static void
+hns3_ptp_timesync_write_time(struct hns3_hw *hw, const struct timespec *ts)
+{
+	uint64_t sec = ts->tv_sec;
+	uint64_t ns = ts->tv_nsec;
+
+	/* Set the timecounters to a new value. */
+	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_H, upper_32_bits(sec));
+	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_M, lower_32_bits(sec));
+	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_L, lower_32_bits(ns));
+	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_RDY, 1);
+}
+
 int
 hns3_ptp_init(struct hns3_hw *hw)
 {
+	struct timespec sys_time;
 	int ret;
 
@@ -72,4 +86,8 @@ hns3_ptp_init(struct hns3_hw *hw)
 	hns3_write_dev(hw, HNS3_CFG_TIME_CYC_EN, 1);
 
+	/* Initializing the RTC. */
+	clock_gettime(CLOCK_REALTIME, &sys_time);
+	hns3_ptp_timesync_write_time(hw, &sys_time);
+
 	return 0;
 }
@@ -242,15 +260,9 @@ hns3_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
 {
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	uint64_t sec = ts->tv_sec;
-	uint64_t ns = ts->tv_nsec;
 
 	if (!hns3_dev_get_support(hw, PTP))
 		return -ENOTSUP;
 
-	/* Set the timecounters to a new value. */
-	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_H, upper_32_bits(sec));
-	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_M, lower_32_bits(sec));
-	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_L, lower_32_bits(ns));
-	hns3_write_dev(hw, HNS3_CFG_TIME_SYNC_RDY, 1);
+	hns3_ptp_timesync_write_time(hw, ts);
 
 	return 0;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:59.677026403 +0100
+++ 0038-net-hns3-fix-RTC-time-on-initialization.patch	2023-07-20 16:17:54.616750324 +0100
@@ -1 +1 @@
-From f901c570e50d042f466de29b186db68e177f93ab Mon Sep 17 00:00:00 2001
+From bf28f06d51f5449623f36474ec2a42186fbb3a58 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f901c570e50d042f466de29b186db68e177f93ab ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'net/hns3: fix RTC time after reset' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (36 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix RTC time on initialization' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: uninitialize PTP' " Kevin Traynor
                   ` (101 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/d2ec3c302c63f80638445748a0b37d6b79e626b6

Thanks.

Kevin

---
From d2ec3c302c63f80638445748a0b37d6b79e626b6 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 2 Jun 2023 19:41:56 +0800
Subject: [PATCH] net/hns3: fix RTC time after reset

[ upstream commit 14d9281d9c65afd743354737b8c70555161d4a69 ]

The enabled status of RTC time will be cleared after global
or IMP reset, which cause the local RTC time doesn't work.
So this patch fix it.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index c70cf12b01..936426c117 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4427,4 +4427,10 @@ hns3_init_hardware(struct hns3_adapter *hns)
 	}
 
+	ret = hns3_ptp_init(hw);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Failed to init PTP, ret = %d", ret);
+		goto err_mac_init;
+	}
+
 	return 0;
 
@@ -4606,8 +4612,4 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
 	}
 
-	ret = hns3_ptp_init(hw);
-	if (ret)
-		goto err_get_config;
-
 	/* Enable interrupt */
 	rte_intr_enable(pci_dev->intr_handle);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:59.857189268 +0100
+++ 0039-net-hns3-fix-RTC-time-after-reset.patch	2023-07-20 16:17:54.627750369 +0100
@@ -1 +1 @@
-From 14d9281d9c65afd743354737b8c70555161d4a69 Mon Sep 17 00:00:00 2001
+From d2ec3c302c63f80638445748a0b37d6b79e626b6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 14d9281d9c65afd743354737b8c70555161d4a69 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 600accea93..9ed54ae384 100644
+index c70cf12b01..936426c117 100644
@@ -23 +24 @@
-@@ -4417,4 +4417,10 @@ hns3_init_hardware(struct hns3_adapter *hns)
+@@ -4427,4 +4427,10 @@ hns3_init_hardware(struct hns3_adapter *hns)
@@ -34 +35 @@
-@@ -4578,8 +4584,4 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
+@@ -4606,8 +4612,4 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)


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

* patch 'net/hns3: uninitialize PTP' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (37 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix RTC time after reset' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: extract PTP to its own header file' " Kevin Traynor
                   ` (100 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/80d032eed55ef8f2907ecd524a2514ddf3bc98cd

Thanks.

Kevin

---
From 80d032eed55ef8f2907ecd524a2514ddf3bc98cd Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 2 Jun 2023 19:41:57 +0800
Subject: [PATCH] net/hns3: uninitialize PTP

[ upstream commit bfd20b33e752a2597e85283e9fbb134170cce3a0 ]

This patch adds the uninitialization process of PTP in case
of having an impact on PF driver in kernel.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c |  2 ++
 drivers/net/hns3/hns3_ethdev.h |  1 +
 drivers/net/hns3/hns3_ptp.c    | 18 ++++++++++++++++++
 3 files changed, 21 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 936426c117..0ee6a4e948 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4668,4 +4668,5 @@ err_enable_intr:
 err_fdir:
 	hns3_uninit_umv_space(hw);
+	hns3_ptp_uninit(hw);
 err_init_hw:
 	hns3_stats_uninit(hw);
@@ -4703,4 +4704,5 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
 	hns3_fdir_filter_uninit(hns);
 	hns3_uninit_umv_space(hw);
+	hns3_ptp_uninit(hw);
 	hns3_stats_uninit(hw);
 	hns3_config_mac_tnl_int(hw, false);
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 0881d26516..6c07075867 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -1045,4 +1045,5 @@ int hns3_mbuf_dyn_rx_timestamp_register(struct rte_eth_dev *dev,
 				    struct rte_eth_conf *conf);
 int hns3_ptp_init(struct hns3_hw *hw);
+void hns3_ptp_uninit(struct hns3_hw *hw);
 int hns3_timesync_enable(struct rte_eth_dev *dev);
 int hns3_timesync_disable(struct rte_eth_dev *dev);
diff --git a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c
index 1e27e4aeca..0e17a17034 100644
--- a/drivers/net/hns3/hns3_ptp.c
+++ b/drivers/net/hns3/hns3_ptp.c
@@ -307,2 +307,20 @@ hns3_restore_ptp(struct hns3_adapter *hns)
 	return ret;
 }
+
+void
+hns3_ptp_uninit(struct hns3_hw *hw)
+{
+	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
+	int ret;
+
+	if (!hns3_dev_get_support(hw, PTP))
+		return;
+
+	ret = hns3_ptp_int_en(hw, false);
+	if (ret != 0)
+		hns3_err(hw, "disable PTP interrupt failed, ret = %d.", ret);
+
+	ret = hns3_timesync_configure(hns, false);
+	if (ret != 0)
+		hns3_err(hw, "disable timesync failed, ret = %d.", ret);
+}
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:59.966253822 +0100
+++ 0040-net-hns3-uninitialize-PTP.patch	2023-07-20 16:17:54.641750426 +0100
@@ -1 +1 @@
-From bfd20b33e752a2597e85283e9fbb134170cce3a0 Mon Sep 17 00:00:00 2001
+From 80d032eed55ef8f2907ecd524a2514ddf3bc98cd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bfd20b33e752a2597e85283e9fbb134170cce3a0 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 9ed54ae384..70463fe177 100644
+index 936426c117..0ee6a4e948 100644
@@ -24 +25 @@
-@@ -4638,4 +4638,5 @@ err_enable_intr:
+@@ -4668,4 +4668,5 @@ err_enable_intr:
@@ -30 +31 @@
-@@ -4673,4 +4674,5 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
+@@ -4703,4 +4704,5 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
@@ -37 +38 @@
-index c04edf622f..9456204422 100644
+index 0881d26516..6c07075867 100644
@@ -40 +41 @@
-@@ -1046,4 +1046,5 @@ int hns3_mbuf_dyn_rx_timestamp_register(struct rte_eth_dev *dev,
+@@ -1045,4 +1045,5 @@ int hns3_mbuf_dyn_rx_timestamp_register(struct rte_eth_dev *dev,


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

* patch 'net/hns3: extract PTP to its own header file' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (38 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: uninitialize PTP' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix mbuf leakage when RxQ started during reset' " Kevin Traynor
                   ` (99 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/37164c253777acd6fd83d605621b7faf194118a8

Thanks.

Kevin

---
From 37164c253777acd6fd83d605621b7faf194118a8 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 2 Jun 2023 19:41:58 +0800
Subject: [PATCH] net/hns3: extract PTP to its own header file

[ upstream commit 78399874af509e129c13c6771aafa8f27c456c95 ]

This patch extracts a PTP header file to contain PTP registers
and external API in order to make PTP code structure more clear.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c |  1 +
 drivers/net/hns3/hns3_ethdev.h | 17 ------------
 drivers/net/hns3/hns3_ptp.c    |  2 +-
 drivers/net/hns3/hns3_ptp.h    | 48 ++++++++++++++++++++++++++++++++++
 drivers/net/hns3/hns3_regs.h   | 23 ----------------
 5 files changed, 50 insertions(+), 41 deletions(-)
 create mode 100644 drivers/net/hns3/hns3_ptp.h

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 0ee6a4e948..f61509a281 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -17,4 +17,5 @@
 #include "hns3_mp.h"
 #include "hns3_flow.h"
+#include "hns3_ptp.h"
 
 #define HNS3_SERVICE_INTERVAL		1000000 /* us */
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 6c07075867..878d4ae492 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -1041,21 +1041,4 @@ void hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status,
 void hns3vf_update_push_lsc_cap(struct hns3_hw *hw, bool supported);
 
-int hns3_restore_ptp(struct hns3_adapter *hns);
-int hns3_mbuf_dyn_rx_timestamp_register(struct rte_eth_dev *dev,
-				    struct rte_eth_conf *conf);
-int hns3_ptp_init(struct hns3_hw *hw);
-void hns3_ptp_uninit(struct hns3_hw *hw);
-int hns3_timesync_enable(struct rte_eth_dev *dev);
-int hns3_timesync_disable(struct rte_eth_dev *dev);
-int hns3_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
-				struct timespec *timestamp,
-				uint32_t flags __rte_unused);
-int hns3_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
-				struct timespec *timestamp);
-int hns3_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts);
-int hns3_timesync_write_time(struct rte_eth_dev *dev,
-			const struct timespec *ts);
-int hns3_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta);
-
 static inline bool
 is_reset_pending(struct hns3_adapter *hns)
diff --git a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c
index 0e17a17034..894ac6dd71 100644
--- a/drivers/net/hns3/hns3_ptp.c
+++ b/drivers/net/hns3/hns3_ptp.c
@@ -8,5 +8,5 @@
 
 #include "hns3_ethdev.h"
-#include "hns3_regs.h"
+#include "hns3_ptp.h"
 #include "hns3_logs.h"
 
diff --git a/drivers/net/hns3/hns3_ptp.h b/drivers/net/hns3/hns3_ptp.h
new file mode 100644
index 0000000000..2b8717fa3c
--- /dev/null
+++ b/drivers/net/hns3/hns3_ptp.h
@@ -0,0 +1,48 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 HiSilicon Limited.
+ */
+
+#ifndef HNS3_PTP_H
+#define HNS3_PTP_H
+
+/* Register bit for 1588 event */
+#define HNS3_VECTOR0_1588_INT_B			0
+
+#define HNS3_PTP_BASE_ADDRESS			0x29000
+
+#define HNS3_TX_1588_SEQID_BACK			(HNS3_PTP_BASE_ADDRESS + 0x0)
+#define HNS3_TX_1588_TSP_BACK_0			(HNS3_PTP_BASE_ADDRESS + 0x4)
+#define HNS3_TX_1588_TSP_BACK_1			(HNS3_PTP_BASE_ADDRESS + 0x8)
+#define HNS3_TX_1588_TSP_BACK_2			(HNS3_PTP_BASE_ADDRESS + 0xc)
+
+#define HNS3_TX_1588_BACK_TSP_CNT		(HNS3_PTP_BASE_ADDRESS + 0x30)
+
+#define HNS3_CFG_TIME_SYNC_H			(HNS3_PTP_BASE_ADDRESS + 0x50)
+#define HNS3_CFG_TIME_SYNC_M			(HNS3_PTP_BASE_ADDRESS + 0x54)
+#define HNS3_CFG_TIME_SYNC_L			(HNS3_PTP_BASE_ADDRESS + 0x58)
+#define HNS3_CFG_TIME_SYNC_RDY			(HNS3_PTP_BASE_ADDRESS + 0x5c)
+
+#define HNS3_CFG_TIME_CYC_EN			(HNS3_PTP_BASE_ADDRESS + 0x70)
+
+#define HNS3_CURR_TIME_OUT_H			(HNS3_PTP_BASE_ADDRESS + 0x74)
+#define HNS3_CURR_TIME_OUT_L			(HNS3_PTP_BASE_ADDRESS + 0x78)
+#define HNS3_CURR_TIME_OUT_NS			(HNS3_PTP_BASE_ADDRESS + 0x7c)
+
+int hns3_restore_ptp(struct hns3_adapter *hns);
+int hns3_mbuf_dyn_rx_timestamp_register(struct rte_eth_dev *dev,
+				    struct rte_eth_conf *conf);
+int hns3_ptp_init(struct hns3_hw *hw);
+void hns3_ptp_uninit(struct hns3_hw *hw);
+int hns3_timesync_enable(struct rte_eth_dev *dev);
+int hns3_timesync_disable(struct rte_eth_dev *dev);
+int hns3_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
+				struct timespec *timestamp,
+				uint32_t flags __rte_unused);
+int hns3_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
+				struct timespec *timestamp);
+int hns3_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts);
+int hns3_timesync_write_time(struct rte_eth_dev *dev,
+			const struct timespec *ts);
+int hns3_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta);
+
+#endif /* HNS3_PTP_H */
diff --git a/drivers/net/hns3/hns3_regs.h b/drivers/net/hns3/hns3_regs.h
index 5812eb39db..d5f9d0ae9f 100644
--- a/drivers/net/hns3/hns3_regs.h
+++ b/drivers/net/hns3/hns3_regs.h
@@ -122,27 +122,4 @@
 #define HNS3_TQP_INTR_QL_DEFAULT		0
 
-/* Register bit for 1588 event */
-#define HNS3_VECTOR0_1588_INT_B	                0
-
-#define HNS3_PTP_BASE_ADDRESS			0x29000
-
-#define HNS3_TX_1588_SEQID_BACK			(HNS3_PTP_BASE_ADDRESS + 0x0)
-#define HNS3_TX_1588_TSP_BACK_0			(HNS3_PTP_BASE_ADDRESS + 0x4)
-#define HNS3_TX_1588_TSP_BACK_1			(HNS3_PTP_BASE_ADDRESS + 0x8)
-#define HNS3_TX_1588_TSP_BACK_2			(HNS3_PTP_BASE_ADDRESS + 0xc)
-
-#define HNS3_TX_1588_BACK_TSP_CNT		(HNS3_PTP_BASE_ADDRESS + 0x30)
-
-#define HNS3_CFG_TIME_SYNC_H			(HNS3_PTP_BASE_ADDRESS + 0x50)
-#define HNS3_CFG_TIME_SYNC_M			(HNS3_PTP_BASE_ADDRESS + 0x54)
-#define HNS3_CFG_TIME_SYNC_L			(HNS3_PTP_BASE_ADDRESS + 0x58)
-#define HNS3_CFG_TIME_SYNC_RDY			(HNS3_PTP_BASE_ADDRESS + 0x5c)
-
-#define HNS3_CFG_TIME_CYC_EN			(HNS3_PTP_BASE_ADDRESS + 0x70)
-
-#define HNS3_CURR_TIME_OUT_H			(HNS3_PTP_BASE_ADDRESS + 0x74)
-#define HNS3_CURR_TIME_OUT_L			(HNS3_PTP_BASE_ADDRESS + 0x78)
-#define HNS3_CURR_TIME_OUT_NS			(HNS3_PTP_BASE_ADDRESS + 0x7c)
-
 /* gl_usec convert to hardware count, as writing each 1 represents 2us */
 #define HNS3_GL_USEC_TO_REG(gl_usec)		((gl_usec) >> 1)
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:00.122364170 +0100
+++ 0041-net-hns3-extract-PTP-to-its-own-header-file.patch	2023-07-20 16:17:54.656750487 +0100
@@ -1 +1 @@
-From 78399874af509e129c13c6771aafa8f27c456c95 Mon Sep 17 00:00:00 2001
+From 37164c253777acd6fd83d605621b7faf194118a8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 78399874af509e129c13c6771aafa8f27c456c95 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 70463fe177..64028778d0 100644
+index 0ee6a4e948..f61509a281 100644
@@ -27 +28 @@
-@@ -16,4 +16,5 @@
+@@ -17,4 +17,5 @@
@@ -31 +31,0 @@
- #include "hns3_ethdev.h"
@@ -32,0 +33 @@
+ #define HNS3_SERVICE_INTERVAL		1000000 /* us */
@@ -34 +35 @@
-index 9456204422..c58094d87b 100644
+index 6c07075867..878d4ae492 100644
@@ -37 +38 @@
-@@ -1042,21 +1042,4 @@ void hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status,
+@@ -1041,21 +1041,4 @@ void hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status,
@@ -57,2 +58,2 @@
- const char *hns3_get_media_type_name(uint8_t media_type);
- 
+ static inline bool
+ is_reset_pending(struct hns3_adapter *hns)
@@ -125 +126 @@
-index 459bbaf773..6b037f81c1 100644
+index 5812eb39db..d5f9d0ae9f 100644
@@ -128 +129 @@
-@@ -125,27 +125,4 @@
+@@ -122,27 +122,4 @@


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

* patch 'net/hns3: fix mbuf leakage when RxQ started during reset' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (39 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: extract PTP to its own header file' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix mbuf leakage when RxQ started after " Kevin Traynor
                   ` (98 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/3d26d3f0c2af12fb06fa488feeb577e4f1044591

Thanks.

Kevin

---
From 3d26d3f0c2af12fb06fa488feeb577e4f1044591 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 2 Jun 2023 19:41:59 +0800
Subject: [PATCH] net/hns3: fix mbuf leakage when RxQ started during reset

[ upstream commit bbc5a31b8ead8a353da5b1c46e0209d2fa9dae24 ]

In the reset restore-conf phase, the reset process will allocate for
the Rx ring mbufs unconditionlly.

And the rte_eth_dev_rx_queue_start() will also allocate for the Rx ring
mbufs unconditionlly.

So if the rte_eth_dev_rx_queue_start() is invoked before restore-conf
phase, then the mbufs allocated by rte_eth_dev_rx_queue_start() will
leak.

Because the hw->reset.resetting was always true during the phases from
stop-service to restore-conf, so fix it by returning an error if the
hw->reset.resetting is set.

This patch adds the above logic in both rx_queue_start/rx_queue_stop/
tx_queue_start/tx_queue_stop ops.

Fixes: fa29fe45a7b4 ("net/hns3: support queue start and stop")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index bf091a7500..ad14e0c016 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -4489,4 +4489,11 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 
 	rte_spinlock_lock(&hw->lock);
+
+	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED)) {
+		hns3_err(hw, "fail to start Rx queue during resetting.");
+		rte_spinlock_unlock(&hw->lock);
+		return -EIO;
+	}
+
 	ret = hns3_reset_queue(hw, rx_queue_id, HNS3_RING_TYPE_RX);
 	if (ret) {
@@ -4535,4 +4542,11 @@ hns3_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 
 	rte_spinlock_lock(&hw->lock);
+
+	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED)) {
+		hns3_err(hw, "fail to stop Rx queue during resetting.");
+		rte_spinlock_unlock(&hw->lock);
+		return -EIO;
+	}
+
 	hns3_enable_rxq(rxq, false);
 
@@ -4557,4 +4571,11 @@ hns3_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 
 	rte_spinlock_lock(&hw->lock);
+
+	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED)) {
+		hns3_err(hw, "fail to start Tx queue during resetting.");
+		rte_spinlock_unlock(&hw->lock);
+		return -EIO;
+	}
+
 	ret = hns3_reset_queue(hw, tx_queue_id, HNS3_RING_TYPE_TX);
 	if (ret) {
@@ -4583,4 +4604,11 @@ hns3_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 
 	rte_spinlock_lock(&hw->lock);
+
+	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED)) {
+		hns3_err(hw, "fail to stop Tx queue during resetting.");
+		rte_spinlock_unlock(&hw->lock);
+		return -EIO;
+	}
+
 	hns3_enable_txq(txq, false);
 	hns3_tx_queue_release_mbufs(txq);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:00.229035087 +0100
+++ 0042-net-hns3-fix-mbuf-leakage-when-RxQ-started-during-re.patch	2023-07-20 16:17:54.664750520 +0100
@@ -1 +1 @@
-From bbc5a31b8ead8a353da5b1c46e0209d2fa9dae24 Mon Sep 17 00:00:00 2001
+From 3d26d3f0c2af12fb06fa488feeb577e4f1044591 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bbc5a31b8ead8a353da5b1c46e0209d2fa9dae24 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index 6468da903e..2bfc5507e3 100644
+index bf091a7500..ad14e0c016 100644
@@ -36 +37 @@
-@@ -4524,4 +4524,11 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -4489,4 +4489,11 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -48 +49 @@
-@@ -4570,4 +4577,11 @@ hns3_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -4535,4 +4542,11 @@ hns3_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -60 +61 @@
-@@ -4592,4 +4606,11 @@ hns3_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
+@@ -4557,4 +4571,11 @@ hns3_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
@@ -72 +73 @@
-@@ -4618,4 +4639,11 @@ hns3_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
+@@ -4583,4 +4604,11 @@ hns3_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)


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

* patch 'net/hns3: fix mbuf leakage when RxQ started after reset' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (40 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix mbuf leakage when RxQ started during reset' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix device start return value' " Kevin Traynor
                   ` (97 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/51a43c9a86f3047cc25676e83f225f26b0fa0d54

Thanks.

Kevin

---
From 51a43c9a86f3047cc25676e83f225f26b0fa0d54 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 2 Jun 2023 19:42:00 +0800
Subject: [PATCH] net/hns3: fix mbuf leakage when RxQ started after reset

[ upstream commit f81a18f491522c56ca7ee6ea78be10c784f2ae32 ]

In the reset restore-conf phase, the reset process will allocate for
the Rx ring mbufs unconditionlly.

And the rte_eth_dev_rx_queue_start() will also allocate for the Rx ring
mbufs unconditionlly.

So if the rte_eth_dev_rx_queue_start() is invoked after restore-conf
phase, then the mbufs allocated in restore-conf phase will leak.

So fix it by conditional release Rx ring mbufs in
rte_eth_dev_rx_queue_start(): if the Rx ring mbufs were allocated then
release them first.

This patch also set all sw-ring[]'s mbuf is NULL when release Rx ring
mbufs so that we can determine whether the Rx ring mbufs were allocated
based only on the first sw-ring[0]'s mbuf.

Fixes: fa29fe45a7b4 ("net/hns3: support queue start and stop")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index ad14e0c016..f2ccade7b4 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -51,4 +51,6 @@ hns3_rx_queue_release_mbufs(struct hns3_rx_queue *rxq)
 			}
 		}
+		for (i = 0; i < rxq->rx_rearm_nb; i++)
+			rxq->sw_ring[rxq->rx_rearm_start + i].mbuf = NULL;
 	}
 
@@ -4504,4 +4506,7 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	}
 
+	if (rxq->sw_ring[0].mbuf != NULL)
+		hns3_rx_queue_release_mbufs(rxq);
+
 	ret = hns3_init_rxq(hns, rx_queue_id);
 	if (ret) {
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:00.328232873 +0100
+++ 0043-net-hns3-fix-mbuf-leakage-when-RxQ-started-after-res.patch	2023-07-20 16:17:54.672750553 +0100
@@ -1 +1 @@
-From f81a18f491522c56ca7ee6ea78be10c784f2ae32 Mon Sep 17 00:00:00 2001
+From 51a43c9a86f3047cc25676e83f225f26b0fa0d54 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f81a18f491522c56ca7ee6ea78be10c784f2ae32 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index 2bfc5507e3..2493748683 100644
+index ad14e0c016..f2ccade7b4 100644
@@ -43 +44 @@
-@@ -4539,4 +4541,7 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -4504,4 +4506,7 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)


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

* patch 'net/hns3: fix device start return value' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (41 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix mbuf leakage when RxQ started after " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix uninitialized variable' " Kevin Traynor
                   ` (96 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/f630f709e95e6cfd981d0ec4fce789b13240b923

Thanks.

Kevin

---
From f630f709e95e6cfd981d0ec4fce789b13240b923 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 2 Jun 2023 19:42:01 +0800
Subject: [PATCH] net/hns3: fix device start return value

[ upstream commit a9e2ac08156cbbe5cd3c72300618b871dedffd15 ]

If hns3_init_queues() return failed, the hns3vf_do_start() should
return errcode. This patch fixes it.

Fixes: 43d8adf3891c ("net/hns3: fix RSS flow rule restore")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 729c1477cc..ff1ee52dba 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1722,6 +1722,8 @@ hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue)
 
 	ret = hns3_init_queues(hns, reset_queue);
-	if (ret)
+	if (ret) {
 		hns3_err(hw, "failed to init queues, ret = %d.", ret);
+		return ret;
+	}
 
 	return hns3_restore_filter(hns);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:00.418125128 +0100
+++ 0044-net-hns3-fix-device-start-return-value.patch	2023-07-20 16:17:54.676750569 +0100
@@ -1 +1 @@
-From a9e2ac08156cbbe5cd3c72300618b871dedffd15 Mon Sep 17 00:00:00 2001
+From f630f709e95e6cfd981d0ec4fce789b13240b923 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a9e2ac08156cbbe5cd3c72300618b871dedffd15 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index d051a1357b..5aac62a41f 100644
+index 729c1477cc..ff1ee52dba 100644
@@ -22 +23 @@
-@@ -1675,6 +1675,8 @@ hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue)
+@@ -1722,6 +1722,8 @@ hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue)


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

* patch 'net/hns3: fix uninitialized variable' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (42 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix device start return value' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix inaccurate log' " Kevin Traynor
                   ` (95 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Jie Hai; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/1834797be4107cf89b9d9cd200e1f773c2f87aa1

Thanks.

Kevin

---
From 1834797be4107cf89b9d9cd200e1f773c2f87aa1 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Fri, 2 Jun 2023 19:42:02 +0800
Subject: [PATCH] net/hns3: fix uninitialized variable

[ upstream commit 156496da7a527e36066596a7be7758037b2541b4 ]

This patch fixes possible use of uninitialized variable
"old_tuple_fields".

Fixes: e3069658da9f ("net/hns3: reimplement hash flow function")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 8b37c17b40..b0d0a849c2 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1898,6 +1898,7 @@ hns3_flow_set_rss_ptype_tuple(struct hns3_hw *hw,
 		return ret;
 
-	hns3_info(hw, "RSS tuple fields changed from 0x%" PRIx64 " to 0x%" PRIx64,
-		  old_tuple_fields, new_tuple_fields);
+	if (!cfg_global_tuple)
+		hns3_info(hw, "RSS tuple fields changed from 0x%" PRIx64 " to 0x%" PRIx64,
+			  old_tuple_fields, new_tuple_fields);
 
 	return 0;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:00.503998215 +0100
+++ 0045-net-hns3-fix-uninitialized-variable.patch	2023-07-20 16:17:54.680750585 +0100
@@ -1 +1 @@
-From 156496da7a527e36066596a7be7758037b2541b4 Mon Sep 17 00:00:00 2001
+From 1834797be4107cf89b9d9cd200e1f773c2f87aa1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 156496da7a527e36066596a7be7758037b2541b4 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index e132d88fa1..a5a7e452d8 100644
+index 8b37c17b40..b0d0a849c2 100644
@@ -22 +23 @@
-@@ -1945,6 +1945,7 @@ hns3_flow_set_rss_ptype_tuple(struct hns3_hw *hw,
+@@ -1898,6 +1898,7 @@ hns3_flow_set_rss_ptype_tuple(struct hns3_hw *hw,


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

* patch 'net/hns3: fix inaccurate log' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (43 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix uninitialized variable' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix redundant line break in " Kevin Traynor
                   ` (94 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/44160c032b77622bcfacd76d0031452797a7b782

Thanks.

Kevin

---
From 44160c032b77622bcfacd76d0031452797a7b782 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 2 Jun 2023 19:42:04 +0800
Subject: [PATCH] net/hns3: fix inaccurate log

[ upstream commit 94e9574f0bc5c1b5c2ac15b86ffb28bdbdc238c4 ]

This patch fix inaccurate log

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
Fixes: a951c1ed3ab5 ("net/hns3: support different numbers of Rx and Tx queues")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index f2ccade7b4..a758300060 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -590,5 +590,5 @@ hns3_tqp_enable(struct hns3_hw *hw, uint16_t queue_id, bool enable)
 	ret = hns3_cmd_send(hw, &desc, 1);
 	if (ret)
-		hns3_err(hw, "TQP enable fail, ret = %d", ret);
+		hns3_err(hw, "TQP %s fail, ret = %d", enable ? "enable" : "disable", ret);
 
 	return ret;
@@ -1647,5 +1647,5 @@ hns3_set_fake_rx_or_tx_queues(struct rte_eth_dev *dev, uint16_t nb_rx_q,
 	ret = hns3_fake_tx_queue_config(hw, tx_need_add_nb_q);
 	if (ret) {
-		hns3_err(hw, "Fail to configure fake rx queues: %d", ret);
+		hns3_err(hw, "Fail to configure fake tx queues: %d", ret);
 		goto cfg_fake_tx_q_fail;
 	}
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:00.592293731 +0100
+++ 0046-net-hns3-fix-inaccurate-log.patch	2023-07-20 16:17:54.688750618 +0100
@@ -1 +1 @@
-From 94e9574f0bc5c1b5c2ac15b86ffb28bdbdc238c4 Mon Sep 17 00:00:00 2001
+From 44160c032b77622bcfacd76d0031452797a7b782 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 94e9574f0bc5c1b5c2ac15b86ffb28bdbdc238c4 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index cf04dc857e..f3c3b38c55 100644
+index f2ccade7b4..a758300060 100644
@@ -22 +23 @@
-@@ -587,5 +587,5 @@ hns3_tqp_enable(struct hns3_hw *hw, uint16_t queue_id, bool enable)
+@@ -590,5 +590,5 @@ hns3_tqp_enable(struct hns3_hw *hw, uint16_t queue_id, bool enable)
@@ -29 +30 @@
-@@ -1636,5 +1636,5 @@ hns3_set_fake_rx_or_tx_queues(struct rte_eth_dev *dev, uint16_t nb_rx_q,
+@@ -1647,5 +1647,5 @@ hns3_set_fake_rx_or_tx_queues(struct rte_eth_dev *dev, uint16_t nb_rx_q,


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

* patch 'net/hns3: fix redundant line break in log' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (44 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix inaccurate log' " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:17 ` patch 'net/hns3: fix IMP reset trigger' " Kevin Traynor
                   ` (93 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/b99c14584b5f8ee174f2619fb1c8ce344b174966

Thanks.

Kevin

---
From b99c14584b5f8ee174f2619fb1c8ce344b174966 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 2 Jun 2023 19:42:05 +0800
Subject: [PATCH] net/hns3: fix redundant line break in log

[ upstream commit 0b5e15ea5f8841e43c63350e47cbfddbb92dc25c ]

This patch remove log redundant line break

Fixes: d51867db65c1 ("net/hns3: add initialization")
Fixes: c6332c3cf9f0 ("net/hns3: support module EEPROM dump")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index f61509a281..250973e230 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -3654,5 +3654,5 @@ hns3_get_mac_ethertype_cmd_status(uint16_t cmdq_resp, uint8_t resp_code)
 	if (cmdq_resp) {
 		PMD_INIT_LOG(ERR,
-			     "cmdq execute failed for get_mac_ethertype_cmd_status, status=%u.\n",
+			     "cmdq execute failed for get_mac_ethertype_cmd_status, status=%u.",
 			     cmdq_resp);
 		return -EIO;
@@ -6301,5 +6301,5 @@ hns3_optical_module_existed(struct hns3_hw *hw)
 	if (ret) {
 		hns3_err(hw,
-			 "fail to get optical module exist state, ret = %d.\n",
+			 "fail to get optical module exist state, ret = %d.",
 			 ret);
 		return false;
@@ -6339,5 +6339,5 @@ hns3_get_module_eeprom_data(struct hns3_hw *hw, uint32_t offset,
 	ret = hns3_cmd_send(hw, desc, HNS3_SFP_INFO_CMD_NUM);
 	if (ret) {
-		hns3_err(hw, "fail to get module EEPROM info, ret = %d.\n",
+		hns3_err(hw, "fail to get module EEPROM info, ret = %d.",
 				ret);
 		return ret;
@@ -6376,5 +6376,5 @@ hns3_get_module_eeprom(struct rte_eth_dev *dev,
 
 	if (!hns3_optical_module_existed(hw)) {
-		hns3_err(hw, "fail to read module EEPROM: no module is connected.\n");
+		hns3_err(hw, "fail to read module EEPROM: no module is connected.");
 		return -EIO;
 	}
@@ -6439,5 +6439,5 @@ hns3_get_module_info(struct rte_eth_dev *dev,
 		break;
 	default:
-		hns3_err(hw, "unknown module, type = %u, extra_type = %u.\n",
+		hns3_err(hw, "unknown module, type = %u, extra_type = %u.",
 			 sfp_type.type, sfp_type.ext_type);
 		return -EINVAL;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:00.684291912 +0100
+++ 0047-net-hns3-fix-redundant-line-break-in-log.patch	2023-07-20 16:17:54.699750663 +0100
@@ -1 +1 @@
-From 0b5e15ea5f8841e43c63350e47cbfddbb92dc25c Mon Sep 17 00:00:00 2001
+From b99c14584b5f8ee174f2619fb1c8ce344b174966 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0b5e15ea5f8841e43c63350e47cbfddbb92dc25c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 64028778d0..dccd1d416f 100644
+index f61509a281..250973e230 100644
@@ -22 +23 @@
-@@ -3632,5 +3632,5 @@ hns3_get_mac_ethertype_cmd_status(uint16_t cmdq_resp, uint8_t resp_code)
+@@ -3654,5 +3654,5 @@ hns3_get_mac_ethertype_cmd_status(uint16_t cmdq_resp, uint8_t resp_code)
@@ -29 +30 @@
-@@ -6236,5 +6236,5 @@ hns3_optical_module_existed(struct hns3_hw *hw)
+@@ -6301,5 +6301,5 @@ hns3_optical_module_existed(struct hns3_hw *hw)
@@ -36 +37 @@
-@@ -6274,5 +6274,5 @@ hns3_get_module_eeprom_data(struct hns3_hw *hw, uint32_t offset,
+@@ -6339,5 +6339,5 @@ hns3_get_module_eeprom_data(struct hns3_hw *hw, uint32_t offset,
@@ -43 +44 @@
-@@ -6311,5 +6311,5 @@ hns3_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -6376,5 +6376,5 @@ hns3_get_module_eeprom(struct rte_eth_dev *dev,
@@ -50 +51 @@
-@@ -6374,5 +6374,5 @@ hns3_get_module_info(struct rte_eth_dev *dev,
+@@ -6439,5 +6439,5 @@ hns3_get_module_info(struct rte_eth_dev *dev,


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

* patch 'net/hns3: fix IMP reset trigger' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (45 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix redundant line break in " Kevin Traynor
@ 2023-07-20 15:17 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/vmxnet3: fix return code in initializing' " Kevin Traynor
                   ` (92 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:17 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/1fa656ba3c346c355b46a87eca8949a4f4284e56

Thanks.

Kevin

---
From 1fa656ba3c346c355b46a87eca8949a4f4284e56 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 6 Jun 2023 20:10:28 +0800
Subject: [PATCH] net/hns3: fix IMP reset trigger

[ upstream commit 56a6c88ba27bfba838b56796de364db04c59b84b ]

Currently, driver sends the command with an unknown opcode to the
firmware to trigger IMP reset when some hardware error happened.
This unknown opcode cannot be parsed by the firmware.

So this patch fixes the way by writing register to do it.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 250973e230..3fe6ed7f91 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -45,4 +45,5 @@
 #define HNS3_VECTOR0_IMP_RD_POISON_B	5U
 #define HNS3_VECTOR0_ALL_MSIX_ERR_B	6U
+#define HNS3_VECTOR0_TRIGGER_IMP_RESET_B	7U
 
 #define HNS3_RESET_WAIT_MS	100
@@ -5628,15 +5629,4 @@ hns3_func_reset_cmd(struct hns3_hw *hw, int func_id)
 }
 
-static int
-hns3_imp_reset_cmd(struct hns3_hw *hw)
-{
-	struct hns3_cmd_desc desc;
-
-	hns3_cmd_setup_basic_desc(&desc, 0xFFFE, false);
-	desc.data[0] = 0xeedd;
-
-	return hns3_cmd_send(hw, &desc, 1);
-}
-
 static void
 hns3_msix_process(struct hns3_adapter *hns, enum hns3_reset_level reset_level)
@@ -5656,5 +5646,7 @@ hns3_msix_process(struct hns3_adapter *hns, enum hns3_reset_level reset_level)
 	switch (reset_level) {
 	case HNS3_IMP_RESET:
-		hns3_imp_reset_cmd(hw);
+		val = hns3_read_dev(hw, HNS3_VECTOR0_OTER_EN_REG);
+		hns3_set_bit(val, HNS3_VECTOR0_TRIGGER_IMP_RESET_B, 1);
+		hns3_write_dev(hw, HNS3_VECTOR0_OTER_EN_REG, val);
 		hns3_warn(hw, "IMP Reset requested time=%ld.%.6ld",
 			  tv.tv_sec, tv.tv_usec);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:00.820330151 +0100
+++ 0048-net-hns3-fix-IMP-reset-trigger.patch	2023-07-20 16:17:54.711750712 +0100
@@ -1 +1 @@
-From 56a6c88ba27bfba838b56796de364db04c59b84b Mon Sep 17 00:00:00 2001
+From 1fa656ba3c346c355b46a87eca8949a4f4284e56 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 56a6c88ba27bfba838b56796de364db04c59b84b ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index dccd1d416f..95c72e86aa 100644
+index 250973e230..3fe6ed7f91 100644
@@ -31 +32 @@
-@@ -5576,15 +5577,4 @@ hns3_func_reset_cmd(struct hns3_hw *hw, int func_id)
+@@ -5628,15 +5629,4 @@ hns3_func_reset_cmd(struct hns3_hw *hw, int func_id)
@@ -47 +48 @@
-@@ -5604,5 +5594,7 @@ hns3_msix_process(struct hns3_adapter *hns, enum hns3_reset_level reset_level)
+@@ -5656,5 +5646,7 @@ hns3_msix_process(struct hns3_adapter *hns, enum hns3_reset_level reset_level)


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

* patch 'net/vmxnet3: fix return code in initializing' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (46 preceding siblings ...)
  2023-07-20 15:17 ` patch 'net/hns3: fix IMP reset trigger' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'doc: fix auth algos in cryptoperf app' " Kevin Traynor
                   ` (91 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Kaijun Zeng; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/f68f4b2b8b4b4650f31939f043c906a7182aabe4

Thanks.

Kevin

---
From f68f4b2b8b4b4650f31939f043c906a7182aabe4 Mon Sep 17 00:00:00 2001
From: Kaijun Zeng <corezeng@gmail.com>
Date: Wed, 7 Jun 2023 13:57:25 -0400
Subject: [PATCH] net/vmxnet3: fix return code in initializing

[ upstream commit 8a2de735318b38ba93a041cb2f209889bde02689 ]

Improve error handling

Bugzilla ID: 1239
Fixes: dfaff37fc46d ("vmxnet3: import new vmxnet3 poll mode driver implementation")

Signed-off-by: Kaijun Zeng <corezeng@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap                           |  1 +
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 15 +++++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/.mailmap b/.mailmap
index 5e85db906b..288cc4913c 100644
--- a/.mailmap
+++ b/.mailmap
@@ -678,4 +678,5 @@ Junyu Jiang <junyux.jiang@intel.com>
 Juraj Linkeš <juraj.linkes@pantheon.tech>
 Kai Ji <kai.ji@intel.com>
+Kaijun Zeng <corezeng@gmail.com>
 Kaiwen Deng <kaiwenx.deng@intel.com>
 Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 76bfdbaaa3..a01f2c3cdd 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -1270,9 +1270,16 @@ vmxnet3_dev_rxtx_init(struct rte_eth_dev *dev)
 			/* Passing 0 as alloc_num will allocate full ring */
 			ret = vmxnet3_post_rx_bufs(rxq, j);
-			if (ret <= 0) {
+
+			/* Zero number of descriptors in the configuration of the RX queue */
+			if (ret == 0) {
 				PMD_INIT_LOG(ERR,
-					     "ERROR: Posting Rxq: %d buffers ring: %d",
-					     i, j);
-				return -ret;
+					"Invalid configuration in Rx queue: %d, buffers ring: %d\n",
+					i, j);
+				return -EINVAL;
+			}
+			/* Return the error number */
+			if (ret < 0) {
+				PMD_INIT_LOG(ERR, "Posting Rxq: %d buffers ring: %d", i, j);
+				return ret;
 			}
 			/*
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:00.952265304 +0100
+++ 0049-net-vmxnet3-fix-return-code-in-initializing.patch	2023-07-20 16:17:54.718750741 +0100
@@ -1 +1 @@
-From 8a2de735318b38ba93a041cb2f209889bde02689 Mon Sep 17 00:00:00 2001
+From f68f4b2b8b4b4650f31939f043c906a7182aabe4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a2de735318b38ba93a041cb2f209889bde02689 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 42f198f284..986ba9c988 100644
+index 5e85db906b..288cc4913c 100644
@@ -23 +24 @@
-@@ -688,4 +688,5 @@ Junyu Jiang <junyux.jiang@intel.com>
+@@ -678,4 +678,5 @@ Junyu Jiang <junyux.jiang@intel.com>
@@ -27 +27,0 @@
- Kaisen You <kaisenx.you@intel.com>
@@ -28,0 +29 @@
+ Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
@@ -30 +31 @@
-index 148f65383e..380f41f98b 100644
+index 76bfdbaaa3..a01f2c3cdd 100644
@@ -33 +34 @@
-@@ -1338,9 +1338,16 @@ vmxnet3_dev_rxtx_init(struct rte_eth_dev *dev)
+@@ -1270,9 +1270,16 @@ vmxnet3_dev_rxtx_init(struct rte_eth_dev *dev)


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

* patch 'doc: fix auth algos in cryptoperf app' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (47 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/vmxnet3: fix return code in initializing' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'crypto/scheduler: fix last element for valid args' " Kevin Traynor
                   ` (90 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/54fa9bdcd506d163f2af300b61262196291fb81a

Thanks.

Kevin

---
From 54fa9bdcd506d163f2af300b61262196291fb81a Mon Sep 17 00:00:00 2001
From: Akhil Goyal <gakhil@marvell.com>
Date: Tue, 11 Apr 2023 18:34:58 +0530
Subject: [PATCH] doc: fix auth algos in cryptoperf app

[ upstream commit eaea52c3cc997318c5587366caf22d7ab1b7578c ]

3des-cbc is not an authentication algorithm,
hence need to be removed.

Fixes: c6baca7adc94 ("doc: describe new performance test application")

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 doc/guides/tools/cryptoperf.rst | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/guides/tools/cryptoperf.rst b/doc/guides/tools/cryptoperf.rst
index ce93483291..1e63638932 100644
--- a/doc/guides/tools/cryptoperf.rst
+++ b/doc/guides/tools/cryptoperf.rst
@@ -234,5 +234,4 @@ The following are the application command-line options:
         of the following::
 
-           3des-cbc
            aes-cbc-mac
            aes-cmac
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:01.081171947 +0100
+++ 0050-doc-fix-auth-algos-in-cryptoperf-app.patch	2023-07-20 16:17:54.720750749 +0100
@@ -1 +1 @@
-From eaea52c3cc997318c5587366caf22d7ab1b7578c Mon Sep 17 00:00:00 2001
+From 54fa9bdcd506d163f2af300b61262196291fb81a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eaea52c3cc997318c5587366caf22d7ab1b7578c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index c77e253417..f30784674d 100644
+index ce93483291..1e63638932 100644
@@ -22 +23 @@
-@@ -233,5 +233,4 @@ The following are the application command-line options:
+@@ -234,5 +234,4 @@ The following are the application command-line options:


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

* patch 'crypto/scheduler: fix last element for valid args' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (48 preceding siblings ...)
  2023-07-20 15:18 ` patch 'doc: fix auth algos in cryptoperf app' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'test/crypto: fix return value for SNOW3G' " Kevin Traynor
                   ` (89 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Ciara Power; +Cc: Kai Ji, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/792da5fcf7ef24b40eec717a1bbb5d771a1546a4

Thanks.

Kevin

---
From 792da5fcf7ef24b40eec717a1bbb5d771a1546a4 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Fri, 14 Apr 2023 12:33:06 +0000
Subject: [PATCH] crypto/scheduler: fix last element for valid args

[ upstream commit 34019b7b65d4d936649fab29fdee45ec3ada1a8d ]

The list of valid arguments for Scheduler PMD should be terminated with
a NULL entry, as expected by rte_kvargs_parse.

Without this, if an invalid key name was used, a global buffer overflow
occurred resulting in a segmentation fault.

Fixes: 503e9c5afb38 ("crypto/scheduler: register as vdev driver")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
---
 drivers/crypto/scheduler/scheduler_pmd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index dd198080bf..f1cc2b8344 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -48,5 +48,6 @@ static const char * const scheduler_valid_params[] = {
 	RTE_CRYPTODEV_VDEV_SOCKET_ID,
 	RTE_CRYPTODEV_VDEV_COREMASK,
-	RTE_CRYPTODEV_VDEV_CORELIST
+	RTE_CRYPTODEV_VDEV_CORELIST,
+	NULL
 };
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:01.211035463 +0100
+++ 0051-crypto-scheduler-fix-last-element-for-valid-args.patch	2023-07-20 16:17:54.721750753 +0100
@@ -1 +1 @@
-From 34019b7b65d4d936649fab29fdee45ec3ada1a8d Mon Sep 17 00:00:00 2001
+From 792da5fcf7ef24b40eec717a1bbb5d771a1546a4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 34019b7b65d4d936649fab29fdee45ec3ada1a8d ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 9d1ce46622..4e8bbf0e09 100644
+index dd198080bf..f1cc2b8344 100644
@@ -25 +26 @@
-@@ -51,5 +51,6 @@ static const char * const scheduler_valid_params[] = {
+@@ -48,5 +48,6 @@ static const char * const scheduler_valid_params[] = {


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

* patch 'test/crypto: fix return value for SNOW3G' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (49 preceding siblings ...)
  2023-07-20 15:18 ` patch 'crypto/scheduler: fix last element for valid args' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'test/crypto: fix session creation check' " Kevin Traynor
                   ` (88 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Saoirse O'Donovan; +Cc: Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/c4583cd33a28c1ca02e7b7e17936d8ef07fe2d2b

Thanks.

Kevin

---
From c4583cd33a28c1ca02e7b7e17936d8ef07fe2d2b Mon Sep 17 00:00:00 2001
From: Saoirse O'Donovan <saoirse.odonovan@intel.com>
Date: Fri, 14 Apr 2023 13:55:26 +0000
Subject: [PATCH] test/crypto: fix return value for SNOW3G

[ upstream commit 7ae50175c7e785ff258c3dc0e44dc80e89af79ac ]

Unit tests were failing due to the return value of the decryption and
authentication functions not being handled correctly. This has now been
modified to return the expected test status.

Fixes: e23eccfd281e ("test/crypto: fix bitwise operator in a SNOW3G case")

Signed-off-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 app/test/test_cryptodev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index f3509bcb22..46764b045f 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6880,4 +6880,5 @@ static int
 test_snow3g_decryption_with_digest_test_case_1(void)
 {
+	int ret;
 	struct snow3g_hash_test_data snow3g_hash_data;
 	struct rte_cryptodev_info dev_info;
@@ -6898,6 +6899,7 @@ test_snow3g_decryption_with_digest_test_case_1(void)
 	snow3g_hash_test_vector_setup(&snow3g_test_case_7, &snow3g_hash_data);
 
-	if (test_snow3g_decryption(&snow3g_test_case_7))
-		return TEST_FAILED;
+	ret = test_snow3g_decryption(&snow3g_test_case_7);
+	if (ret != 0)
+		return ret;
 
 	return test_snow3g_authentication_verify(&snow3g_hash_data);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:01.320257860 +0100
+++ 0052-test-crypto-fix-return-value-for-SNOW3G.patch	2023-07-20 16:17:54.745750851 +0100
@@ -1 +1 @@
-From 7ae50175c7e785ff258c3dc0e44dc80e89af79ac Mon Sep 17 00:00:00 2001
+From c4583cd33a28c1ca02e7b7e17936d8ef07fe2d2b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7ae50175c7e785ff258c3dc0e44dc80e89af79ac ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 3376ed91a3..0b2ce5ea65 100644
+index f3509bcb22..46764b045f 100644
@@ -23 +24 @@
-@@ -6945,4 +6945,5 @@ static int
+@@ -6880,4 +6880,5 @@ static int
@@ -29 +30 @@
-@@ -6963,6 +6964,7 @@ test_snow3g_decryption_with_digest_test_case_1(void)
+@@ -6898,6 +6899,7 @@ test_snow3g_decryption_with_digest_test_case_1(void)


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

* patch 'test/crypto: fix session creation check' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (50 preceding siblings ...)
  2023-07-20 15:18 ` patch 'test/crypto: fix return value for SNOW3G' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'crypto/ipsec_mb: fix enqueue counter for SNOW3G' " Kevin Traynor
                   ` (87 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Tejasree Kondoj; +Cc: Anoob Joseph, Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/0428cfa1894ef3463cf16baf3e1b0b3b958250dc

Thanks.

Kevin

---
From 0428cfa1894ef3463cf16baf3e1b0b3b958250dc Mon Sep 17 00:00:00 2001
From: Tejasree Kondoj <ktejasree@marvell.com>
Date: Fri, 5 May 2023 22:23:48 +0530
Subject: [PATCH] test/crypto: fix session creation check

[ upstream commit 142a8f4c578e420b916f84649873f99bad985412 ]

Fixing return value if session failure occurs
due to unsupported feature.

Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto operations")

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Ciara Power <ciara.power@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 46764b045f..ccebeedcc6 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -8257,5 +8257,5 @@ test_authenticated_encryption(const struct aead_test_data *tdata)
 			tdata->aad.len, tdata->auth_tag.len,
 			tdata->iv.len);
-	if (retval < 0)
+	if (retval != TEST_SUCCESS)
 		return retval;
 
@@ -10905,5 +10905,5 @@ test_authenticated_decryption_sessionless(
 			tdata->aad.len, tdata->auth_tag.len,
 			tdata->iv.len);
-	if (retval < 0)
+	if (retval != TEST_SUCCESS)
 		return retval;
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:01.468196545 +0100
+++ 0053-test-crypto-fix-session-creation-check.patch	2023-07-20 16:17:54.768750945 +0100
@@ -1 +1 @@
-From 142a8f4c578e420b916f84649873f99bad985412 Mon Sep 17 00:00:00 2001
+From 0428cfa1894ef3463cf16baf3e1b0b3b958250dc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 142a8f4c578e420b916f84649873f99bad985412 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 0b2ce5ea65..bbc7e8dd18 100644
+index 46764b045f..ccebeedcc6 100644
@@ -23 +24 @@
-@@ -8779,5 +8779,5 @@ test_authenticated_encryption(const struct aead_test_data *tdata)
+@@ -8257,5 +8257,5 @@ test_authenticated_encryption(const struct aead_test_data *tdata)
@@ -30 +31 @@
-@@ -11483,5 +11483,5 @@ test_authenticated_decryption(const struct aead_test_data *tdata)
+@@ -10905,5 +10905,5 @@ test_authenticated_decryption_sessionless(


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

* patch 'crypto/ipsec_mb: fix enqueue counter for SNOW3G' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (51 preceding siblings ...)
  2023-07-20 15:18 ` patch 'test/crypto: fix session creation check' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'crypto/ipsec_mb: optimize allocation in session' " Kevin Traynor
                   ` (86 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Saoirse O'Donovan; +Cc: Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/2487cb35ca99c63a2803ce2eec5e1bc01cca6fdc

Thanks.

Kevin

---
From 2487cb35ca99c63a2803ce2eec5e1bc01cca6fdc Mon Sep 17 00:00:00 2001
From: Saoirse O'Donovan <saoirse.odonovan@intel.com>
Date: Thu, 20 Apr 2023 10:31:41 +0000
Subject: [PATCH] crypto/ipsec_mb: fix enqueue counter for SNOW3G

[ upstream commit dd6b0a910ff32b2b367c18ad97b045c8dc5aa882 ]

This patch removes enqueue op counter update from the process_op_bit
function where the process is now done in dequeue stage. The original
stats increment was incorrect as they shouldn't have been updated at all
in this function.

Fixes: 4f1cfda59ad3 ("crypto/ipsec_mb: move snow3g PMD")

Signed-off-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 drivers/crypto/ipsec_mb/pmd_snow3g.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/crypto/ipsec_mb/pmd_snow3g.c b/drivers/crypto/ipsec_mb/pmd_snow3g.c
index 9a85f46721..f365f7bc38 100644
--- a/drivers/crypto/ipsec_mb/pmd_snow3g.c
+++ b/drivers/crypto/ipsec_mb/pmd_snow3g.c
@@ -377,7 +377,8 @@ process_ops(struct rte_crypto_op **ops, struct snow3g_session *session,
 static int
 process_op_bit(struct rte_crypto_op *op, struct snow3g_session *session,
-		struct ipsec_mb_qp *qp, uint16_t *accumulated_enqueued_ops)
+		struct ipsec_mb_qp *qp)
 {
-	uint32_t enqueued_op, processed_op;
+	unsigned int processed_op;
+	int ret;
 
 	switch (session->op) {
@@ -425,7 +426,8 @@ process_op_bit(struct rte_crypto_op *op, struct snow3g_session *session,
 	if (unlikely(processed_op != 1))
 		return 0;
-	enqueued_op = rte_ring_enqueue(qp->ingress_queue, op);
-	qp->stats.enqueued_count += enqueued_op;
-	*accumulated_enqueued_ops += enqueued_op;
+
+	ret = rte_ring_enqueue(qp->ingress_queue, op);
+	if (ret != 0)
+		return ret;
 
 	return 1;
@@ -443,5 +445,4 @@ snow3g_pmd_dequeue_burst(void *queue_pair,
 	uint32_t i;
 	uint8_t burst_size = 0;
-	uint16_t enqueued_ops = 0;
 	uint8_t processed_ops;
 	uint32_t nb_dequeued;
@@ -483,6 +484,5 @@ snow3g_pmd_dequeue_burst(void *queue_pair,
 			}
 
-			processed_ops = process_op_bit(curr_c_op, curr_sess,
-							qp, &enqueued_ops);
+			processed_ops = process_op_bit(curr_c_op, curr_sess, qp);
 			if (processed_ops != 1)
 				break;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:01.605022191 +0100
+++ 0054-crypto-ipsec_mb-fix-enqueue-counter-for-SNOW3G.patch	2023-07-20 16:17:54.769750949 +0100
@@ -1 +1 @@
-From dd6b0a910ff32b2b367c18ad97b045c8dc5aa882 Mon Sep 17 00:00:00 2001
+From 2487cb35ca99c63a2803ce2eec5e1bc01cca6fdc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dd6b0a910ff32b2b367c18ad97b045c8dc5aa882 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 8ed069f428..e64df1a462 100644
+index 9a85f46721..f365f7bc38 100644
@@ -24 +25 @@
-@@ -373,7 +373,8 @@ process_ops(struct rte_crypto_op **ops, struct snow3g_session *session,
+@@ -377,7 +377,8 @@ process_ops(struct rte_crypto_op **ops, struct snow3g_session *session,
@@ -35 +36 @@
-@@ -422,7 +423,8 @@ process_op_bit(struct rte_crypto_op *op, struct snow3g_session *session,
+@@ -425,7 +426,8 @@ process_op_bit(struct rte_crypto_op *op, struct snow3g_session *session,
@@ -47 +48 @@
-@@ -440,5 +442,4 @@ snow3g_pmd_dequeue_burst(void *queue_pair,
+@@ -443,5 +445,4 @@ snow3g_pmd_dequeue_burst(void *queue_pair,
@@ -53 +54 @@
-@@ -480,6 +481,5 @@ snow3g_pmd_dequeue_burst(void *queue_pair,
+@@ -483,6 +484,5 @@ snow3g_pmd_dequeue_burst(void *queue_pair,


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

* patch 'crypto/ipsec_mb: optimize allocation in session' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (52 preceding siblings ...)
  2023-07-20 15:18 ` patch 'crypto/ipsec_mb: fix enqueue counter for SNOW3G' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'vhost: fix invalid call FD handling' " Kevin Traynor
                   ` (85 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Ciara Power; +Cc: Pablo de Lara, Kai Ji, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/f329acb88395b70f49562094ff1c31c47920bc1d

Thanks.

Kevin

---
From f329acb88395b70f49562094ff1c31c47920bc1d Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 17 May 2023 15:19:16 +0000
Subject: [PATCH] crypto/ipsec_mb: optimize allocation in session

[ upstream commit db7dc9070bf42593e3fca5f2f47ac0344e1b5cb6 ]

When configuring the session, use the queue pair mb_mgr that was already
allocated if possible. If this doesn't exist, then allocate a new mb_mgr.

This reduces unnecessary cycles creating an mb_mgr for every session
configured.

Fixes: c75542ae4200 ("crypto/ipsec_mb: introduce IPsec_mb framework")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
---
 drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
index 58ea4ee476..32d09cd5e3 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
@@ -320,7 +320,13 @@ ipsec_mb_sym_session_configure(
 	struct ipsec_mb_internals *pmd_data =
 		&ipsec_mb_pmds[internals->pmd_type];
-	IMB_MGR *mb_mgr = alloc_init_mb_mgr();
+	struct ipsec_mb_qp *qp = dev->data->queue_pairs[0];
+	IMB_MGR *mb_mgr;
 	int ret = 0;
 
+	if (qp != NULL)
+		mb_mgr = qp->mb_mgr;
+	else
+		mb_mgr = alloc_init_mb_mgr();
+
 	if (!mb_mgr)
 		return -ENOMEM;
@@ -328,5 +334,6 @@ ipsec_mb_sym_session_configure(
 	if (unlikely(sess == NULL)) {
 		IPSEC_MB_LOG(ERR, "invalid session struct");
-		free_mb_mgr(mb_mgr);
+		if (qp == NULL)
+			free_mb_mgr(mb_mgr);
 		return -EINVAL;
 	}
@@ -344,5 +351,6 @@ ipsec_mb_sym_session_configure(
 		/* Return session to mempool */
 		rte_mempool_put(mempool, sess_private_data);
-		free_mb_mgr(mb_mgr);
+		if (qp == NULL)
+			free_mb_mgr(mb_mgr);
 		return ret;
 	}
@@ -350,5 +358,6 @@ ipsec_mb_sym_session_configure(
 	set_sym_session_private_data(sess, dev->driver_id, sess_private_data);
 
-	free_mb_mgr(mb_mgr);
+	if (qp == NULL)
+		free_mb_mgr(mb_mgr);
 	return 0;
 }
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:01.733250564 +0100
+++ 0055-crypto-ipsec_mb-optimize-allocation-in-session.patch	2023-07-20 16:17:54.770750953 +0100
@@ -1 +1 @@
-From db7dc9070bf42593e3fca5f2f47ac0344e1b5cb6 Mon Sep 17 00:00:00 2001
+From f329acb88395b70f49562094ff1c31c47920bc1d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit db7dc9070bf42593e3fca5f2f47ac0344e1b5cb6 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 3e52f95674..30f919cd40 100644
+index 58ea4ee476..32d09cd5e3 100644
@@ -26 +27 @@
-@@ -435,7 +435,13 @@ ipsec_mb_sym_session_configure(
+@@ -320,7 +320,13 @@ ipsec_mb_sym_session_configure(
@@ -41 +42 @@
-@@ -443,5 +449,6 @@ ipsec_mb_sym_session_configure(
+@@ -328,5 +334,6 @@ ipsec_mb_sym_session_configure(
@@ -49,2 +50 @@
-@@ -453,9 +460,11 @@ ipsec_mb_sym_session_configure(
- 
+@@ -344,5 +351,6 @@ ipsec_mb_sym_session_configure(
@@ -51,0 +52 @@
+ 		rte_mempool_put(mempool, sess_private_data);
@@ -56,0 +58,2 @@
+@@ -350,5 +358,6 @@ ipsec_mb_sym_session_configure(
+ 	set_sym_session_private_data(sess, dev->driver_id, sess_private_data);


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

* patch 'vhost: fix invalid call FD handling' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (53 preceding siblings ...)
  2023-07-20 15:18 ` patch 'crypto/ipsec_mb: optimize allocation in session' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/virtio: propagate interrupt configuration error values' " Kevin Traynor
                   ` (84 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Eelco Chaudron, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/11a426ee6b59cc2a6ea4e32739636bbe13230af1

Thanks.

Kevin

---
From 11a426ee6b59cc2a6ea4e32739636bbe13230af1 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 1 Jun 2023 09:40:08 +0200
Subject: [PATCH] vhost: fix invalid call FD handling

[ upstream commit 0445f81883a3aa727ac7f8531beee2c225d3001a ]

This patch fixes cases where IRQ injection is tried while
the call FD is not valid, which should not happen.

Fixes: b1cce26af1dc ("vhost: add notification for packed ring")
Fixes: e37ff954405a ("vhost: support virtqueue interrupt/notification suppression")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/vhost/vhost.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h
index 4d0adb81b5..b9c387882c 100644
--- a/lib/vhost/vhost.h
+++ b/lib/vhost/vhost.h
@@ -787,7 +787,7 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
 			old, new);
 
-		if ((vhost_need_event(vhost_used_event(vq), new, old) &&
-					(vq->callfd >= 0)) ||
-				unlikely(!signalled_used_valid)) {
+		if ((vhost_need_event(vhost_used_event(vq), new, old) ||
+					unlikely(!signalled_used_valid)) &&
+				vq->callfd >= 0) {
 			eventfd_write(vq->callfd, (eventfd_t) 1);
 			if (dev->notify_ops->guest_notified)
@@ -852,5 +852,5 @@ vhost_vring_call_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)
 		kick = true;
 kick:
-	if (kick) {
+	if (kick && vq->callfd >= 0) {
 		eventfd_write(vq->callfd, (eventfd_t)1);
 		if (dev->notify_ops->guest_notified)
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:01.860146920 +0100
+++ 0056-vhost-fix-invalid-call-FD-handling.patch	2023-07-20 16:17:54.772750961 +0100
@@ -1 +1 @@
-From 0445f81883a3aa727ac7f8531beee2c225d3001a Mon Sep 17 00:00:00 2001
+From 11a426ee6b59cc2a6ea4e32739636bbe13230af1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0445f81883a3aa727ac7f8531beee2c225d3001a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 8554ab4002..40863f7bfd 100644
+index 4d0adb81b5..b9c387882c 100644
@@ -24,2 +25,2 @@
-@@ -903,7 +903,7 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
- 			__func__, vhost_used_event(vq), old, new);
+@@ -787,7 +787,7 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
+ 			old, new);
@@ -34,2 +35,2 @@
- 			if (dev->flags & VIRTIO_DEV_STATS_ENABLED)
-@@ -972,5 +972,5 @@ vhost_vring_call_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)
+ 			if (dev->notify_ops->guest_notified)
+@@ -852,5 +852,5 @@ vhost_vring_call_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)
@@ -41 +42 @@
- 		if (dev->flags & VIRTIO_DEV_STATS_ENABLED)
+ 		if (dev->notify_ops->guest_notified)


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

* patch 'net/virtio: propagate interrupt configuration error values' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (54 preceding siblings ...)
  2023-07-20 15:18 ` patch 'vhost: fix invalid call FD handling' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/virtio: fix initialization to return negative errno' " Kevin Traynor
                   ` (83 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Boleslav Stankevich; +Cc: Andrew Rybchenko, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/2c2d4e88a8a6e933f4969c34b8f2097e197fb35b

Thanks.

Kevin

---
From 2c2d4e88a8a6e933f4969c34b8f2097e197fb35b Mon Sep 17 00:00:00 2001
From: Boleslav Stankevich <boleslav.stankevich@oktetlabs.ru>
Date: Wed, 22 Mar 2023 13:23:24 +0300
Subject: [PATCH] net/virtio: propagate interrupt configuration error values

[ upstream commit 5a475f73b084029444c7b83229aa9a4b6b3dac0c ]

rte_intr_vec_list_alloc() may fail because of different reasons which
are indicated by different negative errno values.

Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")

Signed-off-by: Boleslav Stankevich <boleslav.stankevich@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index df9ee9fde6..8b9b3d951f 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1797,4 +1797,5 @@ virtio_configure_intr(struct rte_eth_dev *dev)
 {
 	struct virtio_hw *hw = dev->data->dev_private;
+	int ret;
 
 	if (!rte_intr_cap_multiple(dev->intr_handle)) {
@@ -1808,9 +1809,10 @@ virtio_configure_intr(struct rte_eth_dev *dev)
 	}
 
-	if (rte_intr_vec_list_alloc(dev->intr_handle, "intr_vec",
-				    hw->max_queue_pairs)) {
+	ret = rte_intr_vec_list_alloc(dev->intr_handle, "intr_vec",
+				      hw->max_queue_pairs);
+	if (ret < 0) {
 		PMD_INIT_LOG(ERR, "Failed to allocate %u rxq vectors",
 			     hw->max_queue_pairs);
-		return -ENOMEM;
+		return ret;
 	}
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:01.924975202 +0100
+++ 0057-net-virtio-propagate-interrupt-configuration-error-v.patch	2023-07-20 16:17:54.777750981 +0100
@@ -1 +1 @@
-From 5a475f73b084029444c7b83229aa9a4b6b3dac0c Mon Sep 17 00:00:00 2001
+From 2c2d4e88a8a6e933f4969c34b8f2097e197fb35b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5a475f73b084029444c7b83229aa9a4b6b3dac0c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 07e53d2b97..a81110e70a 100644
+index df9ee9fde6..8b9b3d951f 100644
@@ -23 +24 @@
-@@ -1354,4 +1354,5 @@ virtio_configure_intr(struct rte_eth_dev *dev)
+@@ -1797,4 +1797,5 @@ virtio_configure_intr(struct rte_eth_dev *dev)
@@ -29 +30 @@
-@@ -1365,9 +1366,10 @@ virtio_configure_intr(struct rte_eth_dev *dev)
+@@ -1808,9 +1809,10 @@ virtio_configure_intr(struct rte_eth_dev *dev)


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

* patch 'net/virtio: fix initialization to return negative errno' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (55 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/virtio: propagate interrupt configuration error values' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/mlx5: enhance error log for tunnel offloading' " Kevin Traynor
                   ` (82 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Boleslav Stankevich; +Cc: Andrew Rybchenko, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/32d51fbf8191fbddec34c5f3958b48dc715b982d

Thanks.

Kevin

---
From 32d51fbf8191fbddec34c5f3958b48dc715b982d Mon Sep 17 00:00:00 2001
From: Boleslav Stankevich <boleslav.stankevich@oktetlabs.ru>
Date: Wed, 22 Mar 2023 13:23:25 +0300
Subject: [PATCH] net/virtio: fix initialization to return negative errno

[ upstream commit 55e19d06f8a8a865297532071453c10544a07a24 ]

virtio_init_device() and called helper functions sometimes return -1
when return code should be negative errno. Fix all such cases to return
correct negative errno instead.

Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts")
Fixes: 0c9d66207054 ("net/virtio: support RSS")
Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0")
Fixes: 49d26d9e3f47 ("net/virtio: support MTU feature")

Signed-off-by: Boleslav Stankevich <boleslav.stankevich@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 33 +++++++++++++++++-------------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 8b9b3d951f..f4d13ec3a1 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1804,7 +1804,8 @@ virtio_configure_intr(struct rte_eth_dev *dev)
 	}
 
-	if (rte_intr_efd_enable(dev->intr_handle, dev->data->nb_rx_queues)) {
+	ret = rte_intr_efd_enable(dev->intr_handle, dev->data->nb_rx_queues);
+	if (ret < 0) {
 		PMD_INIT_LOG(ERR, "Fail to create eventfd");
-		return -1;
+		return ret;
 	}
 
@@ -1835,10 +1836,11 @@ virtio_configure_intr(struct rte_eth_dev *dev)
 	if (virtio_intr_enable(dev) < 0) {
 		PMD_DRV_LOG(ERR, "interrupt enable failed");
-		return -1;
+		return -EINVAL;
 	}
 
-	if (virtio_queues_bind_intr(dev) < 0) {
+	ret = virtio_queues_bind_intr(dev);
+	if (ret < 0) {
 		PMD_INIT_LOG(ERR, "Failed to bind queue/interrupt");
-		return -1;
+		return ret;
 	}
 
@@ -2163,5 +2165,5 @@ virtio_dev_rss_init(struct rte_eth_dev *eth_dev)
 		if (!hw->rss_key) {
 			PMD_INIT_LOG(ERR, "Failed to allocate RSS key");
-			return -1;
+			return -ENOMEM;
 		}
 	}
@@ -2185,5 +2187,5 @@ virtio_dev_rss_init(struct rte_eth_dev *eth_dev)
 		if (!hw->rss_reta) {
 			PMD_INIT_LOG(ERR, "Failed to allocate RSS reta");
-			return -1;
+			return -ENOMEM;
 		}
 
@@ -2225,5 +2227,5 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 	virtio_set_status(hw, VIRTIO_CONFIG_STATUS_DRIVER);
 	if (virtio_ethdev_negotiate_features(hw, req_features) < 0)
-		return -1;
+		return -EINVAL;
 
 	hw->weak_barriers = !virtio_with_feature(hw, VIRTIO_F_ORDER_PLATFORM);
@@ -2307,5 +2309,5 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 				PMD_INIT_LOG(ERR, "invalid max MTU value (%u)",
 						config->mtu);
-				return -1;
+				return -EINVAL;
 			}
 
@@ -2320,7 +2322,9 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 
 		hw->rss_hash_types = 0;
-		if (virtio_with_feature(hw, VIRTIO_NET_F_RSS))
-			if (virtio_dev_rss_init(eth_dev))
-				return -1;
+		if (virtio_with_feature(hw, VIRTIO_NET_F_RSS)) {
+			ret = virtio_dev_rss_init(eth_dev);
+			if (ret < 0)
+				return ret;
+		}
 
 		PMD_INIT_LOG(DEBUG, "config->max_virtqueue_pairs=%d",
@@ -2344,8 +2348,9 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 
 	if (eth_dev->data->dev_conf.intr_conf.rxq) {
-		if (virtio_configure_intr(eth_dev) < 0) {
+		ret = virtio_configure_intr(eth_dev);
+		if (ret < 0) {
 			PMD_INIT_LOG(ERR, "failed to configure interrupt");
 			virtio_free_queues(hw);
-			return -1;
+			return ret;
 		}
 	}
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:02.058773209 +0100
+++ 0058-net-virtio-fix-initialization-to-return-negative-err.patch	2023-07-20 16:17:54.782751002 +0100
@@ -1 +1 @@
-From 55e19d06f8a8a865297532071453c10544a07a24 Mon Sep 17 00:00:00 2001
+From 32d51fbf8191fbddec34c5f3958b48dc715b982d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 55e19d06f8a8a865297532071453c10544a07a24 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index a81110e70a..2c23f1c00e 100644
+index 8b9b3d951f..f4d13ec3a1 100644
@@ -27 +28 @@
-@@ -1361,7 +1361,8 @@ virtio_configure_intr(struct rte_eth_dev *dev)
+@@ -1804,7 +1804,8 @@ virtio_configure_intr(struct rte_eth_dev *dev)
@@ -38 +39 @@
-@@ -1392,10 +1393,11 @@ virtio_configure_intr(struct rte_eth_dev *dev)
+@@ -1835,10 +1836,11 @@ virtio_configure_intr(struct rte_eth_dev *dev)
@@ -53 +54 @@
-@@ -1720,5 +1722,5 @@ virtio_dev_rss_init(struct rte_eth_dev *eth_dev)
+@@ -2163,5 +2165,5 @@ virtio_dev_rss_init(struct rte_eth_dev *eth_dev)
@@ -60 +61 @@
-@@ -1742,5 +1744,5 @@ virtio_dev_rss_init(struct rte_eth_dev *eth_dev)
+@@ -2185,5 +2187,5 @@ virtio_dev_rss_init(struct rte_eth_dev *eth_dev)
@@ -67 +68 @@
-@@ -1782,5 +1784,5 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
+@@ -2225,5 +2227,5 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
@@ -74 +75 @@
-@@ -1864,5 +1866,5 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
+@@ -2307,5 +2309,5 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
@@ -81 +82 @@
-@@ -1877,7 +1879,9 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
+@@ -2320,7 +2322,9 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
@@ -94 +95 @@
-@@ -1901,8 +1905,9 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
+@@ -2344,8 +2348,9 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)


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

* patch 'net/mlx5: enhance error log for tunnel offloading' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (56 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/virtio: fix initialization to return negative errno' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/mlx5: fix duplicated tag index matching in SWS' " Kevin Traynor
                   ` (81 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: David Marchand; +Cc: Gregory Etelson, Raslan Darawsheh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/2681bfff6d10c06d0086b128872576266ea8f58f

Thanks.

Kevin

---
From 2681bfff6d10c06d0086b128872576266ea8f58f Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 27 Apr 2023 13:55:34 +0200
Subject: [PATCH] net/mlx5: enhance error log for tunnel offloading

[ upstream commit c9fecc1cc2886bcd626a656a5493841363dec6dd ]

Tunnel offloading is linked to running a port with the non-obvious
dv_xmeta_en=3 devargs. Hint at it for "normal" users.

Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Raslan Darawsheh <rasland@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 79b4847f39..1e147c2e0d 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -9698,5 +9698,5 @@ mlx5_flow_tunnel_validate(struct rte_eth_dev *dev,
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
-					  "tunnel offload was not activated");
+					  "tunnel offload was not activated, consider setting dv_xmeta_en=3");
 	if (!tunnel)
 		return rte_flow_error_set(error, EINVAL,
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:02.138025977 +0100
+++ 0059-net-mlx5-enhance-error-log-for-tunnel-offloading.patch	2023-07-20 16:17:54.799751071 +0100
@@ -1 +1 @@
-From c9fecc1cc2886bcd626a656a5493841363dec6dd Mon Sep 17 00:00:00 2001
+From 2681bfff6d10c06d0086b128872576266ea8f58f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c9fecc1cc2886bcd626a656a5493841363dec6dd ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 156f826b8a..c32783efb2 100644
+index 79b4847f39..1e147c2e0d 100644
@@ -23 +24 @@
-@@ -11330,5 +11330,5 @@ mlx5_flow_tunnel_validate(struct rte_eth_dev *dev,
+@@ -9698,5 +9698,5 @@ mlx5_flow_tunnel_validate(struct rte_eth_dev *dev,


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

* patch 'net/mlx5: fix duplicated tag index matching in SWS' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (57 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/mlx5: enhance error log for tunnel offloading' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'common/cnxk: fix IPsec IPv6 tunnel address byte swap' " Kevin Traynor
                   ` (80 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Rongwei Liu; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/baff3174c643cc2e27a799ba2b7c76d20c9df7c3

Thanks.

Kevin

---
From baff3174c643cc2e27a799ba2b7c76d20c9df7c3 Mon Sep 17 00:00:00 2001
From: Rongwei Liu <rongweil@nvidia.com>
Date: Tue, 16 May 2023 08:43:29 +0300
Subject: [PATCH] net/mlx5: fix duplicated tag index matching in SWS

[ upstream commit d5a7699c10651cb1cea2b18f94099e984c466b75 ]

Duplicated matching tag index is not allowed in SWS
because they are using the same matching field in the
underlayer layout.
For example: "tag index is 0 data spec 0x12 mask 0xff /
tag index is 0 data spec 0x1234 mask 0xffff" is paradoxical
matching condition and "tag index is 0 data spec 0x12 mask 0xff /
tag index is 0 data spec 0x3400 mask 0xff00" should be "tag index
is 0 data spec 0x3412 mask 0xffff"

Add checking logic against it.

Fixes: e554b672aa05 ("net/mlx5: support flow tag")

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index d2d1fba8a0..356248d51d 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -2078,4 +2078,5 @@ static int
 flow_dv_validate_item_tag(struct rte_eth_dev *dev,
 			  const struct rte_flow_item *item,
+			  uint32_t *tag_bitmap,
 			  const struct rte_flow_attr *attr __rte_unused,
 			  struct rte_flow_error *error)
@@ -2121,4 +2122,10 @@ flow_dv_validate_item_tag(struct rte_eth_dev *dev,
 		return ret;
 	MLX5_ASSERT(ret != REG_NON);
+	if (*tag_bitmap & (1 << ret))
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ITEM_SPEC,
+					  item->spec,
+					  "Duplicated tag index");
+	*tag_bitmap |= 1 << ret;
 	return 0;
 }
@@ -2131,4 +2138,6 @@ flow_dv_validate_item_tag(struct rte_eth_dev *dev,
  * @param[in] item
  *   Item specification.
+ * @param[in] tag_bitmap
+ *   Tag index bitmap.
  * @param[in] attr
  *   Attributes of flow that includes this item.
@@ -6858,7 +6867,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	bool shared_count = false;
 	uint16_t udp_dport = 0;
-	uint32_t tag_id = 0;
+	uint32_t tag_id = 0, tag_bitmap = 0;
 	const struct rte_flow_action_age *non_shared_age = NULL;
 	const struct rte_flow_action_count *count = NULL;
+	const struct mlx5_rte_flow_item_tag *mlx5_tag;
 	struct mlx5_priv *act_priv = NULL;
 	int aso_after_sample = 0;
@@ -7154,5 +7164,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			break;
 		case RTE_FLOW_ITEM_TYPE_TAG:
-			ret = flow_dv_validate_item_tag(dev, items,
+			ret = flow_dv_validate_item_tag(dev, items, &tag_bitmap,
 							attr, error);
 			if (ret < 0)
@@ -7164,4 +7174,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			break;
 		case MLX5_RTE_FLOW_ITEM_TYPE_TAG:
+			mlx5_tag = (const struct mlx5_rte_flow_item_tag *)items->spec;
+			if (tag_bitmap & (1 << mlx5_tag->id))
+				return rte_flow_error_set(error, EINVAL,
+							  RTE_FLOW_ERROR_TYPE_ITEM_SPEC,
+							  items->spec,
+							  "Duplicated tag index");
+			tag_bitmap |= 1 << mlx5_tag->id;
 			break;
 		case RTE_FLOW_ITEM_TYPE_GTP:
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:02.264482364 +0100
+++ 0060-net-mlx5-fix-duplicated-tag-index-matching-in-SWS.patch	2023-07-20 16:17:54.829751194 +0100
@@ -1 +1 @@
-From d5a7699c10651cb1cea2b18f94099e984c466b75 Mon Sep 17 00:00:00 2001
+From baff3174c643cc2e27a799ba2b7c76d20c9df7c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d5a7699c10651cb1cea2b18f94099e984c466b75 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 9ef9f13cbb..27e8b3a5a9 100644
+index d2d1fba8a0..356248d51d 100644
@@ -30,8 +31 @@
-@@ -2296,4 +2296,6 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
-  * @param[in] item
-  *   Item specification.
-+ * @param[in] tag_bitmap
-+ *   Tag index bitmap.
-  * @param[in] attr
-  *   Attributes of flow that includes this item.
-@@ -2307,4 +2309,5 @@ static int
+@@ -2078,4 +2078,5 @@ static int
@@ -43 +37 @@
-@@ -2350,4 +2353,10 @@ flow_dv_validate_item_tag(struct rte_eth_dev *dev,
+@@ -2121,4 +2122,10 @@ flow_dv_validate_item_tag(struct rte_eth_dev *dev,
@@ -54 +48,8 @@
-@@ -7281,7 +7290,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -2131,4 +2138,6 @@ flow_dv_validate_item_tag(struct rte_eth_dev *dev,
+  * @param[in] item
+  *   Item specification.
++ * @param[in] tag_bitmap
++ *   Tag index bitmap.
+  * @param[in] attr
+  *   Attributes of flow that includes this item.
+@@ -6858,7 +6867,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -64 +65 @@
-@@ -7612,5 +7622,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7154,5 +7164,5 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -71 +72 @@
-@@ -7622,4 +7632,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7164,4 +7174,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,


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

* patch 'common/cnxk: fix IPsec IPv6 tunnel address byte swap' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (58 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/mlx5: fix duplicated tag index matching in SWS' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'common/cnxk: fix inline device VF identification' " Kevin Traynor
                   ` (79 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Rahul Bhansali; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/6f685b45a69824160b39577d58973deb1a77e90c

Thanks.

Kevin

---
From 6f685b45a69824160b39577d58973deb1a77e90c Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Thu, 18 May 2023 21:18:58 +0530
Subject: [PATCH] common/cnxk: fix IPsec IPv6 tunnel address byte swap

[ upstream commit 733e9db805c3317e2d158906afa4385744855844 ]

Fix the IPsec IPv6 tunnel address bytes swap during SA
configurations in session create/update.

Fixes: 78d03027f2cc ("common/cnxk: add IPsec common code")

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
 drivers/common/cnxk/cnxk_security.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/common/cnxk/cnxk_security.c b/drivers/common/cnxk/cnxk_security.c
index 787138b059..7f4f0a643b 100644
--- a/drivers/common/cnxk/cnxk_security.c
+++ b/drivers/common/cnxk/cnxk_security.c
@@ -202,4 +202,12 @@ ot_ipsec_inb_ctx_size(struct roc_ot_ipsec_inb_sa *sa)
 }
 
+static void
+ot_ipsec_update_ipv6_addr_endianness(uint64_t *addr)
+{
+	*addr = rte_be_to_cpu_64(*addr);
+	addr++;
+	*addr = rte_be_to_cpu_64(*addr);
+}
+
 static int
 ot_ipsec_inb_tunnel_hdr_fill(struct roc_ot_ipsec_inb_sa *sa,
@@ -238,4 +246,8 @@ ot_ipsec_inb_tunnel_hdr_fill(struct roc_ot_ipsec_inb_sa *sa,
 		       sizeof(struct in6_addr));
 
+		/* IP Source and Dest are in LE/CPU endian */
+		ot_ipsec_update_ipv6_addr_endianness((uint64_t *)&sa->outer_hdr.ipv6.src_addr);
+		ot_ipsec_update_ipv6_addr_endianness((uint64_t *)&sa->outer_hdr.ipv6.dst_addr);
+
 		break;
 	default:
@@ -422,4 +434,8 @@ cnxk_ot_ipsec_outb_sa_fill(struct roc_ot_ipsec_outb_sa *sa,
 		       sizeof(struct in6_addr));
 
+		/* IP Source and Dest are in LE/CPU endian */
+		ot_ipsec_update_ipv6_addr_endianness((uint64_t *)&sa->outer_hdr.ipv6.src_addr);
+		ot_ipsec_update_ipv6_addr_endianness((uint64_t *)&sa->outer_hdr.ipv6.dst_addr);
+
 		/* Outer header flow label source */
 		if (!ipsec_xfrm->options.copy_flabel) {
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:02.397138585 +0100
+++ 0061-common-cnxk-fix-IPsec-IPv6-tunnel-address-byte-swap.patch	2023-07-20 16:17:54.831751202 +0100
@@ -1 +1 @@
-From 733e9db805c3317e2d158906afa4385744855844 Mon Sep 17 00:00:00 2001
+From 6f685b45a69824160b39577d58973deb1a77e90c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 733e9db805c3317e2d158906afa4385744855844 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 79427d48fe..13ca2c7791 100644
+index 787138b059..7f4f0a643b 100644
@@ -21 +22 @@
-@@ -275,4 +275,12 @@ ot_ipsec_inb_ctx_size(struct roc_ot_ipsec_inb_sa *sa)
+@@ -202,4 +202,12 @@ ot_ipsec_inb_ctx_size(struct roc_ot_ipsec_inb_sa *sa)
@@ -34 +35 @@
-@@ -311,4 +319,8 @@ ot_ipsec_inb_tunnel_hdr_fill(struct roc_ot_ipsec_inb_sa *sa,
+@@ -238,4 +246,8 @@ ot_ipsec_inb_tunnel_hdr_fill(struct roc_ot_ipsec_inb_sa *sa,
@@ -43 +44 @@
-@@ -500,4 +512,8 @@ cnxk_ot_ipsec_outb_sa_fill(struct roc_ot_ipsec_outb_sa *sa,
+@@ -422,4 +434,8 @@ cnxk_ot_ipsec_outb_sa_fill(struct roc_ot_ipsec_outb_sa *sa,


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

* patch 'common/cnxk: fix inline device VF identification' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (59 preceding siblings ...)
  2023-07-20 15:18 ` patch 'common/cnxk: fix IPsec IPv6 tunnel address byte swap' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/qede: fix RSS indirection table initialization' " Kevin Traynor
                   ` (78 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/498f380f8c4148762ed80d9438560268f942136c

Thanks.

Kevin

---
From 498f380f8c4148762ed80d9438560268f942136c Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Thu, 25 May 2023 15:28:56 +0530
Subject: [PATCH] common/cnxk: fix inline device VF identification

[ upstream commit d71d40c1051ba22b8f0c1536225810d7d65dfefc ]

Fix inline device VF identification so that the right
mailbox region is used.

Fixes: ee48f711f3b0 ("common/cnxk: support NIX inline inbound and outbound setup")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/common/cnxk/roc_dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c
index 9a869698c4..0a9c722db3 100644
--- a/drivers/common/cnxk/roc_dev.c
+++ b/drivers/common/cnxk/roc_dev.c
@@ -952,4 +952,5 @@ dev_vf_hwcap_update(struct plt_pci_device *pci_dev, struct dev *dev)
 	case PCI_DEVID_CNXK_RVU_VF:
 	case PCI_DEVID_CNXK_RVU_SDP_VF:
+	case PCI_DEVID_CNXK_RVU_NIX_INL_VF:
 		dev->hwcap |= DEV_HWCAP_F_VF;
 		break;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:02.479213522 +0100
+++ 0062-common-cnxk-fix-inline-device-VF-identification.patch	2023-07-20 16:17:54.833751210 +0100
@@ -1 +1 @@
-From d71d40c1051ba22b8f0c1536225810d7d65dfefc Mon Sep 17 00:00:00 2001
+From 498f380f8c4148762ed80d9438560268f942136c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d71d40c1051ba22b8f0c1536225810d7d65dfefc ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 3125f9dda2..d87b00e7e8 100644
+index 9a869698c4..0a9c722db3 100644
@@ -21 +22 @@
-@@ -1002,4 +1002,5 @@ dev_vf_hwcap_update(struct plt_pci_device *pci_dev, struct dev *dev)
+@@ -952,4 +952,5 @@ dev_vf_hwcap_update(struct plt_pci_device *pci_dev, struct dev *dev)


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

* patch 'net/qede: fix RSS indirection table initialization' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (60 preceding siblings ...)
  2023-07-20 15:18 ` patch 'common/cnxk: fix inline device VF identification' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'doc: fix typo in cnxk platform guide' " Kevin Traynor
                   ` (77 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Devendra Singh Rawat; +Cc: Alok Prasad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/a56289503ef749f3b76cd8be3ceaa722c6ce384b

Thanks.

Kevin

---
From a56289503ef749f3b76cd8be3ceaa722c6ce384b Mon Sep 17 00:00:00 2001
From: Devendra Singh Rawat <dsinghrawat@marvell.com>
Date: Thu, 25 May 2023 19:24:21 +0530
Subject: [PATCH] net/qede: fix RSS indirection table initialization

[ upstream commit 189183f4d7f2a22b9335ff8eede1c763bb356e5c ]

RSS indirection table was not updated for VF ports during RSS hash
update, this resulted in device start failure.
This fix sets update RSS indirection table in VFPF channel request,
sent for updating RSS hash for VF.

Fixes: 7ab35bf6b97b ("net/qede: fix RSS")

Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Signed-off-by: Alok Prasad <palok@marvell.com>
---
 drivers/net/qede/qede_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 2a3123f0c8..153a540dbe 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2143,4 +2143,5 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
 	}
 
+	rss_params.update_rss_ind_table = 1;
 	rss_params.update_rss_config = 1;
 	/* tbl_size has to be set with capabilities */
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:02.583291640 +0100
+++ 0063-net-qede-fix-RSS-indirection-table-initialization.patch	2023-07-20 16:17:54.838751231 +0100
@@ -1 +1 @@
-From 189183f4d7f2a22b9335ff8eede1c763bb356e5c Mon Sep 17 00:00:00 2001
+From a56289503ef749f3b76cd8be3ceaa722c6ce384b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 189183f4d7f2a22b9335ff8eede1c763bb356e5c ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index a4923670d6..22cd470646 100644
+index 2a3123f0c8..153a540dbe 100644


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

* patch 'doc: fix typo in cnxk platform guide' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (61 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/qede: fix RSS indirection table initialization' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/i40e: fix Rx data buffer size' " Kevin Traynor
                   ` (76 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Thierry Herbelot; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/1173611e55cd4faea56acec380fe991c046ed62a

Thanks.

Kevin

---
From 1173611e55cd4faea56acec380fe991c046ed62a Mon Sep 17 00:00:00 2001
From: Thierry Herbelot <thierry.herbelot@6wind.com>
Date: Fri, 2 Jun 2023 18:21:45 +0200
Subject: [PATCH] doc: fix typo in cnxk platform guide

[ upstream commit 443000992bc937d4686a37e4eef9c66b6b3ce642 ]

The Linux kernel option has an added underscore.

Fixes: 14ad4f018453 ("doc: add Marvell OCTEON TX2 platform guide")

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
 doc/guides/platform/cnxk.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/platform/cnxk.rst b/doc/guides/platform/cnxk.rst
index 149dbda09a..a2667acd35 100644
--- a/doc/guides/platform/cnxk.rst
+++ b/doc/guides/platform/cnxk.rst
@@ -245,5 +245,5 @@ context or stats using debugfs.
 Enable ``debugfs`` by:
 
-1. Compile kernel with debugfs enabled, i.e ``CONFIG_DEBUGFS=y``.
+1. Compile kernel with debugfs enabled, i.e ``CONFIG_DEBUG_FS=y``.
 2. Boot OCTEON CN9K/CN10K with debugfs supported kernel.
 3. Verify ``debugfs`` mounted by default "mount | grep -i debugfs" or mount it manually by using.
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:02.672229695 +0100
+++ 0064-doc-fix-typo-in-cnxk-platform-guide.patch	2023-07-20 16:17:54.839751235 +0100
@@ -1 +1 @@
-From 443000992bc937d4686a37e4eef9c66b6b3ce642 Mon Sep 17 00:00:00 2001
+From 1173611e55cd4faea56acec380fe991c046ed62a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 443000992bc937d4686a37e4eef9c66b6b3ce642 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 4a1966c66b..b3aa4de09d 100644
+index 149dbda09a..a2667acd35 100644
@@ -20 +21 @@
-@@ -259,5 +259,5 @@ context or stats using debugfs.
+@@ -245,5 +245,5 @@ context or stats using debugfs.


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

* patch 'net/i40e: fix Rx data buffer size' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (62 preceding siblings ...)
  2023-07-20 15:18 ` patch 'doc: fix typo in cnxk platform guide' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/ice: " Kevin Traynor
                   ` (75 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/d5755af28b88ef9b9a072d74412e803f54e57eaa

Thanks.

Kevin

---
From d5755af28b88ef9b9a072d74412e803f54e57eaa Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Fri, 14 Apr 2023 13:47:40 +0800
Subject: [PATCH] net/i40e: fix Rx data buffer size

[ upstream commit ff2ec0ce04739240205628207881a91e1e330cb7 ]

According to hardware spec, the data buffer size should not
be greater than 16K - 128.

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

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_rxtx.c | 2 ++
 drivers/net/i40e/i40e_rxtx.h | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 9a00a9b71e..aa188bff14 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2905,4 +2905,6 @@ i40e_rx_queue_config(struct i40e_rx_queue *rxq)
 		rxq->rx_buf_len = RTE_ALIGN_FLOOR(buf_size,
 			(1 << I40E_RXQ_CTX_DBUFF_SHIFT));
+		rxq->rx_buf_len = RTE_MIN(rxq->rx_buf_len,
+					  I40E_RX_MAX_DATA_BUF_SIZE);
 		rxq->hs_mode = i40e_header_split_none;
 		break;
diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h
index 5e6eecc501..0376c219be 100644
--- a/drivers/net/i40e/i40e_rxtx.h
+++ b/drivers/net/i40e/i40e_rxtx.h
@@ -22,4 +22,7 @@
 #define	I40E_ALIGN_RING_DESC	32
 
+/* Max data buffer size must be 16K - 128 bytes */
+#define I40E_RX_MAX_DATA_BUF_SIZE	(16 * 1024 - 128)
+
 #define	I40E_MIN_RING_DESC	64
 #define	I40E_MAX_RING_DESC	4096
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:02.809025104 +0100
+++ 0065-net-i40e-fix-Rx-data-buffer-size.patch	2023-07-20 16:17:54.847751267 +0100
@@ -1 +1 @@
-From ff2ec0ce04739240205628207881a91e1e330cb7 Mon Sep 17 00:00:00 2001
+From d5755af28b88ef9b9a072d74412e803f54e57eaa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff2ec0ce04739240205628207881a91e1e330cb7 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 788ffb51c2..fbbefb5015 100644
+index 9a00a9b71e..aa188bff14 100644


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

* patch 'net/ice: fix Rx data buffer size' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (63 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/i40e: fix Rx data buffer size' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/iavf: " Kevin Traynor
                   ` (74 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/54b08280e728e709b654a31597aa2d119379dfd6

Thanks.

Kevin

---
From 54b08280e728e709b654a31597aa2d119379dfd6 Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Fri, 14 Apr 2023 13:47:41 +0800
Subject: [PATCH] net/ice: fix Rx data buffer size

[ upstream commit 9a5c9dc475428c7d2c74383c0903541ab80144ea ]

This patch does two fixes.

1. According to hardware spec, the data buffer size should not
be greater than 16K - 128.

2. Replace RTE_ALIGN with RTE_ALIGN_FLOOR according to [1].

[1] Commit c9c45beb1b97 ("net/iavf: fix Rx queue buffer size alignment")

Fixes: 50370662b727 ("net/ice: support device and queue ops")
Fixes: 1b009275e2c8 ("net/ice: add Rx queue init in DCF")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_dcf_ethdev.c | 3 ++-
 drivers/net/ice/ice_rxtx.c       | 3 ++-
 drivers/net/ice/ice_rxtx.h       | 3 +++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 6e9e80c1df..20888f1980 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -66,5 +66,6 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq)
 	buf_size = rte_pktmbuf_data_room_size(rxq->mp) - RTE_PKTMBUF_HEADROOM;
 	rxq->rx_hdr_len = 0;
-	rxq->rx_buf_len = RTE_ALIGN(buf_size, (1 << ICE_RLAN_CTX_DBUF_S));
+	rxq->rx_buf_len = RTE_ALIGN_FLOOR(buf_size, (1 << ICE_RLAN_CTX_DBUF_S));
+	rxq->rx_buf_len = RTE_MIN(rxq->rx_buf_len, ICE_RX_MAX_DATA_BUF_SIZE);
 	max_pkt_len = RTE_MIN(ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len,
 			      dev->data->mtu + ICE_ETH_OVERHEAD);
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index ae2701f5e4..f0ca5557ce 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -284,5 +284,6 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
 			      RTE_PKTMBUF_HEADROOM);
 	rxq->rx_hdr_len = 0;
-	rxq->rx_buf_len = RTE_ALIGN(buf_size, (1 << ICE_RLAN_CTX_DBUF_S));
+	rxq->rx_buf_len = RTE_ALIGN_FLOOR(buf_size, (1 << ICE_RLAN_CTX_DBUF_S));
+	rxq->rx_buf_len = RTE_MIN(rxq->rx_buf_len, ICE_RX_MAX_DATA_BUF_SIZE);
 	rxq->max_pkt_len =
 		RTE_MIN((uint32_t)ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len,
diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h
index e86c8977e4..1cc93c9d3c 100644
--- a/drivers/net/ice/ice_rxtx.h
+++ b/drivers/net/ice/ice_rxtx.h
@@ -46,4 +46,7 @@ extern uint64_t ice_timestamp_dynflag;
 extern int ice_timestamp_dynfield_offset;
 
+/* Max data buffer size must be 16K - 128 bytes */
+#define ICE_RX_MAX_DATA_BUF_SIZE	(16 * 1024 - 128)
+
 typedef void (*ice_rx_release_mbufs_t)(struct ice_rx_queue *rxq);
 typedef void (*ice_tx_release_mbufs_t)(struct ice_tx_queue *txq);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:02.890519100 +0100
+++ 0066-net-ice-fix-Rx-data-buffer-size.patch	2023-07-20 16:17:54.857751308 +0100
@@ -1 +1 @@
-From 9a5c9dc475428c7d2c74383c0903541ab80144ea Mon Sep 17 00:00:00 2001
+From 54b08280e728e709b654a31597aa2d119379dfd6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9a5c9dc475428c7d2c74383c0903541ab80144ea ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 13ff24552d..76b28bface 100644
+index 6e9e80c1df..20888f1980 100644
@@ -31 +32 @@
-@@ -115,5 +115,6 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq)
+@@ -66,5 +66,6 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq)
@@ -40 +41 @@
-index 0ea0045836..560c1a4af7 100644
+index ae2701f5e4..f0ca5557ce 100644
@@ -43,2 +44 @@
-@@ -260,5 +260,6 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
- 	buf_size = (uint16_t)(rte_pktmbuf_data_room_size(rxq->mp) -
+@@ -284,5 +284,6 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
@@ -45,0 +46 @@
+ 	rxq->rx_hdr_len = 0;
@@ -52 +53 @@
-index 94f6bcf3d1..89569029e1 100644
+index e86c8977e4..1cc93c9d3c 100644
@@ -55,2 +56,2 @@
-@@ -52,4 +52,7 @@ extern int ice_timestamp_dynfield_offset;
- #define ICE_RX_HDR_BUF_SIZE    (2048 - 64)
+@@ -46,4 +46,7 @@ extern uint64_t ice_timestamp_dynflag;
+ extern int ice_timestamp_dynfield_offset;
@@ -61,2 +62,2 @@
- #define ICE_HEADER_SPLIT_ENA   BIT(0)
- 
+ typedef void (*ice_rx_release_mbufs_t)(struct ice_rx_queue *rxq);
+ typedef void (*ice_tx_release_mbufs_t)(struct ice_tx_queue *txq);


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

* patch 'net/iavf: fix Rx data buffer size' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (64 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/ice: " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/ice: fix statistics' " Kevin Traynor
                   ` (73 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/0a060a3c1ee0eed54d8f77fe7d4e156e648505de

Thanks.

Kevin

---
From 0a060a3c1ee0eed54d8f77fe7d4e156e648505de Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Fri, 14 Apr 2023 13:47:42 +0800
Subject: [PATCH] net/iavf: fix Rx data buffer size

[ upstream commit c5549f1d9b1bf2bf2b09517daf89c84fbf5b18e0 ]

According to hardware spec, the data buffer size should not
be greater than 16K - 128.

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

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 1 +
 drivers/net/iavf/iavf_rxtx.h | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 2211297220..19b46b2a5d 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -652,4 +652,5 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	len = rte_pktmbuf_data_room_size(rxq->mp) - RTE_PKTMBUF_HEADROOM;
 	rxq->rx_buf_len = RTE_ALIGN_FLOOR(len, (1 << IAVF_RXQ_CTX_DBUFF_SHIFT));
+	rxq->rx_buf_len = RTE_MIN(rxq->rx_buf_len, IAVF_RX_MAX_DATA_BUF_SIZE);
 
 	/* Allocate the software ring. */
diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index 743ff5e9d8..ebf362e0ba 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -17,4 +17,7 @@
 #define IAVF_RX_MAX_BURST         32
 
+/* Max data buffer size must be 16K - 128 bytes */
+#define IAVF_RX_MAX_DATA_BUF_SIZE (16 * 1024 - 128)
+
 /* used for Vector PMD */
 #define IAVF_VPMD_RX_MAX_BURST    32
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:03.020214608 +0100
+++ 0067-net-iavf-fix-Rx-data-buffer-size.patch	2023-07-20 16:17:54.863751333 +0100
@@ -1 +1 @@
-From c5549f1d9b1bf2bf2b09517daf89c84fbf5b18e0 Mon Sep 17 00:00:00 2001
+From 0a060a3c1ee0eed54d8f77fe7d4e156e648505de Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c5549f1d9b1bf2bf2b09517daf89c84fbf5b18e0 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b1d0fbceb6..0db3aabd92 100644
+index 2211297220..19b46b2a5d 100644
@@ -23 +24 @@
-@@ -698,4 +698,5 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+@@ -652,4 +652,5 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
@@ -30 +31 @@
-index 09e2127db0..f205a2aaf1 100644
+index 743ff5e9d8..ebf362e0ba 100644


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

* patch 'net/ice: fix statistics' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (65 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/iavf: " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/ice: fix DCF RSS initialization' " Kevin Traynor
                   ` (72 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Mingjin Ye; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/4408ee17167a109f0e9cca073d959b0f8a6cb04b

Thanks.

Kevin

---
From 4408ee17167a109f0e9cca073d959b0f8a6cb04b Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Thu, 11 May 2023 02:10:55 +0000
Subject: [PATCH] net/ice: fix statistics

[ upstream commit a47ef8640a677a3973de48b8075f1fcd6a0ee68e ]

When the stats_get api is called for the first time in pmd, the offset
of the stats register is not recorded. That results in all the obtained
count values being 0.

This patch adds reset statistics before dev_init returning. That avoids
some noise being counted.

Fixes: 12443386a0b0 ("net/ice: support flex Rx descriptor RxDID22")

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 08edca79ce..b0efacfd0f 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2317,4 +2317,7 @@ ice_dev_init(struct rte_eth_dev *dev)
 	pf->supported_rxdid = ice_get_supported_rxdid(hw);
 
+	/* reset all stats of the device, including pf and main vsi */
+	ice_stats_reset(dev);
+
 	return 0;
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:03.181207424 +0100
+++ 0068-net-ice-fix-statistics.patch	2023-07-20 16:17:54.871751365 +0100
@@ -1 +1 @@
-From a47ef8640a677a3973de48b8075f1fcd6a0ee68e Mon Sep 17 00:00:00 2001
+From 4408ee17167a109f0e9cca073d959b0f8a6cb04b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a47ef8640a677a3973de48b8075f1fcd6a0ee68e ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index e03bbd81a1..2345f9f29c 100644
+index 08edca79ce..b0efacfd0f 100644
@@ -26 +27 @@
-@@ -2441,4 +2441,7 @@ ice_dev_init(struct rte_eth_dev *dev)
+@@ -2317,4 +2317,7 @@ ice_dev_init(struct rte_eth_dev *dev)


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

* patch 'net/ice: fix DCF RSS initialization' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (66 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/ice: fix statistics' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/iavf: release large VF when closing device' " Kevin Traynor
                   ` (71 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Tyler Retzlaff, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/9d5f649aa501bf569f605ce45283d81dfc55b883

Thanks.

Kevin

---
From 9d5f649aa501bf569f605ce45283d81dfc55b883 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Tue, 9 May 2023 09:22:09 +0800
Subject: [PATCH] net/ice: fix DCF RSS initialization

[ upstream commit f0be05f4c49129c8b7a34fa6505586b8a646ead1 ]

The i variable type is uint8_t which causes a dead loop,
changing it to size_t will solve this issue.

Fixes: 3220d865382c ("net/ice: init RSS during DCF start")

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_dcf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 7f0c074b01..5cd53c6c0b 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -828,5 +828,6 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
 	struct rte_eth_dev *dev = hw->eth_dev;
 	struct rte_eth_rss_conf *rss_conf;
-	uint8_t i, j, nb_q;
+	uint8_t j, nb_q;
+	size_t i;
 	int ret;
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:03.301620787 +0100
+++ 0069-net-ice-fix-DCF-RSS-initialization.patch	2023-07-20 16:17:54.873751374 +0100
@@ -1 +1 @@
-From f0be05f4c49129c8b7a34fa6505586b8a646ead1 Mon Sep 17 00:00:00 2001
+From 9d5f649aa501bf569f605ce45283d81dfc55b883 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f0be05f4c49129c8b7a34fa6505586b8a646ead1 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 80d2cbd597..b11d66f45f 100644
+index 7f0c074b01..5cd53c6c0b 100644
@@ -23 +24 @@
-@@ -854,5 +854,6 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
+@@ -828,5 +828,6 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)


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

* patch 'net/iavf: release large VF when closing device' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (67 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/ice: fix DCF RSS initialization' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/ice: fix DCF control thread crash' " Kevin Traynor
                   ` (70 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Shiyang He; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/45daf222f80c7499c5938f912ff627c6304b161a

Thanks.

Kevin

---
From 45daf222f80c7499c5938f912ff627c6304b161a Mon Sep 17 00:00:00 2001
From: Shiyang He <shiyangx.he@intel.com>
Date: Mon, 8 May 2023 16:58:23 +0000
Subject: [PATCH] net/iavf: release large VF when closing device

[ upstream commit cdd8d6dfd156709b05ce363d7c5f491cc927330a ]

Multiple vfs created based on one PF. If one of the vf requests a large
number of queues, the queue resources are not released when exiting the
program, resulting in these queues cannot be available to other vfs.

This commit fixes the issue by resetting the number of queues to default
when closing the dev (refer to the kernel driver) .

Fixes: e436cd43835b ("net/iavf: negotiate large VF and request more queues")

Signed-off-by: Shiyang He <shiyangx.he@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index a115a9f641..0a5847ee53 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2661,4 +2661,16 @@ iavf_dev_close(struct rte_eth_dev *dev)
 		iavf_config_promisc(adapter, false, false);
 
+	/*
+	 * Release redundant queue resource when close the dev
+	 * so that other vfs can re-use the queues.
+	 */
+	if (vf->lv_enabled) {
+		ret = iavf_request_queues(dev, IAVF_MAX_NUM_QUEUES_DFLT);
+		if (ret)
+			PMD_DRV_LOG(ERR, "Reset the num of queues failed");
+
+		vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
+	}
+
 	iavf_shutdown_adminq(hw);
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) {
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:03.420987935 +0100
+++ 0070-net-iavf-release-large-VF-when-closing-device.patch	2023-07-20 16:17:54.877751390 +0100
@@ -1 +1 @@
-From cdd8d6dfd156709b05ce363d7c5f491cc927330a Mon Sep 17 00:00:00 2001
+From 45daf222f80c7499c5938f912ff627c6304b161a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cdd8d6dfd156709b05ce363d7c5f491cc927330a ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index f6d68403ce..9c55eaa66e 100644
+index a115a9f641..0a5847ee53 100644
@@ -26 +27 @@
-@@ -2736,4 +2736,16 @@ iavf_dev_close(struct rte_eth_dev *dev)
+@@ -2661,4 +2661,16 @@ iavf_dev_close(struct rte_eth_dev *dev)


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

* patch 'net/ice: fix DCF control thread crash' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (68 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/iavf: release large VF when closing device' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/ice/base: remove unreachable code' " Kevin Traynor
                   ` (69 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Mingjin Ye; +Cc: Ke Zhang, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/cdd62beeb247245ce953355d4aa850ea45493a57

Thanks.

Kevin

---
From cdd62beeb247245ce953355d4aa850ea45493a57 Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Tue, 11 Apr 2023 02:08:55 +0000
Subject: [PATCH] net/ice: fix DCF control thread crash

[ upstream commit 6b7621cea2d9470df076c3559a2fa6ee9752f419 ]

The control thread accesses the hardware resources after the
resources were released, which results in a segment error.

The 'ice-reset' threads are detached, so thread resources cannot be
reclaimed by `pthread_join` calls.

This commit synchronizes the number of "ice-reset" threads by adding a
variable ("vsi_update_thread_num") to the "struct ice_dcf_hw" and
performing an atomic operation on this variable. When releasing HW
resources, we wait for the number of "ice-reset" threads to be reduced
to 0 before releasing the resources.

Fixes: c7e1a1a3bfeb ("net/ice: refactor DCF VLAN handling")
Fixes: 3b3757bda3c3 ("net/ice: get VF hardware index in DCF")
Fixes: 7564d5509611 ("net/ice: add DCF hardware initialization")
Fixes: 0b02c9519432 ("net/ice: handle PF initialization by DCF")

Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_dcf.c        | 9 +++++++++
 drivers/net/ice/ice_dcf.h        | 2 ++
 drivers/net/ice/ice_dcf_parent.c | 6 ++++++
 3 files changed, 17 insertions(+)

diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 5cd53c6c0b..ad4bfa4b11 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -33,4 +33,6 @@
 #define ICE_DCF_ARQ_CHECK_TIME  2   /* msecs */
 
+#define ICE_DCF_CHECK_INTERVAL  100   /* 100ms */
+
 #define ICE_DCF_VF_RES_BUF_SZ	\
 	(sizeof(struct virtchnl_vf_resource) +	\
@@ -617,4 +619,6 @@ ice_dcf_init_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)
 	TAILQ_INIT(&hw->vc_cmd_queue);
 
+	__atomic_store_n(&hw->vsi_update_thread_num, 0, __ATOMIC_RELAXED);
+
 	hw->arq_buf = rte_zmalloc("arq_buf", ICE_DCF_AQ_BUF_SZ, 0);
 	if (hw->arq_buf == NULL) {
@@ -734,4 +738,9 @@ ice_dcf_uninit_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)
 				     ice_dcf_dev_interrupt_handler, hw);
 
+	/* Wait for all `ice-thread` threads to exit. */
+	while (__atomic_load_n(&hw->vsi_update_thread_num,
+		__ATOMIC_ACQUIRE) != 0)
+		rte_delay_ms(ICE_DCF_CHECK_INTERVAL);
+
 	ice_dcf_mode_disable(hw);
 	iavf_shutdown_adminq(&hw->avf);
diff --git a/drivers/net/ice/ice_dcf.h b/drivers/net/ice/ice_dcf.h
index 6ec766ebda..84b8232b2a 100644
--- a/drivers/net/ice/ice_dcf.h
+++ b/drivers/net/ice/ice_dcf.h
@@ -84,4 +84,6 @@ struct ice_dcf_hw {
 				uint8_t *msg, uint16_t msglen);
 
+	int vsi_update_thread_num;
+
 	uint8_t *arq_buf;
 
diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
index 2f96dedcce..ec01f28a51 100644
--- a/drivers/net/ice/ice_dcf_parent.c
+++ b/drivers/net/ice/ice_dcf_parent.c
@@ -124,4 +124,7 @@ ice_dcf_vsi_update_service_handler(void *param)
 	struct ice_adapter *parent_adapter = &adapter->parent;
 
+	__atomic_fetch_add(&hw->vsi_update_thread_num, 1,
+		__ATOMIC_RELAXED);
+
 	pthread_detach(pthread_self());
 
@@ -154,4 +157,7 @@ ice_dcf_vsi_update_service_handler(void *param)
 	free(param);
 
+	__atomic_fetch_sub(&hw->vsi_update_thread_num, 1,
+		__ATOMIC_RELEASE);
+
 	return NULL;
 }
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:03.509976643 +0100
+++ 0071-net-ice-fix-DCF-control-thread-crash.patch	2023-07-20 16:17:54.881751406 +0100
@@ -1 +1 @@
-From 6b7621cea2d9470df076c3559a2fa6ee9752f419 Mon Sep 17 00:00:00 2001
+From cdd62beeb247245ce953355d4aa850ea45493a57 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6b7621cea2d9470df076c3559a2fa6ee9752f419 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index b11d66f45f..c37b56b0d3 100644
+index 5cd53c6c0b..ad4bfa4b11 100644
@@ -37 +38 @@
-@@ -32,4 +32,6 @@
+@@ -33,4 +33,6 @@
@@ -44 +45 @@
-@@ -639,4 +641,6 @@ ice_dcf_init_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)
+@@ -617,4 +619,6 @@ ice_dcf_init_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)
@@ -51 +52 @@
-@@ -760,4 +764,9 @@ ice_dcf_uninit_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)
+@@ -734,4 +738,9 @@ ice_dcf_uninit_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)
@@ -62 +63 @@
-index 7f42ebabe9..7becf6d187 100644
+index 6ec766ebda..84b8232b2a 100644
@@ -65 +66 @@
-@@ -106,4 +106,6 @@ struct ice_dcf_hw {
+@@ -84,4 +84,6 @@ struct ice_dcf_hw {
@@ -73 +74 @@
-index 3175d18b5b..d62837840d 100644
+index 2f96dedcce..ec01f28a51 100644
@@ -82 +83 @@
- 	rte_thread_detach(rte_thread_self());
+ 	pthread_detach(pthread_self());
@@ -90 +91 @@
- 	return 0;
+ 	return NULL;


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

* patch 'net/ice/base: remove unreachable code' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (69 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/ice: fix DCF control thread crash' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/ice: adjust timestamp mbuf register' " Kevin Traynor
                   ` (68 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Vignesh Sridhar, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/f420162557cea8f588c9a145d06d4b18d896bf11

Thanks.

Kevin

---
From f420162557cea8f588c9a145d06d4b18d896bf11 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Thu, 18 May 2023 15:16:36 +0000
Subject: [PATCH] net/ice/base: remove unreachable code

[ upstream commit ca2011635fa38c71f47933d77ee618ca4d4f640f ]

The default condition in the switch statement in
ice_sched_get_psm_clk_freq() is an unreachable code. The variable
clk_src is restricted to values 0 to 3 with the bit mask and shift
values set.

Fixes: 76ac9d771c97 ("net/ice/base: read PSM clock frequency from register")

Signed-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com>
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_sched.c | 16 ++++++----------
 drivers/net/ice/base/ice_sched.h |  5 +++++
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 0841ec8c5b..f3655a820f 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -1395,9 +1395,4 @@ void ice_sched_get_psm_clk_freq(struct ice_hw *hw)
 		GLGEN_CLKSTAT_SRC_PSM_CLK_SRC_S;
 
-#define PSM_CLK_SRC_367_MHZ 0x0
-#define PSM_CLK_SRC_416_MHZ 0x1
-#define PSM_CLK_SRC_446_MHZ 0x2
-#define PSM_CLK_SRC_390_MHZ 0x3
-
 	switch (clk_src) {
 	case PSM_CLK_SRC_367_MHZ:
@@ -1413,9 +1408,10 @@ void ice_sched_get_psm_clk_freq(struct ice_hw *hw)
 		hw->psm_clk_freq = ICE_PSM_CLK_390MHZ_IN_HZ;
 		break;
-	default:
-		ice_debug(hw, ICE_DBG_SCHED, "PSM clk_src unexpected %u\n",
-			  clk_src);
-		/* fall back to a safe default */
-		hw->psm_clk_freq = ICE_PSM_CLK_446MHZ_IN_HZ;
+
+	/* default condition is not required as clk_src is restricted
+	 * to a 2-bit value from GLGEN_CLKSTAT_SRC_PSM_CLK_SRC_M mask.
+	 * The above switch statements cover the possible values of
+	 * this variable.
+	 */
 	}
 }
diff --git a/drivers/net/ice/base/ice_sched.h b/drivers/net/ice/base/ice_sched.h
index 1441b5f191..22ed09d2b1 100644
--- a/drivers/net/ice/base/ice_sched.h
+++ b/drivers/net/ice/base/ice_sched.h
@@ -36,4 +36,9 @@
 #define ICE_PSM_CLK_390MHZ_IN_HZ 390625000
 
+#define PSM_CLK_SRC_367_MHZ 0x0
+#define PSM_CLK_SRC_416_MHZ 0x1
+#define PSM_CLK_SRC_446_MHZ 0x2
+#define PSM_CLK_SRC_390_MHZ 0x3
+
 struct rl_profile_params {
 	u32 bw;			/* in Kbps */
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:03.582092242 +0100
+++ 0072-net-ice-base-remove-unreachable-code.patch	2023-07-20 16:17:54.889751439 +0100
@@ -1 +1 @@
-From ca2011635fa38c71f47933d77ee618ca4d4f640f Mon Sep 17 00:00:00 2001
+From f420162557cea8f588c9a145d06d4b18d896bf11 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ca2011635fa38c71f47933d77ee618ca4d4f640f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index a526c8f32c..b16b27dcbf 100644
+index 0841ec8c5b..f3655a820f 100644
@@ -26 +27 @@
-@@ -1418,9 +1418,4 @@ void ice_sched_get_psm_clk_freq(struct ice_hw *hw)
+@@ -1395,9 +1395,4 @@ void ice_sched_get_psm_clk_freq(struct ice_hw *hw)
@@ -36 +37 @@
-@@ -1436,9 +1431,10 @@ void ice_sched_get_psm_clk_freq(struct ice_hw *hw)
+@@ -1413,9 +1408,10 @@ void ice_sched_get_psm_clk_freq(struct ice_hw *hw)
@@ -53 +54 @@
-index 3724ef33a8..64ed5e0f9b 100644
+index 1441b5f191..22ed09d2b1 100644
@@ -56 +57 @@
-@@ -39,4 +39,9 @@
+@@ -36,4 +36,9 @@


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

* patch 'net/ice: adjust timestamp mbuf register' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (70 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/ice/base: remove unreachable code' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/ice: fix timestamp enabling' " Kevin Traynor
                   ` (67 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Wenjing Qiao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/285bc0e2d1045e96d8b468dd2a948e3d6d0f6dea

Thanks.

Kevin

---
From 285bc0e2d1045e96d8b468dd2a948e3d6d0f6dea Mon Sep 17 00:00:00 2001
From: Wenjing Qiao <wenjing.qiao@intel.com>
Date: Fri, 19 May 2023 03:12:16 -0400
Subject: [PATCH] net/ice: adjust timestamp mbuf register

[ upstream commit b16e1326048ea0c138cf794186985bb95eb7ff20 ]

Due to only support timestamp at port level, adjust
timestamp mbuf register to dev config.

Fixes: 953e74e6b73a ("net/ice: enable Rx timestamp on flex descriptor")

Signed-off-by: Wenjing Qiao <wenjing.qiao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 10 ++++++++++
 drivers/net/ice/ice_rxtx.c   |  5 ++++-
 drivers/net/ice/ice_rxtx.h   |  1 +
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index b0efacfd0f..e81a66b106 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3562,4 +3562,14 @@ ice_dev_start(struct rte_eth_dev *dev)
 	}
 
+	if (dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
+		/* Register mbuf field and flag for Rx timestamp */
+		ret = rte_mbuf_dyn_rx_timestamp_register(&ice_timestamp_dynfield_offset,
+							 &ice_timestamp_dynflag);
+		if (ret) {
+			PMD_DRV_LOG(ERR, "Cannot register mbuf field/flag for timestamp");
+			goto tx_err;
+		}
+	}
+
 	/* program Rx queues' context in hardware*/
 	for (nb_rxq = 0; nb_rxq < data->nb_rx_queues; nb_rxq++) {
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index f0ca5557ce..c16443d0ce 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -299,5 +299,5 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
 	}
 
-	if (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
+	if (!rxq->ts_enable && (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)) {
 		/* Register mbuf field and flag for Rx timestamp */
 		err = rte_mbuf_dyn_rx_timestamp_register(
@@ -309,4 +309,5 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
 			return -EINVAL;
 		}
+		rxq->ts_enable = true;
 	}
 
@@ -594,4 +595,6 @@ ice_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	}
 
+	if (dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)
+		rxq->ts_enable = true;
 	err = ice_program_hw_rx_queue(rxq);
 	if (err) {
diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h
index 1cc93c9d3c..2f0f050b58 100644
--- a/drivers/net/ice/ice_rxtx.h
+++ b/drivers/net/ice/ice_rxtx.h
@@ -104,4 +104,5 @@ struct ice_rx_queue {
 	uint32_t hw_time_low; /* low 32 bits of timestamp */
 	uint64_t hw_time_update; /* SW time of HW record updating */
+	bool ts_enable; /* if rxq timestamp is enabled */
 };
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:03.707256875 +0100
+++ 0073-net-ice-adjust-timestamp-mbuf-register.patch	2023-07-20 16:17:54.904751500 +0100
@@ -1 +1 @@
-From b16e1326048ea0c138cf794186985bb95eb7ff20 Mon Sep 17 00:00:00 2001
+From 285bc0e2d1045e96d8b468dd2a948e3d6d0f6dea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b16e1326048ea0c138cf794186985bb95eb7ff20 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 5a581bd2ba..2b0a977ba9 100644
+index b0efacfd0f..e81a66b106 100644
@@ -24 +25 @@
-@@ -3692,4 +3692,14 @@ ice_dev_start(struct rte_eth_dev *dev)
+@@ -3562,4 +3562,14 @@ ice_dev_start(struct rte_eth_dev *dev)
@@ -40 +41 @@
-index 560c1a4af7..c998b0080a 100644
+index f0ca5557ce..c16443d0ce 100644
@@ -43 +44 @@
-@@ -275,5 +275,5 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
+@@ -299,5 +299,5 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
@@ -50 +51 @@
-@@ -285,4 +285,5 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
+@@ -309,4 +309,5 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
@@ -56 +57 @@
-@@ -672,4 +673,6 @@ ice_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -594,4 +595,6 @@ ice_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -64 +65 @@
-index 89569029e1..268289716e 100644
+index 1cc93c9d3c..2f0f050b58 100644
@@ -67,3 +68,3 @@
-@@ -121,4 +121,5 @@ struct ice_rx_queue {
- 	struct rte_eth_rxseg_split rxseg[ICE_RX_MAX_NSEG];
- 	uint32_t rxseg_nb;
+@@ -104,4 +104,5 @@ struct ice_rx_queue {
+ 	uint32_t hw_time_low; /* low 32 bits of timestamp */
+ 	uint64_t hw_time_update; /* SW time of HW record updating */


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

* patch 'net/ice: fix timestamp enabling' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (71 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/ice: adjust timestamp mbuf register' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/ice: initialize parser for double VLAN' " Kevin Traynor
                   ` (66 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Wenjing Qiao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/634cd44ea096f2c456bc63b3077c6ce0a0f92ca3

Thanks.

Kevin

---
From 634cd44ea096f2c456bc63b3077c6ce0a0f92ca3 Mon Sep 17 00:00:00 2001
From: Wenjing Qiao <wenjing.qiao@intel.com>
Date: Fri, 19 May 2023 02:47:38 -0400
Subject: [PATCH] net/ice: fix timestamp enabling

[ upstream commit 71021636964dcd074ff2ee1663dc67ec830e6a14 ]

Use the following command:
1. dpdk-testpmd -c 0x3 -n 4 --force-max-simd-bitwidth=64
   -- -i --enable-rx-timestamp
2. port stop 0
3. port config 0 rx_offload timestamp off
4. port start 0
Then start it, log will show timestamp info, which should
not appear. Because ice_timestamp_dynflag is still more
than 0, code will still calculate timestamp. So fix it.

Fixes: f9c561ffbccc ("net/ice: fix performance for Rx timestamp")

Signed-off-by: Wenjing Qiao <wenjing.qiao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index c16443d0ce..9ad8793709 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -1638,5 +1638,6 @@ ice_rx_scan_hw_ring(struct ice_rx_queue *rxq)
 			rxd_to_pkt_fields_ops[rxq->rxdid](rxq, mb, &rxdp[j]);
 #ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
-			if (ice_timestamp_dynflag > 0) {
+			if (ice_timestamp_dynflag > 0 &&
+			    (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)) {
 				rxq->time_high =
 				rte_le_to_cpu_32(rxdp[j].wb.flex_ts.ts_high);
@@ -1985,5 +1986,6 @@ ice_recv_scattered_pkts(void *rx_queue,
 		pkt_flags = ice_rxd_error_to_pkt_flags(rx_stat_err0);
 #ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
-		if (ice_timestamp_dynflag > 0) {
+		if (ice_timestamp_dynflag > 0 &&
+		    (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)) {
 			rxq->time_high =
 			   rte_le_to_cpu_32(rxd.wb.flex_ts.ts_high);
@@ -2436,5 +2438,6 @@ ice_recv_pkts(void *rx_queue,
 		pkt_flags = ice_rxd_error_to_pkt_flags(rx_stat_err0);
 #ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
-		if (ice_timestamp_dynflag > 0) {
+		if (ice_timestamp_dynflag > 0 &&
+		    (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)) {
 			rxq->time_high =
 			   rte_le_to_cpu_32(rxd.wb.flex_ts.ts_high);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:03.874275327 +0100
+++ 0074-net-ice-fix-timestamp-enabling.patch	2023-07-20 16:17:54.910751525 +0100
@@ -1 +1 @@
-From 71021636964dcd074ff2ee1663dc67ec830e6a14 Mon Sep 17 00:00:00 2001
+From 634cd44ea096f2c456bc63b3077c6ce0a0f92ca3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 71021636964dcd074ff2ee1663dc67ec830e6a14 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index c998b0080a..7b6784b177 100644
+index c16443d0ce..9ad8793709 100644
@@ -29 +30 @@
-@@ -1766,5 +1766,6 @@ ice_rx_scan_hw_ring(struct ice_rx_queue *rxq)
+@@ -1638,5 +1638,6 @@ ice_rx_scan_hw_ring(struct ice_rx_queue *rxq)
@@ -37 +38 @@
-@@ -2132,5 +2133,6 @@ ice_recv_scattered_pkts(void *rx_queue,
+@@ -1985,5 +1986,6 @@ ice_recv_scattered_pkts(void *rx_queue,
@@ -45 +46 @@
-@@ -2622,5 +2624,6 @@ ice_recv_pkts(void *rx_queue,
+@@ -2436,5 +2438,6 @@ ice_recv_pkts(void *rx_queue,


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

* patch 'net/ice: initialize parser for double VLAN' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (72 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/ice: fix timestamp enabling' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/ice: fix outer UDP checksum offload' " Kevin Traynor
                   ` (65 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Zhichao Zeng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/1c5b0a02f090fd9467547cf024873c292835631e

Thanks.

Kevin

---
From 1c5b0a02f090fd9467547cf024873c292835631e Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Fri, 26 May 2023 15:21:25 -0400
Subject: [PATCH] net/ice: initialize parser for double VLAN

[ upstream commit 6e753d777ffc540b81e53d4ef2315a805347460e ]

Double Vlan mode need to be configured for parser
Otherwise parser result will not be consistent with hardware.

Fixes: 531d2555c8a6 ("net/ice: refactor parser usage")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
 drivers/net/ice/ice_generic_flow.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index 8293faa4e7..705c3bee4c 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1830,4 +1830,9 @@ ice_flow_init(struct ice_adapter *ad)
 		PMD_INIT_LOG(WARNING, "Failed to initialize DDP parser, raw packet filter will not be supported");
 
+	if (ice_is_dvm_ena(&ad->hw))
+		ice_parser_dvm_set(ad->psr, true);
+	else
+		ice_parser_dvm_set(ad->psr, false);
+
 	RTE_TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) {
 		if (engine->init == NULL) {
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:04.036330752 +0100
+++ 0075-net-ice-initialize-parser-for-double-VLAN.patch	2023-07-20 16:17:54.913751537 +0100
@@ -1 +1 @@
-From 6e753d777ffc540b81e53d4ef2315a805347460e Mon Sep 17 00:00:00 2001
+From 1c5b0a02f090fd9467547cf024873c292835631e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6e753d777ffc540b81e53d4ef2315a805347460e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 86a32f8cb1..ed3075d555 100644
+index 8293faa4e7..705c3bee4c 100644
@@ -22 +23 @@
-@@ -1837,4 +1837,9 @@ ice_flow_init(struct ice_adapter *ad)
+@@ -1830,4 +1830,9 @@ ice_flow_init(struct ice_adapter *ad)


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

* patch 'net/ice: fix outer UDP checksum offload' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (73 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/ice: initialize parser for double VLAN' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/virtio-user: fix leak when initialisation fails' " Kevin Traynor
                   ` (64 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Zhichao Zeng; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/7b8888a456068a6cd8eadd19b1f8f93da4eb75eb

Thanks.

Kevin

---
From 7b8888a456068a6cd8eadd19b1f8f93da4eb75eb Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Fri, 2 Jun 2023 09:42:53 +0800
Subject: [PATCH] net/ice: fix outer UDP checksum offload

[ upstream commit 10fbf1af4c5548b85b4791d241cdef62755240b1 ]

Currently, when dealing with UDP tunnel pkts checksum offloading,
the outer-udp checksum will be offloaded by default. So the
'csum set outer-udp hw/sw' command does not work.

This patch fixes judgment of the EIPT flag and enables the
'csum set outer-udp hw/sw' command by adding judgment for the
outer-udp checksum offload flag.

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

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 9ad8793709..f0d0a58c61 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2549,5 +2549,6 @@ ice_parse_tunneling_params(uint64_t ol_flags,
 	 */
 	if (!(*cd_tunneling & ICE_TX_CTX_EIPT_NONE) &&
-	    (*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING))
+		(*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING) &&
+		(ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
 		*cd_tunneling |= ICE_TXD_CTX_QW0_L4T_CS_M;
 }
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:04.173994551 +0100
+++ 0076-net-ice-fix-outer-UDP-checksum-offload.patch	2023-07-20 16:17:54.920751566 +0100
@@ -1 +1 @@
-From 10fbf1af4c5548b85b4791d241cdef62755240b1 Mon Sep 17 00:00:00 2001
+From 7b8888a456068a6cd8eadd19b1f8f93da4eb75eb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 10fbf1af4c5548b85b4791d241cdef62755240b1 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 7b6784b177..665ae32c13 100644
+index 9ad8793709..f0d0a58c61 100644
@@ -27 +28 @@
-@@ -2735,5 +2735,6 @@ ice_parse_tunneling_params(uint64_t ol_flags,
+@@ -2549,5 +2549,6 @@ ice_parse_tunneling_params(uint64_t ol_flags,


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

* patch 'net/virtio-user: fix leak when initialisation fails' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (74 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/ice: fix outer UDP checksum offload' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'doc: fix typo in graph guide' " Kevin Traynor
                   ` (63 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: David Marchand; +Cc: Maxime Coquelin, Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/77145940b5b8c8de00afd24cd3edb45dd095705b

Thanks.

Kevin

---
From 77145940b5b8c8de00afd24cd3edb45dd095705b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 13 Apr 2023 12:10:41 +0200
Subject: [PATCH] net/virtio-user: fix leak when initialisation fails

[ upstream commit c8254ef1a96c4897293b1d1db8c8a786dfb19e9d ]

Caught with ASan.
If initialising a virtio_user port fails, we may leak the ifname passed
via a devargs.

Fixes: 4214a1b493f2 ("net/virtio-user: support changing tap interface name")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index f9cada05e4..4044774ea0 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -586,9 +586,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 	dev->unsupported_features = 0;
 	dev->backend_type = backend_type;
-
-	if (*ifname) {
-		dev->ifname = *ifname;
-		*ifname = NULL;
-	}
+	dev->ifname = *ifname;
 
 	if (virtio_user_dev_setup(dev) < 0) {
@@ -663,4 +659,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 	}
 
+	*ifname = NULL;
 	return 0;
 }
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:04.281991902 +0100
+++ 0077-net-virtio-user-fix-leak-when-initialisation-fails.patch	2023-07-20 16:17:54.922751574 +0100
@@ -1 +1 @@
-From c8254ef1a96c4897293b1d1db8c8a786dfb19e9d Mon Sep 17 00:00:00 2001
+From 77145940b5b8c8de00afd24cd3edb45dd095705b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c8254ef1a96c4897293b1d1db8c8a786dfb19e9d ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 2b4607a291..af1f8c8237 100644
+index f9cada05e4..4044774ea0 100644
@@ -24 +25 @@
-@@ -697,9 +697,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, uint16_t queues,
+@@ -586,9 +586,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
@@ -35 +36 @@
-@@ -795,4 +791,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, uint16_t queues,
+@@ -663,4 +659,5 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
@@ -40 +41 @@
- 
+ }


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

* patch 'doc: fix typo in graph guide' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (75 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/virtio-user: fix leak when initialisation fails' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'doc: remove warning with Doxygen 1.9.7' " Kevin Traynor
                   ` (62 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Ashwin Sekhar T K; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/eac5508ce60f12315d91ddde8419f0ffb4432fa9

Thanks.

Kevin

---
From eac5508ce60f12315d91ddde8419f0ffb4432fa9 Mon Sep 17 00:00:00 2001
From: Ashwin Sekhar T K <asekhar@marvell.com>
Date: Thu, 4 May 2023 10:01:35 +0530
Subject: [PATCH] doc: fix typo in graph guide

[ upstream commit b457a9b3a4027aa6b0e52940fbaf6736ad021296 ]

Fix typo in graph lib doc.

Fixes: 4dc6d8e63c16 ("doc: add graph library guide")

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 doc/guides/prog_guide/graph_lib.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/prog_guide/graph_lib.rst b/doc/guides/prog_guide/graph_lib.rst
index 1cfdc86433..4ab0623f44 100644
--- a/doc/guides/prog_guide/graph_lib.rst
+++ b/doc/guides/prog_guide/graph_lib.rst
@@ -174,5 +174,5 @@ Create the graph object
 Now that the nodes are linked, Its time to create a graph by including
 the required nodes. The application can provide a set of node patterns to
-form a graph object. The ``famish()`` API used underneath for the pattern
+form a graph object. The ``fnmatch()`` API used underneath for the pattern
 matching to include the required nodes. After the graph create any changes to
 nodes or graph is not allowed.
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:04.423287989 +0100
+++ 0078-doc-fix-typo-in-graph-guide.patch	2023-07-20 16:17:54.923751578 +0100
@@ -1 +1 @@
-From b457a9b3a4027aa6b0e52940fbaf6736ad021296 Mon Sep 17 00:00:00 2001
+From eac5508ce60f12315d91ddde8419f0ffb4432fa9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b457a9b3a4027aa6b0e52940fbaf6736ad021296 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org


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

* patch 'doc: remove warning with Doxygen 1.9.7' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (76 preceding siblings ...)
  2023-07-20 15:18 ` patch 'doc: fix typo in graph guide' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'examples/l2fwd-cat: fix external build' " Kevin Traynor
                   ` (61 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/648321ab81f8a5ceaf230b211dc3ac8014fc58c8

Thanks.

Kevin

---
From 648321ab81f8a5ceaf230b211dc3ac8014fc58c8 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerinj@marvell.com>
Date: Fri, 2 Jun 2023 16:36:59 +0530
Subject: [PATCH] doc: remove warning with Doxygen 1.9.7

[ upstream commit 6df586f544d90f1eb266d75e6c8215e1c081019c ]

Since doxygen 1.9.7 version, HTML_TIMESTAMP configuration option
changed to TIMESTAMP [2]. Fixed the following warning[1] by
removing TIMESTAMP options all together as all new versions(since 1.8.9)
of doxygen this option is disabled by default. Another option was
considered to have this configuration option based on version check, which
may not be worth having it, especially, external_program.version()
API introduced in 0.62.0 version of meson.

[1]
Warning: Tag 'HTML_TIMESTAMP' at line 115 of file 'doc/api/doxy-api.conf'
has become obsolete.

[2]
https://www.doxygen.nl/manual/config.html#cfg_timestamp

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/api/doxy-api.conf.in | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in
index db2ca9b6ed..591abe9926 100644
--- a/doc/api/doxy-api.conf.in
+++ b/doc/api/doxy-api.conf.in
@@ -101,5 +101,4 @@ VERBATIM_HEADERS        = NO
 ALPHABETICAL_INDEX      = NO
 
-HTML_TIMESTAMP          = NO
 HTML_DYNAMIC_SECTIONS   = YES
 SEARCHENGINE            = YES
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:04.543791077 +0100
+++ 0079-doc-remove-warning-with-Doxygen-1.9.7.patch	2023-07-20 16:17:54.924751582 +0100
@@ -1 +1 @@
-From 6df586f544d90f1eb266d75e6c8215e1c081019c Mon Sep 17 00:00:00 2001
+From 648321ab81f8a5ceaf230b211dc3ac8014fc58c8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6df586f544d90f1eb266d75e6c8215e1c081019c ]
+
@@ -21,2 +22,0 @@
-Cc: stable@dpdk.org
-
@@ -30 +30 @@
-index 8ea78f9005..1a4210b948 100644
+index db2ca9b6ed..591abe9926 100644
@@ -33 +33 @@
-@@ -114,5 +114,4 @@ VERBATIM_HEADERS        = NO
+@@ -101,5 +101,4 @@ VERBATIM_HEADERS        = NO
@@ -38 +38 @@
- HTML_EXTRA_STYLESHEET   = @TOPDIR@/doc/api/custom.css
+ SEARCHENGINE            = YES


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

* patch 'examples/l2fwd-cat: fix external build' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (77 preceding siblings ...)
  2023-07-20 15:18 ` patch 'doc: remove warning with Doxygen 1.9.7' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'test: add graph tests' " Kevin Traynor
                   ` (60 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: David Marchand; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/47a25c84599f6dd607199aed59f37b247e9fd948

Thanks.

Kevin

---
From 47a25c84599f6dd607199aed59f37b247e9fd948 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 22 Jun 2023 15:40:29 +0200
Subject: [PATCH] examples/l2fwd-cat: fix external build

[ upstream commit 006e18a83a7f9d50dd24c7931cac1c82e7379c48 ]

cpu_set_t definition requires _GNU_SOURCE.

Fixes: e0473c6d5b18 ("eal: fix build with musl")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Thomas Monjalon <thomas@monjalon.net>
---
 examples/l2fwd-cat/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
index 23a09550a4..d06053451a 100644
--- a/examples/l2fwd-cat/Makefile
+++ b/examples/l2fwd-cat/Makefile
@@ -36,4 +36,5 @@ endif
 
 CFLAGS += -DALLOW_EXPERIMENTAL_API
+CFLAGS += -D_GNU_SOURCE
 
 LDFLAGS += -lpqos
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:04.660948238 +0100
+++ 0080-examples-l2fwd-cat-fix-external-build.patch	2023-07-20 16:17:54.925751586 +0100
@@ -1 +1 @@
-From 006e18a83a7f9d50dd24c7931cac1c82e7379c48 Mon Sep 17 00:00:00 2001
+From 47a25c84599f6dd607199aed59f37b247e9fd948 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 006e18a83a7f9d50dd24c7931cac1c82e7379c48 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org


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

* patch 'test: add graph tests' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (78 preceding siblings ...)
  2023-07-20 15:18 ` patch 'examples/l2fwd-cat: fix external build' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'mbuf: fix Doxygen comment of distributor metadata' " Kevin Traynor
                   ` (59 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: David Marchand; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/5d9357c7e2ab60533cb478b40a248a690c9a1db4

Thanks.

Kevin

---
From 5d9357c7e2ab60533cb478b40a248a690c9a1db4 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 19 Jun 2023 22:46:49 +0200
Subject: [PATCH] test: add graph tests

[ upstream commit 3d0c16f256a234ed04f6a11fd6635c8780f669f7 ]

We forgot to add graph unit tests to the CI testsuites.

Fixes: 6b89650418fe ("test/graph: add functional tests")
Fixes: 61d77071ab99 ("test/graph: add performance tests")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 app/test/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test/meson.build b/app/test/meson.build
index c13776c0b9..845ce96d0e 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -228,4 +228,5 @@ fast_tests = [
         ['func_reentrancy_autotest', false],
         ['flow_classify_autotest', false],
+        ['graph_autotest', true],
         ['hash_autotest', true],
         ['interrupt_autotest', true],
@@ -244,4 +245,5 @@ fast_tests = [
         ['meter_autotest', true],
         ['multiprocess_autotest', false],
+        ['node_list_dump', true],
         ['per_lcore_autotest', true],
         ['pflock_autotest', true],
@@ -330,4 +332,5 @@ perf_test_names = [
         'ipsec_perf_autotest',
         'thash_perf_autotest',
+        'graph_perf_autotest',
 ]
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:04.726515725 +0100
+++ 0081-test-add-graph-tests.patch	2023-07-20 16:17:54.926751590 +0100
@@ -1 +1 @@
-From 3d0c16f256a234ed04f6a11fd6635c8780f669f7 Mon Sep 17 00:00:00 2001
+From 5d9357c7e2ab60533cb478b40a248a690c9a1db4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3d0c16f256a234ed04f6a11fd6635c8780f669f7 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f3217ae577..537dc9fe35 100644
+index c13776c0b9..845ce96d0e 100644
@@ -22,13 +23,13 @@
-@@ -193,4 +193,5 @@ fast_tests = [
-         ['fib6_autotest', true, true],
-         ['func_reentrancy_autotest', false, true],
-+        ['graph_autotest', true, true],
-         ['hash_autotest', true, true],
-         ['interrupt_autotest', true, true],
-@@ -209,4 +210,5 @@ fast_tests = [
-         ['meter_autotest', true, true],
-         ['multiprocess_autotest', false, false],
-+        ['node_list_dump', true, true],
-         ['per_lcore_autotest', true, true],
-         ['pflock_autotest', true, true],
-@@ -299,4 +301,5 @@ perf_test_names = [
+@@ -228,4 +228,5 @@ fast_tests = [
+         ['func_reentrancy_autotest', false],
+         ['flow_classify_autotest', false],
++        ['graph_autotest', true],
+         ['hash_autotest', true],
+         ['interrupt_autotest', true],
+@@ -244,4 +245,5 @@ fast_tests = [
+         ['meter_autotest', true],
+         ['multiprocess_autotest', false],
++        ['node_list_dump', true],
+         ['per_lcore_autotest', true],
+         ['pflock_autotest', true],
+@@ -330,4 +332,5 @@ perf_test_names = [


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

* patch 'mbuf: fix Doxygen comment of distributor metadata' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (79 preceding siblings ...)
  2023-07-20 15:18 ` patch 'test: add graph tests' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'ci: fix libabigail cache in GHA' " Kevin Traynor
                   ` (58 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/88497910a913395286bbae92e221b323b256425e

Thanks.

Kevin

---
From 88497910a913395286bbae92e221b323b256425e Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 15 Jun 2023 15:49:42 +0200
Subject: [PATCH] mbuf: fix Doxygen comment of distributor metadata

[ upstream commit b3a160230bc0750cc522f456d11aced01d2e9b20 ]

/**< is for post annotations.

Fixes: 839b20be0e9b ("ethdev: support metadata as flow rule criteria")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/mbuf/rte_mbuf_core.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h
index 3d6ddd6773..9ac9ea2af3 100644
--- a/lib/mbuf/rte_mbuf_core.h
+++ b/lib/mbuf/rte_mbuf_core.h
@@ -687,6 +687,6 @@ struct rte_mbuf {
 				 */
 			} txadapter; /**< Eventdev ethdev Tx adapter */
-			/**< User defined tags. See rte_distributor_process() */
 			uint32_t usr;
+			/**< User defined tags. See rte_distributor_process() */
 		} hash;                   /**< hash information */
 	};
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:04.870027290 +0100
+++ 0082-mbuf-fix-Doxygen-comment-of-distributor-metadata.patch	2023-07-20 16:17:54.928751598 +0100
@@ -1 +1 @@
-From b3a160230bc0750cc522f456d11aced01d2e9b20 Mon Sep 17 00:00:00 2001
+From 88497910a913395286bbae92e221b323b256425e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3a160230bc0750cc522f456d11aced01d2e9b20 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index c692c33ec4..2030b3bef9 100644
+index 3d6ddd6773..9ac9ea2af3 100644
@@ -21 +22 @@
-@@ -585,6 +585,6 @@ struct rte_mbuf {
+@@ -687,6 +687,6 @@ struct rte_mbuf {


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

* patch 'ci: fix libabigail cache in GHA' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (80 preceding siblings ...)
  2023-07-20 15:18 ` patch 'mbuf: fix Doxygen comment of distributor metadata' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'crypto/openssl: skip workaround at compilation time' " Kevin Traynor
                   ` (57 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: David Marchand; +Cc: Aaron Conole, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/ad9d44049a7fe897730439ac6f68edbe3099ecd6

Thanks.

Kevin

---
From ad9d44049a7fe897730439ac6f68edbe3099ecd6 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 20 Jun 2023 15:29:55 +0200
Subject: [PATCH] ci: fix libabigail cache in GHA

[ upstream commit 870623ad9ed33f21102a5ddc18e15d726e65204d ]

In repositories where multiple branches run the ABI checks using
different versions of libabigail (for example, a 22.11 branch using
libabigail-1.8 and a main branch using libabigail-2.1), a collision
happens on the libabigail binary cache entry.
As a single cache entry is used, the content of the cache (let's say the
cache was built for libabigail 2.1) won't match what the branch wants to
use (in this example running the check for 22.11 branch requires
libabigail 1.8).
.ci/linux-build.sh then tries to recompile libabigail but it fails as
the packages used for building libabigail are missing.

Add the version to the cache entry name to avoid this collision.

Fixes: 443267090edc ("ci: enable v21 ABI checks")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 .github/workflows/build.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0df7a6a29c..f1079d840e 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -77,5 +77,5 @@ jobs:
       run: |
         echo 'ccache=ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W) >> $GITHUB_OUTPUT
-        echo 'libabigail=libabigail-${{ matrix.config.os }}' >> $GITHUB_OUTPUT
+        echo 'libabigail=libabigail-${{ env.LIBABIGAIL_VERSION }}-${{ matrix.config.os }}' >> $GITHUB_OUTPUT
         echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
     - name: Retrieve ccache cache
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:04.962919126 +0100
+++ 0083-ci-fix-libabigail-cache-in-GHA.patch	2023-07-20 16:17:54.929751602 +0100
@@ -1 +1 @@
-From 870623ad9ed33f21102a5ddc18e15d726e65204d Mon Sep 17 00:00:00 2001
+From ad9d44049a7fe897730439ac6f68edbe3099ecd6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 870623ad9ed33f21102a5ddc18e15d726e65204d ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 414dd089e0..0e2adb5106 100644
+index 0df7a6a29c..f1079d840e 100644
@@ -32 +33 @@
-@@ -71,5 +71,5 @@ jobs:
+@@ -77,5 +77,5 @@ jobs:
@@ -37 +38 @@
-         echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
+         echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT


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

* patch 'crypto/openssl: skip workaround at compilation time' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (81 preceding siblings ...)
  2023-07-20 15:18 ` patch 'ci: fix libabigail cache in GHA' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'ethdev: update documentation for API to set FEC' " Kevin Traynor
                   ` (56 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Didier Pallard; +Cc: Kai Ji, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/1cf0bf459c918583e236edbffdf00a5c5b582267

Thanks.

Kevin

---
From 1cf0bf459c918583e236edbffdf00a5c5b582267 Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Tue, 18 Apr 2023 16:56:19 +0200
Subject: [PATCH] crypto/openssl: skip workaround at compilation time

[ upstream commit 5b94ac1965620e945a3b8fcff84fab4fcb2ef801 ]

This workaround was needed before version 1.0.1f.
Do not build it for versions >= 1.1.

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

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Kai Ji <kai.ji@intel.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 5977bc746c..514e93229f 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1062,6 +1062,9 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset,
 		uint8_t *dst, uint8_t *tag, EVP_CIPHER_CTX *ctx)
 {
-	int len = 0, unused = 0;
+	int len = 0;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+	int unused = 0;
 	uint8_t empty[] = {};
+#endif
 
 	if (EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, iv) <= 0)
@@ -1077,7 +1080,9 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset,
 			goto process_auth_encryption_gcm_err;
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
 	/* Workaround open ssl bug in version less then 1.0.1f */
 	if (EVP_EncryptUpdate(ctx, empty, &unused, empty, 0) <= 0)
 		goto process_auth_encryption_gcm_err;
+#endif
 
 	if (EVP_EncryptFinal_ex(ctx, dst, &len) <= 0)
@@ -1141,6 +1146,9 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset,
 		uint8_t *dst, uint8_t *tag, EVP_CIPHER_CTX *ctx)
 {
-	int len = 0, unused = 0;
+	int len = 0;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+	int unused = 0;
 	uint8_t empty[] = {};
+#endif
 
 	if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, 16, tag) <= 0)
@@ -1159,7 +1167,9 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset,
 			goto process_auth_decryption_gcm_err;
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
 	/* Workaround open ssl bug in version less then 1.0.1f */
 	if (EVP_DecryptUpdate(ctx, empty, &unused, empty, 0) <= 0)
 		goto process_auth_decryption_gcm_err;
+#endif
 
 	if (EVP_DecryptFinal_ex(ctx, dst, &len) <= 0)
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:05.080247760 +0100
+++ 0084-crypto-openssl-skip-workaround-at-compilation-time.patch	2023-07-20 16:17:54.932751615 +0100
@@ -1 +1 @@
-From 5b94ac1965620e945a3b8fcff84fab4fcb2ef801 Mon Sep 17 00:00:00 2001
+From 1cf0bf459c918583e236edbffdf00a5c5b582267 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5b94ac1965620e945a3b8fcff84fab4fcb2ef801 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 9b83811d67..4569c5e62f 100644
+index 5977bc746c..514e93229f 100644
@@ -22 +23 @@
-@@ -1197,6 +1197,9 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset,
+@@ -1062,6 +1062,9 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset,
@@ -33 +34 @@
-@@ -1212,7 +1215,9 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset,
+@@ -1077,7 +1080,9 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset,
@@ -43 +44 @@
-@@ -1276,6 +1281,9 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset,
+@@ -1141,6 +1146,9 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset,
@@ -54 +55 @@
-@@ -1294,7 +1302,9 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset,
+@@ -1159,7 +1167,9 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset,


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

* patch 'ethdev: update documentation for API to set FEC' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (82 preceding siblings ...)
  2023-07-20 15:18 ` patch 'crypto/openssl: skip workaround at compilation time' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'ethdev: check that at least one FEC mode is specified' " Kevin Traynor
                   ` (55 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Denis Pryazhennikov
  Cc: Ivan Malov, Viacheslav Galaktionov, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/d53afe6d0e4075ad014a148da7a315aea1cd5157

Thanks.

Kevin

---
From d53afe6d0e4075ad014a148da7a315aea1cd5157 Mon Sep 17 00:00:00 2001
From: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
Date: Mon, 8 May 2023 15:47:05 +0400
Subject: [PATCH] ethdev: update documentation for API to set FEC

[ upstream commit 6af24dc3794059373c2131ae776d55ac78724ffa ]

The documentation for the rte_eth_fec_set() is updated
to provide more detailed information about how FEC modes are
handled. It also includes a description of the case when only
the AUTO bit is set.

Fixes: b7ccfb09da95 ("ethdev: introduce FEC API")

Signed-off-by: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
Acked-by: Ivan Malov <ivan.malov@arknetworks.am>
Acked-by: Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/rte_ethdev.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index d4a576965b..c7fb60853d 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -4058,8 +4058,11 @@ int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa);
  *   The port identifier of the Ethernet device.
  * @param fec_capa
- *   A bitmask of allowed FEC modes. If AUTO bit is set, other
- *   bits specify FEC modes which may be negotiated. If AUTO
- *   bit is clear, specify FEC modes to be used (only one valid
- *   mode per speed may be set).
+ *   A bitmask of allowed FEC modes.
+ *   If only the AUTO bit is set, the decision on which FEC
+ *   mode to use will be made by HW/FW or driver.
+ *   If the AUTO bit is set with some FEC modes, only specified
+ *   FEC modes can be set.
+ *   If AUTO bit is clear, specify FEC mode to be used
+ *   (only one valid mode per speed may be set).
  * @return
  *   - (0) if successful.
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:05.247077724 +0100
+++ 0085-ethdev-update-documentation-for-API-to-set-FEC.patch	2023-07-20 16:17:54.943751660 +0100
@@ -1 +1 @@
-From 6af24dc3794059373c2131ae776d55ac78724ffa Mon Sep 17 00:00:00 2001
+From d53afe6d0e4075ad014a148da7a315aea1cd5157 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6af24dc3794059373c2131ae776d55ac78724ffa ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 34ca25bbc0..2f8350a268 100644
+index d4a576965b..c7fb60853d 100644
@@ -26 +27 @@
-@@ -4267,8 +4267,11 @@ int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa);
+@@ -4058,8 +4058,11 @@ int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa);


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

* patch 'ethdev: check that at least one FEC mode is specified' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (83 preceding siblings ...)
  2023-07-20 15:18 ` patch 'ethdev: update documentation for API to set FEC' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'ethdev: update documentation for API to get FEC' " Kevin Traynor
                   ` (54 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Denis Pryazhennikov
  Cc: Ivan Malov, Viacheslav Galaktionov, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/b6557a758d42086033cfe0ac01a456b95b8c2a8c

Thanks.

Kevin

---
From b6557a758d42086033cfe0ac01a456b95b8c2a8c Mon Sep 17 00:00:00 2001
From: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
Date: Mon, 8 May 2023 15:47:06 +0400
Subject: [PATCH] ethdev: check that at least one FEC mode is specified

[ upstream commit 9fdcf2be070dcd5ea3d845ce798c298c5dfbaa4a ]

The behaviour is undefined in the rte_eth_fec_set() function
when the fec_capa parameter is equal to zero.
Add a check to handle this case.

Fixes: b7ccfb09da95 ("ethdev: introduce FEC API")

Signed-off-by: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
Acked-by: Ivan Malov <ivan.malov@arknetworks.am>
Acked-by: Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/rte_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 7e29982a4e..081d8bb297 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -4352,4 +4352,9 @@ rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)
 	dev = &rte_eth_devices[port_id];
 
+	if (fec_capa == 0) {
+		RTE_ETHDEV_LOG(ERR, "At least one FEC mode should be specified\n");
+		return -EINVAL;
+	}
+
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fec_set, -ENOTSUP);
 	return eth_err(port_id, (*dev->dev_ops->fec_set)(dev, fec_capa));
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:05.415022067 +0100
+++ 0086-ethdev-check-that-at-least-one-FEC-mode-is-specified.patch	2023-07-20 16:17:54.952751696 +0100
@@ -1 +1 @@
-From 9fdcf2be070dcd5ea3d845ce798c298c5dfbaa4a Mon Sep 17 00:00:00 2001
+From b6557a758d42086033cfe0ac01a456b95b8c2a8c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9fdcf2be070dcd5ea3d845ce798c298c5dfbaa4a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 731423ef03..1e024802ae 100644
+index 7e29982a4e..081d8bb297 100644
@@ -25 +26 @@
-@@ -4829,4 +4829,9 @@ rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)
+@@ -4352,4 +4352,9 @@ rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)
@@ -33,2 +34,2 @@
- 	if (*dev->dev_ops->fec_set == NULL)
- 		return -ENOTSUP;
+ 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fec_set, -ENOTSUP);
+ 	return eth_err(port_id, (*dev->dev_ops->fec_set)(dev, fec_capa));


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

* patch 'ethdev: update documentation for API to get FEC' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (84 preceding siblings ...)
  2023-07-20 15:18 ` patch 'ethdev: check that at least one FEC mode is specified' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/bonding: fix startup when NUMA is not supported' " Kevin Traynor
                   ` (53 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Denis Pryazhennikov; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/da6cad795b083e79771e40d13180b2c033e00818

Thanks.

Kevin

---
From da6cad795b083e79771e40d13180b2c033e00818 Mon Sep 17 00:00:00 2001
From: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
Date: Mon, 8 May 2023 15:47:07 +0400
Subject: [PATCH] ethdev: update documentation for API to get FEC

[ upstream commit 9e5c9e1868c062780d69d0529f0a447b4092d1e9 ]

The documentation for the rte_eth_fec_get() is updated
to clarify the description for the fec_capa parameter.
The previous description implied that more than one FEC
mode can be obtained.

Fixes: b7ccfb09da95 ("ethdev: introduce FEC API")

Signed-off-by: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/rte_ethdev.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index c7fb60853d..4da4baf2a1 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -4035,8 +4035,5 @@ int rte_eth_fec_get_capability(uint16_t port_id,
  *   The port identifier of the Ethernet device.
  * @param fec_capa
- *   A bitmask of enabled FEC modes. If AUTO bit is set, other
- *   bits specify FEC modes which may be negotiated. If AUTO
- *   bit is clear, specify FEC modes to be used (only one valid
- *   mode per speed may be set).
+ *   A bitmask with the current FEC mode.
  * @return
  *   - (0) if successful.
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:05.559054041 +0100
+++ 0087-ethdev-update-documentation-for-API-to-get-FEC.patch	2023-07-20 16:17:54.962751737 +0100
@@ -1 +1 @@
-From 9e5c9e1868c062780d69d0529f0a447b4092d1e9 Mon Sep 17 00:00:00 2001
+From da6cad795b083e79771e40d13180b2c033e00818 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9e5c9e1868c062780d69d0529f0a447b4092d1e9 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 2f8350a268..fcedf768cb 100644
+index c7fb60853d..4da4baf2a1 100644
@@ -24 +25 @@
-@@ -4244,8 +4244,5 @@ int rte_eth_fec_get_capability(uint16_t port_id,
+@@ -4035,8 +4035,5 @@ int rte_eth_fec_get_capability(uint16_t port_id,


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

* patch 'net/bonding: fix startup when NUMA is not supported' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (85 preceding siblings ...)
  2023-07-20 15:18 ` patch 'ethdev: update documentation for API to get FEC' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/bonding: fix destroy dedicated queues flow' " Kevin Traynor
                   ` (52 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Zerun Fu; +Cc: Peng Zhang, Chaoyong He, Long Wu, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/b11127de28b254a137552bc4f91e6735e5bb4dc7

Thanks.

Kevin

---
From b11127de28b254a137552bc4f91e6735e5bb4dc7 Mon Sep 17 00:00:00 2001
From: Zerun Fu <zerun.fu@corigine.com>
Date: Fri, 16 Jun 2023 15:20:34 +0800
Subject: [PATCH] net/bonding: fix startup when NUMA is not supported

[ upstream commit 85e6be63dfa8bff9c42ab0b4dea6fcbba7d680b2 ]

After the mainline Linux kernel commit
"fe205d984e7730f4d21f6f8ebc60f0698404ac31" (ACPI: Remove side effect
of partly creating a node in acpi_map_pxm_to_online_node) by
Jonathan Cameron. When the system does not support NUMA architecture,
the "socket_id" is expected to be -1. The valid "socket_id" in
BOND PMD is greater than or equal to zero. So it will cause an error
when DPDK checks the validity of the "socket_id" when starting the
bond. This commit can fix this bug.

Fixes: f294e04851fd ("net/bonding: fix socket ID check")

Signed-off-by: Zerun Fu <zerun.fu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_args.c | 6 ++++++
 drivers/net/bonding/rte_eth_bond_pmd.c  | 6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index 5406e1c934..a20a461159 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -212,4 +212,10 @@ bond_ethdev_parse_socket_id_kvarg(const char *key __rte_unused,
 		return -1;
 
+	/* SOCKET_ID_ANY also consider a valid socket id */
+	if ((int8_t)socket_id == SOCKET_ID_ANY) {
+		*(int *)extra_args = SOCKET_ID_ANY;
+		return 0;
+	}
+
 	/* validate socket id value */
 	if (socket_id >= 0 && socket_id < RTE_MAX_NUMA_NODES) {
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 4a9b9a015c..9f970ae4ed 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3323,5 +3323,5 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)
 {
 	const char *name = rte_vdev_device_name(dev);
-	uint8_t socket_id = dev->device.numa_node;
+	int socket_id = dev->device.numa_node;
 	struct bond_dev_private *internals = NULL;
 	struct rte_eth_dev *eth_dev = NULL;
@@ -3523,5 +3523,5 @@ bond_probe(struct rte_vdev_device *dev)
 	if (port_id < 0) {
 		RTE_BOND_LOG(ERR, "Failed to create socket %s in mode %u on "
-				"socket %u.",	name, bonding_mode, socket_id);
+				"socket %d.",	name, bonding_mode, socket_id);
 		goto parse_error;
 	}
@@ -3548,5 +3548,5 @@ bond_probe(struct rte_vdev_device *dev)
 	rte_eth_dev_probing_finish(&rte_eth_devices[port_id]);
 	RTE_BOND_LOG(INFO, "Create bonded device %s on port %d in mode %u on "
-			"socket %u.",	name, port_id, bonding_mode, socket_id);
+			"socket %d.",	name, port_id, bonding_mode, socket_id);
 	return 0;
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:05.668643522 +0100
+++ 0088-net-bonding-fix-startup-when-NUMA-is-not-supported.patch	2023-07-20 16:17:54.967751758 +0100
@@ -1 +1 @@
-From 85e6be63dfa8bff9c42ab0b4dea6fcbba7d680b2 Mon Sep 17 00:00:00 2001
+From b11127de28b254a137552bc4f91e6735e5bb4dc7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 85e6be63dfa8bff9c42ab0b4dea6fcbba7d680b2 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 6553166f5c..c137efd55f 100644
+index 5406e1c934..a20a461159 100644
@@ -32 +33 @@
-@@ -213,4 +213,10 @@ bond_ethdev_parse_socket_id_kvarg(const char *key __rte_unused,
+@@ -212,4 +212,10 @@ bond_ethdev_parse_socket_id_kvarg(const char *key __rte_unused,
@@ -44 +45 @@
-index f0c4f7d26b..73205f78f4 100644
+index 4a9b9a015c..9f970ae4ed 100644
@@ -47 +48 @@
-@@ -3605,5 +3605,5 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)
+@@ -3323,5 +3323,5 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)
@@ -54 +55 @@
-@@ -3807,5 +3807,5 @@ bond_probe(struct rte_vdev_device *dev)
+@@ -3523,5 +3523,5 @@ bond_probe(struct rte_vdev_device *dev)
@@ -61 +62 @@
-@@ -3832,5 +3832,5 @@ bond_probe(struct rte_vdev_device *dev)
+@@ -3548,5 +3548,5 @@ bond_probe(struct rte_vdev_device *dev)


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

* patch 'net/bonding: fix destroy dedicated queues flow' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (86 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/bonding: fix startup when NUMA is not supported' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/txgbe/base: fix Tx with fiber hotplug' " Kevin Traynor
                   ` (51 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Long Wu; +Cc: Niklas Söderlund, Chaoyong He, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/d98f67c3a32b2d15c4cbbf4a8551ce95c3aa1d6f

Thanks.

Kevin

---
From d98f67c3a32b2d15c4cbbf4a8551ce95c3aa1d6f Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Thu, 8 Jun 2023 10:59:03 +0800
Subject: [PATCH] net/bonding: fix destroy dedicated queues flow
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit f7755321f3294e94c1f1b9e645cc997a3e39f999 ]

Bonding port in mode 4 enables dedicated queues, we
will create a flow for this feature. So we need to
destroy this flow when we remove the member port.

Furthermore if we don't destroy the flow that created
for dedicated queues when we remove the member port,
maybe we couldn't add the member port to a new bonding
port that needed dedicated queues.

We add the destroy action in removing member port
function.

Fixes: 49dad9028e2a ("net/bonding: support flow API")

Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_api.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 14dfd2059f..6cdef1cd2d 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -710,4 +710,14 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,
 	}
 
+	/* Remove the dedicated queues flow */
+	if (internals->mode == BONDING_MODE_8023AD &&
+		internals->mode4.dedicated_queues.enabled == 1 &&
+		internals->mode4.dedicated_queues.flow[slave_port_id] != NULL) {
+		rte_flow_destroy(slave_port_id,
+				internals->mode4.dedicated_queues.flow[slave_port_id],
+				&flow_error);
+		internals->mode4.dedicated_queues.flow[slave_port_id] = NULL;
+	}
+
 	slave_eth_dev = &rte_eth_devices[slave_port_id];
 	slave_remove(internals, slave_eth_dev);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:05.759341450 +0100
+++ 0089-net-bonding-fix-destroy-dedicated-queues-flow.patch	2023-07-20 16:17:54.969751766 +0100
@@ -1 +1 @@
-From f7755321f3294e94c1f1b9e645cc997a3e39f999 Mon Sep 17 00:00:00 2001
+From d98f67c3a32b2d15c4cbbf4a8551ce95c3aa1d6f Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit f7755321f3294e94c1f1b9e645cc997a3e39f999 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index c0178369b4..85d0528b7c 100644
+index 14dfd2059f..6cdef1cd2d 100644
@@ -36 +37 @@
-@@ -713,4 +713,14 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,
+@@ -710,4 +710,14 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,


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

* patch 'net/txgbe/base: fix Tx with fiber hotplug' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (87 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/bonding: fix destroy dedicated queues flow' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/txgbe: fix interrupt enable mask' " Kevin Traynor
                   ` (50 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/1a7755214b84bd8621a515a131ac37049e62579a

Thanks.

Kevin

---
From 1a7755214b84bd8621a515a131ac37049e62579a Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 14 Jun 2023 10:34:21 +0800
Subject: [PATCH] net/txgbe/base: fix Tx with fiber hotplug

[ upstream commit 196e412b80afe165ca78457d5f9bb1a5bace28ea ]

Under heavy traffic, unplugging and plugging fiber optic cables may cause
Tx failure. The reason is that there is still traffic passing through at
PCS VR reset, during txgbe_set_link_to_*. So totally disable Rx and Tx
before PCS VR reset to fix it.

Fixes: 01c3cf5c85a7 ("net/txgbe: add autoneg control read and write")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_phy.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/net/txgbe/base/txgbe_phy.c b/drivers/net/txgbe/base/txgbe_phy.c
index 87935abdaa..6bbb2a5e71 100644
--- a/drivers/net/txgbe/base/txgbe_phy.c
+++ b/drivers/net/txgbe/base/txgbe_phy.c
@@ -1520,6 +1520,7 @@ txgbe_set_link_to_kx4(struct txgbe_hw *hw, bool autoneg)
 	}
 
-	wr32m(hw, TXGBE_MACTXCFG, TXGBE_MACTXCFG_TXE,
-			~TXGBE_MACTXCFG_TXE);
+	wr32m(hw, TXGBE_MACTXCFG, TXGBE_MACTXCFG_TXE, ~TXGBE_MACTXCFG_TXE);
+	wr32m(hw, TXGBE_MACRXCFG, TXGBE_MACRXCFG_ENA, ~TXGBE_MACRXCFG_ENA);
+	hw->mac.disable_sec_tx_path(hw);
 
 	/* 2. Disable xpcs AN-73 */
@@ -1735,6 +1736,7 @@ txgbe_set_link_to_kx(struct txgbe_hw *hw,
 	}
 
-	wr32m(hw, TXGBE_MACTXCFG, TXGBE_MACTXCFG_TXE,
-				~TXGBE_MACTXCFG_TXE);
+	wr32m(hw, TXGBE_MACTXCFG, TXGBE_MACTXCFG_TXE, ~TXGBE_MACTXCFG_TXE);
+	wr32m(hw, TXGBE_MACRXCFG, TXGBE_MACRXCFG_ENA, ~TXGBE_MACRXCFG_ENA);
+	hw->mac.disable_sec_tx_path(hw);
 
 	/* 2. Disable xpcs AN-73 */
@@ -1942,6 +1944,7 @@ txgbe_set_link_to_sfi(struct txgbe_hw *hw,
 	}
 
-	wr32m(hw, TXGBE_MACTXCFG, TXGBE_MACTXCFG_TXE,
-			~TXGBE_MACTXCFG_TXE);
+	wr32m(hw, TXGBE_MACTXCFG, TXGBE_MACTXCFG_TXE, ~TXGBE_MACTXCFG_TXE);
+	wr32m(hw, TXGBE_MACRXCFG, TXGBE_MACRXCFG_ENA, ~TXGBE_MACRXCFG_ENA);
+	hw->mac.disable_sec_tx_path(hw);
 
 	/* 2. Disable xpcs AN-73 */
@@ -2294,4 +2297,6 @@ void txgbe_autoc_write(struct txgbe_hw *hw, u64 autoc)
 	}
 
+	hw->mac.enable_sec_tx_path(hw);
+
 	if (speed == TXGBE_LINK_SPEED_10GB_FULL)
 		mactxcfg = TXGBE_MACTXCFG_SPEED_10G;
@@ -2303,4 +2308,5 @@ void txgbe_autoc_write(struct txgbe_hw *hw, u64 autoc)
 		TXGBE_MACTXCFG_SPEED_MASK | TXGBE_MACTXCFG_TXE,
 		mactxcfg | TXGBE_MACTXCFG_TXE);
+	wr32m(hw, TXGBE_MACRXCFG, TXGBE_MACRXCFG_ENA, TXGBE_MACRXCFG_ENA);
 }
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:05.912925687 +0100
+++ 0090-net-txgbe-base-fix-Tx-with-fiber-hotplug.patch	2023-07-20 16:17:54.973751782 +0100
@@ -1 +1 @@
-From 196e412b80afe165ca78457d5f9bb1a5bace28ea Mon Sep 17 00:00:00 2001
+From 1a7755214b84bd8621a515a131ac37049e62579a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 196e412b80afe165ca78457d5f9bb1a5bace28ea ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index f4cadcc510..1eb45b068a 100644
+index 87935abdaa..6bbb2a5e71 100644
@@ -23 +24 @@
-@@ -1542,6 +1542,7 @@ txgbe_set_link_to_kx4(struct txgbe_hw *hw, bool autoneg)
+@@ -1520,6 +1520,7 @@ txgbe_set_link_to_kx4(struct txgbe_hw *hw, bool autoneg)
@@ -33 +34 @@
-@@ -1757,6 +1758,7 @@ txgbe_set_link_to_kx(struct txgbe_hw *hw,
+@@ -1735,6 +1736,7 @@ txgbe_set_link_to_kx(struct txgbe_hw *hw,
@@ -43 +44 @@
-@@ -1964,6 +1966,7 @@ txgbe_set_link_to_sfi(struct txgbe_hw *hw,
+@@ -1942,6 +1944,7 @@ txgbe_set_link_to_sfi(struct txgbe_hw *hw,
@@ -53 +54 @@
-@@ -2316,4 +2319,6 @@ void txgbe_autoc_write(struct txgbe_hw *hw, u64 autoc)
+@@ -2294,4 +2297,6 @@ void txgbe_autoc_write(struct txgbe_hw *hw, u64 autoc)
@@ -60 +61 @@
-@@ -2325,4 +2330,5 @@ void txgbe_autoc_write(struct txgbe_hw *hw, u64 autoc)
+@@ -2303,4 +2308,5 @@ void txgbe_autoc_write(struct txgbe_hw *hw, u64 autoc)


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

* patch 'net/txgbe: fix interrupt enable mask' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (88 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/txgbe/base: fix Tx with fiber hotplug' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/txgbe: fix to set autoneg for 1G speed' " Kevin Traynor
                   ` (49 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/5b72e18f0a8ed4396965de14b18f7d5c0b4c0df6

Thanks.

Kevin

---
From 5b72e18f0a8ed4396965de14b18f7d5c0b4c0df6 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 14 Jun 2023 10:34:22 +0800
Subject: [PATCH] net/txgbe: fix interrupt enable mask

[ upstream commit 646b058472cdfb503a0c555ed2e0f891c05437a7 ]

When using no LSC mode, GPIO interrupt can still cause
txgbe_dev_interrupt_delayed_handler() to be called, with
TXGBE_FLAG_NEED_LINK_UPDATE to be set. So add a LSC condition on
intr->mask_misc.

Fixes: 2fc745e6b606 ("net/txgbe: add interrupt operation")
Fixes: d3bb4a04eac1 ("net/txgbe: add SFP hotplug identification")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index acc29071f0..c5793e21b5 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -3134,5 +3134,6 @@ txgbe_dev_interrupt_delayed_handler(void *param)
 
 	/* restore original mask */
-	intr->mask_misc |= TXGBE_ICRMISC_LSC;
+	if (dev->data->dev_conf.intr_conf.lsc == 1)
+		intr->mask_misc |= TXGBE_ICRMISC_LSC;
 
 	intr->mask = intr->mask_orig;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:06.050910815 +0100
+++ 0091-net-txgbe-fix-interrupt-enable-mask.patch	2023-07-20 16:17:54.981751815 +0100
@@ -1 +1 @@
-From 646b058472cdfb503a0c555ed2e0f891c05437a7 Mon Sep 17 00:00:00 2001
+From 5b72e18f0a8ed4396965de14b18f7d5c0b4c0df6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 646b058472cdfb503a0c555ed2e0f891c05437a7 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index a3d7461951..5eff1a766e 100644
+index acc29071f0..c5793e21b5 100644
@@ -24 +25 @@
-@@ -3233,5 +3233,6 @@ txgbe_dev_interrupt_delayed_handler(void *param)
+@@ -3134,5 +3134,6 @@ txgbe_dev_interrupt_delayed_handler(void *param)


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

* patch 'net/txgbe: fix to set autoneg for 1G speed' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (89 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/txgbe: fix interrupt enable mask' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/txgbe: fix extended statistics' " Kevin Traynor
                   ` (48 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/1077232f46444c970e8a87a4b39535b669ca4744

Thanks.

Kevin

---
From 1077232f46444c970e8a87a4b39535b669ca4744 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 14 Jun 2023 10:34:24 +0800
Subject: [PATCH] net/txgbe: fix to set autoneg for 1G speed

[ upstream commit 658dbfa6360fcda0a5798669f6eac8293e4a2d73 ]

Autoneg was always on for 1G speed, fix to set autoneg off.

Fixes: 01c3cf5c85a7 ("net/txgbe: add autoneg control read and write")
Fixes: e4c515a7bc7e ("net/txgbe: add multi-speed link setup")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_hw.c   | 14 ++++++++++++++
 drivers/net/txgbe/base/txgbe_phy.c  |  4 +++-
 drivers/net/txgbe/base/txgbe_type.h |  1 +
 drivers/net/txgbe/txgbe_ethdev.c    |  2 ++
 4 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/base/txgbe_hw.c b/drivers/net/txgbe/base/txgbe_hw.c
index 776891ee7e..1083431055 100644
--- a/drivers/net/txgbe/base/txgbe_hw.c
+++ b/drivers/net/txgbe/base/txgbe_hw.c
@@ -2280,8 +2280,22 @@ s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
 
 	if (speed & TXGBE_LINK_SPEED_1GB_FULL) {
+		u32 curr_autoneg;
+
 		speedcnt++;
 		if (highest_link_speed == TXGBE_LINK_SPEED_UNKNOWN)
 			highest_link_speed = TXGBE_LINK_SPEED_1GB_FULL;
 
+		status = hw->mac.check_link(hw, &link_speed, &link_up, false);
+		if (status != 0)
+			return status;
+
+		/* If we already have link at this speed, just jump out */
+		if (link_speed == TXGBE_LINK_SPEED_1GB_FULL) {
+			curr_autoneg = rd32_epcs(hw, SR_MII_MMD_CTL);
+			if (link_up && (hw->autoneg ==
+					!!(curr_autoneg & SR_MII_MMD_CTL_AN_EN)))
+				goto out;
+		}
+
 		/* Set the module link speed */
 		switch (hw->phy.media_type) {
diff --git a/drivers/net/txgbe/base/txgbe_phy.c b/drivers/net/txgbe/base/txgbe_phy.c
index 6bbb2a5e71..a7c11c50df 100644
--- a/drivers/net/txgbe/base/txgbe_phy.c
+++ b/drivers/net/txgbe/base/txgbe_phy.c
@@ -1381,5 +1381,7 @@ txgbe_set_sgmii_an37_ability(struct txgbe_hw *hw)
 	wr32_epcs(hw, SR_MII_MMD_DIGI_CTL, 0x0200);
 	value = rd32_epcs(hw, SR_MII_MMD_CTL);
-	value = (value & ~0x1200) | (0x1 << 12) | (0x1 << 9);
+	value = (value & ~0x1200) | (0x1 << 9);
+	if (hw->autoneg)
+		value |= SR_MII_MMD_CTL_AN_EN;
 	wr32_epcs(hw, SR_MII_MMD_CTL, value);
 }
diff --git a/drivers/net/txgbe/base/txgbe_type.h b/drivers/net/txgbe/base/txgbe_type.h
index 7010372119..e7971ccf1d 100644
--- a/drivers/net/txgbe/base/txgbe_type.h
+++ b/drivers/net/txgbe/base/txgbe_type.h
@@ -783,4 +783,5 @@ struct txgbe_hw {
 	bool need_crosstalk_fix;
 	bool dev_start;
+	bool autoneg;
 	struct txgbe_devargs devarg;
 
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index c5793e21b5..c017c733fb 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -1777,4 +1777,5 @@ txgbe_dev_start(struct rte_eth_dev *dev)
 			 TXGBE_LINK_SPEED_1GB_FULL |
 			 TXGBE_LINK_SPEED_10GB_FULL);
+		hw->autoneg = true;
 	} else {
 		if (*link_speeds & RTE_ETH_LINK_SPEED_10G)
@@ -1788,4 +1789,5 @@ txgbe_dev_start(struct rte_eth_dev *dev)
 		if (*link_speeds & RTE_ETH_LINK_SPEED_100M)
 			speed |= TXGBE_LINK_SPEED_100M_FULL;
+		hw->autoneg = false;
 	}
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:06.136248400 +0100
+++ 0092-net-txgbe-fix-to-set-autoneg-for-1G-speed.patch	2023-07-20 16:17:54.999751888 +0100
@@ -1 +1 @@
-From 658dbfa6360fcda0a5798669f6eac8293e4a2d73 Mon Sep 17 00:00:00 2001
+From 1077232f46444c970e8a87a4b39535b669ca4744 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 658dbfa6360fcda0a5798669f6eac8293e4a2d73 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 2952c408fd..d19fd0065d 100644
+index 776891ee7e..1083431055 100644
@@ -24 +25 @@
-@@ -2274,8 +2274,22 @@ s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
+@@ -2280,8 +2280,22 @@ s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
@@ -48 +49 @@
-index 1eb45b068a..d87af656d5 100644
+index 6bbb2a5e71..a7c11c50df 100644
@@ -51 +52 @@
-@@ -1403,5 +1403,7 @@ txgbe_set_sgmii_an37_ability(struct txgbe_hw *hw)
+@@ -1381,5 +1381,7 @@ txgbe_set_sgmii_an37_ability(struct txgbe_hw *hw)
@@ -61 +62 @@
-index c3486b472f..75e839b7de 100644
+index 7010372119..e7971ccf1d 100644
@@ -64 +65 @@
-@@ -784,4 +784,5 @@ struct txgbe_hw {
+@@ -783,4 +783,5 @@ struct txgbe_hw {
@@ -71 +72 @@
-index 36c74d353d..962667acdc 100644
+index c5793e21b5..c017c733fb 100644
@@ -74 +75 @@
-@@ -1822,4 +1822,5 @@ txgbe_dev_start(struct rte_eth_dev *dev)
+@@ -1777,4 +1777,5 @@ txgbe_dev_start(struct rte_eth_dev *dev)
@@ -80 +81 @@
-@@ -1833,4 +1834,5 @@ txgbe_dev_start(struct rte_eth_dev *dev)
+@@ -1788,4 +1789,5 @@ txgbe_dev_start(struct rte_eth_dev *dev)


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

* patch 'net/txgbe: fix extended statistics' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (90 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/txgbe: fix to set autoneg for 1G speed' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/ngbe: " Kevin Traynor
                   ` (47 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/edf9b54d2500a7b7a2bffca3a84f6047d3ee161c

Thanks.

Kevin

---
From edf9b54d2500a7b7a2bffca3a84f6047d3ee161c Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 14 Jun 2023 10:34:25 +0800
Subject: [PATCH] net/txgbe: fix extended statistics

[ upstream commit 83f44a283a0bb4d5041161bcbaae5130cb1a8f87 ]

Fix to show tx_broadcast_packets and tx_multicast_packets counters.

Fixes: 91fe49c87d76 ("net/txgbe: support device xstats")

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

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index c017c733fb..8b57ca1ba7 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -180,5 +180,7 @@ static const struct rte_txgbe_xstats_name_off rte_txgbe_stats_strings[] = {
 	HW_XSTAT(rx_total_missed_packets),
 	HW_XSTAT(rx_broadcast_packets),
+	HW_XSTAT(tx_broadcast_packets),
 	HW_XSTAT(rx_multicast_packets),
+	HW_XSTAT(tx_multicast_packets),
 	HW_XSTAT(rx_management_packets),
 	HW_XSTAT(tx_management_packets),
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:06.281937708 +0100
+++ 0093-net-txgbe-fix-extended-statistics.patch	2023-07-20 16:17:55.007751921 +0100
@@ -1 +1 @@
-From 83f44a283a0bb4d5041161bcbaae5130cb1a8f87 Mon Sep 17 00:00:00 2001
+From edf9b54d2500a7b7a2bffca3a84f6047d3ee161c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 83f44a283a0bb4d5041161bcbaae5130cb1a8f87 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 962667acdc..74765a469d 100644
+index c017c733fb..8b57ca1ba7 100644
@@ -20 +21 @@
-@@ -181,5 +181,7 @@ static const struct rte_txgbe_xstats_name_off rte_txgbe_stats_strings[] = {
+@@ -180,5 +180,7 @@ static const struct rte_txgbe_xstats_name_off rte_txgbe_stats_strings[] = {


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

* patch 'net/ngbe: fix extended statistics' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (91 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/txgbe: fix extended statistics' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'app/testpmd: fix primary process not polling all queues' " Kevin Traynor
                   ` (46 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/fcea6b6498cfc30427ee38490729dd36c33c64c6

Thanks.

Kevin

---
From fcea6b6498cfc30427ee38490729dd36c33c64c6 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 14 Jun 2023 10:34:26 +0800
Subject: [PATCH] net/ngbe: fix extended statistics

[ upstream commit 9e2d2fadf89721b6b3ad639f9ad69b672589820a ]

Fix to show tx_broadcast_packets and tx_multicast_packets counters.

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

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

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 07b3d15455..4c927379d7 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -161,5 +161,7 @@ static const struct rte_ngbe_xstats_name_off rte_ngbe_stats_strings[] = {
 	HW_XSTAT(rx_total_missed_packets),
 	HW_XSTAT(rx_broadcast_packets),
+	HW_XSTAT(tx_broadcast_packets),
 	HW_XSTAT(rx_multicast_packets),
+	HW_XSTAT(tx_multicast_packets),
 	HW_XSTAT(rx_management_packets),
 	HW_XSTAT(tx_management_packets),
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:06.419772627 +0100
+++ 0094-net-ngbe-fix-extended-statistics.patch	2023-07-20 16:17:55.017751962 +0100
@@ -1 +1 @@
-From 9e2d2fadf89721b6b3ad639f9ad69b672589820a Mon Sep 17 00:00:00 2001
+From fcea6b6498cfc30427ee38490729dd36c33c64c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9e2d2fadf89721b6b3ad639f9ad69b672589820a ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index c32d954769..836ecfa2da 100644
+index 07b3d15455..4c927379d7 100644


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

* patch 'app/testpmd: fix primary process not polling all queues' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (92 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/ngbe: " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-24  1:58   ` haijie
  2023-07-20 15:18 ` patch 'net/nfp: fix address always related with PF ID 0' " Kevin Traynor
                   ` (45 subsequent siblings)
  139 siblings, 1 reply; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Jie Hai; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/f7a4bf2feece51aa5a53db7759b7edd94d4fb76a

Thanks.

Kevin

---
From f7a4bf2feece51aa5a53db7759b7edd94d4fb76a Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Fri, 9 Jun 2023 17:03:40 +0800
Subject: [PATCH] app/testpmd: fix primary process not polling all queues

[ upstream commit 141a520b35f789f37dc06557bc724bf7f0e0a52d ]

Here's how the problem arises.
step1: Start the app.
    dpdk-testpmd -a 0000:35:00.0 -l 0-3 -- -i --rxq=10 --txq=10

step2: Perform the following steps and send traffic. As expected,
queue 7 does not send or receive packets, and other queues do.
    port 0 rxq 7 stop
    port 0 txq 7 stop
    set fwd mac
    start

step3: Perform the following steps and send traffic. All queues
are expected to send and receive packets normally, but that's not
the case for queue 7.
    stop
    port stop all
    port start all
    start
    show port xstats all

In fact, only the value of rx_q7_packets for queue 7 is not zero,
which means queue 7 is enabled for the driver but is not involved
in packet receiving and forwarding by software. If we check queue
state by command 'show rxq info 0 7' and 'show txq info 0 7',
we see queue 7 is started as other queues are.
    Rx queue state: started
    Tx queue state: started
The queue 7 is started but cannot forward. That's the problem.

We know that each stream has a read-only "disabled" field that
control if this stream should be used to forward. This field
depends on testpmd local queue state, please see
commit 3c4426db54fc ("app/testpmd: do not poll stopped queues").
DPDK framework maintains ethdev queue state that drivers reported,
which indicates the real state of queues.

There are commands that update these two kind queue state such as
'port X rxq|txq start|stop'. But these operations take effect only
in one stop-start round. In the following stop-start round, the
preceding operations do not take effect anymore. However, only
the ethdev queue state is updated, causing the testpmd and ethdev
state information to diverge and causing unexpected side effects
as above problem.

There was a similar problem for the secondary process, please see
commit 5028f207a4fa ("app/testpmd: fix secondary process packet
forwarding").

This patch applies its workaround with some difference to the
primary process. Not all PMDs implement rte_eth_rx_queue_info_get and
rte_eth_tx_queue_info_get, however they may support deferred_start
with primary process. To not break their behavior, retain the original
testpmd local queue state for those PMDs.

Fixes: 3c4426db54fc ("app/testpmd: do not poll stopped queues")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/testpmd.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 9f4a0e0a78..dbf6fd1fca 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2376,4 +2376,11 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
 			rx_qinfo.queue_state;
 	} else if (rc == -ENOTSUP) {
+		/*
+		 * Do not change the rxq state for primary process
+		 * to ensure that the PMDs do not implement
+		 * rte_eth_rx_queue_info_get can forward as before.
+		 */
+		if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+			return;
 		/*
 		 * Set the rxq state to RTE_ETH_QUEUE_STATE_STARTED
@@ -2401,4 +2408,11 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
 			tx_qinfo.queue_state;
 	} else if (rc == -ENOTSUP) {
+		/*
+		 * Do not change the txq state for primary process
+		 * to ensure that the PMDs do not implement
+		 * rte_eth_tx_queue_info_get can forward as before.
+		 */
+		if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+			return;
 		/*
 		 * Set the txq state to RTE_ETH_QUEUE_STATE_STARTED
@@ -2468,6 +2482,5 @@ start_packet_forwarding(int with_tx_first)
 
 	if (stream_init != NULL) {
-		if (rte_eal_process_type() == RTE_PROC_SECONDARY)
-			update_queue_state();
+		update_queue_state();
 		for (i = 0; i < cur_fwd_config.nb_fwd_streams; i++)
 			stream_init(fwd_streams[i]);
@@ -3127,6 +3140,5 @@ start_port(portid_t pid)
 	}
 
-	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
-		update_queue_state();
+	update_queue_state();
 
 	if (at_least_one_port_successfully_started && !no_link_check)
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:06.547994881 +0100
+++ 0095-app-testpmd-fix-primary-process-not-polling-all-queu.patch	2023-07-20 16:17:55.023751986 +0100
@@ -1 +1 @@
-From 141a520b35f789f37dc06557bc724bf7f0e0a52d Mon Sep 17 00:00:00 2001
+From f7a4bf2feece51aa5a53db7759b7edd94d4fb76a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 141a520b35f789f37dc06557bc724bf7f0e0a52d ]
+
@@ -61 +62,0 @@
-Cc: stable@dpdk.org
@@ -70 +71 @@
-index c6ad9b18bf..1fc70650e0 100644
+index 9f4a0e0a78..dbf6fd1fca 100644
@@ -73 +74 @@
-@@ -2425,4 +2425,11 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
+@@ -2376,4 +2376,11 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
@@ -85 +86 @@
-@@ -2450,4 +2457,11 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
+@@ -2401,4 +2408,11 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
@@ -97 +98 @@
-@@ -2517,6 +2531,5 @@ start_packet_forwarding(int with_tx_first)
+@@ -2468,6 +2482,5 @@ start_packet_forwarding(int with_tx_first)
@@ -105 +106 @@
-@@ -3281,6 +3294,5 @@ start_port(portid_t pid)
+@@ -3127,6 +3140,5 @@ start_port(portid_t pid)


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

* patch 'net/nfp: fix address always related with PF ID 0' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (93 preceding siblings ...)
  2023-07-20 15:18 ` patch 'app/testpmd: fix primary process not polling all queues' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'common/sfc_efx/base: fix Rx queue without RSS hash prefix' " Kevin Traynor
                   ` (44 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Peng Zhang; +Cc: Chaoyong He, Long Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/95e5d439e02b5834ddd53f7688349d9da2479a7e

Thanks.

Kevin

---
From 95e5d439e02b5834ddd53f7688349d9da2479a7e Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Fri, 16 Jun 2023 16:57:23 +0800
Subject: [PATCH] net/nfp: fix address always related with PF ID 0

[ upstream commit 467370c93d73267c1d4417bff975cf812b878f48 ]

Now the PCIE configure bar address is always related with PF ID 0.
For the NIC with multiple PCI device, this will lead the host crash.
Fix this problem by make the PCIE configure bar address related with
the PF ID.

Fixes: c7e9729da6b5 ("net/nfp: support CPP")

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
---
 drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
index 08bc4e8ef2..978c91f6b0 100644
--- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
+++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
@@ -67,6 +67,6 @@
 #define NFP_PCIE_P2C_GENERAL_SIZE(bar)             (1 << ((bar)->bitsize - 4))
 
-#define NFP_PCIE_CFG_BAR_PCIETOCPPEXPBAR(bar, slot) \
-	(NFP_PCIE_BAR(0) + ((bar) * 8 + (slot)) * 4)
+#define NFP_PCIE_CFG_BAR_PCIETOCPPEXPBAR(id, bar, slot) \
+	(NFP_PCIE_BAR(id) + ((bar) * 8 + (slot)) * 4)
 
 #define NFP_PCIE_CPP_BAR_PCIETOCPPEXPBAR(bar, slot) \
@@ -115,4 +115,5 @@ struct nfp_pcie_user {
 	char busdev[BUSDEV_SZ];
 	int barsz;
+	int dev_id;
 	char *cfg;
 };
@@ -256,5 +257,5 @@ nfp_bar_write(struct nfp_pcie_user *nfp, struct nfp_bar *bar,
 
 	bar->csr = nfp->cfg +
-		   NFP_PCIE_CFG_BAR_PCIETOCPPEXPBAR(base, slot);
+		   NFP_PCIE_CFG_BAR_PCIETOCPPEXPBAR(nfp->dev_id, base, slot);
 
 	*(uint32_t *)(bar->csr) = newcfg;
@@ -326,8 +327,6 @@ nfp_enable_bars(struct nfp_pcie_user *nfp)
 		bar->iomem = NULL;
 		bar->lock = 0;
-		bar->csr = nfp->cfg +
-			   NFP_PCIE_CFG_BAR_PCIETOCPPEXPBAR(bar->index >> 3,
-							   bar->index & 7);
-
+		bar->csr = nfp->cfg + NFP_PCIE_CFG_BAR_PCIETOCPPEXPBAR(nfp->dev_id,
+				bar->index >> 3, bar->index & 7);
 		bar->iomem = nfp->cfg + (bar->index << bar->bitsize);
 	}
@@ -844,4 +843,5 @@ nfp6000_init(struct nfp_cpp *cpp, struct rte_pci_device *dev)
 
 	desc->cfg = (char *)dev->mem_resource[0].addr;
+	desc->dev_id = dev->addr.function & 0x7;
 
 	nfp_enable_bars(desc);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:06.686627578 +0100
+++ 0096-net-nfp-fix-address-always-related-with-PF-ID-0.patch	2023-07-20 16:17:55.025751994 +0100
@@ -1 +1 @@
-From 467370c93d73267c1d4417bff975cf812b878f48 Mon Sep 17 00:00:00 2001
+From 95e5d439e02b5834ddd53f7688349d9da2479a7e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 467370c93d73267c1d4417bff975cf812b878f48 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index e230c40051..658c618ee6 100644
+index 08bc4e8ef2..978c91f6b0 100644
@@ -34 +35 @@
-@@ -117,4 +117,5 @@ struct nfp_pcie_user {
+@@ -115,4 +115,5 @@ struct nfp_pcie_user {
@@ -40 +41 @@
-@@ -246,5 +247,5 @@ nfp_bar_write(struct nfp_pcie_user *nfp, struct nfp_bar *bar,
+@@ -256,5 +257,5 @@ nfp_bar_write(struct nfp_pcie_user *nfp, struct nfp_bar *bar,
@@ -47 +48 @@
-@@ -315,8 +316,6 @@ nfp_enable_bars(struct nfp_pcie_user *nfp)
+@@ -326,8 +327,6 @@ nfp_enable_bars(struct nfp_pcie_user *nfp)
@@ -58 +59 @@
-@@ -780,4 +779,5 @@ nfp6000_init(struct nfp_cpp *cpp, struct rte_pci_device *dev)
+@@ -844,4 +843,5 @@ nfp6000_init(struct nfp_cpp *cpp, struct rte_pci_device *dev)
@@ -60 +61 @@
- 	desc->cfg = dev->mem_resource[0].addr;
+ 	desc->cfg = (char *)dev->mem_resource[0].addr;


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

* patch 'common/sfc_efx/base: fix Rx queue without RSS hash prefix' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (94 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/nfp: fix address always related with PF ID 0' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/iavf: fix VLAN offload with AVX512' " Kevin Traynor
                   ` (43 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Artemii Morozov; +Cc: Andy Moreton, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/21e4c85c18e6c1bff0547767c125bd21a310f475

Thanks.

Kevin

---
From 21e4c85c18e6c1bff0547767c125bd21a310f475 Mon Sep 17 00:00:00 2001
From: Artemii Morozov <artemii.morozov@arknetworks.am>
Date: Thu, 22 Jun 2023 16:31:36 +0400
Subject: [PATCH] common/sfc_efx/base: fix Rx queue without RSS hash prefix

[ upstream commit 80d18a958e4f06e121327073439c391dbc870d80 ]

If the prefix for the RSS hash was not chosen the ENOTSUP error should
be returned.

Before this patch success was returned for this case causing Rx queue
creation to fail.

Fixing return value to indicate failure.

Fixes: f784cdc5cbb1 ("common/sfc_efx/base: provide control to deliver RSS hash")

Signed-off-by: Artemii Morozov <artemii.morozov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/base/efx_rx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/common/sfc_efx/base/efx_rx.c b/drivers/common/sfc_efx/base/efx_rx.c
index 7e63363be7..631c2fd063 100644
--- a/drivers/common/sfc_efx/base/efx_rx.c
+++ b/drivers/common/sfc_efx/base/efx_rx.c
@@ -897,6 +897,8 @@ efx_rx_qcreate_internal(
 		rss_hash_field =
 		    &erplp->erpl_fields[EFX_RX_PREFIX_FIELD_RSS_HASH];
-		if (rss_hash_field->erpfi_width_bits == 0)
+		if (rss_hash_field->erpfi_width_bits == 0) {
+			rc = ENOTSUP;
 			goto fail5;
+		}
 	}
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:06.838931099 +0100
+++ 0097-common-sfc_efx-base-fix-Rx-queue-without-RSS-hash-pr.patch	2023-07-20 16:17:55.027752003 +0100
@@ -1 +1 @@
-From 80d18a958e4f06e121327073439c391dbc870d80 Mon Sep 17 00:00:00 2001
+From 21e4c85c18e6c1bff0547767c125bd21a310f475 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 80d18a958e4f06e121327073439c391dbc870d80 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 68f42f5cac..61726a9f0b 100644
+index 7e63363be7..631c2fd063 100644
@@ -28 +29 @@
-@@ -938,6 +938,8 @@ efx_rx_qcreate_internal(
+@@ -897,6 +897,8 @@ efx_rx_qcreate_internal(


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

* patch 'net/iavf: fix VLAN offload with AVX512' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (95 preceding siblings ...)
  2023-07-20 15:18 ` patch 'common/sfc_efx/base: fix Rx queue without RSS hash prefix' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/ice: fix tunnel packet Tx descriptor' " Kevin Traynor
                   ` (42 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Michal Schmidt; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/820df28cf67b7947d73ed60eae19230093ec1d8d

Thanks.

Kevin

---
From 820df28cf67b7947d73ed60eae19230093ec1d8d Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Mon, 27 Mar 2023 12:07:50 +0200
Subject: [PATCH] net/iavf: fix VLAN offload with AVX512

[ upstream commit 32aa88de4dd03b24afeb83195ffe6141b253f7c4 ]

It has been observed that mbufs of some received VLAN packets had the
VLAN tag correctly set in vlan_tci, but ol_flags were missing the
VLAN-indicating flags.

_mm256_shuffle_epi8 operates as two independent 128-bit operations,
not as a single 256-bit operation. To have the RTE_MBUF_F_RX_VLAN* flags
reflected in the resulting vlan_flags for all 8 rx descriptors, the
input l2tag2_flags_shuf must contain the required pattern in both
128-bit halves.

This fix is for the AVX512 Rx path. The same bug in AVX2 was fixed
by commit eb24917428a1 ("net/iavf: fix VLAN offload with AVX2").

Fixes: 4b64ccb328c9 ("net/iavf: fix VLAN extraction in AVX512 path")

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
index b93e717946..9876c715e5 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
@@ -1339,5 +1339,8 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
 							 0, 0, 0, 0,
 							 0, 0, 0, 0,
-							 0, 0, 0, 0,
+							 0, 0,
+							 RTE_MBUF_F_RX_VLAN |
+							 RTE_MBUF_F_RX_VLAN_STRIPPED,
+							 0,
 							 /* end up 128-bits */
 							 0, 0, 0, 0,
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:06.991008060 +0100
+++ 0098-net-iavf-fix-VLAN-offload-with-AVX512.patch	2023-07-20 16:17:55.031752019 +0100
@@ -1 +1 @@
-From 32aa88de4dd03b24afeb83195ffe6141b253f7c4 Mon Sep 17 00:00:00 2001
+From 820df28cf67b7947d73ed60eae19230093ec1d8d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 32aa88de4dd03b24afeb83195ffe6141b253f7c4 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 4fe9b97278..bd2788121b 100644
+index b93e717946..9876c715e5 100644
@@ -32 +33 @@
-@@ -1215,5 +1215,8 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
+@@ -1339,5 +1339,8 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,


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

* patch 'net/ice: fix tunnel packet Tx descriptor' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (96 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/iavf: fix VLAN offload with AVX512' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/ixgbe: add proper memory barriers in Rx' " Kevin Traynor
                   ` (41 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Shiyang He; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/48faf86ccf75da1290a06e9fe0b5a15ae435e660

Thanks.

Kevin

---
From 48faf86ccf75da1290a06e9fe0b5a15ae435e660 Mon Sep 17 00:00:00 2001
From: Shiyang He <shiyangx.he@intel.com>
Date: Thu, 8 Jun 2023 10:19:04 +0000
Subject: [PATCH] net/ice: fix tunnel packet Tx descriptor

[ upstream commit c261e7de45d38ddc3b4b8909c35b448c5e1b0fcf ]

The TX descriptor of tunnel packet filled incorrectly due to the MACLEN
is not set.

This patch fixes this issue by setting MACLEN to correctly fill the
TX descriptor.

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

Signed-off-by: Shiyang He <shiyangx.he@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index f0d0a58c61..19bc94b6a6 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2561,8 +2561,5 @@ ice_txd_enable_checksum(uint64_t ol_flags,
 {
 	/* Set MACLEN */
-	if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
-		*td_offset |= (tx_offload.outer_l2_len >> 1)
-			<< ICE_TX_DESC_LEN_MACLEN_S;
-	else
+	if (!(ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK))
 		*td_offset |= (tx_offload.l2_len >> 1)
 			<< ICE_TX_DESC_LEN_MACLEN_S;
@@ -2825,7 +2822,10 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		/* Fill in tunneling parameters if necessary */
 		cd_tunneling_params = 0;
-		if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
+		if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
+			td_offset |= (tx_offload.outer_l2_len >> 1)
+				<< ICE_TX_DESC_LEN_MACLEN_S;
 			ice_parse_tunneling_params(ol_flags, tx_offload,
 						   &cd_tunneling_params);
+		}
 
 		/* Enable checksum offloading */
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:07.119231032 +0100
+++ 0099-net-ice-fix-tunnel-packet-Tx-descriptor.patch	2023-07-20 16:17:55.037752043 +0100
@@ -1 +1 @@
-From c261e7de45d38ddc3b4b8909c35b448c5e1b0fcf Mon Sep 17 00:00:00 2001
+From 48faf86ccf75da1290a06e9fe0b5a15ae435e660 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c261e7de45d38ddc3b4b8909c35b448c5e1b0fcf ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 665ae32c13..598edb29c9 100644
+index f0d0a58c61..19bc94b6a6 100644
@@ -25 +26 @@
-@@ -2747,8 +2747,5 @@ ice_txd_enable_checksum(uint64_t ol_flags,
+@@ -2561,8 +2561,5 @@ ice_txd_enable_checksum(uint64_t ol_flags,
@@ -35 +36 @@
-@@ -3011,7 +3008,10 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -2825,7 +2822,10 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)


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

* patch 'net/ixgbe: add proper memory barriers in Rx' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (97 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/ice: fix tunnel packet Tx descriptor' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/iavf: fix abnormal disable HW interrupt' " Kevin Traynor
                   ` (40 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Min Zhou; +Cc: Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/3a61738eeef4856edb21345f61dd3779c639ae21
the

Thanks.

Kevin

---
From 3a61738eeef4856edb21345f61dd3779c639ae21 Mon Sep 17 00:00:00 2001
From: Min Zhou <zhoumin@loongson.cn>
Date: Tue, 13 Jun 2023 17:44:25 +0800
Subject: [PATCH] net/ixgbe: add proper memory barriers in Rx

[ upstream commit 85e46c532bc76ebe07f6a397aa76211250aca59c ]

Segmentation fault has been observed while running the
ixgbe_recv_pkts_lro() function to receive packets on the Loongson 3C5000
processor which has 64 cores and 4 NUMA nodes.

From the ixgbe_recv_pkts_lro() function, we found that as long as the first
packet has the EOP bit set, and the length of this packet is less than or
equal to rxq->crc_len, the segmentation fault will definitely happen even
though on the other platforms. For example, if we made the first packet
which had the EOP bit set had a zero length by force, the segmentation
fault would happen on X86.

Because when processd the first packet the first_seg->next will be NULL, if
at the same time this packet has the EOP bit set and its length is less
than or equal to rxq->crc_len, the following loop will be executed:

    for (lp = first_seg; lp->next != rxm; lp = lp->next)
        ;

We know that the first_seg->next will be NULL under this condition. So the
expression of lp->next->next will cause the segmentation fault.

Normally, the length of the first packet with EOP bit set will be greater
than rxq->crc_len. However, the out-of-order execution of CPU may make the
read ordering of the status and the rest of the descriptor fields in this
function not be correct. The related codes are as following:

        rxdp = &rx_ring[rx_id];
 #1     staterr = rte_le_to_cpu_32(rxdp->wb.upper.status_error);

        if (!(staterr & IXGBE_RXDADV_STAT_DD))
            break;

 #2     rxd = *rxdp;

The sentence #2 may be executed before sentence #1. This action is likely
to make the ready packet zero length. If the packet is the first packet and
has the EOP bit set, the above segmentation fault will happen.

So, we should add a proper memory barrier to ensure the read ordering be
correct. We also did the same thing in the ixgbe_recv_pkts() function to
make the rxd data be valid even though we did not find segmentation fault
in this function.

Fixes: 8eecb3295aed ("ixgbe: add LRO support")

Signed-off-by: Min Zhou <zhoumin@loongson.cn>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 47 +++++++++++++++-------------------
 1 file changed, 21 insertions(+), 26 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 99e928a2a9..12e8abcbef 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1819,4 +1819,8 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		 * not volatile, they could be reordered which could lead to
 		 * using invalid descriptor fields when read from rxd.
+		 *
+		 * Meanwhile, to prevent the CPU from executing out of order, we
+		 * need to use a proper memory barrier to ensure the memory
+		 * ordering below.
 		 */
 		rxdp = &rx_ring[rx_id];
@@ -1824,4 +1828,11 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		if (!(staterr & rte_cpu_to_le_32(IXGBE_RXDADV_STAT_DD)))
 			break;
+
+		/*
+		 * Use acquire fence to ensure that status_error which includes
+		 * DD bit is loaded before loading of other descriptor words.
+		 */
+		rte_atomic_thread_fence(__ATOMIC_ACQUIRE);
+
 		rxd = *rxdp;
 
@@ -2090,30 +2101,8 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
 next_desc:
 		/*
-		 * The code in this whole file uses the volatile pointer to
-		 * ensure the read ordering of the status and the rest of the
-		 * descriptor fields (on the compiler level only!!!). This is so
-		 * UGLY - why not to just use the compiler barrier instead? DPDK
-		 * even has the rte_compiler_barrier() for that.
-		 *
-		 * But most importantly this is just wrong because this doesn't
-		 * ensure memory ordering in a general case at all. For
-		 * instance, DPDK is supposed to work on Power CPUs where
-		 * compiler barrier may just not be enough!
-		 *
-		 * I tried to write only this function properly to have a
-		 * starting point (as a part of an LRO/RSC series) but the
-		 * compiler cursed at me when I tried to cast away the
-		 * "volatile" from rx_ring (yes, it's volatile too!!!). So, I'm
-		 * keeping it the way it is for now.
-		 *
-		 * The code in this file is broken in so many other places and
-		 * will just not work on a big endian CPU anyway therefore the
-		 * lines below will have to be revisited together with the rest
-		 * of the ixgbe PMD.
-		 *
-		 * TODO:
-		 *    - Get rid of "volatile" and let the compiler do its job.
-		 *    - Use the proper memory barrier (rte_rmb()) to ensure the
-		 *      memory ordering below.
+		 * "Volatile" only prevents caching of the variable marked
+		 * volatile. Most important, "volatile" cannot prevent the CPU
+		 * from executing out of order. So, it is necessary to use a
+		 * proper memory barrier to ensure the memory ordering below.
 		 */
 		rxdp = &rx_ring[rx_id];
@@ -2123,4 +2112,10 @@ next_desc:
 			break;
 
+		/*
+		 * Use acquire fence to ensure that status_error which includes
+		 * DD bit is loaded before loading of other descriptor words.
+		 */
+		rte_atomic_thread_fence(__ATOMIC_ACQUIRE);
+
 		rxd = *rxdp;
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:07.272604393 +0100
+++ 0100-net-ixgbe-add-proper-memory-barriers-in-Rx.patch	2023-07-20 16:17:55.047752084 +0100
@@ -1 +1 @@
-From 85e46c532bc76ebe07f6a397aa76211250aca59c Mon Sep 17 00:00:00 2001
+From 3a61738eeef4856edb21345f61dd3779c639ae21 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 85e46c532bc76ebe07f6a397aa76211250aca59c ]
+
@@ -50 +51,0 @@
-Cc: stable@dpdk.org
@@ -59 +60 @@
-index 6cbb992823..61f17cd90b 100644
+index 99e928a2a9..12e8abcbef 100644
@@ -62 +63 @@
-@@ -1818,4 +1818,8 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -1819,4 +1819,8 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -71 +72 @@
-@@ -1823,4 +1827,11 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -1824,4 +1828,11 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -83 +84 @@
-@@ -2089,30 +2100,8 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
+@@ -2090,30 +2101,8 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
@@ -118 +119 @@
-@@ -2122,4 +2111,10 @@ next_desc:
+@@ -2123,4 +2112,10 @@ next_desc:


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

* patch 'net/iavf: fix abnormal disable HW interrupt' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (98 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/ixgbe: add proper memory barriers in Rx' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/i40e: fix tunnel packet Tx descriptor' " Kevin Traynor
                   ` (39 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Mingjin Ye; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/8fcb633704411ed5e587b68683047c6b84596445

Thanks.

Kevin

---
From 8fcb633704411ed5e587b68683047c6b84596445 Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Wed, 14 Jun 2023 09:53:03 +0000
Subject: [PATCH] net/iavf: fix abnormal disable HW interrupt

[ upstream commit 675a104e2e940ec476e8b469725e8465d01c0098 ]

For command VIRTCHNL_OP_REQUEST_QUEUES, polling access to the admin
queue has the issue of access overruns after disabling interrupt. That
results in FW disabling HW interrupt for protection purposes.

The updates/changes in this patch:
1. Remove the polling admin queue processing and use the generic interrupt
processing instead.
2. Release redundant queue resource before stopping processing interrupt
events.

Fixes: 22b123a36d07 ("net/avf: initialize PMD")
Fixes: ef807926e148 ("net/iavf: support requesting additional queues from PF")
Fixes: 84108425054a ("net/iavf: support asynchronous virtual channel message")

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 25 +++++++++---------
 drivers/net/iavf/iavf_vchnl.c  | 48 +++++++---------------------------
 2 files changed, 23 insertions(+), 50 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 0a5847ee53..1afbc22d54 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2645,4 +2645,17 @@ iavf_dev_close(struct rte_eth_dev *dev)
 
 	ret = iavf_dev_stop(dev);
+
+	/*
+	 * Release redundant queue resource when close the dev
+	 * so that other vfs can re-use the queues.
+	 */
+	if (vf->lv_enabled) {
+		ret = iavf_request_queues(dev, IAVF_MAX_NUM_QUEUES_DFLT);
+		if (ret)
+			PMD_DRV_LOG(ERR, "Reset the num of queues failed");
+
+		vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
+	}
+
 	adapter->closed = true;
 
@@ -2661,16 +2674,4 @@ iavf_dev_close(struct rte_eth_dev *dev)
 		iavf_config_promisc(adapter, false, false);
 
-	/*
-	 * Release redundant queue resource when close the dev
-	 * so that other vfs can re-use the queues.
-	 */
-	if (vf->lv_enabled) {
-		ret = iavf_request_queues(dev, IAVF_MAX_NUM_QUEUES_DFLT);
-		if (ret)
-			PMD_DRV_LOG(ERR, "Reset the num of queues failed");
-
-		vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
-	}
-
 	iavf_shutdown_adminq(hw);
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) {
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 930a67f517..ecba88ffea 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -176,4 +176,5 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
 	switch (args->ops) {
 	case VIRTCHNL_OP_RESET_VF:
+	case VIRTCHNL_OP_REQUEST_QUEUES:
 		/*no need to wait for response */
 		_clear_cmd(vf);
@@ -199,31 +200,4 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
 		_clear_cmd(vf);
 		break;
-	case VIRTCHNL_OP_REQUEST_QUEUES:
-		/*
-		 * ignore async reply, only wait for system message,
-		 * vf_reset = true if get VIRTCHNL_EVENT_RESET_IMPENDING,
-		 * if not, means request queues failed.
-		 */
-		do {
-			result = iavf_read_msg_from_pf(adapter, args->out_size,
-						   args->out_buffer);
-			if (result == IAVF_MSG_SYS && vf->vf_reset) {
-				break;
-			} else if (result == IAVF_MSG_CMD ||
-				result == IAVF_MSG_ERR) {
-				err = -1;
-				break;
-			}
-			iavf_msec_delay(ASQ_DELAY_MS);
-			/* If don't read msg or read sys event, continue */
-		} while (i++ < MAX_TRY_TIMES);
-		if (i >= MAX_TRY_TIMES ||
-			vf->cmd_retval != VIRTCHNL_STATUS_SUCCESS) {
-			err = -1;
-			PMD_DRV_LOG(ERR, "No response or return failure (%d)"
-				    " for cmd %d", vf->cmd_retval, args->ops);
-		}
-		_clear_cmd(vf);
-		break;
 	default:
 		/* For other virtchnl ops in running time,
@@ -1723,9 +1697,9 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
 		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct iavf_info *vf =  IAVF_DEV_PRIVATE_TO_VF(adapter);
-	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 	struct virtchnl_vf_res_request vfres;
 	struct iavf_cmd_info args;
 	uint16_t num_queue_pairs;
 	int err;
+	int i = 0;
 
 	if (!(vf->vf_res->vf_cap_flags &
@@ -1748,14 +1722,5 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
 
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) {
-		/* disable interrupt to avoid the admin queue message to be read
-		 * before iavf_read_msg_from_pf.
-		 *
-		 * don't disable interrupt handler until ready to execute vf cmd.
-		 */
-		rte_spinlock_lock(&vf->aq_lock);
-		rte_intr_disable(pci_dev->intr_handle);
-		err = iavf_execute_vf_cmd(adapter, &args, 0);
-		rte_intr_enable(pci_dev->intr_handle);
-		rte_spinlock_unlock(&vf->aq_lock);
+		err = iavf_execute_vf_cmd_safe(adapter, &args, 0);
 	} else {
 		rte_eal_alarm_cancel(iavf_dev_alarm_handler, dev);
@@ -1770,4 +1735,11 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
 	}
 
+	/* wait for interrupt notification vf is resetting */
+	while (i++ < MAX_TRY_TIMES) {
+		if (vf->vf_reset)
+			break;
+		iavf_msec_delay(ASQ_DELAY_MS);
+	}
+
 	/* request queues succeeded, vf is resetting */
 	if (vf->vf_reset) {
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:07.417069200 +0100
+++ 0101-net-iavf-fix-abnormal-disable-HW-interrupt.patch	2023-07-20 16:17:55.058752129 +0100
@@ -1 +1 @@
-From 675a104e2e940ec476e8b469725e8465d01c0098 Mon Sep 17 00:00:00 2001
+From 8fcb633704411ed5e587b68683047c6b84596445 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 675a104e2e940ec476e8b469725e8465d01c0098 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index b72dbc8ceb..00b963128b 100644
+index 0a5847ee53..1afbc22d54 100644
@@ -32 +33 @@
-@@ -2758,4 +2758,17 @@ iavf_dev_close(struct rte_eth_dev *dev)
+@@ -2645,4 +2645,17 @@ iavf_dev_close(struct rte_eth_dev *dev)
@@ -50 +51 @@
-@@ -2774,16 +2787,4 @@ iavf_dev_close(struct rte_eth_dev *dev)
+@@ -2661,16 +2674,4 @@ iavf_dev_close(struct rte_eth_dev *dev)
@@ -68 +69 @@
-index 07eb358824..524732f67d 100644
+index 930a67f517..ecba88ffea 100644
@@ -71 +72 @@
-@@ -325,4 +325,5 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
+@@ -176,4 +176,5 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
@@ -77 +78 @@
-@@ -348,31 +349,4 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
+@@ -199,31 +200,4 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args,
@@ -108,2 +109,2 @@
- 		if (rte_thread_is_intr()) {
-@@ -2083,9 +2057,9 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
+ 		/* For other virtchnl ops in running time,
+@@ -1723,9 +1697,9 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
@@ -120 +121 @@
-@@ -2108,14 +2082,5 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
+@@ -1748,14 +1722,5 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
@@ -136 +137 @@
-@@ -2130,4 +2095,11 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)
+@@ -1770,4 +1735,11 @@ iavf_request_queues(struct rte_eth_dev *dev, uint16_t num)


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

* patch 'net/i40e: fix tunnel packet Tx descriptor' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (99 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/iavf: fix abnormal disable HW interrupt' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/e1000: fix queue number initialization' " Kevin Traynor
                   ` (38 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Shiyang He; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/ce8b351eafbc98183266efa850c9eb268e57daff

Thanks.

Kevin

---
From ce8b351eafbc98183266efa850c9eb268e57daff Mon Sep 17 00:00:00 2001
From: Shiyang He <shiyangx.he@intel.com>
Date: Wed, 14 Jun 2023 09:59:03 +0000
Subject: [PATCH] net/i40e: fix tunnel packet Tx descriptor

[ upstream commit e8b1a5dd7df3e7a3f87b469e1b007d560d46d7f2 ]

The TX descriptor of tunnel packet filled incorrectly due to the MACLEN
is not set.

This patch fixes this issue by setting MACLEN to correctly fill the
TX descriptor.

Fixes: c59faf3fe8fe ("net/i40e: support TSO on tunneling packet")

Signed-off-by: Shiyang He <shiyangx.he@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_rxtx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index aa188bff14..1c9e51fe2e 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -305,8 +305,5 @@ i40e_txd_enable_checksum(uint64_t ol_flags,
 {
 	/* Set MACLEN */
-	if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
-		*td_offset |= (tx_offload.outer_l2_len >> 1)
-				<< I40E_TX_DESC_LENGTH_MACLEN_SHIFT;
-	else
+	if (!(ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK))
 		*td_offset |= (tx_offload.l2_len >> 1)
 			<< I40E_TX_DESC_LENGTH_MACLEN_SHIFT;
@@ -1172,7 +1169,10 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		/* Fill in tunneling parameters if necessary */
 		cd_tunneling_params = 0;
-		if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
+		if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
+			td_offset |= (tx_offload.outer_l2_len >> 1)
+					<< I40E_TX_DESC_LENGTH_MACLEN_SHIFT;
 			i40e_parse_tunneling_params(ol_flags, tx_offload,
 						    &cd_tunneling_params);
+		}
 		/* Enable checksum offloading */
 		if (ol_flags & I40E_TX_CKSUM_OFFLOAD_MASK)
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:07.563996182 +0100
+++ 0102-net-i40e-fix-tunnel-packet-Tx-descriptor.patch	2023-07-20 16:17:55.064752154 +0100
@@ -1 +1 @@
-From e8b1a5dd7df3e7a3f87b469e1b007d560d46d7f2 Mon Sep 17 00:00:00 2001
+From ce8b351eafbc98183266efa850c9eb268e57daff Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e8b1a5dd7df3e7a3f87b469e1b007d560d46d7f2 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index fbbefb5015..b4f65b58fa 100644
+index aa188bff14..1c9e51fe2e 100644


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

* patch 'net/e1000: fix queue number initialization' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (100 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/i40e: fix tunnel packet Tx descriptor' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/ice: fix protocol agnostic offloading with big packets' " Kevin Traynor
                   ` (37 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/b36c26af1e40bf5d3c4ca37203a8125eed4315d9

Thanks.

Kevin

---
From b36c26af1e40bf5d3c4ca37203a8125eed4315d9 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Tue, 13 Jun 2023 07:51:51 +0000
Subject: [PATCH] net/e1000: fix queue number initialization

[ upstream commit c1a42d646472fd3477429bf016f682e0865b77f0 ]

The initialized queue number is not match the description in HW
datasheet.

Fixes: 805803445a02 ("e1000: support EM devices (also known as e1000/e1000e)")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/e1000/em_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 794496abfc..e983d5682a 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1074,6 +1074,6 @@ eth_em_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	 */
 
-	dev_info->max_rx_queues = 1;
-	dev_info->max_tx_queues = 1;
+	dev_info->max_rx_queues = 2;
+	dev_info->max_tx_queues = 2;
 
 	dev_info->rx_queue_offload_capa = em_get_rx_queue_offloads_capa();
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:07.645836610 +0100
+++ 0103-net-e1000-fix-queue-number-initialization.patch	2023-07-20 16:17:55.067752166 +0100
@@ -1 +1 @@
-From c1a42d646472fd3477429bf016f682e0865b77f0 Mon Sep 17 00:00:00 2001
+From b36c26af1e40bf5d3c4ca37203a8125eed4315d9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c1a42d646472fd3477429bf016f682e0865b77f0 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 0afedcd00c..c5a4dec693 100644
+index 794496abfc..e983d5682a 100644
@@ -22 +23 @@
-@@ -1089,6 +1089,6 @@ eth_em_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -1074,6 +1074,6 @@ eth_em_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)


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

* patch 'net/ice: fix protocol agnostic offloading with big packets' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (101 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/e1000: fix queue number initialization' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/mlx5: fix risk in NEON Rx descriptor read' " Kevin Traynor
                   ` (36 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Junfeng Guo; +Cc: Ting Xu, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/999e9cecb7d2210d712570b05eebeb32871a056c

Thanks.

Kevin

---
From 999e9cecb7d2210d712570b05eebeb32871a056c Mon Sep 17 00:00:00 2001
From: Junfeng Guo <junfeng.guo@intel.com>
Date: Thu, 15 Jun 2023 13:17:16 +0800
Subject: [PATCH] net/ice: fix protocol agnostic offloading with big packets

[ upstream commit 8f40bad5299a53150dedc38004fca9c5c0ea0f0f ]

In current pattern parsing function for protocol agnostic flow
offloading (raw flow), some of the variables of packet length are
defined as uint8_t, which are too small for some large-size packets,
such as srv6 (Segment Routing over IPv6 dataplane) type. Change the
type to uint16_t.

Fixes: 25be39cc1760 ("net/ice: enable protocol agnostic flow offloading in FDIR")
Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading in RSS")

Signed-off-by: Ting Xu <ting.xu@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_fdir_filter.c | 2 +-
 drivers/net/ice/ice_hash.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 72c8bd8f02..ac03e59fb8 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1879,5 +1879,5 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
 			uint8_t *tmp_spec, *tmp_mask;
 			uint16_t tmp_val = 0;
-			uint8_t pkt_len = 0;
+			uint16_t pkt_len = 0;
 			uint8_t tmp = 0;
 			int i, j;
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index f35727856e..52646e9408 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -654,6 +654,6 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
 	struct ice_parser_profile prof;
 	struct ice_parser_result rslt;
+	uint16_t spec_len, pkt_len;
 	uint8_t *pkt_buf, *msk_buf;
-	uint8_t spec_len, pkt_len;
 	uint8_t tmp_val = 0;
 	uint8_t tmp_c = 0;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:07.740225613 +0100
+++ 0104-net-ice-fix-protocol-agnostic-offloading-with-big-pa.patch	2023-07-20 16:17:55.072752186 +0100
@@ -1 +1 @@
-From 8f40bad5299a53150dedc38004fca9c5c0ea0f0f Mon Sep 17 00:00:00 2001
+From 999e9cecb7d2210d712570b05eebeb32871a056c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f40bad5299a53150dedc38004fca9c5c0ea0f0f ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 480b369af8..e8842bc242 100644
+index 72c8bd8f02..ac03e59fb8 100644
@@ -28 +29 @@
-@@ -1877,5 +1877,5 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
+@@ -1879,5 +1879,5 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,


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

* patch 'net/mlx5: fix risk in NEON Rx descriptor read' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (102 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/ice: fix protocol agnostic offloading with big packets' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/mlx5: fix device removal event handling' " Kevin Traynor
                   ` (35 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Ali Alnubani, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/660055f3627bbdf86f2803bb8488875bb3efd683

Thanks.

Kevin

---
From 660055f3627bbdf86f2803bb8488875bb3efd683 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Tue, 30 May 2023 13:48:04 +0800
Subject: [PATCH] net/mlx5: fix risk in NEON Rx descriptor read

[ upstream commit 7ac7450b20d1e11a20c138707663867918b39403 ]

In NEON vector PMD, vector load loads two contiguous 8B of
descriptor data into vector register. Given vector load ensures no
16B atomicity, read of the word that includes op_own field could be
reordered after read of other words. In this case, some words could
contain invalid data.

Reloaded qword0 after read barrier to update vector register. This
ensures that the fetched data is correct.

Testpmd single core test on N1SDP/ThunderX2 showed no performance drop.

Fixes: 1742c2d9fab0 ("net/mlx5: fix synchronization on polling Rx completions")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index 41b9cf5444..6d3c594e56 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -648,4 +648,12 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 		/* Synchronize for loading the rest of blocks. */
 		rte_io_rmb();
+		/* B.0 (CQE 3) reload lower half of the block. */
+		c3 = vld1q_lane_u64((uint64_t *)(p3 + 48), c3, 0);
+		/* B.0 (CQE 2) reload lower half of the block. */
+		c2 = vld1q_lane_u64((uint64_t *)(p2 + 48), c2, 0);
+		/* B.0 (CQE 1) reload lower half of the block. */
+		c1 = vld1q_lane_u64((uint64_t *)(p1 + 48), c1, 0);
+		/* B.0 (CQE 0) reload lower half of the block. */
+		c0 = vld1q_lane_u64((uint64_t *)(p0 + 48), c0, 0);
 		/* Prefetch next 4 CQEs. */
 		if (pkts_n - pos >= 2 * MLX5_VPMD_DESCS_PER_LOOP) {
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:07.840291874 +0100
+++ 0105-net-mlx5-fix-risk-in-NEON-Rx-descriptor-read.patch	2023-07-20 16:17:55.074752195 +0100
@@ -1 +1 @@
-From 7ac7450b20d1e11a20c138707663867918b39403 Mon Sep 17 00:00:00 2001
+From 660055f3627bbdf86f2803bb8488875bb3efd683 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7ac7450b20d1e11a20c138707663867918b39403 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 91c85bec6d..3ed688191f 100644
+index 41b9cf5444..6d3c594e56 100644
@@ -31 +32 @@
-@@ -676,4 +676,12 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
+@@ -648,4 +648,12 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,


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

* patch 'net/mlx5: fix device removal event handling' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (103 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/mlx5: fix risk in NEON Rx descriptor read' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'common/mlx5: adjust fork call with new kernel API' " Kevin Traynor
                   ` (34 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/be94ef9a9b2f68d3d0f21ede73f4b2b57f1e2d5d

Thanks.

Kevin

---
From be94ef9a9b2f68d3d0f21ede73f4b2b57f1e2d5d Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Tue, 30 May 2023 18:13:28 +0300
Subject: [PATCH] net/mlx5: fix device removal event handling

[ upstream commit 22dc56cfbd39692eb74fad93ff5ecc3df5fd0633 ]

On the device removal kernel notifies user space application
with queueing the IBV_DEVICE_FATAL_EVENT and triggering appropriate
file descriptor. Mellanox kernel driver stack emits this event
twice from different layers (mlx5 and uverbs). The IB port index
is not applicable in the event structure and should be ignored
for IBV_DEVICE_FATAL_EVENT events.

Also, on the older kernels (at least from OFED 4.9) there might be
race conditions causing the event queue close before application
fetches the IBV_DEVICE_FATAL_EVENT message with ibv_get_async_event()
API.

To provide the reliable device removal event detection the patch:

  - ignores the IB port index for the IBV_DEVICE_FATAL_EVENT
  - introduces the flag to notify PMD about removal only once
  - acks event with ibv_ack_async_event after actual handling
  - checks for EIO error, making sure queue is not closed yet

Fixes: 40d9f906f4e2 ("net/mlx5: fix device removal handler for multiport")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_ethdev_os.c | 40 +++++++++++++++++--------
 drivers/net/mlx5/mlx5.h                 |  1 +
 2 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 89095e856f..a22ffab3f7 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -746,4 +746,5 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh)
 	for (i = 0; i < sh->max_port; ++i) {
 		struct rte_eth_dev *dev;
+		struct mlx5_priv *priv;
 
 		if (sh->port[i].ih_port_id >= RTE_MAX_ETHPORTS) {
@@ -756,7 +757,12 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh)
 		dev = &rte_eth_devices[sh->port[i].ih_port_id];
 		MLX5_ASSERT(dev);
-		if (dev->data->dev_conf.intr_conf.rmv)
+		priv = dev->data->dev_private;
+		MLX5_ASSERT(priv);
+		if (!priv->rmv_notified && dev->data->dev_conf.intr_conf.rmv) {
+			/* Notify driver about removal only once. */
+			priv->rmv_notified = 1;
 			rte_eth_dev_callback_process
 				(dev, RTE_ETH_EVENT_INTR_RMV, NULL);
+		}
 	}
 }
@@ -830,19 +836,27 @@ mlx5_dev_interrupt_handler(void *cb_arg)
 		uint32_t tmp;
 
-		if (mlx5_glue->get_async_event(sh->cdev->ctx, &event))
+		if (mlx5_glue->get_async_event(sh->cdev->ctx, &event)) {
+			if (errno == EIO) {
+				DRV_LOG(DEBUG,
+					"IBV async event queue closed on: %s",
+					sh->ibdev_name);
+				mlx5_dev_interrupt_device_fatal(sh);
+			}
 			break;
+		}
+		if (event.event_type == IBV_EVENT_DEVICE_FATAL) {
+			/*
+			 * The DEVICE_FATAL event can be called by kernel
+			 * twice - from mlx5 and uverbs layers, and port
+			 * index is not applicable. We should notify all
+			 * existing ports.
+			 */
+			mlx5_dev_interrupt_device_fatal(sh);
+			mlx5_glue->ack_async_event(&event);
+			continue;
+		}
 		/* Retrieve and check IB port index. */
 		tmp = (uint32_t)event.element.port_num;
-		if (!tmp && event.event_type == IBV_EVENT_DEVICE_FATAL) {
-			/*
-			 * The DEVICE_FATAL event is called once for
-			 * entire device without port specifying.
-			 * We should notify all existing ports.
-			 */
-			mlx5_glue->ack_async_event(&event);
-			mlx5_dev_interrupt_device_fatal(sh);
-			continue;
-		}
-		MLX5_ASSERT(tmp && (tmp <= sh->max_port));
+		MLX5_ASSERT(tmp <= sh->max_port);
 		if (!tmp) {
 			/* Unsupported device level event. */
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index f14a76f301..7caf27a7aa 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1418,4 +1418,5 @@ struct mlx5_priv {
 	unsigned int mtr_reg_share:1; /* Whether support meter REG_C share. */
 	unsigned int lb_used:1; /* Loopback queue is referred to. */
+	unsigned int rmv_notified:1; /* Notified about removal event */
 	uint32_t mark_enabled:1; /* If mark action is enabled on rxqs. */
 	uint16_t domain_id; /* Switch domain identifier. */
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:07.967226434 +0100
+++ 0106-net-mlx5-fix-device-removal-event-handling.patch	2023-07-20 16:17:55.081752223 +0100
@@ -1 +1 @@
-From 22dc56cfbd39692eb74fad93ff5ecc3df5fd0633 Mon Sep 17 00:00:00 2001
+From be94ef9a9b2f68d3d0f21ede73f4b2b57f1e2d5d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 22dc56cfbd39692eb74fad93ff5ecc3df5fd0633 ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index 55801534d1..639e629fe4 100644
+index 89095e856f..a22ffab3f7 100644
@@ -38 +39 @@
-@@ -747,4 +747,5 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh)
+@@ -746,4 +746,5 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh)
@@ -44 +45 @@
-@@ -757,7 +758,12 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh)
+@@ -756,7 +757,12 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh)
@@ -58 +59 @@
-@@ -831,19 +837,27 @@ mlx5_dev_interrupt_handler(void *cb_arg)
+@@ -830,19 +836,27 @@ mlx5_dev_interrupt_handler(void *cb_arg)
@@ -99 +100 @@
-index fffd3c79f1..10a2f33ea0 100644
+index f14a76f301..7caf27a7aa 100644
@@ -102 +103 @@
-@@ -1745,4 +1745,5 @@ struct mlx5_priv {
+@@ -1418,4 +1418,5 @@ struct mlx5_priv {
@@ -107 +108 @@
- 	uint32_t num_lag_ports:4; /* Number of ports can be bonded. */
+ 	uint16_t domain_id; /* Switch domain identifier. */


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

* patch 'common/mlx5: adjust fork call with new kernel API' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (104 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/mlx5: fix device removal event handling' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:18 ` patch 'net/cnxk: flush SQ before configuring MTU' " Kevin Traynor
                   ` (33 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Erez Ferber; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/36b2f4918f8a6bf02efbc33737604591d97e8a0e

Thanks.

Kevin

---
From 36b2f4918f8a6bf02efbc33737604591d97e8a0e Mon Sep 17 00:00:00 2001
From: Erez Ferber <erezf@nvidia.com>
Date: Wed, 24 May 2023 15:01:40 +0300
Subject: [PATCH] common/mlx5: adjust fork call with new kernel API

[ upstream commit 42f113c53cbbbc4585ad68b4d2a8aa9bddad23da ]

While doing process fork() the operating system remaps all the parent
process's memory to the address space of the child process and activates
the Copy-on-Write mechanics - it duplicates physical pages once memory
writing happens in the child process. Sometimes memory duplication is
not allowed - for example, if the page contains hardware queue
descriptors. To handle similar issues the rdma-core library should be
prepared for forking.

The ibv_fork_init() prepares the library to track all the related memory
and prevent it from forking using madvise() system API. This approach
allows fork, but not all the memory is forked to the child process and,
application should care not to touch pages where the parent application
allocated the rdma-core objects.

The newer kernels propose an option of copy-on-fork for DMA pages and
tracking all the memory and disabling it for the forking is no longer
needed. The new API routine ibv_is_fork_initialized() should be involved
to decide if library initialization for forking is required.

Fixes: 0e83b8e536c1 ("net/mlx5: move rdma-core calls to separate file")

Signed-off-by: Erez Ferber <erezf@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/linux/meson.build | 2 ++
 drivers/common/mlx5/linux/mlx5_glue.c | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index 4c7b53b9bd..8be82850ba 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -203,4 +203,6 @@ has_sym_args = [
         [ 'HAVE_MLX5_IBV_REG_MR_IOVA', 'infiniband/verbs.h',
             'ibv_reg_mr_iova' ],
+        [ 'HAVE_IBV_FORK_UNNEEDED', 'infiniband/verbs.h',
+            'ibv_is_fork_initialized'],
 ]
 config = configuration_data()
diff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c
index bc6622053f..e29b3b8eae 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.c
+++ b/drivers/common/mlx5/linux/mlx5_glue.c
@@ -20,4 +20,8 @@ static int
 mlx5_glue_fork_init(void)
 {
+#ifdef HAVE_IBV_FORK_UNNEEDED
+	if (ibv_is_fork_initialized() == IBV_FORK_UNNEEDED)
+		return 0; /* ibv_fork_init() not needed */
+#endif
 	return ibv_fork_init();
 }
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:08.070225191 +0100
+++ 0107-common-mlx5-adjust-fork-call-with-new-kernel-API.patch	2023-07-20 16:17:55.083752231 +0100
@@ -1 +1 @@
-From 42f113c53cbbbc4585ad68b4d2a8aa9bddad23da Mon Sep 17 00:00:00 2001
+From 36b2f4918f8a6bf02efbc33737604591d97e8a0e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 42f113c53cbbbc4585ad68b4d2a8aa9bddad23da ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -36 +37 @@
-index 718da020f7..15edc13041 100644
+index 4c7b53b9bd..8be82850ba 100644
@@ -39,3 +40,3 @@
-@@ -222,4 +222,6 @@ has_sym_args = [
-         [ 'HAVE_MLX5DV_CREATE_STEERING_ANCHOR', 'infiniband/mlx5dv.h',
-             'mlx5dv_create_steering_anchor'],
+@@ -203,4 +203,6 @@ has_sym_args = [
+         [ 'HAVE_MLX5_IBV_REG_MR_IOVA', 'infiniband/verbs.h',
+             'ibv_reg_mr_iova' ],
@@ -45 +46 @@
- if  libmtcr_ul_found
+ config = configuration_data()
@@ -47 +48 @@
-index 3497aa940d..6f858db8fc 100644
+index bc6622053f..e29b3b8eae 100644


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

* patch 'net/cnxk: flush SQ before configuring MTU' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (105 preceding siblings ...)
  2023-07-20 15:18 ` patch 'common/mlx5: adjust fork call with new kernel API' " Kevin Traynor
@ 2023-07-20 15:18 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'net/cnxk: fix cookies check with security offload' " Kevin Traynor
                   ` (32 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:18 UTC (permalink / raw)
  To: Satha Rao; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/dd0782d8b25ab3e90c4dc5946e60fc01a2dca04a

Thanks.

Kevin

---
From dd0782d8b25ab3e90c4dc5946e60fc01a2dca04a Mon Sep 17 00:00:00 2001
From: Satha Rao <skoteshwar@marvell.com>
Date: Thu, 15 Jun 2023 01:04:23 -0400
Subject: [PATCH] net/cnxk: flush SQ before configuring MTU

[ upstream commit b33bef500a50b750577e3028e7ae8aff08bf3ae9 ]

When try to configure MTU for lower value causes run time failure
due to old bigger packets enqueued. To avoid error interrupts better
to flush the all SQs of this port before configuring new MTU.

Fixes: 8589ec212e80 ("net/cnxk: support MTU set")

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev.h     |  1 +
 drivers/net/cnxk/cnxk_ethdev_ops.c | 47 ++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h
index 480cc6dfa4..ccdc5f04ee 100644
--- a/drivers/net/cnxk/cnxk_ethdev.h
+++ b/drivers/net/cnxk/cnxk_ethdev.h
@@ -445,4 +445,5 @@ int cnxk_nix_probe(struct rte_pci_driver *pci_drv,
 int cnxk_nix_remove(struct rte_pci_device *pci_dev);
 int cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu);
+int cnxk_nix_sq_flush(struct rte_eth_dev *eth_dev);
 int cnxk_nix_mc_addr_list_configure(struct rte_eth_dev *eth_dev,
 				    struct rte_ether_addr *mc_addr_set,
diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index f1d13c5004..9662bb0a2c 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -391,4 +391,42 @@ cnxk_nix_mac_addr_del(struct rte_eth_dev *eth_dev, uint32_t index)
 }
 
+int
+cnxk_nix_sq_flush(struct rte_eth_dev *eth_dev)
+{
+	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
+	struct rte_eth_dev_data *data = eth_dev->data;
+	int i, rc = 0;
+
+	/* Flush all tx queues */
+	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
+		struct roc_nix_sq *sq = &dev->sqs[i];
+
+		if (eth_dev->data->tx_queues[i] == NULL)
+			continue;
+
+		rc = roc_nix_tm_sq_aura_fc(sq, false);
+		if (rc) {
+			plt_err("Failed to disable sqb aura fc, rc=%d", rc);
+			goto exit;
+		}
+
+		/* Wait for sq entries to be flushed */
+		rc = roc_nix_tm_sq_flush_spin(sq);
+		if (rc) {
+			plt_err("Failed to drain sq, rc=%d\n", rc);
+			goto exit;
+		}
+		if (data->tx_queue_state[i] == RTE_ETH_QUEUE_STATE_STARTED) {
+			rc = roc_nix_tm_sq_aura_fc(sq, true);
+			if (rc) {
+				plt_err("Failed to enable sq aura fc, txq=%u, rc=%d", i, rc);
+				goto exit;
+			}
+		}
+	}
+exit:
+	return rc;
+}
+
 int
 cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
@@ -434,4 +472,13 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 	}
 
+	/* if new MTU was smaller than old one, then flush all SQs before MTU change */
+	if (old_frame_size > frame_size) {
+		if (data->dev_started) {
+			plt_err("Reducing MTU is not supported when device started");
+			goto exit;
+		}
+		cnxk_nix_sq_flush(eth_dev);
+	}
+
 	frame_size -= RTE_ETHER_CRC_LEN;
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:08.228273487 +0100
+++ 0108-net-cnxk-flush-SQ-before-configuring-MTU.patch	2023-07-20 16:17:55.086752244 +0100
@@ -1 +1 @@
-From b33bef500a50b750577e3028e7ae8aff08bf3ae9 Mon Sep 17 00:00:00 2001
+From dd0782d8b25ab3e90c4dc5946e60fc01a2dca04a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b33bef500a50b750577e3028e7ae8aff08bf3ae9 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 45dc72b609..ed531fb277 100644
+index 480cc6dfa4..ccdc5f04ee 100644
@@ -23 +24 @@
-@@ -466,4 +466,5 @@ int cnxk_nix_probe(struct rte_pci_driver *pci_drv,
+@@ -445,4 +445,5 @@ int cnxk_nix_probe(struct rte_pci_driver *pci_drv,
@@ -30 +31 @@
-index bce6d59bbc..da5ee19c85 100644
+index f1d13c5004..9662bb0a2c 100644
@@ -33 +34 @@
-@@ -496,4 +496,42 @@ cnxk_nix_mac_addr_del(struct rte_eth_dev *eth_dev, uint32_t index)
+@@ -391,4 +391,42 @@ cnxk_nix_mac_addr_del(struct rte_eth_dev *eth_dev, uint32_t index)
@@ -76 +77 @@
-@@ -539,4 +577,13 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
+@@ -434,4 +472,13 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)


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

* patch 'net/cnxk: fix cookies check with security offload' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (106 preceding siblings ...)
  2023-07-20 15:18 ` patch 'net/cnxk: flush SQ before configuring MTU' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'net/cnxk: fix flow queue index validation' " Kevin Traynor
                   ` (31 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/988a65acc3fb7a714aef30349bf850beea11b95d

Thanks.

Kevin

---
From 988a65acc3fb7a714aef30349bf850beea11b95d Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Thu, 15 Jun 2023 18:39:22 +0530
Subject: [PATCH] net/cnxk: fix cookies check with security offload

[ upstream commit 7364015fefd308ac89565fc78a4b910e83546422 ]

Fix missing/incorrect check cookies call's with security offload
enabled on Rx and Tx.

Fixes: 55bfac717c72 ("net/cnxk: support Tx security offload on cn10k")
Fixes: 0ed7107373b4 ("net/cnxk: remove duplicate mempool debug checks")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/cnxk/cn10k_rx.h | 12 ++++++------
 drivers/net/cnxk/cn10k_tx.h |  2 ++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/cnxk/cn10k_rx.h b/drivers/net/cnxk/cn10k_rx.h
index 058221034a..42812d5bd3 100644
--- a/drivers/net/cnxk/cn10k_rx.h
+++ b/drivers/net/cnxk/cn10k_rx.h
@@ -650,4 +650,10 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
 		mbuf3 = (struct rte_mbuf *)vgetq_lane_u64(mbuf23, 1);
 
+		/* Mark mempool obj as "get" as it is alloc'ed by NIX */
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf0->pool, (void **)&mbuf0, 1, 1);
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf1->pool, (void **)&mbuf1, 1, 1);
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf2->pool, (void **)&mbuf2, 1, 1);
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf3->pool, (void **)&mbuf3, 1, 1);
+
 		/* Mask to get packet len from NIX_RX_SG_S */
 		const uint8x16_t shuf_msk = {
@@ -915,10 +921,4 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
 		roc_prefetch_store_keep(mbuf3);
 
-		/* Mark mempool obj as "get" as it is alloc'ed by NIX */
-		RTE_MEMPOOL_CHECK_COOKIES(mbuf0->pool, (void **)&mbuf0, 1, 1);
-		RTE_MEMPOOL_CHECK_COOKIES(mbuf1->pool, (void **)&mbuf1, 1, 1);
-		RTE_MEMPOOL_CHECK_COOKIES(mbuf2->pool, (void **)&mbuf2, 1, 1);
-		RTE_MEMPOOL_CHECK_COOKIES(mbuf3->pool, (void **)&mbuf3, 1, 1);
-
 		packets += NIX_DESCS_PER_LOOP;
 
diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index a28c9a7e22..692d7978fc 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -1466,8 +1466,10 @@ cn10k_nix_xmit_store(struct rte_mbuf *mbuf, uint8_t segdw, uintptr_t laddr,
 			vst1q_u64(LMT_OFF(laddr, 0, 32), cmd1);
 		}
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 0);
 	} else {
 		/* Store the prepared send desc to LMT lines */
 		vst1q_u64(LMT_OFF(laddr, 0, 0), cmd0);
 		vst1q_u64(LMT_OFF(laddr, 0, 16), cmd1);
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 0);
 	}
 }
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:08.342152224 +0100
+++ 0109-net-cnxk-fix-cookies-check-with-security-offload.patch	2023-07-20 16:17:55.094752276 +0100
@@ -1 +1 @@
-From 7364015fefd308ac89565fc78a4b910e83546422 Mon Sep 17 00:00:00 2001
+From 988a65acc3fb7a714aef30349bf850beea11b95d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7364015fefd308ac89565fc78a4b910e83546422 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b7074906a6..8148866e44 100644
+index 058221034a..42812d5bd3 100644
@@ -23 +24 @@
-@@ -1242,4 +1242,10 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
+@@ -650,4 +650,10 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
@@ -32,4 +33,4 @@
- 		if (!(flags & NIX_RX_VWQE_F)) {
- 			/* Mask to get packet len from NIX_RX_SG_S */
-@@ -1754,10 +1760,4 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
- 		vst1q_u64((uint64_t *)&mbufs[packets + 2], mbuf23);
+ 		/* Mask to get packet len from NIX_RX_SG_S */
+ 		const uint8x16_t shuf_msk = {
+@@ -915,10 +921,4 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
+ 		roc_prefetch_store_keep(mbuf3);
@@ -43,2 +44,2 @@
- 		nix_mbuf_validate_next(mbuf0);
- 		nix_mbuf_validate_next(mbuf1);
+ 		packets += NIX_DESCS_PER_LOOP;
+ 
@@ -46 +47 @@
-index 9f0af7248f..298d243aac 100644
+index a28c9a7e22..692d7978fc 100644
@@ -49 +50 @@
-@@ -1967,8 +1967,10 @@ cn10k_nix_xmit_store(struct cn10k_eth_txq *txq,
+@@ -1466,8 +1466,10 @@ cn10k_nix_xmit_store(struct rte_mbuf *mbuf, uint8_t segdw, uintptr_t laddr,


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

* patch 'net/cnxk: fix flow queue index validation' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (107 preceding siblings ...)
  2023-07-20 15:19 ` patch 'net/cnxk: fix cookies check with security offload' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'ipc: fix file descriptor leakage with unhandled messages' " Kevin Traynor
                   ` (30 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Kiran Kumar K, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/14945c066d13d515e52a11061a7f0b63ab73061d

Thanks.

Kevin

---
From 14945c066d13d515e52a11061a7f0b63ab73061d Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Tue, 20 Jun 2023 16:31:37 +0530
Subject: [PATCH] net/cnxk: fix flow queue index validation

[ upstream commit 47f4051664c3235586c08095a2b328d5c86b87e2 ]

When creating a flow rule directing traffic from PF
to VF, current validation is incorrectly checking the
RQ index in flow action with the PF's maximum
configured RQs. This validation is applicable only
when action target is an RQ of the PF. The validation
has been modified accordingly.

Fixes: 8c009b4505e9 ("net/cnxk: support flow API")

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/net/cnxk/cnxk_rte_flow.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/net/cnxk/cnxk_rte_flow.c b/drivers/net/cnxk/cnxk_rte_flow.c
index 32166ae764..0410f2d82e 100644
--- a/drivers/net/cnxk/cnxk_rte_flow.c
+++ b/drivers/net/cnxk/cnxk_rte_flow.c
@@ -111,6 +111,6 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
 {
 	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
+	const struct rte_flow_action_queue *act_q = NULL;
 	const struct rte_flow_action_port_id *port_act;
-	const struct rte_flow_action_queue *act_q;
 	struct roc_npc *roc_npc_src = &dev->npc;
 	struct rte_eth_dev *portid_eth_dev;
@@ -118,4 +118,5 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
 	struct cnxk_eth_dev *hw_dst;
 	struct roc_npc *roc_npc_dst;
+	bool is_vf_action = false;
 	int i = 0, rc = 0;
 	int rq;
@@ -151,4 +152,5 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
 			in_actions[i].type = ROC_NPC_ACTION_TYPE_VF;
 			in_actions[i].conf = actions->conf;
+			is_vf_action = true;
 			break;
 
@@ -184,11 +186,5 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
 
 		case RTE_FLOW_ACTION_TYPE_QUEUE:
-			act_q = (const struct rte_flow_action_queue *)
-					actions->conf;
-			rq = act_q->index;
-			if (rq >= eth_dev->data->nb_rx_queues) {
-				plt_npc_dbg("Invalid queue index");
-				goto err_exit;
-			}
+			act_q = (const struct rte_flow_action_queue *)actions->conf;
 			in_actions[i].type = ROC_NPC_ACTION_TYPE_QUEUE;
 			in_actions[i].conf = actions->conf;
@@ -235,4 +231,12 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
 		i++;
 	}
+
+	if (!is_vf_action && act_q) {
+		rq = act_q->index;
+		if (rq >= eth_dev->data->nb_rx_queues) {
+			plt_npc_dbg("Invalid queue index");
+			goto err_exit;
+		}
+	}
 	in_actions[i].type = ROC_NPC_ACTION_TYPE_END;
 	return 0;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:08.466345750 +0100
+++ 0110-net-cnxk-fix-flow-queue-index-validation.patch	2023-07-20 16:17:55.096752284 +0100
@@ -1 +1 @@
-From 47f4051664c3235586c08095a2b328d5c86b87e2 Mon Sep 17 00:00:00 2001
+From 14945c066d13d515e52a11061a7f0b63ab73061d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 47f4051664c3235586c08095a2b328d5c86b87e2 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
- drivers/net/cnxk/cnxk_flow.c | 20 ++++++++++++--------
+ drivers/net/cnxk/cnxk_rte_flow.c | 20 ++++++++++++--------
@@ -22,5 +23,5 @@
-diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c
-index 1b88542dcb..3b8348ae9c 100644
---- a/drivers/net/cnxk/cnxk_flow.c
-+++ b/drivers/net/cnxk/cnxk_flow.c
-@@ -118,11 +118,12 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
+diff --git a/drivers/net/cnxk/cnxk_rte_flow.c b/drivers/net/cnxk/cnxk_rte_flow.c
+index 32166ae764..0410f2d82e 100644
+--- a/drivers/net/cnxk/cnxk_rte_flow.c
++++ b/drivers/net/cnxk/cnxk_rte_flow.c
+@@ -111,6 +111,6 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
@@ -30 +30,0 @@
- 	const struct rte_flow_action_ethdev *act_ethdev;
@@ -32,0 +33 @@
+ 	struct roc_npc *roc_npc_src = &dev->npc;
@@ -34 +35 @@
- 	char if_name[RTE_ETH_NAME_MAX_LEN];
+@@ -118,4 +118,5 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
@@ -40 +41 @@
-@@ -158,4 +159,5 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
+@@ -151,4 +152,5 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
@@ -46 +47 @@
-@@ -190,11 +192,5 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
+@@ -184,11 +186,5 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
@@ -59 +60 @@
-@@ -242,4 +238,12 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
+@@ -235,4 +231,12 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,


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

* patch 'ipc: fix file descriptor leakage with unhandled messages' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (108 preceding siblings ...)
  2023-07-20 15:19 ` patch 'net/cnxk: fix flow queue index validation' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'fib: fix adding default route' " Kevin Traynor
                   ` (29 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Chengwen Feng, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/ac5250b965af48a3af548cfe18bdc1bbd904430e

Thanks.

Kevin

---
From ac5250b965af48a3af548cfe18bdc1bbd904430e Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 28 Jun 2023 15:19:38 +0300
Subject: [PATCH] ipc: fix file descriptor leakage with unhandled messages

[ upstream commit a64a4564705d18d20d20cfa16c79e795b7bf0f1e ]

The sendmsg()/recvmsg() API is used to establish communication between
the DPDK processes. The API supposes inter-process file descriptors
sending and conversion, the recipient sees the resulting descriptors
in the received message - the operating systems creates ones in the
right context.

The message receiving is performed by EAL in the dedicated thread
and it might happen the message is received by EAL and not handled
by addressed PMD or application due to some reasons (timeouts, race
condition, etc). EAL just dropped unhandled messages causing the
file descriptor leakage if these ones were presented in the message.

The patch closes the descriptors (if any) in unhandled messages.

Fixes: 783b6e54971d ("eal: add synchronous multi-process communication")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/eal/common/eal_common_proc.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c
index 50f0668148..38a2164f71 100644
--- a/lib/eal/common/eal_common_proc.c
+++ b/lib/eal/common/eal_common_proc.c
@@ -324,4 +324,13 @@ retry:
 }
 
+static void
+cleanup_msg_fds(const struct rte_mp_msg *msg)
+{
+	int i;
+
+	for (i = 0; i < msg->num_fds; i++)
+		close(msg->fds[i]);
+}
+
 static void
 process_msg(struct mp_msg_internal *m, struct sockaddr_un *s)
@@ -352,6 +361,8 @@ process_msg(struct mp_msg_internal *m, struct sockaddr_un *s)
 				req = async_reply_handle_thread_unsafe(
 						pending_req);
-		} else
+		} else {
 			RTE_LOG(ERR, EAL, "Drop mp reply: %s\n", msg->name);
+			cleanup_msg_fds(msg);
+		}
 		pthread_mutex_unlock(&pending_requests.lock);
 
@@ -383,4 +394,5 @@ process_msg(struct mp_msg_internal *m, struct sockaddr_un *s)
 				msg->name);
 		}
+		cleanup_msg_fds(msg);
 	} else if (action(msg, s->sun_path) < 0) {
 		RTE_LOG(ERR, EAL, "Fail to handle message: %s\n", msg->name);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:08.557262549 +0100
+++ 0111-ipc-fix-file-descriptor-leakage-with-unhandled-messa.patch	2023-07-20 16:17:55.098752293 +0100
@@ -1 +1 @@
-From a64a4564705d18d20d20cfa16c79e795b7bf0f1e Mon Sep 17 00:00:00 2001
+From ac5250b965af48a3af548cfe18bdc1bbd904430e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a64a4564705d18d20d20cfa16c79e795b7bf0f1e ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 7a038e0a3c..02d4599d67 100644
+index 50f0668148..38a2164f71 100644
@@ -34 +35 @@
-@@ -322,4 +322,13 @@ retry:
+@@ -324,4 +324,13 @@ retry:
@@ -48 +49 @@
-@@ -350,6 +359,8 @@ process_msg(struct mp_msg_internal *m, struct sockaddr_un *s)
+@@ -352,6 +361,8 @@ process_msg(struct mp_msg_internal *m, struct sockaddr_un *s)
@@ -58 +59 @@
-@@ -381,4 +392,5 @@ process_msg(struct mp_msg_internal *m, struct sockaddr_un *s)
+@@ -383,4 +394,5 @@ process_msg(struct mp_msg_internal *m, struct sockaddr_un *s)


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

* patch 'fib: fix adding default route' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (109 preceding siblings ...)
  2023-07-20 15:19 ` patch 'ipc: fix file descriptor leakage with unhandled messages' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'mem: fix memsegs exhausted message' " Kevin Traynor
                   ` (28 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/5634ca2e970ba1bf865222dbbf46a3f0e88a7915

Thanks.

Kevin

---
From 5634ca2e970ba1bf865222dbbf46a3f0e88a7915 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 3 Jul 2023 15:43:35 +0000
Subject: [PATCH] fib: fix adding default route

[ upstream commit 880bc2b5f3bdbde0eee4d880afaaf91b4babbdfc ]

Fixed an issue that occurs when
adding a default route as the first route.

Bugzilla ID: 1160
Fixes: 7dc7868b200d ("fib: add DIR24-8 dataplane algorithm")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/fib/dir24_8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fib/dir24_8.c b/lib/fib/dir24_8.c
index bb3bc9753b..181ed03dee 100644
--- a/lib/fib/dir24_8.c
+++ b/lib/fib/dir24_8.c
@@ -395,5 +395,5 @@ modify_fib(struct dir24_8_tbl *dp, struct rte_rib *rib, uint32_t ip,
 		} else {
 			redge = ip + (uint32_t)(1ULL << (32 - depth));
-			if (ledge == redge)
+			if (ledge == redge && ledge != 0)
 				break;
 			ret = install_to_fib(dp, ledge, redge,
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:08.688793590 +0100
+++ 0112-fib-fix-adding-default-route.patch	2023-07-20 16:17:55.099752297 +0100
@@ -1 +1 @@
-From 880bc2b5f3bdbde0eee4d880afaaf91b4babbdfc Mon Sep 17 00:00:00 2001
+From 5634ca2e970ba1bf865222dbbf46a3f0e88a7915 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 880bc2b5f3bdbde0eee4d880afaaf91b4babbdfc ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a8ba4f64ca..3efdcb533c 100644
+index bb3bc9753b..181ed03dee 100644
@@ -22 +23 @@
-@@ -391,5 +391,5 @@ modify_fib(struct dir24_8_tbl *dp, struct rte_rib *rib, uint32_t ip,
+@@ -395,5 +395,5 @@ modify_fib(struct dir24_8_tbl *dp, struct rte_rib *rib, uint32_t ip,


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

* patch 'mem: fix memsegs exhausted message' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (110 preceding siblings ...)
  2023-07-20 15:19 ` patch 'fib: fix adding default route' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'hash: fix reading unaligned bits in Toeplitz hash' " Kevin Traynor
                   ` (27 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Fengnan Chang; +Cc: Anatoly Burakov, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/00c14e2d3e00c4666a5087349855ffcc3e06ed74

Thanks.

Kevin

---
From 00c14e2d3e00c4666a5087349855ffcc3e06ed74 Mon Sep 17 00:00:00 2001
From: Fengnan Chang <changfengnan@bytedance.com>
Date: Tue, 4 Jul 2023 20:17:51 +0800
Subject: [PATCH] mem: fix memsegs exhausted message

[ upstream commit d93000bb9310685d0df3aa2c11cff3000ed17a82 ]

When there is not enough space to memsegs, we should prompt
which configuration should be modified instead of printing
some numbers.

Fixes: dd61b34d580b ("mem: error if requesting more segments than MAX_MEMSEG")
Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")

Signed-off-by: Fengnan Chang <changfengnan@bytedance.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 lib/eal/common/eal_common_dynmem.c |  6 ++----
 lib/eal/freebsd/eal_memory.c       |  8 +++-----
 lib/eal/linux/eal_memory.c         | 11 ++++-------
 3 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/lib/eal/common/eal_common_dynmem.c b/lib/eal/common/eal_common_dynmem.c
index c1e1889f5c..9af299b8f8 100644
--- a/lib/eal/common/eal_common_dynmem.c
+++ b/lib/eal/common/eal_common_dynmem.c
@@ -120,6 +120,5 @@ eal_dynmem_memseg_lists_init(void)
 
 	if (max_seglists_per_type == 0) {
-		RTE_LOG(ERR, EAL, "Cannot accommodate all memory types, please increase %s\n",
-			RTE_STR(RTE_MAX_MEMSEG_LISTS));
+		RTE_LOG(ERR, EAL, "Cannot accommodate all memory types, please increase RTE_MAX_MEMSEG_LISTS\n");
 		goto out;
 	}
@@ -180,6 +179,5 @@ eal_dynmem_memseg_lists_init(void)
 			if (msl_idx >= RTE_MAX_MEMSEG_LISTS) {
 				RTE_LOG(ERR, EAL,
-					"No more space in memseg lists, please increase %s\n",
-					RTE_STR(RTE_MAX_MEMSEG_LISTS));
+					"No more space in memseg lists, please increase RTE_MAX_MEMSEG_LISTS\n");
 				goto out;
 			}
diff --git a/lib/eal/freebsd/eal_memory.c b/lib/eal/freebsd/eal_memory.c
index 17ab10e0ca..5c6165c580 100644
--- a/lib/eal/freebsd/eal_memory.c
+++ b/lib/eal/freebsd/eal_memory.c
@@ -173,7 +173,6 @@ rte_eal_hugepage_init(void)
 			}
 			if (msl_idx == RTE_MAX_MEMSEG_LISTS) {
-				RTE_LOG(ERR, EAL, "Could not find space for memseg. Please increase %s and/or %s in configuration.\n",
-					RTE_STR(RTE_MAX_MEMSEG_PER_TYPE),
-					RTE_STR(RTE_MAX_MEM_MB_PER_TYPE));
+				RTE_LOG(ERR, EAL, "Could not find space for memseg. Please increase RTE_MAX_MEMSEG_PER_LIST "
+					"RTE_MAX_MEMSEG_PER_TYPE and/or RTE_MAX_MEM_MB_PER_TYPE in configuration.\n");
 				return -1;
 			}
@@ -405,6 +404,5 @@ memseg_primary_init(void)
 			if (msl_idx >= RTE_MAX_MEMSEG_LISTS) {
 				RTE_LOG(ERR, EAL,
-					"No more space in memseg lists, please increase %s\n",
-					RTE_STR(RTE_MAX_MEMSEG_LISTS));
+					"No more space in memseg lists, please increase RTE_MAX_MEMSEG_LISTS\n");
 				return -1;
 			}
diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
index 3bd0bc17c5..84f4e1cce7 100644
--- a/lib/eal/linux/eal_memory.c
+++ b/lib/eal/linux/eal_memory.c
@@ -722,7 +722,6 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
 	}
 	if (msl_idx == RTE_MAX_MEMSEG_LISTS) {
-		RTE_LOG(ERR, EAL, "Could not find space for memseg. Please increase %s and/or %s in configuration.\n",
-				RTE_STR(RTE_MAX_MEMSEG_PER_TYPE),
-				RTE_STR(RTE_MAX_MEM_MB_PER_TYPE));
+		RTE_LOG(ERR, EAL, "Could not find space for memseg. Please increase RTE_MAX_MEMSEG_PER_LIST "
+			"RTE_MAX_MEMSEG_PER_TYPE and/or RTE_MAX_MEM_MB_PER_TYPE in configuration.\n");
 		return -1;
 	}
@@ -972,6 +971,5 @@ prealloc_segments(struct hugepage_file *hugepages, int n_pages)
 			}
 			if (msl_idx == RTE_MAX_MEMSEG_LISTS) {
-				RTE_LOG(ERR, EAL, "Not enough space in memseg lists, please increase %s\n",
-					RTE_STR(RTE_MAX_MEMSEG_LISTS));
+				RTE_LOG(ERR, EAL, "Not enough space in memseg lists, please increase RTE_MAX_MEMSEG_LISTS\n");
 				return -1;
 			}
@@ -1839,6 +1837,5 @@ memseg_primary_init_32(void)
 				if (msl_idx >= RTE_MAX_MEMSEG_LISTS) {
 					RTE_LOG(ERR, EAL,
-						"No more space in memseg lists, please increase %s\n",
-						RTE_STR(RTE_MAX_MEMSEG_LISTS));
+						"No more space in memseg lists, please increase RTE_MAX_MEMSEG_LISTS\n");
 					return -1;
 				}
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:08.755318998 +0100
+++ 0113-mem-fix-memsegs-exhausted-message.patch	2023-07-20 16:17:55.105752321 +0100
@@ -1 +1 @@
-From d93000bb9310685d0df3aa2c11cff3000ed17a82 Mon Sep 17 00:00:00 2001
+From 00c14e2d3e00c4666a5087349855ffcc3e06ed74 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d93000bb9310685d0df3aa2c11cff3000ed17a82 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 52e52e5986..bdbbe233a0 100644
+index c1e1889f5c..9af299b8f8 100644
@@ -27 +28 @@
-@@ -121,6 +121,5 @@ eal_dynmem_memseg_lists_init(void)
+@@ -120,6 +120,5 @@ eal_dynmem_memseg_lists_init(void)
@@ -35 +36 @@
-@@ -181,6 +180,5 @@ eal_dynmem_memseg_lists_init(void)
+@@ -180,6 +179,5 @@ eal_dynmem_memseg_lists_init(void)
@@ -66 +67 @@
-index 0876974631..9b6f08fba8 100644
+index 3bd0bc17c5..84f4e1cce7 100644
@@ -69 +70 @@
-@@ -717,7 +717,6 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
+@@ -722,7 +722,6 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
@@ -79 +80 @@
-@@ -967,6 +966,5 @@ prealloc_segments(struct hugepage_file *hugepages, int n_pages)
+@@ -972,6 +971,5 @@ prealloc_segments(struct hugepage_file *hugepages, int n_pages)
@@ -87 +88 @@
-@@ -1834,6 +1832,5 @@ memseg_primary_init_32(void)
+@@ -1839,6 +1837,5 @@ memseg_primary_init_32(void)


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

* patch 'hash: fix reading unaligned bits in Toeplitz hash' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (111 preceding siblings ...)
  2023-07-20 15:19 ` patch 'mem: fix memsegs exhausted message' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'net/netvsc: fix sizeof calculation' " Kevin Traynor
                   ` (26 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/086b98481996e9bced4c406b5901d1dadc69176a

Thanks.

Kevin

---
From 086b98481996e9bced4c406b5901d1dadc69176a Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Fri, 30 Jun 2023 17:09:26 +0000
Subject: [PATCH] hash: fix reading unaligned bits in Toeplitz hash

[ upstream commit 3a54f8de715c29613cf3d34ce3910d2bd27bffb9 ]

Fixes: 28ebff11c2dc ("hash: add predictable RSS")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
---
 lib/hash/rte_thash.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c
index 6847e36f4b..2b97482cfb 100644
--- a/lib/hash/rte_thash.c
+++ b/lib/hash/rte_thash.c
@@ -672,5 +672,5 @@ rte_thash_get_gfni_matrices(struct rte_thash_ctx *ctx)
 
 static inline uint8_t
-read_unaligned_byte(uint8_t *ptr, unsigned int len, unsigned int offset)
+read_unaligned_byte(uint8_t *ptr, unsigned int offset)
 {
 	uint8_t ret = 0;
@@ -683,5 +683,5 @@ read_unaligned_byte(uint8_t *ptr, unsigned int len, unsigned int offset)
 	}
 
-	return ret >> (CHAR_BIT - len);
+	return ret;
 }
 
@@ -690,4 +690,5 @@ read_unaligned_bits(uint8_t *ptr, int len, int offset)
 {
 	uint32_t ret = 0;
+	int shift;
 
 	len = RTE_MAX(len, 0);
@@ -697,11 +698,12 @@ read_unaligned_bits(uint8_t *ptr, int len, int offset)
 		ret <<= CHAR_BIT;
 
-		ret |= read_unaligned_byte(ptr, RTE_MIN(len, CHAR_BIT),
-			offset);
+		ret |= read_unaligned_byte(ptr, offset);
 		offset += CHAR_BIT;
 		len -= CHAR_BIT;
 	}
 
-	return ret;
+	shift = (len == 0) ? 0 :
+		(CHAR_BIT - ((len + CHAR_BIT) % CHAR_BIT));
+	return ret >> shift;
 }
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:08.863931070 +0100
+++ 0114-hash-fix-reading-unaligned-bits-in-Toeplitz-hash.patch	2023-07-20 16:17:55.106752325 +0100
@@ -1 +1 @@
-From 3a54f8de715c29613cf3d34ce3910d2bd27bffb9 Mon Sep 17 00:00:00 2001
+From 086b98481996e9bced4c406b5901d1dadc69176a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3a54f8de715c29613cf3d34ce3910d2bd27bffb9 ]
+
@@ -7 +8,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
-index 0249883b8d..2228af576b 100644
+index 6847e36f4b..2b97482cfb 100644
@@ -19 +20 @@
-@@ -671,5 +671,5 @@ rte_thash_get_gfni_matrices(struct rte_thash_ctx *ctx)
+@@ -672,5 +672,5 @@ rte_thash_get_gfni_matrices(struct rte_thash_ctx *ctx)
@@ -26 +27 @@
-@@ -682,5 +682,5 @@ read_unaligned_byte(uint8_t *ptr, unsigned int len, unsigned int offset)
+@@ -683,5 +683,5 @@ read_unaligned_byte(uint8_t *ptr, unsigned int len, unsigned int offset)
@@ -33 +34 @@
-@@ -689,4 +689,5 @@ read_unaligned_bits(uint8_t *ptr, int len, int offset)
+@@ -690,4 +690,5 @@ read_unaligned_bits(uint8_t *ptr, int len, int offset)
@@ -39 +40 @@
-@@ -696,11 +697,12 @@ read_unaligned_bits(uint8_t *ptr, int len, int offset)
+@@ -697,11 +698,12 @@ read_unaligned_bits(uint8_t *ptr, int len, int offset)


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

* patch 'net/netvsc: fix sizeof calculation' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (112 preceding siblings ...)
  2023-07-20 15:19 ` patch 'hash: fix reading unaligned bits in Toeplitz hash' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'app/testpmd: fix checksum engine with GTP on 32-bit' " Kevin Traynor
                   ` (25 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Long Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/0df6ac4f09d49a54d9782d846245b0cb886933db

Thanks.

Kevin

---
From 0df6ac4f09d49a54d9782d846245b0cb886933db Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 28 Jun 2023 17:29:57 -0700
Subject: [PATCH] net/netvsc: fix sizeof calculation

[ upstream commit 86fb73f5bf401afc9d52144f27e6d1cf4f64348b ]

Found by cppcheck.

drivers/net/netvsc/hn_rndis.c:332:21: warning:
 Found calculation inside sizeof().
 [sizeofCalculation]  if (len < sizeof(3 * sizeof(uint32_t))) {

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/netvsc/hn_rndis.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index 1b63b27e0c..8c205233a2 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -330,5 +330,6 @@ void hn_rndis_receive_response(struct hn_data *hv,
 	hn_rndis_dump(data);
 
-	if (len < sizeof(3 * sizeof(uint32_t))) {
+	/* Check we can read first three data fields from RNDIS header */
+	if (len < 3 * sizeof(uint32_t)) {
 		PMD_DRV_LOG(ERR,
 			    "missing RNDIS header %u", len);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:08.934727408 +0100
+++ 0115-net-netvsc-fix-sizeof-calculation.patch	2023-07-20 16:17:55.110752342 +0100
@@ -1 +1 @@
-From 86fb73f5bf401afc9d52144f27e6d1cf4f64348b Mon Sep 17 00:00:00 2001
+From 0df6ac4f09d49a54d9782d846245b0cb886933db Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 86fb73f5bf401afc9d52144f27e6d1cf4f64348b ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index e6f1f28768..29c6009b2c 100644
+index 1b63b27e0c..8c205233a2 100644


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

* patch 'app/testpmd: fix checksum engine with GTP on 32-bit' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (113 preceding siblings ...)
  2023-07-20 15:19 ` patch 'net/netvsc: fix sizeof calculation' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'net/hns3: delete duplicate macro definition' " Kevin Traynor
                   ` (24 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Shiyang He; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/f25a869b4ecbaba29d2b83d3a7070c22f8810ee8

Thanks.

Kevin

---
From f25a869b4ecbaba29d2b83d3a7070c22f8810ee8 Mon Sep 17 00:00:00 2001
From: Shiyang He <shiyangx.he@intel.com>
Date: Thu, 29 Jun 2023 10:09:55 +0000
Subject: [PATCH] app/testpmd: fix checksum engine with GTP on 32-bit

[ upstream commit f7bfa1285fe943b5189a63bb1d427e823b7fcc20 ]

l2_len is not calculated correctly on 32-bit systems, resulting in
packet forwarding failure.

This patch fixes this issue by changing the l2_len calculation.

Fixes: dd827fa42a30 ("app/testpmd: fix GTP L2 length in checksum engine")

Signed-off-by: Shiyang He <shiyangx.he@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/csumonly.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 16c05b3527..5e494c4129 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -251,5 +251,5 @@ parse_gtp(struct rte_udp_hdr *udp_hdr,
 	}
 
-	info->l2_len += gtp_len + sizeof(udp_hdr);
+	info->l2_len += gtp_len + sizeof(*udp_hdr);
 }
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:09.057304927 +0100
+++ 0116-app-testpmd-fix-checksum-engine-with-GTP-on-32-bit.patch	2023-07-20 16:17:55.112752350 +0100
@@ -1 +1 @@
-From f7bfa1285fe943b5189a63bb1d427e823b7fcc20 Mon Sep 17 00:00:00 2001
+From f25a869b4ecbaba29d2b83d3a7070c22f8810ee8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f7bfa1285fe943b5189a63bb1d427e823b7fcc20 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 7af635e3f7..c103e54111 100644
+index 16c05b3527..5e494c4129 100644


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

* patch 'net/hns3: delete duplicate macro definition' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (114 preceding siblings ...)
  2023-07-20 15:19 ` patch 'app/testpmd: fix checksum engine with GTP on 32-bit' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'doc: fix kernel patch link in hns3 guide' " Kevin Traynor
                   ` (23 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/b870ca9679262199b6d34a18cb4b431ff8016782

Thanks.

Kevin

---
From b870ca9679262199b6d34a18cb4b431ff8016782 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 29 Jun 2023 21:21:26 +0800
Subject: [PATCH] net/hns3: delete duplicate macro definition

[ upstream commit a939584a45dff2c5d855d25bf4867ba07428bdfc ]

This patch delete some duplicate macro definitions.

Fixes: a4c7152d0581 ("net/hns3: extract common code to its own file")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 878d4ae492..ff666c4979 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -877,11 +877,4 @@ struct hns3_adapter {
 };
 
-#define HNS3_DEVARG_RX_FUNC_HINT	"rx_func_hint"
-#define HNS3_DEVARG_TX_FUNC_HINT	"tx_func_hint"
-
-#define HNS3_DEVARG_DEV_CAPS_MASK	"dev_caps_mask"
-
-#define HNS3_DEVARG_MBX_TIME_LIMIT_MS	"mbx_time_limit_ms"
-
 enum {
 	HNS3_DEV_SUPPORT_DCB_B,
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:09.145840296 +0100
+++ 0117-net-hns3-delete-duplicate-macro-definition.patch	2023-07-20 16:17:55.115752362 +0100
@@ -1 +1 @@
-From a939584a45dff2c5d855d25bf4867ba07428bdfc Mon Sep 17 00:00:00 2001
+From b870ca9679262199b6d34a18cb4b431ff8016782 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a939584a45dff2c5d855d25bf4867ba07428bdfc ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index c58094d87b..c85a6912ad 100644
+index 878d4ae492..ff666c4979 100644
@@ -21 +22 @@
-@@ -874,11 +874,4 @@ struct hns3_adapter {
+@@ -877,11 +877,4 @@ struct hns3_adapter {
@@ -31 +32 @@
- enum hns3_dev_cap {
+ enum {


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

* patch 'doc: fix kernel patch link in hns3 guide' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (115 preceding siblings ...)
  2023-07-20 15:19 ` patch 'net/hns3: delete duplicate macro definition' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'doc: fix syntax " Kevin Traynor
                   ` (22 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Dongdong Liu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/5cba08f23bd3ffce7cd9755fb66d3278915ee1d7

Thanks.

Kevin

---
From 5cba08f23bd3ffce7cd9755fb66d3278915ee1d7 Mon Sep 17 00:00:00 2001
From: Dongdong Liu <liudongdong3@huawei.com>
Date: Fri, 30 Jun 2023 15:37:35 +0800
Subject: [PATCH] doc: fix kernel patch link in hns3 guide

[ upstream commit 2de9a0f162f68b3e507a1c2a6a2555b6131ed45f ]

The LSC support of VF driver depends on a patch link in kernel PF
driver.
But current the link is invalid, so fixes it.

Add a blank line after the link.

Fixes: 80006b598730 ("doc: add link status event requirements in hns3 guide")

Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 doc/guides/nics/hns3.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
index 791c9cc2ed..424b97cb50 100644
--- a/doc/guides/nics/hns3.rst
+++ b/doc/guides/nics/hns3.rst
@@ -138,5 +138,6 @@ Therefore, to use the LSC for the PF driver, ensure that the firmware version
 also supports reporting link changes.
 If the VF driver needs to support LSC, special patch must be added:
-`<https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/ethernet/hisilicon/hns3?h=next-20210428&id=18b6e31f8bf4ac7af7b057228f38a5a530378e4e>`_.
+`<https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=18b6e31f8bf4ac7af7b057228f38a5a530378e4e>`_.
+
 Note: The patch has been uploaded to 5.13 of the Linux kernel mainline.
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:09.233588849 +0100
+++ 0118-doc-fix-kernel-patch-link-in-hns3-guide.patch	2023-07-20 16:17:55.116752366 +0100
@@ -1 +1 @@
-From 2de9a0f162f68b3e507a1c2a6a2555b6131ed45f Mon Sep 17 00:00:00 2001
+From 5cba08f23bd3ffce7cd9755fb66d3278915ee1d7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2de9a0f162f68b3e507a1c2a6a2555b6131ed45f ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index d6ac618565..728c6d49a2 100644
+index 791c9cc2ed..424b97cb50 100644
@@ -24 +25 @@
-@@ -55,5 +55,6 @@ Therefore, to use the LSC for the PF driver, ensure that the firmware version
+@@ -138,5 +138,6 @@ Therefore, to use the LSC for the PF driver, ensure that the firmware version


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

* patch 'doc: fix syntax in hns3 guide' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (116 preceding siblings ...)
  2023-07-20 15:19 ` patch 'doc: fix kernel patch link in hns3 guide' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'doc: fix number of leading spaces " Kevin Traynor
                   ` (21 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Dongdong Liu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/8ecf17cbd1f3b9851a77079a6d2a60a82a6e1b59

Thanks.

Kevin

---
From 8ecf17cbd1f3b9851a77079a6d2a60a82a6e1b59 Mon Sep 17 00:00:00 2001
From: Dongdong Liu <liudongdong3@huawei.com>
Date: Fri, 30 Jun 2023 15:37:36 +0800
Subject: [PATCH] doc: fix syntax in hns3 guide

[ upstream commit 258e6e1b370c1b3f5e50877b8539511fa248a63a ]

'::' doesn't provide pre-formatted text without an empty line after it,
so fixes it.

Fixes: cdf6a5fbc540 ("doc: add runtime option examples to hns3 guide")

Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 doc/guides/nics/hns3.rst | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
index 424b97cb50..8a6998fd65 100644
--- a/doc/guides/nics/hns3.rst
+++ b/doc/guides/nics/hns3.rst
@@ -82,4 +82,5 @@ Runtime Config Options
 
   For example::
+
   -a 0000:7d:00.0,rx_func_hint=simple
 
@@ -102,4 +103,5 @@ Runtime Config Options
 
   For example::
+
   -a 0000:7d:00.0,tx_func_hint=common
 
@@ -114,4 +116,5 @@ Runtime Config Options
 
   For example::
+
   -a 0000:7d:00.0,dev_caps_mask=0xF
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:09.327322685 +0100
+++ 0119-doc-fix-syntax-in-hns3-guide.patch	2023-07-20 16:17:55.117752370 +0100
@@ -1 +1 @@
-From 258e6e1b370c1b3f5e50877b8539511fa248a63a Mon Sep 17 00:00:00 2001
+From 8ecf17cbd1f3b9851a77079a6d2a60a82a6e1b59 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 258e6e1b370c1b3f5e50877b8539511fa248a63a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 728c6d49a2..11cbc992e7 100644
+index 424b97cb50..8a6998fd65 100644
@@ -21 +22 @@
-@@ -93,4 +93,5 @@ Runtime Configuration
+@@ -82,4 +82,5 @@ Runtime Config Options
@@ -27 +28 @@
-@@ -113,4 +114,5 @@ Runtime Configuration
+@@ -102,4 +103,5 @@ Runtime Config Options
@@ -33 +34 @@
-@@ -125,4 +127,5 @@ Runtime Configuration
+@@ -114,4 +116,5 @@ Runtime Config Options


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

* patch 'doc: fix number of leading spaces in hns3 guide' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (117 preceding siblings ...)
  2023-07-20 15:19 ` patch 'doc: fix syntax " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'app/testpmd: revert primary process polling all queues fix' " Kevin Traynor
                   ` (20 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Dongdong Liu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/796ccf0b928d15d2631417f3c730cc973058c4c3

Thanks.

Kevin

---
From 796ccf0b928d15d2631417f3c730cc973058c4c3 Mon Sep 17 00:00:00 2001
From: Dongdong Liu <liudongdong3@huawei.com>
Date: Fri, 30 Jun 2023 15:37:37 +0800
Subject: [PATCH] doc: fix number of leading spaces in hns3 guide

[ upstream commit 620cd2d5ac5a6d7de750a4827e2840209a1b0cbb ]

The current description of 'mbx_time_limit_ms' has three spaces
at the beginning. Use two spaces to keep the same style with other
places and add a blank line after '::'.

Fixes: 2fc3e696a7f1 ("net/hns3: add runtime config for mailbox limit time")

Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 doc/guides/nics/hns3.rst | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
index 8a6998fd65..6fbd4320ef 100644
--- a/doc/guides/nics/hns3.rst
+++ b/doc/guides/nics/hns3.rst
@@ -83,5 +83,5 @@ Runtime Config Options
   For example::
 
-  -a 0000:7d:00.0,rx_func_hint=simple
+    -a 0000:7d:00.0,rx_func_hint=simple
 
 - ``tx_func_hint`` (default ``none``)
@@ -104,5 +104,5 @@ Runtime Config Options
   For example::
 
-  -a 0000:7d:00.0,tx_func_hint=common
+    -a 0000:7d:00.0,tx_func_hint=common
 
 - ``dev_caps_mask`` (default ``0``)
@@ -117,20 +117,22 @@ Runtime Config Options
   For example::
 
-  -a 0000:7d:00.0,dev_caps_mask=0xF
+    -a 0000:7d:00.0,dev_caps_mask=0xF
 
 - ``mbx_time_limit_ms`` (default ``500``)
-   Used to define the mailbox time limit by user.
-   Current, the max waiting time for MBX response is 500ms, but in
-   some scenarios, it is not enough. Since it depends on the response
-   of the kernel mode driver, and its response time is related to the
-   scheduling of the system. In this special scenario, most of the
-   cores are isolated, and only a few cores are used for system
-   scheduling. When a large number of services are started, the
-   scheduling of the system will be very busy, and the reply of the
-   mbx message will time out, which will cause our PMD initialization
-   to fail. So provide access to set mailbox time limit for user.
 
-   For example::
-   -a 0000:7d:00.0,mbx_time_limit_ms=600
+  Used to define the mailbox time limit by user.
+  Current, the max waiting time for MBX response is 500ms, but in
+  some scenarios, it is not enough. Since it depends on the response
+  of the kernel mode driver, and its response time is related to the
+  scheduling of the system. In this special scenario, most of the
+  cores are isolated, and only a few cores are used for system
+  scheduling. When a large number of services are started, the
+  scheduling of the system will be very busy, and the reply of the
+  mbx message will time out, which will cause our PMD initialization
+  to fail. So provide access to set mailbox time limit for user.
+
+  For example::
+
+    -a 0000:7d:00.0,mbx_time_limit_ms=600
 
 Link status event Pre-conditions
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:09.455078279 +0100
+++ 0120-doc-fix-number-of-leading-spaces-in-hns3-guide.patch	2023-07-20 16:17:55.118752374 +0100
@@ -1 +1 @@
-From 620cd2d5ac5a6d7de750a4827e2840209a1b0cbb Mon Sep 17 00:00:00 2001
+From 796ccf0b928d15d2631417f3c730cc973058c4c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 620cd2d5ac5a6d7de750a4827e2840209a1b0cbb ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 11cbc992e7..ee774639d3 100644
+index 8a6998fd65..6fbd4320ef 100644
@@ -22 +23 @@
-@@ -94,5 +94,5 @@ Runtime Configuration
+@@ -83,5 +83,5 @@ Runtime Config Options
@@ -29 +30 @@
-@@ -115,5 +115,5 @@ Runtime Configuration
+@@ -104,5 +104,5 @@ Runtime Config Options
@@ -36 +37 @@
-@@ -128,20 +128,22 @@ Runtime Configuration
+@@ -117,20 +117,22 @@ Runtime Config Options
@@ -71 +72 @@
- - ``fdir_vlan_match_mode`` (default ``strict``)
+ Link status event Pre-conditions


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

* patch 'app/testpmd: revert primary process polling all queues fix' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (118 preceding siblings ...)
  2023-07-20 15:19 ` patch 'doc: fix number of leading spaces " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-25  8:53   ` Kevin Traynor
  2023-07-20 15:19 ` patch 'net/hns3: fix non-zero weight for disabled TC' " Kevin Traynor
                   ` (19 subsequent siblings)
  139 siblings, 1 reply; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Song Jiale, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/931f667a996370dec053902903eddd2a794b778a

Thanks.

Kevin

---
From 931f667a996370dec053902903eddd2a794b778a Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 5 Jul 2023 15:32:06 +0100
Subject: [PATCH] app/testpmd: revert primary process polling all queues fix

[ upstream commit d7d802daf80f4a03c77a815da6d47a7b3657ef2c ]

For some drivers [1], testpmd forwarding is broken with commit [2].

This is because with [2] testpmd gets queue state from ethdev and
forwarding is done only on queues in started state, but some drivers
don't update queue status properly, and this breaks forwarding for those
drivers.

Drivers should be fixed but more time is required to verify drivers
again, instead reverting [2] for now to not break drivers.
Target is to merge [2] back at the beginning of next release cycle and
fix drivers accordingly.

[1]
Bugzilla ID: 1259

[2]
Fixes: 141a520b35f7 ("app/testpmd: fix primary process not polling all queues")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 app/test-pmd/testpmd.c | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index dbf6fd1fca..9f4a0e0a78 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2376,11 +2376,4 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
 			rx_qinfo.queue_state;
 	} else if (rc == -ENOTSUP) {
-		/*
-		 * Do not change the rxq state for primary process
-		 * to ensure that the PMDs do not implement
-		 * rte_eth_rx_queue_info_get can forward as before.
-		 */
-		if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-			return;
 		/*
 		 * Set the rxq state to RTE_ETH_QUEUE_STATE_STARTED
@@ -2408,11 +2401,4 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
 			tx_qinfo.queue_state;
 	} else if (rc == -ENOTSUP) {
-		/*
-		 * Do not change the txq state for primary process
-		 * to ensure that the PMDs do not implement
-		 * rte_eth_tx_queue_info_get can forward as before.
-		 */
-		if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-			return;
 		/*
 		 * Set the txq state to RTE_ETH_QUEUE_STATE_STARTED
@@ -2482,5 +2468,6 @@ start_packet_forwarding(int with_tx_first)
 
 	if (stream_init != NULL) {
-		update_queue_state();
+		if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+			update_queue_state();
 		for (i = 0; i < cur_fwd_config.nb_fwd_streams; i++)
 			stream_init(fwd_streams[i]);
@@ -3140,5 +3127,6 @@ start_port(portid_t pid)
 	}
 
-	update_queue_state();
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+		update_queue_state();
 
 	if (at_least_one_port_successfully_started && !no_link_check)
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:09.542953107 +0100
+++ 0121-app-testpmd-revert-primary-process-polling-all-queue.patch	2023-07-20 16:17:55.124752399 +0100
@@ -1 +1 @@
-From d7d802daf80f4a03c77a815da6d47a7b3657ef2c Mon Sep 17 00:00:00 2001
+From 931f667a996370dec053902903eddd2a794b778a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d7d802daf80f4a03c77a815da6d47a7b3657ef2c ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -29,3 +30,2 @@
- app/test-pmd/testpmd.c                 | 20 ++++----------------
- doc/guides/rel_notes/release_23_07.rst |  9 +++++++++
- 2 files changed, 13 insertions(+), 16 deletions(-)
+ app/test-pmd/testpmd.c | 20 ++++----------------
+ 1 file changed, 4 insertions(+), 16 deletions(-)
@@ -34 +34 @@
-index 1fc70650e0..c6ad9b18bf 100644
+index dbf6fd1fca..9f4a0e0a78 100644
@@ -37 +37 @@
-@@ -2425,11 +2425,4 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
+@@ -2376,11 +2376,4 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
@@ -49 +49 @@
-@@ -2457,11 +2450,4 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
+@@ -2408,11 +2401,4 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
@@ -61 +61 @@
-@@ -2531,5 +2517,6 @@ start_packet_forwarding(int with_tx_first)
+@@ -2482,5 +2468,6 @@ start_packet_forwarding(int with_tx_first)
@@ -69 +69 @@
-@@ -3294,5 +3281,6 @@ start_port(portid_t pid)
+@@ -3140,5 +3127,6 @@ start_port(portid_t pid)
@@ -77,18 +76,0 @@
-diff --git a/doc/guides/rel_notes/release_23_07.rst b/doc/guides/rel_notes/release_23_07.rst
-index be8027f71a..234650ac39 100644
---- a/doc/guides/rel_notes/release_23_07.rst
-+++ b/doc/guides/rel_notes/release_23_07.rst
-@@ -287,4 +287,13 @@ Known Issues
-    =======================================================
- 
-+* **Testpmd is not forwarding on queues individually stopped.**
-+
-+  Testpmd forwards packets on started queues.
-+  If a queue explicitly stopped, and later port stopped and started again,
-+  the status of the previously stopped queue is not updated,
-+  so forwarding is not working on those queues.
-+
-+  As a workaround start queues back explicitly, instead of port stop/start.
-+
- 
- Tested Platforms


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

* patch 'net/hns3: fix non-zero weight for disabled TC' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (119 preceding siblings ...)
  2023-07-20 15:19 ` patch 'app/testpmd: revert primary process polling all queues fix' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'net/hns3: fix index to look up table in NEON Rx' " Kevin Traynor
                   ` (18 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/befee9ffcf7900c17828c71673ee65115f3087b9

Thanks.

Kevin

---
From befee9ffcf7900c17828c71673ee65115f3087b9 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 7 Jul 2023 18:40:53 +0800
Subject: [PATCH] net/hns3: fix non-zero weight for disabled TC

[ upstream commit 1abcdb3f247393a04703071452b560a77ab23c04 ]

hns3 PF driver enables one TC, allocates to 100% weight for this
TC and 0% for other disabled TC by default. But driver modifies
the weight to 1% for disabled TC and then set to hardware to make
all TC work in DWRR mode. As a result, the total percent of all TC
is more than 100%. Actually, this operation is also redundant,
because these disabled TC will never be used. So this patch sets
the weight of all TC based on user's configuration.

Fixes: 62e3ccc2b94c ("net/hns3: support flow control")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_dcb.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index e4417e87fd..0360dc3862 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -238,7 +238,7 @@ static int
 hns3_dcb_ets_tc_dwrr_cfg(struct hns3_hw *hw)
 {
-#define DEFAULT_TC_WEIGHT	1
 #define DEFAULT_TC_OFFSET	14
 	struct hns3_ets_tc_weight_cmd *ets_weight;
+	struct hns3_pg_info *pg_info;
 	struct hns3_cmd_desc desc;
 	uint8_t i;
@@ -248,11 +248,4 @@ hns3_dcb_ets_tc_dwrr_cfg(struct hns3_hw *hw)
 
 	for (i = 0; i < HNS3_MAX_TC_NUM; i++) {
-		struct hns3_pg_info *pg_info;
-
-		ets_weight->tc_weight[i] = DEFAULT_TC_WEIGHT;
-
-		if (!(hw->hw_tc_map & BIT(i)))
-			continue;
-
 		pg_info = &hw->dcb_info.pg_info[hw->dcb_info.tc_info[i].pgid];
 		ets_weight->tc_weight[i] = pg_info->tc_dwrr[i];
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:09.676130318 +0100
+++ 0122-net-hns3-fix-non-zero-weight-for-disabled-TC.patch	2023-07-20 16:17:55.127752411 +0100
@@ -1 +1 @@
-From 1abcdb3f247393a04703071452b560a77ab23c04 Mon Sep 17 00:00:00 2001
+From befee9ffcf7900c17828c71673ee65115f3087b9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1abcdb3f247393a04703071452b560a77ab23c04 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index af045b22f7..07b8c46a81 100644
+index e4417e87fd..0360dc3862 100644


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

* patch 'net/hns3: fix index to look up table in NEON Rx' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (120 preceding siblings ...)
  2023-07-20 15:19 ` patch 'net/hns3: fix non-zero weight for disabled TC' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'ethdev: fix potential leak in PCI probing helper' " Kevin Traynor
                   ` (17 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Huisong Li; +Cc: Dongdong Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/ac4f18bc3cb25cc87414a7eba2dab23a9233ec5e

Thanks.

Kevin

---
From ac4f18bc3cb25cc87414a7eba2dab23a9233ec5e Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 11 Jul 2023 18:24:44 +0800
Subject: [PATCH] net/hns3: fix index to look up table in NEON Rx

[ upstream commit 6bec7c50be7a38c114680481f285976142df40d0 ]

In hns3_recv_burst_vec(), the index to get packet length and data
size are reversed. Fortunately, this doesn't affect functionality
because the NEON Rx only supports single BD in which the packet
length is equal to the date size. Now this patch fixes it to get
back to the truth.

Fixes: a3d4f4d291d7 ("net/hns3: support NEON Rx")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_rxtx_vec_neon.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx_vec_neon.h b/drivers/net/hns3/hns3_rxtx_vec_neon.h
index 0edd4756f1..a5b2011654 100644
--- a/drivers/net/hns3/hns3_rxtx_vec_neon.h
+++ b/drivers/net/hns3/hns3_rxtx_vec_neon.h
@@ -143,6 +143,6 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
 	uint8x16_t shuf_desc_fields_msk = {
 		0xff, 0xff, 0xff, 0xff,  /* packet type init zero */
-		22, 23, 0xff, 0xff,      /* rx.pkt_len to rte_mbuf.pkt_len */
-		20, 21,	                 /* size to rte_mbuf.data_len */
+		20, 21, 0xff, 0xff,      /* rx.pkt_len to rte_mbuf.pkt_len */
+		22, 23,	                 /* size to rte_mbuf.data_len */
 		0xff, 0xff,	         /* rte_mbuf.vlan_tci init zero */
 		8, 9, 10, 11,	         /* rx.rss_hash to rte_mbuf.hash.rss */
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:09.798452770 +0100
+++ 0123-net-hns3-fix-index-to-look-up-table-in-NEON-Rx.patch	2023-07-20 16:17:55.128752415 +0100
@@ -1 +1 @@
-From 6bec7c50be7a38c114680481f285976142df40d0 Mon Sep 17 00:00:00 2001
+From ac4f18bc3cb25cc87414a7eba2dab23a9233ec5e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6bec7c50be7a38c114680481f285976142df40d0 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 6c49c70fc7..564d831a48 100644
+index 0edd4756f1..a5b2011654 100644


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

* patch 'ethdev: fix potential leak in PCI probing helper' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (121 preceding siblings ...)
  2023-07-20 15:19 ` patch 'net/hns3: fix index to look up table in NEON Rx' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'net/mlx5: fix flow dump for modify field' " Kevin Traynor
                   ` (16 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Kaiyu Zhang; +Cc: Chengwen Feng, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/9eda05baa7292420aa0c30d04c57ec5ada94c5e3

Thanks.

Kevin

---
From 9eda05baa7292420aa0c30d04c57ec5ada94c5e3 Mon Sep 17 00:00:00 2001
From: Kaiyu Zhang <squirrel.prog@gmail.com>
Date: Tue, 11 Jul 2023 01:18:09 +0000
Subject: [PATCH] ethdev: fix potential leak in PCI probing helper

[ upstream commit 1f00a6a037040a7c6ba883e2c312894c6ebc4c32 ]

Sanity check is performed after a rte_eth_dev object is allocated.

The object is not freed if the check fails, though in the current
reality this never happens, but it's better programming paradigm
to move the quick check up front to the start of
rte_eth_dev_pci_generic_probe().

Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers")

Signed-off-by: Kaiyu Zhang <squirrel.prog@gmail.com>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap                | 1 +
 lib/ethdev/ethdev_pci.h | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 288cc4913c..12f6084945 100644
--- a/.mailmap
+++ b/.mailmap
@@ -680,4 +680,5 @@ Kai Ji <kai.ji@intel.com>
 Kaijun Zeng <corezeng@gmail.com>
 Kaiwen Deng <kaiwenx.deng@intel.com>
+Kaiyu Zhang <squirrel.prog@gmail.com>
 Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Kamalakannan R <kamalakannan.r@intel.com>
diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h
index 0549842709..7ab819c393 100644
--- a/lib/ethdev/ethdev_pci.h
+++ b/lib/ethdev/ethdev_pci.h
@@ -127,9 +127,11 @@ rte_eth_dev_pci_generic_probe(struct rte_pci_device *pci_dev,
 	int ret;
 
+	if (*dev_init == NULL)
+		return -EINVAL;
+
 	eth_dev = rte_eth_dev_pci_allocate(pci_dev, private_data_size);
 	if (!eth_dev)
 		return -ENOMEM;
 
-	RTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL);
 	ret = dev_init(eth_dev);
 	if (ret)
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:09.941947656 +0100
+++ 0124-ethdev-fix-potential-leak-in-PCI-probing-helper.patch	2023-07-20 16:17:55.133752436 +0100
@@ -1 +1 @@
-From 1f00a6a037040a7c6ba883e2c312894c6ebc4c32 Mon Sep 17 00:00:00 2001
+From 9eda05baa7292420aa0c30d04c57ec5ada94c5e3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1f00a6a037040a7c6ba883e2c312894c6ebc4c32 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -21,2 +22,2 @@
- lib/ethdev/ethdev_pci.h | 9 +++++----
- 2 files changed, 6 insertions(+), 4 deletions(-)
+ lib/ethdev/ethdev_pci.h | 4 +++-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
@@ -25 +26 @@
-index d200f36339..6c28ea798d 100644
+index 288cc4913c..12f6084945 100644
@@ -28,2 +29,2 @@
-@@ -699,4 +699,5 @@ Kaijun Zeng <corezeng@gmail.com>
- Kaisen You <kaisenx.you@intel.com>
+@@ -680,4 +680,5 @@ Kai Ji <kai.ji@intel.com>
+ Kaijun Zeng <corezeng@gmail.com>
@@ -35 +36 @@
-index 94b8fba5d7..320e3e0093 100644
+index 0549842709..7ab819c393 100644
@@ -38 +39 @@
-@@ -127,10 +127,11 @@ rte_eth_dev_pci_generic_probe(struct rte_pci_device *pci_dev,
+@@ -127,9 +127,11 @@ rte_eth_dev_pci_generic_probe(struct rte_pci_device *pci_dev,
@@ -41,10 +42,2 @@
--	eth_dev = rte_eth_dev_pci_allocate(pci_dev, private_data_size);
--	if (!eth_dev)
--		return -ENOMEM;
--
- 	if (*dev_init == NULL)
- 		return -EINVAL;
-+
-+	eth_dev = rte_eth_dev_pci_allocate(pci_dev, private_data_size);
-+	if (!eth_dev)
-+		return -ENOMEM;
++	if (*dev_init == NULL)
++		return -EINVAL;
@@ -51,0 +45,5 @@
+ 	eth_dev = rte_eth_dev_pci_allocate(pci_dev, private_data_size);
+ 	if (!eth_dev)
+ 		return -ENOMEM;
+ 
+-	RTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL);


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

* patch 'net/mlx5: fix flow dump for modify field' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (122 preceding siblings ...)
  2023-07-20 15:19 ` patch 'ethdev: fix potential leak in PCI probing helper' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'net/mlx5: fix flow workspace destruction' " Kevin Traynor
                   ` (15 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Sean Zhang; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/0c6a5cac3199c7db4a8f9f60cd265ced01322695

Thanks.

Kevin

---
From 0c6a5cac3199c7db4a8f9f60cd265ced01322695 Mon Sep 17 00:00:00 2001
From: Sean Zhang <xiazhang@nvidia.com>
Date: Thu, 29 Jun 2023 13:00:44 +0300
Subject: [PATCH] net/mlx5: fix flow dump for modify field

[ upstream commit faecafc16f69c559323ec46ef110a771ce0bd7fb ]

When using other process to dump flow information, the modify field
information cannot be dumpped due to incorrect lcore value. Add loop
to get modify field information from all lcore to fix the issue.

Fixes: a7ac7fae4919 ("net/mlx5: enhance flow dump")

Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 56 +++++++++++++++++++++++++-----------
 1 file changed, 40 insertions(+), 16 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 1e147c2e0d..192e2d7718 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -8639,21 +8639,45 @@ mlx5_flow_dev_dump_sh_all(struct rte_eth_dev *dev,
 		i = lcore_index;
 
-		for (j = 0; j <= h->mask; j++) {
-			l_inconst = &h->buckets[j].l;
-			if (!l_inconst || !l_inconst->cache[i])
-				continue;
+		if (lcore_index == MLX5_LIST_NLCORE) {
+			for (i = 0; i <= (uint32_t)lcore_index; i++) {
+				for (j = 0; j <= h->mask; j++) {
+					l_inconst = &h->buckets[j].l;
+					if (!l_inconst || !l_inconst->cache[i])
+						continue;
 
-			e = LIST_FIRST(&l_inconst->cache[i]->h);
-			while (e) {
-				modify_hdr =
-				(struct mlx5_flow_dv_modify_hdr_resource *)e;
-				data = (const uint8_t *)modify_hdr->actions;
-				size = (size_t)(modify_hdr->actions_num) * 8;
-				actions_num = modify_hdr->actions_num;
-				id = (uint64_t)(uintptr_t)modify_hdr->action;
-				type = DR_DUMP_REC_TYPE_PMD_MODIFY_HDR;
-				save_dump_file(data, size, type, id,
-						(void *)(&actions_num), file);
-				e = LIST_NEXT(e, next);
+					e = LIST_FIRST(&l_inconst->cache[i]->h);
+					while (e) {
+						modify_hdr =
+						(struct mlx5_flow_dv_modify_hdr_resource *)e;
+						data = (const uint8_t *)modify_hdr->actions;
+						size = (size_t)(modify_hdr->actions_num) * 8;
+						actions_num = modify_hdr->actions_num;
+						id = (uint64_t)(uintptr_t)modify_hdr->action;
+						type = DR_DUMP_REC_TYPE_PMD_MODIFY_HDR;
+						save_dump_file(data, size, type, id,
+								(void *)(&actions_num), file);
+						e = LIST_NEXT(e, next);
+					}
+				}
+			}
+		} else {
+			for (j = 0; j <= h->mask; j++) {
+				l_inconst = &h->buckets[j].l;
+				if (!l_inconst || !l_inconst->cache[i])
+					continue;
+
+				e = LIST_FIRST(&l_inconst->cache[i]->h);
+				while (e) {
+					modify_hdr =
+					(struct mlx5_flow_dv_modify_hdr_resource *)e;
+					data = (const uint8_t *)modify_hdr->actions;
+					size = (size_t)(modify_hdr->actions_num) * 8;
+					actions_num = modify_hdr->actions_num;
+					id = (uint64_t)(uintptr_t)modify_hdr->action;
+					type = DR_DUMP_REC_TYPE_PMD_MODIFY_HDR;
+					save_dump_file(data, size, type, id,
+							(void *)(&actions_num), file);
+					e = LIST_NEXT(e, next);
+				}
 			}
 		}
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:10.060207514 +0100
+++ 0125-net-mlx5-fix-flow-dump-for-modify-field.patch	2023-07-20 16:17:55.152752513 +0100
@@ -1 +1 @@
-From faecafc16f69c559323ec46ef110a771ce0bd7fb Mon Sep 17 00:00:00 2001
+From 0c6a5cac3199c7db4a8f9f60cd265ced01322695 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit faecafc16f69c559323ec46ef110a771ce0bd7fb ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index cf83db7b60..abb86241fc 100644
+index 1e147c2e0d..192e2d7718 100644
@@ -23 +24 @@
-@@ -10391,21 +10391,45 @@ mlx5_flow_dev_dump_sh_all(struct rte_eth_dev *dev,
+@@ -8639,21 +8639,45 @@ mlx5_flow_dev_dump_sh_all(struct rte_eth_dev *dev,


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

* patch 'net/mlx5: fix flow workspace destruction' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (123 preceding siblings ...)
  2023-07-20 15:19 ` patch 'net/mlx5: fix flow dump for modify field' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'net/mlx5: forbid MPRQ restart' " Kevin Traynor
                   ` (14 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: David Marchand, Bing Zhao, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/cd2b1999eb8c504f0d669e2022518b93c71085a0

Thanks.

Kevin

---
From cd2b1999eb8c504f0d669e2022518b93c71085a0 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Mon, 3 Jul 2023 12:50:52 +0300
Subject: [PATCH] net/mlx5: fix flow workspace destruction

[ upstream commit dc7c5e0aa905b675c56a66b2014b01b7f5ae8a1d ]

PMD uses pthread key to allocate and access per thread flow
workspace memory buffers.

PMD registered a key destructor function to clean up flow workspace
buffers. However, the key destructor was not called by the pthread
library.

The patch keeps track of per-thread flow workspaces in PMD.
Flow workspaces memory release is activated from PMD destructor.

In the meanwhile, workspace buffer and RSS queues array are allocated
in a single memory chunk with this patch. The maximal number of
queues RTE_ETH_RSS_RETA_SIZE_512 is chosen. Then the workspace
adjustment can be removed to reduce the software hiccup:
  1. realloc and content copy
  2. spinlock acquire and release

Bugzilla ID: 1255
Fixes: 5d55a494f4e6 ("net/mlx5: split multi-thread flow handling per OS")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_flow_os.c |  2 +-
 drivers/net/mlx5/mlx5.c               |  1 +
 drivers/net/mlx5/mlx5_flow.c          | 77 +++++++++++----------------
 drivers/net/mlx5/mlx5_flow.h          |  4 +-
 4 files changed, 36 insertions(+), 48 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_flow_os.c b/drivers/net/mlx5/linux/mlx5_flow_os.c
index a5956c255a..08337a9b24 100644
--- a/drivers/net/mlx5/linux/mlx5_flow_os.c
+++ b/drivers/net/mlx5/linux/mlx5_flow_os.c
@@ -13,5 +13,5 @@ int
 mlx5_flow_os_init_workspace_once(void)
 {
-	if (rte_thread_key_create(&key_workspace, flow_release_workspace)) {
+	if (rte_thread_key_create(&key_workspace, NULL)) {
 		DRV_LOG(ERR, "Can't create flow workspace data thread key.");
 		rte_errno = ENOMEM;
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index c5f2db1e4a..5645e8656c 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1328,4 +1328,5 @@ mlx5_free_shared_dev_ctx(struct mlx5_dev_ctx_shared *sh)
 		mlx5_os_net_cleanup();
 		mlx5_flow_os_release_workspace();
+		mlx5_flow_workspace_gc_release();
 	}
 	pthread_mutex_unlock(&mlx5_dev_ctx_list_mutex);
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 192e2d7718..133dca5dcf 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -6527,34 +6527,4 @@ flow_tunnel_from_rule(const struct mlx5_flow *flow)
 }
 
-/**
- * Adjust flow RSS workspace if needed.
- *
- * @param wks
- *   Pointer to thread flow work space.
- * @param rss_desc
- *   Pointer to RSS descriptor.
- * @param[in] nrssq_num
- *   New RSS queue number.
- *
- * @return
- *   0 on success, -1 otherwise and rte_errno is set.
- */
-static int
-flow_rss_workspace_adjust(struct mlx5_flow_workspace *wks,
-			  struct mlx5_flow_rss_desc *rss_desc,
-			  uint32_t nrssq_num)
-{
-	if (likely(nrssq_num <= wks->rssq_num))
-		return 0;
-	rss_desc->queue = realloc(rss_desc->queue,
-			  sizeof(*rss_desc->queue) * RTE_ALIGN(nrssq_num, 2));
-	if (!rss_desc->queue) {
-		rte_errno = ENOMEM;
-		return -1;
-	}
-	wks->rssq_num = RTE_ALIGN(nrssq_num, 2);
-	return 0;
-}
-
 /**
  * Create a flow and add it to @p list.
@@ -6674,6 +6644,5 @@ flow_list_create(struct rte_eth_dev *dev, enum mlx5_flow_type type,
 		rss = flow_get_rss_action(dev, p_actions_rx);
 	if (rss) {
-		if (flow_rss_workspace_adjust(wks, rss_desc, rss->queue_num))
-			return 0;
+		MLX5_ASSERT(rss->queue_num <= RTE_ETH_RSS_RETA_SIZE_512);
 		/*
 		 * The following information is required by
@@ -7108,5 +7077,4 @@ flow_release_workspace(void *data)
 	while (wks) {
 		next = wks->next;
-		free(wks->rss_desc.queue);
 		free(wks);
 		wks = next;
@@ -7114,4 +7082,27 @@ flow_release_workspace(void *data)
 }
 
+static struct mlx5_flow_workspace *gc_head;
+static rte_spinlock_t mlx5_flow_workspace_lock = RTE_SPINLOCK_INITIALIZER;
+
+static void
+mlx5_flow_workspace_gc_add(struct mlx5_flow_workspace *ws)
+{
+	rte_spinlock_lock(&mlx5_flow_workspace_lock);
+	ws->gc = gc_head;
+	gc_head = ws;
+	rte_spinlock_unlock(&mlx5_flow_workspace_lock);
+}
+
+void
+mlx5_flow_workspace_gc_release(void)
+{
+	while (gc_head) {
+		struct mlx5_flow_workspace *wks = gc_head;
+
+		gc_head = wks->gc;
+		flow_release_workspace(wks);
+	}
+}
+
 /**
  * Get thread specific current flow workspace.
@@ -7139,22 +7130,15 @@ static struct mlx5_flow_workspace*
 flow_alloc_thread_workspace(void)
 {
-	struct mlx5_flow_workspace *data = calloc(1, sizeof(*data));
+	size_t data_size = RTE_ALIGN(sizeof(struct mlx5_flow_workspace), sizeof(long));
+	size_t rss_queue_array_size = sizeof(uint16_t) * RTE_ETH_RSS_RETA_SIZE_512;
+	struct mlx5_flow_workspace *data = calloc(1, data_size +
+						     rss_queue_array_size);
 
 	if (!data) {
-		DRV_LOG(ERR, "Failed to allocate flow workspace "
-			"memory.");
+		DRV_LOG(ERR, "Failed to allocate flow workspace memory.");
 		return NULL;
 	}
-	data->rss_desc.queue = calloc(1,
-			sizeof(uint16_t) * MLX5_RSSQ_DEFAULT_NUM);
-	if (!data->rss_desc.queue)
-		goto err;
-	data->rssq_num = MLX5_RSSQ_DEFAULT_NUM;
+	data->rss_desc.queue = RTE_PTR_ADD(data, data_size);
 	return data;
-err:
-	if (data->rss_desc.queue)
-		free(data->rss_desc.queue);
-	free(data);
-	return NULL;
 }
 
@@ -7177,4 +7161,5 @@ mlx5_flow_push_thread_workspace(void)
 		if (!data)
 			return NULL;
+		mlx5_flow_workspace_gc_add(data);
 	} else if (!curr->inuse) {
 		data = curr;
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 8ad8e63205..8a571f977e 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -1099,8 +1099,8 @@ struct mlx5_flow_workspace {
 	struct mlx5_flow_workspace *prev;
 	struct mlx5_flow_workspace *next;
+	struct mlx5_flow_workspace *gc;
 	uint32_t inuse; /* can't create new flow with current. */
 	struct mlx5_flow flows[MLX5_NUM_MAX_DEV_FLOWS];
 	struct mlx5_flow_rss_desc rss_desc;
-	uint32_t rssq_num; /* Allocated queue num in rss_desc. */
 	uint32_t flow_idx; /* Intermediate device flow index. */
 	struct mlx5_flow_meter_info *fm; /* Pointer to the meter in flow. */
@@ -1305,4 +1305,6 @@ struct mlx5_flow_workspace *mlx5_flow_push_thread_workspace(void);
 void mlx5_flow_pop_thread_workspace(void);
 struct mlx5_flow_workspace *mlx5_flow_get_thread_workspace(void);
+void mlx5_flow_workspace_gc_release(void);
+
 __extension__
 struct flow_grp_info {
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:10.154319379 +0100
+++ 0126-net-mlx5-fix-flow-workspace-destruction.patch	2023-07-20 16:17:55.178752619 +0100
@@ -1 +1 @@
-From dc7c5e0aa905b675c56a66b2014b01b7f5ae8a1d Mon Sep 17 00:00:00 2001
+From cd2b1999eb8c504f0d669e2022518b93c71085a0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dc7c5e0aa905b675c56a66b2014b01b7f5ae8a1d ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
- drivers/net/mlx5/mlx5_flow.c          | 76 +++++++++++----------------
+ drivers/net/mlx5/mlx5_flow.c          | 77 +++++++++++----------------
@@ -36 +37 @@
- 4 files changed, 36 insertions(+), 47 deletions(-)
+ 4 files changed, 36 insertions(+), 48 deletions(-)
@@ -39 +40 @@
-index 3c9a823edf..b139bb75b9 100644
+index a5956c255a..08337a9b24 100644
@@ -42 +43 @@
-@@ -52,5 +52,5 @@ int
+@@ -13,5 +13,5 @@ int
@@ -50 +51 @@
-index 5f0aa296ba..fd9b76027d 100644
+index c5f2db1e4a..5645e8656c 100644
@@ -53 +54 @@
-@@ -1839,4 +1839,5 @@ mlx5_free_shared_dev_ctx(struct mlx5_dev_ctx_shared *sh)
+@@ -1328,4 +1328,5 @@ mlx5_free_shared_dev_ctx(struct mlx5_dev_ctx_shared *sh)
@@ -60 +61 @@
-index abb86241fc..1071ef0c3e 100644
+index 192e2d7718..133dca5dcf 100644
@@ -63 +64 @@
-@@ -7156,34 +7156,4 @@ flow_tunnel_from_rule(const struct mlx5_flow *flow)
+@@ -6527,34 +6527,4 @@ flow_tunnel_from_rule(const struct mlx5_flow *flow)
@@ -98 +99 @@
-@@ -7304,6 +7274,5 @@ flow_list_create(struct rte_eth_dev *dev, enum mlx5_flow_type type,
+@@ -6674,6 +6644,5 @@ flow_list_create(struct rte_eth_dev *dev, enum mlx5_flow_type type,
@@ -106 +107 @@
-@@ -8073,5 +8042,4 @@ flow_release_workspace(void *data)
+@@ -7108,5 +7077,4 @@ flow_release_workspace(void *data)
@@ -112 +113 @@
-@@ -8079,4 +8047,27 @@ flow_release_workspace(void *data)
+@@ -7114,4 +7082,27 @@ flow_release_workspace(void *data)
@@ -140 +141 @@
-@@ -8104,21 +8095,15 @@ static struct mlx5_flow_workspace*
+@@ -7139,22 +7130,15 @@ static struct mlx5_flow_workspace*
@@ -163 +164,2 @@
--	free(data->rss_desc.queue);
+-	if (data->rss_desc.queue)
+-		free(data->rss_desc.queue);
@@ -168 +170 @@
-@@ -8141,4 +8126,5 @@ mlx5_flow_push_thread_workspace(void)
+@@ -7177,4 +7161,5 @@ mlx5_flow_push_thread_workspace(void)
@@ -175 +177 @@
-index 003e7da3a6..62789853ab 100644
+index 8ad8e63205..8a571f977e 100644
@@ -178 +180 @@
-@@ -1497,8 +1497,8 @@ struct mlx5_flow_workspace {
+@@ -1099,8 +1099,8 @@ struct mlx5_flow_workspace {
@@ -188 +190 @@
-@@ -2023,4 +2023,6 @@ struct mlx5_flow_workspace *mlx5_flow_push_thread_workspace(void);
+@@ -1305,4 +1305,6 @@ struct mlx5_flow_workspace *mlx5_flow_push_thread_workspace(void);


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

* patch 'net/mlx5: forbid MPRQ restart' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (124 preceding siblings ...)
  2023-07-20 15:19 ` patch 'net/mlx5: fix flow workspace destruction' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'net/ice: fix VLAN mode parser' " Kevin Traynor
                   ` (13 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/26838c1cb1bff04c07c52135bdc8c79aeae0fad4

Thanks.

Kevin

---
From 26838c1cb1bff04c07c52135bdc8c79aeae0fad4 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Tue, 4 Jul 2023 00:22:24 +0300
Subject: [PATCH] net/mlx5: forbid MPRQ restart

[ upstream commit f0b2d50e2c6c02555b7fbe77f909bd7f1c6ac2e4 ]

The queue restart is only supported by the non-vectorized
single-packet receive queue today. Restarting MPRQ will
result in corrupted packets because of CQE and WQE mismatch.
Prevent this by not allowing the MPRQ Rx queue stop.

Fixes: 161d103b231c ("net/mlx5: add queue start and stop")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 6bc89a2e5c..12cde2af9c 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -529,10 +529,10 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)
 	 * and cause Rx malfunction, so queue stopping is
 	 * not supported if vectorized Rx burst is engaged.
-	 * The routine pointer depends on the process
-	 * type, should perform check there.
+	 * The routine pointer depends on the process type,
+	 * should perform check there. MPRQ is not supported as well.
 	 */
-	if (pkt_burst == mlx5_rx_burst_vec) {
-		DRV_LOG(ERR, "Rx queue stop is not supported "
-			"for vectorized Rx");
+	if (pkt_burst != mlx5_rx_burst) {
+		DRV_LOG(ERR, "Rx queue stop is only supported "
+			"for non-vectorized single-packet Rx");
 		rte_errno = EINVAL;
 		return -EINVAL;
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:10.266257278 +0100
+++ 0127-net-mlx5-forbid-MPRQ-restart.patch	2023-07-20 16:17:55.182752636 +0100
@@ -1 +1 @@
-From f0b2d50e2c6c02555b7fbe77f909bd7f1c6ac2e4 Mon Sep 17 00:00:00 2001
+From 26838c1cb1bff04c07c52135bdc8c79aeae0fad4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f0b2d50e2c6c02555b7fbe77f909bd7f1c6ac2e4 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ad8fd13cbe..b314c0482b 100644
+index 6bc89a2e5c..12cde2af9c 100644
@@ -24 +25 @@
-@@ -532,10 +532,10 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)
+@@ -529,10 +529,10 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)


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

* patch 'net/ice: fix VLAN mode parser' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (125 preceding siblings ...)
  2023-07-20 15:19 ` patch 'net/mlx5: forbid MPRQ restart' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'net/iavf: fix VLAN insertion in vector path' " Kevin Traynor
                   ` (12 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/d127ef307794fd89bf40bbfce84c244c6b27fc68

Thanks.

Kevin

---
From d127ef307794fd89bf40bbfce84c244c6b27fc68 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Sun, 25 Jun 2023 08:23:08 +0000
Subject: [PATCH] net/ice: fix VLAN mode parser

[ upstream commit ac1926f641812d4033e320157d0c458f8fbee372 ]

Parser will not be created if raw packet filter is not support.
This patch add NULL pointer check for parser structure when VLAN
mode configure.

Fixes: 6e753d777ffc ("net/ice: initialize parser for double VLAN")

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

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index 705c3bee4c..4bd0dce0ac 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1830,8 +1830,10 @@ ice_flow_init(struct ice_adapter *ad)
 		PMD_INIT_LOG(WARNING, "Failed to initialize DDP parser, raw packet filter will not be supported");
 
-	if (ice_is_dvm_ena(&ad->hw))
-		ice_parser_dvm_set(ad->psr, true);
-	else
-		ice_parser_dvm_set(ad->psr, false);
+	if (ad->psr) {
+		if (ice_is_dvm_ena(&ad->hw))
+			ice_parser_dvm_set(ad->psr, true);
+		else
+			ice_parser_dvm_set(ad->psr, false);
+	}
 
 	RTE_TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) {
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:10.348294215 +0100
+++ 0128-net-ice-fix-VLAN-mode-parser.patch	2023-07-20 16:17:55.186752652 +0100
@@ -1 +1 @@
-From ac1926f641812d4033e320157d0c458f8fbee372 Mon Sep 17 00:00:00 2001
+From d127ef307794fd89bf40bbfce84c244c6b27fc68 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ac1926f641812d4033e320157d0c458f8fbee372 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index ed3075d555..91bf1d6fcb 100644
+index 705c3bee4c..4bd0dce0ac 100644
@@ -23 +24 @@
-@@ -1837,8 +1837,10 @@ ice_flow_init(struct ice_adapter *ad)
+@@ -1830,8 +1830,10 @@ ice_flow_init(struct ice_adapter *ad)


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

* patch 'net/iavf: fix VLAN insertion in vector path' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (126 preceding siblings ...)
  2023-07-20 15:19 ` patch 'net/ice: fix VLAN mode parser' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'net/ice: fix 32-bit build' " Kevin Traynor
                   ` (11 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/e4403410381ecebe27be2b355bd32d33a5632e19

Thanks.

Kevin

---
From e4403410381ecebe27be2b355bd32d33a5632e19 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Mon, 3 Jul 2023 10:22:00 +0800
Subject: [PATCH] net/iavf: fix VLAN insertion in vector path

[ upstream commit efe1b63775e8369b867f411d7bf8f61e97bd446b ]

As the VLAN insertion is partially supported in vector path,
the behavior is different in scalar and vector path.
For a VLAN packet, if using scalar path, the new VLAN tag will
be inserted after the original VLAN tag. If using vector path,
the new VLAN tag is inserted before the original VLAN tag.
To avoid any misleading, disable VLAN insertion in vector path.

Fixes: 059f18ae2aec ("net/iavf: add offload path for Tx AVX512")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 doc/guides/nics/features/iavf.ini | 2 +-
 drivers/net/iavf/iavf_rxtx.h      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guides/nics/features/iavf.ini b/doc/guides/nics/features/iavf.ini
index c6694a1a94..3860f283d5 100644
--- a/doc/guides/nics/features/iavf.ini
+++ b/doc/guides/nics/features/iavf.ini
@@ -22,5 +22,5 @@ RSS reta update      = Y
 VLAN filter          = Y
 CRC offload          = Y
-VLAN offload         = Y
+VLAN offload         = P
 L3 checksum offload  = P
 L4 checksum offload  = P
diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index ebf362e0ba..db665a6468 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -28,4 +28,6 @@
 
 #define IAVF_TX_NO_VECTOR_FLAGS (				 \
+		RTE_ETH_TX_OFFLOAD_VLAN_INSERT |		 \
+		RTE_ETH_TX_OFFLOAD_QINQ_INSERT |		 \
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |		 \
 		RTE_ETH_TX_OFFLOAD_TCP_TSO |		 \
@@ -33,6 +35,4 @@
 
 #define IAVF_TX_VECTOR_OFFLOAD (				 \
-		RTE_ETH_TX_OFFLOAD_VLAN_INSERT |		 \
-		RTE_ETH_TX_OFFLOAD_QINQ_INSERT |		 \
 		RTE_ETH_TX_OFFLOAD_IPV4_CKSUM |		 \
 		RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |		 \
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:10.439882701 +0100
+++ 0129-net-iavf-fix-VLAN-insertion-in-vector-path.patch	2023-07-20 16:17:55.188752660 +0100
@@ -1 +1 @@
-From efe1b63775e8369b867f411d7bf8f61e97bd446b Mon Sep 17 00:00:00 2001
+From e4403410381ecebe27be2b355bd32d33a5632e19 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit efe1b63775e8369b867f411d7bf8f61e97bd446b ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index fbb5b7df32..55a02165a0 100644
+index c6694a1a94..3860f283d5 100644
@@ -27 +28 @@
-@@ -25,5 +25,5 @@ RSS reta update      = Y
+@@ -22,5 +22,5 @@ RSS reta update      = Y
@@ -32,2 +33,2 @@
- L3 checksum offload  = Y
- L4 checksum offload  = Y
+ L3 checksum offload  = P
+ L4 checksum offload  = P
@@ -35 +36 @@
-index 2bf2e3252a..8d4a77271a 100644
+index ebf362e0ba..db665a6468 100644


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

* patch 'net/ice: fix 32-bit build' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (127 preceding siblings ...)
  2023-07-20 15:19 ` patch 'net/iavf: fix VLAN insertion in vector path' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'net/iavf: fix tunnel TSO path selection' " Kevin Traynor
                   ` (10 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Yiding Zhou; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/80c80520d063c204eabc8e677294fc92463e60cb

Thanks.

Kevin

---
From 80c80520d063c204eabc8e677294fc92463e60cb Mon Sep 17 00:00:00 2001
From: Yiding Zhou <yidingx.zhou@intel.com>
Date: Wed, 5 Jul 2023 15:32:10 +0800
Subject: [PATCH] net/ice: fix 32-bit build

[ upstream commit 910507de1164d1cb7051ddb84ac742bf088f4711 ]

Replace 'rte_memcpy' with 'memcpy' like other PMD code to avoid errors when
compiling with GCC-12 on 32-bit configure.

Compiler reports the follow error:

error: array subscript 8 is outside array bounds of "struct rte_mbuf *[32]"
[-Werror=array-bounds]

Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx")

Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
Tested-by: Luca Boccassi <bluca@debian.org>
---
 drivers/net/ice/ice_rxtx_vec_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index 2dd2d83650..ac939a3ba6 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -73,5 +73,5 @@ ice_rx_reassemble_packets(struct ice_rx_queue *rxq, struct rte_mbuf **rx_bufs,
 	rxq->pkt_first_seg = start;
 	rxq->pkt_last_seg = end;
-	rte_memcpy(rx_bufs, pkts, pkt_idx * (sizeof(*pkts)));
+	memcpy(rx_bufs, pkts, pkt_idx * (sizeof(*pkts)));
 	return pkt_idx;
 }
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:10.506049448 +0100
+++ 0130-net-ice-fix-32-bit-build.patch	2023-07-20 16:17:55.190752668 +0100
@@ -1 +1 @@
-From 910507de1164d1cb7051ddb84ac742bf088f4711 Mon Sep 17 00:00:00 2001
+From 80c80520d063c204eabc8e677294fc92463e60cb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 910507de1164d1cb7051ddb84ac742bf088f4711 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index eec6ea2134..55840cf170 100644
+index 2dd2d83650..ac939a3ba6 100644


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

* patch 'net/iavf: fix tunnel TSO path selection' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (128 preceding siblings ...)
  2023-07-20 15:19 ` patch 'net/ice: fix 32-bit build' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'net/ice: fix RSS hash key generation' " Kevin Traynor
                   ` (9 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Ke Xu; +Cc: Zhichao Zeng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/f81d03d3899ef1ef80c0b4e70fbc85a620db09ed

Thanks.

Kevin

---
From f81d03d3899ef1ef80c0b4e70fbc85a620db09ed Mon Sep 17 00:00:00 2001
From: Ke Xu <ke1.xu@intel.com>
Date: Thu, 6 Jul 2023 02:45:26 +0000
Subject: [PATCH] net/iavf: fix tunnel TSO path selection

[ upstream commit ca34627be5d6dae10c2ffe95d8c5782d6fec39e9 ]

IAVF currently supports TSO and Tunnel TSO. Both these two features
are implemented in scalar path. As there are missed flags for Tunnel
TSO, it selects vector paths wrongly when only Tunnel TSO is enabled
after introducing the patch "net/iavf: add offload path for Tx AVX512".

This patch added the missed flags to fix the Tunnel TSO path selecting.

Fixes: 059f18ae2aec ("net/iavf: add offload path for Tx AVX512")

Signed-off-by: Ke Xu <ke1.xu@intel.com>
Acked-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
 drivers/net/iavf/iavf_rxtx.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index db665a6468..a53a1ec268 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -32,4 +32,8 @@
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |		 \
 		RTE_ETH_TX_OFFLOAD_TCP_TSO |		 \
+		RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |	 \
+		RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |	 \
+		RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |	 \
+		RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |	 \
 		RTE_ETH_TX_OFFLOAD_SECURITY)
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:10.596760388 +0100
+++ 0131-net-iavf-fix-tunnel-TSO-path-selection.patch	2023-07-20 16:17:55.192752677 +0100
@@ -1 +1 @@
-From ca34627be5d6dae10c2ffe95d8c5782d6fec39e9 Mon Sep 17 00:00:00 2001
+From f81d03d3899ef1ef80c0b4e70fbc85a620db09ed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ca34627be5d6dae10c2ffe95d8c5782d6fec39e9 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 8d4a77271a..605ea3f824 100644
+index db665a6468..a53a1ec268 100644


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

* patch 'net/ice: fix RSS hash key generation' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (129 preceding siblings ...)
  2023-07-20 15:19 ` patch 'net/iavf: fix tunnel TSO path selection' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'baseband/fpga_5gnr_fec: fix possible division by zero' " Kevin Traynor
                   ` (8 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Yuying Zhang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/670782b1d7eba6737279eb53d8869c4b030ce6e2

Thanks.

Kevin

---
From 670782b1d7eba6737279eb53d8869c4b030ce6e2 Mon Sep 17 00:00:00 2001
From: Yuying Zhang <yuying.zhang@intel.com>
Date: Fri, 7 Jul 2023 02:10:46 +0000
Subject: [PATCH] net/ice: fix RSS hash key generation

[ upstream commit b9f28be1bf72e120041416b461325941fd97cac0 ]

Current code just generated 40 bytes standard rss
hash key of ice driver. The extended 12 bytes
were filled by hardware and were invalid for users.
This patch generate 52 bytes rss hash key for ice
driver just as other drivers.

Fixes: 50370662b727 ("net/ice: support device and queue ops")
Fixes: 20d6a017e148 ("net/ice: fix build with GCC 12")

Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index e81a66b106..cefbccd3e4 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3200,5 +3200,6 @@ static int ice_init_rss(struct ice_pf *pf)
 	rss_conf = &dev_data->dev_conf.rx_adv_conf.rss_conf;
 	nb_q = dev_data->nb_rx_queues;
-	vsi->rss_key_size = ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE;
+	vsi->rss_key_size = ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE +
+			    ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE;
 	vsi->rss_lut_size = pf->hash_lut_size;
 
@@ -3241,5 +3242,8 @@ static int ice_init_rss(struct ice_pf *pf)
 
 	rte_memcpy(key.standard_rss_key, vsi->rss_key,
-		RTE_MIN(sizeof(key.standard_rss_key), vsi->rss_key_size));
+		ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE);
+	rte_memcpy(key.extended_hash_key,
+		&vsi->rss_key[ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE],
+		ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE);
 	ret = ice_aq_set_rss_key(hw, vsi->idx, &key);
 	if (ret)
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:10.691033846 +0100
+++ 0132-net-ice-fix-RSS-hash-key-generation.patch	2023-07-20 16:17:55.201752713 +0100
@@ -1 +1 @@
-From b9f28be1bf72e120041416b461325941fd97cac0 Mon Sep 17 00:00:00 2001
+From 670782b1d7eba6737279eb53d8869c4b030ce6e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b9f28be1bf72e120041416b461325941fd97cac0 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 949b13324f..4bad39c2c1 100644
+index e81a66b106..cefbccd3e4 100644
@@ -26 +27 @@
-@@ -3351,5 +3351,6 @@ static int ice_init_rss(struct ice_pf *pf)
+@@ -3200,5 +3200,6 @@ static int ice_init_rss(struct ice_pf *pf)
@@ -34 +35 @@
-@@ -3392,5 +3393,8 @@ static int ice_init_rss(struct ice_pf *pf)
+@@ -3241,5 +3242,8 @@ static int ice_init_rss(struct ice_pf *pf)


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

* patch 'baseband/fpga_5gnr_fec: fix possible division by zero' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (130 preceding siblings ...)
  2023-07-20 15:19 ` patch 'net/ice: fix RSS hash key generation' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'baseband/fpga_5gnr_fec: fix starting unconfigured queue' " Kevin Traynor
                   ` (7 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/59b0cc0ce600f4d0916eb7679f7948d17cd448a6

Thanks.

Kevin

---
From 59b0cc0ce600f4d0916eb7679f7948d17cd448a6 Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Thu, 25 May 2023 11:28:07 -0700
Subject: [PATCH] baseband/fpga_5gnr_fec: fix possible division by zero

[ upstream commit 8b087b96eaa9df8d09fcea9a2a690e2c422058a5 ]

Add fix to have an early exit when z_c is zero to prevent a possible
division by zero.

Fixes: 44dc6faa796f ("baseband/fpga_5gnr_fec: add LDPC processing functions")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index 15d23d6269..60b86bebbd 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -880,7 +880,9 @@ static inline uint16_t
 get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index)
 {
-	if (rv_index == 0)
-		return 0;
 	uint16_t n = (bg == 1 ? N_ZC_1 : N_ZC_2) * z_c;
+	if (rv_index == 0)
+		return 0;
+	if (z_c == 0)
+		return 0;
 	if (n_cb == n) {
 		if (rv_index == 1)
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:10.789363363 +0100
+++ 0133-baseband-fpga_5gnr_fec-fix-possible-division-by-zero.patch	2023-07-20 16:17:55.204752726 +0100
@@ -1 +1 @@
-From 8b087b96eaa9df8d09fcea9a2a690e2c422058a5 Mon Sep 17 00:00:00 2001
+From 59b0cc0ce600f4d0916eb7679f7948d17cd448a6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8b087b96eaa9df8d09fcea9a2a690e2c422058a5 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f29565af8c..99390c4816 100644
+index 15d23d6269..60b86bebbd 100644
@@ -22 +23 @@
-@@ -878,7 +878,9 @@ static inline uint16_t
+@@ -880,7 +880,9 @@ static inline uint16_t


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

* patch 'baseband/fpga_5gnr_fec: fix starting unconfigured queue' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (131 preceding siblings ...)
  2023-07-20 15:19 ` patch 'baseband/fpga_5gnr_fec: fix possible division by zero' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'common/qat: detach crypto from compress build' " Kevin Traynor
                   ` (6 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/fac6cde16cff15abceb711d6fd268ab850f8ff7c

Thanks.

Kevin

---
From fac6cde16cff15abceb711d6fd268ab850f8ff7c Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Thu, 25 May 2023 11:28:08 -0700
Subject: [PATCH] baseband/fpga_5gnr_fec: fix starting unconfigured queue

[ upstream commit 490501e6cbe48503aeadb20f89915a3949b70aa8 ]

Adding exception to prevent segmentation fault in case a queue is
started which was not configured earlier.

Fixes: c58109a8871d ("baseband/fpga_5gnr_fec: add queue configuration")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 .../baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c   | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index 60b86bebbd..6931884901 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -565,10 +565,4 @@ fpga_queue_start(struct rte_bbdev *dev, uint16_t queue_id)
 {
 	struct fpga_5gnr_fec_device *d = dev->data->dev_private;
-#ifdef RTE_LIBRTE_BBDEV_DEBUG
-	if (d == NULL) {
-		rte_bbdev_log(ERR, "Invalid device pointer");
-		return -1;
-	}
-#endif
 	struct fpga_queue *q = dev->data->queues[queue_id].queue_private;
 	uint32_t offset = FPGA_5GNR_FEC_RING_CTRL_REGS +
@@ -576,4 +570,14 @@ fpga_queue_start(struct rte_bbdev *dev, uint16_t queue_id)
 	uint8_t enable = 0x01;
 	uint16_t zero = 0x0000;
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+	if (d == NULL) {
+		rte_bbdev_log(ERR, "Invalid device pointer");
+		return -1;
+	}
+#endif
+	if (dev->data->queues[queue_id].queue_private == NULL) {
+		rte_bbdev_log(ERR, "Cannot start invalid queue %d", queue_id);
+		return -1;
+	}
 
 	/* Clear queue head and tail variables */
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:10.903111834 +0100
+++ 0134-baseband-fpga_5gnr_fec-fix-starting-unconfigured-que.patch	2023-07-20 16:17:55.208752742 +0100
@@ -1 +1 @@
-From 490501e6cbe48503aeadb20f89915a3949b70aa8 Mon Sep 17 00:00:00 2001
+From fac6cde16cff15abceb711d6fd268ab850f8ff7c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 490501e6cbe48503aeadb20f89915a3949b70aa8 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 99390c4816..6b0644ffc5 100644
+index 60b86bebbd..6931884901 100644
@@ -22 +23 @@
-@@ -568,10 +568,4 @@ fpga_queue_start(struct rte_bbdev *dev, uint16_t queue_id)
+@@ -565,10 +565,4 @@ fpga_queue_start(struct rte_bbdev *dev, uint16_t queue_id)
@@ -33 +34 @@
-@@ -579,4 +573,14 @@ fpga_queue_start(struct rte_bbdev *dev, uint16_t queue_id)
+@@ -576,4 +570,14 @@ fpga_queue_start(struct rte_bbdev *dev, uint16_t queue_id)


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

* patch 'common/qat: detach crypto from compress build' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (132 preceding siblings ...)
  2023-07-20 15:19 ` patch 'baseband/fpga_5gnr_fec: fix starting unconfigured queue' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'test/crypto: fix PDCP-SDAP test vectors' " Kevin Traynor
                   ` (5 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Vikash Poddar; +Cc: Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/af1e19603ce78c2a71f407f823626589187b5283

Thanks.

Kevin

---
From af1e19603ce78c2a71f407f823626589187b5283 Mon Sep 17 00:00:00 2001
From: Vikash Poddar <vikash.chandrax.poddar@intel.com>
Date: Mon, 26 Jun 2023 11:29:06 +0000
Subject: [PATCH] common/qat: detach crypto from compress build

[ upstream commit 7cb939f6485ea8e4d6b1e8e82924fe2fcec96d60 ]

qat_qp.c is a common file for QAT crypto and
compress. Moved compress function from common
file to compress QAT file qat_comp.c

Bugzilla ID: 1237
Fixes: 2ca75c65af4c ("common/qat: build drivers from common folder")

Signed-off-by: Vikash Poddar <vikash.chandrax.poddar@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 drivers/common/qat/meson.build  |   8 --
 drivers/common/qat/qat_qp.c     | 187 --------------------------------
 drivers/common/qat/qat_qp.h     |  20 +++-
 drivers/compress/qat/qat_comp.c | 182 +++++++++++++++++++++++++++++++
 drivers/compress/qat/qat_comp.h |   3 +
 5 files changed, 201 insertions(+), 199 deletions(-)

diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build
index af92271a75..1606fadef0 100644
--- a/drivers/common/qat/meson.build
+++ b/drivers/common/qat/meson.build
@@ -36,12 +36,4 @@ if qat_crypto and not libcrypto.found()
 endif
 
-# The driver should not build if both compression and crypto are disabled
-#FIXME common code depends on compression files so check only compress!
-if not qat_compress # and not qat_crypto
-    build = false
-    reason = '' # rely on reason for compress/crypto above
-    subdir_done()
-endif
-
 deps += ['bus_pci', 'cryptodev', 'net', 'compressdev']
 sources += files(
diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
index cde421eb77..5a39a90a0b 100644
--- a/drivers/common/qat/qat_qp.c
+++ b/drivers/common/qat/qat_qp.c
@@ -452,18 +452,4 @@ adf_configure_queues(struct qat_qp *qp, enum qat_device_gen qat_dev_gen)
 }
 
-static inline void
-txq_write_tail(enum qat_device_gen qat_dev_gen,
-		struct qat_qp *qp, struct qat_queue *q)
-{
-	struct qat_qp_hw_spec_funcs *ops =
-		qat_qp_hw_spec[qat_dev_gen];
-
-	/*
-	 * Pointer check should be done during
-	 * initialization
-	 */
-	ops->qat_qp_csr_write_tail(qp, q);
-}
-
 static inline void
 qat_qp_csr_write_head(enum qat_device_gen qat_dev_gen, struct qat_qp *qp,
@@ -644,177 +630,4 @@ kick_tail:
 }
 
-/* Use this for compression only - but keep consistent with above common
- * function as much as possible.
- */
-uint16_t
-qat_enqueue_comp_op_burst(void *qp, void **ops, uint16_t nb_ops)
-{
-	register struct qat_queue *queue;
-	struct qat_qp *tmp_qp = (struct qat_qp *)qp;
-	register uint32_t nb_ops_sent = 0;
-	register int nb_desc_to_build;
-	uint16_t nb_ops_possible = nb_ops;
-	register uint8_t *base_addr;
-	register uint32_t tail;
-
-	int descriptors_built, total_descriptors_built = 0;
-	int nb_remaining_descriptors;
-	int overflow = 0;
-
-	if (unlikely(nb_ops == 0))
-		return 0;
-
-	/* read params used a lot in main loop into registers */
-	queue = &(tmp_qp->tx_q);
-	base_addr = (uint8_t *)queue->base_addr;
-	tail = queue->tail;
-
-	/* Find how many can actually fit on the ring */
-	{
-		/* dequeued can only be written by one thread, but it may not
-		 * be this thread. As it's 4-byte aligned it will be read
-		 * atomically here by any Intel CPU.
-		 * enqueued can wrap before dequeued, but cannot
-		 * lap it as var size of enq/deq (uint32_t) > var size of
-		 * max_inflights (uint16_t). In reality inflights is never
-		 * even as big as max uint16_t, as it's <= ADF_MAX_DESC.
-		 * On wrapping, the calculation still returns the correct
-		 * positive value as all three vars are unsigned.
-		 */
-		uint32_t inflights =
-			tmp_qp->enqueued - tmp_qp->dequeued;
-
-		/* Find how many can actually fit on the ring */
-		overflow = (inflights + nb_ops) - tmp_qp->max_inflights;
-		if (overflow > 0) {
-			nb_ops_possible = nb_ops - overflow;
-			if (nb_ops_possible == 0)
-				return 0;
-		}
-
-		/* QAT has plenty of work queued already, so don't waste cycles
-		 * enqueueing, wait til the application has gathered a bigger
-		 * burst or some completed ops have been dequeued
-		 */
-		if (tmp_qp->min_enq_burst_threshold && inflights >
-				QAT_QP_MIN_INFL_THRESHOLD && nb_ops_possible <
-				tmp_qp->min_enq_burst_threshold) {
-			tmp_qp->stats.threshold_hit_count++;
-			return 0;
-		}
-	}
-
-	/* At this point nb_ops_possible is assuming a 1:1 mapping
-	 * between ops and descriptors.
-	 * Fewer may be sent if some ops have to be split.
-	 * nb_ops_possible is <= burst size.
-	 * Find out how many spaces are actually available on the qp in case
-	 * more are needed.
-	 */
-	nb_remaining_descriptors = nb_ops_possible
-			 + ((overflow >= 0) ? 0 : overflow * (-1));
-	QAT_DP_LOG(DEBUG, "Nb ops requested %d, nb descriptors remaining %d",
-			nb_ops, nb_remaining_descriptors);
-
-	while (nb_ops_sent != nb_ops_possible &&
-				nb_remaining_descriptors > 0) {
-		struct qat_comp_op_cookie *cookie =
-				tmp_qp->op_cookies[tail >> queue->trailz];
-
-		descriptors_built = 0;
-
-		QAT_DP_LOG(DEBUG, "--- data length: %u",
-			   ((struct rte_comp_op *)*ops)->src.length);
-
-		nb_desc_to_build = qat_comp_build_request(*ops,
-				base_addr + tail, cookie, tmp_qp->qat_dev_gen);
-		QAT_DP_LOG(DEBUG, "%d descriptors built, %d remaining, "
-			"%d ops sent, %d descriptors needed",
-			total_descriptors_built, nb_remaining_descriptors,
-			nb_ops_sent, nb_desc_to_build);
-
-		if (unlikely(nb_desc_to_build < 0)) {
-			/* this message cannot be enqueued */
-			tmp_qp->stats.enqueue_err_count++;
-			if (nb_ops_sent == 0)
-				return 0;
-			goto kick_tail;
-		} else if (unlikely(nb_desc_to_build > 1)) {
-			/* this op is too big and must be split - get more
-			 * descriptors and retry
-			 */
-
-			QAT_DP_LOG(DEBUG, "Build %d descriptors for this op",
-					nb_desc_to_build);
-
-			nb_remaining_descriptors -= nb_desc_to_build;
-			if (nb_remaining_descriptors >= 0) {
-				/* There are enough remaining descriptors
-				 * so retry
-				 */
-				int ret2 = qat_comp_build_multiple_requests(
-						*ops, tmp_qp, tail,
-						nb_desc_to_build);
-
-				if (unlikely(ret2 < 1)) {
-					QAT_DP_LOG(DEBUG,
-							"Failed to build (%d) descriptors, status %d",
-							nb_desc_to_build, ret2);
-
-					qat_comp_free_split_op_memzones(cookie,
-							nb_desc_to_build - 1);
-
-					tmp_qp->stats.enqueue_err_count++;
-
-					/* This message cannot be enqueued */
-					if (nb_ops_sent == 0)
-						return 0;
-					goto kick_tail;
-				} else {
-					descriptors_built = ret2;
-					total_descriptors_built +=
-							descriptors_built;
-					nb_remaining_descriptors -=
-							descriptors_built;
-					QAT_DP_LOG(DEBUG,
-							"Multiple descriptors (%d) built ok",
-							descriptors_built);
-				}
-			} else {
-				QAT_DP_LOG(ERR, "For the current op, number of requested descriptors (%d) "
-						"exceeds number of available descriptors (%d)",
-						nb_desc_to_build,
-						nb_remaining_descriptors +
-							nb_desc_to_build);
-
-				qat_comp_free_split_op_memzones(cookie,
-						nb_desc_to_build - 1);
-
-				/* Not enough extra descriptors */
-				if (nb_ops_sent == 0)
-					return 0;
-				goto kick_tail;
-			}
-		} else {
-			descriptors_built = 1;
-			total_descriptors_built++;
-			nb_remaining_descriptors--;
-			QAT_DP_LOG(DEBUG, "Single descriptor built ok");
-		}
-
-		tail = adf_modulo(tail + (queue->msg_size * descriptors_built),
-				  queue->modulo_mask);
-		ops++;
-		nb_ops_sent++;
-	}
-
-kick_tail:
-	queue->tail = tail;
-	tmp_qp->enqueued += total_descriptors_built;
-	tmp_qp->stats.enqueued_count += nb_ops_sent;
-	txq_write_tail(tmp_qp->qat_dev_gen, tmp_qp, queue);
-	return nb_ops_sent;
-}
-
 uint16_t
 qat_dequeue_op_burst(void *qp, void **ops, uint16_t nb_ops)
diff --git a/drivers/common/qat/qat_qp.h b/drivers/common/qat/qat_qp.h
index deafb407b3..272934bc30 100644
--- a/drivers/common/qat/qat_qp.h
+++ b/drivers/common/qat/qat_qp.h
@@ -81,7 +81,4 @@ uint16_t
 qat_enqueue_op_burst(void *qp, void **ops, uint16_t nb_ops);
 
-uint16_t
-qat_enqueue_comp_op_burst(void *qp, void **ops, uint16_t nb_ops);
-
 uint16_t
 qat_dequeue_op_burst(void *qp, void **ops, uint16_t nb_ops);
@@ -154,5 +151,20 @@ struct qat_qp_hw_spec_funcs {
 };
 
-extern struct qat_qp_hw_spec_funcs *qat_qp_hw_spec[];
+extern struct qat_qp_hw_spec_funcs*
+	qat_qp_hw_spec[];
+
+static inline void
+txq_write_tail(enum qat_device_gen qat_dev_gen,
+		struct qat_qp *qp, struct qat_queue *q)
+{
+	struct qat_qp_hw_spec_funcs *ops =
+		qat_qp_hw_spec[qat_dev_gen];
+
+	/*
+	 * Pointer check should be done during
+	 * initialization
+	 */
+	ops->qat_qp_csr_write_tail(qp, q);
+}
 
 #endif /* _QAT_QP_H_ */
diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
index e8f57c3cc4..1282ffc2ab 100644
--- a/drivers/compress/qat/qat_comp.c
+++ b/drivers/compress/qat/qat_comp.c
@@ -1145,2 +1145,184 @@ qat_comp_stream_free(struct rte_compressdev *dev, void *stream)
 	return -EINVAL;
 }
+
+/**
+ * Enqueue packets for processing on queue pair of a device
+ *
+ * @param qp
+ *   qat queue pair
+ * @param ops
+ *   Compressdev operation
+ * @param nb_ops
+ *   number of operations
+ * @return
+ *  - nb_ops_sent if successful
+ */
+uint16_t
+qat_enqueue_comp_op_burst(void *qp, void **ops, uint16_t nb_ops)
+{
+	register struct qat_queue *queue;
+	struct qat_qp *tmp_qp = (struct qat_qp *)qp;
+	register uint32_t nb_ops_sent = 0;
+	register int nb_desc_to_build;
+	uint16_t nb_ops_possible = nb_ops;
+	register uint8_t *base_addr;
+	register uint32_t tail;
+
+	int descriptors_built, total_descriptors_built = 0;
+	int nb_remaining_descriptors;
+	int overflow = 0;
+
+	if (unlikely(nb_ops == 0))
+		return 0;
+
+	/* read params used a lot in main loop into registers */
+	queue = &(tmp_qp->tx_q);
+	base_addr = (uint8_t *)queue->base_addr;
+	tail = queue->tail;
+
+	/* Find how many can actually fit on the ring */
+	{
+		/* dequeued can only be written by one thread, but it may not
+		 * be this thread. As it's 4-byte aligned it will be read
+		 * atomically here by any Intel CPU.
+		 * enqueued can wrap before dequeued, but cannot
+		 * lap it as var size of enq/deq (uint32_t) > var size of
+		 * max_inflights (uint16_t). In reality inflights is never
+		 * even as big as max uint16_t, as it's <= ADF_MAX_DESC.
+		 * On wrapping, the calculation still returns the correct
+		 * positive value as all three vars are unsigned.
+		 */
+		uint32_t inflights =
+			tmp_qp->enqueued - tmp_qp->dequeued;
+
+		/* Find how many can actually fit on the ring */
+		overflow = (inflights + nb_ops) - tmp_qp->max_inflights;
+		if (overflow > 0) {
+			nb_ops_possible = nb_ops - overflow;
+			if (nb_ops_possible == 0)
+				return 0;
+		}
+
+		/* QAT has plenty of work queued already, so don't waste cycles
+		 * enqueueing, wait til the application has gathered a bigger
+		 * burst or some completed ops have been dequeued
+		 */
+		if (tmp_qp->min_enq_burst_threshold && inflights >
+				QAT_QP_MIN_INFL_THRESHOLD && nb_ops_possible <
+				tmp_qp->min_enq_burst_threshold) {
+			tmp_qp->stats.threshold_hit_count++;
+			return 0;
+		}
+	}
+
+	/* At this point nb_ops_possible is assuming a 1:1 mapping
+	 * between ops and descriptors.
+	 * Fewer may be sent if some ops have to be split.
+	 * nb_ops_possible is <= burst size.
+	 * Find out how many spaces are actually available on the qp in case
+	 * more are needed.
+	 */
+	nb_remaining_descriptors = nb_ops_possible
+			 + ((overflow >= 0) ? 0 : overflow * (-1));
+	QAT_DP_LOG(DEBUG, "Nb ops requested %d, nb descriptors remaining %d",
+			nb_ops, nb_remaining_descriptors);
+
+	while (nb_ops_sent != nb_ops_possible &&
+				nb_remaining_descriptors > 0) {
+		struct qat_comp_op_cookie *cookie =
+				tmp_qp->op_cookies[tail >> queue->trailz];
+
+		descriptors_built = 0;
+
+		QAT_DP_LOG(DEBUG, "--- data length: %u",
+			   ((struct rte_comp_op *)*ops)->src.length);
+
+		nb_desc_to_build = qat_comp_build_request(*ops,
+				base_addr + tail, cookie, tmp_qp->qat_dev_gen);
+		QAT_DP_LOG(DEBUG, "%d descriptors built, %d remaining, "
+			"%d ops sent, %d descriptors needed",
+			total_descriptors_built, nb_remaining_descriptors,
+			nb_ops_sent, nb_desc_to_build);
+
+		if (unlikely(nb_desc_to_build < 0)) {
+			/* this message cannot be enqueued */
+			tmp_qp->stats.enqueue_err_count++;
+			if (nb_ops_sent == 0)
+				return 0;
+			goto kick_tail;
+		} else if (unlikely(nb_desc_to_build > 1)) {
+			/* this op is too big and must be split - get more
+			 * descriptors and retry
+			 */
+
+			QAT_DP_LOG(DEBUG, "Build %d descriptors for this op",
+					nb_desc_to_build);
+
+			nb_remaining_descriptors -= nb_desc_to_build;
+			if (nb_remaining_descriptors >= 0) {
+				/* There are enough remaining descriptors
+				 * so retry
+				 */
+				int ret2 = qat_comp_build_multiple_requests(
+						*ops, tmp_qp, tail,
+						nb_desc_to_build);
+
+				if (unlikely(ret2 < 1)) {
+					QAT_DP_LOG(DEBUG,
+							"Failed to build (%d) descriptors, status %d",
+							nb_desc_to_build, ret2);
+
+					qat_comp_free_split_op_memzones(cookie,
+							nb_desc_to_build - 1);
+
+					tmp_qp->stats.enqueue_err_count++;
+
+					/* This message cannot be enqueued */
+					if (nb_ops_sent == 0)
+						return 0;
+					goto kick_tail;
+				} else {
+					descriptors_built = ret2;
+					total_descriptors_built +=
+							descriptors_built;
+					nb_remaining_descriptors -=
+							descriptors_built;
+					QAT_DP_LOG(DEBUG,
+							"Multiple descriptors (%d) built ok",
+							descriptors_built);
+				}
+			} else {
+				QAT_DP_LOG(ERR, "For the current op, number of requested descriptors (%d) "
+						"exceeds number of available descriptors (%d)",
+						nb_desc_to_build,
+						nb_remaining_descriptors +
+							nb_desc_to_build);
+
+				qat_comp_free_split_op_memzones(cookie,
+						nb_desc_to_build - 1);
+
+				/* Not enough extra descriptors */
+				if (nb_ops_sent == 0)
+					return 0;
+				goto kick_tail;
+			}
+		} else {
+			descriptors_built = 1;
+			total_descriptors_built++;
+			nb_remaining_descriptors--;
+			QAT_DP_LOG(DEBUG, "Single descriptor built ok");
+		}
+
+		tail = adf_modulo(tail + (queue->msg_size * descriptors_built),
+				  queue->modulo_mask);
+		ops++;
+		nb_ops_sent++;
+	}
+
+kick_tail:
+	queue->tail = tail;
+	tmp_qp->enqueued += total_descriptors_built;
+	tmp_qp->stats.enqueued_count += nb_ops_sent;
+	txq_write_tail(tmp_qp->qat_dev_gen, tmp_qp, queue);
+	return nb_ops_sent;
+}
diff --git a/drivers/compress/qat/qat_comp.h b/drivers/compress/qat/qat_comp.h
index da7b9a6eec..dc220cd6e3 100644
--- a/drivers/compress/qat/qat_comp.h
+++ b/drivers/compress/qat/qat_comp.h
@@ -142,4 +142,7 @@ int
 qat_comp_stream_free(struct rte_compressdev *dev, void *stream);
 
+uint16_t
+qat_enqueue_comp_op_burst(void *qp, void **ops, uint16_t nb_ops);
+
 #endif
 #endif
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:10.999354374 +0100
+++ 0135-common-qat-detach-crypto-from-compress-build.patch	2023-07-20 16:17:55.213752762 +0100
@@ -1 +1 @@
-From 7cb939f6485ea8e4d6b1e8e82924fe2fcec96d60 Mon Sep 17 00:00:00 2001
+From af1e19603ce78c2a71f407f823626589187b5283 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7cb939f6485ea8e4d6b1e8e82924fe2fcec96d60 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 0f72b6959b..edc793ba95 100644
+index af92271a75..1606fadef0 100644
@@ -28 +29 @@
-@@ -71,12 +71,4 @@ else
+@@ -36,12 +36,4 @@ if qat_crypto and not libcrypto.found()
@@ -42 +43 @@
-index 0ba26d8580..094d684abc 100644
+index cde421eb77..5a39a90a0b 100644
@@ -45 +46 @@
-@@ -491,18 +491,4 @@ adf_configure_queues(struct qat_qp *qp, enum qat_device_gen qat_dev_gen)
+@@ -452,18 +452,4 @@ adf_configure_queues(struct qat_qp *qp, enum qat_device_gen qat_dev_gen)
@@ -64 +65 @@
-@@ -671,177 +657,4 @@ kick_tail:
+@@ -644,177 +630,4 @@ kick_tail:
@@ -241 +242 @@
- qat_dequeue_op_burst(void *qp, void **ops,
+ qat_dequeue_op_burst(void *qp, void **ops, uint16_t nb_ops)
@@ -243 +244 @@
-index d19fc387e4..ae18fb942e 100644
+index deafb407b3..272934bc30 100644
@@ -246,2 +247,2 @@
-@@ -128,7 +128,4 @@ qat_enqueue_op_burst(void *qp, qat_op_build_request_t op_build_request,
- 		void **ops, uint16_t nb_ops);
+@@ -81,7 +81,4 @@ uint16_t
+ qat_enqueue_op_burst(void *qp, void **ops, uint16_t nb_ops);
@@ -253,2 +254,2 @@
- qat_dequeue_op_burst(void *qp, void **ops,
-@@ -207,5 +204,20 @@ struct qat_qp_hw_spec_funcs {
+ qat_dequeue_op_burst(void *qp, void **ops, uint16_t nb_ops);
+@@ -154,5 +151,20 @@ struct qat_qp_hw_spec_funcs {
@@ -277 +278 @@
-index fe4a4999c6..559948a46a 100644
+index e8f57c3cc4..1282ffc2ab 100644


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

* patch 'test/crypto: fix PDCP-SDAP test vectors' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (133 preceding siblings ...)
  2023-07-20 15:19 ` patch 'common/qat: detach crypto from compress build' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'examples/fips_validation: fix digest length in AES-GCM' " Kevin Traynor
                   ` (4 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Aakash Sasidharan; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/1763e0cd4fb1ef06a3c3f1749f49a96e27752ef6

Thanks.

Kevin

---
From 1763e0cd4fb1ef06a3c3f1749f49a96e27752ef6 Mon Sep 17 00:00:00 2001
From: Aakash Sasidharan <asasidharan@marvell.com>
Date: Wed, 28 Jun 2023 13:50:20 +0530
Subject: [PATCH] test/crypto: fix PDCP-SDAP test vectors

[ upstream commit 2c34aae94dd79be9ca81875c8b24ec3a1e897861 ]

Fix incorrect fields in PDCP Header.
1. Only Data PDUs should be ciphered and authenticated.
   Here the vectors are control PDUs which should not be crypto
   processed. Change the D/C bit to make the vector as Data PDU
2. Reserved fields must be set to 0.

Updated the vectors and MAC-I values to handle above cases.

Fixes: 003afde411e7 ("test/crypto: add test vectors for PDCP-SDAP")

Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 ...ryptodev_security_pdcp_sdap_test_vectors.h | 252 +++++++++---------
 1 file changed, 126 insertions(+), 126 deletions(-)

diff --git a/app/test/test_cryptodev_security_pdcp_sdap_test_vectors.h b/app/test/test_cryptodev_security_pdcp_sdap_test_vectors.h
index f43f693edb..b0fa0ec458 100644
--- a/app/test/test_cryptodev_security_pdcp_sdap_test_vectors.h
+++ b/app/test/test_cryptodev_security_pdcp_sdap_test_vectors.h
@@ -770,5 +770,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -782,5 +782,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x69, 0xf2, 0x5d, 0xd7,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x69, 0xf2, 0x5d, 0xd7,
 				     0xf5, 0xc1, 0xf7, 0x1e, 0x47, 0x5d, 0xce,
 				     0xbe, 0x48, 0xb5, 0x0b, 0x6a, 0x73, 0x9a,
@@ -791,5 +791,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x39, 0x11, 0x03, 0x0a, 0x9d, 0x4f, 0xe2,
 				     0x95, 0x9f, 0x47, 0x73, 0x37, 0x83, 0x8c,
-				     0x23, 0xfa, 0x16, 0x39, 0xf7, 0x15, 0x11 },
+				     0x23, 0xfa, 0x16, 0xb2, 0xb0, 0x17, 0x4a },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -818,5 +818,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -830,5 +830,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x22, 0x2a, 0x8f, 0x86,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x22, 0x2a, 0x8f, 0x86,
 				     0x25, 0x92, 0xcd, 0xa9, 0xa1, 0xa0, 0xf5,
 				     0x86, 0x0d, 0xe8, 0xe4, 0xef, 0xe0, 0x78,
@@ -839,5 +839,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x60, 0x1c, 0x13, 0xcc, 0x7e, 0x6b, 0x2f,
 				     0x6f, 0x91, 0x89, 0xc6, 0xd4, 0xe6, 0x17,
-				     0xae, 0xde, 0xfb, 0x90, 0x62, 0x59, 0xcb },
+				     0xae, 0xde, 0xfb, 0x19, 0xDa, 0x9a, 0xc2 },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -866,5 +866,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -878,5 +878,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x69, 0xf2, 0x5d, 0xd7,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x69, 0xf2, 0x5d, 0xd7,
 				     0xf5, 0xc1, 0xf7, 0x1e, 0x47, 0x5d, 0xce,
 				     0xbe, 0x48, 0xb5, 0x0b, 0x6a, 0x73, 0x9a,
@@ -887,5 +887,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x39, 0x11, 0x03, 0x0a, 0x9d, 0x4f, 0xe2,
 				     0x95, 0x9f, 0x47, 0x73, 0x37, 0x83, 0x8c,
-				     0x23, 0xfa, 0x16, 0x72, 0x3e, 0x14, 0xa9 },
+				     0x23, 0xfa, 0x16, 0x6c, 0xcb, 0x92, 0xdf },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -914,5 +914,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -926,5 +926,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x22, 0x2a, 0x8f, 0x86,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x22, 0x2a, 0x8f, 0x86,
 				     0x25, 0x92, 0xcd, 0xa9, 0xa1, 0xa0, 0xf5,
 				     0x86, 0x0d, 0xe8, 0xe4, 0xef, 0xe0, 0x78,
@@ -935,5 +935,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x60, 0x1c, 0x13, 0xcc, 0x7e, 0x6b, 0x2f,
 				     0x6f, 0x91, 0x89, 0xc6, 0xd4, 0xe6, 0x17,
-				     0xae, 0xde, 0xfb, 0x3f, 0x47, 0xaa, 0x9b },
+				     0xae, 0xde, 0xfb, 0x5b, 0xc2, 0x9f, 0x29 },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -962,5 +962,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -975,5 +975,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.data_out =
 			(uint8_t[]){
-				0x50, 0x01, 0x86, 0x69, 0xf2, 0x5d, 0xd7, 0xf5,
+				0x80, 0x01, 0x86, 0x69, 0xf2, 0x5d, 0xd7, 0xf5,
 				0xc1, 0xf7, 0x1e, 0x47, 0x5d, 0xce, 0xbe, 0x48,
 				0xb5, 0x0b, 0x6a, 0x73, 0x9a, 0x5a, 0xa3, 0x06,
@@ -983,5 +983,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				0xe8, 0x39, 0x11, 0x03, 0x0a, 0x9d, 0x4f, 0xe2,
 				0x95, 0x9f, 0x47, 0x73, 0x37, 0x83, 0x8c, 0x23,
-				0xfa, 0x16, 0x52, 0x69, 0x16, 0xfc,
+				0xfa, 0x16, 0x5d, 0x83, 0x73, 0x34,
 			},
 		.sn_size = 12,
@@ -1011,5 +1011,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -1023,5 +1023,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x22, 0x2a, 0x8f, 0x86,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x22, 0x2a, 0x8f, 0x86,
 				     0x25, 0x92, 0xcd, 0xa9, 0xa1, 0xa0, 0xf5,
 				     0x86, 0x0d, 0xe8, 0xe4, 0xef, 0xe0, 0x78,
@@ -1032,5 +1032,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x60, 0x1c, 0x13, 0xcc, 0x7e, 0x6b, 0x2f,
 				     0x6f, 0x91, 0x89, 0xc6, 0xd4, 0xe6, 0x17,
-				     0xae, 0xde, 0xfb, 0xf5, 0xda, 0x73, 0xa7 },
+				     0xae, 0xde, 0xfb, 0xff, 0xf9, 0xef, 0xff },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -1155,5 +1155,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -1167,5 +1167,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xe8, 0x8c, 0x96, 0x38,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xe8, 0x8c, 0x96, 0x38,
 				     0x6e, 0xe4, 0x1f, 0xb9, 0x85, 0x61, 0x2e,
 				     0x64, 0x31, 0x22, 0x97, 0x5b, 0xf6, 0x40,
@@ -1176,5 +1176,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xfb, 0xe1, 0xea, 0x6f, 0xf9, 0x9d, 0xf3,
 				     0x90, 0x02, 0x6e, 0xf1, 0xf8, 0x95, 0x97,
-				     0xbd, 0xba, 0x08, 0x39, 0x63, 0x21, 0x82 },
+				     0xbd, 0xba, 0x08, 0xb2, 0x24, 0x23, 0xd9 },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -1203,5 +1203,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -1215,5 +1215,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xd2, 0xc0, 0x3a, 0x41,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xd2, 0xc0, 0x3a, 0x41,
 				     0xbc, 0x0b, 0x95, 0xa4, 0x57, 0x3e, 0x36,
 				     0x10, 0xb2, 0xff, 0x48, 0x1f, 0x10, 0xa8,
@@ -1224,5 +1224,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x9c, 0xa4, 0xa4, 0x9b, 0x20, 0xc6, 0x47,
 				     0xdd, 0xe5, 0xa3, 0x4b, 0x9e, 0x66, 0xde,
-				     0xc9, 0x0a, 0x64, 0x8e, 0x79, 0xde, 0xaa },
+				     0xc9, 0x0a, 0x64, 0x07, 0xc1, 0x1d, 0xa3 },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -1251,5 +1251,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -1263,5 +1263,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xe8, 0x8c, 0x96, 0x38,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xe8, 0x8c, 0x96, 0x38,
 				     0x6e, 0xe4, 0x1f, 0xb9, 0x85, 0x61, 0x2e,
 				     0x64, 0x31, 0x22, 0x97, 0x5b, 0xf6, 0x40,
@@ -1272,5 +1272,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xfb, 0xe1, 0xea, 0x6f, 0xf9, 0x9d, 0xf3,
 				     0x90, 0x02, 0x6e, 0xf1, 0xf8, 0x95, 0x97,
-				     0xbd, 0xba, 0x08, 0x72, 0xaa, 0x20, 0x3a },
+				     0xbd, 0xba, 0x08, 0x6c, 0x5f, 0xa6, 0x4c },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -1299,5 +1299,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -1311,5 +1311,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xd2, 0xc0, 0x3a, 0x41,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xd2, 0xc0, 0x3a, 0x41,
 				     0xbc, 0x0b, 0x95, 0xa4, 0x57, 0x3e, 0x36,
 				     0x10, 0xb2, 0xff, 0x48, 0x1f, 0x10, 0xa8,
@@ -1320,5 +1320,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x9c, 0xa4, 0xa4, 0x9b, 0x20, 0xc6, 0x47,
 				     0xdd, 0xe5, 0xa3, 0x4b, 0x9e, 0x66, 0xde,
-				     0xc9, 0x0a, 0x64, 0x21, 0x5c, 0x2d, 0xfa },
+				     0xc9, 0x0a, 0x64, 0x45, 0xd9, 0x18, 0x48 },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -1347,5 +1347,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -1359,5 +1359,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xe8, 0x8c, 0x96, 0x38,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xe8, 0x8c, 0x96, 0x38,
 				     0x6e, 0xe4, 0x1f, 0xb9, 0x85, 0x61, 0x2e,
 				     0x64, 0x31, 0x22, 0x97, 0x5b, 0xf6, 0x40,
@@ -1368,5 +1368,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xfb, 0xe1, 0xea, 0x6f, 0xf9, 0x9d, 0xf3,
 				     0x90, 0x02, 0x6e, 0xf1, 0xf8, 0x95, 0x97,
-				     0xbd, 0xba, 0x08, 0x52, 0xfd, 0x22, 0x6f },
+				     0xbd, 0xba, 0x08, 0x5d, 0x17, 0x47, 0xa7 },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -1395,5 +1395,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -1407,5 +1407,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xd2, 0xc0, 0x3a, 0x41,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xd2, 0xc0, 0x3a, 0x41,
 				     0xbc, 0x0b, 0x95, 0xa4, 0x57, 0x3e, 0x36,
 				     0x10, 0xb2, 0xff, 0x48, 0x1f, 0x10, 0xa8,
@@ -1416,5 +1416,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x9c, 0xa4, 0xa4, 0x9b, 0x20, 0xc6, 0x47,
 				     0xdd, 0xe5, 0xa3, 0x4b, 0x9e, 0x66, 0xde,
-				     0xc9, 0x0a, 0x64, 0xeb, 0xc1, 0xf4, 0xc6 },
+				     0xc9, 0x0a, 0x64, 0xe1, 0xe2, 0x68, 0x9e },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -1539,5 +1539,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -1551,5 +1551,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x79, 0xdb, 0x02, 0x27,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x79, 0xdb, 0x02, 0x27,
 				     0xa0, 0x85, 0x82, 0x87, 0x6b, 0x35, 0x2b,
 				     0xe1, 0x96, 0x5b, 0xfd, 0x67, 0xe1, 0x67,
@@ -1560,5 +1560,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x64, 0x0f, 0x4a, 0xc7, 0x7c, 0x9d, 0x56,
 				     0x5a, 0x2a, 0xcb, 0xff, 0x79, 0x07, 0xa5,
-				     0xaf, 0x96, 0x5c, 0xb6, 0x6c, 0xeb, 0x14 },
+				     0xaf, 0x96, 0x5c, 0x3d, 0x2b, 0xe9, 0x4f },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -1587,5 +1587,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -1599,5 +1599,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x2c, 0x0f, 0xc1, 0x08,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x2c, 0x0f, 0xc1, 0x08,
 				     0x2e, 0xa7, 0x97, 0xd2, 0x6c, 0x17, 0x8f,
 				     0x22, 0x1f, 0x99, 0x1b, 0x48, 0x04, 0x29,
@@ -1608,5 +1608,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x70, 0x10, 0x56, 0x83, 0x59, 0xb5, 0x64,
 				     0x0b, 0xa6, 0x2e, 0xa5, 0x03, 0x62, 0x13,
-				     0x91, 0xaf, 0x24, 0xb2, 0x82, 0xfb, 0x27 },
+				     0x91, 0xaf, 0x24, 0x3b, 0x3a, 0x38, 0x2e },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -1635,5 +1635,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -1647,5 +1647,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x79, 0xdb, 0x02, 0x27,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x79, 0xdb, 0x02, 0x27,
 				     0xa0, 0x85, 0x82, 0x87, 0x6b, 0x35, 0x2b,
 				     0xe1, 0x96, 0x5b, 0xfd, 0x67, 0xe1, 0x67,
@@ -1656,5 +1656,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x64, 0x0f, 0x4a, 0xc7, 0x7c, 0x9d, 0x56,
 				     0x5a, 0x2a, 0xcb, 0xff, 0x79, 0x07, 0xa5,
-				     0xaf, 0x96, 0x5c, 0xfd, 0xa5, 0xea, 0xac },
+				     0xaf, 0x96, 0x5c, 0xe3, 0x50, 0x6c, 0xda },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -1683,5 +1683,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -1695,5 +1695,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x2c, 0x0f, 0xc1, 0x08,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x2c, 0x0f, 0xc1, 0x08,
 				     0x2e, 0xa7, 0x97, 0xd2, 0x6c, 0x17, 0x8f,
 				     0x22, 0x1f, 0x99, 0x1b, 0x48, 0x04, 0x29,
@@ -1704,5 +1704,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x70, 0x10, 0x56, 0x83, 0x59, 0xb5, 0x64,
 				     0x0b, 0xa6, 0x2e, 0xa5, 0x03, 0x62, 0x13,
-				     0x91, 0xaf, 0x24, 0x1d, 0xa7, 0x08, 0x77 },
+				     0x91, 0xaf, 0x24, 0x79, 0x22, 0x3d, 0xc5 },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -1731,5 +1731,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -1743,5 +1743,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x79, 0xdb, 0x02, 0x27,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x79, 0xdb, 0x02, 0x27,
 				     0xa0, 0x85, 0x82, 0x87, 0x6b, 0x35, 0x2b,
 				     0xe1, 0x96, 0x5b, 0xfd, 0x67, 0xe1, 0x67,
@@ -1752,5 +1752,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x64, 0x0f, 0x4a, 0xc7, 0x7c, 0x9d, 0x56,
 				     0x5a, 0x2a, 0xcb, 0xff, 0x79, 0x07, 0xa5,
-				     0xaf, 0x96, 0x5c, 0xdd, 0xf2, 0xe8, 0xf9 },
+				     0xaf, 0x96, 0x5c, 0xd2, 0x18, 0x8d, 0x31 },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -1779,5 +1779,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0xdc, 0xb6, 0xc2, 0x36 },
 		.data_in =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0xb8, 0xf8, 0xdb, 0x2d,
 				     0x3f, 0x23, 0x82, 0x53, 0xfd, 0x37, 0xde,
 				     0x88, 0x63, 0x08, 0x4f, 0xd3, 0x71, 0xfb,
@@ -1791,5 +1791,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 66,
 		.data_out =
-			(uint8_t[]){ 0x50, 0x01, 0x86, 0x2c, 0x0f, 0xc1, 0x08,
+			(uint8_t[]){ 0x80, 0x01, 0x86, 0x2c, 0x0f, 0xc1, 0x08,
 				     0x2e, 0xa7, 0x97, 0xd2, 0x6c, 0x17, 0x8f,
 				     0x22, 0x1f, 0x99, 0x1b, 0x48, 0x04, 0x29,
@@ -1800,5 +1800,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x70, 0x10, 0x56, 0x83, 0x59, 0xb5, 0x64,
 				     0x0b, 0xa6, 0x2e, 0xa5, 0x03, 0x62, 0x13,
-				     0x91, 0xaf, 0x24, 0xd7, 0x3a, 0xd1, 0x4b },
+				     0x91, 0xaf, 0x24, 0xdd, 0x19, 0x4d, 0x13 },
 		.sn_size = 12,
 		.hfn = 0x1,
@@ -2557,5 +2557,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -2569,5 +2569,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x78, 0xee, 0x01,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x78, 0xee, 0x01,
 				     0x4c, 0x79, 0xc7, 0x14, 0x79, 0x2c, 0x1b,
 				     0x8a, 0xd0, 0x17, 0xb4, 0xb4, 0xfe, 0xa7,
@@ -2578,6 +2578,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf8, 0x07, 0x72, 0xe9, 0xa2, 0x89, 0x47,
 				     0x95, 0x8f, 0x8f, 0x4e, 0x45, 0x55, 0xd6,
-				     0x0e, 0xf4, 0xe7, 0xe8, 0x78, 0xdd, 0xc1,
-				     0x92 },
+				     0x0e, 0xf4, 0xe7, 0xe8, 0xc0, 0x48, 0x6a,
+				     0x7c },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -2606,5 +2606,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -2618,5 +2618,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xbf, 0x21, 0xc9,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xbf, 0x21, 0xc9,
 				     0x7d, 0x02, 0x8d, 0xf7, 0xf7, 0x80, 0x50,
 				     0x60, 0x32, 0x09, 0xb8, 0x69, 0x48, 0xab,
@@ -2627,6 +2627,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xee, 0x1c, 0xc3, 0x81, 0xb4, 0xb6, 0x09,
 				     0xb5, 0x3c, 0x85, 0xb9, 0xcc, 0x2d, 0x2e,
-				     0x9c, 0x85, 0x0b, 0xf7, 0xb1, 0x80, 0x30,
-				     0xa5 },
+				     0x9c, 0x85, 0x0b, 0xf7, 0x17, 0x28, 0x0f,
+				     0x7d },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -2655,5 +2655,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -2667,5 +2667,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x78, 0xee, 0x01,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x78, 0xee, 0x01,
 				     0x4c, 0x79, 0xc7, 0x14, 0x79, 0x2c, 0x1b,
 				     0x8a, 0xd0, 0x17, 0xb4, 0xb4, 0xfe, 0xa7,
@@ -2676,6 +2676,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf8, 0x07, 0x72, 0xe9, 0xa2, 0x89, 0x47,
 				     0x95, 0x8f, 0x8f, 0x4e, 0x45, 0x55, 0xd6,
-				     0x0e, 0xf4, 0xe7, 0xe8, 0x08, 0xa6, 0xdb,
-				     0x19 },
+				     0x0e, 0xf4, 0xe7, 0xe8, 0x8e, 0x76, 0x4a,
+				     0x4e },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -2704,5 +2704,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -2716,5 +2716,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xbf, 0x21, 0xc9,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xbf, 0x21, 0xc9,
 				     0x7d, 0x02, 0x8d, 0xf7, 0xf7, 0x80, 0x50,
 				     0x60, 0x32, 0x09, 0xb8, 0x69, 0x48, 0xab,
@@ -2725,6 +2725,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xee, 0x1c, 0xc3, 0x81, 0xb4, 0xb6, 0x09,
 				     0xb5, 0x3c, 0x85, 0xb9, 0xcc, 0x2d, 0x2e,
-				     0x9c, 0x85, 0x0b, 0xf7, 0x97, 0x5a, 0x56,
-				     0xab },
+				     0x9c, 0x85, 0x0b, 0xf7, 0xc1, 0x27, 0x82,
+				     0xc3 },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -2753,5 +2753,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -2765,5 +2765,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x78, 0xee, 0x01,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x78, 0xee, 0x01,
 				     0x4c, 0x79, 0xc7, 0x14, 0x79, 0x2c, 0x1b,
 				     0x8a, 0xd0, 0x17, 0xb4, 0xb4, 0xfe, 0xa7,
@@ -2774,6 +2774,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xf8, 0x07, 0x72, 0xe9, 0xa2, 0x89, 0x47,
 				     0x95, 0x8f, 0x8f, 0x4e, 0x45, 0x55, 0xd6,
-				     0x0e, 0xf4, 0xe7, 0xe8, 0x08, 0x68, 0xff,
-				     0x7c },
+				     0x0e, 0xf4, 0xe7, 0xe8, 0x97, 0x76, 0xce,
+				     0xac },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -2802,5 +2802,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -2814,5 +2814,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xbf, 0x21, 0xc9,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xbf, 0x21, 0xc9,
 				     0x7d, 0x02, 0x8d, 0xf7, 0xf7, 0x80, 0x50,
 				     0x60, 0x32, 0x09, 0xb8, 0x69, 0x48, 0xab,
@@ -2823,6 +2823,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xee, 0x1c, 0xc3, 0x81, 0xb4, 0xb6, 0x09,
 				     0xb5, 0x3c, 0x85, 0xb9, 0xcc, 0x2d, 0x2e,
-				     0x9c, 0x85, 0x0b, 0xf7, 0x41, 0xdd, 0x19,
-				     0x32 },
+				     0x9c, 0x85, 0x0b, 0xf7, 0x69, 0x56, 0x6f,
+				     0xaf },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -2949,5 +2949,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -2961,5 +2961,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x0c, 0xa8, 0x9d,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x0c, 0xa8, 0x9d,
 				     0x9e, 0xcc, 0xf0, 0x1a, 0xc0, 0xf2, 0x9f,
 				     0x8c, 0xc9, 0x57, 0xc7, 0x99, 0x4d, 0xde,
@@ -2970,6 +2970,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xd2, 0x6c, 0xcc, 0xa0, 0xb5, 0xf0, 0x95,
 				     0x3e, 0xf1, 0xf4, 0x3e, 0x43, 0x8f, 0x6c,
-				     0xae, 0x22, 0x59, 0x11, 0xf6, 0x97, 0x0b,
-				     0x7b },
+				     0xae, 0x22, 0x59, 0x11, 0x4e, 0x02, 0xa0,
+				     0x95 },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -2998,5 +2998,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -3010,5 +3010,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x5a, 0xa9, 0xb5,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x5a, 0xa9, 0xb5,
 				     0x61, 0x8b, 0x8a, 0xb7, 0x6a, 0x98, 0x30,
 				     0x6c, 0xed, 0x84, 0x69, 0xff, 0x6b, 0x7e,
@@ -3019,6 +3019,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xd6, 0x56, 0xa2, 0x3b, 0x5f, 0x56, 0x3a,
 				     0xa7, 0x6f, 0x4c, 0xc1, 0xca, 0xbd, 0x5f,
-				     0xad, 0x3d, 0x99, 0x4a, 0xa3, 0xab, 0xd5,
-				     0x7c },
+				     0xad, 0x3d, 0x99, 0x4a, 0x05, 0x03, 0xea,
+				     0xa4 },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -3047,5 +3047,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -3059,5 +3059,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x0c, 0xa8, 0x9d,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x0c, 0xa8, 0x9d,
 				     0x9e, 0xcc, 0xf0, 0x1a, 0xc0, 0xf2, 0x9f,
 				     0x8c, 0xc9, 0x57, 0xc7, 0x99, 0x4d, 0xde,
@@ -3068,6 +3068,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xd2, 0x6c, 0xcc, 0xa0, 0xb5, 0xf0, 0x95,
 				     0x3e, 0xf1, 0xf4, 0x3e, 0x43, 0x8f, 0x6c,
-				     0xae, 0x22, 0x59, 0x11, 0x86, 0xec, 0x11,
-				     0xf0 },
+				     0xae, 0x22, 0x59, 0x11, 0x00, 0x3c, 0x80,
+				     0xa7 },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -3096,5 +3096,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -3108,5 +3108,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x5a, 0xa9, 0xb5,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x5a, 0xa9, 0xb5,
 				     0x61, 0x8b, 0x8a, 0xb7, 0x6a, 0x98, 0x30,
 				     0x6c, 0xed, 0x84, 0x69, 0xff, 0x6b, 0x7e,
@@ -3117,6 +3117,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xd6, 0x56, 0xa2, 0x3b, 0x5f, 0x56, 0x3a,
 				     0xa7, 0x6f, 0x4c, 0xc1, 0xca, 0xbd, 0x5f,
-				     0xad, 0x3d, 0x99, 0x4a, 0x85, 0x71, 0xb3,
-				     0x72 },
+				     0xad, 0x3d, 0x99, 0x4a, 0xd3, 0x0c, 0x67,
+				     0x1a },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -3145,5 +3145,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -3157,5 +3157,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x0c, 0xa8, 0x9d,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x0c, 0xa8, 0x9d,
 				     0x9e, 0xcc, 0xf0, 0x1a, 0xc0, 0xf2, 0x9f,
 				     0x8c, 0xc9, 0x57, 0xc7, 0x99, 0x4d, 0xde,
@@ -3166,6 +3166,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xd2, 0x6c, 0xcc, 0xa0, 0xb5, 0xf0, 0x95,
 				     0x3e, 0xf1, 0xf4, 0x3e, 0x43, 0x8f, 0x6c,
-				     0xae, 0x22, 0x59, 0x11, 0x86, 0x22, 0x35,
-				     0x95 },
+				     0xae, 0x22, 0x59, 0x11, 0x19, 0x3c, 0x04,
+				     0x45 },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -3194,5 +3194,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -3206,5 +3206,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x5a, 0xa9, 0xb5,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x5a, 0xa9, 0xb5,
 				     0x61, 0x8b, 0x8a, 0xb7, 0x6a, 0x98, 0x30,
 				     0x6c, 0xed, 0x84, 0x69, 0xff, 0x6b, 0x7e,
@@ -3215,6 +3215,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0xd6, 0x56, 0xa2, 0x3b, 0x5f, 0x56, 0x3a,
 				     0xa7, 0x6f, 0x4c, 0xc1, 0xca, 0xbd, 0x5f,
-				     0xad, 0x3d, 0x99, 0x4a, 0x53, 0xf6, 0xfc,
-				     0xeb },
+				     0xad, 0x3d, 0x99, 0x4a, 0x7b, 0x7d, 0x8a,
+				     0x76 },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -3341,5 +3341,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -3353,5 +3353,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x9b, 0x9c, 0xde,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x9b, 0x9c, 0xde,
 				     0xa1, 0x69, 0x9b, 0x27, 0xd3, 0x38, 0x93,
 				     0xf2, 0x12, 0xb1, 0xc6, 0x60, 0xac, 0xb7,
@@ -3362,6 +3362,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x6e, 0x6d, 0x1b, 0x92, 0xd8, 0x42, 0x60,
 				     0x3e, 0x1f, 0xe0, 0x6c, 0x28, 0x89, 0xf7,
-				     0x0c, 0x61, 0x76, 0xdc, 0x25, 0x8a, 0x31,
-				     0xed },
+				     0x0c, 0x61, 0x76, 0xdc, 0x9d, 0x1f, 0x9a,
+				     0x03 },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -3390,5 +3390,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -3402,5 +3402,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x0c, 0xef, 0x82,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x0c, 0xef, 0x82,
 				     0x59, 0x6b, 0x6b, 0x61, 0xbe, 0x54, 0x23,
 				     0x7d, 0x29, 0x6d, 0xa7, 0xd2, 0xfa, 0x26,
@@ -3411,6 +3411,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x69, 0x9f, 0x4b, 0x72, 0x94, 0x8a, 0x25,
 				     0x69, 0x43, 0x28, 0xdc, 0x40, 0x60, 0x4f,
-				     0x6c, 0xed, 0x6a, 0x50, 0xf3, 0x5e, 0x90,
-				     0x42 },
+				     0x6c, 0xed, 0x6a, 0x50, 0x55, 0xf6, 0xaf,
+				     0x9a },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -3439,5 +3439,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -3451,5 +3451,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x9b, 0x9c, 0xde,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x9b, 0x9c, 0xde,
 				     0xa1, 0x69, 0x9b, 0x27, 0xd3, 0x38, 0x93,
 				     0xf2, 0x12, 0xb1, 0xc6, 0x60, 0xac, 0xb7,
@@ -3460,6 +3460,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x6e, 0x6d, 0x1b, 0x92, 0xd8, 0x42, 0x60,
 				     0x3e, 0x1f, 0xe0, 0x6c, 0x28, 0x89, 0xf7,
-				     0x0c, 0x61, 0x76, 0xdc, 0x55, 0xf1, 0x2b,
-				     0x66 },
+				     0x0c, 0x61, 0x76, 0xdc, 0xd3, 0x21, 0xba,
+				     0x31 },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -3488,5 +3488,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -3500,5 +3500,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x0c, 0xef, 0x82,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x0c, 0xef, 0x82,
 				     0x59, 0x6b, 0x6b, 0x61, 0xbe, 0x54, 0x23,
 				     0x7d, 0x29, 0x6d, 0xa7, 0xd2, 0xfa, 0x26,
@@ -3509,6 +3509,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x69, 0x9f, 0x4b, 0x72, 0x94, 0x8a, 0x25,
 				     0x69, 0x43, 0x28, 0xdc, 0x40, 0x60, 0x4f,
-				     0x6c, 0xed, 0x6a, 0x50, 0xd5, 0x84, 0xf6,
-				     0x4c },
+				     0x6c, 0xed, 0x6a, 0x50, 0x83, 0xf9, 0x22,
+				     0x24 },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -3537,5 +3537,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -3549,5 +3549,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x9b, 0x9c, 0xde,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x9b, 0x9c, 0xde,
 				     0xa1, 0x69, 0x9b, 0x27, 0xd3, 0x38, 0x93,
 				     0xf2, 0x12, 0xb1, 0xc6, 0x60, 0xac, 0xb7,
@@ -3558,6 +3558,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x6e, 0x6d, 0x1b, 0x92, 0xd8, 0x42, 0x60,
 				     0x3e, 0x1f, 0xe0, 0x6c, 0x28, 0x89, 0xf7,
-				     0x0c, 0x61, 0x76, 0xdc, 0x55, 0x3f, 0x0f,
-				     0x03 },
+				     0x0c, 0x61, 0x76, 0xdc, 0xca, 0x21, 0x3e,
+				     0xd3 },
 		.sn_size = 18,
 		.hfn = 0x1,
@@ -3586,5 +3586,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 					 0x31, 0x5f, 0x3a, 0x15 },
 		.data_in =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0xdb, 0x2d, 0x3f,
 				     0x23, 0x82, 0x53, 0xfd, 0x37, 0xde, 0x88,
 				     0x63, 0x08, 0x4f, 0xD3, 0x71, 0xfb, 0xeb,
@@ -3598,5 +3598,5 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 		.in_len = 67,
 		.data_out =
-			(uint8_t[]){ 0xf8, 0x00, 0x00, 0xf8, 0x0c, 0xef, 0x82,
+			(uint8_t[]){ 0x80, 0x00, 0x00, 0xf8, 0x0c, 0xef, 0x82,
 				     0x59, 0x6b, 0x6b, 0x61, 0xbe, 0x54, 0x23,
 				     0x7d, 0x29, 0x6d, 0xa7, 0xd2, 0xfa, 0x26,
@@ -3607,6 +3607,6 @@ static const struct pdcp_sdap_test list_pdcp_sdap_tests[] = {
 				     0x69, 0x9f, 0x4b, 0x72, 0x94, 0x8a, 0x25,
 				     0x69, 0x43, 0x28, 0xdc, 0x40, 0x60, 0x4f,
-				     0x6c, 0xed, 0x6a, 0x50, 0x03, 0x03, 0xb9,
-				     0xd5 },
+				     0x6c, 0xed, 0x6a, 0x50, 0x2b, 0x88, 0xcf,
+				     0x48 },
 		.sn_size = 18,
 		.hfn = 0x1,
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:11.095385655 +0100
+++ 0136-test-crypto-fix-PDCP-SDAP-test-vectors.patch	2023-07-20 16:17:55.218752783 +0100
@@ -1 +1 @@
-From 2c34aae94dd79be9ca81875c8b24ec3a1e897861 Mon Sep 17 00:00:00 2001
+From 1763e0cd4fb1ef06a3c3f1749f49a96e27752ef6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2c34aae94dd79be9ca81875c8b24ec3a1e897861 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org


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

* patch 'examples/fips_validation: fix digest length in AES-GCM' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (134 preceding siblings ...)
  2023-07-20 15:19 ` patch 'test/crypto: fix PDCP-SDAP test vectors' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'app/crypto-perf: fix socket ID default value' " Kevin Traynor
                   ` (3 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Samina Arshad; +Cc: Brian Dooley, Gowrishankar Muthukrishnan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/1532786fc5a2fe862d872e5d47ea6dd47c6f33b4

Thanks.

Kevin

---
From 1532786fc5a2fe862d872e5d47ea6dd47c6f33b4 Mon Sep 17 00:00:00 2001
From: Samina Arshad <samina.arshad@intel.com>
Date: Wed, 28 Jun 2023 14:38:36 +0000
Subject: [PATCH] examples/fips_validation: fix digest length in AES-GCM

[ upstream commit 94dfc563b620b2f04db7c59b6fdee458a9e1d481 ]

For AES GCM non JSON decrypt test cases the digest length
is being set incorrectly.The digest length is not being
cleared after test cases, causing an issue when running
tests individually without the --path-is-folder flag.
This fix adds the digest length correctly to the decrypt
cases and clears the digest length after each test file.

Fixes: 4aaad2995e13 ("examples/fips_validation: support GCM parsing")

Signed-off-by: Samina Arshad <samina.arshad@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 examples/fips_validation/main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index e8223206f2..a3d7aad7dd 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -714,5 +714,5 @@ prepare_aead_op(void)
 			return -ENOMEM;
 		}
-		env.digest_len = vec.cipher_auth.digest.len;
+		env.digest_len = vec.aead.digest.len;
 
 		sym->aead.data.length = vec.pt.len;
@@ -723,5 +723,5 @@ prepare_aead_op(void)
 		if (ret < 0)
 			return ret;
-
+		env.digest_len = vec.aead.digest.len;
 		sym->aead.data.length = vec.ct.len;
 		sym->aead.digest.data = vec.aead.digest.val;
@@ -1851,4 +1851,5 @@ error_one_case:
 		rte_free(env.digest);
 		env.digest = NULL;
+		env.digest_len = 0;
 	}
 	if (env.mbuf)
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:11.201391779 +0100
+++ 0137-examples-fips_validation-fix-digest-length-in-AES-GC.patch	2023-07-20 16:17:55.221752795 +0100
@@ -1 +1 @@
-From 94dfc563b620b2f04db7c59b6fdee458a9e1d481 Mon Sep 17 00:00:00 2001
+From 1532786fc5a2fe862d872e5d47ea6dd47c6f33b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 94dfc563b620b2f04db7c59b6fdee458a9e1d481 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 4237224d9d..6518c959c4 100644
+index e8223206f2..a3d7aad7dd 100644
@@ -27 +28 @@
-@@ -835,5 +835,5 @@ prepare_aead_op(void)
+@@ -714,5 +714,5 @@ prepare_aead_op(void)
@@ -34 +35 @@
-@@ -844,5 +844,5 @@ prepare_aead_op(void)
+@@ -723,5 +723,5 @@ prepare_aead_op(void)
@@ -41 +42 @@
-@@ -2619,4 +2619,5 @@ error_one_case:
+@@ -1851,4 +1851,5 @@ error_one_case:
@@ -46 +47 @@
- 	rte_pktmbuf_free(env.mbuf);
+ 	if (env.mbuf)


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

* patch 'app/crypto-perf: fix socket ID default value' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (135 preceding siblings ...)
  2023-07-20 15:19 ` patch 'examples/fips_validation: fix digest length in AES-GCM' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'examples/ipsec-secgw: fix TAP default MAC address' " Kevin Traynor
                   ` (2 subsequent siblings)
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Ciara Power; +Cc: Kai Ji, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/1ff3b5ffc33c86ef8926f7d608de244439d4234b

Thanks.

Kevin

---
From 1ff3b5ffc33c86ef8926f7d608de244439d4234b Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Thu, 6 Jul 2023 10:51:51 +0000
Subject: [PATCH] app/crypto-perf: fix socket ID default value

[ upstream commit a23b5064d9d01079f5578b83151e03b1f6baa844 ]

Due to recent changes to the default device socket ID,
before being used as an index for session mempool list,
the socket ID should be set to 0 if unknown (-1).

Fixes: 7dcd73e37965 ("drivers/bus: set device NUMA node to unknown by default")
Fixes: 64c469b9e7d8 ("app/crypto-perf: check range of socket id")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test-crypto-perf/main.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 6fdb92fb7c..db0ebd0050 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -238,9 +238,8 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs)
 
 		struct rte_cryptodev_info cdev_info;
-		uint8_t socket_id = rte_cryptodev_socket_id(cdev_id);
-		/* range check the socket_id - negative values become big
-		 * positive ones due to use of unsigned value
-		 */
-		if (socket_id >= RTE_MAX_NUMA_NODES)
+		int socket_id = rte_cryptodev_socket_id(cdev_id);
+
+		/* Use the first socket if SOCKET_ID_ANY is returned. */
+		if (socket_id == SOCKET_ID_ANY)
 			socket_id = 0;
 
@@ -702,5 +701,9 @@ main(int argc, char **argv)
 		cdev_id = enabled_cdevs[cdev_index];
 
-		uint8_t socket_id = rte_cryptodev_socket_id(cdev_id);
+		int socket_id = rte_cryptodev_socket_id(cdev_id);
+
+		/* Use the first socket if SOCKET_ID_ANY is returned. */
+		if (socket_id == SOCKET_ID_ANY)
+			socket_id = 0;
 
 		ctx[i] = cperf_testmap[opts.test].constructor(
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:11.289292173 +0100
+++ 0138-app-crypto-perf-fix-socket-ID-default-value.patch	2023-07-20 16:17:55.222752799 +0100
@@ -1 +1 @@
-From a23b5064d9d01079f5578b83151e03b1f6baa844 Mon Sep 17 00:00:00 2001
+From 1ff3b5ffc33c86ef8926f7d608de244439d4234b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a23b5064d9d01079f5578b83151e03b1f6baa844 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index af5bd0d23b..bc1f0f9659 100644
+index 6fdb92fb7c..db0ebd0050 100644
@@ -25 +26 @@
-@@ -194,9 +194,8 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs)
+@@ -238,9 +238,8 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs)
@@ -39 +40 @@
-@@ -651,5 +650,9 @@ main(int argc, char **argv)
+@@ -702,5 +701,9 @@ main(int argc, char **argv)


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

* patch 'examples/ipsec-secgw: fix TAP default MAC address' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (136 preceding siblings ...)
  2023-07-20 15:19 ` patch 'app/crypto-perf: fix socket ID default value' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'ipsec: fix NAT-T header length' " Kevin Traynor
  2023-07-20 15:19 ` patch 'kni: fix build with Linux 6.5' " Kevin Traynor
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/12bee308af871c915be1069f7660fee3f203b4aa

Thanks.

Kevin

---
From 12bee308af871c915be1069f7660fee3f203b4aa Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Wed, 28 Jun 2023 19:12:35 +0000
Subject: [PATCH] examples/ipsec-secgw: fix TAP default MAC address

[ upstream commit 2d7a5922aecadb9eee7de7f314a6dee36f3b1aa3 ]

Default TAP mac address was changed in below commit.
Hence, updated IPsec test script to reflect changes.

Fixes: c3006be2acab ("net/tap: set locally administered bit for fixed MAC address")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 examples/ipsec-secgw/test/common_defs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/test/common_defs.sh b/examples/ipsec-secgw/test/common_defs.sh
index 3ef06bc761..6e04ffc1a6 100644
--- a/examples/ipsec-secgw/test/common_defs.sh
+++ b/examples/ipsec-secgw/test/common_defs.sh
@@ -27,5 +27,5 @@ fi
 LOCAL_IFACE=dtap0
 
-LOCAL_MAC="00:64:74:61:70:30"
+LOCAL_MAC="02:64:74:61:70:30"
 
 REMOTE_IPV4=192.168.31.14
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:11.366351776 +0100
+++ 0139-examples-ipsec-secgw-fix-TAP-default-MAC-address.patch	2023-07-20 16:17:55.223752803 +0100
@@ -1 +1 @@
-From 2d7a5922aecadb9eee7de7f314a6dee36f3b1aa3 Mon Sep 17 00:00:00 2001
+From 12bee308af871c915be1069f7660fee3f203b4aa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d7a5922aecadb9eee7de7f314a6dee36f3b1aa3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* patch 'ipsec: fix NAT-T header length' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (137 preceding siblings ...)
  2023-07-20 15:19 ` patch 'examples/ipsec-secgw: fix TAP default MAC address' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  2023-07-20 15:19 ` patch 'kni: fix build with Linux 6.5' " Kevin Traynor
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Xiao Liang; +Cc: Konstantin Ananyev, Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/aabb9693644d0e25ff6dabb3ae656bd53ddf1fcf

Thanks.

Kevin

---
From aabb9693644d0e25ff6dabb3ae656bd53ddf1fcf Mon Sep 17 00:00:00 2001
From: Xiao Liang <shaw.leon@gmail.com>
Date: Tue, 11 Jul 2023 10:18:47 +0800
Subject: [PATCH] ipsec: fix NAT-T header length

[ upstream commit 5d89d22e9e49771059ecc6383aa4313394fc72f7 ]

UDP header and L2 header (if any) length is included in sa->hdr_len.
Take care of that in L3 header and packet length calculation.

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

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
 lib/ipsec/esp_outb.c | 2 +-
 lib/ipsec/sa.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ipsec/esp_outb.c b/lib/ipsec/esp_outb.c
index 1b0eeed07f..969eff5a6b 100644
--- a/lib/ipsec/esp_outb.c
+++ b/lib/ipsec/esp_outb.c
@@ -200,5 +200,5 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
 			(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);
+				sa->hdr_len + sizeof(struct rte_udp_hdr));
 	}
 
diff --git a/lib/ipsec/sa.c b/lib/ipsec/sa.c
index c921699390..ccf40f0371 100644
--- a/lib/ipsec/sa.c
+++ b/lib/ipsec/sa.c
@@ -375,5 +375,5 @@ esp_outb_tun_init(struct rte_ipsec_sa *sa, const struct rte_ipsec_sa_prm *prm)
 	/* update l2_len and l3_len fields for outbound mbuf */
 	sa->tx_offload.val = rte_mbuf_tx_offload(sa->hdr_l3_off,
-		sa->hdr_len - sa->hdr_l3_off, 0, 0, 0, 0, 0);
+		prm->tun.hdr_len - sa->hdr_l3_off, 0, 0, 0, 0, 0);
 
 	esp_outb_init(sa, sa->hdr_len, prm->ipsec_xform.esn.value);
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:11.451583888 +0100
+++ 0140-ipsec-fix-NAT-T-header-length.patch	2023-07-20 16:17:55.226752815 +0100
@@ -1 +1 @@
-From 5d89d22e9e49771059ecc6383aa4313394fc72f7 Mon Sep 17 00:00:00 2001
+From aabb9693644d0e25ff6dabb3ae656bd53ddf1fcf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5d89d22e9e49771059ecc6383aa4313394fc72f7 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 9cbd9202f6..ec87b1dce2 100644
+index 1b0eeed07f..969eff5a6b 100644
@@ -24 +25 @@
-@@ -199,5 +199,5 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
+@@ -200,5 +200,5 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
@@ -32 +33 @@
-index 59a547637d..2297bd6d72 100644
+index c921699390..ccf40f0371 100644
@@ -35 +36 @@
-@@ -372,5 +372,5 @@ esp_outb_tun_init(struct rte_ipsec_sa *sa, const struct rte_ipsec_sa_prm *prm)
+@@ -375,5 +375,5 @@ esp_outb_tun_init(struct rte_ipsec_sa *sa, const struct rte_ipsec_sa_prm *prm)


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

* patch 'kni: fix build with Linux 6.5' has been queued to stable release 21.11.5
  2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
                   ` (138 preceding siblings ...)
  2023-07-20 15:19 ` patch 'ipsec: fix NAT-T header length' " Kevin Traynor
@ 2023-07-20 15:19 ` Kevin Traynor
  139 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-20 15:19 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/a70ea21c2eaed45e16fcede756502533e6620166

Thanks.

Kevin

---
From a70ea21c2eaed45e16fcede756502533e6620166 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Tue, 11 Jul 2023 11:09:41 +0100
Subject: [PATCH] kni: fix build with Linux 6.5

[ upstream commit dd33d53b9a032d7376aa04a28a1235338e1fd78f ]

The get_user_pages_remote() API has been modified in Linux kernel v6.5
[1], "struct vm_area_struct **vmas" parameter removed from the API.

To fix KNI build with Linux kernel v6.5, version check added around the
get_user_pages_remote() API.

[1]
ca5e863233e8 ("mm/gup: remove vmas parameter from get_user_pages_remote()")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 kernel/linux/kni/compat.h  | 4 ++++
 kernel/linux/kni/kni_dev.h | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 7aa6cd9fca..8beb670465 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -152,2 +152,6 @@
 #define HAVE_NETIF_RX_NI
 #endif
+
+#if KERNEL_VERSION(6, 5, 0) > LINUX_VERSION_CODE
+#define HAVE_VMA_IN_GUP
+#endif
diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h
index 6e64380d06..417c67b5ae 100644
--- a/kernel/linux/kni/kni_dev.h
+++ b/kernel/linux/kni/kni_dev.h
@@ -108,5 +108,9 @@ static inline phys_addr_t iova_to_phys(struct task_struct *tsk,
 	ret = get_user_pages_remote(tsk, tsk->mm, iova, 1, 0, &page, NULL, NULL);
 #else
+  #ifdef HAVE_VMA_IN_GUP
 	ret = get_user_pages_remote(tsk->mm, iova, 1, 0, &page, NULL, NULL);
+  #else
+	ret = get_user_pages_remote(tsk->mm, iova, 1, 0, &page, NULL);
+  #endif
 #endif
 	if (ret < 0)
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:11.557325864 +0100
+++ 0141-kni-fix-build-with-Linux-6.5.patch	2023-07-20 16:17:55.227752819 +0100
@@ -1 +1 @@
-From dd33d53b9a032d7376aa04a28a1235338e1fd78f Mon Sep 17 00:00:00 2001
+From a70ea21c2eaed45e16fcede756502533e6620166 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dd33d53b9a032d7376aa04a28a1235338e1fd78f ]
+
@@ -15,2 +16,0 @@
-Cc: stable@dpdk.org
-
@@ -35 +35 @@
-index 21bfb6890e..975379825b 100644
+index 6e64380d06..417c67b5ae 100644


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

* RE: patch 'app/testpmd: fix primary process not polling all queues' has been queued to stable release 21.11.5
  2023-07-20 15:18 ` patch 'app/testpmd: fix primary process not polling all queues' " Kevin Traynor
@ 2023-07-24  1:58   ` haijie
  2023-07-24 13:22     ` Kevin Traynor
  0 siblings, 1 reply; 144+ messages in thread
From: haijie @ 2023-07-24  1:58 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Ferruh Yigit, dpdk stable

Hi, Kevin Traynor,

Please drop this patch for it has been reverted and deferred to submit.

Thanks, 
Jie Hai


-----Original Message-----
From: Kevin Traynor [mailto:ktraynor@redhat.com] 
Sent: Thursday, July 20, 2023 11:19 PM
To: haijie <haijie1@huawei.com>
Cc: Ferruh Yigit <ferruh.yigit@amd.com>; dpdk stable <stable@dpdk.org>
Subject: patch 'app/testpmd: fix primary process not polling all queues' has been queued to stable release 21.11.5

Hi,

FYI, your patch has been queued to stable release 21.11.5

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing
(ie: 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/f7a4bf2feece51aa5a53db7759b7edd94d4fb76a

Thanks.

Kevin

---
From f7a4bf2feece51aa5a53db7759b7edd94d4fb76a Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Fri, 9 Jun 2023 17:03:40 +0800
Subject: [PATCH] app/testpmd: fix primary process not polling all queues

[ upstream commit 141a520b35f789f37dc06557bc724bf7f0e0a52d ]

Here's how the problem arises.
step1: Start the app.
    dpdk-testpmd -a 0000:35:00.0 -l 0-3 -- -i --rxq=10 --txq=10

step2: Perform the following steps and send traffic. As expected, queue 7 does not send or receive packets, and other queues do.
    port 0 rxq 7 stop
    port 0 txq 7 stop
    set fwd mac
    start

step3: Perform the following steps and send traffic. All queues are expected to send and receive packets normally, but that's not the case for queue 7.
    stop
    port stop all
    port start all
    start
    show port xstats all

In fact, only the value of rx_q7_packets for queue 7 is not zero, which means queue 7 is enabled for the driver but is not involved in packet receiving and forwarding by software. If we check queue state by command 'show rxq info 0 7' and 'show txq info 0 7', we see queue 7 is started as other queues are.
    Rx queue state: started
    Tx queue state: started
The queue 7 is started but cannot forward. That's the problem.

We know that each stream has a read-only "disabled" field that control if this stream should be used to forward. This field depends on testpmd local queue state, please see commit 3c4426db54fc ("app/testpmd: do not poll stopped queues").
DPDK framework maintains ethdev queue state that drivers reported, which indicates the real state of queues.

There are commands that update these two kind queue state such as 'port X rxq|txq start|stop'. But these operations take effect only in one stop-start round. In the following stop-start round, the preceding operations do not take effect anymore. However, only the ethdev queue state is updated, causing the testpmd and ethdev state information to diverge and causing unexpected side effects as above problem.

There was a similar problem for the secondary process, please see commit 5028f207a4fa ("app/testpmd: fix secondary process packet forwarding").

This patch applies its workaround with some difference to the primary process. Not all PMDs implement rte_eth_rx_queue_info_get and rte_eth_tx_queue_info_get, however they may support deferred_start with primary process. To not break their behavior, retain the original testpmd local queue state for those PMDs.

Fixes: 3c4426db54fc ("app/testpmd: do not poll stopped queues")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/testpmd.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 9f4a0e0a78..dbf6fd1fca 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2376,4 +2376,11 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
 			rx_qinfo.queue_state;
 	} else if (rc == -ENOTSUP) {
+		/*
+		 * Do not change the rxq state for primary process
+		 * to ensure that the PMDs do not implement
+		 * rte_eth_rx_queue_info_get can forward as before.
+		 */
+		if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+			return;
 		/*
 		 * Set the rxq state to RTE_ETH_QUEUE_STATE_STARTED @@ -2401,4 +2408,11 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
 			tx_qinfo.queue_state;
 	} else if (rc == -ENOTSUP) {
+		/*
+		 * Do not change the txq state for primary process
+		 * to ensure that the PMDs do not implement
+		 * rte_eth_tx_queue_info_get can forward as before.
+		 */
+		if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+			return;
 		/*
 		 * Set the txq state to RTE_ETH_QUEUE_STATE_STARTED @@ -2468,6 +2482,5 @@ start_packet_forwarding(int with_tx_first)
 
 	if (stream_init != NULL) {
-		if (rte_eal_process_type() == RTE_PROC_SECONDARY)
-			update_queue_state();
+		update_queue_state();
 		for (i = 0; i < cur_fwd_config.nb_fwd_streams; i++)
 			stream_init(fwd_streams[i]);
@@ -3127,6 +3140,5 @@ start_port(portid_t pid)
 	}
 
-	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
-		update_queue_state();
+	update_queue_state();
 
 	if (at_least_one_port_successfully_started && !no_link_check)
--
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:06.547994881 +0100
+++ 0095-app-testpmd-fix-primary-process-not-polling-all-queu.patch	2023-07-20 16:17:55.023751986 +0100
@@ -1 +1 @@
-From 141a520b35f789f37dc06557bc724bf7f0e0a52d Mon Sep 17 00:00:00 2001
+From f7a4bf2feece51aa5a53db7759b7edd94d4fb76a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 141a520b35f789f37dc06557bc724bf7f0e0a52d ]
+
@@ -61 +62,0 @@
-Cc: stable@dpdk.org
@@ -70 +71 @@
-index c6ad9b18bf..1fc70650e0 100644
+index 9f4a0e0a78..dbf6fd1fca 100644
@@ -73 +74 @@
-@@ -2425,4 +2425,11 @@ update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
+@@ -2376,4 +2376,11 @@ update_rx_queue_state(uint16_t port_id, uint16_t 
+queue_id)
@@ -85 +86 @@
-@@ -2450,4 +2457,11 @@ update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
+@@ -2401,4 +2408,11 @@ update_tx_queue_state(uint16_t port_id, uint16_t 
+queue_id)
@@ -97 +98 @@
-@@ -2517,6 +2531,5 @@ start_packet_forwarding(int with_tx_first)
+@@ -2468,6 +2482,5 @@ start_packet_forwarding(int with_tx_first)
@@ -105 +106 @@
-@@ -3281,6 +3294,5 @@ start_port(portid_t pid)
+@@ -3127,6 +3140,5 @@ start_port(portid_t pid)


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

* Re: patch 'app/testpmd: fix primary process not polling all queues' has been queued to stable release 21.11.5
  2023-07-24  1:58   ` haijie
@ 2023-07-24 13:22     ` Kevin Traynor
  0 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-24 13:22 UTC (permalink / raw)
  To: haijie; +Cc: Ferruh Yigit, dpdk stable

On 24/07/2023 02:58, haijie wrote:
> Hi, Kevin Traynor,
> 
> Please drop this patch for it has been reverted and deferred to submit.
> 
> Thanks,
> Jie Hai

Thanks for the update. I have dropped from 21.11 queue.


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

* Re: patch 'app/testpmd: revert primary process polling all queues fix' has been queued to stable release 21.11.5
  2023-07-20 15:19 ` patch 'app/testpmd: revert primary process polling all queues fix' " Kevin Traynor
@ 2023-07-25  8:53   ` Kevin Traynor
  0 siblings, 0 replies; 144+ messages in thread
From: Kevin Traynor @ 2023-07-25  8:53 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Song Jiale, Ali Alnubani, dpdk stable

On 20/07/2023 16:19, Kevin Traynor wrote:
> Hi,
> 
> FYI, your patch has been queued to stable release 21.11.5
> 
> Note it hasn't been pushed tohttp://dpdk.org/browse/dpdk-stable  yet.
> It will be pushed if I get no objections before 07/25/23. So please
> shout if anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: 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/931f667a996370dec053902903eddd2a794b778a
> 
> Thanks.
> 
> Kevin
> 
> ---
>  From 931f667a996370dec053902903eddd2a794b778a Mon Sep 17 00:00:00 2001
> From: Ferruh Yigit<ferruh.yigit@amd.com>
> Date: Wed, 5 Jul 2023 15:32:06 +0100
> Subject: [PATCH] app/testpmd: revert primary process polling all queues fix
> 
> [ upstream commit d7d802daf80f4a03c77a815da6d47a7b3657ef2c ]
> 
> For some drivers [1], testpmd forwarding is broken with commit [2].
> 
> This is because with [2] testpmd gets queue state from ethdev and
> forwarding is done only on queues in started state, but some drivers
> don't update queue status properly, and this breaks forwarding for those
> drivers.
> 
> Drivers should be fixed but more time is required to verify drivers
> again, instead reverting [2] for now to not break drivers.
> Target is to merge [2] back at the beginning of next release cycle and
> fix drivers accordingly.
> 
> [1]
> Bugzilla ID: 1259
> 
> [2]
> Fixes: 141a520b35f7 ("app/testpmd: fix primary process not polling all queues")
> 
> Signed-off-by: Ferruh Yigit<ferruh.yigit@amd.com>
> Tested-by: Song Jiale<songx.jiale@intel.com>
> Tested-by: Ali Alnubani<alialnu@nvidia.com>

Won't need this for 21.11 as dropped the offending patch before it was 
pushed to dpdk.org. Thanks.


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

end of thread, other threads:[~2023-07-25  8:53 UTC | newest]

Thread overview: 144+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' has been queued to stable release 21.11.5 Kevin Traynor
2023-07-20 15:17 ` patch 'examples/ip_pipeline: fix build with GCC 13' " Kevin Traynor
2023-07-20 15:17 ` patch 'examples/ntb: " Kevin Traynor
2023-07-20 15:17 ` patch 'ring: fix use after free' " Kevin Traynor
2023-07-20 15:17 ` patch 'vfio: fix include with musl runtime' " Kevin Traynor
2023-07-20 15:17 ` patch 'kernel/freebsd: fix function parameter list' " Kevin Traynor
2023-07-20 15:17 ` patch 'build: fix case of project language name' " Kevin Traynor
2023-07-20 15:17 ` patch 'telemetry: fix autotest on Alpine' " Kevin Traynor
2023-07-20 15:17 ` patch 'ring: fix dequeue parameter name' " Kevin Traynor
2023-07-20 15:17 ` patch 'pipeline: fix double free for table stats' " Kevin Traynor
2023-07-20 15:17 ` patch 'test/malloc: fix missing free' " Kevin Traynor
2023-07-20 15:17 ` patch 'test/malloc: fix statistics checks' " Kevin Traynor
2023-07-20 15:17 ` patch 'eal: avoid calling cleanup twice' " Kevin Traynor
2023-07-20 15:17 ` patch 'pci: fix comment referencing renamed function' " Kevin Traynor
2023-07-20 15:17 ` patch 'eventdev/timer: fix timeout event wait behavior' " Kevin Traynor
2023-07-20 15:17 ` patch 'doc: fix event timer adapter guide' " Kevin Traynor
2023-07-20 15:17 ` patch 'event/dsw: free rings on close' " Kevin Traynor
2023-07-20 15:17 ` patch 'eventdev/timer: fix buffer flush' " Kevin Traynor
2023-07-20 15:17 ` patch 'event/cnxk: fix nanoseconds to ticks conversion' " Kevin Traynor
2023-07-20 15:17 ` patch 'eal/linux: fix secondary process crash for mp hotplug' " Kevin Traynor
2023-07-20 15:17 ` patch 'eal/linux: fix legacy mem init with many segments' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix build warning' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/sfc: stop misuse of Rx ingress m-port metadata on EF100' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/tap: set locally administered bit for fixed MAC address' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/dpaa2: fix checksum good flags' " Kevin Traynor
2023-07-20 15:17 ` patch 'app/testpmd: fix GTP L2 length in checksum engine' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/vmxnet3: fix drop of empty segments in Tx' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/txgbe: fix use-after-free on remove' " Kevin Traynor
2023-07-20 15:17 ` patch 'ethdev: fix MAC address occupies two entries' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/sfc: invalidate dangling MAE flow action FW resource IDs' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix never set MAC flow control' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix variable type mismatch' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix Rx multiple firmware reset interrupts' " Kevin Traynor
2023-07-20 15:17 ` patch 'ethdev: fix indirect action conversion' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix FEC mode for 200G ports' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix FEC mode check' " Kevin Traynor
2023-07-20 15:17 ` patch 'doc: fix format in flow API guide' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix RTC time on initialization' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix RTC time after reset' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: uninitialize PTP' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: extract PTP to its own header file' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix mbuf leakage when RxQ started during reset' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix mbuf leakage when RxQ started after " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix device start return value' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix uninitialized variable' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix inaccurate log' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix redundant line break in " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix IMP reset trigger' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/vmxnet3: fix return code in initializing' " Kevin Traynor
2023-07-20 15:18 ` patch 'doc: fix auth algos in cryptoperf app' " Kevin Traynor
2023-07-20 15:18 ` patch 'crypto/scheduler: fix last element for valid args' " Kevin Traynor
2023-07-20 15:18 ` patch 'test/crypto: fix return value for SNOW3G' " Kevin Traynor
2023-07-20 15:18 ` patch 'test/crypto: fix session creation check' " Kevin Traynor
2023-07-20 15:18 ` patch 'crypto/ipsec_mb: fix enqueue counter for SNOW3G' " Kevin Traynor
2023-07-20 15:18 ` patch 'crypto/ipsec_mb: optimize allocation in session' " Kevin Traynor
2023-07-20 15:18 ` patch 'vhost: fix invalid call FD handling' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/virtio: propagate interrupt configuration error values' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/virtio: fix initialization to return negative errno' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/mlx5: enhance error log for tunnel offloading' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/mlx5: fix duplicated tag index matching in SWS' " Kevin Traynor
2023-07-20 15:18 ` patch 'common/cnxk: fix IPsec IPv6 tunnel address byte swap' " Kevin Traynor
2023-07-20 15:18 ` patch 'common/cnxk: fix inline device VF identification' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/qede: fix RSS indirection table initialization' " Kevin Traynor
2023-07-20 15:18 ` patch 'doc: fix typo in cnxk platform guide' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/i40e: fix Rx data buffer size' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: " Kevin Traynor
2023-07-20 15:18 ` patch 'net/iavf: " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: fix statistics' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: fix DCF RSS initialization' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/iavf: release large VF when closing device' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: fix DCF control thread crash' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice/base: remove unreachable code' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: adjust timestamp mbuf register' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: fix timestamp enabling' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: initialize parser for double VLAN' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: fix outer UDP checksum offload' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/virtio-user: fix leak when initialisation fails' " Kevin Traynor
2023-07-20 15:18 ` patch 'doc: fix typo in graph guide' " Kevin Traynor
2023-07-20 15:18 ` patch 'doc: remove warning with Doxygen 1.9.7' " Kevin Traynor
2023-07-20 15:18 ` patch 'examples/l2fwd-cat: fix external build' " Kevin Traynor
2023-07-20 15:18 ` patch 'test: add graph tests' " Kevin Traynor
2023-07-20 15:18 ` patch 'mbuf: fix Doxygen comment of distributor metadata' " Kevin Traynor
2023-07-20 15:18 ` patch 'ci: fix libabigail cache in GHA' " Kevin Traynor
2023-07-20 15:18 ` patch 'crypto/openssl: skip workaround at compilation time' " Kevin Traynor
2023-07-20 15:18 ` patch 'ethdev: update documentation for API to set FEC' " Kevin Traynor
2023-07-20 15:18 ` patch 'ethdev: check that at least one FEC mode is specified' " Kevin Traynor
2023-07-20 15:18 ` patch 'ethdev: update documentation for API to get FEC' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/bonding: fix startup when NUMA is not supported' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/bonding: fix destroy dedicated queues flow' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/txgbe/base: fix Tx with fiber hotplug' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/txgbe: fix interrupt enable mask' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/txgbe: fix to set autoneg for 1G speed' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/txgbe: fix extended statistics' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ngbe: " Kevin Traynor
2023-07-20 15:18 ` patch 'app/testpmd: fix primary process not polling all queues' " Kevin Traynor
2023-07-24  1:58   ` haijie
2023-07-24 13:22     ` Kevin Traynor
2023-07-20 15:18 ` patch 'net/nfp: fix address always related with PF ID 0' " Kevin Traynor
2023-07-20 15:18 ` patch 'common/sfc_efx/base: fix Rx queue without RSS hash prefix' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/iavf: fix VLAN offload with AVX512' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: fix tunnel packet Tx descriptor' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ixgbe: add proper memory barriers in Rx' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/iavf: fix abnormal disable HW interrupt' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/i40e: fix tunnel packet Tx descriptor' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/e1000: fix queue number initialization' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: fix protocol agnostic offloading with big packets' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/mlx5: fix risk in NEON Rx descriptor read' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/mlx5: fix device removal event handling' " Kevin Traynor
2023-07-20 15:18 ` patch 'common/mlx5: adjust fork call with new kernel API' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/cnxk: flush SQ before configuring MTU' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/cnxk: fix cookies check with security offload' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/cnxk: fix flow queue index validation' " Kevin Traynor
2023-07-20 15:19 ` patch 'ipc: fix file descriptor leakage with unhandled messages' " Kevin Traynor
2023-07-20 15:19 ` patch 'fib: fix adding default route' " Kevin Traynor
2023-07-20 15:19 ` patch 'mem: fix memsegs exhausted message' " Kevin Traynor
2023-07-20 15:19 ` patch 'hash: fix reading unaligned bits in Toeplitz hash' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/netvsc: fix sizeof calculation' " Kevin Traynor
2023-07-20 15:19 ` patch 'app/testpmd: fix checksum engine with GTP on 32-bit' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/hns3: delete duplicate macro definition' " Kevin Traynor
2023-07-20 15:19 ` patch 'doc: fix kernel patch link in hns3 guide' " Kevin Traynor
2023-07-20 15:19 ` patch 'doc: fix syntax " Kevin Traynor
2023-07-20 15:19 ` patch 'doc: fix number of leading spaces " Kevin Traynor
2023-07-20 15:19 ` patch 'app/testpmd: revert primary process polling all queues fix' " Kevin Traynor
2023-07-25  8:53   ` Kevin Traynor
2023-07-20 15:19 ` patch 'net/hns3: fix non-zero weight for disabled TC' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/hns3: fix index to look up table in NEON Rx' " Kevin Traynor
2023-07-20 15:19 ` patch 'ethdev: fix potential leak in PCI probing helper' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/mlx5: fix flow dump for modify field' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/mlx5: fix flow workspace destruction' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/mlx5: forbid MPRQ restart' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/ice: fix VLAN mode parser' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/iavf: fix VLAN insertion in vector path' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/ice: fix 32-bit build' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/iavf: fix tunnel TSO path selection' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/ice: fix RSS hash key generation' " Kevin Traynor
2023-07-20 15:19 ` patch 'baseband/fpga_5gnr_fec: fix possible division by zero' " Kevin Traynor
2023-07-20 15:19 ` patch 'baseband/fpga_5gnr_fec: fix starting unconfigured queue' " Kevin Traynor
2023-07-20 15:19 ` patch 'common/qat: detach crypto from compress build' " Kevin Traynor
2023-07-20 15:19 ` patch 'test/crypto: fix PDCP-SDAP test vectors' " Kevin Traynor
2023-07-20 15:19 ` patch 'examples/fips_validation: fix digest length in AES-GCM' " Kevin Traynor
2023-07-20 15:19 ` patch 'app/crypto-perf: fix socket ID default value' " Kevin Traynor
2023-07-20 15:19 ` patch 'examples/ipsec-secgw: fix TAP default MAC address' " Kevin Traynor
2023-07-20 15:19 ` patch 'ipsec: fix NAT-T header length' " Kevin Traynor
2023-07-20 15:19 ` patch 'kni: fix build with Linux 6.5' " 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).