patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7
@ 2024-10-23 21:15 luca.boccassi
  2024-10-23 21:15 ` patch 'eal/x86: fix 32-bit write combining store' " luca.boccassi
                   ` (77 more replies)
  0 siblings, 78 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: David Marchand; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 8a32360685418604a641b1a6c4c281b7a39250aa Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 5 Sep 2024 15:29:09 +0200
Subject: [PATCH] devtools: fix forbidden token check with multiple files

[ upstream commit 84cf9b71fc2d6baf1869ef213daee7ec9f8880bc ]

If a patch contains multiple files, it is possible to pass through the
check because the count of token mentions is not reset between file
evaluation.

Example with a fake patch:

  $ cat toto.patch
  --- a/drivers/plop1
  +++ b/drivers/plop1
  - RTE_LOG(
  - RTE_LOG(
  + RTE_LOG(
  --- a/drivers/plop2
  +++ b/drivers/plop2
  + RTE_LOG(

  $ awk -v FOLDERS='drivers' -v EXPRESSIONS='RTE_LOG\\('
    -v MESSAGE='Prefer RTE_LOG_LINE'
    -f devtools/check-forbidden-tokens.awk toto.patch

Besides, the expressions[] array is not used since commit
b467d38284b1 ("devtools: add explicit warnings for forbidden tokens").

Fixes: 42f4d724ec27 ("devtools: move awk script ckecking forbidden tokens")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 devtools/check-forbidden-tokens.awk | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk
index 026844141c..2419d3565a 100755
--- a/devtools/check-forbidden-tokens.awk
+++ b/devtools/check-forbidden-tokens.awk
@@ -32,14 +32,11 @@ BEGIN {
 		for (i in deny_expr) {
 			forbidden_added = "^\\+.*" deny_expr[i];
 			forbidden_removed="^-.*" deny_expr[i];
-			current = expressions[deny_expr[i]]
 			if ($0 ~ forbidden_added) {
-				count = count + 1;
-				expressions[deny_expr[i]] = current + 1
+				count = count + 1
 			}
 			if ($0 ~ forbidden_removed) {
-				count = count - 1;
-				expressions[deny_expr[i]] = current - 1
+				count = count - 1
 			}
 		}
 	}
@@ -49,12 +46,13 @@ BEGIN {
 	}
 }
 # switch to next file , check if the balance of add/remove
-# of previous filehad new additions
+# of previous file had new additions
 ($0 ~ "^\\+\\+\\+ b/") {
 	in_file = 0;
 	if (count > 0) {
 		exit;
 	}
+	count = 0
 	for (i in deny_folders) {
 		re = "^\\+\\+\\+ b/" deny_folders[i];
 		if ($0 ~ re) {
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:40.603038409 +0100
+++ 0001-devtools-fix-forbidden-token-check-with-multiple-fil.patch	2024-10-23 22:16:40.427939940 +0100
@@ -1 +1 @@
-From 84cf9b71fc2d6baf1869ef213daee7ec9f8880bc Mon Sep 17 00:00:00 2001
+From 8a32360685418604a641b1a6c4c281b7a39250aa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 84cf9b71fc2d6baf1869ef213daee7ec9f8880bc ]
+
@@ -38 +40 @@
-index 90d3a64f8e..8d64e99570 100755
+index 026844141c..2419d3565a 100755

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

* patch 'eal/x86: fix 32-bit write combining store' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'examples/eventdev: fix queue crash with generic pipeline' " luca.boccassi
                   ` (76 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Radu Nicolau, Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From fdda4a8d41b8c0636498a37d82dd41c4d822cded Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 6 Sep 2024 14:27:57 +0100
Subject: [PATCH] eal/x86: fix 32-bit write combining store

[ upstream commit 41b09d64e35b877e8f29c4e5a8cf944e303695dd ]

The "movdiri" instruction is given as a series of bytes in rte_io.h so
that it works on compilers/assemblers which are unaware of the
instruction.
The REX prefix (0x40) on this instruction is invalid for 32-bit code,
causing issues.
Thankfully, the prefix is unnecessary in 64-bit code, since the data size
used is 32-bits.

Fixes: 8a00dfc738fe ("eal: add write combining store")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/eal/x86/include/rte_io.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/x86/include/rte_io.h b/lib/eal/x86/include/rte_io.h
index 0e1fefdee1..5366e09c47 100644
--- a/lib/eal/x86/include/rte_io.h
+++ b/lib/eal/x86/include/rte_io.h
@@ -24,7 +24,7 @@ __rte_x86_movdiri(uint32_t value, volatile void *addr)
 {
 	asm volatile(
 		/* MOVDIRI */
-		".byte 0x40, 0x0f, 0x38, 0xf9, 0x02"
+		".byte 0x0f, 0x38, 0xf9, 0x02"
 		:
 		: "a" (value), "d" (addr));
 }
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:40.640485572 +0100
+++ 0002-eal-x86-fix-32-bit-write-combining-store.patch	2024-10-23 22:16:40.427939940 +0100
@@ -1 +1 @@
-From 41b09d64e35b877e8f29c4e5a8cf944e303695dd Mon Sep 17 00:00:00 2001
+From fdda4a8d41b8c0636498a37d82dd41c4d822cded Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 41b09d64e35b877e8f29c4e5a8cf944e303695dd ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* patch 'examples/eventdev: fix queue crash with generic pipeline' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
  2024-10-23 21:15 ` patch 'eal/x86: fix 32-bit write combining store' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'crypto/dpaa2_sec: fix memory leak' " luca.boccassi
                   ` (75 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Chenxingyu Wang, Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/44c20cfd7a3bd8e2a93ef7c772cd7afdda5433bd

Thanks.

Luca Boccassi

---
From 44c20cfd7a3bd8e2a93ef7c772cd7afdda5433bd Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 18 Sep 2024 06:41:42 +0000
Subject: [PATCH] examples/eventdev: fix queue crash with generic pipeline

[ upstream commit f6f2307931c90d924405ea44b0b4be9d3d01bd17 ]

There was a segmentation fault when executing eventdev_pipeline with
command [1] with ConnectX-5 NIC card:

0x000000000079208c in rte_eth_tx_buffer (tx_pkt=0x16f8ed300, buffer=0x100,
                   queue_id=11, port_id=0) at
                   ../lib/ethdev/rte_ethdev.h:6636
txa_service_tx (txa=0x17b19d080, ev=0xffffffffe500, n=4) at
                   ../lib/eventdev/rte_event_eth_tx_adapter.c:631
0x0000000000792234 in txa_service_func (args=0x17b19d080) at
                   ../lib/eventdev/rte_event_eth_tx_adapter.c:666
0x00000000008b0784 in service_runner_do_callback (s=0x17fffe100,
                   cs=0x17ffb5f80, service_idx=2) at
                   ../lib/eal/common/rte_service.c:405
0x00000000008b0ad8 in service_run (i=2, cs=0x17ffb5f80,
                   service_mask=18446744073709551615, s=0x17fffe100,
                   serialize_mt_unsafe=0) at
                   ../lib/eal/common/rte_service.c:441
0x00000000008b0c68 in rte_service_run_iter_on_app_lcore (id=2,
                   serialize_mt_unsafe=0) at
                   ../lib/eal/common/rte_service.c:477
0x000000000057bcc4 in schedule_devices (lcore_id=0) at
                   ../examples/eventdev_pipeline/pipeline_common.h:138
0x000000000057ca94 in worker_generic_burst (arg=0x17b131e80) at
                   ../examples/eventdev_pipeline/
                   pipeline_worker_generic.c:83
0x00000000005794a8 in main (argc=11, argv=0xfffffffff470) at
                   ../examples/eventdev_pipeline/main.c:449

The root cause is that the queue_id (11) is invalid, the queue_id comes
from mbuf.hash.txadapter.txq which may pre-write by NIC driver when
receiving packets (e.g. pre-write mbuf.hash.fdir.hi field).

Because this example only enabled one ethdev queue, so fixes it by reset
txq to zero in the first worker stage.

[1] dpdk-eventdev_pipeline -l 0-48 --vdev event_sw0 -- -r1 -t1 -e1 -w ff0
    -s5 -n0 -c32 -W1000 -D
When launch eventdev_pipeline with command [1],  event_sw

Fixes: 81fb40f95c82 ("examples/eventdev: add generic worker pipeline")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Chenxingyu Wang <wangchenxingyu@huawei.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 .mailmap                                             |  1 +
 examples/eventdev_pipeline/pipeline_worker_generic.c | 12 ++++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/.mailmap b/.mailmap
index b0d505e36d..0a91d70e4c 100644
--- a/.mailmap
+++ b/.mailmap
@@ -217,6 +217,7 @@ Cheng Peng <cheng.peng5@zte.com.cn>
 Chengwen Feng <fengchengwen@huawei.com>
 Chenmin Sun <chenmin.sun@intel.com>
 Chenming Chang <ccm@ccm.ink>
+Chenxingyu Wang <wangchenxingyu@huawei.com>
 Chenxu Di <chenxux.di@intel.com>
 Cheryl Houser <chouser@vmware.com>
 Chinh T Cao <chinh.t.cao@intel.com>
diff --git a/examples/eventdev_pipeline/pipeline_worker_generic.c b/examples/eventdev_pipeline/pipeline_worker_generic.c
index 783f68c91e..831d7fd53d 100644
--- a/examples/eventdev_pipeline/pipeline_worker_generic.c
+++ b/examples/eventdev_pipeline/pipeline_worker_generic.c
@@ -38,10 +38,12 @@ worker_generic(void *arg)
 		}
 		received++;
 
-		/* The first worker stage does classification */
-		if (ev.queue_id == cdata.qid[0])
+		/* The first worker stage does classification and sets txq. */
+		if (ev.queue_id == cdata.qid[0]) {
 			ev.flow_id = ev.mbuf->hash.rss
 						% cdata.num_fids;
+			rte_event_eth_tx_adapter_txq_set(ev.mbuf, 0);
+		}
 
 		ev.queue_id = cdata.next_qid[ev.queue_id];
 		ev.op = RTE_EVENT_OP_FORWARD;
@@ -96,10 +98,12 @@ worker_generic_burst(void *arg)
 
 		for (i = 0; i < nb_rx; i++) {
 
-			/* The first worker stage does classification */
-			if (events[i].queue_id == cdata.qid[0])
+			/* The first worker stage does classification and sets txq. */
+			if (events[i].queue_id == cdata.qid[0]) {
 				events[i].flow_id = events[i].mbuf->hash.rss
 							% cdata.num_fids;
+				rte_event_eth_tx_adapter_txq_set(events[i].mbuf, 0);
+			}
 
 			events[i].queue_id = cdata.next_qid[events[i].queue_id];
 			events[i].op = RTE_EVENT_OP_FORWARD;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:40.676359588 +0100
+++ 0003-examples-eventdev-fix-queue-crash-with-generic-pipel.patch	2024-10-23 22:16:40.431940095 +0100
@@ -1 +1 @@
-From f6f2307931c90d924405ea44b0b4be9d3d01bd17 Mon Sep 17 00:00:00 2001
+From 44c20cfd7a3bd8e2a93ef7c772cd7afdda5433bd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f6f2307931c90d924405ea44b0b4be9d3d01bd17 ]
+
@@ -46 +47,0 @@
-Cc: stable@dpdk.org
@@ -57 +58 @@
-index 94fa73aa36..8a832ba4be 100644
+index b0d505e36d..0a91d70e4c 100644
@@ -60 +61 @@
-@@ -236,6 +236,7 @@ Cheng Peng <cheng.peng5@zte.com.cn>
+@@ -217,6 +217,7 @@ Cheng Peng <cheng.peng5@zte.com.cn>
@@ -66 +66,0 @@
- Chenyu Huang <chenyux.huang@intel.com>
@@ -67,0 +68 @@
+ Chinh T Cao <chinh.t.cao@intel.com>

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

* patch 'crypto/dpaa2_sec: fix memory leak' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
  2024-10-23 21:15 ` patch 'eal/x86: fix 32-bit write combining store' " luca.boccassi
  2024-10-23 21:15 ` patch 'examples/eventdev: fix queue crash with generic pipeline' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'common/dpaax/caamflib: fix PDCP SNOW-ZUC watchdog' " luca.boccassi
                   ` (74 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 3ae58cc9a3bec71daf039a8e0db505edc5d327cd Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Tue, 6 Aug 2024 15:57:26 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix memory leak

[ upstream commit 9c0abd27c3fe7a8b842d6fc254ac1241f4ba8b65 ]

fixing memory leak while creating the PDCP session
with invalid data.

Fixes: bef594ec5cc8 ("crypto/dpaa2_sec: support PDCP offload")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index eab7091251..a8c99bc4af 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3444,6 +3444,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
 		}
 	} else {
 		DPAA2_SEC_ERR("Invalid crypto type");
+		rte_free(priv);
 		return -EINVAL;
 	}
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:40.710814823 +0100
+++ 0004-crypto-dpaa2_sec-fix-memory-leak.patch	2024-10-23 22:16:40.431940095 +0100
@@ -1 +1 @@
-From 9c0abd27c3fe7a8b842d6fc254ac1241f4ba8b65 Mon Sep 17 00:00:00 2001
+From 3ae58cc9a3bec71daf039a8e0db505edc5d327cd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9c0abd27c3fe7a8b842d6fc254ac1241f4ba8b65 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 2cdf9308f8..e4109e8f0a 100644
+index eab7091251..a8c99bc4af 100644
@@ -21 +22 @@
-@@ -3422,6 +3422,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
+@@ -3444,6 +3444,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,

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

* patch 'common/dpaax/caamflib: fix PDCP SNOW-ZUC watchdog' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (2 preceding siblings ...)
  2024-10-23 21:15 ` patch 'crypto/dpaa2_sec: fix memory leak' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'dev: fix callback lookup when unregistering device' " luca.boccassi
                   ` (73 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Varun Sethi; +Cc: Gagandeep Singh, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/09002419181d5dd1eea71e04de674c7c76fff910

Thanks.

Luca Boccassi

---
From 09002419181d5dd1eea71e04de674c7c76fff910 Mon Sep 17 00:00:00 2001
From: Varun Sethi <v.sethi@nxp.com>
Date: Tue, 6 Aug 2024 15:57:27 +0530
Subject: [PATCH] common/dpaax/caamflib: fix PDCP SNOW-ZUC watchdog

[ upstream commit 2369bc1343fa5aac2890b2a3e12d65a2f1a2fd31 ]

Adding a Jump instruction with CALM flag to ensure
previous processing has been completed.

Fixes: 8827d94398f1 ("crypto/dpaa2_sec/hw: support AES-AES 18-bit PDCP")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Varun Sethi <v.sethi@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/common/dpaax/caamflib/desc/pdcp.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index 070cad0147..328b307ae9 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -1220,6 +1220,11 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,
 		SEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | FLUSH1);
 		MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);
 
+		/* conditional jump with calm added to ensure that the
+		 * previous processing has been completed
+		 */
+		JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
+
 		LOAD(p, CLRW_RESET_CLS1_CHA |
 		     CLRW_CLR_C1KEY |
 		     CLRW_CLR_C1CTX |
@@ -1921,6 +1926,11 @@ pdcp_insert_cplane_zuc_aes_op(struct program *p,
 
 		MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);
 
+		/* conditional jump with calm added to ensure that the
+		 * previous processing has been completed
+		 */
+		JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
+
 		LOAD(p, CLRW_RESET_CLS1_CHA |
 		     CLRW_CLR_C1KEY |
 		     CLRW_CLR_C1CTX |
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:40.748840317 +0100
+++ 0005-common-dpaax-caamflib-fix-PDCP-SNOW-ZUC-watchdog.patch	2024-10-23 22:16:40.435940252 +0100
@@ -1 +1 @@
-From 2369bc1343fa5aac2890b2a3e12d65a2f1a2fd31 Mon Sep 17 00:00:00 2001
+From 09002419181d5dd1eea71e04de674c7c76fff910 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2369bc1343fa5aac2890b2a3e12d65a2f1a2fd31 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index bc35114cf4..9ada3905c5 100644
+index 070cad0147..328b307ae9 100644

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

* patch 'dev: fix callback lookup when unregistering device' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (3 preceding siblings ...)
  2024-10-23 21:15 ` patch 'common/dpaax/caamflib: fix PDCP SNOW-ZUC watchdog' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'examples/ipsec-secgw: fix dequeue count from cryptodev' " luca.boccassi
                   ` (72 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Malcolm Bumgardner; +Cc: Long Li, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/66228c9ae76ca68940b1e9b4bb46bd587447c365

Thanks.

Luca Boccassi

---
From 66228c9ae76ca68940b1e9b4bb46bd587447c365 Mon Sep 17 00:00:00 2001
From: Malcolm Bumgardner <mbumgard@cisco.com>
Date: Thu, 18 Jul 2024 12:37:28 -0700
Subject: [PATCH] dev: fix callback lookup when unregistering device

[ upstream commit 66fd2cc2e47c69ee57f0fe32558e55b085c2e32d ]

In the device event unregister code, it unconditionally removes all
callbacks which are registered with device_name set to NULL.
This results in many callbacks incorrectly removed.

Fix this by only removing callbacks with matching cb_fn and cb_arg.

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

Signed-off-by: Malcolm Bumgardner <mbumgard@cisco.com>
Signed-off-by: Long Li <longli@microsoft.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
---
 .mailmap                        |  1 +
 lib/eal/common/eal_common_dev.c | 13 +++++++------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/.mailmap b/.mailmap
index 0a91d70e4c..80d6d50ba9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -823,6 +823,7 @@ Mahesh Adulla <mahesh.adulla@amd.com>
 Mahipal Challa <mchalla@marvell.com>
 Mah Yock Gen <yock.gen.mah@intel.com>
 Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
+Malcolm Bumgardner <mbumgard@cisco.com>
 Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
 Mallesh Koujalagi <malleshx.koujalagi@intel.com>
 Malvika Gupta <malvika.gupta@arm.com>
diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index 614ef6c9fc..bc53b2e28d 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -550,16 +550,17 @@ rte_dev_event_callback_unregister(const char *device_name,
 		next = TAILQ_NEXT(event_cb, next);
 
 		if (device_name != NULL && event_cb->dev_name != NULL) {
-			if (!strcmp(event_cb->dev_name, device_name)) {
-				if (event_cb->cb_fn != cb_fn ||
-				    (cb_arg != (void *)-1 &&
-				    event_cb->cb_arg != cb_arg))
-					continue;
-			}
+			if (strcmp(event_cb->dev_name, device_name))
+				continue;
 		} else if (device_name != NULL) {
 			continue;
 		}
 
+		/* Remove only matching callback with arg */
+		if (event_cb->cb_fn != cb_fn ||
+		    (cb_arg != (void *)-1 && event_cb->cb_arg != cb_arg))
+			continue;
+
 		/*
 		 * if this callback is not executing right now,
 		 * then remove it.
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:40.785278188 +0100
+++ 0006-dev-fix-callback-lookup-when-unregistering-device.patch	2024-10-23 22:16:40.435940252 +0100
@@ -1 +1 @@
-From 66fd2cc2e47c69ee57f0fe32558e55b085c2e32d Mon Sep 17 00:00:00 2001
+From 66228c9ae76ca68940b1e9b4bb46bd587447c365 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 66fd2cc2e47c69ee57f0fe32558e55b085c2e32d ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index a66da3c8cb..8004772125 100644
+index 0a91d70e4c..80d6d50ba9 100644
@@ -27,2 +28,2 @@
-@@ -886,6 +886,7 @@ Mahipal Challa <mchalla@marvell.com>
- Mahmoud Maatuq <mahmoudmatook.mm@gmail.com>
+@@ -823,6 +823,7 @@ Mahesh Adulla <mahesh.adulla@amd.com>
+ Mahipal Challa <mchalla@marvell.com>
@@ -36 +37 @@
-index a99252b02f..70aa04dcd9 100644
+index 614ef6c9fc..bc53b2e28d 100644

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

* patch 'examples/ipsec-secgw: fix dequeue count from cryptodev' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (4 preceding siblings ...)
  2024-10-23 21:15 ` patch 'dev: fix callback lookup when unregistering device' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'bpf: fix free function mismatch if convert fails' " luca.boccassi
                   ` (71 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Tejasree Kondoj; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4152dbbb8e267f67a90e5f49524ada3e4af34d6b

Thanks.

Luca Boccassi

---
From 4152dbbb8e267f67a90e5f49524ada3e4af34d6b Mon Sep 17 00:00:00 2001
From: Tejasree Kondoj <ktejasree@marvell.com>
Date: Fri, 13 Sep 2024 12:37:26 +0530
Subject: [PATCH] examples/ipsec-secgw: fix dequeue count from cryptodev

[ upstream commit 88948ff31f57618a74c8985c59e332676995b438 ]

Setting dequeue packet count to max of MAX_PKT_BURST
size instead of MAX_PKTS.

Dequeue from cryptodev is called with MAX_PKTS but
routing functions allocate hop/dst_ip arrays of
size MAX_PKT_BURST. This can corrupt stack causing
stack smashing error when more than MAX_PKT_BURST
packets are returned from cryptodev.

Fixes: a2b445b810ac ("examples/ipsec-secgw: allow larger burst size for vectors")

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/ipsec-secgw.c   | 6 ++++--
 examples/ipsec-secgw/ipsec_process.c | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 9620d73fc8..849efbe755 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -626,12 +626,13 @@ drain_inbound_crypto_queues(const struct lcore_conf *qconf,
 	uint32_t n;
 	struct ipsec_traffic trf;
 	unsigned int lcoreid = rte_lcore_id();
+	const int nb_pkts = RTE_DIM(trf.ipsec.pkts);
 
 	if (app_sa_prm.enable == 0) {
 
 		/* dequeue packets from crypto-queue */
 		n = ipsec_inbound_cqp_dequeue(ctx, trf.ipsec.pkts,
-			RTE_DIM(trf.ipsec.pkts));
+			RTE_MIN(MAX_PKT_BURST, nb_pkts));
 
 		trf.ip4.num = 0;
 		trf.ip6.num = 0;
@@ -663,12 +664,13 @@ drain_outbound_crypto_queues(const struct lcore_conf *qconf,
 {
 	uint32_t n;
 	struct ipsec_traffic trf;
+	const int nb_pkts = RTE_DIM(trf.ipsec.pkts);
 
 	if (app_sa_prm.enable == 0) {
 
 		/* dequeue packets from crypto-queue */
 		n = ipsec_outbound_cqp_dequeue(ctx, trf.ipsec.pkts,
-			RTE_DIM(trf.ipsec.pkts));
+			RTE_MIN(MAX_PKT_BURST, nb_pkts));
 
 		trf.ip4.num = 0;
 		trf.ip6.num = 0;
diff --git a/examples/ipsec-secgw/ipsec_process.c b/examples/ipsec-secgw/ipsec_process.c
index b0cece3ad1..1a64a4b49f 100644
--- a/examples/ipsec-secgw/ipsec_process.c
+++ b/examples/ipsec-secgw/ipsec_process.c
@@ -336,6 +336,7 @@ ipsec_cqp_process(struct ipsec_ctx *ctx, struct ipsec_traffic *trf)
 	struct rte_ipsec_session *ss;
 	struct traffic_type *out;
 	struct rte_ipsec_group *pg;
+	const int nb_cops = RTE_DIM(trf->ipsec.pkts);
 	struct rte_crypto_op *cop[RTE_DIM(trf->ipsec.pkts)];
 	struct rte_ipsec_group grp[RTE_DIM(trf->ipsec.pkts)];
 
@@ -345,7 +346,7 @@ ipsec_cqp_process(struct ipsec_ctx *ctx, struct ipsec_traffic *trf)
 	out = &trf->ipsec;
 
 	/* dequeue completed crypto-ops */
-	n = ctx_dequeue(ctx, cop, RTE_DIM(cop));
+	n = ctx_dequeue(ctx, cop, RTE_MIN(MAX_PKT_BURST, nb_cops));
 	if (n == 0)
 		return;
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:40.822219046 +0100
+++ 0007-examples-ipsec-secgw-fix-dequeue-count-from-cryptode.patch	2024-10-23 22:16:40.439940407 +0100
@@ -1 +1 @@
-From 88948ff31f57618a74c8985c59e332676995b438 Mon Sep 17 00:00:00 2001
+From 4152dbbb8e267f67a90e5f49524ada3e4af34d6b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 88948ff31f57618a74c8985c59e332676995b438 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index e98ad2572e..063cc8768e 100644
+index 9620d73fc8..849efbe755 100644
@@ -60 +61 @@
-index ddbe30745b..5080e810e0 100644
+index b0cece3ad1..1a64a4b49f 100644

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

* patch 'bpf: fix free function mismatch if convert fails' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (5 preceding siblings ...)
  2024-10-23 21:15 ` patch 'examples/ipsec-secgw: fix dequeue count from cryptodev' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'baseband/la12xx: fix use after free in modem config' " luca.boccassi
                   ` (70 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Morten Brørup, Konstantin Ananyev, Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From b6364f54063f11b70060268e8fc96ea24e9606e9 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:11 -0700
Subject: [PATCH] bpf: fix free function mismatch if convert fails
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit a3923d6bd5c0b9838d8f4678233093ffad036193 ]

If conversion of cBF to eBPF fails then an object allocated with
rte_malloc() would be passed to free().

[908/3201] Compiling C object lib/librte_bpf.a.p/bpf_bpf_convert.c.o
../lib/bpf/bpf_convert.c: In function ‘rte_bpf_convert’:
../lib/bpf/bpf_convert.c:559:17:
	warning: ‘free’ called on pointer returned from a mismatched
	allocation function [-Wmismatched-dealloc]
  559 |                 free(prm);
      |                 ^~~~~~~~~
../lib/bpf/bpf_convert.c:545:15: note: returned from ‘rte_zmalloc’
  545 |         prm = rte_zmalloc("bpf_filter",
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~
  546 |                   sizeof(*prm) + ebpf_len * sizeof(*ebpf), 0);
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 lib/bpf/bpf_convert.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bpf/bpf_convert.c b/lib/bpf/bpf_convert.c
index 9563274c9c..024c9edc9e 100644
--- a/lib/bpf/bpf_convert.c
+++ b/lib/bpf/bpf_convert.c
@@ -559,7 +559,7 @@ rte_bpf_convert(const struct bpf_program *prog)
 	ret = bpf_convert_filter(prog->bf_insns, prog->bf_len, ebpf, &ebpf_len);
 	if (ret < 0) {
 		RTE_BPF_LOG(ERR, "%s: cannot convert cBPF to eBPF\n", __func__);
-		free(prm);
+		rte_free(prm);
 		rte_errno = -ret;
 		return NULL;
 	}
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:40.858904428 +0100
+++ 0008-bpf-fix-free-function-mismatch-if-convert-fails.patch	2024-10-23 22:16:40.439940407 +0100
@@ -1 +1 @@
-From a3923d6bd5c0b9838d8f4678233093ffad036193 Mon Sep 17 00:00:00 2001
+From b6364f54063f11b70060268e8fc96ea24e9606e9 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit a3923d6bd5c0b9838d8f4678233093ffad036193 ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -37 +38 @@
-index d7ff2b4325..e7e298c9cb 100644
+index 9563274c9c..024c9edc9e 100644
@@ -40 +41 @@
-@@ -556,7 +556,7 @@ rte_bpf_convert(const struct bpf_program *prog)
+@@ -559,7 +559,7 @@ rte_bpf_convert(const struct bpf_program *prog)
@@ -43 +44 @@
- 		RTE_BPF_LOG_LINE(ERR, "%s: cannot convert cBPF to eBPF", __func__);
+ 		RTE_BPF_LOG(ERR, "%s: cannot convert cBPF to eBPF\n", __func__);

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

* patch 'baseband/la12xx: fix use after free in modem config' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (6 preceding siblings ...)
  2024-10-23 21:15 ` patch 'bpf: fix free function mismatch if convert fails' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'crypto/bcmfs: fix free function mismatch' " luca.boccassi
                   ` (69 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Hemant Agrawal, Morten Brørup, Konstantin Ananyev,
	Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/38eba244a3d5407f508a1dbd8a1b17f47337c82c

Thanks.

Luca Boccassi

---
From 38eba244a3d5407f508a1dbd8a1b17f47337c82c Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:19 -0700
Subject: [PATCH] baseband/la12xx: fix use after free in modem config
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 6ffb34498913f84713e98d6a2a21d2a86028a604 ]

The info pointer (hp) could get freed twice.
Fix by nulling after free.

In function 'setup_la12xx_dev',
inlined from 'la12xx_bbdev_create' at
	../drivers/baseband/la12xx/bbdev_la12xx.c:1029:8,
inlined from 'la12xx_bbdev_probe' at
	../drivers/baseband/la12xx/bbdev_la12xx.c:1075:9:
../drivers/baseband/la12xx/bbdev_la12xx.c:901:9:
	error: pointer 'hp_info' may be used after 'rte_free'
	[-Werror=use-after-free]
901 |         rte_free(hp);
    |         ^~~~~~~~~~~~
../drivers/baseband/la12xx/bbdev_la12xx.c:791:17:
	note: call to 'rte_free' here
791 |                 rte_free(hp);
    |                 ^~~~~~~~~~~~

Fixes: 24d0ba22546e ("baseband/la12xx: add queue and modem config")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/baseband/la12xx/bbdev_la12xx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c
index 1a56e73abd..cad6f9490e 100644
--- a/drivers/baseband/la12xx/bbdev_la12xx.c
+++ b/drivers/baseband/la12xx/bbdev_la12xx.c
@@ -789,6 +789,7 @@ setup_la12xx_dev(struct rte_bbdev *dev)
 		ipc_priv->hugepg_start.size = hp->len;
 
 		rte_free(hp);
+		hp = NULL;
 	}
 
 	dev_ipc = open_ipc_dev(priv->modem_id);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:40.895052857 +0100
+++ 0009-baseband-la12xx-fix-use-after-free-in-modem-config.patch	2024-10-23 22:16:40.439940407 +0100
@@ -1 +1 @@
-From 6ffb34498913f84713e98d6a2a21d2a86028a604 Mon Sep 17 00:00:00 2001
+From 38eba244a3d5407f508a1dbd8a1b17f47337c82c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 6ffb34498913f84713e98d6a2a21d2a86028a604 ]
+
@@ -28 +29,0 @@
-Cc: stable@dpdk.org
@@ -40 +41 @@
-index af4b4f1e9a..2432cdf884 100644
+index 1a56e73abd..cad6f9490e 100644

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

* patch 'crypto/bcmfs: fix free function mismatch' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (7 preceding siblings ...)
  2024-10-23 21:15 ` patch 'baseband/la12xx: fix use after free in modem config' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'dma/idxd: fix free function mismatch in device probe' " luca.boccassi
                   ` (68 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Ajit Khaparde, Morten Brørup, Konstantin Ananyev,
	Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/08043b1ad9e349ae0520e0a49a4a7a21fae674d6

Thanks.

Luca Boccassi

---
From 08043b1ad9e349ae0520e0a49a4a7a21fae674d6 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:06 -0700
Subject: [PATCH] crypto/bcmfs: fix free function mismatch
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit b1703af8e77d9e872e2ead92ab2dbcf290686f78 ]

The device structure is allocated with rte_malloc() and
then incorrectly freed with free().
This will lead to corrupt malloc pool.

Bugzilla ID: 1552
Fixes: c8e79da7c676 ("crypto/bcmfs: introduce BCMFS driver")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/crypto/bcmfs/bcmfs_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/bcmfs/bcmfs_device.c b/drivers/crypto/bcmfs/bcmfs_device.c
index ada7ba342c..46522970d5 100644
--- a/drivers/crypto/bcmfs/bcmfs_device.c
+++ b/drivers/crypto/bcmfs/bcmfs_device.c
@@ -139,7 +139,7 @@ fsdev_allocate_one_dev(struct rte_vdev_device *vdev,
 	return fsdev;
 
 cleanup:
-	free(fsdev);
+	rte_free(fsdev);
 
 	return NULL;
 }
@@ -163,7 +163,7 @@ fsdev_release(struct bcmfs_device *fsdev)
 		return;
 
 	TAILQ_REMOVE(&fsdev_list, fsdev, next);
-	free(fsdev);
+	rte_free(fsdev);
 }
 
 static int
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:40.932535337 +0100
+++ 0010-crypto-bcmfs-fix-free-function-mismatch.patch	2024-10-23 22:16:40.439940407 +0100
@@ -1 +1 @@
-From b1703af8e77d9e872e2ead92ab2dbcf290686f78 Mon Sep 17 00:00:00 2001
+From 08043b1ad9e349ae0520e0a49a4a7a21fae674d6 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit b1703af8e77d9e872e2ead92ab2dbcf290686f78 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org

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

* patch 'dma/idxd: fix free function mismatch in device probe' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (8 preceding siblings ...)
  2024-10-23 21:15 ` patch 'crypto/bcmfs: fix free function mismatch' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'event/cnxk: fix free function mismatch in port config' " luca.boccassi
                   ` (67 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Bruce Richardson, Morten Brørup, Konstantin Ananyev,
	Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/495fd2e8ca2bc55b021b0c8ed3a2922f40913440

Thanks.

Luca Boccassi

---
From 495fd2e8ca2bc55b021b0c8ed3a2922f40913440 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:07 -0700
Subject: [PATCH] dma/idxd: fix free function mismatch in device probe
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 91b026fb46d987e68c1152b0bb5f0bc8f1f274db ]

The data structure is allocated with rte_malloc and incorrectly
freed in cleanup logic using free.

Bugzilla ID: 1549
Fixes: 9449330a8458 ("dma/idxd: create dmadev instances on PCI probe")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/dma/idxd/idxd_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/idxd/idxd_pci.c b/drivers/dma/idxd/idxd_pci.c
index 781fa02db3..7222de3b7e 100644
--- a/drivers/dma/idxd/idxd_pci.c
+++ b/drivers/dma/idxd/idxd_pci.c
@@ -292,7 +292,7 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd,
 	return nb_wqs;
 
 err:
-	free(pci);
+	rte_free(pci);
 	return err_code;
 }
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:40.967887951 +0100
+++ 0011-dma-idxd-fix-free-function-mismatch-in-device-probe.patch	2024-10-23 22:16:40.439940407 +0100
@@ -1 +1 @@
-From 91b026fb46d987e68c1152b0bb5f0bc8f1f274db Mon Sep 17 00:00:00 2001
+From 495fd2e8ca2bc55b021b0c8ed3a2922f40913440 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 91b026fb46d987e68c1152b0bb5f0bc8f1f274db ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 60ac219559..6ed03e96da 100644
+index 781fa02db3..7222de3b7e 100644
@@ -29 +30 @@
-@@ -301,7 +301,7 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd,
+@@ -292,7 +292,7 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd,

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

* patch 'event/cnxk: fix free function mismatch in port config' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (9 preceding siblings ...)
  2024-10-23 21:15 ` patch 'dma/idxd: fix free function mismatch in device probe' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'net/e1000: fix use after free in filter flush' " luca.boccassi
                   ` (66 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Pavan Nikhilesh, Morten Brørup, Konstantin Ananyev,
	Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 4cf7c66de71156b980f5adb4582fa21bb5616ec8 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:08 -0700
Subject: [PATCH] event/cnxk: fix free function mismatch in port config
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit db92f4e2ce491bb96605621cdd6f6251ea3bde85 ]

The code to cleanup in case of error would dereference null pointer
then pass that result to rte_free.

Fixes: 97a05c1fe634 ("event/cnxk: add port config")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/event/cnxk/cnxk_eventdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 205cc76572..eff3c42f74 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -109,8 +109,8 @@ cnxk_setup_event_ports(const struct rte_eventdev *event_dev,
 	return 0;
 hws_fini:
 	for (i = i - 1; i >= 0; i--) {
-		event_dev->data->ports[i] = NULL;
 		rte_free(cnxk_sso_hws_get_cookie(event_dev->data->ports[i]));
+		event_dev->data->ports[i] = NULL;
 	}
 	return -ENOMEM;
 }
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.003601502 +0100
+++ 0012-event-cnxk-fix-free-function-mismatch-in-port-config.patch	2024-10-23 22:16:40.443940563 +0100
@@ -1 +1 @@
-From db92f4e2ce491bb96605621cdd6f6251ea3bde85 Mon Sep 17 00:00:00 2001
+From 4cf7c66de71156b980f5adb4582fa21bb5616ec8 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit db92f4e2ce491bb96605621cdd6f6251ea3bde85 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index c1df481827..84a55511a3 100644
+index 205cc76572..eff3c42f74 100644
@@ -28 +29 @@
-@@ -121,8 +121,8 @@ cnxk_setup_event_ports(const struct rte_eventdev *event_dev,
+@@ -109,8 +109,8 @@ cnxk_setup_event_ports(const struct rte_eventdev *event_dev,

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

* patch 'net/e1000: fix use after free in filter flush' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (10 preceding siblings ...)
  2024-10-23 21:15 ` patch 'event/cnxk: fix free function mismatch in port config' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'net/nfp: fix double free in flow destroy' " luca.boccassi
                   ` (65 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Morten Brørup, Konstantin Ananyev, Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 7a1ad4c97e279f1eaa8c45870514bc41735eb22d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:12 -0700
Subject: [PATCH] net/e1000: fix use after free in filter flush
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 58196dc411576925a1d66b0da1d11b06072a7ac2 ]

The driver cleanup code was freeing the filter object then
dereferencing it.

Bugzilla ID: 1550
Fixes: 6a4d050e2855 ("net/igb: flush all the filter")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/net/e1000/igb_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 8858f975f8..e9ad558c82 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -3857,11 +3857,11 @@ igb_delete_2tuple_filter(struct rte_eth_dev *dev,
 
 	filter_info->twotuple_mask &= ~(1 << filter->index);
 	TAILQ_REMOVE(&filter_info->twotuple_list, filter, entries);
-	rte_free(filter);
 
 	E1000_WRITE_REG(hw, E1000_TTQF(filter->index), E1000_TTQF_DISABLE_MASK);
 	E1000_WRITE_REG(hw, E1000_IMIR(filter->index), 0);
 	E1000_WRITE_REG(hw, E1000_IMIREXT(filter->index), 0);
+	rte_free(filter);
 	return 0;
 }
 
@@ -4298,7 +4298,6 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev,
 
 	filter_info->fivetuple_mask &= ~(1 << filter->index);
 	TAILQ_REMOVE(&filter_info->fivetuple_list, filter, entries);
-	rte_free(filter);
 
 	E1000_WRITE_REG(hw, E1000_FTQF(filter->index),
 			E1000_FTQF_VF_BP | E1000_FTQF_MASK);
@@ -4307,6 +4306,7 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev,
 	E1000_WRITE_REG(hw, E1000_SPQF(filter->index), 0);
 	E1000_WRITE_REG(hw, E1000_IMIR(filter->index), 0);
 	E1000_WRITE_REG(hw, E1000_IMIREXT(filter->index), 0);
+	rte_free(filter);
 	return 0;
 }
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.047943731 +0100
+++ 0013-net-e1000-fix-use-after-free-in-filter-flush.patch	2024-10-23 22:16:40.443940563 +0100
@@ -1 +1 @@
-From 58196dc411576925a1d66b0da1d11b06072a7ac2 Mon Sep 17 00:00:00 2001
+From 7a1ad4c97e279f1eaa8c45870514bc41735eb22d Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 58196dc411576925a1d66b0da1d11b06072a7ac2 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 1e0a483d4a..d3a9181874 100644
+index 8858f975f8..e9ad558c82 100644
@@ -28 +29 @@
-@@ -3907,11 +3907,11 @@ igb_delete_2tuple_filter(struct rte_eth_dev *dev,
+@@ -3857,11 +3857,11 @@ igb_delete_2tuple_filter(struct rte_eth_dev *dev,
@@ -41 +42 @@
-@@ -4348,7 +4348,6 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev,
+@@ -4298,7 +4298,6 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev,
@@ -49 +50 @@
-@@ -4357,6 +4356,7 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev,
+@@ -4307,6 +4306,7 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev,

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

* patch 'net/nfp: fix double free in flow destroy' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (11 preceding siblings ...)
  2024-10-23 21:15 ` patch 'net/e1000: fix use after free in filter flush' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'net/sfc: fix use after free in debug logs' " luca.boccassi
                   ` (64 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Morten Brørup, Konstantin Ananyev, Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 8bd09aed9cf598b6b0088bdd70d4d8c0c00b908c Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:15 -0700
Subject: [PATCH] net/nfp: fix double free in flow destroy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit fae5c633522efd30b6cb2c7a1bdfeb7e19e2f369 ]

Calling rte_free twice on same object will corrupt the heap.
Warning is:
In function 'nfp_pre_tun_table_check_del',
inlined from 'nfp_flow_destroy' at
	../drivers/net/nfp/flower/nfp_flower_flow.c:5143:9:
../drivers/net/nfp/flower/nfp_flower_flow.c:3830:9:
	error: pointer 'entry' used after 'rte_free'
	[-Werror=use-after-free]
3830 |         rte_free(entry);
     |         ^~~~~~~~~~~~~~~
../drivers/net/nfp/flower/nfp_flower_flow.c:3825:9:
	note: call to 'rte_free' here
3825 |         rte_free(entry);
     |         ^~~~~~~~~~~~~~~

Bugzilla ID: 1555
Fixes: d3c33bdf1f18 ("net/nfp: prepare for IPv4 UDP tunnel decap flow action")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/net/nfp/nfp_flow.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 17c091ffa0..3746aa2d0f 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3019,7 +3019,6 @@ nfp_pre_tun_table_check_del(struct nfp_flower_representor *repr,
 		goto free_entry;
 	}
 
-	rte_free(entry);
 	rte_free(find_entry);
 	priv->pre_tun_cnt--;
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.085777453 +0100
+++ 0014-net-nfp-fix-double-free-in-flow-destroy.patch	2024-10-23 22:16:40.447940718 +0100
@@ -1 +1 @@
-From fae5c633522efd30b6cb2c7a1bdfeb7e19e2f369 Mon Sep 17 00:00:00 2001
+From 8bd09aed9cf598b6b0088bdd70d4d8c0c00b908c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit fae5c633522efd30b6cb2c7a1bdfeb7e19e2f369 ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
- drivers/net/nfp/flower/nfp_flower_flow.c | 1 -
+ drivers/net/nfp/nfp_flow.c | 1 -
@@ -36,5 +37,5 @@
-diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c
-index 0078455658..64a0062c8b 100644
---- a/drivers/net/nfp/flower/nfp_flower_flow.c
-+++ b/drivers/net/nfp/flower/nfp_flower_flow.c
-@@ -3822,7 +3822,6 @@ nfp_pre_tun_table_check_del(struct nfp_flower_representor *repr,
+diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
+index 17c091ffa0..3746aa2d0f 100644
+--- a/drivers/net/nfp/nfp_flow.c
++++ b/drivers/net/nfp/nfp_flow.c
+@@ -3019,7 +3019,6 @@ nfp_pre_tun_table_check_del(struct nfp_flower_representor *repr,

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

* patch 'net/sfc: fix use after free in debug logs' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (12 preceding siblings ...)
  2024-10-23 21:15 ` patch 'net/nfp: fix double free in flow destroy' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'raw/ifpga/base: fix use after free' " luca.boccassi
                   ` (63 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Ivan Malov, Andrew Rybchenko, Morten Brørup,
	Konstantin Ananyev, Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From d8c04bbc9bbf10267c00dbf1fff30fc0e08fbfa4 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:13 -0700
Subject: [PATCH] net/sfc: fix use after free in debug logs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 757b0b6f207c072a550f43836856235aa41553ad ]

If compiler detection of use-after-free is enabled then this drivers
debug messages will cause warnings. Change to move debug message
before the object is freed.

Bugzilla ID: 1551
Fixes: 55c1238246d5 ("net/sfc: add more debug messages to transfer flows")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ivan Malov <ivan.malov@arknetworks.am>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/net/sfc/sfc_flow_rss.c |  4 ++--
 drivers/net/sfc/sfc_mae.c      | 13 +++++--------
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/net/sfc/sfc_flow_rss.c b/drivers/net/sfc/sfc_flow_rss.c
index e28c943335..8e2749833b 100644
--- a/drivers/net/sfc/sfc_flow_rss.c
+++ b/drivers/net/sfc/sfc_flow_rss.c
@@ -303,9 +303,9 @@ sfc_flow_rss_ctx_del(struct sfc_adapter *sa, struct sfc_flow_rss_ctx *ctx)
 
 	TAILQ_REMOVE(&flow_rss->ctx_list, ctx, entries);
 	rte_free(ctx->qid_offsets);
-	rte_free(ctx);
-
 	sfc_dbg(sa, "flow-rss: deleted ctx=%p", ctx);
+
+	rte_free(ctx);
 }
 
 static int
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index b61b9658e3..4775953b8d 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -421,9 +421,8 @@ sfc_mae_outer_rule_del(struct sfc_adapter *sa,
 	efx_mae_match_spec_fini(sa->nic, rule->match_spec);
 
 	TAILQ_REMOVE(&mae->outer_rules, rule, entries);
-	rte_free(rule);
-
 	sfc_dbg(sa, "deleted outer_rule=%p", rule);
+	rte_free(rule);
 }
 
 static int
@@ -582,9 +581,8 @@ sfc_mae_mac_addr_del(struct sfc_adapter *sa, struct sfc_mae_mac_addr *mac_addr)
 	}
 
 	TAILQ_REMOVE(&mae->mac_addrs, mac_addr, entries);
-	rte_free(mac_addr);
-
 	sfc_dbg(sa, "deleted mac_addr=%p", mac_addr);
+	rte_free(mac_addr);
 }
 
 enum sfc_mae_mac_addr_type {
@@ -779,10 +777,10 @@ sfc_mae_encap_header_del(struct sfc_adapter *sa,
 	}
 
 	TAILQ_REMOVE(&mae->encap_headers, encap_header, entries);
+	sfc_dbg(sa, "deleted encap_header=%p", encap_header);
+
 	rte_free(encap_header->buf);
 	rte_free(encap_header);
-
-	sfc_dbg(sa, "deleted encap_header=%p", encap_header);
 }
 
 static int
@@ -1085,9 +1083,8 @@ sfc_mae_action_set_del(struct sfc_adapter *sa,
 		rte_free(action_set->counters);
 	}
 	TAILQ_REMOVE(&mae->action_sets, action_set, entries);
-	rte_free(action_set);
-
 	sfc_dbg(sa, "deleted action_set=%p", action_set);
+	rte_free(action_set);
 }
 
 static int
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.124423091 +0100
+++ 0015-net-sfc-fix-use-after-free-in-debug-logs.patch	2024-10-23 22:16:40.451940874 +0100
@@ -1 +1 @@
-From 757b0b6f207c072a550f43836856235aa41553ad Mon Sep 17 00:00:00 2001
+From d8c04bbc9bbf10267c00dbf1fff30fc0e08fbfa4 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 757b0b6f207c072a550f43836856235aa41553ad ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25,2 +26,2 @@
- drivers/net/sfc/sfc_mae.c      | 25 ++++++++++---------------
- 2 files changed, 12 insertions(+), 17 deletions(-)
+ drivers/net/sfc/sfc_mae.c      | 13 +++++--------
+ 2 files changed, 7 insertions(+), 10 deletions(-)
@@ -45 +46 @@
-index 60ff6d2181..8f74f10390 100644
+index b61b9658e3..4775953b8d 100644
@@ -48 +49 @@
-@@ -400,9 +400,8 @@ sfc_mae_outer_rule_del(struct sfc_adapter *sa,
+@@ -421,9 +421,8 @@ sfc_mae_outer_rule_del(struct sfc_adapter *sa,
@@ -59 +60 @@
-@@ -585,9 +584,8 @@ sfc_mae_mac_addr_del(struct sfc_adapter *sa, struct sfc_mae_mac_addr *mac_addr)
+@@ -582,9 +581,8 @@ sfc_mae_mac_addr_del(struct sfc_adapter *sa, struct sfc_mae_mac_addr *mac_addr)
@@ -70 +71 @@
-@@ -785,10 +783,10 @@ sfc_mae_encap_header_del(struct sfc_adapter *sa,
+@@ -779,10 +777,10 @@ sfc_mae_encap_header_del(struct sfc_adapter *sa,
@@ -74,4 +75 @@
--	rte_free(encap_header->buf);
--	rte_free(encap_header);
--
- 	sfc_dbg(sa, "deleted encap_header=%p", encap_header);
++	sfc_dbg(sa, "deleted encap_header=%p", encap_header);
@@ -79,10 +77,2 @@
-+	rte_free(encap_header->buf);
-+	rte_free(encap_header);
- }
- 
- static int
-@@ -983,9 +981,8 @@ sfc_mae_counter_del(struct sfc_adapter *sa, struct sfc_mae_counter *counter)
- 	}
- 
- 	TAILQ_REMOVE(&mae->counters, counter, entries);
--	rte_free(counter);
+ 	rte_free(encap_header->buf);
+ 	rte_free(encap_header);
@@ -90,2 +80 @@
- 	sfc_dbg(sa, "deleted counter=%p", counter);
-+	rte_free(counter);
+-	sfc_dbg(sa, "deleted encap_header=%p", encap_header);
@@ -95,3 +84,3 @@
-@@ -1165,9 +1162,8 @@ sfc_mae_action_set_del(struct sfc_adapter *sa,
- 	sfc_mae_mac_addr_del(sa, action_set->src_mac_addr);
- 	sfc_mae_counter_del(sa, action_set->counter);
+@@ -1085,9 +1083,8 @@ sfc_mae_action_set_del(struct sfc_adapter *sa,
+ 		rte_free(action_set->counters);
+ 	}
@@ -103,24 +91,0 @@
- }
- 
- static int
-@@ -1401,10 +1397,10 @@ sfc_mae_action_set_list_del(struct sfc_adapter *sa,
- 		sfc_mae_action_set_del(sa, action_set_list->action_sets[i]);
- 
- 	TAILQ_REMOVE(&mae->action_set_lists, action_set_list, entries);
-+	sfc_dbg(sa, "deleted action_set_list=%p", action_set_list);
-+
- 	rte_free(action_set_list->action_sets);
- 	rte_free(action_set_list);
--
--	sfc_dbg(sa, "deleted action_set_list=%p", action_set_list);
- }
- 
- static int
-@@ -1667,9 +1663,8 @@ sfc_mae_action_rule_del(struct sfc_adapter *sa,
- 	sfc_mae_outer_rule_del(sa, rule->outer_rule);
- 
- 	TAILQ_REMOVE(&mae->action_rules, rule, entries);
--	rte_free(rule);
--
- 	sfc_dbg(sa, "deleted action_rule=%p", rule);
-+	rte_free(rule);

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

* patch 'raw/ifpga/base: fix use after free' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (13 preceding siblings ...)
  2024-10-23 21:15 ` patch 'net/sfc: fix use after free in debug logs' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'raw/ifpga: fix free function mismatch in interrupt config' " luca.boccassi
                   ` (62 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Morten Brørup, Konstantin Ananyev, Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From f838b3c8b98dc3286e86564cda6427e916238fb0 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:16 -0700
Subject: [PATCH] raw/ifpga/base: fix use after free
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 11986223b54d981300e9de2d365c494eb274645c ]

The TAILQ_FOREACH() macro would refer to info after it
had been freed. Fix by introducing TAILQ_FOREACH_SAFE here.

Fixes: 4a19f89104f8 ("raw/ifpga/base: support multiple cards")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/raw/ifpga/base/opae_intel_max10.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/raw/ifpga/base/opae_intel_max10.c b/drivers/raw/ifpga/base/opae_intel_max10.c
index dd97a5f9fd..d5a9ceb6e3 100644
--- a/drivers/raw/ifpga/base/opae_intel_max10.c
+++ b/drivers/raw/ifpga/base/opae_intel_max10.c
@@ -6,6 +6,13 @@
 #include <libfdt.h>
 #include "opae_osdep.h"
 
+#ifndef TAILQ_FOREACH_SAFE
+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
+	for ((var) = TAILQ_FIRST((head)); \
+		(var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
+	(var) = (tvar))
+#endif
+
 int max10_sys_read(struct intel_max10_device *dev,
 	unsigned int offset, unsigned int *val)
 {
@@ -746,9 +753,9 @@ static int fdt_get_named_reg(const void *fdt, int node, const char *name,
 
 static void max10_sensor_uinit(struct intel_max10_device *dev)
 {
-	struct opae_sensor_info *info;
+	struct opae_sensor_info *info, *next;
 
-	TAILQ_FOREACH(info, &dev->opae_sensor_list, node) {
+	TAILQ_FOREACH_SAFE(info, &dev->opae_sensor_list, node, next) {
 		TAILQ_REMOVE(&dev->opae_sensor_list, info, node);
 		opae_free(info);
 	}
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.161106863 +0100
+++ 0016-raw-ifpga-base-fix-use-after-free.patch	2024-10-23 22:16:40.451940874 +0100
@@ -1 +1 @@
-From 11986223b54d981300e9de2d365c494eb274645c Mon Sep 17 00:00:00 2001
+From f838b3c8b98dc3286e86564cda6427e916238fb0 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 11986223b54d981300e9de2d365c494eb274645c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'raw/ifpga: fix free function mismatch in interrupt config' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (14 preceding siblings ...)
  2024-10-23 21:15 ` patch 'raw/ifpga/base: fix use after free' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'examples/vhost: fix free function mismatch' " luca.boccassi
                   ` (61 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Morten Brørup, Konstantin Ananyev, Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 8a8601623860ef67574e8bce04429c48a9978abf Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:18 -0700
Subject: [PATCH] raw/ifpga: fix free function mismatch in interrupt config
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit d891a597895bb65db42404440660f82092780750 ]

The raw ifpga driver redefines malloc to be opae_malloc
and free to be opae_free; which is a bad idea.

This leads to case where interrupt efd array is allocated with calloc()
and then passed to rte_free.
The workaround is to allocate the array with rte_calloc() instead.

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 1020adcf6e..aa5d8b1a43 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1498,7 +1498,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
 
 		nb_intr = rte_intr_nb_intr_get(*intr_handle);
 
-		intr_efds = calloc(nb_intr, sizeof(int));
+		intr_efds = rte_calloc("ifpga_efds", nb_intr, sizeof(int), 0);
 		if (!intr_efds)
 			return -ENOMEM;
 
@@ -1507,7 +1507,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
 
 		ret = opae_acc_set_irq(acc, vec_start, count, intr_efds);
 		if (ret) {
-			free(intr_efds);
+			rte_free(intr_efds);
 			return -EINVAL;
 		}
 	}
@@ -1516,13 +1516,13 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
 	ret = rte_intr_callback_register(*intr_handle,
 			handler, (void *)arg);
 	if (ret) {
-		free(intr_efds);
+		rte_free(intr_efds);
 		return -EINVAL;
 	}
 
 	IFPGA_RAWDEV_PMD_INFO("success register %s interrupt\n", name);
 
-	free(intr_efds);
+	rte_free(intr_efds);
 	return 0;
 }
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.198059968 +0100
+++ 0017-raw-ifpga-fix-free-function-mismatch-in-interrupt-co.patch	2024-10-23 22:16:40.451940874 +0100
@@ -1 +1 @@
-From d891a597895bb65db42404440660f82092780750 Mon Sep 17 00:00:00 2001
+From 8a8601623860ef67574e8bce04429c48a9978abf Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit d891a597895bb65db42404440660f82092780750 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 113a22b0a7..5b9b596435 100644
+index 1020adcf6e..aa5d8b1a43 100644
@@ -31 +32 @@
-@@ -1499,7 +1499,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
+@@ -1498,7 +1498,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
@@ -40 +41 @@
-@@ -1508,7 +1508,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
+@@ -1507,7 +1507,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
@@ -49 +50 @@
-@@ -1517,13 +1517,13 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
+@@ -1516,13 +1516,13 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
@@ -58 +59 @@
- 	IFPGA_RAWDEV_PMD_INFO("success register %s interrupt", name);
+ 	IFPGA_RAWDEV_PMD_INFO("success register %s interrupt\n", name);

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

* patch 'examples/vhost: fix free function mismatch' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (15 preceding siblings ...)
  2024-10-23 21:15 ` patch 'raw/ifpga: fix free function mismatch in interrupt config' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:15 ` patch 'net/nfb: fix use after free' " luca.boccassi
                   ` (60 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Chengwen Feng, Chenbo Xia, Morten Brørup,
	Konstantin Ananyev, Wathsala Vithanage, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From afdb0a605db01cbc2b2f9e32b47e28680e71927a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2024 09:47:09 -0700
Subject: [PATCH] examples/vhost: fix free function mismatch
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit ae67f7d0256687fdfb24d27ee94b20d88c65108e ]

The pointer bdev is allocated with rte_zmalloc() and then
incorrectly freed with free() which will lead to pool corruption.

Bugzilla ID: 1553
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 examples/vhost_blk/vhost_blk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
index 3709d7ed06..197ad6250b 100644
--- a/examples/vhost_blk/vhost_blk.c
+++ b/examples/vhost_blk/vhost_blk.c
@@ -785,7 +785,7 @@ vhost_blk_bdev_construct(const char *bdev_name,
 	bdev->data = rte_zmalloc(NULL, blk_cnt * blk_size, 0);
 	if (!bdev->data) {
 		fprintf(stderr, "No enough reserved huge memory for disk\n");
-		free(bdev);
+		rte_free(bdev);
 		return NULL;
 	}
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.238103069 +0100
+++ 0018-examples-vhost-fix-free-function-mismatch.patch	2024-10-23 22:16:40.451940874 +0100
@@ -1 +1 @@
-From ae67f7d0256687fdfb24d27ee94b20d88c65108e Mon Sep 17 00:00:00 2001
+From afdb0a605db01cbc2b2f9e32b47e28680e71927a Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit ae67f7d0256687fdfb24d27ee94b20d88c65108e ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 03f1ac9c3f..9c9e326949 100644
+index 3709d7ed06..197ad6250b 100644
@@ -30 +31 @@
-@@ -776,7 +776,7 @@ vhost_blk_bdev_construct(const char *bdev_name,
+@@ -785,7 +785,7 @@ vhost_blk_bdev_construct(const char *bdev_name,

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

* patch 'net/nfb: fix use after free' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (16 preceding siblings ...)
  2024-10-23 21:15 ` patch 'examples/vhost: fix free function mismatch' " luca.boccassi
@ 2024-10-23 21:15 ` luca.boccassi
  2024-10-23 21:16 ` patch 'power: enable CPPC' " luca.boccassi
                   ` (59 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:15 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From d56b8cfa79131b17c1f40a2f2708a42a3bc94159 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 10 Oct 2024 19:11:07 +0200
Subject: [PATCH] net/nfb: fix use after free

[ upstream commit 76da9834ebb6e43e005bd5895ff4568d0e7be78f ]

With the annotations added to the allocation functions
in commit 80da7efbb4c4 ("eal: annotate allocation functions"),
more issues are detected at compilation time:

nfb_rx.c:133:28: error: pointer 'rxq' used after 'rte_free'

It is fixed by moving the assignment before freeing the parent pointer.

Fixes: 6435f9a0ac22 ("net/nfb: add new netcope driver")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/nfb/nfb_rx.c | 2 +-
 drivers/net/nfb/nfb_tx.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfb/nfb_rx.c b/drivers/net/nfb/nfb_rx.c
index 8a9b232305..7941197b77 100644
--- a/drivers/net/nfb/nfb_rx.c
+++ b/drivers/net/nfb/nfb_rx.c
@@ -129,7 +129,7 @@ nfb_eth_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
 
 	if (rxq->queue != NULL) {
 		ndp_close_rx_queue(rxq->queue);
-		rte_free(rxq);
 		rxq->queue = NULL;
+		rte_free(rxq);
 	}
 }
diff --git a/drivers/net/nfb/nfb_tx.c b/drivers/net/nfb/nfb_tx.c
index d49fc324e7..5c38d69934 100644
--- a/drivers/net/nfb/nfb_tx.c
+++ b/drivers/net/nfb/nfb_tx.c
@@ -108,7 +108,7 @@ nfb_eth_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
 
 	if (txq->queue != NULL) {
 		ndp_close_tx_queue(txq->queue);
-		rte_free(txq);
 		txq->queue = NULL;
+		rte_free(txq);
 	}
 }
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.271460365 +0100
+++ 0019-net-nfb-fix-use-after-free.patch	2024-10-23 22:16:40.451940874 +0100
@@ -1 +1 @@
-From 76da9834ebb6e43e005bd5895ff4568d0e7be78f Mon Sep 17 00:00:00 2001
+From d56b8cfa79131b17c1f40a2f2708a42a3bc94159 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 76da9834ebb6e43e005bd5895ff4568d0e7be78f ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index f72afafe8f..462bc3b50d 100644
+index 8a9b232305..7941197b77 100644
@@ -38 +39 @@
-index a1318a4205..cf99268c43 100644
+index d49fc324e7..5c38d69934 100644

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

* patch 'power: enable CPPC' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (17 preceding siblings ...)
  2024-10-23 21:15 ` patch 'net/nfb: fix use after free' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'fib6: add runtime checks in AVX512 lookup' " luca.boccassi
                   ` (58 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Wathsala Vithanage; +Cc: Dhruv Tripathi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 2bb52b6763e360c1811cb0e80967d9eccfd77a1d Mon Sep 17 00:00:00 2001
From: Wathsala Vithanage <wathsala.vithanage@arm.com>
Date: Thu, 10 Oct 2024 14:17:36 +0000
Subject: [PATCH] power: enable CPPC

[ upstream commit 35220c7cb3aff022b3a41919139496326ef6eecc ]

Power library already supports Linux CPPC driver,
but initialization was failing.
Enable its use in the drivers check,
and fix the name of the CPPC driver name.

Fixes: ef1cc88f1837 ("power: support cppc_cpufreq driver")

Signed-off-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
Reviewed-by: Dhruv Tripathi <dhruv.tripathi@arm.com>
---
 lib/power/power_cppc_cpufreq.c |  2 +-
 lib/power/rte_power_pmd_mgmt.c | 12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/lib/power/power_cppc_cpufreq.c b/lib/power/power_cppc_cpufreq.c
index fc9cffef91..d6cc58cb3b 100644
--- a/lib/power/power_cppc_cpufreq.c
+++ b/lib/power/power_cppc_cpufreq.c
@@ -35,7 +35,7 @@
 #define POWER_SYSFILE_SYS_MAX \
 		"/sys/devices/system/cpu/cpu%u/cpufreq/cpuinfo_max_freq"
 
-#define POWER_CPPC_DRIVER "cppc-cpufreq"
+#define POWER_CPPC_DRIVER "cppc_cpufreq"
 #define BUS_FREQ     100000
 
 enum power_state {
diff --git a/lib/power/rte_power_pmd_mgmt.c b/lib/power/rte_power_pmd_mgmt.c
index f9a2606e6c..18a9819289 100644
--- a/lib/power/rte_power_pmd_mgmt.c
+++ b/lib/power/rte_power_pmd_mgmt.c
@@ -419,10 +419,11 @@ check_scale(unsigned int lcore)
 {
 	enum power_management_env env;
 
-	/* only PSTATE and ACPI modes are supported */
+	/* only PSTATE, ACPI and CPPC modes are supported */
 	if (!rte_power_check_env_supported(PM_ENV_ACPI_CPUFREQ) &&
-	    !rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ)) {
-		RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes are supported\n");
+			!rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ) &&
+			!rte_power_check_env_supported(PM_ENV_CPPC_CPUFREQ)) {
+		RTE_LOG(DEBUG, POWER, "Only ACPI, PSTATE, or CPPC modes are supported\n");
 		return -ENOTSUP;
 	}
 	/* ensure we could initialize the power library */
@@ -431,8 +432,9 @@ check_scale(unsigned int lcore)
 
 	/* ensure we initialized the correct env */
 	env = rte_power_get_env();
-	if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ) {
-		RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes were initialized\n");
+	if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ &&
+			env != PM_ENV_CPPC_CPUFREQ) {
+		RTE_LOG(DEBUG, POWER, "Unable to initialize ACPI, PSTATE, or CPPC modes\n");
 		return -ENOTSUP;
 	}
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.306702521 +0100
+++ 0020-power-enable-CPPC.patch	2024-10-23 22:16:40.451940874 +0100
@@ -1 +1 @@
-From 35220c7cb3aff022b3a41919139496326ef6eecc Mon Sep 17 00:00:00 2001
+From 2bb52b6763e360c1811cb0e80967d9eccfd77a1d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 35220c7cb3aff022b3a41919139496326ef6eecc ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- lib/power/rte_power_pmd_mgmt.c | 11 ++++++-----
- 2 files changed, 7 insertions(+), 6 deletions(-)
+ lib/power/rte_power_pmd_mgmt.c | 12 +++++++-----
+ 2 files changed, 8 insertions(+), 6 deletions(-)
@@ -22 +23 @@
-index 32aaacb948..e68b39b424 100644
+index fc9cffef91..d6cc58cb3b 100644
@@ -25 +26 @@
-@@ -36,7 +36,7 @@
+@@ -35,7 +35,7 @@
@@ -35 +36 @@
-index b1c18a5f56..830a6c7a97 100644
+index f9a2606e6c..18a9819289 100644
@@ -38 +39 @@
-@@ -419,11 +419,12 @@ check_scale(unsigned int lcore)
+@@ -419,10 +419,11 @@ check_scale(unsigned int lcore)
@@ -43 +44 @@
-+	/* only PSTATE, AMD-PSTATE, ACPI and CPPC modes are supported */
++	/* only PSTATE, ACPI and CPPC modes are supported */
@@ -45,4 +46,3 @@
- 			!rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ) &&
--			!rte_power_check_env_supported(PM_ENV_AMD_PSTATE_CPUFREQ)) {
--		POWER_LOG(DEBUG, "Neither ACPI nor PSTATE modes are supported");
-+			!rte_power_check_env_supported(PM_ENV_AMD_PSTATE_CPUFREQ) &&
+-	    !rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ)) {
+-		RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes are supported\n");
++			!rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ) &&
@@ -50 +50 @@
-+		POWER_LOG(DEBUG, "Only ACPI, PSTATE, AMD-PSTATE, or CPPC modes are supported");
++		RTE_LOG(DEBUG, POWER, "Only ACPI, PSTATE, or CPPC modes are supported\n");
@@ -54 +54,2 @@
-@@ -433,8 +434,8 @@ check_scale(unsigned int lcore)
+@@ -431,8 +432,9 @@ check_scale(unsigned int lcore)
+ 
@@ -57,5 +58,5 @@
- 	if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ &&
--			env != PM_ENV_AMD_PSTATE_CPUFREQ) {
--		POWER_LOG(DEBUG, "Neither ACPI nor PSTATE modes were initialized");
-+			env != PM_ENV_AMD_PSTATE_CPUFREQ && env != PM_ENV_CPPC_CPUFREQ) {
-+		POWER_LOG(DEBUG, "Unable to initialize ACPI, PSTATE, AMD-PSTATE, or CPPC modes");
+-	if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ) {
+-		RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes were initialized\n");
++	if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ &&
++			env != PM_ENV_CPPC_CPUFREQ) {
++		RTE_LOG(DEBUG, POWER, "Unable to initialize ACPI, PSTATE, or CPPC modes\n");

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

* patch 'fib6: add runtime checks in AVX512 lookup' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (18 preceding siblings ...)
  2024-10-23 21:16 ` patch 'power: enable CPPC' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'app/dumpcap: fix handling of jumbo frames' " luca.boccassi
                   ` (57 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From e696cfc2f8eb796296d07c932a29f78216d04006 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Tue, 8 Oct 2024 17:31:36 +0000
Subject: [PATCH] fib6: add runtime checks in AVX512 lookup

[ upstream commit 45ddc5660f9830f3b7b39ddaf57af02e80d589a4 ]

AVX512 lookup function requires CPU to support RTE_CPUFLAG_AVX512DQ and
RTE_CPUFLAG_AVX512BW. Add runtime checks of these two flags when deciding
if vector function can be used.

Fixes: 1e5630e40d95 ("fib6: add AVX512 lookup")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/fib/trie.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/fib/trie.c b/lib/fib/trie.c
index 09470e7287..7b33cdaa7b 100644
--- a/lib/fib/trie.c
+++ b/lib/fib/trie.c
@@ -46,8 +46,10 @@ static inline rte_fib6_lookup_fn_t
 get_vector_fn(enum rte_fib_trie_nh_sz nh_sz)
 {
 #ifdef CC_TRIE_AVX512_SUPPORT
-	if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) <= 0) ||
-			(rte_vect_get_max_simd_bitwidth() < RTE_VECT_SIMD_512))
+	if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) <= 0 ||
+			rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512DQ) <= 0 ||
+			rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512BW) <= 0 ||
+			rte_vect_get_max_simd_bitwidth() < RTE_VECT_SIMD_512)
 		return NULL;
 	switch (nh_sz) {
 	case RTE_FIB6_TRIE_2B:
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.340620284 +0100
+++ 0021-fib6-add-runtime-checks-in-AVX512-lookup.patch	2024-10-23 22:16:40.451940874 +0100
@@ -1 +1 @@
-From 45ddc5660f9830f3b7b39ddaf57af02e80d589a4 Mon Sep 17 00:00:00 2001
+From e696cfc2f8eb796296d07c932a29f78216d04006 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 45ddc5660f9830f3b7b39ddaf57af02e80d589a4 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/dumpcap: fix handling of jumbo frames' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (19 preceding siblings ...)
  2024-10-23 21:16 ` patch 'fib6: add runtime checks in AVX512 lookup' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/cnxk: fix Rx timestamp handling for VF' " luca.boccassi
                   ` (56 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Tianli Lai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/65c229defe6b3bc0843bf34cf998718e317528d9

Thanks.

Luca Boccassi

---
From 65c229defe6b3bc0843bf34cf998718e317528d9 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 3 Oct 2024 15:09:03 -0700
Subject: [PATCH] app/dumpcap: fix handling of jumbo frames

[ upstream commit 5c0f970c0d0e2a963a7a970a71cad4f4244414a5 ]

If dumpcap (in legacy pcap mode) tried to handle a large segmented
frame it would core dump because rte_pktmbuf_read() would return NULL.
Fix by using same logic as in pcap PMD.

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

Reported-by: Tianli Lai <laitianli@tom.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/dumpcap/main.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 81c9d7d2f1..7e8aa5d76e 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -740,7 +740,7 @@ static ssize_t
 pcap_write_packets(pcap_dumper_t *dumper,
 		   struct rte_mbuf *pkts[], uint16_t n)
 {
-	uint8_t temp_data[snaplen];
+	uint8_t temp_data[RTE_ETHER_MAX_JUMBO_FRAME_LEN];
 	struct pcap_pkthdr header;
 	uint16_t i;
 	size_t total = 0;
@@ -749,14 +749,19 @@ pcap_write_packets(pcap_dumper_t *dumper,
 
 	for (i = 0; i < n; i++) {
 		struct rte_mbuf *m = pkts[i];
+		size_t len, caplen;
 
-		header.len = rte_pktmbuf_pkt_len(m);
-		header.caplen = RTE_MIN(header.len, snaplen);
+		len = caplen = rte_pktmbuf_pkt_len(m);
+		if (unlikely(!rte_pktmbuf_is_contiguous(m) && len > snaplen))
+			caplen = snaplen;
+
+		header.len = len;
+		header.caplen = caplen;
 
 		pcap_dump((u_char *)dumper, &header,
-			  rte_pktmbuf_read(m, 0, header.caplen, temp_data));
+			  rte_pktmbuf_read(m, 0, caplen, temp_data));
 
-		total += sizeof(header) + header.len;
+		total += sizeof(header) + caplen;
 	}
 
 	return total;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.375045224 +0100
+++ 0022-app-dumpcap-fix-handling-of-jumbo-frames.patch	2024-10-23 22:16:40.455941029 +0100
@@ -1 +1 @@
-From 5c0f970c0d0e2a963a7a970a71cad4f4244414a5 Mon Sep 17 00:00:00 2001
+From 65c229defe6b3bc0843bf34cf998718e317528d9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5c0f970c0d0e2a963a7a970a71cad4f4244414a5 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6feb8f5672..fcfaa19951 100644
+index 81c9d7d2f1..7e8aa5d76e 100644
@@ -23 +24 @@
-@@ -902,7 +902,7 @@ static ssize_t
+@@ -740,7 +740,7 @@ static ssize_t
@@ -27 +28 @@
--	uint8_t temp_data[RTE_MBUF_DEFAULT_BUF_SIZE];
+-	uint8_t temp_data[snaplen];
@@ -32 +33 @@
-@@ -911,14 +911,19 @@ pcap_write_packets(pcap_dumper_t *dumper,
+@@ -749,14 +749,19 @@ pcap_write_packets(pcap_dumper_t *dumper,
@@ -39 +40 @@
--		header.caplen = RTE_MIN(header.len, sizeof(temp_data));
+-		header.caplen = RTE_MIN(header.len, snaplen);
@@ -41,2 +42,2 @@
-+		if (unlikely(!rte_pktmbuf_is_contiguous(m) && len > sizeof(temp_data)))
-+			caplen = sizeof(temp_data);
++		if (unlikely(!rte_pktmbuf_is_contiguous(m) && len > snaplen))
++			caplen = snaplen;

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

* patch 'net/cnxk: fix Rx timestamp handling for VF' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (20 preceding siblings ...)
  2024-10-23 21:16 ` patch 'app/dumpcap: fix handling of jumbo frames' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/cnxk: fix Rx offloads to handle timestamp' " luca.boccassi
                   ` (55 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Rakesh Kudurumalla; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 8d056353d1a1c9000f7375825c3d4bad457ef8b1 Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Tue, 1 Oct 2024 11:30:40 +0530
Subject: [PATCH] net/cnxk: fix Rx timestamp handling for VF

[ upstream commit 0efd93a2740d1ab13fc55656ce9e55f79e09c4f3 ]

When timestamp is enabled on PF in kernel and respective
VF is attached to application in DPDK then mbuf_addr is getting
corrupted in cnxk_nix_timestamp_dynfield() as
"tstamp_dynfield_offset" is zero for PTP enabled PF
This patch fixes the same.

Fixes: 76dff63874e3 ("net/cnxk: support base PTP timesync")

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 drivers/net/cnxk/cn10k_ethdev.c | 12 +++++++++++-
 drivers/net/cnxk/cn9k_ethdev.c  | 12 +++++++++++-
 drivers/net/cnxk/cnxk_ethdev.c  |  2 +-
 3 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/drivers/net/cnxk/cn10k_ethdev.c b/drivers/net/cnxk/cn10k_ethdev.c
index 4658713591..ed979d42af 100644
--- a/drivers/net/cnxk/cn10k_ethdev.c
+++ b/drivers/net/cnxk/cn10k_ethdev.c
@@ -381,7 +381,7 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
 	struct cnxk_eth_dev *dev = (struct cnxk_eth_dev *)nix;
 	struct rte_eth_dev *eth_dev;
 	struct cn10k_eth_rxq *rxq;
-	int i;
+	int i, rc;
 
 	if (!dev)
 		return -EINVAL;
@@ -404,7 +404,17 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
 		 * and MTU setting also requires MBOX message to be
 		 * sent(VF->PF)
 		 */
+		if (dev->ptp_en) {
+			rc = rte_mbuf_dyn_rx_timestamp_register
+				(&dev->tstamp.tstamp_dynfield_offset,
+				 &dev->tstamp.rx_tstamp_dynflag);
+			if (rc != 0) {
+				plt_err("Failed to register Rx timestamp field/flag");
+				return -EINVAL;
+			}
+		}
 		eth_dev->rx_pkt_burst = nix_ptp_vf_burst;
+		rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = eth_dev->rx_pkt_burst;
 		rte_mb();
 	}
 
diff --git a/drivers/net/cnxk/cn9k_ethdev.c b/drivers/net/cnxk/cn9k_ethdev.c
index 3b702d9696..3243c9f82c 100644
--- a/drivers/net/cnxk/cn9k_ethdev.c
+++ b/drivers/net/cnxk/cn9k_ethdev.c
@@ -362,7 +362,7 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
 	struct cnxk_eth_dev *dev = (struct cnxk_eth_dev *)nix;
 	struct rte_eth_dev *eth_dev;
 	struct cn9k_eth_rxq *rxq;
-	int i;
+	int i, rc;
 
 	if (!dev)
 		return -EINVAL;
@@ -385,7 +385,17 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
 		 * and MTU setting also requires MBOX message to be
 		 * sent(VF->PF)
 		 */
+		if (dev->ptp_en) {
+			rc = rte_mbuf_dyn_rx_timestamp_register
+				(&dev->tstamp.tstamp_dynfield_offset,
+				 &dev->tstamp.rx_tstamp_dynflag);
+			if (rc != 0) {
+				plt_err("Failed to register Rx timestamp field/flag");
+				return -EINVAL;
+			}
+		}
 		eth_dev->rx_pkt_burst = nix_ptp_vf_burst;
+		rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = eth_dev->rx_pkt_burst;
 		rte_mb();
 	}
 
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 56b26a9650..73f59dede1 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -1684,7 +1684,7 @@ cnxk_nix_dev_start(struct rte_eth_dev *eth_dev)
 	else
 		cnxk_eth_dev_ops.timesync_disable(eth_dev);
 
-	if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
+	if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP || dev->ptp_en) {
 		rc = rte_mbuf_dyn_rx_timestamp_register
 			(&dev->tstamp.tstamp_dynfield_offset,
 			 &dev->tstamp.rx_tstamp_dynflag);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.411028371 +0100
+++ 0023-net-cnxk-fix-Rx-timestamp-handling-for-VF.patch	2024-10-23 22:16:40.455941029 +0100
@@ -1 +1 @@
-From 0efd93a2740d1ab13fc55656ce9e55f79e09c4f3 Mon Sep 17 00:00:00 2001
+From 8d056353d1a1c9000f7375825c3d4bad457ef8b1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0efd93a2740d1ab13fc55656ce9e55f79e09c4f3 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index ad6bc1ec21..46476e386a 100644
+index 4658713591..ed979d42af 100644
@@ -26 +27 @@
-@@ -473,7 +473,7 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
+@@ -381,7 +381,7 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
@@ -35 +36 @@
-@@ -496,7 +496,17 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
+@@ -404,7 +404,17 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
@@ -54 +55 @@
-index 84c88655f8..5417628368 100644
+index 3b702d9696..3243c9f82c 100644
@@ -57 +58 @@
-@@ -432,7 +432,7 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
+@@ -362,7 +362,7 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
@@ -66 +67 @@
-@@ -455,7 +455,17 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
+@@ -385,7 +385,17 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
@@ -85 +86 @@
-index 33bac55704..74b266ad58 100644
+index 56b26a9650..73f59dede1 100644
@@ -88 +89 @@
-@@ -1751,7 +1751,7 @@ cnxk_nix_dev_start(struct rte_eth_dev *eth_dev)
+@@ -1684,7 +1684,7 @@ cnxk_nix_dev_start(struct rte_eth_dev *eth_dev)

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

* patch 'net/cnxk: fix Rx offloads to handle timestamp' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (21 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/cnxk: fix Rx timestamp handling for VF' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'event/cnxk: fix Rx timestamp handling' " luca.boccassi
                   ` (54 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Rakesh Kudurumalla; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1601becebabb67227a7aff036100fd4cd1cb81a5

Thanks.

Luca Boccassi

---
From 1601becebabb67227a7aff036100fd4cd1cb81a5 Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Tue, 1 Oct 2024 11:30:41 +0530
Subject: [PATCH] net/cnxk: fix Rx offloads to handle timestamp

[ upstream commit f12dab814f0898c661d32f6cdaaae6a11bbacb6e ]

RX offloads flags are updated to handle timestamp
in VF when PTP is enabled in respective PF in kernel.

Fixes: c7c7c8ed7d47 ("net/cnxk: get PTP status")

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 drivers/net/cnxk/cn10k_ethdev.c | 6 +++++-
 drivers/net/cnxk/cn9k_ethdev.c  | 5 ++++-
 drivers/net/cnxk/cnxk_ethdev.h  | 7 +++++++
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/net/cnxk/cn10k_ethdev.c b/drivers/net/cnxk/cn10k_ethdev.c
index ed979d42af..3dd71fc70d 100644
--- a/drivers/net/cnxk/cn10k_ethdev.c
+++ b/drivers/net/cnxk/cn10k_ethdev.c
@@ -30,7 +30,7 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev)
 	if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SCATTER)
 		flags |= NIX_RX_MULTI_SEG_F;
 
-	if ((dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP))
+	if ((dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) || dev->ptp_en)
 		flags |= NIX_RX_OFFLOAD_TSTAMP_F;
 
 	if (!dev->ptype_disable)
@@ -416,6 +416,10 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
 		eth_dev->rx_pkt_burst = nix_ptp_vf_burst;
 		rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = eth_dev->rx_pkt_burst;
 		rte_mb();
+		if (dev->cnxk_sso_ptp_tstamp_cb)
+			dev->cnxk_sso_ptp_tstamp_cb(eth_dev->data->port_id,
+						    NIX_RX_OFFLOAD_TSTAMP_F, dev->ptp_en);
+
 	}
 
 	return 0;
diff --git a/drivers/net/cnxk/cn9k_ethdev.c b/drivers/net/cnxk/cn9k_ethdev.c
index 3243c9f82c..e5ab0f3697 100644
--- a/drivers/net/cnxk/cn9k_ethdev.c
+++ b/drivers/net/cnxk/cn9k_ethdev.c
@@ -30,7 +30,7 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev)
 	if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SCATTER)
 		flags |= NIX_RX_MULTI_SEG_F;
 
-	if ((dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP))
+	if ((dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) || dev->ptp_en)
 		flags |= NIX_RX_OFFLOAD_TSTAMP_F;
 
 	if (!dev->ptype_disable)
@@ -397,6 +397,9 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
 		eth_dev->rx_pkt_burst = nix_ptp_vf_burst;
 		rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = eth_dev->rx_pkt_burst;
 		rte_mb();
+		if (dev->cnxk_sso_ptp_tstamp_cb)
+			dev->cnxk_sso_ptp_tstamp_cb(eth_dev->data->port_id,
+						    NIX_RX_OFFLOAD_TSTAMP_F, dev->ptp_en);
 	}
 
 	return 0;
diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h
index 83d6e9398f..4202b647f4 100644
--- a/drivers/net/cnxk/cnxk_ethdev.h
+++ b/drivers/net/cnxk/cnxk_ethdev.h
@@ -443,6 +443,13 @@ struct cnxk_eth_dev {
 	/* Reassembly dynfield/flag offsets */
 	int reass_dynfield_off;
 	int reass_dynflag_bit;
+
+	/* SSO event dev */
+	void *evdev_priv;
+
+	/* SSO event dev ptp  */
+	void (*cnxk_sso_ptp_tstamp_cb)
+	     (uint16_t port_id, uint16_t flags, bool ptp_en);
 };
 
 struct cnxk_eth_rxq_sp {
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.447204165 +0100
+++ 0024-net-cnxk-fix-Rx-offloads-to-handle-timestamp.patch	2024-10-23 22:16:40.455941029 +0100
@@ -1 +1 @@
-From f12dab814f0898c661d32f6cdaaae6a11bbacb6e Mon Sep 17 00:00:00 2001
+From 1601becebabb67227a7aff036100fd4cd1cb81a5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f12dab814f0898c661d32f6cdaaae6a11bbacb6e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 46476e386a..f5b485650e 100644
+index ed979d42af..3dd71fc70d 100644
@@ -32 +33 @@
-@@ -508,6 +508,10 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
+@@ -416,6 +416,10 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
@@ -44 +45 @@
-index 5417628368..c419593a23 100644
+index 3243c9f82c..e5ab0f3697 100644
@@ -56 +57 @@
-@@ -467,6 +467,9 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
+@@ -397,6 +397,9 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en)
@@ -67 +68 @@
-index 687c60c27d..5920488e1a 100644
+index 83d6e9398f..4202b647f4 100644
@@ -70,4 +71,4 @@
-@@ -433,6 +433,13 @@ struct cnxk_eth_dev {
- 
- 	/* Eswitch domain ID */
- 	uint16_t switch_domain_id;
+@@ -443,6 +443,13 @@ struct cnxk_eth_dev {
+ 	/* Reassembly dynfield/flag offsets */
+ 	int reass_dynfield_off;
+ 	int reass_dynflag_bit;

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

* patch 'event/cnxk: fix Rx timestamp handling' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (22 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/cnxk: fix Rx offloads to handle timestamp' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'common/cnxk: fix CPT HW word size for outbound SA' " luca.boccassi
                   ` (53 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Rakesh Kudurumalla; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/082cd77172416b39740151f61c0559ec1a482335

Thanks.

Luca Boccassi

---
From 082cd77172416b39740151f61c0559ec1a482335 Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Tue, 1 Oct 2024 11:30:42 +0530
Subject: [PATCH] event/cnxk: fix Rx timestamp handling

[ upstream commit 697883bcb0a84f06b52064ecbf60c619edbf9083 ]

Handle timestamp correctly for VF when PTP is enabled
before running application in event mode by updating
RX offload flags in link up notification.

Fixes: f1cdb3c5b616 ("net/cnxk: enable PTP for event Rx adapter")

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 drivers/event/cnxk/cn10k_eventdev.c      | 32 ++++++++++++++++++++++++
 drivers/event/cnxk/cn9k_eventdev.c       | 31 +++++++++++++++++++++++
 drivers/event/cnxk/cnxk_eventdev_adptr.c |  2 +-
 3 files changed, 64 insertions(+), 1 deletion(-)

diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c
index d8e7c83462..a1ddf402f1 100644
--- a/drivers/event/cnxk/cn10k_eventdev.c
+++ b/drivers/event/cnxk/cn10k_eventdev.c
@@ -864,12 +864,40 @@ cn10k_sso_set_priv_mem(const struct rte_eventdev *event_dev, void *lookup_mem, u
 	}
 }
 
+static void
+eventdev_fops_tstamp_update(struct rte_eventdev *event_dev)
+{
+	struct rte_event_fp_ops *fp_op =
+		rte_event_fp_ops + event_dev->data->dev_id;
+
+	fp_op->dequeue = event_dev->dequeue;
+	fp_op->dequeue_burst = event_dev->dequeue_burst;
+}
+
+static void
+cn10k_sso_tstamp_hdl_update(uint16_t port_id, uint16_t flags, bool ptp_en)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	struct cnxk_eth_dev *cnxk_eth_dev = dev->data->dev_private;
+	struct rte_eventdev *event_dev = cnxk_eth_dev->evdev_priv;
+	struct cnxk_sso_evdev *evdev = cnxk_sso_pmd_priv(event_dev);
+
+	evdev->rx_offloads |= flags;
+	if (ptp_en)
+		evdev->tstamp[port_id] = &cnxk_eth_dev->tstamp;
+	else
+		evdev->tstamp[port_id] = NULL;
+	cn10k_sso_fp_fns_set((struct rte_eventdev *)(uintptr_t)event_dev);
+	eventdev_fops_tstamp_update(event_dev);
+}
+
 static int
 cn10k_sso_rx_adapter_queue_add(
 	const struct rte_eventdev *event_dev, const struct rte_eth_dev *eth_dev,
 	int32_t rx_queue_id,
 	const struct rte_event_eth_rx_adapter_queue_conf *queue_conf)
 {
+	struct cnxk_eth_dev *cnxk_eth_dev = eth_dev->data->dev_private;
 	struct cn10k_eth_rxq *rxq;
 	uint64_t meta_aura;
 	void *lookup_mem;
@@ -883,6 +911,10 @@ cn10k_sso_rx_adapter_queue_add(
 					   queue_conf);
 	if (rc)
 		return -EINVAL;
+
+	cnxk_eth_dev->cnxk_sso_ptp_tstamp_cb = cn10k_sso_tstamp_hdl_update;
+	cnxk_eth_dev->evdev_priv = (struct rte_eventdev *)(uintptr_t)event_dev;
+
 	rxq = eth_dev->data->rx_queues[0];
 	lookup_mem = rxq->lookup_mem;
 	meta_aura = rxq->meta_aura;
diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k_eventdev.c
index 803e7ddd07..88bce7e675 100644
--- a/drivers/event/cnxk/cn9k_eventdev.c
+++ b/drivers/event/cnxk/cn9k_eventdev.c
@@ -981,12 +981,40 @@ cn9k_sso_set_priv_mem(const struct rte_eventdev *event_dev, void *lookup_mem,
 	}
 }
 
+static void
+eventdev_fops_tstamp_update(struct rte_eventdev *event_dev)
+{
+	struct rte_event_fp_ops *fp_op =
+		rte_event_fp_ops + event_dev->data->dev_id;
+
+	fp_op->dequeue = event_dev->dequeue;
+	fp_op->dequeue_burst = event_dev->dequeue_burst;
+}
+
+static void
+cn9k_sso_tstamp_hdl_update(uint16_t port_id, uint16_t flags, bool ptp_en)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	struct cnxk_eth_dev *cnxk_eth_dev = dev->data->dev_private;
+	struct rte_eventdev *event_dev = cnxk_eth_dev->evdev_priv;
+	struct cnxk_sso_evdev *evdev = cnxk_sso_pmd_priv(event_dev);
+
+	evdev->rx_offloads |= flags;
+	if (ptp_en)
+		evdev->tstamp[port_id] = &cnxk_eth_dev->tstamp;
+	else
+		evdev->tstamp[port_id] = NULL;
+	cn9k_sso_fp_fns_set((struct rte_eventdev *)(uintptr_t)event_dev);
+	eventdev_fops_tstamp_update(event_dev);
+}
+
 static int
 cn9k_sso_rx_adapter_queue_add(
 	const struct rte_eventdev *event_dev, const struct rte_eth_dev *eth_dev,
 	int32_t rx_queue_id,
 	const struct rte_event_eth_rx_adapter_queue_conf *queue_conf)
 {
+	struct cnxk_eth_dev *cnxk_eth_dev = eth_dev->data->dev_private;
 	struct cn9k_eth_rxq *rxq;
 	void *lookup_mem;
 	int rc;
@@ -1000,6 +1028,9 @@ cn9k_sso_rx_adapter_queue_add(
 	if (rc)
 		return -EINVAL;
 
+	cnxk_eth_dev->cnxk_sso_ptp_tstamp_cb = cn9k_sso_tstamp_hdl_update;
+	cnxk_eth_dev->evdev_priv = (struct rte_eventdev *)(uintptr_t)event_dev;
+
 	rxq = eth_dev->data->rx_queues[0];
 	lookup_mem = rxq->lookup_mem;
 	cn9k_sso_set_priv_mem(event_dev, lookup_mem, 0);
diff --git a/drivers/event/cnxk/cnxk_eventdev_adptr.c b/drivers/event/cnxk/cnxk_eventdev_adptr.c
index e78d215630..8fcbd085a9 100644
--- a/drivers/event/cnxk/cnxk_eventdev_adptr.c
+++ b/drivers/event/cnxk/cnxk_eventdev_adptr.c
@@ -212,7 +212,7 @@ static void
 cnxk_sso_tstamp_cfg(uint16_t port_id, struct cnxk_eth_dev *cnxk_eth_dev,
 		    struct cnxk_sso_evdev *dev)
 {
-	if (cnxk_eth_dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)
+	if (cnxk_eth_dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP || cnxk_eth_dev->ptp_en)
 		dev->tstamp[port_id] = &cnxk_eth_dev->tstamp;
 }
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.482503400 +0100
+++ 0025-event-cnxk-fix-Rx-timestamp-handling.patch	2024-10-23 22:16:40.459941185 +0100
@@ -1 +1 @@
-From 697883bcb0a84f06b52064ecbf60c619edbf9083 Mon Sep 17 00:00:00 2001
+From 082cd77172416b39740151f61c0559ec1a482335 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 697883bcb0a84f06b52064ecbf60c619edbf9083 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 5bd779990e..c8767a1b2b 100644
+index d8e7c83462..a1ddf402f1 100644
@@ -24 +25 @@
-@@ -842,12 +842,40 @@ cn10k_sso_set_priv_mem(const struct rte_eventdev *event_dev, void *lookup_mem)
+@@ -864,12 +864,40 @@ cn10k_sso_set_priv_mem(const struct rte_eventdev *event_dev, void *lookup_mem, u
@@ -62,2 +62,0 @@
- 	struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
- 	struct roc_sso_hwgrp_stash stash;
@@ -65 +64,3 @@
-@@ -862,6 +890,10 @@ cn10k_sso_rx_adapter_queue_add(
+ 	uint64_t meta_aura;
+ 	void *lookup_mem;
+@@ -883,6 +911,10 @@ cn10k_sso_rx_adapter_queue_add(
@@ -75 +76 @@
- 	cn10k_sso_set_priv_mem(event_dev, lookup_mem);
+ 	meta_aura = rxq->meta_aura;
@@ -77 +78 @@
-index 28350d1275..377e910837 100644
+index 803e7ddd07..88bce7e675 100644
@@ -80 +81 @@
-@@ -911,12 +911,40 @@ cn9k_sso_set_priv_mem(const struct rte_eventdev *event_dev, void *lookup_mem)
+@@ -981,12 +981,40 @@ cn9k_sso_set_priv_mem(const struct rte_eventdev *event_dev, void *lookup_mem,
@@ -121 +122 @@
-@@ -930,6 +958,9 @@ cn9k_sso_rx_adapter_queue_add(
+@@ -1000,6 +1028,9 @@ cn9k_sso_rx_adapter_queue_add(
@@ -130 +131 @@
- 	cn9k_sso_set_priv_mem(event_dev, lookup_mem);
+ 	cn9k_sso_set_priv_mem(event_dev, lookup_mem, 0);
@@ -132 +133 @@
-index 2c049e7041..3cac42111a 100644
+index e78d215630..8fcbd085a9 100644
@@ -135 +136 @@
-@@ -213,7 +213,7 @@ static void
+@@ -212,7 +212,7 @@ static void

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

* patch 'common/cnxk: fix CPT HW word size for outbound SA' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (23 preceding siblings ...)
  2024-10-23 21:16 ` patch 'event/cnxk: fix Rx timestamp handling' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'common/cnxk: fix base log level' " luca.boccassi
                   ` (52 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 0b67f7f7599768a6324ef3d76314bc220f89947f Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Tue, 1 Oct 2024 11:30:48 +0530
Subject: [PATCH] common/cnxk: fix CPT HW word size for outbound SA

[ upstream commit 9587a324f28e84937c9efef534da542c30ff122b ]

Fix the CPT HW word size inited for outbound SA to be
two words.

Fixes: 5ece02e736c3 ("common/cnxk: use common SA init API for default options")

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

diff --git a/drivers/common/cnxk/roc_ie_ot.c b/drivers/common/cnxk/roc_ie_ot.c
index d0b7ad38f1..356bb8c5a5 100644
--- a/drivers/common/cnxk/roc_ie_ot.c
+++ b/drivers/common/cnxk/roc_ie_ot.c
@@ -38,5 +38,6 @@ roc_ot_ipsec_outb_sa_init(struct roc_ot_ipsec_outb_sa *sa)
 	offset = offsetof(struct roc_ot_ipsec_outb_sa, ctx);
 	sa->w0.s.ctx_push_size = (offset / ROC_CTX_UNIT_8B) + 1;
 	sa->w0.s.ctx_size = ROC_IE_OT_CTX_ILEN;
+	sa->w0.s.ctx_hdr_size = ROC_IE_OT_SA_CTX_HDR_SIZE;
 	sa->w0.s.aop_valid = 1;
 }
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.518242022 +0100
+++ 0026-common-cnxk-fix-CPT-HW-word-size-for-outbound-SA.patch	2024-10-23 22:16:40.459941185 +0100
@@ -1 +1 @@
-From 9587a324f28e84937c9efef534da542c30ff122b Mon Sep 17 00:00:00 2001
+From 0b67f7f7599768a6324ef3d76314bc220f89947f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9587a324f28e84937c9efef534da542c30ff122b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 465b2bc1fb..1b436dba72 100644
+index d0b7ad38f1..356bb8c5a5 100644

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

* patch 'common/cnxk: fix base log level' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (24 preceding siblings ...)
  2024-10-23 21:16 ` patch 'common/cnxk: fix CPT HW word size for outbound SA' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'baseband/acc: fix access to deallocated mem' " luca.boccassi
                   ` (51 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Rakesh Kudurumalla; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 5c7ce1ed01c4faab7e78e3435f33f3bebfd5fcbc Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Tue, 1 Oct 2024 14:17:10 +0530
Subject: [PATCH] common/cnxk: fix base log level

[ upstream commit adc561fc5352bd1f1c8e736a33bb9b03bbb95b3f ]

In a247fcd94598 changeset, the PMD log type is removed and
driver specific log type is added for CNXK.
This patch changes loglevel of CNXK from NOTICE to INFO
to display logs while running applications

Fixes: a247fcd94598 ("drivers: use dedicated log macros instead of PMD logtype")

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 drivers/common/cnxk/roc_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_platform.c b/drivers/common/cnxk/roc_platform.c
index ce0f9b870c..963b74ee7c 100644
--- a/drivers/common/cnxk/roc_platform.c
+++ b/drivers/common/cnxk/roc_platform.c
@@ -60,7 +60,7 @@ roc_plt_init(void)
 	return 0;
 }
 
-RTE_LOG_REGISTER(cnxk_logtype_base, pmd.cnxk.base, NOTICE);
+RTE_LOG_REGISTER(cnxk_logtype_base, pmd.cnxk.base, INFO);
 RTE_LOG_REGISTER(cnxk_logtype_mbox, pmd.cnxk.mbox, NOTICE);
 RTE_LOG_REGISTER(cnxk_logtype_cpt, pmd.crypto.cnxk, NOTICE);
 RTE_LOG_REGISTER(cnxk_logtype_npa, pmd.mempool.cnxk, NOTICE);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.553975373 +0100
+++ 0027-common-cnxk-fix-base-log-level.patch	2024-10-23 22:16:40.459941185 +0100
@@ -1 +1 @@
-From adc561fc5352bd1f1c8e736a33bb9b03bbb95b3f Mon Sep 17 00:00:00 2001
+From 5c7ce1ed01c4faab7e78e3435f33f3bebfd5fcbc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit adc561fc5352bd1f1c8e736a33bb9b03bbb95b3f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 30379c7e5e..f1e0a93d97 100644
+index ce0f9b870c..963b74ee7c 100644
@@ -23 +24 @@
-@@ -85,7 +85,7 @@ roc_plt_init(void)
+@@ -60,7 +60,7 @@ roc_plt_init(void)
@@ -27,5 +28,5 @@
--RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_base, base, NOTICE);
-+RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_base, base, INFO);
- RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_mbox, mbox, NOTICE);
- RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_cpt, crypto, NOTICE);
- RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_ml, ml, NOTICE);
+-RTE_LOG_REGISTER(cnxk_logtype_base, pmd.cnxk.base, NOTICE);
++RTE_LOG_REGISTER(cnxk_logtype_base, pmd.cnxk.base, INFO);
+ RTE_LOG_REGISTER(cnxk_logtype_mbox, pmd.cnxk.mbox, NOTICE);
+ RTE_LOG_REGISTER(cnxk_logtype_cpt, pmd.crypto.cnxk, NOTICE);
+ RTE_LOG_REGISTER(cnxk_logtype_npa, pmd.mempool.cnxk, NOTICE);

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

* patch 'baseband/acc: fix access to deallocated mem' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (25 preceding siblings ...)
  2024-10-23 21:16 ` patch 'common/cnxk: fix base log level' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'vhost: fix offset while mapping log base address' " luca.boccassi
                   ` (50 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From e8d41d4db2561550810000b00b6c6775907833c3 Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Wed, 9 Oct 2024 14:12:51 -0700
Subject: [PATCH] baseband/acc: fix access to deallocated mem

[ upstream commit a090b8ffe73ed21d54e17e5d5711d2e817d7229e ]

Prevent op_addr access during queue_stop operation, as this memory may
have been deallocated.

Fixes: e640f6cdfa84 ("baseband/acc200: add LDPC processing")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc/rte_acc100_pmd.c | 36 --------------------------
 drivers/baseband/acc/rte_acc200_pmd.c | 37 +--------------------------
 2 files changed, 1 insertion(+), 72 deletions(-)

diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
index 955c0236e4..a5b1bb66eb 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -837,51 +837,15 @@ free_q:
 	return ret;
 }
 
-static inline void
-acc100_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
-		uint16_t index)
-{
-	if (op == NULL)
-		return;
-	if (op_type == RTE_BBDEV_OP_LDPC_DEC)
-		rte_bbdev_log(DEBUG,
-			"  Op 5GUL %d %d %d %d %d %d %d %d %d %d %d %d",
-			index,
-			op->ldpc_dec.basegraph, op->ldpc_dec.z_c,
-			op->ldpc_dec.n_cb, op->ldpc_dec.q_m,
-			op->ldpc_dec.n_filler, op->ldpc_dec.cb_params.e,
-			op->ldpc_dec.op_flags, op->ldpc_dec.rv_index,
-			op->ldpc_dec.iter_max, op->ldpc_dec.iter_count,
-			op->ldpc_dec.harq_combined_input.length
-			);
-	else if (op_type == RTE_BBDEV_OP_LDPC_ENC) {
-		struct rte_bbdev_enc_op *op_dl = (struct rte_bbdev_enc_op *) op;
-		rte_bbdev_log(DEBUG,
-			"  Op 5GDL %d %d %d %d %d %d %d %d %d",
-			index,
-			op_dl->ldpc_enc.basegraph, op_dl->ldpc_enc.z_c,
-			op_dl->ldpc_enc.n_cb, op_dl->ldpc_enc.q_m,
-			op_dl->ldpc_enc.n_filler, op_dl->ldpc_enc.cb_params.e,
-			op_dl->ldpc_enc.op_flags, op_dl->ldpc_enc.rv_index
-			);
-	}
-}
-
 static int
 acc100_queue_stop(struct rte_bbdev *dev, uint16_t queue_id)
 {
 	struct acc_queue *q;
-	struct rte_bbdev_dec_op *op;
-	uint16_t i;
 
 	q = dev->data->queues[queue_id].queue_private;
 	rte_bbdev_log(INFO, "Queue Stop %d H/T/D %d %d %x OpType %d",
 			queue_id, q->sw_ring_head, q->sw_ring_tail,
 			q->sw_ring_depth, q->op_type);
-	for (i = 0; i < q->sw_ring_depth; ++i) {
-		op = (q->ring_addr + i)->req.op_addr;
-		acc100_print_op(op, q->op_type, i);
-	}
 	/* ignore all operations in flight and clear counters */
 	q->sw_ring_tail = q->sw_ring_head;
 	q->aq_enqueued = 0;
diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index 8bda3a8e07..f2b7172e71 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -924,51 +924,16 @@ free_q:
 	return ret;
 }
 
-static inline void
-acc200_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
-		uint16_t index)
-{
-	if (op == NULL)
-		return;
-	if (op_type == RTE_BBDEV_OP_LDPC_DEC)
-		rte_bbdev_log(INFO,
-			"  Op 5GUL %d %d %d %d %d %d %d %d %d %d %d %d",
-			index,
-			op->ldpc_dec.basegraph, op->ldpc_dec.z_c,
-			op->ldpc_dec.n_cb, op->ldpc_dec.q_m,
-			op->ldpc_dec.n_filler, op->ldpc_dec.cb_params.e,
-			op->ldpc_dec.op_flags, op->ldpc_dec.rv_index,
-			op->ldpc_dec.iter_max, op->ldpc_dec.iter_count,
-			op->ldpc_dec.harq_combined_input.length
-			);
-	else if (op_type == RTE_BBDEV_OP_LDPC_ENC) {
-		struct rte_bbdev_enc_op *op_dl = (struct rte_bbdev_enc_op *) op;
-		rte_bbdev_log(INFO,
-			"  Op 5GDL %d %d %d %d %d %d %d %d %d",
-			index,
-			op_dl->ldpc_enc.basegraph, op_dl->ldpc_enc.z_c,
-			op_dl->ldpc_enc.n_cb, op_dl->ldpc_enc.q_m,
-			op_dl->ldpc_enc.n_filler, op_dl->ldpc_enc.cb_params.e,
-			op_dl->ldpc_enc.op_flags, op_dl->ldpc_enc.rv_index
-			);
-	}
-}
-
 /* Stop ACC200 queue and clear counters. */
 static int
 acc200_queue_stop(struct rte_bbdev *dev, uint16_t queue_id)
 {
 	struct acc_queue *q;
-	struct rte_bbdev_dec_op *op;
-	uint16_t i;
+
 	q = dev->data->queues[queue_id].queue_private;
 	rte_bbdev_log(INFO, "Queue Stop %d H/T/D %d %d %x OpType %d",
 			queue_id, q->sw_ring_head, q->sw_ring_tail,
 			q->sw_ring_depth, q->op_type);
-	for (i = 0; i < q->sw_ring_depth; ++i) {
-		op = (q->ring_addr + i)->req.op_addr;
-		acc200_print_op(op, q->op_type, i);
-	}
 	/* ignore all operations in flight and clear counters */
 	q->sw_ring_tail = q->sw_ring_head;
 	q->aq_enqueued = 0;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.588552062 +0100
+++ 0028-baseband-acc-fix-access-to-deallocated-mem.patch	2024-10-23 22:16:40.463941341 +0100
@@ -1 +1 @@
-From a090b8ffe73ed21d54e17e5d5711d2e817d7229e Mon Sep 17 00:00:00 2001
+From e8d41d4db2561550810000b00b6c6775907833c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a090b8ffe73ed21d54e17e5d5711d2e817d7229e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,3 +16,3 @@
- drivers/baseband/acc/rte_acc100_pmd.c | 36 ----------------------
- drivers/baseband/acc/rte_vrb_pmd.c    | 44 +--------------------------
- 2 files changed, 1 insertion(+), 79 deletions(-)
+ drivers/baseband/acc/rte_acc100_pmd.c | 36 --------------------------
+ drivers/baseband/acc/rte_acc200_pmd.c | 37 +--------------------------
+ 2 files changed, 1 insertion(+), 72 deletions(-)
@@ -20 +21 @@
-index 5e6ee85e13..c690d1492b 100644
+index 955c0236e4..a5b1bb66eb 100644
@@ -23 +24 @@
-@@ -838,51 +838,15 @@ free_q:
+@@ -837,51 +837,15 @@ free_q:
@@ -75,5 +76,5 @@
-diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c
-index 646c12ad5c..e3f98d6e42 100644
---- a/drivers/baseband/acc/rte_vrb_pmd.c
-+++ b/drivers/baseband/acc/rte_vrb_pmd.c
-@@ -1048,58 +1048,16 @@ free_q:
+diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
+index 8bda3a8e07..f2b7172e71 100644
+--- a/drivers/baseband/acc/rte_acc200_pmd.c
++++ b/drivers/baseband/acc/rte_acc200_pmd.c
+@@ -924,51 +924,16 @@ free_q:
@@ -84 +85 @@
--vrb_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
+-acc200_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
@@ -110,7 +110,0 @@
--	} else if (op_type == RTE_BBDEV_OP_MLDTS) {
--		struct rte_bbdev_mldts_op *op_mldts = (struct rte_bbdev_mldts_op *) op;
--		rte_bbdev_log(INFO, "  Op MLD %d RBs %d NL %d Rp %d %d %x",
--				index,
--				op_mldts->mldts.num_rbs, op_mldts->mldts.num_layers,
--				op_mldts->mldts.r_rep,
--				op_mldts->mldts.c_rep, op_mldts->mldts.op_flags);
@@ -120 +114 @@
- /* Stop queue and clear counters. */
+ /* Stop ACC200 queue and clear counters. */
@@ -122 +116 @@
- vrb_queue_stop(struct rte_bbdev *dev, uint16_t queue_id)
+ acc200_queue_stop(struct rte_bbdev *dev, uint16_t queue_id)
@@ -134 +128 @@
--		vrb_print_op(op, q->op_type, i);
+-		acc200_print_op(op, q->op_type, i);

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

* patch 'vhost: fix offset while mapping log base address' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (26 preceding siblings ...)
  2024-10-23 21:16 ` patch 'baseband/acc: fix access to deallocated mem' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'vdpa: update used flags in used ring relay' " luca.boccassi
                   ` (49 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Bill Xiang; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/659d8ff0cfebd42336ca147c840f453d9d37482d

Thanks.

Luca Boccassi

---
From 659d8ff0cfebd42336ca147c840f453d9d37482d Mon Sep 17 00:00:00 2001
From: Bill Xiang <xiangwencheng@dayudpu.com>
Date: Mon, 8 Jul 2024 14:57:49 +0800
Subject: [PATCH] vhost: fix offset while mapping log base address

[ upstream commit bdd96d8ac76ca412165b2d1bbd3701e978246d8e ]

For sanity the offset should be the last parameter of mmap.

Fixes: fbc4d248b198 ("vhost: fix offset while mmaping log base address")

Signed-off-by: Bill Xiang <xiangwencheng@dayudpu.com>
Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
---
 .mailmap               | 1 +
 lib/vhost/vhost_user.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 80d6d50ba9..8c7b38fb35 100644
--- a/.mailmap
+++ b/.mailmap
@@ -166,6 +166,7 @@ Bert van Leeuwen <bert.vanleeuwen@netronome.com>
 Bhagyada Modali <bhagyada.modali@amd.com>
 Bharat Mota <bmota@vmware.com>
 Bill Hong <bhong@brocade.com>
+Bill Xiang <xiangwencheng@dayudpu.com>
 Billy McFall <bmcfall@redhat.com>
 Billy O'Mahony <billy.o.mahony@intel.com>
 Bing Zhao <bingz@nvidia.com> <bingz@mellanox.com> <bing.zhao@hxt-semitech.com>
diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 8d7d04059c..d665d6c7d9 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -2269,7 +2269,7 @@ vhost_user_set_log_base(struct virtio_net **pdev,
 	 * mmap from 0 to workaround a hugepage mmap bug: mmap will
 	 * fail when offset is not page size aligned.
 	 */
-	addr = mmap(0, size + off, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+	addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, off);
 	close(fd);
 	if (addr == MAP_FAILED) {
 		VHOST_LOG_CONFIG(dev->ifname, ERR, "mmap log base failed!\n");
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.626590214 +0100
+++ 0029-vhost-fix-offset-while-mapping-log-base-address.patch	2024-10-23 22:16:40.467941496 +0100
@@ -1 +1 @@
-From bdd96d8ac76ca412165b2d1bbd3701e978246d8e Mon Sep 17 00:00:00 2001
+From 659d8ff0cfebd42336ca147c840f453d9d37482d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bdd96d8ac76ca412165b2d1bbd3701e978246d8e ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ed4ea17c4c..544e62df7d 100644
+index 80d6d50ba9..8c7b38fb35 100644
@@ -22,3 +23,3 @@
-@@ -183,6 +183,7 @@ Bhagyada Modali <bhagyada.modali@amd.com>
- Bharat Mota <bharat.mota@broadcom.com> <bmota@vmware.com>
- Bhuvan Mital <bhuvan.mital@amd.com>
+@@ -166,6 +166,7 @@ Bert van Leeuwen <bert.vanleeuwen@netronome.com>
+ Bhagyada Modali <bhagyada.modali@amd.com>
+ Bharat Mota <bmota@vmware.com>
@@ -31 +32 @@
-index 5f470da38a..0893ae80bb 100644
+index 8d7d04059c..d665d6c7d9 100644
@@ -34 +35 @@
-@@ -2399,7 +2399,7 @@ vhost_user_set_log_base(struct virtio_net **pdev,
+@@ -2269,7 +2269,7 @@ vhost_user_set_log_base(struct virtio_net **pdev,
@@ -40 +40,0 @@
- 	alignment = get_blk_size(fd);
@@ -42,0 +43 @@
+ 		VHOST_LOG_CONFIG(dev->ifname, ERR, "mmap log base failed!\n");

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

* patch 'vdpa: update used flags in used ring relay' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (27 preceding siblings ...)
  2024-10-23 21:16 ` patch 'vhost: fix offset while mapping log base address' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/virtio-user: reset used index counter' " luca.boccassi
                   ` (48 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Bill Xiang; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8473106d0ca03f5b826fb54cb09f148b41ba8c72

Thanks.

Luca Boccassi

---
From 8473106d0ca03f5b826fb54cb09f148b41ba8c72 Mon Sep 17 00:00:00 2001
From: Bill Xiang <xiangwencheng@dayudpu.com>
Date: Wed, 17 Jul 2024 11:24:47 +0800
Subject: [PATCH] vdpa: update used flags in used ring relay

[ upstream commit b3f923fe1710e448c073f03aad2c087ffb6c7a5c ]

The vDPA device will work incorrectly if flags such as
VRING_USED_F_NO_NOTIFY are not updated correctly.

Fixes: b13ad2decc83 ("vhost: provide helpers for virtio ring relay")

Signed-off-by: Bill Xiang <xiangwencheng@dayudpu.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/vdpa.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/vhost/vdpa.c b/lib/vhost/vdpa.c
index cf51ca957a..89d88b6876 100644
--- a/lib/vhost/vdpa.c
+++ b/lib/vhost/vdpa.c
@@ -173,6 +173,7 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
 	idx = vq->used->idx;
 	idx_m = s_vring->used->idx;
 	ret = (uint16_t)(idx_m - idx);
+	vq->used->flags = s_vring->used->flags;
 
 	while (idx != idx_m) {
 		/* copy used entry, used ring logging is not covered here */
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.665647276 +0100
+++ 0030-vdpa-update-used-flags-in-used-ring-relay.patch	2024-10-23 22:16:40.467941496 +0100
@@ -1 +1 @@
-From b3f923fe1710e448c073f03aad2c087ffb6c7a5c Mon Sep 17 00:00:00 2001
+From 8473106d0ca03f5b826fb54cb09f148b41ba8c72 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3f923fe1710e448c073f03aad2c087ffb6c7a5c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a1dd5a753b..8abb073675 100644
+index cf51ca957a..89d88b6876 100644
@@ -22 +23 @@
-@@ -174,6 +174,7 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
+@@ -173,6 +173,7 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)

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

* patch 'net/virtio-user: reset used index counter' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (28 preceding siblings ...)
  2024-10-23 21:16 ` patch 'vdpa: update used flags in used ring relay' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'fib: fix AVX512 lookup' " luca.boccassi
                   ` (47 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Kommula Shiva Shankar; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/768ca32567522f0a75e458add4069dd4b171d6c3

Thanks.

Luca Boccassi

---
From 768ca32567522f0a75e458add4069dd4b171d6c3 Mon Sep 17 00:00:00 2001
From: Kommula Shiva Shankar <kshankar@marvell.com>
Date: Mon, 5 Aug 2024 10:08:41 +0000
Subject: [PATCH] net/virtio-user: reset used index counter

[ upstream commit ff11fc60c5d8d9ae5a0f0114db4c3bc834090548 ]

When the virtio device is reinitialized during ethdev reconfiguration,
all the virtio rings are recreated and repopulated on the device.
Accordingly, reset the used index counter value back to zero.

Fixes: 48a4464029a7 ("net/virtio-user: support control VQ for packed")

Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 78b1ed9ace..ae087b0c92 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -199,6 +199,7 @@ virtio_user_setup_queue_packed(struct virtqueue *vq,
 	vring->device = (void *)(uintptr_t)used_addr;
 	dev->packed_queues[queue_idx].avail_wrap_counter = true;
 	dev->packed_queues[queue_idx].used_wrap_counter = true;
+	dev->packed_queues[queue_idx].used_idx = 0;
 
 	for (i = 0; i < vring->num; i++)
 		vring->desc[i].flags = 0;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.700365835 +0100
+++ 0031-net-virtio-user-reset-used-index-counter.patch	2024-10-23 22:16:40.467941496 +0100
@@ -1 +1 @@
-From ff11fc60c5d8d9ae5a0f0114db4c3bc834090548 Mon Sep 17 00:00:00 2001
+From 768ca32567522f0a75e458add4069dd4b171d6c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff11fc60c5d8d9ae5a0f0114db4c3bc834090548 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index bf29f0dacd..747dddeb2e 100644
+index 78b1ed9ace..ae087b0c92 100644
@@ -23 +24 @@
-@@ -204,6 +204,7 @@ virtio_user_setup_queue_packed(struct virtqueue *vq,
+@@ -199,6 +199,7 @@ virtio_user_setup_queue_packed(struct virtqueue *vq,

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

* patch 'fib: fix AVX512 lookup' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (29 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/virtio-user: reset used index counter' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/e1000: fix link status crash in secondary process' " luca.boccassi
                   ` (46 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From c0c610f426552e50c6628fcc100aa0391c91ab1e Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Fri, 6 Sep 2024 17:04:36 +0000
Subject: [PATCH] fib: fix AVX512 lookup

[ upstream commit 66ed1786ad067198814e9b2ab54f0cad68a58f1e ]

Vector lookup uses gather instructions which loads data in 4byte chunks.
This could lead to out of bounds access at the end of the tbl24 in case
of 1 or 2 byte entries if e.g. lookup is attempted for 255.255.255.255
in IPv4 case.
This patch fixes potential out of bound access by gather instruction
allocating an extra 4 byte in the end of the tbl24.

Fixes: b3509fa3653e ("fib: add AVX512 lookup")
Fixes: 1e5630e40d95 ("fib6: add AVX512 lookup")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/fib/dir24_8.c | 4 ++--
 lib/fib/trie.c    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/fib/dir24_8.c b/lib/fib/dir24_8.c
index 5f73b8a7f0..ec7b9c4b5c 100644
--- a/lib/fib/dir24_8.c
+++ b/lib/fib/dir24_8.c
@@ -526,8 +526,8 @@ dir24_8_create(const char *name, int socket_id, struct rte_fib_conf *fib_conf)
 
 	snprintf(mem_name, sizeof(mem_name), "DP_%s", name);
 	dp = rte_zmalloc_socket(name, sizeof(struct dir24_8_tbl) +
-		DIR24_8_TBL24_NUM_ENT * (1 << nh_sz), RTE_CACHE_LINE_SIZE,
-		socket_id);
+		DIR24_8_TBL24_NUM_ENT * (1 << nh_sz) + sizeof(uint32_t),
+		RTE_CACHE_LINE_SIZE, socket_id);
 	if (dp == NULL) {
 		rte_errno = ENOMEM;
 		return NULL;
diff --git a/lib/fib/trie.c b/lib/fib/trie.c
index 7b33cdaa7b..ca1c2fe3bc 100644
--- a/lib/fib/trie.c
+++ b/lib/fib/trie.c
@@ -647,8 +647,8 @@ trie_create(const char *name, int socket_id,
 
 	snprintf(mem_name, sizeof(mem_name), "DP_%s", name);
 	dp = rte_zmalloc_socket(name, sizeof(struct rte_trie_tbl) +
-		TRIE_TBL24_NUM_ENT * (1 << nh_sz), RTE_CACHE_LINE_SIZE,
-		socket_id);
+		TRIE_TBL24_NUM_ENT * (1 << nh_sz) + sizeof(uint32_t),
+		RTE_CACHE_LINE_SIZE, socket_id);
 	if (dp == NULL) {
 		rte_errno = ENOMEM;
 		return dp;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.736507844 +0100
+++ 0032-fib-fix-AVX512-lookup.patch	2024-10-23 22:16:40.467941496 +0100
@@ -1 +1 @@
-From 66ed1786ad067198814e9b2ab54f0cad68a58f1e Mon Sep 17 00:00:00 2001
+From c0c610f426552e50c6628fcc100aa0391c91ab1e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 66ed1786ad067198814e9b2ab54f0cad68a58f1e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index c739e92304..07c324743b 100644
+index 5f73b8a7f0..ec7b9c4b5c 100644

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

* patch 'net/e1000: fix link status crash in secondary process' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (30 preceding siblings ...)
  2024-10-23 21:16 ` patch 'fib: fix AVX512 lookup' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/iavf: fix crash when link is unstable' " luca.boccassi
                   ` (45 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Jun Wang; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5780ca90f0f820157ee62013515d022646cece2c

Thanks.

Luca Boccassi

---
From 5780ca90f0f820157ee62013515d022646cece2c Mon Sep 17 00:00:00 2001
From: Jun Wang <junwang01@cestc.cn>
Date: Fri, 12 Jul 2024 19:30:47 +0800
Subject: [PATCH] net/e1000: fix link status crash in secondary process

[ upstream commit 84506cfe07326fd6ddb158f3fa57bd678751561a ]

The code to update link status is not safe in secondary process.
If called from secondary it will crash, example from dumpcap:

    /dpdk/app/dpdk-dumpcap -i 0000:00:04.0
    File: /tmp/dpdk-dumpcap_0_0000:00:04.0_20240723020203.pcapng
    Segmentation fault (core dumped)

Fixes: 805803445a02 ("e1000: support EM devices (also known as e1000/e1000e)")

Signed-off-by: Jun Wang <junwang01@cestc.cn>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/e1000/em_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 18efa78ac3..efe3665cec 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1121,6 +1121,9 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 	struct rte_eth_link link;
 	int link_up, count;
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -1;
+
 	link_up = 0;
 	hw->mac.get_link_status = 1;
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.771895718 +0100
+++ 0033-net-e1000-fix-link-status-crash-in-secondary-process.patch	2024-10-23 22:16:40.471941652 +0100
@@ -1 +1 @@
-From 84506cfe07326fd6ddb158f3fa57bd678751561a Mon Sep 17 00:00:00 2001
+From 5780ca90f0f820157ee62013515d022646cece2c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 84506cfe07326fd6ddb158f3fa57bd678751561a ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index c5a4dec693..f6875b0762 100644
+index 18efa78ac3..efe3665cec 100644
@@ -26 +27 @@
-@@ -1136,6 +1136,9 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -1121,6 +1121,9 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)

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

* patch 'net/iavf: fix crash when link is unstable' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (31 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/e1000: fix link status crash in secondary process' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/ice/base: fix link speed for 200G' " luca.boccassi
                   ` (44 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/90adb751e4a7a555f0ec996d7f80e951d6384b95

Thanks.

Luca Boccassi

---
From 90adb751e4a7a555f0ec996d7f80e951d6384b95 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Tue, 6 Aug 2024 08:35:27 +0800
Subject: [PATCH] net/iavf: fix crash when link is unstable

[ upstream commit 57ed9ca61f44ffc3801f55c749347bd717834008 ]

Physical link instability may cause a core dump because unstable
physical links can result in a large number of link change events. Some
of these events may be captured by vf before vf resources are allocated,
and that will result in a core dump.

This commit will check if vf_res is invalid before dereferencing it.

Fixes: 5e03e316c753 ("net/iavf: handle virtchnl event message without interrupt")

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/iavf/iavf_vchnl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index aeffb07cca..0164dddcb0 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -246,8 +246,8 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,
 		case VIRTCHNL_EVENT_LINK_CHANGE:
 			vf->link_up =
 				vpe->event_data.link_event.link_status;
-			if (vf->vf_res->vf_cap_flags &
-				VIRTCHNL_VF_CAP_ADV_LINK_SPEED) {
+			if (vf->vf_res != NULL &&
+			    vf->vf_res->vf_cap_flags & VIRTCHNL_VF_CAP_ADV_LINK_SPEED) {
 				vf->link_speed =
 				    vpe->event_data.link_event_adv.link_speed;
 			} else {
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.808356976 +0100
+++ 0034-net-iavf-fix-crash-when-link-is-unstable.patch	2024-10-23 22:16:40.471941652 +0100
@@ -1 +1 @@
-From 57ed9ca61f44ffc3801f55c749347bd717834008 Mon Sep 17 00:00:00 2001
+From 90adb751e4a7a555f0ec996d7f80e951d6384b95 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57ed9ca61f44ffc3801f55c749347bd717834008 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 6d5969f084..69420bc9b6 100644
+index aeffb07cca..0164dddcb0 100644
@@ -26 +27 @@
-@@ -255,8 +255,8 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,
+@@ -246,8 +246,8 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,

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

* patch 'net/ice/base: fix link speed for 200G' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (32 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/iavf: fix crash when link is unstable' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/ice/base: fix iteration of TLVs in Preserved Fields Area' " luca.boccassi
                   ` (43 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Paul Greenwalt; +Cc: Soumyadeep Hore, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6970864b0c56f89338627ff29122a89fb96a74b2

Thanks.

Luca Boccassi

---
From 6970864b0c56f89338627ff29122a89fb96a74b2 Mon Sep 17 00:00:00 2001
From: Paul Greenwalt <paul.greenwalt@intel.com>
Date: Fri, 23 Aug 2024 09:56:45 +0000
Subject: [PATCH] net/ice/base: fix link speed for 200G

[ upstream commit e3992ab377d2879d6c5bfb220865638404b85dba ]

When setting PHY configuration during driver initialization, 200G link
speed is not being advertised even when the PHY is capable. This is
because the get PHY capabilities link speed response is being masked by
ICE_AQ_LINK_SPEED_M, which does not include 200G link speed bit.

Fixes: d13ad9cf1721 ("net/ice/base: add helper functions for PHY caching")

Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_adminq_cmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index 534649802f..1f40ae2e66 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -1621,7 +1621,7 @@ struct ice_aqc_get_link_status_data {
 #define ICE_AQ_LINK_PWR_QSFP_CLASS_3	2
 #define ICE_AQ_LINK_PWR_QSFP_CLASS_4	3
 	__le16 link_speed;
-#define ICE_AQ_LINK_SPEED_M		0x7FF
+#define ICE_AQ_LINK_SPEED_M             0xFFF
 #define ICE_AQ_LINK_SPEED_10MB		BIT(0)
 #define ICE_AQ_LINK_SPEED_100MB		BIT(1)
 #define ICE_AQ_LINK_SPEED_1000MB	BIT(2)
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.844158267 +0100
+++ 0035-net-ice-base-fix-link-speed-for-200G.patch	2024-10-23 22:16:40.475941807 +0100
@@ -1 +1 @@
-From e3992ab377d2879d6c5bfb220865638404b85dba Mon Sep 17 00:00:00 2001
+From 6970864b0c56f89338627ff29122a89fb96a74b2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e3992ab377d2879d6c5bfb220865638404b85dba ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 6a89e1614a..3ec207927b 100644
+index 534649802f..1f40ae2e66 100644
@@ -25 +26 @@
-@@ -1624,7 +1624,7 @@ struct ice_aqc_get_link_status_data {
+@@ -1621,7 +1621,7 @@ struct ice_aqc_get_link_status_data {

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

* patch 'net/ice/base: fix iteration of TLVs in Preserved Fields Area' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (33 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/ice/base: fix link speed for 200G' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/ixgbe/base: fix unchecked return value' " luca.boccassi
                   ` (42 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Fabio Pricoco
  Cc: Jacob Keller, Soumyadeep Hore, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/822d0a9391325d4d7ea7ce9c7e776807c3928d2e

Thanks.

Luca Boccassi

---
From 822d0a9391325d4d7ea7ce9c7e776807c3928d2e Mon Sep 17 00:00:00 2001
From: Fabio Pricoco <fabio.pricoco@intel.com>
Date: Fri, 23 Aug 2024 09:56:42 +0000
Subject: [PATCH] net/ice/base: fix iteration of TLVs in Preserved Fields Area

[ upstream commit dcb760bf0f951b404bce33a1dd14906154b58c75 ]

The ice_get_pfa_module_tlv() function iterates over the Preserved Fields
Area to read data from the Shadow RAM, including the Part Board Assembly
data, among others.

If the specific TLV being requested is not found in the current NVM, the
code will read past the end of the PFA, misinterpreting the last word of
the PFA and the word just after the PFA as another TLV. This typically
results in one extra iteration before the length check of the while loop
is triggered.

Correct the logic for determining the maximum PFA offset to include the
extra last word. Additionally, make the driver robust against overflows
by using check_add_overflow. This ensures that even if the NVM provides
bogus data, the driver will not overflow, and will instead log a useful
warning message. The check for whether the TLV length exceeds the PFA
length is also removed, in favor of relying on the overflow warning
instead.

Fixes: 5d0b7b5fc491 ("net/ice/base: add read PBA module function")

Signed-off-by: Fabio Pricoco <fabio.pricoco@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/base/ice_nvm.c | 36 ++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c
index 6da52f4d58..47ead01255 100644
--- a/drivers/net/ice/base/ice_nvm.c
+++ b/drivers/net/ice/base/ice_nvm.c
@@ -471,6 +471,8 @@ enum ice_status ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data)
 	return status;
 }
 
+#define check_add_overflow __builtin_add_overflow
+
 /**
  * ice_get_pfa_module_tlv - Reads sub module TLV from NVM PFA
  * @hw: pointer to hardware structure
@@ -487,8 +489,7 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
 		       u16 module_type)
 {
 	enum ice_status status;
-	u16 pfa_len, pfa_ptr;
-	u32 next_tlv;
+	u16 pfa_len, pfa_ptr, next_tlv, max_tlv;
 
 	status = ice_read_sr_word(hw, ICE_SR_PFA_PTR, &pfa_ptr);
 	if (status != ICE_SUCCESS) {
@@ -500,11 +501,23 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
 		ice_debug(hw, ICE_DBG_INIT, "Failed to read PFA length.\n");
 		return status;
 	}
-	/* Starting with first TLV after PFA length, iterate through the list
+
+	if (check_add_overflow(pfa_ptr, (u16)(pfa_len - 1), &max_tlv)) {
+		ice_debug(hw, ICE_DBG_INIT, "PFA starts at offset %u. PFA length of %u caused 16-bit arithmetic overflow.\n",
+				  pfa_ptr, pfa_len);
+		return ICE_ERR_INVAL_SIZE;
+	}
+
+	/* The Preserved Fields Area contains a sequence of TLVs which define
+	 * its contents. The PFA length includes all of the TLVs, plus its
+	 * initial length word itself, *and* one final word at the end of all
+	 * of the TLVs.
+	 *
+	 * Starting with first TLV after PFA length, iterate through the list
 	 * of TLVs to find the requested one.
 	 */
 	next_tlv = pfa_ptr + 1;
-	while (next_tlv < ((u32)pfa_ptr + pfa_len)) {
+	while (next_tlv < max_tlv) {
 		u16 tlv_sub_module_type;
 		u16 tlv_len;
 
@@ -521,10 +534,6 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
 			ice_debug(hw, ICE_DBG_INIT, "Failed to read TLV length.\n");
 			break;
 		}
-		if (tlv_len > pfa_len) {
-			ice_debug(hw, ICE_DBG_INIT, "Invalid TLV length.\n");
-			return ICE_ERR_INVAL_SIZE;
-		}
 		if (tlv_sub_module_type == module_type) {
 			if (tlv_len) {
 				*module_tlv = (u16)next_tlv;
@@ -533,10 +542,13 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
 			}
 			return ICE_ERR_INVAL_SIZE;
 		}
-		/* Check next TLV, i.e. current TLV pointer + length + 2 words
-		 * (for current TLV's type and length)
-		 */
-		next_tlv = next_tlv + tlv_len + 2;
+
+		if (check_add_overflow(next_tlv, (u16)2, &next_tlv) ||
+		    check_add_overflow(next_tlv, tlv_len, &next_tlv)) {
+			ice_debug(hw, ICE_DBG_INIT, "TLV of type %u and length 0x%04x caused 16-bit arithmetic overflow. The PFA starts at 0x%04x and has length of 0x%04x\n",
+					  tlv_sub_module_type, tlv_len, pfa_ptr, pfa_len);
+			return ICE_ERR_INVAL_SIZE;
+		}
 	}
 	/* Module does not exist */
 	return ICE_ERR_DOES_NOT_EXIST;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.891229585 +0100
+++ 0036-net-ice-base-fix-iteration-of-TLVs-in-Preserved-Fiel.patch	2024-10-23 22:16:40.475941807 +0100
@@ -1 +1 @@
-From dcb760bf0f951b404bce33a1dd14906154b58c75 Mon Sep 17 00:00:00 2001
+From 822d0a9391325d4d7ea7ce9c7e776807c3928d2e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dcb760bf0f951b404bce33a1dd14906154b58c75 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -36 +37 @@
-index 5e982de4b5..56c6c96a95 100644
+index 6da52f4d58..47ead01255 100644
@@ -39 +40 @@
-@@ -469,6 +469,8 @@ int ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data)
+@@ -471,6 +471,8 @@ enum ice_status ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data)
@@ -48,2 +49 @@
-@@ -484,8 +486,7 @@ int
- ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+@@ -487,8 +489,7 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
@@ -51,0 +52 @@
+ 	enum ice_status status;
@@ -55 +55,0 @@
- 	int status;
@@ -58 +58,2 @@
-@@ -498,11 +499,23 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+ 	if (status != ICE_SUCCESS) {
+@@ -500,11 +501,23 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
@@ -84 +85 @@
-@@ -519,10 +532,6 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+@@ -521,10 +534,6 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
@@ -95 +96 @@
-@@ -531,10 +540,13 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+@@ -533,10 +542,13 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,

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

* patch 'net/ixgbe/base: fix unchecked return value' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (34 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/ice/base: fix iteration of TLVs in Preserved Fields Area' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/i40e/base: fix setting flags in init function' " luca.boccassi
                   ` (41 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Barbara Skobiej; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From c2cd652d0f0aeb5fe958d9550cb3d34f91cf070a Mon Sep 17 00:00:00 2001
From: Barbara Skobiej <barbara.skobiej@intel.com>
Date: Thu, 29 Aug 2024 10:00:11 +0100
Subject: [PATCH] net/ixgbe/base: fix unchecked return value

[ upstream commit eb3684b191928ebb5d263e3f8ab1e309bfec099e ]

There was unchecked return value in the ixgbe_stop_mac_link_on_d3_82599
function. Added checking of return value from the called function
ixgbe_read_eeprom.

Fixes: b7ad3713b958 ("ixgbe/base: allow to disable link on D3")

Signed-off-by: Barbara Skobiej <barbara.skobiej@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_82599.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_82599.c b/drivers/net/ixgbe/base/ixgbe_82599.c
index 69fd4cd3fb..b39dd70da0 100644
--- a/drivers/net/ixgbe/base/ixgbe_82599.c
+++ b/drivers/net/ixgbe/base/ixgbe_82599.c
@@ -551,13 +551,15 @@ out:
  **/
 void ixgbe_stop_mac_link_on_d3_82599(struct ixgbe_hw *hw)
 {
-	u32 autoc2_reg;
 	u16 ee_ctrl_2 = 0;
+	u32 autoc2_reg;
+	u32 status;
 
 	DEBUGFUNC("ixgbe_stop_mac_link_on_d3_82599");
-	ixgbe_read_eeprom(hw, IXGBE_EEPROM_CTRL_2, &ee_ctrl_2);
+	status = ixgbe_read_eeprom(hw, IXGBE_EEPROM_CTRL_2, &ee_ctrl_2);
 
-	if (!ixgbe_mng_present(hw) && !hw->wol_enabled &&
+	if (status == IXGBE_SUCCESS &&
+	    !ixgbe_mng_present(hw) && !hw->wol_enabled &&
 	    ee_ctrl_2 & IXGBE_EEPROM_CCD_BIT) {
 		autoc2_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC2);
 		autoc2_reg |= IXGBE_AUTOC2_LINK_DISABLE_ON_D3_MASK;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.927199737 +0100
+++ 0037-net-ixgbe-base-fix-unchecked-return-value.patch	2024-10-23 22:16:40.475941807 +0100
@@ -1 +1 @@
-From eb3684b191928ebb5d263e3f8ab1e309bfec099e Mon Sep 17 00:00:00 2001
+From c2cd652d0f0aeb5fe958d9550cb3d34f91cf070a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eb3684b191928ebb5d263e3f8ab1e309bfec099e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index c4ad906f0f..3110477700 100644
+index 69fd4cd3fb..b39dd70da0 100644
@@ -24 +25 @@
-@@ -556,13 +556,15 @@ out:
+@@ -551,13 +551,15 @@ out:

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

* patch 'net/i40e/base: fix setting flags in init function' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (35 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/ixgbe/base: fix unchecked return value' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/i40e/base: fix misleading debug logs and comments' " luca.boccassi
                   ` (40 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From b2571f3563f5bf8b8c84d9da47b443f625e5a42e Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 2 Sep 2024 10:54:17 +0100
Subject: [PATCH] net/i40e/base: fix setting flags in init function

[ upstream commit deb7c447d088903d06a76e2c719a8207c94a576e ]

The functionality to set i40e_hw's flags was moved to its own function
in AQ a while ago.  However, the setting of hw->flags for X722 was not
removed, even though it has become unnecessary.

Fixes: 37b091c75b13 ("net/i40e/base: extend PHY access AQ command")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9eee104063..4d8167692d 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1017,9 +1017,6 @@ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw)
 	else
 		hw->pf_id = (u8)(func_rid & 0x7);
 
-	if (hw->mac.type == I40E_MAC_X722)
-		hw->flags |= I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE |
-			     I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK;
 	/* NVMUpdate features structure initialization */
 	hw->nvmupd_features.major = I40E_NVMUPD_FEATURES_API_VER_MAJOR;
 	hw->nvmupd_features.minor = I40E_NVMUPD_FEATURES_API_VER_MINOR;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.963169539 +0100
+++ 0038-net-i40e-base-fix-setting-flags-in-init-function.patch	2024-10-23 22:16:40.479941963 +0100
@@ -1 +1 @@
-From deb7c447d088903d06a76e2c719a8207c94a576e Mon Sep 17 00:00:00 2001
+From b2571f3563f5bf8b8c84d9da47b443f625e5a42e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit deb7c447d088903d06a76e2c719a8207c94a576e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index e4de508aea..451cc2c1c7 100644
+index 9eee104063..4d8167692d 100644
@@ -23 +24 @@
-@@ -980,9 +980,6 @@ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw)
+@@ -1017,9 +1017,6 @@ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw)

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

* patch 'net/i40e/base: fix misleading debug logs and comments' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (36 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/i40e/base: fix setting flags in init function' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/i40e/base: fix blinking X722 with X557 PHY' " luca.boccassi
                   ` (39 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Aleksandr Loktionov; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From aea7ea7acb1e32d2c546ab93e9450fe35f7469b1 Mon Sep 17 00:00:00 2001
From: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Date: Mon, 2 Sep 2024 10:54:18 +0100
Subject: [PATCH] net/i40e/base: fix misleading debug logs and comments

[ upstream commit 719ec1bfebde956b661d403ef73ecb1e7483d50f ]

Both comments and debug logs for i40e_read_nvm_aq refer to writing, when
in actuality it's a read function. Fix both comments and debug logs.

Fixes: a8ac0bae54ae ("i40e/base: update shadow RAM read/write")

Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/i40e/base/i40e_nvm.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index f385042601..05816a4b79 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -223,11 +223,11 @@ read_nvm_exit:
  * @hw: pointer to the HW structure.
  * @module_pointer: module pointer location in words from the NVM beginning
  * @offset: offset in words from module start
- * @words: number of words to write
- * @data: buffer with words to write to the Shadow RAM
+ * @words: number of words to read
+ * @data: buffer with words to read from the Shadow RAM
  * @last_command: tells the AdminQ that this is the last command
  *
- * Writes a 16 bit words buffer to the Shadow RAM using the admin command.
+ * Reads a 16 bit words buffer to the Shadow RAM using the admin command.
  **/
 STATIC enum i40e_status_code i40e_read_nvm_aq(struct i40e_hw *hw,
 					      u8 module_pointer, u32 offset,
@@ -249,18 +249,18 @@ STATIC enum i40e_status_code i40e_read_nvm_aq(struct i40e_hw *hw,
 	 */
 	if ((offset + words) > hw->nvm.sr_size)
 		i40e_debug(hw, I40E_DEBUG_NVM,
-			   "NVM write error: offset %d beyond Shadow RAM limit %d\n",
+			   "NVM read error: offset %d beyond Shadow RAM limit %d\n",
 			   (offset + words), hw->nvm.sr_size);
 	else if (words > I40E_SR_SECTOR_SIZE_IN_WORDS)
-		/* We can write only up to 4KB (one sector), in one AQ write */
+		/* We can read only up to 4KB (one sector), in one AQ read */
 		i40e_debug(hw, I40E_DEBUG_NVM,
-			   "NVM write fail error: tried to write %d words, limit is %d.\n",
+			   "NVM read fail error: tried to read %d words, limit is %d.\n",
 			   words, I40E_SR_SECTOR_SIZE_IN_WORDS);
 	else if (((offset + (words - 1)) / I40E_SR_SECTOR_SIZE_IN_WORDS)
 		 != (offset / I40E_SR_SECTOR_SIZE_IN_WORDS))
-		/* A single write cannot spread over two sectors */
+		/* A single read cannot spread over two sectors */
 		i40e_debug(hw, I40E_DEBUG_NVM,
-			   "NVM write error: cannot spread over two sectors in a single write offset=%d words=%d\n",
+			   "NVM read error: cannot spread over two sectors in a single read offset=%d words=%d\n",
 			   offset, words);
 	else
 		ret_code = i40e_aq_read_nvm(hw, module_pointer,
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.005174318 +0100
+++ 0039-net-i40e-base-fix-misleading-debug-logs-and-comments.patch	2024-10-23 22:16:40.479941963 +0100
@@ -1 +1 @@
-From 719ec1bfebde956b661d403ef73ecb1e7483d50f Mon Sep 17 00:00:00 2001
+From aea7ea7acb1e32d2c546ab93e9450fe35f7469b1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 719ec1bfebde956b661d403ef73ecb1e7483d50f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/i40e/base: fix blinking X722 with X557 PHY' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (37 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/i40e/base: fix misleading debug logs and comments' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/i40e/base: fix DDP loading with reserved track ID' " luca.boccassi
                   ` (38 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Eryk Rybak; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From a6d819d27a79d79e6d4dd5c129ec477a613e670a Mon Sep 17 00:00:00 2001
From: Eryk Rybak <eryk.roch.rybak@intel.com>
Date: Mon, 2 Sep 2024 10:54:23 +0100
Subject: [PATCH] net/i40e/base: fix blinking X722 with X557 PHY

[ upstream commit bf0183e9ab98c946e0c7e178149e4b685465b9b1 ]

On x722 with x557 PHY LEDs do not blink under certain circumstances,
because the function was attempting to avoid triggering LED activity when
it detected that LED was already active. Fix it to just always trigger
LED blinking regardless of the LED state.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Eryk Rybak <eryk.roch.rybak@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 32 -----------------------------
 1 file changed, 32 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 4d8167692d..d444c4a78e 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1585,7 +1585,6 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx)
  **/
 u32 i40e_led_get(struct i40e_hw *hw)
 {
-	u32 current_mode = 0;
 	u32 mode = 0;
 	int i;
 
@@ -1598,21 +1597,6 @@ u32 i40e_led_get(struct i40e_hw *hw)
 		if (!gpio_val)
 			continue;
 
-		/* ignore gpio LED src mode entries related to the activity
-		 *  LEDs
-		 */
-		current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK)
-				>> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT);
-		switch (current_mode) {
-		case I40E_COMBINED_ACTIVITY:
-		case I40E_FILTER_ACTIVITY:
-		case I40E_MAC_ACTIVITY:
-		case I40E_LINK_ACTIVITY:
-			continue;
-		default:
-			break;
-		}
-
 		mode = (gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >>
 			I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT;
 		break;
@@ -1632,7 +1616,6 @@ u32 i40e_led_get(struct i40e_hw *hw)
  **/
 void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
 {
-	u32 current_mode = 0;
 	int i;
 
 	if (mode & ~I40E_LED_MODE_VALID) {
@@ -1649,21 +1632,6 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
 		if (!gpio_val)
 			continue;
 
-		/* ignore gpio LED src mode entries related to the activity
-		 * LEDs
-		 */
-		current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK)
-				>> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT);
-		switch (current_mode) {
-		case I40E_COMBINED_ACTIVITY:
-		case I40E_FILTER_ACTIVITY:
-		case I40E_MAC_ACTIVITY:
-		case I40E_LINK_ACTIVITY:
-			continue;
-		default:
-			break;
-		}
-
 		if (I40E_IS_X710TL_DEVICE(hw->device_id)) {
 			u32 pin_func = 0;
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.040111495 +0100
+++ 0040-net-i40e-base-fix-blinking-X722-with-X557-PHY.patch	2024-10-23 22:16:40.483942118 +0100
@@ -1 +1 @@
-From bf0183e9ab98c946e0c7e178149e4b685465b9b1 Mon Sep 17 00:00:00 2001
+From a6d819d27a79d79e6d4dd5c129ec477a613e670a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bf0183e9ab98c946e0c7e178149e4b685465b9b1 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index be27cc9d0b..80500697ed 100644
+index 4d8167692d..d444c4a78e 100644
@@ -25 +26 @@
-@@ -1548,7 +1548,6 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx)
+@@ -1585,7 +1585,6 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx)
@@ -33 +34 @@
-@@ -1561,21 +1560,6 @@ u32 i40e_led_get(struct i40e_hw *hw)
+@@ -1598,21 +1597,6 @@ u32 i40e_led_get(struct i40e_hw *hw)
@@ -55 +56 @@
-@@ -1595,7 +1579,6 @@ u32 i40e_led_get(struct i40e_hw *hw)
+@@ -1632,7 +1616,6 @@ u32 i40e_led_get(struct i40e_hw *hw)
@@ -63 +64 @@
-@@ -1612,21 +1595,6 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
+@@ -1649,21 +1632,6 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)

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

* patch 'net/i40e/base: fix DDP loading with reserved track ID' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (38 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/i40e/base: fix blinking X722 with X557 PHY' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/i40e/base: fix repeated register dumps' " luca.boccassi
                   ` (37 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Artur Tyminski; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From e06d6a124ef97af53624d9090eb08659385107bd Mon Sep 17 00:00:00 2001
From: Artur Tyminski <arturx.tyminski@intel.com>
Date: Mon, 2 Sep 2024 10:54:26 +0100
Subject: [PATCH] net/i40e/base: fix DDP loading with reserved track ID

[ upstream commit f646061cd9328f1265d8b9996c9b734ab2ce3707 ]

Packages with reserved track IDs should not be loaded, yet currently,
the driver will only check one of the reserved ID's, but not the other.
Fix the DDP package loading to also check for the other reserved track
ID.

Fixes: 496a357f1118 ("net/i40e/base: extend processing of DDP")

Signed-off-by: Artur Tyminski <arturx.tyminski@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index d444c4a78e..3acb48e20b 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -8163,7 +8163,8 @@ i40e_validate_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,
 	u32 sec_off;
 	u32 i;
 
-	if (track_id == I40E_DDP_TRACKID_INVALID) {
+	if (track_id == I40E_DDP_TRACKID_INVALID ||
+	    track_id == I40E_DDP_TRACKID_RDONLY) {
 		i40e_debug(hw, I40E_DEBUG_PACKAGE, "Invalid track_id\n");
 		return I40E_NOT_SUPPORTED;
 	}
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.078892365 +0100
+++ 0041-net-i40e-base-fix-DDP-loading-with-reserved-track-ID.patch	2024-10-23 22:16:40.491942429 +0100
@@ -1 +1 @@
-From f646061cd9328f1265d8b9996c9b734ab2ce3707 Mon Sep 17 00:00:00 2001
+From e06d6a124ef97af53624d9090eb08659385107bd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f646061cd9328f1265d8b9996c9b734ab2ce3707 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index a43b89aaeb..693608ac99 100644
+index d444c4a78e..3acb48e20b 100644
@@ -25 +26 @@
-@@ -8048,7 +8048,8 @@ i40e_validate_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,
+@@ -8163,7 +8163,8 @@ i40e_validate_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,

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

* patch 'net/i40e/base: fix repeated register dumps' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (39 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/i40e/base: fix DDP loading with reserved track ID' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/i40e/base: fix unchecked return value' " luca.boccassi
                   ` (36 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Radoslaw Tyl; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/92dd2403039e0eb50d8304f525a407aa9f3018c4

Thanks.

Luca Boccassi

---
From 92dd2403039e0eb50d8304f525a407aa9f3018c4 Mon Sep 17 00:00:00 2001
From: Radoslaw Tyl <radoslawx.tyl@intel.com>
Date: Mon, 2 Sep 2024 10:54:33 +0100
Subject: [PATCH] net/i40e/base: fix repeated register dumps

[ upstream commit efc6a6b1facfa160e5e72f55893a301a6b27c628 ]

Currently, when registers are dumped, the data inside them is changed,
so repeated dumps lead to unexpected results. Fix this by making
register list read-only.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/i40e/base/i40e_diag.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_diag.c b/drivers/net/i40e/base/i40e_diag.c
index b3c4cfd3aa..4ca102cdd5 100644
--- a/drivers/net/i40e/base/i40e_diag.c
+++ b/drivers/net/i40e/base/i40e_diag.c
@@ -55,7 +55,7 @@ static enum i40e_status_code i40e_diag_reg_pattern_test(struct i40e_hw *hw,
 	return I40E_SUCCESS;
 }
 
-static struct i40e_diag_reg_test_info i40e_reg_list[] = {
+static const struct i40e_diag_reg_test_info i40e_reg_list[] = {
 	/* offset               mask         elements   stride */
 	{I40E_QTX_CTL(0),       0x0000FFBF, 1, I40E_QTX_CTL(1) - I40E_QTX_CTL(0)},
 	{I40E_PFINT_ITR0(0),    0x00000FFF, 3, I40E_PFINT_ITR0(1) - I40E_PFINT_ITR0(0)},
@@ -81,28 +81,28 @@ enum i40e_status_code i40e_diag_reg_test(struct i40e_hw *hw)
 {
 	enum i40e_status_code ret_code = I40E_SUCCESS;
 	u32 reg, mask;
+	u32 elements;
 	u32 i, j;
 
 	for (i = 0; i40e_reg_list[i].offset != 0 &&
 					     ret_code == I40E_SUCCESS; i++) {
 
+		elements = i40e_reg_list[i].elements;
 		/* set actual reg range for dynamically allocated resources */
 		if (i40e_reg_list[i].offset == I40E_QTX_CTL(0) &&
 		    hw->func_caps.num_tx_qp != 0)
-			i40e_reg_list[i].elements = hw->func_caps.num_tx_qp;
+			elements = hw->func_caps.num_tx_qp;
 		if ((i40e_reg_list[i].offset == I40E_PFINT_ITRN(0, 0) ||
 		     i40e_reg_list[i].offset == I40E_PFINT_ITRN(1, 0) ||
 		     i40e_reg_list[i].offset == I40E_PFINT_ITRN(2, 0) ||
 		     i40e_reg_list[i].offset == I40E_QINT_TQCTL(0) ||
 		     i40e_reg_list[i].offset == I40E_QINT_RQCTL(0)) &&
 		    hw->func_caps.num_msix_vectors != 0)
-			i40e_reg_list[i].elements =
-				hw->func_caps.num_msix_vectors - 1;
+			elements = hw->func_caps.num_msix_vectors - 1;
 
 		/* test register access */
 		mask = i40e_reg_list[i].mask;
-		for (j = 0; j < i40e_reg_list[i].elements &&
-			    ret_code == I40E_SUCCESS; j++) {
+		for (j = 0; j < elements && ret_code == I40E_SUCCESS; j++) {
 			reg = i40e_reg_list[i].offset
 				+ (j * i40e_reg_list[i].stride);
 			ret_code = i40e_diag_reg_pattern_test(hw, reg, mask);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.118462619 +0100
+++ 0042-net-i40e-base-fix-repeated-register-dumps.patch	2024-10-23 22:16:40.491942429 +0100
@@ -1 +1 @@
-From efc6a6b1facfa160e5e72f55893a301a6b27c628 Mon Sep 17 00:00:00 2001
+From 92dd2403039e0eb50d8304f525a407aa9f3018c4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit efc6a6b1facfa160e5e72f55893a301a6b27c628 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/i40e/base: fix unchecked return value' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (40 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/i40e/base: fix repeated register dumps' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/i40e/base: fix loop bounds' " luca.boccassi
                   ` (35 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Barbara Skobiej; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/75db5f003240dfb0ec221fb51cd9dc86c36ff89b

Thanks.

Luca Boccassi

---
From 75db5f003240dfb0ec221fb51cd9dc86c36ff89b Mon Sep 17 00:00:00 2001
From: Barbara Skobiej <barbara.skobiej@intel.com>
Date: Mon, 2 Sep 2024 10:54:34 +0100
Subject: [PATCH] net/i40e/base: fix unchecked return value

[ upstream commit 7fb34b9141aab299c2b84656ec5b12bf41f1c21d ]

Static analysis tools have reported an unchecked return value warning.
Address the warning by checking return value.

Fixes: 2450cc2dc871 ("i40e/base: find partition id in NPAR mode and disable FCoE")

Signed-off-by: Barbara Skobiej <barbara.skobiej@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 3acb48e20b..e5651ad80b 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -4226,8 +4226,8 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
 		/* use AQ read to get the physical register offset instead
 		 * of the port relative offset
 		 */
-		i40e_aq_debug_read_register(hw, port_cfg_reg, &port_cfg, NULL);
-		if (!(port_cfg & I40E_PRTGEN_CNF_PORT_DIS_MASK))
+		status = i40e_aq_debug_read_register(hw, port_cfg_reg, &port_cfg, NULL);
+		if ((status == I40E_SUCCESS) && (!(port_cfg & I40E_PRTGEN_CNF_PORT_DIS_MASK)))
 			hw->num_ports++;
 	}
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.151728352 +0100
+++ 0043-net-i40e-base-fix-unchecked-return-value.patch	2024-10-23 22:16:40.495942585 +0100
@@ -1 +1 @@
-From 7fb34b9141aab299c2b84656ec5b12bf41f1c21d Mon Sep 17 00:00:00 2001
+From 75db5f003240dfb0ec221fb51cd9dc86c36ff89b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7fb34b9141aab299c2b84656ec5b12bf41f1c21d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 416f31dcc3..07e18deaea 100644
+index 3acb48e20b..e5651ad80b 100644
@@ -23 +24 @@
-@@ -4215,8 +4215,8 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
+@@ -4226,8 +4226,8 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,

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

* patch 'net/i40e/base: fix loop bounds' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (41 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/i40e/base: fix unchecked return value' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/i40e: fix AVX-512 pointer copy on 32-bit' " luca.boccassi
                   ` (34 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Barbara Skobiej; +Cc: Anatoly Burakov, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6c69f14358ba4ae6412cbf2c5eb73dfe9ccfa09b

Thanks.

Luca Boccassi

---
From 6c69f14358ba4ae6412cbf2c5eb73dfe9ccfa09b Mon Sep 17 00:00:00 2001
From: Barbara Skobiej <barbara.skobiej@intel.com>
Date: Mon, 2 Sep 2024 10:54:35 +0100
Subject: [PATCH] net/i40e/base: fix loop bounds

[ upstream commit 3e61fe48412f46daa66f7ccc8f03b1e7620d0b64 ]

An unchecked value used as a loop bound. Add verification if value of
'next_to_clean' variable is greater than 2^10 (next_to_clean is 10 bits).

Also, refactored loop so that it reads the head value only once, and also
checks if head is invalid.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Barbara Skobiej <barbara.skobiej@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/i40e/base/i40e_adminq.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 27c82d9b44..cd3b0f2e45 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -791,12 +791,26 @@ u16 i40e_clean_asq(struct i40e_hw *hw)
 	u16 ntc = asq->next_to_clean;
 	struct i40e_aq_desc desc_cb;
 	struct i40e_aq_desc *desc;
+	u32 head = 0;
+
+	if (ntc >= (1 << 10))
+		goto clean_asq_exit;
 
 	desc = I40E_ADMINQ_DESC(*asq, ntc);
 	details = I40E_ADMINQ_DETAILS(*asq, ntc);
-	while (rd32(hw, hw->aq.asq.head) != ntc) {
+	while (true) {
+		head = rd32(hw, hw->aq.asq.head);
+
+		if (head >= asq->count) {
+			i40e_debug(hw, I40E_DEBUG_AQ_COMMAND, "Read head value is improper\n");
+			return 0;
+		}
+
+		if (head == ntc)
+			break;
+
 		i40e_debug(hw, I40E_DEBUG_AQ_COMMAND,
-			   "ntc %d head %d.\n", ntc, rd32(hw, hw->aq.asq.head));
+			   "ntc %d head %d.\n", ntc, head);
 
 		if (details->callback) {
 			I40E_ADMINQ_CALLBACK cb_func =
@@ -816,6 +830,7 @@ u16 i40e_clean_asq(struct i40e_hw *hw)
 
 	asq->next_to_clean = ntc;
 
+clean_asq_exit:
 	return I40E_DESC_UNUSED(asq);
 }
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.189323744 +0100
+++ 0044-net-i40e-base-fix-loop-bounds.patch	2024-10-23 22:16:40.495942585 +0100
@@ -1 +1 @@
-From 3e61fe48412f46daa66f7ccc8f03b1e7620d0b64 Mon Sep 17 00:00:00 2001
+From 6c69f14358ba4ae6412cbf2c5eb73dfe9ccfa09b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e61fe48412f46daa66f7ccc8f03b1e7620d0b64 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index b670250180..350288269b 100644
+index 27c82d9b44..cd3b0f2e45 100644
@@ -26 +27 @@
-@@ -745,12 +745,26 @@ u16 i40e_clean_asq(struct i40e_hw *hw)
+@@ -791,12 +791,26 @@ u16 i40e_clean_asq(struct i40e_hw *hw)
@@ -55 +56 @@
-@@ -770,6 +784,7 @@ u16 i40e_clean_asq(struct i40e_hw *hw)
+@@ -816,6 +830,7 @@ u16 i40e_clean_asq(struct i40e_hw *hw)

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

* patch 'net/i40e: fix AVX-512 pointer copy on 32-bit' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (42 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/i40e/base: fix loop bounds' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/ice: " luca.boccassi
                   ` (33 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Ian Stokes, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 0d727f9dd2a3372157608968b0c6e8bd42e634fb Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 6 Sep 2024 15:11:24 +0100
Subject: [PATCH] net/i40e: fix AVX-512 pointer copy on 32-bit

[ upstream commit 2d040df2437a025ef6d2ecf72de96d5c9fe97439 ]

The size of a pointer on 32-bit is only 4 rather than 8 bytes, so
copying 32 pointers only requires half the number of AVX-512 load store
operations.

Fixes: 5171b4ee6b6b ("net/i40e: optimize Tx by using AVX512")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ian Stokes <ian.stokes@intel.com>
---
 drivers/net/i40e/i40e_rxtx_vec_avx512.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx512.c b/drivers/net/i40e/i40e_rxtx_vec_avx512.c
index 74ff54c653..3490299a6f 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx512.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx512.c
@@ -922,6 +922,7 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
 		uint32_t copied = 0;
 		/* n is multiple of 32 */
 		while (copied < n) {
+#ifdef RTE_ARCH_64
 			const __m512i a = _mm512_load_si512(&txep[copied]);
 			const __m512i b = _mm512_load_si512(&txep[copied + 8]);
 			const __m512i c = _mm512_load_si512(&txep[copied + 16]);
@@ -931,6 +932,12 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
 			_mm512_storeu_si512(&cache_objs[copied + 8], b);
 			_mm512_storeu_si512(&cache_objs[copied + 16], c);
 			_mm512_storeu_si512(&cache_objs[copied + 24], d);
+#else
+			const __m512i a = _mm512_load_si512(&txep[copied]);
+			const __m512i b = _mm512_load_si512(&txep[copied + 16]);
+			_mm512_storeu_si512(&cache_objs[copied], a);
+			_mm512_storeu_si512(&cache_objs[copied + 16], b);
+#endif
 			copied += 32;
 		}
 		cache->len += n;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.224753269 +0100
+++ 0045-net-i40e-fix-AVX-512-pointer-copy-on-32-bit.patch	2024-10-23 22:16:40.499942740 +0100
@@ -1 +1 @@
-From 2d040df2437a025ef6d2ecf72de96d5c9fe97439 Mon Sep 17 00:00:00 2001
+From 0d727f9dd2a3372157608968b0c6e8bd42e634fb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d040df2437a025ef6d2ecf72de96d5c9fe97439 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 0238b03f8a..3b2750221b 100644
+index 74ff54c653..3490299a6f 100644
@@ -23 +24 @@
-@@ -799,6 +799,7 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
+@@ -922,6 +922,7 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
@@ -31 +32 @@
-@@ -808,6 +809,12 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)
+@@ -931,6 +932,12 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)

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

* patch 'net/ice: fix AVX-512 pointer copy on 32-bit' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (43 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/i40e: fix AVX-512 pointer copy on 32-bit' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/iavf: " luca.boccassi
                   ` (32 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Ian Stokes, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 8c93fc77264f4b3a7dfbef31f168f9c2fe7e5379 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 6 Sep 2024 15:11:25 +0100
Subject: [PATCH] net/ice: fix AVX-512 pointer copy on 32-bit

[ upstream commit da97aeafca4cdd40892ffb7e628bb15dcf9c0f25 ]

The size of a pointer on 32-bit is only 4 rather than 8 bytes, so
copying 32 pointers only requires half the number of AVX-512 load store
operations.

Fixes: a4e480de268e ("net/ice: optimize Tx by using AVX512")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ian Stokes <ian.stokes@intel.com>
---
 drivers/net/ice/ice_rxtx_vec_avx512.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ice/ice_rxtx_vec_avx512.c b/drivers/net/ice/ice_rxtx_vec_avx512.c
index 5bfd5152df..5f91ee4839 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx512.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx512.c
@@ -1020,6 +1020,7 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)
 		uint32_t copied = 0;
 		/* n is multiple of 32 */
 		while (copied < n) {
+#ifdef RTE_ARCH_64
 			const __m512i a = _mm512_loadu_si512(&txep[copied]);
 			const __m512i b = _mm512_loadu_si512(&txep[copied + 8]);
 			const __m512i c = _mm512_loadu_si512(&txep[copied + 16]);
@@ -1029,6 +1030,12 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)
 			_mm512_storeu_si512(&cache_objs[copied + 8], b);
 			_mm512_storeu_si512(&cache_objs[copied + 16], c);
 			_mm512_storeu_si512(&cache_objs[copied + 24], d);
+#else
+			const __m512i a = _mm512_loadu_si512(&txep[copied]);
+			const __m512i b = _mm512_loadu_si512(&txep[copied + 16]);
+			_mm512_storeu_si512(&cache_objs[copied], a);
+			_mm512_storeu_si512(&cache_objs[copied + 16], b);
+#endif
 			copied += 32;
 		}
 		cache->len += n;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.258238170 +0100
+++ 0046-net-ice-fix-AVX-512-pointer-copy-on-32-bit.patch	2024-10-23 22:16:40.499942740 +0100
@@ -1 +1 @@
-From da97aeafca4cdd40892ffb7e628bb15dcf9c0f25 Mon Sep 17 00:00:00 2001
+From 8c93fc77264f4b3a7dfbef31f168f9c2fe7e5379 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit da97aeafca4cdd40892ffb7e628bb15dcf9c0f25 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 04148e8ea2..add095ef06 100644
+index 5bfd5152df..5f91ee4839 100644
@@ -23 +24 @@
-@@ -907,6 +907,7 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)
+@@ -1020,6 +1020,7 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)
@@ -31 +32 @@
-@@ -916,6 +917,12 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)
+@@ -1029,6 +1030,12 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)

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

* patch 'net/iavf: fix AVX-512 pointer copy on 32-bit' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (44 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/ice: " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/tap: avoid memcpy with null argument' " luca.boccassi
                   ` (31 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Ian Stokes, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From b25fb707fa1a64411395fcf2bed73eb99059863f Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 6 Sep 2024 15:11:26 +0100
Subject: [PATCH] net/iavf: fix AVX-512 pointer copy on 32-bit

[ upstream commit 77608b24bdd840d323ebd9cb6ffffaf5c760983e ]

The size of a pointer on 32-bit is only 4 rather than 8 bytes, so
copying 32 pointers only requires half the number of AVX-512 load store
operations.

Fixes: 9ab9514c150e ("net/iavf: enable AVX512 for Tx")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ian Stokes <ian.stokes@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
index b0546a14c6..eb6eb9847d 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
@@ -1818,6 +1818,7 @@ iavf_tx_free_bufs_avx512(struct iavf_tx_queue *txq)
 		uint32_t copied = 0;
 		/* n is multiple of 32 */
 		while (copied < n) {
+#ifdef RTE_ARCH_64
 			const __m512i a = _mm512_loadu_si512(&txep[copied]);
 			const __m512i b = _mm512_loadu_si512(&txep[copied + 8]);
 			const __m512i c = _mm512_loadu_si512(&txep[copied + 16]);
@@ -1827,6 +1828,12 @@ iavf_tx_free_bufs_avx512(struct iavf_tx_queue *txq)
 			_mm512_storeu_si512(&cache_objs[copied + 8], b);
 			_mm512_storeu_si512(&cache_objs[copied + 16], c);
 			_mm512_storeu_si512(&cache_objs[copied + 24], d);
+#else
+			const __m512i a = _mm512_loadu_si512(&txep[copied]);
+			const __m512i b = _mm512_loadu_si512(&txep[copied + 16]);
+			_mm512_storeu_si512(&cache_objs[copied], a);
+			_mm512_storeu_si512(&cache_objs[copied + 16], b);
+#endif
 			copied += 32;
 		}
 		cache->len += n;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.294094568 +0100
+++ 0047-net-iavf-fix-AVX-512-pointer-copy-on-32-bit.patch	2024-10-23 22:16:40.499942740 +0100
@@ -1 +1 @@
-From 77608b24bdd840d323ebd9cb6ffffaf5c760983e Mon Sep 17 00:00:00 2001
+From b25fb707fa1a64411395fcf2bed73eb99059863f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 77608b24bdd840d323ebd9cb6ffffaf5c760983e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 3bb6f305df..d6a861bf80 100644
+index b0546a14c6..eb6eb9847d 100644
@@ -23 +24 @@
-@@ -1892,6 +1892,7 @@ iavf_tx_free_bufs_avx512(struct iavf_tx_queue *txq)
+@@ -1818,6 +1818,7 @@ iavf_tx_free_bufs_avx512(struct iavf_tx_queue *txq)
@@ -31 +32 @@
-@@ -1901,6 +1902,12 @@ iavf_tx_free_bufs_avx512(struct iavf_tx_queue *txq)
+@@ -1827,6 +1828,12 @@ iavf_tx_free_bufs_avx512(struct iavf_tx_queue *txq)

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

* patch 'net/tap: avoid memcpy with null argument' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (45 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/iavf: " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'app/testpmd: remove unnecessary cast' " luca.boccassi
                   ` (30 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 8b8b03abd8b14c9b3d42d2808a02a6161a36ef8b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 13 Aug 2024 19:34:16 -0700
Subject: [PATCH] net/tap: avoid memcpy with null argument

[ upstream commit 3975d85fb8606308ccdb6439b35f70e8733a78e8 ]

Calling memcpy with a null pointer even if zero length is
undefined, so check if data_length is zero.
Problem reported by Gcc analyzer.

Fixes: 7c25284e30c2 ("net/tap: add netlink back-end for flow API")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/tap/tap_netlink.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/tap/tap_netlink.c b/drivers/net/tap/tap_netlink.c
index d9c260127d..35c491ac37 100644
--- a/drivers/net/tap/tap_netlink.c
+++ b/drivers/net/tap/tap_netlink.c
@@ -302,7 +302,8 @@ tap_nlattr_add(struct nlmsghdr *nh, unsigned short type,
 	rta = (struct rtattr *)NLMSG_TAIL(nh);
 	rta->rta_len = RTA_LENGTH(data_len);
 	rta->rta_type = type;
-	memcpy(RTA_DATA(rta), data, data_len);
+	if (data_len > 0)
+		memcpy(RTA_DATA(rta), data, data_len);
 	nh->nlmsg_len = NLMSG_ALIGN(nh->nlmsg_len) + RTA_ALIGN(rta->rta_len);
 }
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.331354752 +0100
+++ 0048-net-tap-avoid-memcpy-with-null-argument.patch	2024-10-23 22:16:40.499942740 +0100
@@ -1 +1 @@
-From 3975d85fb8606308ccdb6439b35f70e8733a78e8 Mon Sep 17 00:00:00 2001
+From 8b8b03abd8b14c9b3d42d2808a02a6161a36ef8b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3975d85fb8606308ccdb6439b35f70e8733a78e8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/testpmd: remove unnecessary cast' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (46 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/tap: avoid memcpy with null argument' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/pcap: set live interface as non-blocking' " luca.boccassi
                   ` (29 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 7b317b7db97cd8ddf45bbd509d026496c92f883a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 23 Aug 2024 09:26:01 -0700
Subject: [PATCH] app/testpmd: remove unnecessary cast

[ upstream commit 0a3901aa624a690faa49ca081c468320d4edcb7a ]

The list of builtin cmdline commands has unnecessary cast which
blocks compiler type checking.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/cmdline.c | 440 ++++++++++++++++++++---------------------
 1 file changed, 220 insertions(+), 220 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 820332df50..5336df528b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -12615,232 +12615,232 @@ static cmdline_parse_inst_t cmd_show_port_flow_transfer_proxy = {
 
 /* list of instructions */
 static cmdline_parse_ctx_t builtin_ctx[] = {
-	(cmdline_parse_inst_t *)&cmd_help_brief,
-	(cmdline_parse_inst_t *)&cmd_help_long,
-	(cmdline_parse_inst_t *)&cmd_quit,
-	(cmdline_parse_inst_t *)&cmd_load_from_file,
-	(cmdline_parse_inst_t *)&cmd_showport,
-	(cmdline_parse_inst_t *)&cmd_showqueue,
-	(cmdline_parse_inst_t *)&cmd_showeeprom,
-	(cmdline_parse_inst_t *)&cmd_showportall,
-	(cmdline_parse_inst_t *)&cmd_representor_info,
-	(cmdline_parse_inst_t *)&cmd_showdevice,
-	(cmdline_parse_inst_t *)&cmd_showcfg,
-	(cmdline_parse_inst_t *)&cmd_showfwdall,
-	(cmdline_parse_inst_t *)&cmd_start,
-	(cmdline_parse_inst_t *)&cmd_start_tx_first,
-	(cmdline_parse_inst_t *)&cmd_start_tx_first_n,
-	(cmdline_parse_inst_t *)&cmd_set_link_up,
-	(cmdline_parse_inst_t *)&cmd_set_link_down,
-	(cmdline_parse_inst_t *)&cmd_reset,
-	(cmdline_parse_inst_t *)&cmd_set_numbers,
-	(cmdline_parse_inst_t *)&cmd_set_log,
-	(cmdline_parse_inst_t *)&cmd_set_rxoffs,
-	(cmdline_parse_inst_t *)&cmd_set_rxpkts,
-	(cmdline_parse_inst_t *)&cmd_set_rxhdrs,
-	(cmdline_parse_inst_t *)&cmd_set_txpkts,
-	(cmdline_parse_inst_t *)&cmd_set_txsplit,
-	(cmdline_parse_inst_t *)&cmd_set_txtimes,
-	(cmdline_parse_inst_t *)&cmd_set_fwd_list,
-	(cmdline_parse_inst_t *)&cmd_set_fwd_mask,
-	(cmdline_parse_inst_t *)&cmd_set_fwd_mode,
-	(cmdline_parse_inst_t *)&cmd_set_fwd_retry_mode,
-	(cmdline_parse_inst_t *)&cmd_set_burst_tx_retry,
-	(cmdline_parse_inst_t *)&cmd_set_promisc_mode_one,
-	(cmdline_parse_inst_t *)&cmd_set_promisc_mode_all,
-	(cmdline_parse_inst_t *)&cmd_set_allmulti_mode_one,
-	(cmdline_parse_inst_t *)&cmd_set_allmulti_mode_all,
-	(cmdline_parse_inst_t *)&cmd_set_flush_rx,
-	(cmdline_parse_inst_t *)&cmd_set_link_check,
-	(cmdline_parse_inst_t *)&cmd_vlan_offload,
-	(cmdline_parse_inst_t *)&cmd_vlan_tpid,
-	(cmdline_parse_inst_t *)&cmd_rx_vlan_filter_all,
-	(cmdline_parse_inst_t *)&cmd_rx_vlan_filter,
-	(cmdline_parse_inst_t *)&cmd_tx_vlan_set,
-	(cmdline_parse_inst_t *)&cmd_tx_vlan_set_qinq,
-	(cmdline_parse_inst_t *)&cmd_tx_vlan_reset,
-	(cmdline_parse_inst_t *)&cmd_tx_vlan_set_pvid,
-	(cmdline_parse_inst_t *)&cmd_csum_set,
-	(cmdline_parse_inst_t *)&cmd_csum_show,
-	(cmdline_parse_inst_t *)&cmd_csum_tunnel,
-	(cmdline_parse_inst_t *)&cmd_csum_mac_swap,
-	(cmdline_parse_inst_t *)&cmd_tso_set,
-	(cmdline_parse_inst_t *)&cmd_tso_show,
-	(cmdline_parse_inst_t *)&cmd_tunnel_tso_set,
-	(cmdline_parse_inst_t *)&cmd_tunnel_tso_show,
+	&cmd_help_brief,
+	&cmd_help_long,
+	&cmd_quit,
+	&cmd_load_from_file,
+	&cmd_showport,
+	&cmd_showqueue,
+	&cmd_showeeprom,
+	&cmd_showportall,
+	&cmd_representor_info,
+	&cmd_showdevice,
+	&cmd_showcfg,
+	&cmd_showfwdall,
+	&cmd_start,
+	&cmd_start_tx_first,
+	&cmd_start_tx_first_n,
+	&cmd_set_link_up,
+	&cmd_set_link_down,
+	&cmd_reset,
+	&cmd_set_numbers,
+	&cmd_set_log,
+	&cmd_set_rxoffs,
+	&cmd_set_rxpkts,
+	&cmd_set_rxhdrs,
+	&cmd_set_txpkts,
+	&cmd_set_txsplit,
+	&cmd_set_txtimes,
+	&cmd_set_fwd_list,
+	&cmd_set_fwd_mask,
+	&cmd_set_fwd_mode,
+	&cmd_set_fwd_retry_mode,
+	&cmd_set_burst_tx_retry,
+	&cmd_set_promisc_mode_one,
+	&cmd_set_promisc_mode_all,
+	&cmd_set_allmulti_mode_one,
+	&cmd_set_allmulti_mode_all,
+	&cmd_set_flush_rx,
+	&cmd_set_link_check,
+	&cmd_vlan_offload,
+	&cmd_vlan_tpid,
+	&cmd_rx_vlan_filter_all,
+	&cmd_rx_vlan_filter,
+	&cmd_tx_vlan_set,
+	&cmd_tx_vlan_set_qinq,
+	&cmd_tx_vlan_reset,
+	&cmd_tx_vlan_set_pvid,
+	&cmd_csum_set,
+	&cmd_csum_show,
+	&cmd_csum_tunnel,
+	&cmd_csum_mac_swap,
+	&cmd_tso_set,
+	&cmd_tso_show,
+	&cmd_tunnel_tso_set,
+	&cmd_tunnel_tso_show,
 #ifdef RTE_LIB_GRO
-	(cmdline_parse_inst_t *)&cmd_gro_enable,
-	(cmdline_parse_inst_t *)&cmd_gro_flush,
-	(cmdline_parse_inst_t *)&cmd_gro_show,
+	&cmd_gro_enable,
+	&cmd_gro_flush,
+	&cmd_gro_show,
 #endif
 #ifdef RTE_LIB_GSO
-	(cmdline_parse_inst_t *)&cmd_gso_enable,
-	(cmdline_parse_inst_t *)&cmd_gso_size,
-	(cmdline_parse_inst_t *)&cmd_gso_show,
+	&cmd_gso_enable,
+	&cmd_gso_size,
+	&cmd_gso_show,
 #endif
-	(cmdline_parse_inst_t *)&cmd_link_flow_control_set,
-	(cmdline_parse_inst_t *)&cmd_link_flow_control_set_rx,
-	(cmdline_parse_inst_t *)&cmd_link_flow_control_set_tx,
-	(cmdline_parse_inst_t *)&cmd_link_flow_control_set_hw,
-	(cmdline_parse_inst_t *)&cmd_link_flow_control_set_lw,
-	(cmdline_parse_inst_t *)&cmd_link_flow_control_set_pt,
-	(cmdline_parse_inst_t *)&cmd_link_flow_control_set_xon,
-	(cmdline_parse_inst_t *)&cmd_link_flow_control_set_macfwd,
-	(cmdline_parse_inst_t *)&cmd_link_flow_control_set_autoneg,
-	(cmdline_parse_inst_t *)&cmd_link_flow_control_show,
-	(cmdline_parse_inst_t *)&cmd_priority_flow_control_set,
-	(cmdline_parse_inst_t *)&cmd_queue_priority_flow_control_set,
-	(cmdline_parse_inst_t *)&cmd_config_dcb,
-	(cmdline_parse_inst_t *)&cmd_read_rxd_txd,
-	(cmdline_parse_inst_t *)&cmd_stop,
-	(cmdline_parse_inst_t *)&cmd_mac_addr,
-	(cmdline_parse_inst_t *)&cmd_set_fwd_eth_peer,
-	(cmdline_parse_inst_t *)&cmd_set_qmap,
-	(cmdline_parse_inst_t *)&cmd_set_xstats_hide_zero,
-	(cmdline_parse_inst_t *)&cmd_set_record_core_cycles,
-	(cmdline_parse_inst_t *)&cmd_set_record_burst_stats,
-	(cmdline_parse_inst_t *)&cmd_operate_port,
-	(cmdline_parse_inst_t *)&cmd_operate_specific_port,
-	(cmdline_parse_inst_t *)&cmd_operate_attach_port,
-	(cmdline_parse_inst_t *)&cmd_operate_detach_port,
-	(cmdline_parse_inst_t *)&cmd_operate_detach_device,
-	(cmdline_parse_inst_t *)&cmd_set_port_setup_on,
-	(cmdline_parse_inst_t *)&cmd_config_speed_all,
-	(cmdline_parse_inst_t *)&cmd_config_speed_specific,
-	(cmdline_parse_inst_t *)&cmd_config_loopback_all,
-	(cmdline_parse_inst_t *)&cmd_config_loopback_specific,
-	(cmdline_parse_inst_t *)&cmd_config_rx_tx,
-	(cmdline_parse_inst_t *)&cmd_config_mtu,
-	(cmdline_parse_inst_t *)&cmd_config_max_pkt_len,
-	(cmdline_parse_inst_t *)&cmd_config_max_lro_pkt_size,
-	(cmdline_parse_inst_t *)&cmd_config_rx_mode_flag,
-	(cmdline_parse_inst_t *)&cmd_config_rss,
-	(cmdline_parse_inst_t *)&cmd_config_rxtx_ring_size,
-	(cmdline_parse_inst_t *)&cmd_config_rxtx_queue,
-	(cmdline_parse_inst_t *)&cmd_config_deferred_start_rxtx_queue,
-	(cmdline_parse_inst_t *)&cmd_setup_rxtx_queue,
-	(cmdline_parse_inst_t *)&cmd_config_rss_reta,
-	(cmdline_parse_inst_t *)&cmd_showport_reta,
-	(cmdline_parse_inst_t *)&cmd_showport_macs,
-	(cmdline_parse_inst_t *)&cmd_show_port_flow_transfer_proxy,
-	(cmdline_parse_inst_t *)&cmd_config_burst,
-	(cmdline_parse_inst_t *)&cmd_config_thresh,
-	(cmdline_parse_inst_t *)&cmd_config_threshold,
-	(cmdline_parse_inst_t *)&cmd_set_uc_hash_filter,
-	(cmdline_parse_inst_t *)&cmd_set_uc_all_hash_filter,
-	(cmdline_parse_inst_t *)&cmd_vf_mac_addr_filter,
-	(cmdline_parse_inst_t *)&cmd_queue_rate_limit,
-	(cmdline_parse_inst_t *)&cmd_tunnel_udp_config,
-	(cmdline_parse_inst_t *)&cmd_showport_rss_hash,
-	(cmdline_parse_inst_t *)&cmd_showport_rss_hash_key,
-	(cmdline_parse_inst_t *)&cmd_config_rss_hash_key,
-	(cmdline_parse_inst_t *)&cmd_cleanup_txq_mbufs,
-	(cmdline_parse_inst_t *)&cmd_dump,
-	(cmdline_parse_inst_t *)&cmd_dump_one,
-	(cmdline_parse_inst_t *)&cmd_flow,
-	(cmdline_parse_inst_t *)&cmd_show_port_meter_cap,
-	(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_srtcm,
-	(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm,
-	(cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm_rfc4115,
-	(cmdline_parse_inst_t *)&cmd_del_port_meter_profile,
-	(cmdline_parse_inst_t *)&cmd_create_port_meter,
-	(cmdline_parse_inst_t *)&cmd_enable_port_meter,
-	(cmdline_parse_inst_t *)&cmd_disable_port_meter,
-	(cmdline_parse_inst_t *)&cmd_del_port_meter,
-	(cmdline_parse_inst_t *)&cmd_del_port_meter_policy,
-	(cmdline_parse_inst_t *)&cmd_set_port_meter_profile,
-	(cmdline_parse_inst_t *)&cmd_set_port_meter_dscp_table,
-	(cmdline_parse_inst_t *)&cmd_set_port_meter_vlan_table,
-	(cmdline_parse_inst_t *)&cmd_set_port_meter_in_proto,
-	(cmdline_parse_inst_t *)&cmd_get_port_meter_in_proto,
-	(cmdline_parse_inst_t *)&cmd_get_port_meter_in_proto_prio,
-	(cmdline_parse_inst_t *)&cmd_set_port_meter_stats_mask,
-	(cmdline_parse_inst_t *)&cmd_show_port_meter_stats,
-	(cmdline_parse_inst_t *)&cmd_mcast_addr,
-	(cmdline_parse_inst_t *)&cmd_set_vf_vlan_anti_spoof,
-	(cmdline_parse_inst_t *)&cmd_set_vf_mac_anti_spoof,
-	(cmdline_parse_inst_t *)&cmd_set_vf_vlan_stripq,
-	(cmdline_parse_inst_t *)&cmd_set_vf_vlan_insert,
-	(cmdline_parse_inst_t *)&cmd_set_tx_loopback,
-	(cmdline_parse_inst_t *)&cmd_set_all_queues_drop_en,
-	(cmdline_parse_inst_t *)&cmd_set_vf_traffic,
-	(cmdline_parse_inst_t *)&cmd_set_vf_rxmode,
-	(cmdline_parse_inst_t *)&cmd_vf_rate_limit,
-	(cmdline_parse_inst_t *)&cmd_vf_rxvlan_filter,
-	(cmdline_parse_inst_t *)&cmd_set_vf_mac_addr,
-	(cmdline_parse_inst_t *)&cmd_set_vxlan,
-	(cmdline_parse_inst_t *)&cmd_set_vxlan_tos_ttl,
-	(cmdline_parse_inst_t *)&cmd_set_vxlan_with_vlan,
-	(cmdline_parse_inst_t *)&cmd_set_nvgre,
-	(cmdline_parse_inst_t *)&cmd_set_nvgre_with_vlan,
-	(cmdline_parse_inst_t *)&cmd_set_l2_encap,
-	(cmdline_parse_inst_t *)&cmd_set_l2_encap_with_vlan,
-	(cmdline_parse_inst_t *)&cmd_set_l2_decap,
-	(cmdline_parse_inst_t *)&cmd_set_l2_decap_with_vlan,
-	(cmdline_parse_inst_t *)&cmd_set_mplsogre_encap,
-	(cmdline_parse_inst_t *)&cmd_set_mplsogre_encap_with_vlan,
-	(cmdline_parse_inst_t *)&cmd_set_mplsogre_decap,
-	(cmdline_parse_inst_t *)&cmd_set_mplsogre_decap_with_vlan,
-	(cmdline_parse_inst_t *)&cmd_set_mplsoudp_encap,
-	(cmdline_parse_inst_t *)&cmd_set_mplsoudp_encap_with_vlan,
-	(cmdline_parse_inst_t *)&cmd_set_mplsoudp_decap,
-	(cmdline_parse_inst_t *)&cmd_set_mplsoudp_decap_with_vlan,
-	(cmdline_parse_inst_t *)&cmd_set_conntrack_common,
-	(cmdline_parse_inst_t *)&cmd_set_conntrack_dir,
-	(cmdline_parse_inst_t *)&cmd_show_vf_stats,
-	(cmdline_parse_inst_t *)&cmd_clear_vf_stats,
-	(cmdline_parse_inst_t *)&cmd_show_port_supported_ptypes,
-	(cmdline_parse_inst_t *)&cmd_set_port_ptypes,
-	(cmdline_parse_inst_t *)&cmd_show_port_tm_cap,
-	(cmdline_parse_inst_t *)&cmd_show_port_tm_level_cap,
-	(cmdline_parse_inst_t *)&cmd_show_port_tm_node_cap,
-	(cmdline_parse_inst_t *)&cmd_show_port_tm_node_type,
-	(cmdline_parse_inst_t *)&cmd_show_port_tm_node_stats,
-	(cmdline_parse_inst_t *)&cmd_add_port_tm_node_shaper_profile,
-	(cmdline_parse_inst_t *)&cmd_del_port_tm_node_shaper_profile,
-	(cmdline_parse_inst_t *)&cmd_add_port_tm_node_shared_shaper,
-	(cmdline_parse_inst_t *)&cmd_del_port_tm_node_shared_shaper,
-	(cmdline_parse_inst_t *)&cmd_add_port_tm_node_wred_profile,
-	(cmdline_parse_inst_t *)&cmd_del_port_tm_node_wred_profile,
-	(cmdline_parse_inst_t *)&cmd_set_port_tm_node_shaper_profile,
-	(cmdline_parse_inst_t *)&cmd_add_port_tm_nonleaf_node,
-	(cmdline_parse_inst_t *)&cmd_add_port_tm_nonleaf_node_pmode,
-	(cmdline_parse_inst_t *)&cmd_add_port_tm_leaf_node,
-	(cmdline_parse_inst_t *)&cmd_del_port_tm_node,
-	(cmdline_parse_inst_t *)&cmd_set_port_tm_node_parent,
-	(cmdline_parse_inst_t *)&cmd_suspend_port_tm_node,
-	(cmdline_parse_inst_t *)&cmd_resume_port_tm_node,
-	(cmdline_parse_inst_t *)&cmd_port_tm_hierarchy_commit,
-	(cmdline_parse_inst_t *)&cmd_port_tm_mark_ip_ecn,
-	(cmdline_parse_inst_t *)&cmd_port_tm_mark_ip_dscp,
-	(cmdline_parse_inst_t *)&cmd_port_tm_mark_vlan_dei,
-	(cmdline_parse_inst_t *)&cmd_cfg_tunnel_udp_port,
-	(cmdline_parse_inst_t *)&cmd_rx_offload_get_capa,
-	(cmdline_parse_inst_t *)&cmd_rx_offload_get_configuration,
-	(cmdline_parse_inst_t *)&cmd_config_per_port_rx_offload,
-	(cmdline_parse_inst_t *)&cmd_config_per_queue_rx_offload,
-	(cmdline_parse_inst_t *)&cmd_tx_offload_get_capa,
-	(cmdline_parse_inst_t *)&cmd_tx_offload_get_configuration,
-	(cmdline_parse_inst_t *)&cmd_config_per_port_tx_offload,
-	(cmdline_parse_inst_t *)&cmd_config_per_queue_tx_offload,
+	&cmd_link_flow_control_set,
+	&cmd_link_flow_control_set_rx,
+	&cmd_link_flow_control_set_tx,
+	&cmd_link_flow_control_set_hw,
+	&cmd_link_flow_control_set_lw,
+	&cmd_link_flow_control_set_pt,
+	&cmd_link_flow_control_set_xon,
+	&cmd_link_flow_control_set_macfwd,
+	&cmd_link_flow_control_set_autoneg,
+	&cmd_link_flow_control_show,
+	&cmd_priority_flow_control_set,
+	&cmd_queue_priority_flow_control_set,
+	&cmd_config_dcb,
+	&cmd_read_rxd_txd,
+	&cmd_stop,
+	&cmd_mac_addr,
+	&cmd_set_fwd_eth_peer,
+	&cmd_set_qmap,
+	&cmd_set_xstats_hide_zero,
+	&cmd_set_record_core_cycles,
+	&cmd_set_record_burst_stats,
+	&cmd_operate_port,
+	&cmd_operate_specific_port,
+	&cmd_operate_attach_port,
+	&cmd_operate_detach_port,
+	&cmd_operate_detach_device,
+	&cmd_set_port_setup_on,
+	&cmd_config_speed_all,
+	&cmd_config_speed_specific,
+	&cmd_config_loopback_all,
+	&cmd_config_loopback_specific,
+	&cmd_config_rx_tx,
+	&cmd_config_mtu,
+	&cmd_config_max_pkt_len,
+	&cmd_config_max_lro_pkt_size,
+	&cmd_config_rx_mode_flag,
+	&cmd_config_rss,
+	&cmd_config_rxtx_ring_size,
+	&cmd_config_rxtx_queue,
+	&cmd_config_deferred_start_rxtx_queue,
+	&cmd_setup_rxtx_queue,
+	&cmd_config_rss_reta,
+	&cmd_showport_reta,
+	&cmd_showport_macs,
+	&cmd_show_port_flow_transfer_proxy,
+	&cmd_config_burst,
+	&cmd_config_thresh,
+	&cmd_config_threshold,
+	&cmd_set_uc_hash_filter,
+	&cmd_set_uc_all_hash_filter,
+	&cmd_vf_mac_addr_filter,
+	&cmd_queue_rate_limit,
+	&cmd_tunnel_udp_config,
+	&cmd_showport_rss_hash,
+	&cmd_showport_rss_hash_key,
+	&cmd_config_rss_hash_key,
+	&cmd_cleanup_txq_mbufs,
+	&cmd_dump,
+	&cmd_dump_one,
+	&cmd_flow,
+	&cmd_show_port_meter_cap,
+	&cmd_add_port_meter_profile_srtcm,
+	&cmd_add_port_meter_profile_trtcm,
+	&cmd_add_port_meter_profile_trtcm_rfc4115,
+	&cmd_del_port_meter_profile,
+	&cmd_create_port_meter,
+	&cmd_enable_port_meter,
+	&cmd_disable_port_meter,
+	&cmd_del_port_meter,
+	&cmd_del_port_meter_policy,
+	&cmd_set_port_meter_profile,
+	&cmd_set_port_meter_dscp_table,
+	&cmd_set_port_meter_vlan_table,
+	&cmd_set_port_meter_in_proto,
+	&cmd_get_port_meter_in_proto,
+	&cmd_get_port_meter_in_proto_prio,
+	&cmd_set_port_meter_stats_mask,
+	&cmd_show_port_meter_stats,
+	&cmd_mcast_addr,
+	&cmd_set_vf_vlan_anti_spoof,
+	&cmd_set_vf_mac_anti_spoof,
+	&cmd_set_vf_vlan_stripq,
+	&cmd_set_vf_vlan_insert,
+	&cmd_set_tx_loopback,
+	&cmd_set_all_queues_drop_en,
+	&cmd_set_vf_traffic,
+	&cmd_set_vf_rxmode,
+	&cmd_vf_rate_limit,
+	&cmd_vf_rxvlan_filter,
+	&cmd_set_vf_mac_addr,
+	&cmd_set_vxlan,
+	&cmd_set_vxlan_tos_ttl,
+	&cmd_set_vxlan_with_vlan,
+	&cmd_set_nvgre,
+	&cmd_set_nvgre_with_vlan,
+	&cmd_set_l2_encap,
+	&cmd_set_l2_encap_with_vlan,
+	&cmd_set_l2_decap,
+	&cmd_set_l2_decap_with_vlan,
+	&cmd_set_mplsogre_encap,
+	&cmd_set_mplsogre_encap_with_vlan,
+	&cmd_set_mplsogre_decap,
+	&cmd_set_mplsogre_decap_with_vlan,
+	&cmd_set_mplsoudp_encap,
+	&cmd_set_mplsoudp_encap_with_vlan,
+	&cmd_set_mplsoudp_decap,
+	&cmd_set_mplsoudp_decap_with_vlan,
+	&cmd_set_conntrack_common,
+	&cmd_set_conntrack_dir,
+	&cmd_show_vf_stats,
+	&cmd_clear_vf_stats,
+	&cmd_show_port_supported_ptypes,
+	&cmd_set_port_ptypes,
+	&cmd_show_port_tm_cap,
+	&cmd_show_port_tm_level_cap,
+	&cmd_show_port_tm_node_cap,
+	&cmd_show_port_tm_node_type,
+	&cmd_show_port_tm_node_stats,
+	&cmd_add_port_tm_node_shaper_profile,
+	&cmd_del_port_tm_node_shaper_profile,
+	&cmd_add_port_tm_node_shared_shaper,
+	&cmd_del_port_tm_node_shared_shaper,
+	&cmd_add_port_tm_node_wred_profile,
+	&cmd_del_port_tm_node_wred_profile,
+	&cmd_set_port_tm_node_shaper_profile,
+	&cmd_add_port_tm_nonleaf_node,
+	&cmd_add_port_tm_nonleaf_node_pmode,
+	&cmd_add_port_tm_leaf_node,
+	&cmd_del_port_tm_node,
+	&cmd_set_port_tm_node_parent,
+	&cmd_suspend_port_tm_node,
+	&cmd_resume_port_tm_node,
+	&cmd_port_tm_hierarchy_commit,
+	&cmd_port_tm_mark_ip_ecn,
+	&cmd_port_tm_mark_ip_dscp,
+	&cmd_port_tm_mark_vlan_dei,
+	&cmd_cfg_tunnel_udp_port,
+	&cmd_rx_offload_get_capa,
+	&cmd_rx_offload_get_configuration,
+	&cmd_config_per_port_rx_offload,
+	&cmd_config_per_queue_rx_offload,
+	&cmd_tx_offload_get_capa,
+	&cmd_tx_offload_get_configuration,
+	&cmd_config_per_port_tx_offload,
+	&cmd_config_per_queue_tx_offload,
 #ifdef RTE_LIB_BPF
-	(cmdline_parse_inst_t *)&cmd_operate_bpf_ld_parse,
-	(cmdline_parse_inst_t *)&cmd_operate_bpf_unld_parse,
+	&cmd_operate_bpf_ld_parse,
+	&cmd_operate_bpf_unld_parse,
 #endif
-	(cmdline_parse_inst_t *)&cmd_config_tx_metadata_specific,
-	(cmdline_parse_inst_t *)&cmd_show_tx_metadata,
-	(cmdline_parse_inst_t *)&cmd_show_rx_tx_desc_status,
-	(cmdline_parse_inst_t *)&cmd_show_rx_queue_desc_used_count,
-	(cmdline_parse_inst_t *)&cmd_set_raw,
-	(cmdline_parse_inst_t *)&cmd_show_set_raw,
-	(cmdline_parse_inst_t *)&cmd_show_set_raw_all,
-	(cmdline_parse_inst_t *)&cmd_config_tx_dynf_specific,
-	(cmdline_parse_inst_t *)&cmd_show_fec_mode,
-	(cmdline_parse_inst_t *)&cmd_set_fec_mode,
-	(cmdline_parse_inst_t *)&cmd_set_rxq_avail_thresh,
-	(cmdline_parse_inst_t *)&cmd_show_capability,
-	(cmdline_parse_inst_t *)&cmd_set_flex_is_pattern,
-	(cmdline_parse_inst_t *)&cmd_set_flex_spec_pattern,
+	&cmd_config_tx_metadata_specific,
+	&cmd_show_tx_metadata,
+	&cmd_show_rx_tx_desc_status,
+	&cmd_show_rx_queue_desc_used_count,
+	&cmd_set_raw,
+	&cmd_show_set_raw,
+	&cmd_show_set_raw_all,
+	&cmd_config_tx_dynf_specific,
+	&cmd_show_fec_mode,
+	&cmd_set_fec_mode,
+	&cmd_set_rxq_avail_thresh,
+	&cmd_show_capability,
+	&cmd_set_flex_is_pattern,
+	&cmd_set_flex_spec_pattern,
 	NULL,
 };
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.378288134 +0100
+++ 0049-app-testpmd-remove-unnecessary-cast.patch	2024-10-23 22:16:40.507943052 +0100
@@ -1 +1 @@
-From 0a3901aa624a690faa49ca081c468320d4edcb7a Mon Sep 17 00:00:00 2001
+From 7b317b7db97cd8ddf45bbd509d026496c92f883a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0a3901aa624a690faa49ca081c468320d4edcb7a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- app/test-pmd/cmdline.c | 458 ++++++++++++++++++++---------------------
- 1 file changed, 229 insertions(+), 229 deletions(-)
+ app/test-pmd/cmdline.c | 440 ++++++++++++++++++++---------------------
+ 1 file changed, 220 insertions(+), 220 deletions(-)
@@ -19 +20 @@
-index b7759e38a8..358319c20a 100644
+index 820332df50..5336df528b 100644
@@ -22 +23 @@
-@@ -13146,241 +13146,241 @@ static cmdline_parse_inst_t cmd_config_tx_affinity_map = {
+@@ -12615,232 +12615,232 @@ static cmdline_parse_inst_t cmd_show_port_flow_transfer_proxy = {
@@ -203 +203,0 @@
--	(cmdline_parse_inst_t *)&cmd_showport_rss_hash_algo,
@@ -205 +204,0 @@
--	(cmdline_parse_inst_t *)&cmd_config_rss_hash_algo,
@@ -229 +227,0 @@
--	(cmdline_parse_inst_t *)&cmd_mcast_addr_flush,
@@ -291 +288,0 @@
--	(cmdline_parse_inst_t *)&cmd_config_all_port_rx_offload,
@@ -296 +292,0 @@
--	(cmdline_parse_inst_t *)&cmd_config_all_port_tx_offload,
@@ -353 +348,0 @@
-+	&cmd_showport_rss_hash_algo,
@@ -355 +349,0 @@
-+	&cmd_config_rss_hash_algo,
@@ -379 +372,0 @@
-+	&cmd_mcast_addr_flush,
@@ -441 +433,0 @@
-+	&cmd_config_all_port_rx_offload,
@@ -446 +437,0 @@
-+	&cmd_config_all_port_tx_offload,
@@ -457 +448 @@
--	(cmdline_parse_inst_t *)&cmd_show_rx_tx_queue_desc_used_count,
+-	(cmdline_parse_inst_t *)&cmd_show_rx_queue_desc_used_count,
@@ -468,4 +458,0 @@
--	(cmdline_parse_inst_t *)&cmd_show_port_cman_capa,
--	(cmdline_parse_inst_t *)&cmd_show_port_cman_config,
--	(cmdline_parse_inst_t *)&cmd_set_port_cman_config,
--	(cmdline_parse_inst_t *)&cmd_config_tx_affinity_map,
@@ -475 +462 @@
-+	&cmd_show_rx_tx_queue_desc_used_count,
++	&cmd_show_rx_queue_desc_used_count,
@@ -486,4 +472,0 @@
-+	&cmd_show_port_cman_capa,
-+	&cmd_show_port_cman_config,
-+	&cmd_set_port_cman_config,
-+	&cmd_config_tx_affinity_map,

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

* patch 'net/pcap: set live interface as non-blocking' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (47 preceding siblings ...)
  2024-10-23 21:16 ` patch 'app/testpmd: remove unnecessary cast' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/mana: support rdma-core via pkg-config' " luca.boccassi
                   ` (28 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ofer Dagan, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From d3a78f0f8f993a4e86460371e2b0d3c2fd11c1ad Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sat, 24 Aug 2024 11:07:10 -0700
Subject: [PATCH] net/pcap: set live interface as non-blocking

[ upstream commit 60dd5a70035f447104d457aa338557fb58d5cb06 ]

The DPDK PMD's are supposed to be non-blocking and poll for packets.
Configure PCAP to do this on live interface.

Bugzilla ID: 1526
Fixes: 4c173302c307 ("pcap: add new driver")

Reported-by: Ofer Dagan <ofer.d@claroty.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/pcap/pcap_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
index 5780f704b6..03729c0ca7 100644
--- a/drivers/net/pcap/pcap_ethdev.c
+++ b/drivers/net/pcap/pcap_ethdev.c
@@ -522,6 +522,12 @@ open_iface_live(const char *iface, pcap_t **pcap) {
 		return -1;
 	}
 
+	if (pcap_setnonblock(*pcap, 1, errbuf)) {
+		PMD_LOG(ERR, "Couldn't set non-blocking on %s: %s", iface, errbuf);
+		pcap_close(*pcap);
+		return -1;
+	}
+
 	return 0;
 }
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.419829302 +0100
+++ 0050-net-pcap-set-live-interface-as-non-blocking.patch	2024-10-23 22:16:40.507943052 +0100
@@ -1 +1 @@
-From 60dd5a70035f447104d457aa338557fb58d5cb06 Mon Sep 17 00:00:00 2001
+From d3a78f0f8f993a4e86460371e2b0d3c2fd11c1ad Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 60dd5a70035f447104d457aa338557fb58d5cb06 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 9626c343dc..1fb98e3d2b 100644
+index 5780f704b6..03729c0ca7 100644

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

* patch 'net/mana: support rdma-core via pkg-config' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (48 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/pcap: set live interface as non-blocking' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/ena: revert redefining memcpy' " luca.boccassi
                   ` (27 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Shreesh Adiga; +Cc: Long Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From ead6f2f7f7b2de61948856c6b9ca9785713a4dac Mon Sep 17 00:00:00 2001
From: Shreesh Adiga <16567adigashreesh@gmail.com>
Date: Fri, 20 Sep 2024 16:41:16 +0530
Subject: [PATCH] net/mana: support rdma-core via pkg-config

[ upstream commit 8d7596cad7abb413c25f6782fe62fd0d388b8b94 ]

Currently building with custom rdma-core installed in /opt/rdma-core
after setting PKG_CONFIG_PATH=/opt/rdma-core/lib64/pkgconfig/ results
in the below meson logs:
Run-time dependency libmana found: YES 1.0.54.0
Header "infiniband/manadv.h" has symbol "manadv_set_context_attr" : NO

Thus to fix this, the libs is updated in meson.build and is passed to
the cc.has_header_symbol call using dependencies. After this change,
the libmana header files are getting included and net/mana is
successfully enabled.

Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")

Signed-off-by: Shreesh Adiga <16567adigashreesh@gmail.com>
Acked-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mana/meson.build b/drivers/net/mana/meson.build
index 2d72eca5a8..3ddc230ab4 100644
--- a/drivers/net/mana/meson.build
+++ b/drivers/net/mana/meson.build
@@ -19,12 +19,14 @@ sources += files(
 )
 
 libnames = ['ibverbs', 'mana']
+libs = []
 foreach libname:libnames
     lib = dependency('lib' + libname, required:false)
     if not lib.found()
         lib = cc.find_library(libname, required:false)
     endif
     if lib.found()
+        libs += lib
         ext_deps += lib
     else
         build = false
@@ -43,7 +45,7 @@ required_symbols = [
 ]
 
 foreach arg:required_symbols
-    if not cc.has_header_symbol(arg[0], arg[1])
+    if not cc.has_header_symbol(arg[0], arg[1], dependencies: libs, args: cflags)
         build = false
         reason = 'missing symbol "' + arg[1] + '" in "' + arg[0] + '"'
         subdir_done()
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.456519849 +0100
+++ 0051-net-mana-support-rdma-core-via-pkg-config.patch	2024-10-23 22:16:40.511943208 +0100
@@ -1 +1 @@
-From 8d7596cad7abb413c25f6782fe62fd0d388b8b94 Mon Sep 17 00:00:00 2001
+From ead6f2f7f7b2de61948856c6b9ca9785713a4dac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8d7596cad7abb413c25f6782fe62fd0d388b8b94 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 330d30b2ff..4d163fc0f2 100644
+index 2d72eca5a8..3ddc230ab4 100644

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

* patch 'net/ena: revert redefining memcpy' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (49 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/mana: support rdma-core via pkg-config' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/hns3: remove some basic address dump' " luca.boccassi
                   ` (26 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Wathsala Vithanage, Morten Brørup, Tyler Retzlaff,
	Shai Brandes, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From e7c27b6ffec2df29611b53b00ed21d32c267a136 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 12 Aug 2024 08:34:17 -0700
Subject: [PATCH] net/ena: revert redefining memcpy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 966764d003554b38e892cf18df9e9af44483036d ]

Redefining memcpy as rte_memcpy has no performance gain on
current compilers, and introduced bugs like this one where
rte_memcpy() will be detected as referencing past the destination.

Bugzilla ID: 1510
Fixes: 142778b3702a ("net/ena: switch memcpy to optimized version")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Shai Brandes <shaibran@amazon.com>
---
 drivers/net/ena/base/ena_plat_dpdk.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index 8f2b3a87c2..218bd4dd4b 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -26,7 +26,6 @@
 #include <rte_spinlock.h>
 
 #include <sys/time.h>
-#include <rte_memcpy.h>
 
 typedef uint64_t u64;
 typedef uint32_t u32;
@@ -67,14 +66,6 @@ typedef uint64_t dma_addr_t;
 #define ENA_UDELAY(x) rte_delay_us_block(x)
 
 #define ENA_TOUCH(x) ((void)(x))
-/* Redefine memcpy with caution: rte_memcpy can be simply aliased to memcpy, so
- * make the redefinition only if it's safe (and beneficial) to do so.
- */
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64_MEMCPY) || \
-	defined(RTE_ARCH_ARM_NEON_MEMCPY)
-#undef memcpy
-#define memcpy rte_memcpy
-#endif
 #define wmb rte_wmb
 #define rmb rte_rmb
 #define mb rte_mb
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.491025274 +0100
+++ 0052-net-ena-revert-redefining-memcpy.patch	2024-10-23 22:16:40.511943208 +0100
@@ -1 +1 @@
-From 966764d003554b38e892cf18df9e9af44483036d Mon Sep 17 00:00:00 2001
+From e7c27b6ffec2df29611b53b00ed21d32c267a136 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 966764d003554b38e892cf18df9e9af44483036d ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -23,2 +24,2 @@
- drivers/net/ena/base/ena_plat_dpdk.h | 9 +--------
- 1 file changed, 1 insertion(+), 8 deletions(-)
+ drivers/net/ena/base/ena_plat_dpdk.h | 9 ---------
+ 1 file changed, 9 deletions(-)
@@ -27 +28 @@
-index a41a4e4506..1121460470 100644
+index 8f2b3a87c2..218bd4dd4b 100644
@@ -38 +39 @@
-@@ -68,13 +67,7 @@ typedef uint64_t dma_addr_t;
+@@ -67,14 +66,6 @@ typedef uint64_t dma_addr_t;
@@ -45 +46,2 @@
--#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64_MEMCPY) || defined(RTE_ARCH_ARM_NEON_MEMCPY)
+-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64_MEMCPY) || \
+-	defined(RTE_ARCH_ARM_NEON_MEMCPY)
@@ -49 +50,0 @@
-+

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

* patch 'net/hns3: remove some basic address dump' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (50 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/ena: revert redefining memcpy' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/hns3: fix dump counter of registers' " luca.boccassi
                   ` (25 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Jie Hai; +Cc: Huisong Li, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/849ffb29c6f4c4bf6895cde965dc0bd51382ed61

Thanks.

Luca Boccassi

---
From 849ffb29c6f4c4bf6895cde965dc0bd51382ed61 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Thu, 26 Sep 2024 20:42:44 +0800
Subject: [PATCH] net/hns3: remove some basic address dump

[ upstream commit c8b7bec0ef23f53303c9cf03cfea44f1eb208738 ]

For security reasons, some address registers are not suitable
to be exposed, remove them.

Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/net/hns3/hns3_regs.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 5d6f92e4bb..4997c10ae3 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -17,13 +17,9 @@
 
 static int hns3_get_dfx_reg_line(struct hns3_hw *hw, uint32_t *lines);
 
-static const uint32_t cmdq_reg_addrs[] = {HNS3_CMDQ_TX_ADDR_L_REG,
-					  HNS3_CMDQ_TX_ADDR_H_REG,
-					  HNS3_CMDQ_TX_DEPTH_REG,
+static const uint32_t cmdq_reg_addrs[] = {HNS3_CMDQ_TX_DEPTH_REG,
 					  HNS3_CMDQ_TX_TAIL_REG,
 					  HNS3_CMDQ_TX_HEAD_REG,
-					  HNS3_CMDQ_RX_ADDR_L_REG,
-					  HNS3_CMDQ_RX_ADDR_H_REG,
 					  HNS3_CMDQ_RX_DEPTH_REG,
 					  HNS3_CMDQ_RX_TAIL_REG,
 					  HNS3_CMDQ_RX_HEAD_REG,
@@ -44,9 +40,7 @@ static const uint32_t common_vf_reg_addrs[] = {HNS3_MISC_VECTOR_REG_BASE,
 					       HNS3_FUN_RST_ING,
 					       HNS3_GRO_EN_REG};
 
-static const uint32_t ring_reg_addrs[] = {HNS3_RING_RX_BASEADDR_L_REG,
-					  HNS3_RING_RX_BASEADDR_H_REG,
-					  HNS3_RING_RX_BD_NUM_REG,
+static const uint32_t ring_reg_addrs[] = {HNS3_RING_RX_BD_NUM_REG,
 					  HNS3_RING_RX_BD_LEN_REG,
 					  HNS3_RING_RX_EN_REG,
 					  HNS3_RING_RX_MERGE_EN_REG,
@@ -57,8 +51,6 @@ static const uint32_t ring_reg_addrs[] = {HNS3_RING_RX_BASEADDR_L_REG,
 					  HNS3_RING_RX_FBD_OFFSET_REG,
 					  HNS3_RING_RX_STASH_REG,
 					  HNS3_RING_RX_BD_ERR_REG,
-					  HNS3_RING_TX_BASEADDR_L_REG,
-					  HNS3_RING_TX_BASEADDR_H_REG,
 					  HNS3_RING_TX_BD_NUM_REG,
 					  HNS3_RING_TX_EN_REG,
 					  HNS3_RING_TX_PRIORITY_REG,
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.537110089 +0100
+++ 0053-net-hns3-remove-some-basic-address-dump.patch	2024-10-23 22:16:40.511943208 +0100
@@ -1 +1 @@
-From c8b7bec0ef23f53303c9cf03cfea44f1eb208738 Mon Sep 17 00:00:00 2001
+From 849ffb29c6f4c4bf6895cde965dc0bd51382ed61 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c8b7bec0ef23f53303c9cf03cfea44f1eb208738 ]
+
@@ -9,2 +10,0 @@
-Cc: stable@dpdk.org
-
@@ -19 +19 @@
-index 955bc7e3af..8793f61153 100644
+index 5d6f92e4bb..4997c10ae3 100644

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

* patch 'net/hns3: fix dump counter of registers' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (51 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/hns3: remove some basic address dump' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'ethdev: fix overflow in descriptor count' " luca.boccassi
                   ` (24 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Jie Hai; +Cc: Huisong Li, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 9c49c19a4dba98e62acbe90f3e2f2ca129f6a1da Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Thu, 26 Sep 2024 20:42:45 +0800
Subject: [PATCH] net/hns3: fix dump counter of registers

[ upstream commit e9b82b4d54c019973ffcb5f404ba920494f70513 ]

Since the driver dumps the queue interrupt registers according
to the intr_tqps_num, the counter should be the same.

Fixes: acb3260fac5c ("net/hns3: fix dump register out of range")
Fixes: 936eda25e8da ("net/hns3: support dump register")

Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/net/hns3/hns3_regs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 4997c10ae3..e92e43959f 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -127,7 +127,7 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
 	tqp_intr_lines = sizeof(tqp_intr_reg_addrs) / REG_LEN_PER_LINE + 1;
 
 	len = (cmdq_lines + common_lines + ring_lines * hw->tqps_num +
-	      tqp_intr_lines * hw->num_msi) * REG_NUM_PER_LINE;
+	      tqp_intr_lines * hw->intr_tqps_num) * REG_NUM_PER_LINE;
 
 	if (!hns->is_vf) {
 		ret = hns3_get_regs_num(hw, &regs_num_32_bit, &regs_num_64_bit);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.571662223 +0100
+++ 0054-net-hns3-fix-dump-counter-of-registers.patch	2024-10-23 22:16:40.511943208 +0100
@@ -1 +1 @@
-From e9b82b4d54c019973ffcb5f404ba920494f70513 Mon Sep 17 00:00:00 2001
+From 9c49c19a4dba98e62acbe90f3e2f2ca129f6a1da Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e9b82b4d54c019973ffcb5f404ba920494f70513 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 8793f61153..8c0c0a3027 100644
+index 4997c10ae3..e92e43959f 100644

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

* patch 'ethdev: fix overflow in descriptor count' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (52 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/hns3: fix dump counter of registers' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'bus/dpaa: fix PFDRs leaks due to FQRNIs' " luca.boccassi
                   ` (23 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Niall Meade; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From a905d9d63ec9bb6540978f1906c3d7f591c78586 Mon Sep 17 00:00:00 2001
From: Niall Meade <niall.meade@intel.com>
Date: Mon, 30 Sep 2024 13:40:02 +0000
Subject: [PATCH] ethdev: fix overflow in descriptor count

[ upstream commit 30efe60d3a37896567b660229ef6a04c5526f6db ]

Addressed a specific overflow issue in the eth_dev_adjust_nb_desc()
function where the uint16_t variable nb_desc would overflow when its
value was greater than (2^16 - nb_align). This overflow caused nb_desc
to incorrectly wrap around between 0 and nb_align-1, leading to the
function setting nb_desc to nb_min instead of the expected nb_max.

To give an example, let nb_desc=UINT16_MAX, nb_align=32, nb_max=4096 and
nb_min=64. RTE_ALIGN_CEIL(nb_desc, nb_align) calls
RTE_ALIGN_FLOOR(nb_desc + nb_align - 1, nb_align). This results in an
overflow of nb_desc, leading to nb_desc being set to 30 and then 0 when
the macros return. As a result of this, nb_desc is then set to nb_min
later on.

The resolution involves upcasting nb_desc to a uint32_t before the
RTE_ALIGN_CEIL macro is applied. This change ensures that the subsequent
call to RTE_ALIGN_FLOOR(nb_desc + (nb_align - 1), nb_align) does not
result in an overflow, as it would when nb_desc is a uint16_t. By using
a uint32_t for these operations, the correct behavior is maintained
without the risk of overflow.

Fixes: 0f67fc3baeb9 ("ethdev: add function to adjust number of descriptors")

Signed-off-by: Niall Meade <niall.meade@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap                |  1 +
 lib/ethdev/rte_ethdev.c | 12 +++++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/.mailmap b/.mailmap
index 8c7b38fb35..dd1c6a6a87 100644
--- a/.mailmap
+++ b/.mailmap
@@ -989,6 +989,7 @@ Nelson Escobar <neescoba@cisco.com>
 Nemanja Marjanovic <nemanja.marjanovic@intel.com>
 Netanel Belgazal <netanel@amazon.com>
 Netanel Gonen <netanelg@mellanox.com>
+Niall Meade <niall.meade@intel.com>
 Niall Power <niall.power@intel.com>
 Nick Connolly <nick.connolly@arm.com> <nick.connolly@mayadata.io>
 Nick Nunley <nicholas.d.nunley@intel.com>
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index e1f18fd8a4..e85dc3d8b2 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -5739,13 +5739,19 @@ static void
 eth_dev_adjust_nb_desc(uint16_t *nb_desc,
 		const struct rte_eth_desc_lim *desc_lim)
 {
+	/* Upcast to uint32 to avoid potential overflow with RTE_ALIGN_CEIL(). */
+	uint32_t nb_desc_32 = (uint32_t)*nb_desc;
+
 	if (desc_lim->nb_align != 0)
-		*nb_desc = RTE_ALIGN_CEIL(*nb_desc, desc_lim->nb_align);
+		nb_desc_32 = RTE_ALIGN_CEIL(nb_desc_32, desc_lim->nb_align);
 
 	if (desc_lim->nb_max != 0)
-		*nb_desc = RTE_MIN(*nb_desc, desc_lim->nb_max);
+		nb_desc_32 = RTE_MIN(nb_desc_32, desc_lim->nb_max);
 
-	*nb_desc = RTE_MAX(*nb_desc, desc_lim->nb_min);
+	nb_desc_32 = RTE_MAX(nb_desc_32, desc_lim->nb_min);
+
+	/* Assign clipped u32 back to u16. */
+	*nb_desc = (uint16_t)nb_desc_32;
 }
 
 int
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.606290111 +0100
+++ 0055-ethdev-fix-overflow-in-descriptor-count.patch	2024-10-23 22:16:40.515943363 +0100
@@ -1 +1 @@
-From 30efe60d3a37896567b660229ef6a04c5526f6db Mon Sep 17 00:00:00 2001
+From a905d9d63ec9bb6540978f1906c3d7f591c78586 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 30efe60d3a37896567b660229ef6a04c5526f6db ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
@@ -37 +38 @@
-index d49838320e..6e72362ebc 100644
+index 8c7b38fb35..dd1c6a6a87 100644
@@ -40 +41 @@
-@@ -1070,6 +1070,7 @@ Nelson Escobar <neescoba@cisco.com>
+@@ -989,6 +989,7 @@ Nelson Escobar <neescoba@cisco.com>
@@ -46 +46,0 @@
- Nicholas Pratte <npratte@iol.unh.edu>
@@ -47,0 +48 @@
+ Nick Nunley <nicholas.d.nunley@intel.com>
@@ -49 +50 @@
-index a1f7efa913..84ee7588fc 100644
+index e1f18fd8a4..e85dc3d8b2 100644
@@ -52 +53 @@
-@@ -6667,13 +6667,19 @@ static void
+@@ -5739,13 +5739,19 @@ static void

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

* patch 'bus/dpaa: fix PFDRs leaks due to FQRNIs' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (53 preceding siblings ...)
  2024-10-23 21:16 ` patch 'ethdev: fix overflow in descriptor count' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/dpaa: fix typecasting channel ID' " luca.boccassi
                   ` (22 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 0c1fd86cee21c314cecba532a87d0ca766f0f13a Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Tue, 1 Oct 2024 16:33:08 +0530
Subject: [PATCH] bus/dpaa: fix PFDRs leaks due to FQRNIs

[ upstream commit b292acc3c4a8fd5104cfdfa5c6d3d0df95b6543b ]

When a Retire FQ command is executed on a FQ in the
Tentatively Scheduled or Parked states, in that case FQ
is retired immediately and a FQRNI (Frame Queue Retirement
Notification Immediate) message is generated. Software
must read this message from MR and consume it to free
the memory used by it.

Although it is not mentioned about which memory to be used
by FQRNIs in the RM but through experiments it is proven
that it can use PFDRs. So if these messages are allowed to
build up indefinitely then PFDR resources can become exhausted
and cause enqueues to stall. Therefore software must consume
these MR messages on a regular basis to avoid depleting
the available PFDR resources.

This is the PFDRs leak issue which user can experience while
using the DPDK crypto driver and creating and destroying the
sessions multiple times. On a session destroy, DPDK calls the
qman_retire_fq() for each FQ used by the session, but it does
not handle the FQRNIs generated and allowed them to build up
indefinitely in MR.

This patch fixes this issue by consuming the FQRNIs received
from MR immediately after FQ retire by calling drain_mr_fqrni().

Please note that this drain_mr_fqrni() only look for
FQRNI type messages to consume. If there are other type of messages
like FQRN, FQRL, FQPN, ERN etc. also coming on MR then those
messages need to be handled separately.

Fixes: c47ff048b99a ("bus/dpaa: add QMAN driver core routines")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/base/qbman/qman.c | 46 ++++++++++++++++--------------
 1 file changed, 25 insertions(+), 21 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 83db0a534e..f06992ca48 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -294,10 +294,32 @@ static inline void qman_stop_dequeues_ex(struct qman_portal *p)
 		qm_dqrr_set_maxfill(&p->p, 0);
 }
 
+static inline void qm_mr_pvb_update(struct qm_portal *portal)
+{
+	register struct qm_mr *mr = &portal->mr;
+	const struct qm_mr_entry *res = qm_cl(mr->ring, mr->pi);
+
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
+	DPAA_ASSERT(mr->pmode == qm_mr_pvb);
+#endif
+	/* when accessing 'verb', use __raw_readb() to ensure that compiler
+	 * inlining doesn't try to optimise out "excess reads".
+	 */
+	if ((__raw_readb(&res->ern.verb) & QM_MR_VERB_VBIT) == mr->vbit) {
+		mr->pi = (mr->pi + 1) & (QM_MR_SIZE - 1);
+		if (!mr->pi)
+			mr->vbit ^= QM_MR_VERB_VBIT;
+		mr->fill++;
+		res = MR_INC(res);
+	}
+	dcbit_ro(res);
+}
+
 static int drain_mr_fqrni(struct qm_portal *p)
 {
 	const struct qm_mr_entry *msg;
 loop:
+	qm_mr_pvb_update(p);
 	msg = qm_mr_current(p);
 	if (!msg) {
 		/*
@@ -319,6 +341,7 @@ loop:
 		do {
 			now = mfatb();
 		} while ((then + 10000) > now);
+		qm_mr_pvb_update(p);
 		msg = qm_mr_current(p);
 		if (!msg)
 			return 0;
@@ -481,27 +504,6 @@ static inline int qm_mr_init(struct qm_portal *portal,
 	return 0;
 }
 
-static inline void qm_mr_pvb_update(struct qm_portal *portal)
-{
-	register struct qm_mr *mr = &portal->mr;
-	const struct qm_mr_entry *res = qm_cl(mr->ring, mr->pi);
-
-#ifdef RTE_LIBRTE_DPAA_HWDEBUG
-	DPAA_ASSERT(mr->pmode == qm_mr_pvb);
-#endif
-	/* when accessing 'verb', use __raw_readb() to ensure that compiler
-	 * inlining doesn't try to optimise out "excess reads".
-	 */
-	if ((__raw_readb(&res->ern.verb) & QM_MR_VERB_VBIT) == mr->vbit) {
-		mr->pi = (mr->pi + 1) & (QM_MR_SIZE - 1);
-		if (!mr->pi)
-			mr->vbit ^= QM_MR_VERB_VBIT;
-		mr->fill++;
-		res = MR_INC(res);
-	}
-	dcbit_ro(res);
-}
-
 struct qman_portal *
 qman_init_portal(struct qman_portal *portal,
 		   const struct qm_portal_config *c,
@@ -1825,6 +1827,8 @@ int qman_retire_fq(struct qman_fq *fq, u32 *flags)
 	}
 out:
 	FQUNLOCK(fq);
+	/* Draining FQRNIs, if any */
+	drain_mr_fqrni(&p->p);
 	return rval;
 }
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.644755490 +0100
+++ 0056-bus-dpaa-fix-PFDRs-leaks-due-to-FQRNIs.patch	2024-10-23 22:16:40.515943363 +0100
@@ -1 +1 @@
-From b292acc3c4a8fd5104cfdfa5c6d3d0df95b6543b Mon Sep 17 00:00:00 2001
+From 0c1fd86cee21c314cecba532a87d0ca766f0f13a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b292acc3c4a8fd5104cfdfa5c6d3d0df95b6543b ]
+
@@ -37 +38,0 @@
-Cc: stable@dpdk.org
@@ -46 +47 @@
-index 301057723e..9c90ee25a6 100644
+index 83db0a534e..f06992ca48 100644
@@ -49 +50 @@
-@@ -292,10 +292,32 @@ static inline void qman_stop_dequeues_ex(struct qman_portal *p)
+@@ -294,10 +294,32 @@ static inline void qman_stop_dequeues_ex(struct qman_portal *p)
@@ -82 +83 @@
-@@ -317,6 +339,7 @@ loop:
+@@ -319,6 +341,7 @@ loop:
@@ -90 +91 @@
-@@ -479,27 +502,6 @@ static inline int qm_mr_init(struct qm_portal *portal,
+@@ -481,27 +504,6 @@ static inline int qm_mr_init(struct qm_portal *portal,
@@ -118 +119 @@
-@@ -1794,6 +1796,8 @@ int qman_retire_fq(struct qman_fq *fq, u32 *flags)
+@@ -1825,6 +1827,8 @@ int qman_retire_fq(struct qman_fq *fq, u32 *flags)

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

* patch 'net/dpaa: fix typecasting channel ID' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (54 preceding siblings ...)
  2024-10-23 21:16 ` patch 'bus/dpaa: fix PFDRs leaks due to FQRNIs' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'bus/dpaa: fix VSP for 1G fm1-mac9 and 10' " luca.boccassi
                   ` (21 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Rohit Raj; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From b4daf0e0fd6a71a3a72646ac72434e86d9cfad54 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Tue, 1 Oct 2024 16:33:09 +0530
Subject: [PATCH] net/dpaa: fix typecasting channel ID

[ upstream commit 5edc61ee9a2c1e1d9c8b75faac4b61de7111c34e ]

Avoid typecasting ch_id to u32 and passing it to another API since it
can corrupt other data. Instead, create new u32 variable and typecast
it back to u16 after it gets updated by the API.

Fixes: 0c504f6950b6 ("net/dpaa: support push mode")

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index bcb28f33ee..6fdbe80334 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -971,7 +971,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	struct fman_if *fif = dev->process_private;
 	struct qman_fq *rxq = &dpaa_intf->rx_queues[queue_idx];
 	struct qm_mcc_initfq opts = {0};
-	u32 flags = 0;
+	u32 ch_id, flags = 0;
 	int ret;
 	u32 buffsz = rte_pktmbuf_data_room_size(mp) - RTE_PKTMBUF_HEADROOM;
 	uint32_t max_rx_pktlen;
@@ -1095,7 +1095,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 						DPAA_IF_RX_CONTEXT_STASH;
 
 		/*Create a channel and associate given queue with the channel*/
-		qman_alloc_pool_range((u32 *)&rxq->ch_id, 1, 1, 0);
+		qman_alloc_pool_range(&ch_id, 1, 1, 0);
+		rxq->ch_id = (u16)ch_id;
+
 		opts.we_mask = opts.we_mask | QM_INITFQ_WE_DESTWQ;
 		opts.fqd.dest.channel = rxq->ch_id;
 		opts.fqd.dest.wq = DPAA_IF_RX_PRIORITY;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.682344768 +0100
+++ 0057-net-dpaa-fix-typecasting-channel-ID.patch	2024-10-23 22:16:40.519943519 +0100
@@ -1 +1 @@
-From 5edc61ee9a2c1e1d9c8b75faac4b61de7111c34e Mon Sep 17 00:00:00 2001
+From b4daf0e0fd6a71a3a72646ac72434e86d9cfad54 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5edc61ee9a2c1e1d9c8b75faac4b61de7111c34e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 51f5422e0c..afeca4307e 100644
+index bcb28f33ee..6fdbe80334 100644
@@ -23 +24 @@
-@@ -972,7 +972,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+@@ -971,7 +971,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
@@ -32 +33 @@
-@@ -1096,7 +1096,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+@@ -1095,7 +1095,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,

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

* patch 'bus/dpaa: fix VSP for 1G fm1-mac9 and 10' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (55 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/dpaa: fix typecasting channel ID' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'bus/dpaa: fix the fman details status' " luca.boccassi
                   ` (20 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6770a35bbf822b5b56cb14180fde627c8f07aae1

Thanks.

Luca Boccassi

---
From 6770a35bbf822b5b56cb14180fde627c8f07aae1 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Tue, 1 Oct 2024 16:33:10 +0530
Subject: [PATCH] bus/dpaa: fix VSP for 1G fm1-mac9 and 10

[ upstream commit 25434831ca958583fb79e1e8b06e83274c68fc93 ]

No need to classify interface separately for 1G and 10G
Note that VSP or Virtual storage profile are DPAA equivalent for SRIOV
config to logically divide a physical ports in virtual ports.

Fixes: e0718bb2ca95 ("bus/dpaa: add virtual storage profile port init")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/base/fman/fman.c | 29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c
index 1814372a40..8263d42bed 100644
--- a/drivers/bus/dpaa/base/fman/fman.c
+++ b/drivers/bus/dpaa/base/fman/fman.c
@@ -153,7 +153,7 @@ static void fman_if_vsp_init(struct __fman_if *__if)
 	size_t lenp;
 	const uint8_t mac_idx[] = {-1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1};
 
-	if (__if->__if.mac_type == fman_mac_1g) {
+	if (__if->__if.mac_idx <= 8) {
 		for_each_compatible_node(dev, NULL,
 			"fsl,fman-port-1g-rx-extended-args") {
 			prop = of_get_property(dev, "cell-index", &lenp);
@@ -176,7 +176,32 @@ static void fman_if_vsp_init(struct __fman_if *__if)
 				}
 			}
 		}
-	} else if (__if->__if.mac_type == fman_mac_10g) {
+
+		for_each_compatible_node(dev, NULL,
+					 "fsl,fman-port-op-extended-args") {
+			prop = of_get_property(dev, "cell-index", &lenp);
+
+			if (prop) {
+				cell_index = of_read_number(&prop[0],
+						lenp / sizeof(phandle));
+
+				if (cell_index == __if->__if.mac_idx) {
+					prop = of_get_property(dev,
+							       "vsp-window",
+							       &lenp);
+
+					if (prop) {
+						__if->__if.num_profiles =
+							of_read_number(&prop[0],
+								       1);
+						__if->__if.base_profile_id =
+							of_read_number(&prop[1],
+								       1);
+					}
+				}
+			}
+		}
+	} else {
 		for_each_compatible_node(dev, NULL,
 			"fsl,fman-port-10g-rx-extended-args") {
 			prop = of_get_property(dev, "cell-index", &lenp);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.718119992 +0100
+++ 0058-bus-dpaa-fix-VSP-for-1G-fm1-mac9-and-10.patch	2024-10-23 22:16:40.519943519 +0100
@@ -1 +1 @@
-From 25434831ca958583fb79e1e8b06e83274c68fc93 Mon Sep 17 00:00:00 2001
+From 6770a35bbf822b5b56cb14180fde627c8f07aae1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 25434831ca958583fb79e1e8b06e83274c68fc93 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 41195eb0a7..beeb03dbf2 100644
+index 1814372a40..8263d42bed 100644

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

* patch 'bus/dpaa: fix the fman details status' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (56 preceding siblings ...)
  2024-10-23 21:16 ` patch 'bus/dpaa: fix VSP for 1G fm1-mac9 and 10' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/dpaa: fix reallocate mbuf handling' " luca.boccassi
                   ` (19 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 9bc6a69f0ba53bfe6afdea505ed3e80dcd3cc1c6 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Tue, 1 Oct 2024 16:33:11 +0530
Subject: [PATCH] bus/dpaa: fix the fman details status

[ upstream commit a87a1d0f4e7667fa3d6b818f30aa5c062e567597 ]

Fix the incorrect placing of brackets to calculate stats.

This corrects the "(a | b) << 32"  to  "a | (b << 32)"

Fixes: e62a3f4183f1 ("bus/dpaa: fix statistics reading")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/base/fman/fman_hw.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/dpaa/base/fman/fman_hw.c b/drivers/bus/dpaa/base/fman/fman_hw.c
index 24a99f7235..97e792806f 100644
--- a/drivers/bus/dpaa/base/fman/fman_hw.c
+++ b/drivers/bus/dpaa/base/fman/fman_hw.c
@@ -243,10 +243,11 @@ fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n)
 	int i;
 	uint64_t base_offset = offsetof(struct memac_regs, reoct_l);
 
-	for (i = 0; i < n; i++)
-		value[i] = (((u64)in_be32((char *)regs + base_offset + 8 * i) |
-				(u64)in_be32((char *)regs + base_offset +
-				8 * i + 4)) << 32);
+	for (i = 0; i < n; i++) {
+		uint64_t a = in_be32((char *)regs + base_offset + 8 * i);
+		uint64_t b = in_be32((char *)regs + base_offset + 8 * i + 4);
+		value[i] = a | b << 32;
+	}
 }
 
 void
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.753258713 +0100
+++ 0059-bus-dpaa-fix-the-fman-details-status.patch	2024-10-23 22:16:40.519943519 +0100
@@ -1 +1 @@
-From a87a1d0f4e7667fa3d6b818f30aa5c062e567597 Mon Sep 17 00:00:00 2001
+From 9bc6a69f0ba53bfe6afdea505ed3e80dcd3cc1c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a87a1d0f4e7667fa3d6b818f30aa5c062e567597 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/dpaa: fix reallocate mbuf handling' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (57 preceding siblings ...)
  2024-10-23 21:16 ` patch 'bus/dpaa: fix the fman details status' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/memif: fix buffer overflow in zero copy Rx' " luca.boccassi
                   ` (18 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Vanshika Shukla; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/30d634d95ffab0f0d9dc8b4fc477814ff179fea7

Thanks.

Luca Boccassi

---
From 30d634d95ffab0f0d9dc8b4fc477814ff179fea7 Mon Sep 17 00:00:00 2001
From: Vanshika Shukla <vanshika.shukla@nxp.com>
Date: Tue, 1 Oct 2024 16:33:25 +0530
Subject: [PATCH] net/dpaa: fix reallocate mbuf handling

[ upstream commit 7594cafa92189fd5bad87a5caa6b7a92bbab0979 ]

This patch fixes the bug in the reallocate_mbuf code
handling. The source location is corrected when copying
the data in the new mbuf.

Fixes: f8c7a17a48c9 ("net/dpaa: support Tx scatter gather for non-DPAA buffer")

Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index ce4f3d6c85..018d55bbdc 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -1034,7 +1034,7 @@ reallocate_mbuf(struct qman_fq *txq, struct rte_mbuf *mbuf)
 		/* Copy the data */
 		data = rte_pktmbuf_append(new_mbufs[0], bytes_to_copy);
 
-		rte_memcpy((uint8_t *)data, rte_pktmbuf_mtod_offset(mbuf,
+		rte_memcpy((uint8_t *)data, rte_pktmbuf_mtod_offset(temp_mbuf,
 			   void *, offset1), bytes_to_copy);
 
 		/* Set new offsets and the temp buffers */
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.787962075 +0100
+++ 0060-net-dpaa-fix-reallocate-mbuf-handling.patch	2024-10-23 22:16:40.519943519 +0100
@@ -1 +1 @@
-From 7594cafa92189fd5bad87a5caa6b7a92bbab0979 Mon Sep 17 00:00:00 2001
+From 30d634d95ffab0f0d9dc8b4fc477814ff179fea7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7594cafa92189fd5bad87a5caa6b7a92bbab0979 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 1d7efdef88..247e7b92ba 100644
+index ce4f3d6c85..018d55bbdc 100644
@@ -23 +24 @@
-@@ -1223,7 +1223,7 @@ reallocate_mbuf(struct qman_fq *txq, struct rte_mbuf *mbuf)
+@@ -1034,7 +1034,7 @@ reallocate_mbuf(struct qman_fq *txq, struct rte_mbuf *mbuf)

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

* patch 'net/memif: fix buffer overflow in zero copy Rx' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (58 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/dpaa: fix reallocate mbuf handling' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/tap: restrict maximum number of MP FDs' " luca.boccassi
                   ` (17 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Mihai Brodschi; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/270f15f3fdc970e6c1443be6eac23dc544890c80

Thanks.

Luca Boccassi

---
From 270f15f3fdc970e6c1443be6eac23dc544890c80 Mon Sep 17 00:00:00 2001
From: Mihai Brodschi <mihai.brodschi@broadcom.com>
Date: Sat, 29 Jun 2024 00:01:29 +0300
Subject: [PATCH] net/memif: fix buffer overflow in zero copy Rx

[ upstream commit b92b18b76858ed58ebe9c5dea9dedf9a99e7e0e2 ]

rte_pktmbuf_alloc_bulk is called by the zero-copy receiver to allocate
new mbufs to be provided to the sender. The allocated mbuf pointers
are stored in a ring, but the alloc function doesn't implement index
wrap-around, so it writes past the end of the array. This results in
memory corruption and duplicate mbufs being received.

Allocate 2x the space for the mbuf ring, so that the alloc function
has a contiguous array to write to, then copy the excess entries
to the start of the array.

Fixes: 43b815d88188 ("net/memif: support zero-copy slave")

Signed-off-by: Mihai Brodschi <mihai.brodschi@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap                          |  1 +
 drivers/net/memif/rte_eth_memif.c | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index dd1c6a6a87..629383cb25 100644
--- a/.mailmap
+++ b/.mailmap
@@ -932,6 +932,7 @@ Michal Swiatkowski <michal.swiatkowski@intel.com>
 Michal Wilczynski <michal.wilczynski@intel.com>
 Michel Machado <michel@digirati.com.br>
 Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
+Mihai Brodschi <mihai.brodschi@broadcom.com>
 Mihai Pogonaru <pogonarumihai@gmail.com>
 Mike Baucom <michael.baucom@broadcom.com>
 Mike Pattrick <mkp@redhat.com>
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 86b821ac5c..9379c201e9 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -531,6 +531,10 @@ refill:
 	ret = rte_pktmbuf_alloc_bulk(mq->mempool, &mq->buffers[head & mask], n_slots);
 	if (unlikely(ret < 0))
 		goto no_free_mbufs;
+	if (unlikely(n_slots > ring_size - (head & mask))) {
+		rte_memcpy(mq->buffers, &mq->buffers[ring_size],
+			(n_slots + (head & mask) - ring_size) * sizeof(struct rte_mbuf *));
+	}
 
 	while (n_slots--) {
 		s0 = head++ & mask;
@@ -1127,8 +1131,12 @@ memif_init_queues(struct rte_eth_dev *dev)
 		}
 		mq->buffers = NULL;
 		if (pmd->flags & ETH_MEMIF_FLAG_ZERO_COPY) {
+			/*
+			 * Allocate 2x ring_size to reserve a contiguous array for
+			 * rte_pktmbuf_alloc_bulk (to store allocated mbufs).
+			 */
 			mq->buffers = rte_zmalloc("bufs", sizeof(struct rte_mbuf *) *
-						  (1 << mq->log2_ring_size), 0);
+						  (1 << (mq->log2_ring_size + 1)), 0);
 			if (mq->buffers == NULL)
 				return -ENOMEM;
 		}
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.824756841 +0100
+++ 0061-net-memif-fix-buffer-overflow-in-zero-copy-Rx.patch	2024-10-23 22:16:40.519943519 +0100
@@ -1 +1 @@
-From b92b18b76858ed58ebe9c5dea9dedf9a99e7e0e2 Mon Sep 17 00:00:00 2001
+From 270f15f3fdc970e6c1443be6eac23dc544890c80 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b92b18b76858ed58ebe9c5dea9dedf9a99e7e0e2 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 7b3a20af68..2e909c48a8 100644
+index dd1c6a6a87..629383cb25 100644
@@ -30 +31,2 @@
-@@ -1011,6 +1011,7 @@ Michal Wilczynski <michal.wilczynski@intel.com>
+@@ -932,6 +932,7 @@ Michal Swiatkowski <michal.swiatkowski@intel.com>
+ Michal Wilczynski <michal.wilczynski@intel.com>
@@ -32 +33,0 @@
- Midde Ajijur Rehaman <ajijurx.rehaman.midde@intel.com>
@@ -39 +40 @@
-index e220ffaf92..cd722f254f 100644
+index 86b821ac5c..9379c201e9 100644
@@ -42 +43 @@
-@@ -600,6 +600,10 @@ refill:
+@@ -531,6 +531,10 @@ refill:
@@ -53 +54 @@
-@@ -1245,8 +1249,12 @@ memif_init_queues(struct rte_eth_dev *dev)
+@@ -1127,8 +1131,12 @@ memif_init_queues(struct rte_eth_dev *dev)

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

* patch 'net/tap: restrict maximum number of MP FDs' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (59 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/memif: fix buffer overflow in zero copy Rx' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'ethdev: verify queue ID in Tx done cleanup' " luca.boccassi
                   ` (16 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1ef2a5f5f618bba8a5327575c2bdc652e27ba175

Thanks.

Luca Boccassi

---
From 1ef2a5f5f618bba8a5327575c2bdc652e27ba175 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 11 Oct 2024 10:29:23 -0700
Subject: [PATCH] net/tap: restrict maximum number of MP FDs

[ upstream commit 288649a11a8a332727f2a988c676ff7dfd1bc4c5 ]

Now that max MP fds has increased to 253 it is possible that
the number of queues the TAP device can handle is less than that.
Therefore the code to handle MP message should only allow the
number of queues it can handle.

Coverity issue: 445386

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/tap/rte_eth_tap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index a6bf6eec55..68f9a5ce34 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2453,7 +2453,7 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer)
 	reply.num_fds = 0;
 	reply_param->rxq_count = 0;
 	if (dev->data->nb_rx_queues + dev->data->nb_tx_queues >
-			RTE_MP_MAX_FD_NUM){
+			RTE_PMD_TAP_MAX_QUEUES){
 		TAP_LOG(ERR, "Number of rx/tx queues exceeds max number of fds");
 		return -1;
 	}
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.861915300 +0100
+++ 0062-net-tap-restrict-maximum-number-of-MP-FDs.patch	2024-10-23 22:16:40.523943674 +0100
@@ -1 +1 @@
-From 288649a11a8a332727f2a988c676ff7dfd1bc4c5 Mon Sep 17 00:00:00 2001
+From 1ef2a5f5f618bba8a5327575c2bdc652e27ba175 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 288649a11a8a332727f2a988c676ff7dfd1bc4c5 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/tap/rte_eth_tap.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
+ drivers/net/tap/rte_eth_tap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -21 +22 @@
-index 5ad3bbadd1..c486c6f073 100644
+index a6bf6eec55..68f9a5ce34 100644
@@ -24,10 +25,7 @@
-@@ -2391,9 +2391,10 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer)
- 	reply_param->q_count = 0;
- 
- 	RTE_ASSERT(dev->data->nb_rx_queues == dev->data->nb_tx_queues);
--	if (dev->data->nb_rx_queues > RTE_MP_MAX_FD_NUM) {
-+
-+	if (dev->data->nb_rx_queues > RTE_PMD_TAP_MAX_QUEUES) {
- 		TAP_LOG(ERR, "Number of rx/tx queues %u exceeds max number of fds %u",
--			dev->data->nb_rx_queues, RTE_MP_MAX_FD_NUM);
-+			dev->data->nb_rx_queues, RTE_PMD_TAP_MAX_QUEUES);
+@@ -2453,7 +2453,7 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer)
+ 	reply.num_fds = 0;
+ 	reply_param->rxq_count = 0;
+ 	if (dev->data->nb_rx_queues + dev->data->nb_tx_queues >
+-			RTE_MP_MAX_FD_NUM){
++			RTE_PMD_TAP_MAX_QUEUES){
+ 		TAP_LOG(ERR, "Number of rx/tx queues exceeds max number of fds");
@@ -36 +33,0 @@
- 

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

* patch 'ethdev: verify queue ID in Tx done cleanup' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (60 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/tap: restrict maximum number of MP FDs' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/hns3: verify reset type from firmware' " luca.boccassi
                   ` (15 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/856f4dd1d2fd899a2c77de750d71ad8dd559bfa7

Thanks.

Luca Boccassi

---
From 856f4dd1d2fd899a2c77de750d71ad8dd559bfa7 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Sat, 12 Oct 2024 17:14:37 +0800
Subject: [PATCH] ethdev: verify queue ID in Tx done cleanup

[ upstream commit 707f50cef003a89f8fc5170c2ca5aea808cf4297 ]

Verify queue_id for rte_eth_tx_done_cleanup API.

Fixes: 44a718c457b5 ("ethdev: add API to free consumed buffers in Tx ring")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/rte_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index e85dc3d8b2..99b16e4dcc 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -2491,6 +2491,12 @@ rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
 	dev = &rte_eth_devices[port_id];
 
+#ifdef RTE_ETHDEV_DEBUG_TX
+	ret = eth_dev_validate_tx_queue(dev, queue_id);
+	if (ret != 0)
+		return ret;
+#endif
+
 	if (*dev->dev_ops->tx_done_cleanup == NULL)
 		return -ENOTSUP;
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.897969185 +0100
+++ 0063-ethdev-verify-queue-ID-in-Tx-done-cleanup.patch	2024-10-23 22:16:40.523943674 +0100
@@ -1 +1 @@
-From 707f50cef003a89f8fc5170c2ca5aea808cf4297 Mon Sep 17 00:00:00 2001
+From 856f4dd1d2fd899a2c77de750d71ad8dd559bfa7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 707f50cef003a89f8fc5170c2ca5aea808cf4297 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 12f42f1d68..6413c54e3b 100644
+index e85dc3d8b2..99b16e4dcc 100644
@@ -21 +22 @@
-@@ -2910,6 +2910,12 @@ rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)
+@@ -2491,6 +2491,12 @@ rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)

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

* patch 'net/hns3: verify reset type from firmware' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (61 preceding siblings ...)
  2024-10-23 21:16 ` patch 'ethdev: verify queue ID in Tx done cleanup' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/nfp: fix link change return value' " luca.boccassi
                   ` (14 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1cdad91ab4174d6a3a2552fd01d44d7a33e9c900

Thanks.

Luca Boccassi

---
From 1cdad91ab4174d6a3a2552fd01d44d7a33e9c900 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Sat, 12 Oct 2024 17:14:57 +0800
Subject: [PATCH] net/hns3: verify reset type from firmware

[ upstream commit 3db846003734d38d59950ebe024ad6d61afe08f0 ]

Verify reset-type which get from firmware.

Fixes: 1c1eb759e9d7 ("net/hns3: support RAS process in Kunpeng 930")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_intr.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index 916bf30dcb..d37c7eba6b 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -2252,6 +2252,12 @@ hns3_handle_module_error_data(struct hns3_hw *hw, uint32_t *buf,
 	sum_err_info = (struct hns3_sum_err_info *)&buf[offset++];
 	mod_num = sum_err_info->mod_num;
 	reset_type = sum_err_info->reset_type;
+
+	if (reset_type >= HNS3_MAX_RESET) {
+		hns3_err(hw, "invalid reset type = %u", reset_type);
+		return;
+	}
+
 	if (reset_type && reset_type != HNS3_NONE_RESET)
 		hns3_atomic_set_bit(reset_type, &hw->reset.request);
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.934646718 +0100
+++ 0064-net-hns3-verify-reset-type-from-firmware.patch	2024-10-23 22:16:40.527943830 +0100
@@ -1 +1 @@
-From 3db846003734d38d59950ebe024ad6d61afe08f0 Mon Sep 17 00:00:00 2001
+From 1cdad91ab4174d6a3a2552fd01d44d7a33e9c900 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3db846003734d38d59950ebe024ad6d61afe08f0 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index f7162ee7bc..2de2b86b02 100644
+index 916bf30dcb..d37c7eba6b 100644

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

* patch 'net/nfp: fix link change return value' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (62 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/hns3: verify reset type from firmware' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/pcap: fix blocking Rx' " luca.boccassi
                   ` (13 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Long Wu, Peng Zhang, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 4e6b6c42ce56ff93451a218e746d82fcdace6c20 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Sat, 12 Oct 2024 10:41:02 +0800
Subject: [PATCH] net/nfp: fix link change return value

[ upstream commit 0ca4f216b89162ce8142d665a98924bdf4a23a6e ]

The return value of 'nfp_eth_set_configured()' is three ways, the
original logic considered it as two ways wrongly.

Fixes: 61d4008fe6bb ("net/nfp: support setting link up/down")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/nfp/nfp_ethdev.c | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 68fd67a024..d795025004 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -205,6 +205,7 @@ error:
 static int
 nfp_net_stop(struct rte_eth_dev *dev)
 {
+	int ret;
 	struct nfp_net_hw *hw;
 
 	PMD_INIT_LOG(DEBUG, "Stop");
@@ -220,10 +221,12 @@ nfp_net_stop(struct rte_eth_dev *dev)
 
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
 		/* Configure the physical port down */
-		nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
+		ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
 	else
-		nfp_eth_set_configured(dev->process_private,
+		ret = nfp_eth_set_configured(dev->process_private,
 				       hw->nfp_idx, 0);
+	if (ret < 0)
+		return ret;
 
 	return 0;
 }
@@ -232,6 +235,7 @@ nfp_net_stop(struct rte_eth_dev *dev)
 static int
 nfp_net_set_link_up(struct rte_eth_dev *dev)
 {
+	int ret;
 	struct nfp_net_hw *hw;
 
 	PMD_DRV_LOG(DEBUG, "Set link up");
@@ -240,16 +244,21 @@ nfp_net_set_link_up(struct rte_eth_dev *dev)
 
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
 		/* Configure the physical port down */
-		return nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 1);
+		ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 1);
 	else
-		return nfp_eth_set_configured(dev->process_private,
+		ret = nfp_eth_set_configured(dev->process_private,
 					      hw->nfp_idx, 1);
+	if (ret < 0)
+		return ret;
+
+	return 0;
 }
 
 /* Set the link down. */
 static int
 nfp_net_set_link_down(struct rte_eth_dev *dev)
 {
+	int ret;
 	struct nfp_net_hw *hw;
 
 	PMD_DRV_LOG(DEBUG, "Set link down");
@@ -258,10 +267,14 @@ nfp_net_set_link_down(struct rte_eth_dev *dev)
 
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
 		/* Configure the physical port down */
-		return nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
+		ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
 	else
-		return nfp_eth_set_configured(dev->process_private,
+		ret = nfp_eth_set_configured(dev->process_private,
 					      hw->nfp_idx, 0);
+	if (ret < 0)
+		return ret;
+
+	return 0;
 }
 
 static void
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:42.982841281 +0100
+++ 0065-net-nfp-fix-link-change-return-value.patch	2024-10-23 22:16:40.527943830 +0100
@@ -1 +1 @@
-From 0ca4f216b89162ce8142d665a98924bdf4a23a6e Mon Sep 17 00:00:00 2001
+From 4e6b6c42ce56ff93451a218e746d82fcdace6c20 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ca4f216b89162ce8142d665a98924bdf4a23a6e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/nfp/nfp_ethdev.c | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
+ drivers/net/nfp/nfp_ethdev.c | 25 +++++++++++++++++++------
+ 1 file changed, 19 insertions(+), 6 deletions(-)
@@ -21 +22 @@
-index 4b31785b9f..ef1c2a94b7 100644
+index 68fd67a024..d795025004 100644
@@ -24 +25,24 @@
-@@ -527,26 +527,36 @@ error:
+@@ -205,6 +205,7 @@ error:
+ static int
+ nfp_net_stop(struct rte_eth_dev *dev)
+ {
++	int ret;
+ 	struct nfp_net_hw *hw;
+ 
+ 	PMD_INIT_LOG(DEBUG, "Stop");
+@@ -220,10 +221,12 @@ nfp_net_stop(struct rte_eth_dev *dev)
+ 
+ 	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+ 		/* Configure the physical port down */
+-		nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
++		ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
+ 	else
+-		nfp_eth_set_configured(dev->process_private,
++		ret = nfp_eth_set_configured(dev->process_private,
+ 				       hw->nfp_idx, 0);
++	if (ret < 0)
++		return ret;
+ 
+ 	return 0;
+ }
+@@ -232,6 +235,7 @@ nfp_net_stop(struct rte_eth_dev *dev)
@@ -30 +53,0 @@
- 	struct nfp_net_hw_priv *hw_priv;
@@ -32,2 +55,2 @@
- 	hw = dev->data->dev_private;
- 	hw_priv = dev->process_private;
+ 	PMD_DRV_LOG(DEBUG, "Set link up");
+@@ -240,16 +244,21 @@ nfp_net_set_link_up(struct rte_eth_dev *dev)
@@ -35,2 +58,8 @@
--	return nfp_eth_set_configured(hw_priv->pf_dev->cpp, hw->nfp_idx, 1);
-+	ret = nfp_eth_set_configured(hw_priv->pf_dev->cpp, hw->nfp_idx, 1);
+ 	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+ 		/* Configure the physical port down */
+-		return nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 1);
++		ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 1);
+ 	else
+-		return nfp_eth_set_configured(dev->process_private,
++		ret = nfp_eth_set_configured(dev->process_private,
+ 					      hw->nfp_idx, 1);
@@ -49 +77,0 @@
- 	struct nfp_net_hw_priv *hw_priv;
@@ -51,2 +79,2 @@
- 	hw = dev->data->dev_private;
- 	hw_priv = dev->process_private;
+ 	PMD_DRV_LOG(DEBUG, "Set link down");
+@@ -258,10 +267,14 @@ nfp_net_set_link_down(struct rte_eth_dev *dev)
@@ -54,2 +82,8 @@
--	return nfp_eth_set_configured(hw_priv->pf_dev->cpp, hw->nfp_idx, 0);
-+	ret = nfp_eth_set_configured(hw_priv->pf_dev->cpp, hw->nfp_idx, 0);
+ 	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+ 		/* Configure the physical port down */
+-		return nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
++		ret = nfp_eth_set_configured(hw->cpp, hw->nfp_idx, 0);
+ 	else
+-		return nfp_eth_set_configured(dev->process_private,
++		ret = nfp_eth_set_configured(dev->process_private,
+ 					      hw->nfp_idx, 0);

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

* patch 'net/pcap: fix blocking Rx' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (63 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/nfp: fix link change return value' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/ice/base: add bounds check' " luca.boccassi
                   ` (12 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ofer Dagan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2012542358d3e38ab05a224418ed088670e3c701

Thanks.

Luca Boccassi

---
From 2012542358d3e38ab05a224418ed088670e3c701 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 5 Sep 2024 09:10:40 -0700
Subject: [PATCH] net/pcap: fix blocking Rx

[ upstream commit f5ead8f84f205babb320a1d805fb436ba31a5532 ]

Use pcap_next_ex rather than just pcap_next because pcap_next
always blocks if there is no packets to receive.

Bugzilla ID: 1526
Fixes: 4c173302c307 ("pcap: add new driver")

Reported-by: Ofer Dagan <ofer.d@claroty.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Ofer Dagan <ofer.d@claroty.com>
---
 .mailmap                       |  1 +
 drivers/net/pcap/pcap_ethdev.c | 33 +++++++++++++++++----------------
 2 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/.mailmap b/.mailmap
index 629383cb25..025bd2daba 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1017,6 +1017,7 @@ Noa Ezra <noae@mellanox.com>
 Nobuhiro Miki <nmiki@yahoo-corp.jp>
 Norbert Ciosek <norbertx.ciosek@intel.com>
 Odi Assli <odia@nvidia.com>
+Ofer Dagan <ofer.d@claroty.com>
 Ognjen Joldzic <ognjen.joldzic@gmail.com>
 Ola Liljedahl <ola.liljedahl@arm.com>
 Oleg Polyakov <olegp123@walla.co.il>
diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
index 03729c0ca7..29664164b4 100644
--- a/drivers/net/pcap/pcap_ethdev.c
+++ b/drivers/net/pcap/pcap_ethdev.c
@@ -274,7 +274,7 @@ static uint16_t
 eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 {
 	unsigned int i;
-	struct pcap_pkthdr header;
+	struct pcap_pkthdr *header;
 	struct pmd_process_private *pp;
 	const u_char *packet;
 	struct rte_mbuf *mbuf;
@@ -294,9 +294,13 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	 */
 	for (i = 0; i < nb_pkts; i++) {
 		/* Get the next PCAP packet */
-		packet = pcap_next(pcap, &header);
-		if (unlikely(packet == NULL))
+		int ret = pcap_next_ex(pcap, &header, &packet);
+		if (ret != 1) {
+			if (ret == PCAP_ERROR)
+				pcap_q->rx_stat.err_pkts++;
+
 			break;
+		}
 
 		mbuf = rte_pktmbuf_alloc(pcap_q->mb_pool);
 		if (unlikely(mbuf == NULL)) {
@@ -304,33 +308,30 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 			break;
 		}
 
-		if (header.caplen <= rte_pktmbuf_tailroom(mbuf)) {
+		uint32_t len = header->caplen;
+		if (len <= rte_pktmbuf_tailroom(mbuf)) {
 			/* pcap packet will fit in the mbuf, can copy it */
-			rte_memcpy(rte_pktmbuf_mtod(mbuf, void *), packet,
-					header.caplen);
-			mbuf->data_len = (uint16_t)header.caplen;
+			rte_memcpy(rte_pktmbuf_mtod(mbuf, void *), packet, len);
+			mbuf->data_len = len;
 		} else {
 			/* Try read jumbo frame into multi mbufs. */
 			if (unlikely(eth_pcap_rx_jumbo(pcap_q->mb_pool,
-						       mbuf,
-						       packet,
-						       header.caplen) == -1)) {
+						       mbuf, packet, len) == -1)) {
 				pcap_q->rx_stat.err_pkts++;
 				rte_pktmbuf_free(mbuf);
 				break;
 			}
 		}
 
-		mbuf->pkt_len = (uint16_t)header.caplen;
-		*RTE_MBUF_DYNFIELD(mbuf, timestamp_dynfield_offset,
-			rte_mbuf_timestamp_t *) =
-				(uint64_t)header.ts.tv_sec * 1000000 +
-				header.ts.tv_usec;
+		mbuf->pkt_len = len;
+		uint64_t us = (uint64_t)header->ts.tv_sec * US_PER_S + header->ts.tv_usec;
+
+		*RTE_MBUF_DYNFIELD(mbuf, timestamp_dynfield_offset, rte_mbuf_timestamp_t *) = us;
 		mbuf->ol_flags |= timestamp_rx_dynflag;
 		mbuf->port = pcap_q->port_id;
 		bufs[num_rx] = mbuf;
 		num_rx++;
-		rx_bytes += header.caplen;
+		rx_bytes += len;
 	}
 	pcap_q->rx_stat.pkts += num_rx;
 	pcap_q->rx_stat.bytes += rx_bytes;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:43.019824863 +0100
+++ 0066-net-pcap-fix-blocking-Rx.patch	2024-10-23 22:16:40.527943830 +0100
@@ -1 +1 @@
-From f5ead8f84f205babb320a1d805fb436ba31a5532 Mon Sep 17 00:00:00 2001
+From 2012542358d3e38ab05a224418ed088670e3c701 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f5ead8f84f205babb320a1d805fb436ba31a5532 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 3e9e8b416e..bd7958652a 100644
+index 629383cb25..025bd2daba 100644
@@ -25 +26,2 @@
-@@ -1103,6 +1103,7 @@ Nobuhiro Miki <nmiki@yahoo-corp.jp>
+@@ -1017,6 +1017,7 @@ Noa Ezra <noae@mellanox.com>
+ Nobuhiro Miki <nmiki@yahoo-corp.jp>
@@ -27 +28,0 @@
- Norbert Zulinski <norbertx.zulinski@intel.com>
@@ -32 +33 @@
- Oleg Akhrem <oleg.akhrem@intel.com>
+ Oleg Polyakov <olegp123@walla.co.il>
@@ -34 +35 @@
-index 1fb98e3d2b..728ef85d53 100644
+index 03729c0ca7..29664164b4 100644

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

* patch 'net/ice/base: add bounds check' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (64 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/pcap: fix blocking Rx' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/ice/base: fix VLAN replay after reset' " luca.boccassi
                   ` (11 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Fabio Pricoco; +Cc: Bruce Richardson, Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/19bb1781fec55402dd06a046ec5aa88add31ee13

Thanks.

Luca Boccassi

---
From 19bb1781fec55402dd06a046ec5aa88add31ee13 Mon Sep 17 00:00:00 2001
From: Fabio Pricoco <fabio.pricoco@intel.com>
Date: Mon, 14 Oct 2024 12:02:06 +0100
Subject: [PATCH] net/ice/base: add bounds check

[ upstream commit 9378aa47f45fa5cd5be219c8eb770f096e8a4c27 ]

Refactor while loop to add a check that the values read are in the
correct range.

Fixes: 6c1f26be50a2 ("net/ice/base: add control queue information")

Signed-off-by: Fabio Pricoco <fabio.pricoco@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 drivers/net/ice/base/ice_controlq.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_controlq.c b/drivers/net/ice/base/ice_controlq.c
index 8971a140ef..576bf8e38d 100644
--- a/drivers/net/ice/base/ice_controlq.c
+++ b/drivers/net/ice/base/ice_controlq.c
@@ -846,12 +846,23 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
 	u16 ntc = sq->next_to_clean;
 	struct ice_sq_cd *details;
 	struct ice_aq_desc *desc;
+	u32 head;
 
 	desc = ICE_CTL_Q_DESC(*sq, ntc);
 	details = ICE_CTL_Q_DETAILS(*sq, ntc);
 
-	while (rd32(hw, cq->sq.head) != ntc) {
-		ice_debug(hw, ICE_DBG_AQ_MSG, "ntc %d head %d.\n", ntc, rd32(hw, cq->sq.head));
+	head = rd32(hw, sq->head);
+	if (head >= sq->count) {
+		ice_debug(hw, ICE_DBG_AQ_MSG,
+			  "Read head value (%d) exceeds allowed range.\n",
+			  head);
+		return 0;
+	}
+
+	while (head != ntc) {
+		ice_debug(hw, ICE_DBG_AQ_MSG,
+			  "ntc %d head %d.\n",
+			  ntc, head);
 		ice_memset(desc, 0, sizeof(*desc), ICE_DMA_MEM);
 		ice_memset(details, 0, sizeof(*details), ICE_NONDMA_MEM);
 		ntc++;
@@ -859,6 +870,14 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
 			ntc = 0;
 		desc = ICE_CTL_Q_DESC(*sq, ntc);
 		details = ICE_CTL_Q_DETAILS(*sq, ntc);
+
+		head = rd32(hw, sq->head);
+		if (head >= sq->count) {
+			ice_debug(hw, ICE_DBG_AQ_MSG,
+				  "Read head value (%d) exceeds allowed range.\n",
+				  head);
+			return 0;
+		}
 	}
 
 	sq->next_to_clean = ntc;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:43.057419025 +0100
+++ 0067-net-ice-base-add-bounds-check.patch	2024-10-23 22:16:40.527943830 +0100
@@ -1 +1 @@
-From 9378aa47f45fa5cd5be219c8eb770f096e8a4c27 Mon Sep 17 00:00:00 2001
+From 19bb1781fec55402dd06a046ec5aa88add31ee13 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9378aa47f45fa5cd5be219c8eb770f096e8a4c27 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index af27dc8542..b210495827 100644
+index 8971a140ef..576bf8e38d 100644
@@ -23,2 +24 @@
-@@ -839,16 +839,35 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
- 	struct ice_ctl_q_ring *sq = &cq->sq;
+@@ -846,12 +846,23 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
@@ -25,0 +26 @@
+ 	struct ice_sq_cd *details;
@@ -29,0 +31 @@
+ 	details = ICE_CTL_Q_DETAILS(*sq, ntc);
@@ -45,0 +48 @@
+ 		ice_memset(details, 0, sizeof(*details), ICE_NONDMA_MEM);
@@ -47 +50 @@
- 		if (ntc == sq->count)
+@@ -859,6 +870,14 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
@@ -49,0 +53 @@
+ 		details = ICE_CTL_Q_DETAILS(*sq, ntc);

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

* patch 'net/ice/base: fix VLAN replay after reset' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (65 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/ice/base: add bounds check' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/iavf: preserve MAC address with i40e PF Linux driver' " luca.boccassi
                   ` (10 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Dave Ertman
  Cc: Jacob Keller, Bruce Richardson, Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/47a2900e1c0b2726c25d50c0bb0e48f2b955a0c8

Thanks.

Luca Boccassi

---
From 47a2900e1c0b2726c25d50c0bb0e48f2b955a0c8 Mon Sep 17 00:00:00 2001
From: Dave Ertman <david.m.ertman@intel.com>
Date: Mon, 14 Oct 2024 12:02:07 +0100
Subject: [PATCH] net/ice/base: fix VLAN replay after reset

[ upstream commit 8e191a67df2d217c2cbd96325b38bf2f5f028f03 ]

If there is more than one VLAN defined when any reset that affects the
PF is initiated, after the reset rebuild, no traffic will pass on any
VLAN but the last one created.

This is caused by the iteration though the VLANs during replay each
clearing the vsi_map bitmap of the VSI that is being replayed.  The
problem is that during the replay, the pointer to the vsi_map bitmap is
used by each successive vlan to determine if it should be replayed on
this VSI.

The logic was that the replay of the VLAN would replace the bit in the
map before the next VLAN would iterate through.  But, since the replay
copies the old bitmap pointer to filt_replay_rules and creates a new one
for the recreated VLANS, it does not do this, and leaves the old bitmap
broken to be used to replay the remaining VLANs.

Since the old bitmap will be cleaned up in post replay cleanup, there is
no need to alter it and break following VLAN replay, so don't clear the
bit.

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

Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 073c139c43..89270a477d 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -9473,8 +9473,6 @@ ice_replay_vsi_fltr(struct ice_hw *hw, struct ice_port_info *pi,
 		if (!itr->vsi_list_info ||
 		    !ice_is_bit_set(itr->vsi_list_info->vsi_map, vsi_handle))
 			continue;
-		/* Clearing it so that the logic can add it back */
-		ice_clear_bit(vsi_handle, itr->vsi_list_info->vsi_map);
 		f_entry.fltr_info.vsi_handle = vsi_handle;
 		f_entry.fltr_info.fltr_act = ICE_FWD_TO_VSI;
 		/* update the src in case it is VSI num */
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:43.092378658 +0100
+++ 0068-net-ice-base-fix-VLAN-replay-after-reset.patch	2024-10-23 22:16:40.535944141 +0100
@@ -1 +1 @@
-From 8e191a67df2d217c2cbd96325b38bf2f5f028f03 Mon Sep 17 00:00:00 2001
+From 47a2900e1c0b2726c25d50c0bb0e48f2b955a0c8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8e191a67df2d217c2cbd96325b38bf2f5f028f03 ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 96ef26d535..a3786961e6 100644
+index 073c139c43..89270a477d 100644
@@ -41 +42 @@
-@@ -10110,8 +10110,6 @@ ice_replay_vsi_fltr(struct ice_hw *hw, struct ice_port_info *pi,
+@@ -9473,8 +9473,6 @@ ice_replay_vsi_fltr(struct ice_hw *hw, struct ice_port_info *pi,

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

* patch 'net/iavf: preserve MAC address with i40e PF Linux driver' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (66 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/ice/base: fix VLAN replay after reset' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/mlx5: workaround list management of Rx queue control' " luca.boccassi
                   ` (9 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/873da637bbf990a6afac97a98bfec8ebbf225f21

Thanks.

Luca Boccassi

---
From 873da637bbf990a6afac97a98bfec8ebbf225f21 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 1 Oct 2024 11:12:54 +0200
Subject: [PATCH] net/iavf: preserve MAC address with i40e PF Linux driver

[ upstream commit 3d42086def307be853d1e2e5b9d1e76725c3661f ]

Following two upstream Linux kernel changes (see links), the mac address
of a iavf port, serviced by a i40e PF driver, is lost when the DPDK iavf
driver probes the port again (which may be triggered at any point of a
DPDK application life, like when a reset event is triggered by the PF).

A first change results in the mac address of the VF port being reset to 0
during the VIRTCHNL_OP_GET_VF_RESOURCES query.
The i40e PF driver change is pretty obscure but the iavf Linux driver does
set VIRTCHNL_VF_OFFLOAD_USO.
Announcing such a capability in the DPDK driver does not seem to be an
issue, so do the same in DPDK to keep the legacy behavior of a fixed mac.

Then a second change in the kernel results in the VF mac address being
cleared when the VF driver remove its default mac address.
Removing (unicast or multicast) mac addresses is not done by the kernel VF
driver in general.
The reason why the DPDK driver behaves like this is undocumented
(and lost because the authors are not active anymore).
Aligning DPDK behavior to the upstream kernel driver is safer in any
case.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fed0d9f13266
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ceb29474bbbc

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 19 +++++--------------
 drivers/net/iavf/iavf_vchnl.c  |  1 +
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index b6c3cd425d..c117896547 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1012,7 +1012,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
 		if (iavf_configure_queues(adapter,
 				IAVF_CFG_Q_NUM_PER_BUF, index) != 0) {
 			PMD_DRV_LOG(ERR, "configure queues failed");
-			goto err_queue;
+			goto error;
 		}
 		num_queue_pairs -= IAVF_CFG_Q_NUM_PER_BUF;
 		index += IAVF_CFG_Q_NUM_PER_BUF;
@@ -1020,12 +1020,12 @@ iavf_dev_start(struct rte_eth_dev *dev)
 
 	if (iavf_configure_queues(adapter, num_queue_pairs, index) != 0) {
 		PMD_DRV_LOG(ERR, "configure queues failed");
-		goto err_queue;
+		goto error;
 	}
 
 	if (iavf_config_rx_queues_irqs(dev, intr_handle) != 0) {
 		PMD_DRV_LOG(ERR, "configure irq failed");
-		goto err_queue;
+		goto error;
 	}
 	/* re-enable intr again, because efd assign may change */
 	if (dev->data->dev_conf.intr_conf.rxq != 0) {
@@ -1045,14 +1045,12 @@ iavf_dev_start(struct rte_eth_dev *dev)
 
 	if (iavf_start_queues(dev) != 0) {
 		PMD_DRV_LOG(ERR, "enable queues failed");
-		goto err_mac;
+		goto error;
 	}
 
 	return 0;
 
-err_mac:
-	iavf_add_del_all_mac_addr(adapter, false);
-err_queue:
+error:
 	return -1;
 }
 
@@ -1084,13 +1082,6 @@ iavf_dev_stop(struct rte_eth_dev *dev)
 	/* Rx interrupt vector mapping free */
 	rte_intr_vec_list_free(intr_handle);
 
-	/* remove all mac addrs */
-	iavf_add_del_all_mac_addr(adapter, false);
-
-	/* remove all multicast addresses */
-	iavf_add_del_mc_addr_list(adapter, vf->mc_addrs, vf->mc_addrs_num,
-				  false);
-
 	iavf_stop_queues(dev);
 
 	adapter->stopped = 1;
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 0164dddcb0..da1eec273c 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -696,6 +696,7 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)
 		VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF |
 		VIRTCHNL_VF_OFFLOAD_FSUB_PF |
 		VIRTCHNL_VF_OFFLOAD_REQ_QUEUES |
+		VIRTCHNL_VF_OFFLOAD_USO |
 		VIRTCHNL_VF_OFFLOAD_CRC |
 		VIRTCHNL_VF_OFFLOAD_VLAN_V2 |
 		VIRTCHNL_VF_LARGE_NUM_QPAIRS |
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:43.132781984 +0100
+++ 0069-net-iavf-preserve-MAC-address-with-i40e-PF-Linux-dri.patch	2024-10-23 22:16:40.535944141 +0100
@@ -1 +1 @@
-From 3d42086def307be853d1e2e5b9d1e76725c3661f Mon Sep 17 00:00:00 2001
+From 873da637bbf990a6afac97a98bfec8ebbf225f21 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3d42086def307be853d1e2e5b9d1e76725c3661f ]
+
@@ -27,2 +28,0 @@
-Cc: stable@dpdk.org
-
@@ -35 +35 @@
- drivers/net/iavf/iavf_ethdev.c | 22 +++++-----------------
+ drivers/net/iavf/iavf_ethdev.c | 19 +++++--------------
@@ -37 +37 @@
- 2 files changed, 6 insertions(+), 17 deletions(-)
+ 2 files changed, 6 insertions(+), 14 deletions(-)
@@ -40 +40 @@
-index c200f63b4f..7f80cd6258 100644
+index b6c3cd425d..c117896547 100644
@@ -43 +43 @@
-@@ -1044,7 +1044,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
+@@ -1012,7 +1012,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
@@ -52 +52 @@
-@@ -1052,12 +1052,12 @@ iavf_dev_start(struct rte_eth_dev *dev)
+@@ -1020,12 +1020,12 @@ iavf_dev_start(struct rte_eth_dev *dev)
@@ -67 +67 @@
-@@ -1077,14 +1077,12 @@ iavf_dev_start(struct rte_eth_dev *dev)
+@@ -1045,14 +1045,12 @@ iavf_dev_start(struct rte_eth_dev *dev)
@@ -84 +84 @@
-@@ -1113,16 +1111,6 @@ iavf_dev_stop(struct rte_eth_dev *dev)
+@@ -1084,13 +1082,6 @@ iavf_dev_stop(struct rte_eth_dev *dev)
@@ -88,4 +88,2 @@
--	/* adminq will be disabled when vf is resetting. */
--	if (!vf->in_reset_recovery) {
--		/* remove all mac addrs */
--		iavf_add_del_all_mac_addr(adapter, false);
+-	/* remove all mac addrs */
+-	iavf_add_del_all_mac_addr(adapter, false);
@@ -93,2 +91,2 @@
--		/* remove all multicast addresses */
--		iavf_add_del_mc_addr_list(adapter, vf->mc_addrs, vf->mc_addrs_num,
+-	/* remove all multicast addresses */
+-	iavf_add_del_mc_addr_list(adapter, vf->mc_addrs, vf->mc_addrs_num,
@@ -96 +93,0 @@
--	}
@@ -102 +99 @@
-index 69420bc9b6..065ab3594c 100644
+index 0164dddcb0..da1eec273c 100644
@@ -105 +102 @@
-@@ -710,6 +710,7 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)
+@@ -696,6 +696,7 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)

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

* patch 'net/mlx5: workaround list management of Rx queue control' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (67 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/iavf: preserve MAC address with i40e PF Linux driver' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/mlx5: fix number of supported flex parsers' " luca.boccassi
                   ` (8 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/09fbaf6867aacf98f237de8d501d25c5fc461c42

Thanks.

Luca Boccassi

---
From 09fbaf6867aacf98f237de8d501d25c5fc461c42 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Tue, 23 Jul 2024 14:14:11 +0300
Subject: [PATCH] net/mlx5: workaround list management of Rx queue control

[ upstream commit f957ac99643535fd218753f4f956fc9c5aadd23c ]

The LIST_REMOVE macro only removes the entry from the list and
updates list itself. The pointers of this entry are not reset to
NULL to prevent the accessing for the 2nd time.

In the previous fix for the memory accessing, the "rxq_ctrl" was
removed from the list in a device private data when the "refcnt" was
decreased to 0. Under only shared or non-shared queues scenarios,
this was safe since all the "rxq_ctrl" entries were freed or kept.

There is one case that shared and non-shared Rx queues are configured
simultaneously, for example, a hairpin Rx queue cannot be shared.
When closing the port that allocated the shared Rx queues'
"rxq_ctrl", if the next entry is hairpin "rxq_ctrl", the hairpin
"rxq_ctrl" will be freed directly with other resources. When trying
to close the another port sharing the "rxq_ctrl", the LIST_REMOVE
will be called again and cause some UFA issue. If the memory is no
longer mapped, there will be a SIGSEGV.

Adding a flag in the Rx queue private structure to remove the
"rxq_ctrl" from the list only on the port/queue that allocated it.

Fixes: bcc220cb57d7 ("net/mlx5: fix shared Rx queue list management")

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

diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h
index 6b42e27c89..7d0d76123f 100644
--- a/drivers/net/mlx5/mlx5_rx.h
+++ b/drivers/net/mlx5/mlx5_rx.h
@@ -170,6 +170,7 @@ struct mlx5_rxq_ctrl {
 struct mlx5_rxq_priv {
 	uint16_t idx; /* Queue index. */
 	uint32_t refcnt; /* Reference counter. */
+	bool possessor; /* Shared rxq_ctrl allocated for the 1st time. */
 	struct mlx5_rxq_ctrl *ctrl; /* Shared Rx Queue. */
 	LIST_ENTRY(mlx5_rxq_priv) owner_entry; /* Entry in shared rxq_ctrl. */
 	struct mlx5_priv *priv; /* Back pointer to private data. */
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 9179b9d9d7..2f5c705660 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -935,6 +935,7 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 			rte_errno = ENOMEM;
 			return -rte_errno;
 		}
+		rxq->possessor = true;
 	}
 	rxq->priv = priv;
 	rxq->idx = idx;
@@ -2013,6 +2014,7 @@ mlx5_rxq_hairpin_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
 	tmpl->rxq.mr_ctrl.cache_bh = (struct mlx5_mr_btree) { 0 };
 	tmpl->rxq.idx = idx;
 	rxq->hairpin_conf = *hairpin_conf;
+	rxq->possessor = true;
 	mlx5_rxq_ref(dev, idx);
 	LIST_INSERT_HEAD(&priv->rxqsctrl, tmpl, next);
 	return tmpl;
@@ -2280,7 +2282,8 @@ mlx5_rxq_release(struct rte_eth_dev *dev, uint16_t idx)
 					RTE_ETH_QUEUE_STATE_STOPPED;
 		}
 	} else { /* Refcnt zero, closing device. */
-		LIST_REMOVE(rxq_ctrl, next);
+		if (rxq->possessor)
+			LIST_REMOVE(rxq_ctrl, next);
 		LIST_REMOVE(rxq, owner_entry);
 		if (LIST_EMPTY(&rxq_ctrl->owners)) {
 			if (!rxq_ctrl->is_hairpin)
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:43.169147806 +0100
+++ 0070-net-mlx5-workaround-list-management-of-Rx-queue-cont.patch	2024-10-23 22:16:40.539944297 +0100
@@ -1 +1 @@
-From f957ac99643535fd218753f4f956fc9c5aadd23c Mon Sep 17 00:00:00 2001
+From 09fbaf6867aacf98f237de8d501d25c5fc461c42 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f957ac99643535fd218753f4f956fc9c5aadd23c ]
+
@@ -28 +29,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 7d144921ab..9bcb43b007 100644
+index 6b42e27c89..7d0d76123f 100644
@@ -41,2 +42 @@
-@@ -173,6 +173,7 @@ struct mlx5_rxq_ctrl {
- /* RX queue private data. */
+@@ -170,6 +170,7 @@ struct mlx5_rxq_ctrl {
@@ -44,0 +45 @@
+ 	uint32_t refcnt; /* Reference counter. */
@@ -46 +46,0 @@
- 	RTE_ATOMIC(uint32_t) refcnt; /* Reference counter. */
@@ -48,0 +49 @@
+ 	struct mlx5_priv *priv; /* Back pointer to private data. */
@@ -50 +51 @@
-index f13fc3b353..c6655b7db4 100644
+index 9179b9d9d7..2f5c705660 100644
@@ -53 +54 @@
-@@ -938,6 +938,7 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -935,6 +935,7 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
@@ -61 +62 @@
-@@ -2015,6 +2016,7 @@ mlx5_rxq_hairpin_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
+@@ -2013,6 +2014,7 @@ mlx5_rxq_hairpin_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
@@ -69 +70 @@
-@@ -2282,7 +2284,8 @@ mlx5_rxq_release(struct rte_eth_dev *dev, uint16_t idx)
+@@ -2280,7 +2282,8 @@ mlx5_rxq_release(struct rte_eth_dev *dev, uint16_t idx)

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

* patch 'net/mlx5: fix number of supported flex parsers' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (68 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/mlx5: workaround list management of Rx queue control' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'app/testpmd: remove flex item init command leftover' " luca.boccassi
                   ` (7 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From f12c8f789d533d874b674f3d43a945aa1965e37e Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 18 Sep 2024 16:46:19 +0300
Subject: [PATCH] net/mlx5: fix number of supported flex parsers

[ upstream commit 16d8f37b4ebb59a2b2d48dbd9c0f3b8302d4ab1f ]

The hardware supports up to 8 flex parser configurations.
Some of them can be utilized internally by firmware, depending on
the configured profile ("FLEX_PARSER_PROFILE_ENABLE" in NV-setting).
The firmware does not report in capabilities how many flex parser
configuration is remaining available (this is device-wide resource
and can be allocated runtime by other agents - kernel, DPDK
applications, etc.), and once there is no more available parsers
on the parse object creation moment firmware just returns an error.

Fixes: db25cadc0887 ("net/mlx5: add flex item operations")

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

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 5d826527b2..56b482a16e 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -60,7 +60,7 @@
 #define MLX5_ROOT_TBL_MODIFY_NUM		16
 
 /* Maximal number of flex items created on the port.*/
-#define MLX5_PORT_FLEX_ITEM_NUM			4
+#define MLX5_PORT_FLEX_ITEM_NUM			8
 
 /* Maximal number of field/field parts to map into sample registers .*/
 #define MLX5_FLEX_ITEM_MAPPING_NUM		32
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:43.205519528 +0100
+++ 0071-net-mlx5-fix-number-of-supported-flex-parsers.patch	2024-10-23 22:16:40.539944297 +0100
@@ -1 +1 @@
-From 16d8f37b4ebb59a2b2d48dbd9c0f3b8302d4ab1f Mon Sep 17 00:00:00 2001
+From f12c8f789d533d874b674f3d43a945aa1965e37e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 16d8f37b4ebb59a2b2d48dbd9c0f3b8302d4ab1f ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 5f7bfcd613..399923b443 100644
+index 5d826527b2..56b482a16e 100644
@@ -28 +29 @@
-@@ -69,7 +69,7 @@
+@@ -60,7 +60,7 @@

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

* patch 'app/testpmd: remove flex item init command leftover' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (69 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/mlx5: fix number of supported flex parsers' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/mlx5: fix next protocol validation after flex item' " luca.boccassi
                   ` (6 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From a56fc269ef4415d5e275bd4d16b6abad8df5474d Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 18 Sep 2024 16:46:20 +0300
Subject: [PATCH] app/testpmd: remove flex item init command leftover

[ upstream commit d5c50397a1cc06419970afbea9cd1c37e3c08a5b ]

There was a leftover of "flow flex init" command used
for debug purposes and had no useful functionality in
the production code.

Fixes: 59f3a8acbcdb ("app/testpmd: add flex item commands")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 app/test-pmd/cmdline_flow.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 698b4d9601..a0a7d3da14 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -100,7 +100,6 @@ enum index {
 	PULL,
 
 	/* Flex arguments */
-	FLEX_ITEM_INIT,
 	FLEX_ITEM_CREATE,
 	FLEX_ITEM_DESTROY,
 
@@ -1084,7 +1083,6 @@ struct parse_action_priv {
 	})
 
 static const enum index next_flex_item[] = {
-	FLEX_ITEM_INIT,
 	FLEX_ITEM_CREATE,
 	FLEX_ITEM_DESTROY,
 	ZERO,
@@ -3297,15 +3295,6 @@ static const struct token token_list[] = {
 		.next = NEXT(next_flex_item),
 		.call = parse_flex,
 	},
-	[FLEX_ITEM_INIT] = {
-		.name = "init",
-		.help = "flex item init",
-		.args = ARGS(ARGS_ENTRY(struct buffer, args.flex.token),
-			     ARGS_ENTRY(struct buffer, port)),
-		.next = NEXT(NEXT_ENTRY(COMMON_FLEX_TOKEN),
-			     NEXT_ENTRY(COMMON_PORT_ID)),
-		.call = parse_flex
-	},
 	[FLEX_ITEM_CREATE] = {
 		.name = "create",
 		.help = "flex item create",
@@ -9233,7 +9222,6 @@ parse_flex(struct context *ctx, const struct token *token,
 		switch (ctx->curr) {
 		default:
 			break;
-		case FLEX_ITEM_INIT:
 		case FLEX_ITEM_CREATE:
 		case FLEX_ITEM_DESTROY:
 			out->command = ctx->curr;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:43.241297931 +0100
+++ 0072-app-testpmd-remove-flex-item-init-command-leftover.patch	2024-10-23 22:16:40.543944452 +0100
@@ -1 +1 @@
-From d5c50397a1cc06419970afbea9cd1c37e3c08a5b Mon Sep 17 00:00:00 2001
+From a56fc269ef4415d5e275bd4d16b6abad8df5474d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d5c50397a1cc06419970afbea9cd1c37e3c08a5b ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 5451b3a453..5f71e5ba44 100644
+index 698b4d9601..a0a7d3da14 100644
@@ -23,2 +24,2 @@
-@@ -106,7 +106,6 @@ enum index {
- 	HASH,
+@@ -100,7 +100,6 @@ enum index {
+ 	PULL,
@@ -31 +32 @@
-@@ -1320,7 +1319,6 @@ struct parse_action_priv {
+@@ -1084,7 +1083,6 @@ struct parse_action_priv {
@@ -39 +40 @@
-@@ -4188,15 +4186,6 @@ static const struct token token_list[] = {
+@@ -3297,15 +3295,6 @@ static const struct token token_list[] = {
@@ -55 +56 @@
-@@ -11472,7 +11461,6 @@ parse_flex(struct context *ctx, const struct token *token,
+@@ -9233,7 +9222,6 @@ parse_flex(struct context *ctx, const struct token *token,

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

* patch 'net/mlx5: fix next protocol validation after flex item' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (70 preceding siblings ...)
  2024-10-23 21:16 ` patch 'app/testpmd: remove flex item init command leftover' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'build: remove version check on compiler links function' " luca.boccassi
                   ` (5 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9015591db9b6292558b5b839616a9e6ddd00b38e

Thanks.

Luca Boccassi

---
From 9015591db9b6292558b5b839616a9e6ddd00b38e Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 18 Sep 2024 16:46:21 +0300
Subject: [PATCH] net/mlx5: fix next protocol validation after flex item

[ upstream commit 3847a3b192315491118eab9830e695eb2c9946e2 ]

On the flow validation some items may check the preceding protocols.
In case of flex item the next protocol is opaque (or can be multiple
ones) we should set neutral value and allow successful validation,
for example, for the combination of flex and following ESP items.

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

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

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 6521b5b230..8267bf9ffa 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7503,6 +7503,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 							 tunnel != 0, error);
 			if (ret < 0)
 				return ret;
+			/* Reset for next proto, it is unknown. */
+			next_protocol = 0xff;
 			break;
 		case RTE_FLOW_ITEM_TYPE_METER_COLOR:
 			ret = flow_dv_validate_item_meter_color(dev, items,
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:43.280505849 +0100
+++ 0073-net-mlx5-fix-next-protocol-validation-after-flex-ite.patch	2024-10-23 22:16:40.551944763 +0100
@@ -1 +1 @@
-From 3847a3b192315491118eab9830e695eb2c9946e2 Mon Sep 17 00:00:00 2001
+From 9015591db9b6292558b5b839616a9e6ddd00b38e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3847a3b192315491118eab9830e695eb2c9946e2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index e8ca2b3ed6..4451b114ae 100644
+index 6521b5b230..8267bf9ffa 100644
@@ -24 +25 @@
-@@ -8194,6 +8194,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7503,6 +7503,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,

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

* patch 'build: remove version check on compiler links function' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (71 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/mlx5: fix next protocol validation after flex item' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'hash: fix thash LFSR initialization' " luca.boccassi
                   ` (4 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Robin Jarry, Ferruh Yigit, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/70c3227ccd5083b19028295cc8d247c10a21739c

Thanks.

Luca Boccassi

---
From 70c3227ccd5083b19028295cc8d247c10a21739c Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 20 Sep 2024 13:57:34 +0100
Subject: [PATCH] build: remove version check on compiler links function

[ upstream commit 2909f9afbfd1b54ace204d40d57b68e6058aca28 ]

The "compiler.links()" function meson documentation [1] is a little
unclear, in a casual reading implies that the function was new in 0.60
meson release. In fact, it is only enhanced as described in that
release, but is present earlier.
As such, we can remove the version checks preceding the calls to links
function in our code.

[1] https://mesonbuild.com/Reference-manual_returned_compiler.html#compilerlinks

Fixes: fd809737cf8c ("common/qat: fix build with incompatible IPsec library")
Fixes: fb94d8243894 ("crypto/ipsec_mb: add dependency check for cross build")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Robin Jarry <rjarry@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/crypto/ipsec_mb/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/ipsec_mb/meson.build b/drivers/crypto/ipsec_mb/meson.build
index 4100d921ff..3981325173 100644
--- a/drivers/crypto/ipsec_mb/meson.build
+++ b/drivers/crypto/ipsec_mb/meson.build
@@ -17,7 +17,7 @@ if not lib.found()
     build = false
     reason = 'missing dependency, "libIPSec_MB"'
 # if the lib is found, check it's the right format
-elif meson.version().version_compare('>=0.60') and not cc.links(
+elif not cc.links(
         'int main(void) {return 0;}', dependencies: lib)
     build = false
     reason = 'incompatible dependency, "libIPSec_MB"'
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:43.325023813 +0100
+++ 0074-build-remove-version-check-on-compiler-links-functio.patch	2024-10-23 22:16:40.555944919 +0100
@@ -1 +1 @@
-From 2909f9afbfd1b54ace204d40d57b68e6058aca28 Mon Sep 17 00:00:00 2001
+From 70c3227ccd5083b19028295cc8d247c10a21739c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2909f9afbfd1b54ace204d40d57b68e6058aca28 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -24 +24,0 @@
- drivers/common/qat/meson.build      | 2 +-
@@ -26 +26 @@
- 2 files changed, 2 insertions(+), 2 deletions(-)
+ 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -28,13 +27,0 @@
-diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build
-index 3893b127dd..5a8de16fe0 100644
---- a/drivers/common/qat/meson.build
-+++ b/drivers/common/qat/meson.build
-@@ -43,7 +43,7 @@ else
-     IMB_required_ver = '1.4.0'
-     IMB_header = '#include<intel-ipsec-mb.h>'
-     libipsecmb = cc.find_library('IPSec_MB', required: false)
--    if libipsecmb.found() and meson.version().version_compare('>=0.60') and cc.links(
-+    if libipsecmb.found() and cc.links(
-             'int main(void) {return 0;}', dependencies: libipsecmb)
-         # version comes with quotes, so we split based on " and take the middle
-         imb_ver = cc.get_define('IMB_VERSION_STR',
@@ -42 +29 @@
-index 87bf965554..81631d3050 100644
+index 4100d921ff..3981325173 100644

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

* patch 'hash: fix thash LFSR initialization' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (72 preceding siblings ...)
  2024-10-23 21:16 ` patch 'build: remove version check on compiler links function' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'dmadev: fix potential null pointer access' " luca.boccassi
                   ` (3 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From fec66c08d4227a36d2965f5097d384ae5759d81a Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Fri, 6 Sep 2024 17:01:41 +0000
Subject: [PATCH] hash: fix thash LFSR initialization

[ upstream commit ebf7f1188ea83d6154746e90d535392113ecb1e8 ]

Reverse polynomial for an LFSR was initialized improperly which
could generate improper bit sequence in some situations.
This patch implements proper polynomial reversing function.

Fixes: 28ebff11c2dc ("hash: add predictable RSS")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/hash/rte_thash.c | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c
index 2228af576b..363603c102 100644
--- a/lib/hash/rte_thash.c
+++ b/lib/hash/rte_thash.c
@@ -160,6 +160,30 @@ thash_get_rand_poly(uint32_t poly_degree)
 		RTE_DIM(irreducible_poly_table[poly_degree])];
 }
 
+static inline uint32_t
+get_rev_poly(uint32_t poly, int degree)
+{
+	int i;
+	/*
+	 * The implicit highest coefficient of the polynomial
+	 * becomes the lowest after reversal.
+	 */
+	uint32_t rev_poly = 1;
+	uint32_t mask = (1 << degree) - 1;
+
+	/*
+	 * Here we assume "poly" argument is an irreducible polynomial,
+	 * thus the lowest coefficient of the "poly" must always be equal to "1".
+	 * After the reversal, this the lowest coefficient becomes the highest and
+	 * it is omitted since the highest coefficient is implicitly determined by
+	 * degree of the polynomial.
+	 */
+	for (i = 1; i < degree; i++)
+		rev_poly |= ((poly >> i) & 0x1) << (degree - i);
+
+	return rev_poly & mask;
+}
+
 static struct thash_lfsr *
 alloc_lfsr(struct rte_thash_ctx *ctx)
 {
@@ -179,7 +203,7 @@ alloc_lfsr(struct rte_thash_ctx *ctx)
 		lfsr->state = rte_rand() & ((1 << lfsr->deg) - 1);
 	} while (lfsr->state == 0);
 	/* init reverse order polynomial */
-	lfsr->rev_poly = (lfsr->poly >> 1) | (1 << (lfsr->deg - 1));
+	lfsr->rev_poly = get_rev_poly(lfsr->poly, lfsr->deg);
 	/* init proper rev_state*/
 	lfsr->rev_state = lfsr->state;
 	for (i = 0; i <= lfsr->deg; i++)
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:43.371890184 +0100
+++ 0075-hash-fix-thash-LFSR-initialization.patch	2024-10-23 22:16:40.555944919 +0100
@@ -1 +1 @@
-From ebf7f1188ea83d6154746e90d535392113ecb1e8 Mon Sep 17 00:00:00 2001
+From fec66c08d4227a36d2965f5097d384ae5759d81a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ebf7f1188ea83d6154746e90d535392113ecb1e8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 10721effe6..99a685f0c8 100644
+index 2228af576b..363603c102 100644
@@ -22 +23 @@
-@@ -166,6 +166,30 @@ thash_get_rand_poly(uint32_t poly_degree)
+@@ -160,6 +160,30 @@ thash_get_rand_poly(uint32_t poly_degree)
@@ -53 +54 @@
-@@ -185,7 +209,7 @@ alloc_lfsr(struct rte_thash_ctx *ctx)
+@@ -179,7 +203,7 @@ alloc_lfsr(struct rte_thash_ctx *ctx)

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

* patch 'dmadev: fix potential null pointer access' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (73 preceding siblings ...)
  2024-10-23 21:16 ` patch 'hash: fix thash LFSR initialization' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/gve/base: fix build with Fedora Rawhide' " luca.boccassi
                   ` (2 subsequent siblings)
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/45655bbf5920f832cc6dd7e6af49ecc64bf99afd

Thanks.

Luca Boccassi

---
From 45655bbf5920f832cc6dd7e6af49ecc64bf99afd Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Sat, 12 Oct 2024 17:17:34 +0800
Subject: [PATCH] dmadev: fix potential null pointer access

[ upstream commit e5389d427ec43ab805d0a1caed89b63656fd7fde ]

When rte_dma_vchan_status(dev_id, vchan, NULL) is called, a null pointer
access is triggered.
This patch adds the null pointer checker.

Fixes: 5e0f85912754 ("dmadev: add channel status check for testing use")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 lib/dmadev/rte_dmadev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c
index d94f85ea9a..2091db98bd 100644
--- a/lib/dmadev/rte_dmadev.c
+++ b/lib/dmadev/rte_dmadev.c
@@ -715,7 +715,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *
 {
 	struct rte_dma_dev *dev = &rte_dma_devices[dev_id];
 
-	if (!rte_dma_is_valid(dev_id))
+	if (!rte_dma_is_valid(dev_id) || status == NULL)
 		return -EINVAL;
 
 	if (vchan >= dev->data->dev_conf.nb_vchans) {
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:43.409268515 +0100
+++ 0076-dmadev-fix-potential-null-pointer-access.patch	2024-10-23 22:16:40.555944919 +0100
@@ -1 +1 @@
-From e5389d427ec43ab805d0a1caed89b63656fd7fde Mon Sep 17 00:00:00 2001
+From 45655bbf5920f832cc6dd7e6af49ecc64bf99afd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e5389d427ec43ab805d0a1caed89b63656fd7fde ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 845727210f..60c3d8ebf6 100644
+index d94f85ea9a..2091db98bd 100644
@@ -22 +23 @@
-@@ -741,7 +741,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *
+@@ -715,7 +715,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *

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

* patch 'net/gve/base: fix build with Fedora Rawhide' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (74 preceding siblings ...)
  2024-10-23 21:16 ` patch 'dmadev: fix potential null pointer access' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'power: fix mapped lcore ID' " luca.boccassi
  2024-10-23 21:16 ` patch 'net/ionic: fix build on Fedora Rawhide' " luca.boccassi
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Joshua Washington; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1e230f1ca23203c6d14b46a36c7d050fb934859b

Thanks.

Luca Boccassi

---
From 1e230f1ca23203c6d14b46a36c7d050fb934859b Mon Sep 17 00:00:00 2001
From: Joshua Washington <joshwash@google.com>
Date: Thu, 17 Oct 2024 16:42:33 -0700
Subject: [PATCH] net/gve/base: fix build with Fedora Rawhide

[ upstream commit f0d9e787747dda0715654da9f0501f54fe105868 ]

Currently, a number of integer types are typedef'd to their corresponding
userspace or RTE values. This can be problematic if these types are
already defined somewhere else, as it would cause type collisions.
This patch changes the typedefs to #define macros which are only defined
if the types are not defined already.

Note: this was reported by OBS CI on 2024/10/17, when compiling DPDK
in Fedora Rawhide.

Fixes: c9ba2caf6302 ("net/gve/base: add OS-specific implementation")
Fixes: abf1242fbb84 ("net/gve: add struct members and typedefs for DQO")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Joshua Washington <joshwash@google.com>
---
 drivers/net/gve/base/gve_osdep.h | 36 ++++++++++++++++++++++++--------
 1 file changed, 27 insertions(+), 9 deletions(-)

diff --git a/drivers/net/gve/base/gve_osdep.h b/drivers/net/gve/base/gve_osdep.h
index 7cb73002f4..26374bac5e 100644
--- a/drivers/net/gve/base/gve_osdep.h
+++ b/drivers/net/gve/base/gve_osdep.h
@@ -24,18 +24,36 @@
 
 #include "../gve_logs.h"
 
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint64_t u64;
+#ifndef u8
+#define u8 uint8_t
+#endif
+#ifndef u16
+#define u16 uint16_t
+#endif
+#ifndef u32
+#define u32 uint32_t
+#endif
+#ifndef u64
+#define u64 uint64_t
+#endif
 
-typedef rte_be16_t __sum16;
+#ifndef __sum16
+#define __sum16 rte_be16_t
+#endif
 
-typedef rte_be16_t __be16;
-typedef rte_be32_t __be32;
-typedef rte_be64_t __be64;
+#ifndef __be16
+#define __be16 rte_be16_t
+#endif
+#ifndef __be32
+#define __be32 rte_be32_t
+#endif
+#ifndef __be64
+#define __be64 rte_be64_t
+#endif
 
-typedef rte_iova_t dma_addr_t;
+#ifndef dma_addr_t
+#define dma_addr_t rte_iova_t
+#endif
 
 #define ETH_MIN_MTU	RTE_ETHER_MIN_MTU
 #define ETH_ALEN	RTE_ETHER_ADDR_LEN
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:43.445294209 +0100
+++ 0077-net-gve-base-fix-build-with-Fedora-Rawhide.patch	2024-10-23 22:16:40.555944919 +0100
@@ -1 +1 @@
-From f0d9e787747dda0715654da9f0501f54fe105868 Mon Sep 17 00:00:00 2001
+From 1e230f1ca23203c6d14b46a36c7d050fb934859b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f0d9e787747dda0715654da9f0501f54fe105868 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -22,2 +23,2 @@
- drivers/net/gve/base/gve_osdep.h | 48 ++++++++++++++++++++++++--------
- 1 file changed, 36 insertions(+), 12 deletions(-)
+ drivers/net/gve/base/gve_osdep.h | 36 ++++++++++++++++++++++++--------
+ 1 file changed, 27 insertions(+), 9 deletions(-)
@@ -26 +27 @@
-index c0ee0d567c..64181cebd6 100644
+index 7cb73002f4..26374bac5e 100644
@@ -29,3 +30,3 @@
-@@ -29,22 +29,46 @@
- #include <sys/utsname.h>
- #endif
+@@ -24,18 +24,36 @@
+ 
+ #include "../gve_logs.h"
@@ -66,13 +66,0 @@
-+#endif
- 
--typedef rte_le16_t __le16;
--typedef rte_le32_t __le32;
--typedef rte_le64_t __le64;
-+#ifndef __le16
-+#define __le16 rte_le16_t
-+#endif
-+#ifndef __le32
-+#define __le32 rte_le32_t
-+#endif
-+#ifndef __le64
-+#define __le64 rte_le64_t

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

* patch 'power: fix mapped lcore ID' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (75 preceding siblings ...)
  2024-10-23 21:16 ` patch 'net/gve/base: fix build with Fedora Rawhide' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-10-23 21:16 ` patch 'net/ionic: fix build on Fedora Rawhide' " luca.boccassi
  77 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Sivaprasad Tummala; +Cc: Konstantin Ananyev, Huisong Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From a73f3a97ff25752b7f1f64ae65860a2ad3d86e9b Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Fri, 18 Oct 2024 03:34:34 +0000
Subject: [PATCH] power: fix mapped lcore ID

[ upstream commit 5c9b07eeba55d527025f1f4945e2dbb366f21215 ]

This commit fixes an issue in the power library
related to using lcores mapped to different
physical cores (--lcores option in EAL).

Previously, the power library incorrectly accessed
CPU sysfs attributes for power management, treating
lcore IDs as CPU IDs.
e.g. with --lcores '1@128', lcore_id '1' was interpreted
as CPU_id instead of '128'.

This patch corrects the cpu_id based on lcore and CPU
mappings. It also constraints power management support
for lcores mapped to multiple physical cores/threads.

When multiple lcores are mapped to the same physical core,
invoking frequency scaling APIs on any lcore will apply the
changes effectively.

Fixes: 53e54bf81700 ("eal: new option --lcores for cpu assignment")

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
---
 app/test/test_power_cpufreq.c    | 21 ++++++++++++++++++---
 lib/power/power_acpi_cpufreq.c   |  6 +++++-
 lib/power/power_common.c         | 23 +++++++++++++++++++++++
 lib/power/power_common.h         |  1 +
 lib/power/power_cppc_cpufreq.c   |  6 +++++-
 lib/power/power_pstate_cpufreq.c |  6 +++++-
 6 files changed, 57 insertions(+), 6 deletions(-)

diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index 4d013cd7bb..051b9036dc 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -9,6 +9,7 @@
 #include <string.h>
 #include <inttypes.h>
 #include <rte_cycles.h>
+#include <rte_lcore.h>
 
 #include "test.h"
 
@@ -46,9 +47,10 @@ test_power_caps(void)
 
 static uint32_t total_freq_num;
 static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX];
+static uint32_t cpu_id;
 
 static int
-check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
+check_cur_freq(__rte_unused unsigned int lcore_id, uint32_t idx, bool turbo)
 {
 #define TEST_POWER_CONVERT_TO_DECIMAL 10
 #define MAX_LOOP 100
@@ -62,13 +64,13 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
 	int i;
 
 	if (snprintf(fullpath, sizeof(fullpath),
-		TEST_POWER_SYSFILE_CPUINFO_FREQ, lcore_id) < 0) {
+		TEST_POWER_SYSFILE_CPUINFO_FREQ, cpu_id) < 0) {
 		return 0;
 	}
 	f = fopen(fullpath, "r");
 	if (f == NULL) {
 		if (snprintf(fullpath, sizeof(fullpath),
-			TEST_POWER_SYSFILE_SCALING_FREQ, lcore_id) < 0) {
+			TEST_POWER_SYSFILE_SCALING_FREQ, cpu_id) < 0) {
 			return 0;
 		}
 		f = fopen(fullpath, "r");
@@ -486,6 +488,19 @@ test_power_cpufreq(void)
 {
 	int ret = -1;
 	enum power_management_env env;
+	rte_cpuset_t lcore_cpus;
+
+	lcore_cpus = rte_lcore_cpuset(TEST_POWER_LCORE_ID);
+	if (CPU_COUNT(&lcore_cpus) != 1) {
+		printf("Power management doesn't support lcore %u mapping to %u CPUs\n",
+				TEST_POWER_LCORE_ID,
+				CPU_COUNT(&lcore_cpus));
+		return TEST_SKIPPED;
+	}
+	for (cpu_id = 0; cpu_id < CPU_SETSIZE; cpu_id++) {
+		if (CPU_ISSET(cpu_id, &lcore_cpus))
+			break;
+	}
 
 	/* Test initialisation of a valid lcore */
 	ret = rte_power_init(TEST_POWER_LCORE_ID);
diff --git a/lib/power/power_acpi_cpufreq.c b/lib/power/power_acpi_cpufreq.c
index 6e57aca535..8068c6d98b 100644
--- a/lib/power/power_acpi_cpufreq.c
+++ b/lib/power/power_acpi_cpufreq.c
@@ -257,7 +257,11 @@ power_acpi_cpufreq_init(unsigned int lcore_id)
 		return -1;
 	}
 
-	pi->lcore_id = lcore_id;
+	if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) {
+		RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
+		return -1;
+	}
+
 	/* Check and set the governor */
 	if (power_set_governor_userspace(pi) < 0) {
 		RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to "
diff --git a/lib/power/power_common.c b/lib/power/power_common.c
index 1e09facb86..e2a8c33604 100644
--- a/lib/power/power_common.c
+++ b/lib/power/power_common.c
@@ -9,6 +9,7 @@
 
 #include <rte_log.h>
 #include <rte_string_fns.h>
+#include <rte_lcore.h>
 
 #include "power_common.h"
 
@@ -202,3 +203,25 @@ out:
 
 	return ret;
 }
+
+int power_get_lcore_mapped_cpu_id(uint32_t lcore_id, uint32_t *cpu_id)
+{
+	rte_cpuset_t lcore_cpus;
+	uint32_t cpu;
+
+	lcore_cpus = rte_lcore_cpuset(lcore_id);
+	if (CPU_COUNT(&lcore_cpus) != 1) {
+		RTE_LOG(ERR, POWER,
+			"Power library does not support lcore %u mapping to %u CPUs",
+			lcore_id, CPU_COUNT(&lcore_cpus));
+		return -1;
+	}
+
+	for (cpu = 0; cpu < CPU_SETSIZE; cpu++) {
+		if (CPU_ISSET(cpu, &lcore_cpus))
+			break;
+	}
+	*cpu_id = cpu;
+
+	return 0;
+}
diff --git a/lib/power/power_common.h b/lib/power/power_common.h
index c1c7139276..b928df941f 100644
--- a/lib/power/power_common.h
+++ b/lib/power/power_common.h
@@ -27,5 +27,6 @@ int open_core_sysfs_file(FILE **f, const char *mode, const char *format, ...)
 int read_core_sysfs_u32(FILE *f, uint32_t *val);
 int read_core_sysfs_s(FILE *f, char *buf, unsigned int len);
 int write_core_sysfs_s(FILE *f, const char *str);
+int power_get_lcore_mapped_cpu_id(uint32_t lcore_id, uint32_t *cpu_id);
 
 #endif /* _POWER_COMMON_H_ */
diff --git a/lib/power/power_cppc_cpufreq.c b/lib/power/power_cppc_cpufreq.c
index d6cc58cb3b..9a77811087 100644
--- a/lib/power/power_cppc_cpufreq.c
+++ b/lib/power/power_cppc_cpufreq.c
@@ -361,7 +361,11 @@ power_cppc_cpufreq_init(unsigned int lcore_id)
 		return -1;
 	}
 
-	pi->lcore_id = lcore_id;
+	if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) {
+		RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
+		return -1;
+	}
+
 	/* Check and set the governor */
 	if (power_set_governor_userspace(pi) < 0) {
 		RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to "
diff --git a/lib/power/power_pstate_cpufreq.c b/lib/power/power_pstate_cpufreq.c
index 52aa64510e..baa1835fbc 100644
--- a/lib/power/power_pstate_cpufreq.c
+++ b/lib/power/power_pstate_cpufreq.c
@@ -563,7 +563,11 @@ power_pstate_cpufreq_init(unsigned int lcore_id)
 		return -1;
 	}
 
-	pi->lcore_id = lcore_id;
+	if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) {
+		RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
+		return -1;
+	}
+
 	/* Check and set the governor */
 	if (power_set_governor_performance(pi) < 0) {
 		RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to "
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:43.479862967 +0100
+++ 0078-power-fix-mapped-lcore-ID.patch	2024-10-23 22:16:40.555944919 +0100
@@ -1 +1 @@
-From 5c9b07eeba55d527025f1f4945e2dbb366f21215 Mon Sep 17 00:00:00 2001
+From a73f3a97ff25752b7f1f64ae65860a2ad3d86e9b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5c9b07eeba55d527025f1f4945e2dbb366f21215 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -31,8 +32,7 @@
- app/test/test_power_cpufreq.c        | 21 ++++++++++++++++++---
- lib/power/power_acpi_cpufreq.c       |  6 +++++-
- lib/power/power_amd_pstate_cpufreq.c |  6 +++++-
- lib/power/power_common.c             | 23 +++++++++++++++++++++++
- lib/power/power_common.h             |  1 +
- lib/power/power_cppc_cpufreq.c       |  6 +++++-
- lib/power/power_pstate_cpufreq.c     |  6 +++++-
- 7 files changed, 62 insertions(+), 7 deletions(-)
+ app/test/test_power_cpufreq.c    | 21 ++++++++++++++++++---
+ lib/power/power_acpi_cpufreq.c   |  6 +++++-
+ lib/power/power_common.c         | 23 +++++++++++++++++++++++
+ lib/power/power_common.h         |  1 +
+ lib/power/power_cppc_cpufreq.c   |  6 +++++-
+ lib/power/power_pstate_cpufreq.c |  6 +++++-
+ 6 files changed, 57 insertions(+), 6 deletions(-)
@@ -41 +41 @@
-index 619b2811c6..edbd34424e 100644
+index 4d013cd7bb..051b9036dc 100644
@@ -80 +80 @@
-@@ -497,6 +499,19 @@ test_power_cpufreq(void)
+@@ -486,6 +488,19 @@ test_power_cpufreq(void)
@@ -101 +101 @@
-index abad53bef1..ae809fbb60 100644
+index 6e57aca535..8068c6d98b 100644
@@ -104,18 +104 @@
-@@ -264,7 +264,11 @@ power_acpi_cpufreq_init(unsigned int lcore_id)
- 		return -1;
- 	}
- 
--	pi->lcore_id = lcore_id;
-+	if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) {
-+		POWER_LOG(ERR, "Cannot get CPU ID mapped for lcore %u", lcore_id);
-+		return -1;
-+	}
-+
- 	/* Check and set the governor */
- 	if (power_set_governor_userspace(pi) < 0) {
- 		POWER_LOG(ERR, "Cannot set governor of lcore %u to "
-diff --git a/lib/power/power_amd_pstate_cpufreq.c b/lib/power/power_amd_pstate_cpufreq.c
-index 4809d45a22..2b728eca18 100644
---- a/lib/power/power_amd_pstate_cpufreq.c
-+++ b/lib/power/power_amd_pstate_cpufreq.c
-@@ -382,7 +382,11 @@ power_amd_pstate_cpufreq_init(unsigned int lcore_id)
+@@ -257,7 +257,11 @@ power_acpi_cpufreq_init(unsigned int lcore_id)
@@ -127 +110 @@
-+		POWER_LOG(ERR, "Cannot get CPU ID mapped for lcore %u", lcore_id);
++		RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
@@ -133 +116 @@
- 		POWER_LOG(ERR, "Cannot set governor of lcore %u to "
+ 		RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to "
@@ -135 +118 @@
-index 590986d5ef..b47c63a5f1 100644
+index 1e09facb86..e2a8c33604 100644
@@ -146 +129 @@
-@@ -204,3 +205,25 @@ out:
+@@ -202,3 +203,25 @@ out:
@@ -158 +141 @@
-+		POWER_LOG(ERR,
++		RTE_LOG(ERR, POWER,
@@ -173 +156 @@
-index 83f742f42a..82fb94d0c0 100644
+index c1c7139276..b928df941f 100644
@@ -176 +159 @@
-@@ -31,5 +31,6 @@ int open_core_sysfs_file(FILE **f, const char *mode, const char *format, ...)
+@@ -27,5 +27,6 @@ int open_core_sysfs_file(FILE **f, const char *mode, const char *format, ...)
@@ -184 +167 @@
-index e73f4520d0..cc9305bdfe 100644
+index d6cc58cb3b..9a77811087 100644
@@ -187 +170 @@
-@@ -368,7 +368,11 @@ power_cppc_cpufreq_init(unsigned int lcore_id)
+@@ -361,7 +361,11 @@ power_cppc_cpufreq_init(unsigned int lcore_id)
@@ -193 +176 @@
-+		POWER_LOG(ERR, "Cannot get CPU ID mapped for lcore %u", lcore_id);
++		RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
@@ -199 +182 @@
- 		POWER_LOG(ERR, "Cannot set governor of lcore %u to "
+ 		RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to "
@@ -201 +184 @@
-index 1c2a91a178..4755909466 100644
+index 52aa64510e..baa1835fbc 100644
@@ -204 +187 @@
-@@ -570,7 +570,11 @@ power_pstate_cpufreq_init(unsigned int lcore_id)
+@@ -563,7 +563,11 @@ power_pstate_cpufreq_init(unsigned int lcore_id)
@@ -210 +193 @@
-+		POWER_LOG(ERR, "Cannot get CPU ID mapped for lcore %u", lcore_id);
++		RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
@@ -216 +199 @@
- 		POWER_LOG(ERR, "Cannot set governor of lcore %u to "
+ 		RTE_LOG(ERR, POWER, "Cannot set governor of lcore %u to "

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

* patch 'net/ionic: fix build on Fedora Rawhide' has been queued to stable release 22.11.7
  2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
                   ` (76 preceding siblings ...)
  2024-10-23 21:16 ` patch 'power: fix mapped lcore ID' " luca.boccassi
@ 2024-10-23 21:16 ` luca.boccassi
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
  77 siblings, 1 reply; 155+ messages in thread
From: luca.boccassi @ 2024-10-23 21:16 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 8c1ee8e80c24b664280c2370f0a951460c18af88 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi@gmail.com>
Date: Wed, 23 Oct 2024 19:19:39 +0100
Subject: [PATCH] net/ionic: fix build on Fedora Rawhide

Do not redefined already defined types. Not applicable to main, as
it was fixed as part of a larger refactoring.

Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
---
 drivers/net/ionic/ionic_osdep.h | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ionic/ionic_osdep.h b/drivers/net/ionic/ionic_osdep.h
index 68f767b920..db49f76a70 100644
--- a/drivers/net/ionic/ionic_osdep.h
+++ b/drivers/net/ionic/ionic_osdep.h
@@ -30,14 +30,28 @@
 
 #define __iomem
 
-typedef uint8_t	 u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint64_t u64;
+#ifndef u8
+#define u8 uint8_t
+#endif
+#ifndef u16
+#define u16 uint16_t
+#endif
+#ifndef u32
+#define u32 uint32_t
+#endif
+#ifndef uint64_t
+#define u64 uint64_t
+#endif
 
-typedef uint16_t __le16;
-typedef uint32_t __le32;
-typedef uint64_t __le64;
+#ifndef __le16
+#define __le16 uint16_t
+#endif
+#ifndef __le32
+#define __le32 uint32_t
+#endif
+#ifndef __le64
+#define __le64 uint64_t
+#endif
 
 #define ioread8(reg)		rte_read8(reg)
 #define ioread32(reg)		rte_read32(rte_le_to_cpu_32(reg))
-- 
2.45.2


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

* patch 'buildtools/chkincs: check driver specific headers' has been queued to stable release 22.11.7
  2024-10-23 21:16 ` patch 'net/ionic: fix build on Fedora Rawhide' " luca.boccassi
@ 2024-11-12 22:07   ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/netvsc: fix using Tx queue higher than Rx queues' " luca.boccassi
                       ` (38 more replies)
  0 siblings, 39 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: David Marchand; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 8a4a31ed6ee1185215ad6d2b15d4b0190a32f096 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 23 Oct 2023 13:50:28 +0200
Subject: [PATCH] buildtools/chkincs: check driver specific headers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 90cb8ff8196f9b9c1c2bcee1c94ea583789bb63f ]

Only driver headers exported by libraries were checked.
Add driver specific headers to the checked headers list.

This reveals a small issue with the vmbus driver header as some driver
headers rely on it.

Fixes: b232b2aa212b ("buildtools/chkincs: check SDK headers for C++ compatibility")
Fixes: 84aaf06d817c ("bus/vmbus: make driver-only headers private")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 buildtools/chkincs/meson.build | 3 +++
 drivers/meson.build            | 1 +
 2 files changed, 4 insertions(+)

diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build
index 378c2f19ef..0f14e02104 100644
--- a/buildtools/chkincs/meson.build
+++ b/buildtools/chkincs/meson.build
@@ -21,6 +21,9 @@ sources += gen_c_files.process(dpdk_chkinc_headers)
 # some driver SDK headers depend on these two buses, which are mandatory in build
 # so we always include them in deps list
 deps = [get_variable('shared_rte_bus_vdev'), get_variable('shared_rte_bus_pci')]
+if dpdk_conf.has('RTE_BUS_VMBUS')
+    deps += get_variable('shared_rte_bus_vmbus')
+endif
 # add the rest of the libs to the dependencies
 foreach l:enabled_libs
     deps += get_variable('shared_rte_' + l)
diff --git a/drivers/meson.build b/drivers/meson.build
index b4d9252888..175beec15e 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -175,6 +175,7 @@ foreach subpath:subdirs
         if get_option('enable_driver_sdk')
             install_headers(driver_sdk_headers)
         endif
+        dpdk_chkinc_headers += driver_sdk_headers
 
         if headers.length() > 0
             dpdk_includes += include_directories(drv_path)
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:58.735088790 +0000
+++ 0001-buildtools-chkincs-check-driver-specific-headers.patch	2024-11-12 22:06:58.623306511 +0000
@@ -1 +1 @@
-From 90cb8ff8196f9b9c1c2bcee1c94ea583789bb63f Mon Sep 17 00:00:00 2001
+From 8a4a31ed6ee1185215ad6d2b15d4b0190a32f096 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 90cb8ff8196f9b9c1c2bcee1c94ea583789bb63f ]
+
@@ -26 +28 @@
-index 787d70272b..ed65105599 100644
+index 378c2f19ef..0f14e02104 100644
@@ -29 +31 @@
-@@ -19,6 +19,9 @@ sources += gen_c_files.process(dpdk_chkinc_headers)
+@@ -21,6 +21,9 @@ sources += gen_c_files.process(dpdk_chkinc_headers)
@@ -37 +39 @@
- foreach l:dpdk_libs_enabled
+ foreach l:enabled_libs
@@ -40 +42 @@
-index 2733306698..5270160c56 100644
+index b4d9252888..175beec15e 100644
@@ -43 +45 @@
-@@ -220,6 +220,7 @@ foreach subpath:subdirs
+@@ -175,6 +175,7 @@ foreach subpath:subdirs

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

* patch 'net/netvsc: fix using Tx queue higher than Rx queues' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/hns3: restrict tunnel flow rule to one header' " luca.boccassi
                       ` (37 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Alan Elder; +Cc: Long Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/44c959d8c30e5383fcadfcb4be5a0475ca6fb828

Thanks.

Luca Boccassi

---
From 44c959d8c30e5383fcadfcb4be5a0475ca6fb828 Mon Sep 17 00:00:00 2001
From: Alan Elder <alan.elder@microsoft.com>
Date: Thu, 17 Oct 2024 12:20:29 -0700
Subject: [PATCH] net/netvsc: fix using Tx queue higher than Rx queues

[ upstream commit e90020535c03cf9e60448ba623cac3301f111dae ]

The previous code allowed the number of Tx queues to be set higher than
the number of Rx queues.  If a packet was sent on a Tx queue with index
>= number Rx queues there was a segfault due to accessing beyond the end
of the dev->data->rx_queues[] array.

This commit fixes the issue by creating an Rx queue for every Tx queue
meaning that an event buffer is allocated to handle receiving Tx
completion messages.

mbuf pool and Rx ring are not allocated for these additional Rx queues
and RSS configuration ensures that no packets are received on them.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Alan Elder <alan.elder@microsoft.com>
Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/netvsc/hn_ethdev.c |  9 +++++
 drivers/net/netvsc/hn_rxtx.c   | 69 +++++++++++++++++++++++++++++-----
 2 files changed, 69 insertions(+), 9 deletions(-)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index d0bbc0a4c0..73db9d38d9 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -313,6 +313,15 @@ static int hn_rss_reta_update(struct rte_eth_dev *dev,
 
 		if (reta_conf[idx].mask & mask)
 			hv->rss_ind[i] = reta_conf[idx].reta[shift];
+
+		/*
+		 * Ensure we don't allow config that directs traffic to an Rx
+		 * queue that we aren't going to poll
+		 */
+		if (hv->rss_ind[i] >=  dev->data->nb_rx_queues) {
+			PMD_DRV_LOG(ERR, "RSS distributing traffic to invalid Rx queue");
+			return -EINVAL;
+		}
 	}
 
 	err = hn_rndis_conf_rss(hv, NDIS_RSS_FLAG_DISABLE);
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 6496979f28..fc9df9f3b4 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -234,6 +234,17 @@ static void hn_reset_txagg(struct hn_tx_queue *txq)
 	txq->agg_prevpkt = NULL;
 }
 
+static void
+hn_rx_queue_free_common(struct hn_rx_queue *rxq)
+{
+	if (!rxq)
+		return;
+
+	rte_free(rxq->rxbuf_info);
+	rte_free(rxq->event_buf);
+	rte_free(rxq);
+}
+
 int
 hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
 		      uint16_t queue_idx, uint16_t nb_desc,
@@ -243,6 +254,7 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
 {
 	struct hn_data *hv = dev->data->dev_private;
 	struct hn_tx_queue *txq;
+	struct hn_rx_queue *rxq = NULL;
 	char name[RTE_MEMPOOL_NAMESIZE];
 	uint32_t tx_free_thresh;
 	int err = -ENOMEM;
@@ -301,6 +313,27 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
 		goto error;
 	}
 
+	/*
+	 * If there are more Tx queues than Rx queues, allocate rx_queues
+	 * with event buffer so that Tx completion messages can still be
+	 * received
+	 */
+	if (queue_idx >= dev->data->nb_rx_queues) {
+		rxq = hn_rx_queue_alloc(hv, queue_idx, socket_id);
+
+		if (!rxq) {
+			err = -ENOMEM;
+			goto error;
+		}
+
+		/*
+		 * Don't allocate mbuf pool or rx ring.  RSS is always configured
+		 * to ensure packets aren't received by this Rx queue.
+		 */
+		rxq->mb_pool = NULL;
+		rxq->rx_ring = NULL;
+	}
+
 	txq->agg_szmax  = RTE_MIN(hv->chim_szmax, hv->rndis_agg_size);
 	txq->agg_pktmax = hv->rndis_agg_pkts;
 	txq->agg_align  = hv->rndis_agg_align;
@@ -311,12 +344,15 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
 				     socket_id, tx_conf);
 	if (err == 0) {
 		dev->data->tx_queues[queue_idx] = txq;
+		if (rxq != NULL)
+			dev->data->rx_queues[queue_idx] = rxq;
 		return 0;
 	}
 
 error:
 	rte_mempool_free(txq->txdesc_pool);
 	rte_memzone_free(txq->tx_rndis_mz);
+	hn_rx_queue_free_common(rxq);
 	rte_free(txq);
 	return err;
 }
@@ -363,6 +399,12 @@ hn_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
 
 	if (!txq)
 		return;
+	/*
+	 * Free any Rx queues allocated for a Tx queue without a corresponding
+	 * Rx queue
+	 */
+	if (qid >= dev->data->nb_rx_queues)
+		hn_rx_queue_free_common(dev->data->rx_queues[qid]);
 
 	rte_mempool_free(txq->txdesc_pool);
 
@@ -552,10 +594,12 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
 		     const struct hn_rxinfo *info)
 {
 	struct hn_data *hv = rxq->hv;
-	struct rte_mbuf *m;
+	struct rte_mbuf *m = NULL;
 	bool use_extbuf = false;
 
-	m = rte_pktmbuf_alloc(rxq->mb_pool);
+	if (likely(rxq->mb_pool != NULL))
+		m = rte_pktmbuf_alloc(rxq->mb_pool);
+
 	if (unlikely(!m)) {
 		struct rte_eth_dev *dev =
 			&rte_eth_devices[rxq->port_id];
@@ -942,7 +986,15 @@ hn_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	if (queue_idx == 0) {
 		rxq = hv->primary;
 	} else {
-		rxq = hn_rx_queue_alloc(hv, queue_idx, socket_id);
+		/*
+		 * If the number of Tx queues was previously greater than the
+		 * number of Rx queues, we may already have allocated an rxq.
+		 */
+		if (!dev->data->rx_queues[queue_idx])
+			rxq = hn_rx_queue_alloc(hv, queue_idx, socket_id);
+		else
+			rxq = dev->data->rx_queues[queue_idx];
+
 		if (!rxq)
 			return -ENOMEM;
 	}
@@ -975,9 +1027,10 @@ hn_dev_rx_queue_setup(struct rte_eth_dev *dev,
 
 fail:
 	rte_ring_free(rxq->rx_ring);
-	rte_free(rxq->rxbuf_info);
-	rte_free(rxq->event_buf);
-	rte_free(rxq);
+	/* Only free rxq if it was created in this function. */
+	if (!dev->data->rx_queues[queue_idx])
+		hn_rx_queue_free_common(rxq);
+
 	return error;
 }
 
@@ -998,9 +1051,7 @@ hn_rx_queue_free(struct hn_rx_queue *rxq, bool keep_primary)
 	if (keep_primary && rxq == rxq->hv->primary)
 		return;
 
-	rte_free(rxq->rxbuf_info);
-	rte_free(rxq->event_buf);
-	rte_free(rxq);
+	hn_rx_queue_free_common(rxq);
 }
 
 void
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:58.765987433 +0000
+++ 0002-net-netvsc-fix-using-Tx-queue-higher-than-Rx-queues.patch	2024-11-12 22:06:58.627306574 +0000
@@ -1 +1 @@
-From e90020535c03cf9e60448ba623cac3301f111dae Mon Sep 17 00:00:00 2001
+From 44c959d8c30e5383fcadfcb4be5a0475ca6fb828 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e90020535c03cf9e60448ba623cac3301f111dae ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index f8cb05a118..1736cb5d07 100644
+index d0bbc0a4c0..73db9d38d9 100644
@@ -49 +50 @@
-index 870f62e5fa..52aedb001f 100644
+index 6496979f28..fc9df9f3b4 100644
@@ -52 +53 @@
-@@ -222,6 +222,17 @@ static void hn_reset_txagg(struct hn_tx_queue *txq)
+@@ -234,6 +234,17 @@ static void hn_reset_txagg(struct hn_tx_queue *txq)
@@ -70 +71 @@
-@@ -231,6 +242,7 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -243,6 +254,7 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -78 +79 @@
-@@ -289,6 +301,27 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -301,6 +313,27 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -106 +107 @@
-@@ -299,12 +332,15 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -311,12 +344,15 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -122 +123 @@
-@@ -351,6 +387,12 @@ hn_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
+@@ -363,6 +399,12 @@ hn_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
@@ -135 +136 @@
-@@ -540,10 +582,12 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
+@@ -552,10 +594,12 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
@@ -150 +151 @@
-@@ -930,7 +974,15 @@ hn_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -942,7 +986,15 @@ hn_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -167 +168 @@
-@@ -963,9 +1015,10 @@ hn_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -975,9 +1027,10 @@ hn_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -181 +182 @@
-@@ -986,9 +1039,7 @@ hn_rx_queue_free(struct hn_rx_queue *rxq, bool keep_primary)
+@@ -998,9 +1051,7 @@ hn_rx_queue_free(struct hn_rx_queue *rxq, bool keep_primary)

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

* patch 'net/hns3: restrict tunnel flow rule to one header' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
  2024-11-12 22:07     ` patch 'net/netvsc: fix using Tx queue higher than Rx queues' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/ice: detect stopping a flow director queue twice' " luca.boccassi
                       ` (36 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From b207e53f2788c4c09f23b0646b242b49f79d51aa Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 18 Oct 2024 14:19:38 +0800
Subject: [PATCH] net/hns3: restrict tunnel flow rule to one header

[ upstream commit 8887c207b9373a1875031c5346706f698322d66d ]

The device's flow director supports a maximum of one tunnel header, if
passed more than one tunnel header from rte-flow API, the driver should
return error.

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

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index da17fa6e69..ec2000064c 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1182,6 +1182,11 @@ hns3_parse_tunnel(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
 					  "Tunnel packets must configure "
 					  "with mask");
 
+	if (rule->key_conf.spec.tunnel_type != 0)
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ITEM,
+					  item, "Too many tunnel headers!");
+
 	switch (item->type) {
 	case RTE_FLOW_ITEM_TYPE_VXLAN:
 	case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:58.796939457 +0000
+++ 0003-net-hns3-restrict-tunnel-flow-rule-to-one-header.patch	2024-11-12 22:06:58.627306574 +0000
@@ -1 +1 @@
-From 8887c207b9373a1875031c5346706f698322d66d Mon Sep 17 00:00:00 2001
+From b207e53f2788c4c09f23b0646b242b49f79d51aa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8887c207b9373a1875031c5346706f698322d66d ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index bf1eee506d..5586708a5d 100644
+index da17fa6e69..ec2000064c 100644
@@ -23 +24 @@
-@@ -1221,6 +1221,11 @@ hns3_parse_tunnel(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
+@@ -1182,6 +1182,11 @@ hns3_parse_tunnel(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,

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

* patch 'net/ice: detect stopping a flow director queue twice' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
  2024-11-12 22:07     ` patch 'net/netvsc: fix using Tx queue higher than Rx queues' " luca.boccassi
  2024-11-12 22:07     ` patch 'net/hns3: restrict tunnel flow rule to one header' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/ixgbe: fix link status delay on FreeBSD' " luca.boccassi
                       ` (35 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 3dac25dc58cd42fb27abe0210f2df226a7be7aa0 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 22 Oct 2024 17:39:41 +0100
Subject: [PATCH] net/ice: detect stopping a flow director queue twice

[ upstream commit 7b230d43e8061bdaba02a41f601bb8e0b5dbff03 ]

If the flow-director queue is stopped at some point during the running
of an application, the shutdown procedure for the port issues an error
as it tries to stop the queue a second time, and fails to do so. We can
eliminate this error by setting the tail-register pointer to NULL on
stop, and checking for that condition in subsequent stop calls. Since
the register pointer is set on start, any restarting of the queue will
allow a stop call to progress as normal.

Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/ice/ice_rxtx.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index f73065b81c..93b284ad87 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -1122,6 +1122,10 @@ ice_fdir_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 			    tx_queue_id);
 		return -EINVAL;
 	}
+	if (txq->qtx_tail == NULL) {
+		PMD_DRV_LOG(INFO, "TX queue %u not started", tx_queue_id);
+		return 0;
+	}
 	vsi = txq->vsi;
 
 	q_ids[0] = txq->reg_idx;
@@ -1136,6 +1140,7 @@ ice_fdir_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 	}
 
 	txq->tx_rel_mbufs(txq);
+	txq->qtx_tail = NULL;
 
 	return 0;
 }
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:58.824517048 +0000
+++ 0004-net-ice-detect-stopping-a-flow-director-queue-twice.patch	2024-11-12 22:06:58.631306637 +0000
@@ -1 +1 @@
-From 7b230d43e8061bdaba02a41f601bb8e0b5dbff03 Mon Sep 17 00:00:00 2001
+From 3dac25dc58cd42fb27abe0210f2df226a7be7aa0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7b230d43e8061bdaba02a41f601bb8e0b5dbff03 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index d2f9edc221..024d97cb46 100644
+index f73065b81c..93b284ad87 100644
@@ -27 +28 @@
-@@ -1139,6 +1139,10 @@ ice_fdir_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
+@@ -1122,6 +1122,10 @@ ice_fdir_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
@@ -38 +39 @@
-@@ -1153,6 +1157,7 @@ ice_fdir_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
+@@ -1136,6 +1140,7 @@ ice_fdir_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)

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

* patch 'net/ixgbe: fix link status delay on FreeBSD' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (2 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/ice: detect stopping a flow director queue twice' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/mvneta: fix possible out-of-bounds write' " luca.boccassi
                       ` (34 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Lewis Donzis; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From a4ee1170efdafa7e38b42b4f9974795bbacb2f8b Mon Sep 17 00:00:00 2001
From: Lewis Donzis <lew@perftech.com>
Date: Tue, 22 Oct 2024 09:42:05 -0500
Subject: [PATCH] net/ixgbe: fix link status delay on FreeBSD

[ upstream commit f775386d92d68e534600fcff3fc4bcaa30d3e68c ]

Forcing wait true prevents checking link status without delay, because
the function will wait more than 10 seconds for link status to be true,
even if the API caller requested no waiting.

Fixes: 0012111a3d87 ("net/ixgbe: fix link status synchronization on BSD")

Signed-off-by: Lewis Donzis <lew@perftech.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 9e1a65a50a..99986aa1d4 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4302,11 +4302,6 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	if (wait_to_complete == 0 || dev->data->dev_conf.intr_conf.lsc != 0)
 		wait = 0;
 
-/* BSD has no interrupt mechanism, so force NIC status synchronization. */
-#ifdef RTE_EXEC_ENV_FREEBSD
-	wait = 1;
-#endif
-
 	if (vf)
 		diag = ixgbevf_check_link(hw, &link_speed, &link_up, wait);
 	else
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:58.855499459 +0000
+++ 0005-net-ixgbe-fix-link-status-delay-on-FreeBSD.patch	2024-11-12 22:06:58.635306699 +0000
@@ -1 +1 @@
-From f775386d92d68e534600fcff3fc4bcaa30d3e68c Mon Sep 17 00:00:00 2001
+From a4ee1170efdafa7e38b42b4f9974795bbacb2f8b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f775386d92d68e534600fcff3fc4bcaa30d3e68c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index ab37c37469..008760e315 100644
+index 9e1a65a50a..99986aa1d4 100644
@@ -23 +24 @@
-@@ -4314,11 +4314,6 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4302,11 +4302,6 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,

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

* patch 'net/mvneta: fix possible out-of-bounds write' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (3 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/ixgbe: fix link status delay on FreeBSD' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'config/arm: fix warning for native build with meson >= 0.55' " luca.boccassi
                       ` (33 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Ferruh Yigit, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From b6454df58c5aef1eaa40d35d1ee1e098c307b613 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 10 Oct 2024 00:53:26 +0000
Subject: [PATCH] net/mvneta: fix possible out-of-bounds write

[ upstream commit c705c67d304b9450824a169b652520c2358c6aee ]

The mvneta_ifnames_get() function will save 'iface' value to ifnames,
it will out-of-bounds write if passed many iface pairs (e.g.
'iface=xxx,iface=xxx,...').

Fixes: 4ccc8d770d3b ("net/mvneta: add PMD skeleton")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/mvneta/mvneta_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index f281d1d7f8..6821f8e559 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -91,6 +91,12 @@ mvneta_ifnames_get(const char *key __rte_unused, const char *value,
 {
 	struct mvneta_ifnames *ifnames = extra_args;
 
+	if (ifnames->idx >= NETA_NUM_ETH_PPIO) {
+		MVNETA_LOG(ERR, "Too many ifnames specified (max %u)",
+			   NETA_NUM_ETH_PPIO);
+		return -EINVAL;
+	}
+
 	ifnames->names[ifnames->idx++] = value;
 
 	return 0;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:58.888440214 +0000
+++ 0006-net-mvneta-fix-possible-out-of-bounds-write.patch	2024-11-12 22:06:58.635306699 +0000
@@ -1 +1 @@
-From c705c67d304b9450824a169b652520c2358c6aee Mon Sep 17 00:00:00 2001
+From b6454df58c5aef1eaa40d35d1ee1e098c307b613 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c705c67d304b9450824a169b652520c2358c6aee ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 3841c1ebe9..f99f9e6289 100644
+index f281d1d7f8..6821f8e559 100644

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

* patch 'config/arm: fix warning for native build with meson >= 0.55' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (4 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/mvneta: fix possible out-of-bounds write' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'crypto/openssl: fix 3DES-CTR with big endian CPUs' " luca.boccassi
                       ` (32 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: David Marchand; +Cc: Robin Jarry, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 7c2c50cb67c1dde2e00698355c38a260d1506b19 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 28 Oct 2024 13:47:43 +0100
Subject: [PATCH] config/arm: fix warning for native build with meson >= 0.55

[ upstream commit c3495563c5e13be8baf150196645bb944230c489 ]

Caught in UNH logs for native compilation on ARM:

Program /...../dpdk/config/arm/armv8_machine.py found: YES
	(/...../dpdk/config/arm/armv8_machine.py)
WARNING: Project targeting '>= 0.57' but tried to use feature deprecated
	since '0.55.0': ExternalProgram.path. use ExternalProgram.full_path()
	instead

There is nothing to search, nor a reason to call the script with an
absolute path.
The script can be directly pointed at with files().

Fixes: 200b88cbe0e6 ("build: detect micro-arch on ARM")
Fixes: 6f3dbd306de0 ("build: increase minimum meson version to 0.57")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Robin Jarry <rjarry@redhat.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 config/arm/meson.build | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 5028c74613..45806d701e 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -544,9 +544,8 @@ else
             # native build
             # The script returns ['Implementer', 'Variant', 'Architecture',
             # 'Primary Part number', 'Revision']
-            detect_vendor = find_program(join_paths(meson.current_source_dir(),
-                                                    'armv8_machine.py'))
-            cmd = run_command(detect_vendor.path(), check: false)
+            detect_vendor = py3 + files('armv8_machine.py')
+            cmd = run_command(detect_vendor, check: false)
             if cmd.returncode() == 0
                 cmd_output = cmd.stdout().to_lower().strip().split(' ')
                 implementer_id = cmd_output[0]
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:58.915594405 +0000
+++ 0007-config-arm-fix-warning-for-native-build-with-meson-0.patch	2024-11-12 22:06:58.635306699 +0000
@@ -1 +1 @@
-From c3495563c5e13be8baf150196645bb944230c489 Mon Sep 17 00:00:00 2001
+From 7c2c50cb67c1dde2e00698355c38a260d1506b19 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c3495563c5e13be8baf150196645bb944230c489 ]
+
@@ -29 +31 @@
-index 55be7c8711..95500c8ed3 100644
+index 5028c74613..45806d701e 100644
@@ -32 +34 @@
-@@ -784,9 +784,8 @@ else
+@@ -544,9 +544,8 @@ else

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

* patch 'crypto/openssl: fix 3DES-CTR with big endian CPUs' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (5 preceding siblings ...)
  2024-11-12 22:07     ` patch 'config/arm: fix warning for native build with meson >= 0.55' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'eal/unix: optimize thread creation' " luca.boccassi
                       ` (31 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: David Marchand; +Cc: Morten Brørup, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/15f924f62f25524d2a9d4682fefb3072e9e72b3b

Thanks.

Luca Boccassi

---
From 15f924f62f25524d2a9d4682fefb3072e9e72b3b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 25 Oct 2024 09:04:21 +0200
Subject: [PATCH] crypto/openssl: fix 3DES-CTR with big endian CPUs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 97afd07ca79c7270480a65febd7f616a4c0b07ca ]

Caught by code review.

Don't byte swap unconditionally (assuming that CPU is little endian is
wrong). Instead, convert from big endian to cpu and vice versa.

Besides, avoid unaligned accesses and remove the ctr_inc helper that is
not used anywhere else.

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

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 28 ++++++++----------------
 1 file changed, 9 insertions(+), 19 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 9fc8194366..0d4c84c18b 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2,6 +2,7 @@
  * Copyright(c) 2016-2017 Intel Corporation
  */
 
+#include <rte_byteorder.h>
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
@@ -98,22 +99,6 @@ digest_name_get(enum rte_crypto_auth_algorithm algo)
 
 static int cryptodev_openssl_remove(struct rte_vdev_device *vdev);
 
-/*----------------------------------------------------------------------------*/
-
-/**
- * Increment counter by 1
- * Counter is 64 bit array, big-endian
- */
-static void
-ctr_inc(uint8_t *ctr)
-{
-	uint64_t *ctr64 = (uint64_t *)ctr;
-
-	*ctr64 = __builtin_bswap64(*ctr64);
-	(*ctr64)++;
-	*ctr64 = __builtin_bswap64(*ctr64);
-}
-
 /*
  *------------------------------------------------------------------------------
  * Session Prepare
@@ -1191,7 +1176,8 @@ static int
 process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
 		int offset, uint8_t *iv, int srclen, EVP_CIPHER_CTX *ctx)
 {
-	uint8_t ebuf[8], ctr[8];
+	uint8_t ebuf[8];
+	uint64_t ctr;
 	int unused, n;
 	struct rte_mbuf *m;
 	uint8_t *src;
@@ -1207,15 +1193,19 @@ process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
 	src = rte_pktmbuf_mtod_offset(m, uint8_t *, offset);
 	l = rte_pktmbuf_data_len(m) - offset;
 
-	memcpy(ctr, iv, 8);
+	memcpy(&ctr, iv, 8);
 
 	for (n = 0; n < srclen; n++) {
 		if (n % 8 == 0) {
+			uint64_t cpu_ctr;
+
 			if (EVP_EncryptUpdate(ctx,
 					(unsigned char *)&ebuf, &unused,
 					(const unsigned char *)&ctr, 8) <= 0)
 				goto process_cipher_des3ctr_err;
-			ctr_inc(ctr);
+			cpu_ctr = rte_be_to_cpu_64(ctr);
+			cpu_ctr++;
+			ctr = rte_cpu_to_be_64(cpu_ctr);
 		}
 		dst[n] = *(src++) ^ ebuf[n % 8];
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:58.954346712 +0000
+++ 0008-crypto-openssl-fix-3DES-CTR-with-big-endian-CPUs.patch	2024-11-12 22:06:58.639306763 +0000
@@ -1 +1 @@
-From 97afd07ca79c7270480a65febd7f616a4c0b07ca Mon Sep 17 00:00:00 2001
+From 15f924f62f25524d2a9d4682fefb3072e9e72b3b Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 97afd07ca79c7270480a65febd7f616a4c0b07ca ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 9657b70c7a..0616383921 100644
+index 9fc8194366..0d4c84c18b 100644
@@ -39 +40 @@
-@@ -99,22 +100,6 @@ digest_name_get(enum rte_crypto_auth_algorithm algo)
+@@ -98,22 +99,6 @@ digest_name_get(enum rte_crypto_auth_algorithm algo)
@@ -62 +63 @@
-@@ -1192,7 +1177,8 @@ static int
+@@ -1191,7 +1176,8 @@ static int
@@ -72 +73 @@
-@@ -1208,15 +1194,19 @@ process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
+@@ -1207,15 +1193,19 @@ process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,

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

* patch 'eal/unix: optimize thread creation' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (6 preceding siblings ...)
  2024-11-12 22:07     ` patch 'crypto/openssl: fix 3DES-CTR with big endian CPUs' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-13  7:45       ` David Marchand
  2024-11-12 22:07     ` patch 'net/mlx5: fix memory leak in metering' " luca.boccassi
                       ` (30 subsequent siblings)
  38 siblings, 1 reply; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: David Marchand
  Cc: Luca Boccassi, Stephen Hemminger, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/02097752bb88526197af8b0dd0a8da9e6321cf9a

Thanks.

Luca Boccassi

---
From 02097752bb88526197af8b0dd0a8da9e6321cf9a Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Sat, 2 Nov 2024 10:38:16 +0100
Subject: [PATCH] eal/unix: optimize thread creation

[ upstream commit 64f27886b8bf127cd365a8a3ed5c05852a5ae81d ]

Setting the cpu affinity of the child thread from the parent thread is
racy when using pthread_setaffinity_np, as the child thread may start
running and initialize before affinity is set.

On the other hand, setting the cpu affinity from the child thread itself
may fail, so the parent thread waits for the child thread to report
whether this call succeeded.

This synchronisation point resulted in a significant slow down of
rte_thread_create() (as seen in the lcores_autotest unit tests, in OBS
for some ARM systems).

Another option for setting cpu affinity is to use the not portable
pthread_attr_setaffinity_np available in FreeBSD and glibc,
but not available in musl.

Fixes: b28c6196b132 ("eal/unix: fix thread creation")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 lib/eal/unix/meson.build  |  5 +++++
 lib/eal/unix/rte_thread.c | 25 +++++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/lib/eal/unix/meson.build b/lib/eal/unix/meson.build
index cc7d67dd32..f1eb82e16a 100644
--- a/lib/eal/unix/meson.build
+++ b/lib/eal/unix/meson.build
@@ -11,3 +11,8 @@ sources += files(
         'eal_unix_timer.c',
         'rte_thread.c',
 )
+
+if is_freebsd or cc.has_function('pthread_attr_setaffinity_np', args: '-D_GNU_SOURCE',
+                                 prefix : '#include <pthread.h>')
+    cflags += '-DRTE_EAL_PTHREAD_ATTR_SETAFFINITY_NP'
+endif
diff --git a/lib/eal/unix/rte_thread.c b/lib/eal/unix/rte_thread.c
index f4076122a4..e546329120 100644
--- a/lib/eal/unix/rte_thread.c
+++ b/lib/eal/unix/rte_thread.c
@@ -17,6 +17,7 @@ struct eal_tls_key {
 	pthread_key_t thread_index;
 };
 
+#ifndef RTE_EAL_PTHREAD_ATTR_SETAFFINITY_NP
 struct thread_start_context {
 	rte_thread_func thread_func;
 	void *thread_args;
@@ -26,6 +27,7 @@ struct thread_start_context {
 	int wrapper_ret;
 	bool wrapper_done;
 };
+#endif
 
 static int
 thread_map_priority_to_os_value(enum rte_thread_priority eal_pri, int *os_pri,
@@ -86,6 +88,7 @@ thread_map_os_priority_to_eal_priority(int policy, int os_pri,
 	return 0;
 }
 
+#ifndef RTE_EAL_PTHREAD_ATTR_SETAFFINITY_NP
 static void *
 thread_start_wrapper(void *arg)
 {
@@ -111,6 +114,7 @@ thread_start_wrapper(void *arg)
 
 	return (void *)(uintptr_t)thread_func(thread_args);
 }
+#endif
 
 int
 rte_thread_create(rte_thread_t *thread_id,
@@ -124,6 +128,7 @@ rte_thread_create(rte_thread_t *thread_id,
 		.sched_priority = 0,
 	};
 	int policy = SCHED_OTHER;
+#ifndef RTE_EAL_PTHREAD_ATTR_SETAFFINITY_NP
 	struct thread_start_context ctx = {
 		.thread_func = thread_func,
 		.thread_args = args,
@@ -132,6 +137,7 @@ rte_thread_create(rte_thread_t *thread_id,
 		.wrapper_mutex = PTHREAD_MUTEX_INITIALIZER,
 		.wrapper_cond = PTHREAD_COND_INITIALIZER,
 	};
+#endif
 
 	if (thread_attr != NULL) {
 		ret = pthread_attr_init(&attr);
@@ -142,6 +148,16 @@ rte_thread_create(rte_thread_t *thread_id,
 
 		attrp = &attr;
 
+#ifdef RTE_EAL_PTHREAD_ATTR_SETAFFINITY_NP
+		if (CPU_COUNT(&thread_attr->cpuset) > 0) {
+			ret = pthread_attr_setaffinity_np(attrp, sizeof(thread_attr->cpuset),
+				&thread_attr->cpuset);
+			if (ret != 0) {
+				RTE_LOG(DEBUG, EAL, "pthread_attr_setaffinity_np failed");
+				goto cleanup;
+			}
+		}
+#endif
 		/*
 		 * Set the inherit scheduler parameter to explicit,
 		 * otherwise the priority attribute is ignored.
@@ -176,6 +192,14 @@ rte_thread_create(rte_thread_t *thread_id,
 		}
 	}
 
+#ifdef RTE_EAL_PTHREAD_ATTR_SETAFFINITY_NP
+	ret = pthread_create((pthread_t *)&thread_id->opaque_id, attrp,
+		(void *)(void *)thread_func, args);
+	if (ret != 0) {
+		RTE_LOG(DEBUG, EAL, "pthread_create failed\n");
+		goto cleanup;
+	}
+#else /* !RTE_EAL_PTHREAD_ATTR_SETAFFINITY_NP */
 	ret = pthread_create((pthread_t *)&thread_id->opaque_id, attrp,
 		thread_start_wrapper, &ctx);
 	if (ret != 0) {
@@ -191,6 +215,7 @@ rte_thread_create(rte_thread_t *thread_id,
 
 	if (ret != 0)
 		pthread_join((pthread_t)thread_id->opaque_id, NULL);
+#endif /* RTE_EAL_PTHREAD_ATTR_SETAFFINITY_NP */
 
 cleanup:
 	if (attrp != NULL)
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:58.987392626 +0000
+++ 0009-eal-unix-optimize-thread-creation.patch	2024-11-12 22:06:58.639306763 +0000
@@ -1 +1 @@
-From 64f27886b8bf127cd365a8a3ed5c05852a5ae81d Mon Sep 17 00:00:00 2001
+From 02097752bb88526197af8b0dd0a8da9e6321cf9a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 64f27886b8bf127cd365a8a3ed5c05852a5ae81d ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -48 +49 @@
-index 1b4c73f58e..ea629c2065 100644
+index f4076122a4..e546329120 100644
@@ -51 +52 @@
-@@ -19,6 +19,7 @@ struct eal_tls_key {
+@@ -17,6 +17,7 @@ struct eal_tls_key {
@@ -59 +60 @@
-@@ -28,6 +29,7 @@ struct thread_start_context {
+@@ -26,6 +27,7 @@ struct thread_start_context {
@@ -67 +68 @@
-@@ -88,6 +90,7 @@ thread_map_os_priority_to_eal_priority(int policy, int os_pri,
+@@ -86,6 +88,7 @@ thread_map_os_priority_to_eal_priority(int policy, int os_pri,
@@ -75 +76 @@
-@@ -113,6 +116,7 @@ thread_start_wrapper(void *arg)
+@@ -111,6 +114,7 @@ thread_start_wrapper(void *arg)
@@ -83 +84 @@
-@@ -126,6 +130,7 @@ rte_thread_create(rte_thread_t *thread_id,
+@@ -124,6 +128,7 @@ rte_thread_create(rte_thread_t *thread_id,
@@ -91 +92 @@
-@@ -134,6 +139,7 @@ rte_thread_create(rte_thread_t *thread_id,
+@@ -132,6 +137,7 @@ rte_thread_create(rte_thread_t *thread_id,
@@ -99 +100 @@
-@@ -144,6 +150,16 @@ rte_thread_create(rte_thread_t *thread_id,
+@@ -142,6 +148,16 @@ rte_thread_create(rte_thread_t *thread_id,
@@ -108 +109 @@
-+				EAL_LOG(DEBUG, "pthread_attr_setaffinity_np failed");
++				RTE_LOG(DEBUG, EAL, "pthread_attr_setaffinity_np failed");
@@ -116 +117 @@
-@@ -178,6 +194,14 @@ rte_thread_create(rte_thread_t *thread_id,
+@@ -176,6 +192,14 @@ rte_thread_create(rte_thread_t *thread_id,
@@ -124 +125 @@
-+		EAL_LOG(DEBUG, "pthread_create failed");
++		RTE_LOG(DEBUG, EAL, "pthread_create failed\n");
@@ -131 +132 @@
-@@ -193,6 +217,7 @@ rte_thread_create(rte_thread_t *thread_id,
+@@ -191,6 +215,7 @@ rte_thread_create(rte_thread_t *thread_id,
@@ -134 +135 @@
- 		rte_thread_join(*thread_id, NULL);
+ 		pthread_join((pthread_t)thread_id->opaque_id, NULL);

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

* patch 'net/mlx5: fix memory leak in metering' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (7 preceding siblings ...)
  2024-11-12 22:07     ` patch 'eal/unix: optimize thread creation' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/mlx5: fix GRE flow item translation for root table' " luca.boccassi
                       ` (29 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Shun Hao; +Cc: Bing Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 80a5d7368ba6b3ad236a507b7f975693fe722ecd Mon Sep 17 00:00:00 2001
From: Shun Hao <shunh@nvidia.com>
Date: Wed, 23 Oct 2024 09:22:15 +0300
Subject: [PATCH] net/mlx5: fix memory leak in metering

[ upstream commit 4dd46d38820e0bf5e74f99b84f4b098d1b7220dd ]

Avoid allocating memory for meter profile table when meter is not
enabled. This memory was not being freed in the close process when
meter was disabled, potentially causing a leak.

Fixes: a295c69a8b24 ("net/mlx5: optimize meter profile lookup")

Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c   | 8 +++++---
 drivers/net/mlx5/mlx5_flow_meter.c | 4 ++--
 drivers/net/mlx5/windows/mlx5_os.c | 8 +++++---
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index b88ae631d9..183b5e6a84 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1533,9 +1533,11 @@ err_secondary:
 	priv->ctrl_flows = 0;
 	rte_spinlock_init(&priv->flow_list_lock);
 	TAILQ_INIT(&priv->flow_meters);
-	priv->mtr_profile_tbl = mlx5_l3t_create(MLX5_L3T_TYPE_PTR);
-	if (!priv->mtr_profile_tbl)
-		goto error;
+	if (priv->mtr_en) {
+		priv->mtr_profile_tbl = mlx5_l3t_create(MLX5_L3T_TYPE_PTR);
+		if (!priv->mtr_profile_tbl)
+			goto error;
+	}
 	/* Bring Ethernet device up. */
 	DRV_LOG(DEBUG, "port %u forcing Ethernet interface up",
 		eth_dev->data->port_id);
diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
index bcaf518227..1078d6497d 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -100,8 +100,8 @@ mlx5_flow_meter_profile_find(struct mlx5_priv *priv, uint32_t meter_profile_id)
 
 	if (priv->mtr_profile_arr)
 		return &priv->mtr_profile_arr[meter_profile_id];
-	if (mlx5_l3t_get_entry(priv->mtr_profile_tbl,
-			       meter_profile_id, &data) || !data.ptr)
+	if (!priv->mtr_profile_tbl ||
+	    mlx5_l3t_get_entry(priv->mtr_profile_tbl, meter_profile_id, &data) || !data.ptr)
 		return NULL;
 	fmp = data.ptr;
 	/* Remove reference taken by the mlx5_l3t_get_entry. */
diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c
index f401264b61..d35b949b34 100644
--- a/drivers/net/mlx5/windows/mlx5_os.c
+++ b/drivers/net/mlx5/windows/mlx5_os.c
@@ -474,9 +474,11 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 	claim_zero(mlx5_mac_addr_add(eth_dev, &mac, 0, 0));
 	priv->ctrl_flows = 0;
 	TAILQ_INIT(&priv->flow_meters);
-	priv->mtr_profile_tbl = mlx5_l3t_create(MLX5_L3T_TYPE_PTR);
-	if (!priv->mtr_profile_tbl)
-		goto error;
+	if (priv->mtr_en) {
+		priv->mtr_profile_tbl = mlx5_l3t_create(MLX5_L3T_TYPE_PTR);
+		if (!priv->mtr_profile_tbl)
+			goto error;
+	}
 	/* Bring Ethernet device up. */
 	DRV_LOG(DEBUG, "port %u forcing Ethernet interface up.",
 		eth_dev->data->port_id);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.016828692 +0000
+++ 0010-net-mlx5-fix-memory-leak-in-metering.patch	2024-11-12 22:06:58.643306826 +0000
@@ -1 +1 @@
-From 4dd46d38820e0bf5e74f99b84f4b098d1b7220dd Mon Sep 17 00:00:00 2001
+From 80a5d7368ba6b3ad236a507b7f975693fe722ecd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4dd46d38820e0bf5e74f99b84f4b098d1b7220dd ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 7d0d4bf23b..69a80b9ddc 100644
+index b88ae631d9..183b5e6a84 100644
@@ -25 +26 @@
-@@ -1612,9 +1612,11 @@ err_secondary:
+@@ -1533,9 +1533,11 @@ err_secondary:
@@ -41 +42 @@
-index 19d8607070..98a61cbdd4 100644
+index bcaf518227..1078d6497d 100644
@@ -44 +45 @@
-@@ -378,8 +378,8 @@ mlx5_flow_meter_profile_find(struct mlx5_priv *priv, uint32_t meter_profile_id)
+@@ -100,8 +100,8 @@ mlx5_flow_meter_profile_find(struct mlx5_priv *priv, uint32_t meter_profile_id)
@@ -56 +57 @@
-index 80f1679388..268598f209 100644
+index f401264b61..d35b949b34 100644
@@ -59 +60 @@
-@@ -521,9 +521,11 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -474,9 +474,11 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,

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

* patch 'net/mlx5: fix GRE flow item translation for root table' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (8 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/mlx5: fix memory leak in metering' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/mlx5: fix SQ flow item size' " luca.boccassi
                       ` (28 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Suanming Mou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From c4c995ba7b5dd12cb8084a6e6b3afcc7f3ec464d Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 27 Oct 2024 14:39:16 +0200
Subject: [PATCH] net/mlx5: fix GRE flow item translation for root table

[ upstream commit 25ab2cbba31d937e685f0cf9ecce0c680cc4083e ]

Flow items translations for the root tables reuse DV code. However,
the DV GRE item translation did not initialize the item mask for HWS
template. Initialize the mask to fix GRE item translation for root
tables when using HWS.

Fixes: cd4ab742064a ("net/mlx5: split flow item matcher and value translation")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 8267bf9ffa..4e0ed4415f 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -9108,22 +9108,23 @@ flow_dv_translate_item_gre(void *key, const struct rte_flow_item *item,
 	} gre_crks_rsvd0_ver_m, gre_crks_rsvd0_ver_v;
 	uint16_t protocol_m, protocol_v;
 
-	if (key_type & MLX5_SET_MATCHER_M)
+	if (key_type & MLX5_SET_MATCHER_M) {
 		MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol, 0xff);
-	else
-		MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
-			 IPPROTO_GRE);
-	if (!gre_v) {
-		gre_v = &empty_gre;
-		gre_m = &empty_gre;
-	} else {
 		if (!gre_m)
 			gre_m = &rte_flow_item_gre_mask;
-	}
-	if (key_type & MLX5_SET_MATCHER_M)
 		gre_v = gre_m;
-	else if (key_type == MLX5_SET_MATCHER_HS_V)
-		gre_m = gre_v;
+	} else {
+		MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
+			 IPPROTO_GRE);
+		if (!gre_v) {
+			gre_v = &empty_gre;
+			gre_m = &empty_gre;
+		} else if (!gre_m) {
+			gre_m = &rte_flow_item_gre_mask;
+		}
+		if (key_type == MLX5_SET_MATCHER_HS_V)
+			gre_m = gre_v;
+	}
 	gre_crks_rsvd0_ver_m.value = rte_be_to_cpu_16(gre_m->c_rsvd0_ver);
 	gre_crks_rsvd0_ver_v.value = rte_be_to_cpu_16(gre_v->c_rsvd0_ver);
 	MLX5_SET(fte_match_set_misc, misc_v, gre_c_present,
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.048458368 +0000
+++ 0011-net-mlx5-fix-GRE-flow-item-translation-for-root-tabl.patch	2024-11-12 22:06:58.651306951 +0000
@@ -1 +1 @@
-From 25ab2cbba31d937e685f0cf9ecce0c680cc4083e Mon Sep 17 00:00:00 2001
+From c4c995ba7b5dd12cb8084a6e6b3afcc7f3ec464d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 25ab2cbba31d937e685f0cf9ecce0c680cc4083e ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 040727f2e8..dc5263ace3 100644
+index 8267bf9ffa..4e0ed4415f 100644
@@ -24 +25 @@
-@@ -9830,22 +9830,23 @@ flow_dv_translate_item_gre(void *key, const struct rte_flow_item *item,
+@@ -9108,22 +9108,23 @@ flow_dv_translate_item_gre(void *key, const struct rte_flow_item *item,

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

* patch 'net/mlx5: fix SQ flow item size' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (9 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/mlx5: fix GRE flow item translation for root table' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/mlx5: fix SWS meter state initialization' " luca.boccassi
                       ` (27 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From f2a35164aab320bffe2240fc837a9461a66d2adf Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 27 Oct 2024 16:09:40 +0200
Subject: [PATCH] net/mlx5: fix SQ flow item size

[ upstream commit 7c66fa49ddcce1981c2fa3a0c024ec82b036639c ]

Expand the size of struct mlx5_rte_flow_item_sq to 64 bits on 64-bit
systems. This aligns with DPDK's assumption that PMD private data has
pointer size when copying flow items with rte_flow_conv.[1]

Previously, the struct was defined as 32 bits, causing DPDK to
incorrectly assign an additional 32 bits when copying
MLX5_RTE_FLOW_ITEM_TYPE_SQ items on 64-bit systems.

This fix ensures proper memory alignment and prevents potential
buffer overflows when DPDK copies MLX5_RTE_FLOW_ITEM_TYPE_SQ items.

[1]:
commit 6cf72047332b ("ethdev: support flow elements with variable length")

Fixes: 75a00812b18f ("net/mlx5: add hardware steering item translation")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 4f3a216ed4..1aff287616 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -117,6 +117,9 @@ struct mlx5_flow_action_copy_mreg {
 /* Matches on source queue. */
 struct mlx5_rte_flow_item_sq {
 	uint32_t queue; /* DevX SQ number */
+#ifdef RTE_ARCH_64
+	uint32_t reserved;
+#endif
 };
 
 /* Feature name to allocate metadata register. */
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.087437604 +0000
+++ 0012-net-mlx5-fix-SQ-flow-item-size.patch	2024-11-12 22:06:58.655307014 +0000
@@ -1 +1 @@
-From 7c66fa49ddcce1981c2fa3a0c024ec82b036639c Mon Sep 17 00:00:00 2001
+From f2a35164aab320bffe2240fc837a9461a66d2adf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7c66fa49ddcce1981c2fa3a0c024ec82b036639c ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 9a8eccdd25..f5866af231 100644
+index 4f3a216ed4..1aff287616 100644
@@ -33 +34 @@
-@@ -168,6 +168,9 @@ struct mlx5_flow_action_copy_mreg {
+@@ -117,6 +117,9 @@ struct mlx5_flow_action_copy_mreg {
@@ -42 +43 @@
- /* Map from registers to modify fields. */
+ /* Feature name to allocate metadata register. */

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

* patch 'net/mlx5: fix SWS meter state initialization' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (10 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/mlx5: fix SQ flow item size' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/mlx5: fix reported Rx/Tx descriptor limits' " luca.boccassi
                       ` (26 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/602cc6b95d5aa91bfc977f0fabbb81d9899f7361

Thanks.

Luca Boccassi

---
From 602cc6b95d5aa91bfc977f0fabbb81d9899f7361 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 27 Oct 2024 17:31:36 +0200
Subject: [PATCH] net/mlx5: fix SWS meter state initialization

[ upstream commit 0c37d8f7ba2cac289896de024d9c58a65ba3ece9 ]

Update the state initialization for SWS meter objects to properly
monitor ASO object availability. The PMD uses the meter 'state'
variable to track whether ASO objects are available for use.

This ensures that the SWS meter object state is correctly
initialized, allowing the PMD to accurately manage ASO resources
for metering functionality.

Fixes: 4359d9d1f76b ("net/mlx5: fix sync meter processing in HWS")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_meter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
index 1078d6497d..0ffe738ec5 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -1636,6 +1636,7 @@ mlx5_flow_meter_action_modify(struct mlx5_priv *priv,
 	if (priv->sh->meter_aso_en) {
 		fm->is_enable = !!is_enable;
 		aso_mtr = container_of(fm, struct mlx5_aso_mtr, fm);
+		aso_mtr->state = ASO_METER_WAIT;
 		ret = mlx5_aso_meter_update_by_wqe(priv->sh, MLX5_HW_INV_QUEUE,
 						   aso_mtr, &priv->mtr_bulk, NULL, true);
 		if (ret)
@@ -1886,6 +1887,7 @@ mlx5_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
 	/* If ASO meter supported, update ASO flow meter by wqe. */
 	if (priv->sh->meter_aso_en) {
 		aso_mtr = container_of(fm, struct mlx5_aso_mtr, fm);
+		aso_mtr->state = ASO_METER_WAIT;
 		ret = mlx5_aso_meter_update_by_wqe(priv->sh, MLX5_HW_INV_QUEUE,
 						   aso_mtr, &priv->mtr_bulk, NULL, true);
 		if (ret)
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.119033707 +0000
+++ 0013-net-mlx5-fix-SWS-meter-state-initialization.patch	2024-11-12 22:06:58.655307014 +0000
@@ -1 +1 @@
-From 0c37d8f7ba2cac289896de024d9c58a65ba3ece9 Mon Sep 17 00:00:00 2001
+From 602cc6b95d5aa91bfc977f0fabbb81d9899f7361 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0c37d8f7ba2cac289896de024d9c58a65ba3ece9 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 98a61cbdd4..233b140785 100644
+index 1078d6497d..0ffe738ec5 100644
@@ -27,2 +28,2 @@
-@@ -1914,6 +1914,7 @@ mlx5_flow_meter_action_modify(struct mlx5_priv *priv,
- 	if (sh->meter_aso_en) {
+@@ -1636,6 +1636,7 @@ mlx5_flow_meter_action_modify(struct mlx5_priv *priv,
+ 	if (priv->sh->meter_aso_en) {
@@ -32,4 +33,4 @@
- 		ret = mlx5_aso_meter_update_by_wqe(priv, MLX5_HW_INV_QUEUE,
- 						   aso_mtr, &priv->mtr_bulk,
- 						   NULL, true);
-@@ -2165,6 +2166,7 @@ mlx5_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
+ 		ret = mlx5_aso_meter_update_by_wqe(priv->sh, MLX5_HW_INV_QUEUE,
+ 						   aso_mtr, &priv->mtr_bulk, NULL, true);
+ 		if (ret)
+@@ -1886,6 +1887,7 @@ mlx5_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
@@ -40 +41 @@
- 		ret = mlx5_aso_meter_update_by_wqe(priv, MLX5_HW_INV_QUEUE,
+ 		ret = mlx5_aso_meter_update_by_wqe(priv->sh, MLX5_HW_INV_QUEUE,

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

* patch 'net/mlx5: fix reported Rx/Tx descriptor limits' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (11 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/mlx5: fix SWS meter state initialization' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'app/dumpcap: remove unused struct array' " luca.boccassi
                       ` (25 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Igor Gutorov; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 93dc1a00f680ab6256721fc88c294c1af82b9938 Mon Sep 17 00:00:00 2001
From: Igor Gutorov <igootorov@gmail.com>
Date: Wed, 7 Aug 2024 23:44:05 +0300
Subject: [PATCH] net/mlx5: fix reported Rx/Tx descriptor limits

[ upstream commit 4c3d7961d9002bb715a8ee76bcf464d633316d4c ]

Currently, `rte_eth_dev_info.rx_desc_lim.nb_max` as well as
`rte_eth_dev_info.tx_desc_lim.nb_max` shows 65535 as the limit,
which results in a few problems:

* It is not the actual Rx/Tx queue limit
* Allocating an Rx queue and passing `rx_desc_lim.nb_max` results in an
  integer overflow and 0 ring size:

```
rte_eth_rx_queue_setup(0, 0, rx_desc_lim.nb_max, 0, NULL, mb_pool);
```

Which overflows ring size and generates the following log:
```
mlx5_net: port 0 increased number of descriptors in Rx queue 0 to the
next power of two (0)
```
The same holds for allocating a Tx queue.

Fixes: e60fbd5b24fc ("mlx5: add device configure/start/stop")

Signed-off-by: Igor Gutorov <igootorov@gmail.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 1 +
 drivers/common/mlx5/mlx5_devx_cmds.h | 1 +
 drivers/net/mlx5/mlx5_ethdev.c       | 4 ++++
 drivers/net/mlx5/mlx5_rxq.c          | 8 ++++++++
 drivers/net/mlx5/mlx5_txq.c          | 8 ++++++++
 5 files changed, 22 insertions(+)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 9a0fc3501d..6740bb5222 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -953,6 +953,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 	attr->log_max_qp = MLX5_GET(cmd_hca_cap, hcattr, log_max_qp);
 	attr->log_max_cq_sz = MLX5_GET(cmd_hca_cap, hcattr, log_max_cq_sz);
 	attr->log_max_qp_sz = MLX5_GET(cmd_hca_cap, hcattr, log_max_qp_sz);
+	attr->log_max_wq_sz = MLX5_GET(cmd_hca_cap, hcattr, log_max_wq_sz);
 	attr->log_max_mrw_sz = MLX5_GET(cmd_hca_cap, hcattr, log_max_mrw_sz);
 	attr->log_max_pd = MLX5_GET(cmd_hca_cap, hcattr, log_max_pd);
 	attr->log_max_srq = MLX5_GET(cmd_hca_cap, hcattr, log_max_srq);
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index c94b9eac06..49356aec37 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -245,6 +245,7 @@ struct mlx5_hca_attr {
 	struct mlx5_hca_vdpa_attr vdpa;
 	struct mlx5_hca_flow_attr flow;
 	struct mlx5_hca_flex_attr flex;
+	uint8_t log_max_wq_sz;
 	int log_max_qp_sz;
 	int log_max_cq_sz;
 	int log_max_qp;
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index df7cd241a2..08c6b18975 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -351,6 +351,10 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 	info->flow_type_rss_offloads = ~MLX5_RSS_HF_MASK;
 	mlx5_set_default_params(dev, info);
 	mlx5_set_txlimit_params(dev, info);
+	info->rx_desc_lim.nb_max =
+		1 << priv->sh->cdev->config.hca_attr.log_max_wq_sz;
+	info->tx_desc_lim.nb_max =
+		1 << priv->sh->cdev->config.hca_attr.log_max_wq_sz;
 	if (priv->sh->cdev->config.hca_attr.mem_rq_rmp &&
 	    priv->obj_ops.rxq_obj_new == devx_obj_ops.rxq_obj_new)
 		info->dev_capa |= RTE_ETH_DEV_CAPA_RXQ_SHARE;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 2f5c705660..98a670fae8 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -652,6 +652,14 @@ mlx5_rx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc,
 	struct mlx5_rxq_priv *rxq;
 	bool empty;
 
+	if (*desc > 1 << priv->sh->cdev->config.hca_attr.log_max_wq_sz) {
+		DRV_LOG(ERR,
+			"port %u number of descriptors requested for Rx queue"
+			" %u is more than supported",
+			dev->data->port_id, idx);
+		rte_errno = EINVAL;
+		return -EINVAL;
+	}
 	if (!rte_is_power_of_2(*desc)) {
 		*desc = 1 << log2above(*desc);
 		DRV_LOG(WARNING,
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 46badcd0cc..cdc9755fe0 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -332,6 +332,14 @@ mlx5_tx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 
+	if (*desc > 1 << priv->sh->cdev->config.hca_attr.log_max_wq_sz) {
+		DRV_LOG(ERR,
+			"port %u number of descriptors requested for Tx queue"
+			" %u is more than supported",
+			dev->data->port_id, idx);
+		rte_errno = EINVAL;
+		return -EINVAL;
+	}
 	if (*desc <= MLX5_TX_COMP_THRESH) {
 		DRV_LOG(WARNING,
 			"port %u number of descriptors requested for Tx queue"
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.149114292 +0000
+++ 0014-net-mlx5-fix-reported-Rx-Tx-descriptor-limits.patch	2024-11-12 22:06:58.659307077 +0000
@@ -1 +1 @@
-From 4c3d7961d9002bb715a8ee76bcf464d633316d4c Mon Sep 17 00:00:00 2001
+From 93dc1a00f680ab6256721fc88c294c1af82b9938 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4c3d7961d9002bb715a8ee76bcf464d633316d4c ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -39 +40 @@
-index 9710dcedd3..a75f011750 100644
+index 9a0fc3501d..6740bb5222 100644
@@ -42 +43 @@
-@@ -1027,6 +1027,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
+@@ -953,6 +953,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
@@ -51 +52 @@
-index 6cf7999c46..2ad9e5414f 100644
+index c94b9eac06..49356aec37 100644
@@ -54 +55,2 @@
-@@ -267,6 +267,7 @@ struct mlx5_hca_attr {
+@@ -245,6 +245,7 @@ struct mlx5_hca_attr {
+ 	struct mlx5_hca_vdpa_attr vdpa;
@@ -57 +58,0 @@
- 	struct mlx5_hca_crypto_mmo_attr crypto_mmo;
@@ -63 +64 @@
-index 6f24d649e0..7708a0b808 100644
+index df7cd241a2..08c6b18975 100644
@@ -66 +67 @@
-@@ -359,6 +359,10 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
+@@ -351,6 +351,10 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
@@ -78 +79 @@
-index c6655b7db4..5eac224b76 100644
+index 2f5c705660..98a670fae8 100644
@@ -81 +82 @@
-@@ -655,6 +655,14 @@ mlx5_rx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc,
+@@ -652,6 +652,14 @@ mlx5_rx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc,
@@ -97 +98 @@
-index f05534e168..3e93517323 100644
+index 46badcd0cc..cdc9755fe0 100644
@@ -100 +101 @@
-@@ -333,6 +333,14 @@ mlx5_tx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc)
+@@ -332,6 +332,14 @@ mlx5_tx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc)

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

* patch 'app/dumpcap: remove unused struct array' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (12 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/mlx5: fix reported Rx/Tx descriptor limits' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'bus/fslmc: fix Coverity warnings in QBMAN' " luca.boccassi
                       ` (24 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/381787b7df76e0f15992219ed2519fc67e58f95a

Thanks.

Luca Boccassi

---
From 381787b7df76e0f15992219ed2519fc67e58f95a Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 5 Nov 2024 11:27:21 +0000
Subject: [PATCH] app/dumpcap: remove unused struct array

[ upstream commit 9bbd44d63846cf0771ec0f1c7e1b5a63ec5e9603 ]

The callbacks(rx_cb) member of struct interface was unused inside
dumpcap, but was taking up a lot of memory space, since it was scaled
according to RTE_MAX_QUEUES_PER_PORT, which is 1k by default. Save
memory by removing the whole array.

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

Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/dumpcap/main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 7e8aa5d76e..0b6432ad4d 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -83,8 +83,6 @@ struct interface {
 	TAILQ_ENTRY(interface) next;
 	uint16_t port;
 	char name[RTE_ETH_NAME_MAX_LEN];
-
-	struct rte_rxtx_callback *rx_cb[RTE_MAX_QUEUES_PER_PORT];
 };
 
 TAILQ_HEAD(interface_list, interface);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.181291544 +0000
+++ 0015-app-dumpcap-remove-unused-struct-array.patch	2024-11-12 22:06:58.659307077 +0000
@@ -1 +1 @@
-From 9bbd44d63846cf0771ec0f1c7e1b5a63ec5e9603 Mon Sep 17 00:00:00 2001
+From 381787b7df76e0f15992219ed2519fc67e58f95a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9bbd44d63846cf0771ec0f1c7e1b5a63ec5e9603 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- app/dumpcap/main.c | 1 -
- 1 file changed, 1 deletion(-)
+ app/dumpcap/main.c | 2 --
+ 1 file changed, 2 deletions(-)
@@ -22 +23 @@
-index 4031f48441..3d3c0dbc66 100644
+index 7e8aa5d76e..0b6432ad4d 100644
@@ -25,2 +26,3 @@
-@@ -96,7 +96,6 @@ struct interface {
- 	struct rte_bpf_prm *bpf_prm;
+@@ -83,8 +83,6 @@ struct interface {
+ 	TAILQ_ENTRY(interface) next;
+ 	uint16_t port;
@@ -28 +30 @@
- 
+-
@@ -30,2 +31,0 @@
- 	const char *ifname;
- 	const char *ifdescr;
@@ -32,0 +33,2 @@
+ 
+ TAILQ_HEAD(interface_list, interface);

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

* patch 'bus/fslmc: fix Coverity warnings in QBMAN' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (13 preceding siblings ...)
  2024-11-12 22:07     ` patch 'app/dumpcap: remove unused struct array' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/dpaa2: fix memory corruption in TM' " luca.boccassi
                       ` (23 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Rohit Raj; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From ef19017fc47d1d88d7c4a7354129e52564e3b935 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Wed, 23 Oct 2024 17:29:32 +0530
Subject: [PATCH] bus/fslmc: fix Coverity warnings in QBMAN

[ upstream commit 051f4185f98faa964b6a965b2e8e7b2da68969de ]

Fix Issues reported by NXP Internal Coverity.

Fixes: 64f131a82fbe ("bus/fslmc: add qbman debug")

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/qbman/qbman_debug.c | 49 +++++++++++++++++----------
 1 file changed, 32 insertions(+), 17 deletions(-)

diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c
index eea06988ff..0e471ec3fd 100644
--- a/drivers/bus/fslmc/qbman/qbman_debug.c
+++ b/drivers/bus/fslmc/qbman/qbman_debug.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright (C) 2015 Freescale Semiconductor, Inc.
- * Copyright 2018-2020 NXP
+ * Copyright 2018-2020,2022 NXP
  */
 
 #include "compat.h"
@@ -37,6 +37,7 @@ int qbman_bp_query(struct qbman_swp *s, uint32_t bpid,
 		   struct qbman_bp_query_rslt *r)
 {
 	struct qbman_bp_query_desc *p;
+	struct qbman_bp_query_rslt *bp_query_rslt;
 
 	/* Start the management command */
 	p = (struct qbman_bp_query_desc *)qbman_swp_mc_start(s);
@@ -47,14 +48,16 @@ int qbman_bp_query(struct qbman_swp *s, uint32_t bpid,
 	p->bpid = bpid;
 
 	/* Complete the management command */
-	*r = *(struct qbman_bp_query_rslt *)qbman_swp_mc_complete(s, p,
-						 QBMAN_BP_QUERY);
-	if (!r) {
+	bp_query_rslt = (struct qbman_bp_query_rslt *)qbman_swp_mc_complete(s,
+						p, QBMAN_BP_QUERY);
+	if (!bp_query_rslt) {
 		pr_err("qbman: Query BPID %d failed, no response\n",
 			bpid);
 		return -EIO;
 	}
 
+	*r = *bp_query_rslt;
+
 	/* Decode the outcome */
 	QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_BP_QUERY);
 
@@ -202,20 +205,23 @@ int qbman_fq_query(struct qbman_swp *s, uint32_t fqid,
 		   struct qbman_fq_query_rslt *r)
 {
 	struct qbman_fq_query_desc *p;
+	struct qbman_fq_query_rslt *fq_query_rslt;
 
 	p = (struct qbman_fq_query_desc *)qbman_swp_mc_start(s);
 	if (!p)
 		return -EBUSY;
 
 	p->fqid = fqid;
-	*r = *(struct qbman_fq_query_rslt *)qbman_swp_mc_complete(s, p,
-					  QBMAN_FQ_QUERY);
-	if (!r) {
+	fq_query_rslt = (struct qbman_fq_query_rslt *)qbman_swp_mc_complete(s,
+					p, QBMAN_FQ_QUERY);
+	if (!fq_query_rslt) {
 		pr_err("qbman: Query FQID %d failed, no response\n",
 			fqid);
 		return -EIO;
 	}
 
+	*r = *fq_query_rslt;
+
 	/* Decode the outcome */
 	QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_FQ_QUERY);
 
@@ -398,20 +404,23 @@ int qbman_cgr_query(struct qbman_swp *s, uint32_t cgid,
 		    struct qbman_cgr_query_rslt *r)
 {
 	struct qbman_cgr_query_desc *p;
+	struct qbman_cgr_query_rslt *cgr_query_rslt;
 
 	p = (struct qbman_cgr_query_desc *)qbman_swp_mc_start(s);
 	if (!p)
 		return -EBUSY;
 
 	p->cgid = cgid;
-	*r = *(struct qbman_cgr_query_rslt *)qbman_swp_mc_complete(s, p,
-							QBMAN_CGR_QUERY);
-	if (!r) {
+	cgr_query_rslt = (struct qbman_cgr_query_rslt *)qbman_swp_mc_complete(s,
+					p, QBMAN_CGR_QUERY);
+	if (!cgr_query_rslt) {
 		pr_err("qbman: Query CGID %d failed, no response\n",
 			cgid);
 		return -EIO;
 	}
 
+	*r = *cgr_query_rslt;
+
 	/* Decode the outcome */
 	QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_CGR_QUERY);
 
@@ -473,20 +482,23 @@ int qbman_cgr_wred_query(struct qbman_swp *s, uint32_t cgid,
 			struct qbman_wred_query_rslt *r)
 {
 	struct qbman_cgr_query_desc *p;
+	struct qbman_wred_query_rslt *wred_query_rslt;
 
 	p = (struct qbman_cgr_query_desc *)qbman_swp_mc_start(s);
 	if (!p)
 		return -EBUSY;
 
 	p->cgid = cgid;
-	*r = *(struct qbman_wred_query_rslt *)qbman_swp_mc_complete(s, p,
-							QBMAN_WRED_QUERY);
-	if (!r) {
+	wred_query_rslt = (struct qbman_wred_query_rslt *)qbman_swp_mc_complete(
+					s, p, QBMAN_WRED_QUERY);
+	if (!wred_query_rslt) {
 		pr_err("qbman: Query CGID WRED %d failed, no response\n",
 			cgid);
 		return -EIO;
 	}
 
+	*r = *wred_query_rslt;
+
 	/* Decode the outcome */
 	QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_WRED_QUERY);
 
@@ -527,7 +539,7 @@ void qbman_cgr_attr_wred_dp_decompose(uint32_t dp, uint64_t *minth,
 	if (mn == 0)
 		*maxth = ma;
 	else
-		*maxth = ((ma+256) * (1<<(mn-1)));
+		*maxth = ((uint64_t)(ma+256) * (1<<(mn-1)));
 
 	if (step_s == 0)
 		*minth = *maxth - step_i;
@@ -630,6 +642,7 @@ int qbman_wqchan_query(struct qbman_swp *s, uint16_t chanid,
 		       struct qbman_wqchan_query_rslt *r)
 {
 	struct qbman_wqchan_query_desc *p;
+	struct qbman_wqchan_query_rslt *wqchan_query_rslt;
 
 	/* Start the management command */
 	p = (struct qbman_wqchan_query_desc *)qbman_swp_mc_start(s);
@@ -640,14 +653,16 @@ int qbman_wqchan_query(struct qbman_swp *s, uint16_t chanid,
 	p->chid = chanid;
 
 	/* Complete the management command */
-	*r = *(struct qbman_wqchan_query_rslt *)qbman_swp_mc_complete(s, p,
-							QBMAN_WQ_QUERY);
-	if (!r) {
+	wqchan_query_rslt = (struct qbman_wqchan_query_rslt *)qbman_swp_mc_complete(
+						s, p, QBMAN_WQ_QUERY);
+	if (!wqchan_query_rslt) {
 		pr_err("qbman: Query WQ Channel %d failed, no response\n",
 			chanid);
 		return -EIO;
 	}
 
+	*r = *wqchan_query_rslt;
+
 	/* Decode the outcome */
 	QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_WQ_QUERY);
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.209008178 +0000
+++ 0016-bus-fslmc-fix-Coverity-warnings-in-QBMAN.patch	2024-11-12 22:06:58.659307077 +0000
@@ -1 +1 @@
-From 051f4185f98faa964b6a965b2e8e7b2da68969de Mon Sep 17 00:00:00 2001
+From ef19017fc47d1d88d7c4a7354129e52564e3b935 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 051f4185f98faa964b6a965b2e8e7b2da68969de ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/dpaa2: fix memory corruption in TM' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (14 preceding siblings ...)
  2024-11-12 22:07     ` patch 'bus/fslmc: fix Coverity warnings in QBMAN' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'examples/l3fwd: fix read beyond boundaries' " luca.boccassi
                       ` (22 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6d54a1e341c5b271c7b44c91c44384d88ab4dd68

Thanks.

Luca Boccassi

---
From 6d54a1e341c5b271c7b44c91c44384d88ab4dd68 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 23 Oct 2024 17:29:47 +0530
Subject: [PATCH] net/dpaa2: fix memory corruption in TM

[ upstream commit d77cb0c44cf6b68dc71684bd302fd3138b36e5f1 ]

driver was reserving memory in an array for 8 queues only,
but it can support many more queues configuration.

This patch fixes the memory corruption issue by defining the
queue array with correct size.

Fixes: 72100f0dee21 ("net/dpaa2: support level 2 in traffic management")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_tm.c | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_tm.c b/drivers/net/dpaa2/dpaa2_tm.c
index 8fe5bfa013..0633259624 100644
--- a/drivers/net/dpaa2/dpaa2_tm.c
+++ b/drivers/net/dpaa2/dpaa2_tm.c
@@ -684,6 +684,7 @@ dpaa2_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
 	struct dpaa2_tm_node *leaf_node, *temp_leaf_node, *channel_node;
 	struct fsl_mc_io *dpni = (struct fsl_mc_io *)dev->process_private;
 	int ret, t;
+	bool conf_schedule = false;
 
 	/* Populate TCs */
 	LIST_FOREACH(channel_node, &priv->nodes, next) {
@@ -757,7 +758,7 @@ dpaa2_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
 	}
 
 	LIST_FOREACH(channel_node, &priv->nodes, next) {
-		int wfq_grp = 0, is_wfq_grp = 0, conf[DPNI_MAX_TC];
+		int wfq_grp = 0, is_wfq_grp = 0, conf[priv->nb_tx_queues];
 		struct dpni_tx_priorities_cfg prio_cfg;
 
 		memset(&prio_cfg, 0, sizeof(prio_cfg));
@@ -767,6 +768,7 @@ dpaa2_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
 		if (channel_node->level_id != CHANNEL_LEVEL)
 			continue;
 
+		conf_schedule = false;
 		LIST_FOREACH(leaf_node, &priv->nodes, next) {
 			struct dpaa2_queue *leaf_dpaa2_q;
 			uint8_t leaf_tc_id;
@@ -789,6 +791,7 @@ dpaa2_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
 			if (leaf_node->parent != channel_node)
 				continue;
 
+			conf_schedule = true;
 			leaf_dpaa2_q =  (struct dpaa2_queue *)dev->data->tx_queues[leaf_node->id];
 			leaf_tc_id = leaf_dpaa2_q->tc_index;
 			/* Process sibling leaf nodes */
@@ -829,8 +832,8 @@ dpaa2_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
 						goto out;
 					}
 					is_wfq_grp = 1;
-					conf[temp_leaf_node->id] = 1;
 				}
+				conf[temp_leaf_node->id] = 1;
 			}
 			if (is_wfq_grp) {
 				if (wfq_grp == 0) {
@@ -851,6 +854,9 @@ dpaa2_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
 			}
 			conf[leaf_node->id] = 1;
 		}
+		if (!conf_schedule)
+			continue;
+
 		if (wfq_grp > 1) {
 			prio_cfg.separate_groups = 1;
 			if (prio_cfg.prio_group_B < prio_cfg.prio_group_A) {
@@ -864,6 +870,16 @@ dpaa2_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
 
 		prio_cfg.prio_group_A = 1;
 		prio_cfg.channel_idx = channel_node->channel_id;
+		DPAA2_PMD_DEBUG("########################################\n");
+		DPAA2_PMD_DEBUG("Channel idx = %d\n", prio_cfg.channel_idx);
+		for (t = 0; t < DPNI_MAX_TC; t++)
+			DPAA2_PMD_DEBUG("tc = %d mode = %d, delta = %d\n", t,
+					prio_cfg.tc_sched[t].mode,
+					prio_cfg.tc_sched[t].delta_bandwidth);
+
+		DPAA2_PMD_DEBUG("prioritya = %d, priorityb = %d, separate grps"
+				" = %d\n", prio_cfg.prio_group_A,
+				prio_cfg.prio_group_B, prio_cfg.separate_groups);
 		ret = dpni_set_tx_priorities(dpni, 0, priv->token, &prio_cfg);
 		if (ret) {
 			ret = -rte_tm_error_set(error, EINVAL,
@@ -871,15 +887,6 @@ dpaa2_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
 					"Scheduling Failed\n");
 			goto out;
 		}
-		DPAA2_PMD_DEBUG("########################################\n");
-		DPAA2_PMD_DEBUG("Channel idx = %d\n", prio_cfg.channel_idx);
-		for (t = 0; t < DPNI_MAX_TC; t++) {
-			DPAA2_PMD_DEBUG("tc = %d mode = %d ", t, prio_cfg.tc_sched[t].mode);
-			DPAA2_PMD_DEBUG("delta = %d\n", prio_cfg.tc_sched[t].delta_bandwidth);
-		}
-		DPAA2_PMD_DEBUG("prioritya = %d\n", prio_cfg.prio_group_A);
-		DPAA2_PMD_DEBUG("priorityb = %d\n", prio_cfg.prio_group_B);
-		DPAA2_PMD_DEBUG("separate grps = %d\n\n", prio_cfg.separate_groups);
 	}
 	return 0;
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.236237019 +0000
+++ 0017-net-dpaa2-fix-memory-corruption-in-TM.patch	2024-11-12 22:06:58.659307077 +0000
@@ -1 +1 @@
-From d77cb0c44cf6b68dc71684bd302fd3138b36e5f1 Mon Sep 17 00:00:00 2001
+From 6d54a1e341c5b271c7b44c91c44384d88ab4dd68 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d77cb0c44cf6b68dc71684bd302fd3138b36e5f1 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index fb8c384ca4..ab3e355853 100644
+index 8fe5bfa013..0633259624 100644
@@ -82,2 +83,2 @@
-+		DPAA2_PMD_DEBUG("########################################");
-+		DPAA2_PMD_DEBUG("Channel idx = %d", prio_cfg.channel_idx);
++		DPAA2_PMD_DEBUG("########################################\n");
++		DPAA2_PMD_DEBUG("Channel idx = %d\n", prio_cfg.channel_idx);
@@ -85 +86 @@
-+			DPAA2_PMD_DEBUG("tc = %d mode = %d, delta = %d", t,
++			DPAA2_PMD_DEBUG("tc = %d mode = %d, delta = %d\n", t,
@@ -90 +91 @@
-+				" = %d", prio_cfg.prio_group_A,
++				" = %d\n", prio_cfg.prio_group_A,
@@ -99,2 +100,2 @@
--		DPAA2_PMD_DEBUG("########################################");
--		DPAA2_PMD_DEBUG("Channel idx = %d", prio_cfg.channel_idx);
+-		DPAA2_PMD_DEBUG("########################################\n");
+-		DPAA2_PMD_DEBUG("Channel idx = %d\n", prio_cfg.channel_idx);
@@ -103 +104 @@
--			DPAA2_PMD_DEBUG("delta = %d", prio_cfg.tc_sched[t].delta_bandwidth);
+-			DPAA2_PMD_DEBUG("delta = %d\n", prio_cfg.tc_sched[t].delta_bandwidth);
@@ -105,3 +106,3 @@
--		DPAA2_PMD_DEBUG("prioritya = %d", prio_cfg.prio_group_A);
--		DPAA2_PMD_DEBUG("priorityb = %d", prio_cfg.prio_group_B);
--		DPAA2_PMD_DEBUG("separate grps = %d", prio_cfg.separate_groups);
+-		DPAA2_PMD_DEBUG("prioritya = %d\n", prio_cfg.prio_group_A);
+-		DPAA2_PMD_DEBUG("priorityb = %d\n", prio_cfg.prio_group_B);
+-		DPAA2_PMD_DEBUG("separate grps = %d\n\n", prio_cfg.separate_groups);

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

* patch 'examples/l3fwd: fix read beyond boundaries' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (15 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/dpaa2: fix memory corruption in TM' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'test/bonding: remove redundant info query' " luca.boccassi
                       ` (21 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From b619762f12ab145b2b9fd2225bcab82615bc4387 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Thu, 7 Nov 2024 13:50:51 -0500
Subject: [PATCH] examples/l3fwd: fix read beyond boundaries

[ upstream commit ebab0e8b2257aa049dd35dedc7efd230b0f45b88 ]

ASAN report:
ERROR: AddressSanitizer: unknown-crash on address 0x7ffffef92e32 at pc 0x00000053d1e9 bp 0x7ffffef92c00 sp 0x7ffffef92bf8
READ of size 16 at 0x7ffffef92e32 thread T0
    #0 0x53d1e8 in _mm_loadu_si128 /usr/lib64/gcc/x86_64-suse-linux/11/include/emmintrin.h:703
    #1 0x53d1e8 in send_packets_multi ../examples/l3fwd/l3fwd_sse.h:125
    #2 0x53d1e8 in acl_send_packets ../examples/l3fwd/l3fwd_acl.c:1048
    #3 0x53ec18 in acl_main_loop ../examples/l3fwd/l3fwd_acl.c:1127
    #4 0x12151eb in rte_eal_mp_remote_launch ../lib/eal/common/eal_common_launch.c:83
    #5 0x5bf2df in main ../examples/l3fwd/main.c:1647
    #6 0x7f6d42a0d2bc in __libc_start_main (/lib64/libc.so.6+0x352bc)
    #7 0x527499 in _start (/home/kananyev/dpdk-l3fwd-acl/x86_64-native-linuxapp-gcc-dbg-b1/examples/dpdk-l3fwd+0x527499)

Reason for that is that send_packets_multi() uses 16B loads to access
input dst_port[]and might read beyond array boundaries.
Right now, it doesn't cause any real issue - junk values are ignored, also
inside l3fwd we always allocate dst_port[] array on the stack, so
memory beyond it is always available.
Anyway, it probably need to be fixed.
The patch below simply allocates extra space for dst_port[], so
send_packets_multi() will never read beyond its boundaries.

Probably a better fix would be to change send_packets_multi()
itself to avoid access beyond 'nb_rx' entries.

Bugzilla ID: 1502
Fixes: 94c54b4158d5 ("examples/l3fwd: rework exact-match")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 .mailmap                             | 2 +-
 examples/l3fwd/l3fwd_altivec.h       | 6 +++++-
 examples/l3fwd/l3fwd_common.h        | 7 +++++++
 examples/l3fwd/l3fwd_em_hlm.h        | 2 +-
 examples/l3fwd/l3fwd_em_sequential.h | 2 +-
 examples/l3fwd/l3fwd_fib.c           | 2 +-
 examples/l3fwd/l3fwd_lpm_altivec.h   | 2 +-
 examples/l3fwd/l3fwd_lpm_neon.h      | 2 +-
 examples/l3fwd/l3fwd_lpm_sse.h       | 2 +-
 examples/l3fwd/l3fwd_neon.h          | 6 +++++-
 examples/l3fwd/l3fwd_sse.h           | 6 +++++-
 11 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/.mailmap b/.mailmap
index 025bd2daba..ce3f357292 100644
--- a/.mailmap
+++ b/.mailmap
@@ -737,7 +737,7 @@ Kirill Rybalchenko <kirill.rybalchenko@intel.com>
 Kishore Padmanabha <kishore.padmanabha@broadcom.com>
 Klaus Degner <kd@allegro-packets.com>
 Kommula Shiva Shankar <kshankar@marvell.com>
-Konstantin Ananyev <konstantin.v.ananyev@yandex.ru> <konstantin.ananyev@huawei.com> <konstantin.ananyev@intel.com>
+Konstantin Ananyev <konstantin.ananyev@huawei.com> <konstantin.v.ananyev@yandex.ru> <konstantin.ananyev@intel.com>
 Krishna Murthy <krishna.j.murthy@intel.com>
 Krzysztof Galazka <krzysztof.galazka@intel.com>
 Krzysztof Kanas <kkanas@marvell.com> <krzysztof.kanas@caviumnetworks.com>
diff --git a/examples/l3fwd/l3fwd_altivec.h b/examples/l3fwd/l3fwd_altivec.h
index e45e138e59..b91a6b5587 100644
--- a/examples/l3fwd/l3fwd_altivec.h
+++ b/examples/l3fwd/l3fwd_altivec.h
@@ -11,6 +11,9 @@
 #include "altivec/port_group.h"
 #include "l3fwd_common.h"
 
+#undef SENDM_PORT_OVERHEAD
+#define SENDM_PORT_OVERHEAD(x) ((x) + 2 * FWDSTEP)
+
 /*
  * Update source and destination MAC addresses in the ethernet header.
  * Perform RFC1812 checks and updates for IPV4 packets.
@@ -117,7 +120,8 @@ process_packet(struct rte_mbuf *pkt, uint16_t *dst_port)
  */
 static __rte_always_inline void
 send_packets_multi(struct lcore_conf *qconf, struct rte_mbuf **pkts_burst,
-		uint16_t dst_port[MAX_PKT_BURST], int nb_rx)
+		uint16_t dst_port[SENDM_PORT_OVERHEAD(MAX_PKT_BURST)],
+		int nb_rx)
 {
 	int32_t k;
 	int j = 0;
diff --git a/examples/l3fwd/l3fwd_common.h b/examples/l3fwd/l3fwd_common.h
index 224b1c08e8..d94e5f1357 100644
--- a/examples/l3fwd/l3fwd_common.h
+++ b/examples/l3fwd/l3fwd_common.h
@@ -18,6 +18,13 @@
 /* Minimum value of IPV4 total length (20B) in network byte order. */
 #define	IPV4_MIN_LEN_BE	(sizeof(struct rte_ipv4_hdr) << 8)
 
+/*
+ * send_packet_multi() specific number of dest ports
+ * due to implementation we need to allocate array bigger then
+ * actual max number of elements in the array.
+ */
+#define SENDM_PORT_OVERHEAD(x) (x)
+
 /*
  * From http://www.rfc-editor.org/rfc/rfc1812.txt section 5.2.2:
  * - The IP version number must be 4.
diff --git a/examples/l3fwd/l3fwd_em_hlm.h b/examples/l3fwd/l3fwd_em_hlm.h
index 2e11eefad7..db9a212e05 100644
--- a/examples/l3fwd/l3fwd_em_hlm.h
+++ b/examples/l3fwd/l3fwd_em_hlm.h
@@ -249,7 +249,7 @@ static inline void
 l3fwd_em_send_packets(int nb_rx, struct rte_mbuf **pkts_burst, uint16_t portid,
 		      struct lcore_conf *qconf)
 {
-	uint16_t dst_port[MAX_PKT_BURST];
+	uint16_t dst_port[SENDM_PORT_OVERHEAD(MAX_PKT_BURST)];
 
 	l3fwd_em_process_packets(nb_rx, pkts_burst, dst_port, portid, qconf, 0);
 	send_packets_multi(qconf, pkts_burst, dst_port, nb_rx);
diff --git a/examples/l3fwd/l3fwd_em_sequential.h b/examples/l3fwd/l3fwd_em_sequential.h
index 067f23889a..3a40b2e434 100644
--- a/examples/l3fwd/l3fwd_em_sequential.h
+++ b/examples/l3fwd/l3fwd_em_sequential.h
@@ -79,7 +79,7 @@ l3fwd_em_send_packets(int nb_rx, struct rte_mbuf **pkts_burst,
 			uint16_t portid, struct lcore_conf *qconf)
 {
 	int32_t i, j;
-	uint16_t dst_port[MAX_PKT_BURST];
+	uint16_t dst_port[SENDM_PORT_OVERHEAD(MAX_PKT_BURST)];
 
 	if (nb_rx > 0) {
 		rte_prefetch0(rte_pktmbuf_mtod(pkts_burst[0],
diff --git a/examples/l3fwd/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c
index 10fa121942..5e398f8ce2 100644
--- a/examples/l3fwd/l3fwd_fib.c
+++ b/examples/l3fwd/l3fwd_fib.c
@@ -121,7 +121,7 @@ fib_send_packets(int nb_rx, struct rte_mbuf **pkts_burst,
 {
 	uint32_t ipv4_arr[nb_rx];
 	uint8_t ipv6_arr[nb_rx][RTE_FIB6_IPV6_ADDR_SIZE];
-	uint16_t hops[nb_rx];
+	uint16_t hops[SENDM_PORT_OVERHEAD(nb_rx)];
 	uint64_t hopsv4[nb_rx], hopsv6[nb_rx];
 	uint8_t type_arr[nb_rx];
 	uint32_t ipv4_cnt = 0, ipv6_cnt = 0;
diff --git a/examples/l3fwd/l3fwd_lpm_altivec.h b/examples/l3fwd/l3fwd_lpm_altivec.h
index adb82f1478..91aad5c313 100644
--- a/examples/l3fwd/l3fwd_lpm_altivec.h
+++ b/examples/l3fwd/l3fwd_lpm_altivec.h
@@ -145,7 +145,7 @@ static inline void
 l3fwd_lpm_send_packets(int nb_rx, struct rte_mbuf **pkts_burst, uint8_t portid,
 		       struct lcore_conf *qconf)
 {
-	uint16_t dst_port[MAX_PKT_BURST];
+	uint16_t dst_port[SENDM_PORT_OVERHEAD(MAX_PKT_BURST)];
 
 	l3fwd_lpm_process_packets(nb_rx, pkts_burst, portid, dst_port, qconf,
 				  0);
diff --git a/examples/l3fwd/l3fwd_lpm_neon.h b/examples/l3fwd/l3fwd_lpm_neon.h
index 2a68c4c15e..3c1f827424 100644
--- a/examples/l3fwd/l3fwd_lpm_neon.h
+++ b/examples/l3fwd/l3fwd_lpm_neon.h
@@ -171,7 +171,7 @@ static inline void
 l3fwd_lpm_send_packets(int nb_rx, struct rte_mbuf **pkts_burst, uint16_t portid,
 		       struct lcore_conf *qconf)
 {
-	uint16_t dst_port[MAX_PKT_BURST];
+	uint16_t dst_port[SENDM_PORT_OVERHEAD(MAX_PKT_BURST)];
 
 	l3fwd_lpm_process_packets(nb_rx, pkts_burst, portid, dst_port, qconf,
 				  0);
diff --git a/examples/l3fwd/l3fwd_lpm_sse.h b/examples/l3fwd/l3fwd_lpm_sse.h
index db15030320..50f1abbd8a 100644
--- a/examples/l3fwd/l3fwd_lpm_sse.h
+++ b/examples/l3fwd/l3fwd_lpm_sse.h
@@ -129,7 +129,7 @@ static inline void
 l3fwd_lpm_send_packets(int nb_rx, struct rte_mbuf **pkts_burst, uint16_t portid,
 		       struct lcore_conf *qconf)
 {
-	uint16_t dst_port[MAX_PKT_BURST];
+	uint16_t dst_port[SENDM_PORT_OVERHEAD(MAX_PKT_BURST)];
 
 	l3fwd_lpm_process_packets(nb_rx, pkts_burst, portid, dst_port, qconf,
 				  0);
diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h
index 40807d5965..bc2bab8265 100644
--- a/examples/l3fwd/l3fwd_neon.h
+++ b/examples/l3fwd/l3fwd_neon.h
@@ -10,6 +10,9 @@
 #include "neon/port_group.h"
 #include "l3fwd_common.h"
 
+#undef SENDM_PORT_OVERHEAD
+#define SENDM_PORT_OVERHEAD(x) ((x) + 2 * FWDSTEP)
+
 /*
  * Update source and destination MAC addresses in the ethernet header.
  * Perform RFC1812 checks and updates for IPV4 packets.
@@ -92,7 +95,8 @@ process_packet(struct rte_mbuf *pkt, uint16_t *dst_port)
  */
 static __rte_always_inline void
 send_packets_multi(struct lcore_conf *qconf, struct rte_mbuf **pkts_burst,
-		uint16_t dst_port[MAX_PKT_BURST], int nb_rx)
+		uint16_t dst_port[SENDM_PORT_OVERHEAD(MAX_PKT_BURST)],
+		int nb_rx)
 {
 	int32_t k;
 	int j = 0;
diff --git a/examples/l3fwd/l3fwd_sse.h b/examples/l3fwd/l3fwd_sse.h
index 083729cdef..6236b7873c 100644
--- a/examples/l3fwd/l3fwd_sse.h
+++ b/examples/l3fwd/l3fwd_sse.h
@@ -10,6 +10,9 @@
 #include "sse/port_group.h"
 #include "l3fwd_common.h"
 
+#undef SENDM_PORT_OVERHEAD
+#define SENDM_PORT_OVERHEAD(x) ((x) + 2 * FWDSTEP)
+
 /*
  * Update source and destination MAC addresses in the ethernet header.
  * Perform RFC1812 checks and updates for IPV4 packets.
@@ -91,7 +94,8 @@ process_packet(struct rte_mbuf *pkt, uint16_t *dst_port)
  */
 static __rte_always_inline void
 send_packets_multi(struct lcore_conf *qconf, struct rte_mbuf **pkts_burst,
-		uint16_t dst_port[MAX_PKT_BURST], int nb_rx)
+		uint16_t dst_port[SENDM_PORT_OVERHEAD(MAX_PKT_BURST)],
+		int nb_rx)
 {
 	int32_t k;
 	int j = 0;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.265082048 +0000
+++ 0018-examples-l3fwd-fix-read-beyond-boundaries.patch	2024-11-12 22:06:58.663307139 +0000
@@ -1 +1 @@
-From ebab0e8b2257aa049dd35dedc7efd230b0f45b88 Mon Sep 17 00:00:00 2001
+From b619762f12ab145b2b9fd2225bcab82615bc4387 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ebab0e8b2257aa049dd35dedc7efd230b0f45b88 ]
+
@@ -32 +33,0 @@
-Cc: stable@dpdk.org
@@ -38 +38,0 @@
- examples/l3fwd/l3fwd_acl.c           | 2 +-
@@ -49 +49 @@
- 12 files changed, 30 insertions(+), 11 deletions(-)
+ 11 files changed, 29 insertions(+), 10 deletions(-)
@@ -52 +52 @@
-index 4894219f2f..4eef08df30 100644
+index 025bd2daba..ce3f357292 100644
@@ -55 +55 @@
-@@ -804,7 +804,7 @@ Kirill Rybalchenko <kirill.rybalchenko@intel.com>
+@@ -737,7 +737,7 @@ Kirill Rybalchenko <kirill.rybalchenko@intel.com>
@@ -64,13 +63,0 @@
-diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c
-index b635011ef7..baa01e6dde 100644
---- a/examples/l3fwd/l3fwd_acl.c
-+++ b/examples/l3fwd/l3fwd_acl.c
-@@ -1056,7 +1056,7 @@ int
- acl_main_loop(__rte_unused void *dummy)
- {
- 	struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
--	uint16_t hops[MAX_PKT_BURST];
-+	uint16_t hops[SENDM_PORT_OVERHEAD(MAX_PKT_BURST)];
- 	unsigned int lcore_id;
- 	uint64_t prev_tsc, diff_tsc, cur_tsc;
- 	int i, nb_rx;
@@ -120 +107 @@
-index 31cda9ddc1..c1d819997a 100644
+index 2e11eefad7..db9a212e05 100644
@@ -146 +133 @@
-index a0eef05a5d..e1eb8c61c8 100644
+index 10fa121942..5e398f8ce2 100644
@@ -152 +139 @@
- 	struct rte_ipv6_addr ipv6_arr[nb_rx];
+ 	uint8_t ipv6_arr[nb_rx][RTE_FIB6_IPV6_ADDR_SIZE];

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

* patch 'test/bonding: remove redundant info query' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (16 preceding siblings ...)
  2024-11-12 22:07     ` patch 'examples/l3fwd: fix read beyond boundaries' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'examples/ntb: check info query return' " luca.boccassi
                       ` (20 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From c50cb43249186ec4faceab379bf6f98afdeec884 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 4 Oct 2024 09:21:48 -0700
Subject: [PATCH] test/bonding: remove redundant info query
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 419daaa2794ca380db2b1267c62c2d5de516b1b3 ]

The patch to check return value of rte_eth_dev_info_get
added a duplicate call in one spot.

Fixes: 773392553bed ("app: check status of getting ethdev info")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 app/test/test_link_bonding_rssconf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c
index 7aecee9117..95b2a2bda2 100644
--- a/app/test/test_link_bonding_rssconf.c
+++ b/app/test/test_link_bonding_rssconf.c
@@ -616,7 +616,6 @@ test_setup(void)
 		mac_addr.addr_bytes[5] = 0x10 + port->port_id;
 		rte_eth_dev_default_mac_addr_set(port->port_id, &mac_addr);
 
-		rte_eth_dev_info_get(port->port_id, &port->dev_info);
 		retval = rte_eth_dev_info_get(port->port_id, &port->dev_info);
 		TEST_ASSERT((retval == 0),
 				"Error during getting device (port %u) info: %s\n",
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.295074437 +0000
+++ 0019-test-bonding-remove-redundant-info-query.patch	2024-11-12 22:06:58.663307139 +0000
@@ -1 +1 @@
-From 419daaa2794ca380db2b1267c62c2d5de516b1b3 Mon Sep 17 00:00:00 2001
+From c50cb43249186ec4faceab379bf6f98afdeec884 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 419daaa2794ca380db2b1267c62c2d5de516b1b3 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 3c9c824335..2cb689b1de 100644
+index 7aecee9117..95b2a2bda2 100644

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

* patch 'examples/ntb: check info query return' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (17 preceding siblings ...)
  2024-11-12 22:07     ` patch 'test/bonding: remove redundant info query' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/netvsc: force Tx VLAN offload on 801.2Q packet' " luca.boccassi
                       ` (19 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/63797f45c51e87faaede63d647d41314b4bfe85a

Thanks.

Luca Boccassi

---
From 63797f45c51e87faaede63d647d41314b4bfe85a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 4 Oct 2024 09:21:53 -0700
Subject: [PATCH] examples/ntb: check info query return
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 07e4dc04d99a99699d71a0a39dd2a7034049e663 ]

The ethdev_info is only valid if rte_eth_dev_info_get returns success.

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 examples/ntb/ntb_fwd.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c
index 585aad9d70..5082e66c7b 100644
--- a/examples/ntb/ntb_fwd.c
+++ b/examples/ntb/ntb_fwd.c
@@ -1443,7 +1443,10 @@ main(int argc, char **argv)
 	eth_port_id = rte_eth_find_next(0);
 
 	if (eth_port_id < RTE_MAX_ETHPORTS) {
-		rte_eth_dev_info_get(eth_port_id, &ethdev_info);
+		ret = rte_eth_dev_info_get(eth_port_id, &ethdev_info);
+		if (ret)
+			rte_exit(EXIT_FAILURE, "Can't get info for port %u\n", eth_port_id);
+
 		eth_pconf.rx_adv_conf.rss_conf.rss_hf &=
 				ethdev_info.flow_type_rss_offloads;
 		ret = rte_eth_dev_configure(eth_port_id, num_queues,
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.324000969 +0000
+++ 0020-examples-ntb-check-info-query-return.patch	2024-11-12 22:06:58.663307139 +0000
@@ -1 +1 @@
-From 07e4dc04d99a99699d71a0a39dd2a7034049e663 Mon Sep 17 00:00:00 2001
+From 63797f45c51e87faaede63d647d41314b4bfe85a Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 07e4dc04d99a99699d71a0a39dd2a7034049e663 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 56c7672392..37d60208e3 100644
+index 585aad9d70..5082e66c7b 100644
@@ -24 +25 @@
-@@ -1285,7 +1285,10 @@ main(int argc, char **argv)
+@@ -1443,7 +1443,10 @@ main(int argc, char **argv)

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

* patch 'net/netvsc: force Tx VLAN offload on 801.2Q packet' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (18 preceding siblings ...)
  2024-11-12 22:07     ` patch 'examples/ntb: check info query return' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/vmxnet3: fix crash after configuration failure' " luca.boccassi
                       ` (18 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Long Li; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/19fe4f972bb03c453127acd784f139791c62dbf1

Thanks.

Luca Boccassi

---
From 19fe4f972bb03c453127acd784f139791c62dbf1 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Fri, 18 Oct 2024 11:13:50 -0700
Subject: [PATCH] net/netvsc: force Tx VLAN offload on 801.2Q packet

[ upstream commit 06c968f9ba8afeaf03b60871a453652a5828ff3f ]

The VSP assumes the packet doesn't have VLAN tags. When VLAN tag is
present in a TX packet, always strip it and use PPI to send VLAN info
through VSP packet.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Long Li <longli@microsoft.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_rxtx.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index fc9df9f3b4..080cab4464 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -1569,14 +1569,32 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 
 	for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) {
 		struct rte_mbuf *m = tx_pkts[nb_tx];
-		uint32_t pkt_size = m->pkt_len + HN_RNDIS_PKT_LEN;
 		struct rndis_packet_msg *pkt;
 		struct hn_txdesc *txd;
+		uint32_t pkt_size;
 
 		txd = hn_txd_get(txq);
 		if (txd == NULL)
 			break;
 
+		if (!(m->ol_flags & RTE_MBUF_F_TX_VLAN)) {
+			struct rte_ether_hdr *eh =
+				rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
+			struct rte_vlan_hdr *vh;
+
+			/* Force TX vlan offloading for 801.2Q packet */
+			if (eh->ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN)) {
+				vh = (struct rte_vlan_hdr *)(eh + 1);
+				m->ol_flags |= RTE_MBUF_F_TX_VLAN;
+				m->vlan_tci = rte_be_to_cpu_16(vh->vlan_tci);
+
+				/* Copy ether header over */
+				memmove(rte_pktmbuf_adj(m, sizeof(struct rte_vlan_hdr)),
+					eh, 2 * RTE_ETHER_ADDR_LEN);
+			}
+		}
+		pkt_size = m->pkt_len + HN_RNDIS_PKT_LEN;
+
 		/* For small packets aggregate them in chimney buffer */
 		if (m->pkt_len <= hv->tx_copybreak &&
 		    pkt_size <= txq->agg_szmax) {
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.353468525 +0000
+++ 0021-net-netvsc-force-Tx-VLAN-offload-on-801.2Q-packet.patch	2024-11-12 22:06:58.667307202 +0000
@@ -1 +1 @@
-From 06c968f9ba8afeaf03b60871a453652a5828ff3f Mon Sep 17 00:00:00 2001
+From 19fe4f972bb03c453127acd784f139791c62dbf1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 06c968f9ba8afeaf03b60871a453652a5828ff3f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 52aedb001f..9d3948e03d 100644
+index fc9df9f3b4..080cab4464 100644
@@ -23 +24 @@
-@@ -1557,14 +1557,32 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -1569,14 +1569,32 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)

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

* patch 'net/vmxnet3: fix crash after configuration failure' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (19 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/netvsc: force Tx VLAN offload on 801.2Q packet' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/hns3: remove ROH devices' " luca.boccassi
                       ` (17 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Roger Melton; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From a45c6443f45e6eb6a5c92793c838f1aa241e929b Mon Sep 17 00:00:00 2001
From: Roger Melton <rmelton@cisco.com>
Date: Sat, 26 Oct 2024 10:33:36 -0400
Subject: [PATCH] net/vmxnet3: fix crash after configuration failure
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 439847c154ccf05e1a8bbb955c552921514d31e2 ]

Problem:

If vxmnet3_dev_configure() fails, applications may call
vmxnet3_dev_close(). If the failure occurs before the vmxnet3
hw->shared structure is allocated the close will lead to a segv.

Root Cause:

This crash is due to incorrect adapter_stopped state in the
vmxnet3 dev_private structure. When dev_private is allocated,
adapter_stopped will be 0 (FALSE).  eth_vmxnet3_dev_init() does not
set it to TRUE, so it will remain FALSE until a successful
vmxnet3_dev_start() followed by a vmxnet3_dev_stop().  When
vmxnet3_dev_close() is called, it will invoke vmxnet3_dev_stop().
vmxnet3_dev_stop() will check the adapter_stopped state in the
vmxnet3 shared data, find it is FALSE and will proceed to stop the
device, calling vmxnet3_disable_all_intrs().
vmxnet3_disable_all_intrs() attempts to access the vmxnet3 shared data
resulting in the segv.

Solution:

Set adapter_stopped to TRUE in eth_vmxnet3_dev_init(), to prevent stop
processing.

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

Signed-off-by: Roger Melton <rmelton@cisco.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index c1c7539fff..52245c5fbb 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -347,6 +347,7 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)
 	/* Vendor and Device ID need to be set before init of shared code */
 	hw->device_id = pci_dev->id.device_id;
 	hw->vendor_id = pci_dev->id.vendor_id;
+	hw->adapter_stopped = TRUE;
 	hw->hw_addr0 = (void *)pci_dev->mem_resource[0].addr;
 	hw->hw_addr1 = (void *)pci_dev->mem_resource[1].addr;
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.390233043 +0000
+++ 0022-net-vmxnet3-fix-crash-after-configuration-failure.patch	2024-11-12 22:06:58.667307202 +0000
@@ -1 +1 @@
-From 439847c154ccf05e1a8bbb955c552921514d31e2 Mon Sep 17 00:00:00 2001
+From a45c6443f45e6eb6a5c92793c838f1aa241e929b Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 439847c154ccf05e1a8bbb955c552921514d31e2 ]
+
@@ -35 +36,0 @@
-Cc: stable@dpdk.org
@@ -44 +45 @@
-index 78fac63ab6..79ab167421 100644
+index c1c7539fff..52245c5fbb 100644
@@ -47 +48 @@
-@@ -403,6 +403,7 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)
+@@ -347,6 +347,7 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)

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

* patch 'net/hns3: remove ROH devices' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (20 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/vmxnet3: fix crash after configuration failure' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/txgbe: fix SWFW mbox' " luca.boccassi
                       ` (16 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From e8e117b4b2a668a3e820b795d381ace9a2b9da5f Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Sat, 26 Oct 2024 14:38:35 +0800
Subject: [PATCH] net/hns3: remove ROH devices

[ upstream commit feb4548ffd80bf249239d99bf9053ecf78f815d1 ]

The devices added in commit 3f1436d7006c ("net/hns3: support new device")
is no longer available, so revert it.

Fixes: 3f1436d7006c ("net/hns3: support new device")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_cmd.c    | 4 +---
 drivers/net/hns3/hns3_ethdev.c | 2 --
 drivers/net/hns3/hns3_ethdev.h | 2 --
 3 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index fb515ed0ee..7bdf7740c1 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -539,9 +539,7 @@ hns3_set_dcb_capability(struct hns3_hw *hw)
 	if (device_id == HNS3_DEV_ID_25GE_RDMA ||
 	    device_id == HNS3_DEV_ID_50GE_RDMA ||
 	    device_id == HNS3_DEV_ID_100G_RDMA_MACSEC ||
-	    device_id == HNS3_DEV_ID_200G_RDMA ||
-	    device_id == HNS3_DEV_ID_100G_ROH ||
-	    device_id == HNS3_DEV_ID_200G_ROH)
+	    device_id == HNS3_DEV_ID_200G_RDMA)
 		hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_DCB_B, 1);
 }
 
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 0050d46ae7..9b0b3776f4 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6650,8 +6650,6 @@ static const struct rte_pci_id pci_id_hns3_map[] = {
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_50GE_RDMA) },
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_100G_RDMA_MACSEC) },
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_200G_RDMA) },
-	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_100G_ROH) },
-	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_200G_ROH) },
 	{ .vendor_id = 0, }, /* sentinel */
 };
 
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 1afe4c4ff7..5445170c8b 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -28,9 +28,7 @@
 #define HNS3_DEV_ID_25GE_RDMA			0xA222
 #define HNS3_DEV_ID_50GE_RDMA			0xA224
 #define HNS3_DEV_ID_100G_RDMA_MACSEC		0xA226
-#define HNS3_DEV_ID_100G_ROH	                0xA227
 #define HNS3_DEV_ID_200G_RDMA			0xA228
-#define HNS3_DEV_ID_200G_ROH	                0xA22C
 #define HNS3_DEV_ID_100G_VF			0xA22E
 #define HNS3_DEV_ID_100G_RDMA_PFC_VF		0xA22F
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.421331504 +0000
+++ 0023-net-hns3-remove-ROH-devices.patch	2024-11-12 22:06:58.671307265 +0000
@@ -1 +1 @@
-From feb4548ffd80bf249239d99bf9053ecf78f815d1 Mon Sep 17 00:00:00 2001
+From e8e117b4b2a668a3e820b795d381ace9a2b9da5f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit feb4548ffd80bf249239d99bf9053ecf78f815d1 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 3c5fdbef8f..146444e2fa 100644
+index fb515ed0ee..7bdf7740c1 100644
@@ -24 +25 @@
-@@ -545,9 +545,7 @@ hns3_set_dcb_capability(struct hns3_hw *hw)
+@@ -539,9 +539,7 @@ hns3_set_dcb_capability(struct hns3_hw *hw)
@@ -36 +37 @@
-index 365b852969..d748eca0b5 100644
+index 0050d46ae7..9b0b3776f4 100644
@@ -39 +40 @@
-@@ -6651,8 +6651,6 @@ static const struct rte_pci_id pci_id_hns3_map[] = {
+@@ -6650,8 +6650,6 @@ static const struct rte_pci_id pci_id_hns3_map[] = {
@@ -49 +50 @@
-index 799b61038a..7824503bb8 100644
+index 1afe4c4ff7..5445170c8b 100644

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

* patch 'net/txgbe: fix SWFW mbox' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (21 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/hns3: remove ROH devices' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/txgbe: fix VF-PF mbox interrupt' " luca.boccassi
                       ` (15 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/68751f74354540c21341c4c943f9d8b24b8ffb93

Thanks.

Luca Boccassi

---
From 68751f74354540c21341c4c943f9d8b24b8ffb93 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Mon, 4 Nov 2024 10:29:55 +0800
Subject: [PATCH] net/txgbe: fix SWFW mbox

[ upstream commit e389504ed46d84c6a5a6a32b09d6750a182f8725 ]

There is a unknown bug that the register TXGBE_MNGMBX cannot be written
in the loop, when DPDK is built with GCC high version.
Access any register before write TXGBE_MNGMBX can fix it.

Bugzilla ID: 1531
Fixes: 35c90ecccfd4 ("net/txgbe: add EEPROM functions")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_mng.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/txgbe/base/txgbe_mng.c b/drivers/net/txgbe/base/txgbe_mng.c
index 029a0a1fe1..9770c88bc8 100644
--- a/drivers/net/txgbe/base/txgbe_mng.c
+++ b/drivers/net/txgbe/base/txgbe_mng.c
@@ -58,6 +58,7 @@ txgbe_hic_unlocked(struct txgbe_hw *hw, u32 *buffer, u32 length, u32 timeout)
 
 	dword_len = length >> 2;
 
+	txgbe_flush(hw);
 	/* The device driver writes the relevant command block
 	 * into the ram area.
 	 */
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.453522531 +0000
+++ 0024-net-txgbe-fix-SWFW-mbox.patch	2024-11-12 22:06:58.671307265 +0000
@@ -1 +1 @@
-From e389504ed46d84c6a5a6a32b09d6750a182f8725 Mon Sep 17 00:00:00 2001
+From 68751f74354540c21341c4c943f9d8b24b8ffb93 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e389504ed46d84c6a5a6a32b09d6750a182f8725 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 20db982891..7dc8f21183 100644
+index 029a0a1fe1..9770c88bc8 100644

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

* patch 'net/txgbe: fix VF-PF mbox interrupt' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (22 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/txgbe: fix SWFW mbox' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/txgbe: remove outer UDP checksum capability' " luca.boccassi
                       ` (14 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/52df3420984f2ac3c43ed079a5e994903f063676

Thanks.

Luca Boccassi

---
From 52df3420984f2ac3c43ed079a5e994903f063676 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Mon, 4 Nov 2024 10:29:56 +0800
Subject: [PATCH] net/txgbe: fix VF-PF mbox interrupt

[ upstream commit 5a4ce69701fc01f23a2769c8afff055d87eff864 ]

There was a incorrect bit to define TXGBE_ICRMISC_VFMBX that prevents
the interrupt from being handled correctly.

Fixes: a6712cd029a4 ("net/txgbe: add PF module init and uninit for SRIOV")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_regs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
index a2984f1106..db02b1b81b 100644
--- a/drivers/net/txgbe/base/txgbe_regs.h
+++ b/drivers/net/txgbe/base/txgbe_regs.h
@@ -1197,7 +1197,7 @@ enum txgbe_5tuple_protocol {
 #define   TXGBE_ICRMISC_ANDONE MS(19, 0x1) /* link auto-nego done */
 #define   TXGBE_ICRMISC_ERRIG  MS(20, 0x1) /* integrity error */
 #define   TXGBE_ICRMISC_SPI    MS(21, 0x1) /* SPI interface */
-#define   TXGBE_ICRMISC_VFMBX  MS(22, 0x1) /* VF-PF message box */
+#define   TXGBE_ICRMISC_VFMBX  MS(23, 0x1) /* VF-PF message box */
 #define   TXGBE_ICRMISC_GPIO   MS(26, 0x1) /* GPIO interrupt */
 #define   TXGBE_ICRMISC_ERRPCI MS(27, 0x1) /* pcie request error */
 #define   TXGBE_ICRMISC_HEAT   MS(28, 0x1) /* overheat detection */
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.482004253 +0000
+++ 0025-net-txgbe-fix-VF-PF-mbox-interrupt.patch	2024-11-12 22:06:58.671307265 +0000
@@ -1 +1 @@
-From 5a4ce69701fc01f23a2769c8afff055d87eff864 Mon Sep 17 00:00:00 2001
+From 52df3420984f2ac3c43ed079a5e994903f063676 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5a4ce69701fc01f23a2769c8afff055d87eff864 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 4ea4a2e3d8..b46d65331e 100644
+index a2984f1106..db02b1b81b 100644

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

* patch 'net/txgbe: remove outer UDP checksum capability' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (23 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/txgbe: fix VF-PF mbox interrupt' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/txgbe: fix driver load bit to inform firmware' " luca.boccassi
                       ` (13 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/535cdf7a7d9bb8be726bb2cdffc47365f8dc7346

Thanks.

Luca Boccassi

---
From 535cdf7a7d9bb8be726bb2cdffc47365f8dc7346 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Mon, 4 Nov 2024 10:29:57 +0800
Subject: [PATCH] net/txgbe: remove outer UDP checksum capability

[ upstream commit 25fe1c780d39ea3637ba8407f6e9a9800135becd ]

The hardware does not support outer UDP checksum for tunnel packets.
It's wrong to claim this Tx offload capability, so fix it.

Bugzilla ID: 1529
Fixes: b950203be7f1 ("net/txgbe: support VXLAN-GPE")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_rxtx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index b0ec1c96d7..9a075cf54b 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -2254,8 +2254,7 @@ txgbe_get_tx_port_offloads(struct rte_eth_dev *dev)
 
 	tx_offload_capa |= RTE_ETH_TX_OFFLOAD_MACSEC_INSERT;
 
-	tx_offload_capa |= RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |
-			   RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM;
+	tx_offload_capa |= RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM;
 
 #ifdef RTE_LIB_SECURITY
 	if (dev->security_ctx)
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.510251911 +0000
+++ 0026-net-txgbe-remove-outer-UDP-checksum-capability.patch	2024-11-12 22:06:58.675307328 +0000
@@ -1 +1 @@
-From 25fe1c780d39ea3637ba8407f6e9a9800135becd Mon Sep 17 00:00:00 2001
+From 535cdf7a7d9bb8be726bb2cdffc47365f8dc7346 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 25fe1c780d39ea3637ba8407f6e9a9800135becd ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 5bc0f8772f..c12726553c 100644
+index b0ec1c96d7..9a075cf54b 100644
@@ -22 +23 @@
-@@ -2284,8 +2284,7 @@ txgbe_get_tx_port_offloads(struct rte_eth_dev *dev)
+@@ -2254,8 +2254,7 @@ txgbe_get_tx_port_offloads(struct rte_eth_dev *dev)

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

* patch 'net/txgbe: fix driver load bit to inform firmware' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (24 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/txgbe: remove outer UDP checksum capability' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/ngbe: " luca.boccassi
                       ` (12 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 3b4fec359ebcfeaca59d4609d9cceca1e7982e3c Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Mon, 4 Nov 2024 10:29:58 +0800
Subject: [PATCH] net/txgbe: fix driver load bit to inform firmware

[ upstream commit 0a8f064bbc2cf4978857eae84e86c6b2c9e65feb ]

Drv_load bit will be reset to default 0 after hardware LAN reset,
reconfigure it to inform firmware that driver is loaded. And set it to 0
when device is closed.

Fixes: b1f596677d8e ("net/txgbe: support device start")

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

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 2ed5ee683f..784b66a579 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -330,6 +330,8 @@ txgbe_pf_reset_hw(struct txgbe_hw *hw)
 	status = hw->mac.reset_hw(hw);
 
 	ctrl_ext = rd32(hw, TXGBE_PORTCTL);
+	/* let hardware know driver is loaded */
+	ctrl_ext |= TXGBE_PORTCTL_DRVLOAD;
 	/* Set PF Reset Done bit so PF/VF Mail Ops can work */
 	ctrl_ext |= TXGBE_PORTCTL_RSTDONE;
 	wr32(hw, TXGBE_PORTCTL, ctrl_ext);
@@ -2046,6 +2048,9 @@ txgbe_dev_close(struct rte_eth_dev *dev)
 
 	ret = txgbe_dev_stop(dev);
 
+	/* Let firmware take over control of hardware */
+	wr32m(hw, TXGBE_PORTCTL, TXGBE_PORTCTL_DRVLOAD, 0);
+
 	txgbe_dev_free_queues(dev);
 
 	txgbe_set_pcie_master(hw, false);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.541731463 +0000
+++ 0027-net-txgbe-fix-driver-load-bit-to-inform-firmware.patch	2024-11-12 22:06:58.675307328 +0000
@@ -1 +1 @@
-From 0a8f064bbc2cf4978857eae84e86c6b2c9e65feb Mon Sep 17 00:00:00 2001
+From 3b4fec359ebcfeaca59d4609d9cceca1e7982e3c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0a8f064bbc2cf4978857eae84e86c6b2c9e65feb ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 2834468764..4aa3bfd0bc 100644
+index 2ed5ee683f..784b66a579 100644
@@ -22 +23 @@
-@@ -331,6 +331,8 @@ txgbe_pf_reset_hw(struct txgbe_hw *hw)
+@@ -330,6 +330,8 @@ txgbe_pf_reset_hw(struct txgbe_hw *hw)
@@ -31 +32 @@
-@@ -2061,6 +2063,9 @@ txgbe_dev_close(struct rte_eth_dev *dev)
+@@ -2046,6 +2048,9 @@ txgbe_dev_close(struct rte_eth_dev *dev)

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

* patch 'net/ngbe: fix driver load bit to inform firmware' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (25 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/txgbe: fix driver load bit to inform firmware' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/ngbe: reconfigure more MAC Rx registers' " luca.boccassi
                       ` (11 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From ed8bc9d268e07f0da95ab4465567dae4f0e178d5 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Mon, 4 Nov 2024 10:30:04 +0800
Subject: [PATCH] net/ngbe: fix driver load bit to inform firmware

[ upstream commit cb7be5b510ef0995fa171832f0e0994f667e2161 ]

Drv_load bit will be reset to default 0 after hardware LAN reset,
reconfigure it to inform firmware that driver is loaded. And set it to 0
when device is closed.

Fixes: 3518df5774c7 ("net/ngbe: support device start/stop")
Fixes: cc63194e89cb ("net/ngbe: support close and reset device")

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

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 443bd9fef9..51a7c78e3d 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -263,6 +263,8 @@ ngbe_pf_reset_hw(struct ngbe_hw *hw)
 	status = hw->mac.reset_hw(hw);
 
 	ctrl_ext = rd32(hw, NGBE_PORTCTL);
+	/* let hardware know driver is loaded */
+	ctrl_ext |= NGBE_PORTCTL_DRVLOAD;
 	/* Set PF Reset Done bit so PF/VF Mail Ops can work */
 	ctrl_ext |= NGBE_PORTCTL_RSTDONE;
 	wr32(hw, NGBE_PORTCTL, ctrl_ext);
@@ -1269,6 +1271,9 @@ ngbe_dev_close(struct rte_eth_dev *dev)
 
 	ngbe_dev_stop(dev);
 
+	/* Let firmware take over control of hardware */
+	wr32m(hw, NGBE_PORTCTL, NGBE_PORTCTL_DRVLOAD, 0);
+
 	ngbe_dev_free_queues(dev);
 
 	ngbe_set_pcie_master(hw, false);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.572402455 +0000
+++ 0028-net-ngbe-fix-driver-load-bit-to-inform-firmware.patch	2024-11-12 22:06:58.679307391 +0000
@@ -1 +1 @@
-From cb7be5b510ef0995fa171832f0e0994f667e2161 Mon Sep 17 00:00:00 2001
+From ed8bc9d268e07f0da95ab4465567dae4f0e178d5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cb7be5b510ef0995fa171832f0e0994f667e2161 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 353d17acc8..238533f2b8 100644
+index 443bd9fef9..51a7c78e3d 100644
@@ -32 +33 @@
-@@ -1277,6 +1279,9 @@ ngbe_dev_close(struct rte_eth_dev *dev)
+@@ -1269,6 +1271,9 @@ ngbe_dev_close(struct rte_eth_dev *dev)

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

* patch 'net/ngbe: reconfigure more MAC Rx registers' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (26 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/ngbe: " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/ngbe: fix interrupt lost in legacy or MSI mode' " luca.boccassi
                       ` (10 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From ad0153dc8a97d24a03c93bc650b22653a6b5bb4f Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Mon, 4 Nov 2024 10:30:05 +0800
Subject: [PATCH] net/ngbe: reconfigure more MAC Rx registers

[ upstream commit b8d52e1084a17c7ef83624f3bbd11a090e7b2267 ]

When link status changes, there is a probability that no more packets
can be received on the port, due to hardware defects. These MAC Rx
registers should be reconfigured to fix this problem.

Fixes: b9246b8fa280 ("net/ngbe: support link update")
Fixes: a7c5f95ed9c2 ("net/ngbe: reconfigure MAC Rx when link update")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/base/ngbe_regs.h | 2 ++
 drivers/net/ngbe/ngbe_ethdev.c    | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/ngbe/base/ngbe_regs.h b/drivers/net/ngbe/base/ngbe_regs.h
index c0e79a2ba7..0d820f4079 100644
--- a/drivers/net/ngbe/base/ngbe_regs.h
+++ b/drivers/net/ngbe/base/ngbe_regs.h
@@ -712,6 +712,8 @@ enum ngbe_5tuple_protocol {
 #define   NGBE_MACRXFLT_CTL_PASS       LS(3, 6, 0x3)
 #define   NGBE_MACRXFLT_RXALL          MS(31, 0x1)
 
+#define NGBE_MAC_WDG_TIMEOUT           0x01100C
+
 /******************************************************************************
  * Statistic Registers
  ******************************************************************************/
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 51a7c78e3d..5f39bd336b 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -1894,6 +1894,7 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
 	bool link_up;
 	int err;
 	int wait = 1;
+	u32 reg;
 
 	memset(&link, 0, sizeof(link));
 	link.link_status = RTE_ETH_LINK_DOWN;
@@ -1951,8 +1952,13 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
 			wr32m(hw, NGBE_MACTXCFG, NGBE_MACTXCFG_SPEED_MASK,
 				NGBE_MACTXCFG_SPEED_1G | NGBE_MACTXCFG_TE);
 		}
+		/* Re configure MAC RX */
+		reg = rd32(hw, NGBE_MACRXCFG);
+		wr32(hw, NGBE_MACRXCFG, reg);
 		wr32m(hw, NGBE_MACRXFLT, NGBE_MACRXFLT_PROMISC,
 			NGBE_MACRXFLT_PROMISC);
+		reg = rd32(hw, NGBE_MAC_WDG_TIMEOUT);
+		wr32(hw, NGBE_MAC_WDG_TIMEOUT, reg);
 	}
 
 	return rte_eth_linkstatus_set(dev, &link);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.610812185 +0000
+++ 0029-net-ngbe-reconfigure-more-MAC-Rx-registers.patch	2024-11-12 22:06:58.679307391 +0000
@@ -1 +1 @@
-From b8d52e1084a17c7ef83624f3bbd11a090e7b2267 Mon Sep 17 00:00:00 2001
+From ad0153dc8a97d24a03c93bc650b22653a6b5bb4f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b8d52e1084a17c7ef83624f3bbd11a090e7b2267 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 8a6776b0e6..b1295280a7 100644
+index c0e79a2ba7..0d820f4079 100644
@@ -34 +35 @@
-index 238533f2b8..c372fd928c 100644
+index 51a7c78e3d..5f39bd336b 100644
@@ -37 +38 @@
-@@ -1941,6 +1941,7 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -1894,6 +1894,7 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
@@ -45 +46 @@
-@@ -1998,8 +1999,13 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -1951,8 +1952,13 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,

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

* patch 'net/ngbe: fix interrupt lost in legacy or MSI mode' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (27 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/ngbe: reconfigure more MAC Rx registers' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/ngbe: restrict configuration of VLAN strip offload' " luca.boccassi
                       ` (9 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 5e2ce50e415b5acbc641bde383f76ca27c02dedb Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Mon, 4 Nov 2024 10:30:06 +0800
Subject: [PATCH] net/ngbe: fix interrupt lost in legacy or MSI mode

[ upstream commit 68f04c0aa79316de333441e7efdadd2876412ffa ]

When interrupt is legacy or MSI mode, shared interrupt may cause the
interrupt cannot be re-enabled. So fix to read the shared interrupt.

Fixes: b9246b8fa280 ("net/ngbe: support link update")

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

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 5f39bd336b..38754ce0f0 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -2146,6 +2146,19 @@ ngbe_dev_interrupt_get_status(struct rte_eth_dev *dev)
 	struct ngbe_hw *hw = ngbe_dev_hw(dev);
 	struct ngbe_interrupt *intr = ngbe_dev_intr(dev);
 
+	eicr = ((u32 *)hw->isb_mem)[NGBE_ISB_VEC0];
+	if (!eicr) {
+		/*
+		 * shared interrupt alert!
+		 * make sure interrupts are enabled because the read will
+		 * have disabled interrupts.
+		 */
+		if (!hw->adapter_stopped)
+			ngbe_enable_intr(dev);
+		return 0;
+	}
+	((u32 *)hw->isb_mem)[NGBE_ISB_VEC0] = 0;
+
 	/* read-on-clear nic registers here */
 	eicr = ((u32 *)hw->isb_mem)[NGBE_ISB_MISC];
 	PMD_DRV_LOG(DEBUG, "eicr %x", eicr);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.642832760 +0000
+++ 0030-net-ngbe-fix-interrupt-lost-in-legacy-or-MSI-mode.patch	2024-11-12 22:06:58.679307391 +0000
@@ -1 +1 @@
-From 68f04c0aa79316de333441e7efdadd2876412ffa Mon Sep 17 00:00:00 2001
+From 5e2ce50e415b5acbc641bde383f76ca27c02dedb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 68f04c0aa79316de333441e7efdadd2876412ffa ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index c372fd928c..325a9d1eaf 100644
+index 5f39bd336b..38754ce0f0 100644
@@ -21 +22 @@
-@@ -2193,6 +2193,19 @@ ngbe_dev_interrupt_get_status(struct rte_eth_dev *dev)
+@@ -2146,6 +2146,19 @@ ngbe_dev_interrupt_get_status(struct rte_eth_dev *dev)

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

* patch 'net/ngbe: restrict configuration of VLAN strip offload' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (28 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/ngbe: fix interrupt lost in legacy or MSI mode' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/vmxnet3: fix potential out of bounds stats access' " luca.boccassi
                       ` (8 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 0b6713d5ba3bc2b0e975db13e08a2cfa9fd1c332 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Mon, 4 Nov 2024 10:30:07 +0800
Subject: [PATCH] net/ngbe: restrict configuration of VLAN strip offload

[ upstream commit baca8ec066dc6fdc42374e8eafd67eecfd6c9267 ]

There is a hardware limitation that Rx ring config register is not
writable when Rx ring is enabled, i.e. the NGBE_RXCFG_ENA bit is set.
But disabling the ring when there is traffic will cause ring get stuck.
So restrict the configuration of VLAN strip offload only if device is
started.

Fixes: 59b46438fdaa ("net/ngbe: support VLAN offload and VLAN filter")

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

diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 38754ce0f0..9d6ae6f2ef 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -584,41 +584,25 @@ ngbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 }
 
 static void
-ngbe_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
+ngbe_vlan_strip_q_set(struct rte_eth_dev *dev, uint16_t queue, int on)
 {
-	struct ngbe_hw *hw = ngbe_dev_hw(dev);
-	struct ngbe_rx_queue *rxq;
-	bool restart;
-	uint32_t rxcfg, rxbal, rxbah;
-
 	if (on)
 		ngbe_vlan_hw_strip_enable(dev, queue);
 	else
 		ngbe_vlan_hw_strip_disable(dev, queue);
+}
 
-	rxq = dev->data->rx_queues[queue];
-	rxbal = rd32(hw, NGBE_RXBAL(rxq->reg_idx));
-	rxbah = rd32(hw, NGBE_RXBAH(rxq->reg_idx));
-	rxcfg = rd32(hw, NGBE_RXCFG(rxq->reg_idx));
-	if (rxq->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) {
-		restart = (rxcfg & NGBE_RXCFG_ENA) &&
-			!(rxcfg & NGBE_RXCFG_VLAN);
-		rxcfg |= NGBE_RXCFG_VLAN;
-	} else {
-		restart = (rxcfg & NGBE_RXCFG_ENA) &&
-			(rxcfg & NGBE_RXCFG_VLAN);
-		rxcfg &= ~NGBE_RXCFG_VLAN;
-	}
-	rxcfg &= ~NGBE_RXCFG_ENA;
+static void
+ngbe_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
+{
+	struct ngbe_hw *hw = ngbe_dev_hw(dev);
 
-	if (restart) {
-		/* set vlan strip for ring */
-		ngbe_dev_rx_queue_stop(dev, queue);
-		wr32(hw, NGBE_RXBAL(rxq->reg_idx), rxbal);
-		wr32(hw, NGBE_RXBAH(rxq->reg_idx), rxbah);
-		wr32(hw, NGBE_RXCFG(rxq->reg_idx), rxcfg);
-		ngbe_dev_rx_queue_start(dev, queue);
+	if (!hw->adapter_stopped) {
+		PMD_DRV_LOG(ERR, "Please stop port first");
+		return;
 	}
+
+	ngbe_vlan_strip_q_set(dev, queue, on);
 }
 
 static int
@@ -844,9 +828,9 @@ ngbe_vlan_hw_strip_config(struct rte_eth_dev *dev)
 		rxq = dev->data->rx_queues[i];
 
 		if (rxq->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)
-			ngbe_vlan_hw_strip_enable(dev, i);
+			ngbe_vlan_strip_q_set(dev, i, 1);
 		else
-			ngbe_vlan_hw_strip_disable(dev, i);
+			ngbe_vlan_strip_q_set(dev, i, 0);
 	}
 }
 
@@ -908,6 +892,13 @@ ngbe_vlan_offload_config(struct rte_eth_dev *dev, int mask)
 static int
 ngbe_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
+	struct ngbe_hw *hw = ngbe_dev_hw(dev);
+
+	if (!hw->adapter_stopped && (mask & RTE_ETH_VLAN_STRIP_MASK)) {
+		PMD_DRV_LOG(ERR, "Please stop port first");
+		return -EPERM;
+	}
+
 	ngbe_config_vlan_strip_on_all_queues(dev, mask);
 
 	ngbe_vlan_offload_config(dev, mask);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.672796554 +0000
+++ 0031-net-ngbe-restrict-configuration-of-VLAN-strip-offloa.patch	2024-11-12 22:06:58.683307454 +0000
@@ -1 +1 @@
-From baca8ec066dc6fdc42374e8eafd67eecfd6c9267 Mon Sep 17 00:00:00 2001
+From 0b6713d5ba3bc2b0e975db13e08a2cfa9fd1c332 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit baca8ec066dc6fdc42374e8eafd67eecfd6c9267 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 325a9d1eaf..08e87471f6 100644
+index 38754ce0f0..9d6ae6f2ef 100644
@@ -24 +25 @@
-@@ -586,41 +586,25 @@ ngbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+@@ -584,41 +584,25 @@ ngbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
@@ -77 +78 @@
-@@ -846,9 +830,9 @@ ngbe_vlan_hw_strip_config(struct rte_eth_dev *dev)
+@@ -844,9 +828,9 @@ ngbe_vlan_hw_strip_config(struct rte_eth_dev *dev)
@@ -89 +90 @@
-@@ -910,6 +894,13 @@ ngbe_vlan_offload_config(struct rte_eth_dev *dev, int mask)
+@@ -908,6 +892,13 @@ ngbe_vlan_offload_config(struct rte_eth_dev *dev, int mask)

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

* patch 'net/vmxnet3: fix potential out of bounds stats access' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (29 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/ngbe: restrict configuration of VLAN strip offload' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/vmxnet3: support larger MTU with version 6' " luca.boccassi
                       ` (7 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Morten Brørup; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From c44cb537e88b037538c132dc742421812c72962c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Br=C3=B8rup?= <mb@smartsharesystems.com>
Date: Mon, 4 Nov 2024 10:52:19 +0000
Subject: [PATCH] net/vmxnet3: fix potential out of bounds stats access
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit d3a229dd493abcb29d5717c5ce37e0a0bc1777c4 ]

With virtual hardware version 6, the max number of RX queues was
increased to VMXNET3_EXT_MAX_RX_QUEUES (32) from VMXNET3_MAX_RX_QUEUES
(16), similarly, the max number of TX queues was increased to
VMXNET3_EXT_MAX_TX_QUEUES (32) from VMXNET3_MAX_TX_QUEUES (8).  These
increases were not fully considered in the PMD...

The configured number of queues to provide statistics for
(RTE_ETHDEV_QUEUE_STAT_CNTRS) can be smaller than driver's max number of
supported transmit queues for virtual hardware version 6
(VMXNET3_EXT_MAX_RX_QUEUES) (32), which will cause accessing the queue
stats array out of boundary if the application uses more than
RTE_ETHDEV_QUEUE_STAT_CNTRS queues.

This patch fixes this by two modifications
- Increased stats array size to support hardware version 6.
- Respect RTE_ETHDEV_QUEUE_STAT_CNTRS when getting the per-queue
  counters.

The build time check
RTE_BUILD_BUG_ON(RTE_ETHDEV_QUEUE_STAT_CNTRS < VMXNET3_MAX_TX_QUEUES)
has become irrelevant, so it is removed.
With this removal, per-queue stats for fewer queues is supported.

Fixes: b1584dd0affe ("net/vmxnet3: support version 6")

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 32 +++++++++++++++++-----------
 drivers/net/vmxnet3/vmxnet3_ethdev.h |  4 ++--
 2 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 52245c5fbb..5526f7d8fd 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1377,42 +1377,52 @@ vmxnet3_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	struct vmxnet3_hw *hw = dev->data->dev_private;
 	struct UPT1_TxStats txStats;
 	struct UPT1_RxStats rxStats;
+	uint64_t packets, bytes;
 
 	VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_GET_STATS);
 
 	for (i = 0; i < hw->num_tx_queues; i++) {
 		vmxnet3_tx_stats_get(hw, i, &txStats);
 
-		stats->q_opackets[i] = txStats.ucastPktsTxOK +
+		packets = txStats.ucastPktsTxOK +
 			txStats.mcastPktsTxOK +
 			txStats.bcastPktsTxOK;
 
-		stats->q_obytes[i] = txStats.ucastBytesTxOK +
+		bytes = txStats.ucastBytesTxOK +
 			txStats.mcastBytesTxOK +
 			txStats.bcastBytesTxOK;
 
-		stats->opackets += stats->q_opackets[i];
-		stats->obytes += stats->q_obytes[i];
+		stats->opackets += packets;
+		stats->obytes += bytes;
 		stats->oerrors += txStats.pktsTxError + txStats.pktsTxDiscard;
+
+		if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
+			stats->q_opackets[i] = packets;
+			stats->q_obytes[i] = bytes;
+		}
 	}
 
 	for (i = 0; i < hw->num_rx_queues; i++) {
 		vmxnet3_rx_stats_get(hw, i, &rxStats);
 
-		stats->q_ipackets[i] = rxStats.ucastPktsRxOK +
+		packets = rxStats.ucastPktsRxOK +
 			rxStats.mcastPktsRxOK +
 			rxStats.bcastPktsRxOK;
 
-		stats->q_ibytes[i] = rxStats.ucastBytesRxOK +
+		bytes = rxStats.ucastBytesRxOK +
 			rxStats.mcastBytesRxOK +
 			rxStats.bcastBytesRxOK;
 
-		stats->ipackets += stats->q_ipackets[i];
-		stats->ibytes += stats->q_ibytes[i];
-
-		stats->q_errors[i] = rxStats.pktsRxError;
+		stats->ipackets += packets;
+		stats->ibytes += bytes;
 		stats->ierrors += rxStats.pktsRxError;
 		stats->imissed += rxStats.pktsRxOutOfBuf;
+
+		if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
+			stats->q_ipackets[i] = packets;
+			stats->q_ibytes[i] = bytes;
+			stats->q_errors[i] = rxStats.pktsRxError;
+		}
 	}
 
 	return 0;
@@ -1428,8 +1438,6 @@ vmxnet3_dev_stats_reset(struct rte_eth_dev *dev)
 
 	VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_GET_STATS);
 
-	RTE_BUILD_BUG_ON(RTE_ETHDEV_QUEUE_STAT_CNTRS < VMXNET3_MAX_TX_QUEUES);
-
 	for (i = 0; i < hw->num_tx_queues; i++) {
 		vmxnet3_hw_tx_stats_get(hw, i, &txStats);
 		memcpy(&hw->snapshot_tx_stats[i], &txStats,
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.h b/drivers/net/vmxnet3/vmxnet3_ethdev.h
index 5a303717b1..ffd21ece79 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.h
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.h
@@ -120,8 +120,8 @@ struct vmxnet3_hw {
 #define VMXNET3_VFT_TABLE_SIZE     (VMXNET3_VFT_SIZE * sizeof(uint32_t))
 	UPT1_TxStats	      saved_tx_stats[VMXNET3_EXT_MAX_TX_QUEUES];
 	UPT1_RxStats	      saved_rx_stats[VMXNET3_EXT_MAX_RX_QUEUES];
-	UPT1_TxStats          snapshot_tx_stats[VMXNET3_MAX_TX_QUEUES];
-	UPT1_RxStats          snapshot_rx_stats[VMXNET3_MAX_RX_QUEUES];
+	UPT1_TxStats          snapshot_tx_stats[VMXNET3_EXT_MAX_TX_QUEUES];
+	UPT1_RxStats          snapshot_rx_stats[VMXNET3_EXT_MAX_RX_QUEUES];
 };
 
 #define VMXNET3_REV_6		5		/* Vmxnet3 Rev. 6 */
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.702403253 +0000
+++ 0032-net-vmxnet3-fix-potential-out-of-bounds-stats-access.patch	2024-11-12 22:06:58.683307454 +0000
@@ -1 +1 @@
-From d3a229dd493abcb29d5717c5ce37e0a0bc1777c4 Mon Sep 17 00:00:00 2001
+From c44cb537e88b037538c132dc742421812c72962c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit d3a229dd493abcb29d5717c5ce37e0a0bc1777c4 ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
@@ -43 +44 @@
-index 79ab167421..619cfa21cf 100644
+index 52245c5fbb..5526f7d8fd 100644
@@ -46 +47 @@
-@@ -1471,42 +1471,52 @@ vmxnet3_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -1377,42 +1377,52 @@ vmxnet3_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -109 +110 @@
-@@ -1522,8 +1532,6 @@ vmxnet3_dev_stats_reset(struct rte_eth_dev *dev)
+@@ -1428,8 +1438,6 @@ vmxnet3_dev_stats_reset(struct rte_eth_dev *dev)
@@ -119 +120 @@
-index 2b3e2c4caa..e9ded6663d 100644
+index 5a303717b1..ffd21ece79 100644
@@ -122 +123 @@
-@@ -121,8 +121,8 @@ struct vmxnet3_hw {
+@@ -120,8 +120,8 @@ struct vmxnet3_hw {
@@ -130,3 +131,3 @@
- 	uint16_t              tx_prod_offset;
- 	uint16_t              rx_prod_offset[2];
- 	/* device capability bit map */
+ };
+ 
+ #define VMXNET3_REV_6		5		/* Vmxnet3 Rev. 6 */

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

* patch 'net/vmxnet3: support larger MTU with version 6' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (30 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/vmxnet3: fix potential out of bounds stats access' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/hns3: fix error code for repeatedly create counter' " luca.boccassi
                       ` (6 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Morten Brørup; +Cc: Jochen Behrens, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/74b7f4e42ca848fd599fc7826b2c00a9be92f398

Thanks.

Luca Boccassi

---
From 74b7f4e42ca848fd599fc7826b2c00a9be92f398 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Br=C3=B8rup?= <mb@smartsharesystems.com>
Date: Mon, 4 Nov 2024 10:52:20 +0000
Subject: [PATCH] net/vmxnet3: support larger MTU with version 6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit a4b83a747d7d21c6d61b9ae69d39db5e1c700dcd ]

Virtual hardware version 6 supports larger max MTU, but the device
information (dev_info) did not reflect this, so it could not be used.

Fixes: b1584dd0affe ("net/vmxnet3: support version 6")

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Jochen Behrens <jochen.behrens@broadcom.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 5526f7d8fd..f4cdb1bb31 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1481,7 +1481,7 @@ vmxnet3_dev_info_get(struct rte_eth_dev *dev,
 	dev_info->min_rx_bufsize = 1518 + RTE_PKTMBUF_HEADROOM;
 	dev_info->max_rx_pktlen = 16384; /* includes CRC, cf MAXFRS register */
 	dev_info->min_mtu = VMXNET3_MIN_MTU;
-	dev_info->max_mtu = VMXNET3_MAX_MTU;
+	dev_info->max_mtu = VMXNET3_VERSION_GE_6(hw) ? VMXNET3_V6_MAX_MTU : VMXNET3_MAX_MTU;
 	dev_info->speed_capa = RTE_ETH_LINK_SPEED_10G;
 	dev_info->max_mac_addrs = VMXNET3_MAX_MAC_ADDRS;
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.731994093 +0000
+++ 0033-net-vmxnet3-support-larger-MTU-with-version-6.patch	2024-11-12 22:06:58.683307454 +0000
@@ -1 +1 @@
-From a4b83a747d7d21c6d61b9ae69d39db5e1c700dcd Mon Sep 17 00:00:00 2001
+From 74b7f4e42ca848fd599fc7826b2c00a9be92f398 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit a4b83a747d7d21c6d61b9ae69d39db5e1c700dcd ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 619cfa21cf..15ca25b187 100644
+index 5526f7d8fd..f4cdb1bb31 100644
@@ -25 +26 @@
-@@ -1575,7 +1575,7 @@ vmxnet3_dev_info_get(struct rte_eth_dev *dev,
+@@ -1481,7 +1481,7 @@ vmxnet3_dev_info_get(struct rte_eth_dev *dev,

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

* patch 'net/hns3: fix error code for repeatedly create counter' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (31 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/vmxnet3: support larger MTU with version 6' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'net/hns3: fix fully use hardware flow director table' " luca.boccassi
                       ` (5 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 0ea0a51821fea3f95782dd3ade82aafa7aeb86cf Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Thu, 7 Nov 2024 19:56:44 +0800
Subject: [PATCH] net/hns3: fix error code for repeatedly create counter

[ upstream commit 585f1f68f18c7acbc4f920053cbf4ba888e0c271 ]

Return EINVAL instead of ENOSPC when the same counter ID is
used for multiple times to create a counter.

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

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/hns3/hns3_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index ec2000064c..9fbdf1dbe9 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -283,7 +283,7 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t indirect, uint32_t id,
 	cnt = hns3_counter_lookup(dev, id);
 	if (cnt) {
 		if (!cnt->indirect || cnt->indirect != indirect)
-			return rte_flow_error_set(error, ENOTSUP,
+			return rte_flow_error_set(error, EINVAL,
 				RTE_FLOW_ERROR_TYPE_ACTION_CONF,
 				cnt,
 				"Counter id is used, indirect flag not match");
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.760224739 +0000
+++ 0034-net-hns3-fix-error-code-for-repeatedly-create-counte.patch	2024-11-12 22:06:58.687307516 +0000
@@ -1 +1 @@
-From 585f1f68f18c7acbc4f920053cbf4ba888e0c271 Mon Sep 17 00:00:00 2001
+From 0ea0a51821fea3f95782dd3ade82aafa7aeb86cf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 585f1f68f18c7acbc4f920053cbf4ba888e0c271 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 192ffc015e..266934b45b 100644
+index ec2000064c..9fbdf1dbe9 100644
@@ -23 +24 @@
-@@ -286,7 +286,7 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t indirect, uint32_t id,
+@@ -283,7 +283,7 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t indirect, uint32_t id,

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

* patch 'net/hns3: fix fully use hardware flow director table' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (32 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/hns3: fix error code for repeatedly create counter' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'event/octeontx: fix possible integer overflow' " luca.boccassi
                       ` (4 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/83e31233d25065bdc9192d6d627667a371d99ef9

Thanks.

Luca Boccassi

---
From 83e31233d25065bdc9192d6d627667a371d99ef9 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Thu, 7 Nov 2024 19:56:45 +0800
Subject: [PATCH] net/hns3: fix fully use hardware flow director table

[ upstream commit b8e60c33168a2999604c17322dd0198a6746428f ]

The hns3 driver checks whether the flow rule is repeatedly inserted
based on rte_hash. Currently, the rte_hash extendable bucket table
feature is not enabled. When there are many hash conflicts, the hash
table space cannot be fully used. So the flow rule maybe cannot be
inserted even if the hardware flow director table there are still free.
This patch fix it by enabling the rte_hash extensible bucket table
feature.

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

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/hns3/hns3_fdir.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index a3e79619ec..73d4a25d63 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -832,6 +832,7 @@ int hns3_fdir_filter_init(struct hns3_adapter *hns)
 		.key_len = sizeof(struct hns3_fdir_key_conf),
 		.hash_func = rte_hash_crc,
 		.hash_func_init_val = 0,
+		.extra_flag = RTE_HASH_EXTRA_FLAGS_EXT_TABLE,
 	};
 	int ret;
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.789647510 +0000
+++ 0035-net-hns3-fix-fully-use-hardware-flow-director-table.patch	2024-11-12 22:06:58.687307516 +0000
@@ -1 +1 @@
-From b8e60c33168a2999604c17322dd0198a6746428f Mon Sep 17 00:00:00 2001
+From 83e31233d25065bdc9192d6d627667a371d99ef9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b8e60c33168a2999604c17322dd0198a6746428f ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index d18d083535..aacad40e61 100644
+index a3e79619ec..73d4a25d63 100644
@@ -28 +29 @@
-@@ -900,6 +900,7 @@ int hns3_fdir_filter_init(struct hns3_adapter *hns)
+@@ -832,6 +832,7 @@ int hns3_fdir_filter_init(struct hns3_adapter *hns)

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

* patch 'event/octeontx: fix possible integer overflow' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (33 preceding siblings ...)
  2024-11-12 22:07     ` patch 'net/hns3: fix fully use hardware flow director table' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'baseband/acc: fix ring memory allocation' " luca.boccassi
                       ` (3 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Hanumanth Pothula; +Cc: Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4535755a94940156c976170701b9b18d64be9f8f

Thanks.

Luca Boccassi

---
From 4535755a94940156c976170701b9b18d64be9f8f Mon Sep 17 00:00:00 2001
From: Hanumanth Pothula <hpothula@marvell.com>
Date: Fri, 25 Oct 2024 16:28:02 +0530
Subject: [PATCH] event/octeontx: fix possible integer overflow

[ upstream commit 3e86eee028c69b98144e2c62ec48091467e790be ]

The last argument passed to ssovf_parsekv() is an
unsigned char*, but it is accessed as an integer.
This can lead to an integer overflow.

Hence, make ensure the argument is accessed as a char
and for better error handling use strtol instead of atoi.

Bugzilla ID: 1512
Fixes: 3516327e00fd ("event/octeontx: add selftest to device arguments")

Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 drivers/event/octeontx/ssovf_evdev.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index d5e223077d..62eeaf7136 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -714,10 +714,20 @@ ssovf_close(struct rte_eventdev *dev)
 }
 
 static int
-ssovf_parsekv(const char *key __rte_unused, const char *value, void *opaque)
+ssovf_parsekv(const char *key, const char *value, void *opaque)
 {
-	int *flag = opaque;
-	*flag = !!atoi(value);
+	uint8_t *flag = opaque;
+	uint64_t v;
+	char *end;
+
+	errno = 0;
+	v = strtoul(value, &end, 0);
+	if ((errno != 0) || (value == end) || *end != '\0' || v > 1) {
+		ssovf_log_err("invalid %s value %s", key, value);
+		return -EINVAL;
+	}
+
+	*flag = !!v;
 	return 0;
 }
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.816542360 +0000
+++ 0036-event-octeontx-fix-possible-integer-overflow.patch	2024-11-12 22:06:58.687307516 +0000
@@ -1 +1 @@
-From 3e86eee028c69b98144e2c62ec48091467e790be Mon Sep 17 00:00:00 2001
+From 4535755a94940156c976170701b9b18d64be9f8f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e86eee028c69b98144e2c62ec48091467e790be ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 3a933b1db7..957fcab04e 100644
+index d5e223077d..62eeaf7136 100644
@@ -27 +28 @@
-@@ -717,10 +717,20 @@ ssovf_close(struct rte_eventdev *dev)
+@@ -714,10 +714,20 @@ ssovf_close(struct rte_eventdev *dev)

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

* patch 'baseband/acc: fix ring memory allocation' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (34 preceding siblings ...)
  2024-11-12 22:07     ` patch 'event/octeontx: fix possible integer overflow' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'crypto/openssl: fix potential string overflow' " luca.boccassi
                       ` (2 subsequent siblings)
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Nicolas Chautru; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/58d7a7a993b52b5120205cbada4f0d0c2173af9a

Thanks.

Luca Boccassi

---
From 58d7a7a993b52b5120205cbada4f0d0c2173af9a Mon Sep 17 00:00:00 2001
From: Nicolas Chautru <nicolas.chautru@intel.com>
Date: Thu, 7 Nov 2024 16:32:38 -0800
Subject: [PATCH] baseband/acc: fix ring memory allocation

[ upstream commit 0c5709824b531e83b36ed91852cea98b1cb292e1 ]

Allowing ring memory allocation whose end address is aligned with 64 MB.
Previous logic was off by one.

Fixes: 060e76729302 ("baseband/acc100: add queue configuration")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc/acc_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h
index 7ea3cc9a02..ddd7d63f8a 100644
--- a/drivers/baseband/acc/acc_common.h
+++ b/drivers/baseband/acc/acc_common.h
@@ -729,7 +729,7 @@ alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc_device *d,
 				sw_rings_base, ACC_SIZE_64MBYTE);
 		next_64mb_align_addr_iova = sw_rings_base_iova +
 				next_64mb_align_offset;
-		sw_ring_iova_end_addr = sw_rings_base_iova + dev_sw_ring_size;
+		sw_ring_iova_end_addr = sw_rings_base_iova + dev_sw_ring_size - 1;
 
 		/* Check if the end of the sw ring memory block is before the
 		 * start of next 64MB aligned mem address
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.845769612 +0000
+++ 0037-baseband-acc-fix-ring-memory-allocation.patch	2024-11-12 22:06:58.687307516 +0000
@@ -1 +1 @@
-From 0c5709824b531e83b36ed91852cea98b1cb292e1 Mon Sep 17 00:00:00 2001
+From 58d7a7a993b52b5120205cbada4f0d0c2173af9a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0c5709824b531e83b36ed91852cea98b1cb292e1 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 4c60b7896b..bf218332be 100644
+index 7ea3cc9a02..ddd7d63f8a 100644
@@ -22 +23 @@
-@@ -795,7 +795,7 @@ alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc_device *d,
+@@ -729,7 +729,7 @@ alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc_device *d,

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

* patch 'crypto/openssl: fix potential string overflow' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (35 preceding siblings ...)
  2024-11-12 22:07     ` patch 'baseband/acc: fix ring memory allocation' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'test/crypto: fix synchronous API calls' " luca.boccassi
  2024-11-12 22:07     ` patch 'crypto/qat: fix modexp/inv length' " luca.boccassi
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From ed2eb5bc8104fdf561f2a547eeb93872e0e057f2 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 17 Oct 2024 09:07:53 -0700
Subject: [PATCH] crypto/openssl: fix potential string overflow

[ upstream commit c5819b0d96d1a24c25aa4324913fd2566eb19ae9 ]

The algorithm name is a string and should be copied with strlcpy()
rather than rte_memcpy(). This fixes a warning detected with
clang and ASAN.

Bugzilla ID: 1565
Fixes: 2b9c693f6ef5 ("crypto/openssl: support AES-CMAC operations")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 0d4c84c18b..7eaa9650b6 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -676,7 +676,7 @@ openssl_set_session_auth_parameters(struct openssl_session *sess,
 		else
 			return -EINVAL;
 
-		rte_memcpy(algo_name, algo, strlen(algo) + 1);
+		strlcpy(algo_name, algo, sizeof(algo_name));
 		params[0] = OSSL_PARAM_construct_utf8_string(
 				OSSL_MAC_PARAM_CIPHER, algo_name, 0);
 		params[1] = OSSL_PARAM_construct_end();
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.873071652 +0000
+++ 0038-crypto-openssl-fix-potential-string-overflow.patch	2024-11-12 22:06:58.687307516 +0000
@@ -1 +1 @@
-From c5819b0d96d1a24c25aa4324913fd2566eb19ae9 Mon Sep 17 00:00:00 2001
+From ed2eb5bc8104fdf561f2a547eeb93872e0e057f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c5819b0d96d1a24c25aa4324913fd2566eb19ae9 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 0616383921..b2442c7ebf 100644
+index 0d4c84c18b..7eaa9650b6 100644
@@ -23 +24 @@
-@@ -677,7 +677,7 @@ openssl_set_session_auth_parameters(struct openssl_session *sess,
+@@ -676,7 +676,7 @@ openssl_set_session_auth_parameters(struct openssl_session *sess,

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

* patch 'test/crypto: fix synchronous API calls' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (36 preceding siblings ...)
  2024-11-12 22:07     ` patch 'crypto/openssl: fix potential string overflow' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-12 22:07     ` patch 'crypto/qat: fix modexp/inv length' " luca.boccassi
  38 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Brian Dooley; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/613e1f7f9edc2f715a217e830b03d009b66c995c

Thanks.

Luca Boccassi

---
From 613e1f7f9edc2f715a217e830b03d009b66c995c Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Fri, 25 Oct 2024 15:22:51 +0100
Subject: [PATCH] test/crypto: fix synchronous API calls

[ upstream commit 251fdc592da5eddc4d84a95d0c151b0134504a32 ]

For the synchronous API the enqueue/dequeue burst functions are not
called. Skip these tests when calling the synchronous API.

Fixes: 4ad17a1c8fb3 ("test/crypto: fix enqueue/dequeue callback case")

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
---
 app/test/test_cryptodev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 2069ccad3b..b093fd4ae9 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -12692,6 +12692,10 @@ test_enq_callback_setup(void)
 	uint16_t qp_id = 0;
 	int j = 0;
 
+	/* Skip test if synchronous API is used */
+	if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
+		return TEST_SKIPPED;
+
 	/* Verify the crypto capabilities for which enqueue/dequeue is done. */
 	cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
 	cap_idx.algo.auth = RTE_CRYPTO_AUTH_NULL;
@@ -12813,6 +12817,10 @@ test_deq_callback_setup(void)
 	uint16_t qp_id = 0;
 	int j = 0;
 
+	/* Skip test if synchronous API is used */
+	if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
+		return TEST_SKIPPED;
+
 	/* Verify the crypto capabilities for which enqueue/dequeue is done. */
 	cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
 	cap_idx.algo.auth = RTE_CRYPTO_AUTH_NULL;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.903326567 +0000
+++ 0039-test-crypto-fix-synchronous-API-calls.patch	2024-11-12 22:06:58.695307642 +0000
@@ -1 +1 @@
-From 251fdc592da5eddc4d84a95d0c151b0134504a32 Mon Sep 17 00:00:00 2001
+From 613e1f7f9edc2f715a217e830b03d009b66c995c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 251fdc592da5eddc4d84a95d0c151b0134504a32 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -14,2 +15,2 @@
- app/test/test_cryptodev.c | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
+ app/test/test_cryptodev.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
@@ -18 +19 @@
-index 25eef342b0..c647baeee1 100644
+index 2069ccad3b..b093fd4ae9 100644
@@ -21,11 +22 @@
-@@ -2496,7 +2496,8 @@ test_queue_pair_descriptor_count(void)
- 	int qp_depth = 0;
- 	int i;
- 
--	RTE_VERIFY(gbl_action_type != RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO);
-+	if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
-+		return TEST_SKIPPED;
- 
- 	/* Verify if the queue pair depth API is supported by driver */
- 	qp_depth = rte_cryptodev_qp_depth_used(ts_params->valid_devs[0], 0);
-@@ -15135,6 +15136,10 @@ test_enq_callback_setup(void)
+@@ -12692,6 +12692,10 @@ test_enq_callback_setup(void)
@@ -42 +33 @@
-@@ -15256,6 +15261,10 @@ test_deq_callback_setup(void)
+@@ -12813,6 +12817,10 @@ test_deq_callback_setup(void)

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

* patch 'crypto/qat: fix modexp/inv length' has been queued to stable release 22.11.7
  2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
                       ` (37 preceding siblings ...)
  2024-11-12 22:07     ` patch 'test/crypto: fix synchronous API calls' " luca.boccassi
@ 2024-11-12 22:07     ` luca.boccassi
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
  38 siblings, 1 reply; 155+ messages in thread
From: luca.boccassi @ 2024-11-12 22:07 UTC (permalink / raw)
  To: Arkadiusz Kusztal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From ff8e326ee23987703817b168dddc554bdbd8715c Mon Sep 17 00:00:00 2001
From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Date: Thu, 31 Oct 2024 19:19:17 +0000
Subject: [PATCH] crypto/qat: fix modexp/inv length

[ upstream commit 5b2fe7ef3c1b731f086d9454262a530a082b0441 ]

This commit fixes an unset length in modular algorithms
in QAT asymmetric crypto PMD.

Fixes: 3b78aa7b2317 ("crypto/qat: refactor asymmetric crypto functions")

Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
 drivers/crypto/qat/qat_asym.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c
index 82e165538d..e67ebe4f9f 100644
--- a/drivers/crypto/qat/qat_asym.c
+++ b/drivers/crypto/qat/qat_asym.c
@@ -268,6 +268,7 @@ modexp_collect(struct rte_crypto_asym_op *asym_op,
 	rte_memcpy(modexp_result,
 		cookie->output_array[0] + alg_bytesize
 		- n.length, n.length);
+	asym_op->modex.result.length = alg_bytesize;
 	HEXDUMP("ModExp result", cookie->output_array[0],
 			alg_bytesize);
 	return RTE_CRYPTO_OP_STATUS_SUCCESS;
@@ -329,6 +330,7 @@ modinv_collect(struct rte_crypto_asym_op *asym_op,
 		- n.length),
 		cookie->output_array[0] + alg_bytesize
 		- n.length, n.length);
+	asym_op->modinv.result.length = alg_bytesize;
 	HEXDUMP("ModInv result", cookie->output_array[0],
 			alg_bytesize);
 	return RTE_CRYPTO_OP_STATUS_SUCCESS;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:59.939641525 +0000
+++ 0040-crypto-qat-fix-modexp-inv-length.patch	2024-11-12 22:06:58.695307642 +0000
@@ -1 +1 @@
-From 5b2fe7ef3c1b731f086d9454262a530a082b0441 Mon Sep 17 00:00:00 2001
+From ff8e326ee23987703817b168dddc554bdbd8715c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5b2fe7ef3c1b731f086d9454262a530a082b0441 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 9e97582e22..7bb2f6c1e0 100644
+index 82e165538d..e67ebe4f9f 100644
@@ -21 +22 @@
-@@ -277,6 +277,7 @@ modexp_collect(struct rte_crypto_asym_op *asym_op,
+@@ -268,6 +268,7 @@ modexp_collect(struct rte_crypto_asym_op *asym_op,
@@ -29 +30 @@
-@@ -338,6 +339,7 @@ modinv_collect(struct rte_crypto_asym_op *asym_op,
+@@ -329,6 +330,7 @@ modinv_collect(struct rte_crypto_asym_op *asym_op,

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

* Re: patch 'eal/unix: optimize thread creation' has been queued to stable release 22.11.7
  2024-11-12 22:07     ` patch 'eal/unix: optimize thread creation' " luca.boccassi
@ 2024-11-13  7:45       ` David Marchand
  0 siblings, 0 replies; 155+ messages in thread
From: David Marchand @ 2024-11-13  7:45 UTC (permalink / raw)
  To: luca.boccassi
  Cc: Luca Boccassi, Stephen Hemminger, Chengwen Feng, dpdk stable

Hello Luca,

On Tue, Nov 12, 2024 at 11:08 PM <luca.boccassi@gmail.com> wrote:
> @@ -142,6 +148,16 @@ rte_thread_create(rte_thread_t *thread_id,
>
>                 attrp = &attr;
>
> +#ifdef RTE_EAL_PTHREAD_ATTR_SETAFFINITY_NP
> +               if (CPU_COUNT(&thread_attr->cpuset) > 0) {
> +                       ret = pthread_attr_setaffinity_np(attrp, sizeof(thread_attr->cpuset),
> +                               &thread_attr->cpuset);
> +                       if (ret != 0) {
> +                               RTE_LOG(DEBUG, EAL, "pthread_attr_setaffinity_np failed");

This message is missing a final \n.
The rest looks good to me.


> +                               goto cleanup;
> +                       }
> +               }
> +#endif
>                 /*
>                  * Set the inherit scheduler parameter to explicit,
>                  * otherwise the priority attribute is ignored.


-- 
David Marchand


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

* patch 'net/bnxt/tf_core: fix Thor TF EM key size check' has been queued to stable release 22.11.7
  2024-11-12 22:07     ` patch 'crypto/qat: fix modexp/inv length' " luca.boccassi
@ 2024-11-20 23:41       ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/bnxt/tf_ulp: fix parent child DB counters' " luca.boccassi
                           ` (26 more replies)
  0 siblings, 27 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Farah Smith
  Cc: Sriharsha Basavapatna, Kishore Padmanabha, Shahaji Bhosle,
	Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 0c320c96679d370220183d7d7329f595aed7854a Mon Sep 17 00:00:00 2001
From: Farah Smith <farah.smith@broadcom.com>
Date: Thu, 7 Nov 2024 19:22:11 +0530
Subject: [PATCH] net/bnxt/tf_core: fix Thor TF EM key size check

[ upstream commit 912abed4250c792214886880fa0b93b7712fba21 ]

The maximum EM key size is 640 bits for Thor.  But the lookup record
+ the key size is 679 bits.  This value must be rounded up to a 128 bit
aligned number.  So the size check should be 96 bytes rather than 80.
This fix allows keys > 601 bits to be successfully inserted.

Fixes: 539931eab3a5 ("net/bnxt: support EM with FKB")

Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_core/tf_msg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/tf_core/tf_msg.c b/drivers/net/bnxt/tf_core/tf_msg.c
index fbc96d374c..f468de564d 100644
--- a/drivers/net/bnxt/tf_core/tf_msg.c
+++ b/drivers/net/bnxt/tf_core/tf_msg.c
@@ -25,7 +25,7 @@
  */
 #define TF_MSG_SET_GLOBAL_CFG_DATA_SIZE  16
 #define TF_MSG_EM_INSERT_KEY_SIZE        64
-#define TF_MSG_EM_INSERT_RECORD_SIZE     80
+#define TF_MSG_EM_INSERT_RECORD_SIZE     96
 #define TF_MSG_TBL_TYPE_SET_DATA_SIZE    88
 
 /* Compile check - Catch any msg changes that we depend on, like the
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:22.800355868 +0000
+++ 0001-net-bnxt-tf_core-fix-Thor-TF-EM-key-size-check.patch	2024-11-20 23:41:22.680195466 +0000
@@ -1 +1 @@
-From 912abed4250c792214886880fa0b93b7712fba21 Mon Sep 17 00:00:00 2001
+From 0c320c96679d370220183d7d7329f595aed7854a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 912abed4250c792214886880fa0b93b7712fba21 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 08e9783d52..dd5ea1c80e 100644
+index fbc96d374c..f468de564d 100644

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

* patch 'net/bnxt/tf_ulp: fix parent child DB counters' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/bnxt: fix reading SFF-8436 SFP EEPROMs' " luca.boccassi
                           ` (25 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Kishore Padmanabha
  Cc: Shuanglin Wang, Sriharsha Basavapatna, Mike Baucom,
	Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/768828f6a2b947f0641562ca8a4d0b88170244f6

Thanks.

Luca Boccassi

---
From 768828f6a2b947f0641562ca8a4d0b88170244f6 Mon Sep 17 00:00:00 2001
From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Date: Thu, 7 Nov 2024 19:22:34 +0530
Subject: [PATCH] net/bnxt/tf_ulp: fix parent child DB counters

[ upstream commit 8782e4de3ef2e55bd4aed98dc18e26d2bfc83868 ]

The locking for the parent child counters need to be done till the
stats are retrieved. Also the OVS is creating multiple F1 flows for
same tunnel hence reference count needs to be maintined for the F1
flows.

Fix name conflicts for class and action tables. Matcher allocates
hash tables for class and action entries. These tables should have
different names for each port.

Fixes: bdf4a3c6316b ("net/bnxt: support tunnel offload")

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c  | 26 +++++++++++++++++---------
 drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 21 ++++++++++++++-------
 drivers/net/bnxt/tf_ulp/ulp_flow_db.h |  2 ++
 3 files changed, 33 insertions(+), 16 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
index 85c9cbb7f2..69a244bd65 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
@@ -720,18 +720,21 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
 
 	} while (!rc && nxt_resource_index);
 
-	bnxt_ulp_cntxt_release_fdb_lock(ctxt);
-
-	if (rc || !found_cntr_resource)
+	if (rc || !found_cntr_resource) {
+		bnxt_ulp_cntxt_release_fdb_lock(ctxt);
 		return rc;
+	}
 
 	dir = params.direction;
 	hw_cntr_id = params.resource_hndl;
 	if (!found_parent_flow &&
 	    params.resource_sub_type ==
 			BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_INT_COUNT) {
-		if (!ulp_fc_info->num_counters)
-			return ulp_fc_tf_flow_stat_get(ctxt, &params, count);
+		if (!ulp_fc_info->num_counters) {
+			rc = ulp_fc_tf_flow_stat_get(ctxt, &params, count);
+			bnxt_ulp_cntxt_release_fdb_lock(ctxt);
+			return rc;
+		}
 
 		/* TODO:
 		 * Think about optimizing with try_lock later
@@ -755,9 +758,14 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
 		   params.resource_sub_type ==
 			BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_INT_COUNT) {
 		/* Get stats from the parent child table */
-		ulp_flow_db_parent_flow_count_get(ctxt, pc_idx,
-						  &count->hits, &count->bytes,
-						  count->reset);
+		if (ulp_flow_db_parent_flow_count_get(ctxt, flow_id,
+						      pc_idx,
+						      &count->hits,
+						      &count->bytes,
+						      count->reset)) {
+			bnxt_ulp_cntxt_release_fdb_lock(ctxt);
+			return -EIO;
+		}
 		if (count->hits)
 			count->hits_set = 1;
 		if (count->bytes)
@@ -766,7 +774,7 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
 		/* TBD: Handle External counters */
 		rc = -EINVAL;
 	}
-
+	bnxt_ulp_cntxt_release_fdb_lock(ctxt);
 	return rc;
 }
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
index 9968311c44..51ea3203bc 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
@@ -1361,13 +1361,12 @@ ulp_flow_db_pc_db_parent_flow_set(struct bnxt_ulp_context *ulp_ctxt,
 
 	if (set_flag) {
 		pc_entry->parent_fid = parent_fid;
+		pc_entry->parent_ref_cnt++;
 	} else {
-		if (pc_entry->parent_fid != parent_fid)
-			BNXT_TF_DBG(ERR, "Panic: invalid parent id\n");
-		pc_entry->parent_fid = 0;
-
+		if (pc_entry->parent_ref_cnt > 0)
+			pc_entry->parent_ref_cnt--;
 		/* Free the parent child db entry if no user present */
-		if (!pc_entry->f2_cnt)
+		if (!pc_entry->parent_ref_cnt && !pc_entry->f2_cnt)
 			ulp_flow_db_pc_db_entry_free(ulp_ctxt, pc_entry);
 	}
 	return 0;
@@ -1422,7 +1421,7 @@ ulp_flow_db_pc_db_child_flow_set(struct bnxt_ulp_context *ulp_ctxt,
 		ULP_INDEX_BITMAP_RESET(t[a_idx], child_fid);
 		if (pc_entry->f2_cnt)
 			pc_entry->f2_cnt--;
-		if (!pc_entry->f2_cnt && !pc_entry->parent_fid)
+		if (!pc_entry->f2_cnt && !pc_entry->parent_ref_cnt)
 			ulp_flow_db_pc_db_entry_free(ulp_ctxt, pc_entry);
 	}
 	return 0;
@@ -1514,7 +1513,7 @@ ulp_flow_db_parent_flow_count_accum_set(struct bnxt_ulp_context *ulp_ctxt,
 	/* check for parent idx validity */
 	p_pdb = &flow_db->parent_child_db;
 	if (pc_idx >= p_pdb->entries_count ||
-	    !p_pdb->parent_flow_tbl[pc_idx].parent_fid) {
+	    !p_pdb->parent_flow_tbl[pc_idx].parent_ref_cnt) {
 		BNXT_TF_DBG(ERR, "Invalid parent child index %x\n", pc_idx);
 		return -EINVAL;
 	}
@@ -1761,6 +1760,7 @@ ulp_flow_db_parent_flow_count_update(struct bnxt_ulp_context *ulp_ctxt,
  */
 int32_t
 ulp_flow_db_parent_flow_count_get(struct bnxt_ulp_context *ulp_ctxt,
+				  uint32_t flow_id,
 				  uint32_t pc_idx, uint64_t *packet_count,
 				  uint64_t *byte_count, uint8_t count_reset)
 {
@@ -1773,6 +1773,13 @@ ulp_flow_db_parent_flow_count_get(struct bnxt_ulp_context *ulp_ctxt,
 		return -EINVAL;
 	}
 
+	/* stale parent fid */
+	if (flow_id != pc_entry->parent_fid) {
+		*packet_count = 0;
+		*byte_count = 0;
+		return 0;
+	}
+
 	if (pc_entry->counter_acc) {
 		*packet_count = pc_entry->pkt_count;
 		*byte_count = pc_entry->byte_count;
diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.h b/drivers/net/bnxt/tf_ulp/ulp_flow_db.h
index 2b02836a40..31afd55094 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.h
@@ -60,6 +60,7 @@ struct bnxt_ulp_flow_tbl {
 struct ulp_fdb_parent_info {
 	uint32_t	valid;
 	uint32_t	parent_fid;
+	uint32_t	parent_ref_cnt;
 	uint32_t	counter_acc;
 	uint64_t	pkt_count;
 	uint64_t	byte_count;
@@ -385,6 +386,7 @@ ulp_flow_db_parent_flow_count_update(struct bnxt_ulp_context *ulp_ctxt,
  */
 int32_t
 ulp_flow_db_parent_flow_count_get(struct bnxt_ulp_context *ulp_ctxt,
+				  uint32_t flow_id,
 				  uint32_t pc_idx,
 				  uint64_t *packet_count,
 				  uint64_t *byte_count,
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:22.833319971 +0000
+++ 0002-net-bnxt-tf_ulp-fix-parent-child-DB-counters.patch	2024-11-20 23:41:22.680195466 +0000
@@ -1 +1 @@
-From 8782e4de3ef2e55bd4aed98dc18e26d2bfc83868 Mon Sep 17 00:00:00 2001
+From 768828f6a2b947f0641562ca8a4d0b88170244f6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8782e4de3ef2e55bd4aed98dc18e26d2bfc83868 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -24,2 +25,2 @@
- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c  | 37 +++++++++++++++++----------
- drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 22 ++++++++++------
+ drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c  | 26 +++++++++++++++++---------
+ drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 21 ++++++++++++++-------
@@ -27,2 +28 @@
- drivers/net/bnxt/tf_ulp/ulp_matcher.c | 12 +++++++--
- 4 files changed, 50 insertions(+), 23 deletions(-)
+ 3 files changed, 33 insertions(+), 16 deletions(-)
@@ -31 +31 @@
-index b880b545da..0c46c7d4c9 100644
+index 85c9cbb7f2..69a244bd65 100644
@@ -34 +34 @@
-@@ -563,23 +563,29 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
+@@ -720,18 +720,21 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
@@ -47,10 +47 @@
--	if (!(ulp_fc_info->flags & ULP_FLAG_FC_SW_AGG_EN))
--		return fc_ops->ulp_flow_stat_get(ctxt, dir,
--						 params.resource_hndl, count);
-+	if (!(ulp_fc_info->flags & ULP_FLAG_FC_SW_AGG_EN)) {
-+		rc = fc_ops->ulp_flow_stat_get(ctxt, dir,
-+					       params.resource_hndl, count);
-+		bnxt_ulp_cntxt_release_fdb_lock(ctxt);
-+		return rc;
-+	}
- 
+ 	hw_cntr_id = params.resource_hndl;
@@ -60 +50,0 @@
- 		hw_cntr_id = params.resource_hndl;
@@ -62,2 +52 @@
--			return fc_ops->ulp_flow_stat_get(ctxt, dir,
--							 hw_cntr_id, count);
+-			return ulp_fc_tf_flow_stat_get(ctxt, &params, count);
@@ -65,2 +54 @@
-+			rc = fc_ops->ulp_flow_stat_get(ctxt, dir,
-+						       hw_cntr_id, count);
++			rc = ulp_fc_tf_flow_stat_get(ctxt, &params, count);
@@ -73 +61 @@
-@@ -603,9 +609,14 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
+@@ -755,9 +758,14 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
@@ -91,2 +79,2 @@
-@@ -613,7 +624,7 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
- 	} else {
+@@ -766,7 +774,7 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
+ 		/* TBD: Handle External counters */
@@ -101 +89 @@
-index 2ff5227774..27f1115990 100644
+index 9968311c44..51ea3203bc 100644
@@ -104,9 +92 @@
-@@ -838,7 +838,6 @@ ulp_flow_db_fid_free(struct bnxt_ulp_context *ulp_ctxt,
- #ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
- 	BNXT_DRV_DBG(DEBUG, "flow_id = %u:%u freed\n", flow_type, fid);
- #endif
--
- 	/* all good, return success */
- 	return 0;
- }
-@@ -1385,13 +1384,12 @@ ulp_flow_db_pc_db_parent_flow_set(struct bnxt_ulp_context *ulp_ctxt,
+@@ -1361,13 +1361,12 @@ ulp_flow_db_pc_db_parent_flow_set(struct bnxt_ulp_context *ulp_ctxt,
@@ -119 +99 @@
--			BNXT_DRV_DBG(ERR, "Panic: invalid parent id\n");
+-			BNXT_TF_DBG(ERR, "Panic: invalid parent id\n");
@@ -130 +110 @@
-@@ -1446,7 +1444,7 @@ ulp_flow_db_pc_db_child_flow_set(struct bnxt_ulp_context *ulp_ctxt,
+@@ -1422,7 +1421,7 @@ ulp_flow_db_pc_db_child_flow_set(struct bnxt_ulp_context *ulp_ctxt,
@@ -139 +119 @@
-@@ -1538,7 +1536,7 @@ ulp_flow_db_parent_flow_count_accum_set(struct bnxt_ulp_context *ulp_ctxt,
+@@ -1514,7 +1513,7 @@ ulp_flow_db_parent_flow_count_accum_set(struct bnxt_ulp_context *ulp_ctxt,
@@ -145 +125 @@
- 		BNXT_DRV_DBG(ERR, "Invalid parent child index %x\n", pc_idx);
+ 		BNXT_TF_DBG(ERR, "Invalid parent child index %x\n", pc_idx);
@@ -148 +128 @@
-@@ -1786,6 +1784,7 @@ ulp_flow_db_parent_flow_count_update(struct bnxt_ulp_context *ulp_ctxt,
+@@ -1761,6 +1760,7 @@ ulp_flow_db_parent_flow_count_update(struct bnxt_ulp_context *ulp_ctxt,
@@ -156 +136 @@
-@@ -1798,6 +1797,13 @@ ulp_flow_db_parent_flow_count_get(struct bnxt_ulp_context *ulp_ctxt,
+@@ -1773,6 +1773,13 @@ ulp_flow_db_parent_flow_count_get(struct bnxt_ulp_context *ulp_ctxt,
@@ -171 +151 @@
-index 39810c81c4..5a4b5a1ebf 100644
+index 2b02836a40..31afd55094 100644
@@ -174 +154 @@
-@@ -63,6 +63,7 @@ struct bnxt_ulp_flow_tbl {
+@@ -60,6 +60,7 @@ struct bnxt_ulp_flow_tbl {
@@ -182 +162 @@
-@@ -389,6 +390,7 @@ ulp_flow_db_parent_flow_count_update(struct bnxt_ulp_context *ulp_ctxt,
+@@ -385,6 +386,7 @@ ulp_flow_db_parent_flow_count_update(struct bnxt_ulp_context *ulp_ctxt,
@@ -190,24 +169,0 @@
-diff --git a/drivers/net/bnxt/tf_ulp/ulp_matcher.c b/drivers/net/bnxt/tf_ulp/ulp_matcher.c
-index b508bd2df6..9615fc7919 100644
---- a/drivers/net/bnxt/tf_ulp/ulp_matcher.c
-+++ b/drivers/net/bnxt/tf_ulp/ulp_matcher.c
-@@ -327,9 +327,17 @@ error:
- int32_t ulp_matcher_init(struct bnxt_ulp_context *ulp_ctx)
- {
- 	struct rte_hash_parameters hash_tbl_params = {0};
--	char hash_class_tbl_name[64] = "bnxt_ulp_class_matcher";
--	char hash_act_tbl_name[64] = "bnxt_ulp_act_matcher";
-+	char hash_class_tbl_name[64] = {0};
-+	char hash_act_tbl_name[64] = {0};
- 	struct bnxt_ulp_matcher_data *data;
-+	uint16_t port_id;
-+
-+	/* append port_id to the buffer name */
-+	port_id = ulp_ctx->bp->eth_dev->data->port_id;
-+	snprintf(hash_class_tbl_name, sizeof(hash_class_tbl_name),
-+		 "bnxt_ulp_class_matcher_%d", port_id);
-+	snprintf(hash_act_tbl_name, sizeof(hash_act_tbl_name),
-+		 "bnxt_ulp_act_matcher_%d", port_id);
- 
- 	data = rte_zmalloc("bnxt_ulp_matcher_data",
- 			   sizeof(struct bnxt_ulp_matcher_data), 0);

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

* patch 'net/bnxt: fix reading SFF-8436 SFP EEPROMs' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
  2024-11-20 23:41         ` patch 'net/bnxt/tf_ulp: fix parent child DB counters' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/bnxt: fix TCP and UDP checksum flags' " luca.boccassi
                           ` (24 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Peter Morrow; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/881d93b7093baa2bd22489799a4dc106a7ff82de

Thanks.

Luca Boccassi

---
From 881d93b7093baa2bd22489799a4dc106a7ff82de Mon Sep 17 00:00:00 2001
From: Peter Morrow <peter@graphiant.com>
Date: Mon, 12 Aug 2024 11:34:05 +0100
Subject: [PATCH] net/bnxt: fix reading SFF-8436 SFP EEPROMs

[ upstream commit 7b8400464f14637ed2669dbf732c256bf2447de6 ]

If a SFP which supports SFF-8436 is present then
currently the DDM information present in the eeprom
is not read. Furthermore bnxt_get_module_eeprom()
will return -EINVAL for these eeproms since the
length of these eeproms is 512 bytes but we are
only ever selecting 2 pages (256 bytes) to read.

Fixes: 6253a23491a4 ("net/bnxt: dump SFP module info")

Signed-off-by: Peter Morrow <peter@graphiant.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 .mailmap                       | 1 +
 drivers/net/bnxt/bnxt_ethdev.c | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 8ed3b479e1..bef76e5fd9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1078,6 +1078,7 @@ Peng Yu <penyu@amazon.com>
 Peng Zhang <peng.zhang@corigine.com> <peng1x.zhang@intel.com>
 Pengzhen Liu <liupengzhen3@huawei.com>
 Peter Mccarthy <peter.mccarthy@intel.com>
+Peter Morrow <peter@graphiant.com>
 Peter Spreadborough <peter.spreadborough@broadcom.com>
 Petr Houska <t-pehous@microsoft.com>
 Phanendra Vukkisala <pvukkisala@marvell.com>
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index cb52ef2f84..e44fa4405c 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3959,7 +3959,6 @@ static int bnxt_get_module_eeprom(struct rte_eth_dev *dev,
 
 	switch (module_info[0]) {
 	case SFF_MODULE_ID_SFP:
-		module_info[SFF_DIAG_SUPPORT_OFFSET] = 0;
 		if (module_info[SFF_DIAG_SUPPORT_OFFSET]) {
 			pg_addr[2] = I2C_DEV_ADDR_A2;
 			pg_addr[3] = I2C_DEV_ADDR_A2;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:22.862691175 +0000
+++ 0003-net-bnxt-fix-reading-SFF-8436-SFP-EEPROMs.patch	2024-11-20 23:41:22.684195466 +0000
@@ -1 +1 @@
-From 7b8400464f14637ed2669dbf732c256bf2447de6 Mon Sep 17 00:00:00 2001
+From 881d93b7093baa2bd22489799a4dc106a7ff82de Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7b8400464f14637ed2669dbf732c256bf2447de6 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index f293f89167..5a8ec89d47 100644
+index 8ed3b479e1..bef76e5fd9 100644
@@ -27 +28 @@
-@@ -1179,6 +1179,7 @@ Peng Yu <penyu@amazon.com>
+@@ -1078,6 +1078,7 @@ Peng Yu <penyu@amazon.com>
@@ -32 +32,0 @@
- Peter Nilsson <peter.j.nilsson@ericsson.com>
@@ -34,0 +35 @@
+ Phanendra Vukkisala <pvukkisala@marvell.com>
@@ -36 +37 @@
-index 2f5c055086..5edb162430 100644
+index cb52ef2f84..e44fa4405c 100644
@@ -39 +40 @@
-@@ -4222,7 +4222,6 @@ static int bnxt_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -3959,7 +3959,6 @@ static int bnxt_get_module_eeprom(struct rte_eth_dev *dev,

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

* patch 'net/bnxt: fix TCP and UDP checksum flags' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
  2024-11-20 23:41         ` patch 'net/bnxt/tf_ulp: fix parent child DB counters' " luca.boccassi
  2024-11-20 23:41         ` patch 'net/bnxt: fix reading SFF-8436 SFP EEPROMs' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/bnxt: fix bad action offset in Tx BD' " luca.boccassi
                           ` (23 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Kalesh AP, Damodharam Ammepalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 3d5d7a20e0de7b76b587ccaca3fca01298600166 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 13 Jun 2024 07:20:28 -0700
Subject: [PATCH] net/bnxt: fix TCP and UDP checksum flags

[ upstream commit 4c0451197e5a88531c30398b58b7e5601be90080 ]

Set TCP and UDP checksum flags explicitly for LSO capable packets.
In some older chip variants, this will enable the hardware compute
the checksum correctly for tunnel and non-tunnel packets.

Fixes: 1d76c878b21d ("net/bnxt: support updating IPID")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
---
 drivers/net/bnxt/bnxt_txr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 60bb3eea0c..1f17d77516 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -265,7 +265,9 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 
 			/* TSO */
 			txbd1->lflags |= TX_BD_LONG_LFLAGS_LSO |
-					 TX_BD_LONG_LFLAGS_T_IPID;
+					 TX_BD_LONG_LFLAGS_T_IPID |
+					 TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM |
+					 TX_BD_LONG_LFLAGS_T_IP_CHKSUM;
 			hdr_size = tx_pkt->l2_len + tx_pkt->l3_len +
 					tx_pkt->l4_len;
 			hdr_size += (tx_pkt->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) ?
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:22.894837468 +0000
+++ 0004-net-bnxt-fix-TCP-and-UDP-checksum-flags.patch	2024-11-20 23:41:22.688195466 +0000
@@ -1 +1 @@
-From 4c0451197e5a88531c30398b58b7e5601be90080 Mon Sep 17 00:00:00 2001
+From 3d5d7a20e0de7b76b587ccaca3fca01298600166 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4c0451197e5a88531c30398b58b7e5601be90080 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 12e4faa8fa..38f858f27f 100644
+index 60bb3eea0c..1f17d77516 100644
@@ -24 +25 @@
-@@ -319,7 +319,9 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
+@@ -265,7 +265,9 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,

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

* patch 'net/bnxt: fix bad action offset in Tx BD' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (2 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/bnxt: fix TCP and UDP checksum flags' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/bnx2x: remove dead conditional' " luca.boccassi
                           ` (22 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Peter Spreadborough; +Cc: Kishore Padmanabha, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From a73ed9bb245e219ead9af9e1c7327b8180760cf0 Mon Sep 17 00:00:00 2001
From: Peter Spreadborough <peter.spreadborough@broadcom.com>
Date: Tue, 16 Apr 2024 14:15:56 -0400
Subject: [PATCH] net/bnxt: fix bad action offset in Tx BD

[ upstream commit b019ddf9b1de65491b4c07c25bbab3dc70c15f79 ]

This change ensures that the high part of an action table entry
offset stored in the Tx BD is set correctly. A bad value will
cause the PDCU to abort a fetch an may stall the pipeline.

Fixes: 527b10089cc5 ("net/bnxt: optimize Tx completion handling")

Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_txr.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 1f17d77516..7820d11cc2 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -255,10 +255,15 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 		 */
 		txbd1->kid_or_ts_high_mss = 0;
 
-		if (txq->vfr_tx_cfa_action)
-			txbd1->cfa_action = txq->vfr_tx_cfa_action;
-		else
-			txbd1->cfa_action = txq->bp->tx_cfa_action;
+		if (txq->vfr_tx_cfa_action) {
+			txbd1->cfa_action = txq->vfr_tx_cfa_action & 0xffff;
+			txbd1->cfa_action_high = (txq->vfr_tx_cfa_action >> 16) &
+				TX_BD_LONG_CFA_ACTION_HIGH_MASK;
+		} else {
+			txbd1->cfa_action = txq->bp->tx_cfa_action & 0xffff;
+			txbd1->cfa_action_high = (txq->bp->tx_cfa_action >> 16) &
+				TX_BD_LONG_CFA_ACTION_HIGH_MASK;
+		}
 
 		if (tx_pkt->ol_flags & RTE_MBUF_F_TX_TCP_SEG) {
 			uint16_t hdr_size;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:22.924352683 +0000
+++ 0005-net-bnxt-fix-bad-action-offset-in-Tx-BD.patch	2024-11-20 23:41:22.688195466 +0000
@@ -1 +1 @@
-From b019ddf9b1de65491b4c07c25bbab3dc70c15f79 Mon Sep 17 00:00:00 2001
+From a73ed9bb245e219ead9af9e1c7327b8180760cf0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b019ddf9b1de65491b4c07c25bbab3dc70c15f79 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 38f858f27f..c82b11e733 100644
+index 1f17d77516..7820d11cc2 100644
@@ -24 +25 @@
-@@ -308,10 +308,15 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
+@@ -255,10 +255,15 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
@@ -42,2 +43,2 @@
- 		if (tx_pkt->ol_flags & RTE_MBUF_F_TX_TCP_SEG ||
- 		    tx_pkt->ol_flags & RTE_MBUF_F_TX_UDP_SEG) {
+ 		if (tx_pkt->ol_flags & RTE_MBUF_F_TX_TCP_SEG) {
+ 			uint16_t hdr_size;

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

* patch 'net/bnx2x: remove dead conditional' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (3 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/bnxt: fix bad action offset in Tx BD' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/bnx2x: fix always true expression' " luca.boccassi
                           ` (21 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/17006eb028a2123dafec547c18f3aa88a161246e

Thanks.

Luca Boccassi

---
From 17006eb028a2123dafec547c18f3aa88a161246e Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 12 Nov 2024 09:43:53 -0800
Subject: [PATCH] net/bnx2x: remove dead conditional

[ upstream commit 3868c0ce5ce83eacc9611cc4a83d20120ae3442e ]

The second if test here is impossible because it contradicts
previous line.

Coverity issue: 384428
Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/bnx2x/bnx2x_stats.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_stats.c b/drivers/net/bnx2x/bnx2x_stats.c
index 69132c7c80..72a26ed5cc 100644
--- a/drivers/net/bnx2x/bnx2x_stats.c
+++ b/drivers/net/bnx2x/bnx2x_stats.c
@@ -75,10 +75,6 @@ bnx2x_storm_stats_post(struct bnx2x_softc *sc)
 	int rc;
 
 	if (!sc->stats_pending) {
-		if (sc->stats_pending) {
-			return;
-		}
-
 		sc->fw_stats_req->hdr.drv_stats_counter =
 			htole16(sc->stats_counter++);
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:22.953664816 +0000
+++ 0006-net-bnx2x-remove-dead-conditional.patch	2024-11-20 23:41:22.688195466 +0000
@@ -1 +1 @@
-From 3868c0ce5ce83eacc9611cc4a83d20120ae3442e Mon Sep 17 00:00:00 2001
+From 17006eb028a2123dafec547c18f3aa88a161246e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3868c0ce5ce83eacc9611cc4a83d20120ae3442e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- drivers/net/bnx2x/bnx2x_stats.c | 3 ---
- 1 file changed, 3 deletions(-)
+ drivers/net/bnx2x/bnx2x_stats.c | 4 ----
+ 1 file changed, 4 deletions(-)
@@ -19 +20 @@
-index d473c5e7ec..8adbe7e381 100644
+index 69132c7c80..72a26ed5cc 100644
@@ -22 +23 @@
-@@ -73,9 +73,6 @@ bnx2x_storm_stats_post(struct bnx2x_softc *sc)
+@@ -75,10 +75,6 @@ bnx2x_storm_stats_post(struct bnx2x_softc *sc)
@@ -26 +27 @@
--		if (sc->stats_pending)
+-		if (sc->stats_pending) {
@@ -27,0 +29 @@
+-		}

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

* patch 'net/bnx2x: fix always true expression' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (4 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/bnx2x: remove dead conditional' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/bnx2x: fix possible infinite loop at startup' " luca.boccassi
                           ` (20 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 3b501926d5c06c24a669d0ac532b6f4e087ed6f9 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 12 Nov 2024 09:43:54 -0800
Subject: [PATCH] net/bnx2x: fix always true expression

[ upstream commit fb6b0e9a36326a4f13f496b00f7f92aaffe1d5f4 ]

Coverity spotted that the check to enable single interrupt
mode would evaluate as always true since:

 The or condition sc->interrupt_mode != 2 || sc->interrupt_mode != 3
 will always be true because sc->interrupt_mode cannot be equal to
 two different values at the same time, so it must be not equal to
 at least one of them.

Coverity issue: 362046
Fixes: 540a211084a7 ("bnx2x: driver core")

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

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 55a91fad78..8e6d2c5c80 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -11195,11 +11195,9 @@ static int bnx2x_init_hw_func(struct bnx2x_softc *sc)
 /* Turn on a single ISR mode in IGU if driver is going to use
  * INT#x or MSI
  */
-		if ((sc->interrupt_mode != INTR_MODE_MSIX)
-		    || (sc->interrupt_mode != INTR_MODE_SINGLE_MSIX)) {
+		if (sc->interrupt_mode == INTR_MODE_INTX ||
+		    sc->interrupt_mode == INTR_MODE_MSI)
 			pf_conf |= IGU_PF_CONF_SINGLE_ISR_EN;
-		}
-
 /*
  * Timers workaround bug: function init part.
  * Need to wait 20msec after initializing ILT,
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:22.981650681 +0000
+++ 0007-net-bnx2x-fix-always-true-expression.patch	2024-11-20 23:41:22.696195467 +0000
@@ -1 +1 @@
-From fb6b0e9a36326a4f13f496b00f7f92aaffe1d5f4 Mon Sep 17 00:00:00 2001
+From 3b501926d5c06c24a669d0ac532b6f4e087ed6f9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fb6b0e9a36326a4f13f496b00f7f92aaffe1d5f4 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 3153cc4d80..af31ac4604 100644
+index 55a91fad78..8e6d2c5c80 100644
@@ -27 +28 @@
-@@ -11189,11 +11189,9 @@ static int bnx2x_init_hw_func(struct bnx2x_softc *sc)
+@@ -11195,11 +11195,9 @@ static int bnx2x_init_hw_func(struct bnx2x_softc *sc)

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

* patch 'net/bnx2x: fix possible infinite loop at startup' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (5 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/bnx2x: fix always true expression' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/bnx2x: fix duplicate branch' " luca.boccassi
                           ` (19 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 0ff8ac46bab033dd2366f450366cff20b2b9d4c4 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 12 Nov 2024 09:43:55 -0800
Subject: [PATCH] net/bnx2x: fix possible infinite loop at startup

[ upstream commit a47272b052dd1c8c571a1c0b89b56aaa3ebf4351 ]

Coverity spotted that one of the loop conditions was always true.
Fix by initializing the variable using same logic as Linux
kernel driver.

Coverity issue: 362057
Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/bnx2x/bnx2x.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 8e6d2c5c80..a93642650a 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -10337,12 +10337,13 @@ static int bnx2x_init_hw_common(struct bnx2x_softc *sc)
 	REG_WR(sc, PXP2_REG_RD_DISABLE_INPUTS, 0);
 
 	if (!CHIP_IS_E1x(sc)) {
-		int factor = 0;
+		int factor = CHIP_REV_IS_EMUL(sc) ? 1000 :
+				(CHIP_REV_IS_FPGA(sc) ? 400 : 0);
 
 		ecore_init_block(sc, BLOCK_PGLUE_B, PHASE_COMMON);
 		ecore_init_block(sc, BLOCK_ATC, PHASE_COMMON);
 
-/* let the HW do it's magic... */
+		/* let the HW do it's magic... */
 		do {
 			DELAY(200000);
 			val = REG_RD(sc, ATC_REG_ATC_INIT_DONE);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.015527193 +0000
+++ 0008-net-bnx2x-fix-possible-infinite-loop-at-startup.patch	2024-11-20 23:41:22.700195467 +0000
@@ -1 +1 @@
-From a47272b052dd1c8c571a1c0b89b56aaa3ebf4351 Mon Sep 17 00:00:00 2001
+From 0ff8ac46bab033dd2366f450366cff20b2b9d4c4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a47272b052dd1c8c571a1c0b89b56aaa3ebf4351 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index af31ac4604..d96fcb55c9 100644
+index 8e6d2c5c80..a93642650a 100644
@@ -23 +24 @@
-@@ -10331,12 +10331,13 @@ static int bnx2x_init_hw_common(struct bnx2x_softc *sc)
+@@ -10337,12 +10337,13 @@ static int bnx2x_init_hw_common(struct bnx2x_softc *sc)

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

* patch 'net/bnx2x: fix duplicate branch' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (6 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/bnx2x: fix possible infinite loop at startup' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'common/cnxk: fix build on Ubuntu 24.04' " luca.boccassi
                           ` (18 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From e7686974859ea99169da0175fce846e77405c596 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 12 Nov 2024 09:43:56 -0800
Subject: [PATCH] net/bnx2x: fix duplicate branch

[ upstream commit 87e210eb086f49f32733c579003b9565e46535d7 ]

Coverity spotted that both legs of the conditional are the same.
Looking at kernel driver there is additional code there, but the
kernel driver supports Wake On Lan, and DPDK does not.

Coverity issue: 362072
Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/bnx2x/bnx2x.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index a93642650a..7493563911 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -1623,16 +1623,12 @@ static int bnx2x_nic_unload_no_mcp(struct bnx2x_softc *sc)
 }
 
 /* request unload mode from the MCP: COMMON, PORT or FUNCTION */
-static uint32_t bnx2x_send_unload_req(struct bnx2x_softc *sc, int unload_mode)
+static uint32_t bnx2x_send_unload_req(struct bnx2x_softc *sc, int unload_mode __rte_unused)
 {
 	uint32_t reset_code = 0;
 
 	/* Select the UNLOAD request mode */
-	if (unload_mode == UNLOAD_NORMAL) {
-		reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS;
-	} else {
-		reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS;
-	}
+	reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS;
 
 	/* Send the request to the MCP */
 	if (!BNX2X_NOMCP(sc)) {
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.049020593 +0000
+++ 0009-net-bnx2x-fix-duplicate-branch.patch	2024-11-20 23:41:22.704195467 +0000
@@ -1 +1 @@
-From 87e210eb086f49f32733c579003b9565e46535d7 Mon Sep 17 00:00:00 2001
+From e7686974859ea99169da0175fce846e77405c596 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 87e210eb086f49f32733c579003b9565e46535d7 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d96fcb55c9..51e5cabf7b 100644
+index a93642650a..7493563911 100644

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

* patch 'common/cnxk: fix build on Ubuntu 24.04' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (7 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/bnx2x: fix duplicate branch' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/cnxk: " luca.boccassi
                           ` (17 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Sunil Kumar Kori; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From fcd2d7fa4304685b0d5aa1d162db551fc4ca6236 Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Thu, 14 Nov 2024 13:08:14 +0530
Subject: [PATCH] common/cnxk: fix build on Ubuntu 24.04

[ upstream commit 20c29a0e4602b9c7be5ea299457f909846c3785d ]

Due to different datatypes, warnings are thrown for writing
on space more than its size.

Bugzilla ID: 1513
Fixes: 39ac394aa7a8 ("common/cnxk: fix device MSI-X greater than default value")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
 drivers/common/cnxk/roc_irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_irq.c b/drivers/common/cnxk/roc_irq.c
index 010b121176..fb11bcbb6f 100644
--- a/drivers/common/cnxk/roc_irq.c
+++ b/drivers/common/cnxk/roc_irq.c
@@ -15,7 +15,7 @@
 
 #define MSIX_IRQ_SET_BUF_LEN                                                   \
 	(sizeof(struct vfio_irq_set) + sizeof(int) *			       \
-			(plt_intr_max_intr_get(intr_handle)))
+			((uint32_t)plt_intr_max_intr_get(intr_handle)))
 
 static int
 irq_get_info(struct plt_intr_handle *intr_handle)
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.082824108 +0000
+++ 0010-common-cnxk-fix-build-on-Ubuntu-24.04.patch	2024-11-20 23:41:22.708195467 +0000
@@ -1 +1 @@
-From 20c29a0e4602b9c7be5ea299457f909846c3785d Mon Sep 17 00:00:00 2001
+From fcd2d7fa4304685b0d5aa1d162db551fc4ca6236 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 20c29a0e4602b9c7be5ea299457f909846c3785d ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a709c4047d..0b21b9e2d9 100644
+index 010b121176..fb11bcbb6f 100644

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

* patch 'net/cnxk: fix build on Ubuntu 24.04' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (8 preceding siblings ...)
  2024-11-20 23:41         ` patch 'common/cnxk: fix build on Ubuntu 24.04' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'examples/l2fwd-event: fix spinlock handling' " luca.boccassi
                           ` (16 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Sunil Kumar Kori; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 0bb02c5a2f86b59f79adc1d8f10ff07742b2c526 Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Thu, 14 Nov 2024 13:08:16 +0530
Subject: [PATCH] net/cnxk: fix build on Ubuntu 24.04

[ upstream commit b9799fb5e7a38c824c91b88d3c89250d23c783e6 ]

Due to implicit unsigned to signed integer conversion, actual value gets
wrapped and becomes higher than its size.

Bugzilla ID: 1513
Fixes: 03b152389fb1 ("net/cnxk: add option to enable custom inbound SA")
Fixes: 7df4ead35436 ("net/cnxk: support parsing custom SA action")
Fixes: 47cca253d605 ("net/cnxk: support Rx inject")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev_devargs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/cnxk/cnxk_ethdev_devargs.c b/drivers/net/cnxk/cnxk_ethdev_devargs.c
index 0c89e0424f..fda619ac5f 100644
--- a/drivers/net/cnxk/cnxk_ethdev_devargs.c
+++ b/drivers/net/cnxk/cnxk_ethdev_devargs.c
@@ -269,7 +269,7 @@ cnxk_ethdev_parse_devargs(struct rte_devargs *devargs, struct cnxk_eth_dev *dev)
 	uint16_t custom_sa_act = 0;
 	struct rte_kvargs *kvlist;
 	uint16_t no_inl_dev = 0;
-	uint8_t lock_rx_ctx = 0;
+	uint16_t lock_rx_ctx = 0;
 
 	memset(&sdp_chan, 0, sizeof(sdp_chan));
 	memset(&pre_l2_info, 0, sizeof(struct flow_pre_l2_size_info));
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.111046007 +0000
+++ 0011-net-cnxk-fix-build-on-Ubuntu-24.04.patch	2024-11-20 23:41:22.708195467 +0000
@@ -1 +1 @@
-From b9799fb5e7a38c824c91b88d3c89250d23c783e6 Mon Sep 17 00:00:00 2001
+From 0bb02c5a2f86b59f79adc1d8f10ff07742b2c526 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b9799fb5e7a38c824c91b88d3c89250d23c783e6 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/cnxk/cnxk_ethdev_devargs.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ drivers/net/cnxk/cnxk_ethdev_devargs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -21 +22 @@
-index 5bd50bb9a1..ecc2ea8b77 100644
+index 0c89e0424f..fda619ac5f 100644
@@ -24,3 +25 @@
-@@ -305,12 +305,12 @@ cnxk_ethdev_parse_devargs(struct rte_devargs *devargs, struct cnxk_eth_dev *dev)
- 	uint16_t scalar_enable = 0;
- 	uint16_t tx_compl_ena = 0;
+@@ -269,7 +269,7 @@ cnxk_ethdev_parse_devargs(struct rte_devargs *devargs, struct cnxk_eth_dev *dev)
@@ -28,2 +26,0 @@
--	uint8_t custom_inb_sa = 0;
-+	uint16_t custom_inb_sa = 0;
@@ -31,3 +27,0 @@
- 	uint32_t meta_buf_sz = 0;
-+	uint16_t lock_rx_ctx = 0;
-+	uint16_t rx_inj_ena = 0;
@@ -36 +30 @@
--	uint8_t rx_inj_ena = 0;
++	uint16_t lock_rx_ctx = 0;

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

* patch 'examples/l2fwd-event: fix spinlock handling' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (9 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/cnxk: " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'eventdev: fix possible array underflow/overflow' " luca.boccassi
                           ` (15 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From a137ec434299bf3a9eeb8e10f490db6de7cea12d Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Thu, 14 Nov 2024 13:14:36 +0530
Subject: [PATCH] examples/l2fwd-event: fix spinlock handling

[ upstream commit 1f41deac447d7938198a2acdd1b7862161feef91 ]

Detected by pvs-studio
Bug 89-93: very suspicious synchronization
The analyzer issued a pack of V1020 warnings that a resource
might remain blocked.

Fixes: 080f57bceca4 ("examples/l2fwd-event: add eventdev main loop")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 examples/l2fwd-event/l2fwd_event.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/l2fwd-event/l2fwd_event.c b/examples/l2fwd-event/l2fwd_event.c
index 4b5a032e35..78f10f31ad 100644
--- a/examples/l2fwd-event/l2fwd_event.c
+++ b/examples/l2fwd-event/l2fwd_event.c
@@ -141,6 +141,7 @@ l2fwd_get_free_event_port(struct l2fwd_event_resources *evt_rsrc)
 	rte_spinlock_lock(&evt_rsrc->evp.lock);
 	if (index >= evt_rsrc->evp.nb_ports) {
 		printf("No free event port is available\n");
+		rte_spinlock_unlock(&evt_rsrc->evp.lock);
 		return -1;
 	}
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.139168779 +0000
+++ 0012-examples-l2fwd-event-fix-spinlock-handling.patch	2024-11-20 23:41:22.708195467 +0000
@@ -1 +1 @@
-From 1f41deac447d7938198a2acdd1b7862161feef91 Mon Sep 17 00:00:00 2001
+From a137ec434299bf3a9eeb8e10f490db6de7cea12d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1f41deac447d7938198a2acdd1b7862161feef91 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 22472027b9..416957384b 100644
+index 4b5a032e35..78f10f31ad 100644

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

* patch 'eventdev: fix possible array underflow/overflow' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (10 preceding siblings ...)
  2024-11-20 23:41         ` patch 'examples/l2fwd-event: fix spinlock handling' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/dpaa2: remove unnecessary check for null before free' " luca.boccassi
                           ` (14 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From af71652ab753ab73541c70000d74a3224a2e5df7 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 14 Nov 2024 11:55:38 +0000
Subject: [PATCH] eventdev: fix possible array underflow/overflow

[ upstream commit 952b24bd0475450e548d4aafae7d8cf48258402b ]

If the number of interrupts is zero, then indexing an array by
"nb_rx_intr - 1" will cause an out-of-bounds write  Fix this by putting
in a check that nb_rx_intr > 0 before doing the array write.

Coverity issue: 448870
Fixes: 3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/eventdev/rte_event_eth_rx_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index b4f05f250c..bd971fb63a 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -2293,7 +2293,7 @@ rxa_sw_add(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,
 			for (i = 0; i < dev_info->dev->data->nb_rx_queues; i++)
 				dev_info->intr_queue[i] = i;
 		} else {
-			if (!rxa_intr_queue(dev_info, rx_queue_id))
+			if (!rxa_intr_queue(dev_info, rx_queue_id) && nb_rx_intr > 0)
 				dev_info->intr_queue[nb_rx_intr - 1] =
 					rx_queue_id;
 		}
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.166425319 +0000
+++ 0013-eventdev-fix-possible-array-underflow-overflow.patch	2024-11-20 23:41:22.708195467 +0000
@@ -1 +1 @@
-From 952b24bd0475450e548d4aafae7d8cf48258402b Mon Sep 17 00:00:00 2001
+From af71652ab753ab73541c70000d74a3224a2e5df7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 952b24bd0475450e548d4aafae7d8cf48258402b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 3ee20d95f3..39674c4604 100644
+index b4f05f250c..bd971fb63a 100644
@@ -24 +25 @@
-@@ -2299,7 +2299,7 @@ rxa_sw_add(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,
+@@ -2293,7 +2293,7 @@ rxa_sw_add(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,

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

* patch 'net/dpaa2: remove unnecessary check for null before free' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (11 preceding siblings ...)
  2024-11-20 23:41         ` patch 'eventdev: fix possible array underflow/overflow' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'common/mlx5: fix error CQE handling for 128 bytes CQE' " luca.boccassi
                           ` (13 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/591f0841c67868b7b97aab9369a695153dc55a69

Thanks.

Luca Boccassi

---
From 591f0841c67868b7b97aab9369a695153dc55a69 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 12 Nov 2024 09:38:02 -0800
Subject: [PATCH] net/dpaa2: remove unnecessary check for null before free

[ upstream commit e6bf3256b95c77ee4d0b2874e1896d01c41c2d7c ]

Calling rte_free() with NULL parameter is allowed.
Found by nullfree.cocci

Fixes: 5964d36a2904 ("net/dpaa2: release port upon close")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 8e610b6bba..834f904c14 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -1390,8 +1390,7 @@ dpaa2_dev_close(struct rte_eth_dev *dev)
 	for (i = 0; i < MAX_TCS; i++)
 		rte_free((void *)(size_t)priv->extract.tc_extract_param[i]);
 
-	if (priv->extract.qos_extract_param)
-		rte_free((void *)(size_t)priv->extract.qos_extract_param);
+	rte_free((void *)(size_t)priv->extract.qos_extract_param);
 
 	DPAA2_PMD_INFO("%s: netdev deleted", dev->data->name);
 	return 0;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.196867601 +0000
+++ 0014-net-dpaa2-remove-unnecessary-check-for-null-before-f.patch	2024-11-20 23:41:22.712195467 +0000
@@ -1 +1 @@
-From e6bf3256b95c77ee4d0b2874e1896d01c41c2d7c Mon Sep 17 00:00:00 2001
+From 591f0841c67868b7b97aab9369a695153dc55a69 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e6bf3256b95c77ee4d0b2874e1896d01c41c2d7c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,4 +16,2 @@
- drivers/net/dpaa2/dpaa2_ethdev.c |  3 +--
- drivers/net/dpaa2/dpaa2_flow.c   | 27 +++++++++------------------
- drivers/net/dpaa2/dpaa2_mux.c    |  6 ++----
- 3 files changed, 12 insertions(+), 24 deletions(-)
+ drivers/net/dpaa2/dpaa2_ethdev.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
@@ -21 +20 @@
-index 8cbe481fb5..a9bce854c3 100644
+index 8e610b6bba..834f904c14 100644
@@ -24 +23 @@
-@@ -1401,8 +1401,7 @@ dpaa2_dev_close(struct rte_eth_dev *dev)
+@@ -1390,8 +1390,7 @@ dpaa2_dev_close(struct rte_eth_dev *dev)
@@ -26 +25 @@
- 		rte_free(priv->extract.tc_extract_param[i]);
+ 		rte_free((void *)(size_t)priv->extract.tc_extract_param[i]);
@@ -29,2 +28,2 @@
--		rte_free(priv->extract.qos_extract_param);
-+	rte_free(priv->extract.qos_extract_param);
+-		rte_free((void *)(size_t)priv->extract.qos_extract_param);
++	rte_free((void *)(size_t)priv->extract.qos_extract_param);
@@ -34,69 +32,0 @@
-diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c
-index de850ae0cf..c94eb51ba5 100644
---- a/drivers/net/dpaa2/dpaa2_flow.c
-+++ b/drivers/net/dpaa2/dpaa2_flow.c
-@@ -4784,8 +4784,7 @@ end_flow_set:
- 		}
- 	}
- 
--	if (dpaa2_pattern)
--		rte_free(dpaa2_pattern);
-+	rte_free(dpaa2_pattern);
- 
- 	return ret;
- }
-@@ -5057,14 +5056,10 @@ mem_failure:
- 
- creation_error:
- 	if (flow) {
--		if (flow->qos_key_addr)
--			rte_free(flow->qos_key_addr);
--		if (flow->qos_mask_addr)
--			rte_free(flow->qos_mask_addr);
--		if (flow->fs_key_addr)
--			rte_free(flow->fs_key_addr);
--		if (flow->fs_mask_addr)
--			rte_free(flow->fs_mask_addr);
-+		rte_free(flow->qos_key_addr);
-+		rte_free(flow->qos_mask_addr);
-+		rte_free(flow->fs_key_addr);
-+		rte_free(flow->fs_mask_addr);
- 		rte_free(flow);
- 	}
- 	priv->curr = NULL;
-@@ -5128,14 +5123,10 @@ dpaa2_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *_flow,
- 	}
- 
- 	LIST_REMOVE(flow, next);
--	if (flow->qos_key_addr)
--		rte_free(flow->qos_key_addr);
--	if (flow->qos_mask_addr)
--		rte_free(flow->qos_mask_addr);
--	if (flow->fs_key_addr)
--		rte_free(flow->fs_key_addr);
--	if (flow->fs_mask_addr)
--		rte_free(flow->fs_mask_addr);
-+	rte_free(flow->qos_key_addr);
-+	rte_free(flow->qos_mask_addr);
-+	rte_free(flow->fs_key_addr);
-+	rte_free(flow->fs_mask_addr);
- 	/* Now free the flow */
- 	rte_free(flow);
- 
-diff --git a/drivers/net/dpaa2/dpaa2_mux.c b/drivers/net/dpaa2/dpaa2_mux.c
-index e9d48a81a8..2f124313fa 100644
---- a/drivers/net/dpaa2/dpaa2_mux.c
-+++ b/drivers/net/dpaa2/dpaa2_mux.c
-@@ -329,10 +329,8 @@ rte_pmd_dpaa2_mux_flow_create(uint32_t dpdmux_id,
- 	}
- 
- creation_error:
--	if (key_cfg_va)
--		rte_free(key_cfg_va);
--	if (key_va)
--		rte_free(key_va);
-+	rte_free(key_cfg_va);
-+	rte_free(key_va);
- 
- 	return ret;
- }

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

* patch 'common/mlx5: fix error CQE handling for 128 bytes CQE' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (12 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/dpaa2: remove unnecessary check for null before free' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/mlx5: fix shared queue port number in vector Rx' " luca.boccassi
                           ` (12 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From aabf15baa5fc8bb69947b206169e33b1b1152023 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Mon, 28 Oct 2024 19:17:07 +0200
Subject: [PATCH] common/mlx5: fix error CQE handling for 128 bytes CQE

[ upstream commit 3cddeba0ca38b00c7dc646277484d08a4cb2d862 ]

The completion queue element size can be independently configured
to report either 64 or 128 bytes CQEs by programming cqe_sz parameter
at CQ creation. This parameter depends on the cache line size and
affects both regular CQEs and error CQEs. But the error handling
assumes that an error CQE is 64 bytes and doesn't take the padding
into consideration on platforms with 128-byte cache lines.
Fix the error CQE size in all error handling routines in mlx5.

Fixes: 957e45fb7bcb ("net/mlx5: handle Tx completion with error")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/mlx5_prm.h              | 29 ++++++++++++++++++++-
 drivers/common/mlx5/windows/mlx5_win_defs.h | 12 ---------
 drivers/compress/mlx5/mlx5_compress.c       |  4 +--
 drivers/net/mlx5/mlx5_flow_aso.c            |  6 ++---
 drivers/net/mlx5/mlx5_rx.c                  |  2 +-
 drivers/net/mlx5/mlx5_tx.c                  |  8 +++---
 6 files changed, 38 insertions(+), 23 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index f2cd353672..696c59d0fd 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -262,8 +262,12 @@
 /* Maximum number of DS in WQE. Limited by 6-bit field. */
 #define MLX5_DSEG_MAX 63
 
-/* The 32 bit syndrome offset in struct mlx5_err_cqe. */
+/* The 32 bit syndrome offset in struct mlx5_error_cqe. */
+#if (RTE_CACHE_LINE_SIZE == 128)
+#define MLX5_ERROR_CQE_SYNDROME_OFFSET 116
+#else
 #define MLX5_ERROR_CQE_SYNDROME_OFFSET 52
+#endif
 
 /* The completion mode offset in the WQE control segment line 2. */
 #define MLX5_COMP_MODE_OFFSET 2
@@ -403,6 +407,29 @@ struct mlx5_wqe_mprq {
 
 #define MLX5_MPRQ_STRIDE_SHIFT_BYTE 2
 
+struct mlx5_error_cqe {
+#if (RTE_CACHE_LINE_SIZE == 128)
+	uint8_t padding[64];
+#endif
+	uint8_t rsvd0[2];
+	uint16_t eth_wqe_id;
+	uint8_t	rsvd1[16];
+	uint16_t ib_stride_index;
+	uint8_t	rsvd2[10];
+	uint32_t srqn;
+	uint8_t	rsvd3[8];
+	uint32_t byte_cnt;
+	uint8_t	rsvd4[4];
+	uint8_t	hw_err_synd;
+	uint8_t	hw_synd_type;
+	uint8_t	vendor_err_synd;
+	uint8_t	syndrome;
+	uint32_t s_wqe_opcode_qpn;
+	uint16_t wqe_counter;
+	uint8_t	signature;
+	uint8_t	op_own;
+};
+
 /* CQ element structure - should be equal to the cache line size */
 struct mlx5_cqe {
 #if (RTE_CACHE_LINE_SIZE == 128)
diff --git a/drivers/common/mlx5/windows/mlx5_win_defs.h b/drivers/common/mlx5/windows/mlx5_win_defs.h
index 65da820c5e..1ddf5c553d 100644
--- a/drivers/common/mlx5/windows/mlx5_win_defs.h
+++ b/drivers/common/mlx5/windows/mlx5_win_defs.h
@@ -219,18 +219,6 @@ struct mlx5_action {
 	} dest_tir;
 };
 
-struct mlx5_err_cqe {
-	uint8_t		rsvd0[32];
-	uint32_t	srqn;
-	uint8_t		rsvd1[18];
-	uint8_t		vendor_err_synd;
-	uint8_t		syndrome;
-	uint32_t	s_wqe_opcode_qpn;
-	uint16_t	wqe_counter;
-	uint8_t		signature;
-	uint8_t		op_own;
-};
-
 struct mlx5_wqe_srq_next_seg {
 	uint8_t			rsvd0[2];
 	rte_be16_t		next_wqe_index;
diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c
index c4bf62ed41..5a4095b3a0 100644
--- a/drivers/compress/mlx5/mlx5_compress.c
+++ b/drivers/compress/mlx5/mlx5_compress.c
@@ -536,7 +536,7 @@ mlx5_compress_dump_err_objs(volatile uint32_t *cqe, volatile uint32_t *wqe,
 	size_t i;
 
 	DRV_LOG(ERR, "Error cqe:");
-	for (i = 0; i < sizeof(struct mlx5_err_cqe) >> 2; i += 4)
+	for (i = 0; i < sizeof(struct mlx5_error_cqe) >> 2; i += 4)
 		DRV_LOG(ERR, "%08X %08X %08X %08X", cqe[i], cqe[i + 1],
 			cqe[i + 2], cqe[i + 3]);
 	DRV_LOG(ERR, "\nError wqe:");
@@ -554,7 +554,7 @@ mlx5_compress_cqe_err_handle(struct mlx5_compress_qp *qp,
 			     struct rte_comp_op *op)
 {
 	const uint32_t idx = qp->ci & (qp->entries_n - 1);
-	volatile struct mlx5_err_cqe *cqe = (volatile struct mlx5_err_cqe *)
+	volatile struct mlx5_error_cqe *cqe = (volatile struct mlx5_error_cqe *)
 							      &qp->cq.cqes[idx];
 	volatile struct mlx5_gga_wqe *wqes = (volatile struct mlx5_gga_wqe *)
 								    qp->qp.wqes;
diff --git a/drivers/net/mlx5/mlx5_flow_aso.c b/drivers/net/mlx5/mlx5_flow_aso.c
index 8441be3dea..805144e27e 100644
--- a/drivers/net/mlx5/mlx5_flow_aso.c
+++ b/drivers/net/mlx5/mlx5_flow_aso.c
@@ -489,7 +489,7 @@ mlx5_aso_dump_err_objs(volatile uint32_t *cqe, volatile uint32_t *wqe)
 	int i;
 
 	DRV_LOG(ERR, "Error cqe:");
-	for (i = 0; i < 16; i += 4)
+	for (i = 0; i < (int)sizeof(struct mlx5_error_cqe) / 4; i += 4)
 		DRV_LOG(ERR, "%08X %08X %08X %08X", cqe[i], cqe[i + 1],
 			cqe[i + 2], cqe[i + 3]);
 	DRV_LOG(ERR, "\nError wqe:");
@@ -509,8 +509,8 @@ mlx5_aso_cqe_err_handle(struct mlx5_aso_sq *sq)
 {
 	struct mlx5_aso_cq *cq = &sq->cq;
 	uint32_t idx = cq->cq_ci & ((1 << cq->log_desc_n) - 1);
-	volatile struct mlx5_err_cqe *cqe =
-			(volatile struct mlx5_err_cqe *)&cq->cq_obj.cqes[idx];
+	volatile struct mlx5_error_cqe *cqe =
+			(volatile struct mlx5_error_cqe *)&cq->cq_obj.cqes[idx];
 
 	cq->errors++;
 	idx = rte_be_to_cpu_16(cqe->wqe_counter) & (1u << sq->log_desc_n);
diff --git a/drivers/net/mlx5/mlx5_rx.c b/drivers/net/mlx5/mlx5_rx.c
index 56e5568f33..0762782217 100644
--- a/drivers/net/mlx5/mlx5_rx.c
+++ b/drivers/net/mlx5/mlx5_rx.c
@@ -451,7 +451,7 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec,
 			container_of(rxq, struct mlx5_rxq_ctrl, rxq);
 	union {
 		volatile struct mlx5_cqe *cqe;
-		volatile struct mlx5_err_cqe *err_cqe;
+		volatile struct mlx5_error_cqe *err_cqe;
 	} u = {
 		.cqe = &(*rxq->cqes)[(rxq->cq_ci - vec) & cqe_mask],
 	};
diff --git a/drivers/net/mlx5/mlx5_tx.c b/drivers/net/mlx5/mlx5_tx.c
index 14e1487e59..8b1a0ca3d3 100644
--- a/drivers/net/mlx5/mlx5_tx.c
+++ b/drivers/net/mlx5/mlx5_tx.c
@@ -55,7 +55,7 @@ tx_recover_qp(struct mlx5_txq_ctrl *txq_ctrl)
 
 /* Return 1 if the error CQE is signed otherwise, sign it and return 0. */
 static int
-check_err_cqe_seen(volatile struct mlx5_err_cqe *err_cqe)
+check_err_cqe_seen(volatile struct mlx5_error_cqe *err_cqe)
 {
 	static const uint8_t magic[] = "seen";
 	int ret = 1;
@@ -83,7 +83,7 @@ check_err_cqe_seen(volatile struct mlx5_err_cqe *err_cqe)
  */
 static int
 mlx5_tx_error_cqe_handle(struct mlx5_txq_data *__rte_restrict txq,
-			 volatile struct mlx5_err_cqe *err_cqe)
+			 volatile struct mlx5_error_cqe *err_cqe)
 {
 	if (err_cqe->syndrome != MLX5_CQE_SYNDROME_WR_FLUSH_ERR) {
 		const uint16_t wqe_m = ((1 << txq->wqe_n) - 1);
@@ -107,7 +107,7 @@ mlx5_tx_error_cqe_handle(struct mlx5_txq_data *__rte_restrict txq,
 			mlx5_dump_debug_information(name, "MLX5 Error CQ:",
 						    (const void *)((uintptr_t)
 						    txq->cqes),
-						    sizeof(struct mlx5_cqe) *
+						    sizeof(struct mlx5_error_cqe) *
 						    (1 << txq->cqe_n));
 			mlx5_dump_debug_information(name, "MLX5 Error SQ:",
 						    (const void *)((uintptr_t)
@@ -206,7 +206,7 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *__rte_restrict txq,
 			 */
 			rte_wmb();
 			ret = mlx5_tx_error_cqe_handle
-				(txq, (volatile struct mlx5_err_cqe *)cqe);
+				(txq, (volatile struct mlx5_error_cqe *)cqe);
 			if (unlikely(ret < 0)) {
 				/*
 				 * Some error occurred on queue error
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.239256500 +0000
+++ 0015-common-mlx5-fix-error-CQE-handling-for-128-bytes-CQE.patch	2024-11-20 23:41:22.716195467 +0000
@@ -1 +1 @@
-From 3cddeba0ca38b00c7dc646277484d08a4cb2d862 Mon Sep 17 00:00:00 2001
+From aabf15baa5fc8bb69947b206169e33b1b1152023 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3cddeba0ca38b00c7dc646277484d08a4cb2d862 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -23,3 +23,0 @@
- drivers/crypto/mlx5/mlx5_crypto_gcm.c       |  2 +-
- drivers/crypto/mlx5/mlx5_crypto_xts.c       |  2 +-
- drivers/net/mlx5/hws/mlx5dr_send.c          |  2 +-
@@ -29 +27 @@
- 9 files changed, 41 insertions(+), 26 deletions(-)
+ 6 files changed, 38 insertions(+), 23 deletions(-)
@@ -32 +30 @@
-index 359f02f17c..210158350d 100644
+index f2cd353672..696c59d0fd 100644
@@ -35 +33 @@
-@@ -268,8 +268,12 @@
+@@ -262,8 +262,12 @@
@@ -49 +47 @@
-@@ -415,6 +419,29 @@ struct mlx5_wqe_mprq {
+@@ -403,6 +407,29 @@ struct mlx5_wqe_mprq {
@@ -80 +78 @@
-index 79e7a7f386..d60df6fd37 100644
+index 65da820c5e..1ddf5c553d 100644
@@ -103 +101 @@
-index 5998d060e4..82105bfebd 100644
+index c4bf62ed41..5a4095b3a0 100644
@@ -106 +104 @@
-@@ -602,7 +602,7 @@ mlx5_compress_dump_err_objs(volatile uint32_t *cqe, volatile uint32_t *wqe,
+@@ -536,7 +536,7 @@ mlx5_compress_dump_err_objs(volatile uint32_t *cqe, volatile uint32_t *wqe,
@@ -115 +113 @@
-@@ -620,7 +620,7 @@ mlx5_compress_cqe_err_handle(struct mlx5_compress_qp *qp,
+@@ -554,7 +554,7 @@ mlx5_compress_cqe_err_handle(struct mlx5_compress_qp *qp,
@@ -124,39 +121,0 @@
-diff --git a/drivers/crypto/mlx5/mlx5_crypto_gcm.c b/drivers/crypto/mlx5/mlx5_crypto_gcm.c
-index f598273873..cd21605bd2 100644
---- a/drivers/crypto/mlx5/mlx5_crypto_gcm.c
-+++ b/drivers/crypto/mlx5/mlx5_crypto_gcm.c
-@@ -877,7 +877,7 @@ mlx5_crypto_gcm_cqe_err_handle(struct mlx5_crypto_qp *qp, struct rte_crypto_op *
- {
- 	uint8_t op_code;
- 	const uint32_t idx = qp->cq_ci & (qp->entries_n - 1);
--	volatile struct mlx5_err_cqe *cqe = (volatile struct mlx5_err_cqe *)
-+	volatile struct mlx5_error_cqe *cqe = (volatile struct mlx5_error_cqe *)
- 							&qp->cq_obj.cqes[idx];
- 
- 	op_code = rte_be_to_cpu_32(cqe->s_wqe_opcode_qpn) >> MLX5_CQ_INDEX_WIDTH;
-diff --git a/drivers/crypto/mlx5/mlx5_crypto_xts.c b/drivers/crypto/mlx5/mlx5_crypto_xts.c
-index d4e1dd718c..b9214711ac 100644
---- a/drivers/crypto/mlx5/mlx5_crypto_xts.c
-+++ b/drivers/crypto/mlx5/mlx5_crypto_xts.c
-@@ -363,7 +363,7 @@ static __rte_noinline void
- mlx5_crypto_xts_cqe_err_handle(struct mlx5_crypto_qp *qp, struct rte_crypto_op *op)
- {
- 	const uint32_t idx = qp->ci & (qp->entries_n - 1);
--	volatile struct mlx5_err_cqe *cqe = (volatile struct mlx5_err_cqe *)
-+	volatile struct mlx5_error_cqe *cqe = (volatile struct mlx5_error_cqe *)
- 							&qp->cq_obj.cqes[idx];
- 
- 	op->status = RTE_CRYPTO_OP_STATUS_ERROR;
-diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c b/drivers/net/mlx5/hws/mlx5dr_send.c
-index e9abf3dddb..e121c7f7ed 100644
---- a/drivers/net/mlx5/hws/mlx5dr_send.c
-+++ b/drivers/net/mlx5/hws/mlx5dr_send.c
-@@ -599,7 +599,7 @@ static void mlx5dr_send_engine_poll_cq(struct mlx5dr_send_engine *queue,
- 		return;
- 
- 	if (unlikely(cqe_opcode != MLX5_CQE_REQ)) {
--		struct mlx5_err_cqe *err_cqe = (struct mlx5_err_cqe *)cqe;
-+		struct mlx5_error_cqe *err_cqe = (struct mlx5_error_cqe *)cqe;
- 
- 		DR_LOG(ERR, "CQE ERR:0x%x, Vendor_ERR:0x%x, OP:0x%x, QPN:0x%x, WQE_CNT:0x%x",
- 			err_cqe->syndrome, err_cqe->vendor_err_synd, cqe_opcode,
@@ -164 +123 @@
-index a94b228396..feca8c3e89 100644
+index 8441be3dea..805144e27e 100644
@@ -188 +147 @@
-index f241809e08..5e58eb8bc9 100644
+index 56e5568f33..0762782217 100644
@@ -191 +150 @@
-@@ -459,7 +459,7 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec,
+@@ -451,7 +451,7 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec,
@@ -201 +160 @@
-index fc105970a3..4286876e12 100644
+index 14e1487e59..8b1a0ca3d3 100644

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

* patch 'net/mlx5: fix shared queue port number in vector Rx' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (13 preceding siblings ...)
  2024-11-20 23:41         ` patch 'common/mlx5: fix error CQE handling for 128 bytes CQE' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/mlx5/hws: fix allocation of STCs' " luca.boccassi
                           ` (11 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From da5d3d9ce9ac28f11347c540357bb2149d0d65cc Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Mon, 28 Oct 2024 19:53:54 +0200
Subject: [PATCH] net/mlx5: fix shared queue port number in vector Rx

[ upstream commit 3638f431b9ff39003e31c3a761d407e04b25576a ]

Wrong CQE is used to get the shared Rx queue port number in
vectorized Rx burst routine. Fix the CQE indexing.

Fixes: 25ed2ebff131 ("net/mlx5: support shared Rx queue port data path")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 12 ++++++------
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h    | 24 ++++++++++++------------
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h     |  6 +++---
 3 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
index 204d17a8f2..2cc8fc19f9 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
@@ -1201,9 +1201,9 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 		rxq_cq_to_ptype_oflags_v(rxq, cqes, opcode, &pkts[pos]);
 		if (unlikely(rxq->shared)) {
 			pkts[pos]->port = cq[pos].user_index_low;
-			pkts[pos + p1]->port = cq[pos + p1].user_index_low;
-			pkts[pos + p2]->port = cq[pos + p2].user_index_low;
-			pkts[pos + p3]->port = cq[pos + p3].user_index_low;
+			pkts[pos + 1]->port = cq[pos + p1].user_index_low;
+			pkts[pos + 2]->port = cq[pos + p2].user_index_low;
+			pkts[pos + 3]->port = cq[pos + p3].user_index_low;
 		}
 		if (rxq->hw_timestamp) {
 			int offset = rxq->timestamp_offset;
@@ -1247,17 +1247,17 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 								metadata;
 			pkts[pos]->ol_flags |= metadata ? flag : 0ULL;
 			metadata = rte_be_to_cpu_32
-				(cq[pos + 1].flow_table_metadata) & mask;
+				(cq[pos + p1].flow_table_metadata) & mask;
 			*RTE_MBUF_DYNFIELD(pkts[pos + 1], offs, uint32_t *) =
 								metadata;
 			pkts[pos + 1]->ol_flags |= metadata ? flag : 0ULL;
 			metadata = rte_be_to_cpu_32
-				(cq[pos + 2].flow_table_metadata) &	mask;
+				(cq[pos + p2].flow_table_metadata) & mask;
 			*RTE_MBUF_DYNFIELD(pkts[pos + 2], offs, uint32_t *) =
 								metadata;
 			pkts[pos + 2]->ol_flags |= metadata ? flag : 0ULL;
 			metadata = rte_be_to_cpu_32
-				(cq[pos + 3].flow_table_metadata) &	mask;
+				(cq[pos + p3].flow_table_metadata) & mask;
 			*RTE_MBUF_DYNFIELD(pkts[pos + 3], offs, uint32_t *) =
 								metadata;
 			pkts[pos + 3]->ol_flags |= metadata ? flag : 0ULL;
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index 6d3c594e56..113c12f48c 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -800,13 +800,13 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 		rxq_cq_to_ptype_oflags_v(rxq, ptype_info, flow_tag,
 					 opcode, &elts[pos]);
 		if (unlikely(rxq->shared)) {
-			elts[pos]->port = container_of(p0, struct mlx5_cqe,
+			pkts[pos]->port = container_of(p0, struct mlx5_cqe,
 					      pkt_info)->user_index_low;
-			elts[pos + 1]->port = container_of(p1, struct mlx5_cqe,
+			pkts[pos + 1]->port = container_of(p1, struct mlx5_cqe,
 					      pkt_info)->user_index_low;
-			elts[pos + 2]->port = container_of(p2, struct mlx5_cqe,
+			pkts[pos + 2]->port = container_of(p2, struct mlx5_cqe,
 					      pkt_info)->user_index_low;
-			elts[pos + 3]->port = container_of(p3, struct mlx5_cqe,
+			pkts[pos + 3]->port = container_of(p3, struct mlx5_cqe,
 					      pkt_info)->user_index_low;
 		}
 		if (unlikely(rxq->hw_timestamp)) {
@@ -818,34 +818,34 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 				ts = rte_be_to_cpu_64
 					(container_of(p0, struct mlx5_cqe,
 						      pkt_info)->timestamp);
-				mlx5_timestamp_set(elts[pos], offset,
+				mlx5_timestamp_set(pkts[pos], offset,
 					mlx5_txpp_convert_rx_ts(sh, ts));
 				ts = rte_be_to_cpu_64
 					(container_of(p1, struct mlx5_cqe,
 						      pkt_info)->timestamp);
-				mlx5_timestamp_set(elts[pos + 1], offset,
+				mlx5_timestamp_set(pkts[pos + 1], offset,
 					mlx5_txpp_convert_rx_ts(sh, ts));
 				ts = rte_be_to_cpu_64
 					(container_of(p2, struct mlx5_cqe,
 						      pkt_info)->timestamp);
-				mlx5_timestamp_set(elts[pos + 2], offset,
+				mlx5_timestamp_set(pkts[pos + 2], offset,
 					mlx5_txpp_convert_rx_ts(sh, ts));
 				ts = rte_be_to_cpu_64
 					(container_of(p3, struct mlx5_cqe,
 						      pkt_info)->timestamp);
-				mlx5_timestamp_set(elts[pos + 3], offset,
+				mlx5_timestamp_set(pkts[pos + 3], offset,
 					mlx5_txpp_convert_rx_ts(sh, ts));
 			} else {
-				mlx5_timestamp_set(elts[pos], offset,
+				mlx5_timestamp_set(pkts[pos], offset,
 					rte_be_to_cpu_64(container_of(p0,
 					struct mlx5_cqe, pkt_info)->timestamp));
-				mlx5_timestamp_set(elts[pos + 1], offset,
+				mlx5_timestamp_set(pkts[pos + 1], offset,
 					rte_be_to_cpu_64(container_of(p1,
 					struct mlx5_cqe, pkt_info)->timestamp));
-				mlx5_timestamp_set(elts[pos + 2], offset,
+				mlx5_timestamp_set(pkts[pos + 2], offset,
 					rte_be_to_cpu_64(container_of(p2,
 					struct mlx5_cqe, pkt_info)->timestamp));
-				mlx5_timestamp_set(elts[pos + 3], offset,
+				mlx5_timestamp_set(pkts[pos + 3], offset,
 					rte_be_to_cpu_64(container_of(p3,
 					struct mlx5_cqe, pkt_info)->timestamp));
 			}
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index ab69af0c55..ccd1b4ff84 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -741,9 +741,9 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 		rxq_cq_to_ptype_oflags_v(rxq, cqes, opcode, &pkts[pos]);
 		if (unlikely(rxq->shared)) {
 			pkts[pos]->port = cq[pos].user_index_low;
-			pkts[pos + p1]->port = cq[pos + p1].user_index_low;
-			pkts[pos + p2]->port = cq[pos + p2].user_index_low;
-			pkts[pos + p3]->port = cq[pos + p3].user_index_low;
+			pkts[pos + 1]->port = cq[pos + p1].user_index_low;
+			pkts[pos + 2]->port = cq[pos + p2].user_index_low;
+			pkts[pos + 3]->port = cq[pos + p3].user_index_low;
 		}
 		if (unlikely(rxq->hw_timestamp)) {
 			int offset = rxq->timestamp_offset;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.274474179 +0000
+++ 0016-net-mlx5-fix-shared-queue-port-number-in-vector-Rx.patch	2024-11-20 23:41:22.716195467 +0000
@@ -1 +1 @@
-From 3638f431b9ff39003e31c3a761d407e04b25576a Mon Sep 17 00:00:00 2001
+From da5d3d9ce9ac28f11347c540357bb2149d0d65cc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3638f431b9ff39003e31c3a761d407e04b25576a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index b2bbc4ba17..ca614ecf9d 100644
+index 204d17a8f2..2cc8fc19f9 100644
@@ -24 +25 @@
-@@ -1251,9 +1251,9 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
+@@ -1201,9 +1201,9 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
@@ -37 +38 @@
-@@ -1297,17 +1297,17 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
+@@ -1247,17 +1247,17 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
@@ -59 +60 @@
-index 0ce9827ed9..519fff5b2c 100644
+index 6d3c594e56..113c12f48c 100644
@@ -62 +63 @@
-@@ -837,13 +837,13 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
+@@ -800,13 +800,13 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
@@ -80 +81 @@
-@@ -855,34 +855,34 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
+@@ -818,34 +818,34 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
@@ -124 +125 @@
-index e71d6c303f..0a2b67e750 100644
+index ab69af0c55..ccd1b4ff84 100644
@@ -127 +128 @@
-@@ -785,9 +785,9 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
+@@ -741,9 +741,9 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,

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

* patch 'net/mlx5/hws: fix allocation of STCs' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (14 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/mlx5: fix shared queue port number in vector Rx' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/mlx5: fix counter query loop getting stuck' " luca.boccassi
                           ` (10 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Erez Shitrit; +Cc: Bing Zhao, Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/08bdeeee6b35210eba4ade0fc3e34369d85f6708

Thanks.

Luca Boccassi

---
From 08bdeeee6b35210eba4ade0fc3e34369d85f6708 Mon Sep 17 00:00:00 2001
From: Erez Shitrit <erezsh@nvidia.com>
Date: Tue, 29 Oct 2024 15:24:03 +0200
Subject: [PATCH] net/mlx5/hws: fix allocation of STCs

[ upstream commit 691326d15da263d068de71c468c74c225c4f75c3 ]

STC is a limited resource of the HW, and might get consumed till no more
contexts can be opened.
So, let the user to define the size of how many STCs to allocate per
context.
In case the user has many representors, no need to allocate per each of
them the default value of STCs, otherwise after a certain numbers of
representors no more STC's will remain in the system.

Fixes: b0290e56dd08 ("net/mlx5/hws: add context object")

Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr.h         | 4 +++-
 drivers/net/mlx5/hws/mlx5dr_context.c | 9 ++++++---
 drivers/net/mlx5/mlx5_flow.h          | 3 +++
 drivers/net/mlx5/mlx5_flow_hw.c       | 3 +++
 4 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr.h b/drivers/net/mlx5/hws/mlx5dr.h
index d570810e95..d5a5299a23 100644
--- a/drivers/net/mlx5/hws/mlx5dr.h
+++ b/drivers/net/mlx5/hws/mlx5dr.h
@@ -95,8 +95,10 @@ struct mlx5dr_context_attr {
 	uint16_t queues;
 	uint16_t queue_size;
 	size_t initial_log_ste_memory; /* Currently not in use */
-	/* Optional PD used for allocating res ources */
+	/* Optional PD used for allocating resources */
 	struct ibv_pd *pd;
+	/* Optional the STC array size for that context */
+	size_t initial_log_stc_memory;
 };
 
 struct mlx5dr_table_attr {
diff --git a/drivers/net/mlx5/hws/mlx5dr_context.c b/drivers/net/mlx5/hws/mlx5dr_context.c
index d1923a8e93..21047b8384 100644
--- a/drivers/net/mlx5/hws/mlx5dr_context.c
+++ b/drivers/net/mlx5/hws/mlx5dr_context.c
@@ -4,7 +4,8 @@
 
 #include "mlx5dr_internal.h"
 
-static int mlx5dr_context_pools_init(struct mlx5dr_context *ctx)
+static int mlx5dr_context_pools_init(struct mlx5dr_context *ctx,
+				     struct mlx5dr_context_attr *attr)
 {
 	struct mlx5dr_pool_attr pool_attr = {0};
 	uint8_t max_log_sz;
@@ -16,7 +17,9 @@ static int mlx5dr_context_pools_init(struct mlx5dr_context *ctx)
 	/* Create an STC pool per FT type */
 	pool_attr.pool_type = MLX5DR_POOL_TYPE_STC;
 	pool_attr.flags = MLX5DR_POOL_FLAGS_FOR_STC_POOL;
-	max_log_sz = RTE_MIN(MLX5DR_POOL_STC_LOG_SZ, ctx->caps->stc_alloc_log_max);
+	if (!attr->initial_log_stc_memory)
+		attr->initial_log_stc_memory = MLX5DR_POOL_STC_LOG_SZ;
+	max_log_sz = RTE_MIN(attr->initial_log_stc_memory, ctx->caps->stc_alloc_log_max);
 	pool_attr.alloc_log_sz = RTE_MAX(max_log_sz, ctx->caps->stc_alloc_log_gran);
 
 	for (i = 0; i < MLX5DR_TABLE_TYPE_MAX; i++) {
@@ -151,7 +154,7 @@ static int mlx5dr_context_init_hws(struct mlx5dr_context *ctx,
 	if (ret)
 		return ret;
 
-	ret = mlx5dr_context_pools_init(ctx);
+	ret = mlx5dr_context_pools_init(ctx, attr);
 	if (ret)
 		goto uninit_pd;
 
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 1aff287616..d523cff739 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -2647,4 +2647,7 @@ int mlx5_flow_item_field_width(struct rte_eth_dev *dev,
 			   enum rte_flow_field_id field, int inherit,
 			   const struct rte_flow_attr *attr,
 			   struct rte_flow_error *error);
+
+#define MLX5_REPR_STC_MEMORY_LOG 11
+
 #endif /* RTE_PMD_MLX5_FLOW_H_ */
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index aa315c054d..bff95133cf 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -7295,6 +7295,9 @@ flow_hw_configure(struct rte_eth_dev *dev,
 	}
 	dr_ctx_attr.pd = priv->sh->cdev->pd;
 	dr_ctx_attr.queues = nb_q_updated;
+	/* Assign initial value of STC numbers for representors. */
+	if (priv->representor)
+		dr_ctx_attr.initial_log_stc_memory = MLX5_REPR_STC_MEMORY_LOG;
 	/* Queue size should all be the same. Take the first one. */
 	dr_ctx_attr.queue_size = _queue_attr[0]->size;
 	dr_ctx = mlx5dr_context_open(priv->sh->cdev->ctx, &dr_ctx_attr);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.303391148 +0000
+++ 0017-net-mlx5-hws-fix-allocation-of-STCs.patch	2024-11-20 23:41:22.724195467 +0000
@@ -1 +1 @@
-From 691326d15da263d068de71c468c74c225c4f75c3 Mon Sep 17 00:00:00 2001
+From 08bdeeee6b35210eba4ade0fc3e34369d85f6708 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 691326d15da263d068de71c468c74c225c4f75c3 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 1b58eeb2c7..3668ab9fcf 100644
+index d570810e95..d5a5299a23 100644
@@ -31 +32 @@
-@@ -103,8 +103,10 @@ struct mlx5dr_context_attr {
+@@ -95,8 +95,10 @@ struct mlx5dr_context_attr {
@@ -40,3 +41,3 @@
- 	/* Optional other ctx for resources allocation, all objects will be created on it */
- 	struct ibv_context *shared_ibv_ctx;
- 	bool bwc; /* add support for backward compatible API*/
+ };
+ 
+ struct mlx5dr_table_attr {
@@ -44 +45 @@
-index db5e72927a..24741afe58 100644
+index d1923a8e93..21047b8384 100644
@@ -47,3 +48,3 @@
-@@ -19,7 +19,8 @@ uint8_t mlx5dr_context_get_reparse_mode(struct mlx5dr_context *ctx)
- 	return MLX5_IFC_RTC_REPARSE_ALWAYS;
- }
+@@ -4,7 +4,8 @@
+ 
+ #include "mlx5dr_internal.h"
@@ -57 +58 @@
-@@ -34,7 +35,9 @@ static int mlx5dr_context_pools_init(struct mlx5dr_context *ctx)
+@@ -16,7 +17,9 @@ static int mlx5dr_context_pools_init(struct mlx5dr_context *ctx)
@@ -68 +69 @@
-@@ -172,7 +175,7 @@ static int mlx5dr_context_init_hws(struct mlx5dr_context *ctx,
+@@ -151,7 +154,7 @@ static int mlx5dr_context_init_hws(struct mlx5dr_context *ctx,
@@ -78 +79 @@
-index 693e07218d..d871b62854 100644
+index 1aff287616..d523cff739 100644
@@ -81,4 +82,4 @@
-@@ -3652,6 +3652,9 @@ flow_hw_get_ipv6_route_ext_mod_id_from_ctx(void *dr_ctx, uint8_t idx)
- void
- mlx5_indirect_list_handles_release(struct rte_eth_dev *dev);
- #ifdef HAVE_MLX5_HWS_SUPPORT
+@@ -2647,4 +2647,7 @@ int mlx5_flow_item_field_width(struct rte_eth_dev *dev,
+ 			   enum rte_flow_field_id field, int inherit,
+ 			   const struct rte_flow_attr *attr,
+ 			   struct rte_flow_error *error);
@@ -88,3 +89 @@
- struct mlx5_mirror;
- void
- mlx5_hw_mirror_destroy(struct rte_eth_dev *dev, struct mlx5_mirror *mirror);
+ #endif /* RTE_PMD_MLX5_FLOW_H_ */
@@ -92 +91 @@
-index 2a9ef71cd8..c43520ed51 100644
+index aa315c054d..bff95133cf 100644
@@ -95 +94 @@
-@@ -11825,6 +11825,9 @@ __flow_hw_configure(struct rte_eth_dev *dev,
+@@ -7295,6 +7295,9 @@ flow_hw_configure(struct rte_eth_dev *dev,
@@ -104 +103 @@
- 	if (port_attr->flags & RTE_FLOW_PORT_FLAG_SHARE_INDIRECT) {
+ 	dr_ctx = mlx5dr_context_open(priv->sh->cdev->ctx, &dr_ctx_attr);

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

* patch 'net/mlx5: fix counter query loop getting stuck' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (15 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/mlx5/hws: fix allocation of STCs' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'common/mlx5: fix misalignment' " luca.boccassi
                           ` (9 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 0e162f1a25b59dbb3c40455a0249154e0532b61f Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Wed, 30 Oct 2024 17:30:46 +0100
Subject: [PATCH] net/mlx5: fix counter query loop getting stuck

[ upstream commit c0e29968294c92ca15fdb34ce63fbba01c4562a6 ]

Counter service thread, responsible for refreshing counter values
stored in host memory, is running an "infinite loop" with the following
logic:

- For each port:
    - Refresh port's counter pool - call to __mlx5_hws_cnt_svc().
    - Perform aging checks.
- Go to sleep if time left in current cycle.
- Repeat.

__mlx5_hws_cnt_svc() used to perform counter value refresh
implemented the following logic:

1. Store number of counters waiting for reset.
2. Issue ASO WQEs to refresh all counters values.
3. Move counters from reset to reuse list.
   Number of moved counters is limited by number stored in step 1 or
   step 4.
4. Store number of counters waiting for reset.
5. If number of counters waiting for reset > 0, go to step 2.

Now, if an application constantly creates/destroys flow rules with
counters and even a single counter is added to reset list during step 2,
counter service thread might end up issuing ASO WQEs endlessly,
without going to sleep and respecting the configured cycle time.

This patch fixes that by remove the loop inside __mlx5_hws_cnt_svc().

As a drawback of this fix, the application must allocate enough counters
to accommodate for the cycle time. This number if roughly equal to the
expected counter release rate.

This patch also:

- Ensures that proper counter related error code is returned,
  when flow rule create failed due to counter allocation problem.
- Adds debug logging to counter service thread.
- Adds documentation for counter service thread.

Fixes: 4d368e1da3a4 ("net/mlx5: support flow counter action for HWS")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 doc/guides/nics/mlx5.rst        | 71 +++++++++++++++++++++++++++++++++
 drivers/net/mlx5/mlx5_flow_hw.c | 17 +++++---
 drivers/net/mlx5/mlx5_hws_cnt.c | 46 ++++++++++++---------
 3 files changed, 110 insertions(+), 24 deletions(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index b047d7db58..d2f741a472 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -1589,6 +1589,77 @@ directly but neither destroyed nor flushed.
 The application should re-create the flows as required after the port restart.
 
 
+Notes for flow counters
+-----------------------
+
+mlx5 PMD supports the ``COUNT`` flow action,
+which provides an ability to count packets (and bytes)
+matched against a given flow rule.
+This section describes the high level overview of
+how this support is implemented and limitations.
+
+HW steering flow engine
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Flow counters are allocated from HW in bulks.
+A set of bulks forms a flow counter pool managed by PMD.
+When flow counters are queried from HW,
+each counter is identified by an offset in a given bulk.
+Querying HW flow counter requires sending a request to HW,
+which will request a read of counter values for given offsets.
+HW will asynchronously provide these values through a DMA write.
+
+In order to optimize HW to SW communication,
+these requests are handled in a separate counter service thread
+spawned by mlx5 PMD.
+This service thread will refresh the counter values stored in memory,
+in cycles, each spanning ``svc_cycle_time`` milliseconds.
+By default, ``svc_cycle_time`` is set to 500.
+When applications query the ``COUNT`` flow action,
+PMD returns the values stored in host memory.
+
+mlx5 PMD manages 3 global rings of allocated counter offsets:
+
+- ``free`` ring - Counters which were not used at all.
+- ``wait_reset`` ring - Counters which were used in some flow rules,
+  but were recently freed (flow rule was destroyed
+  or an indirect action was destroyed).
+  Since the count value might have changed
+  between the last counter service thread cycle and the moment it was freed,
+  the value in host memory might be stale.
+  During the next service thread cycle,
+  such counters will be moved to ``reuse`` ring.
+- ``reuse`` ring - Counters which were used at least once
+  and can be reused in new flow rules.
+
+When counters are assigned to a flow rule (or allocated to indirect action),
+the PMD first tries to fetch a counter from ``reuse`` ring.
+If it's empty, the PMD fetches a counter from ``free`` ring.
+
+The counter service thread works as follows:
+
+#. Record counters stored in ``wait_reset`` ring.
+#. Read values of all counters which were used at least once
+   or are currently in use.
+#. Move recorded counters from ``wait_reset`` to ``reuse`` ring.
+#. Sleep for ``(query time) - svc_cycle_time`` milliseconds
+#. Repeat.
+
+Because freeing a counter (by destroying a flow rule or destroying indirect action)
+does not immediately make it available for the application,
+the PMD might return:
+
+- ``ENOENT`` if no counter is available in ``free``, ``reuse``
+  or ``wait_reset`` rings.
+  No counter will be available until the application releases some of them.
+- ``EAGAIN`` if no counter is available in ``free`` and ``reuse`` rings,
+  but there are counters in ``wait_reset`` ring.
+  This means that after the next service thread cycle new counters will be available.
+
+The application has to be aware that flow rule create or indirect action create
+might need be retried.
+
+
 Notes for hairpin
 -----------------
 
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index bff95133cf..dd64cb224f 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -2377,8 +2377,11 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
 		case RTE_FLOW_ACTION_TYPE_COUNT:
 			cnt_queue = mlx5_hws_cnt_get_queue(priv, &queue);
 			ret = mlx5_hws_cnt_pool_get(priv->hws_cpool, cnt_queue, &cnt_id, age_idx);
-			if (ret != 0)
+			if (ret != 0) {
+				rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_ACTION,
+						action, "Failed to allocate flow counter");
 				goto error;
+			}
 			ret = mlx5_hws_cnt_pool_get_action_offset
 				(priv->hws_cpool,
 				 cnt_id,
@@ -2571,6 +2574,7 @@ flow_hw_async_flow_create(struct rte_eth_dev *dev,
 	struct mlx5_hw_q_job *job;
 	const struct rte_flow_item *rule_items;
 	uint32_t flow_idx;
+	struct rte_flow_error sub_error = { 0 };
 	int ret;
 
 	if (unlikely(!priv->hw_q[queue].job_idx)) {
@@ -2611,7 +2615,7 @@ flow_hw_async_flow_create(struct rte_eth_dev *dev,
 	if (flow_hw_actions_construct(dev, job,
 				      &table->ats[action_template_index],
 				      pattern_template_index, actions,
-				      rule_acts, queue, error))
+				      rule_acts, queue, &sub_error))
 		goto free;
 	rule_items = flow_hw_get_rule_items(dev, table, items,
 					    pattern_template_index, job);
@@ -2628,9 +2632,12 @@ free:
 	mlx5_ipool_free(table->flow, flow_idx);
 	priv->hw_q[queue].job_idx++;
 error:
-	rte_flow_error_set(error, rte_errno,
-			   RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
-			   "fail to create rte flow");
+	if (sub_error.cause != RTE_FLOW_ERROR_TYPE_NONE && error != NULL)
+		*error = sub_error;
+	else
+		rte_flow_error_set(error, rte_errno,
+				   RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+				   "fail to create rte flow");
 	return NULL;
 }
 
diff --git a/drivers/net/mlx5/mlx5_hws_cnt.c b/drivers/net/mlx5/mlx5_hws_cnt.c
index 8415aa411f..3250255727 100644
--- a/drivers/net/mlx5/mlx5_hws_cnt.c
+++ b/drivers/net/mlx5/mlx5_hws_cnt.c
@@ -72,26 +72,29 @@ __mlx5_hws_cnt_svc(struct mlx5_dev_ctx_shared *sh,
 	uint32_t ret __rte_unused;
 
 	reset_cnt_num = rte_ring_count(reset_list);
-	do {
-		cpool->query_gen++;
-		mlx5_aso_cnt_query(sh, cpool);
-		zcdr.n1 = 0;
-		zcdu.n1 = 0;
-		ret = rte_ring_enqueue_zc_burst_elem_start(reuse_list,
-							   sizeof(cnt_id_t),
-							   reset_cnt_num, &zcdu,
-							   NULL);
-		MLX5_ASSERT(ret == reset_cnt_num);
-		ret = rte_ring_dequeue_zc_burst_elem_start(reset_list,
-							   sizeof(cnt_id_t),
-							   reset_cnt_num, &zcdr,
-							   NULL);
-		MLX5_ASSERT(ret == reset_cnt_num);
-		__hws_cnt_r2rcpy(&zcdu, &zcdr, reset_cnt_num);
-		rte_ring_dequeue_zc_elem_finish(reset_list, reset_cnt_num);
-		rte_ring_enqueue_zc_elem_finish(reuse_list, reset_cnt_num);
+	cpool->query_gen++;
+	mlx5_aso_cnt_query(sh, cpool);
+	zcdr.n1 = 0;
+	zcdu.n1 = 0;
+	ret = rte_ring_enqueue_zc_burst_elem_start(reuse_list,
+						   sizeof(cnt_id_t),
+						   reset_cnt_num, &zcdu,
+						   NULL);
+	MLX5_ASSERT(ret == reset_cnt_num);
+	ret = rte_ring_dequeue_zc_burst_elem_start(reset_list,
+						   sizeof(cnt_id_t),
+						   reset_cnt_num, &zcdr,
+						   NULL);
+	MLX5_ASSERT(ret == reset_cnt_num);
+	__hws_cnt_r2rcpy(&zcdu, &zcdr, reset_cnt_num);
+	rte_ring_dequeue_zc_elem_finish(reset_list, reset_cnt_num);
+	rte_ring_enqueue_zc_elem_finish(reuse_list, reset_cnt_num);
+
+	if (rte_log_can_log(mlx5_logtype, RTE_LOG_DEBUG)) {
 		reset_cnt_num = rte_ring_count(reset_list);
-	} while (reset_cnt_num > 0);
+		DRV_LOG(DEBUG, "ibdev %s cpool %p wait_reset_cnt=%" PRIu32,
+			       sh->ibdev_name, (void *)cpool, reset_cnt_num);
+	}
 }
 
 /**
@@ -331,6 +334,11 @@ mlx5_hws_cnt_svc(void *opaque)
 		rte_spinlock_unlock(&sh->cpool_lock);
 		query_us = query_cycle / (rte_get_timer_hz() / US_PER_S);
 		sleep_us = interval - query_us;
+		DRV_LOG(DEBUG, "ibdev %s counter service thread: "
+			       "interval_us=%" PRIu64 " query_us=%" PRIu64 " "
+			       "sleep_us=%" PRIu64,
+			sh->ibdev_name, interval, query_us,
+			interval > query_us ? sleep_us : 0);
 		if (interval > query_us)
 			rte_delay_us_sleep(sleep_us);
 	}
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.344119428 +0000
+++ 0018-net-mlx5-fix-counter-query-loop-getting-stuck.patch	2024-11-20 23:41:22.732195467 +0000
@@ -1 +1 @@
-From c0e29968294c92ca15fdb34ce63fbba01c4562a6 Mon Sep 17 00:00:00 2001
+From 0e162f1a25b59dbb3c40455a0249154e0532b61f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c0e29968294c92ca15fdb34ce63fbba01c4562a6 ]
+
@@ -46 +47,0 @@
-Cc: stable@dpdk.org
@@ -57 +58 @@
-index b1d6863f36..145c01fbda 100644
+index b047d7db58..d2f741a472 100644
@@ -60 +61 @@
-@@ -2021,6 +2021,77 @@ directly but neither destroyed nor flushed.
+@@ -1589,6 +1589,77 @@ directly but neither destroyed nor flushed.
@@ -139 +140 @@
-index 488ef4ce3c..6ad98d40f7 100644
+index bff95133cf..dd64cb224f 100644
@@ -142 +143 @@
-@@ -3734,8 +3734,11 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
+@@ -2377,8 +2377,11 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
@@ -155,3 +156,2 @@
-@@ -3980,6 +3983,7 @@ flow_hw_async_flow_create_generic(struct rte_eth_dev *dev,
- 	struct mlx5dr_rule_action *rule_acts;
- 	struct rte_flow_hw *flow = NULL;
+@@ -2571,6 +2574,7 @@ flow_hw_async_flow_create(struct rte_eth_dev *dev,
+ 	struct mlx5_hw_q_job *job;
@@ -158,0 +159 @@
+ 	uint32_t flow_idx;
@@ -160,2 +160,0 @@
- 	uint32_t flow_idx = 0;
- 	uint32_t res_idx = 0;
@@ -163 +162,4 @@
-@@ -4037,7 +4041,7 @@ flow_hw_async_flow_create_generic(struct rte_eth_dev *dev,
+ 
+ 	if (unlikely(!priv->hw_q[queue].job_idx)) {
+@@ -2611,7 +2615,7 @@ flow_hw_async_flow_create(struct rte_eth_dev *dev,
+ 	if (flow_hw_actions_construct(dev, job,
@@ -165,2 +167 @@
- 				      table->its[pattern_template_index]->item_flags,
- 				      flow->table, actions,
+ 				      pattern_template_index, actions,
@@ -169 +170 @@
- 		goto error;
+ 		goto free;
@@ -171,5 +172,5 @@
- 					    pattern_template_index, &priv->hw_q[queue].pp);
-@@ -4074,9 +4078,12 @@ error:
- 		mlx5_ipool_free(table->resource, res_idx);
- 	if (flow_idx)
- 		mlx5_ipool_free(table->flow, flow_idx);
+ 					    pattern_template_index, job);
+@@ -2628,9 +2632,12 @@ free:
+ 	mlx5_ipool_free(table->flow, flow_idx);
+ 	priv->hw_q[queue].job_idx++;
+ error:
@@ -189 +190 @@
-index def0b19deb..0197c098f6 100644
+index 8415aa411f..3250255727 100644
@@ -192 +193 @@
-@@ -56,26 +56,29 @@ __mlx5_hws_cnt_svc(struct mlx5_dev_ctx_shared *sh,
+@@ -72,26 +72,29 @@ __mlx5_hws_cnt_svc(struct mlx5_dev_ctx_shared *sh,
@@ -241 +242 @@
-@@ -325,6 +328,11 @@ mlx5_hws_cnt_svc(void *opaque)
+@@ -331,6 +334,11 @@ mlx5_hws_cnt_svc(void *opaque)

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

* patch 'common/mlx5: fix misalignment' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (16 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/mlx5: fix counter query loop getting stuck' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/mlx5: fix default RSS flows creation order' " luca.boccassi
                           ` (8 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Shani Peretz; +Cc: Bing Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/102f2042b2c0c3ea222274c00078913e5b026774

Thanks.

Luca Boccassi

---
From 102f2042b2c0c3ea222274c00078913e5b026774 Mon Sep 17 00:00:00 2001
From: Shani Peretz <shperetz@nvidia.com>
Date: Tue, 12 Nov 2024 10:21:26 +0200
Subject: [PATCH] common/mlx5: fix misalignment

[ upstream commit 90967539d0d1afcfd5237ed85efdc430359a0e6b ]

ASan reported a runtime error due to misalignment
involving three structures.

The first issue arises when accessing
l_inconst->cache[MLX5_LIST_GLOBAL]->h.
If struct mlx5_list_cache is not properly aligned, the pointer gc,
assigned to l_inconst->cache[MLX5_LIST_GLOBAL], could be misaligned.
To address this, the __rte_aligned(16) attribute was added to
struct mlx5_list_inconst in struct mlx5_list, which includes struct
mlx5_list_cache, ensuring that the entire mlx5_list structure,
including mlx5_list_cache, is aligned to 64 bytes.

To resolve misalignment issues with struct mlx5_flow_handle,
The initialization of resources for the ipool ensures that
the ipool size is rounded up to the 8-byte boundary

The error in assigning values to actions[i] was due to potential
padding or misalignment in struct mlx5_modification_cmd.
To prevent such issues, the __rte_packed attribute was added to
struct mlx5_modification_cmd, ensuring that the structure is packed
without extra padding which helps avoid misaligned memory accesses.

Two performance degradation tests were conducted.
Following are the results comparing this commit to the most recent
commit in mlnx_dpdk_22.11 at that time (b69408ae453).

Before asan misalignment fix (average kflows/sec) -
Insertion - 4461.269, Deletion - 7799.9992
After:
Insertion - 4579.0642 , Deletion - 7913.0034

Fixes: 9a4c36880704 ("common/mlx5: optimize cache list object memory")

Signed-off-by: Shani Peretz <shperetz@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
 drivers/common/mlx5/mlx5_common_utils.h | 2 +-
 drivers/common/mlx5/mlx5_prm.h          | 4 ++--
 drivers/net/mlx5/mlx5.c                 | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_common_utils.h b/drivers/common/mlx5/mlx5_common_utils.h
index ae15119a33..6db0105c53 100644
--- a/drivers/common/mlx5/mlx5_common_utils.h
+++ b/drivers/common/mlx5/mlx5_common_utils.h
@@ -131,7 +131,7 @@ struct mlx5_list_inconst {
  * For huge amount of entries, please consider hash list.
  *
  */
-struct mlx5_list {
+struct __rte_aligned(16) mlx5_list {
 	struct mlx5_list_const l_const;
 	struct mlx5_list_inconst l_inconst;
 };
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 696c59d0fd..cf525c14df 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -811,7 +811,7 @@ struct mlx5_modification_cmd {
 			unsigned int field:12;
 			unsigned int action_type:4;
 		};
-	};
+	} __rte_packed;
 	union {
 		uint32_t data1;
 		uint8_t data[4];
@@ -822,7 +822,7 @@ struct mlx5_modification_cmd {
 			unsigned int dst_field:12;
 			unsigned int rsvd4:4;
 		};
-	};
+	} __rte_packed;
 };
 
 typedef uint64_t u64;
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 1076ad1721..94873dfe89 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -904,7 +904,7 @@ mlx5_flow_ipool_create(struct mlx5_dev_ctx_shared *sh)
 		 */
 		case MLX5_IPOOL_MLX5_FLOW:
 			cfg.size = sh->config.dv_flow_en ?
-				sizeof(struct mlx5_flow_handle) :
+				RTE_ALIGN_MUL_CEIL(sizeof(struct mlx5_flow_handle), 8) :
 				MLX5_FLOW_HANDLE_VERBS_SIZE;
 			break;
 #if defined(HAVE_IBV_FLOW_DV_SUPPORT) || !defined(HAVE_INFINIBAND_VERBS_H)
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.383088625 +0000
+++ 0019-common-mlx5-fix-misalignment.patch	2024-11-20 23:41:22.736195467 +0000
@@ -1 +1 @@
-From 90967539d0d1afcfd5237ed85efdc430359a0e6b Mon Sep 17 00:00:00 2001
+From 102f2042b2c0c3ea222274c00078913e5b026774 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 90967539d0d1afcfd5237ed85efdc430359a0e6b ]
+
@@ -38 +39,0 @@
-Cc: stable@dpdk.org
@@ -49 +50 @@
-index c5eff7a0bf..9139bc6829 100644
+index ae15119a33..6db0105c53 100644
@@ -62 +63 @@
-index 210158350d..2d82807bc2 100644
+index 696c59d0fd..cf525c14df 100644
@@ -65 +66 @@
-@@ -941,7 +941,7 @@ struct mlx5_modification_cmd {
+@@ -811,7 +811,7 @@ struct mlx5_modification_cmd {
@@ -74 +75 @@
-@@ -952,7 +952,7 @@ struct mlx5_modification_cmd {
+@@ -822,7 +822,7 @@ struct mlx5_modification_cmd {
@@ -84 +85 @@
-index 52b90e6ff3..6e4473e2f4 100644
+index 1076ad1721..94873dfe89 100644
@@ -87 +88 @@
-@@ -907,7 +907,7 @@ mlx5_flow_ipool_create(struct mlx5_dev_ctx_shared *sh)
+@@ -904,7 +904,7 @@ mlx5_flow_ipool_create(struct mlx5_dev_ctx_shared *sh)

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

* patch 'net/mlx5: fix default RSS flows creation order' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (17 preceding siblings ...)
  2024-11-20 23:41         ` patch 'common/mlx5: fix misalignment' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/mlx5: fix Rx queue reference count in flushing flows' " luca.boccassi
                           ` (7 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/318bb3c11d42f286612d9f783aafcfb44aeb7dc1

Thanks.

Luca Boccassi

---
From 318bb3c11d42f286612d9f783aafcfb44aeb7dc1 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 13 Nov 2024 09:19:52 +0200
Subject: [PATCH] net/mlx5: fix default RSS flows creation order

[ upstream commit 9a66bb734e1311bcc2bf3b286f7ab6d28975c5c7 ]

In both SWS and HWS mode, default ingress RSS flows are always
created via the driver on the root table. In the current driver,
the first created flow rules will be matched firstly when:
  1. >= 2 rules can be matched on the root table.
  2. the rules have the same priority.

All MC / BC flow rules would have the same priority and discard
the input priority from the user space in the driver. All rules have
a fixed priority 32 when the Ethernet destination MAC is a MC or BC
address.

In SWS non-template API, all the device rules are added into the list
and applied in a reverse order.

This patch syncs default flow rule creation order between SWS and HWS.
The order should be:
  1. IPv4(6) + TCP/UDP, if required.
  2. IPv4(6) only, if required.
  3. None IP traffic.

Fixes: 9fa7c1cddb85 ("net/mlx5: create control flow rules with HWS")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.h    | 8 ++++----
 drivers/net/mlx5/mlx5_flow_hw.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index d523cff739..fb2eb05c06 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -2183,13 +2183,13 @@ enum mlx5_flow_ctrl_rx_eth_pattern_type {
 
 /* All types of RSS actions used in control flow rules. */
 enum mlx5_flow_ctrl_rx_expanded_rss_type {
-	MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_NON_IP = 0,
-	MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV4,
+	MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV6_UDP = 0,
+	MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV6_TCP,
 	MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV4_UDP,
 	MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV4_TCP,
 	MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV6,
-	MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV6_UDP,
-	MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV6_TCP,
+	MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_IPV4,
+	MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_NON_IP,
 	MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_MAX,
 };
 
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index dd64cb224f..047af4a0c9 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -9782,7 +9782,7 @@ mlx5_flow_hw_ctrl_flows(struct rte_eth_dev *dev, uint32_t flags)
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_flow_hw_ctrl_rx *hw_ctrl_rx;
 	unsigned int i;
-	unsigned int j;
+	int j;
 	int ret = 0;
 
 	RTE_SET_USED(priv);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.416903400 +0000
+++ 0020-net-mlx5-fix-default-RSS-flows-creation-order.patch	2024-11-20 23:41:22.740195468 +0000
@@ -1 +1 @@
-From 9a66bb734e1311bcc2bf3b286f7ab6d28975c5c7 Mon Sep 17 00:00:00 2001
+From 318bb3c11d42f286612d9f783aafcfb44aeb7dc1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9a66bb734e1311bcc2bf3b286f7ab6d28975c5c7 ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
@@ -37 +38 @@
-index a56e8be97e..bcc2782460 100644
+index d523cff739..fb2eb05c06 100644
@@ -40 +41 @@
-@@ -2916,13 +2916,13 @@ enum mlx5_flow_ctrl_rx_eth_pattern_type {
+@@ -2183,13 +2183,13 @@ enum mlx5_flow_ctrl_rx_eth_pattern_type {
@@ -59 +60 @@
-index 6ad98d40f7..50dbaa27ab 100644
+index dd64cb224f..047af4a0c9 100644
@@ -62 +63 @@
-@@ -16164,7 +16164,7 @@ mlx5_flow_hw_ctrl_flows(struct rte_eth_dev *dev, uint32_t flags)
+@@ -9782,7 +9782,7 @@ mlx5_flow_hw_ctrl_flows(struct rte_eth_dev *dev, uint32_t flags)

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

* patch 'net/mlx5: fix Rx queue reference count in flushing flows' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (18 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/mlx5: fix default RSS flows creation order' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'bus/dpaa: fix lock condition during error handling' " luca.boccassi
                           ` (6 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From d3789f7b2e6a381166cc5865346230ea172b7d9e Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 13 Nov 2024 09:22:44 +0200
Subject: [PATCH] net/mlx5: fix Rx queue reference count in flushing flows

[ upstream commit 1ea333d2de220d5bad600ed50b43f91f7703c123 ]

Some indirect table and hrxq is created in the rule creation with
QUEUE or RSS action. When stopping a port, the 'dev_started' is set
to 0 in the beginning. The mlx5_ind_table_obj_release() should still
do the dereference of the queue(s) when it is called in the polling
of flow rule deletion, due to the fact that a flow with Q/RSS action
is always referring to the active Rx queues.

The callback now can only pass one input parameter. Using a global
flag per device to indicate that the user flows flushing is in
progress. Then the reference count of the queue(s) should be
decreased.

Fixes: 3a2f674b6aa8 ("net/mlx5: add queue and RSS HW steering action")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5.h      | 1 +
 drivers/net/mlx5/mlx5_flow.c | 2 ++
 drivers/net/mlx5/mlx5_rxq.c  | 8 +++++---
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 56b482a16e..7053db5fa7 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1804,6 +1804,7 @@ struct mlx5_priv {
 	uint32_t nb_queue; /* HW steering queue number. */
 	struct mlx5_hws_cnt_pool *hws_cpool; /* HW steering's counter pool. */
 	uint32_t hws_mark_refcnt; /* HWS mark action reference counter. */
+	bool hws_rule_flushing; /**< Whether this port is in rules flushing stage. */
 #if defined(HAVE_IBV_FLOW_DV_SUPPORT) || !defined(HAVE_INFINIBAND_VERBS_H)
 	/* Item template list. */
 	LIST_HEAD(flow_hw_itt, rte_flow_pattern_template) flow_hw_itt;
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index a44ccea436..f66edf1c64 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -7474,7 +7474,9 @@ mlx5_flow_list_flush(struct rte_eth_dev *dev, enum mlx5_flow_type type,
 #ifdef HAVE_IBV_FLOW_DV_SUPPORT
 	if (priv->sh->config.dv_flow_en == 2 &&
 	    type == MLX5_FLOW_TYPE_GEN) {
+		priv->hws_rule_flushing = true;
 		flow_hw_q_flow_flush(dev, NULL);
+		priv->hws_rule_flushing = false;
 		return;
 	}
 #endif
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 98a670fae8..fcf6ab54b6 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -2891,6 +2891,7 @@ static void
 __mlx5_hrxq_remove(struct rte_eth_dev *dev, struct mlx5_hrxq *hrxq)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
+	bool deref_rxqs = true;
 
 #ifdef HAVE_IBV_FLOW_DV_SUPPORT
 	if (hrxq->hws_flags)
@@ -2900,9 +2901,10 @@ __mlx5_hrxq_remove(struct rte_eth_dev *dev, struct mlx5_hrxq *hrxq)
 #endif
 	priv->obj_ops.hrxq_destroy(hrxq);
 	if (!hrxq->standalone) {
-		mlx5_ind_table_obj_release(dev, hrxq->ind_table,
-					   hrxq->hws_flags ?
-					   (!!dev->data->dev_started) : true);
+		if (!dev->data->dev_started && hrxq->hws_flags &&
+		    !priv->hws_rule_flushing)
+			deref_rxqs = false;
+		mlx5_ind_table_obj_release(dev, hrxq->ind_table, deref_rxqs);
 	}
 	mlx5_ipool_free(priv->sh->ipool[MLX5_IPOOL_HRXQ], hrxq->idx);
 }
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.455249222 +0000
+++ 0021-net-mlx5-fix-Rx-queue-reference-count-in-flushing-fl.patch	2024-11-20 23:41:22.748195468 +0000
@@ -1 +1 @@
-From 1ea333d2de220d5bad600ed50b43f91f7703c123 Mon Sep 17 00:00:00 2001
+From d3789f7b2e6a381166cc5865346230ea172b7d9e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1ea333d2de220d5bad600ed50b43f91f7703c123 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
- drivers/net/mlx5/mlx5_flow.c | 3 +++
+ drivers/net/mlx5/mlx5_flow.c | 2 ++
@@ -27 +28 @@
- 3 files changed, 9 insertions(+), 3 deletions(-)
+ 3 files changed, 8 insertions(+), 3 deletions(-)
@@ -30 +31 @@
-index 6e8295110e..89d277b523 100644
+index 56b482a16e..7053db5fa7 100644
@@ -33,4 +34,4 @@
-@@ -2060,6 +2060,7 @@ struct mlx5_priv {
- 	RTE_ATOMIC(uint32_t) hws_mark_refcnt; /* HWS mark action reference counter. */
- 	struct rte_pmd_mlx5_flow_engine_mode_info mode_info; /* Process set flow engine info. */
- 	struct mlx5_flow_hw_attr *hw_attr; /* HW Steering port configuration. */
+@@ -1804,6 +1804,7 @@ struct mlx5_priv {
+ 	uint32_t nb_queue; /* HW steering queue number. */
+ 	struct mlx5_hws_cnt_pool *hws_cpool; /* HW steering's counter pool. */
+ 	uint32_t hws_mark_refcnt; /* HWS mark action reference counter. */
@@ -42 +43 @@
-index d631ed150c..16ddd05448 100644
+index a44ccea436..f66edf1c64 100644
@@ -45 +46 @@
-@@ -8118,7 +8118,10 @@ mlx5_flow_list_flush(struct rte_eth_dev *dev, enum mlx5_flow_type type,
+@@ -7474,7 +7474,9 @@ mlx5_flow_list_flush(struct rte_eth_dev *dev, enum mlx5_flow_type type,
@@ -52 +53 @@
-+		return;
+ 		return;
@@ -55 +55,0 @@
- 	MLX5_IPOOL_FOREACH(priv->flows[type], fidx, flow) {
@@ -57 +57 @@
-index d437835b73..0737f60272 100644
+index 98a670fae8..fcf6ab54b6 100644
@@ -60 +60 @@
-@@ -2894,6 +2894,7 @@ static void
+@@ -2891,6 +2891,7 @@ static void
@@ -68 +68 @@
-@@ -2903,9 +2904,10 @@ __mlx5_hrxq_remove(struct rte_eth_dev *dev, struct mlx5_hrxq *hrxq)
+@@ -2900,9 +2901,10 @@ __mlx5_hrxq_remove(struct rte_eth_dev *dev, struct mlx5_hrxq *hrxq)

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

* patch 'bus/dpaa: fix lock condition during error handling' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (19 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/mlx5: fix Rx queue reference count in flushing flows' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/iavf: add segment-length check to Tx prep' " luca.boccassi
                           ` (5 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From cc3d964ab6cd086011eb5377870b30d0c03c5b48 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Thu, 14 Nov 2024 13:14:35 +0530
Subject: [PATCH] bus/dpaa: fix lock condition during error handling

[ upstream commit c7c3a329750b81bdaeb3f7ceffac0ec3a65f61f8 ]

The error handling is missing FQ unlock code.
Detected by pvs-studio
Bug 89-93: very suspicious synchronization
The analyzer issued a pack of V1020 warnings that a resource
might remain blocked.

Fixes: c47ff048b99a ("bus/dpaa: add QMAN driver core routines")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/base/qbman/qman.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index f06992ca48..3a1a843ba0 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -2169,8 +2169,10 @@ int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags)
 
 	if (!p->vdqcr_owned) {
 		FQLOCK(fq);
-		if (fq_isset(fq, QMAN_FQ_STATE_VDQCR))
+		if (fq_isset(fq, QMAN_FQ_STATE_VDQCR)) {
+			FQUNLOCK(fq);
 			goto escape;
+		}
 		fq_set(fq, QMAN_FQ_STATE_VDQCR);
 		FQUNLOCK(fq);
 		p->vdqcr_owned = fq;
@@ -2203,8 +2205,10 @@ int qman_volatile_dequeue(struct qman_fq *fq, u32 flags __maybe_unused,
 
 	if (!p->vdqcr_owned) {
 		FQLOCK(fq);
-		if (fq_isset(fq, QMAN_FQ_STATE_VDQCR))
+		if (fq_isset(fq, QMAN_FQ_STATE_VDQCR)) {
+			FQUNLOCK(fq);
 			goto escape;
+		}
 		fq_set(fq, QMAN_FQ_STATE_VDQCR);
 		FQUNLOCK(fq);
 		p->vdqcr_owned = fq;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.493009101 +0000
+++ 0022-bus-dpaa-fix-lock-condition-during-error-handling.patch	2024-11-20 23:41:22.748195468 +0000
@@ -1 +1 @@
-From c7c3a329750b81bdaeb3f7ceffac0ec3a65f61f8 Mon Sep 17 00:00:00 2001
+From cc3d964ab6cd086011eb5377870b30d0c03c5b48 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c7c3a329750b81bdaeb3f7ceffac0ec3a65f61f8 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 9c90ee25a6..c48fa3e073 100644
+index f06992ca48..3a1a843ba0 100644
@@ -24 +25 @@
-@@ -2138,8 +2138,10 @@ int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags)
+@@ -2169,8 +2169,10 @@ int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags)
@@ -36 +37 @@
-@@ -2172,8 +2174,10 @@ int qman_volatile_dequeue(struct qman_fq *fq, u32 flags __maybe_unused,
+@@ -2203,8 +2205,10 @@ int qman_volatile_dequeue(struct qman_fq *fq, u32 flags __maybe_unused,

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

* patch 'net/iavf: add segment-length check to Tx prep' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (20 preceding siblings ...)
  2024-11-20 23:41         ` patch 'bus/dpaa: fix lock condition during error handling' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'net/i40e: check register read for outer VLAN' " luca.boccassi
                           ` (4 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Padraig Connolly, Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From cc6ceb096e8e1d3d04dc42f6e125a45264087630 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 11 Nov 2024 16:42:20 +0000
Subject: [PATCH] net/iavf: add segment-length check to Tx prep

[ upstream commit 4523e0753b243066357f98fd9739fde72605d0fb ]

In the Tx prep function, the metadata checks were only checking the
packet length and ignoring the data length. For single-buffer packets we
can quickly check that the data length is the packet length.

Fixes: 19ee91c6bd9a ("net/iavf: check illegal packet sizes")

Reported-by: Padraig Connolly <padraig.j.connolly@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Tested-by: Padraig Connolly <padraig.j.connolly@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 6a0cf31a4c..073f724231 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -3005,7 +3005,11 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 			return i;
 		}
 
-		if (m->pkt_len < IAVF_TX_MIN_PKT_LEN) {
+		/* valid packets are greater than min size, and single-buffer pkts
+		 * must have data_len == pkt_len
+		 */
+		if (m->pkt_len < IAVF_TX_MIN_PKT_LEN ||
+				(m->nb_segs == 1 && m->data_len != m->pkt_len)) {
 			rte_errno = EINVAL;
 			return i;
 		}
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.524287358 +0000
+++ 0023-net-iavf-add-segment-length-check-to-Tx-prep.patch	2024-11-20 23:41:22.752195468 +0000
@@ -1 +1 @@
-From 4523e0753b243066357f98fd9739fde72605d0fb Mon Sep 17 00:00:00 2001
+From cc6ceb096e8e1d3d04dc42f6e125a45264087630 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4523e0753b243066357f98fd9739fde72605d0fb ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 4850b9e381..6a093c6746 100644
+index 6a0cf31a4c..073f724231 100644
@@ -25 +26 @@
-@@ -3677,7 +3677,11 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -3005,7 +3005,11 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,

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

* patch 'net/i40e: check register read for outer VLAN' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (21 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/iavf: add segment-length check to Tx prep' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'common/dpaax/caamflib: enable fallthrough warnings' " luca.boccassi
                           ` (3 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From e4545205ccf909b5846666e253cb4458bbbc411c Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Fri, 15 Nov 2024 19:14:25 +0000
Subject: [PATCH] net/i40e: check register read for outer VLAN

[ upstream commit c11c52dd5d2a19c97616ac32a1d4911c48f157d4 ]

'i40e_get_outer_vlan()' does not check 'i40e_aq_debug_read_register()'
return value. This patch fixes this issue, by checking the return value
and, on error, having the i40e_get_outer_vlan() function return that
error back to the caller.

This in turn requires a change in the return type of that function and
updates to the places where it is called to:
* handle the error, and
* handle the tpid being returned as an "out" parameter rather than
  return code.

Coverity issue: 445518
Fixes: 86eb05d6350b ("net/i40e: add flow validate function")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 77 ++++++++++++++++++++++++++++++------
 1 file changed, 65 insertions(+), 12 deletions(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 882152bd4a..be82fac8f2 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -1263,27 +1263,31 @@ i40e_flow_parse_attr(const struct rte_flow_attr *attr,
 	return 0;
 }
 
-static uint16_t
-i40e_get_outer_vlan(struct rte_eth_dev *dev)
+static int
+i40e_get_outer_vlan(struct rte_eth_dev *dev, uint16_t *tpid)
 {
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	int qinq = dev->data->dev_conf.rxmode.offloads &
 		RTE_ETH_RX_OFFLOAD_VLAN_EXTEND;
 	uint64_t reg_r = 0;
 	uint16_t reg_id;
-	uint16_t tpid;
+	int ret;
 
 	if (qinq)
 		reg_id = 2;
 	else
 		reg_id = 3;
 
-	i40e_aq_debug_read_register(hw, I40E_GL_SWT_L2TAGCTRL(reg_id),
+	ret = i40e_aq_debug_read_register(hw, I40E_GL_SWT_L2TAGCTRL(reg_id),
 				    &reg_r, NULL);
+	if (ret != I40E_SUCCESS) {
+		PMD_DRV_LOG(ERR, "Failed to read from L2 tag ctrl register [%d]", reg_id);
+		return -EIO;
+	}
 
-	tpid = (reg_r >> I40E_GL_SWT_L2TAGCTRL_ETHERTYPE_SHIFT) & 0xFFFF;
+	*tpid = (reg_r >> I40E_GL_SWT_L2TAGCTRL_ETHERTYPE_SHIFT) & 0xFFFF;
 
-	return tpid;
+	return 0;
 }
 
 /* 1. Last in item should be NULL as range is not supported.
@@ -1303,6 +1307,8 @@ i40e_flow_parse_ethertype_pattern(struct rte_eth_dev *dev,
 	const struct rte_flow_item_eth *eth_spec;
 	const struct rte_flow_item_eth *eth_mask;
 	enum rte_flow_item_type item_type;
+	int ret;
+	uint16_t tpid;
 
 	for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
 		if (item->last) {
@@ -1361,8 +1367,23 @@ i40e_flow_parse_ethertype_pattern(struct rte_eth_dev *dev,
 
 			if (filter->ether_type == RTE_ETHER_TYPE_IPV4 ||
 			    filter->ether_type == RTE_ETHER_TYPE_IPV6 ||
-			    filter->ether_type == RTE_ETHER_TYPE_LLDP ||
-			    filter->ether_type == i40e_get_outer_vlan(dev)) {
+			    filter->ether_type == RTE_ETHER_TYPE_LLDP) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Unsupported ether_type in control packet filter.");
+				return -rte_errno;
+			}
+
+			ret = i40e_get_outer_vlan(dev, &tpid);
+			if (ret != 0) {
+				rte_flow_error_set(error, EIO,
+						RTE_FLOW_ERROR_TYPE_ITEM,
+						item,
+						"Can not get the Ethertype identifying the L2 tag");
+				return -rte_errno;
+			}
+			if (filter->ether_type == tpid) {
 				rte_flow_error_set(error, EINVAL,
 						   RTE_FLOW_ERROR_TYPE_ITEM,
 						   item,
@@ -1370,6 +1391,7 @@ i40e_flow_parse_ethertype_pattern(struct rte_eth_dev *dev,
 						   " control packet filter.");
 				return -rte_errno;
 			}
+
 			break;
 		default:
 			break;
@@ -1641,6 +1663,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 	bool outer_ip = true;
 	uint8_t field_idx;
 	int ret;
+	uint16_t tpid;
 
 	memset(off_arr, 0, sizeof(off_arr));
 	memset(len_arr, 0, sizeof(len_arr));
@@ -1709,14 +1732,29 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 				ether_type = rte_be_to_cpu_16(eth_spec->type);
 
 				if (ether_type == RTE_ETHER_TYPE_IPV4 ||
-				    ether_type == RTE_ETHER_TYPE_IPV6 ||
-				    ether_type == i40e_get_outer_vlan(dev)) {
+				    ether_type == RTE_ETHER_TYPE_IPV6) {
 					rte_flow_error_set(error, EINVAL,
 						     RTE_FLOW_ERROR_TYPE_ITEM,
 						     item,
 						     "Unsupported ether_type.");
 					return -rte_errno;
 				}
+				ret = i40e_get_outer_vlan(dev, &tpid);
+				if (ret != 0) {
+					rte_flow_error_set(error, EIO,
+							RTE_FLOW_ERROR_TYPE_ITEM,
+							item,
+							"Can not get the Ethertype identifying the L2 tag");
+					return -rte_errno;
+				}
+				if (ether_type == tpid) {
+					rte_flow_error_set(error, EINVAL,
+						     RTE_FLOW_ERROR_TYPE_ITEM,
+						     item,
+						     "Unsupported ether_type.");
+					return -rte_errno;
+				}
+
 				input_set |= I40E_INSET_LAST_ETHER_TYPE;
 				filter->input.flow.l2_flow.ether_type =
 					eth_spec->type;
@@ -1763,14 +1801,29 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 					rte_be_to_cpu_16(vlan_spec->inner_type);
 
 				if (ether_type == RTE_ETHER_TYPE_IPV4 ||
-				    ether_type == RTE_ETHER_TYPE_IPV6 ||
-				    ether_type == i40e_get_outer_vlan(dev)) {
+				    ether_type == RTE_ETHER_TYPE_IPV6) {
 					rte_flow_error_set(error, EINVAL,
 						     RTE_FLOW_ERROR_TYPE_ITEM,
 						     item,
 						     "Unsupported inner_type.");
 					return -rte_errno;
 				}
+				ret = i40e_get_outer_vlan(dev, &tpid);
+				if (ret != 0) {
+					rte_flow_error_set(error, EIO,
+							RTE_FLOW_ERROR_TYPE_ITEM,
+							item,
+							"Can not get the Ethertype identifying the L2 tag");
+					return -rte_errno;
+				}
+				if (ether_type == tpid) {
+					rte_flow_error_set(error, EINVAL,
+						     RTE_FLOW_ERROR_TYPE_ITEM,
+						     item,
+						     "Unsupported ether_type.");
+					return -rte_errno;
+				}
+
 				input_set |= I40E_INSET_LAST_ETHER_TYPE;
 				filter->input.flow.l2_flow.ether_type =
 					vlan_spec->inner_type;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.555254639 +0000
+++ 0024-net-i40e-check-register-read-for-outer-VLAN.patch	2024-11-20 23:41:22.752195468 +0000
@@ -1 +1 @@
-From c11c52dd5d2a19c97616ac32a1d4911c48f157d4 Mon Sep 17 00:00:00 2001
+From e4545205ccf909b5846666e253cb4458bbbc411c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c11c52dd5d2a19c97616ac32a1d4911c48f157d4 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index c6857727e8..cd598431e1 100644
+index 882152bd4a..be82fac8f2 100644
@@ -121 +122 @@
- 				ether_type = rte_be_to_cpu_16(eth_spec->hdr.ether_type);
+ 				ether_type = rte_be_to_cpu_16(eth_spec->type);
@@ -151 +152 @@
- 					eth_spec->hdr.ether_type;
+ 					eth_spec->type;
@@ -153 +154 @@
- 					rte_be_to_cpu_16(vlan_spec->hdr.eth_proto);
+ 					rte_be_to_cpu_16(vlan_spec->inner_type);
@@ -183 +184 @@
- 					vlan_spec->hdr.eth_proto;
+ 					vlan_spec->inner_type;

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

* patch 'common/dpaax/caamflib: enable fallthrough warnings' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (22 preceding siblings ...)
  2024-11-20 23:41         ` patch 'net/i40e: check register read for outer VLAN' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'app/procinfo: fix leak on exit' " luca.boccassi
                           ` (2 subsequent siblings)
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 50b8a025c8b23c5b6ffed29e29519ccd65908da3 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 14 Nov 2024 09:11:54 -0800
Subject: [PATCH] common/dpaax/caamflib: enable fallthrough warnings

[ upstream commit 277552e175b3529863adec9bbd8bb6288164506e ]

Fallthrough warnings catch real bugs and should not be disabled.
There are warnings in this driver in current build.

The commit that added the disable is old, and the problematic code
appears to have been already removed.

Fixes: 2ab9a9483196 ("crypto/dpaa2_sec: fix build with GCC 7")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/common/dpaax/caamflib/rta/operation_cmd.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/common/dpaax/caamflib/rta/operation_cmd.h b/drivers/common/dpaax/caamflib/rta/operation_cmd.h
index fe1ac37ee8..563735eb88 100644
--- a/drivers/common/dpaax/caamflib/rta/operation_cmd.h
+++ b/drivers/common/dpaax/caamflib/rta/operation_cmd.h
@@ -7,10 +7,6 @@
 #ifndef __RTA_OPERATION_CMD_H__
 #define __RTA_OPERATION_CMD_H__
 
-#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 70000)
-#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
-#endif
-
 extern enum rta_sec_era rta_sec_era;
 
 static inline int
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.584446094 +0000
+++ 0025-common-dpaax-caamflib-enable-fallthrough-warnings.patch	2024-11-20 23:41:22.752195468 +0000
@@ -1 +1 @@
-From 277552e175b3529863adec9bbd8bb6288164506e Mon Sep 17 00:00:00 2001
+From 50b8a025c8b23c5b6ffed29e29519ccd65908da3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 277552e175b3529863adec9bbd8bb6288164506e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/procinfo: fix leak on exit' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (23 preceding siblings ...)
  2024-11-20 23:41         ` patch 'common/dpaax/caamflib: enable fallthrough warnings' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'member: fix choice of bucket for displacement' " luca.boccassi
  2024-11-20 23:41         ` patch 'app/testpmd: fix aged flow destroy' " luca.boccassi
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Fidaullah Noonari; +Cc: Stephen Hemminger, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 0b010067c389479edb923a972584396da819d8d5 Mon Sep 17 00:00:00 2001
From: Fidaullah Noonari <fidaullah.noonari@emumba.com>
Date: Thu, 3 Oct 2024 19:48:29 -0700
Subject: [PATCH] app/procinfo: fix leak on exit

[ upstream commit 8a171e52ed8b26f768ced79a22286914ebd30180 ]

When app is launched with -m proc-info exit without
rte_eal_cleanup() causing memory leakage. This commit resolves the
memory leakage issue and closes app properly.

Bugzilla ID: 898
Fixes: 67684d1e87b6 ("app/procinfo: call EAL cleanup before exit")
Fixes: 674bb3906931 ("app/procinfo: display eventdev xstats")

Signed-off-by: Fidaullah Noonari <fidaullah.noonari@emumba.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/proc-info/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 9104f9e6b9..8fd7ac945c 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -1793,7 +1793,7 @@ main(int argc, char **argv)
 
 	if (mem_info) {
 		meminfo_display();
-		return 0;
+		goto cleanup;
 	}
 
 	nb_ports = rte_eth_dev_count_avail();
@@ -1875,6 +1875,7 @@ main(int argc, char **argv)
 	RTE_ETH_FOREACH_DEV(i)
 		rte_eth_dev_close(i);
 
+cleanup:
 	ret = rte_eal_cleanup();
 	if (ret)
 		printf("Error from rte_eal_cleanup(), %d\n", ret);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.612441016 +0000
+++ 0026-app-procinfo-fix-leak-on-exit.patch	2024-11-20 23:41:22.756195468 +0000
@@ -1 +1 @@
-From 8a171e52ed8b26f768ced79a22286914ebd30180 Mon Sep 17 00:00:00 2001
+From 0b010067c389479edb923a972584396da819d8d5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a171e52ed8b26f768ced79a22286914ebd30180 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -19,2 +20,2 @@
- app/proc-info/main.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
+ app/proc-info/main.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
@@ -23 +24 @@
-index 6886eb373a..e1272164b1 100644
+index 9104f9e6b9..8fd7ac945c 100644
@@ -26 +27 @@
-@@ -2171,11 +2171,11 @@ main(int argc, char **argv)
+@@ -1793,7 +1793,7 @@ main(int argc, char **argv)
@@ -34,4 +34,0 @@
- 	if (eventdev_xstats() > 0)
--		return 0;
-+		goto cleanup;
- 
@@ -39,2 +36 @@
- 	if (nb_ports == 0)
-@@ -2256,6 +2256,7 @@ main(int argc, char **argv)
+@@ -1875,6 +1875,7 @@ main(int argc, char **argv)

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

* patch 'member: fix choice of bucket for displacement' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (24 preceding siblings ...)
  2024-11-20 23:41         ` patch 'app/procinfo: fix leak on exit' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-20 23:41         ` patch 'app/testpmd: fix aged flow destroy' " luca.boccassi
  26 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From ad0890d82f1e797f378ca8f4d1c2a2c501df9ac0 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 15 Nov 2024 17:12:29 -0800
Subject: [PATCH] member: fix choice of bucket for displacement

[ upstream commit 33f5b0dcb11580be8091f3b589845e512008e2f0 ]

Because of misuse of & vs && operator, the member code would
always use the primary bucket.

Fixes: 904ec78a239c ("member: implement HT mode")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/member/rte_member_ht.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/member/rte_member_ht.c b/lib/member/rte_member_ht.c
index a85561b472..0d0376b264 100644
--- a/lib/member/rte_member_ht.c
+++ b/lib/member/rte_member_ht.c
@@ -493,7 +493,7 @@ rte_member_add_ht(const struct rte_member_setsum *ss,
 		return ret;
 
 	/* Random pick prim or sec for recursive displacement */
-	uint32_t select_bucket = (tmp_sig && 1U) ? prim_bucket : sec_bucket;
+	uint32_t select_bucket = (tmp_sig & 1U) ? prim_bucket : sec_bucket;
 	if (ss->cache) {
 		ret = evict_from_bucket();
 		buckets[select_bucket].sigs[ret] = tmp_sig;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.641678548 +0000
+++ 0027-member-fix-choice-of-bucket-for-displacement.patch	2024-11-20 23:41:22.756195468 +0000
@@ -1 +1 @@
-From 33f5b0dcb11580be8091f3b589845e512008e2f0 Mon Sep 17 00:00:00 2001
+From ad0890d82f1e797f378ca8f4d1c2a2c501df9ac0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 33f5b0dcb11580be8091f3b589845e512008e2f0 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 357097ff4b..738471b378 100644
+index a85561b472..0d0376b264 100644
@@ -21 +22 @@
-@@ -494,7 +494,7 @@ rte_member_add_ht(const struct rte_member_setsum *ss,
+@@ -493,7 +493,7 @@ rte_member_add_ht(const struct rte_member_setsum *ss,

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

* patch 'app/testpmd: fix aged flow destroy' has been queued to stable release 22.11.7
  2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
                           ` (25 preceding siblings ...)
  2024-11-20 23:41         ` patch 'member: fix choice of bucket for displacement' " luca.boccassi
@ 2024-11-20 23:41         ` luca.boccassi
  2024-11-27  0:54           ` patch 'test/bonding: fix loop on members' " luca.boccassi
  26 siblings, 1 reply; 155+ messages in thread
From: luca.boccassi @ 2024-11-20 23:41 UTC (permalink / raw)
  To: Danylo Vodopianov; +Cc: Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 2e0f9b4eab9cfdfe4e843970621be3f372752771 Mon Sep 17 00:00:00 2001
From: Danylo Vodopianov <dvo-plv@napatech.com>
Date: Mon, 18 Nov 2024 19:03:23 +0100
Subject: [PATCH] app/testpmd: fix aged flow destroy

[ upstream commit 098f949f8a70f7618f5390f9c1e9edfb9e5469c4 ]

port_flow_destroy() function never assumed that rule array can be freed
when it's executing, and port_flow_aged() just violated that assumption.

In case of flow async create failure, it tries to do a cleanup, but it
wrongly removes a 1st flow (with id 0). pf->id is not set at this
moment and it always is 0, thus 1st flow is removed. A local copy of
flow->id must be used to call of port_flow_destroy() to avoid access
and processing of flow->id after the flow is removed.

Fixes: de956d5ecf08 ("app/testpmd: support age shared action context")

Signed-off-by: Danylo Vodopianov <dvo-plv@napatech.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 app/test-pmd/config.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 4ff0e72115..83339ee455 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3561,8 +3561,10 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
 		}
 		type = (enum age_action_context_type *)contexts[idx];
 		switch (*type) {
-		case ACTION_AGE_CONTEXT_TYPE_FLOW:
+		case ACTION_AGE_CONTEXT_TYPE_FLOW: {
+			uint32_t flow_id;
 			ctx.pf = container_of(type, struct port_flow, age_type);
+			flow_id = ctx.pf->id;
 			printf("%-20s\t%" PRIu32 "\t%" PRIu32 "\t%" PRIu32
 								 "\t%c%c%c\t\n",
 			       "Flow",
@@ -3573,9 +3575,10 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
 			       ctx.pf->rule.attr->egress ? 'e' : '-',
 			       ctx.pf->rule.attr->transfer ? 't' : '-');
 			if (destroy && !port_flow_destroy(port_id, 1,
-							  &ctx.pf->id))
+							  &flow_id))
 				total++;
 			break;
+		}
 		case ACTION_AGE_CONTEXT_TYPE_INDIRECT_ACTION:
 			ctx.pia = container_of(type,
 					struct port_indirect_action, age_type);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-20 23:41:23.681026879 +0000
+++ 0028-app-testpmd-fix-aged-flow-destroy.patch	2024-11-20 23:41:22.760195468 +0000
@@ -1 +1 @@
-From 098f949f8a70f7618f5390f9c1e9edfb9e5469c4 Mon Sep 17 00:00:00 2001
+From 2e0f9b4eab9cfdfe4e843970621be3f372752771 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 098f949f8a70f7618f5390f9c1e9edfb9e5469c4 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index c831166431..28d45568ac 100644
+index 4ff0e72115..83339ee455 100644
@@ -28 +29 @@
-@@ -4160,8 +4160,10 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
+@@ -3561,8 +3561,10 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
@@ -34 +35 @@
-+			uint64_t flow_id;
++			uint32_t flow_id;
@@ -37 +38 @@
- 			printf("%-20s\t%" PRIu64 "\t%" PRIu32 "\t%" PRIu32
+ 			printf("%-20s\t%" PRIu32 "\t%" PRIu32 "\t%" PRIu32
@@ -40 +41 @@
-@@ -4172,9 +4174,10 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
+@@ -3573,9 +3575,10 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
@@ -44,2 +45,2 @@
--							  &ctx.pf->id, false))
-+							  &flow_id, false))
+-							  &ctx.pf->id))
++							  &flow_id))

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

* patch 'test/bonding: fix loop on members' has been queued to stable release 22.11.7
  2024-11-20 23:41         ` patch 'app/testpmd: fix aged flow destroy' " luca.boccassi
@ 2024-11-27  0:54           ` luca.boccassi
  2024-11-27  0:54             ` patch 'test/bonding: fix MAC address comparison' " luca.boccassi
                               ` (5 more replies)
  0 siblings, 6 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-27  0:54 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Bruce Richardson, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/634cf74378ab4fb451ea6f24aca1658cfce24743

Thanks.

Luca Boccassi

---
From 634cf74378ab4fb451ea6f24aca1658cfce24743 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 21 Nov 2024 10:23:22 -0800
Subject: [PATCH] test/bonding: fix loop on members

[ upstream commit 112ce3917674b7e316776305d7e27778d17eb1b7 ]

Do not use same variable for outer and inner loop in bonding test.
Since the loop is just freeing the resulting burst use bulk free.

Link: https://pvs-studio.com/en/blog/posts/cpp/1179/
Fixes: 92073ef961ee ("bond: unit tests")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/test/test_link_bonding.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index 53f5c13a24..f342b04802 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -2265,12 +2265,7 @@ test_activebackup_rx_burst(void)
 		}
 
 		/* free mbufs */
-		for (i = 0; i < MAX_PKT_BURST; i++) {
-			if (rx_pkt_burst[i] != NULL) {
-				rte_pktmbuf_free(rx_pkt_burst[i]);
-				rx_pkt_burst[i] = NULL;
-			}
-		}
+		rte_pktmbuf_free_bulk(rx_pkt_burst, burst_size);
 
 		/* reset bonded device stats */
 		rte_eth_stats_reset(test_params->bonded_port_id);
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-27 00:29:59.548769355 +0000
+++ 0001-test-bonding-fix-loop-on-members.patch	2024-11-27 00:29:59.500711022 +0000
@@ -1 +1 @@
-From 112ce3917674b7e316776305d7e27778d17eb1b7 Mon Sep 17 00:00:00 2001
+From 634cf74378ab4fb451ea6f24aca1658cfce24743 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 112ce3917674b7e316776305d7e27778d17eb1b7 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 4d54706c21..805613d7dd 100644
+index 53f5c13a24..f342b04802 100644
@@ -24 +25 @@
-@@ -2288,12 +2288,7 @@ test_activebackup_rx_burst(void)
+@@ -2265,12 +2265,7 @@ test_activebackup_rx_burst(void)
@@ -36,2 +37,2 @@
- 		/* reset bonding device stats */
- 		rte_eth_stats_reset(test_params->bonding_port_id);
+ 		/* reset bonded device stats */
+ 		rte_eth_stats_reset(test_params->bonded_port_id);

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

* patch 'test/bonding: fix MAC address comparison' has been queued to stable release 22.11.7
  2024-11-27  0:54           ` patch 'test/bonding: fix loop on members' " luca.boccassi
@ 2024-11-27  0:54             ` luca.boccassi
  2024-11-27  0:54             ` patch 'test/event: avoid duplicate initialization' " luca.boccassi
                               ` (4 subsequent siblings)
  5 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-27  0:54 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Chengwen Feng, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From d82f1f87600df76212a41eb4b9401ac18c7af5fb Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 21 Nov 2024 10:23:23 -0800
Subject: [PATCH] test/bonding: fix MAC address comparison

[ upstream commit f7f85632daf6d6f525d443f90a0ac3c8a3e40b72 ]

The first argument of 'memcmp' function was equal to the second argument.
Therefore ASSERT would always be true.

Link: https://pvs-studio.com/en/blog/posts/cpp/1179/
Fixes: 92073ef961ee ("bond: unit tests")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/test_link_bonding.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index f342b04802..5dfee4639b 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -786,7 +786,7 @@ test_set_primary_slave(void)
 		TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
 				"Failed to get mac address (port %d)",
 				test_params->bonded_port_id);
-		TEST_ASSERT_SUCCESS(memcmp(&read_mac_addr, &read_mac_addr,
+		TEST_ASSERT_SUCCESS(memcmp(expected_mac_addr, &read_mac_addr,
 				sizeof(read_mac_addr)),
 				"bonded port mac address not set to that of primary port\n");
 
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-27 00:29:59.580661534 +0000
+++ 0002-test-bonding-fix-MAC-address-comparison.patch	2024-11-27 00:29:59.504711022 +0000
@@ -1 +1 @@
-From f7f85632daf6d6f525d443f90a0ac3c8a3e40b72 Mon Sep 17 00:00:00 2001
+From d82f1f87600df76212a41eb4b9401ac18c7af5fb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f7f85632daf6d6f525d443f90a0ac3c8a3e40b72 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 805613d7dd..b752a5ecbf 100644
+index f342b04802..5dfee4639b 100644
@@ -24,2 +25,2 @@
-@@ -792,7 +792,7 @@ test_set_primary_member(void)
- 				&read_mac_addr),
+@@ -786,7 +786,7 @@ test_set_primary_slave(void)
+ 		TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
@@ -27 +28 @@
- 				test_params->bonding_port_id);
+ 				test_params->bonded_port_id);
@@ -31 +32 @@
- 				"bonding port mac address not set to that of primary port\n");
+ 				"bonded port mac address not set to that of primary port\n");

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

* patch 'test/event: avoid duplicate initialization' has been queued to stable release 22.11.7
  2024-11-27  0:54           ` patch 'test/bonding: fix loop on members' " luca.boccassi
  2024-11-27  0:54             ` patch 'test/bonding: fix MAC address comparison' " luca.boccassi
@ 2024-11-27  0:54             ` luca.boccassi
  2024-11-27  0:54             ` patch 'test/eal: fix loop coverage for alignment macros' " luca.boccassi
                               ` (3 subsequent siblings)
  5 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-27  0:54 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Bruce Richardson, Abhinandan Gujjar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From c6448283e306cd3535b274a9612ee2b958e0b9aa Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 21 Nov 2024 10:23:25 -0800
Subject: [PATCH] test/event: avoid duplicate initialization

[ upstream commit 8c08b10d047ac64fb98709871b192698663af7d7 ]

The event_dev_config initialization had duplicate assignments
to the same element. Change to use structure initialization
so that compiler will catch this type of bug.

Link: https://pvs-studio.com/en/blog/posts/cpp/1179/
Fixes: f8f9d233ea0e ("test/eventdev: add unit tests")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
 app/test/test_event_crypto_adapter.c | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 3d720fe68b..7e38f8bfb9 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -1040,21 +1040,17 @@ configure_cryptodev(void)
 
 static inline void
 evdev_set_conf_values(struct rte_event_dev_config *dev_conf,
-			struct rte_event_dev_info *info)
+		      const struct rte_event_dev_info *info)
 {
-	memset(dev_conf, 0, sizeof(struct rte_event_dev_config));
-	dev_conf->dequeue_timeout_ns = info->min_dequeue_timeout_ns;
-	dev_conf->nb_event_ports = NB_TEST_PORTS;
-	dev_conf->nb_event_queues = NB_TEST_QUEUES;
-	dev_conf->nb_event_queue_flows = info->max_event_queue_flows;
-	dev_conf->nb_event_port_dequeue_depth =
-			info->max_event_port_dequeue_depth;
-	dev_conf->nb_event_port_enqueue_depth =
-			info->max_event_port_enqueue_depth;
-	dev_conf->nb_event_port_enqueue_depth =
-			info->max_event_port_enqueue_depth;
-	dev_conf->nb_events_limit =
-			info->max_num_events;
+	*dev_conf = (struct rte_event_dev_config) {
+		.dequeue_timeout_ns = info->min_dequeue_timeout_ns,
+		.nb_event_ports = NB_TEST_PORTS,
+		.nb_event_queues = NB_TEST_QUEUES,
+		.nb_event_queue_flows = info->max_event_queue_flows,
+		.nb_event_port_dequeue_depth = info->max_event_port_dequeue_depth,
+		.nb_event_port_enqueue_depth = info->max_event_port_enqueue_depth,
+		.nb_events_limit = info->max_num_events,
+	};
 }
 
 static int
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-27 00:29:59.612751023 +0000
+++ 0003-test-event-avoid-duplicate-initialization.patch	2024-11-27 00:29:59.504711022 +0000
@@ -1 +1 @@
-From 8c08b10d047ac64fb98709871b192698663af7d7 Mon Sep 17 00:00:00 2001
+From c6448283e306cd3535b274a9612ee2b958e0b9aa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8c08b10d047ac64fb98709871b192698663af7d7 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 9d38a66bfa..ab24e30a97 100644
+index 3d720fe68b..7e38f8bfb9 100644
@@ -25 +26 @@
-@@ -1154,21 +1154,17 @@ configure_cryptodev(void)
+@@ -1040,21 +1040,17 @@ configure_cryptodev(void)

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

* patch 'test/eal: fix loop coverage for alignment macros' has been queued to stable release 22.11.7
  2024-11-27  0:54           ` patch 'test/bonding: fix loop on members' " luca.boccassi
  2024-11-27  0:54             ` patch 'test/bonding: fix MAC address comparison' " luca.boccassi
  2024-11-27  0:54             ` patch 'test/event: avoid duplicate initialization' " luca.boccassi
@ 2024-11-27  0:54             ` luca.boccassi
  2024-11-27  0:54             ` patch 'test/eal: fix lcore check' " luca.boccassi
                               ` (2 subsequent siblings)
  5 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-27  0:54 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From f7b5b45e72939a8bd23d6dc75da6bbeed353c7af Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 21 Nov 2024 10:23:27 -0800
Subject: [PATCH] test/eal: fix loop coverage for alignment macros

[ upstream commit b3e64fe596a3117edf6d3a79a6c5238a9b92dc4f ]

The test loop was much shorter than desired because when
MAX_NUM is defined with out paren's the divide operator /
takes precedence over shift.

But when MAX_NUM is fixed, some tests take too long
and have to be modified to avoid running over full N^2
space of 1<<20.

Note: this is a very old bug, goes back to 2013.

Link: https://pvs-studio.com/en/blog/posts/cpp/1179/
Fixes: 1fb8b07ee511 ("app: add some tests")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/test_common.c | 31 +++++++++++++++++--------------
 1 file changed, 17 insertions(+), 14 deletions(-)

diff --git a/app/test/test_common.c b/app/test/test_common.c
index f89e1eb7ee..372bb8f6ba 100644
--- a/app/test/test_common.c
+++ b/app/test/test_common.c
@@ -8,11 +8,12 @@
 #include <math.h>
 #include <rte_common.h>
 #include <rte_hexdump.h>
+#include <rte_random.h>
 #include <rte_pause.h>
 
 #include "test.h"
 
-#define MAX_NUM 1 << 20
+#define MAX_NUM (1 << 20)
 
 #define FAIL(x)\
 	{printf(x "() test failed!\n");\
@@ -217,19 +218,21 @@ test_align(void)
 		}
 	}
 
-	for (p = 1; p <= MAX_NUM / 2; p++) {
-		for (i = 1; i <= MAX_NUM / 2; i++) {
-			val = RTE_ALIGN_MUL_CEIL(i, p);
-			if (val % p != 0 || val < i)
-				FAIL_ALIGN("RTE_ALIGN_MUL_CEIL", i, p);
-			val = RTE_ALIGN_MUL_FLOOR(i, p);
-			if (val % p != 0 || val > i)
-				FAIL_ALIGN("RTE_ALIGN_MUL_FLOOR", i, p);
-			val = RTE_ALIGN_MUL_NEAR(i, p);
-			if (val % p != 0 || ((val != RTE_ALIGN_MUL_CEIL(i, p))
-				& (val != RTE_ALIGN_MUL_FLOOR(i, p))))
-				FAIL_ALIGN("RTE_ALIGN_MUL_NEAR", i, p);
-		}
+	/* testing the whole space of 2^20^2 takes too long. */
+	for (j = 1; j <= MAX_NUM ; j++) {
+		i = rte_rand_max(MAX_NUM - 1) + 1;
+		p = rte_rand_max(MAX_NUM - 1) + 1;
+
+		val = RTE_ALIGN_MUL_CEIL(i, p);
+		if (val % p != 0 || val < i)
+			FAIL_ALIGN("RTE_ALIGN_MUL_CEIL", i, p);
+		val = RTE_ALIGN_MUL_FLOOR(i, p);
+		if (val % p != 0 || val > i)
+			FAIL_ALIGN("RTE_ALIGN_MUL_FLOOR", i, p);
+		val = RTE_ALIGN_MUL_NEAR(i, p);
+		if (val % p != 0 || ((val != RTE_ALIGN_MUL_CEIL(i, p))
+				     & (val != RTE_ALIGN_MUL_FLOOR(i, p))))
+			FAIL_ALIGN("RTE_ALIGN_MUL_NEAR", i, p);
 	}
 
 	return 0;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-27 00:29:59.642992233 +0000
+++ 0004-test-eal-fix-loop-coverage-for-alignment-macros.patch	2024-11-27 00:29:59.504711022 +0000
@@ -1 +1 @@
-From b3e64fe596a3117edf6d3a79a6c5238a9b92dc4f Mon Sep 17 00:00:00 2001
+From f7b5b45e72939a8bd23d6dc75da6bbeed353c7af Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3e64fe596a3117edf6d3a79a6c5238a9b92dc4f ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 21eb2285e1..6dbd7fc9a9 100644
+index f89e1eb7ee..372bb8f6ba 100644
@@ -30 +31,2 @@
-@@ -9,11 +9,12 @@
+@@ -8,11 +8,12 @@
+ #include <math.h>
@@ -32 +33,0 @@
- #include <rte_bitops.h>
@@ -44 +45 @@
-@@ -218,19 +219,21 @@ test_align(void)
+@@ -217,19 +218,21 @@ test_align(void)

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

* patch 'test/eal: fix lcore check' has been queued to stable release 22.11.7
  2024-11-27  0:54           ` patch 'test/bonding: fix loop on members' " luca.boccassi
                               ` (2 preceding siblings ...)
  2024-11-27  0:54             ` patch 'test/eal: fix loop coverage for alignment macros' " luca.boccassi
@ 2024-11-27  0:54             ` luca.boccassi
  2024-11-27  0:54             ` patch 'app/testpmd: remove redundant policy action condition' " luca.boccassi
  2024-11-27  0:54             ` patch 'doc: correct definition of stats per queue feature' " luca.boccassi
  5 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-27  0:54 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Bruce Richardson, Aaron Conole, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 0cbed5e68fb59cb03b27e21700d48c1c094c0daf Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 21 Nov 2024 10:23:28 -0800
Subject: [PATCH] test/eal: fix lcore check

[ upstream commit 357f915ef5e1280d921fb103ea33066e7a888ed2 ]

The expression for checking which lcore is enabled for 0-7
was wrong (missing case for 6).

Link: https://pvs-studio.com/en/blog/posts/cpp/1179/
Fixes: b0209034f2bb ("test/eal: check number of cores before running subtests")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 app/test/test_eal_flags.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index f4740ee6e5..767a9f3134 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -677,8 +677,8 @@ test_missing_c_flag(void)
 
 	if (rte_lcore_is_enabled(0) && rte_lcore_is_enabled(1) &&
 	    rte_lcore_is_enabled(2) && rte_lcore_is_enabled(3) &&
-	    rte_lcore_is_enabled(3) && rte_lcore_is_enabled(5) &&
-	    rte_lcore_is_enabled(4) && rte_lcore_is_enabled(7) &&
+	    rte_lcore_is_enabled(4) && rte_lcore_is_enabled(5) &&
+	    rte_lcore_is_enabled(6) && rte_lcore_is_enabled(7) &&
 	    launch_proc(argv29) != 0) {
 		printf("Error - "
 		       "process did not run ok with valid corelist value\n");
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-27 00:29:59.668873519 +0000
+++ 0005-test-eal-fix-lcore-check.patch	2024-11-27 00:29:59.508711022 +0000
@@ -1 +1 @@
-From 357f915ef5e1280d921fb103ea33066e7a888ed2 Mon Sep 17 00:00:00 2001
+From 0cbed5e68fb59cb03b27e21700d48c1c094c0daf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 357f915ef5e1280d921fb103ea33066e7a888ed2 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index d37d6b8627..e32f83d3c8 100644
+index f4740ee6e5..767a9f3134 100644

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

* patch 'app/testpmd: remove redundant policy action condition' has been queued to stable release 22.11.7
  2024-11-27  0:54           ` patch 'test/bonding: fix loop on members' " luca.boccassi
                               ` (3 preceding siblings ...)
  2024-11-27  0:54             ` patch 'test/eal: fix lcore check' " luca.boccassi
@ 2024-11-27  0:54             ` luca.boccassi
  2024-11-27  0:54             ` patch 'doc: correct definition of stats per queue feature' " luca.boccassi
  5 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-27  0:54 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Bruce Richardson, Ajit Khaparde, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From 8d8d069395174f14110cf1379fbe0870e5f26923 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 21 Nov 2024 10:23:29 -0800
Subject: [PATCH] app/testpmd: remove redundant policy action condition

[ upstream commit 4c2e7468426ae6be3f2a8f2d15e7d1222083eb9d ]

The loop over policy actions will always exit when it sees
the flow end action, so the next check is redundant.

Link: https://pvs-studio.com/en/blog/posts/cpp/1179/
Fixes: f29fa2c59b85 ("app/testpmd: support policy actions per color")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/test-pmd/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 83339ee455..189bf68223 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2137,7 +2137,7 @@ port_meter_policy_add(portid_t port_id, uint32_t policy_id,
 		for (act_n = 0, start = act;
 			act->type != RTE_FLOW_ACTION_TYPE_END; act++)
 			act_n++;
-		if (act_n && act->type == RTE_FLOW_ACTION_TYPE_END)
+		if (act_n > 0)
 			policy.actions[i] = start;
 		else
 			policy.actions[i] = NULL;
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-27 00:29:59.696867912 +0000
+++ 0006-app-testpmd-remove-redundant-policy-action-condition.patch	2024-11-27 00:29:59.512711022 +0000
@@ -1 +1 @@
-From 4c2e7468426ae6be3f2a8f2d15e7d1222083eb9d Mon Sep 17 00:00:00 2001
+From 8d8d069395174f14110cf1379fbe0870e5f26923 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4c2e7468426ae6be3f2a8f2d15e7d1222083eb9d ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- app/test-pmd/config.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
+ app/test-pmd/config.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -22 +23 @@
-index 28d45568ac..4e7fb69183 100644
+index 83339ee455..189bf68223 100644
@@ -25 +26 @@
-@@ -2288,7 +2288,7 @@ port_meter_policy_add(portid_t port_id, uint32_t policy_id,
+@@ -2137,7 +2137,7 @@ port_meter_policy_add(portid_t port_id, uint32_t policy_id,
@@ -34,5 +34,0 @@
-@@ -7338,4 +7338,3 @@ show_mcast_macs(portid_t port_id)
- 		printf("  %s\n", buf);
- 	}
- }
--

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

* patch 'doc: correct definition of stats per queue feature' has been queued to stable release 22.11.7
  2024-11-27  0:54           ` patch 'test/bonding: fix loop on members' " luca.boccassi
                               ` (4 preceding siblings ...)
  2024-11-27  0:54             ` patch 'app/testpmd: remove redundant policy action condition' " luca.boccassi
@ 2024-11-27  0:54             ` luca.boccassi
  5 siblings, 0 replies; 155+ messages in thread
From: luca.boccassi @ 2024-11-27  0:54 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.7

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

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

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

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

Thanks.

Luca Boccassi

---
From fec1fb480002cc05072bab2e2cfc44cdee4b6758 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 10 Oct 2024 18:38:27 -0700
Subject: [PATCH] doc: correct definition of stats per queue feature

[ upstream commit 71eae7fe3eac90b70200460c714d1c13ee43dc25 ]

Change the documentation to match current usage of this feature
in the NIC table. Moved this sub heading to be after basic
stats because the queue stats reported now are in the same structure.

Although the "Stats per Queue" feature was originally intended
to be related to stats mapping, the overwhelming majority of drivers
report this feature with a different meaning.

Hopefully in later release the per-queue stats limitations
can be fixed, but this requires and API, ABI, and lots of driver
changes.

Fixes: dad1ec72a377 ("doc: document NIC features")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 doc/guides/nics/features.rst | 34 ++++++++++++++++++++--------------
 1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 4332ff0a31..5e662ba42b 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -705,14 +705,32 @@ Basic stats
 Support basic statistics such as: ipackets, opackets, ibytes, obytes,
 imissed, ierrors, oerrors, rx_nombuf.
 
-And per queue stats: q_ipackets, q_opackets, q_ibytes, q_obytes, q_errors.
-
 These apply to all drivers.
 
 * **[implements] eth_dev_ops**: ``stats_get``, ``stats_reset``.
 * **[related]    API**: ``rte_eth_stats_get``, ``rte_eth_stats_reset()``.
 
 
+.. _nic_features_stats_per_queue:
+
+Stats per queue
+---------------
+
+Supports per queue stats: q_ipackets, q_opackets, q_ibytes, q_obytes, q_errors.
+Statistics only supplied for first ``RTE_ETHDEV_QUEUE_STAT_CNTRS`` (16) queues.
+If driver does not support this feature the per queue stats will be zero.
+
+* **[implements] eth_dev_ops**: ``stats_get``, ``stats_reset``.
+* **[related]    API**: ``rte_eth_stats_get``, ``rte_eth_stats_reset()``.
+
+May also support configuring per-queue stat counter mapping.
+Used by some drivers to workaround HW limitations.
+
+* **[implements] eth_dev_ops**: ``queue_stats_mapping_set``.
+* **[related]    API**: ``rte_eth_dev_set_rx_queue_stats_mapping()``,
+  ``rte_eth_dev_set_tx_queue_stats_mapping()``.
+
+
 .. _nic_features_extended_stats:
 
 Extended stats
@@ -727,18 +745,6 @@ Supports Extended Statistics, changes from driver to driver.
   ``rte_eth_xstats_get_names_by_id()``, ``rte_eth_xstats_get_id_by_name()``.
 
 
-.. _nic_features_stats_per_queue:
-
-Stats per queue
----------------
-
-Supports configuring per-queue stat counter mapping.
-
-* **[implements] eth_dev_ops**: ``queue_stats_mapping_set``.
-* **[related]    API**: ``rte_eth_dev_set_rx_queue_stats_mapping()``,
-  ``rte_eth_dev_set_tx_queue_stats_mapping()``.
-
-
 .. _nic_features_congestion_management:
 
 Congestion management
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-27 00:29:59.729481755 +0000
+++ 0007-doc-correct-definition-of-stats-per-queue-feature.patch	2024-11-27 00:29:59.512711022 +0000
@@ -1 +1 @@
-From 71eae7fe3eac90b70200460c714d1c13ee43dc25 Mon Sep 17 00:00:00 2001
+From fec1fb480002cc05072bab2e2cfc44cdee4b6758 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 71eae7fe3eac90b70200460c714d1c13ee43dc25 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 0508f118fe..8bd448139e 100644
+index 4332ff0a31..5e662ba42b 100644
@@ -31 +32 @@
-@@ -729,14 +729,32 @@ Basic stats
+@@ -705,14 +705,32 @@ Basic stats
@@ -66 +67 @@
-@@ -751,18 +769,6 @@ Supports Extended Statistics, changes from driver to driver.
+@@ -727,18 +745,6 @@ Supports Extended Statistics, changes from driver to driver.

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

end of thread, other threads:[~2024-11-27  0:55 UTC | newest]

Thread overview: 155+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-23 21:15 patch 'devtools: fix forbidden token check with multiple files' has been queued to stable release 22.11.7 luca.boccassi
2024-10-23 21:15 ` patch 'eal/x86: fix 32-bit write combining store' " luca.boccassi
2024-10-23 21:15 ` patch 'examples/eventdev: fix queue crash with generic pipeline' " luca.boccassi
2024-10-23 21:15 ` patch 'crypto/dpaa2_sec: fix memory leak' " luca.boccassi
2024-10-23 21:15 ` patch 'common/dpaax/caamflib: fix PDCP SNOW-ZUC watchdog' " luca.boccassi
2024-10-23 21:15 ` patch 'dev: fix callback lookup when unregistering device' " luca.boccassi
2024-10-23 21:15 ` patch 'examples/ipsec-secgw: fix dequeue count from cryptodev' " luca.boccassi
2024-10-23 21:15 ` patch 'bpf: fix free function mismatch if convert fails' " luca.boccassi
2024-10-23 21:15 ` patch 'baseband/la12xx: fix use after free in modem config' " luca.boccassi
2024-10-23 21:15 ` patch 'crypto/bcmfs: fix free function mismatch' " luca.boccassi
2024-10-23 21:15 ` patch 'dma/idxd: fix free function mismatch in device probe' " luca.boccassi
2024-10-23 21:15 ` patch 'event/cnxk: fix free function mismatch in port config' " luca.boccassi
2024-10-23 21:15 ` patch 'net/e1000: fix use after free in filter flush' " luca.boccassi
2024-10-23 21:15 ` patch 'net/nfp: fix double free in flow destroy' " luca.boccassi
2024-10-23 21:15 ` patch 'net/sfc: fix use after free in debug logs' " luca.boccassi
2024-10-23 21:15 ` patch 'raw/ifpga/base: fix use after free' " luca.boccassi
2024-10-23 21:15 ` patch 'raw/ifpga: fix free function mismatch in interrupt config' " luca.boccassi
2024-10-23 21:15 ` patch 'examples/vhost: fix free function mismatch' " luca.boccassi
2024-10-23 21:15 ` patch 'net/nfb: fix use after free' " luca.boccassi
2024-10-23 21:16 ` patch 'power: enable CPPC' " luca.boccassi
2024-10-23 21:16 ` patch 'fib6: add runtime checks in AVX512 lookup' " luca.boccassi
2024-10-23 21:16 ` patch 'app/dumpcap: fix handling of jumbo frames' " luca.boccassi
2024-10-23 21:16 ` patch 'net/cnxk: fix Rx timestamp handling for VF' " luca.boccassi
2024-10-23 21:16 ` patch 'net/cnxk: fix Rx offloads to handle timestamp' " luca.boccassi
2024-10-23 21:16 ` patch 'event/cnxk: fix Rx timestamp handling' " luca.boccassi
2024-10-23 21:16 ` patch 'common/cnxk: fix CPT HW word size for outbound SA' " luca.boccassi
2024-10-23 21:16 ` patch 'common/cnxk: fix base log level' " luca.boccassi
2024-10-23 21:16 ` patch 'baseband/acc: fix access to deallocated mem' " luca.boccassi
2024-10-23 21:16 ` patch 'vhost: fix offset while mapping log base address' " luca.boccassi
2024-10-23 21:16 ` patch 'vdpa: update used flags in used ring relay' " luca.boccassi
2024-10-23 21:16 ` patch 'net/virtio-user: reset used index counter' " luca.boccassi
2024-10-23 21:16 ` patch 'fib: fix AVX512 lookup' " luca.boccassi
2024-10-23 21:16 ` patch 'net/e1000: fix link status crash in secondary process' " luca.boccassi
2024-10-23 21:16 ` patch 'net/iavf: fix crash when link is unstable' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ice/base: fix link speed for 200G' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ice/base: fix iteration of TLVs in Preserved Fields Area' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ixgbe/base: fix unchecked return value' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix setting flags in init function' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix misleading debug logs and comments' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix blinking X722 with X557 PHY' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix DDP loading with reserved track ID' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix repeated register dumps' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix unchecked return value' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e/base: fix loop bounds' " luca.boccassi
2024-10-23 21:16 ` patch 'net/i40e: fix AVX-512 pointer copy on 32-bit' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ice: " luca.boccassi
2024-10-23 21:16 ` patch 'net/iavf: " luca.boccassi
2024-10-23 21:16 ` patch 'net/tap: avoid memcpy with null argument' " luca.boccassi
2024-10-23 21:16 ` patch 'app/testpmd: remove unnecessary cast' " luca.boccassi
2024-10-23 21:16 ` patch 'net/pcap: set live interface as non-blocking' " luca.boccassi
2024-10-23 21:16 ` patch 'net/mana: support rdma-core via pkg-config' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ena: revert redefining memcpy' " luca.boccassi
2024-10-23 21:16 ` patch 'net/hns3: remove some basic address dump' " luca.boccassi
2024-10-23 21:16 ` patch 'net/hns3: fix dump counter of registers' " luca.boccassi
2024-10-23 21:16 ` patch 'ethdev: fix overflow in descriptor count' " luca.boccassi
2024-10-23 21:16 ` patch 'bus/dpaa: fix PFDRs leaks due to FQRNIs' " luca.boccassi
2024-10-23 21:16 ` patch 'net/dpaa: fix typecasting channel ID' " luca.boccassi
2024-10-23 21:16 ` patch 'bus/dpaa: fix VSP for 1G fm1-mac9 and 10' " luca.boccassi
2024-10-23 21:16 ` patch 'bus/dpaa: fix the fman details status' " luca.boccassi
2024-10-23 21:16 ` patch 'net/dpaa: fix reallocate mbuf handling' " luca.boccassi
2024-10-23 21:16 ` patch 'net/memif: fix buffer overflow in zero copy Rx' " luca.boccassi
2024-10-23 21:16 ` patch 'net/tap: restrict maximum number of MP FDs' " luca.boccassi
2024-10-23 21:16 ` patch 'ethdev: verify queue ID in Tx done cleanup' " luca.boccassi
2024-10-23 21:16 ` patch 'net/hns3: verify reset type from firmware' " luca.boccassi
2024-10-23 21:16 ` patch 'net/nfp: fix link change return value' " luca.boccassi
2024-10-23 21:16 ` patch 'net/pcap: fix blocking Rx' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ice/base: add bounds check' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ice/base: fix VLAN replay after reset' " luca.boccassi
2024-10-23 21:16 ` patch 'net/iavf: preserve MAC address with i40e PF Linux driver' " luca.boccassi
2024-10-23 21:16 ` patch 'net/mlx5: workaround list management of Rx queue control' " luca.boccassi
2024-10-23 21:16 ` patch 'net/mlx5: fix number of supported flex parsers' " luca.boccassi
2024-10-23 21:16 ` patch 'app/testpmd: remove flex item init command leftover' " luca.boccassi
2024-10-23 21:16 ` patch 'net/mlx5: fix next protocol validation after flex item' " luca.boccassi
2024-10-23 21:16 ` patch 'build: remove version check on compiler links function' " luca.boccassi
2024-10-23 21:16 ` patch 'hash: fix thash LFSR initialization' " luca.boccassi
2024-10-23 21:16 ` patch 'dmadev: fix potential null pointer access' " luca.boccassi
2024-10-23 21:16 ` patch 'net/gve/base: fix build with Fedora Rawhide' " luca.boccassi
2024-10-23 21:16 ` patch 'power: fix mapped lcore ID' " luca.boccassi
2024-10-23 21:16 ` patch 'net/ionic: fix build on Fedora Rawhide' " luca.boccassi
2024-11-12 22:07   ` patch 'buildtools/chkincs: check driver specific headers' " luca.boccassi
2024-11-12 22:07     ` patch 'net/netvsc: fix using Tx queue higher than Rx queues' " luca.boccassi
2024-11-12 22:07     ` patch 'net/hns3: restrict tunnel flow rule to one header' " luca.boccassi
2024-11-12 22:07     ` patch 'net/ice: detect stopping a flow director queue twice' " luca.boccassi
2024-11-12 22:07     ` patch 'net/ixgbe: fix link status delay on FreeBSD' " luca.boccassi
2024-11-12 22:07     ` patch 'net/mvneta: fix possible out-of-bounds write' " luca.boccassi
2024-11-12 22:07     ` patch 'config/arm: fix warning for native build with meson >= 0.55' " luca.boccassi
2024-11-12 22:07     ` patch 'crypto/openssl: fix 3DES-CTR with big endian CPUs' " luca.boccassi
2024-11-12 22:07     ` patch 'eal/unix: optimize thread creation' " luca.boccassi
2024-11-13  7:45       ` David Marchand
2024-11-12 22:07     ` patch 'net/mlx5: fix memory leak in metering' " luca.boccassi
2024-11-12 22:07     ` patch 'net/mlx5: fix GRE flow item translation for root table' " luca.boccassi
2024-11-12 22:07     ` patch 'net/mlx5: fix SQ flow item size' " luca.boccassi
2024-11-12 22:07     ` patch 'net/mlx5: fix SWS meter state initialization' " luca.boccassi
2024-11-12 22:07     ` patch 'net/mlx5: fix reported Rx/Tx descriptor limits' " luca.boccassi
2024-11-12 22:07     ` patch 'app/dumpcap: remove unused struct array' " luca.boccassi
2024-11-12 22:07     ` patch 'bus/fslmc: fix Coverity warnings in QBMAN' " luca.boccassi
2024-11-12 22:07     ` patch 'net/dpaa2: fix memory corruption in TM' " luca.boccassi
2024-11-12 22:07     ` patch 'examples/l3fwd: fix read beyond boundaries' " luca.boccassi
2024-11-12 22:07     ` patch 'test/bonding: remove redundant info query' " luca.boccassi
2024-11-12 22:07     ` patch 'examples/ntb: check info query return' " luca.boccassi
2024-11-12 22:07     ` patch 'net/netvsc: force Tx VLAN offload on 801.2Q packet' " luca.boccassi
2024-11-12 22:07     ` patch 'net/vmxnet3: fix crash after configuration failure' " luca.boccassi
2024-11-12 22:07     ` patch 'net/hns3: remove ROH devices' " luca.boccassi
2024-11-12 22:07     ` patch 'net/txgbe: fix SWFW mbox' " luca.boccassi
2024-11-12 22:07     ` patch 'net/txgbe: fix VF-PF mbox interrupt' " luca.boccassi
2024-11-12 22:07     ` patch 'net/txgbe: remove outer UDP checksum capability' " luca.boccassi
2024-11-12 22:07     ` patch 'net/txgbe: fix driver load bit to inform firmware' " luca.boccassi
2024-11-12 22:07     ` patch 'net/ngbe: " luca.boccassi
2024-11-12 22:07     ` patch 'net/ngbe: reconfigure more MAC Rx registers' " luca.boccassi
2024-11-12 22:07     ` patch 'net/ngbe: fix interrupt lost in legacy or MSI mode' " luca.boccassi
2024-11-12 22:07     ` patch 'net/ngbe: restrict configuration of VLAN strip offload' " luca.boccassi
2024-11-12 22:07     ` patch 'net/vmxnet3: fix potential out of bounds stats access' " luca.boccassi
2024-11-12 22:07     ` patch 'net/vmxnet3: support larger MTU with version 6' " luca.boccassi
2024-11-12 22:07     ` patch 'net/hns3: fix error code for repeatedly create counter' " luca.boccassi
2024-11-12 22:07     ` patch 'net/hns3: fix fully use hardware flow director table' " luca.boccassi
2024-11-12 22:07     ` patch 'event/octeontx: fix possible integer overflow' " luca.boccassi
2024-11-12 22:07     ` patch 'baseband/acc: fix ring memory allocation' " luca.boccassi
2024-11-12 22:07     ` patch 'crypto/openssl: fix potential string overflow' " luca.boccassi
2024-11-12 22:07     ` patch 'test/crypto: fix synchronous API calls' " luca.boccassi
2024-11-12 22:07     ` patch 'crypto/qat: fix modexp/inv length' " luca.boccassi
2024-11-20 23:41       ` patch 'net/bnxt/tf_core: fix Thor TF EM key size check' " luca.boccassi
2024-11-20 23:41         ` patch 'net/bnxt/tf_ulp: fix parent child DB counters' " luca.boccassi
2024-11-20 23:41         ` patch 'net/bnxt: fix reading SFF-8436 SFP EEPROMs' " luca.boccassi
2024-11-20 23:41         ` patch 'net/bnxt: fix TCP and UDP checksum flags' " luca.boccassi
2024-11-20 23:41         ` patch 'net/bnxt: fix bad action offset in Tx BD' " luca.boccassi
2024-11-20 23:41         ` patch 'net/bnx2x: remove dead conditional' " luca.boccassi
2024-11-20 23:41         ` patch 'net/bnx2x: fix always true expression' " luca.boccassi
2024-11-20 23:41         ` patch 'net/bnx2x: fix possible infinite loop at startup' " luca.boccassi
2024-11-20 23:41         ` patch 'net/bnx2x: fix duplicate branch' " luca.boccassi
2024-11-20 23:41         ` patch 'common/cnxk: fix build on Ubuntu 24.04' " luca.boccassi
2024-11-20 23:41         ` patch 'net/cnxk: " luca.boccassi
2024-11-20 23:41         ` patch 'examples/l2fwd-event: fix spinlock handling' " luca.boccassi
2024-11-20 23:41         ` patch 'eventdev: fix possible array underflow/overflow' " luca.boccassi
2024-11-20 23:41         ` patch 'net/dpaa2: remove unnecessary check for null before free' " luca.boccassi
2024-11-20 23:41         ` patch 'common/mlx5: fix error CQE handling for 128 bytes CQE' " luca.boccassi
2024-11-20 23:41         ` patch 'net/mlx5: fix shared queue port number in vector Rx' " luca.boccassi
2024-11-20 23:41         ` patch 'net/mlx5/hws: fix allocation of STCs' " luca.boccassi
2024-11-20 23:41         ` patch 'net/mlx5: fix counter query loop getting stuck' " luca.boccassi
2024-11-20 23:41         ` patch 'common/mlx5: fix misalignment' " luca.boccassi
2024-11-20 23:41         ` patch 'net/mlx5: fix default RSS flows creation order' " luca.boccassi
2024-11-20 23:41         ` patch 'net/mlx5: fix Rx queue reference count in flushing flows' " luca.boccassi
2024-11-20 23:41         ` patch 'bus/dpaa: fix lock condition during error handling' " luca.boccassi
2024-11-20 23:41         ` patch 'net/iavf: add segment-length check to Tx prep' " luca.boccassi
2024-11-20 23:41         ` patch 'net/i40e: check register read for outer VLAN' " luca.boccassi
2024-11-20 23:41         ` patch 'common/dpaax/caamflib: enable fallthrough warnings' " luca.boccassi
2024-11-20 23:41         ` patch 'app/procinfo: fix leak on exit' " luca.boccassi
2024-11-20 23:41         ` patch 'member: fix choice of bucket for displacement' " luca.boccassi
2024-11-20 23:41         ` patch 'app/testpmd: fix aged flow destroy' " luca.boccassi
2024-11-27  0:54           ` patch 'test/bonding: fix loop on members' " luca.boccassi
2024-11-27  0:54             ` patch 'test/bonding: fix MAC address comparison' " luca.boccassi
2024-11-27  0:54             ` patch 'test/event: avoid duplicate initialization' " luca.boccassi
2024-11-27  0:54             ` patch 'test/eal: fix loop coverage for alignment macros' " luca.boccassi
2024-11-27  0:54             ` patch 'test/eal: fix lcore check' " luca.boccassi
2024-11-27  0:54             ` patch 'app/testpmd: remove redundant policy action condition' " luca.boccassi
2024-11-27  0:54             ` patch 'doc: correct definition of stats per queue feature' " luca.boccassi

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).