patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'hash: remove some dead code' has been queued to stable release 22.11.5
@ 2024-03-07  1:30 luca.boccassi
  2024-03-07  1:30 ` patch 'regexdev: fix logtype register' " luca.boccassi
                   ` (100 more replies)
  0 siblings, 101 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: David Marchand
  Cc: Stephen Hemminger, Tyler Retzlaff, Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From f66284d141383f8eb0057bfab43f1c4040dc2a7f Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 21 Nov 2023 16:24:23 +0100
Subject: [PATCH] hash: remove some dead code

[ upstream commit 25e3fe362b3ad7484750eb7134bfca8e3fab5703 ]

This macro is not used.

Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 lib/hash/rte_cuckoo_hash.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/lib/hash/rte_cuckoo_hash.h b/lib/hash/rte_cuckoo_hash.h
index eb2644f74b..b5a608b442 100644
--- a/lib/hash/rte_cuckoo_hash.h
+++ b/lib/hash/rte_cuckoo_hash.h
@@ -29,17 +29,6 @@
 #define RETURN_IF_TRUE(cond, retval)
 #endif
 
-#if defined(RTE_LIBRTE_HASH_DEBUG)
-#define ERR_IF_TRUE(cond, fmt, args...) do { \
-	if (cond) { \
-		RTE_LOG(ERR, HASH, fmt, ##args); \
-		return; \
-	} \
-} while (0)
-#else
-#define ERR_IF_TRUE(cond, fmt, args...)
-#endif
-
 #include <rte_hash_crc.h>
 #include <rte_jhash.h>
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:35.217417098 +0000
+++ 0001-hash-remove-some-dead-code.patch	2024-03-07 01:05:34.498933650 +0000
@@ -1 +1 @@
-From 25e3fe362b3ad7484750eb7134bfca8e3fab5703 Mon Sep 17 00:00:00 2001
+From f66284d141383f8eb0057bfab43f1c4040dc2a7f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 25e3fe362b3ad7484750eb7134bfca8e3fab5703 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index f7afc4dd79..8ea793c66e 100644
+index eb2644f74b..b5a608b442 100644

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

* patch 'regexdev: fix logtype register' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'lib: use dedicated logtypes and macros' " luca.boccassi
                   ` (99 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: David Marchand; +Cc: Stephen Hemminger, Tyler Retzlaff, Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From cf93b45a7005455b1a310e725803c2e1bcd147eb Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 7 Dec 2023 14:50:41 +0100
Subject: [PATCH] regexdev: fix logtype register

[ upstream commit 6351bdeb975dcf4b00ae1319f1d901eb65d4d4d3 ]

This library logtype was not initialized so its logs would end up under
the 0 logtype, iow, RTE_LOGTYPE_EAL.

Fixes: b25246beaefc ("regexdev: add core functions")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 lib/regexdev/rte_regexdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/regexdev/rte_regexdev.c b/lib/regexdev/rte_regexdev.c
index caec069182..d38a85eb0b 100644
--- a/lib/regexdev/rte_regexdev.c
+++ b/lib/regexdev/rte_regexdev.c
@@ -19,7 +19,7 @@ static struct {
 	struct rte_regexdev_data data[RTE_MAX_REGEXDEV_DEVS];
 } *rte_regexdev_shared_data;
 
-int rte_regexdev_logtype;
+RTE_LOG_REGISTER_DEFAULT(rte_regexdev_logtype, INFO);
 
 static uint16_t
 regexdev_find_free_dev(void)
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:35.280740408 +0000
+++ 0002-regexdev-fix-logtype-register.patch	2024-03-07 01:05:34.502933734 +0000
@@ -1 +1 @@
-From 6351bdeb975dcf4b00ae1319f1d901eb65d4d4d3 Mon Sep 17 00:00:00 2001
+From cf93b45a7005455b1a310e725803c2e1bcd147eb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6351bdeb975dcf4b00ae1319f1d901eb65d4d4d3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* patch 'lib: use dedicated logtypes and macros' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
  2024-03-07  1:30 ` patch 'regexdev: fix logtype register' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'lib: add newline in logs' " luca.boccassi
                   ` (98 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: David Marchand
  Cc: Stephen Hemminger, Tyler Retzlaff, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 88ba671592c0c0c91bd711de31a1f6dc4b9c5a6e Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 6 Dec 2023 13:51:57 +0100
Subject: [PATCH] lib: use dedicated logtypes and macros

[ upstream commit c07da8e381ef860e972abd90400f134c64f3f77a ]

No printf!
When a dedicated log helper exists, use it.
And no usurpation please: a library should log under its logtype
(see the eventdev rx adapter update for example).

Note: the RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET macro is renamed for
consistency with the rest of eventdev (private) macros.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/cryptodev/rte_cryptodev.c           |  2 +-
 lib/ethdev/ethdev_driver.c              |  4 ++--
 lib/ethdev/ethdev_private.c             |  2 +-
 lib/ethdev/rte_class_eth.c              |  2 +-
 lib/eventdev/rte_event_eth_rx_adapter.c | 12 ++++++------
 lib/eventdev/rte_eventdev.c             |  6 +++---
 lib/mempool/rte_mempool_ops.c           |  2 +-
 7 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 515d0df5ce..98d32d91a1 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -2579,7 +2579,7 @@ rte_cryptodev_driver_id_get(const char *name)
 	int driver_id = -1;
 
 	if (name == NULL) {
-		RTE_LOG(DEBUG, CRYPTODEV, "name pointer NULL");
+		CDEV_LOG_DEBUG("name pointer NULL");
 		return -1;
 	}
 
diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
index 0be1e8ca04..0387c7133d 100644
--- a/lib/ethdev/ethdev_driver.c
+++ b/lib/ethdev/ethdev_driver.c
@@ -465,7 +465,7 @@ rte_eth_devargs_parse(const char *dargs, struct rte_eth_devargs *eth_da)
 		pair = &args.pairs[i];
 		if (strcmp("representor", pair->key) == 0) {
 			if (eth_da->type != RTE_ETH_REPRESENTOR_NONE) {
-				RTE_LOG(ERR, EAL, "duplicated representor key: %s\n",
+				RTE_ETHDEV_LOG(ERR, "duplicated representor key: %s\n",
 					dargs);
 				result = -1;
 				goto parse_cleanup;
@@ -691,7 +691,7 @@ rte_eth_representor_id_get(uint16_t port_id,
 		if (info->ranges[i].controller != controller)
 			continue;
 		if (info->ranges[i].id_end < info->ranges[i].id_base) {
-			RTE_LOG(WARNING, EAL, "Port %hu invalid representor ID Range %u - %u, entry %d\n",
+			RTE_ETHDEV_LOG(WARNING, "Port %hu invalid representor ID Range %u - %u, entry %d\n",
 				port_id, info->ranges[i].id_base,
 				info->ranges[i].id_end, i);
 			continue;
diff --git a/lib/ethdev/ethdev_private.c b/lib/ethdev/ethdev_private.c
index 48090c879a..17f7933c99 100644
--- a/lib/ethdev/ethdev_private.c
+++ b/lib/ethdev/ethdev_private.c
@@ -184,7 +184,7 @@ rte_eth_devargs_parse_representor_ports(char *str, void *data)
 		RTE_DIM(eth_da->representor_ports));
 done:
 	if (str == NULL)
-		RTE_LOG(ERR, EAL, "wrong representor format: %s\n", str);
+		RTE_ETHDEV_LOG(ERR, "wrong representor format: %s\n", str);
 	return str == NULL ? -1 : 0;
 }
 
diff --git a/lib/ethdev/rte_class_eth.c b/lib/ethdev/rte_class_eth.c
index b61dae849d..311beb17cb 100644
--- a/lib/ethdev/rte_class_eth.c
+++ b/lib/ethdev/rte_class_eth.c
@@ -165,7 +165,7 @@ eth_dev_iterate(const void *start,
 			valid_keys = eth_params_keys;
 		kvargs = rte_kvargs_parse(str, valid_keys);
 		if (kvargs == NULL) {
-			RTE_LOG(ERR, EAL, "cannot parse argument list\n");
+			RTE_ETHDEV_LOG(ERR, "cannot parse argument list\n");
 			rte_errno = EINVAL;
 			return NULL;
 		}
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index 6636128378..0be4777e2a 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -311,9 +311,9 @@ rxa_event_buf_get(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,
 	} \
 } while (0)
 
-#define RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(port_id, retval) do { \
+#define RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(port_id, retval) do { \
 	if (!rte_eth_dev_is_valid_port(port_id)) { \
-		RTE_ETHDEV_LOG(ERR, "Invalid port_id=%u\n", port_id); \
+		RTE_EDEV_LOG_ERR("Invalid port_id=%u", port_id); \
 		ret = retval; \
 		goto error; \
 	} \
@@ -3521,7 +3521,7 @@ handle_rxa_get_queue_conf(const char *cmd __rte_unused,
 
 	/* Get device ID from parameter string */
 	eth_dev_id = strtoul(token, NULL, 10);
-	RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);
+	RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);
 
 	token = strtok(NULL, ",");
 	RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET(token, -1);
@@ -3593,7 +3593,7 @@ handle_rxa_get_queue_stats(const char *cmd __rte_unused,
 
 	/* Get device ID from parameter string */
 	eth_dev_id = strtoul(token, NULL, 10);
-	RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);
+	RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);
 
 	token = strtok(NULL, ",");
 	RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET(token, -1);
@@ -3663,7 +3663,7 @@ handle_rxa_queue_stats_reset(const char *cmd __rte_unused,
 
 	/* Get device ID from parameter string */
 	eth_dev_id = strtoul(token, NULL, 10);
-	RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);
+	RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);
 
 	token = strtok(NULL, ",");
 	RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET(token, -1);
@@ -3718,7 +3718,7 @@ handle_rxa_instance_get(const char *cmd __rte_unused,
 
 	/* Get device ID from parameter string */
 	eth_dev_id = strtoul(token, NULL, 10);
-	RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);
+	RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL);
 
 	token = strtok(NULL, ",");
 	RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET(token, -1);
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 04eeb76d4f..c7d5f62e13 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -1263,8 +1263,8 @@ rte_event_vector_pool_create(const char *name, unsigned int n,
 	int ret;
 
 	if (!nb_elem) {
-		RTE_LOG(ERR, EVENTDEV,
-			"Invalid number of elements=%d requested\n", nb_elem);
+		RTE_EDEV_LOG_ERR("Invalid number of elements=%d requested",
+			nb_elem);
 		rte_errno = EINVAL;
 		return NULL;
 	}
@@ -1279,7 +1279,7 @@ rte_event_vector_pool_create(const char *name, unsigned int n,
 	mp_ops_name = rte_mbuf_best_mempool_ops();
 	ret = rte_mempool_set_ops_byname(mp, mp_ops_name, NULL);
 	if (ret != 0) {
-		RTE_LOG(ERR, EVENTDEV, "error setting mempool handler\n");
+		RTE_EDEV_LOG_ERR("error setting mempool handler");
 		goto err;
 	}
 
diff --git a/lib/mempool/rte_mempool_ops.c b/lib/mempool/rte_mempool_ops.c
index 3b43edc548..9db952150a 100644
--- a/lib/mempool/rte_mempool_ops.c
+++ b/lib/mempool/rte_mempool_ops.c
@@ -46,7 +46,7 @@ rte_mempool_register_ops(const struct rte_mempool_ops *h)
 
 	if (strlen(h->name) >= sizeof(ops->name) - 1) {
 		rte_spinlock_unlock(&rte_mempool_ops_table.sl);
-		RTE_LOG(DEBUG, EAL, "%s(): mempool_ops <%s>: name too long\n",
+		RTE_LOG(DEBUG, MEMPOOL, "%s(): mempool_ops <%s>: name too long\n",
 				__func__, h->name);
 		rte_errno = EEXIST;
 		return -EEXIST;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:35.361675402 +0000
+++ 0003-lib-use-dedicated-logtypes-and-macros.patch	2024-03-07 01:05:34.550934752 +0000
@@ -1 +1 @@
-From c07da8e381ef860e972abd90400f134c64f3f77a Mon Sep 17 00:00:00 2001
+From 88ba671592c0c0c91bd711de31a1f6dc4b9c5a6e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c07da8e381ef860e972abd90400f134c64f3f77a ]
+
@@ -14,2 +15,0 @@
-Cc: stable@dpdk.org
-
@@ -25 +24,0 @@
- lib/eventdev/rte_event_dma_adapter.c    |  4 ++--
@@ -29 +28 @@
- 8 files changed, 17 insertions(+), 17 deletions(-)
+ 7 files changed, 15 insertions(+), 15 deletions(-)
@@ -32 +31 @@
-index 25e3ec12d1..ead8c9a623 100644
+index 515d0df5ce..98d32d91a1 100644
@@ -35 +34 @@
-@@ -2684,7 +2684,7 @@ rte_cryptodev_driver_id_get(const char *name)
+@@ -2579,7 +2579,7 @@ rte_cryptodev_driver_id_get(const char *name)
@@ -45 +44 @@
-index fff4b7b4cd..55a9dcc565 100644
+index 0be1e8ca04..0387c7133d 100644
@@ -48 +47 @@
-@@ -487,7 +487,7 @@ rte_eth_devargs_parse(const char *dargs, struct rte_eth_devargs *eth_da)
+@@ -465,7 +465,7 @@ rte_eth_devargs_parse(const char *dargs, struct rte_eth_devargs *eth_da)
@@ -57 +56 @@
-@@ -713,7 +713,7 @@ rte_eth_representor_id_get(uint16_t port_id,
+@@ -691,7 +691,7 @@ rte_eth_representor_id_get(uint16_t port_id,
@@ -67 +66 @@
-index e98b7188b0..0e1c7b23c1 100644
+index 48090c879a..17f7933c99 100644
@@ -70 +69 @@
-@@ -182,7 +182,7 @@ rte_eth_devargs_parse_representor_ports(char *str, void *data)
+@@ -184,7 +184,7 @@ rte_eth_devargs_parse_representor_ports(char *str, void *data)
@@ -92,22 +90,0 @@
-diff --git a/lib/eventdev/rte_event_dma_adapter.c b/lib/eventdev/rte_event_dma_adapter.c
-index af4b5ad388..cbf9405438 100644
---- a/lib/eventdev/rte_event_dma_adapter.c
-+++ b/lib/eventdev/rte_event_dma_adapter.c
-@@ -1046,7 +1046,7 @@ rte_event_dma_adapter_vchan_add(uint8_t id, int16_t dma_dev_id, uint16_t vchan,
- 							sizeof(struct dma_vchan_info),
- 							0, adapter->socket_id);
- 			if (dev_info->vchanq == NULL) {
--				printf("Queue pair add not supported\n");
-+				RTE_EDEV_LOG_ERR("Queue pair add not supported");
- 				return -ENOMEM;
- 			}
- 		}
-@@ -1057,7 +1057,7 @@ rte_event_dma_adapter_vchan_add(uint8_t id, int16_t dma_dev_id, uint16_t vchan,
- 						sizeof(struct dma_vchan_info),
- 						0, adapter->socket_id);
- 			if (dev_info->tqmap == NULL) {
--				printf("tq pair add not supported\n");
-+				RTE_EDEV_LOG_ERR("tq pair add not supported");
- 				return -ENOMEM;
- 			}
- 		}
@@ -115 +92 @@
-index 6db03adf04..82ae31712d 100644
+index 6636128378..0be4777e2a 100644
@@ -118 +95 @@
-@@ -314,9 +314,9 @@ rxa_event_buf_get(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,
+@@ -311,9 +311,9 @@ rxa_event_buf_get(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,
@@ -130 +107 @@
-@@ -3671,7 +3671,7 @@ handle_rxa_get_queue_conf(const char *cmd __rte_unused,
+@@ -3521,7 +3521,7 @@ handle_rxa_get_queue_conf(const char *cmd __rte_unused,
@@ -139 +116 @@
-@@ -3743,7 +3743,7 @@ handle_rxa_get_queue_stats(const char *cmd __rte_unused,
+@@ -3593,7 +3593,7 @@ handle_rxa_get_queue_stats(const char *cmd __rte_unused,
@@ -148 +125 @@
-@@ -3813,7 +3813,7 @@ handle_rxa_queue_stats_reset(const char *cmd __rte_unused,
+@@ -3663,7 +3663,7 @@ handle_rxa_queue_stats_reset(const char *cmd __rte_unused,
@@ -157 +134 @@
-@@ -3868,7 +3868,7 @@ handle_rxa_instance_get(const char *cmd __rte_unused,
+@@ -3718,7 +3718,7 @@ handle_rxa_instance_get(const char *cmd __rte_unused,
@@ -167 +144 @@
-index 0ca32d6721..ae50821a3f 100644
+index 04eeb76d4f..c7d5f62e13 100644
@@ -170 +147 @@
-@@ -1428,8 +1428,8 @@ rte_event_vector_pool_create(const char *name, unsigned int n,
+@@ -1263,8 +1263,8 @@ rte_event_vector_pool_create(const char *name, unsigned int n,
@@ -181 +158 @@
-@@ -1444,7 +1444,7 @@ rte_event_vector_pool_create(const char *name, unsigned int n,
+@@ -1279,7 +1279,7 @@ rte_event_vector_pool_create(const char *name, unsigned int n,
@@ -191 +168 @@
-index ae1d288f27..e871de9ec9 100644
+index 3b43edc548..9db952150a 100644

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

* patch 'lib: add newline in logs' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
  2024-03-07  1:30 ` patch 'regexdev: fix logtype register' " luca.boccassi
  2024-03-07  1:30 ` patch 'lib: use dedicated logtypes and macros' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'lib: remove redundant newline from " luca.boccassi
                   ` (97 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: David Marchand
  Cc: Stephen Hemminger, Tyler Retzlaff, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 31a09fab4baa0714b799487c7e84aa1133fee682 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 6 Dec 2023 11:59:59 +0100
Subject: [PATCH] lib: add newline in logs

[ upstream commit 8e2407e46782d43f9a1d83d72e279a4f86389bcd ]

Fix places leading to a log message not terminated with a newline.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/eal/common/eal_common_options.c |  2 +-
 lib/eal/linux/eal_hugepage_info.c   |  2 +-
 lib/eal/linux/eal_interrupts.c      |  2 +-
 lib/ethdev/ethdev_pci.h             |  2 +-
 lib/ethdev/rte_ethdev.c             | 40 ++++++++++++++---------------
 lib/lpm/rte_lpm6.c                  |  6 ++---
 lib/power/guest_channel.c           |  2 +-
 lib/power/rte_power_pmd_mgmt.c      |  6 ++---
 8 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
index 2d6535781b..43b16805da 100644
--- a/lib/eal/common/eal_common_options.c
+++ b/lib/eal/common/eal_common_options.c
@@ -2142,7 +2142,7 @@ rte_vect_set_max_simd_bitwidth(uint16_t bitwidth)
 	struct internal_config *internal_conf =
 		eal_get_internal_configuration();
 	if (internal_conf->max_simd_bitwidth.forced) {
-		RTE_LOG(NOTICE, EAL, "Cannot set max SIMD bitwidth - user runtime override enabled");
+		RTE_LOG(NOTICE, EAL, "Cannot set max SIMD bitwidth - user runtime override enabled\n");
 		return -EPERM;
 	}
 
diff --git a/lib/eal/linux/eal_hugepage_info.c b/lib/eal/linux/eal_hugepage_info.c
index 581d9dfc91..36a495fb1f 100644
--- a/lib/eal/linux/eal_hugepage_info.c
+++ b/lib/eal/linux/eal_hugepage_info.c
@@ -403,7 +403,7 @@ inspect_hugedir_cb(const struct walk_hugedir_data *whd)
 	struct stat st;
 
 	if (fstat(whd->file_fd, &st) < 0)
-		RTE_LOG(DEBUG, EAL, "%s(): stat(\"%s\") failed: %s",
+		RTE_LOG(DEBUG, EAL, "%s(): stat(\"%s\") failed: %s\n",
 				__func__, whd->file_name, strerror(errno));
 	else
 		(*total_size) += st.st_size;
diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index d52ec8eb4c..0b25dffe3b 100644
--- a/lib/eal/linux/eal_interrupts.c
+++ b/lib/eal/linux/eal_interrupts.c
@@ -1542,7 +1542,7 @@ rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd)
 		/* only check, initialization would be done in vdev driver.*/
 		if ((uint64_t)rte_intr_efd_counter_size_get(intr_handle) >
 		    sizeof(union rte_intr_read_buffer)) {
-			RTE_LOG(ERR, EAL, "the efd_counter_size is oversized");
+			RTE_LOG(ERR, EAL, "the efd_counter_size is oversized\n");
 			return -EINVAL;
 		}
 	} else {
diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h
index 320e3e0093..ddb559aa95 100644
--- a/lib/ethdev/ethdev_pci.h
+++ b/lib/ethdev/ethdev_pci.h
@@ -31,7 +31,7 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,
 	struct rte_pci_device *pci_dev)
 {
 	if ((eth_dev == NULL) || (pci_dev == NULL)) {
-		RTE_ETHDEV_LOG(ERR, "NULL pointer eth_dev=%p pci_dev=%p",
+		RTE_ETHDEV_LOG(ERR, "NULL pointer eth_dev=%p pci_dev=%p\n",
 			(void *)eth_dev, (void *)pci_dev);
 		return;
 	}
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 4f50e2fa80..e1f18fd8a4 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -631,7 +631,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
 	uint16_t pid;
 
 	if (name == NULL) {
-		RTE_ETHDEV_LOG(ERR, "Cannot get port ID from NULL name");
+		RTE_ETHDEV_LOG(ERR, "Cannot get port ID from NULL name\n");
 		return -EINVAL;
 	}
 
@@ -2097,41 +2097,41 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 		nb_rx_desc = cap.max_nb_desc;
 	if (nb_rx_desc > cap.max_nb_desc) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for nb_rx_desc(=%hu), should be: <= %hu",
+			"Invalid value for nb_rx_desc(=%hu), should be: <= %hu\n",
 			nb_rx_desc, cap.max_nb_desc);
 		return -EINVAL;
 	}
 	if (conf->peer_count > cap.max_rx_2_tx) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for number of peers for Rx queue(=%u), should be: <= %hu",
+			"Invalid value for number of peers for Rx queue(=%u), should be: <= %hu\n",
 			conf->peer_count, cap.max_rx_2_tx);
 		return -EINVAL;
 	}
 	if (conf->use_locked_device_memory && !cap.rx_cap.locked_device_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use locked device memory for Rx queue, which is not supported");
+			"Attempt to use locked device memory for Rx queue, which is not supported\n");
 		return -EINVAL;
 	}
 	if (conf->use_rte_memory && !cap.rx_cap.rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use DPDK memory for Rx queue, which is not supported");
+			"Attempt to use DPDK memory for Rx queue, which is not supported\n");
 		return -EINVAL;
 	}
 	if (conf->use_locked_device_memory && conf->use_rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use mutually exclusive memory settings for Rx queue");
+			"Attempt to use mutually exclusive memory settings for Rx queue\n");
 		return -EINVAL;
 	}
 	if (conf->force_memory &&
 	    !conf->use_locked_device_memory &&
 	    !conf->use_rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to force Rx queue memory settings, but none is set");
+			"Attempt to force Rx queue memory settings, but none is set\n");
 		return -EINVAL;
 	}
 	if (conf->peer_count == 0) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for number of peers for Rx queue(=%u), should be: > 0",
+			"Invalid value for number of peers for Rx queue(=%u), should be: > 0\n",
 			conf->peer_count);
 		return -EINVAL;
 	}
@@ -2141,7 +2141,7 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 			count++;
 	}
 	if (count > cap.max_nb_queues) {
-		RTE_ETHDEV_LOG(ERR, "To many Rx hairpin queues max is %d",
+		RTE_ETHDEV_LOG(ERR, "To many Rx hairpin queues max is %d\n",
 		cap.max_nb_queues);
 		return -EINVAL;
 	}
@@ -2286,41 +2286,41 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
 		nb_tx_desc = cap.max_nb_desc;
 	if (nb_tx_desc > cap.max_nb_desc) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for nb_tx_desc(=%hu), should be: <= %hu",
+			"Invalid value for nb_tx_desc(=%hu), should be: <= %hu\n",
 			nb_tx_desc, cap.max_nb_desc);
 		return -EINVAL;
 	}
 	if (conf->peer_count > cap.max_tx_2_rx) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for number of peers for Tx queue(=%u), should be: <= %hu",
+			"Invalid value for number of peers for Tx queue(=%u), should be: <= %hu\n",
 			conf->peer_count, cap.max_tx_2_rx);
 		return -EINVAL;
 	}
 	if (conf->use_locked_device_memory && !cap.tx_cap.locked_device_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use locked device memory for Tx queue, which is not supported");
+			"Attempt to use locked device memory for Tx queue, which is not supported\n");
 		return -EINVAL;
 	}
 	if (conf->use_rte_memory && !cap.tx_cap.rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use DPDK memory for Tx queue, which is not supported");
+			"Attempt to use DPDK memory for Tx queue, which is not supported\n");
 		return -EINVAL;
 	}
 	if (conf->use_locked_device_memory && conf->use_rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use mutually exclusive memory settings for Tx queue");
+			"Attempt to use mutually exclusive memory settings for Tx queue\n");
 		return -EINVAL;
 	}
 	if (conf->force_memory &&
 	    !conf->use_locked_device_memory &&
 	    !conf->use_rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to force Tx queue memory settings, but none is set");
+			"Attempt to force Tx queue memory settings, but none is set\n");
 		return -EINVAL;
 	}
 	if (conf->peer_count == 0) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for number of peers for Tx queue(=%u), should be: > 0",
+			"Invalid value for number of peers for Tx queue(=%u), should be: > 0\n",
 			conf->peer_count);
 		return -EINVAL;
 	}
@@ -2330,7 +2330,7 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
 			count++;
 	}
 	if (count > cap.max_nb_queues) {
-		RTE_ETHDEV_LOG(ERR, "To many Tx hairpin queues max is %d",
+		RTE_ETHDEV_LOG(ERR, "To many Tx hairpin queues max is %d\n",
 		cap.max_nb_queues);
 		return -EINVAL;
 	}
@@ -6152,7 +6152,7 @@ rte_eth_ip_reassembly_capability_get(uint16_t port_id,
 	}
 
 	if (reassembly_capa == NULL) {
-		RTE_ETHDEV_LOG(ERR, "Cannot get reassembly capability to NULL");
+		RTE_ETHDEV_LOG(ERR, "Cannot get reassembly capability to NULL\n");
 		return -EINVAL;
 	}
 
@@ -6182,7 +6182,7 @@ rte_eth_ip_reassembly_conf_get(uint16_t port_id,
 	}
 
 	if (conf == NULL) {
-		RTE_ETHDEV_LOG(ERR, "Cannot get reassembly info to NULL");
+		RTE_ETHDEV_LOG(ERR, "Cannot get reassembly info to NULL\n");
 		return -EINVAL;
 	}
 
@@ -6205,7 +6205,7 @@ rte_eth_ip_reassembly_conf_set(uint16_t port_id,
 	if (dev->data->dev_configured == 0) {
 		RTE_ETHDEV_LOG(ERR,
 			"Device with port_id=%u is not configured.\n"
-			"Cannot set IP reassembly configuration",
+			"Cannot set IP reassembly configuration\n",
 			port_id);
 		return -EINVAL;
 	}
diff --git a/lib/lpm/rte_lpm6.c b/lib/lpm/rte_lpm6.c
index 8d21aeddb8..79c75d8dfc 100644
--- a/lib/lpm/rte_lpm6.c
+++ b/lib/lpm/rte_lpm6.c
@@ -279,7 +279,7 @@ rte_lpm6_create(const char *name, int socket_id,
 
 	rules_tbl = rte_hash_create(&rule_hash_tbl_params);
 	if (rules_tbl == NULL) {
-		RTE_LOG(ERR, LPM, "LPM rules hash table allocation failed: %s (%d)",
+		RTE_LOG(ERR, LPM, "LPM rules hash table allocation failed: %s (%d)\n",
 				  rte_strerror(rte_errno), rte_errno);
 		goto fail_wo_unlock;
 	}
@@ -289,7 +289,7 @@ rte_lpm6_create(const char *name, int socket_id,
 			sizeof(uint32_t) * config->number_tbl8s,
 			RTE_CACHE_LINE_SIZE);
 	if (tbl8_pool == NULL) {
-		RTE_LOG(ERR, LPM, "LPM tbl8 pool allocation failed: %s (%d)",
+		RTE_LOG(ERR, LPM, "LPM tbl8 pool allocation failed: %s (%d)\n",
 				  rte_strerror(rte_errno), rte_errno);
 		rte_errno = ENOMEM;
 		goto fail_wo_unlock;
@@ -300,7 +300,7 @@ rte_lpm6_create(const char *name, int socket_id,
 			sizeof(struct rte_lpm_tbl8_hdr) * config->number_tbl8s,
 			RTE_CACHE_LINE_SIZE);
 	if (tbl8_hdrs == NULL) {
-		RTE_LOG(ERR, LPM, "LPM tbl8 headers allocation failed: %s (%d)",
+		RTE_LOG(ERR, LPM, "LPM tbl8 headers allocation failed: %s (%d)\n",
 				  rte_strerror(rte_errno), rte_errno);
 		rte_errno = ENOMEM;
 		goto fail_wo_unlock;
diff --git a/lib/power/guest_channel.c b/lib/power/guest_channel.c
index 969a9e5aaa..0117b856bb 100644
--- a/lib/power/guest_channel.c
+++ b/lib/power/guest_channel.c
@@ -89,7 +89,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
 	flags |= O_NONBLOCK;
 	if (fcntl(fd, F_SETFL, flags) < 0) {
 		RTE_LOG(ERR, GUEST_CHANNEL, "Failed on setting non-blocking mode for "
-				"file %s", fd_path);
+				"file %s\n", fd_path);
 		goto error;
 	}
 	/* QEMU needs a delay after connection */
diff --git a/lib/power/rte_power_pmd_mgmt.c b/lib/power/rte_power_pmd_mgmt.c
index ca1840387c..f9a2606e6c 100644
--- a/lib/power/rte_power_pmd_mgmt.c
+++ b/lib/power/rte_power_pmd_mgmt.c
@@ -684,7 +684,7 @@ int
 rte_power_pmd_mgmt_set_pause_duration(unsigned int duration)
 {
 	if (duration == 0) {
-		RTE_LOG(ERR, POWER, "Pause duration must be greater than 0, value unchanged");
+		RTE_LOG(ERR, POWER, "Pause duration must be greater than 0, value unchanged\n");
 		return -EINVAL;
 	}
 	pause_duration = duration;
@@ -707,7 +707,7 @@ rte_power_pmd_mgmt_set_scaling_freq_min(unsigned int lcore, unsigned int min)
 	}
 
 	if (min > scale_freq_max[lcore]) {
-		RTE_LOG(ERR, POWER, "Invalid min frequency: Cannot be greater than max frequency");
+		RTE_LOG(ERR, POWER, "Invalid min frequency: Cannot be greater than max frequency\n");
 		return -EINVAL;
 	}
 	scale_freq_min[lcore] = min;
@@ -727,7 +727,7 @@ rte_power_pmd_mgmt_set_scaling_freq_max(unsigned int lcore, unsigned int max)
 	if (max == 0)
 		max = UINT32_MAX;
 	if (max < scale_freq_min[lcore]) {
-		RTE_LOG(ERR, POWER, "Invalid max frequency: Cannot be less than min frequency");
+		RTE_LOG(ERR, POWER, "Invalid max frequency: Cannot be less than min frequency\n");
 		return -EINVAL;
 	}
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:35.448715053 +0000
+++ 0004-lib-add-newline-in-logs.patch	2024-03-07 01:05:34.594935686 +0000
@@ -1 +1 @@
-From 8e2407e46782d43f9a1d83d72e279a4f86389bcd Mon Sep 17 00:00:00 2001
+From 31a09fab4baa0714b799487c7e84aa1133fee682 Mon Sep 17 00:00:00 2001
@@ -6 +6 @@
-Fix places leading to a log message not terminated with a newline.
+[ upstream commit 8e2407e46782d43f9a1d83d72e279a4f86389bcd ]
@@ -8 +8 @@
-Cc: stable@dpdk.org
+Fix places leading to a log message not terminated with a newline.
@@ -26 +26 @@
-index a6d21f1cba..e9ba01fb89 100644
+index 2d6535781b..43b16805da 100644
@@ -29 +29 @@
-@@ -2141,7 +2141,7 @@ rte_vect_set_max_simd_bitwidth(uint16_t bitwidth)
+@@ -2142,7 +2142,7 @@ rte_vect_set_max_simd_bitwidth(uint16_t bitwidth)
@@ -52 +52 @@
-index d4919dff45..eabac24992 100644
+index d52ec8eb4c..0b25dffe3b 100644
@@ -78 +78 @@
-index 3858983fcc..b9d99ece15 100644
+index 4f50e2fa80..e1f18fd8a4 100644
@@ -81 +81 @@
-@@ -724,7 +724,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
+@@ -631,7 +631,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
@@ -90 +90 @@
-@@ -2394,41 +2394,41 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
+@@ -2097,41 +2097,41 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
@@ -139 +139 @@
-@@ -2438,7 +2438,7 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
+@@ -2141,7 +2141,7 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
@@ -148 +148 @@
-@@ -2597,41 +2597,41 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
+@@ -2286,41 +2286,41 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
@@ -197 +197 @@
-@@ -2641,7 +2641,7 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
+@@ -2330,7 +2330,7 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
@@ -206 +206 @@
-@@ -6716,7 +6716,7 @@ rte_eth_ip_reassembly_capability_get(uint16_t port_id,
+@@ -6152,7 +6152,7 @@ rte_eth_ip_reassembly_capability_get(uint16_t port_id,
@@ -215 +215 @@
-@@ -6752,7 +6752,7 @@ rte_eth_ip_reassembly_conf_get(uint16_t port_id,
+@@ -6182,7 +6182,7 @@ rte_eth_ip_reassembly_conf_get(uint16_t port_id,
@@ -224 +224 @@
-@@ -6780,7 +6780,7 @@ rte_eth_ip_reassembly_conf_set(uint16_t port_id,
+@@ -6205,7 +6205,7 @@ rte_eth_ip_reassembly_conf_set(uint16_t port_id,
@@ -234 +234 @@
-index 873cc8bc26..24ce7dd022 100644
+index 8d21aeddb8..79c75d8dfc 100644
@@ -237 +237 @@
-@@ -280,7 +280,7 @@ rte_lpm6_create(const char *name, int socket_id,
+@@ -279,7 +279,7 @@ rte_lpm6_create(const char *name, int socket_id,
@@ -246 +246 @@
-@@ -290,7 +290,7 @@ rte_lpm6_create(const char *name, int socket_id,
+@@ -289,7 +289,7 @@ rte_lpm6_create(const char *name, int socket_id,
@@ -255 +255 @@
-@@ -301,7 +301,7 @@ rte_lpm6_create(const char *name, int socket_id,
+@@ -300,7 +300,7 @@ rte_lpm6_create(const char *name, int socket_id,
@@ -265 +265 @@
-index cc05347425..a6f2097d5b 100644
+index 969a9e5aaa..0117b856bb 100644
@@ -268 +268 @@
-@@ -90,7 +90,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
+@@ -89,7 +89,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
@@ -278 +278 @@
-index 38f8384085..6f18ed0adf 100644
+index ca1840387c..f9a2606e6c 100644
@@ -281 +281 @@
-@@ -686,7 +686,7 @@ int
+@@ -684,7 +684,7 @@ int
@@ -290 +290 @@
-@@ -709,7 +709,7 @@ rte_power_pmd_mgmt_set_scaling_freq_min(unsigned int lcore, unsigned int min)
+@@ -707,7 +707,7 @@ rte_power_pmd_mgmt_set_scaling_freq_min(unsigned int lcore, unsigned int min)
@@ -299 +299 @@
-@@ -729,7 +729,7 @@ rte_power_pmd_mgmt_set_scaling_freq_max(unsigned int lcore, unsigned int max)
+@@ -727,7 +727,7 @@ rte_power_pmd_mgmt_set_scaling_freq_max(unsigned int lcore, unsigned int max)

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

* patch 'lib: remove redundant newline from logs' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (2 preceding siblings ...)
  2024-03-07  1:30 ` patch 'lib: add newline in logs' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'bus/ifpga: remove dead code' " luca.boccassi
                   ` (96 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: David Marchand
  Cc: Stephen Hemminger, Chengwen Feng, Mattias Rönnblom, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From d0ec6c1277fb02cfe118cd3a018d506077a64009 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 17 Nov 2023 14:18:22 +0100
Subject: [PATCH] lib: remove redundant newline from logs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit ae282b0611c33aa73a01ee6137d116155053b835 ]

Fix places where two newline characters may be logged.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 drivers/crypto/ipsec_mb/ipsec_mb_ops.c  |  2 +-
 lib/bbdev/rte_bbdev.c                   |  6 +++---
 lib/cfgfile/rte_cfgfile.c               | 14 +++++++-------
 lib/compressdev/rte_compressdev_pmd.c   |  4 ++--
 lib/cryptodev/rte_cryptodev.c           |  2 +-
 lib/dmadev/rte_dmadev.c                 |  2 +-
 lib/eal/windows/eal_memory.c            |  2 +-
 lib/eventdev/eventdev_pmd.h             |  6 +++---
 lib/eventdev/rte_event_crypto_adapter.c |  8 ++++----
 lib/eventdev/rte_event_eth_rx_adapter.c | 24 ++++++++++++------------
 lib/eventdev/rte_event_eth_tx_adapter.c |  2 +-
 lib/eventdev/rte_event_timer_adapter.c  |  4 ++--
 lib/eventdev/rte_eventdev.c             |  2 +-
 lib/metrics/rte_metrics_telemetry.c     |  2 +-
 lib/net/rte_net_crc.c                   |  6 +++---
 lib/node/ethdev_rx.c                    |  4 ++--
 lib/node/ip4_lookup.c                   |  2 +-
 lib/rcu/rte_rcu_qsbr.c                  |  4 ++--
 lib/rcu/rte_rcu_qsbr.h                  |  8 ++++----
 lib/stack/rte_stack.c                   |  8 ++++----
 lib/vhost/vhost_crypto.c                |  6 +++---
 21 files changed, 59 insertions(+), 59 deletions(-)

diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
index 30f919cd40..2a5599b7d8 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
@@ -406,7 +406,7 @@ ipsec_mb_ipc_request(const struct rte_mp_msg *mp_msg, const void *peer)
 		resp_param->result = ipsec_mb_qp_release(dev, qp_id);
 		break;
 	default:
-		CDEV_LOG_ERR("invalid mp request type\n");
+		CDEV_LOG_ERR("invalid mp request type");
 	}
 
 out:
diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
index 1521cdbc53..71f1957bf7 100644
--- a/lib/bbdev/rte_bbdev.c
+++ b/lib/bbdev/rte_bbdev.c
@@ -1102,12 +1102,12 @@ rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op,
 
 	intr_handle = dev->intr_handle;
 	if (intr_handle == NULL) {
-		rte_bbdev_log(ERR, "Device %u intr handle unset\n", dev_id);
+		rte_bbdev_log(ERR, "Device %u intr handle unset", dev_id);
 		return -ENOTSUP;
 	}
 
 	if (queue_id >= RTE_MAX_RXTX_INTR_VEC_ID) {
-		rte_bbdev_log(ERR, "Device %u queue_id %u is too big\n",
+		rte_bbdev_log(ERR, "Device %u queue_id %u is too big",
 				dev_id, queue_id);
 		return -ENOTSUP;
 	}
@@ -1116,7 +1116,7 @@ rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op,
 	ret = rte_intr_rx_ctl(intr_handle, epfd, op, vec, data);
 	if (ret && (ret != -EEXIST)) {
 		rte_bbdev_log(ERR,
-				"dev %u q %u int ctl error op %d epfd %d vec %u\n",
+				"dev %u q %u int ctl error op %d epfd %d vec %u",
 				dev_id, queue_id, op, epfd, vec);
 		return ret;
 	}
diff --git a/lib/cfgfile/rte_cfgfile.c b/lib/cfgfile/rte_cfgfile.c
index 9fa7d010ef..e2f77d2b64 100644
--- a/lib/cfgfile/rte_cfgfile.c
+++ b/lib/cfgfile/rte_cfgfile.c
@@ -135,7 +135,7 @@ rte_cfgfile_check_params(const struct rte_cfgfile_parameters *params)
 	unsigned int i;
 
 	if (!params) {
-		CFG_LOG(ERR, "missing cfgfile parameters\n");
+		CFG_LOG(ERR, "missing cfgfile parameters");
 		return -EINVAL;
 	}
 
@@ -148,7 +148,7 @@ rte_cfgfile_check_params(const struct rte_cfgfile_parameters *params)
 	}
 
 	if (valid_comment == 0)	{
-		CFG_LOG(ERR, "invalid comment characters %c\n",
+		CFG_LOG(ERR, "invalid comment characters %c",
 		       params->comment_character);
 		return -ENOTSUP;
 	}
@@ -186,7 +186,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
 		lineno++;
 		if ((len >= sizeof(buffer) - 1) && (buffer[len-1] != '\n')) {
 			CFG_LOG(ERR, " line %d - no \\n found on string. "
-					"Check if line too long\n", lineno);
+					"Check if line too long", lineno);
 			goto error1;
 		}
 		/* skip parsing if comment character found */
@@ -207,7 +207,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
 			char *end = memchr(buffer, ']', len);
 			if (end == NULL) {
 				CFG_LOG(ERR,
-					"line %d - no terminating ']' character found\n",
+					"line %d - no terminating ']' character found",
 					lineno);
 				goto error1;
 			}
@@ -223,7 +223,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
 			split[1] = memchr(buffer, '=', len);
 			if (split[1] == NULL) {
 				CFG_LOG(ERR,
-					"line %d - no '=' character found\n",
+					"line %d - no '=' character found",
 					lineno);
 				goto error1;
 			}
@@ -247,7 +247,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
 			if (!(flags & CFG_FLAG_EMPTY_VALUES) &&
 					(*split[1] == '\0')) {
 				CFG_LOG(ERR,
-					"line %d - cannot use empty values\n",
+					"line %d - cannot use empty values",
 					lineno);
 				goto error1;
 			}
@@ -412,7 +412,7 @@ int rte_cfgfile_set_entry(struct rte_cfgfile *cfg, const char *sectionname,
 			return 0;
 		}
 
-	CFG_LOG(ERR, "entry name doesn't exist\n");
+	CFG_LOG(ERR, "entry name doesn't exist");
 	return -EINVAL;
 }
 
diff --git a/lib/compressdev/rte_compressdev_pmd.c b/lib/compressdev/rte_compressdev_pmd.c
index 156bccd972..762b44f03e 100644
--- a/lib/compressdev/rte_compressdev_pmd.c
+++ b/lib/compressdev/rte_compressdev_pmd.c
@@ -100,12 +100,12 @@ rte_compressdev_pmd_create(const char *name,
 	struct rte_compressdev *compressdev;
 
 	if (params->name[0] != '\0') {
-		COMPRESSDEV_LOG(INFO, "User specified device name = %s\n",
+		COMPRESSDEV_LOG(INFO, "User specified device name = %s",
 				params->name);
 		name = params->name;
 	}
 
-	COMPRESSDEV_LOG(INFO, "Creating compressdev %s\n", name);
+	COMPRESSDEV_LOG(INFO, "Creating compressdev %s", name);
 
 	COMPRESSDEV_LOG(INFO, "Init parameters - name: %s, socket id: %d",
 			name, params->socket_id);
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 98d32d91a1..d2b7e1c4cb 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -1969,7 +1969,7 @@ rte_cryptodev_sym_session_create(uint8_t dev_id,
 	}
 
 	if (xforms == NULL) {
-		CDEV_LOG_ERR("Invalid xform\n");
+		CDEV_LOG_ERR("Invalid xform");
 		rte_errno = EINVAL;
 		return NULL;
 	}
diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c
index 4da653eec7..15076f5f72 100644
--- a/lib/dmadev/rte_dmadev.c
+++ b/lib/dmadev/rte_dmadev.c
@@ -710,7 +710,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *
 		return -EINVAL;
 
 	if (vchan >= dev->data->dev_conf.nb_vchans) {
-		RTE_DMA_LOG(ERR, "Device %u vchan %u out of range\n", dev_id, vchan);
+		RTE_DMA_LOG(ERR, "Device %u vchan %u out of range", dev_id, vchan);
 		return -EINVAL;
 	}
 
diff --git a/lib/eal/windows/eal_memory.c b/lib/eal/windows/eal_memory.c
index 31410a41fd..fd39155163 100644
--- a/lib/eal/windows/eal_memory.c
+++ b/lib/eal/windows/eal_memory.c
@@ -110,7 +110,7 @@ eal_mem_win32api_init(void)
 	VirtualAlloc2_ptr = (VirtualAlloc2_type)(
 		(void *)GetProcAddress(library, function));
 	if (VirtualAlloc2_ptr == NULL) {
-		RTE_LOG_WIN32_ERR("GetProcAddress(\"%s\", \"%s\")\n",
+		RTE_LOG_WIN32_ERR("GetProcAddress(\"%s\", \"%s\")",
 			library_name, function);
 
 		/* Contrary to the docs, Server 2016 is not supported. */
diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index aebab26852..0d8e039fa4 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -49,14 +49,14 @@ extern "C" {
 /* Macros to check for valid device */
 #define RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, retval) do { \
 	if (!rte_event_pmd_is_valid_dev((dev_id))) { \
-		RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
+		RTE_EDEV_LOG_ERR("Invalid dev_id=%d", dev_id); \
 		return retval; \
 	} \
 } while (0)
 
 #define RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, errno, retval) do { \
 	if (!rte_event_pmd_is_valid_dev((dev_id))) { \
-		RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
+		RTE_EDEV_LOG_ERR("Invalid dev_id=%d", dev_id); \
 		rte_errno = errno; \
 		return retval; \
 	} \
@@ -64,7 +64,7 @@ extern "C" {
 
 #define RTE_EVENTDEV_VALID_DEVID_OR_RET(dev_id) do { \
 	if (!rte_event_pmd_is_valid_dev((dev_id))) { \
-		RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
+		RTE_EDEV_LOG_ERR("Invalid dev_id=%d", dev_id); \
 		return; \
 	} \
 } while (0)
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index ea50e405a8..c31b2b4021 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -126,7 +126,7 @@ static struct event_crypto_adapter **event_crypto_adapter;
 /* Macros to check for valid adapter */
 #define EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) do { \
 	if (!eca_valid_id(id)) { \
-		RTE_EDEV_LOG_ERR("Invalid crypto adapter id = %d\n", id); \
+		RTE_EDEV_LOG_ERR("Invalid crypto adapter id = %d", id); \
 		return retval; \
 	} \
 } while (0)
@@ -298,7 +298,7 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,
 	dev_conf.nb_event_ports += 1;
 	ret = rte_event_dev_configure(dev_id, &dev_conf);
 	if (ret) {
-		RTE_EDEV_LOG_ERR("failed to configure event dev %u\n", dev_id);
+		RTE_EDEV_LOG_ERR("failed to configure event dev %u", dev_id);
 		if (started) {
 			if (rte_event_dev_start(dev_id))
 				return -EIO;
@@ -308,7 +308,7 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,
 
 	ret = rte_event_port_setup(dev_id, port_id, port_conf);
 	if (ret) {
-		RTE_EDEV_LOG_ERR("failed to setup event port %u\n", port_id);
+		RTE_EDEV_LOG_ERR("failed to setup event port %u", port_id);
 		return ret;
 	}
 
@@ -392,7 +392,7 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
 					sizeof(struct crypto_device_info), 0,
 					socket_id);
 	if (adapter->cdevs == NULL) {
-		RTE_EDEV_LOG_ERR("Failed to get mem for crypto devices\n");
+		RTE_EDEV_LOG_ERR("Failed to get mem for crypto devices");
 		eca_circular_buffer_free(&adapter->ebuf);
 		rte_free(adapter);
 		return -ENOMEM;
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index 0be4777e2a..b4f05f250c 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -290,14 +290,14 @@ rxa_event_buf_get(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,
 
 #define RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) do { \
 	if (!rxa_validate_id(id)) { \
-		RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id = %d\n", id); \
+		RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id = %d", id); \
 		return retval; \
 	} \
 } while (0)
 
 #define RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_GOTO_ERR_RET(id, retval) do { \
 	if (!rxa_validate_id(id)) { \
-		RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id = %d\n", id); \
+		RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id = %d", id); \
 		ret = retval; \
 		goto error; \
 	} \
@@ -305,7 +305,7 @@ rxa_event_buf_get(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,
 
 #define RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET(token, retval) do { \
 	if ((token) == NULL || strlen(token) == 0 || !isdigit(*token)) { \
-		RTE_EDEV_LOG_ERR("Invalid eth Rx adapter token\n"); \
+		RTE_EDEV_LOG_ERR("Invalid eth Rx adapter token"); \
 		ret = retval; \
 		goto error; \
 	} \
@@ -1534,7 +1534,7 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,
 	dev_conf.nb_event_ports += 1;
 	ret = rte_event_dev_configure(dev_id, &dev_conf);
 	if (ret) {
-		RTE_EDEV_LOG_ERR("failed to configure event dev %u\n",
+		RTE_EDEV_LOG_ERR("failed to configure event dev %u",
 						dev_id);
 		if (started) {
 			if (rte_event_dev_start(dev_id))
@@ -1545,7 +1545,7 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,
 
 	ret = rte_event_port_setup(dev_id, port_id, port_conf);
 	if (ret) {
-		RTE_EDEV_LOG_ERR("failed to setup event port %u\n",
+		RTE_EDEV_LOG_ERR("failed to setup event port %u",
 					port_id);
 		return ret;
 	}
@@ -1622,7 +1622,7 @@ rxa_create_intr_thread(struct event_eth_rx_adapter *rx_adapter)
 	if (!err)
 		return 0;
 
-	RTE_EDEV_LOG_ERR("Failed to create interrupt thread err = %d\n", err);
+	RTE_EDEV_LOG_ERR("Failed to create interrupt thread err = %d", err);
 	rte_free(rx_adapter->epoll_events);
 error:
 	rte_ring_free(rx_adapter->intr_ring);
@@ -1638,12 +1638,12 @@ rxa_destroy_intr_thread(struct event_eth_rx_adapter *rx_adapter)
 
 	err = pthread_cancel(rx_adapter->rx_intr_thread);
 	if (err)
-		RTE_EDEV_LOG_ERR("Can't cancel interrupt thread err = %d\n",
+		RTE_EDEV_LOG_ERR("Can't cancel interrupt thread err = %d",
 				err);
 
 	err = pthread_join(rx_adapter->rx_intr_thread, NULL);
 	if (err)
-		RTE_EDEV_LOG_ERR("Can't join interrupt thread err = %d\n", err);
+		RTE_EDEV_LOG_ERR("Can't join interrupt thread err = %d", err);
 
 	rte_free(rx_adapter->epoll_events);
 	rte_ring_free(rx_adapter->intr_ring);
@@ -1909,7 +1909,7 @@ rxa_init_service(struct event_eth_rx_adapter *rx_adapter, uint8_t id)
 	if (rte_mbuf_dyn_rx_timestamp_register(
 			&event_eth_rx_timestamp_dynfield_offset,
 			&event_eth_rx_timestamp_dynflag) != 0) {
-		RTE_EDEV_LOG_ERR("Error registering timestamp field in mbuf\n");
+		RTE_EDEV_LOG_ERR("Error registering timestamp field in mbuf");
 		return -rte_errno;
 	}
 
@@ -2439,7 +2439,7 @@ rxa_create(uint8_t id, uint8_t dev_id,
 			    RTE_DIM(default_rss_key));
 
 	if (rx_adapter->eth_devices == NULL) {
-		RTE_EDEV_LOG_ERR("failed to get mem for eth devices\n");
+		RTE_EDEV_LOG_ERR("failed to get mem for eth devices");
 		rte_free(rx_adapter);
 		return -ENOMEM;
 	}
@@ -3449,7 +3449,7 @@ handle_rxa_stats(const char *cmd __rte_unused,
 	/* Get Rx adapter stats */
 	if (rte_event_eth_rx_adapter_stats_get(rx_adapter_id,
 					       &rx_adptr_stats)) {
-		RTE_EDEV_LOG_ERR("Failed to get Rx adapter stats\n");
+		RTE_EDEV_LOG_ERR("Failed to get Rx adapter stats");
 		return -1;
 	}
 
@@ -3486,7 +3486,7 @@ handle_rxa_stats_reset(const char *cmd __rte_unused,
 
 	/* Reset Rx adapter stats */
 	if (rte_event_eth_rx_adapter_stats_reset(rx_adapter_id)) {
-		RTE_EDEV_LOG_ERR("Failed to reset Rx adapter stats\n");
+		RTE_EDEV_LOG_ERR("Failed to reset Rx adapter stats");
 		return -1;
 	}
 
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index ba7a1c7f1b..9bb87fc5f9 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -330,7 +330,7 @@ txa_service_conf_cb(uint8_t __rte_unused id, uint8_t dev_id,
 
 	ret = rte_event_port_setup(dev_id, port_id, pc);
 	if (ret) {
-		RTE_EDEV_LOG_ERR("failed to setup event port %u\n",
+		RTE_EDEV_LOG_ERR("failed to setup event port %u",
 					port_id);
 		if (started) {
 			if (rte_event_dev_start(dev_id))
diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index a13ddce627..34968f3105 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -92,7 +92,7 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
 	dev_conf.nb_event_ports += 1;
 	ret = rte_event_dev_configure(dev_id, &dev_conf);
 	if (ret < 0) {
-		EVTIM_LOG_ERR("failed to configure event dev %u\n", dev_id);
+		EVTIM_LOG_ERR("failed to configure event dev %u", dev_id);
 		if (started)
 			if (rte_event_dev_start(dev_id))
 				return -EIO;
@@ -112,7 +112,7 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
 
 	ret = rte_event_port_setup(dev_id, port_id, port_conf);
 	if (ret < 0) {
-		EVTIM_LOG_ERR("failed to setup event port %u on event dev %u\n",
+		EVTIM_LOG_ERR("failed to setup event port %u on event dev %u",
 			      port_id, dev_id);
 		return ret;
 	}
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index c7d5f62e13..941d53f6a7 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -932,7 +932,7 @@ rte_event_port_link(uint8_t dev_id, uint8_t port_id,
 	dev = &rte_eventdevs[dev_id];
 
 	if (*dev->dev_ops->port_link == NULL) {
-		RTE_EDEV_LOG_ERR("Function not supported\n");
+		RTE_EDEV_LOG_ERR("Function not supported");
 		rte_errno = ENOTSUP;
 		return 0;
 	}
diff --git a/lib/metrics/rte_metrics_telemetry.c b/lib/metrics/rte_metrics_telemetry.c
index 5be21b2e86..1d133e1f8c 100644
--- a/lib/metrics/rte_metrics_telemetry.c
+++ b/lib/metrics/rte_metrics_telemetry.c
@@ -363,7 +363,7 @@ rte_metrics_tel_stat_names_to_ids(const char * const *stat_names,
 			}
 		}
 		if (j == num_metrics) {
-			METRICS_LOG_WARN("Invalid stat name %s\n",
+			METRICS_LOG_WARN("Invalid stat name %s",
 					stat_names[i]);
 			free(names);
 			return -EINVAL;
diff --git a/lib/net/rte_net_crc.c b/lib/net/rte_net_crc.c
index a685f9e7bb..900d6de7f4 100644
--- a/lib/net/rte_net_crc.c
+++ b/lib/net/rte_net_crc.c
@@ -179,7 +179,7 @@ avx512_vpclmulqdq_get_handlers(void)
 			max_simd_bitwidth >= RTE_VECT_SIMD_512)
 		return handlers_avx512;
 #endif
-	NET_LOG(INFO, "Requirements not met, can't use AVX512\n");
+	NET_LOG(INFO, "Requirements not met, can't use AVX512");
 	return NULL;
 }
 
@@ -205,7 +205,7 @@ sse42_pclmulqdq_get_handlers(void)
 			max_simd_bitwidth >= RTE_VECT_SIMD_128)
 		return handlers_sse42;
 #endif
-	NET_LOG(INFO, "Requirements not met, can't use SSE\n");
+	NET_LOG(INFO, "Requirements not met, can't use SSE");
 	return NULL;
 }
 
@@ -231,7 +231,7 @@ neon_pmull_get_handlers(void)
 			max_simd_bitwidth >= RTE_VECT_SIMD_128)
 		return handlers_neon;
 #endif
-	NET_LOG(INFO, "Requirements not met, can't use NEON\n");
+	NET_LOG(INFO, "Requirements not met, can't use NEON");
 	return NULL;
 }
 
diff --git a/lib/node/ethdev_rx.c b/lib/node/ethdev_rx.c
index a19237b42f..f6936ed77e 100644
--- a/lib/node/ethdev_rx.c
+++ b/lib/node/ethdev_rx.c
@@ -160,13 +160,13 @@ ethdev_ptype_setup(uint16_t port, uint16_t queue)
 
 	if (!l3_ipv4 || !l3_ipv6) {
 		node_info("ethdev_rx",
-			  "Enabling ptype callback for required ptypes on port %u\n",
+			  "Enabling ptype callback for required ptypes on port %u",
 			  port);
 
 		if (!rte_eth_add_rx_callback(port, queue, eth_pkt_parse_cb,
 					     NULL)) {
 			node_err("ethdev_rx",
-				 "Failed to add rx ptype cb: port=%d, queue=%d\n",
+				 "Failed to add rx ptype cb: port=%d, queue=%d",
 				 port, queue);
 			return -EINVAL;
 		}
diff --git a/lib/node/ip4_lookup.c b/lib/node/ip4_lookup.c
index 8bce03d7db..75253ed837 100644
--- a/lib/node/ip4_lookup.c
+++ b/lib/node/ip4_lookup.c
@@ -143,7 +143,7 @@ rte_node_ip4_route_add(uint32_t ip, uint8_t depth, uint16_t next_hop,
 				  ip, depth, val);
 		if (ret < 0) {
 			node_err("ip4_lookup",
-				 "Unable to add entry %s / %d nh (%x) to LPM table on sock %d, rc=%d\n",
+				 "Unable to add entry %s / %d nh (%x) to LPM table on sock %d, rc=%d",
 				 abuf, depth, val, socket, ret);
 			return ret;
 		}
diff --git a/lib/rcu/rte_rcu_qsbr.c b/lib/rcu/rte_rcu_qsbr.c
index 17be93e830..40e99c402e 100644
--- a/lib/rcu/rte_rcu_qsbr.c
+++ b/lib/rcu/rte_rcu_qsbr.c
@@ -92,7 +92,7 @@ rte_rcu_qsbr_thread_register(struct rte_rcu_qsbr *v, unsigned int thread_id)
 		return 1;
 	}
 
-	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u\n",
+	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u",
 				v->qsbr_cnt[thread_id].lock_cnt);
 
 	id = thread_id & __RTE_QSBR_THRID_MASK;
@@ -144,7 +144,7 @@ rte_rcu_qsbr_thread_unregister(struct rte_rcu_qsbr *v, unsigned int thread_id)
 		return 1;
 	}
 
-	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u\n",
+	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u",
 				v->qsbr_cnt[thread_id].lock_cnt);
 
 	id = thread_id & __RTE_QSBR_THRID_MASK;
diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h
index ccae5d54f7..8e0a166414 100644
--- a/lib/rcu/rte_rcu_qsbr.h
+++ b/lib/rcu/rte_rcu_qsbr.h
@@ -304,7 +304,7 @@ rte_rcu_qsbr_thread_online(struct rte_rcu_qsbr *v, unsigned int thread_id)
 
 	RTE_ASSERT(v != NULL && thread_id < v->max_threads);
 
-	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u\n",
+	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u",
 				v->qsbr_cnt[thread_id].lock_cnt);
 
 	/* Copy the current value of token.
@@ -355,7 +355,7 @@ rte_rcu_qsbr_thread_offline(struct rte_rcu_qsbr *v, unsigned int thread_id)
 {
 	RTE_ASSERT(v != NULL && thread_id < v->max_threads);
 
-	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u\n",
+	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u",
 				v->qsbr_cnt[thread_id].lock_cnt);
 
 	/* The reader can go offline only after the load of the
@@ -432,7 +432,7 @@ rte_rcu_qsbr_unlock(__rte_unused struct rte_rcu_qsbr *v,
 				1, __ATOMIC_RELEASE);
 
 	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, WARNING,
-				"Lock counter %u. Nested locks?\n",
+				"Lock counter %u. Nested locks?",
 				v->qsbr_cnt[thread_id].lock_cnt);
 #endif
 }
@@ -486,7 +486,7 @@ rte_rcu_qsbr_quiescent(struct rte_rcu_qsbr *v, unsigned int thread_id)
 
 	RTE_ASSERT(v != NULL && thread_id < v->max_threads);
 
-	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u\n",
+	__RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, ERR, "Lock counter %u",
 				v->qsbr_cnt[thread_id].lock_cnt);
 
 	/* Acquire the changes to the shared data structure released
diff --git a/lib/stack/rte_stack.c b/lib/stack/rte_stack.c
index 1fabec2bfe..1dab6d6645 100644
--- a/lib/stack/rte_stack.c
+++ b/lib/stack/rte_stack.c
@@ -56,7 +56,7 @@ rte_stack_create(const char *name, unsigned int count, int socket_id,
 	int ret;
 
 	if (flags & ~(RTE_STACK_F_LF)) {
-		STACK_LOG_ERR("Unsupported stack flags %#x\n", flags);
+		STACK_LOG_ERR("Unsupported stack flags %#x", flags);
 		return NULL;
 	}
 
@@ -65,7 +65,7 @@ rte_stack_create(const char *name, unsigned int count, int socket_id,
 #endif
 #if !defined(RTE_STACK_LF_SUPPORTED)
 	if (flags & RTE_STACK_F_LF) {
-		STACK_LOG_ERR("Lock-free stack is not supported on your platform\n");
+		STACK_LOG_ERR("Lock-free stack is not supported on your platform");
 		rte_errno = ENOTSUP;
 		return NULL;
 	}
@@ -82,7 +82,7 @@ rte_stack_create(const char *name, unsigned int count, int socket_id,
 
 	te = rte_zmalloc("STACK_TAILQ_ENTRY", sizeof(*te), 0);
 	if (te == NULL) {
-		STACK_LOG_ERR("Cannot reserve memory for tailq\n");
+		STACK_LOG_ERR("Cannot reserve memory for tailq");
 		rte_errno = ENOMEM;
 		return NULL;
 	}
@@ -92,7 +92,7 @@ rte_stack_create(const char *name, unsigned int count, int socket_id,
 	mz = rte_memzone_reserve_aligned(mz_name, sz, socket_id,
 					 0, __alignof__(*s));
 	if (mz == NULL) {
-		STACK_LOG_ERR("Cannot reserve stack memzone!\n");
+		STACK_LOG_ERR("Cannot reserve stack memzone!");
 		rte_mcfg_tailq_write_unlock();
 		rte_free(te);
 		return NULL;
diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
index b448b6685d..bd69d3b46e 100644
--- a/lib/vhost/vhost_crypto.c
+++ b/lib/vhost/vhost_crypto.c
@@ -245,7 +245,7 @@ transform_cipher_param(struct rte_crypto_sym_xform *xform,
 		return ret;
 
 	if (param->cipher_key_len > VHOST_USER_CRYPTO_MAX_CIPHER_KEY_LENGTH) {
-		VC_LOG_DBG("Invalid cipher key length\n");
+		VC_LOG_DBG("Invalid cipher key length");
 		return -VIRTIO_CRYPTO_BADMSG;
 	}
 
@@ -301,7 +301,7 @@ transform_chain_param(struct rte_crypto_sym_xform *xforms,
 		return ret;
 
 	if (param->cipher_key_len > VHOST_USER_CRYPTO_MAX_CIPHER_KEY_LENGTH) {
-		VC_LOG_DBG("Invalid cipher key length\n");
+		VC_LOG_DBG("Invalid cipher key length");
 		return -VIRTIO_CRYPTO_BADMSG;
 	}
 
@@ -321,7 +321,7 @@ transform_chain_param(struct rte_crypto_sym_xform *xforms,
 		return ret;
 
 	if (param->auth_key_len > VHOST_USER_CRYPTO_MAX_HMAC_KEY_LENGTH) {
-		VC_LOG_DBG("Invalid auth key length\n");
+		VC_LOG_DBG("Invalid auth key length");
 		return -VIRTIO_CRYPTO_BADMSG;
 	}
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:35.538401005 +0000
+++ 0005-lib-remove-redundant-newline-from-logs.patch	2024-03-07 01:05:34.626936366 +0000
@@ -1 +1 @@
-From ae282b0611c33aa73a01ee6137d116155053b835 Mon Sep 17 00:00:00 2001
+From d0ec6c1277fb02cfe118cd3a018d506077a64009 Mon Sep 17 00:00:00 2001
@@ -9 +9 @@
-Fix places where two newline characters may be logged.
+[ upstream commit ae282b0611c33aa73a01ee6137d116155053b835 ]
@@ -11 +11 @@
-Cc: stable@dpdk.org
+Fix places where two newline characters may be logged.
@@ -18,28 +18,22 @@
- drivers/crypto/ipsec_mb/ipsec_mb_ops.c  |   2 +-
- lib/bbdev/rte_bbdev.c                   |   6 +-
- lib/cfgfile/rte_cfgfile.c               |  14 ++--
- lib/compressdev/rte_compressdev_pmd.c   |   4 +-
- lib/cryptodev/rte_cryptodev.c           |   2 +-
- lib/dispatcher/rte_dispatcher.c         |  12 +--
- lib/dmadev/rte_dmadev.c                 |   2 +-
- lib/eal/windows/eal_memory.c            |   2 +-
- lib/eventdev/eventdev_pmd.h             |   6 +-
- lib/eventdev/rte_event_crypto_adapter.c |  12 +--
- lib/eventdev/rte_event_dma_adapter.c    |  14 ++--
- lib/eventdev/rte_event_eth_rx_adapter.c |  28 +++----
- lib/eventdev/rte_event_eth_tx_adapter.c |   2 +-
- lib/eventdev/rte_event_timer_adapter.c  |   4 +-
- lib/eventdev/rte_eventdev.c             |   4 +-
- lib/metrics/rte_metrics_telemetry.c     |   2 +-
- lib/mldev/rte_mldev.c                   | 102 ++++++++++++------------
- lib/net/rte_net_crc.c                   |   6 +-
- lib/node/ethdev_rx.c                    |   4 +-
- lib/node/ip4_lookup.c                   |   2 +-
- lib/node/ip6_lookup.c                   |   2 +-
- lib/node/kernel_rx.c                    |   8 +-
- lib/node/kernel_tx.c                    |   4 +-
- lib/rcu/rte_rcu_qsbr.c                  |   4 +-
- lib/rcu/rte_rcu_qsbr.h                  |   8 +-
- lib/stack/rte_stack.c                   |   8 +-
- lib/vhost/vhost_crypto.c                |   6 +-
- 27 files changed, 135 insertions(+), 135 deletions(-)
+ drivers/crypto/ipsec_mb/ipsec_mb_ops.c  |  2 +-
+ lib/bbdev/rte_bbdev.c                   |  6 +++---
+ lib/cfgfile/rte_cfgfile.c               | 14 +++++++-------
+ lib/compressdev/rte_compressdev_pmd.c   |  4 ++--
+ lib/cryptodev/rte_cryptodev.c           |  2 +-
+ lib/dmadev/rte_dmadev.c                 |  2 +-
+ lib/eal/windows/eal_memory.c            |  2 +-
+ lib/eventdev/eventdev_pmd.h             |  6 +++---
+ lib/eventdev/rte_event_crypto_adapter.c |  8 ++++----
+ lib/eventdev/rte_event_eth_rx_adapter.c | 24 ++++++++++++------------
+ lib/eventdev/rte_event_eth_tx_adapter.c |  2 +-
+ lib/eventdev/rte_event_timer_adapter.c  |  4 ++--
+ lib/eventdev/rte_eventdev.c             |  2 +-
+ lib/metrics/rte_metrics_telemetry.c     |  2 +-
+ lib/net/rte_net_crc.c                   |  6 +++---
+ lib/node/ethdev_rx.c                    |  4 ++--
+ lib/node/ip4_lookup.c                   |  2 +-
+ lib/rcu/rte_rcu_qsbr.c                  |  4 ++--
+ lib/rcu/rte_rcu_qsbr.h                  |  8 ++++----
+ lib/stack/rte_stack.c                   |  8 ++++----
+ lib/vhost/vhost_crypto.c                |  6 +++---
+ 21 files changed, 59 insertions(+), 59 deletions(-)
@@ -48 +42 @@
-index 52d6d010c7..f21f9cc5a0 100644
+index 30f919cd40..2a5599b7d8 100644
@@ -51 +45 @@
-@@ -407,7 +407,7 @@ ipsec_mb_ipc_request(const struct rte_mp_msg *mp_msg, const void *peer)
+@@ -406,7 +406,7 @@ ipsec_mb_ipc_request(const struct rte_mp_msg *mp_msg, const void *peer)
@@ -61 +55 @@
-index cfebea09c7..e09bb97abb 100644
+index 1521cdbc53..71f1957bf7 100644
@@ -64 +58 @@
-@@ -1106,12 +1106,12 @@ rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op,
+@@ -1102,12 +1102,12 @@ rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op,
@@ -79 +73 @@
-@@ -1120,7 +1120,7 @@ rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op,
+@@ -1116,7 +1116,7 @@ rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op,
@@ -89 +83 @@
-index eefba6e408..2f9cc0722a 100644
+index 9fa7d010ef..e2f77d2b64 100644
@@ -92 +86 @@
-@@ -137,7 +137,7 @@ rte_cfgfile_check_params(const struct rte_cfgfile_parameters *params)
+@@ -135,7 +135,7 @@ rte_cfgfile_check_params(const struct rte_cfgfile_parameters *params)
@@ -101 +95 @@
-@@ -150,7 +150,7 @@ rte_cfgfile_check_params(const struct rte_cfgfile_parameters *params)
+@@ -148,7 +148,7 @@ rte_cfgfile_check_params(const struct rte_cfgfile_parameters *params)
@@ -110 +104 @@
-@@ -188,7 +188,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
+@@ -186,7 +186,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
@@ -119 +113 @@
-@@ -209,7 +209,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
+@@ -207,7 +207,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
@@ -128 +122 @@
-@@ -225,7 +225,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
+@@ -223,7 +223,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
@@ -137 +131 @@
-@@ -249,7 +249,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
+@@ -247,7 +247,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
@@ -146 +140 @@
-@@ -414,7 +414,7 @@ int rte_cfgfile_set_entry(struct rte_cfgfile *cfg, const char *sectionname,
+@@ -412,7 +412,7 @@ int rte_cfgfile_set_entry(struct rte_cfgfile *cfg, const char *sectionname,
@@ -175 +169 @@
-index ead8c9a623..b233c0ecd7 100644
+index 98d32d91a1..d2b7e1c4cb 100644
@@ -178 +172 @@
-@@ -2074,7 +2074,7 @@ rte_cryptodev_sym_session_create(uint8_t dev_id,
+@@ -1969,7 +1969,7 @@ rte_cryptodev_sym_session_create(uint8_t dev_id,
@@ -187,58 +180,0 @@
-diff --git a/lib/dispatcher/rte_dispatcher.c b/lib/dispatcher/rte_dispatcher.c
-index 10d02edde9..95dd41b818 100644
---- a/lib/dispatcher/rte_dispatcher.c
-+++ b/lib/dispatcher/rte_dispatcher.c
-@@ -246,7 +246,7 @@ evd_service_register(struct rte_dispatcher *dispatcher)
- 	rc = rte_service_component_register(&service, &dispatcher->service_id);
- 	if (rc != 0)
- 		RTE_EDEV_LOG_ERR("Registration of dispatcher service "
--				 "%s failed with error code %d\n",
-+				 "%s failed with error code %d",
- 				 service.name, rc);
- 
- 	return rc;
-@@ -260,7 +260,7 @@ evd_service_unregister(struct rte_dispatcher *dispatcher)
- 	rc = rte_service_component_unregister(dispatcher->service_id);
- 	if (rc != 0)
- 		RTE_EDEV_LOG_ERR("Unregistration of dispatcher service "
--				 "failed with error code %d\n", rc);
-+				 "failed with error code %d", rc);
- 
- 	return rc;
- }
-@@ -279,7 +279,7 @@ rte_dispatcher_create(uint8_t event_dev_id)
- 				  RTE_CACHE_LINE_SIZE, socket_id);
- 
- 	if (dispatcher == NULL) {
--		RTE_EDEV_LOG_ERR("Unable to allocate memory for dispatcher\n");
-+		RTE_EDEV_LOG_ERR("Unable to allocate memory for dispatcher");
- 		rte_errno = ENOMEM;
- 		return NULL;
- 	}
-@@ -483,7 +483,7 @@ evd_lcore_uninstall_handler(struct rte_dispatcher_lcore *lcore,
- 	unreg_handler = evd_lcore_get_handler_by_id(lcore, handler_id);
- 
- 	if (unreg_handler == NULL) {
--		RTE_EDEV_LOG_ERR("Invalid handler id %d\n", handler_id);
-+		RTE_EDEV_LOG_ERR("Invalid handler id %d", handler_id);
- 		return -EINVAL;
- 	}
- 
-@@ -602,7 +602,7 @@ rte_dispatcher_finalize_unregister(struct rte_dispatcher *dispatcher,
- 	unreg_finalizer = evd_get_finalizer_by_id(dispatcher, finalizer_id);
- 
- 	if (unreg_finalizer == NULL) {
--		RTE_EDEV_LOG_ERR("Invalid finalizer id %d\n", finalizer_id);
-+		RTE_EDEV_LOG_ERR("Invalid finalizer id %d", finalizer_id);
- 		return -EINVAL;
- 	}
- 
-@@ -636,7 +636,7 @@ evd_set_service_runstate(struct rte_dispatcher *dispatcher, int state)
- 	 */
- 	if (rc != 0)
- 		RTE_EDEV_LOG_ERR("Unexpected error %d occurred while setting "
--				 "service component run state to %d\n", rc,
-+				 "service component run state to %d", rc,
- 				 state);
- 
- 	RTE_VERIFY(rc == 0);
@@ -246 +182 @@
-index 4e5e420c82..009a21849a 100644
+index 4da653eec7..15076f5f72 100644
@@ -249 +185 @@
-@@ -726,7 +726,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *
+@@ -710,7 +710,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *
@@ -272 +208 @@
-index 30bd90085c..2ec5aec0a8 100644
+index aebab26852..0d8e039fa4 100644
@@ -302 +238 @@
-index 1b435c9f0e..d46595d190 100644
+index ea50e405a8..c31b2b4021 100644
@@ -305 +241 @@
-@@ -133,7 +133,7 @@ static struct event_crypto_adapter **event_crypto_adapter;
+@@ -126,7 +126,7 @@ static struct event_crypto_adapter **event_crypto_adapter;
@@ -314,2 +250,2 @@
-@@ -309,7 +309,7 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,
- 
+@@ -298,7 +298,7 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,
+ 	dev_conf.nb_event_ports += 1;
@@ -323 +259 @@
-@@ -319,7 +319,7 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,
+@@ -308,7 +308,7 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,
@@ -332 +268 @@
-@@ -391,7 +391,7 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
+@@ -392,7 +392,7 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
@@ -341,85 +276,0 @@
-@@ -1403,7 +1403,7 @@ rte_event_crypto_adapter_runtime_params_set(uint8_t id,
- 	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
- 
- 	if (params == NULL) {
--		RTE_EDEV_LOG_ERR("params pointer is NULL\n");
-+		RTE_EDEV_LOG_ERR("params pointer is NULL");
- 		return -EINVAL;
- 	}
- 
-@@ -1436,7 +1436,7 @@ rte_event_crypto_adapter_runtime_params_get(uint8_t id,
- 	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
- 
- 	if (params == NULL) {
--		RTE_EDEV_LOG_ERR("params pointer is NULL\n");
-+		RTE_EDEV_LOG_ERR("params pointer is NULL");
- 		return -EINVAL;
- 	}
- 
-diff --git a/lib/eventdev/rte_event_dma_adapter.c b/lib/eventdev/rte_event_dma_adapter.c
-index cbf9405438..4196164305 100644
---- a/lib/eventdev/rte_event_dma_adapter.c
-+++ b/lib/eventdev/rte_event_dma_adapter.c
-@@ -20,7 +20,7 @@
- #define EVENT_DMA_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) \
- 	do { \
- 		if (!edma_adapter_valid_id(id)) { \
--			RTE_EDEV_LOG_ERR("Invalid DMA adapter id = %d\n", id); \
-+			RTE_EDEV_LOG_ERR("Invalid DMA adapter id = %d", id); \
- 			return retval; \
- 		} \
- 	} while (0)
-@@ -313,7 +313,7 @@ edma_default_config_cb(uint8_t id, uint8_t evdev_id, struct rte_event_dma_adapte
- 
- 	ret = rte_event_dev_configure(evdev_id, &dev_conf);
- 	if (ret) {
--		RTE_EDEV_LOG_ERR("Failed to configure event dev %u\n", evdev_id);
-+		RTE_EDEV_LOG_ERR("Failed to configure event dev %u", evdev_id);
- 		if (started) {
- 			if (rte_event_dev_start(evdev_id))
- 				return -EIO;
-@@ -323,7 +323,7 @@ edma_default_config_cb(uint8_t id, uint8_t evdev_id, struct rte_event_dma_adapte
- 
- 	ret = rte_event_port_setup(evdev_id, port_id, port_conf);
- 	if (ret) {
--		RTE_EDEV_LOG_ERR("Failed to setup event port %u\n", port_id);
-+		RTE_EDEV_LOG_ERR("Failed to setup event port %u", port_id);
- 		return ret;
- 	}
- 
-@@ -407,7 +407,7 @@ rte_event_dma_adapter_create_ext(uint8_t id, uint8_t evdev_id,
- 					       num_dma_dev * sizeof(struct dma_device_info), 0,
- 					       socket_id);
- 	if (adapter->dma_devs == NULL) {
--		RTE_EDEV_LOG_ERR("Failed to get memory for DMA devices\n");
-+		RTE_EDEV_LOG_ERR("Failed to get memory for DMA devices");
- 		edma_circular_buffer_free(&adapter->ebuf);
- 		rte_free(adapter);
- 		return -ENOMEM;
-@@ -417,7 +417,7 @@ rte_event_dma_adapter_create_ext(uint8_t id, uint8_t evdev_id,
- 	for (i = 0; i < num_dma_dev; i++) {
- 		ret = rte_dma_info_get(i, &info);
- 		if (ret) {
--			RTE_EDEV_LOG_ERR("Failed to get dma device info\n");
-+			RTE_EDEV_LOG_ERR("Failed to get dma device info");
- 			edma_circular_buffer_free(&adapter->ebuf);
- 			rte_free(adapter);
- 			return ret;
-@@ -1297,7 +1297,7 @@ rte_event_dma_adapter_runtime_params_set(uint8_t id,
- 	EVENT_DMA_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
- 
- 	if (params == NULL) {
--		RTE_EDEV_LOG_ERR("params pointer is NULL\n");
-+		RTE_EDEV_LOG_ERR("params pointer is NULL");
- 		return -EINVAL;
- 	}
- 
-@@ -1326,7 +1326,7 @@ rte_event_dma_adapter_runtime_params_get(uint8_t id,
- 	EVENT_DMA_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
- 
- 	if (params == NULL) {
--		RTE_EDEV_LOG_ERR("params pointer is NULL\n");
-+		RTE_EDEV_LOG_ERR("params pointer is NULL");
- 		return -EINVAL;
- 	}
- 
@@ -427 +278 @@
-index 82ae31712d..1b83a55b5c 100644
+index 0be4777e2a..b4f05f250c 100644
@@ -430 +281 @@
-@@ -293,14 +293,14 @@ rxa_event_buf_get(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,
+@@ -290,14 +290,14 @@ rxa_event_buf_get(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,
@@ -447 +298 @@
-@@ -308,7 +308,7 @@ rxa_event_buf_get(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,
+@@ -305,7 +305,7 @@ rxa_event_buf_get(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,
@@ -456,2 +307,2 @@
-@@ -1540,7 +1540,7 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,
- 
+@@ -1534,7 +1534,7 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,
+ 	dev_conf.nb_event_ports += 1;
@@ -465 +316 @@
-@@ -1551,7 +1551,7 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,
+@@ -1545,7 +1545,7 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,
@@ -474 +325 @@
-@@ -1628,7 +1628,7 @@ rxa_create_intr_thread(struct event_eth_rx_adapter *rx_adapter)
+@@ -1622,7 +1622,7 @@ rxa_create_intr_thread(struct event_eth_rx_adapter *rx_adapter)
@@ -483 +334 @@
-@@ -1644,12 +1644,12 @@ rxa_destroy_intr_thread(struct event_eth_rx_adapter *rx_adapter)
+@@ -1638,12 +1638,12 @@ rxa_destroy_intr_thread(struct event_eth_rx_adapter *rx_adapter)
@@ -485 +336 @@
- 	err = pthread_cancel((pthread_t)rx_adapter->rx_intr_thread.opaque_id);
+ 	err = pthread_cancel(rx_adapter->rx_intr_thread);
@@ -491 +342 @@
- 	err = rte_thread_join(rx_adapter->rx_intr_thread, NULL);
+ 	err = pthread_join(rx_adapter->rx_intr_thread, NULL);
@@ -498 +349 @@
-@@ -1915,7 +1915,7 @@ rxa_init_service(struct event_eth_rx_adapter *rx_adapter, uint8_t id)
+@@ -1909,7 +1909,7 @@ rxa_init_service(struct event_eth_rx_adapter *rx_adapter, uint8_t id)
@@ -507 +358 @@
-@@ -2445,7 +2445,7 @@ rxa_create(uint8_t id, uint8_t dev_id,
+@@ -2439,7 +2439,7 @@ rxa_create(uint8_t id, uint8_t dev_id,
@@ -516,16 +367 @@
-@@ -2497,12 +2497,12 @@ rxa_config_params_validate(struct rte_event_eth_rx_adapter_params *rxa_params,
- 		return 0;
- 	} else if (!rxa_params->use_queue_event_buf &&
- 		    rxa_params->event_buf_size == 0) {
--		RTE_EDEV_LOG_ERR("event buffer size can't be zero\n");
-+		RTE_EDEV_LOG_ERR("event buffer size can't be zero");
- 		return -EINVAL;
- 	} else if (rxa_params->use_queue_event_buf &&
- 		   rxa_params->event_buf_size != 0) {
- 		RTE_EDEV_LOG_ERR("event buffer size needs to be configured "
--				 "as part of queue add\n");
-+				 "as part of queue add");
- 		return -EINVAL;
- 	}
- 
-@@ -3597,7 +3597,7 @@ handle_rxa_stats(const char *cmd __rte_unused,
+@@ -3449,7 +3449,7 @@ handle_rxa_stats(const char *cmd __rte_unused,
@@ -540 +376 @@
-@@ -3636,7 +3636,7 @@ handle_rxa_stats_reset(const char *cmd __rte_unused,
+@@ -3486,7 +3486,7 @@ handle_rxa_stats_reset(const char *cmd __rte_unused,
@@ -550 +386 @@
-index 360d5caf6a..56435be991 100644
+index ba7a1c7f1b..9bb87fc5f9 100644
@@ -553 +389 @@
-@@ -334,7 +334,7 @@ txa_service_conf_cb(uint8_t __rte_unused id, uint8_t dev_id,
+@@ -330,7 +330,7 @@ txa_service_conf_cb(uint8_t __rte_unused id, uint8_t dev_id,
@@ -563 +399 @@
-index 27466707bc..3f22e85173 100644
+index a13ddce627..34968f3105 100644
@@ -566,2 +402,2 @@
-@@ -106,7 +106,7 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
- 
+@@ -92,7 +92,7 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
+ 	dev_conf.nb_event_ports += 1;
@@ -575 +411 @@
-@@ -116,7 +116,7 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
+@@ -112,7 +112,7 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
@@ -585 +421 @@
-index ae50821a3f..157752868d 100644
+index c7d5f62e13..941d53f6a7 100644
@@ -588,2 +424,2 @@
-@@ -1007,13 +1007,13 @@ rte_event_port_profile_links_set(uint8_t dev_id, uint8_t port_id, const uint8_t
- 	}
+@@ -932,7 +932,7 @@ rte_event_port_link(uint8_t dev_id, uint8_t port_id,
+ 	dev = &rte_eventdevs[dev_id];
@@ -597,7 +432,0 @@
- 
- 	if (profile_id && *dev->dev_ops->port_link_profile == NULL) {
--		RTE_EDEV_LOG_ERR("Function not supported\n");
-+		RTE_EDEV_LOG_ERR("Function not supported");
- 		rte_errno = ENOTSUP;
- 		return 0;
- 	}
@@ -617,441 +445,0 @@
-diff --git a/lib/mldev/rte_mldev.c b/lib/mldev/rte_mldev.c
-index cc5f2e0cc6..196b1850e6 100644
---- a/lib/mldev/rte_mldev.c
-+++ b/lib/mldev/rte_mldev.c
-@@ -159,7 +159,7 @@ int
- rte_ml_dev_init(size_t dev_max)
- {
- 	if (dev_max == 0 || dev_max > INT16_MAX) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_max = %zu (> %d)\n", dev_max, INT16_MAX);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_max = %zu (> %d)", dev_max, INT16_MAX);
- 		rte_errno = EINVAL;
- 		return -rte_errno;
- 	}
-@@ -217,7 +217,7 @@ rte_ml_dev_socket_id(int16_t dev_id)
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -232,7 +232,7 @@ rte_ml_dev_info_get(int16_t dev_id, struct rte_ml_dev_info *dev_info)
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -241,7 +241,7 @@ rte_ml_dev_info_get(int16_t dev_id, struct rte_ml_dev_info *dev_info)
- 		return -ENOTSUP;
- 
- 	if (dev_info == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, dev_info cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, dev_info cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 	memset(dev_info, 0, sizeof(struct rte_ml_dev_info));
-@@ -257,7 +257,7 @@ rte_ml_dev_configure(int16_t dev_id, const struct rte_ml_dev_config *config)
- 	int ret;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -271,7 +271,7 @@ rte_ml_dev_configure(int16_t dev_id, const struct rte_ml_dev_config *config)
- 	}
- 
- 	if (config == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, config cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, config cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -280,7 +280,7 @@ rte_ml_dev_configure(int16_t dev_id, const struct rte_ml_dev_config *config)
- 		return ret;
- 
- 	if (config->nb_queue_pairs > dev_info.max_queue_pairs) {
--		RTE_MLDEV_LOG(ERR, "Device %d num of queues %u > %u\n", dev_id,
-+		RTE_MLDEV_LOG(ERR, "Device %d num of queues %u > %u", dev_id,
- 			      config->nb_queue_pairs, dev_info.max_queue_pairs);
- 		return -EINVAL;
- 	}
-@@ -294,7 +294,7 @@ rte_ml_dev_close(int16_t dev_id)
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -318,7 +318,7 @@ rte_ml_dev_start(int16_t dev_id)
- 	int ret;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -345,7 +345,7 @@ rte_ml_dev_stop(int16_t dev_id)
- 	int ret;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -372,7 +372,7 @@ rte_ml_dev_queue_pair_setup(int16_t dev_id, uint16_t queue_pair_id,
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -386,7 +386,7 @@ rte_ml_dev_queue_pair_setup(int16_t dev_id, uint16_t queue_pair_id,
- 	}
- 
- 	if (qp_conf == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, qp_conf cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, qp_conf cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -404,7 +404,7 @@ rte_ml_dev_stats_get(int16_t dev_id, struct rte_ml_dev_stats *stats)
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -413,7 +413,7 @@ rte_ml_dev_stats_get(int16_t dev_id, struct rte_ml_dev_stats *stats)
- 		return -ENOTSUP;
- 
- 	if (stats == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, stats cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, stats cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 	memset(stats, 0, sizeof(struct rte_ml_dev_stats));
-@@ -427,7 +427,7 @@ rte_ml_dev_stats_reset(int16_t dev_id)
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return;
- 	}
- 
-@@ -445,7 +445,7 @@ rte_ml_dev_xstats_names_get(int16_t dev_id, enum rte_ml_dev_xstats_mode mode, in
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -462,7 +462,7 @@ rte_ml_dev_xstats_by_name_get(int16_t dev_id, const char *name, uint16_t *stat_i
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -471,12 +471,12 @@ rte_ml_dev_xstats_by_name_get(int16_t dev_id, const char *name, uint16_t *stat_i
- 		return -ENOTSUP;
- 
- 	if (name == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, name cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, name cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
- 	if (value == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, value cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, value cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -490,7 +490,7 @@ rte_ml_dev_xstats_get(int16_t dev_id, enum rte_ml_dev_xstats_mode mode, int32_t
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -499,12 +499,12 @@ rte_ml_dev_xstats_get(int16_t dev_id, enum rte_ml_dev_xstats_mode mode, int32_t
- 		return -ENOTSUP;
- 
- 	if (stat_ids == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, stat_ids cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, stat_ids cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
- 	if (values == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, values cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, values cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -518,7 +518,7 @@ rte_ml_dev_xstats_reset(int16_t dev_id, enum rte_ml_dev_xstats_mode mode, int32_
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -535,7 +535,7 @@ rte_ml_dev_dump(int16_t dev_id, FILE *fd)
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -544,7 +544,7 @@ rte_ml_dev_dump(int16_t dev_id, FILE *fd)
- 		return -ENOTSUP;
- 
- 	if (fd == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, file descriptor cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, file descriptor cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -557,7 +557,7 @@ rte_ml_dev_selftest(int16_t dev_id)
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -574,7 +574,7 @@ rte_ml_model_load(int16_t dev_id, struct rte_ml_model_params *params, uint16_t *
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -583,12 +583,12 @@ rte_ml_model_load(int16_t dev_id, struct rte_ml_model_params *params, uint16_t *
- 		return -ENOTSUP;
- 
- 	if (params == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, params cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, params cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
- 	if (model_id == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, model_id cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, model_id cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -601,7 +601,7 @@ rte_ml_model_unload(int16_t dev_id, uint16_t model_id)
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -618,7 +618,7 @@ rte_ml_model_start(int16_t dev_id, uint16_t model_id)
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -635,7 +635,7 @@ rte_ml_model_stop(int16_t dev_id, uint16_t model_id)
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -652,7 +652,7 @@ rte_ml_model_info_get(int16_t dev_id, uint16_t model_id, struct rte_ml_model_inf
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -661,7 +661,7 @@ rte_ml_model_info_get(int16_t dev_id, uint16_t model_id, struct rte_ml_model_inf
- 		return -ENOTSUP;
- 
- 	if (model_info == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, model_id %u, model_info cannot be NULL\n", dev_id,
-+		RTE_MLDEV_LOG(ERR, "Dev %d, model_id %u, model_info cannot be NULL", dev_id,
- 			      model_id);
- 		return -EINVAL;
- 	}
-@@ -675,7 +675,7 @@ rte_ml_model_params_update(int16_t dev_id, uint16_t model_id, void *buffer)
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -684,7 +684,7 @@ rte_ml_model_params_update(int16_t dev_id, uint16_t model_id, void *buffer)
- 		return -ENOTSUP;
- 
- 	if (buffer == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, buffer cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, buffer cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -698,7 +698,7 @@ rte_ml_io_quantize(int16_t dev_id, uint16_t model_id, struct rte_ml_buff_seg **d
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -707,12 +707,12 @@ rte_ml_io_quantize(int16_t dev_id, uint16_t model_id, struct rte_ml_buff_seg **d
- 		return -ENOTSUP;
- 
- 	if (dbuffer == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, dbuffer cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, dbuffer cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
- 	if (qbuffer == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, qbuffer cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, qbuffer cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -726,7 +726,7 @@ rte_ml_io_dequantize(int16_t dev_id, uint16_t model_id, struct rte_ml_buff_seg *
- 	struct rte_ml_dev *dev;
- 
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -735,12 +735,12 @@ rte_ml_io_dequantize(int16_t dev_id, uint16_t model_id, struct rte_ml_buff_seg *
- 		return -ENOTSUP;
- 
- 	if (qbuffer == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, qbuffer cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, qbuffer cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
- 	if (dbuffer == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, dbuffer cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, dbuffer cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -811,7 +811,7 @@ rte_ml_enqueue_burst(int16_t dev_id, uint16_t qp_id, struct rte_ml_op **ops, uin
- 
- #ifdef RTE_LIBRTE_ML_DEV_DEBUG
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		rte_errno = -EINVAL;
- 		return 0;
- 	}
-@@ -823,13 +823,13 @@ rte_ml_enqueue_burst(int16_t dev_id, uint16_t qp_id, struct rte_ml_op **ops, uin
- 	}
- 
- 	if (ops == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, ops cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, ops cannot be NULL", dev_id);
- 		rte_errno = -EINVAL;
- 		return 0;
- 	}
- 
- 	if (qp_id >= dev->data->nb_queue_pairs) {
--		RTE_MLDEV_LOG(ERR, "Invalid qp_id %u\n", qp_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid qp_id %u", qp_id);
- 		rte_errno = -EINVAL;
- 		return 0;
- 	}
-@@ -847,7 +847,7 @@ rte_ml_dequeue_burst(int16_t dev_id, uint16_t qp_id, struct rte_ml_op **ops, uin
- 
- #ifdef RTE_LIBRTE_ML_DEV_DEBUG
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		rte_errno = -EINVAL;
- 		return 0;
- 	}
-@@ -859,13 +859,13 @@ rte_ml_dequeue_burst(int16_t dev_id, uint16_t qp_id, struct rte_ml_op **ops, uin
- 	}
- 
- 	if (ops == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, ops cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, ops cannot be NULL", dev_id);
- 		rte_errno = -EINVAL;
- 		return 0;
- 	}
- 
- 	if (qp_id >= dev->data->nb_queue_pairs) {
--		RTE_MLDEV_LOG(ERR, "Invalid qp_id %u\n", qp_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid qp_id %u", qp_id);
- 		rte_errno = -EINVAL;
- 		return 0;
- 	}
-@@ -883,7 +883,7 @@ rte_ml_op_error_get(int16_t dev_id, struct rte_ml_op *op, struct rte_ml_op_error
- 
- #ifdef RTE_LIBRTE_ML_DEV_DEBUG
- 	if (!rte_ml_dev_is_valid_dev(dev_id)) {
--		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
- 		return -EINVAL;
- 	}
- 
-@@ -892,12 +892,12 @@ rte_ml_op_error_get(int16_t dev_id, struct rte_ml_op *op, struct rte_ml_op_error
- 		return -ENOTSUP;
- 
- 	if (op == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, op cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, op cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- 
- 	if (error == NULL) {
--		RTE_MLDEV_LOG(ERR, "Dev %d, error cannot be NULL\n", dev_id);
-+		RTE_MLDEV_LOG(ERR, "Dev %d, error cannot be NULL", dev_id);
- 		return -EINVAL;
- 	}
- #else
@@ -1090 +478 @@
-index 3e8fac1df4..475eff6abe 100644
+index a19237b42f..f6936ed77e 100644
@@ -1110 +498 @@
-index 0dbfde64fe..18955971f6 100644
+index 8bce03d7db..75253ed837 100644
@@ -1122,72 +509,0 @@
-diff --git a/lib/node/ip6_lookup.c b/lib/node/ip6_lookup.c
-index 6f56eb5ec5..309964f60f 100644
---- a/lib/node/ip6_lookup.c
-+++ b/lib/node/ip6_lookup.c
-@@ -283,7 +283,7 @@ rte_node_ip6_route_add(const uint8_t *ip, uint8_t depth, uint16_t next_hop,
- 		if (ret < 0) {
- 			node_err("ip6_lookup",
- 				 "Unable to add entry %s / %d nh (%x) to LPM "
--				 "table on sock %d, rc=%d\n",
-+				 "table on sock %d, rc=%d",
- 				 abuf, depth, val, socket, ret);
- 			return ret;
- 		}
-diff --git a/lib/node/kernel_rx.c b/lib/node/kernel_rx.c
-index 2dba7c8cc7..6c20cdbb1e 100644
---- a/lib/node/kernel_rx.c
-+++ b/lib/node/kernel_rx.c
-@@ -134,7 +134,7 @@ kernel_rx_node_do(struct rte_graph *graph, struct rte_node *node, kernel_rx_node
- 			if (len == 0 || len == 0xFFFF) {
- 				rte_pktmbuf_free(m);
- 				if (rx->idx <= 0)
--					node_dbg("kernel_rx", "rx_mbuf array is empty\n");
-+					node_dbg("kernel_rx", "rx_mbuf array is empty");
- 				rx->idx--;
- 				break;
- 			}
-@@ -207,20 +207,20 @@ kernel_rx_node_init(const struct rte_graph *graph, struct rte_node *node)
- 	RTE_VERIFY(elem != NULL);
- 
- 	if (ctx->pktmbuf_pool == NULL) {
--		node_err("kernel_rx", "Invalid mbuf pool on graph %s\n", graph->name);
-+		node_err("kernel_rx", "Invalid mbuf pool on graph %s", graph->name);
- 		return -EINVAL;
- 	}
- 
- 	recv_info = rte_zmalloc_socket("kernel_rx_info", sizeof(kernel_rx_info_t),
- 				       RTE_CACHE_LINE_SIZE, graph->socket);
- 	if (!recv_info) {
--		node_err("kernel_rx", "Kernel recv_info is NULL\n");
-+		node_err("kernel_rx", "Kernel recv_info is NULL");
- 		return -ENOMEM;
- 	}
- 
- 	sock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
- 	if (sock < 0) {
--		node_err("kernel_rx", "Unable to open RAW socket\n");
-+		node_err("kernel_rx", "Unable to open RAW socket");
- 		return sock;
- 	}
- 
-diff --git a/lib/node/kernel_tx.c b/lib/node/kernel_tx.c
-index 27d1808c71..3a96741622 100644
---- a/lib/node/kernel_tx.c
-+++ b/lib/node/kernel_tx.c
-@@ -36,7 +36,7 @@ kernel_tx_process_mbuf(struct rte_node *node, struct rte_mbuf **mbufs, uint16_t
- 		sin.sin_addr.s_addr = ip4->dst_addr;
- 
- 		if (sendto(ctx->sock, buf, len, 0, (struct sockaddr *)&sin, sizeof(sin)) < 0)
--			node_err("kernel_tx", "Unable to send packets: %s\n", strerror(errno));
-+			node_err("kernel_tx", "Unable to send packets: %s", strerror(errno));
- 	}
- }
- 
-@@ -87,7 +87,7 @@ kernel_tx_node_init(const struct rte_graph *graph __rte_unused, struct rte_node
- 
- 	ctx->sock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
- 	if (ctx->sock < 0)
--		node_err("kernel_tx", "Unable to open RAW socket\n");
-+		node_err("kernel_tx", "Unable to open RAW socket");
- 
- 	return 0;
- }
@@ -1195 +511 @@
-index a9f3d6cc98..41a44be4b9 100644
+index 17be93e830..40e99c402e 100644
@@ -1217 +533 @@
-index 5979fb0efb..6b908e7ee0 100644
+index ccae5d54f7..8e0a166414 100644
@@ -1220 +536 @@
-@@ -299,7 +299,7 @@ rte_rcu_qsbr_thread_online(struct rte_rcu_qsbr *v, unsigned int thread_id)
+@@ -304,7 +304,7 @@ rte_rcu_qsbr_thread_online(struct rte_rcu_qsbr *v, unsigned int thread_id)
@@ -1229 +545 @@
-@@ -350,7 +350,7 @@ rte_rcu_qsbr_thread_offline(struct rte_rcu_qsbr *v, unsigned int thread_id)
+@@ -355,7 +355,7 @@ rte_rcu_qsbr_thread_offline(struct rte_rcu_qsbr *v, unsigned int thread_id)
@@ -1238,2 +554,2 @@
-@@ -427,7 +427,7 @@ rte_rcu_qsbr_unlock(__rte_unused struct rte_rcu_qsbr *v,
- 				1, rte_memory_order_release);
+@@ -432,7 +432,7 @@ rte_rcu_qsbr_unlock(__rte_unused struct rte_rcu_qsbr *v,
+ 				1, __ATOMIC_RELEASE);
@@ -1247 +563 @@
-@@ -481,7 +481,7 @@ rte_rcu_qsbr_quiescent(struct rte_rcu_qsbr *v, unsigned int thread_id)
+@@ -486,7 +486,7 @@ rte_rcu_qsbr_quiescent(struct rte_rcu_qsbr *v, unsigned int thread_id)
@@ -1297 +613 @@
-index 3e1ef1ac25..6e5443e5f8 100644
+index b448b6685d..bd69d3b46e 100644

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

* patch 'bus/ifpga: remove dead code' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (3 preceding siblings ...)
  2024-03-07  1:30 ` patch 'lib: remove redundant newline from " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'dma/dpaa2: fix logtype register' " luca.boccassi
                   ` (95 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, Rosen Xu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From cfef91b1e0ec9f160962c04678d9d9a78835a7af Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 18 Dec 2023 16:45:26 +0100
Subject: [PATCH] bus/ifpga: remove dead code

[ upstream commit f1b2b0be784349021e79279076df31a7d9ecc4ee ]

This macro was never used.

Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/bus/ifpga/ifpga_logs.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/bus/ifpga/ifpga_logs.h b/drivers/bus/ifpga/ifpga_logs.h
index 873e0a4f2f..248bccba5d 100644
--- a/drivers/bus/ifpga/ifpga_logs.h
+++ b/drivers/bus/ifpga/ifpga_logs.h
@@ -9,10 +9,6 @@
 
 extern int ifpga_bus_logtype;
 
-#define IFPGA_LOG(level, fmt, args...) \
-	rte_log(RTE_LOG_ ## level, ifpga_bus_logtype, "%s(): " fmt "\n", \
-		__func__, ##args)
-
 #define IFPGA_BUS_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, ifpga_bus_logtype, "%s(): " fmt "\n", \
 		__func__, ##args)
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:35.645055426 +0000
+++ 0006-bus-ifpga-remove-dead-code.patch	2024-03-07 01:05:34.630936450 +0000
@@ -1 +1 @@
-From f1b2b0be784349021e79279076df31a7d9ecc4ee Mon Sep 17 00:00:00 2001
+From cfef91b1e0ec9f160962c04678d9d9a78835a7af Mon Sep 17 00:00:00 2001
@@ -4,0 +5,2 @@
+
+[ upstream commit f1b2b0be784349021e79279076df31a7d9ecc4ee ]

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

* patch 'dma/dpaa2: fix logtype register' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (4 preceding siblings ...)
  2024-03-07  1:30 ` patch 'bus/ifpga: remove dead code' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'net/i40e: remove redundant judgment in flow parsing' " luca.boccassi
                   ` (94 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: David Marchand; +Cc: Stephen Hemminger, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From fc8cfb6a22fcfca7b871527566cc79a1b3b7ffbb Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 18 Dec 2023 16:46:39 +0100
Subject: [PATCH] dma/dpaa2: fix logtype register

[ upstream commit f334b4c0b856e92d678cd09828207a3292e24ac2 ]

This driver logtype was not initialized so its logs would end up under
the 0 logtype, iow, RTE_LOGTYPE_EAL.
This issue comes from a typo on the logtype variable name.

Fixes: 8caf8427f85a ("dma/dpaa2: introduce driver skeleton")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/dma/dpaa2/dpaa2_qdma.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/dma/dpaa2/dpaa2_qdma.c b/drivers/dma/dpaa2/dpaa2_qdma.c
index 8968bb853b..2c91ceec13 100644
--- a/drivers/dma/dpaa2/dpaa2_qdma.c
+++ b/drivers/dma/dpaa2/dpaa2_qdma.c
@@ -16,9 +16,6 @@
 
 #define DPAA2_QDMA_PREFETCH "prefetch"
 
-/* Dynamic log type identifier */
-int dpaa2_qdma_logtype;
-
 uint32_t dpaa2_coherent_no_alloc_cache;
 uint32_t dpaa2_coherent_alloc_cache;
 
@@ -1699,4 +1696,4 @@ static struct rte_dpaa2_driver rte_dpaa2_qdma_pmd = {
 RTE_PMD_REGISTER_DPAA2(dpaa2_qdma, rte_dpaa2_qdma_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(dpaa2_qdma,
 	"no_prefetch=<int> ");
-RTE_LOG_REGISTER_DEFAULT(dpaa_qdma2_logtype, INFO);
+RTE_LOG_REGISTER_DEFAULT(dpaa2_qdma_logtype, INFO);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:35.716143531 +0000
+++ 0007-dma-dpaa2-fix-logtype-register.patch	2024-03-07 01:05:34.630936450 +0000
@@ -1 +1 @@
-From f334b4c0b856e92d678cd09828207a3292e24ac2 Mon Sep 17 00:00:00 2001
+From fc8cfb6a22fcfca7b871527566cc79a1b3b7ffbb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f334b4c0b856e92d678cd09828207a3292e24ac2 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/i40e: remove redundant judgment in flow parsing' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (5 preceding siblings ...)
  2024-03-07  1:30 ` patch 'dma/dpaa2: fix logtype register' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'net/iavf: fix memory leak on security context error' " luca.boccassi
                   ` (93 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 599593804be4ed29d757085181b98017c1295aa6 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Fri, 24 Nov 2023 15:01:03 +0800
Subject: [PATCH] net/i40e: remove redundant judgment in flow parsing

[ upstream commit e930f8622e05e410a475c6b57dd7edd73b2e1705 ]

if (eth_spec && eth_mask &&
	       next_type == RTE_FLOW_ITEM_TYPE_END) {
            ...
            if (next_type == RTE_FLOW_ITEM_TYPE_VLAN || ...) {
            ...
            }
...
}

Clearly, that condition in the inner "if" is always "false".

This commit will remove the redundant judgment.

Fixes: 7d83c152a207 ("net/i40e: parse flow director filter")

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 67df77890a..882152bd4a 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -1708,8 +1708,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 
 				ether_type = rte_be_to_cpu_16(eth_spec->type);
 
-				if (next_type == RTE_FLOW_ITEM_TYPE_VLAN ||
-				    ether_type == RTE_ETHER_TYPE_IPV4 ||
+				if (ether_type == RTE_ETHER_TYPE_IPV4 ||
 				    ether_type == RTE_ETHER_TYPE_IPV6 ||
 				    ether_type == i40e_get_outer_vlan(dev)) {
 					rte_flow_error_set(error, EINVAL,
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:35.798779554 +0000
+++ 0008-net-i40e-remove-redundant-judgment-in-flow-parsing.patch	2024-03-07 01:05:34.638936621 +0000
@@ -1 +1 @@
-From e930f8622e05e410a475c6b57dd7edd73b2e1705 Mon Sep 17 00:00:00 2001
+From 599593804be4ed29d757085181b98017c1295aa6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e930f8622e05e410a475c6b57dd7edd73b2e1705 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 877e49151e..92165c8422 100644
+index 67df77890a..882152bd4a 100644
@@ -34 +35 @@
- 				ether_type = rte_be_to_cpu_16(eth_spec->hdr.ether_type);
+ 				ether_type = rte_be_to_cpu_16(eth_spec->type);

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

* patch 'net/iavf: fix memory leak on security context error' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (6 preceding siblings ...)
  2024-03-07  1:30 ` patch 'net/i40e: remove redundant judgment in flow parsing' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'net/ixgbe: fix memoy leak after device init failure' " luca.boccassi
                   ` (92 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From ae8369536d8bbf8594aa8fd0944f7dcb5c434ffa Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 1 Dec 2023 18:46:49 +0800
Subject: [PATCH] net/iavf: fix memory leak on security context error

[ upstream commit 8758ad5f8633ce4197271d41ece0cc7f799d3d6e ]

In iavf_security_ctx_create() allocated memory for the
'security_ctx', we should free it when memory malloc for
the 'iavf_security_ctx' fails, otherwise it will lead to
memory leak.

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

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ipsec_crypto.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c
index 26459088af..8da41bb68e 100644
--- a/drivers/net/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/iavf/iavf_ipsec_crypto.c
@@ -1485,8 +1485,11 @@ iavf_security_ctx_create(struct iavf_adapter *adapter)
 	if (adapter->security_ctx == NULL) {
 		adapter->security_ctx = rte_malloc("iavf_security_ctx",
 				sizeof(struct iavf_security_ctx), 0);
-		if (adapter->security_ctx == NULL)
+		if (adapter->security_ctx == NULL) {
+			rte_free(adapter->vf.eth_dev->security_ctx);
+			adapter->vf.eth_dev->security_ctx = NULL;
 			return -ENOMEM;
+		}
 	}
 
 	return 0;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:35.878822472 +0000
+++ 0009-net-iavf-fix-memory-leak-on-security-context-error.patch	2024-03-07 01:05:34.642936706 +0000
@@ -1 +1 @@
-From 8758ad5f8633ce4197271d41ece0cc7f799d3d6e Mon Sep 17 00:00:00 2001
+From ae8369536d8bbf8594aa8fd0944f7dcb5c434ffa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8758ad5f8633ce4197271d41ece0cc7f799d3d6e ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 07a69db540..d6c0180ffd 100644
+index 26459088af..8da41bb68e 100644
@@ -24 +25 @@
-@@ -1518,8 +1518,11 @@ iavf_security_ctx_create(struct iavf_adapter *adapter)
+@@ -1485,8 +1485,11 @@ iavf_security_ctx_create(struct iavf_adapter *adapter)

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

* patch 'net/ixgbe: fix memoy leak after device init failure' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (7 preceding siblings ...)
  2024-03-07  1:30 ` patch 'net/iavf: fix memory leak on security context error' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'net/ice: fix link update' " luca.boccassi
                   ` (91 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 6bc4e06ef94ee8fdec3734574c026b6b9703cbfc Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 14 Dec 2023 14:44:41 +0800
Subject: [PATCH] net/ixgbe: fix memoy leak after device init failure

[ upstream commit 4d70ae0f1bb88e2aa100f5f7bf50b6484f0685cd ]

In ixgbe_ipsec_ctx_create() allocated memory for the 'security_ctx',
we should free it when errors occur, otherwise it will lead
to memory leak.

Fixes: 9a0752f498d2 ("net/ixgbe: enable inline IPsec")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 65655b9212..9c0e0efb66 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1187,7 +1187,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	diag = ixgbe_validate_eeprom_checksum(hw, &csum);
 	if (diag != IXGBE_SUCCESS) {
 		PMD_INIT_LOG(ERR, "The EEPROM checksum is not valid: %d", diag);
-		return -EIO;
+		ret = -EIO;
+		goto err_exit;
 	}
 
 #ifdef RTE_LIBRTE_IXGBE_BYPASS
@@ -1225,7 +1226,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 		PMD_INIT_LOG(ERR, "Unsupported SFP+ Module");
 	if (diag) {
 		PMD_INIT_LOG(ERR, "Hardware Initialization Failure: %d", diag);
-		return -EIO;
+		ret = -EIO;
+		goto err_exit;
 	}
 
 	/* Reset the hw statistics */
@@ -1245,7 +1247,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 			     "Failed to allocate %u bytes needed to store "
 			     "MAC addresses",
 			     RTE_ETHER_ADDR_LEN * hw->mac.num_rar_entries);
-		return -ENOMEM;
+		ret = -ENOMEM;
+		goto err_exit;
 	}
 	/* Copy the permanent MAC address */
 	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.perm_addr,
@@ -1260,7 +1263,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 			     RTE_ETHER_ADDR_LEN * IXGBE_VMDQ_NUM_UC_MAC);
 		rte_free(eth_dev->data->mac_addrs);
 		eth_dev->data->mac_addrs = NULL;
-		return -ENOMEM;
+		ret = -ENOMEM;
+		goto err_exit;
 	}
 
 	/* initialize the vfta */
@@ -1344,6 +1348,11 @@ err_pf_host_init:
 	eth_dev->data->mac_addrs = NULL;
 	rte_free(eth_dev->data->hash_mac_addrs);
 	eth_dev->data->hash_mac_addrs = NULL;
+err_exit:
+#ifdef RTE_LIB_SECURITY
+	rte_free(eth_dev->security_ctx);
+	eth_dev->security_ctx = NULL;
+#endif
 	return ret;
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:35.957057485 +0000
+++ 0010-net-ixgbe-fix-memoy-leak-after-device-init-failure.patch	2024-03-07 01:05:34.654936961 +0000
@@ -1 +1 @@
-From 4d70ae0f1bb88e2aa100f5f7bf50b6484f0685cd Mon Sep 17 00:00:00 2001
+From 6bc4e06ef94ee8fdec3734574c026b6b9703cbfc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4d70ae0f1bb88e2aa100f5f7bf50b6484f0685cd ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d6cf00317e..a32d3a6d7c 100644
+index 65655b9212..9c0e0efb66 100644
@@ -23 +24 @@
-@@ -1190,7 +1190,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1187,7 +1187,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -33 +34 @@
-@@ -1228,7 +1229,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1225,7 +1226,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -43 +44 @@
-@@ -1248,7 +1250,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1245,7 +1247,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -53 +54 @@
-@@ -1263,7 +1266,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1260,7 +1263,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -63 +64 @@
-@@ -1347,6 +1351,11 @@ err_pf_host_init:
+@@ -1344,6 +1348,11 @@ err_pf_host_init:

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

* patch 'net/ice: fix link update' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (8 preceding siblings ...)
  2024-03-07  1:30 ` patch 'net/ixgbe: fix memoy leak after device init failure' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'net/ice: fix tunnel TSO capabilities' " luca.boccassi
                   ` (90 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 51cb79315c3f4d9f8282b566663794b591323a34 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 14 Dec 2023 03:40:54 -0500
Subject: [PATCH] net/ice: fix link update

[ upstream commit 4e5dc111464e83e9a55fa466d8f682f0027b721e ]

The ice_aq_get_link_info function is not thread-safe. However,
it is possible to simultaneous invocations during both the dev_start
and the LSC interrupt handler, potentially leading to unexpected adminq
errors. This patch addresses the issue by introducing a thread-safe
wrapper that utilizes a spinlock.

Fixes: cf911d90e366 ("net/ice: support link update")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 26 ++++++++++++++++++++------
 drivers/net/ice/ice_ethdev.h |  4 ++++
 2 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 8ce7d0ebaa..994eeaa83b 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -1773,6 +1773,7 @@ ice_pf_setup(struct ice_pf *pf)
 	}
 
 	pf->main_vsi = vsi;
+	rte_spinlock_init(&pf->link_lock);
 
 	return 0;
 }
@@ -3589,17 +3590,31 @@ ice_rxq_intr_setup(struct rte_eth_dev *dev)
 	return 0;
 }
 
+static enum ice_status
+ice_get_link_info_safe(struct ice_pf *pf, bool ena_lse,
+		       struct ice_link_status *link)
+{
+	struct ice_hw *hw = ICE_PF_TO_HW(pf);
+	int ret;
+
+	rte_spinlock_lock(&pf->link_lock);
+
+	ret = ice_aq_get_link_info(hw->port_info, ena_lse, link, NULL);
+
+	rte_spinlock_unlock(&pf->link_lock);
+
+	return ret;
+}
+
 static void
 ice_get_init_link_status(struct rte_eth_dev *dev)
 {
-	struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	bool enable_lse = dev->data->dev_conf.intr_conf.lsc ? true : false;
 	struct ice_link_status link_status;
 	int ret;
 
-	ret = ice_aq_get_link_info(hw->port_info, enable_lse,
-				   &link_status, NULL);
+	ret = ice_get_link_info_safe(pf, enable_lse, &link_status);
 	if (ret != ICE_SUCCESS) {
 		PMD_DRV_LOG(ERR, "Failed to get link info");
 		pf->init_link_up = false;
@@ -3960,7 +3975,7 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 {
 #define CHECK_INTERVAL 50  /* 50ms */
 #define MAX_REPEAT_TIME 40  /* 2s (40 * 50ms) in total */
-	struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	struct ice_link_status link_status;
 	struct rte_eth_link link, old;
 	int status;
@@ -3974,8 +3989,7 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 
 	do {
 		/* Get link status information from hardware */
-		status = ice_aq_get_link_info(hw->port_info, enable_lse,
-					      &link_status, NULL);
+		status = ice_get_link_info_safe(pf, enable_lse, &link_status);
 		if (status != ICE_SUCCESS) {
 			link.link_speed = RTE_ETH_SPEED_NUM_100M;
 			link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index c8311be179..bfc9140dba 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -550,6 +550,10 @@ struct ice_pf {
 	uint64_t supported_rxdid; /* bitmap for supported RXDID */
 	uint64_t rss_hf;
 	struct ice_tm_conf tm_conf;
+	/* lock prevent race condition between lsc interrupt handler
+	 * and link status update during dev_start.
+	 */
+	rte_spinlock_t link_lock;
 };
 
 #define ICE_MAX_QUEUE_NUM  2048
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.044255764 +0000
+++ 0011-net-ice-fix-link-update.patch	2024-03-07 01:05:34.666937215 +0000
@@ -1 +1 @@
-From 4e5dc111464e83e9a55fa466d8f682f0027b721e Mon Sep 17 00:00:00 2001
+From 51cb79315c3f4d9f8282b566663794b591323a34 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e5dc111464e83e9a55fa466d8f682f0027b721e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 3ccba4db80..1f8ab5158a 100644
+index 8ce7d0ebaa..994eeaa83b 100644
@@ -26 +27 @@
-@@ -1804,6 +1804,7 @@ ice_pf_setup(struct ice_pf *pf)
+@@ -1773,6 +1773,7 @@ ice_pf_setup(struct ice_pf *pf)
@@ -34 +35 @@
-@@ -3621,17 +3622,31 @@ ice_rxq_intr_setup(struct rte_eth_dev *dev)
+@@ -3589,17 +3590,31 @@ ice_rxq_intr_setup(struct rte_eth_dev *dev)
@@ -69 +70 @@
-@@ -3996,7 +4011,7 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -3960,7 +3975,7 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
@@ -78 +79 @@
-@@ -4010,8 +4025,7 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -3974,8 +3989,7 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
@@ -89 +90 @@
-index abe6dcdc23..d607f028e0 100644
+index c8311be179..bfc9140dba 100644
@@ -92 +93,2 @@
-@@ -548,6 +548,10 @@ struct ice_pf {
+@@ -550,6 +550,10 @@ struct ice_pf {
+ 	uint64_t supported_rxdid; /* bitmap for supported RXDID */
@@ -95 +96,0 @@
- 	uint16_t outer_ethertype;

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

* patch 'net/ice: fix tunnel TSO capabilities' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (9 preceding siblings ...)
  2024-03-07  1:30 ` patch 'net/ice: fix link update' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'net/ice: fix memory leaks' " luca.boccassi
                   ` (89 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 1a93dbe66718853f78b4c9a44e15d0f730cdd8a7 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Thu, 7 Dec 2023 10:30:51 +0800
Subject: [PATCH] net/ice: fix tunnel TSO capabilities

[ upstream commit daac90272857812b3da1db95caf5922f03a83343 ]

The Tx offload capabilities doesn't include TSO tunnel which
will result in TSO tunnel setting to not take effect.

The patch adds tunnel TSO offload to ICE_TX_NO_VECTOR_FLAGS.

This commit will add TSO tunnel capabilities in ice_dev_info_get().

Bugzilla ID: 1327
Fixes: d852fec1be63 ("net/ice: fix Tx offload path choice")

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c          | 6 +++++-
 drivers/net/ice/ice_rxtx_vec_common.h | 4 ++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 994eeaa83b..ba19c16384 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3859,7 +3859,11 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			RTE_ETH_TX_OFFLOAD_TCP_CKSUM |
 			RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |
 			RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |
-			RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM;
+			RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |
+			RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |
+			RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |
+			RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
+			RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO;
 		dev_info->flow_type_rss_offloads |= ICE_RSS_OFFLOAD_ALL;
 	}
 
diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index 55840cf170..4b73465af5 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -251,6 +251,10 @@ ice_rxq_vec_setup_default(struct ice_rx_queue *rxq)
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |		\
 		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |	\
 		RTE_ETH_TX_OFFLOAD_TCP_TSO |	\
+		RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |    \
+		RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |    \
+		RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |    \
+		RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |    \
 		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM)
 
 #define ICE_TX_VECTOR_OFFLOAD (				\
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.128350917 +0000
+++ 0012-net-ice-fix-tunnel-TSO-capabilities.patch	2024-03-07 01:05:34.674937384 +0000
@@ -1 +1 @@
-From daac90272857812b3da1db95caf5922f03a83343 Mon Sep 17 00:00:00 2001
+From 1a93dbe66718853f78b4c9a44e15d0f730cdd8a7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit daac90272857812b3da1db95caf5922f03a83343 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 1f8ab5158a..3c3bc49dc2 100644
+index 994eeaa83b..ba19c16384 100644
@@ -28 +29 @@
-@@ -3891,7 +3891,11 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -3859,7 +3859,11 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)

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

* patch 'net/ice: fix memory leaks' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (10 preceding siblings ...)
  2024-03-07  1:30 ` patch 'net/ice: fix tunnel TSO capabilities' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'kernel/freebsd: fix module build on FreeBSD 14' " luca.boccassi
                   ` (88 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Wenjun Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 65973f73eec77e58a1acb055d8dc8edf192f7926 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Sun, 7 Jan 2024 06:50:53 -0500
Subject: [PATCH] net/ice: fix memory leaks

[ upstream commit 546ee62dd441730daae181e336f30b315c5fb16f ]

Free memory for AQ buffer at icd_move_recfg_lan_txq
Free memory for profile list at ice_tm_conf_uninit

Fixes: 8c481c3bb65b ("net/ice: support queue and queue group bandwidth limit")

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

diff --git a/drivers/net/ice/ice_tm.c b/drivers/net/ice/ice_tm.c
index 34a0bfcff8..c24642c867 100644
--- a/drivers/net/ice/ice_tm.c
+++ b/drivers/net/ice/ice_tm.c
@@ -58,8 +58,15 @@ void
 ice_tm_conf_uninit(struct rte_eth_dev *dev)
 {
 	struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
+	struct ice_tm_shaper_profile *shaper_profile;
 	struct ice_tm_node *tm_node;
 
+	/* clear profile */
+	while ((shaper_profile = TAILQ_FIRST(&pf->tm_conf.shaper_profile_list))) {
+		TAILQ_REMOVE(&pf->tm_conf.shaper_profile_list, shaper_profile, node);
+		rte_free(shaper_profile);
+	}
+
 	/* clear node configuration */
 	while ((tm_node = TAILQ_FIRST(&pf->tm_conf.queue_list))) {
 		TAILQ_REMOVE(&pf->tm_conf.queue_list, tm_node, node);
@@ -648,6 +655,8 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
 	uint16_t buf_size = ice_struct_size(buf, txqs, 1);
 
 	buf = (struct ice_aqc_move_txqs_data *)ice_malloc(hw, sizeof(*buf));
+	if (buf == NULL)
+		return -ENOMEM;
 
 	queue_parent_node = queue_sched_node->parent;
 	buf->src_teid = queue_parent_node->info.node_teid;
@@ -659,6 +668,7 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
 					NULL, buf, buf_size, &txqs_moved, NULL);
 	if (ret || txqs_moved == 0) {
 		PMD_DRV_LOG(ERR, "move lan queue %u failed", queue_id);
+		rte_free(buf);
 		return ICE_ERR_PARAM;
 	}
 
@@ -668,12 +678,14 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
 	} else {
 		PMD_DRV_LOG(ERR, "invalid children number %d for queue %u",
 			    queue_parent_node->num_children, queue_id);
+		rte_free(buf);
 		return ICE_ERR_PARAM;
 	}
 	dst_node->children[dst_node->num_children++] = queue_sched_node;
 	queue_sched_node->parent = dst_node;
 	ice_sched_query_elem(hw, queue_sched_node->info.node_teid, &queue_sched_node->info);
 
+	rte_free(buf);
 	return ret;
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.213235791 +0000
+++ 0013-net-ice-fix-memory-leaks.patch	2024-03-07 01:05:34.678937470 +0000
@@ -1 +1 @@
-From 546ee62dd441730daae181e336f30b315c5fb16f Mon Sep 17 00:00:00 2001
+From 65973f73eec77e58a1acb055d8dc8edf192f7926 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 546ee62dd441730daae181e336f30b315c5fb16f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index b570798f07..c00ecb6a97 100644
+index 34a0bfcff8..c24642c867 100644
@@ -22 +23 @@
-@@ -59,8 +59,15 @@ void
+@@ -58,8 +58,15 @@ void
@@ -38 +39 @@
-@@ -636,6 +643,8 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
+@@ -648,6 +655,8 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
@@ -47 +48 @@
-@@ -647,6 +656,7 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
+@@ -659,6 +668,7 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
@@ -55 +56 @@
-@@ -656,12 +666,14 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,
+@@ -668,12 +678,14 @@ static int ice_move_recfg_lan_txq(struct rte_eth_dev *dev,

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

* patch 'kernel/freebsd: fix module build on FreeBSD 14' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (11 preceding siblings ...)
  2024-03-07  1:30 ` patch 'net/ice: fix memory leaks' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'build: fix reasons conflict' " luca.boccassi
                   ` (87 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Daxue Gao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 7d1744b05c642bfecc2c7c70c40130ad8bb1b5d5 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 19 Dec 2023 11:29:59 +0000
Subject: [PATCH] kernel/freebsd: fix module build on FreeBSD 14

[ upstream commit 5eedf66ac0e5ce62cd333e523996c63a3c4c2c00 ]

When building nic_uio module on FreeBSD 14, a build error is given in
the DRIVER_MODULE macro:

nic_uio.c:84:81: error: too many arguments provided to function-like macro invocation
DRIVER_MODULE(nic_uio, pci, nic_uio_driver, nic_uio_devclass, nic_uio_modevent, 0);
                                                                                ^
On FreeBSD 14, the devclass parameter is dropped from the macro,
so we conditionally compile a different invocation
for BSD versions before/after v14.

Bugzilla ID: 1335

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
---
 kernel/freebsd/nic_uio/nic_uio.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/freebsd/nic_uio/nic_uio.c b/kernel/freebsd/nic_uio/nic_uio.c
index 7a81694c92..0043892870 100644
--- a/kernel/freebsd/nic_uio/nic_uio.c
+++ b/kernel/freebsd/nic_uio/nic_uio.c
@@ -78,10 +78,14 @@ struct pci_bdf {
 	uint32_t function;
 };
 
-static devclass_t nic_uio_devclass;
-
 DEFINE_CLASS_0(nic_uio, nic_uio_driver, nic_uio_methods, sizeof(struct nic_uio_softc));
+
+#if __FreeBSD_version < 1400000
+static devclass_t nic_uio_devclass;
 DRIVER_MODULE(nic_uio, pci, nic_uio_driver, nic_uio_devclass, nic_uio_modevent, 0);
+#else
+DRIVER_MODULE(nic_uio, pci, nic_uio_driver, nic_uio_modevent, 0);
+#endif
 
 static int
 nic_uio_mmap(struct cdev *cdev, vm_ooffset_t offset, vm_paddr_t *paddr,
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.291658120 +0000
+++ 0014-kernel-freebsd-fix-module-build-on-FreeBSD-14.patch	2024-03-07 01:05:34.678937470 +0000
@@ -1 +1 @@
-From 5eedf66ac0e5ce62cd333e523996c63a3c4c2c00 Mon Sep 17 00:00:00 2001
+From 7d1744b05c642bfecc2c7c70c40130ad8bb1b5d5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5eedf66ac0e5ce62cd333e523996c63a3c4c2c00 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org

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

* patch 'build: fix reasons conflict' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (12 preceding siblings ...)
  2024-03-07  1:30 ` patch 'kernel/freebsd: fix module build on FreeBSD 14' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'telemetry: fix connected clients count' " luca.boccassi
                   ` (86 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, Tyler Retzlaff, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From d9ce83470f195ec2d715c013f2bb1c78de3e5379 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 31 Jan 2024 18:45:51 +0100
Subject: [PATCH] build: fix reasons conflict

[ upstream commit a206a01537eb04fabad9236372991ace6c5c0b4b ]

The "_disable_reason" variables are subject to naming conflicts.

This has been caught while looking at mingw builds where the graph
application was skipped with an <unknown_reason> (which is caused by a
missing reason variable set in app/graph/meson.build) and the graph
library was skipped with the same <unknown_reason> too, even though
this library meson does set a proper reason variable.

Example in GHA:

=================
Content Skipped
=================

apps:
	dumpcap:	not supported on Windows
	graph:	<unknown reason>
	pdump:	not supported on Windows
...

libs:
	acl:	not supported on Windows
	bbdev:	not supported on Windows
...
	graph:	<unknown reason>
	node:	not supported on Windows

Prefix all those variables with the type of component.

Fixes: ecf75180171b ("build: list selected applications")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 app/meson.build                | 2 +-
 drivers/common/qat/meson.build | 6 +++---
 drivers/meson.build            | 2 +-
 lib/meson.build                | 2 +-
 meson.build                    | 6 +++---
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index e32ea4bd5c..81c94e2b79 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -83,7 +83,7 @@ foreach app:apps
     if not build
         if reason != ''
             dpdk_apps_disabled += app
-            set_variable(app.underscorify() + '_disable_reason', reason)
+            set_variable('app_' + app.underscorify() + '_disable_reason', reason)
         endif
         continue
     endif
diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build
index 95b52b78c3..3680e0a215 100644
--- a/drivers/common/qat/meson.build
+++ b/drivers/common/qat/meson.build
@@ -17,13 +17,13 @@ qat_compress_relpath = '../../' + qat_compress_path
 if disable_drivers.contains(qat_crypto_path)
     qat_crypto = false
     dpdk_drvs_disabled += qat_crypto_path
-    set_variable(qat_crypto_path.underscorify() + '_disable_reason',
+    set_variable('drv_' + qat_crypto_path.underscorify() + '_disable_reason',
             'Explicitly disabled via build config')
 endif
 if disable_drivers.contains(qat_compress_path)
     qat_compress = false
     dpdk_drvs_disabled += qat_compress_path
-    set_variable(qat_compress_path.underscorify() + '_disable_reason',
+    set_variable('drv_' + qat_compress_path.underscorify() + '_disable_reason',
             'Explicitly disabled via build config')
 endif
 
@@ -31,7 +31,7 @@ libcrypto = dependency('libcrypto', required: false, method: 'pkg-config')
 if qat_crypto and not libcrypto.found()
     qat_crypto = false
     dpdk_drvs_disabled += qat_crypto_path
-    set_variable(qat_crypto_path.underscorify() + '_disable_reason',
+    set_variable('drv_' + qat_crypto_path.underscorify() + '_disable_reason',
             'missing dependency, libcrypto')
 endif
 
diff --git a/drivers/meson.build b/drivers/meson.build
index 5188302057..b4d9252888 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -159,7 +159,7 @@ foreach subpath:subdirs
             # component disable printout in those cases
             if reason != ''
                 dpdk_drvs_disabled += drv_path
-                set_variable(drv_path.underscorify() + '_disable_reason', reason)
+                set_variable('drv_' + drv_path.underscorify() + '_disable_reason', reason)
             endif
             continue
         endif
diff --git a/lib/meson.build b/lib/meson.build
index fd55925340..02dfa9b868 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -176,7 +176,7 @@ foreach l:libraries
 
     if not build
         dpdk_libs_disabled += name
-        set_variable(name.underscorify() + '_disable_reason', reason)
+        set_variable('lib_' + name.underscorify() + '_disable_reason', reason)
         continue
     endif
 
diff --git a/meson.build b/meson.build
index f91d652bc5..86f59a2fe4 100644
--- a/meson.build
+++ b/meson.build
@@ -163,17 +163,17 @@ message(output_message + '\n')
 output_message = '\n=================\nContent Skipped\n=================\n'
 output_message += '\napps:\n\t'
 foreach app:dpdk_apps_disabled
-    reason = get_variable(app.underscorify() + '_disable_reason')
+    reason = get_variable('app_' + app.underscorify() + '_disable_reason')
     output_message += app + ':\t' + reason + '\n\t'
 endforeach
 output_message += '\nlibs:\n\t'
 foreach lib:dpdk_libs_disabled
-    reason = get_variable(lib.underscorify() + '_disable_reason')
+    reason = get_variable('lib_' + lib.underscorify() + '_disable_reason')
     output_message += lib + ':\t' + reason + '\n\t'
 endforeach
 output_message += '\ndrivers:\n\t'
 foreach drv:dpdk_drvs_disabled
-    reason = get_variable(drv.underscorify() + '_disable_reason')
+    reason = get_variable('drv_' + drv.underscorify() + '_disable_reason')
     output_message += drv + ':\t' + reason + '\n\t'
 endforeach
 message(output_message + '\n')
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.369184584 +0000
+++ 0015-build-fix-reasons-conflict.patch	2024-03-07 01:05:34.682937554 +0000
@@ -1 +1 @@
-From a206a01537eb04fabad9236372991ace6c5c0b4b Mon Sep 17 00:00:00 2001
+From d9ce83470f195ec2d715c013f2bb1c78de3e5379 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a206a01537eb04fabad9236372991ace6c5c0b4b ]
+
@@ -36 +37,0 @@
-Cc: stable@dpdk.org
@@ -42,6 +43,6 @@
- app/meson.build                |  2 +-
- drivers/common/qat/meson.build | 10 +++++-----
- drivers/meson.build            |  4 ++--
- lib/meson.build                |  2 +-
- meson.build                    |  6 +++---
- 5 files changed, 12 insertions(+), 12 deletions(-)
+ app/meson.build                | 2 +-
+ drivers/common/qat/meson.build | 6 +++---
+ drivers/meson.build            | 2 +-
+ lib/meson.build                | 2 +-
+ meson.build                    | 6 +++---
+ 5 files changed, 9 insertions(+), 9 deletions(-)
@@ -50 +51 @@
-index 8aaed59f39..21b6da29b3 100644
+index e32ea4bd5c..81c94e2b79 100644
@@ -53 +54 @@
-@@ -93,7 +93,7 @@ foreach app:apps
+@@ -83,7 +83,7 @@ foreach app:apps
@@ -63 +64 @@
-index 5c36fbb270..62abcb6fe3 100644
+index 95b52b78c3..3680e0a215 100644
@@ -82,26 +83,7 @@
-@@ -36,7 +36,7 @@ if arch_subdir == 'arm'
-     else
-         qat_crypto = false
-         dpdk_drvs_disabled += qat_crypto_path
--        set_variable(qat_crypto_path.underscorify() + '_disable_reason',
-+        set_variable('drv_' + qat_crypto_path.underscorify() + '_disable_reason',
-         'missing dependency for Arm, libcrypto')
-     endif
- else
-@@ -57,7 +57,7 @@ else
-         else
-             qat_crypto = false
-             dpdk_drvs_disabled += qat_crypto_path
--            set_variable(qat_crypto_path.underscorify() + '_disable_reason',
-+            set_variable('drv_' + qat_crypto_path.underscorify() + '_disable_reason',
-                 'missing dependency, libipsecmb or libcrypto')
-         endif
-     elif libcrypto.found()
-@@ -66,7 +66,7 @@ else
-     else
-         qat_crypto = false
-         dpdk_drvs_disabled += qat_crypto_path
--        set_variable(qat_crypto_path.underscorify() + '_disable_reason',
-+        set_variable('drv_' + qat_crypto_path.underscorify() + '_disable_reason',
-             'missing dependency, libipsecmb or libcrypto')
-     endif
+@@ -31,7 +31,7 @@ libcrypto = dependency('libcrypto', required: false, method: 'pkg-config')
+ if qat_crypto and not libcrypto.found()
+     qat_crypto = false
+     dpdk_drvs_disabled += qat_crypto_path
+-    set_variable(qat_crypto_path.underscorify() + '_disable_reason',
++    set_variable('drv_' + qat_crypto_path.underscorify() + '_disable_reason',
+             'missing dependency, libcrypto')
@@ -108,0 +91 @@
+ 
@@ -110 +93 @@
-index 5ba534049a..f2be71bc05 100644
+index 5188302057..b4d9252888 100644
@@ -113,10 +96 @@
-@@ -93,7 +93,7 @@ foreach subpath:subdirs
-         if skip_class
-             drv_path = join_paths(class, '*')
-             dpdk_drvs_disabled += drv_path
--            set_variable(drv_path.underscorify() + '_disable_reason', reason)
-+            set_variable('drv_' + drv_path.underscorify() + '_disable_reason', reason)
-             continue
-         endif
-     endif
-@@ -199,7 +199,7 @@ foreach subpath:subdirs
+@@ -159,7 +159,7 @@ foreach subpath:subdirs
@@ -132 +106 @@
-index 72e9138d14..8637b72ab5 100644
+index fd55925340..02dfa9b868 100644
@@ -135 +109 @@
-@@ -201,7 +201,7 @@ foreach l:libraries
+@@ -176,7 +176,7 @@ foreach l:libraries
@@ -145 +119 @@
-index 5e161f43e5..8b248d4505 100644
+index f91d652bc5..86f59a2fe4 100644
@@ -148 +122 @@
-@@ -164,17 +164,17 @@ message(output_message + '\n')
+@@ -163,17 +163,17 @@ message(output_message + '\n')

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

* patch 'telemetry: fix connected clients count' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (13 preceding siblings ...)
  2024-03-07  1:30 ` patch 'build: fix reasons conflict' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'telemetry: fix empty JSON dictionaries' " luca.boccassi
                   ` (85 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Shaowei Sun; +Cc: Bruce Richardson, Ciara Power, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 5543f65075a6144697cb0a3ae95643db5cac8f6f Mon Sep 17 00:00:00 2001
From: Shaowei Sun <1819846787@qq.com>
Date: Tue, 30 Jan 2024 09:57:04 +0800
Subject: [PATCH] telemetry: fix connected clients count

[ upstream commit e14bb5f1050924de1602033596d5b417bfbeee52 ]

Telemetry can only create 10 conns by default, each of which is processed
by a thread.

When a thread fails to write using socket, the thread will end directly
without reducing the total number of conns.

This will result in the machine running for a long time, and if there are
10 failures, the telemetry will be unavailable

Fixes: 2a7d0b872f79 ("telemetry: add upper limit on connections")

Signed-off-by: Shaowei Sun <1819846787@qq.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 .mailmap                  | 1 +
 lib/telemetry/telemetry.c | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.mailmap b/.mailmap
index a97dce5fcf..6546656551 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1228,6 +1228,7 @@ Shally Verma <shallyv@marvell.com> <shally.verma@caviumnetworks.com>
 Shannon Nelson <snelson@pensando.io>
 Shannon Zhao <zhaoshenglong@huawei.com>
 Shaopeng He <shaopeng.he@intel.com>
+Shaowei Sun <1819846787@qq.com>
 Sharmila Podury <sharmila.podury@att.com>
 Sharon Haroni <sharon.haroni@intel.com>
 Shay Agroskin <shayagr@amazon.com>
diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index 9c3c346ff5..b7fd6f606c 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -379,8 +379,8 @@ client_handler(void *sock_id)
 			"{\"version\":\"%s\",\"pid\":%d,\"max_output_len\":%d}",
 			telemetry_version, getpid(), MAX_OUTPUT_LEN);
 	if (write(s, info_str, strlen(info_str)) < 0) {
-		close(s);
-		return NULL;
+		TMTY_LOG(ERR, "Socket write base info to client failed");
+		goto exit;
 	}
 
 	/* receive data is not null terminated */
@@ -405,6 +405,7 @@ client_handler(void *sock_id)
 
 		bytes = read(s, buffer, sizeof(buffer) - 1);
 	}
+exit:
 	close(s);
 	__atomic_sub_fetch(&v2_clients, 1, __ATOMIC_RELAXED);
 	return NULL;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.444190114 +0000
+++ 0016-telemetry-fix-connected-clients-count.patch	2024-03-07 01:05:34.686937639 +0000
@@ -1 +1 @@
-From e14bb5f1050924de1602033596d5b417bfbeee52 Mon Sep 17 00:00:00 2001
+From 5543f65075a6144697cb0a3ae95643db5cac8f6f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e14bb5f1050924de1602033596d5b417bfbeee52 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index aa569ff456..a0756974e2 100644
+index a97dce5fcf..6546656551 100644
@@ -31 +32 @@
-@@ -1281,6 +1281,7 @@ Shally Verma <shallyv@marvell.com> <shally.verma@caviumnetworks.com>
+@@ -1228,6 +1228,7 @@ Shally Verma <shallyv@marvell.com> <shally.verma@caviumnetworks.com>
@@ -40 +41 @@
-index 47846ef868..d4720197ba 100644
+index 9c3c346ff5..b7fd6f606c 100644
@@ -43 +44 @@
-@@ -378,8 +378,8 @@ client_handler(void *sock_id)
+@@ -379,8 +379,8 @@ client_handler(void *sock_id)
@@ -49 +50 @@
-+		TMTY_LOG_LINE(ERR, "Socket write base info to client failed");
++		TMTY_LOG(ERR, "Socket write base info to client failed");
@@ -54 +55 @@
-@@ -404,6 +404,7 @@ client_handler(void *sock_id)
+@@ -405,6 +405,7 @@ client_handler(void *sock_id)
@@ -60 +61 @@
- 	rte_atomic_fetch_sub_explicit(&v2_clients, 1, rte_memory_order_relaxed);
+ 	__atomic_sub_fetch(&v2_clients, 1, __ATOMIC_RELAXED);

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

* patch 'telemetry: fix empty JSON dictionaries' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (14 preceding siblings ...)
  2024-03-07  1:30 ` patch 'telemetry: fix connected clients count' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'ci: update versions of actions in GHA' " luca.boccassi
                   ` (84 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Jonathan Erb; +Cc: Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 1d8abba66121dd057182e9f690b2c3b62dc15e7a Mon Sep 17 00:00:00 2001
From: Jonathan Erb <jonathan.erb@threater.com>
Date: Thu, 18 Jan 2024 12:26:02 -0500
Subject: [PATCH] telemetry: fix empty JSON dictionaries

[ upstream commit 324ec1df541711ca829f4d99b7e2d32ffe38d3ca ]

Fix to allow telemetry to handle empty dictionaries correctly.

This patch resolves an issue where empty dictionaries are reported
by telemetry as '[]' rather than '{}'. Initializing the output
buffer based on the container type resolves the issue.

Fixes: c933bb5177ca ("telemetry: support array values in data object")

Signed-off-by: Jonathan Erb <jonathan.erb@threater.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 .mailmap                  | 2 +-
 lib/telemetry/telemetry.c | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/.mailmap b/.mailmap
index 6546656551..0af93036f2 100644
--- a/.mailmap
+++ b/.mailmap
@@ -652,7 +652,7 @@ John Ousterhout <ouster@cs.stanford.edu>
 John Romein <romein@astron.nl>
 John W. Linville <linville@tuxdriver.com>
 Jonas Pfefferle <jpf@zurich.ibm.com> <pepperjo@japf.ch>
-Jonathan Erb <jonathan.erb@threatblockr.com> <jonathan.erb@banduracyber.com>
+Jonathan Erb <jonathan.erb@threater.com> <jonathan.erb@threatblockr.com> <jonathan.erb@banduracyber.com>
 Jonathan Tsai <jonathan1.tsai@intel.com>
 Jon DeVree <nuxi@vault24.org>
 Jon Loeliger <jdl@netgate.com>
diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index b7fd6f606c..af5da11866 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -171,7 +171,11 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
 		d->type != RTE_TEL_ARRAY_INT && d->type != RTE_TEL_ARRAY_STRING)
 		return snprintf(out_buf, buf_len, "null");
 
-	used = rte_tel_json_empty_array(out_buf, buf_len, 0);
+	if (d->type == RTE_TEL_DICT)
+		used = rte_tel_json_empty_obj(out_buf, buf_len, 0);
+	else
+		used = rte_tel_json_empty_array(out_buf, buf_len, 0);
+
 	if (d->type == RTE_TEL_ARRAY_U64)
 		for (i = 0; i < d->data_len; i++)
 			used = rte_tel_json_add_array_u64(out_buf,
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.522346361 +0000
+++ 0017-telemetry-fix-empty-JSON-dictionaries.patch	2024-03-07 01:05:34.690937724 +0000
@@ -1 +1 @@
-From 324ec1df541711ca829f4d99b7e2d32ffe38d3ca Mon Sep 17 00:00:00 2001
+From 1d8abba66121dd057182e9f690b2c3b62dc15e7a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 324ec1df541711ca829f4d99b7e2d32ffe38d3ca ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index a0756974e2..de339562f4 100644
+index 6546656551..0af93036f2 100644
@@ -26 +27 @@
-@@ -676,7 +676,7 @@ John Ousterhout <ouster@cs.stanford.edu>
+@@ -652,7 +652,7 @@ John Ousterhout <ouster@cs.stanford.edu>
@@ -36 +37 @@
-index d4720197ba..1663bd8c68 100644
+index b7fd6f606c..af5da11866 100644
@@ -39,2 +40,2 @@
-@@ -170,7 +170,11 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
- 		d->type != TEL_ARRAY_INT && d->type != TEL_ARRAY_STRING)
+@@ -171,7 +171,11 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
+ 		d->type != RTE_TEL_ARRAY_INT && d->type != RTE_TEL_ARRAY_STRING)
@@ -44 +45 @@
-+	if (d->type == TEL_DICT)
++	if (d->type == RTE_TEL_DICT)
@@ -49 +50 @@
- 	if (d->type == TEL_ARRAY_UINT)
+ 	if (d->type == RTE_TEL_ARRAY_U64)
@@ -51 +52 @@
- 			used = rte_tel_json_add_array_uint(out_buf,
+ 			used = rte_tel_json_add_array_u64(out_buf,

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

* patch 'ci: update versions of actions in GHA' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (15 preceding siblings ...)
  2024-03-07  1:30 ` patch 'telemetry: fix empty JSON dictionaries' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'eal/x86: add AMD vendor check for TSC calibration' " luca.boccassi
                   ` (83 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: David Marchand; +Cc: Aaron Conole, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 8661160ad34e2d8f91e80e0e1c6f52fb292acce6 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 31 Jan 2024 18:44:36 +0100
Subject: [PATCH] ci: update versions of actions in GHA

[ upstream commit 2ea7994ae39ff979b15899ec9eb9c68c944d4b11 ]

GitHub started deprecating GHA actions based on Node 16 [1].
For now, only warnings are raised, but we might as well switch to v4
versions of the common actions, now.

Link: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 .github/workflows/build.yml | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8bd8f57513..c08f6ae827 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -64,7 +64,7 @@ jobs:
 
     steps:
     - name: Checkout sources
-      uses: actions/checkout@v3
+      uses: actions/checkout@v4
     - name: Generate cache keys
       id: get_ref_keys
       run: |
@@ -72,7 +72,7 @@ jobs:
         echo 'libabigail=libabigail-${{ env.LIBABIGAIL_VERSION }}-${{ matrix.config.os }}' >> $GITHUB_OUTPUT
         echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
     - name: Retrieve ccache cache
-      uses: actions/cache@v3
+      uses: actions/cache@v4
       with:
         path: ~/.ccache
         key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
@@ -80,13 +80,13 @@ jobs:
           ${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main
     - name: Retrieve libabigail cache
       id: libabigail-cache
-      uses: actions/cache@v3
+      uses: actions/cache@v4
       if: env.ABI_CHECKS == 'true'
       with:
         path: libabigail
         key: ${{ steps.get_ref_keys.outputs.libabigail }}
     - name: Retrieve ABI reference cache
-      uses: actions/cache@v3
+      uses: actions/cache@v4
       if: env.ABI_CHECKS == 'true'
       with:
         path: reference
@@ -133,7 +133,7 @@ jobs:
       run: .ci/linux-build.sh
     - name: Upload logs on failure
       if: failure()
-      uses: actions/upload-artifact@v3
+      uses: actions/upload-artifact@v4
       with:
         name: meson-logs-${{ join(matrix.config.*, '-') }}
         path: |
@@ -161,7 +161,7 @@ jobs:
         echo 'image=image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d) >> $GITHUB_OUTPUT
     - name: Retrieve image cache
       id: image_cache
-      uses: actions/cache@v3
+      uses: actions/cache@v4
       with:
         path: ~/.image
         key: ${{ steps.get_keys.outputs.image }}
@@ -207,7 +207,7 @@ jobs:
 
     steps:
     - name: Checkout sources
-      uses: actions/checkout@v3
+      uses: actions/checkout@v4
     - name: Generate various keys
       id: get_keys
       run: |
@@ -215,7 +215,7 @@ jobs:
         echo 'logs=meson-logs-${{ join(matrix.config.*, '-') }}' | tr -d ':' >> $GITHUB_OUTPUT
     - name: Retrieve image cache
       id: image_cache
-      uses: actions/cache@v3
+      uses: actions/cache@v4
       with:
         path: ~/.image
         key: ${{ needs.prepare-container-images.outputs.image }}
@@ -225,7 +225,7 @@ jobs:
         echo 'Image ${{ matrix.config.image }} is not cached.'
         false
     - name: Retrieve ccache cache
-      uses: actions/cache@v3
+      uses: actions/cache@v4
       with:
         path: ~/.ccache
         key: ${{ steps.get_keys.outputs.ccache }}-${{ github.ref }}
@@ -262,7 +262,7 @@ jobs:
       run: docker kill dpdk
     - name: Upload logs on failure
       if: failure()
-      uses: actions/upload-artifact@v3
+      uses: actions/upload-artifact@v4
       with:
         name: ${{ steps.get_keys.outputs.logs }}
         path: |
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.601755705 +0000
+++ 0018-ci-update-versions-of-actions-in-GHA.patch	2024-03-07 01:05:34.694937810 +0000
@@ -1 +1 @@
-From 2ea7994ae39ff979b15899ec9eb9c68c944d4b11 Mon Sep 17 00:00:00 2001
+From 8661160ad34e2d8f91e80e0e1c6f52fb292acce6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ea7994ae39ff979b15899ec9eb9c68c944d4b11 ]
+
@@ -12,2 +13,0 @@
-Cc: stable@dpdk.org
-
@@ -21 +21 @@
-index 421207c241..776fbf6f30 100644
+index 8bd8f57513..c08f6ae827 100644
@@ -24 +24 @@
-@@ -72,7 +72,7 @@ jobs:
+@@ -64,7 +64,7 @@ jobs:
@@ -33 +33 @@
-@@ -80,7 +80,7 @@ jobs:
+@@ -72,7 +72,7 @@ jobs:
@@ -35 +35 @@
-         echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
+         echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
@@ -42 +42 @@
-@@ -88,13 +88,13 @@ jobs:
+@@ -80,13 +80,13 @@ jobs:
@@ -58 +58 @@
-@@ -143,7 +143,7 @@ jobs:
+@@ -133,7 +133,7 @@ jobs:
@@ -67 +67 @@
-@@ -171,7 +171,7 @@ jobs:
+@@ -161,7 +161,7 @@ jobs:
@@ -76 +76 @@
-@@ -218,7 +218,7 @@ jobs:
+@@ -207,7 +207,7 @@ jobs:
@@ -85 +85 @@
-@@ -226,7 +226,7 @@ jobs:
+@@ -215,7 +215,7 @@ jobs:
@@ -94 +94 @@
-@@ -236,7 +236,7 @@ jobs:
+@@ -225,7 +225,7 @@ jobs:
@@ -103 +103 @@
-@@ -276,7 +276,7 @@ jobs:
+@@ -262,7 +262,7 @@ jobs:

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

* patch 'eal/x86: add AMD vendor check for TSC calibration' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (16 preceding siblings ...)
  2024-03-07  1:30 ` patch 'ci: update versions of actions in GHA' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  9:44   ` Tummala, Sivaprasad
  2024-03-07  1:30 ` patch 'event/opdl: fix compile-time check' " luca.boccassi
                   ` (82 subsequent siblings)
  100 siblings, 1 reply; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Sivaprasad Tummala; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 3c9e08f6d3f60301e5c3dad1ff4ee1731b000dda Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Wed, 22 Nov 2023 23:27:30 -0800
Subject: [PATCH] eal/x86: add AMD vendor check for TSC calibration

[ upstream commit 31d72ff4dc7c057366153e9918ac92bf9123a3bc ]

AMD Epyc processors doesn't support get_tsc_freq_arch().
The patch allows graceful return to allow fallback to
alternate TSC calibration.

Fixes: 3dbc565e81a0 ("timer: honor arch-specific TSC frequency query")

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/eal/x86/rte_cycles.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/lib/eal/x86/rte_cycles.c b/lib/eal/x86/rte_cycles.c
index 0e695caf28..2a601d7035 100644
--- a/lib/eal/x86/rte_cycles.c
+++ b/lib/eal/x86/rte_cycles.c
@@ -6,6 +6,10 @@
 #include <unistd.h>
 #include <cpuid.h>
 
+#define x86_vendor_amd(t1, t2, t3)        \
+	((t1 == 0x68747541) && /* htuA */   \
+	 (t2 == 0x444d4163) && /* DMAc */   \
+	 (t3 == 0x69746e65))   /* itne */
 
 #include "eal_private.h"
 
@@ -90,6 +94,18 @@ get_tsc_freq_arch(void)
 	uint8_t mult, model;
 	int32_t ret;
 
+#ifdef RTE_TOOLCHAIN_MSVC
+	__cpuid(cpuinfo, 0);
+	a = cpuinfo[0];
+	b = cpuinfo[1];
+	c = cpuinfo[2];
+	d = cpuinfo[3];
+#else
+	__cpuid(0, a, b, c, d);
+#endif
+	if (x86_vendor_amd(b, c, d))
+		return 0;
+
 	/*
 	 * Time Stamp Counter and Nominal Core Crystal Clock
 	 * Information Leaf
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.676799989 +0000
+++ 0019-eal-x86-add-AMD-vendor-check-for-TSC-calibration.patch	2024-03-07 01:05:34.694937810 +0000
@@ -1 +1 @@
-From 31d72ff4dc7c057366153e9918ac92bf9123a3bc Mon Sep 17 00:00:00 2001
+From 3c9e08f6d3f60301e5c3dad1ff4ee1731b000dda Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 31d72ff4dc7c057366153e9918ac92bf9123a3bc ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 69ed59b4f0..f147a5231d 100644
+index 0e695caf28..2a601d7035 100644
@@ -23 +24,2 @@
-@@ -10,6 +10,10 @@
+@@ -6,6 +6,10 @@
+ #include <unistd.h>
@@ -25 +26,0 @@
- #endif
@@ -34 +35 @@
-@@ -110,6 +114,18 @@ get_tsc_freq_arch(void)
+@@ -90,6 +94,18 @@ get_tsc_freq_arch(void)

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

* patch 'event/opdl: fix compile-time check' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (17 preceding siblings ...)
  2024-03-07  1:30 ` patch 'eal/x86: add AMD vendor check for TSC calibration' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'eal: verify strdup return' " luca.boccassi
                   ` (81 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Bruce Richardson, Tyler Retzlaff, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 0de12cad1bc1661272a25f59a8767a8c38743843 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 18 Jan 2024 08:50:57 -0800
Subject: [PATCH] event/opdl: fix compile-time check

[ upstream commit 3b342be177979eeaf020b75a2c5ec21bcdbc07ea ]

RTE_BUILD_BUG_ON() was being used with a non-constant value.
The inline function rte_is_power_of_2() is not constant since
inline expansion happens later in the compile process.
Replace it with the macro which will be constant.

Fixes: 4236ce9bf5bf ("event/opdl: add OPDL ring infrastructure library")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/event/opdl/opdl_ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/event/opdl/opdl_ring.c b/drivers/event/opdl/opdl_ring.c
index 69392b56bb..da5ea02d19 100644
--- a/drivers/event/opdl/opdl_ring.c
+++ b/drivers/event/opdl/opdl_ring.c
@@ -910,7 +910,7 @@ opdl_ring_create(const char *name, uint32_t num_slots, uint32_t slot_size,
 			RTE_CACHE_LINE_MASK) != 0);
 	RTE_BUILD_BUG_ON((offsetof(struct opdl_ring, slots) &
 			RTE_CACHE_LINE_MASK) != 0);
-	RTE_BUILD_BUG_ON(!rte_is_power_of_2(OPDL_DISCLAIMS_PER_LCORE));
+	RTE_BUILD_BUG_ON(!RTE_IS_POWER_OF_2(OPDL_DISCLAIMS_PER_LCORE));
 
 	/* Parameter checking */
 	if (name == NULL) {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.741659262 +0000
+++ 0020-event-opdl-fix-compile-time-check.patch	2024-03-07 01:05:34.694937810 +0000
@@ -1 +1 @@
-From 3b342be177979eeaf020b75a2c5ec21bcdbc07ea Mon Sep 17 00:00:00 2001
+From 0de12cad1bc1661272a25f59a8767a8c38743843 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,2 @@
+
+[ upstream commit 3b342be177979eeaf020b75a2c5ec21bcdbc07ea ]

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

* patch 'eal: verify strdup return' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (18 preceding siblings ...)
  2024-03-07  1:30 ` patch 'event/opdl: fix compile-time check' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'bus/dpaa: " luca.boccassi
                   ` (80 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 10d9146d6d3a777e510633cbd31f4c94aa7a685e Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:02 +0000
Subject: [PATCH] eal: verify strdup return

[ upstream commit 5821a384a4ca611e0f67786400b9f5b18f34a416 ]

Add verify strdup() return value logic.

Fixes: 293c53d8b23c ("eal: add telemetry callbacks")
Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 lib/eal/common/eal_common_options.c | 24 ++++++++++++++++++++++--
 lib/eal/linux/eal_dev.c             |  2 ++
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
index 43b16805da..18a50f7452 100644
--- a/lib/eal/common/eal_common_options.c
+++ b/lib/eal/common/eal_common_options.c
@@ -225,6 +225,8 @@ eal_save_args(int argc, char **argv)
 		if (strcmp(argv[i], "--") == 0)
 			break;
 		eal_args[i] = strdup(argv[i]);
+		if (eal_args[i] == NULL)
+			goto error;
 	}
 	eal_args[i++] = NULL; /* always finish with NULL */
 
@@ -234,13 +236,31 @@ eal_save_args(int argc, char **argv)
 
 	eal_app_args = calloc(argc - i + 1, sizeof(*eal_args));
 	if (eal_app_args == NULL)
-		return -1;
+		goto error;
 
-	for (j = 0; i < argc; j++, i++)
+	for (j = 0; i < argc; j++, i++) {
 		eal_app_args[j] = strdup(argv[i]);
+		if (eal_app_args[j] == NULL)
+			goto error;
+	}
 	eal_app_args[j] = NULL;
 
 	return 0;
+
+error:
+	if (eal_app_args != NULL) {
+		i = 0;
+		while (eal_app_args[i] != NULL)
+			free(eal_app_args[i++]);
+		free(eal_app_args);
+		eal_app_args = NULL;
+	}
+	i = 0;
+	while (eal_args[i] != NULL)
+		free(eal_args[i++]);
+	free(eal_args);
+	eal_args = NULL;
+	return -1;
 }
 #endif
 
diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
index ac76f6174d..c0ba98852b 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -182,6 +182,8 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
 			i += 14;
 			strlcpy(pci_slot_name, buf, sizeof(subsystem));
 			event->devname = strdup(pci_slot_name);
+			if (event->devname == NULL)
+				return -1;
 		}
 		for (; i < length; i++) {
 			if (*buf == '\0')
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.812377810 +0000
+++ 0021-eal-verify-strdup-return.patch	2024-03-07 01:05:34.702937979 +0000
@@ -1 +1 @@
-From 5821a384a4ca611e0f67786400b9f5b18f34a416 Mon Sep 17 00:00:00 2001
+From 10d9146d6d3a777e510633cbd31f4c94aa7a685e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5821a384a4ca611e0f67786400b9f5b18f34a416 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index d9748076b4..e541f07939 100644
+index 43b16805da..18a50f7452 100644
@@ -22 +23 @@
-@@ -226,6 +226,8 @@ eal_save_args(int argc, char **argv)
+@@ -225,6 +225,8 @@ eal_save_args(int argc, char **argv)
@@ -31 +32 @@
-@@ -235,13 +237,31 @@ eal_save_args(int argc, char **argv)
+@@ -234,13 +236,31 @@ eal_save_args(int argc, char **argv)
@@ -66 +67 @@
-index e678dce6c7..fff4e8fa83 100644
+index ac76f6174d..c0ba98852b 100644

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

* patch 'bus/dpaa: verify strdup return' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (19 preceding siblings ...)
  2024-03-07  1:30 ` patch 'eal: verify strdup return' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'bus/fslmc: " luca.boccassi
                   ` (79 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Sachin Saxena, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 8d6011441b8325a3768ab9f51bd42c99831f1be6 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:03 +0000
Subject: [PATCH] bus/dpaa: verify strdup return

[ upstream commit 2729fa6654b328bb4b9a0ede6d1e1019bd6caf0c ]

Add verify strdup return value logic.

Fixes: e79df833d3f6 ("bus/dpaa: support hotplug ops")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
---
 drivers/bus/dpaa/dpaa_bus.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index e57159f5d8..a67f5c9ab5 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -791,6 +791,10 @@ dpaa_bus_dev_iterate(const void *start, const char *str,
 
 	/* Now that name=device_name format is available, split */
 	dup = strdup(str);
+	if (dup == NULL) {
+		DPAA_BUS_DEBUG("Dup string (%s) failed!\n", str);
+		return NULL;
+	}
 	dev_name = dup + strlen("name=");
 
 	if (start != NULL) {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.894653381 +0000
+++ 0022-bus-dpaa-verify-strdup-return.patch	2024-03-07 01:05:34.702937979 +0000
@@ -1 +1 @@
-From 2729fa6654b328bb4b9a0ede6d1e1019bd6caf0c Mon Sep 17 00:00:00 2001
+From 8d6011441b8325a3768ab9f51bd42c99831f1be6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2729fa6654b328bb4b9a0ede6d1e1019bd6caf0c ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 46473603c8..5d4352bb3c 100644
+index e57159f5d8..a67f5c9ab5 100644
@@ -21 +22 @@
-@@ -792,6 +792,10 @@ dpaa_bus_dev_iterate(const void *start, const char *str,
+@@ -791,6 +791,10 @@ dpaa_bus_dev_iterate(const void *start, const char *str,

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

* patch 'bus/fslmc: verify strdup return' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (20 preceding siblings ...)
  2024-03-07  1:30 ` patch 'bus/dpaa: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'bus/vdev: " luca.boccassi
                   ` (78 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Sachin Saxena, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From f0becad29466ec4259d3b3a3f1f3c5d489db9e81 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:04 +0000
Subject: [PATCH] bus/fslmc: verify strdup return

[ upstream commit 180d52bc7de2395ce9f4e5a707f4d8bb52be2fe4 ]

Add verify strdup return value logic.

Fixes: e67a61614d0b ("bus/fslmc: support device iteration")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
---
 drivers/bus/fslmc/fslmc_bus.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 57bfb5111a..89f0f329c0 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -634,6 +634,10 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
 
 	/* Now that name=device_name format is available, split */
 	dup = strdup(str);
+	if (dup == NULL) {
+		DPAA2_BUS_DEBUG("Dup string (%s) failed!\n", str);
+		return NULL;
+	}
 	dev_name = dup + strlen("name=");
 
 	if (start != NULL) {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.969041857 +0000
+++ 0023-bus-fslmc-verify-strdup-return.patch	2024-03-07 01:05:34.702937979 +0000
@@ -1 +1 @@
-From 180d52bc7de2395ce9f4e5a707f4d8bb52be2fe4 Mon Sep 17 00:00:00 2001
+From f0becad29466ec4259d3b3a3f1f3c5d489db9e81 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 180d52bc7de2395ce9f4e5a707f4d8bb52be2fe4 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index b1af47ca7d..c155f4a2fd 100644
+index 57bfb5111a..89f0f329c0 100644
@@ -21 +22 @@
-@@ -635,6 +635,10 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
+@@ -634,6 +634,10 @@ fslmc_bus_dev_iterate(const void *start, const char *str,

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

* patch 'bus/vdev: verify strdup return' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (21 preceding siblings ...)
  2024-03-07  1:30 ` patch 'bus/fslmc: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'dma/idxd: " luca.boccassi
                   ` (77 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Huisong Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 915eda4e5ab1881343703289e2dde4f030e0c596 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:05 +0000
Subject: [PATCH] bus/vdev: verify strdup return

[ upstream commit 83f275fa8124daf3a6b3e56f4b40a2be4b07a3b4 ]

Add verify strdup return value logic.

Fixes: 64051bb1f144 ("devargs: unify scratch buffer storage")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
---
 drivers/bus/vdev/vdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 7974b27295..05582f1727 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -247,6 +247,10 @@ alloc_devargs(const char *name, const char *args)
 		devargs->data = strdup(args);
 	else
 		devargs->data = strdup("");
+	if (devargs->data == NULL) {
+		free(devargs);
+		return NULL;
+	}
 	devargs->args = devargs->data;
 
 	ret = strlcpy(devargs->name, name, sizeof(devargs->name));
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:37.064664535 +0000
+++ 0024-bus-vdev-verify-strdup-return.patch	2024-03-07 01:05:34.706938064 +0000
@@ -1 +1 @@
-From 83f275fa8124daf3a6b3e56f4b40a2be4b07a3b4 Mon Sep 17 00:00:00 2001
+From 915eda4e5ab1881343703289e2dde4f030e0c596 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 83f275fa8124daf3a6b3e56f4b40a2be4b07a3b4 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* patch 'dma/idxd: verify strdup return' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (22 preceding siblings ...)
  2024-03-07  1:30 ` patch 'bus/vdev: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'event/cnxk: " luca.boccassi
                   ` (76 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 705ab71cea993a3714f29190da25e61a6bf0d3ef Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:06 +0000
Subject: [PATCH] dma/idxd: verify strdup return

[ upstream commit 83cfa2cbf3f3fb78e2f2dd228109adcb38e18a5c ]

Add verify strdup return value logic.

Fixes: e888bb1278c6 ("dma/idxd: add bus device probing")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/dma/idxd/idxd_bus.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c
index 3b2d4c2b65..ba8076715d 100644
--- a/drivers/dma/idxd/idxd_bus.c
+++ b/drivers/dma/idxd/idxd_bus.c
@@ -261,9 +261,15 @@ static int
 is_for_this_process_use(struct rte_dsa_device *dev, const char *name)
 {
 	char *runtime_dir = strdup(rte_eal_get_runtime_dir());
-	char *prefix = basename(runtime_dir);
-	int prefixlen = strlen(prefix);
 	int retval = 0;
+	int prefixlen;
+	char *prefix;
+
+	if (runtime_dir == NULL)
+		return retval;
+
+	prefix = basename(runtime_dir);
+	prefixlen = strlen(prefix);
 
 	if (strncmp(name, "dpdk_", 5) == 0)
 		retval = 1;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:37.204286823 +0000
+++ 0025-dma-idxd-verify-strdup-return.patch	2024-03-07 01:05:34.706938064 +0000
@@ -1 +1 @@
-From 83cfa2cbf3f3fb78e2f2dd228109adcb38e18a5c Mon Sep 17 00:00:00 2001
+From 705ab71cea993a3714f29190da25e61a6bf0d3ef Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 83cfa2cbf3f3fb78e2f2dd228109adcb38e18a5c ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* patch 'event/cnxk: verify strdup return' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (23 preceding siblings ...)
  2024-03-07  1:30 ` patch 'dma/idxd: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'net/failsafe: fix memory leak in args parsing' " luca.boccassi
                   ` (75 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 18d9de6df8f5485390ce19cb550839e00a031530 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:07 +0000
Subject: [PATCH] event/cnxk: verify strdup return

[ upstream commit b4b3a7037b2cab4dc5d004ed0fb9ec1e5911334e ]

Add verify strdup return value logic.

Fixes: 38c2e3240ba8 ("event/cnxk: add option to control SSO HWGRP QoS")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/event/cnxk/cnxk_eventdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index d2f1708297..9bf31012df 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -500,6 +500,9 @@ parse_qos_list(const char *value, void *opaque)
 	char *end = NULL;
 	char *f = s;
 
+	if (s == NULL)
+		return;
+
 	while (*s) {
 		if (*s == '[')
 			start = s;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:37.278645117 +0000
+++ 0026-event-cnxk-verify-strdup-return.patch	2024-03-07 01:05:34.706938064 +0000
@@ -1 +1 @@
-From b4b3a7037b2cab4dc5d004ed0fb9ec1e5911334e Mon Sep 17 00:00:00 2001
+From 18d9de6df8f5485390ce19cb550839e00a031530 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b4b3a7037b2cab4dc5d004ed0fb9ec1e5911334e ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 0c61f4c20e..1ec281e735 100644
+index d2f1708297..9bf31012df 100644
@@ -20 +21 @@
-@@ -553,6 +553,9 @@ parse_list(const char *value, void *opaque, param_parse_t fn)
+@@ -500,6 +500,9 @@ parse_qos_list(const char *value, void *opaque)

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

* patch 'net/failsafe: fix memory leak in args parsing' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (24 preceding siblings ...)
  2024-03-07  1:30 ` patch 'event/cnxk: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'app/dumpcap: verify strdup return' " luca.boccassi
                   ` (74 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From ab86b4a27a277dd7d10394f787e11fd50801f139 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:08 +0000
Subject: [PATCH] net/failsafe: fix memory leak in args parsing

[ upstream commit 2ddf2d7a15deeac3585e08fd7f9ef46ad082b126 ]

Should free the memory which allocated by strdup().

Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/net/failsafe/failsafe_args.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/failsafe/failsafe_args.c b/drivers/net/failsafe/failsafe_args.c
index b203e02d9a..3b867437d7 100644
--- a/drivers/net/failsafe/failsafe_args.c
+++ b/drivers/net/failsafe/failsafe_args.c
@@ -248,7 +248,7 @@ fs_parse_device_param(struct rte_eth_dev *dev, const char *param,
 			goto free_args;
 	} else {
 		ERROR("Unrecognized device type: %.*s", (int)b, param);
-		return -EINVAL;
+		ret = -EINVAL;
 	}
 free_args:
 	free(args);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:37.353330749 +0000
+++ 0027-net-failsafe-fix-memory-leak-in-args-parsing.patch	2024-03-07 01:05:34.706938064 +0000
@@ -1 +1 @@
-From 2ddf2d7a15deeac3585e08fd7f9ef46ad082b126 Mon Sep 17 00:00:00 2001
+From ab86b4a27a277dd7d10394f787e11fd50801f139 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ddf2d7a15deeac3585e08fd7f9ef46ad082b126 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/dumpcap: verify strdup return' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (25 preceding siblings ...)
  2024-03-07  1:30 ` patch 'net/failsafe: fix memory leak in args parsing' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'app/pdump: " luca.boccassi
                   ` (73 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 8f29f8d8004b3398305a4a86a0a649d61b7bba8c Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:10 +0000
Subject: [PATCH] app/dumpcap: verify strdup return

[ upstream commit 6bb5ffe3ea9a5ad41848c19c2787df42de2a3cab ]

Add verify strdup return value logic.

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

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/dumpcap/main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 0c8e647598..0039aa1975 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -546,6 +546,11 @@ static void dpdk_init(void)
 		eal_argv[i++] = strdup(file_prefix);
 	}
 
+	for (i = 0; i < (unsigned int)eal_argc; i++) {
+		if (eal_argv[i] == NULL)
+			rte_panic("No memory\n");
+	}
+
 	if (rte_eal_init(eal_argc, eal_argv) < 0)
 		rte_exit(EXIT_FAILURE, "EAL init failed: is primary process running?\n");
 }
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:37.428643765 +0000
+++ 0028-app-dumpcap-verify-strdup-return.patch	2024-03-07 01:05:34.710938148 +0000
@@ -1 +1 @@
-From 6bb5ffe3ea9a5ad41848c19c2787df42de2a3cab Mon Sep 17 00:00:00 2001
+From 8f29f8d8004b3398305a4a86a0a649d61b7bba8c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6bb5ffe3ea9a5ad41848c19c2787df42de2a3cab ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index fc28e2d702..d57db0589a 100644
+index 0c8e647598..0039aa1975 100644
@@ -20 +21 @@
-@@ -628,6 +628,11 @@ static void dpdk_init(void)
+@@ -546,6 +546,11 @@ static void dpdk_init(void)

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

* patch 'app/pdump: verify strdup return' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (26 preceding siblings ...)
  2024-03-07  1:30 ` patch 'app/dumpcap: verify strdup return' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'app/crypto-perf: " luca.boccassi
                   ` (72 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 81314db4bd41803dcb42fa96e833b2a7aeabd4e1 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:11 +0000
Subject: [PATCH] app/pdump: verify strdup return

[ upstream commit 32e1cb918d4bbe94c5da8d0888ce29fac1f4dbb4 ]

Add verify strdup return value logic.

Fixes: caa7028276b8 ("app/pdump: add tool for packet capturing")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/pdump/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index c6cf9d9c87..9ea8ed8943 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -171,6 +171,9 @@ parse_device_id(const char *key __rte_unused, const char *value,
 	struct pdump_tuples *pt = extra_args;
 
 	pt->device_id = strdup(value);
+	if (pt->device_id == NULL)
+		return -1;
+
 	pt->dump_by_type = DEVICE_ID;
 
 	return 0;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:37.504951335 +0000
+++ 0029-app-pdump-verify-strdup-return.patch	2024-03-07 01:05:34.710938148 +0000
@@ -1 +1 @@
-From 32e1cb918d4bbe94c5da8d0888ce29fac1f4dbb4 Mon Sep 17 00:00:00 2001
+From 81314db4bd41803dcb42fa96e833b2a7aeabd4e1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 32e1cb918d4bbe94c5da8d0888ce29fac1f4dbb4 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 7a1c7bdf60..a9205e130b 100644
+index c6cf9d9c87..9ea8ed8943 100644

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

* patch 'app/crypto-perf: verify strdup return' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (27 preceding siblings ...)
  2024-03-07  1:30 ` patch 'app/pdump: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'app/testpmd: " luca.boccassi
                   ` (71 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 3baa52908651b503c472e6c59f8d52d4842594c5 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:13 +0000
Subject: [PATCH] app/crypto-perf: verify strdup return

[ upstream commit bf4728da1842bd264b2038e9f67e519ae9a0b4e3 ]

Add verify strdup return value logic.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 app/test-crypto-perf/cperf_options_parsing.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index 1f06e15d10..5c3acdabc7 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -516,6 +516,10 @@ parse_test_file(struct cperf_options *opts,
 		const char *arg)
 {
 	opts->test_file = strdup(arg);
+	if (opts->test_file == NULL) {
+		RTE_LOG(ERR, USER1, "Dup vector file failed!\n");
+		return -1;
+	}
 	if (access(opts->test_file, F_OK) != -1)
 		return 0;
 	RTE_LOG(ERR, USER1, "Test vector file doesn't exist\n");
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:37.583686898 +0000
+++ 0030-app-crypto-perf-verify-strdup-return.patch	2024-03-07 01:05:34.714938233 +0000
@@ -1 +1 @@
-From bf4728da1842bd264b2038e9f67e519ae9a0b4e3 Mon Sep 17 00:00:00 2001
+From 3baa52908651b503c472e6c59f8d52d4842594c5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bf4728da1842bd264b2038e9f67e519ae9a0b4e3 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 75afedc7fd..8909b5690d 100644
+index 1f06e15d10..5c3acdabc7 100644

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

* patch 'app/testpmd: verify strdup return' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (28 preceding siblings ...)
  2024-03-07  1:30 ` patch 'app/crypto-perf: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'test: " luca.boccassi
                   ` (70 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Ivan Malov, Huisong Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From c5b10216249ba0754f28d6b946e104dae13be2e8 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:15 +0000
Subject: [PATCH] app/testpmd: verify strdup return

[ upstream commit 365cdd7d01f70da2b10671aea05c5aaa036d3771 ]

Add verify strdup return value logic.

Fixes: 52e2e7edcf48 ("app/testpmd: add protocol-based buffer split")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Ivan Malov <ivan.malov@arknetworks.am>
Acked-by: Huisong Li <lihuisong@huawei.com>
---
 app/test-pmd/cmdline.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 3a451b9fa0..820332df50 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3454,6 +3454,8 @@ parse_hdrs_list(const char *str, const char *item_name, unsigned int max_items,
 
 	nb_item = 0;
 	char *str2 = strdup(str);
+	if (str2 == NULL)
+		return nb_item;
 	cur = strtok_r(str2, ",", &tmp);
 	while (cur != NULL) {
 		parsed_items[nb_item] = get_ptype(cur);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:37.661653770 +0000
+++ 0031-app-testpmd-verify-strdup-return.patch	2024-03-07 01:05:34.734938659 +0000
@@ -1 +1 @@
-From 365cdd7d01f70da2b10671aea05c5aaa036d3771 Mon Sep 17 00:00:00 2001
+From c5b10216249ba0754f28d6b946e104dae13be2e8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 365cdd7d01f70da2b10671aea05c5aaa036d3771 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 9369d3b4c5..d9304e4a32 100644
+index 3a451b9fa0..820332df50 100644
@@ -22 +23 @@
-@@ -3528,6 +3528,8 @@ parse_hdrs_list(const char *str, const char *item_name, unsigned int max_items,
+@@ -3454,6 +3454,8 @@ parse_hdrs_list(const char *str, const char *item_name, unsigned int max_items,

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

* patch 'test: verify strdup return' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (29 preceding siblings ...)
  2024-03-07  1:30 ` patch 'app/testpmd: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'examples/qos_sched: fix memory leak in args parsing' " luca.boccassi
                   ` (69 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Huisong Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 25bcc3c5b7fe6be881512279de2ad8d553ea8784 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:12 +0000
Subject: [PATCH] test: verify strdup return

[ upstream commit 68edcacf428994d3088afb6f5278958cc76665da ]

Add verify strdup return value logic.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
---
 app/test/process.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test/process.h b/app/test/process.h
index 1f073b9c5c..abf6855aaa 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -59,8 +59,11 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
 		return -1;
 	else if (pid == 0) {
 		/* make a copy of the arguments to be passed to exec */
-		for (i = 0; i < numargs; i++)
+		for (i = 0; i < numargs; i++) {
 			argv_cpy[i] = strdup(argv[i]);
+			if (argv_cpy[i] == NULL)
+				rte_panic("Error dup args\n");
+		}
 		argv_cpy[i] = NULL;
 		num = numargs;
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:37.751567752 +0000
+++ 0032-test-verify-strdup-return.patch	2024-03-07 01:05:34.738938743 +0000
@@ -1 +1 @@
-From 68edcacf428994d3088afb6f5278958cc76665da Mon Sep 17 00:00:00 2001
+From 25bcc3c5b7fe6be881512279de2ad8d553ea8784 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 68edcacf428994d3088afb6f5278958cc76665da ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index af7bc3e0de..c576c42349 100644
+index 1f073b9c5c..abf6855aaa 100644

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

* patch 'examples/qos_sched: fix memory leak in args parsing' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (30 preceding siblings ...)
  2024-03-07  1:30 ` patch 'test: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'examples/vhost: verify strdup return' " luca.boccassi
                   ` (68 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 7d35dff74ced59654f0a2890895f88702fd926ae Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:16 +0000
Subject: [PATCH] examples/qos_sched: fix memory leak in args parsing

[ upstream commit db8aee153e43375538667c6f861e981a47574476 ]

Should free the memory which allocated by strdup().

Fixes: 035b6a4f4bba ("examples/qos_sched: fix out-of-bounds option parsing")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 examples/qos_sched/args.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
index b2959499ae..bccbbe8207 100644
--- a/examples/qos_sched/args.c
+++ b/examples/qos_sched/args.c
@@ -141,8 +141,10 @@ app_parse_opt_vals(const char *conf_str, char separator, uint32_t n_vals, uint32
 
 	n_tokens = rte_strsplit(string, strnlen(string, 32), tokens, n_vals, separator);
 
-	if (n_tokens > MAX_OPT_VALUES)
+	if (n_tokens > MAX_OPT_VALUES) {
+		free(string);
 		return -1;
+	}
 
 	for (i = 0; i < n_tokens; i++)
 		opt_vals[i] = (uint32_t)atol(tokens[i]);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:37.832470859 +0000
+++ 0033-examples-qos_sched-fix-memory-leak-in-args-parsing.patch	2024-03-07 01:05:34.738938743 +0000
@@ -1 +1 @@
-From db8aee153e43375538667c6f861e981a47574476 Mon Sep 17 00:00:00 2001
+From 7d35dff74ced59654f0a2890895f88702fd926ae Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit db8aee153e43375538667c6f861e981a47574476 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index e97273152a..8d61d3e454 100644
+index b2959499ae..bccbbe8207 100644
@@ -20 +21 @@
-@@ -103,8 +103,10 @@ app_parse_opt_vals(const char *conf_str, char separator, uint32_t n_vals, uint32
+@@ -141,8 +141,10 @@ app_parse_opt_vals(const char *conf_str, char separator, uint32_t n_vals, uint32

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

* patch 'examples/vhost: verify strdup return' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (31 preceding siblings ...)
  2024-03-07  1:30 ` patch 'examples/qos_sched: fix memory leak in args parsing' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'pipeline: fix calloc parameters' " luca.boccassi
                   ` (67 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Huisong Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From e0cc2baf48f27c8ccc62f8b3268ee825feac3f3e Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Nov 2023 10:01:17 +0000
Subject: [PATCH] examples/vhost: verify strdup return

[ upstream commit b119863bd6643558af3ac3b39a63b6524e7545eb ]

Add verify strdup return value logic.

Fixes: 53d3f4778c1d ("vhost: integrate dmadev in asynchronous data-path")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
---
 examples/vhost/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 42e53a0f9a..31c7471236 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -259,6 +259,9 @@ open_dma(const char *value)
 	char *dma_arg[RTE_MAX_VHOST_DEVICE];
 	int args_nr;
 
+	if (input == NULL)
+		return -1;
+
 	while (isblank(*addrs))
 		addrs++;
 	if (*addrs == '\0') {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:37.905608339 +0000
+++ 0034-examples-vhost-verify-strdup-return.patch	2024-03-07 01:05:34.742938828 +0000
@@ -1 +1 @@
-From b119863bd6643558af3ac3b39a63b6524e7545eb Mon Sep 17 00:00:00 2001
+From e0cc2baf48f27c8ccc62f8b3268ee825feac3f3e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b119863bd6643558af3ac3b39a63b6524e7545eb ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index ce5c1efddf..3fc1b151d1 100644
+index 42e53a0f9a..31c7471236 100644
@@ -21 +22 @@
-@@ -260,6 +260,9 @@ open_dma(const char *value)
+@@ -259,6 +259,9 @@ open_dma(const char *value)

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

* patch 'pipeline: fix calloc parameters' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (32 preceding siblings ...)
  2024-03-07  1:30 ` patch 'examples/vhost: verify strdup return' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'eventdev: " luca.boccassi
                   ` (66 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Cristian Dumitrescu, Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From eb18df799b665566066f305efd3ddf0b2f113da2 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:53:58 +0000
Subject: [PATCH] pipeline: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 0594ae0c42773d62aff870df25e73394f7f0a5a5 ]

gcc [1] generates warning [2] about calloc usage, because calloc
parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.0 20231102 (experimental)

[2]
 Compiling C object .../pipeline_rte_swx_pipeline_spec.c.o
.../rte_swx_pipeline_spec.c: In function ‘pipeline_spec_parse’:
../lib/pipeline/rte_swx_pipeline_spec.c:2893:11:
  warning: allocation of insufficient size ‘1’ for type
           ‘struct pipeline_spec’ with size ‘144’ [-Walloc-size]
 2893 |         s = calloc(sizeof(struct pipeline_spec), 1);
      |           ^

.../rte_swx_pipeline_spec.c: In function ‘pipeline_iospec_parse’:
../lib/pipeline/rte_swx_pipeline_spec.c:4244:11:
  warning: allocation of insufficient size ‘1’ for type
           ‘struct pipeline_iospec’ with size ‘64’ [-Walloc-size]
 4244 |         s = calloc(sizeof(struct pipeline_iospec), 1);
      |           ^

Fixes: 30c4abb90942 ("pipeline: rework specification file-based pipeline build")
Fixes: 54cae37ef4ef ("pipeline: support I/O specification")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/pipeline/rte_swx_pipeline_spec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/pipeline/rte_swx_pipeline_spec.c b/lib/pipeline/rte_swx_pipeline_spec.c
index 9116f38ed2..833436b831 100644
--- a/lib/pipeline/rte_swx_pipeline_spec.c
+++ b/lib/pipeline/rte_swx_pipeline_spec.c
@@ -2841,7 +2841,7 @@ pipeline_spec_parse(FILE *spec,
 	}
 
 	/* Memory allocation. */
-	s = calloc(sizeof(struct pipeline_spec), 1);
+	s = calloc(1, sizeof(struct pipeline_spec));
 	if (!s) {
 		if (err_line)
 			*err_line = n_lines;
@@ -4145,7 +4145,7 @@ pipeline_iospec_parse(FILE *spec,
 	}
 
 	/* Memory allocation. */
-	s = calloc(sizeof(struct pipeline_iospec), 1);
+	s = calloc(1, sizeof(struct pipeline_iospec));
 	if (!s) {
 		if (err_line)
 			*err_line = n_lines;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:37.985134560 +0000
+++ 0035-pipeline-fix-calloc-parameters.patch	2024-03-07 01:05:34.746938913 +0000
@@ -1 +1 @@
-From 0594ae0c42773d62aff870df25e73394f7f0a5a5 Mon Sep 17 00:00:00 2001
+From eb18df799b665566066f305efd3ddf0b2f113da2 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 0594ae0c42773d62aff870df25e73394f7f0a5a5 ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
@@ -43 +44 @@
-index 2bba0d0524..17419e7b85 100644
+index 9116f38ed2..833436b831 100644
@@ -46 +47 @@
-@@ -2890,7 +2890,7 @@ pipeline_spec_parse(FILE *spec,
+@@ -2841,7 +2841,7 @@ pipeline_spec_parse(FILE *spec,
@@ -55 +56 @@
-@@ -4241,7 +4241,7 @@ pipeline_iospec_parse(FILE *spec,
+@@ -4145,7 +4145,7 @@ pipeline_iospec_parse(FILE *spec,

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

* patch 'eventdev: fix calloc parameters' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (33 preceding siblings ...)
  2024-03-07  1:30 ` patch 'pipeline: fix calloc parameters' " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'dmadev: " luca.boccassi
                   ` (65 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Morten Brørup, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 5b9e4068dc696ecff448acce7d6bdf766a69fe0f Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:54:01 +0000
Subject: [PATCH] eventdev: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 09fbda36e495bc6f24fbe26d0909801107bee5f7 ]

gcc [1] generates warning [2] about calloc usage, because calloc
parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.1 20240124 (experimental)

[2]
Compiling C object lib/librte_eventdev.a.p/eventdev_rte_eventdev.c.o
../lib/eventdev/rte_eventdev.c: In function ‘handle_dev_dump’:
../lib/eventdev/rte_eventdev.c:2005:29:
  warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
  argument and not in the later argument [-Wcalloc-transposed-args]
 2005 |     buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN);
      |                         ^~~~

Fixes: a3b7b476d723 ("eventdev: support telemetry dump eventdev")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
---
 lib/eventdev/rte_eventdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 941d53f6a7..4a2fe987fd 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -1834,7 +1834,7 @@ handle_dev_dump(const char *cmd __rte_unused,
 
 	RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
 
-	buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN);
+	buf = calloc(RTE_TEL_MAX_SINGLE_STRING_LEN, sizeof(char));
 	if (buf == NULL)
 		return -ENOMEM;
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:38.072947688 +0000
+++ 0036-eventdev-fix-calloc-parameters.patch	2024-03-07 01:05:34.750938997 +0000
@@ -1 +1 @@
-From 09fbda36e495bc6f24fbe26d0909801107bee5f7 Mon Sep 17 00:00:00 2001
+From 5b9e4068dc696ecff448acce7d6bdf766a69fe0f Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 09fbda36e495bc6f24fbe26d0909801107bee5f7 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index d494f8f205..ca295c87c4 100644
+index 941d53f6a7..4a2fe987fd 100644
@@ -38 +39 @@
-@@ -2005,7 +2005,7 @@ handle_dev_dump(const char *cmd __rte_unused,
+@@ -1834,7 +1834,7 @@ handle_dev_dump(const char *cmd __rte_unused,

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

* patch 'dmadev: fix calloc parameters' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (34 preceding siblings ...)
  2024-03-07  1:30 ` patch 'eventdev: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'rawdev: " luca.boccassi
                   ` (64 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Morten Brørup, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From ba907dffe514739b4c97b7c5d842b1d3f1a8aa16 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:54:02 +0000
Subject: [PATCH] dmadev: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 905f8335f916aed1f3119e35332a32119dea4510 ]

gcc [1] generates warning [2] about calloc usage, because calloc
parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.1 20240124 (experimental)

[2]
Compiling C object lib/librte_dmadev.a.p/dmadev_rte_dmadev.c.o
../lib/dmadev/rte_dmadev.c: In function ‘dmadev_handle_dev_dump’:
../lib/dmadev/rte_dmadev.c:1033:29:
  warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
  argument and not in the later argument [-Wcalloc-transposed-args]
 1033 |     buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN);
      |                         ^~~~

Fixes: 94043b04212a ("dmadev: support telemetry dump dmadev")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-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 15076f5f72..b48b915edc 100644
--- a/lib/dmadev/rte_dmadev.c
+++ b/lib/dmadev/rte_dmadev.c
@@ -1011,7 +1011,7 @@ dmadev_handle_dev_dump(const char *cmd __rte_unused,
 	if (*end_param != '\0')
 		RTE_DMA_LOG(WARNING, "Extra parameters passed to dmadev telemetry command, ignoring");
 
-	buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN);
+	buf = calloc(RTE_TEL_MAX_SINGLE_STRING_LEN, sizeof(char));
 	if (buf == NULL)
 		return -ENOMEM;
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:38.148266154 +0000
+++ 0037-dmadev-fix-calloc-parameters.patch	2024-03-07 01:05:34.750938997 +0000
@@ -1 +1 @@
-From 905f8335f916aed1f3119e35332a32119dea4510 Mon Sep 17 00:00:00 2001
+From ba907dffe514739b4c97b7c5d842b1d3f1a8aa16 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 905f8335f916aed1f3119e35332a32119dea4510 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index 25c92ef8a8..e64b279bac 100644
+index 15076f5f72..b48b915edc 100644
@@ -38 +39 @@
-@@ -1040,7 +1040,7 @@ dmadev_handle_dev_dump(const char *cmd __rte_unused,
+@@ -1011,7 +1011,7 @@ dmadev_handle_dev_dump(const char *cmd __rte_unused,

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

* patch 'rawdev: fix calloc parameters' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (35 preceding siblings ...)
  2024-03-07  1:30 ` patch 'dmadev: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'common/mlx5: " luca.boccassi
                   ` (63 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Morten Brørup, Chengwen Feng, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 477478f17966c64992bedbff1c493b803d744ec8 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:54:00 +0000
Subject: [PATCH] rawdev: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 37ff33833b6b8932bfbc8e149d386ef23ccdc54e ]

gcc [1] generates warning [2] about calloc usage, because calloc
parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.0 20240108 (experimental)

[2]
Compiling C object .../lib/librte_rawdev.a.p/rawdev_rte_rawdev.c.o
../lib/rawdev/rte_rawdev.c: In function ‘handle_dev_dump’:
../lib/rawdev/rte_rawdev.c:659:29:
  error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
  argument and not in the later argument
  [-Werror=calloc-transposed-args]
  659 |     buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN);
      |                         ^~~~

Fixes: e915d404eb72 ("rawdev: support telemetry dump rawdev")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 lib/rawdev/rte_rawdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c
index 891e79dcd7..dcebe4f653 100644
--- a/lib/rawdev/rte_rawdev.c
+++ b/lib/rawdev/rte_rawdev.c
@@ -656,7 +656,7 @@ handle_dev_dump(const char *cmd __rte_unused,
 	if (!rte_rawdev_pmd_is_valid_dev(dev_id))
 		return -EINVAL;
 
-	buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN);
+	buf = calloc(RTE_TEL_MAX_SINGLE_STRING_LEN, sizeof(char));
 	if (buf == NULL)
 		return -ENOMEM;
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:38.226169715 +0000
+++ 0038-rawdev-fix-calloc-parameters.patch	2024-03-07 01:05:34.754939082 +0000
@@ -1 +1 @@
-From 37ff33833b6b8932bfbc8e149d386ef23ccdc54e Mon Sep 17 00:00:00 2001
+From 477478f17966c64992bedbff1c493b803d744ec8 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 37ff33833b6b8932bfbc8e149d386ef23ccdc54e ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -37 +38 @@
-index 474bdc9540..4f8897b639 100644
+index 891e79dcd7..dcebe4f653 100644

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

* patch 'common/mlx5: fix calloc parameters' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (36 preceding siblings ...)
  2024-03-07  1:30 ` patch 'rawdev: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'net/bnx2x: " luca.boccassi
                   ` (62 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Morten Brørup, Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 3dba8ba7977ddfb009263d300cf04c016c81231b Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:54:03 +0000
Subject: [PATCH] common/mlx5: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit f805f70bc5511cd98a34fa2f8f7bd7a3e4cd8aa3 ]

gcc [1] generates warning [2] about calloc usage, because calloc
parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.1 20240124 (experimental)

[2]
Compiling C object .../common_mlx5_mlx5_common_mr.c.o
.../mlx5/mlx5_common_mr.c: In function ‘mlx5_mempool_get_chunks’:
.../common/mlx5/mlx5_common_mr.c:1384:29:
  warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
  argument and not in the later argument [-Wcalloc-transposed-args]
 1384 |         *out = calloc(sizeof(**out), n);
      |                             ^

Fixes: 7297d2cdecce ("common/mlx5: fix external memory pool registration")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/common/mlx5/mlx5_common_mr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/mlx5/mlx5_common_mr.c b/drivers/common/mlx5/mlx5_common_mr.c
index 0e1d2434ab..1fdd8b4c80 100644
--- a/drivers/common/mlx5/mlx5_common_mr.c
+++ b/drivers/common/mlx5/mlx5_common_mr.c
@@ -1381,7 +1381,7 @@ mlx5_mempool_get_chunks(struct rte_mempool *mp, struct mlx5_range **out,
 
 	DRV_LOG(DEBUG, "Collecting chunks of regular mempool %s", mp->name);
 	n = mp->nb_mem_chunks;
-	*out = calloc(sizeof(**out), n);
+	*out = calloc(n, sizeof(**out));
 	if (*out == NULL)
 		return -1;
 	rte_mempool_mem_iter(mp, mlx5_range_from_mempool_chunk, *out);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:38.302831799 +0000
+++ 0039-common-mlx5-fix-calloc-parameters.patch	2024-03-07 01:05:34.754939082 +0000
@@ -1 +1 @@
-From f805f70bc5511cd98a34fa2f8f7bd7a3e4cd8aa3 Mon Sep 17 00:00:00 2001
+From 3dba8ba7977ddfb009263d300cf04c016c81231b Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit f805f70bc5511cd98a34fa2f8f7bd7a3e4cd8aa3 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index 40ff9153bd..85ec10d2ee 100644
+index 0e1d2434ab..1fdd8b4c80 100644

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

* patch 'net/bnx2x: fix calloc parameters' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (37 preceding siblings ...)
  2024-03-07  1:30 ` patch 'common/mlx5: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'net/nfp: " luca.boccassi
                   ` (61 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 5cad6d42606102b4ce81d7df133482ed75d5bffc Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:54:04 +0000
Subject: [PATCH] net/bnx2x: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit ff0d80191617d3b4435e0f473b129cdc539c23f5 ]

gcc [1] generates warning [2] about rte_calloc usage, because
rte_calloc parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.1 20240124 (experimental)

[2]
Compiling C object drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_bnx2x.c.o
../drivers/net/bnx2x/bnx2x.c: In function ‘bnx2x_alloc_ilt_lines_mem’:
../drivers/net/bnx2x/bnx2x.c:2392:44:
 warning: ‘rte_calloc’ sizes specified with ‘sizeof’ in the earlier
 argument and not in the later argument [-Wcalloc-transposed-args]
 2392 |                     sizeof(struct ilt_line), ILT_MAX_LINES,
      |                            ^~~~~~

Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 drivers/net/bnx2x/bnx2x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 74e3018eab..55a91fad78 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -2389,7 +2389,7 @@ int bnx2x_alloc_ilt_mem(struct bnx2x_softc *sc)
 static int bnx2x_alloc_ilt_lines_mem(struct bnx2x_softc *sc)
 {
 	sc->ilt->lines = rte_calloc("",
-				    sizeof(struct ilt_line), ILT_MAX_LINES,
+				    ILT_MAX_LINES, sizeof(struct ilt_line),
 				    RTE_CACHE_LINE_SIZE);
 	return sc->ilt->lines == NULL;
 }
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:38.384025109 +0000
+++ 0040-net-bnx2x-fix-calloc-parameters.patch	2024-03-07 01:05:34.774939507 +0000
@@ -1 +1 @@
-From ff0d80191617d3b4435e0f473b129cdc539c23f5 Mon Sep 17 00:00:00 2001
+From 5cad6d42606102b4ce81d7df133482ed75d5bffc Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit ff0d80191617d3b4435e0f473b129cdc539c23f5 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index c3283c94f3..597ee43359 100644
+index 74e3018eab..55a91fad78 100644

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

* patch 'net/nfp: fix calloc parameters' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (38 preceding siblings ...)
  2024-03-07  1:30 ` patch 'net/bnx2x: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:30 ` patch 'build: fix linker warnings about undefined symbols' " luca.boccassi
                   ` (60 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Chaoyong He, Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 0b4a4ace22483bdaacf33a3903a860357811d531 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Wed, 24 Jan 2024 18:53:59 +0000
Subject: [PATCH] net/nfp: fix calloc parameters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 0352f47a3bf923574afe17e822af58bedc7ead49 ]

gcc [1] generates warning [2] about calloc usage, because calloc
parameter order is wrong, fixing it by replacing parameters.

[1]
gcc (GCC) 14.0.0 20231102 (experimental)

[2]
Compiling C object .../net_nfp_nfpcore_nfp_mutex.c.o
.../net/nfp/nfpcore/nfp_mutex.c: In function ‘nfp_cpp_mutex_alloc’:
../drivers/net/nfp/nfpcore/nfp_mutex.c:171:15:
  warning: allocation of insufficient size ‘1’ for type
           ‘struct nfp_cpp_mutex’ with size ‘48’ [-Walloc-size]
  171 |         mutex = calloc(sizeof(*mutex), 1);
      |               ^

Fixes: c7e9729da6b5 ("net/nfp: support CPP")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Chaoyong He <chaoyong.he@corigine.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 drivers/net/nfp/nfpcore/nfp_mutex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfpcore/nfp_mutex.c b/drivers/net/nfp/nfpcore/nfp_mutex.c
index 318c5800d7..b9de16e889 100644
--- a/drivers/net/nfp/nfpcore/nfp_mutex.c
+++ b/drivers/net/nfp/nfpcore/nfp_mutex.c
@@ -151,7 +151,7 @@ nfp_cpp_mutex_alloc(struct nfp_cpp *cpp, int target,
 	if (tmp != key)
 		return NFP_ERRPTR(EEXIST);
 
-	mutex = calloc(sizeof(*mutex), 1);
+	mutex = calloc(1, sizeof(*mutex));
 	if (!mutex)
 		return NFP_ERRPTR(ENOMEM);
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:38.477547912 +0000
+++ 0041-net-nfp-fix-calloc-parameters.patch	2024-03-07 01:05:34.774939507 +0000
@@ -1 +1 @@
-From 0352f47a3bf923574afe17e822af58bedc7ead49 Mon Sep 17 00:00:00 2001
+From 0b4a4ace22483bdaacf33a3903a860357811d531 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 0352f47a3bf923574afe17e822af58bedc7ead49 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index 3c10c7a090..edb78dfdc9 100644
+index 318c5800d7..b9de16e889 100644
@@ -38 +39 @@
-@@ -168,7 +168,7 @@ nfp_cpp_mutex_alloc(struct nfp_cpp *cpp,
+@@ -151,7 +151,7 @@ nfp_cpp_mutex_alloc(struct nfp_cpp *cpp, int target,
@@ -40 +41 @@
- 		return NULL;
+ 		return NFP_ERRPTR(EEXIST);
@@ -44,2 +45,2 @@
- 	if (mutex == NULL)
- 		return NULL;
+ 	if (!mutex)
+ 		return NFP_ERRPTR(ENOMEM);

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

* patch 'build: fix linker warnings about undefined symbols' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (39 preceding siblings ...)
  2024-03-07  1:30 ` patch 'net/nfp: " luca.boccassi
@ 2024-03-07  1:30 ` luca.boccassi
  2024-03-07  1:31 ` patch 'build: link static libs with whole-archive in subproject' " luca.boccassi
                   ` (59 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:30 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 00a4d8525cb1f28e6472d3f204ec136dada09e4b Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 10 Jan 2024 15:01:03 +0000
Subject: [PATCH] build: fix linker warnings about undefined symbols

[ upstream commit 51c9428dca9fad10bd60ca668ffdf78e4a801e2f ]

The default behaviour of "ld.lld" has changed, so it now prints out
warnings about entries in the version.map file which don't exist in
the current build. Since we use our version.map file simply to filter
out the functions we don't want made public, we include in it all
functions across all OS's and builds that we want public if present.
This causes these ld warnings to be emitted, e.g. on BSD, which is
missing functionality found on Linux. For example:

* hpet functions in EAL
* regexdev enqueue and dequeue burst
* eventdev event_timer functions

Easiest solution, without major rework of how we use our version.map
files, and without dynamically generating them per-build, is to pass
the --undefined-version flag to the linker, to restore the old
behaviour.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/config/meson.build b/config/meson.build
index 5f6320ab19..a5445d5fc4 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -146,6 +146,9 @@ dpdk_conf.set('RTE_ARCH_32', cc.sizeof('void *') == 4)
 
 if not is_windows
     add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
+    if cc.has_link_argument('-Wl,--undefined-version')
+        add_project_link_arguments('-Wl,--undefined-version', language: 'c')
+    endif
 endif
 
 # use pthreads if available for the platform
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:38.551707622 +0000
+++ 0042-build-fix-linker-warnings-about-undefined-symbols.patch	2024-03-07 01:05:34.774939507 +0000
@@ -1 +1 @@
-From 51c9428dca9fad10bd60ca668ffdf78e4a801e2f Mon Sep 17 00:00:00 2001
+From 00a4d8525cb1f28e6472d3f204ec136dada09e4b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 51c9428dca9fad10bd60ca668ffdf78e4a801e2f ]
+
@@ -23,2 +24,0 @@
-Cc: stable@dpdk.org
-
@@ -31 +31 @@
-index a9ccd56deb..65662c5de3 100644
+index 5f6320ab19..a5445d5fc4 100644
@@ -34 +34 @@
-@@ -188,6 +188,9 @@ dpdk_conf.set('RTE_ARCH_32', cc.sizeof('void *') == 4)
+@@ -146,6 +146,9 @@ dpdk_conf.set('RTE_ARCH_32', cc.sizeof('void *') == 4)

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

* patch 'build: link static libs with whole-archive in subproject' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (40 preceding siblings ...)
  2024-03-07  1:30 ` patch 'build: fix linker warnings about undefined symbols' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net: fix TCP/UDP checksum with padding data' " luca.boccassi
                   ` (58 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Robin Jarry; +Cc: David Marchand, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 0ceab70d2cd1c9c67b01825ae360a2a5bcb8ddf4 Mon Sep 17 00:00:00 2001
From: Robin Jarry <rjarry@redhat.com>
Date: Mon, 29 Jan 2024 13:47:17 +0100
Subject: [PATCH] build: link static libs with whole-archive in subproject

[ upstream commit cafb10b3e4a73750c26b3d5e00df48caa93a997b ]

When DPDK is used as a subproject, declare static libs to be linked with
-Wl,--whole-archive along with the drivers. This is already done this
way in pkg-config.

Fixes: f93a605f2d6e ("build: add definitions for use as Meson subproject")

Signed-off-by: Robin Jarry <rjarry@redhat.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 buildtools/subproject/meson.build | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/buildtools/subproject/meson.build b/buildtools/subproject/meson.build
index 3192efaa40..322e01c029 100644
--- a/buildtools/subproject/meson.build
+++ b/buildtools/subproject/meson.build
@@ -8,8 +8,7 @@ if get_option('default_library') == 'static'
             dependencies: dpdk_static_lib_deps,
             # static library deps in DPDK build don't include "link_with" parameters,
             # so explicitly link-in both libs and drivers
-            link_with: dpdk_static_libraries,
-            link_whole: dpdk_drivers,
+            link_whole: dpdk_static_libraries + dpdk_drivers,
             link_args: dpdk_extra_ldflags)
 else
     dpdk_dep = declare_dependency(
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:38.634789053 +0000
+++ 0043-build-link-static-libs-with-whole-archive-in-subproj.patch	2024-03-07 01:05:34.774939507 +0000
@@ -1 +1 @@
-From cafb10b3e4a73750c26b3d5e00df48caa93a997b Mon Sep 17 00:00:00 2001
+From 0ceab70d2cd1c9c67b01825ae360a2a5bcb8ddf4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cafb10b3e4a73750c26b3d5e00df48caa93a997b ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'net: fix TCP/UDP checksum with padding data' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (41 preceding siblings ...)
  2024-03-07  1:31 ` patch 'build: link static libs with whole-archive in subproject' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/virtio: remove duplicate queue xstats' " luca.boccassi
                   ` (57 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 3dab00d897a3d411f13ea6a2838259121a2501fd Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Thu, 14 Dec 2023 17:22:59 +0800
Subject: [PATCH] net: fix TCP/UDP checksum with padding data
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit e55ea3d5d970dfff2989e4a1c65b76d02512bce0 ]

IEEE 802 packets may have a minimum size limit. The data fields
should be padded when necessary. In some cases, the padding data
is not zero.

In 'rte_ipv4_udptcp_cksum_mbuf()', as payload length
"mbuf->pkt_len - l4_off" is used, which includes padding and if
padding is not zero it will end up producing wrong checksum.

This patch will use IP header to get the payload size to calculate
TCP/UDP checksum.

Fixes: d178f693bbfe ("net: add UDP/TCP checksum in mbuf segments")

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/net/rte_ip.h | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h
index 0cafb980ef..8da23660c6 100644
--- a/lib/net/rte_ip.h
+++ b/lib/net/rte_ip.h
@@ -420,11 +420,14 @@ __rte_ipv4_udptcp_cksum_mbuf(const struct rte_mbuf *m,
 {
 	uint16_t raw_cksum;
 	uint32_t cksum;
+	uint16_t len;
 
-	if (l4_off > m->pkt_len)
-		return 0;
+	if (unlikely(l4_off > m->pkt_len))
+		return 0; /* invalid params, return a dummy value */
 
-	if (rte_raw_cksum_mbuf(m, l4_off, m->pkt_len - l4_off, &raw_cksum))
+	len = rte_be_to_cpu_16(ipv4_hdr->total_length) - (uint16_t)rte_ipv4_hdr_len(ipv4_hdr);
+
+	if (rte_raw_cksum_mbuf(m, l4_off, len, &raw_cksum))
 		return 0;
 
 	cksum = raw_cksum + rte_ipv4_phdr_cksum(ipv4_hdr, 0);
@@ -650,10 +653,10 @@ __rte_ipv6_udptcp_cksum_mbuf(const struct rte_mbuf *m,
 	uint16_t raw_cksum;
 	uint32_t cksum;
 
-	if (l4_off > m->pkt_len)
-		return 0;
+	if (unlikely(l4_off > m->pkt_len))
+		return 0; /* invalid params, return a dummy value */
 
-	if (rte_raw_cksum_mbuf(m, l4_off, m->pkt_len - l4_off, &raw_cksum))
+	if (rte_raw_cksum_mbuf(m, l4_off, rte_be_to_cpu_16(ipv6_hdr->payload_len), &raw_cksum))
 		return 0;
 
 	cksum = raw_cksum + rte_ipv6_phdr_cksum(ipv6_hdr, 0);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:38.713364961 +0000
+++ 0044-net-fix-TCP-UDP-checksum-with-padding-data.patch	2024-03-07 01:05:34.778939592 +0000
@@ -1 +1 @@
-From e55ea3d5d970dfff2989e4a1c65b76d02512bce0 Mon Sep 17 00:00:00 2001
+From 3dab00d897a3d411f13ea6a2838259121a2501fd Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit e55ea3d5d970dfff2989e4a1c65b76d02512bce0 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 6fa98a5a0f..0d103d4127 100644
+index 0cafb980ef..8da23660c6 100644
@@ -33 +34 @@
-@@ -419,11 +419,14 @@ __rte_ipv4_udptcp_cksum_mbuf(const struct rte_mbuf *m,
+@@ -420,11 +420,14 @@ __rte_ipv4_udptcp_cksum_mbuf(const struct rte_mbuf *m,
@@ -51 +52 @@
-@@ -663,10 +666,10 @@ __rte_ipv6_udptcp_cksum_mbuf(const struct rte_mbuf *m,
+@@ -650,10 +653,10 @@ __rte_ipv6_udptcp_cksum_mbuf(const struct rte_mbuf *m,

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

* patch 'net/virtio: remove duplicate queue xstats' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (42 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net: fix TCP/UDP checksum with padding data' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'vhost: fix deadlock during vDPA SW live migration' " luca.boccassi
                   ` (56 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Edwin Brossette; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 453678fc16c2ad282dad6b54a8034715a1221086 Mon Sep 17 00:00:00 2001
From: Edwin Brossette <edwin.brossette@6wind.com>
Date: Fri, 24 Nov 2023 14:52:36 +0100
Subject: [PATCH] net/virtio: remove duplicate queue xstats

[ upstream commit 4b0a1fdb745c39003d70c75696d6730eba5636a5 ]

The flag RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS was temporarily set while
moving queue stats from 'struct rte_eth_stats' to the individual PMDs,
as explained in commit
f30e69b41f94 ("ethdev: add device flag to bypass auto-filled queue xstats").

This flag was added so every pmd would keep its original behavior until
the change was implemented. However, this flag was not removed
afterwards in the virtio PMD and as a result, some queue stats are
displayed twice when trying to get them: once in lib_rte_ethdev, and a
second time in the virtio PMD.

Remove this flag so stats are printed only once.

Fixes: f30e69b41f94 ("ethdev: add device flag to bypass auto-filled queue xstats")

Signed-off-by: Edwin Brossette <edwin.brossette@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/virtio/virtio_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 5e9ed47551..073bbf482d 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2237,8 +2237,6 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 	else
 		eth_dev->data->dev_flags &= ~RTE_ETH_DEV_INTR_LSC;
 
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
-
 	/* Setting up rx_header size for the device */
 	if (virtio_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF) ||
 	    virtio_with_feature(hw, VIRTIO_F_VERSION_1) ||
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:38.790571866 +0000
+++ 0045-net-virtio-remove-duplicate-queue-xstats.patch	2024-03-07 01:05:34.782939677 +0000
@@ -1 +1 @@
-From 4b0a1fdb745c39003d70c75696d6730eba5636a5 Mon Sep 17 00:00:00 2001
+From 453678fc16c2ad282dad6b54a8034715a1221086 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4b0a1fdb745c39003d70c75696d6730eba5636a5 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index c2c0a1a111..517585740e 100644
+index 5e9ed47551..073bbf482d 100644
@@ -32 +33 @@
-@@ -1793,8 +1793,6 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
+@@ -2237,8 +2237,6 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)

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

* patch 'vhost: fix deadlock during vDPA SW live migration' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (43 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/virtio: remove duplicate queue xstats' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'vdpa/mlx5: fix queue enable drain CQ' " luca.boccassi
                   ` (55 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Hao Chen; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 9b6bdd022bf51267805e5e252545979387be3f4d Mon Sep 17 00:00:00 2001
From: Hao Chen <chenh@yusur.tech>
Date: Mon, 22 Jan 2024 11:27:44 +0800
Subject: [PATCH] vhost: fix deadlock during vDPA SW live migration

[ upstream commit 19639c3b693bcfdc941c56d9d5bd60f65a8eeecb ]

In a nested virtualization environment, running dpdk-vdpa
in QEMU-L1 for software live migration will result in a
deadlock between dpdk-vdpa and QEMU-L2 processes.
'rte_vdpa_relay_vring_used'->
'__vhost_iova_to_vva'->
'vhost_user_iotlb_rd_unlock(vq)'->
'vhost_user_iotlb_miss'-> send vhost message
'VHOST_USER_SLAVE_IOTLB_MSG' to QEMU-L2's vdpa socket, then
call 'vhost_user_iotlb_rd_lock(vq)' to hold the read lock
`iotlb_lock`.

But there is no place to release this read lock.

QEMU-L2 get the 'VHOST_USER_SLAVE_IOTLB_MSG', then call
'vhost_user_send_device_iotlb_msg' to send
'VHOST_USER_IOTLB_MSG' messages to dpdk-vdpa.

dpdk-vdpa will call vhost_user_iotlb_cache_insert and will
obtain the write lock `iotlb_lock`, but the read lock
`iotlb_lock` has not been released and will block here.

This patch add lock and unlock function to fix the deadlock.

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

Signed-off-by: Hao Chen <chenh@yusur.tech>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/vdpa.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/vhost/vdpa.c b/lib/vhost/vdpa.c
index 577cb00a43..cf51ca957a 100644
--- a/lib/vhost/vdpa.c
+++ b/lib/vhost/vdpa.c
@@ -19,6 +19,7 @@
 #include "rte_vdpa.h"
 #include "vdpa_driver.h"
 #include "vhost.h"
+#include "iotlb.h"
 
 /** Double linked list of vDPA devices. */
 TAILQ_HEAD(vdpa_device_list, rte_vdpa_device);
@@ -191,17 +192,21 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
 			if (unlikely(nr_descs > vq->size))
 				return -1;
 
+			vhost_user_iotlb_rd_lock(vq);
 			desc_ring = (struct vring_desc *)(uintptr_t)
 				vhost_iova_to_vva(dev, vq,
 						vq->desc[desc_id].addr, &dlen,
 						VHOST_ACCESS_RO);
+			vhost_user_iotlb_rd_unlock(vq);
 			if (unlikely(!desc_ring))
 				return -1;
 
 			if (unlikely(dlen < vq->desc[desc_id].len)) {
+				vhost_user_iotlb_rd_lock(vq);
 				idesc = vhost_alloc_copy_ind_table(dev, vq,
 						vq->desc[desc_id].addr,
 						vq->desc[desc_id].len);
+				vhost_user_iotlb_rd_unlock(vq);
 				if (unlikely(!idesc))
 					return -1;
 
@@ -218,9 +223,12 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
 			if (unlikely(nr_descs-- == 0))
 				goto fail;
 			desc = desc_ring[desc_id];
-			if (desc.flags & VRING_DESC_F_WRITE)
+			if (desc.flags & VRING_DESC_F_WRITE) {
+				vhost_user_iotlb_rd_lock(vq);
 				vhost_log_write_iova(dev, vq, desc.addr,
 						     desc.len);
+				vhost_user_iotlb_rd_unlock(vq);
+			}
 			desc_id = desc.next;
 		} while (desc.flags & VRING_DESC_F_NEXT);
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:38.869547086 +0000
+++ 0046-vhost-fix-deadlock-during-vDPA-SW-live-migration.patch	2024-03-07 01:05:34.786939762 +0000
@@ -1 +1 @@
-From 19639c3b693bcfdc941c56d9d5bd60f65a8eeecb Mon Sep 17 00:00:00 2001
+From 9b6bdd022bf51267805e5e252545979387be3f4d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 19639c3b693bcfdc941c56d9d5bd60f65a8eeecb ]
+
@@ -30 +31,0 @@
-Cc: stable@dpdk.org
@@ -35,2 +36,2 @@
- lib/vhost/vdpa.c | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
+ lib/vhost/vdpa.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
@@ -39 +40 @@
-index 9776fc07a9..a1dd5a753b 100644
+index 577cb00a43..cf51ca957a 100644
@@ -50,9 +51 @@
-@@ -147,7 +148,6 @@ rte_vdpa_unregister_device(struct rte_vdpa_device *dev)
- 
- int
- rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
--	__rte_no_thread_safety_analysis /* FIXME: requires iotlb_lock? */
- {
- 	struct virtio_net *dev = get_device(vid);
- 	uint16_t idx, idx_m, desc_id;
-@@ -193,17 +193,21 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
+@@ -191,17 +192,21 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
@@ -80 +73 @@
-@@ -220,9 +224,12 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
+@@ -218,9 +223,12 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)

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

* patch 'vdpa/mlx5: fix queue enable drain CQ' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (44 preceding siblings ...)
  2024-03-07  1:31 ` patch 'vhost: fix deadlock during vDPA SW live migration' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'vhost: fix memory leak in Virtio Tx split path' " luca.boccassi
                   ` (54 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Yajun Wu; +Cc: Matan Azrad, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 49dfcc6ae2ae7fe2e79edd686be6664281d1d677 Mon Sep 17 00:00:00 2001
From: Yajun Wu <yajunw@nvidia.com>
Date: Thu, 25 Jan 2024 11:17:55 +0800
Subject: [PATCH] vdpa/mlx5: fix queue enable drain CQ

[ upstream commit 32fbcf3139fbff04651b3fe173e9f3457f105221 ]

For the case: `ethtool -L eth0 combined xxx` in VM, VQ will disable
and enable without calling device close. In such case, need add
drain CQ before reuse/reset event QP.

Fixes: 24969c7b6224 ("vdpa/mlx5: reuse event queues")

Signed-off-by: Yajun Wu <yajunw@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_event.c | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
index 4d819763d8..b14174e02d 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
@@ -244,22 +244,30 @@ mlx5_vdpa_queues_complete(struct mlx5_vdpa_priv *priv)
 	return max;
 }
 
+static void
+mlx5_vdpa_drain_cq_one(struct mlx5_vdpa_priv *priv,
+	struct mlx5_vdpa_virtq *virtq)
+{
+	struct mlx5_vdpa_cq *cq = &virtq->eqp.cq;
+
+	mlx5_vdpa_queue_complete(cq);
+	if (cq->cq_obj.cq) {
+		cq->cq_obj.cqes[0].wqe_counter = rte_cpu_to_be_16(UINT16_MAX);
+		virtq->eqp.qp_pi = 0;
+		if (!cq->armed)
+			mlx5_vdpa_cq_arm(priv, cq);
+	}
+}
+
 void
 mlx5_vdpa_drain_cq(struct mlx5_vdpa_priv *priv)
 {
+	struct mlx5_vdpa_virtq *virtq;
 	unsigned int i;
 
 	for (i = 0; i < priv->caps.max_num_virtio_queues; i++) {
-		struct mlx5_vdpa_cq *cq = &priv->virtqs[i].eqp.cq;
-
-		mlx5_vdpa_queue_complete(cq);
-		if (cq->cq_obj.cq) {
-			cq->cq_obj.cqes[0].wqe_counter =
-				rte_cpu_to_be_16(UINT16_MAX);
-			priv->virtqs[i].eqp.qp_pi = 0;
-			if (!cq->armed)
-				mlx5_vdpa_cq_arm(priv, cq);
-		}
+		virtq = &priv->virtqs[i];
+		mlx5_vdpa_drain_cq_one(priv, virtq);
 	}
 }
 
@@ -658,6 +666,7 @@ mlx5_vdpa_event_qp_prepare(struct mlx5_vdpa_priv *priv, uint16_t desc_n,
 	if (eqp->cq.cq_obj.cq != NULL && log_desc_n == eqp->cq.log_desc_n) {
 		/* Reuse existing resources. */
 		eqp->cq.callfd = callfd;
+		mlx5_vdpa_drain_cq_one(priv, virtq);
 		/* FW will set event qp to error state in q destroy. */
 		if (reset && !mlx5_vdpa_qps2rst2rts(eqp))
 			rte_write32(rte_cpu_to_be_32(RTE_BIT32(log_desc_n)),
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:38.944703182 +0000
+++ 0047-vdpa-mlx5-fix-queue-enable-drain-CQ.patch	2024-03-07 01:05:34.786939762 +0000
@@ -1 +1 @@
-From 32fbcf3139fbff04651b3fe173e9f3457f105221 Mon Sep 17 00:00:00 2001
+From 49dfcc6ae2ae7fe2e79edd686be6664281d1d677 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 32fbcf3139fbff04651b3fe173e9f3457f105221 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 9557c1042e..32430614d5 100644
+index 4d819763d8..b14174e02d 100644
@@ -65 +66 @@
-@@ -632,6 +640,7 @@ mlx5_vdpa_event_qp_prepare(struct mlx5_vdpa_priv *priv, uint16_t desc_n,
+@@ -658,6 +666,7 @@ mlx5_vdpa_event_qp_prepare(struct mlx5_vdpa_priv *priv, uint16_t desc_n,

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

* patch 'vhost: fix memory leak in Virtio Tx split path' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (45 preceding siblings ...)
  2024-03-07  1:31 ` patch 'vdpa/mlx5: fix queue enable drain CQ' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'cryptodev: remove unused extern variable' " luca.boccassi
                   ` (53 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 86389c2bd716fa26a08e279f4de4dd940f08a63e Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 31 Jan 2024 20:53:08 +0100
Subject: [PATCH] vhost: fix memory leak in Virtio Tx split path

[ upstream commit 7746fba831509fdb4c528266d0b38a89566e01e5 ]

When vIOMMU is enabled, rte_vhost_dequeue_burst() can return early
because of IOTLB misses.
Such IOTLB misses are especially frequent when a Virtio device is
bound to a kernel driver in guest.

This patch fixes a mbuf leak occurring in this case.

Fixes: 242695f6122a ("vhost: allocate and free packets in bulk in Tx split")

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

diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index 26f184f8b2..3061275753 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -2862,7 +2862,6 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 {
 	uint16_t i;
 	uint16_t avail_entries;
-	uint16_t dropped = 0;
 	static bool allocerr_warned;
 
 	/*
@@ -2901,11 +2900,8 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 
 		update_shadow_used_ring_split(vq, head_idx, 0);
 
-		if (unlikely(buf_len <= dev->vhost_hlen)) {
-			dropped += 1;
-			i++;
+		if (unlikely(buf_len <= dev->vhost_hlen))
 			break;
-		}
 
 		buf_len -= dev->vhost_hlen;
 
@@ -2922,8 +2918,6 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 					buf_len, mbuf_pool->name);
 				allocerr_warned = true;
 			}
-			dropped += 1;
-			i++;
 			break;
 		}
 
@@ -2934,27 +2928,21 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 				VHOST_LOG_DATA(dev->ifname, ERR, "failed to copy desc to mbuf.\n");
 				allocerr_warned = true;
 			}
-			dropped += 1;
-			i++;
 			break;
 		}
-
 	}
 
-	if (dropped)
-		rte_pktmbuf_free_bulk(&pkts[i - 1], count - i + 1);
+	if (unlikely(count != i))
+		rte_pktmbuf_free_bulk(&pkts[i], count - i);
 
-	vq->last_avail_idx += i;
-
-	do_data_copy_dequeue(vq);
-	if (unlikely(i < count))
-		vq->shadow_used_idx = i;
 	if (likely(vq->shadow_used_idx)) {
+		vq->last_avail_idx += vq->shadow_used_idx;
+		do_data_copy_dequeue(vq);
 		flush_shadow_used_ring_split(dev, vq);
 		vhost_vring_call_split(dev, vq);
 	}
 
-	return (i - dropped);
+	return i;
 }
 
 __rte_noinline
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:39.020793922 +0000
+++ 0048-vhost-fix-memory-leak-in-Virtio-Tx-split-path.patch	2024-03-07 01:05:34.790939846 +0000
@@ -1 +1 @@
-From 7746fba831509fdb4c528266d0b38a89566e01e5 Mon Sep 17 00:00:00 2001
+From 86389c2bd716fa26a08e279f4de4dd940f08a63e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7746fba831509fdb4c528266d0b38a89566e01e5 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index c738b7edc9..9951842b9f 100644
+index 26f184f8b2..3061275753 100644
@@ -27 +28 @@
-@@ -3104,7 +3104,6 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -2862,7 +2862,6 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -35 +36 @@
-@@ -3143,11 +3142,8 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -2901,11 +2900,8 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -48 +49 @@
-@@ -3164,8 +3160,6 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -2922,8 +2918,6 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -57,2 +58,2 @@
-@@ -3176,27 +3170,21 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
- 				VHOST_DATA_LOG(dev->ifname, ERR, "failed to copy desc to mbuf.");
+@@ -2934,27 +2928,21 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+ 				VHOST_LOG_DATA(dev->ifname, ERR, "failed to copy desc to mbuf.\n");

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

* patch 'cryptodev: remove unused extern variable' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (46 preceding siblings ...)
  2024-03-07  1:31 ` patch 'vhost: fix memory leak in Virtio Tx split path' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'examples/ipsec-secgw: fix width of variables' " luca.boccassi
                   ` (52 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From fac0d1f05773689bdffea5f914f613096d4fb11d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 12 Dec 2023 08:31:04 -0800
Subject: [PATCH] cryptodev: remove unused extern variable

[ upstream commit b6f30094e511c22f038907a507d16f7cc022c682 ]

The variable rte_cyptodev_names is unused and misspelled.

Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op oriented")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 lib/cryptodev/rte_cryptodev.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 0c9464649a..f955d96e23 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -26,8 +26,6 @@ extern "C" {
 
 #include "rte_cryptodev_trace_fp.h"
 
-extern const char **rte_cyptodev_names;
-
 /* Logging Macros */
 
 #define CDEV_LOG_ERR(...) \
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:39.101279677 +0000
+++ 0049-cryptodev-remove-unused-extern-variable.patch	2024-03-07 01:05:34.794939931 +0000
@@ -1 +1 @@
-From b6f30094e511c22f038907a507d16f7cc022c682 Mon Sep 17 00:00:00 2001
+From fac0d1f05773689bdffea5f914f613096d4fb11d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b6f30094e511c22f038907a507d16f7cc022c682 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 359b6c2b29..f6ab0e5bbb 100644
+index 0c9464649a..f955d96e23 100644
@@ -27,3 +28,3 @@
- /**
-  * @internal Logtype used for cryptodev related messages.
-  */
+ /* Logging Macros */
+ 
+ #define CDEV_LOG_ERR(...) \

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

* patch 'examples/ipsec-secgw: fix width of variables' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (47 preceding siblings ...)
  2024-03-07  1:31 ` patch 'cryptodev: remove unused extern variable' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'common/cnxk: fix memory leak in CPT init' " luca.boccassi
                   ` (51 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: Konstantin Ananyev, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From c5db2d6897f145cd812f8586e4d2b33899f797c5 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Tue, 19 Dec 2023 10:59:22 +0530
Subject: [PATCH] examples/ipsec-secgw: fix width of variables

[ upstream commit 6b9dabfdffee7ff1efa83e9548b4063fab0819c5 ]

'rte_eth_rx_burst' returns uint16_t. The same value need to be passed
to 'process_packets' functions which performs further processing. Having
this function use 'uint8_t' can result in issues when MAX_PKT_BURST is
larger.

The route functions (route4_pkts & route6_pkts) take uint8_t as the
argument. The caller can pass larger values as the field that is passed
is of type uint32_t. And the function can work with uint32_t as it loops
through the packets and sends it out. Using uint8_t can result in silent
packet drops.

Fixes: 4fbfa6c7c921 ("examples/ipsec-secgw: update eth header during route lookup")

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/ipsec-secgw.c  | 5 ++---
 examples/ipsec-secgw/ipsec_worker.h | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 82a4916fb2..86ad2b0ea5 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -568,7 +568,7 @@ process_pkts_outbound_nosp(struct ipsec_ctx *ipsec_ctx,
 
 static inline void
 process_pkts(struct lcore_conf *qconf, struct rte_mbuf **pkts,
-	     uint8_t nb_pkts, uint16_t portid, struct rte_security_ctx *ctx)
+	     uint16_t nb_pkts, uint16_t portid, struct rte_security_ctx *ctx)
 {
 	struct ipsec_traffic traffic;
 
@@ -695,8 +695,7 @@ ipsec_poll_mode_worker(void)
 	struct rte_mbuf *pkts[MAX_PKT_BURST];
 	uint32_t lcore_id;
 	uint64_t prev_tsc, diff_tsc, cur_tsc;
-	int32_t i, nb_rx;
-	uint16_t portid;
+	uint16_t i, nb_rx, portid;
 	uint8_t queueid;
 	struct lcore_conf *qconf;
 	int32_t rc, socket_id;
diff --git a/examples/ipsec-secgw/ipsec_worker.h b/examples/ipsec-secgw/ipsec_worker.h
index d5a68d91fa..93e5470962 100644
--- a/examples/ipsec-secgw/ipsec_worker.h
+++ b/examples/ipsec-secgw/ipsec_worker.h
@@ -472,7 +472,7 @@ fail:
 
 static __rte_always_inline void
 route4_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[],
-	    uint8_t nb_pkts, uint64_t tx_offloads, bool ip_cksum)
+	    uint32_t nb_pkts, uint64_t tx_offloads, bool ip_cksum)
 {
 	uint32_t hop[MAX_PKT_BURST * 2];
 	uint32_t dst_ip[MAX_PKT_BURST * 2];
@@ -560,7 +560,7 @@ route4_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[],
 }
 
 static __rte_always_inline void
-route6_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[], uint8_t nb_pkts)
+route6_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[], uint32_t nb_pkts)
 {
 	int32_t hop[MAX_PKT_BURST * 2];
 	uint8_t dst_ip[MAX_PKT_BURST * 2][16];
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:39.178597986 +0000
+++ 0050-examples-ipsec-secgw-fix-width-of-variables.patch	2024-03-07 01:05:34.798940017 +0000
@@ -1 +1 @@
-From 6b9dabfdffee7ff1efa83e9548b4063fab0819c5 Mon Sep 17 00:00:00 2001
+From c5db2d6897f145cd812f8586e4d2b33899f797c5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6b9dabfdffee7ff1efa83e9548b4063fab0819c5 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index bf98d2618b..a61bea400a 100644
+index 82a4916fb2..86ad2b0ea5 100644
@@ -36,2 +37,2 @@
--	     uint8_t nb_pkts, uint16_t portid, void *ctx)
-+	     uint16_t nb_pkts, uint16_t portid, void *ctx)
+-	     uint8_t nb_pkts, uint16_t portid, struct rte_security_ctx *ctx)
++	     uint16_t nb_pkts, uint16_t portid, struct rte_security_ctx *ctx)
@@ -52 +53 @@
-index ac980b8bcf..8e937fda3e 100644
+index d5a68d91fa..93e5470962 100644
@@ -55 +56 @@
-@@ -469,7 +469,7 @@ fail:
+@@ -472,7 +472,7 @@ fail:
@@ -64 +65 @@
-@@ -557,7 +557,7 @@ route4_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[],
+@@ -560,7 +560,7 @@ route4_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[],

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

* patch 'common/cnxk: fix memory leak in CPT init' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (48 preceding siblings ...)
  2024-03-07  1:31 ` patch 'examples/ipsec-secgw: fix width of variables' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'app/crypto-perf: fix next segment mbuf' " luca.boccassi
                   ` (50 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 3d8b8805d8bbb570a2fa6b74affde8b02f1f8975 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <gakhil@marvell.com>
Date: Wed, 17 Jan 2024 16:00:46 +0530
Subject: [PATCH] common/cnxk: fix memory leak in CPT init

[ upstream commit ffe0b570cfd04a35b3a2f8f753efbbbe0225c38c ]

dev_init() acquires some resources which need to be cleaned
in case a failure is observed afterwards.

Fixes: c045d2e5cbbc ("common/cnxk: add CPT configuration")

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/common/cnxk/roc_cpt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c
index fb97ec89b2..c9adfe6a02 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -656,7 +656,7 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
 	rc = dev_init(dev, pci_dev);
 	if (rc) {
 		plt_err("Failed to init roc device");
-		goto fail;
+		return rc;
 	}
 
 	cpt->pci_dev = pci_dev;
@@ -688,6 +688,7 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
 	return 0;
 
 fail:
+	dev_fini(dev, pci_dev);
 	return rc;
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:39.261768310 +0000
+++ 0051-common-cnxk-fix-memory-leak-in-CPT-init.patch	2024-03-07 01:05:34.802940101 +0000
@@ -1 +1 @@
-From ffe0b570cfd04a35b3a2f8f753efbbbe0225c38c Mon Sep 17 00:00:00 2001
+From 3d8b8805d8bbb570a2fa6b74affde8b02f1f8975 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ffe0b570cfd04a35b3a2f8f753efbbbe0225c38c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 981e85a204..4e23d8c135 100644
+index fb97ec89b2..c9adfe6a02 100644
@@ -21 +22 @@
-@@ -756,7 +756,7 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
+@@ -656,7 +656,7 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
@@ -30 +31 @@
-@@ -788,6 +788,7 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
+@@ -688,6 +688,7 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)

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

* patch 'app/crypto-perf: fix next segment mbuf' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (49 preceding siblings ...)
  2024-03-07  1:31 ` patch 'common/cnxk: fix memory leak in CPT init' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'app/crypto-perf: fix data comparison' " luca.boccassi
                   ` (49 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Anoob Joseph, Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From ebfa1610698d839a63792a47becd4b58ac397df5 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Thu, 4 Jan 2024 10:24:05 +0800
Subject: [PATCH] app/crypto-perf: fix next segment mbuf

[ upstream commit 06a109ca5dc551631d9251e81966a4bc52f98c5a ]

In fill_multi_seg_mbuf(), when remaining_segments is 0,
rte_mbuf m's next should pointer to NULL instead of a
new rte_mbuf, that causes setting m->next as NULL out
of the while loop to the invalid mbuf.

This commit fixes the invalid mbuf next operation.

Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 app/test-crypto-perf/cperf_test_common.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 932aab16df..b3bf9f67e8 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -49,7 +49,6 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
 {
 	uint16_t mbuf_hdr_size = sizeof(struct rte_mbuf);
 	uint16_t remaining_segments = segments_nb;
-	struct rte_mbuf *next_mbuf;
 	rte_iova_t next_seg_phys_addr = rte_mempool_virt2iova(obj) +
 			 mbuf_offset + mbuf_hdr_size;
 
@@ -70,15 +69,15 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
 		m->nb_segs = segments_nb;
 		m->port = 0xff;
 		rte_mbuf_refcnt_set(m, 1);
-		next_mbuf = (struct rte_mbuf *) ((uint8_t *) m +
-					mbuf_hdr_size + segment_sz);
-		m->next = next_mbuf;
-		m = next_mbuf;
+
 		remaining_segments--;
-
+		if (remaining_segments > 0) {
+			m->next = (struct rte_mbuf *)((uint8_t *) m + mbuf_hdr_size + segment_sz);
+			m = m->next;
+		} else {
+			m->next = NULL;
+		}
 	} while (remaining_segments > 0);
-
-	m->next = NULL;
 }
 
 static void
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:39.340752252 +0000
+++ 0052-app-crypto-perf-fix-next-segment-mbuf.patch	2024-03-07 01:05:34.802940101 +0000
@@ -1 +1 @@
-From 06a109ca5dc551631d9251e81966a4bc52f98c5a Mon Sep 17 00:00:00 2001
+From ebfa1610698d839a63792a47becd4b58ac397df5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 06a109ca5dc551631d9251e81966a4bc52f98c5a ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/crypto-perf: fix data comparison' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (50 preceding siblings ...)
  2024-03-07  1:31 ` patch 'app/crypto-perf: fix next segment mbuf' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'app/crypto-perf: fix encrypt operation verification' " luca.boccassi
                   ` (48 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Anoob Joseph, Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 642af46b1382e00388d74b109a783100f0f0d77a Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Fri, 5 Jan 2024 08:03:22 +0800
Subject: [PATCH] app/crypto-perf: fix data comparison

[ upstream commit ddec2a39bae12da2817392239ddce19f3953fd53 ]

The function memcmp() returns an integer less than, equal to,
or greater than zero. In current code, if the first memcmp()
returns less than zero and the second memcmp() returns greater
than zero, the sum of results may still be 0 and indicates
verify successed.

This commit converts the return value to be zero or greater
than zero. That will make sure the sum of results be correct.

Fixes: df52cb3b6e13 ("app/crypto-perf: move verify as single test type")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 app/test-crypto-perf/cperf_test_verify.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index 8042c94e04..02e90941ce 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -186,18 +186,18 @@ cperf_verify_op(struct rte_crypto_op *op,
 
 	if (cipher == 1) {
 		if (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT)
-			res += memcmp(data + cipher_offset,
+			res += !!memcmp(data + cipher_offset,
 					vector->ciphertext.data,
 					options->test_buffer_size);
 		else
-			res += memcmp(data + cipher_offset,
+			res += !!memcmp(data + cipher_offset,
 					vector->plaintext.data,
 					options->test_buffer_size);
 	}
 
 	if (auth == 1) {
 		if (options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE)
-			res += memcmp(data + auth_offset,
+			res += !!memcmp(data + auth_offset,
 					vector->digest.data,
 					options->digest_sz);
 	}
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:39.416916560 +0000
+++ 0053-app-crypto-perf-fix-data-comparison.patch	2024-03-07 01:05:34.806940186 +0000
@@ -1 +1 @@
-From ddec2a39bae12da2817392239ddce19f3953fd53 Mon Sep 17 00:00:00 2001
+From 642af46b1382e00388d74b109a783100f0f0d77a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ddec2a39bae12da2817392239ddce19f3953fd53 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index a6c0ffe813..8aa714b969 100644
+index 8042c94e04..02e90941ce 100644

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

* patch 'app/crypto-perf: fix encrypt operation verification' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (51 preceding siblings ...)
  2024-03-07  1:31 ` patch 'app/crypto-perf: fix data comparison' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'event/cnxk: fix dequeue timeout configuration' " luca.boccassi
                   ` (47 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 7c0e5bd8ed2cbed7f2adde948210bb768e447976 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Fri, 5 Jan 2024 08:03:23 +0800
Subject: [PATCH] app/crypto-perf: fix encrypt operation verification

[ upstream commit 7d55ca15124c47561120d23d5023843ad99c1a81 ]

AEAD uses RTE_CRYPTO_AEAD_OP_* with aead_op and CIPHER uses
RTE_CRYPTO_CIPHER_OP_* with cipher_op in current code.

This commit aligns aead_op and cipher_op operation to fix
incorrect AEAD verification.

Fixes: df52cb3b6e13 ("app/crypto-perf: move verify as single test type")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test-crypto-perf/cperf_test_verify.c | 55 ++++++++++++------------
 1 file changed, 27 insertions(+), 28 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index 02e90941ce..5a963fa3cc 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -111,8 +111,10 @@ cperf_verify_op(struct rte_crypto_op *op,
 	uint32_t len;
 	uint16_t nb_segs;
 	uint8_t *data;
-	uint32_t cipher_offset, auth_offset;
-	uint8_t	cipher, auth;
+	uint32_t cipher_offset, auth_offset = 0;
+	bool cipher = false;
+	bool digest_verify = false;
+	bool is_encrypt = false;
 	int res = 0;
 
 	if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS)
@@ -150,42 +152,43 @@ cperf_verify_op(struct rte_crypto_op *op,
 
 	switch (options->op_type) {
 	case CPERF_CIPHER_ONLY:
-		cipher = 1;
+		cipher = true;
 		cipher_offset = 0;
-		auth = 0;
-		auth_offset = 0;
-		break;
-	case CPERF_CIPHER_THEN_AUTH:
-		cipher = 1;
-		cipher_offset = 0;
-		auth = 1;
-		auth_offset = options->test_buffer_size;
+		is_encrypt = options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 		break;
 	case CPERF_AUTH_ONLY:
-		cipher = 0;
 		cipher_offset = 0;
-		auth = 1;
-		auth_offset = options->test_buffer_size;
+		if (options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE) {
+			auth_offset = options->test_buffer_size;
+			digest_verify = true;
+		}
 		break;
+	case CPERF_CIPHER_THEN_AUTH:
 	case CPERF_AUTH_THEN_CIPHER:
-		cipher = 1;
+		cipher = true;
 		cipher_offset = 0;
-		auth = 1;
-		auth_offset = options->test_buffer_size;
+		if (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) {
+			auth_offset = options->test_buffer_size;
+			digest_verify = true;
+			is_encrypt = true;
+		}
 		break;
 	case CPERF_AEAD:
-		cipher = 1;
+		cipher = true;
 		cipher_offset = 0;
-		auth = 1;
-		auth_offset = options->test_buffer_size;
+		if (options->aead_op == RTE_CRYPTO_AEAD_OP_ENCRYPT) {
+			auth_offset = options->test_buffer_size;
+			digest_verify = true;
+			is_encrypt = true;
+		}
 		break;
 	default:
 		res = 1;
 		goto out;
 	}
 
-	if (cipher == 1) {
-		if (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT)
+	if (cipher) {
+		if (is_encrypt)
 			res += !!memcmp(data + cipher_offset,
 					vector->ciphertext.data,
 					options->test_buffer_size);
@@ -195,12 +198,8 @@ cperf_verify_op(struct rte_crypto_op *op,
 					options->test_buffer_size);
 	}
 
-	if (auth == 1) {
-		if (options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE)
-			res += !!memcmp(data + auth_offset,
-					vector->digest.data,
-					options->digest_sz);
-	}
+	if (digest_verify)
+		res += !!memcmp(data + auth_offset, vector->digest.data, options->digest_sz);
 
 out:
 	rte_free(data);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:39.494804725 +0000
+++ 0054-app-crypto-perf-fix-encrypt-operation-verification.patch	2024-03-07 01:05:34.806940186 +0000
@@ -1 +1 @@
-From 7d55ca15124c47561120d23d5023843ad99c1a81 Mon Sep 17 00:00:00 2001
+From 7c0e5bd8ed2cbed7f2adde948210bb768e447976 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7d55ca15124c47561120d23d5023843ad99c1a81 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 8aa714b969..2b0d3f142b 100644
+index 02e90941ce..5a963fa3cc 100644

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

* patch 'event/cnxk: fix dequeue timeout configuration' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (52 preceding siblings ...)
  2024-03-07  1:31 ` patch 'app/crypto-perf: fix encrypt operation verification' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'test/event: skip test if no driver is present' " luca.boccassi
                   ` (46 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 8dd3b5b4abc62c68619d4e8545f5fc5a421afc5c Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Thu, 7 Dec 2023 12:25:39 +0530
Subject: [PATCH] event/cnxk: fix dequeue timeout configuration

[ upstream commit efcf81e1a89fa7b20aae17accfcb4a8e7ddc3d02 ]

Allow dequeue timeout to be configured as zero, when
RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT is disabled.

Fixes: 5512c7de85cd ("event/cnxk: add common configuration validation")

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

diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 9bf31012df..205cc76572 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -150,16 +150,17 @@ cnxk_sso_dev_validate(const struct rte_eventdev *event_dev)
 
 	deq_tmo_ns = conf->dequeue_timeout_ns;
 
-	if (deq_tmo_ns == 0)
-		deq_tmo_ns = dev->min_dequeue_timeout_ns;
-	if (deq_tmo_ns < dev->min_dequeue_timeout_ns ||
-	    deq_tmo_ns > dev->max_dequeue_timeout_ns) {
+	if (deq_tmo_ns && (deq_tmo_ns < dev->min_dequeue_timeout_ns ||
+			   deq_tmo_ns > dev->max_dequeue_timeout_ns)) {
 		plt_err("Unsupported dequeue timeout requested");
 		return -EINVAL;
 	}
 
-	if (conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT)
+	if (conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT) {
+		if (deq_tmo_ns == 0)
+			deq_tmo_ns = dev->min_dequeue_timeout_ns;
 		dev->is_timeout_deq = 1;
+	}
 
 	dev->deq_tmo_ns = deq_tmo_ns;
 
@@ -590,7 +591,7 @@ cnxk_sso_init(struct rte_eventdev *event_dev)
 	}
 
 	dev->is_timeout_deq = 0;
-	dev->min_dequeue_timeout_ns = 0;
+	dev->min_dequeue_timeout_ns = USEC2NSEC(1);
 	dev->max_dequeue_timeout_ns = USEC2NSEC(0x3FF);
 	dev->max_num_events = -1;
 	dev->nb_event_queues = 0;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:39.569703734 +0000
+++ 0055-event-cnxk-fix-dequeue-timeout-configuration.patch	2024-03-07 01:05:34.806940186 +0000
@@ -1 +1 @@
-From efcf81e1a89fa7b20aae17accfcb4a8e7ddc3d02 Mon Sep 17 00:00:00 2001
+From 8dd3b5b4abc62c68619d4e8545f5fc5a421afc5c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit efcf81e1a89fa7b20aae17accfcb4a8e7ddc3d02 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 1ec281e735..20f7f0d6df 100644
+index 9bf31012df..205cc76572 100644
@@ -21 +22 @@
-@@ -162,16 +162,17 @@ cnxk_sso_dev_validate(const struct rte_eventdev *event_dev, uint32_t deq_depth,
+@@ -150,16 +150,17 @@ cnxk_sso_dev_validate(const struct rte_eventdev *event_dev)
@@ -44 +45 @@
-@@ -666,7 +667,7 @@ cnxk_sso_init(struct rte_eventdev *event_dev)
+@@ -590,7 +591,7 @@ cnxk_sso_init(struct rte_eventdev *event_dev)

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

* patch 'test/event: skip test if no driver is present' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (53 preceding siblings ...)
  2024-03-07  1:31 ` patch 'event/cnxk: fix dequeue timeout configuration' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'doc: fix commands in eventdev test tool guide' " luca.boccassi
                   ` (45 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 1e4f46e6f91f256a0d98d9df662d24de50d83d7f Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 24 Jan 2024 13:33:38 +0100
Subject: [PATCH] test/event: skip test if no driver is present

[ upstream commit f1caf6ff072ad932d93f3d5587c504d5f90d5d70 ]

Align eventdev with what other device abstraction libraries do: if no
driver is present, skip the tests.

Fixes: f8f9d233ea0e ("test/eventdev: add unit tests")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_eventdev.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c
index 336529038e..7fbd99cb1c 100644
--- a/app/test/test_eventdev.c
+++ b/app/test/test_eventdev.c
@@ -33,9 +33,15 @@ testsuite_setup(void)
 	uint8_t count;
 	count = rte_event_dev_count();
 	if (!count) {
+		int ret;
+
 		printf("Failed to find a valid event device,"
-			" testing with event_skeleton device\n");
-		return rte_vdev_init("event_skeleton", NULL);
+			" trying with event_skeleton device\n");
+		ret = rte_vdev_init("event_skeleton", NULL);
+		if (ret != 0) {
+			printf("No event device, skipping\n");
+			return TEST_SKIPPED;
+		}
 	}
 	return TEST_SUCCESS;
 }
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:39.645884107 +0000
+++ 0056-test-event-skip-test-if-no-driver-is-present.patch	2024-03-07 01:05:34.810940272 +0000
@@ -1 +1 @@
-From f1caf6ff072ad932d93f3d5587c504d5f90d5d70 Mon Sep 17 00:00:00 2001
+From 1e4f46e6f91f256a0d98d9df662d24de50d83d7f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f1caf6ff072ad932d93f3d5587c504d5f90d5d70 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 71de947ce4..e4e234dc98 100644
+index 336529038e..7fbd99cb1c 100644

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

* patch 'doc: fix commands in eventdev test tool guide' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (54 preceding siblings ...)
  2024-03-07  1:31 ` patch 'test/event: skip test if no driver is present' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'ethdev: fix NVGRE encap flow action description' " luca.boccassi
                   ` (44 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 97986481e9a06c4752122576d2f1dae2e9b24b2b Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Fri, 2 Feb 2024 01:07:50 +0530
Subject: [PATCH] doc: fix commands in eventdev test tool guide

[ upstream commit b3342d76189e46f4b97d09245617a1188145d384 ]

Fix incorrect core masks in testeventdev example commands.

Fixes: f6dda59153f1 ("doc: add order queue test in eventdev test guide")
Fixes: dd37027f2ba6 ("doc: add order all types queue test in eventdev test guide")
Fixes: 43bc2fef79cd ("doc: add perf queue test in eventdev test guide")
Fixes: b3d4e665ed3d ("doc: add perf all types queue test in eventdev test guide")
Fixes: b01974da9f25 ("app/eventdev: add ethernet device producer option")
Fixes: ba9de463abeb ("doc: add pipeline queue test in testeventdev guide")
Fixes: d1b46daf7484 ("doc: add pipeline atq test in testeventdev guide")
Fixes: d008f20bce23 ("app/eventdev: add event timer adapter as a producer")
Fixes: 2eaa37b86635 ("app/eventdev: add vector mode in pipeline test")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 doc/guides/tools/testeventdev.rst | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/doc/guides/tools/testeventdev.rst b/doc/guides/tools/testeventdev.rst
index cd278e8998..7c1f4d64cf 100644
--- a/doc/guides/tools/testeventdev.rst
+++ b/doc/guides/tools/testeventdev.rst
@@ -295,7 +295,7 @@ Example command to run order queue test:
 
 .. code-block:: console
 
-   sudo <build_dir>/app/dpdk-test-eventdev --vdev=event_sw0 -- \
+   sudo <build_dir>/app/dpdk-test-eventdev -c 0x1f -s 0x10 --vdev=event_sw0 -- \
                 --test=order_queue --plcores 1 --wlcores 2,3
 
 
@@ -358,7 +358,7 @@ Example command to run order ``all types queue`` test:
 
 .. code-block:: console
 
-   sudo <build_dir>/app/dpdk-test-eventdev --vdev=event_octeontx -- \
+   sudo <build_dir>/app/dpdk-test-eventdev -c 0x1f -- \
                         --test=order_atq --plcores 1 --wlcores 2,3
 
 
@@ -462,14 +462,14 @@ Example command to run perf queue test:
 
 .. code-block:: console
 
-   sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -s 0x1 --vdev=event_sw0 -- \
+   sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -s 0x2 --vdev=event_sw0 -- \
         --test=perf_queue --plcores=2 --wlcore=3 --stlist=p --nb_pkts=0
 
 Example command to run perf queue test with producer enqueuing a burst of events:
 
 .. code-block:: console
 
-   sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -s 0x1 --vdev=event_sw0 -- \
+   sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -s 0x2 --vdev=event_sw0 -- \
         --test=perf_queue --plcores=2 --wlcore=3 --stlist=p --nb_pkts=0 \
         --prod_enq_burst_sz=32
 
@@ -477,15 +477,15 @@ Example command to run perf queue test with ethernet ports:
 
 .. code-block:: console
 
-   sudo build/app/dpdk-test-eventdev --vdev=event_sw0 -- \
+   sudo build/app/dpdk-test-eventdev -c 0xf -s 0x2 --vdev=event_sw0 -- \
         --test=perf_queue --plcores=2 --wlcore=3 --stlist=p --prod_type_ethdev
 
 Example command to run perf queue test with event timer adapter:
 
 .. code-block:: console
 
-   sudo  <build_dir>/app/dpdk-test-eventdev --vdev="event_octeontx" -- \
-                --wlcores 4 --plcores 12 --test perf_queue --stlist=a \
+   sudo  <build_dir>/app/dpdk-test-eventdev -c 0xfff1 \
+                -- --wlcores 4 --plcores 12 --test perf_queue --stlist=a \
                 --prod_type_timerdev --fwd_latency
 
 PERF_ATQ Test
@@ -572,15 +572,15 @@ Example command to run perf ``all types queue`` test:
 
 .. code-block:: console
 
-   sudo <build_dir>/app/dpdk-test-eventdev --vdev=event_octeontx -- \
+   sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -- \
                 --test=perf_atq --plcores=2 --wlcore=3 --stlist=p --nb_pkts=0
 
 Example command to run perf ``all types queue`` test with event timer adapter:
 
 .. code-block:: console
 
-   sudo  <build_dir>/app/dpdk-test-eventdev --vdev="event_octeontx" -- \
-                --wlcores 4 --plcores 12 --test perf_atq --verbose 20 \
+   sudo  <build_dir>/app/dpdk-test-eventdev -c 0xfff1 \
+                -- --wlcores 4 --plcores 12 --test perf_atq --verbose 20 \
                 --stlist=a --prod_type_timerdev --fwd_latency
 
 
@@ -804,13 +804,13 @@ Example command to run pipeline atq test:
 
 .. code-block:: console
 
-    sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \
+    sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -- \
         --test=pipeline_atq --wlcore=1 --prod_type_ethdev --stlist=a
 
 Example command to run pipeline atq test with vector events:
 
 .. code-block:: console
 
-    sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \
+    sudo <build_dir>/app/dpdk-test-eventdev -c 0xf -- \
         --test=pipeline_atq --wlcore=1 --prod_type_ethdev --stlist=a \
         --enable_vector  --vector_size 512
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:39.722763789 +0000
+++ 0057-doc-fix-commands-in-eventdev-test-tool-guide.patch	2024-03-07 01:05:34.810940272 +0000
@@ -1 +1 @@
-From b3342d76189e46f4b97d09245617a1188145d384 Mon Sep 17 00:00:00 2001
+From 97986481e9a06c4752122576d2f1dae2e9b24b2b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3342d76189e46f4b97d09245617a1188145d384 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index fc36bfb30c..3fcc2c9894 100644
+index cd278e8998..7c1f4d64cf 100644
@@ -28 +29 @@
-@@ -308,7 +308,7 @@ Example command to run order queue test:
+@@ -295,7 +295,7 @@ Example command to run order queue test:
@@ -37 +38 @@
-@@ -371,7 +371,7 @@ Example command to run order ``all types queue`` test:
+@@ -358,7 +358,7 @@ Example command to run order ``all types queue`` test:
@@ -46 +47 @@
-@@ -475,14 +475,14 @@ Example command to run perf queue test:
+@@ -462,14 +462,14 @@ Example command to run perf queue test:
@@ -63 +64 @@
-@@ -490,15 +490,15 @@ Example command to run perf queue test with ethernet ports:
+@@ -477,15 +477,15 @@ Example command to run perf queue test with ethernet ports:
@@ -82 +83 @@
-@@ -585,15 +585,15 @@ Example command to run perf ``all types queue`` test:
+@@ -572,15 +572,15 @@ Example command to run perf ``all types queue`` test:
@@ -101 +102 @@
-@@ -817,13 +817,13 @@ Example command to run pipeline atq test:
+@@ -804,13 +804,13 @@ Example command to run pipeline atq test:

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

* patch 'ethdev: fix NVGRE encap flow action description' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (55 preceding siblings ...)
  2024-03-07  1:31 ` patch 'doc: fix commands in eventdev test tool guide' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/nfp: fix resource leak for PF initialization' " luca.boccassi
                   ` (43 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Sunyang Wu; +Cc: Joey Xing, Ori Kam, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 636a019a74210f654506d99b3667cb27da52f082 Mon Sep 17 00:00:00 2001
From: Sunyang Wu <sunyang.wu@jaguarmicro.com>
Date: Thu, 30 Nov 2023 14:22:21 +0800
Subject: [PATCH] ethdev: fix NVGRE encap flow action description

[ upstream commit f59d78b5803be7b0c0831309c703273bd2c92a50 ]

Fix incorrect definition of 'NVGRE_ENCAP', and
modified the error comments of 'rte_flow_action_nvgre_encap'.

Fixes: c2beb1d469d2 ("ethdev: add missing items/actions to flow object converter")
Fixes: 3850cf0c8c37 ("ethdev: add tunnel encap/decap actions")

Signed-off-by: Joey Xing <joey.xing@jaguarmicro.com>
Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/ethdev/rte_flow.c | 2 +-
 lib/ethdev/rte_flow.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index ae22755ee6..2aa51f99ee 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -206,7 +206,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
 		       sizeof(struct rte_flow_action_of_push_mpls)),
 	MK_FLOW_ACTION(VXLAN_ENCAP, sizeof(struct rte_flow_action_vxlan_encap)),
 	MK_FLOW_ACTION(VXLAN_DECAP, 0),
-	MK_FLOW_ACTION(NVGRE_ENCAP, sizeof(struct rte_flow_action_vxlan_encap)),
+	MK_FLOW_ACTION(NVGRE_ENCAP, sizeof(struct rte_flow_action_nvgre_encap)),
 	MK_FLOW_ACTION(NVGRE_DECAP, 0),
 	MK_FLOW_ACTION(RAW_ENCAP, sizeof(struct rte_flow_action_raw_encap)),
 	MK_FLOW_ACTION(RAW_DECAP, sizeof(struct rte_flow_action_raw_decap)),
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index b60987db4b..706ffba596 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -3138,7 +3138,7 @@ struct rte_flow_action_vxlan_encap {
  */
 struct rte_flow_action_nvgre_encap {
 	/**
-	 * Encapsulating vxlan tunnel definition
+	 * Encapsulating nvgre tunnel definition
 	 * (terminated by the END pattern item).
 	 */
 	struct rte_flow_item *definition;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:39.801681869 +0000
+++ 0058-ethdev-fix-NVGRE-encap-flow-action-description.patch	2024-03-07 01:05:34.822940526 +0000
@@ -1 +1 @@
-From f59d78b5803be7b0c0831309c703273bd2c92a50 Mon Sep 17 00:00:00 2001
+From 636a019a74210f654506d99b3667cb27da52f082 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f59d78b5803be7b0c0831309c703273bd2c92a50 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 2cd30d63b7..43a41bdb1d 100644
+index ae22755ee6..2aa51f99ee 100644
@@ -26 +27 @@
-@@ -219,7 +219,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
+@@ -206,7 +206,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
@@ -36 +37 @@
-index 78b6bbb159..440396be78 100644
+index b60987db4b..706ffba596 100644
@@ -39 +40 @@
-@@ -3468,7 +3468,7 @@ struct rte_flow_action_vxlan_encap {
+@@ -3138,7 +3138,7 @@ struct rte_flow_action_vxlan_encap {

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

* patch 'net/nfp: fix resource leak for PF initialization' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (56 preceding siblings ...)
  2024-03-07  1:31 ` patch 'ethdev: fix NVGRE encap flow action description' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/af_xdp: fix memzone leak on config failure' " luca.boccassi
                   ` (42 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From bc1e0ee2a380081930d1dd20bfe996d705d22913 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 4 Dec 2023 09:57:14 +0800
Subject: [PATCH] net/nfp: fix resource leak for PF initialization

[ upstream commit 528812a63c4c2d74ccf2c2f2aa297fcbff3ceea9 ]

Fix the resource leak problem in the abnormal logic of PF initialize
function.

Fixes: 646ea79ce481 ("net/nfp: move PF functions into its own file")
Fixes: 8ba461d1eecc ("net/nfp: introduce keepalive mechanism for multiple PF")

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>
---
 drivers/net/nfp/nfp_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 9f940a12b6..3b70f5c6f1 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -1088,7 +1088,7 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 	return 0;
 
 hwqueues_cleanup:
-	nfp_cpp_area_free(pf_dev->hwqueues_area);
+	nfp_cpp_area_release_free(pf_dev->hwqueues_area);
 pf_cleanup:
 	rte_free(pf_dev);
 sym_tbl_cleanup:
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:39.887254737 +0000
+++ 0059-net-nfp-fix-resource-leak-for-PF-initialization.patch	2024-03-07 01:05:34.822940526 +0000
@@ -1 +1 @@
-From 528812a63c4c2d74ccf2c2f2aa297fcbff3ceea9 Mon Sep 17 00:00:00 2001
+From bc1e0ee2a380081930d1dd20bfe996d705d22913 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 528812a63c4c2d74ccf2c2f2aa297fcbff3ceea9 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/nfp/nfp_ethdev.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ drivers/net/nfp/nfp_ethdev.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -21 +22 @@
-index c132e97d1a..6fdde105ba 100644
+index 9f940a12b6..3b70f5c6f1 100644
@@ -24 +25 @@
-@@ -1333,12 +1333,13 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
+@@ -1088,7 +1088,7 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
@@ -28,2 +29,4 @@
--	nfp_cpp_area_free(pf_dev->qc_area);
-+	nfp_cpp_area_release_free(pf_dev->qc_area);
+-	nfp_cpp_area_free(pf_dev->hwqueues_area);
++	nfp_cpp_area_release_free(pf_dev->hwqueues_area);
+ pf_cleanup:
+ 	rte_free(pf_dev);
@@ -31,8 +33,0 @@
- 	free(sym_tbl);
- fw_cleanup:
- 	nfp_fw_unload(cpp);
- 	nfp_net_keepalive_stop(&pf_dev->multi_pf);
-+	nfp_net_keepalive_uninit(&pf_dev->multi_pf);
- eth_table_cleanup:
- 	free(nfp_eth_table);
- hwinfo_cleanup:

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

* patch 'net/af_xdp: fix memzone leak on config failure' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (57 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/nfp: fix resource leak for PF initialization' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/hns3: refactor VF mailbox message struct' " luca.boccassi
                   ` (41 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ciara Loftus, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 173ff75d7452517cd9c26373013c0d218a70c2ac Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 5 Dec 2023 20:23:51 +0800
Subject: [PATCH] net/af_xdp: fix memzone leak on config failure

[ upstream commit 960775fc5b7d43cfbf9fa31e4c0b36c4da79615a ]

In xdp_umem_configure() allocated memzone for the 'umem', we should
free it when xsk_umem__create() call fails, otherwise it will lead to
memory zone leak. To fix it move 'umem->mz = mz;' assignment after
'mz == NULL' check.

Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 738f4158e0..70af6267d8 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -1211,6 +1211,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
 		AF_XDP_LOG(ERR, "Failed to reserve memzone for af_xdp umem.\n");
 		goto err;
 	}
+	umem->mz = mz;
 
 	ret = xsk_umem__create(&umem->umem, mz->addr,
 			       ETH_AF_XDP_NUM_BUFFERS * ETH_AF_XDP_FRAME_SIZE,
@@ -1221,7 +1222,6 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
 		AF_XDP_LOG(ERR, "Failed to create umem\n");
 		goto err;
 	}
-	umem->mz = mz;
 
 	return umem;
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:39.964605948 +0000
+++ 0060-net-af_xdp-fix-memzone-leak-on-config-failure.patch	2024-03-07 01:05:34.826940610 +0000
@@ -1 +1 @@
-From 960775fc5b7d43cfbf9fa31e4c0b36c4da79615a Mon Sep 17 00:00:00 2001
+From 173ff75d7452517cd9c26373013c0d218a70c2ac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 960775fc5b7d43cfbf9fa31e4c0b36c4da79615a ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 353c8688ec..2d151e45c7 100644
+index 738f4158e0..70af6267d8 100644
@@ -25 +26 @@
-@@ -1234,6 +1234,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
+@@ -1211,6 +1211,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
@@ -33 +34 @@
-@@ -1244,7 +1245,6 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
+@@ -1221,7 +1222,6 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,

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

* patch 'net/hns3: refactor VF mailbox message struct' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (58 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/af_xdp: fix memzone leak on config failure' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/hns3: refactor PF " luca.boccassi
                   ` (40 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 0a6c163f939ab95bdf761c303bc1c9466ad0c3e4 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 14:55:05 +0800
Subject: [PATCH] net/hns3: refactor VF mailbox message struct

[ upstream commit 692b35be121b724119da001d7ec4c0fabd51177b ]

The data region in VF to PF mbx memssage command is
used to communicate with PF driver. And this data
region exists as an array. As a result, some complicated
feature commands, like setting promisc mode, map/unmap
ring vector and setting VLAN id, have to use magic number
to set them. This isn't good for maintenance of driver.
So this patch refactors these messages by extracting an
hns3_vf_to_pf_msg structure.

In addition, the PF link change event message is reported
by the firmware and is reported in hns3_mbx_vf_to_pf_cmd
format, it also needs to be modified.

Fixes: 463e748964f5 ("net/hns3: support mailbox")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 54 ++++++++++++++---------------
 drivers/net/hns3/hns3_mbx.c       | 24 ++++++-------
 drivers/net/hns3/hns3_mbx.h       | 56 ++++++++++++++++++++++---------
 3 files changed, 76 insertions(+), 58 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 702a61aad9..2fdd684dcd 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -335,11 +335,12 @@ hns3vf_set_promisc_mode(struct hns3_hw *hw, bool en_bc_pmc,
 	 *    the packets with vlan tag in promiscuous mode.
 	 */
 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_MBX_VF_TO_PF, false);
-	req->msg[0] = HNS3_MBX_SET_PROMISC_MODE;
-	req->msg[1] = en_bc_pmc ? 1 : 0;
-	req->msg[2] = en_uc_pmc ? 1 : 0;
-	req->msg[3] = en_mc_pmc ? 1 : 0;
-	req->msg[4] = hw->promisc_mode == HNS3_LIMIT_PROMISC_MODE ? 1 : 0;
+	req->msg.code = HNS3_MBX_SET_PROMISC_MODE;
+	req->msg.en_bc = en_bc_pmc ? 1 : 0;
+	req->msg.en_uc = en_uc_pmc ? 1 : 0;
+	req->msg.en_mc = en_mc_pmc ? 1 : 0;
+	req->msg.en_limit_promisc =
+		hw->promisc_mode == HNS3_LIMIT_PROMISC_MODE ? 1 : 0;
 
 	ret = hns3_cmd_send(hw, &desc, 1);
 	if (ret)
@@ -428,30 +429,28 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
 			     bool mmap, enum hns3_ring_type queue_type,
 			     uint16_t queue_id)
 {
-	struct hns3_vf_bind_vector_msg bind_msg;
+#define HNS3_RING_VERCTOR_DATA_SIZE	14
+	struct hns3_vf_to_pf_msg req = {0};
 	const char *op_str;
-	uint16_t code;
 	int ret;
 
-	memset(&bind_msg, 0, sizeof(bind_msg));
-	code = mmap ? HNS3_MBX_MAP_RING_TO_VECTOR :
+	req.code = mmap ? HNS3_MBX_MAP_RING_TO_VECTOR :
 		HNS3_MBX_UNMAP_RING_TO_VECTOR;
-	bind_msg.vector_id = (uint8_t)vector_id;
+	req.vector_id = (uint8_t)vector_id;
+	req.ring_num = 1;
 
 	if (queue_type == HNS3_RING_TYPE_RX)
-		bind_msg.param[0].int_gl_index = HNS3_RING_GL_RX;
+		req.ring_param[0].int_gl_index = HNS3_RING_GL_RX;
 	else
-		bind_msg.param[0].int_gl_index = HNS3_RING_GL_TX;
-
-	bind_msg.param[0].ring_type = queue_type;
-	bind_msg.ring_num = 1;
-	bind_msg.param[0].tqp_index = queue_id;
+		req.ring_param[0].int_gl_index = HNS3_RING_GL_TX;
+	req.ring_param[0].ring_type = queue_type;
+	req.ring_param[0].tqp_index = queue_id;
 	op_str = mmap ? "Map" : "Unmap";
-	ret = hns3_send_mbx_msg(hw, code, 0, (uint8_t *)&bind_msg,
-				sizeof(bind_msg), false, NULL, 0);
+	ret = hns3_send_mbx_msg(hw, req.code, 0, (uint8_t *)&req.vector_id,
+				HNS3_RING_VERCTOR_DATA_SIZE, false, NULL, 0);
 	if (ret)
-		hns3_err(hw, "%s TQP %u fail, vector_id is %u, ret is %d.",
-			 op_str, queue_id, bind_msg.vector_id, ret);
+		hns3_err(hw, "%s TQP %u fail, vector_id is %u, ret = %d.",
+			 op_str, queue_id, req.vector_id, ret);
 
 	return ret;
 }
@@ -1046,19 +1045,16 @@ hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status,
 static int
 hns3vf_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
 {
-#define HNS3VF_VLAN_MBX_MSG_LEN 5
+	struct hns3_mbx_vlan_filter vlan_filter = {0};
 	struct hns3_hw *hw = &hns->hw;
-	uint8_t msg_data[HNS3VF_VLAN_MBX_MSG_LEN];
-	uint16_t proto = htons(RTE_ETHER_TYPE_VLAN);
-	uint8_t is_kill = on ? 0 : 1;
 
-	msg_data[0] = is_kill;
-	memcpy(&msg_data[1], &vlan_id, sizeof(vlan_id));
-	memcpy(&msg_data[3], &proto, sizeof(proto));
+	vlan_filter.is_kill = on ? 0 : 1;
+	vlan_filter.proto = rte_cpu_to_le_16(RTE_ETHER_TYPE_VLAN);
+	vlan_filter.vlan_id =  rte_cpu_to_le_16(vlan_id);
 
 	return hns3_send_mbx_msg(hw, HNS3_MBX_SET_VLAN, HNS3_MBX_VLAN_FILTER,
-				 msg_data, HNS3VF_VLAN_MBX_MSG_LEN, true, NULL,
-				 0);
+				(uint8_t *)&vlan_filter, sizeof(vlan_filter),
+				 true, NULL, 0);
 }
 
 static int
diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index f1743c195e..ad5ec555b3 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -11,8 +11,6 @@
 #include "hns3_intr.h"
 #include "hns3_rxtx.h"
 
-#define HNS3_CMD_CODE_OFFSET		2
-
 static const struct errno_respcode_map err_code_map[] = {
 	{0, 0},
 	{1, -EPERM},
@@ -127,29 +125,30 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
 	struct hns3_mbx_vf_to_pf_cmd *req;
 	struct hns3_cmd_desc desc;
 	bool is_ring_vector_msg;
-	int offset;
 	int ret;
 
 	req = (struct hns3_mbx_vf_to_pf_cmd *)desc.data;
 
 	/* first two bytes are reserved for code & subcode */
-	if (msg_len > (HNS3_MBX_MAX_MSG_SIZE - HNS3_CMD_CODE_OFFSET)) {
+	if (msg_len > HNS3_MBX_MSG_MAX_DATA_SIZE) {
 		hns3_err(hw,
 			 "VF send mbx msg fail, msg len %u exceeds max payload len %d",
-			 msg_len, HNS3_MBX_MAX_MSG_SIZE - HNS3_CMD_CODE_OFFSET);
+			 msg_len, HNS3_MBX_MSG_MAX_DATA_SIZE);
 		return -EINVAL;
 	}
 
 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_MBX_VF_TO_PF, false);
-	req->msg[0] = code;
+	req->msg.code = code;
 	is_ring_vector_msg = (code == HNS3_MBX_MAP_RING_TO_VECTOR) ||
 			     (code == HNS3_MBX_UNMAP_RING_TO_VECTOR) ||
 			     (code == HNS3_MBX_GET_RING_VECTOR_MAP);
 	if (!is_ring_vector_msg)
-		req->msg[1] = subcode;
+		req->msg.subcode = subcode;
 	if (msg_data) {
-		offset = is_ring_vector_msg ? 1 : HNS3_CMD_CODE_OFFSET;
-		memcpy(&req->msg[offset], msg_data, msg_len);
+		if (is_ring_vector_msg)
+			memcpy(&req->msg.vector_id, msg_data, msg_len);
+		else
+			memcpy(&req->msg.data, msg_data, msg_len);
 	}
 
 	/* synchronous send */
@@ -296,11 +295,8 @@ static void
 hns3pf_handle_link_change_event(struct hns3_hw *hw,
 				struct hns3_mbx_vf_to_pf_cmd *req)
 {
-#define LINK_STATUS_OFFSET     1
-#define LINK_FAIL_CODE_OFFSET  2
-
-	if (!req->msg[LINK_STATUS_OFFSET])
-		hns3_link_fail_parse(hw, req->msg[LINK_FAIL_CODE_OFFSET]);
+	if (!req->msg.link_status)
+		hns3_link_fail_parse(hw, req->msg.link_fail_code);
 
 	hns3_update_linkstatus_and_event(hw, true);
 }
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index 4a328802b9..59fb73abcc 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -89,7 +89,6 @@ enum hns3_mbx_link_fail_subcode {
 	HNS3_MBX_LF_XSFP_ABSENT,
 };
 
-#define HNS3_MBX_MAX_MSG_SIZE	16
 #define HNS3_MBX_MAX_RESP_DATA_SIZE	8
 #define HNS3_MBX_DEF_TIME_LIMIT_MS	500
 
@@ -107,6 +106,46 @@ struct hns3_mbx_resp_status {
 	uint8_t additional_info[HNS3_MBX_MAX_RESP_DATA_SIZE];
 };
 
+struct hns3_ring_chain_param {
+	uint8_t ring_type;
+	uint8_t tqp_index;
+	uint8_t int_gl_index;
+};
+
+struct hns3_mbx_vlan_filter {
+	uint8_t is_kill;
+	uint16_t vlan_id;
+	uint16_t proto;
+} __rte_packed;
+
+#define HNS3_MBX_MSG_MAX_DATA_SIZE	14
+#define HNS3_MBX_MAX_RING_CHAIN_PARAM_NUM	4
+struct hns3_vf_to_pf_msg {
+	uint8_t code;
+	union {
+		struct {
+			uint8_t subcode;
+			uint8_t data[HNS3_MBX_MSG_MAX_DATA_SIZE];
+		};
+		struct {
+			uint8_t en_bc;
+			uint8_t en_uc;
+			uint8_t en_mc;
+			uint8_t en_limit_promisc;
+		};
+		struct {
+			uint8_t vector_id;
+			uint8_t ring_num;
+			struct hns3_ring_chain_param
+				ring_param[HNS3_MBX_MAX_RING_CHAIN_PARAM_NUM];
+		};
+		struct {
+			uint8_t link_status;
+			uint8_t link_fail_code;
+		};
+	};
+};
+
 struct errno_respcode_map {
 	uint16_t resp_code;
 	int err_no;
@@ -122,7 +161,7 @@ struct hns3_mbx_vf_to_pf_cmd {
 	uint8_t msg_len;
 	uint8_t rsv2;
 	uint16_t match_id;
-	uint8_t msg[HNS3_MBX_MAX_MSG_SIZE];
+	struct hns3_vf_to_pf_msg msg;
 };
 
 struct hns3_mbx_pf_to_vf_cmd {
@@ -134,19 +173,6 @@ struct hns3_mbx_pf_to_vf_cmd {
 	uint16_t msg[8];
 };
 
-struct hns3_ring_chain_param {
-	uint8_t ring_type;
-	uint8_t tqp_index;
-	uint8_t int_gl_index;
-};
-
-#define HNS3_MBX_MAX_RING_CHAIN_PARAM_NUM	4
-struct hns3_vf_bind_vector_msg {
-	uint8_t vector_id;
-	uint8_t ring_num;
-	struct hns3_ring_chain_param param[HNS3_MBX_MAX_RING_CHAIN_PARAM_NUM];
-};
-
 struct hns3_pf_rst_done_cmd {
 	uint8_t pf_rst_done;
 	uint8_t rsv[23];
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:40.045334432 +0000
+++ 0061-net-hns3-refactor-VF-mailbox-message-struct.patch	2024-03-07 01:05:34.830940695 +0000
@@ -1 +1 @@
-From 692b35be121b724119da001d7ec4c0fabd51177b Mon Sep 17 00:00:00 2001
+From 0a6c163f939ab95bdf761c303bc1c9466ad0c3e4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 692b35be121b724119da001d7ec4c0fabd51177b ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 916cc0fb1b..19e734ca8d 100644
+index 702a61aad9..2fdd684dcd 100644
@@ -34 +35 @@
-@@ -254,11 +254,12 @@ hns3vf_set_promisc_mode(struct hns3_hw *hw, bool en_bc_pmc,
+@@ -335,11 +335,12 @@ hns3vf_set_promisc_mode(struct hns3_hw *hw, bool en_bc_pmc,
@@ -52 +53 @@
-@@ -347,30 +348,28 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
+@@ -428,30 +429,28 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
@@ -96 +97 @@
-@@ -965,19 +964,16 @@ hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status,
+@@ -1046,19 +1045,16 @@ hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status,

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

* patch 'net/hns3: refactor PF mailbox message struct' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (59 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/hns3: refactor VF mailbox message struct' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/hns3: refactor send mailbox function' " luca.boccassi
                   ` (39 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From b089a189d54202dcbc73910057e9f500beb70eda Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 14:55:06 +0800
Subject: [PATCH] net/hns3: refactor PF mailbox message struct

[ upstream commit 4d534598d922130d12c244d3237652fbfdad0f4b ]

The data region in PF to VF mbx memssage command is used
to communicate with VF driver. And this data region exists
as an array. As a result, some complicated feature commands,
like mailbox response, link change event, close promisc mode,
reset request and update pvid state, have to use magic number
to set them. This isn't good for maintenance of driver. So
this patch refactors these messages by extracting an
hns3_pf_to_vf_msg structure.

Fixes: 463e748964f5 ("net/hns3: support mailbox")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_mbx.c | 38 ++++++++++++++++++-------------------
 drivers/net/hns3/hns3_mbx.h | 25 +++++++++++++++++++++++-
 2 files changed, 43 insertions(+), 20 deletions(-)

diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index ad5ec555b3..c90f5d59ba 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -192,17 +192,17 @@ static void
 hns3vf_handle_link_change_event(struct hns3_hw *hw,
 				struct hns3_mbx_pf_to_vf_cmd *req)
 {
+	struct hns3_mbx_link_status *link_info =
+		(struct hns3_mbx_link_status *)req->msg.msg_data;
 	uint8_t link_status, link_duplex;
-	uint16_t *msg_q = req->msg;
 	uint8_t support_push_lsc;
 	uint32_t link_speed;
 
-	memcpy(&link_speed, &msg_q[2], sizeof(link_speed));
-	link_status = rte_le_to_cpu_16(msg_q[1]);
-	link_duplex = (uint8_t)rte_le_to_cpu_16(msg_q[4]);
-	hns3vf_update_link_status(hw, link_status, link_speed,
-				  link_duplex);
-	support_push_lsc = (*(uint8_t *)&msg_q[5]) & 1u;
+	link_status = (uint8_t)rte_le_to_cpu_16(link_info->link_status);
+	link_speed = rte_le_to_cpu_32(link_info->speed);
+	link_duplex = (uint8_t)rte_le_to_cpu_16(link_info->duplex);
+	hns3vf_update_link_status(hw, link_status, link_speed, link_duplex);
+	support_push_lsc = (link_info->flag) & 1u;
 	hns3vf_update_push_lsc_cap(hw, support_push_lsc);
 }
 
@@ -211,7 +211,6 @@ hns3_handle_asserting_reset(struct hns3_hw *hw,
 			    struct hns3_mbx_pf_to_vf_cmd *req)
 {
 	enum hns3_reset_level reset_level;
-	uint16_t *msg_q = req->msg;
 
 	/*
 	 * PF has asserted reset hence VF should go in pending
@@ -219,7 +218,7 @@ hns3_handle_asserting_reset(struct hns3_hw *hw,
 	 * has been completely reset. After this stack should
 	 * eventually be re-initialized.
 	 */
-	reset_level = rte_le_to_cpu_16(msg_q[1]);
+	reset_level = rte_le_to_cpu_16(req->msg.reset_level);
 	hns3_atomic_set_bit(reset_level, &hw->reset.pending);
 
 	hns3_warn(hw, "PF inform reset level %d", reset_level);
@@ -241,8 +240,9 @@ hns3_handle_mbx_response(struct hns3_hw *hw, struct hns3_mbx_pf_to_vf_cmd *req)
 		 * to match the request.
 		 */
 		if (req->match_id == resp->match_id) {
-			resp->resp_status = hns3_resp_to_errno(req->msg[3]);
-			memcpy(resp->additional_info, &req->msg[4],
+			resp->resp_status =
+				hns3_resp_to_errno(req->msg.resp_status);
+			memcpy(resp->additional_info, &req->msg.resp_data,
 			       HNS3_MBX_MAX_RESP_DATA_SIZE);
 			rte_io_wmb();
 			resp->received_match_resp = true;
@@ -255,7 +255,8 @@ hns3_handle_mbx_response(struct hns3_hw *hw, struct hns3_mbx_pf_to_vf_cmd *req)
 	 * support copy request's match_id to its response. So VF follows the
 	 * original scheme to process.
 	 */
-	msg_data = (uint32_t)req->msg[1] << HNS3_MBX_RESP_CODE_OFFSET | req->msg[2];
+	msg_data = (uint32_t)req->msg.vf_mbx_msg_code <<
+			HNS3_MBX_RESP_CODE_OFFSET | req->msg.vf_mbx_msg_subcode;
 	if (resp->req_msg_data != msg_data) {
 		hns3_warn(hw,
 			"received response tag (%u) is mismatched with requested tag (%u)",
@@ -263,8 +264,8 @@ hns3_handle_mbx_response(struct hns3_hw *hw, struct hns3_mbx_pf_to_vf_cmd *req)
 		return;
 	}
 
-	resp->resp_status = hns3_resp_to_errno(req->msg[3]);
-	memcpy(resp->additional_info, &req->msg[4],
+	resp->resp_status = hns3_resp_to_errno(req->msg.resp_status);
+	memcpy(resp->additional_info, &req->msg.resp_data,
 	       HNS3_MBX_MAX_RESP_DATA_SIZE);
 	rte_io_wmb();
 	resp->received_match_resp = true;
@@ -305,8 +306,7 @@ static void
 hns3_update_port_base_vlan_info(struct hns3_hw *hw,
 				struct hns3_mbx_pf_to_vf_cmd *req)
 {
-#define PVID_STATE_OFFSET	1
-	uint16_t new_pvid_state = req->msg[PVID_STATE_OFFSET] ?
+	uint16_t new_pvid_state = req->msg.pvid_state ?
 		HNS3_PORT_BASE_VLAN_ENABLE : HNS3_PORT_BASE_VLAN_DISABLE;
 	/*
 	 * Currently, hardware doesn't support more than two layers VLAN offload
@@ -355,7 +355,7 @@ hns3_handle_mbx_msg_out_intr(struct hns3_hw *hw)
 	while (next_to_use != tail) {
 		desc = &crq->desc[next_to_use];
 		req = (struct hns3_mbx_pf_to_vf_cmd *)desc->data;
-		opcode = req->msg[0] & 0xff;
+		opcode = req->msg.code & 0xff;
 
 		flag = rte_le_to_cpu_16(crq->desc[next_to_use].flag);
 		if (!hns3_get_bit(flag, HNS3_CMDQ_RX_OUTVLD_B))
@@ -428,7 +428,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 
 		desc = &crq->desc[crq->next_to_use];
 		req = (struct hns3_mbx_pf_to_vf_cmd *)desc->data;
-		opcode = req->msg[0] & 0xff;
+		opcode = req->msg.code & 0xff;
 
 		flag = rte_le_to_cpu_16(crq->desc[crq->next_to_use].flag);
 		if (unlikely(!hns3_get_bit(flag, HNS3_CMDQ_RX_OUTVLD_B))) {
@@ -484,7 +484,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 			 * hns3 PF kernel driver, VF driver will receive this
 			 * mailbox message from PF driver.
 			 */
-			hns3_handle_promisc_info(hw, req->msg[1]);
+			hns3_handle_promisc_info(hw, req->msg.promisc_en);
 			break;
 		default:
 			hns3_err(hw, "received unsupported(%u) mbx msg",
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index 59fb73abcc..09780fcebd 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -118,6 +118,13 @@ struct hns3_mbx_vlan_filter {
 	uint16_t proto;
 } __rte_packed;
 
+struct hns3_mbx_link_status {
+	uint16_t link_status;
+	uint32_t speed;
+	uint16_t duplex;
+	uint8_t flag;
+} __rte_packed;
+
 #define HNS3_MBX_MSG_MAX_DATA_SIZE	14
 #define HNS3_MBX_MAX_RING_CHAIN_PARAM_NUM	4
 struct hns3_vf_to_pf_msg {
@@ -146,6 +153,22 @@ struct hns3_vf_to_pf_msg {
 	};
 };
 
+struct hns3_pf_to_vf_msg {
+	uint16_t code;
+	union {
+		struct {
+			uint16_t vf_mbx_msg_code;
+			uint16_t vf_mbx_msg_subcode;
+			uint16_t resp_status;
+			uint8_t resp_data[HNS3_MBX_MAX_RESP_DATA_SIZE];
+		};
+		uint16_t promisc_en;
+		uint16_t reset_level;
+		uint16_t pvid_state;
+		uint8_t msg_data[HNS3_MBX_MSG_MAX_DATA_SIZE];
+	};
+};
+
 struct errno_respcode_map {
 	uint16_t resp_code;
 	int err_no;
@@ -170,7 +193,7 @@ struct hns3_mbx_pf_to_vf_cmd {
 	uint8_t msg_len;
 	uint8_t rsv1;
 	uint16_t match_id;
-	uint16_t msg[8];
+	struct hns3_pf_to_vf_msg msg;
 };
 
 struct hns3_pf_rst_done_cmd {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:40.125546099 +0000
+++ 0062-net-hns3-refactor-PF-mailbox-message-struct.patch	2024-03-07 01:05:34.834940780 +0000
@@ -1 +1 @@
-From 4d534598d922130d12c244d3237652fbfdad0f4b Mon Sep 17 00:00:00 2001
+From b089a189d54202dcbc73910057e9f500beb70eda Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4d534598d922130d12c244d3237652fbfdad0f4b ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/hns3: refactor send mailbox function' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (60 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/hns3: refactor PF " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/hns3: refactor handle " luca.boccassi
                   ` (38 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 5371898fa5ba35e87feb8fd5892f6bada19be220 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 14:55:07 +0800
Subject: [PATCH] net/hns3: refactor send mailbox function

[ upstream commit c9bd98d84587dbc0dddb8964ad3d7d54818aca01 ]

The 'hns3_send_mbx_msg' function has following problem:
1. the name is vague, missing caller indication
2. too many input parameters because the filling messages
   are placed in commands the send command.

Therefore, a common interface is encapsulated to fill in
the mailbox message before sending it.

Fixes: 463e748964f5 ("net/hns3: support mailbox")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 141 ++++++++++++++++++------------
 drivers/net/hns3/hns3_mbx.c       |  50 ++++-------
 drivers/net/hns3/hns3_mbx.h       |   8 +-
 drivers/net/hns3/hns3_rxtx.c      |  18 ++--
 4 files changed, 116 insertions(+), 101 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 2fdd684dcd..acf33db542 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -172,11 +172,13 @@ hns3vf_add_uc_mac_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
 {
 	/* mac address was checked by upper level interface */
 	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
+	struct hns3_vf_to_pf_msg req;
 	int ret;
 
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_UNICAST,
-				HNS3_MBX_MAC_VLAN_UC_ADD, mac_addr->addr_bytes,
-				RTE_ETHER_ADDR_LEN, false, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_UNICAST,
+			 HNS3_MBX_MAC_VLAN_UC_ADD);
+	memcpy(req.data, mac_addr->addr_bytes, RTE_ETHER_ADDR_LEN);
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret) {
 		hns3_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
 				      mac_addr);
@@ -191,12 +193,13 @@ hns3vf_remove_uc_mac_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
 {
 	/* mac address was checked by upper level interface */
 	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
+	struct hns3_vf_to_pf_msg req;
 	int ret;
 
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_UNICAST,
-				HNS3_MBX_MAC_VLAN_UC_REMOVE,
-				mac_addr->addr_bytes, RTE_ETHER_ADDR_LEN,
-				false, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_UNICAST,
+			 HNS3_MBX_MAC_VLAN_UC_REMOVE);
+	memcpy(req.data, mac_addr->addr_bytes, RTE_ETHER_ADDR_LEN);
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret) {
 		hns3_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
 				       mac_addr);
@@ -215,6 +218,7 @@ hns3vf_set_default_mac_addr(struct rte_eth_dev *dev,
 	struct rte_ether_addr *old_addr;
 	uint8_t addr_bytes[HNS3_TWO_ETHER_ADDR_LEN]; /* for 2 MAC addresses */
 	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
+	struct hns3_vf_to_pf_msg req;
 	int ret;
 
 	/*
@@ -227,9 +231,10 @@ hns3vf_set_default_mac_addr(struct rte_eth_dev *dev,
 	memcpy(&addr_bytes[RTE_ETHER_ADDR_LEN], old_addr->addr_bytes,
 	       RTE_ETHER_ADDR_LEN);
 
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_UNICAST,
-				HNS3_MBX_MAC_VLAN_UC_MODIFY, addr_bytes,
-				HNS3_TWO_ETHER_ADDR_LEN, true, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_UNICAST,
+			 HNS3_MBX_MAC_VLAN_UC_MODIFY);
+	memcpy(req.data, addr_bytes, HNS3_TWO_ETHER_ADDR_LEN);
+	ret = hns3vf_mbx_send(hw, &req, true, NULL, 0);
 	if (ret) {
 		/*
 		 * The hns3 VF PMD depends on the hns3 PF kernel ethdev
@@ -266,12 +271,13 @@ hns3vf_add_mc_mac_addr(struct hns3_hw *hw,
 		       struct rte_ether_addr *mac_addr)
 {
 	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
+	struct hns3_vf_to_pf_msg req;
 	int ret;
 
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_MULTICAST,
-				HNS3_MBX_MAC_VLAN_MC_ADD,
-				mac_addr->addr_bytes, RTE_ETHER_ADDR_LEN, false,
-				NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_MULTICAST,
+			 HNS3_MBX_MAC_VLAN_MC_ADD);
+	memcpy(req.data, mac_addr->addr_bytes, RTE_ETHER_ADDR_LEN);
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret) {
 		hns3_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
 				      mac_addr);
@@ -287,12 +293,13 @@ hns3vf_remove_mc_mac_addr(struct hns3_hw *hw,
 			  struct rte_ether_addr *mac_addr)
 {
 	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
+	struct hns3_vf_to_pf_msg req;
 	int ret;
 
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_MULTICAST,
-				HNS3_MBX_MAC_VLAN_MC_REMOVE,
-				mac_addr->addr_bytes, RTE_ETHER_ADDR_LEN, false,
-				NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_MULTICAST,
+			 HNS3_MBX_MAC_VLAN_MC_REMOVE);
+	memcpy(req.data, mac_addr->addr_bytes, RTE_ETHER_ADDR_LEN);
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret) {
 		hns3_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
 				       mac_addr);
@@ -429,7 +436,6 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
 			     bool mmap, enum hns3_ring_type queue_type,
 			     uint16_t queue_id)
 {
-#define HNS3_RING_VERCTOR_DATA_SIZE	14
 	struct hns3_vf_to_pf_msg req = {0};
 	const char *op_str;
 	int ret;
@@ -446,8 +452,7 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
 	req.ring_param[0].ring_type = queue_type;
 	req.ring_param[0].tqp_index = queue_id;
 	op_str = mmap ? "Map" : "Unmap";
-	ret = hns3_send_mbx_msg(hw, req.code, 0, (uint8_t *)&req.vector_id,
-				HNS3_RING_VERCTOR_DATA_SIZE, false, NULL, 0);
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret)
 		hns3_err(hw, "%s TQP %u fail, vector_id is %u, ret = %d.",
 			 op_str, queue_id, req.vector_id, ret);
@@ -533,10 +538,12 @@ cfg_err:
 static int
 hns3vf_config_mtu(struct hns3_hw *hw, uint16_t mtu)
 {
+	struct hns3_vf_to_pf_msg req;
 	int ret;
 
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_MTU, 0, (const uint8_t *)&mtu,
-				sizeof(mtu), true, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_MTU, 0);
+	memcpy(req.data, &mtu, sizeof(mtu));
+	ret = hns3vf_mbx_send(hw, &req, true, NULL, 0);
 	if (ret)
 		hns3_err(hw, "Failed to set mtu (%u) for vf: %d", mtu, ret);
 
@@ -727,12 +734,13 @@ hns3vf_get_push_lsc_cap(struct hns3_hw *hw)
 	uint16_t val = HNS3_PF_PUSH_LSC_CAP_NOT_SUPPORTED;
 	uint16_t exp = HNS3_PF_PUSH_LSC_CAP_UNKNOWN;
 	struct hns3_vf *vf = HNS3_DEV_HW_TO_VF(hw);
+	struct hns3_vf_to_pf_msg req;
 
 	__atomic_store_n(&vf->pf_push_lsc_cap, HNS3_PF_PUSH_LSC_CAP_UNKNOWN,
 			 __ATOMIC_RELEASE);
 
-	(void)hns3_send_mbx_msg(hw, HNS3_MBX_GET_LINK_STATUS, 0, NULL, 0, false,
-				NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_GET_LINK_STATUS, 0);
+	(void)hns3vf_mbx_send(hw, &req, false, NULL, 0);
 
 	while (remain_ms > 0) {
 		rte_delay_ms(HNS3_POLL_RESPONE_MS);
@@ -827,12 +835,13 @@ hns3vf_check_tqp_info(struct hns3_hw *hw)
 static int
 hns3vf_get_port_base_vlan_filter_state(struct hns3_hw *hw)
 {
+	struct hns3_vf_to_pf_msg req;
 	uint8_t resp_msg;
 	int ret;
 
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_VLAN,
-				HNS3_MBX_GET_PORT_BASE_VLAN_STATE, NULL, 0,
-				true, &resp_msg, sizeof(resp_msg));
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_VLAN,
+			 HNS3_MBX_GET_PORT_BASE_VLAN_STATE);
+	ret = hns3vf_mbx_send(hw, &req, true, &resp_msg, sizeof(resp_msg));
 	if (ret) {
 		if (ret == -ETIME) {
 			/*
@@ -873,10 +882,12 @@ hns3vf_get_queue_info(struct hns3_hw *hw)
 {
 #define HNS3VF_TQPS_RSS_INFO_LEN	6
 	uint8_t resp_msg[HNS3VF_TQPS_RSS_INFO_LEN];
+	struct hns3_vf_to_pf_msg req;
 	int ret;
 
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_GET_QINFO, 0, NULL, 0, true,
-				resp_msg, HNS3VF_TQPS_RSS_INFO_LEN);
+	hns3vf_mbx_setup(&req, HNS3_MBX_GET_QINFO, 0);
+	ret = hns3vf_mbx_send(hw, &req, true,
+			      resp_msg, HNS3VF_TQPS_RSS_INFO_LEN);
 	if (ret) {
 		PMD_INIT_LOG(ERR, "Failed to get tqp info from PF: %d", ret);
 		return ret;
@@ -914,10 +925,11 @@ hns3vf_get_basic_info(struct hns3_hw *hw)
 {
 	uint8_t resp_msg[HNS3_MBX_MAX_RESP_DATA_SIZE];
 	struct hns3_basic_info *basic_info;
+	struct hns3_vf_to_pf_msg req;
 	int ret;
 
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_GET_BASIC_INFO, 0, NULL, 0,
-				true, resp_msg, sizeof(resp_msg));
+	hns3vf_mbx_setup(&req, HNS3_MBX_GET_BASIC_INFO, 0);
+	ret = hns3vf_mbx_send(hw, &req, true, resp_msg, sizeof(resp_msg));
 	if (ret) {
 		hns3_err(hw, "failed to get basic info from PF, ret = %d.",
 				ret);
@@ -937,10 +949,11 @@ static int
 hns3vf_get_host_mac_addr(struct hns3_hw *hw)
 {
 	uint8_t host_mac[RTE_ETHER_ADDR_LEN];
+	struct hns3_vf_to_pf_msg req;
 	int ret;
 
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_GET_MAC_ADDR, 0, NULL, 0,
-				true, host_mac, RTE_ETHER_ADDR_LEN);
+	hns3vf_mbx_setup(&req, HNS3_MBX_GET_MAC_ADDR, 0);
+	ret = hns3vf_mbx_send(hw, &req, true, host_mac, RTE_ETHER_ADDR_LEN);
 	if (ret) {
 		hns3_err(hw, "Failed to get mac addr from PF: %d", ret);
 		return ret;
@@ -989,6 +1002,7 @@ static void
 hns3vf_request_link_info(struct hns3_hw *hw)
 {
 	struct hns3_vf *vf = HNS3_DEV_HW_TO_VF(hw);
+	struct hns3_vf_to_pf_msg req;
 	bool send_req;
 	int ret;
 
@@ -1000,8 +1014,8 @@ hns3vf_request_link_info(struct hns3_hw *hw)
 	if (!send_req)
 		return;
 
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_GET_LINK_STATUS, 0, NULL, 0, false,
-				NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_GET_LINK_STATUS, 0);
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret) {
 		hns3_err(hw, "failed to fetch link status, ret = %d", ret);
 		return;
@@ -1045,16 +1059,18 @@ hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status,
 static int
 hns3vf_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
 {
-	struct hns3_mbx_vlan_filter vlan_filter = {0};
+	struct hns3_mbx_vlan_filter *vlan_filter;
+	struct hns3_vf_to_pf_msg req = {0};
 	struct hns3_hw *hw = &hns->hw;
 
-	vlan_filter.is_kill = on ? 0 : 1;
-	vlan_filter.proto = rte_cpu_to_le_16(RTE_ETHER_TYPE_VLAN);
-	vlan_filter.vlan_id =  rte_cpu_to_le_16(vlan_id);
+	req.code = HNS3_MBX_SET_VLAN;
+	req.subcode = HNS3_MBX_VLAN_FILTER;
+	vlan_filter = (struct hns3_mbx_vlan_filter *)req.data;
+	vlan_filter->is_kill = on ? 0 : 1;
+	vlan_filter->proto = rte_cpu_to_le_16(RTE_ETHER_TYPE_VLAN);
+	vlan_filter->vlan_id = rte_cpu_to_le_16(vlan_id);
 
-	return hns3_send_mbx_msg(hw, HNS3_MBX_SET_VLAN, HNS3_MBX_VLAN_FILTER,
-				(uint8_t *)&vlan_filter, sizeof(vlan_filter),
-				 true, NULL, 0);
+	return hns3vf_mbx_send(hw, &req, true, NULL, 0);
 }
 
 static int
@@ -1083,6 +1099,7 @@ hns3vf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 static int
 hns3vf_en_vlan_filter(struct hns3_hw *hw, bool enable)
 {
+	struct hns3_vf_to_pf_msg req;
 	uint8_t msg_data;
 	int ret;
 
@@ -1090,9 +1107,10 @@ hns3vf_en_vlan_filter(struct hns3_hw *hw, bool enable)
 		return 0;
 
 	msg_data = enable ? 1 : 0;
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_VLAN,
-			HNS3_MBX_ENABLE_VLAN_FILTER, &msg_data,
-			sizeof(msg_data), true, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_VLAN,
+			 HNS3_MBX_ENABLE_VLAN_FILTER);
+	memcpy(req.data, &msg_data, sizeof(msg_data));
+	ret = hns3vf_mbx_send(hw, &req, true, NULL, 0);
 	if (ret)
 		hns3_err(hw, "%s vlan filter failed, ret = %d.",
 				enable ? "enable" : "disable", ret);
@@ -1103,12 +1121,15 @@ hns3vf_en_vlan_filter(struct hns3_hw *hw, bool enable)
 static int
 hns3vf_en_hw_strip_rxvtag(struct hns3_hw *hw, bool enable)
 {
+	struct hns3_vf_to_pf_msg req;
 	uint8_t msg_data;
 	int ret;
 
 	msg_data = enable ? 1 : 0;
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_VLAN, HNS3_MBX_VLAN_RX_OFF_CFG,
-				&msg_data, sizeof(msg_data), false, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_VLAN,
+			 HNS3_MBX_VLAN_RX_OFF_CFG);
+	memcpy(req.data, &msg_data, sizeof(msg_data));
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret)
 		hns3_err(hw, "vf %s strip failed, ret = %d.",
 				enable ? "enable" : "disable", ret);
@@ -1252,11 +1273,13 @@ hns3vf_dev_configure_vlan(struct rte_eth_dev *dev)
 static int
 hns3vf_set_alive(struct hns3_hw *hw, bool alive)
 {
+	struct hns3_vf_to_pf_msg req;
 	uint8_t msg_data;
 
 	msg_data = alive ? 1 : 0;
-	return hns3_send_mbx_msg(hw, HNS3_MBX_SET_ALIVE, 0, &msg_data,
-				 sizeof(msg_data), false, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_SET_ALIVE, 0);
+	memcpy(req.data, &msg_data, sizeof(msg_data));
+	return hns3vf_mbx_send(hw, &req, false, NULL, 0);
 }
 
 static void
@@ -1264,11 +1287,12 @@ hns3vf_keep_alive_handler(void *param)
 {
 	struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)param;
 	struct hns3_adapter *hns = eth_dev->data->dev_private;
+	struct hns3_vf_to_pf_msg req;
 	struct hns3_hw *hw = &hns->hw;
 	int ret;
 
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_KEEP_ALIVE, 0, NULL, 0,
-				false, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_KEEP_ALIVE, 0);
+	ret = hns3vf_mbx_send(hw, &req, false, NULL, 0);
 	if (ret)
 		hns3_err(hw, "VF sends keeping alive cmd failed(=%d)",
 			 ret);
@@ -1407,9 +1431,11 @@ err_init_hardware:
 static int
 hns3vf_clear_vport_list(struct hns3_hw *hw)
 {
-	return hns3_send_mbx_msg(hw, HNS3_MBX_HANDLE_VF_TBL,
-				 HNS3_MBX_VPORT_LIST_CLEAR, NULL, 0, false,
-				 NULL, 0);
+	struct hns3_vf_to_pf_msg req;
+
+	hns3vf_mbx_setup(&req, HNS3_MBX_HANDLE_VF_TBL,
+			 HNS3_MBX_VPORT_LIST_CLEAR);
+	return hns3vf_mbx_send(hw, &req, false, NULL, 0);
 }
 
 static int
@@ -1878,12 +1904,13 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
 static int
 hns3vf_prepare_reset(struct hns3_adapter *hns)
 {
+	struct hns3_vf_to_pf_msg req;
 	struct hns3_hw *hw = &hns->hw;
 	int ret;
 
 	if (hw->reset.level == HNS3_VF_FUNC_RESET) {
-		ret = hns3_send_mbx_msg(hw, HNS3_MBX_RESET, 0, NULL,
-					0, true, NULL, 0);
+		hns3vf_mbx_setup(&req, HNS3_MBX_RESET, 0);
+		ret = hns3vf_mbx_send(hw, &req, true, NULL, 0);
 		if (ret)
 			return ret;
 	}
diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index c90f5d59ba..43195ff184 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -24,6 +24,14 @@ static const struct errno_respcode_map err_code_map[] = {
 	{95, -EOPNOTSUPP},
 };
 
+void
+hns3vf_mbx_setup(struct hns3_vf_to_pf_msg *req, uint8_t code, uint8_t subcode)
+{
+	memset(req, 0, sizeof(struct hns3_vf_to_pf_msg));
+	req->code = code;
+	req->subcode = subcode;
+}
+
 static int
 hns3_resp_to_errno(uint16_t resp_code)
 {
@@ -118,45 +126,24 @@ hns3_mbx_prepare_resp(struct hns3_hw *hw, uint16_t code, uint16_t subcode)
 }
 
 int
-hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
-		  const uint8_t *msg_data, uint8_t msg_len, bool need_resp,
-		  uint8_t *resp_data, uint16_t resp_len)
+hns3vf_mbx_send(struct hns3_hw *hw,
+		struct hns3_vf_to_pf_msg *req, bool need_resp,
+		uint8_t *resp_data, uint16_t resp_len)
 {
-	struct hns3_mbx_vf_to_pf_cmd *req;
+	struct hns3_mbx_vf_to_pf_cmd *cmd;
 	struct hns3_cmd_desc desc;
-	bool is_ring_vector_msg;
 	int ret;
 
-	req = (struct hns3_mbx_vf_to_pf_cmd *)desc.data;
-
-	/* first two bytes are reserved for code & subcode */
-	if (msg_len > HNS3_MBX_MSG_MAX_DATA_SIZE) {
-		hns3_err(hw,
-			 "VF send mbx msg fail, msg len %u exceeds max payload len %d",
-			 msg_len, HNS3_MBX_MSG_MAX_DATA_SIZE);
-		return -EINVAL;
-	}
-
 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_MBX_VF_TO_PF, false);
-	req->msg.code = code;
-	is_ring_vector_msg = (code == HNS3_MBX_MAP_RING_TO_VECTOR) ||
-			     (code == HNS3_MBX_UNMAP_RING_TO_VECTOR) ||
-			     (code == HNS3_MBX_GET_RING_VECTOR_MAP);
-	if (!is_ring_vector_msg)
-		req->msg.subcode = subcode;
-	if (msg_data) {
-		if (is_ring_vector_msg)
-			memcpy(&req->msg.vector_id, msg_data, msg_len);
-		else
-			memcpy(&req->msg.data, msg_data, msg_len);
-	}
+	cmd = (struct hns3_mbx_vf_to_pf_cmd *)desc.data;
+	cmd->msg = *req;
 
 	/* synchronous send */
 	if (need_resp) {
-		req->mbx_need_resp |= HNS3_MBX_NEED_RESP_BIT;
+		cmd->mbx_need_resp |= HNS3_MBX_NEED_RESP_BIT;
 		rte_spinlock_lock(&hw->mbx_resp.lock);
-		hns3_mbx_prepare_resp(hw, code, subcode);
-		req->match_id = hw->mbx_resp.match_id;
+		hns3_mbx_prepare_resp(hw, req->code, req->subcode);
+		cmd->match_id = hw->mbx_resp.match_id;
 		ret = hns3_cmd_send(hw, &desc, 1);
 		if (ret) {
 			rte_spinlock_unlock(&hw->mbx_resp.lock);
@@ -165,7 +152,8 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
 			return ret;
 		}
 
-		ret = hns3_get_mbx_resp(hw, code, subcode, resp_data, resp_len);
+		ret = hns3_get_mbx_resp(hw, req->code, req->subcode,
+					resp_data, resp_len);
 		rte_spinlock_unlock(&hw->mbx_resp.lock);
 	} else {
 		/* asynchronous send */
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index 09780fcebd..2952b96ab6 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -208,7 +208,9 @@ struct hns3_pf_rst_done_cmd {
 
 struct hns3_hw;
 void hns3_dev_handle_mbx_msg(struct hns3_hw *hw);
-int hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
-		      const uint8_t *msg_data, uint8_t msg_len, bool need_resp,
-		      uint8_t *resp_data, uint16_t resp_len);
+void hns3vf_mbx_setup(struct hns3_vf_to_pf_msg *req,
+		      uint8_t code, uint8_t subcode);
+int hns3vf_mbx_send(struct hns3_hw *hw,
+		    struct hns3_vf_to_pf_msg *req_msg, bool need_resp,
+		    uint8_t *resp_data, uint16_t resp_len);
 #endif /* HNS3_MBX_H */
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 9d473dbc22..bbb3b305d1 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -686,13 +686,12 @@ tqp_reset_fail:
 static int
 hns3vf_reset_tqp(struct hns3_hw *hw, uint16_t queue_id)
 {
-	uint8_t msg_data[2];
+	struct hns3_vf_to_pf_msg req;
 	int ret;
 
-	memcpy(msg_data, &queue_id, sizeof(uint16_t));
-
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_QUEUE_RESET, 0, msg_data,
-				 sizeof(msg_data), true, NULL, 0);
+	hns3vf_mbx_setup(&req, HNS3_MBX_QUEUE_RESET, 0);
+	memcpy(req.data, &queue_id, sizeof(uint16_t));
+	ret = hns3vf_mbx_send(hw, &req, true, NULL, 0);
 	if (ret)
 		hns3_err(hw, "fail to reset tqp, queue_id = %u, ret = %d.",
 			 queue_id, ret);
@@ -769,15 +768,14 @@ static int
 hns3vf_reset_all_tqps(struct hns3_hw *hw)
 {
 #define HNS3VF_RESET_ALL_TQP_DONE	1U
+	struct hns3_vf_to_pf_msg req;
 	uint8_t reset_status;
-	uint8_t msg_data[2];
 	int ret;
 	uint16_t i;
 
-	memset(msg_data, 0, sizeof(msg_data));
-	ret = hns3_send_mbx_msg(hw, HNS3_MBX_QUEUE_RESET, 0, msg_data,
-				sizeof(msg_data), true, &reset_status,
-				sizeof(reset_status));
+	hns3vf_mbx_setup(&req, HNS3_MBX_QUEUE_RESET, 0);
+	ret = hns3vf_mbx_send(hw, &req, true,
+			      &reset_status, sizeof(reset_status));
 	if (ret) {
 		hns3_err(hw, "fail to send rcb reset mbx, ret = %d.", ret);
 		return ret;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:40.202968863 +0000
+++ 0063-net-hns3-refactor-send-mailbox-function.patch	2024-03-07 01:05:34.842940950 +0000
@@ -1 +1 @@
-From c9bd98d84587dbc0dddb8964ad3d7d54818aca01 Mon Sep 17 00:00:00 2001
+From 5371898fa5ba35e87feb8fd5892f6bada19be220 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c9bd98d84587dbc0dddb8964ad3d7d54818aca01 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 19e734ca8d..b0d0c29df1 100644
+index 2fdd684dcd..acf33db542 100644
@@ -30 +31 @@
-@@ -91,11 +91,13 @@ hns3vf_add_uc_mac_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -172,11 +172,13 @@ hns3vf_add_uc_mac_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
@@ -47 +48 @@
-@@ -110,12 +112,13 @@ hns3vf_remove_uc_mac_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -191,12 +193,13 @@ hns3vf_remove_uc_mac_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
@@ -65 +66 @@
-@@ -134,6 +137,7 @@ hns3vf_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -215,6 +218,7 @@ hns3vf_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -73 +74 @@
-@@ -146,9 +150,10 @@ hns3vf_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -227,9 +231,10 @@ hns3vf_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -87 +88 @@
-@@ -185,12 +190,13 @@ hns3vf_add_mc_mac_addr(struct hns3_hw *hw,
+@@ -266,12 +271,13 @@ hns3vf_add_mc_mac_addr(struct hns3_hw *hw,
@@ -105 +106 @@
-@@ -206,12 +212,13 @@ hns3vf_remove_mc_mac_addr(struct hns3_hw *hw,
+@@ -287,12 +293,13 @@ hns3vf_remove_mc_mac_addr(struct hns3_hw *hw,
@@ -123 +124 @@
-@@ -348,7 +355,6 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
+@@ -429,7 +436,6 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
@@ -131 +132 @@
-@@ -365,8 +371,7 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
+@@ -446,8 +452,7 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
@@ -141 +142 @@
-@@ -452,10 +457,12 @@ cfg_err:
+@@ -533,10 +538,12 @@ cfg_err:
@@ -156 +157 @@
-@@ -646,12 +653,13 @@ hns3vf_get_push_lsc_cap(struct hns3_hw *hw)
+@@ -727,12 +734,13 @@ hns3vf_get_push_lsc_cap(struct hns3_hw *hw)
@@ -172 +173 @@
-@@ -746,12 +754,13 @@ hns3vf_check_tqp_info(struct hns3_hw *hw)
+@@ -827,12 +835,13 @@ hns3vf_check_tqp_info(struct hns3_hw *hw)
@@ -189 +190 @@
-@@ -792,10 +801,12 @@ hns3vf_get_queue_info(struct hns3_hw *hw)
+@@ -873,10 +882,12 @@ hns3vf_get_queue_info(struct hns3_hw *hw)
@@ -204 +205 @@
-@@ -833,10 +844,11 @@ hns3vf_get_basic_info(struct hns3_hw *hw)
+@@ -914,10 +925,11 @@ hns3vf_get_basic_info(struct hns3_hw *hw)
@@ -218 +219 @@
-@@ -856,10 +868,11 @@ static int
+@@ -937,10 +949,11 @@ static int
@@ -232 +233 @@
-@@ -908,6 +921,7 @@ static void
+@@ -989,6 +1002,7 @@ static void
@@ -240 +241 @@
-@@ -919,8 +933,8 @@ hns3vf_request_link_info(struct hns3_hw *hw)
+@@ -1000,8 +1014,8 @@ hns3vf_request_link_info(struct hns3_hw *hw)
@@ -251 +252 @@
-@@ -964,16 +978,18 @@ hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status,
+@@ -1045,16 +1059,18 @@ hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status,
@@ -277 +278 @@
-@@ -1002,6 +1018,7 @@ hns3vf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+@@ -1083,6 +1099,7 @@ hns3vf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
@@ -285 +286 @@
-@@ -1009,9 +1026,10 @@ hns3vf_en_vlan_filter(struct hns3_hw *hw, bool enable)
+@@ -1090,9 +1107,10 @@ hns3vf_en_vlan_filter(struct hns3_hw *hw, bool enable)
@@ -299 +300 @@
-@@ -1022,12 +1040,15 @@ hns3vf_en_vlan_filter(struct hns3_hw *hw, bool enable)
+@@ -1103,12 +1121,15 @@ hns3vf_en_vlan_filter(struct hns3_hw *hw, bool enable)
@@ -317 +318 @@
-@@ -1171,11 +1192,13 @@ hns3vf_dev_configure_vlan(struct rte_eth_dev *dev)
+@@ -1252,11 +1273,13 @@ hns3vf_dev_configure_vlan(struct rte_eth_dev *dev)
@@ -333 +334 @@
-@@ -1183,11 +1206,12 @@ hns3vf_keep_alive_handler(void *param)
+@@ -1264,11 +1287,12 @@ hns3vf_keep_alive_handler(void *param)
@@ -348 +349 @@
-@@ -1326,9 +1350,11 @@ err_init_hardware:
+@@ -1407,9 +1431,11 @@ err_init_hardware:
@@ -363 +364 @@
-@@ -1797,12 +1823,13 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
+@@ -1878,12 +1904,13 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
@@ -481 +482 @@
-index 09b7e90c70..9087bcffed 100644
+index 9d473dbc22..bbb3b305d1 100644

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

* patch 'net/hns3: refactor handle mailbox function' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (61 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/hns3: refactor send mailbox function' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/hns3: fix VF multiple count on one reset' " luca.boccassi
                   ` (37 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From f644df1142f05b7d6903d7a3c73bf4b5bc6471a8 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 14:55:08 +0800
Subject: [PATCH] net/hns3: refactor handle mailbox function

[ upstream commit 277d522ae39f6c9daa38c5ad5d3b94f632f9cf49 ]

The mailbox messages of the PF and VF are processed in
the same function. The PF and VF call the same function
to process the messages. This code is excessive coupling
and isn't good for maintenance. Therefore, this patch
separates the interfaces that handle PF mailbox message
and handle VF mailbox message.

Fixes: 463e748964f5 ("net/hns3: support mailbox")
Fixes: 109e4dd1bd7a ("net/hns3: get link state change through mailbox")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    |  2 +-
 drivers/net/hns3/hns3_ethdev_vf.c |  4 +-
 drivers/net/hns3/hns3_mbx.c       | 69 ++++++++++++++++++++++++-------
 drivers/net/hns3/hns3_mbx.h       |  3 +-
 4 files changed, 58 insertions(+), 20 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 27f9dd2eb2..db596493db 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -384,7 +384,7 @@ hns3_interrupt_handler(void *param)
 		hns3_warn(hw, "received reset interrupt");
 		hns3_schedule_reset(hns);
 	} else if (event_cause == HNS3_VECTOR0_EVENT_MBX) {
-		hns3_dev_handle_mbx_msg(hw);
+		hns3pf_handle_mbx_msg(hw);
 	} else if (event_cause != HNS3_VECTOR0_EVENT_PTP) {
 		hns3_warn(hw, "received unknown event: vector0_int_stat:0x%x "
 			  "ras_int_stat:0x%x cmdq_int_stat:0x%x",
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index acf33db542..27b890b37f 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -699,7 +699,7 @@ hns3vf_interrupt_handler(void *param)
 		hns3_schedule_reset(hns);
 		break;
 	case HNS3VF_VECTOR0_EVENT_MBX:
-		hns3_dev_handle_mbx_msg(hw);
+		hns3vf_handle_mbx_msg(hw);
 		break;
 	default:
 		break;
@@ -751,7 +751,7 @@ hns3vf_get_push_lsc_cap(struct hns3_hw *hw)
 		 * driver has to actively handle the HNS3_MBX_LINK_STAT_CHANGE
 		 * mailbox from PF driver to get this capability.
 		 */
-		hns3_dev_handle_mbx_msg(hw);
+		hns3vf_handle_mbx_msg(hw);
 		if (__atomic_load_n(&vf->pf_push_lsc_cap, __ATOMIC_ACQUIRE) !=
 			HNS3_PF_PUSH_LSC_CAP_UNKNOWN)
 			break;
diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index 43195ff184..9cdbc1668a 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -78,7 +78,7 @@ hns3_get_mbx_resp(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
 			return -EIO;
 		}
 
-		hns3_dev_handle_mbx_msg(hw);
+		hns3vf_handle_mbx_msg(hw);
 		rte_delay_us(HNS3_WAIT_RESP_US);
 
 		if (hw->mbx_resp.received_match_resp)
@@ -372,9 +372,57 @@ scan_next:
 }
 
 void
-hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
+hns3pf_handle_mbx_msg(struct hns3_hw *hw)
+{
+	struct hns3_cmq_ring *crq = &hw->cmq.crq;
+	struct hns3_mbx_vf_to_pf_cmd *req;
+	struct hns3_cmd_desc *desc;
+	uint16_t flag;
+
+	rte_spinlock_lock(&hw->cmq.crq.lock);
+
+	while (!hns3_cmd_crq_empty(hw)) {
+		if (__atomic_load_n(&hw->reset.disable_cmd, __ATOMIC_RELAXED)) {
+			rte_spinlock_unlock(&hw->cmq.crq.lock);
+			return;
+		}
+		desc = &crq->desc[crq->next_to_use];
+		req = (struct hns3_mbx_vf_to_pf_cmd *)desc->data;
+
+		flag = rte_le_to_cpu_16(crq->desc[crq->next_to_use].flag);
+		if (unlikely(!hns3_get_bit(flag, HNS3_CMDQ_RX_OUTVLD_B))) {
+			hns3_warn(hw,
+				  "dropped invalid mailbox message, code = %u",
+				  req->msg.code);
+
+			/* dropping/not processing this invalid message */
+			crq->desc[crq->next_to_use].flag = 0;
+			hns3_mbx_ring_ptr_move_crq(crq);
+			continue;
+		}
+
+		switch (req->msg.code) {
+		case HNS3_MBX_PUSH_LINK_STATUS:
+			hns3pf_handle_link_change_event(hw, req);
+			break;
+		default:
+			hns3_err(hw, "received unsupported(%u) mbx msg",
+				 req->msg.code);
+			break;
+		}
+		crq->desc[crq->next_to_use].flag = 0;
+		hns3_mbx_ring_ptr_move_crq(crq);
+	}
+
+	/* Write back CMDQ_RQ header pointer, IMP need this pointer */
+	hns3_write_dev(hw, HNS3_CMDQ_RX_HEAD_REG, crq->next_to_use);
+
+	rte_spinlock_unlock(&hw->cmq.crq.lock);
+}
+
+void
+hns3vf_handle_mbx_msg(struct hns3_hw *hw)
 {
-	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	struct hns3_cmq_ring *crq = &hw->cmq.crq;
 	struct hns3_mbx_pf_to_vf_cmd *req;
 	struct hns3_cmd_desc *desc;
@@ -385,7 +433,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 	rte_spinlock_lock(&hw->cmq.crq.lock);
 
 	handle_out = (rte_eal_process_type() != RTE_PROC_PRIMARY ||
-		      !rte_thread_is_intr()) && hns->is_vf;
+		      !rte_thread_is_intr());
 	if (handle_out) {
 		/*
 		 * Currently, any threads in the primary and secondary processes
@@ -430,8 +478,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 			continue;
 		}
 
-		handle_out = hns->is_vf && desc->opcode == 0;
-		if (handle_out) {
+		if (desc->opcode == 0) {
 			/* Message already processed by other thread */
 			crq->desc[crq->next_to_use].flag = 0;
 			hns3_mbx_ring_ptr_move_crq(crq);
@@ -448,16 +495,6 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 		case HNS3_MBX_ASSERTING_RESET:
 			hns3_handle_asserting_reset(hw, req);
 			break;
-		case HNS3_MBX_PUSH_LINK_STATUS:
-			/*
-			 * This message is reported by the firmware and is
-			 * reported in 'struct hns3_mbx_vf_to_pf_cmd' format.
-			 * Therefore, we should cast the req variable to
-			 * 'struct hns3_mbx_vf_to_pf_cmd' and then process it.
-			 */
-			hns3pf_handle_link_change_event(hw,
-				(struct hns3_mbx_vf_to_pf_cmd *)req);
-			break;
 		case HNS3_MBX_PUSH_VLAN_INFO:
 			/*
 			 * When the PVID configuration status of VF device is
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index 2952b96ab6..2b6cb8f513 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -207,7 +207,8 @@ struct hns3_pf_rst_done_cmd {
 	((crq)->next_to_use = ((crq)->next_to_use + 1) % (crq)->desc_num)
 
 struct hns3_hw;
-void hns3_dev_handle_mbx_msg(struct hns3_hw *hw);
+void hns3pf_handle_mbx_msg(struct hns3_hw *hw);
+void hns3vf_handle_mbx_msg(struct hns3_hw *hw);
 void hns3vf_mbx_setup(struct hns3_vf_to_pf_msg *req,
 		      uint8_t code, uint8_t subcode);
 int hns3vf_mbx_send(struct hns3_hw *hw,
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:40.290128595 +0000
+++ 0064-net-hns3-refactor-handle-mailbox-function.patch	2024-03-07 01:05:34.854941205 +0000
@@ -1 +1 @@
-From 277d522ae39f6c9daa38c5ad5d3b94f632f9cf49 Mon Sep 17 00:00:00 2001
+From f644df1142f05b7d6903d7a3c73bf4b5bc6471a8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 277d522ae39f6c9daa38c5ad5d3b94f632f9cf49 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index ae81368f68..bccd9db0dd 100644
+index 27f9dd2eb2..db596493db 100644
@@ -30 +31 @@
-@@ -380,7 +380,7 @@ hns3_interrupt_handler(void *param)
+@@ -384,7 +384,7 @@ hns3_interrupt_handler(void *param)
@@ -40 +41 @@
-index b0d0c29df1..f5a7a2b1f4 100644
+index acf33db542..27b890b37f 100644
@@ -43 +44 @@
-@@ -618,7 +618,7 @@ hns3vf_interrupt_handler(void *param)
+@@ -699,7 +699,7 @@ hns3vf_interrupt_handler(void *param)
@@ -52 +53 @@
-@@ -670,7 +670,7 @@ hns3vf_get_push_lsc_cap(struct hns3_hw *hw)
+@@ -751,7 +751,7 @@ hns3vf_get_push_lsc_cap(struct hns3_hw *hw)

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

* patch 'net/hns3: fix VF multiple count on one reset' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (62 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/hns3: refactor handle " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/hns3: fix disable command with firmware' " luca.boccassi
                   ` (36 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From cfeb27992c31cb8048cd1247162d452a04765d15 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 15:44:14 +0800
Subject: [PATCH] net/hns3: fix VF multiple count on one reset

[ upstream commit 072a07a9dcbd604b1983bf2cb266d3dd4dc89824 ]

There are two ways for the hns3 VF driver to know reset event, namely,
interrupt task and periodic detection task. For the latter, the real
reset process will delay several microseconds to execute. Both tasks
cause the count to increase by 1.

However, the periodic detection task also detects a reset event A
after interrupt task receive a reset event A. As a result, the reset
count will be double.

So this patch adds the comparison of reset level for VF in case of the
multiple reset count.

Fixes: a5475d61fa34 ("net/hns3: support VF")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 44 ++++++++++++++++++++-----------
 1 file changed, 29 insertions(+), 15 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 27b890b37f..9e5d69f485 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -650,13 +650,8 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
 		val = hns3_read_dev(hw, HNS3_VF_RST_ING);
 		hns3_write_dev(hw, HNS3_VF_RST_ING, val | HNS3_VF_RST_ING_BIT);
 		val = cmdq_stat_reg & ~BIT(HNS3_VECTOR0_RST_INT_B);
-		if (clearval) {
-			hw->reset.stats.global_cnt++;
-			hns3_warn(hw, "Global reset detected, clear reset status");
-		} else {
-			hns3_schedule_delayed_reset(hns);
-			hns3_warn(hw, "Global reset detected, don't clear reset status");
-		}
+		hw->reset.stats.global_cnt++;
+		hns3_warn(hw, "Global reset detected, clear reset status");
 
 		ret = HNS3VF_VECTOR0_EVENT_RST;
 		goto out;
@@ -671,9 +666,9 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
 
 	val = 0;
 	ret = HNS3VF_VECTOR0_EVENT_OTHER;
+
 out:
-	if (clearval)
-		*clearval = val;
+	*clearval = val;
 	return ret;
 }
 
@@ -1812,11 +1807,25 @@ is_vf_reset_done(struct hns3_hw *hw)
 	return true;
 }
 
+static enum hns3_reset_level
+hns3vf_detect_reset_event(struct hns3_hw *hw)
+{
+	enum hns3_reset_level reset = HNS3_NONE_RESET;
+	uint32_t cmdq_stat_reg;
+
+	cmdq_stat_reg = hns3_read_dev(hw, HNS3_VECTOR0_CMDQ_STAT_REG);
+	if (BIT(HNS3_VECTOR0_RST_INT_B) & cmdq_stat_reg)
+		reset = HNS3_VF_RESET;
+
+	return reset;
+}
+
 bool
 hns3vf_is_reset_pending(struct hns3_adapter *hns)
 {
+	enum hns3_reset_level last_req;
 	struct hns3_hw *hw = &hns->hw;
-	enum hns3_reset_level reset;
+	enum hns3_reset_level new_req;
 
 	/*
 	 * According to the protocol of PCIe, FLR to a PF device resets the PF
@@ -1839,13 +1848,18 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return false;
 
-	hns3vf_check_event_cause(hns, NULL);
-	reset = hns3vf_get_reset_level(hw, &hw->reset.pending);
-	if (hw->reset.level != HNS3_NONE_RESET && reset != HNS3_NONE_RESET &&
-	    hw->reset.level < reset) {
-		hns3_warn(hw, "High level reset %d is pending", reset);
+	new_req = hns3vf_detect_reset_event(hw);
+	if (new_req == HNS3_NONE_RESET)
+		return false;
+
+	last_req = hns3vf_get_reset_level(hw, &hw->reset.pending);
+	if (last_req == HNS3_NONE_RESET || last_req < new_req) {
+		__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
+		hns3_schedule_delayed_reset(hns);
+		hns3_warn(hw, "High level reset detected, delay do reset");
 		return true;
 	}
+
 	return false;
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:40.379603113 +0000
+++ 0065-net-hns3-fix-VF-multiple-count-on-one-reset.patch	2024-03-07 01:05:34.858941290 +0000
@@ -1 +1 @@
-From 072a07a9dcbd604b1983bf2cb266d3dd4dc89824 Mon Sep 17 00:00:00 2001
+From cfeb27992c31cb8048cd1247162d452a04765d15 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 072a07a9dcbd604b1983bf2cb266d3dd4dc89824 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index f5a7a2b1f4..83d3d66005 100644
+index 27b890b37f..9e5d69f485 100644
@@ -31 +32 @@
-@@ -569,13 +569,8 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
+@@ -650,13 +650,8 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
@@ -47 +48 @@
-@@ -590,9 +585,9 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
+@@ -671,9 +666,9 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
@@ -59 +60 @@
-@@ -1731,11 +1726,25 @@ is_vf_reset_done(struct hns3_hw *hw)
+@@ -1812,11 +1807,25 @@ is_vf_reset_done(struct hns3_hw *hw)
@@ -86 +87 @@
-@@ -1758,13 +1767,18 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
+@@ -1839,13 +1848,18 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)

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

* patch 'net/hns3: fix disable command with firmware' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (63 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/hns3: fix VF multiple count on one reset' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/hns3: fix reset level comparison' " luca.boccassi
                   ` (35 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From d043fdd66e0d10b03da444a9546a6a87f34dc977 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 15:44:15 +0800
Subject: [PATCH] net/hns3: fix disable command with firmware

[ upstream commit 66048270a49088f79c2a020bd28ee0a93c4a73ed ]

Disable command only when need to delay handle reset.
This patch fixes it.

Fixes: 5be38fc6c0fc ("net/hns3: fix multiple reset detected log")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index db596493db..d34094c9a5 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5586,18 +5586,16 @@ hns3_detect_reset_event(struct hns3_hw *hw)
 
 	last_req = hns3_get_reset_level(hns, &hw->reset.pending);
 	vector0_intr_state = hns3_read_dev(hw, HNS3_VECTOR0_OTHER_INT_STS_REG);
-	if (BIT(HNS3_VECTOR0_IMPRESET_INT_B) & vector0_intr_state) {
-		__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
+	if (BIT(HNS3_VECTOR0_IMPRESET_INT_B) & vector0_intr_state)
 		new_req = HNS3_IMP_RESET;
-	} else if (BIT(HNS3_VECTOR0_GLOBALRESET_INT_B) & vector0_intr_state) {
-		__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
+	else if (BIT(HNS3_VECTOR0_GLOBALRESET_INT_B) & vector0_intr_state)
 		new_req = HNS3_GLOBAL_RESET;
-	}
 
 	if (new_req == HNS3_NONE_RESET)
 		return HNS3_NONE_RESET;
 
 	if (last_req == HNS3_NONE_RESET || last_req < new_req) {
+		__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
 		hns3_schedule_delayed_reset(hns);
 		hns3_warn(hw, "High level reset detected, delay do reset");
 	}
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:40.458051958 +0000
+++ 0066-net-hns3-fix-disable-command-with-firmware.patch	2024-03-07 01:05:34.870941544 +0000
@@ -1 +1 @@
-From 66048270a49088f79c2a020bd28ee0a93c4a73ed Mon Sep 17 00:00:00 2001
+From d043fdd66e0d10b03da444a9546a6a87f34dc977 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 66048270a49088f79c2a020bd28ee0a93c4a73ed ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index bccd9db0dd..d626bdd5b1 100644
+index db596493db..d34094c9a5 100644
@@ -22 +23 @@
-@@ -5552,18 +5552,16 @@ hns3_detect_reset_event(struct hns3_hw *hw)
+@@ -5586,18 +5586,16 @@ hns3_detect_reset_event(struct hns3_hw *hw)

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

* patch 'net/hns3: fix reset level comparison' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (64 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/hns3: fix disable command with firmware' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/hns3: remove QinQ insert support for VF' " luca.boccassi
                   ` (34 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 75120a950ee642ff0ad1b5e0abbfff9988bb9aa7 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 8 Dec 2023 15:44:16 +0800
Subject: [PATCH] net/hns3: fix reset level comparison

[ upstream commit 1ceb5ad2dfdcc3e6658119d25253bced5be3cc32 ]

Currently, there are two problems in hns3vf_is_reset_pending():
1. The new detect reset level is not HNS3_NONE_RESET, but the
   last reset level is HNS3_NONE_RESET, this function returns false.
2. Comparison between last_req and new_req is opposite.

In addition, the reset level comparison in hns3_detect_reset_event()
is similar to the hns3vf_is_reset_pending(). So this patch fixes
above the problems and merges the logic of reset level comparison.

Fixes: 5be38fc6c0fc ("net/hns3: fix multiple reset detected log")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index d34094c9a5..eb4223305a 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5579,27 +5579,15 @@ is_pf_reset_done(struct hns3_hw *hw)
 static enum hns3_reset_level
 hns3_detect_reset_event(struct hns3_hw *hw)
 {
-	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	enum hns3_reset_level new_req = HNS3_NONE_RESET;
-	enum hns3_reset_level last_req;
 	uint32_t vector0_intr_state;
 
-	last_req = hns3_get_reset_level(hns, &hw->reset.pending);
 	vector0_intr_state = hns3_read_dev(hw, HNS3_VECTOR0_OTHER_INT_STS_REG);
 	if (BIT(HNS3_VECTOR0_IMPRESET_INT_B) & vector0_intr_state)
 		new_req = HNS3_IMP_RESET;
 	else if (BIT(HNS3_VECTOR0_GLOBALRESET_INT_B) & vector0_intr_state)
 		new_req = HNS3_GLOBAL_RESET;
 
-	if (new_req == HNS3_NONE_RESET)
-		return HNS3_NONE_RESET;
-
-	if (last_req == HNS3_NONE_RESET || last_req < new_req) {
-		__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
-		hns3_schedule_delayed_reset(hns);
-		hns3_warn(hw, "High level reset detected, delay do reset");
-	}
-
 	return new_req;
 }
 
@@ -5618,10 +5606,14 @@ hns3_is_reset_pending(struct hns3_adapter *hns)
 		return false;
 
 	new_req = hns3_detect_reset_event(hw);
+	if (new_req == HNS3_NONE_RESET)
+		return false;
+
 	last_req = hns3_get_reset_level(hns, &hw->reset.pending);
-	if (last_req != HNS3_NONE_RESET && new_req != HNS3_NONE_RESET &&
-	    new_req < last_req) {
-		hns3_warn(hw, "High level reset %d is pending", last_req);
+	if (last_req == HNS3_NONE_RESET || last_req < new_req) {
+		__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);
+		hns3_schedule_delayed_reset(hns);
+		hns3_warn(hw, "High level reset detected, delay do reset");
 		return true;
 	}
 	last_req = hns3_get_reset_level(hns, &hw->reset.request);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:40.542755121 +0000
+++ 0067-net-hns3-fix-reset-level-comparison.patch	2024-03-07 01:05:34.882941799 +0000
@@ -1 +1 @@
-From 1ceb5ad2dfdcc3e6658119d25253bced5be3cc32 Mon Sep 17 00:00:00 2001
+From 75120a950ee642ff0ad1b5e0abbfff9988bb9aa7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1ceb5ad2dfdcc3e6658119d25253bced5be3cc32 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index d626bdd5b1..eafcf2c6f6 100644
+index d34094c9a5..eb4223305a 100644
@@ -28 +29 @@
-@@ -5545,27 +5545,15 @@ is_pf_reset_done(struct hns3_hw *hw)
+@@ -5579,27 +5579,15 @@ is_pf_reset_done(struct hns3_hw *hw)
@@ -56 +57 @@
-@@ -5584,10 +5572,14 @@ hns3_is_reset_pending(struct hns3_adapter *hns)
+@@ -5618,10 +5606,14 @@ hns3_is_reset_pending(struct hns3_adapter *hns)

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

* patch 'net/hns3: remove QinQ insert support for VF' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (65 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/hns3: fix reset level comparison' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'doc: add --latencystats option in testpmd guide' " luca.boccassi
                   ` (33 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 1822aa59aff6c2b7b3ad69cc50a543fe928a0ef4 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 28 Dec 2023 20:14:28 +0800
Subject: [PATCH] net/hns3: remove QinQ insert support for VF

[ upstream commit f6e79b8d3968150736499bc225762b62fbf1b768 ]

In the HIP08 platform, the PF driver will notify VF driver to update
the PVID state [1], and VF will declare support QinQ insert when PVID
is disabled.

In the later platform (e.g. HIP09), the hardware has been improved,
so the PF driver will NOT notify VF driver to update the PVID state.

However, the later platform still have constraint: PVID and QinQ insert
cannot be enabled at the same time, otherwise, the hardware discards
packets and reports an error interrupt.

Plus, as far as we known, VF driver's users don't use the QinQ insert.

Therefore, we declare that the VF driver don't support QinQ insert.

[1] commit b4e4d7ac9f09 ("net/hns3: support setting VF PVID by PF driver")

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

diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index 5d9df03733..119c930b1a 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -84,7 +84,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 				 RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE |
 				 RTE_ETH_TX_OFFLOAD_VLAN_INSERT);
 
-	if (!hw->port_base_vlan_cfg.state)
+	if (!hns->is_vf && !hw->port_base_vlan_cfg.state)
 		info->tx_offload_capa |= RTE_ETH_TX_OFFLOAD_QINQ_INSERT;
 
 	if (hns3_dev_get_support(hw, OUTER_UDP_CKSUM))
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:40.624910859 +0000
+++ 0068-net-hns3-remove-QinQ-insert-support-for-VF.patch	2024-03-07 01:05:34.882941799 +0000
@@ -1 +1 @@
-From f6e79b8d3968150736499bc225762b62fbf1b768 Mon Sep 17 00:00:00 2001
+From 1822aa59aff6c2b7b3ad69cc50a543fe928a0ef4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f6e79b8d3968150736499bc225762b62fbf1b768 ]
+
@@ -23,2 +24,0 @@
-Cc: stable@dpdk.org
-
@@ -32 +32 @@
-index 8f224aa00c..28c26b049c 100644
+index 5d9df03733..119c930b1a 100644
@@ -35 +35 @@
-@@ -85,7 +85,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+@@ -84,7 +84,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)

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

* patch 'doc: add --latencystats option in testpmd guide' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (66 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/hns3: remove QinQ insert support for VF' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'app/testpmd: hide --bitrate-stats in help if disabled' " luca.boccassi
                   ` (32 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From f3e5b61f91326ce49a3dd984eb952b93a063454b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 9 Jan 2024 15:08:49 -0800
Subject: [PATCH] doc: add --latencystats option in testpmd guide

[ upstream commit 8cd8f0a90bba2862d8044529e11276d6f6321192 ]

Option was added but never added to documentation.

Fixes: 62d3216d6194 ("app/testpmd: add latency statistics calculation")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 doc/guides/testpmd_app_ug/run_app.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index 074f910fc9..954e084fe5 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -418,6 +418,10 @@ The command line options are:
 
     Set the logical core N to perform bitrate calculation.
 
+*   ``--latencystats=N``
+
+    Set the logical core N to perform latency and jitter calculations.
+
 *   ``--print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|dev_probed|dev_released|flow_aged|err_recovering|recovery_success|recovery_failed|all>``
 
     Enable printing the occurrence of the designated event. Using all will
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:40.703132899 +0000
+++ 0069-doc-add-latencystats-option-in-testpmd-guide.patch	2024-03-07 01:05:34.886941884 +0000
@@ -1 +1 @@
-From 8cd8f0a90bba2862d8044529e11276d6f6321192 Mon Sep 17 00:00:00 2001
+From f3e5b61f91326ce49a3dd984eb952b93a063454b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8cd8f0a90bba2862d8044529e11276d6f6321192 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 24a086401e..1a9b812a7f 100644
+index 074f910fc9..954e084fe5 100644
@@ -21 +22 @@
-@@ -422,6 +422,10 @@ The command line options are:
+@@ -418,6 +418,10 @@ The command line options are:

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

* patch 'app/testpmd: hide --bitrate-stats in help if disabled' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (67 preceding siblings ...)
  2024-03-07  1:31 ` patch 'doc: add --latencystats option in testpmd guide' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/vmxnet3: fix initialization on FreeBSD' " luca.boccassi
                   ` (31 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 6d4646c0f7a0970c20ae9a1cca68d93b11df7815 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 9 Jan 2024 15:09:27 -0800
Subject: [PATCH] app/testpmd: hide --bitrate-stats in help if disabled

[ upstream commit e96491cb91fd048a79e848d713d65d45f0dde915 ]

Like other #ifdef options, bitrate-stats should not be printed
in help if not configured.

Also reordered latencystats help string to group it with bitrate-stats.

Fixes: e25e6c70fb56 ("app/testpmd: add --bitrate-stats option")

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

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index d597c209ba..cddcdef045 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -100,10 +100,6 @@ usage(char* progname)
 	       "of peer ports.\n");
 	printf("  --eth-peer=X,M:M:M:M:M:M: set the MAC address of the X peer "
 	       "port (0 <= X < %d).\n", RTE_MAX_ETHPORTS);
-#endif
-#ifdef RTE_LIB_LATENCYSTATS
-	printf("  --latencystats=N: enable latency and jitter statistics "
-	       "monitoring on forwarding lcore id N.\n");
 #endif
 	printf("  --disable-crc-strip: disable CRC stripping by hardware.\n");
 	printf("  --enable-scatter: enable scattered Rx.\n");
@@ -167,8 +163,14 @@ usage(char* progname)
 	printf("  --disable-device-start: do not automatically start port\n");
 	printf("  --no-lsc-interrupt: disable link status change interrupt.\n");
 	printf("  --no-rmv-interrupt: disable device removal interrupt.\n");
+#ifdef RTE_LIB_BITRATESTATS
 	printf("  --bitrate-stats=N: set the logical core N to perform "
 		"bit-rate calculation.\n");
+#endif
+#ifdef RTE_LIB_LATENCYSTATS
+	printf("  --latencystats=N: enable latency and jitter statistics "
+	       "monitoring on forwarding lcore id N.\n");
+#endif
 	printf("  --print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|flow_aged|err_recovering|recovery_success|recovery_failed|all>: "
 	       "enable print of designated event or all of them.\n");
 	printf("  --mask-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|flow_aged|err_recovering|recovery_success|recovery_failed||all>: "
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:40.779703338 +0000
+++ 0070-app-testpmd-hide-bitrate-stats-in-help-if-disabled.patch	2024-03-07 01:05:34.886941884 +0000
@@ -1 +1 @@
-From e96491cb91fd048a79e848d713d65d45f0dde915 Mon Sep 17 00:00:00 2001
+From 6d4646c0f7a0970c20ae9a1cca68d93b11df7815 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e96491cb91fd048a79e848d713d65d45f0dde915 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index a9ca58339d..11b0cce577 100644
+index d597c209ba..cddcdef045 100644

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

* patch 'net/vmxnet3: fix initialization on FreeBSD' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (68 preceding siblings ...)
  2024-03-07  1:31 ` patch 'app/testpmd: hide --bitrate-stats in help if disabled' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/mana: prevent values overflow returned from RDMA layer' " luca.boccassi
                   ` (30 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Lewis Donzis, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From ef5454bbaba90d752c56fdde49c40d2b240c6c87 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 9 Jan 2024 14:23:43 +0000
Subject: [PATCH] net/vmxnet3: fix initialization on FreeBSD

[ upstream commit 40d5676ff1ea43cc2c121fd66d19a29a1c9107bb ]

DPDK does not support interrupts on FreeBSD, so the vmxnet3 driver
returns error when enabling interrupts as it initializes. We can fix
this by #ifdef'ing out the interrupt calls when building for FreeBSD,
allowing the driver to initialize correctly.

Fixes: 046f11619567 ("net/vmxnet3: support MSI-X interrupt")

Reported-by: Lewis Donzis <lew@perftech.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Lewis Donzis <lew@perftech.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap                             | 1 +
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/.mailmap b/.mailmap
index 0af93036f2..841097364c 100644
--- a/.mailmap
+++ b/.mailmap
@@ -754,6 +754,7 @@ Leszek Zygo <leszek.zygo@intel.com>
 Levend Sayar <levendsayar@gmail.com>
 Lev Faerman <lev.faerman@intel.com>
 Lewei Yang <leweix.yang@intel.com>
+Lewis Donzis <lew@perftech.com>
 Leyi Rong <leyi.rong@intel.com>
 Liang Ma <liangma@bytedance.com> <liangma@liangbit.com> <liang.j.ma@intel.com>
 Liang-Min Larry Wang <liang-min.wang@intel.com>
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index a0959b0c80..9f9d8473e0 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -257,6 +257,7 @@ vmxnet3_disable_all_intrs(struct vmxnet3_hw *hw)
 		vmxnet3_disable_intr(hw, i);
 }
 
+#ifndef RTE_EXEC_ENV_FREEBSD
 /*
  * Enable all intrs used by the device
  */
@@ -280,6 +281,7 @@ vmxnet3_enable_all_intrs(struct vmxnet3_hw *hw)
 			vmxnet3_enable_intr(hw, i);
 	}
 }
+#endif
 
 /*
  * Gets tx data ring descriptor size.
@@ -1036,6 +1038,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
 	/* Setting proper Rx Mode and issue Rx Mode Update command */
 	vmxnet3_dev_set_rxmode(hw, VMXNET3_RXM_UCAST | VMXNET3_RXM_BCAST, 1);
 
+#ifndef RTE_EXEC_ENV_FREEBSD
 	/* Setup interrupt callback  */
 	rte_intr_callback_register(dev->intr_handle,
 				   vmxnet3_interrupt_handler, dev);
@@ -1047,6 +1050,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
 
 	/* enable all intrs */
 	vmxnet3_enable_all_intrs(hw);
+#endif
 
 	vmxnet3_process_events(dev);
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:40.855423967 +0000
+++ 0071-net-vmxnet3-fix-initialization-on-FreeBSD.patch	2024-03-07 01:05:34.894942054 +0000
@@ -1 +1 @@
-From 40d5676ff1ea43cc2c121fd66d19a29a1c9107bb Mon Sep 17 00:00:00 2001
+From ef5454bbaba90d752c56fdde49c40d2b240c6c87 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 40d5676ff1ea43cc2c121fd66d19a29a1c9107bb ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index d85e074fbd..32ff4ceb4b 100644
+index 0af93036f2..841097364c 100644
@@ -27 +28 @@
-@@ -786,6 +786,7 @@ Leszek Zygo <leszek.zygo@intel.com>
+@@ -754,6 +754,7 @@ Leszek Zygo <leszek.zygo@intel.com>
@@ -36 +37 @@
-index b239ea3ede..1e6febb092 100644
+index a0959b0c80..9f9d8473e0 100644
@@ -39 +40 @@
-@@ -258,6 +258,7 @@ vmxnet3_disable_all_intrs(struct vmxnet3_hw *hw)
+@@ -257,6 +257,7 @@ vmxnet3_disable_all_intrs(struct vmxnet3_hw *hw)
@@ -47 +48 @@
-@@ -281,6 +282,7 @@ vmxnet3_enable_all_intrs(struct vmxnet3_hw *hw)
+@@ -280,6 +281,7 @@ vmxnet3_enable_all_intrs(struct vmxnet3_hw *hw)
@@ -55 +56 @@
-@@ -1130,6 +1132,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
+@@ -1036,6 +1038,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
@@ -63 +64 @@
-@@ -1141,6 +1144,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
+@@ -1047,6 +1050,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)

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

* patch 'net/mana: prevent values overflow returned from RDMA layer' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (69 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/vmxnet3: fix initialization on FreeBSD' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'drivers/net: fix buffer overflow for packet types list' " luca.boccassi
                   ` (29 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From d3273299a7566f6396d4a49f2e2f4c9fa8a21636 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Thu, 18 Jan 2024 10:05:37 -0800
Subject: [PATCH] net/mana: prevent values overflow returned from RDMA layer

[ upstream commit b7e79896c47e9b884eaed1bac439f84250fd959f ]

The device capabilities reported from RDMA layer are in int. Those
values can overflow with the data types defined in dev_info_get().

Fix this by doing a upper bound before returning those values.

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

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/mana.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index 896b53ed35..eb3b734949 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -292,8 +292,8 @@ mana_dev_info_get(struct rte_eth_dev *dev,
 	dev_info->min_rx_bufsize = MIN_RX_BUF_SIZE;
 	dev_info->max_rx_pktlen = MAX_FRAME_SIZE;
 
-	dev_info->max_rx_queues = priv->max_rx_queues;
-	dev_info->max_tx_queues = priv->max_tx_queues;
+	dev_info->max_rx_queues = RTE_MIN(priv->max_rx_queues, UINT16_MAX);
+	dev_info->max_tx_queues = RTE_MIN(priv->max_tx_queues, UINT16_MAX);
 
 	dev_info->max_mac_addrs = MANA_MAX_MAC_ADDR;
 	dev_info->max_hash_mac_addrs = 0;
@@ -334,16 +334,20 @@ mana_dev_info_get(struct rte_eth_dev *dev,
 
 	/* Buffer limits */
 	dev_info->rx_desc_lim.nb_min = MIN_BUFFERS_PER_QUEUE;
-	dev_info->rx_desc_lim.nb_max = priv->max_rx_desc;
+	dev_info->rx_desc_lim.nb_max = RTE_MIN(priv->max_rx_desc, UINT16_MAX);
 	dev_info->rx_desc_lim.nb_align = MIN_BUFFERS_PER_QUEUE;
-	dev_info->rx_desc_lim.nb_seg_max = priv->max_recv_sge;
-	dev_info->rx_desc_lim.nb_mtu_seg_max = priv->max_recv_sge;
+	dev_info->rx_desc_lim.nb_seg_max =
+		RTE_MIN(priv->max_recv_sge, UINT16_MAX);
+	dev_info->rx_desc_lim.nb_mtu_seg_max =
+		RTE_MIN(priv->max_recv_sge, UINT16_MAX);
 
 	dev_info->tx_desc_lim.nb_min = MIN_BUFFERS_PER_QUEUE;
-	dev_info->tx_desc_lim.nb_max = priv->max_tx_desc;
+	dev_info->tx_desc_lim.nb_max = RTE_MIN(priv->max_tx_desc, UINT16_MAX);
 	dev_info->tx_desc_lim.nb_align = MIN_BUFFERS_PER_QUEUE;
-	dev_info->tx_desc_lim.nb_seg_max = priv->max_send_sge;
-	dev_info->rx_desc_lim.nb_mtu_seg_max = priv->max_recv_sge;
+	dev_info->tx_desc_lim.nb_seg_max =
+		RTE_MIN(priv->max_send_sge, UINT16_MAX);
+	dev_info->tx_desc_lim.nb_mtu_seg_max =
+		RTE_MIN(priv->max_send_sge, UINT16_MAX);
 
 	/* Speed */
 	dev_info->speed_capa = RTE_ETH_LINK_SPEED_100G;
@@ -1290,9 +1294,9 @@ mana_probe_port(struct ibv_device *ibdev, struct ibv_device_attr_ex *dev_attr,
 	priv->max_mr = dev_attr->orig_attr.max_mr;
 	priv->max_mr_size = dev_attr->orig_attr.max_mr_size;
 
-	DRV_LOG(INFO, "dev %s max queues %d desc %d sge %d",
+	DRV_LOG(INFO, "dev %s max queues %d desc %d sge %d mr %" PRIu64,
 		name, priv->max_rx_queues, priv->max_rx_desc,
-		priv->max_send_sge);
+		priv->max_send_sge, priv->max_mr_size);
 
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:40.937231526 +0000
+++ 0072-net-mana-prevent-values-overflow-returned-from-RDMA-.patch	2024-03-07 01:05:34.894942054 +0000
@@ -1 +1 @@
-From b7e79896c47e9b884eaed1bac439f84250fd959f Mon Sep 17 00:00:00 2001
+From d3273299a7566f6396d4a49f2e2f4c9fa8a21636 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b7e79896c47e9b884eaed1bac439f84250fd959f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 781ed76139..58257c971e 100644
+index 896b53ed35..eb3b734949 100644
@@ -23 +24 @@
-@@ -296,8 +296,8 @@ mana_dev_info_get(struct rte_eth_dev *dev,
+@@ -292,8 +292,8 @@ mana_dev_info_get(struct rte_eth_dev *dev,
@@ -25 +26 @@
- 	dev_info->max_rx_pktlen = MANA_MAX_MTU + RTE_ETHER_HDR_LEN;
+ 	dev_info->max_rx_pktlen = MAX_FRAME_SIZE;
@@ -34 +35 @@
-@@ -338,16 +338,20 @@ mana_dev_info_get(struct rte_eth_dev *dev,
+@@ -334,16 +334,20 @@ mana_dev_info_get(struct rte_eth_dev *dev,
@@ -61 +62 @@
-@@ -1385,9 +1389,9 @@ mana_probe_port(struct ibv_device *ibdev, struct ibv_device_attr_ex *dev_attr,
+@@ -1290,9 +1294,9 @@ mana_probe_port(struct ibv_device *ibdev, struct ibv_device_attr_ex *dev_attr,

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

* patch 'drivers/net: fix buffer overflow for packet types list' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (70 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/mana: prevent values overflow returned from RDMA layer' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'app/testpmd: fix crash in multi-process forwarding' " luca.boccassi
                   ` (28 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Sivaramakrishnan Venkat; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From cf7a7b8134aff34f26576c87c4f202a0ae3ad950 Mon Sep 17 00:00:00 2001
From: Sivaramakrishnan Venkat <venkatx.sivaramakrishnan@intel.com>
Date: Thu, 1 Feb 2024 15:50:20 +0000
Subject: [PATCH] drivers/net: fix buffer overflow for packet types list

[ upstream commit 2e3ddb568044308b40f60fdb2ddc62160b95b1b1 ]

Address Sanitizer detects a buffer overflow caused by an incorrect
ptypes list. Missing "RTE_PTYPE_UNKNOWN" ptype causes buffer overflow.
Fix the ptypes list for drivers.

Fixes: 0849ac3b6122 ("net/tap: add packet type management")
Fixes: a7bdc3bd4244 ("net/dpaa: support packet type parsing")
Fixes: 4ccc8d770d3b ("net/mvneta: add PMD skeleton")
Fixes: f3f0d77db6b0 ("net/mrvl: support packet type parsing")
Fixes: 71e8bb65046e ("net/nfp: update supported list of packet types")
Fixes: 659b494d3d88 ("net/pfe: add packet types and basic statistics")
Fixes: 398a1be14168 ("net/thunderx: remove generic passX references")

Signed-off-by: Sivaramakrishnan Venkat <venkatx.sivaramakrishnan@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/dpaa/dpaa_ethdev.c      | 3 ++-
 drivers/net/mvneta/mvneta_ethdev.c  | 3 ++-
 drivers/net/mvpp2/mrvl_ethdev.c     | 3 ++-
 drivers/net/pfe/pfe_ethdev.c        | 3 ++-
 drivers/net/tap/rte_eth_tap.c       | 1 +
 drivers/net/thunderx/nicvf_ethdev.c | 2 ++
 6 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index ef4c06db6a..779bdc5860 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -363,7 +363,8 @@ dpaa_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_L4_TCP,
 		RTE_PTYPE_L4_UDP,
 		RTE_PTYPE_L4_SCTP,
-		RTE_PTYPE_TUNNEL_ESP
+		RTE_PTYPE_TUNNEL_ESP,
+		RTE_PTYPE_UNKNOWN
 	};
 
 	PMD_INIT_FUNC_TRACE();
diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index ab643709ee..f281d1d7f8 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -198,7 +198,8 @@ mvneta_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
 		RTE_PTYPE_L3_IPV4,
 		RTE_PTYPE_L3_IPV6,
 		RTE_PTYPE_L4_TCP,
-		RTE_PTYPE_L4_UDP
+		RTE_PTYPE_L4_UDP,
+		RTE_PTYPE_UNKNOWN
 	};
 
 	return ptypes;
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 177b8165f3..15083d249c 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -1777,7 +1777,8 @@ mrvl_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
 		RTE_PTYPE_L3_IPV6_EXT,
 		RTE_PTYPE_L2_ETHER_ARP,
 		RTE_PTYPE_L4_TCP,
-		RTE_PTYPE_L4_UDP
+		RTE_PTYPE_L4_UDP,
+		RTE_PTYPE_UNKNOWN
 	};
 
 	return ptypes;
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index 551f3cf193..0073dd7405 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -520,7 +520,8 @@ pfe_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_L3_IPV6_EXT,
 		RTE_PTYPE_L4_TCP,
 		RTE_PTYPE_L4_UDP,
-		RTE_PTYPE_L4_SCTP
+		RTE_PTYPE_L4_SCTP,
+		RTE_PTYPE_UNKNOWN
 	};
 
 	if (dev->rx_pkt_burst == pfe_recv_pkts ||
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 2fd46c6b0b..a6bf6eec55 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1862,6 +1862,7 @@ tap_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
 		RTE_PTYPE_L4_UDP,
 		RTE_PTYPE_L4_TCP,
 		RTE_PTYPE_L4_SCTP,
+		RTE_PTYPE_UNKNOWN
 	};
 
 	return ptypes;
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index ab1e714d97..dd77a6c7fd 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -392,12 +392,14 @@ nicvf_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_L4_TCP,
 		RTE_PTYPE_L4_UDP,
 		RTE_PTYPE_L4_FRAG,
+		RTE_PTYPE_UNKNOWN
 	};
 	static const uint32_t ptypes_tunnel[] = {
 		RTE_PTYPE_TUNNEL_GRE,
 		RTE_PTYPE_TUNNEL_GENEVE,
 		RTE_PTYPE_TUNNEL_VXLAN,
 		RTE_PTYPE_TUNNEL_NVGRE,
+		RTE_PTYPE_UNKNOWN
 	};
 	static const uint32_t ptypes_end = RTE_PTYPE_UNKNOWN;
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.013706382 +0000
+++ 0073-drivers-net-fix-buffer-overflow-for-packet-types-lis.patch	2024-03-07 01:05:34.910942393 +0000
@@ -1 +1 @@
-From 2e3ddb568044308b40f60fdb2ddc62160b95b1b1 Mon Sep 17 00:00:00 2001
+From cf7a7b8134aff34f26576c87c4f202a0ae3ad950 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2e3ddb568044308b40f60fdb2ddc62160b95b1b1 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +25,0 @@
- drivers/net/nfp/nfp_net_common.c    | 1 +
@@ -29 +29 @@
- 7 files changed, 12 insertions(+), 4 deletions(-)
+ 6 files changed, 11 insertions(+), 4 deletions(-)
@@ -32 +32 @@
-index bb2de5de80..cf73f9d50b 100644
+index ef4c06db6a..779bdc5860 100644
@@ -46 +46 @@
-index daa69e533a..212c300c14 100644
+index ab643709ee..f281d1d7f8 100644
@@ -60 +60 @@
-index a91509d92a..82cb8d5368 100644
+index 177b8165f3..15083d249c 100644
@@ -73,12 +72,0 @@
-diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c
-index a438eb5871..c907d9d5f6 100644
---- a/drivers/net/nfp/nfp_net_common.c
-+++ b/drivers/net/nfp/nfp_net_common.c
-@@ -1365,6 +1365,7 @@ nfp_net_supported_ptypes_get(struct rte_eth_dev *dev)
- 		RTE_PTYPE_INNER_L4_NONFRAG,
- 		RTE_PTYPE_INNER_L4_ICMP,
- 		RTE_PTYPE_INNER_L4_SCTP,
-+		RTE_PTYPE_UNKNOWN
- 	};
- 
- 	if (dev->rx_pkt_burst != nfp_net_recv_pkts)
@@ -100 +88 @@
-index b41fa971cb..3fa03cdbee 100644
+index 2fd46c6b0b..a6bf6eec55 100644
@@ -103 +91 @@
-@@ -1803,6 +1803,7 @@ tap_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
+@@ -1862,6 +1862,7 @@ tap_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
@@ -112 +100 @@
-index a504d41dfe..5a0c3dc4a6 100644
+index ab1e714d97..dd77a6c7fd 100644

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

* patch 'app/testpmd: fix crash in multi-process forwarding' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (71 preceding siblings ...)
  2024-03-07  1:31 ` patch 'drivers/net: fix buffer overflow for packet types list' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/ionic: fix missing volatile type for cqe pointers' " luca.boccassi
                   ` (27 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Chengwen Feng, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 0bef99c53ed4484d18afdc7d086e6db9da69a456 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 30 Jan 2024 09:32:49 +0800
Subject: [PATCH] app/testpmd: fix crash in multi-process forwarding

[ upstream commit b3a33138f317d1c651cd86f423cc703176eb7b07 ]

On multi-process scenario, each process creates flows based on the
number of queues. When nbcore is greater than 1, multiple cores may
use the same queue to forward packet, like:
dpdk-testpmd -a BDF --proc-type=auto -- -i --rxq=4 --txq=4
--nb-cores=2 --num-procs=2 --proc-id=0
testpmd> start
mac packet forwarding - ports=1 - cores=2 - streams=4 - NUMA support
enabled, MP allocation mode: native
Logical Core 2 (socket 0) forwards packets on 2 streams:
  RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
  RX P=0/Q=1 (socket 0) -> TX P=0/Q=1 (socket 0) peer=02:00:00:00:00:00
Logical Core 3 (socket 0) forwards packets on 2 streams:
  RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
  RX P=0/Q=1 (socket 0) -> TX P=0/Q=1 (socket 0) peer=02:00:00:00:00:00

After this commit, the result will be:
dpdk-testpmd -a BDF --proc-type=auto -- -i --rxq=4 --txq=4
--nb-cores=2 --num-procs=2 --proc-id=0
testpmd> start
io packet forwarding - ports=1 - cores=2 - streams=2 - NUMA support
enabled, MP allocation mode: native
Logical Core 2 (socket 0) forwards packets on 1 streams:
  RX P=0/Q=0 (socket 2) -> TX P=0/Q=0 (socket 2) peer=02:00:00:00:00:00
Logical Core 3 (socket 0) forwards packets on 1 streams:
  RX P=0/Q=1 (socket 2) -> TX P=0/Q=1 (socket 2) peer=02:00:00:00:00:00

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

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/config.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 6a9eb4609c..e8a647a393 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4428,7 +4428,6 @@ rss_fwd_config_setup(void)
 	queueid_t  nb_q;
 	streamid_t  sm_id;
 	int start;
-	int end;
 
 	nb_q = nb_rxq;
 	if (nb_q > nb_txq)
@@ -4436,7 +4435,7 @@ rss_fwd_config_setup(void)
 	cur_fwd_config.nb_fwd_lcores = (lcoreid_t) nb_fwd_lcores;
 	cur_fwd_config.nb_fwd_ports = nb_fwd_ports;
 	cur_fwd_config.nb_fwd_streams =
-		(streamid_t) (nb_q * cur_fwd_config.nb_fwd_ports);
+		(streamid_t) (nb_q / num_procs * cur_fwd_config.nb_fwd_ports);
 
 	if (cur_fwd_config.nb_fwd_streams < cur_fwd_config.nb_fwd_lcores)
 		cur_fwd_config.nb_fwd_lcores =
@@ -4458,7 +4457,6 @@ rss_fwd_config_setup(void)
 	 * the 2~3 queue for secondary process.
 	 */
 	start = proc_id * nb_q / num_procs;
-	end = start + nb_q / num_procs;
 	rxp = 0;
 	rxq = start;
 	for (sm_id = 0; sm_id < cur_fwd_config.nb_fwd_streams; sm_id++) {
@@ -4477,8 +4475,6 @@ rss_fwd_config_setup(void)
 			continue;
 		rxp = 0;
 		rxq++;
-		if (rxq >= end)
-			rxq = start;
 	}
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.103302425 +0000
+++ 0074-app-testpmd-fix-crash-in-multi-process-forwarding.patch	2024-03-07 01:05:34.918942563 +0000
@@ -1 +1 @@
-From b3a33138f317d1c651cd86f423cc703176eb7b07 Mon Sep 17 00:00:00 2001
+From 0bef99c53ed4484d18afdc7d086e6db9da69a456 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3a33138f317d1c651cd86f423cc703176eb7b07 ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
@@ -43 +44 @@
-index cad7537bc6..2c4dedd603 100644
+index 6a9eb4609c..e8a647a393 100644
@@ -46 +47 @@
-@@ -4794,7 +4794,6 @@ rss_fwd_config_setup(void)
+@@ -4428,7 +4428,6 @@ rss_fwd_config_setup(void)
@@ -54 +55 @@
-@@ -4802,7 +4801,7 @@ rss_fwd_config_setup(void)
+@@ -4436,7 +4435,7 @@ rss_fwd_config_setup(void)
@@ -63 +64 @@
-@@ -4824,7 +4823,6 @@ rss_fwd_config_setup(void)
+@@ -4458,7 +4457,6 @@ rss_fwd_config_setup(void)
@@ -71 +72 @@
-@@ -4843,8 +4841,6 @@ rss_fwd_config_setup(void)
+@@ -4477,8 +4475,6 @@ rss_fwd_config_setup(void)

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

* patch 'net/ionic: fix missing volatile type for cqe pointers' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (72 preceding siblings ...)
  2024-03-07  1:31 ` patch 'app/testpmd: fix crash in multi-process forwarding' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/ionic: fix RSS query' " luca.boccassi
                   ` (26 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Neel Patel; +Cc: Andrew Boyer, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From e15d5a01b1478c94bd1c4a905e79b71af35002f0 Mon Sep 17 00:00:00 2001
From: Neel Patel <neel.patel@amd.com>
Date: Tue, 6 Feb 2024 19:13:08 -0800
Subject: [PATCH] net/ionic: fix missing volatile type for cqe pointers

[ upstream commit 463ad260d35ee5934ab206d392a1a3e08b5506d0 ]

This memory may be changed by the hardware, so the volatile
keyword is required for correctness.

Fixes: e86a6fcc7cf3 ("net/ionic: add optimized non-scattered Rx/Tx")

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
Signed-off-by: Neel Patel <neel.patel@amd.com>
---
 drivers/net/ionic/ionic_rxtx.c        | 4 ++--
 drivers/net/ionic/ionic_rxtx_sg.c     | 8 +++++---
 drivers/net/ionic/ionic_rxtx_simple.c | 8 +++++---
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index b9e73b4871..2f1ca986b3 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -752,7 +752,7 @@ ionic_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
 	struct ionic_rx_qcq *rxq = rx_queue;
 	struct ionic_qcq *qcq = &rxq->qcq;
-	struct ionic_rxq_comp *cq_desc;
+	volatile struct ionic_rxq_comp *cq_desc;
 	uint16_t mask, head, tail, pos;
 	bool done_color;
 
@@ -791,7 +791,7 @@ ionic_dev_tx_descriptor_status(void *tx_queue, uint16_t offset)
 {
 	struct ionic_tx_qcq *txq = tx_queue;
 	struct ionic_qcq *qcq = &txq->qcq;
-	struct ionic_txq_comp *cq_desc;
+	volatile struct ionic_txq_comp *cq_desc;
 	uint16_t mask, head, tail, pos, cq_pos;
 	bool done_color;
 
diff --git a/drivers/net/ionic/ionic_rxtx_sg.c b/drivers/net/ionic/ionic_rxtx_sg.c
index ab8e56e91c..241b6f8587 100644
--- a/drivers/net/ionic/ionic_rxtx_sg.c
+++ b/drivers/net/ionic/ionic_rxtx_sg.c
@@ -27,7 +27,8 @@ ionic_tx_flush_sg(struct ionic_tx_qcq *txq)
 	struct ionic_cq *cq = &txq->qcq.cq;
 	struct ionic_queue *q = &txq->qcq.q;
 	struct rte_mbuf *txm;
-	struct ionic_txq_comp *cq_desc, *cq_desc_base = cq->base;
+	struct ionic_txq_comp *cq_desc_base = cq->base;
+	volatile struct ionic_txq_comp *cq_desc;
 	void **info;
 	uint32_t i;
 
@@ -252,7 +253,7 @@ ionic_xmit_pkts_sg(void *tx_queue, struct rte_mbuf **tx_pkts,
  */
 static __rte_always_inline void
 ionic_rx_clean_one_sg(struct ionic_rx_qcq *rxq,
-		struct ionic_rxq_comp *cq_desc,
+		volatile struct ionic_rxq_comp *cq_desc,
 		struct ionic_rx_service *rx_svc)
 {
 	struct ionic_queue *q = &rxq->qcq.q;
@@ -438,7 +439,8 @@ ionic_rxq_service_sg(struct ionic_rx_qcq *rxq, uint32_t work_to_do,
 	struct ionic_cq *cq = &rxq->qcq.cq;
 	struct ionic_queue *q = &rxq->qcq.q;
 	struct ionic_rxq_desc *q_desc_base = q->base;
-	struct ionic_rxq_comp *cq_desc, *cq_desc_base = cq->base;
+	struct ionic_rxq_comp *cq_desc_base = cq->base;
+	volatile struct ionic_rxq_comp *cq_desc;
 	uint32_t work_done = 0;
 	uint64_t then, now, hz, delta;
 
diff --git a/drivers/net/ionic/ionic_rxtx_simple.c b/drivers/net/ionic/ionic_rxtx_simple.c
index 5f81856256..0992177afc 100644
--- a/drivers/net/ionic/ionic_rxtx_simple.c
+++ b/drivers/net/ionic/ionic_rxtx_simple.c
@@ -27,7 +27,8 @@ ionic_tx_flush(struct ionic_tx_qcq *txq)
 	struct ionic_cq *cq = &txq->qcq.cq;
 	struct ionic_queue *q = &txq->qcq.q;
 	struct rte_mbuf *txm;
-	struct ionic_txq_comp *cq_desc, *cq_desc_base = cq->base;
+	struct ionic_txq_comp *cq_desc_base = cq->base;
+	volatile struct ionic_txq_comp *cq_desc;
 	void **info;
 
 	cq_desc = &cq_desc_base[cq->tail_idx];
@@ -225,7 +226,7 @@ ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
  */
 static __rte_always_inline void
 ionic_rx_clean_one(struct ionic_rx_qcq *rxq,
-		struct ionic_rxq_comp *cq_desc,
+		volatile struct ionic_rxq_comp *cq_desc,
 		struct ionic_rx_service *rx_svc)
 {
 	struct ionic_queue *q = &rxq->qcq.q;
@@ -359,7 +360,8 @@ ionic_rxq_service(struct ionic_rx_qcq *rxq, uint32_t work_to_do,
 	struct ionic_cq *cq = &rxq->qcq.cq;
 	struct ionic_queue *q = &rxq->qcq.q;
 	struct ionic_rxq_desc *q_desc_base = q->base;
-	struct ionic_rxq_comp *cq_desc, *cq_desc_base = cq->base;
+	struct ionic_rxq_comp *cq_desc_base = cq->base;
+	volatile struct ionic_rxq_comp *cq_desc;
 	uint32_t work_done = 0;
 	uint64_t then, now, hz, delta;
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.186293999 +0000
+++ 0075-net-ionic-fix-missing-volatile-type-for-cqe-pointers.patch	2024-03-07 01:05:34.922942648 +0000
@@ -1 +1 @@
-From 463ad260d35ee5934ab206d392a1a3e08b5506d0 Mon Sep 17 00:00:00 2001
+From e15d5a01b1478c94bd1c4a905e79b71af35002f0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 463ad260d35ee5934ab206d392a1a3e08b5506d0 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index e7a0e16ae1..8a9c5ae191 100644
+index b9e73b4871..2f1ca986b3 100644
@@ -24 +25 @@
-@@ -756,7 +756,7 @@ ionic_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)
+@@ -752,7 +752,7 @@ ionic_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)
@@ -33 +34 @@
-@@ -795,7 +795,7 @@ ionic_dev_tx_descriptor_status(void *tx_queue, uint16_t offset)
+@@ -791,7 +791,7 @@ ionic_dev_tx_descriptor_status(void *tx_queue, uint16_t offset)
@@ -43 +44 @@
-index 6c028a698c..1392342463 100644
+index ab8e56e91c..241b6f8587 100644
@@ -46 +47,2 @@
-@@ -28,7 +28,8 @@ ionic_tx_flush_sg(struct ionic_tx_qcq *txq)
+@@ -27,7 +27,8 @@ ionic_tx_flush_sg(struct ionic_tx_qcq *txq)
+ 	struct ionic_cq *cq = &txq->qcq.cq;
@@ -48 +49,0 @@
- 	struct ionic_tx_stats *stats = &txq->stats;
@@ -56 +57 @@
-@@ -254,7 +255,7 @@ ionic_xmit_pkts_sg(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -252,7 +253,7 @@ ionic_xmit_pkts_sg(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -65 +66 @@
-@@ -440,7 +441,8 @@ ionic_rxq_service_sg(struct ionic_rx_qcq *rxq, uint32_t work_to_do,
+@@ -438,7 +439,8 @@ ionic_rxq_service_sg(struct ionic_rx_qcq *rxq, uint32_t work_to_do,
@@ -76 +77 @@
-index 5969287b66..00152c885a 100644
+index 5f81856256..0992177afc 100644
@@ -79 +80,2 @@
-@@ -28,7 +28,8 @@ ionic_tx_flush(struct ionic_tx_qcq *txq)
+@@ -27,7 +27,8 @@ ionic_tx_flush(struct ionic_tx_qcq *txq)
+ 	struct ionic_cq *cq = &txq->qcq.cq;
@@ -81 +82,0 @@
- 	struct ionic_tx_stats *stats = &txq->stats;
@@ -89 +90 @@
-@@ -227,7 +228,7 @@ ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -225,7 +226,7 @@ ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -98 +99 @@
-@@ -361,7 +362,8 @@ ionic_rxq_service(struct ionic_rx_qcq *rxq, uint32_t work_to_do,
+@@ -359,7 +360,8 @@ ionic_rxq_service(struct ionic_rx_qcq *rxq, uint32_t work_to_do,

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

* patch 'net/ionic: fix RSS query' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (73 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/ionic: fix missing volatile type for cqe pointers' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/ionic: fix device close' " luca.boccassi
                   ` (25 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Akshay Dorwat; +Cc: Andrew Boyer, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 64baeefd1fb0c98a09f57d025023d33f5fcfef0c Mon Sep 17 00:00:00 2001
From: Akshay Dorwat <akshay.dorwat@amd.com>
Date: Tue, 6 Feb 2024 19:13:11 -0800
Subject: [PATCH] net/ionic: fix RSS query

[ upstream commit 1df32bfd0317a3c8aed1e91b51ca2aa8317812e4 ]

The routine that copies out the RSS config can't use memcpy() because
'reta_conf->reta' is an array of uint16_t while 'lif->rss_ind_tbl' is
an array of uint8_t. Instead, copy the values individually.

Fixes: 22e7171bc63b ("net/ionic: support RSS")

Signed-off-by: Akshay Dorwat <akshay.dorwat@amd.com>
Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 .mailmap                         | 1 +
 drivers/net/ionic/ionic_ethdev.c | 9 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.mailmap b/.mailmap
index 841097364c..1d72c6c754 100644
--- a/.mailmap
+++ b/.mailmap
@@ -27,6 +27,7 @@ Ajit Khaparde <ajit.khaparde@broadcom.com>
 Akash Saxena <akash.saxena@caviumnetworks.com>
 Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
 Akhil Goyal <gakhil@marvell.com> <akhil.goyal@nxp.com>
+Akshay Dorwat <akshay.dorwat@amd.com>
 Alain Leon <xerebz@gmail.com>
 Alan Carew <alan.carew@intel.com>
 Alan Dewar <alan.dewar@att.com> <adewar@brocade.com>
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 340fd0cd59..008e50e0b9 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -561,7 +561,7 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,
 	struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
 	struct ionic_adapter *adapter = lif->adapter;
 	struct ionic_identity *ident = &adapter->ident;
-	int i, num;
+	int i, j, num;
 	uint16_t tbl_sz = rte_le_to_cpu_16(ident->lif.eth.rss_ind_tbl_sz);
 
 	IONIC_PRINT_CALL();
@@ -582,9 +582,10 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,
 	num = reta_size / RTE_ETH_RETA_GROUP_SIZE;
 
 	for (i = 0; i < num; i++) {
-		memcpy(reta_conf->reta,
-			&lif->rss_ind_tbl[i * RTE_ETH_RETA_GROUP_SIZE],
-			RTE_ETH_RETA_GROUP_SIZE);
+		for (j = 0; j < RTE_ETH_RETA_GROUP_SIZE; j++) {
+			reta_conf->reta[j] =
+				lif->rss_ind_tbl[(i * RTE_ETH_RETA_GROUP_SIZE) + j];
+		}
 		reta_conf++;
 	}
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.262715596 +0000
+++ 0076-net-ionic-fix-RSS-query.patch	2024-03-07 01:05:34.926942733 +0000
@@ -1 +1 @@
-From 1df32bfd0317a3c8aed1e91b51ca2aa8317812e4 Mon Sep 17 00:00:00 2001
+From 64baeefd1fb0c98a09f57d025023d33f5fcfef0c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1df32bfd0317a3c8aed1e91b51ca2aa8317812e4 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index d066dc35b6..dc7cd0497d 100644
+index 841097364c..1d72c6c754 100644
@@ -24 +25,2 @@
-@@ -29,6 +29,7 @@ Akash Saxena <akash.saxena@caviumnetworks.com>
+@@ -27,6 +27,7 @@ Ajit Khaparde <ajit.khaparde@broadcom.com>
+ Akash Saxena <akash.saxena@caviumnetworks.com>
@@ -27 +28,0 @@
- Akihiko Odaki <akihiko.odaki@daynix.com>
@@ -30 +30,0 @@
- Alan Brady <alan.brady@intel.com>
@@ -31,0 +32 @@
+ Alan Dewar <alan.dewar@att.com> <adewar@brocade.com>

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

* patch 'net/ionic: fix device close' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (74 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/ionic: fix RSS query' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/bonding: fix flow count query' " luca.boccassi
                   ` (24 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Andrew Boyer; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 3bd12069ce2c4a9e7bbd9d3daebbd8fceb213286 Mon Sep 17 00:00:00 2001
From: Andrew Boyer <andrew.boyer@amd.com>
Date: Tue, 6 Feb 2024 19:13:14 -0800
Subject: [PATCH] net/ionic: fix device close

[ upstream commit 73028be3b4d4d52f5d73becfd22bff3f57a81252 ]

The close routine should release all resources, but not
call rte_eth_dev_destroy(). As written this code will call
rte_eth_dev_release_port() twice and segfault.

Instead, move rte_eth_dev_destroy() to the remove routine.
eth_ionic_dev_uninit() will call close if necessary.

Fixes: 175e4e7ed760 ("net/ionic: complete release on close")

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_ethdev.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 008e50e0b9..4ec9598b8e 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -970,19 +970,21 @@ ionic_dev_close(struct rte_eth_dev *eth_dev)
 
 	ionic_lif_stop(lif);
 
-	ionic_lif_free_queues(lif);
-
 	IONIC_PRINT(NOTICE, "Removing device %s", eth_dev->device->name);
 	if (adapter->intf->unconfigure_intr)
 		(*adapter->intf->unconfigure_intr)(adapter);
 
-	rte_eth_dev_destroy(eth_dev, eth_ionic_dev_uninit);
-
 	ionic_port_reset(adapter);
 	ionic_reset(adapter);
+
+	ionic_lif_free_queues(lif);
+	ionic_lif_deinit(lif);
+	ionic_lif_free(lif); /* Does not free LIF object */
+
 	if (adapter->intf->unmap_bars)
 		(*adapter->intf->unmap_bars)(adapter);
 
+	lif->adapter = NULL;
 	rte_free(adapter);
 
 	return 0;
@@ -1059,21 +1061,18 @@ err:
 static int
 eth_ionic_dev_uninit(struct rte_eth_dev *eth_dev)
 {
-	struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
-	struct ionic_adapter *adapter = lif->adapter;
-
 	IONIC_PRINT_CALL();
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
 
-	adapter->lif = NULL;
+	if (eth_dev->state != RTE_ETH_DEV_UNUSED)
+		ionic_dev_close(eth_dev);
 
-	ionic_lif_deinit(lif);
-	ionic_lif_free(lif);
-
-	if (!(lif->state & IONIC_LIF_F_FW_RESET))
-		ionic_lif_reset(lif);
+	eth_dev->dev_ops = NULL;
+	eth_dev->rx_pkt_burst = NULL;
+	eth_dev->tx_pkt_burst = NULL;
+	eth_dev->tx_pkt_prepare = NULL;
 
 	return 0;
 }
@@ -1228,17 +1227,18 @@ eth_ionic_dev_remove(struct rte_device *rte_dev)
 {
 	char name[RTE_ETH_NAME_MAX_LEN];
 	struct rte_eth_dev *eth_dev;
+	int ret = 0;
 
 	/* Adapter lookup is using the eth_dev name */
 	snprintf(name, sizeof(name), "%s_lif", rte_dev->name);
 
 	eth_dev = rte_eth_dev_allocated(name);
 	if (eth_dev)
-		ionic_dev_close(eth_dev);
+		ret = rte_eth_dev_destroy(eth_dev, eth_ionic_dev_uninit);
 	else
 		IONIC_PRINT(DEBUG, "Cannot find device %s", rte_dev->name);
 
-	return 0;
+	return ret;
 }
 
 RTE_LOG_REGISTER_DEFAULT(ionic_logtype, NOTICE);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.341895742 +0000
+++ 0077-net-ionic-fix-device-close.patch	2024-03-07 01:05:34.930942818 +0000
@@ -1 +1 @@
-From 73028be3b4d4d52f5d73becfd22bff3f57a81252 Mon Sep 17 00:00:00 2001
+From 3bd12069ce2c4a9e7bbd9d3daebbd8fceb213286 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 73028be3b4d4d52f5d73becfd22bff3f57a81252 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 7c55a26956..bedcf958e2 100644
+index 008e50e0b9..4ec9598b8e 100644
@@ -25 +26 @@
-@@ -1009,19 +1009,21 @@ ionic_dev_close(struct rte_eth_dev *eth_dev)
+@@ -970,19 +970,21 @@ ionic_dev_close(struct rte_eth_dev *eth_dev)
@@ -51 +52 @@
-@@ -1098,21 +1100,18 @@ err:
+@@ -1059,21 +1061,18 @@ err:
@@ -79 +80 @@
-@@ -1267,17 +1266,18 @@ eth_ionic_dev_remove(struct rte_device *rte_dev)
+@@ -1228,17 +1227,18 @@ eth_ionic_dev_remove(struct rte_device *rte_dev)

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

* patch 'net/bonding: fix flow count query' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (75 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/ionic: fix device close' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/mana: fix memory leak on MR allocation' " luca.boccassi
                   ` (23 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Mário Kuka; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 32bf2f21f5f63399e5d67e2550ecf8daec3c063f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A1rio=20Kuka?= <kuka@cesnet.cz>
Date: Wed, 3 Jan 2024 12:10:35 +0100
Subject: [PATCH] net/bonding: fix flow count query
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 02a2accb5f54183d448edf35902b71023ab908ac ]

The rte_flow_query_count structure returned from the bonding driver
always indicates that hits and bytes are invalid (bytes_set and
hits_set flags are zero) because bond_flow_query_count() from the
net/bonding driver does not set the bytes_set and hits_set flags.

Fixes: 49dad9028e2a ("net/bonding: support flow API")

Signed-off-by: Mário Kuka <kuka@cesnet.cz>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/bonding/rte_eth_bond_flow.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_flow.c b/drivers/net/bonding/rte_eth_bond_flow.c
index 65b77faae7..b38a9f89d0 100644
--- a/drivers/net/bonding/rte_eth_bond_flow.c
+++ b/drivers/net/bonding/rte_eth_bond_flow.c
@@ -180,6 +180,8 @@ bond_flow_query_count(struct rte_eth_dev *dev, struct rte_flow *flow,
 
 	count->bytes = 0;
 	count->hits = 0;
+	count->bytes_set = 0;
+	count->hits_set = 0;
 	rte_memcpy(&slave_count, count, sizeof(slave_count));
 	for (i = 0; i < internals->slave_count; i++) {
 		ret = rte_flow_query(internals->slaves[i].port_id,
@@ -192,8 +194,12 @@ bond_flow_query_count(struct rte_eth_dev *dev, struct rte_flow *flow,
 		}
 		count->bytes += slave_count.bytes;
 		count->hits += slave_count.hits;
+		count->bytes_set |= slave_count.bytes_set;
+		count->hits_set |= slave_count.hits_set;
 		slave_count.bytes = 0;
 		slave_count.hits = 0;
+		slave_count.bytes_set = 0;
+		slave_count.hits_set = 0;
 	}
 	return 0;
 }
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.418516355 +0000
+++ 0078-net-bonding-fix-flow-count-query.patch	2024-03-07 01:05:34.930942818 +0000
@@ -1 +1 @@
-From 02a2accb5f54183d448edf35902b71023ab908ac Mon Sep 17 00:00:00 2001
+From 32bf2f21f5f63399e5d67e2550ecf8daec3c063f Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 02a2accb5f54183d448edf35902b71023ab908ac ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 71a91675f7..5d0be5caf5 100644
+index 65b77faae7..b38a9f89d0 100644
@@ -33,3 +34,3 @@
- 	rte_memcpy(&member_count, count, sizeof(member_count));
- 	for (i = 0; i < internals->member_count; i++) {
- 		ret = rte_flow_query(internals->members[i].port_id,
+ 	rte_memcpy(&slave_count, count, sizeof(slave_count));
+ 	for (i = 0; i < internals->slave_count; i++) {
+ 		ret = rte_flow_query(internals->slaves[i].port_id,
@@ -38,8 +39,8 @@
- 		count->bytes += member_count.bytes;
- 		count->hits += member_count.hits;
-+		count->bytes_set |= member_count.bytes_set;
-+		count->hits_set |= member_count.hits_set;
- 		member_count.bytes = 0;
- 		member_count.hits = 0;
-+		member_count.bytes_set = 0;
-+		member_count.hits_set = 0;
+ 		count->bytes += slave_count.bytes;
+ 		count->hits += slave_count.hits;
++		count->bytes_set |= slave_count.bytes_set;
++		count->hits_set |= slave_count.hits_set;
+ 		slave_count.bytes = 0;
+ 		slave_count.hits = 0;
++		slave_count.bytes_set = 0;
++		slave_count.hits_set = 0;

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

* patch 'net/mana: fix memory leak on MR allocation' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (76 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/bonding: fix flow count query' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/mana: handle MR cache expansion failure' " luca.boccassi
                   ` (22 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 97789491e62bbae789dac10d6a0df851c85da595 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Thu, 8 Feb 2024 16:05:03 -0800
Subject: [PATCH] net/mana: fix memory leak on MR allocation

[ upstream commit 9d61fe41acaaf6bf88c173acce2b3165ddf0eb9d ]

Use a MR on the stack instead of allocating it. This fixes the memory
leak in the code where a MR is allocated but never freed.

Fixes: 0f5db3c68ba7 ("net/mana: implement memory registration")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/mr.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/net/mana/mr.c b/drivers/net/mana/mr.c
index b8e6ea0bbf..dfb2412834 100644
--- a/drivers/net/mana/mr.c
+++ b/drivers/net/mana/mr.c
@@ -40,7 +40,7 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct mana_priv *priv,
 	struct ibv_mr *ibv_mr;
 	struct mana_range ranges[pool->nb_mem_chunks];
 	uint32_t i;
-	struct mana_mr_cache *mr;
+	struct mana_mr_cache mr;
 	int ret;
 
 	rte_mempool_mem_iter(pool, mana_mempool_chunk_cb, ranges);
@@ -75,14 +75,13 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct mana_priv *priv,
 			DP_LOG(DEBUG, "MR lkey %u addr %p len %zu",
 			       ibv_mr->lkey, ibv_mr->addr, ibv_mr->length);
 
-			mr = rte_calloc("MANA MR", 1, sizeof(*mr), 0);
-			mr->lkey = ibv_mr->lkey;
-			mr->addr = (uintptr_t)ibv_mr->addr;
-			mr->len = ibv_mr->length;
-			mr->verb_obj = ibv_mr;
+			mr.lkey = ibv_mr->lkey;
+			mr.addr = (uintptr_t)ibv_mr->addr;
+			mr.len = ibv_mr->length;
+			mr.verb_obj = ibv_mr;
 
 			rte_spinlock_lock(&priv->mr_btree_lock);
-			ret = mana_mr_btree_insert(&priv->mr_btree, mr);
+			ret = mana_mr_btree_insert(&priv->mr_btree, &mr);
 			rte_spinlock_unlock(&priv->mr_btree_lock);
 			if (ret) {
 				ibv_dereg_mr(ibv_mr);
@@ -90,7 +89,7 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct mana_priv *priv,
 				return ret;
 			}
 
-			ret = mana_mr_btree_insert(local_tree, mr);
+			ret = mana_mr_btree_insert(local_tree, &mr);
 			if (ret) {
 				/* Don't need to clean up MR as it's already
 				 * in the global tree
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.492182054 +0000
+++ 0079-net-mana-fix-memory-leak-on-MR-allocation.patch	2024-03-07 01:05:34.930942818 +0000
@@ -1 +1 @@
-From 9d61fe41acaaf6bf88c173acce2b3165ddf0eb9d Mon Sep 17 00:00:00 2001
+From 97789491e62bbae789dac10d6a0df851c85da595 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9d61fe41acaaf6bf88c173acce2b3165ddf0eb9d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index d6a5ad1460..c9d0f7ef5a 100644
+index b8e6ea0bbf..dfb2412834 100644

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

* patch 'net/mana: handle MR cache expansion failure' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (77 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/mana: fix memory leak on MR allocation' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'common/sfc_efx/base: use C11 static assert' " luca.boccassi
                   ` (21 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 706c98e249c6273c7006a599dbffca14bb731a1c Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Thu, 8 Feb 2024 16:05:04 -0800
Subject: [PATCH] net/mana: handle MR cache expansion failure

[ upstream commit 0c7bc26bb0b39bfe8999f422329bd52861b43a72 ]

On MR cache expansion failure, the request should fail as there is no
path to get a new MR into the tree. Attempting to insert a new MR to the
cache tree will result in memory violation.

Fixes: 0f5db3c68ba7 ("net/mana: implement memory registration")

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/mana/mana.h |  6 +++---
 drivers/net/mana/mr.c   | 45 ++++++++++++++++++++++++++++-------------
 2 files changed, 34 insertions(+), 17 deletions(-)

diff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h
index f70a3e0b3d..57576c62e4 100644
--- a/drivers/net/mana/mana.h
+++ b/drivers/net/mana/mana.h
@@ -517,9 +517,9 @@ void mana_del_pmd_mr(struct mana_mr_cache *mr);
 void mana_mempool_chunk_cb(struct rte_mempool *mp, void *opaque,
 			   struct rte_mempool_memhdr *memhdr, unsigned int idx);
 
-struct mana_mr_cache *mana_mr_btree_lookup(struct mana_mr_btree *bt,
-					   uint16_t *idx,
-					   uintptr_t addr, size_t len);
+int mana_mr_btree_lookup(struct mana_mr_btree *bt, uint16_t *idx,
+			 uintptr_t addr, size_t len,
+			 struct mana_mr_cache **cache);
 int mana_mr_btree_insert(struct mana_mr_btree *bt, struct mana_mr_cache *entry);
 int mana_mr_btree_init(struct mana_mr_btree *bt, int n, int socket);
 void mana_mr_btree_free(struct mana_mr_btree *bt);
diff --git a/drivers/net/mana/mr.c b/drivers/net/mana/mr.c
index dfb2412834..eb6d073a95 100644
--- a/drivers/net/mana/mr.c
+++ b/drivers/net/mana/mr.c
@@ -137,8 +137,12 @@ mana_find_pmd_mr(struct mana_mr_btree *local_mr_btree, struct mana_priv *priv,
 
 try_again:
 	/* First try to find the MR in local queue tree */
-	mr = mana_mr_btree_lookup(local_mr_btree, &idx,
-				  (uintptr_t)mbuf->buf_addr, mbuf->buf_len);
+	ret = mana_mr_btree_lookup(local_mr_btree, &idx,
+				   (uintptr_t)mbuf->buf_addr, mbuf->buf_len,
+				   &mr);
+	if (ret)
+		return NULL;
+
 	if (mr) {
 		DP_LOG(DEBUG, "Local mr lkey %u addr 0x%" PRIxPTR " len %zu",
 		       mr->lkey, mr->addr, mr->len);
@@ -147,11 +151,14 @@ try_again:
 
 	/* If not found, try to find the MR in global tree */
 	rte_spinlock_lock(&priv->mr_btree_lock);
-	mr = mana_mr_btree_lookup(&priv->mr_btree, &idx,
-				  (uintptr_t)mbuf->buf_addr,
-				  mbuf->buf_len);
+	ret = mana_mr_btree_lookup(&priv->mr_btree, &idx,
+				   (uintptr_t)mbuf->buf_addr,
+				   mbuf->buf_len, &mr);
 	rte_spinlock_unlock(&priv->mr_btree_lock);
 
+	if (ret)
+		return NULL;
+
 	/* If found in the global tree, add it to the local tree */
 	if (mr) {
 		ret = mana_mr_btree_insert(local_mr_btree, mr);
@@ -227,22 +234,23 @@ mana_mr_btree_expand(struct mana_mr_btree *bt, int n)
 /*
  * Look for a region of memory in MR cache.
  */
-struct mana_mr_cache *
-mana_mr_btree_lookup(struct mana_mr_btree *bt, uint16_t *idx,
-		     uintptr_t addr, size_t len)
+int mana_mr_btree_lookup(struct mana_mr_btree *bt, uint16_t *idx,
+			 uintptr_t addr, size_t len,
+			 struct mana_mr_cache **cache)
 {
 	struct mana_mr_cache *table;
 	uint16_t n;
 	uint16_t base = 0;
 	int ret;
 
+	*cache = NULL;
+
 	n = bt->len;
-
 	/* Try to double the cache if it's full */
 	if (n == bt->size) {
 		ret = mana_mr_btree_expand(bt, bt->size << 1);
 		if (ret)
-			return NULL;
+			return ret;
 	}
 
 	table = bt->table;
@@ -261,14 +269,16 @@ mana_mr_btree_lookup(struct mana_mr_btree *bt, uint16_t *idx,
 
 	*idx = base;
 
-	if (addr + len <= table[base].addr + table[base].len)
-		return &table[base];
+	if (addr + len <= table[base].addr + table[base].len) {
+		*cache = &table[base];
+		return 0;
+	}
 
 	DP_LOG(DEBUG,
 	       "addr 0x%" PRIxPTR " len %zu idx %u sum 0x%" PRIxPTR " not found",
 	       addr, len, *idx, addr + len);
 
-	return NULL;
+	return 0;
 }
 
 int
@@ -313,14 +323,21 @@ mana_mr_btree_insert(struct mana_mr_btree *bt, struct mana_mr_cache *entry)
 	struct mana_mr_cache *table;
 	uint16_t idx = 0;
 	uint16_t shift;
+	int ret;
 
-	if (mana_mr_btree_lookup(bt, &idx, entry->addr, entry->len)) {
+	ret = mana_mr_btree_lookup(bt, &idx, entry->addr, entry->len, &table);
+	if (ret)
+		return ret;
+
+	if (table) {
 		DP_LOG(DEBUG, "Addr 0x%" PRIxPTR " len %zu exists in btree",
 		       entry->addr, entry->len);
 		return 0;
 	}
 
 	if (bt->len >= bt->size) {
+		DP_LOG(ERR, "Btree overflow detected len %u size %u",
+		       bt->len, bt->size);
 		bt->overflow = 1;
 		return -1;
 	}
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.565493933 +0000
+++ 0080-net-mana-handle-MR-cache-expansion-failure.patch	2024-03-07 01:05:34.934942903 +0000
@@ -1 +1 @@
-From 0c7bc26bb0b39bfe8999f422329bd52861b43a72 Mon Sep 17 00:00:00 2001
+From 706c98e249c6273c7006a599dbffca14bb731a1c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0c7bc26bb0b39bfe8999f422329bd52861b43a72 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 4c56e6f746..3626925871 100644
+index f70a3e0b3d..57576c62e4 100644
@@ -23 +24 @@
-@@ -523,9 +523,9 @@ void mana_del_pmd_mr(struct mana_mr_cache *mr);
+@@ -517,9 +517,9 @@ void mana_del_pmd_mr(struct mana_mr_cache *mr);
@@ -37 +38 @@
-index c9d0f7ef5a..c4045141bc 100644
+index dfb2412834..eb6d073a95 100644
@@ -40 +41 @@
-@@ -138,8 +138,12 @@ mana_alloc_pmd_mr(struct mana_mr_btree *local_mr_btree, struct mana_priv *priv,
+@@ -137,8 +137,12 @@ mana_find_pmd_mr(struct mana_mr_btree *local_mr_btree, struct mana_priv *priv,
@@ -55 +56 @@
-@@ -148,11 +152,14 @@ try_again:
+@@ -147,11 +151,14 @@ try_again:
@@ -73 +74 @@
-@@ -228,22 +235,23 @@ mana_mr_btree_expand(struct mana_mr_btree *bt, int n)
+@@ -227,22 +234,23 @@ mana_mr_btree_expand(struct mana_mr_btree *bt, int n)
@@ -102 +103 @@
-@@ -262,14 +270,16 @@ mana_mr_btree_lookup(struct mana_mr_btree *bt, uint16_t *idx,
+@@ -261,14 +269,16 @@ mana_mr_btree_lookup(struct mana_mr_btree *bt, uint16_t *idx,
@@ -122 +123 @@
-@@ -314,14 +324,21 @@ mana_mr_btree_insert(struct mana_mr_btree *bt, struct mana_mr_cache *entry)
+@@ -313,14 +323,21 @@ mana_mr_btree_insert(struct mana_mr_btree *bt, struct mana_mr_cache *entry)

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

* patch 'common/sfc_efx/base: use C11 static assert' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (78 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/mana: handle MR cache expansion failure' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' " luca.boccassi
                   ` (20 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From f90918d9f4499d978068367106b55f01e829ee03 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sun, 11 Feb 2024 21:48:59 -0800
Subject: [PATCH] common/sfc_efx/base: use C11 static assert
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 047d7032b76a226f2f1c36775688950933f9121b ]

The sfc base code had its own definition of static assertions
using the out of bound array access hack. Replace it with a
static_assert like rte_common.h.

The use of null pointer to compute offset is not always a constant
in older versions of clang. Use standard offsetof() instead.

Fixes: f67e4719147d ("net/sfc/base: fix coding style")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/base/efx.h | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index 49e29dcc1c..6f9cbe7311 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -7,6 +7,8 @@
 #ifndef	_SYS_EFX_H
 #define	_SYS_EFX_H
 
+#include <assert.h>
+
 #include "efx_annote.h"
 #include "efsys.h"
 #include "efx_types.h"
@@ -17,14 +19,20 @@
 extern "C" {
 #endif
 
-#define	EFX_STATIC_ASSERT(_cond)		\
-	((void)sizeof (char[(_cond) ? 1 : -1]))
+/*
+ * Triggers an error at compilation time if the condition is false.
+ *
+ * The  { } exists to workaround a bug in clang (#55821)
+ * where it would not handle _Static_assert in a switch case.
+ */
+#define	EFX_STATIC_ASSERT(_cond) \
+	{ static_assert((_cond), #_cond); }
 
 #define	EFX_ARRAY_SIZE(_array)			\
 	(sizeof (_array) / sizeof ((_array)[0]))
 
 #define	EFX_FIELD_OFFSET(_type, _field)		\
-	((size_t)&(((_type *)0)->_field))
+	offsetof(_type, _field)
 
 /* The macro expands divider twice */
 #define	EFX_DIV_ROUND_UP(_n, _d)		(((_n) + (_d) - 1) / (_d))
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.637947505 +0000
+++ 0081-common-sfc_efx-base-use-C11-static-assert.patch	2024-03-07 01:05:34.938942988 +0000
@@ -1 +1 @@
-From 047d7032b76a226f2f1c36775688950933f9121b Mon Sep 17 00:00:00 2001
+From f90918d9f4499d978068367106b55f01e829ee03 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 047d7032b76a226f2f1c36775688950933f9121b ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 3312c2fa8f..5773cb00b3 100644
+index 49e29dcc1c..6f9cbe7311 100644

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

* patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (79 preceding siblings ...)
  2024-03-07  1:31 ` patch 'common/sfc_efx/base: use C11 static assert' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net: add macros for VLAN metadata parsing' " luca.boccassi
                   ` (19 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Wathsala Vithanage
  Cc: Liangxing Wang, Ruifeng Wang, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 8603dea8c566f2f18f6381cc908269f699aa2e64 Mon Sep 17 00:00:00 2001
From: Wathsala Vithanage <wathsala.vithanage@arm.com>
Date: Wed, 14 Feb 2024 00:36:16 +0000
Subject: [PATCH] net/memif: fix extra mbuf refcnt update in zero copy Tx

[ upstream commit aa3e97fcb55d7b68fef864aa76078bdae375ad3d ]

The refcnt update of stored mbufs in memif driver is redundant since
those mbufs are only freed in eth_memif_tx_zc(). No other place can
free those stored mbufs quietly. By removing this redundant update
single core dpdk memif performance can be improved by 7.5%.

testpmd stats on Arm Neoverse N1 (Ampere Altra)
+-----------------------------+-----------------------+
|        | With refcnt update | Without refcnt update |
+--------+--------------------+-----------------------+
| Rx-pps |      2748851       |         2955487       |
+--------+--------------------+-----------------------+
| Tx-pps |      2748812       |         2955436       |
+--------+--------------------+-----------------------+

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

Signed-off-by: Liangxing Wang <liangxing.wang@arm.com>
Signed-off-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap                          | 1 +
 drivers/net/memif/rte_eth_memif.c | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/.mailmap b/.mailmap
index 1d72c6c754..e4c3ff0024 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1451,6 +1451,7 @@ Walter Heymans <walter.heymans@corigine.com>
 Wang Sheng-Hui <shhuiw@gmail.com>
 Wangyu (Eric) <seven.wangyu@huawei.com>
 Waterman Cao <waterman.cao@intel.com>
+Wathsala Vithanage <wathsala.vithanage@arm.com>
 Weichun Chen <weichunx.chen@intel.com>
 Wei Dai <wei.dai@intel.com>
 Weifeng Li <liweifeng96@126.com>
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 3b83a5a8bb..86b821ac5c 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -261,8 +261,6 @@ memif_free_stored_mbufs(struct pmd_process_private *proc_private, struct memif_q
 	cur_tail = __atomic_load_n(&ring->tail, __ATOMIC_ACQUIRE);
 	while (mq->last_tail != cur_tail) {
 		RTE_MBUF_PREFETCH_TO_FREE(mq->buffers[(mq->last_tail + 1) & mask]);
-		/* Decrement refcnt and free mbuf. (current segment) */
-		rte_mbuf_refcnt_update(mq->buffers[mq->last_tail & mask], -1);
 		rte_pktmbuf_free_seg(mq->buffers[mq->last_tail & mask]);
 		mq->last_tail++;
 	}
@@ -707,10 +705,6 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq
 next_in_chain:
 	/* store pointer to mbuf to free it later */
 	mq->buffers[slot & mask] = mbuf;
-	/* Increment refcnt to make sure the buffer is not freed before server
-	 * receives it. (current segment)
-	 */
-	rte_mbuf_refcnt_update(mbuf, 1);
 	/* populate descriptor */
 	d0 = &ring->desc[slot & mask];
 	d0->length = rte_pktmbuf_data_len(mbuf);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.720731803 +0000
+++ 0082-net-memif-fix-extra-mbuf-refcnt-update-in-zero-copy-.patch	2024-03-07 01:05:34.946943157 +0000
@@ -1 +1 @@
-From aa3e97fcb55d7b68fef864aa76078bdae375ad3d Mon Sep 17 00:00:00 2001
+From 8603dea8c566f2f18f6381cc908269f699aa2e64 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit aa3e97fcb55d7b68fef864aa76078bdae375ad3d ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index e040e2219b..b2d0fc0729 100644
+index 1d72c6c754..e4c3ff0024 100644
@@ -36 +37 @@
-@@ -1518,6 +1518,7 @@ Walter Heymans <walter.heymans@corigine.com>
+@@ -1451,6 +1451,7 @@ Walter Heymans <walter.heymans@corigine.com>
@@ -45 +46 @@
-index 6f45a00172..18377d9caf 100644
+index 3b83a5a8bb..86b821ac5c 100644
@@ -48 +49 @@
-@@ -265,8 +265,6 @@ memif_free_stored_mbufs(struct pmd_process_private *proc_private, struct memif_q
+@@ -261,8 +261,6 @@ memif_free_stored_mbufs(struct pmd_process_private *proc_private, struct memif_q
@@ -57 +58 @@
-@@ -825,10 +823,6 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq
+@@ -707,10 +705,6 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq

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

* patch 'net: add macros for VLAN metadata parsing' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (80 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/netvsc: fix " luca.boccassi
                   ` (18 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Alan Elder; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 6ccc09636724c4aede51a9d7a115f33335c93149 Mon Sep 17 00:00:00 2001
From: Alan Elder <alan.elder@microsoft.com>
Date: Mon, 19 Feb 2024 09:31:25 +0000
Subject: [PATCH] net: add macros for VLAN metadata parsing

[ upstream commit b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc ]

Add common macros for extracting parts of VLAN tag.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Alan Elder <alan.elder@microsoft.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap            |  1 +
 lib/net/rte_ether.h | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/.mailmap b/.mailmap
index e4c3ff0024..061ca09b98 100644
--- a/.mailmap
+++ b/.mailmap
@@ -31,6 +31,7 @@ Akshay Dorwat <akshay.dorwat@amd.com>
 Alain Leon <xerebz@gmail.com>
 Alan Carew <alan.carew@intel.com>
 Alan Dewar <alan.dewar@att.com> <adewar@brocade.com>
+Alan Elder <alan.elder@microsoft.com>
 Alan Liu <zaoxingliu@gmail.com>
 Alan Winkowski <walan@marvell.com>
 Alejandro Lucero <alejandro.lucero@netronome.com>
diff --git a/lib/net/rte_ether.h b/lib/net/rte_ether.h
index bf8a55ba06..020d9b46ba 100644
--- a/lib/net/rte_ether.h
+++ b/lib/net/rte_ether.h
@@ -46,6 +46,20 @@ extern "C" {
 
 #define RTE_ETHER_MIN_MTU 68 /**< Minimum MTU for IPv4 packets, see RFC 791. */
 
+/* VLAN header fields */
+#define RTE_VLAN_DEI_SHIFT	12
+#define RTE_VLAN_PRI_SHIFT	13
+#define RTE_VLAN_PRI_MASK	0xe000 /* Priority Code Point */
+#define RTE_VLAN_DEI_MASK	0x1000 /* Drop Eligible Indicator */
+#define RTE_VLAN_ID_MASK	0x0fff /* VLAN Identifier */
+
+#define RTE_VLAN_TCI_ID(vlan_tci)	((vlan_tci) & RTE_VLAN_ID_MASK)
+#define RTE_VLAN_TCI_PRI(vlan_tci)	(((vlan_tci) & RTE_VLAN_PRI_MASK) >> RTE_VLAN_PRI_SHIFT)
+#define RTE_VLAN_TCI_DEI(vlan_tci)	(((vlan_tci) & RTE_VLAN_DEI_MASK) >> RTE_VLAN_DEI_SHIFT)
+#define RTE_VLAN_TCI_MAKE(id, pri, dei)	((id) |					\
+					 ((pri) << RTE_VLAN_PRI_SHIFT) |	\
+					 ((dei) << RTE_VLAN_DEI_SHIFT))
+
 /**
  * Ethernet address:
  * A universally administered address is uniquely assigned to a device by its
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.797580532 +0000
+++ 0083-net-add-macros-for-VLAN-metadata-parsing.patch	2024-03-07 01:05:34.950943242 +0000
@@ -1 +1 @@
-From b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc Mon Sep 17 00:00:00 2001
+From 6ccc09636724c4aede51a9d7a115f33335c93149 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index b2d0fc0729..12d2875641 100644
+index e4c3ff0024..061ca09b98 100644
@@ -22,2 +23,2 @@
-@@ -34,6 +34,7 @@ Alain Leon <xerebz@gmail.com>
- Alan Brady <alan.brady@intel.com>
+@@ -31,6 +31,7 @@ Akshay Dorwat <akshay.dorwat@amd.com>
+ Alain Leon <xerebz@gmail.com>
@@ -31 +32 @@
-index ce073ea818..75285bdd12 100644
+index bf8a55ba06..020d9b46ba 100644

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

* patch 'net/netvsc: fix VLAN metadata parsing' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (81 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net: add macros for VLAN metadata parsing' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/bnxt: fix array overflow' " luca.boccassi
                   ` (17 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Alan Elder; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From a254412faf34f120f418adebda45251262034212 Mon Sep 17 00:00:00 2001
From: Alan Elder <alan.elder@microsoft.com>
Date: Mon, 19 Feb 2024 09:31:39 +0000
Subject: [PATCH] net/netvsc: fix VLAN metadata parsing

[ upstream commit f7654c8c13f46ab537e8220ea4d6b4911f9f0fd5 ]

The previous code incorrectly parsed the VLAN ID and priority.
If the 16-bits of VLAN ID and priority/CFI on the wire was
0123456789ABCDEF the code parsed it as 456789ABCDEF3012.  There
were macros defined to handle this conversion but they were not
used.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Alan Elder <alan.elder@microsoft.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/netvsc/hn_rxtx.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index bc6f60c64a..6496979f28 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -612,7 +612,9 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
 					   RTE_PTYPE_L4_MASK);
 
 	if (info->vlan_info != HN_NDIS_VLAN_INFO_INVALID) {
-		m->vlan_tci = info->vlan_info;
+		m->vlan_tci = RTE_VLAN_TCI_MAKE(NDIS_VLAN_INFO_ID(info->vlan_info),
+						NDIS_VLAN_INFO_PRI(info->vlan_info),
+						NDIS_VLAN_INFO_CFI(info->vlan_info));
 		m->ol_flags |= RTE_MBUF_F_RX_VLAN_STRIPPED | RTE_MBUF_F_RX_VLAN;
 
 		/* NDIS always strips tag, put it back if necessary */
@@ -1332,7 +1334,9 @@ static void hn_encap(struct rndis_packet_msg *pkt,
 	if (m->ol_flags & RTE_MBUF_F_TX_VLAN) {
 		pi_data = hn_rndis_pktinfo_append(pkt, NDIS_VLAN_INFO_SIZE,
 						  NDIS_PKTINFO_TYPE_VLAN);
-		*pi_data = m->vlan_tci;
+		*pi_data = NDIS_VLAN_INFO_MAKE(RTE_VLAN_TCI_ID(m->vlan_tci),
+					       RTE_VLAN_TCI_PRI(m->vlan_tci),
+					       RTE_VLAN_TCI_DEI(m->vlan_tci));
 	}
 
 	if (m->ol_flags & RTE_MBUF_F_TX_TCP_SEG) {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.872835544 +0000
+++ 0084-net-netvsc-fix-VLAN-metadata-parsing.patch	2024-03-07 01:05:34.950943242 +0000
@@ -1 +1 @@
-From f7654c8c13f46ab537e8220ea4d6b4911f9f0fd5 Mon Sep 17 00:00:00 2001
+From a254412faf34f120f418adebda45251262034212 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f7654c8c13f46ab537e8220ea4d6b4911f9f0fd5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index e4f5015aa3..9bf1ec5509 100644
+index bc6f60c64a..6496979f28 100644

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

* patch 'net/bnxt: fix array overflow' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (82 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/netvsc: fix " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/bnxt: fix 50G and 100G forced speed' " luca.boccassi
                   ` (16 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Damodharam Ammepalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From f94b1dffa15c635729503ca1803fbbd89d6887c5 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Mon, 11 Dec 2023 09:11:03 -0800
Subject: [PATCH] net/bnxt: fix array overflow

[ upstream commit 4371b402c7bdbe821fff77e3c08e2faba67cb9b3 ]

In some cases the number of elements in the context memory array
can exceed the MAX_CTX_PAGES and that can cause the static members
ctx_pg_arr and ctx_dma_arr to overflow.
Allocate them dynamically to prevent this overflow.

Fixes: f8168ca0e690 ("net/bnxt: support thor controller")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  4 ++--
 drivers/net/bnxt/bnxt_ethdev.c | 42 +++++++++++++++++++++++++++-------
 2 files changed, 36 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index c9aa45ed3b..df6442abc4 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -441,8 +441,8 @@ struct bnxt_ring_mem_info {
 
 struct bnxt_ctx_pg_info {
 	uint32_t	entries;
-	void		*ctx_pg_arr[MAX_CTX_PAGES];
-	rte_iova_t	ctx_dma_arr[MAX_CTX_PAGES];
+	void		**ctx_pg_arr;
+	rte_iova_t	*ctx_dma_arr;
 	struct bnxt_ring_mem_info ring_mem;
 };
 
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e3ba48ac0b..c89a31592a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4702,7 +4702,7 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
 {
 	struct bnxt_ring_mem_info *rmem = &ctx_pg->ring_mem;
 	const struct rte_memzone *mz = NULL;
-	char mz_name[RTE_MEMZONE_NAMESIZE];
+	char name[RTE_MEMZONE_NAMESIZE];
 	rte_iova_t mz_phys_addr;
 	uint64_t valid_bits = 0;
 	uint32_t sz;
@@ -4714,6 +4714,19 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
 	rmem->nr_pages = RTE_ALIGN_MUL_CEIL(mem_size, BNXT_PAGE_SIZE) /
 			 BNXT_PAGE_SIZE;
 	rmem->page_size = BNXT_PAGE_SIZE;
+
+	snprintf(name, RTE_MEMZONE_NAMESIZE, "bnxt_ctx_pg_arr%s_%x_%d",
+		 suffix, idx, bp->eth_dev->data->port_id);
+	ctx_pg->ctx_pg_arr = rte_zmalloc(name, sizeof(void *) * rmem->nr_pages, 0);
+	if (ctx_pg->ctx_pg_arr == NULL)
+		return -ENOMEM;
+
+	snprintf(name, RTE_MEMZONE_NAMESIZE, "bnxt_ctx_dma_arr%s_%x_%d",
+		 suffix, idx, bp->eth_dev->data->port_id);
+	ctx_pg->ctx_dma_arr = rte_zmalloc(name, sizeof(rte_iova_t *) * rmem->nr_pages, 0);
+	if (ctx_pg->ctx_dma_arr == NULL)
+		return -ENOMEM;
+
 	rmem->pg_arr = ctx_pg->ctx_pg_arr;
 	rmem->dma_arr = ctx_pg->ctx_dma_arr;
 	rmem->flags = BNXT_RMEM_VALID_PTE_FLAG;
@@ -4721,13 +4734,13 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
 	valid_bits = PTU_PTE_VALID;
 
 	if (rmem->nr_pages > 1) {
-		snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
+		snprintf(name, RTE_MEMZONE_NAMESIZE,
 			 "bnxt_ctx_pg_tbl%s_%x_%d",
 			 suffix, idx, bp->eth_dev->data->port_id);
-		mz_name[RTE_MEMZONE_NAMESIZE - 1] = 0;
-		mz = rte_memzone_lookup(mz_name);
+		name[RTE_MEMZONE_NAMESIZE - 1] = 0;
+		mz = rte_memzone_lookup(name);
 		if (!mz) {
-			mz = rte_memzone_reserve_aligned(mz_name,
+			mz = rte_memzone_reserve_aligned(name,
 						rmem->nr_pages * 8,
 						bp->eth_dev->device->numa_node,
 						RTE_MEMZONE_2MB |
@@ -4746,11 +4759,11 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
 		rmem->pg_tbl_mz = mz;
 	}
 
-	snprintf(mz_name, RTE_MEMZONE_NAMESIZE, "bnxt_ctx_%s_%x_%d",
+	snprintf(name, RTE_MEMZONE_NAMESIZE, "bnxt_ctx_%s_%x_%d",
 		 suffix, idx, bp->eth_dev->data->port_id);
-	mz = rte_memzone_lookup(mz_name);
+	mz = rte_memzone_lookup(name);
 	if (!mz) {
-		mz = rte_memzone_reserve_aligned(mz_name,
+		mz = rte_memzone_reserve_aligned(name,
 						 mem_size,
 						 bp->eth_dev->device->numa_node,
 						 RTE_MEMZONE_1GB |
@@ -4796,6 +4809,17 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
 		return;
 
 	bp->ctx->flags &= ~BNXT_CTX_FLAG_INITED;
+	rte_free(bp->ctx->qp_mem.ctx_pg_arr);
+	rte_free(bp->ctx->srq_mem.ctx_pg_arr);
+	rte_free(bp->ctx->cq_mem.ctx_pg_arr);
+	rte_free(bp->ctx->vnic_mem.ctx_pg_arr);
+	rte_free(bp->ctx->stat_mem.ctx_pg_arr);
+	rte_free(bp->ctx->qp_mem.ctx_dma_arr);
+	rte_free(bp->ctx->srq_mem.ctx_dma_arr);
+	rte_free(bp->ctx->cq_mem.ctx_dma_arr);
+	rte_free(bp->ctx->vnic_mem.ctx_dma_arr);
+	rte_free(bp->ctx->stat_mem.ctx_dma_arr);
+
 	rte_memzone_free(bp->ctx->qp_mem.ring_mem.mz);
 	rte_memzone_free(bp->ctx->srq_mem.ring_mem.mz);
 	rte_memzone_free(bp->ctx->cq_mem.ring_mem.mz);
@@ -4808,6 +4832,8 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
 	rte_memzone_free(bp->ctx->stat_mem.ring_mem.pg_tbl_mz);
 
 	for (i = 0; i < bp->ctx->tqm_fp_rings_count + 1; i++) {
+		rte_free(bp->ctx->tqm_mem[i]->ctx_pg_arr);
+		rte_free(bp->ctx->tqm_mem[i]->ctx_dma_arr);
 		if (bp->ctx->tqm_mem[i])
 			rte_memzone_free(bp->ctx->tqm_mem[i]->ring_mem.mz);
 	}
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:41.948228166 +0000
+++ 0085-net-bnxt-fix-array-overflow.patch	2024-03-07 01:05:34.958943412 +0000
@@ -1 +1 @@
-From 4371b402c7bdbe821fff77e3c08e2faba67cb9b3 Mon Sep 17 00:00:00 2001
+From f94b1dffa15c635729503ca1803fbbd89d6887c5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4371b402c7bdbe821fff77e3c08e2faba67cb9b3 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 50f59552fa..dd08393b82 100644
+index c9aa45ed3b..df6442abc4 100644
@@ -25 +26 @@
-@@ -455,8 +455,8 @@ struct bnxt_ring_mem_info {
+@@ -441,8 +441,8 @@ struct bnxt_ring_mem_info {
@@ -37 +38 @@
-index b0589e2e49..762d863f14 100644
+index e3ba48ac0b..c89a31592a 100644
@@ -40 +41 @@
-@@ -4769,7 +4769,7 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4702,7 +4702,7 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
@@ -49 +50 @@
-@@ -4781,6 +4781,19 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4714,6 +4714,19 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
@@ -69 +70 @@
-@@ -4788,13 +4801,13 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4721,13 +4734,13 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
@@ -87 +88 @@
-@@ -4813,11 +4826,11 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4746,11 +4759,11 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
@@ -102 +103 @@
-@@ -4863,6 +4876,17 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
+@@ -4796,6 +4809,17 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
@@ -120 +121 @@
-@@ -4875,6 +4899,8 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
+@@ -4808,6 +4832,8 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)

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

* patch 'net/bnxt: fix 50G and 100G forced speed' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (83 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/bnxt: fix array overflow' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/bnxt: fix speed change from 200G to 25G on Thor' " luca.boccassi
                   ` (15 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 66f4540fa5d591c5c16586a758a21890d8bb19c0 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 16 Nov 2023 00:12:01 -0800
Subject: [PATCH] net/bnxt: fix 50G and 100G forced speed

[ upstream commit dd8d40bc8294ee1f5753205d14f37accc7a7debc ]

Thor based NICs can support PAM4 as well as NRZ link negotiation.
While PAM4 can negotiate speeds at 50G, 100G and 200G, the PMD will
use NRZ signaling for 50G and 100G speeds. PAM4 signaling will be
used only for 200G speed negotiations.

Driver has to check for NRZ speed support first while forcing speed.

Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link")

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

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 51e1e2d6b3..45f92ff558 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2972,6 +2972,8 @@ static uint16_t bnxt_check_eth_link_autoneg(uint32_t conf_link)
 static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
 					  struct bnxt_link_info *link_info)
 {
+	uint16_t support_pam4_speeds = link_info->support_pam4_speeds;
+	uint16_t support_speeds = link_info->support_speeds;
 	uint16_t eth_link_speed = 0;
 
 	if (conf_link_speed == RTE_ETH_LINK_SPEED_AUTONEG)
@@ -3009,23 +3011,23 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
 			HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_40GB;
 		break;
 	case RTE_ETH_LINK_SPEED_50G:
-		if (link_info->support_pam4_speeds &
-		    HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_50G) {
-			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_50GB;
-			link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
-		} else {
+		if (support_speeds & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_50GB) {
 			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_50GB;
 			link_info->link_signal_mode = BNXT_SIG_MODE_NRZ;
+		} else if (support_pam4_speeds &
+			   HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_50G) {
+			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_50GB;
+			link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
 		}
 		break;
 	case RTE_ETH_LINK_SPEED_100G:
-		if (link_info->support_pam4_speeds &
-		    HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_100G) {
-			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_100GB;
-			link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
-		} else {
+		if (support_speeds & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB) {
 			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_100GB;
 			link_info->link_signal_mode = BNXT_SIG_MODE_NRZ;
+		} else if (support_pam4_speeds &
+			   HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_100G) {
+			eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_100GB;
+			link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
 		}
 		break;
 	case RTE_ETH_LINK_SPEED_200G:
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:42.032735646 +0000
+++ 0086-net-bnxt-fix-50G-and-100G-forced-speed.patch	2024-03-07 01:05:34.966943582 +0000
@@ -1 +1 @@
-From dd8d40bc8294ee1f5753205d14f37accc7a7debc Mon Sep 17 00:00:00 2001
+From 66f4540fa5d591c5c16586a758a21890d8bb19c0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dd8d40bc8294ee1f5753205d14f37accc7a7debc ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 2ae0cb2067..8f37077522 100644
+index 51e1e2d6b3..45f92ff558 100644
@@ -27 +28 @@
-@@ -3158,6 +3158,8 @@ static uint16_t bnxt_check_eth_link_autoneg(uint32_t conf_link)
+@@ -2972,6 +2972,8 @@ static uint16_t bnxt_check_eth_link_autoneg(uint32_t conf_link)
@@ -36 +37 @@
-@@ -3195,23 +3197,23 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
+@@ -3009,23 +3011,23 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,

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

* patch 'net/bnxt: fix speed change from 200G to 25G on Thor' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (84 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/bnxt: fix 50G and 100G forced speed' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/bnxt: fix backward firmware compatibility' " luca.boccassi
                   ` (14 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 61fe7465490bc4463d4d1182215d47414b1dbd9e Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Sat, 4 Nov 2023 22:31:07 -0700
Subject: [PATCH] net/bnxt: fix speed change from 200G to 25G on Thor

[ upstream commit 753b8ff26162ffaf118c03e47ab75cfd2229d4e8 ]

While forcing speed to 200G, driver sets the structure variable
"bp->link_info->link_signal_mode" value to BNXT_SIG_MODE_PAM4.
After that when the user forces the speed back to 25G, this
cached value is not set back to BNXT_SIG_MODE_NRZ which results
in issuing the HWRM_PORT_PHY_CFG command with wrong inputs.

Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link")

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

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 45f92ff558..098f84fbae 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3005,6 +3005,7 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
 	case RTE_ETH_LINK_SPEED_25G:
 		eth_link_speed =
 			HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_25GB;
+		link_info->link_signal_mode = BNXT_SIG_MODE_NRZ;
 		break;
 	case RTE_ETH_LINK_SPEED_40G:
 		eth_link_speed =
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:42.118157918 +0000
+++ 0087-net-bnxt-fix-speed-change-from-200G-to-25G-on-Thor.patch	2024-03-07 01:05:34.970943666 +0000
@@ -1 +1 @@
-From 753b8ff26162ffaf118c03e47ab75cfd2229d4e8 Mon Sep 17 00:00:00 2001
+From 61fe7465490bc4463d4d1182215d47414b1dbd9e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 753b8ff26162ffaf118c03e47ab75cfd2229d4e8 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 8f37077522..441e3aef51 100644
+index 45f92ff558..098f84fbae 100644
@@ -26 +27 @@
-@@ -3191,6 +3191,7 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
+@@ -3005,6 +3005,7 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
@@ -29 +30 @@
- 			HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_25GB;
+ 			HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_25GB;

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

* patch 'net/bnxt: fix backward firmware compatibility' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (85 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/bnxt: fix speed change from 200G to 25G on Thor' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/bnxt: modify locking for representor Tx' " luca.boccassi
                   ` (13 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From e2cfac4357b258fd569754b7bf13f6a3e858418d Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 7 Dec 2023 07:56:26 -0800
Subject: [PATCH] net/bnxt: fix backward firmware compatibility

[ upstream commit 589619999b0411a4266e335fe105e1c7cba6e02b ]

On older firmware versions, HWRM_FUNC_QCAPS response is not
returning the maximum number of multicast filters that can be
supported by the function. As a result, memory allocation with
size 0 fails.

Bugzilla ID: 1309

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h      | 1 +
 drivers/net/bnxt/bnxt_hwrm.c | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index df6442abc4..5ea6f9b69a 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -867,6 +867,7 @@ struct bnxt {
 	struct rte_ether_addr	*mcast_addr_list;
 	rte_iova_t		mc_list_dma_addr;
 	uint32_t		nb_mc_addr;
+#define BNXT_DFLT_MAX_MC_ADDR	16 /* for compatibility with older firmware */
 	uint32_t		max_mcast_addr; /* maximum number of mcast filters supported */
 
 	struct rte_eth_rss_conf	rss_conf; /* RSS configuration. */
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 098f84fbae..ad756337da 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -907,7 +907,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 		    bp->max_l2_ctx, bp->max_vnics);
 	bp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);
 	bp->max_mcast_addr = rte_le_to_cpu_32(resp->max_mcast_filters);
-
+	if (!bp->max_mcast_addr)
+		bp->max_mcast_addr = BNXT_DFLT_MAX_MC_ADDR;
 	if (BNXT_PF(bp)) {
 		bp->pf->total_vnics = rte_le_to_cpu_16(resp->max_vnics);
 		if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED) {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:42.204526909 +0000
+++ 0088-net-bnxt-fix-backward-firmware-compatibility.patch	2024-03-07 01:05:34.978943837 +0000
@@ -1 +1 @@
-From 589619999b0411a4266e335fe105e1c7cba6e02b Mon Sep 17 00:00:00 2001
+From e2cfac4357b258fd569754b7bf13f6a3e858418d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 589619999b0411a4266e335fe105e1c7cba6e02b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- drivers/net/bnxt/bnxt_hwrm.c | 2 ++
- 2 files changed, 3 insertions(+)
+ drivers/net/bnxt/bnxt_hwrm.c | 3 ++-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
@@ -22 +23 @@
-index 3290c57a72..4b8a691f80 100644
+index df6442abc4..5ea6f9b69a 100644
@@ -25 +26 @@
-@@ -974,6 +974,7 @@ struct bnxt {
+@@ -867,6 +867,7 @@ struct bnxt {
@@ -34 +35 @@
-index 441e3aef51..9260bcb4cd 100644
+index 098f84fbae..ad756337da 100644
@@ -37 +38 @@
-@@ -901,6 +901,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+@@ -907,7 +907,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
@@ -40,0 +42 @@
+-
@@ -43,3 +45,3 @@
- 	memcpy(bp->dsn, resp->device_serial_number, sizeof(bp->dsn));
- 
- 	if (BNXT_PF(bp))
+ 	if (BNXT_PF(bp)) {
+ 		bp->pf->total_vnics = rte_le_to_cpu_16(resp->max_vnics);
+ 		if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED) {

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

* patch 'net/bnxt: modify locking for representor Tx' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (86 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/bnxt: fix backward firmware compatibility' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/bnxt: fix deadlock in ULP timer callback' " luca.boccassi
                   ` (12 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Peter Spreadborough, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From d71a7702314a605d86c761d72bbf857504e59752 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 8 Feb 2024 09:13:25 -0800
Subject: [PATCH] net/bnxt: modify locking for representor Tx

[ upstream commit d46406c7070724c8cfd04b805849339d1178f528 ]

Currently the representor Tx function is synchronized using a per
device lock. But that is not sufficient when there is simultaneous
traffic on the parent Tx ring and the representor rings.
Moreover the representor Tx is not protected from incursions by the
parent transmits. This can cause parent Tx threads to crossover into
the representor Tx contexts. Prevent this by using per TxQ locking and
protect not just representor Tx, but also the parent Tx using the lock.

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  1 -
 drivers/net/bnxt/bnxt_ethdev.c | 11 +----------
 drivers/net/bnxt/bnxt_reps.c   |  6 +++---
 drivers/net/bnxt/bnxt_txq.c    |  6 ++++++
 drivers/net/bnxt/bnxt_txq.h    |  1 +
 drivers/net/bnxt/bnxt_txr.c    | 13 +++++++++++++
 drivers/net/bnxt/bnxt_txr.h    |  4 +++-
 7 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 5ea6f9b69a..3044c9e079 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -542,7 +542,6 @@ struct bnxt_mark_info {
 
 struct bnxt_rep_info {
 	struct rte_eth_dev	*vfr_eth_dev;
-	pthread_mutex_t		vfr_lock;
 	pthread_mutex_t		vfr_start_lock;
 	bool			conduit_valid;
 };
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c89a31592a..cb52ef2f84 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1648,10 +1648,8 @@ bnxt_uninit_locks(struct bnxt *bp)
 	pthread_mutex_destroy(&bp->def_cp_lock);
 	pthread_mutex_destroy(&bp->health_check_lock);
 	pthread_mutex_destroy(&bp->err_recovery_lock);
-	if (bp->rep_info) {
-		pthread_mutex_destroy(&bp->rep_info->vfr_lock);
+	if (bp->rep_info)
 		pthread_mutex_destroy(&bp->rep_info->vfr_start_lock);
-	}
 }
 
 static void bnxt_drv_uninit(struct bnxt *bp)
@@ -6099,13 +6097,6 @@ static int bnxt_init_rep_info(struct bnxt *bp)
 	for (i = 0; i < BNXT_MAX_CFA_CODE; i++)
 		bp->cfa_code_map[i] = BNXT_VF_IDX_INVALID;
 
-	rc = pthread_mutex_init(&bp->rep_info->vfr_lock, NULL);
-	if (rc) {
-		PMD_DRV_LOG(ERR, "Unable to initialize vfr_lock\n");
-		bnxt_free_rep_info(bp);
-		return rc;
-	}
-
 	rc = pthread_mutex_init(&bp->rep_info->vfr_start_lock, NULL);
 	if (rc) {
 		PMD_DRV_LOG(ERR, "Unable to initialize vfr_start_lock\n");
diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index 8a5b777793..4e09cd3e4a 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -124,8 +124,8 @@ bnxt_rep_tx_burst(void *tx_queue,
 	qid = vfr_txq->txq->queue_id;
 	vf_rep_bp = vfr_txq->bp;
 	parent = vf_rep_bp->parent_dev->data->dev_private;
-	pthread_mutex_lock(&parent->rep_info->vfr_lock);
 	ptxq = parent->tx_queues[qid];
+	pthread_mutex_lock(&ptxq->txq_lock);
 
 	ptxq->vfr_tx_cfa_action = vf_rep_bp->vfr_tx_cfa_action;
 
@@ -134,9 +134,9 @@ bnxt_rep_tx_burst(void *tx_queue,
 		vf_rep_bp->tx_pkts[qid]++;
 	}
 
-	rc = bnxt_xmit_pkts(ptxq, tx_pkts, nb_pkts);
+	rc = _bnxt_xmit_pkts(ptxq, tx_pkts, nb_pkts);
 	ptxq->vfr_tx_cfa_action = 0;
-	pthread_mutex_unlock(&parent->rep_info->vfr_lock);
+	pthread_mutex_unlock(&ptxq->txq_lock);
 
 	return rc;
 }
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index c8745add5e..0f41193038 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -111,6 +111,7 @@ void bnxt_tx_queue_release_op(struct rte_eth_dev *dev, uint16_t queue_idx)
 		txq->mz = NULL;
 
 		rte_free(txq->free);
+		pthread_mutex_destroy(&txq->txq_lock);
 		rte_free(txq);
 		dev->data->tx_queues[queue_idx] = NULL;
 	}
@@ -194,6 +195,11 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 		goto err;
 	}
 
+	rc = pthread_mutex_init(&txq->txq_lock, NULL);
+	if (rc != 0) {
+		PMD_DRV_LOG(ERR, "TxQ mutex init failed!");
+		goto err;
+	}
 	return 0;
 err:
 	bnxt_tx_queue_release_op(eth_dev, queue_idx);
diff --git a/drivers/net/bnxt/bnxt_txq.h b/drivers/net/bnxt/bnxt_txq.h
index f3a03812ad..6e2d87de09 100644
--- a/drivers/net/bnxt/bnxt_txq.h
+++ b/drivers/net/bnxt/bnxt_txq.h
@@ -26,6 +26,7 @@ struct bnxt_tx_queue {
 	int			index;
 	int			tx_wake_thresh;
 	uint32_t		vfr_tx_cfa_action;
+	pthread_mutex_t		txq_lock;
 	struct bnxt_tx_ring_info	*tx_ring;
 
 	unsigned int		cp_nr_rings;
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 21c2217092..60bb3eea0c 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -515,6 +515,19 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
 
 uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			       uint16_t nb_pkts)
+{
+	struct bnxt_tx_queue *txq = tx_queue;
+	uint16_t rc;
+
+	pthread_mutex_lock(&txq->txq_lock);
+	rc = _bnxt_xmit_pkts(tx_queue, tx_pkts, nb_pkts);
+	pthread_mutex_unlock(&txq->txq_lock);
+
+	return rc;
+}
+
+uint16_t _bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+			 uint16_t nb_pkts)
 {
 	int rc;
 	uint16_t nb_tx_pkts = 0;
diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
index e11343c082..2be3ba4cac 100644
--- a/drivers/net/bnxt/bnxt_txr.h
+++ b/drivers/net/bnxt/bnxt_txr.h
@@ -46,7 +46,9 @@ void bnxt_free_tx_rings(struct bnxt *bp);
 int bnxt_init_one_tx_ring(struct bnxt_tx_queue *txq);
 int bnxt_init_tx_ring_struct(struct bnxt_tx_queue *txq, unsigned int socket_id);
 uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
-			       uint16_t nb_pkts);
+			uint16_t nb_pkts);
+uint16_t _bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+			 uint16_t nb_pkts);
 #if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			    uint16_t nb_pkts);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:42.291055114 +0000
+++ 0089-net-bnxt-modify-locking-for-representor-Tx.patch	2024-03-07 01:05:34.990944091 +0000
@@ -1 +1 @@
-From d46406c7070724c8cfd04b805849339d1178f528 Mon Sep 17 00:00:00 2001
+From d71a7702314a605d86c761d72bbf857504e59752 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d46406c7070724c8cfd04b805849339d1178f528 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index b604284256..23b0829e9e 100644
+index 5ea6f9b69a..3044c9e079 100644
@@ -33 +34 @@
-@@ -623,7 +623,6 @@ struct bnxt_mark_info {
+@@ -542,7 +542,6 @@ struct bnxt_mark_info {
@@ -42 +43 @@
-index 74064e8971..72debaca64 100644
+index c89a31592a..cb52ef2f84 100644
@@ -45 +46 @@
-@@ -1802,10 +1802,8 @@ bnxt_uninit_locks(struct bnxt *bp)
+@@ -1648,10 +1648,8 @@ bnxt_uninit_locks(struct bnxt *bp)
@@ -57 +58 @@
-@@ -6523,13 +6521,6 @@ static int bnxt_init_rep_info(struct bnxt *bp)
+@@ -6099,13 +6097,6 @@ static int bnxt_init_rep_info(struct bnxt *bp)
@@ -72 +73 @@
-index d96d972904..3a4720bc3c 100644
+index 8a5b777793..4e09cd3e4a 100644
@@ -98 +99 @@
-index 7d91e88c9d..05032f7807 100644
+index c8745add5e..0f41193038 100644
@@ -101 +102 @@
-@@ -114,6 +114,7 @@ void bnxt_tx_queue_release_op(struct rte_eth_dev *dev, uint16_t queue_idx)
+@@ -111,6 +111,7 @@ void bnxt_tx_queue_release_op(struct rte_eth_dev *dev, uint16_t queue_idx)
@@ -109 +110 @@
-@@ -197,6 +198,11 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -194,6 +195,11 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -122 +123 @@
-index 3a483ad5c3..9e54985c4c 100644
+index f3a03812ad..6e2d87de09 100644
@@ -134 +135 @@
-index d74d271d91..7fc44e989d 100644
+index 21c2217092..60bb3eea0c 100644
@@ -137 +138 @@
-@@ -567,6 +567,19 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
+@@ -515,6 +515,19 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
@@ -158 +159 @@
-index e64ea2c7d1..09078d545d 100644
+index e11343c082..2be3ba4cac 100644
@@ -161 +162 @@
-@@ -47,7 +47,9 @@ void bnxt_free_tx_rings(struct bnxt *bp);
+@@ -46,7 +46,9 @@ void bnxt_free_tx_rings(struct bnxt *bp);

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

* patch 'net/bnxt: fix deadlock in ULP timer callback' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (87 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/bnxt: modify locking for representor Tx' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/cnxk: fix flow RSS configuration' " luca.boccassi
                   ` (11 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Weiguo Li; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 51f2cd1ff7be6810f1b459aa8653b7c8611ffd2f Mon Sep 17 00:00:00 2001
From: Weiguo Li <liweiguo@xencore.cn>
Date: Sat, 4 Nov 2023 12:06:58 +0800
Subject: [PATCH] net/bnxt: fix deadlock in ULP timer callback

[ upstream commit 81132be766f57ad39a7fe0ad86717b9618e60889 ]

The function 'ulp_ha_mgr_timer_cb' acquires a lock on the context
entry at the beginning with bnxt_ulp_cntxt_entry_acquire(). This lock
is expected to be released by bnxt_ulp_cntxt_entry_release() at the
end of the function.

However, the second early return statement in the function could
potentially bypass the lock release. To fix this issue, add
bnxt_ulp_cntxt_entry_release() before the return statement.

Fixes: 1993b267dbcb ("net/bnxt: cleanup ULP parser and mapper")

Signed-off-by: Weiguo Li <liweiguo@xencore.cn>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
index 0030a487f5..897410cc0a 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
@@ -171,6 +171,7 @@ ulp_ha_mgr_timer_cb(void *arg)
 
 	myclient_cnt = bnxt_ulp_cntxt_num_shared_clients_get(ulp_ctx);
 	if (myclient_cnt == 0) {
+		bnxt_ulp_cntxt_entry_release();
 		BNXT_TF_DBG(ERR,
 			    "PANIC Client Count is zero kill timer\n.");
 		return;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:42.380702285 +0000
+++ 0090-net-bnxt-fix-deadlock-in-ULP-timer-callback.patch	2024-03-07 01:05:34.990944091 +0000
@@ -1 +1 @@
-From 81132be766f57ad39a7fe0ad86717b9618e60889 Mon Sep 17 00:00:00 2001
+From 51f2cd1ff7be6810f1b459aa8653b7c8611ffd2f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 81132be766f57ad39a7fe0ad86717b9618e60889 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index f3f5bda890..852deef3b4 100644
+index 0030a487f5..897410cc0a 100644
@@ -28 +29 @@
-@@ -253,6 +253,7 @@ ulp_ha_mgr_timer_cb(void *arg)
+@@ -171,6 +171,7 @@ ulp_ha_mgr_timer_cb(void *arg)

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

* patch 'net/cnxk: fix flow RSS configuration' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (88 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/bnxt: fix deadlock in ULP timer callback' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/thunderx: fix DMAC control register update' " luca.boccassi
                   ` (10 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Kiran Kumar K; +Cc: Satheesh Paul, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From d7cb16965b578ea628f1e3ea550500a3181c54f3 Mon Sep 17 00:00:00 2001
From: Kiran Kumar K <kirankumark@marvell.com>
Date: Fri, 15 Dec 2023 12:15:43 +0530
Subject: [PATCH] net/cnxk: fix flow RSS configuration

[ upstream commit 752ce2f3e5bf7bd8add8dc9629f3b824886c641e ]

While creating a RSS rule, if no RSS types are specified,
use RSS types from dev config.

Fixes: bc778a17fa46 ("net/cnxk: support flow RSS")

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Satheesh Paul <psatheesh@marvell.com>
---
 drivers/net/cnxk/cnxk_flow.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c
index 422c5d74df..ee0c4e5550 100644
--- a/drivers/net/cnxk/cnxk_flow.c
+++ b/drivers/net/cnxk/cnxk_flow.c
@@ -98,15 +98,19 @@ npc_rss_action_validate(struct rte_eth_dev *eth_dev,
 }
 
 static void
-npc_rss_flowkey_get(struct cnxk_eth_dev *eth_dev,
-		    const struct roc_npc_action *rss_action,
-		    uint32_t *flowkey_cfg)
+npc_rss_flowkey_get(struct cnxk_eth_dev *eth_dev, const struct roc_npc_action *rss_action,
+		    uint32_t *flowkey_cfg, uint64_t default_rss_types)
 {
 	const struct roc_npc_action_rss *rss;
+	uint64_t rss_types;
 
 	rss = (const struct roc_npc_action_rss *)rss_action->conf;
+	rss_types = rss->types;
+	/* If no RSS types are specified, use default one */
+	if (rss_types == 0)
+		rss_types = default_rss_types;
 
-	*flowkey_cfg = cnxk_rss_ethdev_to_nix(eth_dev, rss->types, rss->level);
+	*flowkey_cfg = cnxk_rss_ethdev_to_nix(eth_dev, rss_types, rss->level);
 }
 
 static int
@@ -206,7 +210,8 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
 				goto err_exit;
 			in_actions[i].type = ROC_NPC_ACTION_TYPE_RSS;
 			in_actions[i].conf = actions->conf;
-			npc_rss_flowkey_get(dev, &in_actions[i], flowkey_cfg);
+			npc_rss_flowkey_get(dev, &in_actions[i], flowkey_cfg,
+					    eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf);
 			break;
 
 		case RTE_FLOW_ACTION_TYPE_SECURITY:
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:42.454676680 +0000
+++ 0091-net-cnxk-fix-flow-RSS-configuration.patch	2024-03-07 01:05:34.994944177 +0000
@@ -1 +1 @@
-From 752ce2f3e5bf7bd8add8dc9629f3b824886c641e Mon Sep 17 00:00:00 2001
+From d7cb16965b578ea628f1e3ea550500a3181c54f3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 752ce2f3e5bf7bd8add8dc9629f3b824886c641e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 11670d37e0..a92b61c332 100644
+index 422c5d74df..ee0c4e5550 100644
@@ -22 +23 @@
-@@ -103,15 +103,19 @@ npc_rss_action_validate(struct rte_eth_dev *eth_dev, const struct rte_flow_attr
+@@ -98,15 +98,19 @@ npc_rss_action_validate(struct rte_eth_dev *eth_dev,
@@ -46 +47 @@
-@@ -293,7 +297,8 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
+@@ -206,7 +210,8 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,

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

* patch 'net/thunderx: fix DMAC control register update' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (89 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/cnxk: fix flow RSS configuration' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'common/cnxk: fix mbox region copy' " luca.boccassi
                   ` (9 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Hanumanth Pothula; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From f1110aacd89326448e31baf65b6df16e7c7436df Mon Sep 17 00:00:00 2001
From: Hanumanth Pothula <hpothula@marvell.com>
Date: Thu, 21 Dec 2023 16:49:59 +0530
Subject: [PATCH] net/thunderx: fix DMAC control register update

[ upstream commit 44a8635459cbc83cde94b64971faee34ca9be19d ]

By default dmac control register is set to reject packets
on mac address match, leading all unicast packets to drop.
Update DMAC control register to allow packets on MAC address
match rather than dropping.

Fixes: e438796617dc ("net/thunderx: add PMD skeleton")

Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
---
 drivers/net/thunderx/base/nicvf_mbox.c | 12 ++++++++++++
 drivers/net/thunderx/base/nicvf_mbox.h | 10 ++++++++++
 drivers/net/thunderx/nicvf_ethdev.c    | 26 ++++++++++++++++++++++++++
 3 files changed, 48 insertions(+)

diff --git a/drivers/net/thunderx/base/nicvf_mbox.c b/drivers/net/thunderx/base/nicvf_mbox.c
index 5993eec4e6..0e0176974d 100644
--- a/drivers/net/thunderx/base/nicvf_mbox.c
+++ b/drivers/net/thunderx/base/nicvf_mbox.c
@@ -485,3 +485,15 @@ nicvf_mbox_reset_xcast(struct nicvf *nic)
 	mbx.msg.msg = NIC_MBOX_MSG_RESET_XCAST;
 	nicvf_mbox_send_msg_to_pf(nic, &mbx);
 }
+
+int
+nicvf_mbox_set_xcast(struct nicvf *nic, uint8_t  mode, uint64_t mac)
+{
+	struct nic_mbx mbx = { .msg = { 0 } };
+
+	mbx.xcast.msg = NIC_MBOX_MSG_SET_XCAST;
+	mbx.xcast.mode = mode;
+	mbx.xcast.mac = mac;
+
+	return nicvf_mbox_send_msg_to_pf(nic, &mbx);
+}
diff --git a/drivers/net/thunderx/base/nicvf_mbox.h b/drivers/net/thunderx/base/nicvf_mbox.h
index 322c8159cb..47f3d13755 100644
--- a/drivers/net/thunderx/base/nicvf_mbox.h
+++ b/drivers/net/thunderx/base/nicvf_mbox.h
@@ -45,6 +45,8 @@
 #define	NIC_MBOX_MSG_CFG_DONE		0xF0	/* VF configuration done */
 #define	NIC_MBOX_MSG_SHUTDOWN		0xF1	/* VF is being shutdown */
 #define NIC_MBOX_MSG_RESET_XCAST	0xF2    /* Reset DCAM filtering mode */
+#define	NIC_MBOX_MSG_ADD_MCAST		0xF3	/* ADD MAC to DCAM filters */
+#define	NIC_MBOX_MSG_SET_XCAST		0xF4	/* Set MCAST/BCAST Rx mode */
 #define	NIC_MBOX_MSG_MAX		0x100	/* Maximum number of messages */
 
 /* Get vNIC VF configuration */
@@ -190,6 +192,12 @@ struct change_link_mode_msg {
 
 };
 
+struct xcast {
+	uint8_t    msg;
+	uint8_t    mode;
+	uint64_t   mac:48;
+};
+
 struct nic_mbx {
 /* 128 bit shared memory between PF and each VF */
 union {
@@ -209,6 +217,7 @@ union {
 	struct reset_stat_cfg	reset_stat;
 	struct set_link_state	set_link;
 	struct change_link_mode_msg mode;
+	struct xcast xcast;
 };
 };
 
@@ -239,5 +248,6 @@ void nicvf_mbox_cfg_done(struct nicvf *nic);
 void nicvf_mbox_link_change(struct nicvf *nic);
 void nicvf_mbox_reset_xcast(struct nicvf *nic);
 int nicvf_mbox_change_mode(struct nicvf *nic, struct change_link_mode *cfg);
+int nicvf_mbox_set_xcast(struct nicvf *nic, uint8_t  mode, uint64_t mac);
 
 #endif /* __THUNDERX_NICVF_MBOX__ */
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index dd77a6c7fd..7045a71dca 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -58,6 +58,10 @@ RTE_LOG_REGISTER_SUFFIX(nicvf_logtype_driver, driver, NOTICE);
 #define NICVF_QLM_MODE_SGMII  7
 #define NICVF_QLM_MODE_XFI   12
 
+#define BCAST_ACCEPT      0x01
+#define CAM_ACCEPT        (1 << 3)
+#define BGX_MCAST_MODE(x) ((x) << 1)
+
 enum nicvf_link_speed {
 	NICVF_LINK_SPEED_SGMII,
 	NICVF_LINK_SPEED_XAUI,
@@ -2185,9 +2189,22 @@ nicvf_eth_dev_uninit(struct rte_eth_dev *dev)
 	nicvf_dev_close(dev);
 	return 0;
 }
+
+static inline uint64_t ether_addr_to_u64(uint8_t *addr)
+{
+	uint64_t u = 0;
+	int i;
+
+	for (i = 0; i < RTE_ETHER_ADDR_LEN; i++)
+		u = u << 8 | addr[i];
+
+	return u;
+}
+
 static int
 nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
 {
+	uint8_t dmac_ctrl_reg = 0;
 	int ret;
 	struct rte_pci_device *pci_dev;
 	struct nicvf *nic = nicvf_pmd_priv(eth_dev);
@@ -2311,6 +2328,15 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
 		goto malloc_fail;
 	}
 
+	/* set DMAC CTRL reg to allow MAC */
+	dmac_ctrl_reg = BCAST_ACCEPT | BGX_MCAST_MODE(2) | CAM_ACCEPT;
+	ret = nicvf_mbox_set_xcast(nic, dmac_ctrl_reg,
+			ether_addr_to_u64(nic->mac_addr));
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Failed to set mac addr");
+		goto malloc_fail;
+	}
+
 	ret = nicvf_set_first_skip(eth_dev);
 	if (ret) {
 		PMD_INIT_LOG(ERR, "Failed to configure first skip");
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:42.528375359 +0000
+++ 0092-net-thunderx-fix-DMAC-control-register-update.patch	2024-03-07 01:05:34.998944261 +0000
@@ -1 +1 @@
-From 44a8635459cbc83cde94b64971faee34ca9be19d Mon Sep 17 00:00:00 2001
+From f1110aacd89326448e31baf65b6df16e7c7436df Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 44a8635459cbc83cde94b64971faee34ca9be19d ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -83 +84 @@
-index ddcc52770e..609d95dcfa 100644
+index dd77a6c7fd..7045a71dca 100644
@@ -97 +98 @@
-@@ -2182,9 +2186,22 @@ nicvf_eth_dev_uninit(struct rte_eth_dev *dev)
+@@ -2185,9 +2189,22 @@ nicvf_eth_dev_uninit(struct rte_eth_dev *dev)
@@ -120 +121 @@
-@@ -2308,6 +2325,15 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2311,6 +2328,15 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)

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

* patch 'common/cnxk: fix mbox region copy' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (90 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/thunderx: fix DMAC control register update' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'common/cnxk: fix VLAN check for inner header' " luca.boccassi
                   ` (8 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Harman Kalra; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 079911f9f215aff47dbd78eb77c784c56f46b1aa Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Thu, 21 Dec 2023 12:08:10 +0530
Subject: [PATCH] common/cnxk: fix mbox region copy

[ upstream commit 4590d008892ce8a2d17ee7f1ed3fb10204a809e4 ]

Using proper API to perform copy to mbox device memory region

Fixes: 02719901d50f ("common/cnxk: send link status event to VF")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/common/cnxk/roc_dev.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c
index 33865f43fa..31f80f6717 100644
--- a/drivers/common/cnxk/roc_dev.c
+++ b/drivers/common/cnxk/roc_dev.c
@@ -190,9 +190,8 @@ af_pf_wait_msg(struct dev *dev, uint16_t vf, int num_msg)
 			vf_msg = mbox_alloc_msg(&dev->mbox_vfpf_up, vf, sz);
 			if (vf_msg) {
 				mbox_req_init(MBOX_MSG_CGX_LINK_EVENT, vf_msg);
-				memcpy((uint8_t *)vf_msg +
-				       sizeof(struct mbox_msghdr), &linfo,
-				       sizeof(struct cgx_link_user_info));
+				mbox_memcpy((uint8_t *)vf_msg + sizeof(struct mbox_msghdr), &linfo,
+					    sizeof(struct cgx_link_user_info));
 
 				vf_msg->rc = msg->rc;
 				vf_msg->pcifunc = msg->pcifunc;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:42.605885272 +0000
+++ 0093-common-cnxk-fix-mbox-region-copy.patch	2024-03-07 01:05:34.998944261 +0000
@@ -1 +1 @@
-From 4590d008892ce8a2d17ee7f1ed3fb10204a809e4 Mon Sep 17 00:00:00 2001
+From 079911f9f215aff47dbd78eb77c784c56f46b1aa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4590d008892ce8a2d17ee7f1ed3fb10204a809e4 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index e7e89bf3d6..084343c3b4 100644
+index 33865f43fa..31f80f6717 100644
@@ -20 +21 @@
-@@ -198,9 +198,8 @@ af_pf_wait_msg(struct dev *dev, uint16_t vf, int num_msg)
+@@ -190,9 +190,8 @@ af_pf_wait_msg(struct dev *dev, uint16_t vf, int num_msg)

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

* patch 'common/cnxk: fix VLAN check for inner header' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (91 preceding siblings ...)
  2024-03-07  1:31 ` patch 'common/cnxk: fix mbox region copy' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/mlx5: fix jump action validation' " luca.boccassi
                   ` (7 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Harman Kalra; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 3294358b40031d4b4ba9eaf78f78c414b7cd8df1 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Thu, 21 Dec 2023 12:08:11 +0530
Subject: [PATCH] common/cnxk: fix VLAN check for inner header

[ upstream commit 4f52aafa5901e653e536eb3126b818d78d7be1bc ]

Adding the has vlan check in inner headers i.e in LF layer. If
has_vlan is 0 it should be masked out while installing flow rule.

Fixes: c34ea71b878d ("common/cnxk: add NPC parsing API")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/common/cnxk/roc_npc_parse.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
index e695b755d7..ce66d2a7d8 100644
--- a/drivers/common/cnxk/roc_npc_parse.c
+++ b/drivers/common/cnxk/roc_npc_parse.c
@@ -1019,6 +1019,7 @@ npc_parse_lf(struct npc_parse_state *pst)
 {
 	const struct roc_npc_item_info *pattern, *last_pattern;
 	char hw_mask[NPC_MAX_EXTRACT_HW_LEN];
+	const struct roc_npc_flow_item_eth *eth_item;
 	struct npc_parse_item_info info;
 	int lid, lt, lflags;
 	int nr_vlans = 0;
@@ -1035,10 +1036,12 @@ npc_parse_lf(struct npc_parse_state *pst)
 	lt = NPC_LT_LF_TU_ETHER;
 	lflags = 0;
 
+	eth_item = pst->pattern->spec;
+
 	/* No match support for vlan tags */
 	info.def_mask = NULL;
 	info.hw_mask = NULL;
-	info.len = pst->pattern->size;
+	info.len = sizeof(eth_item->hdr);
 	info.spec = NULL;
 	info.mask = NULL;
 	info.hw_hdr_len = 0;
@@ -1069,12 +1072,15 @@ npc_parse_lf(struct npc_parse_state *pst)
 	}
 
 	info.hw_mask = &hw_mask;
-	info.len = pst->pattern->size;
+	info.len = sizeof(eth_item->hdr);
 	info.hw_hdr_len = 0;
 	npc_get_hw_supp_mask(pst, &info, lid, lt);
 	info.spec = NULL;
 	info.mask = NULL;
 
+	if (eth_item && eth_item->has_vlan)
+		pst->set_vlan_ltype_mask = true;
+
 	rc = npc_parse_item_basic(pst->pattern, &info);
 	if (rc != 0)
 		return rc;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:42.682510098 +0000
+++ 0094-common-cnxk-fix-VLAN-check-for-inner-header.patch	2024-03-07 01:05:35.002944346 +0000
@@ -1 +1 @@
-From 4f52aafa5901e653e536eb3126b818d78d7be1bc Mon Sep 17 00:00:00 2001
+From 3294358b40031d4b4ba9eaf78f78c414b7cd8df1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4f52aafa5901e653e536eb3126b818d78d7be1bc ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 9ceb707ebb..571d6b8e5d 100644
+index e695b755d7..ce66d2a7d8 100644
@@ -21 +22 @@
-@@ -1097,6 +1097,7 @@ npc_parse_lf(struct npc_parse_state *pst)
+@@ -1019,6 +1019,7 @@ npc_parse_lf(struct npc_parse_state *pst)
@@ -29 +30 @@
-@@ -1113,10 +1114,12 @@ npc_parse_lf(struct npc_parse_state *pst)
+@@ -1035,10 +1036,12 @@ npc_parse_lf(struct npc_parse_state *pst)
@@ -43 +44 @@
-@@ -1147,12 +1150,15 @@ npc_parse_lf(struct npc_parse_state *pst)
+@@ -1069,12 +1072,15 @@ npc_parse_lf(struct npc_parse_state *pst)

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

* patch 'net/mlx5: fix jump action validation' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (92 preceding siblings ...)
  2024-03-07  1:31 ` patch 'common/cnxk: fix VLAN check for inner header' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/mlx5: fix GENEVE TLV option management' " luca.boccassi
                   ` (6 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 53008878773f18149eefcabe3d3eb8f442c4b11c Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Mon, 27 Nov 2023 14:42:59 +0200
Subject: [PATCH] net/mlx5: fix jump action validation

[ upstream commit 9c289272ae692bd03d1dc9726ef19785beedd313 ]

Currently PMD doesn't allow to jump to the same group in order to
avoid dead loop. But this also prevent experienced user to create
flow with less Hops in order to have better performance.

For example, rules in [1] should have better performance then [2].

Furthermore, this protection will not really prevent dead loop, i.e
[3]. So just remove this protection and user should take the
responsibility to avoid dead loop.

This patch enables jumping to the same group.

[1]:
flow create 0 group 1 priority 1 pattern eth / ipv4 / udp / gtp / end
actions raw_decap / raw_encap / jump group 1 / end
flow create 0 group 1 priority 0 pattern eth / ipv4 src is 1.0.0.1 / tcp
/ end actions queues index 1 / end

[2]:
flow create 0 group 1 priority 0 pattern eth / ipv4 / udp / gtp / end
actions raw_decap / raw_encap / jump group 2 / end
flow create 0 group 2 priority 0 pattern eth / ipv4 src is 1.0.0.1 / tcp
/ end actions queues index 1 / end

[3]:
flow create 0 group 1 pattern eth / end actions jump group 2 / end
flow create 0 group 2 pattern eth / end actions jump group 1 / end

Fixes: f78f747f41d0 ("net/mlx5: allow jump to group lower than current")

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

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 5c2af50fe5..077306f048 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5207,13 +5207,6 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,
 				       &grp_info, error);
 	if (ret)
 		return ret;
-	if (attributes->group == target_group &&
-	    !(action_flags & (MLX5_FLOW_ACTION_TUNNEL_SET |
-			      MLX5_FLOW_ACTION_TUNNEL_MATCH)))
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-					  "target group must be other than"
-					  " the current flow group");
 	if (table == 0)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:42.756808229 +0000
+++ 0095-net-mlx5-fix-jump-action-validation.patch	2024-03-07 01:05:35.030944940 +0000
@@ -1 +1 @@
-From 9c289272ae692bd03d1dc9726ef19785beedd313 Mon Sep 17 00:00:00 2001
+From 53008878773f18149eefcabe3d3eb8f442c4b11c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9c289272ae692bd03d1dc9726ef19785beedd313 ]
+
@@ -35 +36,0 @@
-Cc: stable@dpdk.org
@@ -44 +45 @@
-index 52620be262..f881dae6e8 100644
+index 5c2af50fe5..077306f048 100644
@@ -47 +48 @@
-@@ -5484,13 +5484,6 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,
+@@ -5207,13 +5207,6 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,

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

* patch 'net/mlx5: fix GENEVE TLV option management' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (93 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/mlx5: fix jump action validation' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'common/mlx5: fix duplicate read of general capabilities' " luca.boccassi
                   ` (5 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From b328c4501cc25a3ad3244edfd27995df68365318 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Mon, 15 Jan 2024 14:13:26 +0200
Subject: [PATCH] net/mlx5: fix GENEVE TLV option management

[ upstream commit 0303967e1127c00e78fc9ce742aa531b943a2a8b ]

In SW steering, the GENEVE TLV option matching flows must be created
using a translation function.
This function checks whether this option has already created a DevX
object for the matching and either creates the objects or updates the
reference counter.
After translation, a flag in flow structure is turned on indicating the
destroy function to release this DevX object.

When the flow rule has meter, the rule may be split, and call translate
function more than once per flow causing object reference counter to
increase each time without updating the flow flag accordingly.

This patch uses this flag as a reference counter which is increased
every translation and indicates the destroy function how many destroy
DevX to do.

Fixes: f15f0c3806d0 ("net/mlx5: create GENEVE TLV option management")
Fixes: e440d6cf589e ("net/mlx5: add GENEVE TLV option flow translation")

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

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 077306f048..a566e61f49 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -13770,7 +13770,7 @@ flow_dv_translate_items_sws(struct rte_eth_dev *dev,
 	 * Avoid be overwritten by other sub mlx5_flows.
 	 */
 	if (wks.geneve_tlv_option)
-		dev_flow->flow->geneve_tlv_option = wks.geneve_tlv_option;
+		dev_flow->flow->geneve_tlv_option += wks.geneve_tlv_option;
 	return 0;
 }
 
@@ -15370,9 +15370,9 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
 		flow_dv_aso_ct_release(dev, flow->ct, NULL);
 	else if (flow->age)
 		flow_dv_aso_age_release(dev, flow->age);
-	if (flow->geneve_tlv_option) {
+	while (flow->geneve_tlv_option) {
 		flow_dev_geneve_tlv_option_resource_release(priv->sh);
-		flow->geneve_tlv_option = 0;
+		flow->geneve_tlv_option--;
 	}
 	while (flow->dev_handles) {
 		uint32_t tmp_idx = flow->dev_handles;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:42.868424891 +0000
+++ 0096-net-mlx5-fix-GENEVE-TLV-option-management.patch	2024-03-07 01:05:35.062945619 +0000
@@ -1 +1 @@
-From 0303967e1127c00e78fc9ce742aa531b943a2a8b Mon Sep 17 00:00:00 2001
+From b328c4501cc25a3ad3244edfd27995df68365318 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0303967e1127c00e78fc9ce742aa531b943a2a8b ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index 80eee00813..e1d09d4455 100644
+index 077306f048..a566e61f49 100644
@@ -36 +37 @@
-@@ -14373,7 +14373,7 @@ flow_dv_translate_items_sws(struct rte_eth_dev *dev,
+@@ -13770,7 +13770,7 @@ flow_dv_translate_items_sws(struct rte_eth_dev *dev,
@@ -45 +46 @@
-@@ -15982,9 +15982,9 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
+@@ -15370,9 +15370,9 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)

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

* patch 'common/mlx5: fix duplicate read of general capabilities' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (94 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/mlx5: fix GENEVE TLV option management' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/mlx5/hws: fix tunnel protocol checks' " luca.boccassi
                   ` (4 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Michael Baum; +Cc: Suanming Mou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 77d9b5e6d694a461fc200b5fe1dbf73464418c7c Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Thu, 25 Jan 2024 15:30:21 +0200
Subject: [PATCH] common/mlx5: fix duplicate read of general capabilities

[ upstream commit e8ffd7c26637b9119694368f16d2eb1341767fc6 ]

General object types support is indicated in bitmap general_obj_types,
which is part of HCA capabilities list.
This bitmap was read multiple times, and each time a different bit was
extracted.

Previous patch optimized the code, reading the bitmap once into a local
variable, and then extracting the required bits.
However, it missed few of them which still read the bitmap for
themselves. In addition, for other readings, it moved them to use local
variable without removing the old reading, and they are read twice.

This patch moves them all to use the local variable and removes all
duplications.

Fixes: 876d4702b141 ("common/mlx5: optimize read of general capabilities")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 9fdca2fecc..c570323fa8 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -902,18 +902,6 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 	attr->max_geneve_tlv_option_data_len = MLX5_GET(cmd_hca_cap, hcattr,
 			max_geneve_tlv_option_data_len);
 	attr->qos.sup = MLX5_GET(cmd_hca_cap, hcattr, qos);
-	attr->qos.flow_meter_aso_sup = !!(MLX5_GET64(cmd_hca_cap, hcattr,
-					 general_obj_types) &
-			      MLX5_GENERAL_OBJ_TYPES_CAP_FLOW_METER_ASO);
-	attr->vdpa.valid = !!(MLX5_GET64(cmd_hca_cap, hcattr,
-					 general_obj_types) &
-			      MLX5_GENERAL_OBJ_TYPES_CAP_VIRTQ_NET_Q);
-	attr->vdpa.queue_counters_valid = !!(MLX5_GET64(cmd_hca_cap, hcattr,
-							general_obj_types) &
-				  MLX5_GENERAL_OBJ_TYPES_CAP_VIRTIO_Q_COUNTERS);
-	attr->parse_graph_flex_node = !!(MLX5_GET64(cmd_hca_cap, hcattr,
-					 general_obj_types) &
-			      MLX5_GENERAL_OBJ_TYPES_CAP_PARSE_GRAPH_FLEX_NODE);
 	attr->wqe_index_ignore = MLX5_GET(cmd_hca_cap, hcattr,
 					  wqe_index_ignore_cap);
 	attr->cross_channel = MLX5_GET(cmd_hca_cap, hcattr, cd);
@@ -937,6 +925,9 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 	/* Read the general_obj_types bitmap and extract the relevant bits. */
 	general_obj_types_supported = MLX5_GET64(cmd_hca_cap, hcattr,
 						 general_obj_types);
+	attr->qos.flow_meter_aso_sup =
+			!!(general_obj_types_supported &
+			   MLX5_GENERAL_OBJ_TYPES_CAP_FLOW_METER_ASO);
 	attr->vdpa.valid = !!(general_obj_types_supported &
 			      MLX5_GENERAL_OBJ_TYPES_CAP_VIRTQ_NET_Q);
 	attr->vdpa.queue_counters_valid =
@@ -998,8 +989,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 		MLX5_GET(cmd_hca_cap, hcattr, umr_modify_entity_size_disabled);
 	attr->wait_on_time = MLX5_GET(cmd_hca_cap, hcattr, wait_on_time);
 	attr->crypto = MLX5_GET(cmd_hca_cap, hcattr, crypto);
-	attr->ct_offload = !!(MLX5_GET64(cmd_hca_cap, hcattr,
-					 general_obj_types) &
+	attr->ct_offload = !!(general_obj_types_supported &
 			      MLX5_GENERAL_OBJ_TYPES_CAP_CONN_TRACK_OFFLOAD);
 	attr->rq_delay_drop = MLX5_GET(cmd_hca_cap, hcattr, rq_delay_drop);
 	attr->nic_flow_table = MLX5_GET(cmd_hca_cap, hcattr, nic_flow_table);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:42.977792763 +0000
+++ 0097-common-mlx5-fix-duplicate-read-of-general-capabiliti.patch	2024-03-07 01:05:35.066945704 +0000
@@ -1 +1 @@
-From e8ffd7c26637b9119694368f16d2eb1341767fc6 Mon Sep 17 00:00:00 2001
+From 77d9b5e6d694a461fc200b5fe1dbf73464418c7c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e8ffd7c26637b9119694368f16d2eb1341767fc6 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 3a894f894a..faa38a9f95 100644
+index 9fdca2fecc..c570323fa8 100644
@@ -33 +34 @@
-@@ -966,18 +966,6 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
+@@ -902,18 +902,6 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
@@ -52 +53 @@
-@@ -1001,6 +989,9 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
+@@ -937,6 +925,9 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
@@ -62 +63 @@
-@@ -1074,8 +1065,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
+@@ -998,8 +989,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,

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

* patch 'net/mlx5/hws: fix tunnel protocol checks' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (95 preceding siblings ...)
  2024-03-07  1:31 ` patch 'common/mlx5: fix duplicate read of general capabilities' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/mlx5: remove GENEVE options length limitation' " luca.boccassi
                   ` (3 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Alex Vesker; +Cc: Suanming Mou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 02373cf8c20b4e9a52808a3e9ca8b28b3ccaa04c Mon Sep 17 00:00:00 2001
From: Alex Vesker <valex@nvidia.com>
Date: Thu, 25 Jan 2024 15:30:23 +0200
Subject: [PATCH] net/mlx5/hws: fix tunnel protocol checks

[ upstream commit 28e69588f4170f29b73a04fc3bffba2596305782 ]

Align GRE, GTPU and VXLAN tunnel protocols to fail
in case the packet is already tunneled. Also use local
defines for protocol UDP ports for better layering of
mlx5dr API.

Fixes: c55c2bf35333 ("net/mlx5/hws: add definer layer")
Fixes: 5bf14a4beb1a ("net/mlx5/hws: support matching on MPLSoUDP")

Signed-off-by: Alex Vesker <valex@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_definer.c | 32 +++++++++++++--------------
 1 file changed, 15 insertions(+), 17 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index 6fc5d70f67..af63cdd343 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -8,7 +8,7 @@
 #define BAD_PORT	0xBAD
 #define ETH_TYPE_IPV4_VXLAN	0x0800
 #define ETH_TYPE_IPV6_VXLAN	0x86DD
-#define ETH_VXLAN_DEFAULT_PORT	4789
+#define UDP_VXLAN_PORT	4789
 
 #define STE_NO_VLAN	0x0
 #define STE_SVLAN	0x1
@@ -153,7 +153,7 @@ struct mlx5dr_definer_conv_data {
 	X(SET,		gtp_ext_hdr_pdu,	v->hdr.type,		rte_flow_item_gtp_psc) \
 	X(SET,		gtp_ext_hdr_qfi,	v->hdr.qfi,		rte_flow_item_gtp_psc) \
 	X(SET,		vxlan_flags,		v->flags,		rte_flow_item_vxlan) \
-	X(SET,		vxlan_udp_port,		ETH_VXLAN_DEFAULT_PORT,	rte_flow_item_vxlan) \
+	X(SET,		vxlan_udp_port,		UDP_VXLAN_PORT,		rte_flow_item_vxlan) \
 	X(SET,		source_qp,		v->queue,		mlx5_rte_flow_item_sq) \
 	X(SET,		tag,			v->data,		rte_flow_item_tag) \
 	X(SET,		metadata,		v->data,		rte_flow_item_meta) \
@@ -824,6 +824,12 @@ mlx5dr_definer_conv_item_gtp(struct mlx5dr_definer_conv_data *cd,
 	const struct rte_flow_item_gtp *m = item->mask;
 	struct mlx5dr_definer_fc *fc;
 
+	if (cd->tunnel) {
+		DR_LOG(ERR, "Inner GTPU item not supported");
+		rte_errno = ENOTSUP;
+		return rte_errno;
+	}
+
 	/* Overwrite GTPU dest port if not present */
 	fc = &cd->fc[DR_CALC_FNAME(L4_DPORT, false)];
 	if (!fc->tag_set && !cd->relaxed) {
@@ -996,9 +1002,13 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer_conv_data *cd,
 	struct mlx5dr_definer_fc *fc;
 	bool inner = cd->tunnel;
 
-	/* In order to match on VXLAN we must match on ether_type, ip_protocol
-	 * and l4_dport.
-	 */
+	if (inner) {
+		DR_LOG(ERR, "Inner VXLAN item not supported");
+		rte_errno = ENOTSUP;
+		return rte_errno;
+	}
+
+	/* In order to match on VXLAN we must match on ip_protocol and l4_dport */
 	if (!cd->relaxed) {
 		fc = &cd->fc[DR_CALC_FNAME(IP_PROTOCOL, inner)];
 		if (!fc->tag_set) {
@@ -1021,12 +1031,6 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer_conv_data *cd,
 		return 0;
 
 	if (m->flags) {
-		if (inner) {
-			DR_LOG(ERR, "Inner VXLAN flags item not supported");
-			rte_errno = ENOTSUP;
-			return rte_errno;
-		}
-
 		fc = &cd->fc[MLX5DR_DEFINER_FNAME_VXLAN_FLAGS];
 		fc->item_idx = item_idx;
 		fc->tag_set = &mlx5dr_definer_vxlan_flags_set;
@@ -1036,12 +1040,6 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer_conv_data *cd,
 	}
 
 	if (!is_mem_zero(m->vni, 3)) {
-		if (inner) {
-			DR_LOG(ERR, "Inner VXLAN vni item not supported");
-			rte_errno = ENOTSUP;
-			return rte_errno;
-		}
-
 		fc = &cd->fc[MLX5DR_DEFINER_FNAME_VXLAN_VNI];
 		fc->item_idx = item_idx;
 		fc->tag_set = &mlx5dr_definer_vxlan_vni_set;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:43.056483875 +0000
+++ 0098-net-mlx5-hws-fix-tunnel-protocol-checks.patch	2024-03-07 01:05:35.070945790 +0000
@@ -1 +1 @@
-From 28e69588f4170f29b73a04fc3bffba2596305782 Mon Sep 17 00:00:00 2001
+From 02373cf8c20b4e9a52808a3e9ca8b28b3ccaa04c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 28e69588f4170f29b73a04fc3bffba2596305782 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- drivers/net/mlx5/hws/mlx5dr_definer.c | 43 +++++++++++++--------------
- 1 file changed, 21 insertions(+), 22 deletions(-)
+ drivers/net/mlx5/hws/mlx5dr_definer.c | 32 +++++++++++++--------------
+ 1 file changed, 15 insertions(+), 17 deletions(-)
@@ -22 +23 @@
-index 750eb9c7c6..219bffd3b5 100644
+index 6fc5d70f67..af63cdd343 100644
@@ -25 +26 @@
-@@ -8,9 +8,10 @@
+@@ -8,7 +8,7 @@
@@ -30,2 +30,0 @@
--#define ETH_VXLAN_GPE_DEFAULT_PORT	4790
--#define IP_UDP_PORT_MPLS	6635
@@ -33,5 +31,0 @@
-+#define UDP_VXLAN_GPE_PORT	4790
-+#define UDP_GTPU_PORT	2152
-+#define UDP_PORT_MPLS	6635
- #define UDP_ROCEV2_PORT	4791
- #define DR_FLOW_LAYER_TUNNEL_NO_MPLS (MLX5_FLOW_LAYER_TUNNEL & ~MLX5_FLOW_LAYER_MPLS)
@@ -39,10 +33,3 @@
-@@ -159,7 +160,7 @@ struct mlx5dr_definer_conv_data {
- 	X(SET,		tcp_protocol,		STE_TCP,		rte_flow_item_tcp) \
- 	X(SET_BE16,	tcp_src_port,		v->hdr.src_port,	rte_flow_item_tcp) \
- 	X(SET_BE16,	tcp_dst_port,		v->hdr.dst_port,	rte_flow_item_tcp) \
--	X(SET,		gtp_udp_port,		RTE_GTPU_UDP_PORT,	rte_flow_item_gtp) \
-+	X(SET,		gtp_udp_port,		UDP_GTPU_PORT,		rte_flow_item_gtp) \
- 	X(SET_BE32,	gtp_teid,		v->hdr.teid,		rte_flow_item_gtp) \
- 	X(SET,		gtp_msg_type,		v->hdr.msg_type,	rte_flow_item_gtp) \
- 	X(SET,		gtp_ext_flag,		!!v->hdr.gtp_hdr_info,	rte_flow_item_gtp) \
-@@ -167,12 +168,12 @@ struct mlx5dr_definer_conv_data {
+ #define STE_NO_VLAN	0x0
+ #define STE_SVLAN	0x1
+@@ -153,7 +153,7 @@ struct mlx5dr_definer_conv_data {
@@ -53 +39,0 @@
--	X(SET,		vxlan_gpe_udp_port,	ETH_VXLAN_GPE_DEFAULT_PORT,	rte_flow_item_vxlan_gpe) \
@@ -55,6 +40,0 @@
-+	X(SET,		vxlan_gpe_udp_port,	UDP_VXLAN_GPE_PORT,	rte_flow_item_vxlan_gpe) \
- 	X(SET,		vxlan_gpe_flags,	v->flags,		rte_flow_item_vxlan_gpe) \
- 	X(SET,		vxlan_gpe_protocol,	v->protocol,		rte_flow_item_vxlan_gpe) \
- 	X(SET,		vxlan_gpe_rsvd1,	v->rsvd1,		rte_flow_item_vxlan_gpe) \
--	X(SET,		mpls_udp_port,		IP_UDP_PORT_MPLS,	rte_flow_item_mpls) \
-+	X(SET,		mpls_udp_port,		UDP_PORT_MPLS,		rte_flow_item_mpls) \
@@ -64 +44 @@
-@@ -1198,6 +1199,12 @@ mlx5dr_definer_conv_item_gtp(struct mlx5dr_definer_conv_data *cd,
+@@ -824,6 +824,12 @@ mlx5dr_definer_conv_item_gtp(struct mlx5dr_definer_conv_data *cd,
@@ -77 +57 @@
-@@ -1372,9 +1379,13 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer_conv_data *cd,
+@@ -996,9 +1002,13 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer_conv_data *cd,
@@ -94 +74 @@
-@@ -1397,12 +1408,6 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer_conv_data *cd,
+@@ -1021,12 +1031,6 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer_conv_data *cd,
@@ -107 +87 @@
-@@ -1412,12 +1417,6 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer_conv_data *cd,
+@@ -1036,12 +1040,6 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer_conv_data *cd,

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

* patch 'net/mlx5: remove GENEVE options length limitation' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (96 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/mlx5/hws: fix tunnel protocol checks' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/mlx5: fix GENEVE option item translation' " luca.boccassi
                   ` (2 subsequent siblings)
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Michael Baum; +Cc: Suanming Mou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 37b1f135bfe4e706eb62bd5f167624fd4d148d24 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Thu, 25 Jan 2024 15:30:24 +0200
Subject: [PATCH] net/mlx5: remove GENEVE options length limitation

[ upstream commit 48adbc80ba650aab12c00a7545cc33daff83976a ]

GENEVE header has field named "opt_len" describing the total length of
all GENEVE options in 4-byte granularity.

In SW sreering implementation, only single option with single DW data is
supported. When matching on GENEVE option data is requested, matching on
"opt_len" field is added according to given option length.

This behaveior assumes that only packets with single option can be
matched, but it is wrong, packet with a few option can be matched but
only one of them can match its value.

This patch removes the "opt_len" matching unless user ask it explicitly.

Fixes: e440d6cf589e ("net/mlx5: add GENEVE TLV option flow translation")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index a566e61f49..ccb760cdf6 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -9608,7 +9608,6 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *key,
 	const struct rte_flow_item_geneve_opt *geneve_opt_m;
 	const struct rte_flow_item_geneve_opt *geneve_opt_v;
 	const struct rte_flow_item_geneve_opt *geneve_opt_vv = item->spec;
-	void *misc_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters);
 	void *misc3_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters_3);
 	rte_be32_t opt_data_key = 0, opt_data_mask = 0;
 	uint32_t *data;
@@ -9627,21 +9626,6 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *key,
 			return ret;
 		}
 	}
-	/*
-	 * Set the option length in GENEVE header if not requested.
-	 * The GENEVE TLV option length is expressed by the option length field
-	 * in the GENEVE header.
-	 * If the option length was not requested but the GENEVE TLV option item
-	 * is present we set the option length field implicitly.
-	 */
-	if (!MLX5_GET16(fte_match_set_misc, misc_v, geneve_opt_len)) {
-		if (key_type & MLX5_SET_MATCHER_M)
-			MLX5_SET(fte_match_set_misc, misc_v, geneve_opt_len,
-				 MLX5_GENEVE_OPTLEN_MASK);
-		else
-			MLX5_SET(fte_match_set_misc, misc_v, geneve_opt_len,
-				 geneve_opt_v->option_len + 1);
-	}
 	/* Set the data. */
 	if (key_type == MLX5_SET_MATCHER_SW_V)
 		data = geneve_opt_vv->data;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:43.136092872 +0000
+++ 0099-net-mlx5-remove-GENEVE-options-length-limitation.patch	2024-03-07 01:05:35.102946468 +0000
@@ -1 +1 @@
-From 48adbc80ba650aab12c00a7545cc33daff83976a Mon Sep 17 00:00:00 2001
+From 37b1f135bfe4e706eb62bd5f167624fd4d148d24 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 48adbc80ba650aab12c00a7545cc33daff83976a ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index c31f726edb..4f8062d0ab 100644
+index a566e61f49..ccb760cdf6 100644
@@ -32 +33 @@
-@@ -10104,7 +10104,6 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *key,
+@@ -9608,7 +9608,6 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *key,
@@ -40 +41 @@
-@@ -10123,21 +10122,6 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *key,
+@@ -9627,21 +9626,6 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *key,

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

* patch 'net/mlx5: fix GENEVE option item translation' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (97 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/mlx5: remove GENEVE options length limitation' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'net/mlx5: fix stats query crash in secondary process' " luca.boccassi
  2024-03-07  1:31 ` patch 'app/testpmd: fix GRO packets flush on timeout' " luca.boccassi
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Michael Baum; +Cc: Suanming Mou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From c7f17de89d48cd6effaefb2a2a512d6041e258bb Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Thu, 25 Jan 2024 15:30:25 +0200
Subject: [PATCH] net/mlx5: fix GENEVE option item translation

[ upstream commit efcf8a5e634e6b3ca45dfc842e0c3be64d8a44bf ]

The "flow_dv_translate_item_geneve_opt()" function is called twice per
flow rule, for either matcher focusing the mask or value focusing the
spec.
The spec is always provided and its field "option_len" indicates the
data size for both spec and mask. For using it, function has another
pointer "geneve_opt_vv" representing the spec regardless to focusing
while the "geneve_opt_v" pointer represents the mask for matcher and
spec for rule creation.

The current implementation has 2 issues:
1. geneve_opt_v get the spec in rule creation as sane as geneve_opt_vv,
   but function use if-else which is bacicly has same value.
2. function uses "option_len" from "geneve_opt_v" instead of
   "geneve_opt_v" even when the focus is on mask, for HWS the mask value
   may be 0 even data is valid.

This patch refactors the function implementation to avoid those issues.

Fixes: cd4ab742064a ("net/mlx5: split flow item matcher and value translation")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index ccb760cdf6..4ce6da50e8 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -9607,13 +9607,13 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *key,
 {
 	const struct rte_flow_item_geneve_opt *geneve_opt_m;
 	const struct rte_flow_item_geneve_opt *geneve_opt_v;
-	const struct rte_flow_item_geneve_opt *geneve_opt_vv = item->spec;
+	const struct rte_flow_item_geneve_opt *orig_spec = item->spec;
 	void *misc3_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters_3);
 	rte_be32_t opt_data_key = 0, opt_data_mask = 0;
-	uint32_t *data;
+	size_t option_byte_len;
 	int ret = 0;
 
-	if (MLX5_ITEM_VALID(item, key_type))
+	if (MLX5_ITEM_VALID(item, key_type) || !orig_spec)
 		return -1;
 	MLX5_ITEM_UPDATE(item, key_type, geneve_opt_v, geneve_opt_m,
 			 &rte_flow_item_geneve_opt_mask);
@@ -9626,21 +9626,15 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *key,
 			return ret;
 		}
 	}
-	/* Set the data. */
-	if (key_type == MLX5_SET_MATCHER_SW_V)
-		data = geneve_opt_vv->data;
-	else
-		data = geneve_opt_v->data;
-	if (data) {
-		memcpy(&opt_data_key, data,
-			RTE_MIN((uint32_t)(geneve_opt_v->option_len * 4),
-				sizeof(opt_data_key)));
-		memcpy(&opt_data_mask, geneve_opt_m->data,
-			RTE_MIN((uint32_t)(geneve_opt_v->option_len * 4),
-				sizeof(opt_data_mask)));
+	/* Convert the option length from DW to bytes for using memcpy. */
+	option_byte_len = RTE_MIN((size_t)(orig_spec->option_len * 4),
+				  sizeof(rte_be32_t));
+	if (geneve_opt_v->data) {
+		memcpy(&opt_data_key, geneve_opt_v->data, option_byte_len);
+		memcpy(&opt_data_mask, geneve_opt_m->data, option_byte_len);
 		MLX5_SET(fte_match_set_misc3, misc3_v,
-				geneve_tlv_option_0_data,
-			rte_be_to_cpu_32(opt_data_key & opt_data_mask));
+			 geneve_tlv_option_0_data,
+			 rte_be_to_cpu_32(opt_data_key & opt_data_mask));
 	}
 	return ret;
 }
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:43.244107714 +0000
+++ 0100-net-mlx5-fix-GENEVE-option-item-translation.patch	2024-03-07 01:05:35.134947148 +0000
@@ -1 +1 @@
-From efcf8a5e634e6b3ca45dfc842e0c3be64d8a44bf Mon Sep 17 00:00:00 2001
+From c7f17de89d48cd6effaefb2a2a512d6041e258bb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit efcf8a5e634e6b3ca45dfc842e0c3be64d8a44bf ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 4f8062d0ab..afcec4a63d 100644
+index ccb760cdf6..4ce6da50e8 100644
@@ -37 +38 @@
-@@ -10103,13 +10103,13 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *key,
+@@ -9607,13 +9607,13 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *key,
@@ -54 +55 @@
-@@ -10122,21 +10122,15 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *key,
+@@ -9626,21 +9626,15 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *key,

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

* patch 'net/mlx5: fix stats query crash in secondary process' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (98 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/mlx5: fix GENEVE option item translation' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-07  1:31 ` patch 'app/testpmd: fix GRO packets flush on timeout' " luca.boccassi
  100 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Rongwei Liu; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From b14df7f20a4934c7ec3e235ccd1e51dcad562789 Mon Sep 17 00:00:00 2001
From: Rongwei Liu <rongweil@nvidia.com>
Date: Mon, 22 Jan 2024 09:44:05 +0200
Subject: [PATCH] net/mlx5: fix stats query crash in secondary process

[ upstream commit d312cab568ecdc8411cb3dc896e7d5020836399b ]

The "outer_of_buffer" counter is owned by the primary process devx
object and it is pointer by pointer in mlx5_priv structure. Actually,
there are 4 levels' pointers in this piece of code.

The secondary process can't access this part directly since it belongs
to another process's heap.

Return ENOTSUP as a workaround.

Fixes: 750e48c7d8c3 ("common/mlx5: add DevX commands for queue counters")

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 28bf7211e4..8477e83917 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -2682,9 +2682,15 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name,
 
 	if (priv->sh) {
 		if (priv->q_counters != NULL &&
-		    strcmp(ctr_name, "out_of_buffer") == 0)
+		    strcmp(ctr_name, "out_of_buffer") == 0) {
+			if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+				DRV_LOG(WARNING, "Devx out_of_buffer counter is not supported in the secondary process");
+				rte_errno = ENOTSUP;
+				return 1;
+			}
 			return mlx5_devx_cmd_queue_counter_query
 					(priv->q_counters, 0, (uint32_t *)stat);
+		}
 		MKSTR(path, "%s/ports/%d/hw_counters/%s",
 		      priv->sh->ibdev_path,
 		      priv->dev_port,
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:43.357200643 +0000
+++ 0101-net-mlx5-fix-stats-query-crash-in-secondary-process.patch	2024-03-07 01:05:35.138947232 +0000
@@ -1 +1 @@
-From d312cab568ecdc8411cb3dc896e7d5020836399b Mon Sep 17 00:00:00 2001
+From b14df7f20a4934c7ec3e235ccd1e51dcad562789 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d312cab568ecdc8411cb3dc896e7d5020836399b ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index cc8e1919e8..f10e623953 100644
+index 28bf7211e4..8477e83917 100644
@@ -28 +29 @@
-@@ -2998,9 +2998,15 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name,
+@@ -2682,9 +2682,15 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name,

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

* patch 'app/testpmd: fix GRO packets flush on timeout' has been queued to stable release 22.11.5
  2024-03-07  1:30 patch 'hash: remove some dead code' has been queued to stable release 22.11.5 luca.boccassi
                   ` (99 preceding siblings ...)
  2024-03-07  1:31 ` patch 'net/mlx5: fix stats query crash in secondary process' " luca.boccassi
@ 2024-03-07  1:31 ` luca.boccassi
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
  100 siblings, 1 reply; 202+ messages in thread
From: luca.boccassi @ 2024-03-07  1:31 UTC (permalink / raw)
  To: Kumara Parameshwaran; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From aa166bc2d3bab9d111afc944c0e101d38bb4d2a5 Mon Sep 17 00:00:00 2001
From: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
Date: Fri, 16 Feb 2024 09:17:50 +0530
Subject: [PATCH] app/testpmd: fix GRO packets flush on timeout

[ upstream commit 461c287ab55303bad1e68bd1dfac6e6ec27953c3 ]

In heavy-weight mode GRO which is based on timer, the GRO packets
will not be flushed in spite of timer expiry if there is no packet
in the current poll.

If timer mode GRO is enabled the rte_gro_timeout_flush API should be
invoked.

Fixes: b7091f1dcfbc ("app/testpmd: enable the heavyweight mode TCP/IPv4 GRO")

Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/csumonly.c | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 4efb72be77..5520cc9db7 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -867,17 +867,29 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
 	nb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst,
 				 nb_pkt_per_burst);
 	inc_rx_burst_stats(fs, nb_rx);
-	if (unlikely(nb_rx == 0))
-		return;
+	if (unlikely(nb_rx == 0)) {
+#ifndef RTE_LIB_GRO
+		return ;
+#else
+		gro_enable = gro_ports[fs->rx_port].enable;
+		/*
+		 * Check if packets need to be flushed in the GRO context
+		 * due to a timeout.
+		 *
+		 * Continue only in GRO heavyweight mode and if there are
+		 * packets in the GRO context.
+		 */
+		if (!gro_enable || (gro_flush_cycles == GRO_DEFAULT_FLUSH_CYCLES) ||
+			(rte_gro_get_pkt_count(current_fwd_lcore()->gro_ctx) == 0))
+			return ;
+#endif
+	}
 
 	fs->rx_packets += nb_rx;
 	rx_bad_ip_csum = 0;
 	rx_bad_l4_csum = 0;
 	rx_bad_outer_l4_csum = 0;
 	rx_bad_outer_ip_csum = 0;
-#ifdef RTE_LIB_GRO
-	gro_enable = gro_ports[fs->rx_port].enable;
-#endif
 
 	txp = &ports[fs->tx_port];
 	tx_offloads = txp->dev_conf.txmode.offloads;
@@ -1105,6 +1117,7 @@ tunnel_update:
 	}
 
 #ifdef RTE_LIB_GRO
+	gro_enable = gro_ports[fs->rx_port].enable;
 	if (unlikely(gro_enable)) {
 		if (gro_flush_cycles == GRO_DEFAULT_FLUSH_CYCLES) {
 			nb_rx = rte_gro_reassemble_burst(pkts_burst, nb_rx,
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:43.440236373 +0000
+++ 0102-app-testpmd-fix-GRO-packets-flush-on-timeout.patch	2024-03-07 01:05:35.142947317 +0000
@@ -1 +1 @@
-From 461c287ab55303bad1e68bd1dfac6e6ec27953c3 Mon Sep 17 00:00:00 2001
+From aa166bc2d3bab9d111afc944c0e101d38bb4d2a5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 461c287ab55303bad1e68bd1dfac6e6ec27953c3 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -19,2 +20,2 @@
- app/test-pmd/csumonly.c | 21 +++++++++++++++++----
- 1 file changed, 17 insertions(+), 4 deletions(-)
+ app/test-pmd/csumonly.c | 23 ++++++++++++++++++-----
+ 1 file changed, 18 insertions(+), 5 deletions(-)
@@ -23 +24 @@
-index 21210aff43..d73f08b2c6 100644
+index 4efb72be77..5520cc9db7 100644
@@ -26,4 +27,4 @@
-@@ -870,16 +870,28 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
- 
- 	/* receive a burst of packet */
- 	nb_rx = common_fwd_stream_receive(fs, pkts_burst, nb_pkt_per_burst);
+@@ -867,17 +867,29 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
+ 	nb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst,
+ 				 nb_pkt_per_burst);
+ 	inc_rx_burst_stats(fs, nb_rx);
@@ -30,0 +32 @@
+-		return;
@@ -33 +35 @@
- 		return false;
++		return ;
@@ -45 +47 @@
-+			return false;
++			return ;
@@ -48,0 +51 @@
+ 	fs->rx_packets += nb_rx;
@@ -59 +62 @@
-@@ -1110,6 +1122,7 @@ tunnel_update:
+@@ -1105,6 +1117,7 @@ tunnel_update:

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

* RE: patch 'eal/x86: add AMD vendor check for TSC calibration' has been queued to stable release 22.11.5
  2024-03-07  1:30 ` patch 'eal/x86: add AMD vendor check for TSC calibration' " luca.boccassi
@ 2024-03-07  9:44   ` Tummala, Sivaprasad
  0 siblings, 0 replies; 202+ messages in thread
From: Tummala, Sivaprasad @ 2024-03-07  9:44 UTC (permalink / raw)
  To: luca.boccassi; +Cc: Yigit, Ferruh, dpdk stable

[AMD Official Use Only - General]

Hi Luca,

LGTM!

Thanks & Regards,
Sivaprasad

> -----Original Message-----
> From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> Sent: Thursday, March 7, 2024 7:01 AM
> To: Tummala, Sivaprasad <Sivaprasad.Tummala@amd.com>
> Cc: Yigit, Ferruh <Ferruh.Yigit@amd.com>; dpdk stable <stable@dpdk.org>
> Subject: patch 'eal/x86: add AMD vendor check for TSC calibration' has been
> queued to stable release 22.11.5
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> Hi,
>
> FYI, your patch has been queued to stable release 22.11.5
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 03/09/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/3c9e08f6d3f60301e5c3dad1ff4ee1731b000dda
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From 3c9e08f6d3f60301e5c3dad1ff4ee1731b000dda Mon Sep 17 00:00:00 2001
> From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
> Date: Wed, 22 Nov 2023 23:27:30 -0800
> Subject: [PATCH] eal/x86: add AMD vendor check for TSC calibration
>
> [ upstream commit 31d72ff4dc7c057366153e9918ac92bf9123a3bc ]
>
> AMD Epyc processors doesn't support get_tsc_freq_arch().
> The patch allows graceful return to allow fallback to alternate TSC calibration.
>
> Fixes: 3dbc565e81a0 ("timer: honor arch-specific TSC frequency query")
>
> Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
> ---
>  lib/eal/x86/rte_cycles.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/lib/eal/x86/rte_cycles.c b/lib/eal/x86/rte_cycles.c index
> 0e695caf28..2a601d7035 100644
> --- a/lib/eal/x86/rte_cycles.c
> +++ b/lib/eal/x86/rte_cycles.c
> @@ -6,6 +6,10 @@
>  #include <unistd.h>
>  #include <cpuid.h>
>
> +#define x86_vendor_amd(t1, t2, t3)        \
> +       ((t1 == 0x68747541) && /* htuA */   \
> +        (t2 == 0x444d4163) && /* DMAc */   \
> +        (t3 == 0x69746e65))   /* itne */
>
>  #include "eal_private.h"
>
> @@ -90,6 +94,18 @@ get_tsc_freq_arch(void)
>         uint8_t mult, model;
>         int32_t ret;
>
> +#ifdef RTE_TOOLCHAIN_MSVC
> +       __cpuid(cpuinfo, 0);
> +       a = cpuinfo[0];
> +       b = cpuinfo[1];
> +       c = cpuinfo[2];
> +       d = cpuinfo[3];
> +#else
> +       __cpuid(0, a, b, c, d);
> +#endif
> +       if (x86_vendor_amd(b, c, d))
> +               return 0;
> +
>         /*
>          * Time Stamp Counter and Nominal Core Crystal Clock
>          * Information Leaf
> --
> 2.39.2
>
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-empty:
> ---
> --- -   2024-03-07 01:05:36.676799989 +0000
> +++ 0019-eal-x86-add-AMD-vendor-check-for-TSC-calibration.patch
> +++ 2024-03-07 01:05:34.694937810 +0000
> @@ -1 +1 @@
> -From 31d72ff4dc7c057366153e9918ac92bf9123a3bc Mon Sep 17 00:00:00 2001
> +From 3c9e08f6d3f60301e5c3dad1ff4ee1731b000dda Mon Sep 17 00:00:00 2001
> @@ -5,0 +6,2 @@
> +[ upstream commit 31d72ff4dc7c057366153e9918ac92bf9123a3bc ]
> +
> @@ -11 +12,0 @@
> -Cc: stable@dpdk.org
> @@ -20 +21 @@
> -index 69ed59b4f0..f147a5231d 100644
> +index 0e695caf28..2a601d7035 100644
> @@ -23 +24,2 @@
> -@@ -10,6 +10,10 @@
> +@@ -6,6 +6,10 @@
> + #include <unistd.h>
> @@ -25 +26,0 @@
> - #endif
> @@ -34 +35 @@
> -@@ -110,6 +114,18 @@ get_tsc_freq_arch(void)
> +@@ -90,6 +94,18 @@ get_tsc_freq_arch(void)

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

* patch 'Revert "build: add libarchive to optional external' has been queued to stable release 22.11.5
  2024-03-07  1:31 ` patch 'app/testpmd: fix GRO packets flush on timeout' " luca.boccassi
@ 2024-03-14  0:08   ` luca.boccassi
  2024-03-14  0:08     ` patch 'baseband/acc: fix logtypes register' " luca.boccassi
                       ` (59 more replies)
  0 siblings, 60 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:08 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From ab4db7ac79be3adad655725cebcab8a69b4167ba Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Mon, 19 Feb 2024 11:22:04 +0000
Subject: [PATCH] Revert "build: add libarchive to optional external
 dependencies"

This reverts commit dec4b39b200a8c4b835f018c6061e81597e9401c.

This patch is reverting the 22.11 backport of upstream commit
22f7184e8b5f ("build: add libarchive to optional external dependencies")

Bruce highlighted [0] that this patch changes dependencies and exposes
some issues with libarchive packages, which leads to link errors.

We should not change the dependencies on already released LTS.

[0]
https://mails.dpdk.org/archives/stable/2023-November/046434.html

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 config/meson.build  | 5 +++++
 lib/eal/meson.build | 3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index a5445d5fc4..25e41b57d6 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -212,6 +212,11 @@ dpdk_conf.set('RTE_BACKTRACE', cc.has_header('execinfo.h') or is_windows)
 libarchive = dependency('libarchive', required: false, method: 'pkg-config')
 if libarchive.found()
     dpdk_conf.set('RTE_HAS_LIBARCHIVE', 1)
+    # Push libarchive link dependency at the project level to support
+    # statically linking dpdk apps. Details at:
+    # https://inbox.dpdk.org/dev/20210605004024.660267a1@sovereign/
+    add_project_link_arguments('-larchive', language: 'c')
+    dpdk_extra_ldflags += '-larchive'
 endif
 
 # check for libbsd
diff --git a/lib/eal/meson.build b/lib/eal/meson.build
index 04bd3fe351..056beb9461 100644
--- a/lib/eal/meson.build
+++ b/lib/eal/meson.build
@@ -29,9 +29,6 @@ endif
 if dpdk_conf.has('RTE_USE_LIBBSD')
     ext_deps += libbsd
 endif
-if dpdk_conf.has('RTE_HAS_LIBARCHIVE')
-    ext_deps += libarchive
-endif
 if cc.has_function('getentropy', prefix : '#include <unistd.h>')
     cflags += '-DRTE_LIBEAL_USE_GETENTROPY'
 endif
-- 
2.39.2


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

* patch 'baseband/acc: fix logtypes register' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
@ 2024-03-14  0:08     ` luca.boccassi
  2024-03-14  0:08     ` patch 'baseband/acc: fix common logs' " luca.boccassi
                       ` (58 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:08 UTC (permalink / raw)
  To: David Marchand; +Cc: Stephen Hemminger, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 12cbf90bfae4dd04c623c21fc1f9cc7f935f7ca2 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 18 Dec 2023 16:43:06 +0100
Subject: [PATCH] baseband/acc: fix logtypes register

[ upstream commit 05e45d129f8035f35f0cdbf59c5a996c4a191b35 ]

This library was calling RTE_LOG_REGISTER_DEFAULT twice, which means that
all logs for both acc100 and vrb drivers would be emitted for
pmd.baseband.acc logtype.

It seems the intent was to have dedicated logtypes per driver, so
register one for each with a suffix.

Fixes: c2d93488c7c3 ("baseband/acc200: introduce ACC200")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc/rte_acc100_pmd.c | 4 ++--
 drivers/baseband/acc/rte_acc200_pmd.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
index 56a11e98b8..955c0236e4 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -26,9 +26,9 @@
 #include "acc200_cfg.h"
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
-RTE_LOG_REGISTER_DEFAULT(acc100_logtype, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(acc100_logtype, acc100, DEBUG);
 #else
-RTE_LOG_REGISTER_DEFAULT(acc100_logtype, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(acc100_logtype, acc100, NOTICE);
 #endif
 
 /* Calculate the offset of the enqueue register */
diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index 4fc078fe26..8bda3a8e07 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -24,9 +24,9 @@
 #include "acc200_pmd.h"
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
-RTE_LOG_REGISTER_DEFAULT(acc200_logtype, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(acc200_logtype, acc200, DEBUG);
 #else
-RTE_LOG_REGISTER_DEFAULT(acc200_logtype, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(acc200_logtype, acc200, NOTICE);
 #endif
 
 /* Calculate the offset of the enqueue register. */
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:20.901088149 +0000
+++ 0002-baseband-acc-fix-logtypes-register.patch	2024-03-14 00:09:20.557614110 +0000
@@ -1 +1 @@
-From 05e45d129f8035f35f0cdbf59c5a996c4a191b35 Mon Sep 17 00:00:00 2001
+From 12cbf90bfae4dd04c623c21fc1f9cc7f935f7ca2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 05e45d129f8035f35f0cdbf59c5a996c4a191b35 ]
+
@@ -20 +22 @@
- drivers/baseband/acc/rte_vrb_pmd.c    | 4 ++--
+ drivers/baseband/acc/rte_acc200_pmd.c | 4 ++--
@@ -24 +26 @@
-index 292537e24d..b837f7d7cd 100644
+index 56a11e98b8..955c0236e4 100644
@@ -27,2 +29,2 @@
-@@ -27,9 +27,9 @@
- #endif
+@@ -26,9 +26,9 @@
+ #include "acc200_cfg.h"
@@ -39,6 +41,6 @@
-diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c
-index 686e086a5c..6a89f9d4b3 100644
---- a/drivers/baseband/acc/rte_vrb_pmd.c
-+++ b/drivers/baseband/acc/rte_vrb_pmd.c
-@@ -22,9 +22,9 @@
- #include "vrb_pmd.h"
+diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
+index 4fc078fe26..8bda3a8e07 100644
+--- a/drivers/baseband/acc/rte_acc200_pmd.c
++++ b/drivers/baseband/acc/rte_acc200_pmd.c
+@@ -24,9 +24,9 @@
+ #include "acc200_pmd.h"
@@ -47,2 +49,2 @@
--RTE_LOG_REGISTER_DEFAULT(vrb_logtype, DEBUG);
-+RTE_LOG_REGISTER_SUFFIX(vrb_logtype, vrb, DEBUG);
+-RTE_LOG_REGISTER_DEFAULT(acc200_logtype, DEBUG);
++RTE_LOG_REGISTER_SUFFIX(acc200_logtype, acc200, DEBUG);
@@ -50,2 +52,2 @@
--RTE_LOG_REGISTER_DEFAULT(vrb_logtype, NOTICE);
-+RTE_LOG_REGISTER_SUFFIX(vrb_logtype, vrb, NOTICE);
+-RTE_LOG_REGISTER_DEFAULT(acc200_logtype, NOTICE);
++RTE_LOG_REGISTER_SUFFIX(acc200_logtype, acc200, NOTICE);

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

* patch 'baseband/acc: fix common logs' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
  2024-03-14  0:08     ` patch 'baseband/acc: fix logtypes register' " luca.boccassi
@ 2024-03-14  0:08     ` luca.boccassi
  2024-03-14  0:09     ` patch 'doc: fix configuration in baseband 5GNR driver guide' " luca.boccassi
                       ` (57 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:08 UTC (permalink / raw)
  To: David Marchand; +Cc: Stephen Hemminger, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From fc8e14108ff23a306f260726365dd39489134e07 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 18 Dec 2023 16:43:07 +0100
Subject: [PATCH] baseband/acc: fix common logs

[ upstream commit 6bf0c1c2df217d8ad0c933b728aafa40aff58e1b ]

Logs generated by helpers common to acc100 and vrb drivers were
emitted with a RTE_LOG_NOTICE == 6 == RTE_LOGTYPE_HASH.
Register a dedicated logtype for this.

Fixes: 32e8b7ea35dd ("baseband/acc100: refactor to segregate common code")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc/acc_common.c | 7 +++++++
 drivers/baseband/acc/acc_common.h | 4 +++-
 drivers/baseband/acc/meson.build  | 2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)
 create mode 100644 drivers/baseband/acc/acc_common.c

diff --git a/drivers/baseband/acc/acc_common.c b/drivers/baseband/acc/acc_common.c
new file mode 100644
index 0000000000..f8d2b19570
--- /dev/null
+++ b/drivers/baseband/acc/acc_common.c
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2023 Red Hat, Inc.
+ */
+
+#include <rte_log.h>
+
+RTE_LOG_REGISTER_SUFFIX(acc_common_logtype, common, INFO);
diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h
index c076dc72cc..9336d3fbcf 100644
--- a/drivers/baseband/acc/acc_common.h
+++ b/drivers/baseband/acc/acc_common.h
@@ -131,9 +131,11 @@
 #define ACC_LIM_31 20 /* 0.31 */
 #define ACC_MAX_E (128 * 1024 - 2)
 
+extern int acc_common_logtype;
+
 /* Helper macro for logging */
 #define rte_acc_log(level, fmt, ...) \
-	rte_log(RTE_LOG_ ## level, RTE_LOG_NOTICE, fmt "\n", \
+	rte_log(RTE_LOG_ ## level, acc_common_logtype, fmt "\n", \
 		##__VA_ARGS__)
 
 /* ACC100 DMA Descriptor triplet */
diff --git a/drivers/baseband/acc/meson.build b/drivers/baseband/acc/meson.build
index 77c393b533..1cbb06d107 100644
--- a/drivers/baseband/acc/meson.build
+++ b/drivers/baseband/acc/meson.build
@@ -3,6 +3,6 @@
 
 deps += ['bbdev', 'bus_pci']
 
-sources = files('rte_acc100_pmd.c', 'rte_acc200_pmd.c')
+sources = files('acc_common.c', 'rte_acc100_pmd.c', 'rte_acc200_pmd.c')
 
 headers = files('rte_acc_cfg.h')
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:20.952639726 +0000
+++ 0003-baseband-acc-fix-common-logs.patch	2024-03-14 00:09:20.561614189 +0000
@@ -1 +1 @@
-From 6bf0c1c2df217d8ad0c933b728aafa40aff58e1b Mon Sep 17 00:00:00 2001
+From fc8e14108ff23a306f260726365dd39489134e07 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6bf0c1c2df217d8ad0c933b728aafa40aff58e1b ]
+
@@ -36 +38 @@
-index bda2ad2f7a..fddeb0737b 100644
+index c076dc72cc..9336d3fbcf 100644
@@ -39,3 +41,3 @@
-@@ -150,9 +150,11 @@
- 
- #define ACC_MAX_FFT_WIN      16
+@@ -131,9 +131,11 @@
+ #define ACC_LIM_31 20 /* 0.31 */
+ #define ACC_MAX_E (128 * 1024 - 2)
@@ -53 +55 @@
-index 449d1e176c..64fcf1537a 100644
+index 77c393b533..1cbb06d107 100644
@@ -56 +58 @@
-@@ -24,6 +24,6 @@ endif
+@@ -3,6 +3,6 @@
@@ -58 +60 @@
- deps += ['bus_pci']
+ deps += ['bbdev', 'bus_pci']
@@ -60,2 +62,2 @@
--sources = files('rte_acc100_pmd.c', 'rte_vrb_pmd.c')
-+sources = files('acc_common.c', 'rte_acc100_pmd.c', 'rte_vrb_pmd.c')
+-sources = files('rte_acc100_pmd.c', 'rte_acc200_pmd.c')
++sources = files('acc_common.c', 'rte_acc100_pmd.c', 'rte_acc200_pmd.c')

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

* patch 'doc: fix configuration in baseband 5GNR driver guide' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
  2024-03-14  0:08     ` patch 'baseband/acc: fix logtypes register' " luca.boccassi
  2024-03-14  0:08     ` patch 'baseband/acc: fix common logs' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'event/dlb2: remove superfluous memcpy' " luca.boccassi
                       ` (56 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 9507b460c3c387269aafe0e6f62ca913e2c837cd Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Thu, 8 Feb 2024 08:50:33 -0800
Subject: [PATCH] doc: fix configuration in baseband 5GNR driver guide

[ upstream commit a46c1225141d2c099c70d98b38f1f9c20307ff6f ]

flr_timeout was removed from the code a while ago, updating doc.
Fix minor typo in 5GNR example.

Fixes: 2d4306438c92 ("baseband/fpga_5gnr_fec: add configure function")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 doc/guides/bbdevs/fpga_5gnr_fec.rst | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/doc/guides/bbdevs/fpga_5gnr_fec.rst b/doc/guides/bbdevs/fpga_5gnr_fec.rst
index 9d71585e9e..950c5dfb5a 100644
--- a/doc/guides/bbdevs/fpga_5gnr_fec.rst
+++ b/doc/guides/bbdevs/fpga_5gnr_fec.rst
@@ -165,7 +165,6 @@ parameters defined in ``rte_fpga_5gnr_fec_conf`` structure:
       uint8_t dl_bandwidth;
       uint8_t ul_load_balance;
       uint8_t dl_load_balance;
-      uint16_t flr_time_out;
   };
 
 - ``pf_mode_en``: identifies whether only PF is to be used, or the VFs. PF and
@@ -191,10 +190,6 @@ parameters defined in ``rte_fpga_5gnr_fec_conf`` structure:
   If all hardware queues exceeds the watermark, no code blocks will be
   streamed in from UL/DL code block FIFO.
 
-- ``flr_time_out``: specifies how many 16.384us to be FLR time out. The
-  time_out = flr_time_out x 16.384us. For instance, if you want to set 10ms for
-  the FLR time out then set this setting to 0x262=610.
-
 
 An example configuration code calling the function ``rte_fpga_5gnr_fec_configure()`` is shown
 below:
@@ -219,7 +214,7 @@ below:
   /* setup FPGA PF */
   ret = rte_fpga_5gnr_fec_configure(info->dev_name, &conf);
   TEST_ASSERT_SUCCESS(ret,
-      "Failed to configure 4G FPGA PF for bbdev %s",
+      "Failed to configure 5GNR FPGA PF for bbdev %s",
       info->dev_name);
 
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:20.994156266 +0000
+++ 0004-doc-fix-configuration-in-baseband-5GNR-driver-guide.patch	2024-03-14 00:09:20.561614189 +0000
@@ -1 +1 @@
-From a46c1225141d2c099c70d98b38f1f9c20307ff6f Mon Sep 17 00:00:00 2001
+From 9507b460c3c387269aafe0e6f62ca913e2c837cd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a46c1225141d2c099c70d98b38f1f9c20307ff6f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 956dd6bed5..99fc936829 100644
+index 9d71585e9e..950c5dfb5a 100644
@@ -22 +23 @@
-@@ -100,7 +100,6 @@ parameters defined in ``rte_fpga_5gnr_fec_conf`` structure:
+@@ -165,7 +165,6 @@ parameters defined in ``rte_fpga_5gnr_fec_conf`` structure:
@@ -30 +31 @@
-@@ -126,10 +125,6 @@ parameters defined in ``rte_fpga_5gnr_fec_conf`` structure:
+@@ -191,10 +190,6 @@ parameters defined in ``rte_fpga_5gnr_fec_conf`` structure:
@@ -41 +42 @@
-@@ -154,7 +149,7 @@ below:
+@@ -219,7 +214,7 @@ below:

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

* patch 'event/dlb2: remove superfluous memcpy' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (2 preceding siblings ...)
  2024-03-14  0:09     ` patch 'doc: fix configuration in baseband 5GNR driver guide' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'test/event: fix crash in Tx adapter freeing' " luca.boccassi
                       ` (55 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Morten Brørup; +Cc: Stephen Hemminger, Abdullah Sevincer, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From ede7aa11ae504143645d80023aefb252f6b366b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Br=C3=B8rup?= <mb@smartsharesystems.com>
Date: Mon, 16 Jan 2023 14:07:22 +0100
Subject: [PATCH] event/dlb2: remove superfluous memcpy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit c1b086d2abdb7773700b4d216f323bd9278ace7a ]

Copying with the same src and dst address has no effect; removed to
avoid compiler warning with decorated rte_memcpy.

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

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Abdullah Sevincer <abdullah.sevincer@intel.com>
---
 drivers/event/dlb2/dlb2.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index fa1ccb25ba..d5981afa6a 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -216,7 +216,6 @@ static int
 dlb2_hw_query_resources(struct dlb2_eventdev *dlb2)
 {
 	struct dlb2_hw_dev *handle = &dlb2->qm_instance;
-	struct dlb2_hw_resource_info *dlb2_info = &handle->info;
 	int num_ldb_ports;
 	int ret;
 
@@ -278,8 +277,6 @@ dlb2_hw_query_resources(struct dlb2_eventdev *dlb2)
 	handle->info.hw_rsrc_max.reorder_window_size =
 		dlb2->hw_rsrc_query_results.num_hist_list_entries;
 
-	rte_memcpy(dlb2_info, &handle->info.hw_rsrc_max, sizeof(*dlb2_info));
-
 	return 0;
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.034559352 +0000
+++ 0005-event-dlb2-remove-superfluous-memcpy.patch	2024-03-14 00:09:20.565614269 +0000
@@ -1 +1 @@
-From c1b086d2abdb7773700b4d216f323bd9278ace7a Mon Sep 17 00:00:00 2001
+From ede7aa11ae504143645d80023aefb252f6b366b8 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit c1b086d2abdb7773700b4d216f323bd9278ace7a ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 271bbce54a..628ddef649 100644
+index fa1ccb25ba..d5981afa6a 100644
@@ -26 +27 @@
-@@ -163,7 +163,6 @@ static int
+@@ -216,7 +216,6 @@ static int
@@ -34 +35 @@
-@@ -225,8 +224,6 @@ dlb2_hw_query_resources(struct dlb2_eventdev *dlb2)
+@@ -278,8 +277,6 @@ dlb2_hw_query_resources(struct dlb2_eventdev *dlb2)

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

* patch 'test/event: fix crash in Tx adapter freeing' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (3 preceding siblings ...)
  2024-03-14  0:09     ` patch 'event/dlb2: remove superfluous memcpy' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'eventdev: improve Doxygen comments on configure struct' " luca.boccassi
                       ` (54 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Ganapati Kundapura; +Cc: Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 3cdb7e6d4482ef8a36871400d8bbdc606ec6efed Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura@intel.com>
Date: Mon, 26 Feb 2024 02:30:03 -0600
Subject: [PATCH] test/event: fix crash in Tx adapter freeing

[ upstream commit 1f85467fcaf03c6b0d879614ee18f9a98fe9e9e6 ]

Uninitialized mbufs are enqueued to eventdev which causes segfault
on freeing the mbuf in Tx adapter.
Fixed by initializing mbufs before enqueuing to eventdev.

Fixes: 46cf97e4bbfa ("eventdev: add test for eth Tx adapter")

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 app/test/test_event_eth_tx_adapter.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/test/test_event_eth_tx_adapter.c b/app/test/test_event_eth_tx_adapter.c
index c19a87a86a..2aeb28d8e9 100644
--- a/app/test/test_event_eth_tx_adapter.c
+++ b/app/test/test_event_eth_tx_adapter.c
@@ -482,6 +482,10 @@ tx_adapter_service(void)
 	int internal_port;
 	uint32_t cap;
 
+	/* Initialize mbufs */
+	for (i = 0; i < RING_SIZE; i++)
+		rte_pktmbuf_reset(&bufs[i]);
+
 	memset(&dev_conf, 0, sizeof(dev_conf));
 	err = rte_event_eth_tx_adapter_caps_get(TEST_DEV_ID, TEST_ETHDEV_ID,
 						&cap);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.088674900 +0000
+++ 0006-test-event-fix-crash-in-Tx-adapter-freeing.patch	2024-03-14 00:09:20.565614269 +0000
@@ -1 +1 @@
-From 1f85467fcaf03c6b0d879614ee18f9a98fe9e9e6 Mon Sep 17 00:00:00 2001
+From 3cdb7e6d4482ef8a36871400d8bbdc606ec6efed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1f85467fcaf03c6b0d879614ee18f9a98fe9e9e6 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index dbd22f6800..482b8e69e3 100644
+index c19a87a86a..2aeb28d8e9 100644
@@ -23 +24 @@
-@@ -484,6 +484,10 @@ tx_adapter_service(void)
+@@ -482,6 +482,10 @@ tx_adapter_service(void)

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

* patch 'eventdev: improve Doxygen comments on configure struct' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (4 preceding siblings ...)
  2024-03-14  0:09     ` patch 'test/event: fix crash in Tx adapter freeing' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'eventdev: fix Doxygen processing of vector " luca.boccassi
                       ` (53 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Pavan Nikhilesh, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From ad39899ad85f7e8035d9cd5e1a4ab86e5a683739 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 21 Feb 2024 10:32:15 +0000
Subject: [PATCH] eventdev: improve Doxygen comments on configure struct

[ upstream commit 1203462c5ada21bdace88e009db5a8f17f88528a ]

General rewording and cleanup on the rte_event_dev_config structure.
Improved the wording of some sentences and created linked
cross-references out of the existing references to the dev_info
structure.

As part of the rework, fix issue with how single-link port-queue pairs
were counted in the rte_event_dev_config structure. This did not match
the actual implementation and, if following the documentation, certain
valid port/queue configurations would have been impossible to configure.
Fix this by changing the documentation to match the implementation

Bugzilla ID:  1368
Fixes: 75d113136f38 ("eventdev: express DLB/DLB2 PMD constraints")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/eventdev/rte_eventdev.h | 61 ++++++++++++++++++++++---------------
 1 file changed, 37 insertions(+), 24 deletions(-)

diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index a90e23ac8b..695a1f636c 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -507,9 +507,9 @@ rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id,
 struct rte_event_dev_config {
 	uint32_t dequeue_timeout_ns;
 	/**< rte_event_dequeue_burst() timeout on this device.
-	 * This value should be in the range of *min_dequeue_timeout_ns* and
-	 * *max_dequeue_timeout_ns* which previously provided in
-	 * rte_event_dev_info_get()
+	 * This value should be in the range of @ref rte_event_dev_info.min_dequeue_timeout_ns and
+	 * @ref rte_event_dev_info.max_dequeue_timeout_ns returned by
+	 * @ref rte_event_dev_info_get()
 	 * The value 0 is allowed, in which case, default dequeue timeout used.
 	 * @see RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT
 	 */
@@ -517,40 +517,53 @@ struct rte_event_dev_config {
 	/**< In a *closed system* this field is the limit on maximum number of
 	 * events that can be inflight in the eventdev at a given time. The
 	 * limit is required to ensure that the finite space in a closed system
-	 * is not overwhelmed. The value cannot exceed the *max_num_events*
-	 * as provided by rte_event_dev_info_get().
-	 * This value should be set to -1 for *open system*.
+	 * is not exhausted.
+	 * The value cannot exceed @ref rte_event_dev_info.max_num_events
+	 * returned by rte_event_dev_info_get().
+	 *
+	 * This value should be set to -1 for *open systems*, that is,
+	 * those systems returning -1 in @ref rte_event_dev_info.max_num_events.
+	 *
+	 * @see rte_event_port_conf.new_event_threshold
 	 */
 	uint8_t nb_event_queues;
 	/**< Number of event queues to configure on this device.
-	 * This value cannot exceed the *max_event_queues* which previously
-	 * provided in rte_event_dev_info_get()
+	 * This value *includes* any single-link queue-port pairs to be used.
+	 * This value cannot exceed @ref rte_event_dev_info.max_event_queues +
+	 * @ref rte_event_dev_info.max_single_link_event_port_queue_pairs
+	 * returned by rte_event_dev_info_get().
+	 * The number of non-single-link queues i.e. this value less
+	 * *nb_single_link_event_port_queues* in this struct, cannot exceed
+	 * @ref rte_event_dev_info.max_event_queues
 	 */
 	uint8_t nb_event_ports;
 	/**< Number of event ports to configure on this device.
-	 * This value cannot exceed the *max_event_ports* which previously
-	 * provided in rte_event_dev_info_get()
+	 * This value *includes* any single-link queue-port pairs to be used.
+	 * This value cannot exceed @ref rte_event_dev_info.max_event_ports +
+	 * @ref rte_event_dev_info.max_single_link_event_port_queue_pairs
+	 * returned by rte_event_dev_info_get().
+	 * The number of non-single-link ports i.e. this value less
+	 * *nb_single_link_event_port_queues* in this struct, cannot exceed
+	 * @ref rte_event_dev_info.max_event_ports
 	 */
 	uint32_t nb_event_queue_flows;
-	/**< Number of flows for any event queue on this device.
-	 * This value cannot exceed the *max_event_queue_flows* which previously
-	 * provided in rte_event_dev_info_get()
+	/**< Max number of flows needed for a single event queue on this device.
+	 * This value cannot exceed @ref rte_event_dev_info.max_event_queue_flows
+	 * returned by rte_event_dev_info_get()
 	 */
 	uint32_t nb_event_port_dequeue_depth;
-	/**< Maximum number of events can be dequeued at a time from an
-	 * event port by this device.
-	 * This value cannot exceed the *max_event_port_dequeue_depth*
-	 * which previously provided in rte_event_dev_info_get().
+	/**< Max number of events that can be dequeued at a time from an event port on this device.
+	 * This value cannot exceed @ref rte_event_dev_info.max_event_port_dequeue_depth
+	 * returned by rte_event_dev_info_get().
 	 * Ignored when device is not RTE_EVENT_DEV_CAP_BURST_MODE capable.
-	 * @see rte_event_port_setup()
+	 * @see rte_event_port_setup() rte_event_dequeue_burst()
 	 */
 	uint32_t nb_event_port_enqueue_depth;
-	/**< Maximum number of events can be enqueued at a time from an
-	 * event port by this device.
-	 * This value cannot exceed the *max_event_port_enqueue_depth*
-	 * which previously provided in rte_event_dev_info_get().
+	/**< Maximum number of events can be enqueued at a time to an event port on this device.
+	 * This value cannot exceed @ref rte_event_dev_info.max_event_port_enqueue_depth
+	 * returned by rte_event_dev_info_get().
 	 * Ignored when device is not RTE_EVENT_DEV_CAP_BURST_MODE capable.
-	 * @see rte_event_port_setup()
+	 * @see rte_event_port_setup() rte_event_enqueue_burst()
 	 */
 	uint32_t event_dev_cfg;
 	/**< Event device config flags(RTE_EVENT_DEV_CFG_)*/
@@ -560,7 +573,7 @@ struct rte_event_dev_config {
 	 * queues; this value cannot exceed *nb_event_ports* or
 	 * *nb_event_queues*. If the device has ports and queues that are
 	 * optimized for single-link usage, this field is a hint for how many
-	 * to allocate; otherwise, regular event ports and queues can be used.
+	 * to allocate; otherwise, regular event ports and queues will be used.
 	 */
 };
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.130583909 +0000
+++ 0007-eventdev-improve-Doxygen-comments-on-configure-struc.patch	2024-03-14 00:09:20.569614348 +0000
@@ -1 +1 @@
-From 1203462c5ada21bdace88e009db5a8f17f88528a Mon Sep 17 00:00:00 2001
+From ad39899ad85f7e8035d9cd5e1a4ab86e5a683739 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1203462c5ada21bdace88e009db5a8f17f88528a ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 9808889625..fb1c4429f0 100644
+index a90e23ac8b..695a1f636c 100644
@@ -32 +33 @@
-@@ -684,9 +684,9 @@ rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id,
+@@ -507,9 +507,9 @@ rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id,
@@ -45 +46 @@
-@@ -694,40 +694,53 @@ struct rte_event_dev_config {
+@@ -517,40 +517,53 @@ struct rte_event_dev_config {
@@ -119 +120 @@
-@@ -737,7 +750,7 @@ struct rte_event_dev_config {
+@@ -560,7 +573,7 @@ struct rte_event_dev_config {

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

* patch 'eventdev: fix Doxygen processing of vector struct' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (5 preceding siblings ...)
  2024-03-14  0:09     ` patch 'eventdev: improve Doxygen comments on configure struct' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'eventdev/crypto: fix enqueueing' " luca.boccassi
                       ` (52 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Pavan Nikhilesh, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 7a45bfba9c57745fd83c19169660acf1f70d396e Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 21 Feb 2024 10:32:21 +0000
Subject: [PATCH] eventdev: fix Doxygen processing of vector struct

[ upstream commit f5746d3fa2f9f08179878c22a0ec1f598a7f15a1 ]

The event vector struct was missing comments on two members, and also
was inadvertently creating a local variable called "__rte_aligned" in
the doxygen output.

Correct the comment markers to fix the former issue, and fix the latter
by putting "#ifdef __DOXYGEN" around the alignment constraint.

Fixes: 1cc44d409271 ("eventdev: introduce event vector capability")
Fixes: 3c838062b91f ("eventdev: introduce event vector Rx capability")
Fixes: 699155f2d4e2 ("eventdev: fix clang C++ include")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/eventdev/rte_eventdev.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index 695a1f636c..d0e2463bb8 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -1107,10 +1107,8 @@ struct rte_event_vector {
 		 * port and queue of the mbufs in the vector
 		 */
 		struct {
-			uint16_t port;
-			/* Ethernet device port id. */
-			uint16_t queue;
-			/* Ethernet device queue id. */
+			uint16_t port;   /**< Ethernet device port id. */
+			uint16_t queue;  /**< Ethernet device queue id. */
 		};
 	};
 	/**< Union to hold common attributes of the vector array. */
@@ -1139,7 +1137,11 @@ struct rte_event_vector {
 	 * vector array can be an array of mbufs or pointers or opaque u64
 	 * values.
 	 */
+#ifndef __DOXYGEN__
 } __rte_aligned(16);
+#else
+};
+#endif
 
 /* Scheduler type definitions */
 #define RTE_SCHED_TYPE_ORDERED          0
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.173719460 +0000
+++ 0008-eventdev-fix-Doxygen-processing-of-vector-struct.patch	2024-03-14 00:09:20.573614427 +0000
@@ -1 +1 @@
-From f5746d3fa2f9f08179878c22a0ec1f598a7f15a1 Mon Sep 17 00:00:00 2001
+From 7a45bfba9c57745fd83c19169660acf1f70d396e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f5746d3fa2f9f08179878c22a0ec1f598a7f15a1 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 913fe38974..3af46864df 100644
+index 695a1f636c..d0e2463bb8 100644
@@ -29 +30 @@
-@@ -1358,10 +1358,8 @@ struct rte_event_vector {
+@@ -1107,10 +1107,8 @@ struct rte_event_vector {
@@ -42 +43 @@
-@@ -1390,7 +1388,11 @@ struct rte_event_vector {
+@@ -1139,7 +1137,11 @@ struct rte_event_vector {

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

* patch 'eventdev/crypto: fix enqueueing' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (6 preceding siblings ...)
  2024-03-14  0:09     ` patch 'eventdev: fix Doxygen processing of vector " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'app/crypto-perf: fix copy segment size' " luca.boccassi
                       ` (51 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Ganapati Kundapura; +Cc: Abhinandan Gujjar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 85bd236b258a30cd41dcf01634af52ef48e5fda7 Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura@intel.com>
Date: Wed, 28 Feb 2024 04:39:19 -0600
Subject: [PATCH] eventdev/crypto: fix enqueueing

[ upstream commit f5d48ed52da03d5d3b68889e844bab59b2ffb4f0 ]

When tail pointer of circular buffer rolls over as the circular buffer
becomes full, crypto adapter is enqueueing ops beyond the size of the
circular buffer leading to segfault due to invalid ops access.

Fixed by enqueueing ops from head pointer to (size-head) number of ops
when circular buffer becomes full and the remaining ops will be flushed
in next iteration.

Fixes: 6c3c888656fc ("eventdev/crypto: fix circular buffer full case")

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
 lib/eventdev/rte_event_crypto_adapter.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index c31b2b4021..a25316a43a 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -237,20 +237,28 @@ eca_circular_buffer_flush_to_cdev(struct crypto_ops_circular_buffer *bufp,
 	struct rte_crypto_op **ops = bufp->op_buffer;
 
 	if (*tailp > *headp)
+		/* Flush ops from head pointer to (tail - head) OPs */
 		n = *tailp - *headp;
 	else if (*tailp < *headp)
+		/* Circ buffer - Rollover.
+		 * Flush OPs from head to max size of buffer.
+		 * Rest of the OPs will be flushed in next iteration.
+		 */
 		n = bufp->size - *headp;
 	else { /* head == tail case */
 		/* when head == tail,
 		 * circ buff is either full(tail pointer roll over) or empty
 		 */
 		if (bufp->count != 0) {
-			/* circ buffer is full */
-			n = bufp->count;
+			/* Circ buffer - FULL.
+			 * Flush OPs from head to max size of buffer.
+			 * Rest of the OPS will be flushed in next iteration.
+			 */
+			n = bufp->size - *headp;
 		} else {
-			/* circ buffer is empty */
+			/* Circ buffer - Empty */
 			*nb_ops_flushed = 0;
-			return 0;  /* buffer empty */
+			return 0;
 		}
 	}
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.218040234 +0000
+++ 0009-eventdev-crypto-fix-enqueueing.patch	2024-03-14 00:09:20.573614427 +0000
@@ -1 +1 @@
-From f5d48ed52da03d5d3b68889e844bab59b2ffb4f0 Mon Sep 17 00:00:00 2001
+From 85bd236b258a30cd41dcf01634af52ef48e5fda7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f5d48ed52da03d5d3b68889e844bab59b2ffb4f0 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index d46595d190..9903f96695 100644
+index c31b2b4021..a25316a43a 100644
@@ -27 +28 @@
-@@ -245,20 +245,28 @@ eca_circular_buffer_flush_to_cdev(struct crypto_ops_circular_buffer *bufp,
+@@ -237,20 +237,28 @@ eca_circular_buffer_flush_to_cdev(struct crypto_ops_circular_buffer *bufp,

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

* patch 'app/crypto-perf: fix copy segment size' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (7 preceding siblings ...)
  2024-03-14  0:09     ` patch 'eventdev/crypto: fix enqueueing' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'app/crypto-perf: fix out-of-place mbuf " luca.boccassi
                       ` (50 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 2e6e29e797de18b92ce7eed85b06dfa5d813c3b7 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Wed, 3 Jan 2024 12:00:23 +0800
Subject: [PATCH] app/crypto-perf: fix copy segment size

[ upstream commit 7c31d17f68f615c31811afa1830fa0e38956ffc4 ]

For the case crypto device requires headroom and tailroom,
the segment_sz in options also contains the headroom_sz
and tailroom_sz, but mbuf's data_len is user's segment_sz
without headroom_sz and tailroom_sz. That means the data
size to be copied should use user's segment_sz instead
of options->segment_sz.

This commit fixes the copy segment size calculation.

Fixes: 14864c4217ce ("test/crypto-perf: populate mbuf in latency test")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test-crypto-perf/cperf_test_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index b3bf9f67e8..dbb08588ee 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -268,7 +268,7 @@ cperf_mbuf_set(struct rte_mbuf *mbuf,
 		const struct cperf_options *options,
 		const struct cperf_test_vector *test_vector)
 {
-	uint32_t segment_sz = options->segment_sz;
+	uint32_t segment_sz = options->segment_sz - options->headroom_sz - options->tailroom_sz;
 	uint8_t *mbuf_data;
 	uint8_t *test_data;
 	uint32_t remaining_bytes = options->max_buffer_size;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.259336605 +0000
+++ 0010-app-crypto-perf-fix-copy-segment-size.patch	2024-03-14 00:09:20.573614427 +0000
@@ -1 +1 @@
-From 7c31d17f68f615c31811afa1830fa0e38956ffc4 Mon Sep 17 00:00:00 2001
+From 2e6e29e797de18b92ce7eed85b06dfa5d813c3b7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7c31d17f68f615c31811afa1830fa0e38956ffc4 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/crypto-perf: fix out-of-place mbuf size' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (8 preceding siblings ...)
  2024-03-14  0:09     ` patch 'app/crypto-perf: fix copy segment size' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'app/crypto-perf: add missing op resubmission' " luca.boccassi
                       ` (49 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 211da2b3c89abcb2361a2d3220a2d7e5cea6ef13 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Wed, 3 Jan 2024 12:00:24 +0800
Subject: [PATCH] app/crypto-perf: fix out-of-place mbuf size

[ upstream commit 24515c93197091437e32f35bba3f467c01633c1d ]

If crypto device requires headroom and tailroom, the mbuf
of dst in out-of-place should reserve the headroom and
tailroom as well, otherwise there will be no enough room
for dst mbuf.

Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test-crypto-perf/cperf_test_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index dbb08588ee..94d39fb177 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -226,7 +226,8 @@ cperf_alloc_common_memory(const struct cperf_options *options,
 				(mbuf_size * segments_nb);
 		params.dst_buf_offset = *dst_buf_offset;
 		/* Destination buffer will be one segment only */
-		obj_size += max_size + sizeof(struct rte_mbuf);
+		obj_size += max_size + sizeof(struct rte_mbuf) +
+			options->headroom_sz + options->tailroom_sz;
 	}
 
 	*pool = rte_mempool_create_empty(pool_name,
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.299284718 +0000
+++ 0011-app-crypto-perf-fix-out-of-place-mbuf-size.patch	2024-03-14 00:09:20.573614427 +0000
@@ -1 +1 @@
-From 24515c93197091437e32f35bba3f467c01633c1d Mon Sep 17 00:00:00 2001
+From 211da2b3c89abcb2361a2d3220a2d7e5cea6ef13 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 24515c93197091437e32f35bba3f467c01633c1d ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org

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

* patch 'app/crypto-perf: add missing op resubmission' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (9 preceding siblings ...)
  2024-03-14  0:09     ` patch 'app/crypto-perf: fix out-of-place mbuf " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'doc: fix typos in cryptodev overview' " luca.boccassi
                       ` (48 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 3ebfe5050759f0f1e8e5f4e167d5e6cff58bc515 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Mon, 15 Jan 2024 16:08:30 +0800
Subject: [PATCH] app/crypto-perf: add missing op resubmission

[ upstream commit 74d7c028ecf478f18cf9623210bab459d5992d7a ]

Currently, after enqueue_burst, there may be ops_unused ops
left for next round enqueue. And in next round preparation,
only ops_needed ops will be added. But if in the final round
the left ops is less than ops_needed, there will be invalid
ops between the new needed ops and previous unused ops. The
previous unused ops should be moved front after the needed
ops.

In the commit[1], an resubmission fix was added to throughput
test, and the fix was missed for verify.

This commit adds the missed resubmission fix for verify.

[1]
commit 44e2980b70d1 ("app/crypto-perf: fix crypto operation resubmission")

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test-crypto-perf/cperf_test_verify.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index 5a963fa3cc..2249c46694 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -275,7 +275,6 @@ cperf_verify_test_runner(void *test_ctx)
 				ops_needed, ctx->sess, ctx->options,
 				ctx->test_vector, iv_offset, &imix_idx, NULL);
 
-
 		/* Populate the mbuf with the test vector, for verification */
 		for (i = 0; i < ops_needed; i++)
 			cperf_mbuf_set(ops[i]->sym->m_src,
@@ -293,6 +292,17 @@ cperf_verify_test_runner(void *test_ctx)
 		}
 #endif /* CPERF_LINEARIZATION_ENABLE */
 
+		/**
+		 * When ops_needed is smaller than ops_enqd, the
+		 * unused ops need to be moved to the front for
+		 * next round use.
+		 */
+		if (unlikely(ops_enqd > ops_needed)) {
+			size_t nb_b_to_mov = ops_unused * sizeof(struct rte_crypto_op *);
+
+			memmove(&ops[ops_needed], &ops[ops_enqd], nb_b_to_mov);
+		}
+
 		/* Enqueue burst of ops on crypto device */
 		ops_enqd = rte_cryptodev_enqueue_burst(ctx->dev_id, ctx->qp_id,
 				ops, burst_size);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.339329614 +0000
+++ 0012-app-crypto-perf-add-missing-op-resubmission.patch	2024-03-14 00:09:20.573614427 +0000
@@ -1 +1 @@
-From 74d7c028ecf478f18cf9623210bab459d5992d7a Mon Sep 17 00:00:00 2001
+From 3ebfe5050759f0f1e8e5f4e167d5e6cff58bc515 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 74d7c028ecf478f18cf9623210bab459d5992d7a ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 2b0d3f142b..10172a53a0 100644
+index 5a963fa3cc..2249c46694 100644

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

* patch 'doc: fix typos in cryptodev overview' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (10 preceding siblings ...)
  2024-03-14  0:09     ` patch 'app/crypto-perf: add missing op resubmission' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/af_xdp: fix leak on XSK configuration failure' " luca.boccassi
                       ` (47 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Andrew Boyer; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From d3930587616a408829c051317da15b7730f0dfd6 Mon Sep 17 00:00:00 2001
From: Andrew Boyer <andrew.boyer@amd.com>
Date: Thu, 22 Feb 2024 09:41:11 -0800
Subject: [PATCH] doc: fix typos in cryptodev overview

[ upstream commit 85256fea3859b57451657919486e4559b0f2677c ]

Very minor improvements.

Fixes: 2717246ecd7d ("cryptodev: replace mbuf scatter gather flag")

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 doc/guides/cryptodevs/overview.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guides/cryptodevs/overview.rst b/doc/guides/cryptodevs/overview.rst
index d754b0cfc6..b068d0d19c 100644
--- a/doc/guides/cryptodevs/overview.rst
+++ b/doc/guides/cryptodevs/overview.rst
@@ -20,17 +20,17 @@ Supported Feature Flags
    - "OOP SGL In SGL Out" feature flag stands for
      "Out-of-place Scatter-gather list Input, Scatter-gather list Output",
      which means PMD supports different scatter-gather styled input and output buffers
-     (i.e. both can consists of multiple segments).
+     (i.e. both can consist of multiple segments).
 
    - "OOP SGL In LB Out" feature flag stands for
      "Out-of-place Scatter-gather list Input, Linear Buffers Output",
-     which means PMD supports input from scatter-gathered styled buffers,
+     which means PMD supports input from scatter-gather styled buffers,
      outputting linear buffers (i.e. single segment).
 
    - "OOP LB In SGL Out" feature flag stands for
      "Out-of-place Linear Buffers Input, Scatter-gather list Output",
      which means PMD supports input from linear buffer, outputting
-     scatter-gathered styled buffers.
+     scatter-gather styled buffers.
 
    - "OOP LB In LB Out" feature flag stands for
      "Out-of-place Linear Buffers Input, Linear Buffers Output",
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.380137523 +0000
+++ 0013-doc-fix-typos-in-cryptodev-overview.patch	2024-03-14 00:09:20.573614427 +0000
@@ -1 +1 @@
-From 85256fea3859b57451657919486e4559b0f2677c Mon Sep 17 00:00:00 2001
+From d3930587616a408829c051317da15b7730f0dfd6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 85256fea3859b57451657919486e4559b0f2677c ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/af_xdp: fix leak on XSK configuration failure' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (11 preceding siblings ...)
  2024-03-14  0:09     ` patch 'doc: fix typos in cryptodev overview' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'app/testpmd: return if no packets in GRO heavy weight mode' " luca.boccassi
                       ` (46 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ciara Loftus, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From fde6a99f1c2d3007ab3a40e4e411367d8798a891 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 23 Feb 2024 09:45:45 +0800
Subject: [PATCH] net/af_xdp: fix leak on XSK configuration failure

[ upstream commit 955acb9594cec548ae57319bfc99d4297d773675 ]

In xdp_umem_configure() allocated some resources for the
xsk umem, we should delete them when xsk configure fails,
otherwise it will lead to resources leak.

Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 70af6267d8..3c976dd6e0 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -938,6 +938,9 @@ remove_xdp_program(struct pmd_internals *internals)
 static void
 xdp_umem_destroy(struct xsk_umem_info *umem)
 {
+	(void)xsk_umem__delete(umem->umem);
+	umem->umem = NULL;
+
 #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
 	umem->mb_pool = NULL;
 #else
@@ -970,11 +973,8 @@ eth_dev_close(struct rte_eth_dev *dev)
 			break;
 		xsk_socket__delete(rxq->xsk);
 
-		if (__atomic_sub_fetch(&rxq->umem->refcnt, 1, __ATOMIC_ACQUIRE)
-				== 0) {
-			(void)xsk_umem__delete(rxq->umem->umem);
+		if (__atomic_sub_fetch(&rxq->umem->refcnt, 1, __ATOMIC_ACQUIRE) - 1 == 0)
 			xdp_umem_destroy(rxq->umem);
-		}
 
 		/* free pkt_tx_queue */
 		rte_free(rxq->pair);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.421754652 +0000
+++ 0014-net-af_xdp-fix-leak-on-XSK-configuration-failure.patch	2024-03-14 00:09:20.577614507 +0000
@@ -1 +1 @@
-From 955acb9594cec548ae57319bfc99d4297d773675 Mon Sep 17 00:00:00 2001
+From fde6a99f1c2d3007ab3a40e4e411367d8798a891 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 955acb9594cec548ae57319bfc99d4297d773675 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 2d151e45c7..268a130c49 100644
+index 70af6267d8..3c976dd6e0 100644
@@ -24 +25 @@
-@@ -960,6 +960,9 @@ remove_xdp_program(struct pmd_internals *internals)
+@@ -938,6 +938,9 @@ remove_xdp_program(struct pmd_internals *internals)
@@ -34 +35 @@
-@@ -992,11 +995,8 @@ eth_dev_close(struct rte_eth_dev *dev)
+@@ -970,11 +973,8 @@ eth_dev_close(struct rte_eth_dev *dev)
@@ -38 +39 @@
--		if (__atomic_fetch_sub(&rxq->umem->refcnt, 1, __ATOMIC_ACQUIRE) - 1
+-		if (__atomic_sub_fetch(&rxq->umem->refcnt, 1, __ATOMIC_ACQUIRE)
@@ -41 +42 @@
-+		if (__atomic_fetch_sub(&rxq->umem->refcnt, 1, __ATOMIC_ACQUIRE) - 1 == 0)
++		if (__atomic_sub_fetch(&rxq->umem->refcnt, 1, __ATOMIC_ACQUIRE) - 1 == 0)

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

* patch 'app/testpmd: return if no packets in GRO heavy weight mode' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (12 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/af_xdp: fix leak on XSK configuration failure' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'app/testpmd: fix async flow create failure handling' " luca.boccassi
                       ` (45 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Kumara Parameshwaran; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 0c972805e14e02a6774bac91be5cd977058f8ee5 Mon Sep 17 00:00:00 2001
From: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
Date: Sun, 25 Feb 2024 11:46:36 +0530
Subject: [PATCH] app/testpmd: return if no packets in GRO heavy weight mode

[ upstream commit 0007e4045c9efe6a20ad2590dfa68a86cc778b48 ]

If there are no packets flushed in GRO heavy weight mode,
return false as this fall through code would return true
indicating that packets are available

Fixes: 461c287ab553 ("app/testpmd: fix GRO packets flush on timeout")

Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/csumonly.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 5520cc9db7..6170728221 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -1137,6 +1137,8 @@ tunnel_update:
 						gro_pkts_num);
 				fs->gro_times = 0;
 			}
+			if (nb_rx == 0)
+				return;
 		}
 
 		pkts_ip_csum_recalc(pkts_burst, nb_rx, tx_offloads);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.464116804 +0000
+++ 0015-app-testpmd-return-if-no-packets-in-GRO-heavy-weight.patch	2024-03-14 00:09:20.577614507 +0000
@@ -1 +1 @@
-From 0007e4045c9efe6a20ad2590dfa68a86cc778b48 Mon Sep 17 00:00:00 2001
+From 0c972805e14e02a6774bac91be5cd977058f8ee5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0007e4045c9efe6a20ad2590dfa68a86cc778b48 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d73f08b2c6..6711dda42e 100644
+index 5520cc9db7..6170728221 100644
@@ -23 +24 @@
-@@ -1142,6 +1142,8 @@ tunnel_update:
+@@ -1137,6 +1137,8 @@ tunnel_update:
@@ -28 +29 @@
-+				return false;
++				return;

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

* patch 'app/testpmd: fix async flow create failure handling' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (13 preceding siblings ...)
  2024-03-14  0:09     ` patch 'app/testpmd: return if no packets in GRO heavy weight mode' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/tap: do not overwrite flow API errors' " luca.boccassi
                       ` (44 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 1b8a6de75f270592ace73d65dba3fdc9394b359e Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Wed, 28 Feb 2024 19:57:07 +0100
Subject: [PATCH] app/testpmd: fix async flow create failure handling

[ upstream commit 0da12ecba770873851a3a63dc08052271a350aeb ]

In case of an error when an asynchronous flow create operation was
enqueued, test-pmd attempted to enqueue a flow destroy operation
of that flow rule.
However, this was incorrect because:

- Flow rule index was used to enqueue a flow destroy operation.
  This flow rule index was not yet initialized, so flow rule number 0
  was always destroyed as a result.
- Since rte_flow_async_create() does not return a handle on error,
  then there is no flow rule to destroy.

test-pmd only needs to free internal memory allocated for
storing a flow rule. Any flow destroy operation is not needed
in this case.

Fixes: ecdc927b99f2 ("app/testpmd: add async flow create/destroy operations")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 app/test-pmd/config.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e8a647a393..dca5431b98 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2700,8 +2700,7 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id,
 	flow = rte_flow_async_create(port_id, queue_id, &op_attr, pt->table,
 		pattern, pattern_idx, actions, actions_idx, job, &error);
 	if (!flow) {
-		uint32_t flow_id = pf->id;
-		port_queue_flow_destroy(port_id, queue_id, true, 1, &flow_id);
+		free(pf);
 		free(job);
 		return port_flow_complain(&error);
 	}
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.504778957 +0000
+++ 0016-app-testpmd-fix-async-flow-create-failure-handling.patch	2024-03-14 00:09:20.585614666 +0000
@@ -1 +1 @@
-From 0da12ecba770873851a3a63dc08052271a350aeb Mon Sep 17 00:00:00 2001
+From 1b8a6de75f270592ace73d65dba3fdc9394b359e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0da12ecba770873851a3a63dc08052271a350aeb ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index cd2a436cd7..968d2164ab 100644
+index e8a647a393..dca5431b98 100644
@@ -34,3 +35,3 @@
-@@ -2856,8 +2856,7 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id,
- 		flow = rte_flow_async_create_by_index(port_id, queue_id, &op_attr, pt->table,
- 			rule_idx, actions, actions_idx, job, &error);
+@@ -2700,8 +2700,7 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id,
+ 	flow = rte_flow_async_create(port_id, queue_id, &op_attr, pt->table,
+ 		pattern, pattern_idx, actions, actions_idx, job, &error);
@@ -38 +39 @@
--		uint64_t flow_id = pf->id;
+-		uint32_t flow_id = pf->id;

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

* patch 'net/tap: do not overwrite flow API errors' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (14 preceding siblings ...)
  2024-03-14  0:09     ` patch 'app/testpmd: fix async flow create failure handling' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/tap: fix traffic control handle calculation' " luca.boccassi
                       ` (43 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 337a1fa674563c0a575f0f9c671a8e53f390f5e0 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 29 Feb 2024 09:31:07 -0800
Subject: [PATCH] net/tap: do not overwrite flow API errors

[ upstream commit 11b90b53c6716ca9bc713bab6cfba039fe8e38cb ]

All flow errors were ending up being reported as not supported,
even when the error path was previously setting a valid and
better error message.

Example, asking for a non-existent queue in flow.

Before:
testpmd> flow create 0 ingress pattern eth src is 06:05:04:03:02:01 \
  / end actions queue index 12 / end
port_flow_complain(): Caught PMD error type 16 (specific action):
cause: 0x7fffc46c1e18, action not supported: Operation not supported

After:
testpmd> flow create 0 ingress pattern eth src is 06:05:04:03:02:01 \
  / end actions queue index 12 / end
port_flow_complain(): Caught PMD error type 16 (specific action):
cause: 0x7fffa54e1d88, queue index out of range: Numerical result
       out of range

Fixes: f46900d03823 ("net/tap: fix flow and port commands")
Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/tap/tap_flow.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index efe66fe059..431ce37e12 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -1082,8 +1082,11 @@ priv_flow_process(struct pmd_internals *pmd,
 		}
 		/* use flower filter type */
 		tap_nlattr_add(&flow->msg.nh, TCA_KIND, sizeof("flower"), "flower");
-		if (tap_nlattr_nested_start(&flow->msg, TCA_OPTIONS) < 0)
-			goto exit_item_not_supported;
+		if (tap_nlattr_nested_start(&flow->msg, TCA_OPTIONS) < 0) {
+			rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_ACTION,
+					   actions, "could not allocated netlink msg");
+			goto exit_return_error;
+		}
 	}
 	for (; items->type != RTE_FLOW_ITEM_TYPE_END; ++items) {
 		const struct tap_flow_items *token = NULL;
@@ -1199,9 +1202,12 @@ actions:
 			if (action)
 				goto exit_action_not_supported;
 			action = 1;
-			if (!queue ||
-			    (queue->index > pmd->dev->data->nb_rx_queues - 1))
-				goto exit_action_not_supported;
+			if (queue->index >= pmd->dev->data->nb_rx_queues) {
+				rte_flow_error_set(error, ERANGE,
+						   RTE_FLOW_ERROR_TYPE_ACTION, actions,
+						   "queue index out of range");
+				goto exit_return_error;
+			}
 			if (flow) {
 				struct action_data adata = {
 					.id = "skbedit",
@@ -1227,7 +1233,7 @@ actions:
 			if (!pmd->rss_enabled) {
 				err = rss_enable(pmd, attr, error);
 				if (err)
-					goto exit_action_not_supported;
+					goto exit_return_error;
 			}
 			if (flow)
 				err = rss_add_actions(flow, pmd, rss, error);
@@ -1235,7 +1241,7 @@ actions:
 			goto exit_action_not_supported;
 		}
 		if (err)
-			goto exit_action_not_supported;
+			goto exit_return_error;
 	}
 	/* When fate is unknown, drop traffic. */
 	if (!action) {
@@ -1258,6 +1264,7 @@ exit_item_not_supported:
 exit_action_not_supported:
 	rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION,
 			   actions, "action not supported");
+exit_return_error:
 	return -rte_errno;
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.550539113 +0000
+++ 0017-net-tap-do-not-overwrite-flow-API-errors.patch	2024-03-14 00:09:20.585614666 +0000
@@ -1 +1 @@
-From 11b90b53c6716ca9bc713bab6cfba039fe8e38cb Mon Sep 17 00:00:00 2001
+From 337a1fa674563c0a575f0f9c671a8e53f390f5e0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 11b90b53c6716ca9bc713bab6cfba039fe8e38cb ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index ed4d42f92f..5b0fee9064 100644
+index efe66fe059..431ce37e12 100644

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

* patch 'net/tap: fix traffic control handle calculation' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (15 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/tap: do not overwrite flow API errors' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/bnxt: fix null pointer dereference' " luca.boccassi
                       ` (42 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 48309178df5e964dba1fdfff31f7498339b34112 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 29 Feb 2024 09:31:08 -0800
Subject: [PATCH] net/tap: fix traffic control handle calculation

[ upstream commit 4e924ff6f789c6a67424263bf384f3e4b4fba373 ]

The code to take a flow pointer and make a TC handle was incorrect
and would always generate the same handle. This is because it was
hashing the address of the union on the stack (which is invariant)
rather than the contents of the union.

The following testpmd case would cause an error:
testpmd> flow create 0 ingress pattern eth src is 06:05:04:03:02:01 \
  / end actions queue index 2 / end
Flow rule #0 created
testpmd> flow create 0 ingress pattern eth src is 06:05:04:03:02:02 \
  / end actions queue index 3 / end
tap_nl_dump_ext_ack(): Filter already exists
tap_flow_create(): Kernel refused TC filter rule creation (17): File exists
port_flow_complain(): Caught PMD error type 2 (flow rule (handle)):
  overlapping rules or Kernel too old for flower support: File exists

This fix does it in a more robust manner using size independent
code. It also initializes the hash seed so the same hash won't
show up every time and risk potential leakage of address to
other places.

Bugzilla ID: 1382
Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions")
Fixes: a625ab89df11 ("net/tap: fix build with GCC 11")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/tap/tap_flow.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index 431ce37e12..741ef09fc6 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -11,6 +11,7 @@
 
 #include <rte_byteorder.h>
 #include <rte_jhash.h>
+#include <rte_random.h>
 #include <rte_malloc.h>
 #include <rte_eth_tap.h>
 #include <tap_flow.h>
@@ -1297,9 +1298,7 @@ tap_flow_validate(struct rte_eth_dev *dev,
  * In those rules, the handle (uint32_t) is the part that would identify
  * specifically each rule.
  *
- * On 32-bit architectures, the handle can simply be the flow's pointer address.
- * On 64-bit architectures, we rely on jhash(flow) to find a (sufficiently)
- * unique handle.
+ * Use jhash of the flow pointer to make a unique handle.
  *
  * @param[in, out] flow
  *   The flow that needs its handle set.
@@ -1309,16 +1308,18 @@ tap_flow_set_handle(struct rte_flow *flow)
 {
 	union {
 		struct rte_flow *flow;
-		const void *key;
-	} tmp;
-	uint32_t handle = 0;
+		uint32_t words[sizeof(flow) / sizeof(uint32_t)];
+	} tmp = {
+		.flow = flow,
+	};
+	uint32_t handle;
+	static uint64_t hash_seed;
 
-	tmp.flow = flow;
+	if (hash_seed == 0)
+		hash_seed = rte_rand();
+
+	handle = rte_jhash_32b(tmp.words, sizeof(flow) / sizeof(uint32_t), hash_seed);
 
-	if (sizeof(flow) > 4)
-		handle = rte_jhash(tmp.key, sizeof(flow), 1);
-	else
-		handle = (uintptr_t)flow;
 	/* must be at least 1 to avoid letting the kernel choose one for us */
 	if (!handle)
 		handle = 1;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.592235130 +0000
+++ 0018-net-tap-fix-traffic-control-handle-calculation.patch	2024-03-14 00:09:20.589614745 +0000
@@ -1 +1 @@
-From 4e924ff6f789c6a67424263bf384f3e4b4fba373 Mon Sep 17 00:00:00 2001
+From 48309178df5e964dba1fdfff31f7498339b34112 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e924ff6f789c6a67424263bf384f3e4b4fba373 ]
+
@@ -30 +31,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 5b0fee9064..fa50fe45d7 100644
+index 431ce37e12..741ef09fc6 100644

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

* patch 'net/bnxt: fix null pointer dereference' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (16 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/tap: fix traffic control handle calculation' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/ixgbevf: fix RSS init for x550 NICs' " luca.boccassi
                       ` (41 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 100e77a19e563d9d50c7eec92bb85e4244a7d31e Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 7 Feb 2024 01:19:02 -0800
Subject: [PATCH] net/bnxt: fix null pointer dereference

[ upstream commit 68eeafdef4db7362ff5307995b670a98f65f2493 ]

In the recent changes to rte_eth_dev_release_port() the library sets
eth_dev->data to NULL at the end of the routine. This causes a NULL
pointer dereference in the bnxt_rep_dev_info_get_op() and
bnxt_representor_uninit() routines when it tries to validate parent dev.

Add code to handle this.

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")

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

diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index 4e09cd3e4a..f700adb629 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -32,6 +32,14 @@ static const struct eth_dev_ops bnxt_rep_dev_ops = {
 	.flow_ops_get = bnxt_flow_ops_get_op
 };
 
+static bool bnxt_rep_check_parent(struct bnxt_representor *rep)
+{
+	if (!rep->parent_dev->data->dev_private)
+		return false;
+
+	return true;
+}
+
 uint16_t
 bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf)
 {
@@ -266,12 +274,12 @@ int bnxt_representor_uninit(struct rte_eth_dev *eth_dev)
 	PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR uninit\n", eth_dev->data->port_id);
 	eth_dev->data->mac_addrs = NULL;
 
-	parent_bp = rep->parent_dev->data->dev_private;
-	if (!parent_bp) {
+	if (!bnxt_rep_check_parent(rep)) {
 		PMD_DRV_LOG(DEBUG, "BNXT Port:%d already freed\n",
 			    eth_dev->data->port_id);
 		return 0;
 	}
+	parent_bp = rep->parent_dev->data->dev_private;
 
 	parent_bp->num_reps--;
 	vf_id = rep->vf_id;
@@ -539,11 +547,12 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
 	int rc = 0;
 
 	/* MAC Specifics */
-	parent_bp = rep_bp->parent_dev->data->dev_private;
-	if (!parent_bp) {
-		PMD_DRV_LOG(ERR, "Rep parent NULL!\n");
+	if (!bnxt_rep_check_parent(rep_bp)) {
+		/* Need not be an error scenario, if parent is closed first */
+		PMD_DRV_LOG(INFO, "Rep parent port does not exist.\n");
 		return rc;
 	}
+	parent_bp = rep_bp->parent_dev->data->dev_private;
 	PMD_DRV_LOG(DEBUG, "Representor dev_info_get_op\n");
 	dev_info->max_mac_addrs = parent_bp->max_l2_ctx;
 	dev_info->max_hash_mac_addrs = 0;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.633428274 +0000
+++ 0019-net-bnxt-fix-null-pointer-dereference.patch	2024-03-14 00:09:20.589614745 +0000
@@ -1 +1 @@
-From 68eeafdef4db7362ff5307995b670a98f65f2493 Mon Sep 17 00:00:00 2001
+From 100e77a19e563d9d50c7eec92bb85e4244a7d31e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 68eeafdef4db7362ff5307995b670a98f65f2493 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 3a4720bc3c..edcc27f556 100644
+index 4e09cd3e4a..f700adb629 100644

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

* patch 'net/ixgbevf: fix RSS init for x550 NICs' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (17 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/bnxt: fix null pointer dereference' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/iavf: remove error logs for VLAN offloading' " luca.boccassi
                       ` (40 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Edwin Brossette; +Cc: Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 3a2d35d6e9c889e2da3ab586380d8cc7af373e6b Mon Sep 17 00:00:00 2001
From: Edwin Brossette <edwin.brossette@6wind.com>
Date: Thu, 15 Feb 2024 14:31:45 +0100
Subject: [PATCH] net/ixgbevf: fix RSS init for x550 NICs

[ upstream commit 3a53577d5f390e8635a672b79616e54c59b330ab ]

Different Intel NICs with the igxbe PMD do not handle RSS in the same
way when working with virtualization. While some NICs like Intel 82599ES
only have a single RSS table in the device and leave all RSS features to
be handled by the PF, some other NICs like x550 let the VF handle RSS
features. This can lead to different behavior when RSS is enabled
depending on the model of nic used.

In particular, ixgbevf_dev_rx_init() does not configure RSS parameters
at device init, even if the multi-queue mode option is set in the device
configuration (ie. RTE_ETH_MQ_RX_RSS is set). Note that this issue went
unnoticed until now, probably because some NICs do not really have
support for RSS in virtualization mode.

Thus, depending on the NIC used, we can we find ourselves in a situation
where RSS is not configured despite being enabled. This will cause
serious performance issues because the RSS RETA table will be fully
zeroed, causing all packets to go only to the first queue, leaving all
other queues empty.

By looking at ixgbe_reta_size_get(), we can see that only X550 NIC
models have a non zero RETA size set in VF mode. Therefore, add a call
to ixgbe_rss_configure() for these cards in ixgbevf_dev_rx_init() if the
option to enable RSS is set.

Fixes: f4d1598ee14f ("ixgbevf: support RSS config on x550")

Signed-off-by: Edwin Brossette <edwin.brossette@6wind.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index a3a7c68806..e41bfa5ce3 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -5740,6 +5740,25 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)
 		IXGBE_PSRTYPE_RQPL_SHIFT;
 	IXGBE_WRITE_REG(hw, IXGBE_VFPSRTYPE, psrtype);
 
+	/* Initialize the rss for x550_vf cards if enabled */
+	switch (hw->mac.type) {
+	case ixgbe_mac_X550_vf:
+	case ixgbe_mac_X550EM_x_vf:
+	case ixgbe_mac_X550EM_a_vf:
+		switch (dev->data->dev_conf.rxmode.mq_mode) {
+		case RTE_ETH_MQ_RX_RSS:
+		case RTE_ETH_MQ_RX_DCB_RSS:
+		case RTE_ETH_MQ_RX_VMDQ_RSS:
+			ixgbe_rss_configure(dev);
+			break;
+		default:
+			break;
+		}
+		break;
+	default:
+		break;
+	}
+
 	ixgbe_set_rx_function(dev);
 
 	return 0;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.674729332 +0000
+++ 0020-net-ixgbevf-fix-RSS-init-for-x550-NICs.patch	2024-03-14 00:09:20.593614824 +0000
@@ -1 +1 @@
-From 3a53577d5f390e8635a672b79616e54c59b330ab Mon Sep 17 00:00:00 2001
+From 3a2d35d6e9c889e2da3ab586380d8cc7af373e6b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3a53577d5f390e8635a672b79616e54c59b330ab ]
+
@@ -31 +32,0 @@
-Cc: stable@dpdk.org
@@ -40 +41 @@
-index 90b0a7004f..f6c17d4efb 100644
+index a3a7c68806..e41bfa5ce3 100644
@@ -43 +44 @@
-@@ -5844,6 +5844,25 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)
+@@ -5740,6 +5740,25 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)

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

* patch 'net/iavf: remove error logs for VLAN offloading' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (18 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/ixgbevf: fix RSS init for x550 NICs' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/ixgbe: increase VF reset timeout' " luca.boccassi
                       ` (39 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From baf1699534cffe5b9394ab52b2c3725af933e03c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 6 Feb 2024 11:34:20 +0100
Subject: [PATCH] net/iavf: remove error logs for VLAN offloading

[ upstream commit 325764b3a20a16a7a997a324cc0b93367eb7f3e1 ]

This was reported by RH QE.

When a vlan is enforced on a VF via an administrative configuration on
the PF side, the net/iavf driver logs two error messages.
Those error messages have no consequence on the rest of the port
initialisation and packet processing works fine.

[root@toto ~] # ip l set enp94s0 vf 0 vlan 2
[root@toto ~] # dpdk-testpmd -a 0000:5e:02.0 -- -i
...
Configuring Port 0 (socket 0)
iavf_dev_init_vlan(): Failed to update vlan offload
iavf_dev_configure(): configure VLAN failed: -95
iavf_set_rx_function(): request RXDID[1] in Queue[0] is legacy, set
	rx_pkt_burst as legacy for all queues

The first change is to remove the error log in iavf_dev_init_vlan().
This log is unneeded since all error path are covered by dedicated log
messages already.

Then, in iavf_dev_init_vlan(), requesting all possible VLAN offloading
must not trigger an ERROR level log message. This is simply confusing,
as the application may not have requested such vlan offloading.
The reason why the driver requests all offloading is unclear so keep it
as is. Instead, rephrase the log message and lower its level to INFO.

Fixes: 1c301e8c3cff ("net/iavf: support new VLAN capabilities")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index a12ea39444..b244d45abb 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -609,7 +609,8 @@ iavf_dev_init_vlan(struct rte_eth_dev *dev)
 					RTE_ETH_VLAN_FILTER_MASK |
 					RTE_ETH_VLAN_EXTEND_MASK);
 	if (err) {
-		PMD_DRV_LOG(ERR, "Failed to update vlan offload");
+		PMD_DRV_LOG(INFO,
+			"VLAN offloading is not supported, or offloading was refused by the PF");
 		return err;
 	}
 
@@ -685,9 +686,7 @@ iavf_dev_configure(struct rte_eth_dev *dev)
 		vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
 	}
 
-	ret = iavf_dev_init_vlan(dev);
-	if (ret)
-		PMD_DRV_LOG(ERR, "configure VLAN failed: %d", ret);
+	iavf_dev_init_vlan(dev);
 
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
 		if (iavf_init_rss(ad) != 0) {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.720645174 +0000
+++ 0021-net-iavf-remove-error-logs-for-VLAN-offloading.patch	2024-03-14 00:09:20.597614904 +0000
@@ -1 +1 @@
-From 325764b3a20a16a7a997a324cc0b93367eb7f3e1 Mon Sep 17 00:00:00 2001
+From baf1699534cffe5b9394ab52b2c3725af933e03c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 325764b3a20a16a7a997a324cc0b93367eb7f3e1 ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
@@ -42 +43 @@
-index b5f6049a91..2cb602a358 100644
+index a12ea39444..b244d45abb 100644
@@ -45 +46 @@
-@@ -633,7 +633,8 @@ iavf_dev_init_vlan(struct rte_eth_dev *dev)
+@@ -609,7 +609,8 @@ iavf_dev_init_vlan(struct rte_eth_dev *dev)
@@ -55 +56 @@
-@@ -709,9 +710,7 @@ iavf_dev_configure(struct rte_eth_dev *dev)
+@@ -685,9 +686,7 @@ iavf_dev_configure(struct rte_eth_dev *dev)

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

* patch 'net/ixgbe: increase VF reset timeout' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (19 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/iavf: remove error logs for VLAN offloading' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/i40e: remove incorrect 16B descriptor read block' " luca.boccassi
                       ` (38 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From f7667994bd8be945e849d43a9b347631d33f691b Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Tue, 30 Jan 2024 10:00:27 +0000
Subject: [PATCH] net/ixgbe: increase VF reset timeout

[ upstream commit 64e714f838aeb1afbd4e7544686a0d7cd8921589 ]

When VF issues a reset to PF there is a 50 msec wait plus an additional
max of 1 msec (200 * 5us) for the PF to indicate the reset is complete
before timeout.

In some cases, it is seen that the reset is timing out, in which case
the reset does not complete and an error is returned.

In order to account for this, continue to wait an initial 50 msecs, but
then allow a max of an additional 50 msecs (10,000 * 5us) for the
command to complete.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_type.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index b7eec45635..dc765f13c9 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -1799,7 +1799,7 @@ enum {
 /* VFRE bitmask */
 #define IXGBE_VFRE_ENABLE_ALL	0xFFFFFFFF
 
-#define IXGBE_VF_INIT_TIMEOUT	200 /* Number of retries to clear RSTI */
+#define IXGBE_VF_INIT_TIMEOUT	10000 /* Number of retries to clear RSTI */
 
 /* RDHMPN and TDHMPN bitmasks */
 #define IXGBE_RDHMPN_RDICADDR		0x007FF800
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.763670054 +0000
+++ 0022-net-ixgbe-increase-VF-reset-timeout.patch	2024-03-14 00:09:20.601614983 +0000
@@ -1 +1 @@
-From 64e714f838aeb1afbd4e7544686a0d7cd8921589 Mon Sep 17 00:00:00 2001
+From f7667994bd8be945e849d43a9b347631d33f691b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 64e714f838aeb1afbd4e7544686a0d7cd8921589 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 1094df5891..35212a561b 100644
+index b7eec45635..dc765f13c9 100644
@@ -30 +31 @@
-@@ -1800,7 +1800,7 @@ enum {
+@@ -1799,7 +1799,7 @@ enum {

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

* patch 'net/i40e: remove incorrect 16B descriptor read block' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (20 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/ixgbe: increase VF reset timeout' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/iavf: " luca.boccassi
                       ` (37 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 614a3bf8e098e347a3168d928dd6b55bafb76e9b Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 23 Jan 2024 11:40:48 +0000
Subject: [PATCH] net/i40e: remove incorrect 16B descriptor read block

[ upstream commit b527d9585d9cd0446d6bfa39d3a8e896c87883e5 ]

By default, the driver works with 32B descriptors, but has a separate
descriptor read block for reading two descriptors at a time when using
16B descriptors. However, the 32B reads used are not guaranteed to be
atomic, which will cause issues if that is not the case on a system,
since the descriptors may be read in an undefined order.  Remove the
block, to avoid issues, and just use the regular descriptor reading path
for 16B descriptors, if that support is enabled at build time.

Fixes: dafadd73762e ("net/i40e: add AVX2 Rx function")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/net/i40e/i40e_rxtx_vec_avx2.c | 62 ++++++++++-----------------
 1 file changed, 23 insertions(+), 39 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
index 761edb9d20..60baff7970 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
@@ -276,46 +276,30 @@ _recv_raw_pkts_vec_avx2(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 				_mm256_loadu_si256((void *)&sw_ring[i + 4]));
 #endif
 
-		__m256i raw_desc0_1, raw_desc2_3, raw_desc4_5, raw_desc6_7;
-#ifdef RTE_LIBRTE_I40E_16BYTE_RX_DESC
-		/* for AVX we need alignment otherwise loads are not atomic */
-		if (avx_aligned) {
-			/* load in descriptors, 2 at a time, in reverse order */
-			raw_desc6_7 = _mm256_load_si256((void *)(rxdp + 6));
-			rte_compiler_barrier();
-			raw_desc4_5 = _mm256_load_si256((void *)(rxdp + 4));
-			rte_compiler_barrier();
-			raw_desc2_3 = _mm256_load_si256((void *)(rxdp + 2));
-			rte_compiler_barrier();
-			raw_desc0_1 = _mm256_load_si256((void *)(rxdp + 0));
-		} else
-#endif
-		do {
-			const __m128i raw_desc7 = _mm_load_si128((void *)(rxdp + 7));
-			rte_compiler_barrier();
-			const __m128i raw_desc6 = _mm_load_si128((void *)(rxdp + 6));
-			rte_compiler_barrier();
-			const __m128i raw_desc5 = _mm_load_si128((void *)(rxdp + 5));
-			rte_compiler_barrier();
-			const __m128i raw_desc4 = _mm_load_si128((void *)(rxdp + 4));
-			rte_compiler_barrier();
-			const __m128i raw_desc3 = _mm_load_si128((void *)(rxdp + 3));
-			rte_compiler_barrier();
-			const __m128i raw_desc2 = _mm_load_si128((void *)(rxdp + 2));
-			rte_compiler_barrier();
-			const __m128i raw_desc1 = _mm_load_si128((void *)(rxdp + 1));
-			rte_compiler_barrier();
-			const __m128i raw_desc0 = _mm_load_si128((void *)(rxdp + 0));
+		const __m128i raw_desc7 = _mm_load_si128((void *)(rxdp + 7));
+		rte_compiler_barrier();
+		const __m128i raw_desc6 = _mm_load_si128((void *)(rxdp + 6));
+		rte_compiler_barrier();
+		const __m128i raw_desc5 = _mm_load_si128((void *)(rxdp + 5));
+		rte_compiler_barrier();
+		const __m128i raw_desc4 = _mm_load_si128((void *)(rxdp + 4));
+		rte_compiler_barrier();
+		const __m128i raw_desc3 = _mm_load_si128((void *)(rxdp + 3));
+		rte_compiler_barrier();
+		const __m128i raw_desc2 = _mm_load_si128((void *)(rxdp + 2));
+		rte_compiler_barrier();
+		const __m128i raw_desc1 = _mm_load_si128((void *)(rxdp + 1));
+		rte_compiler_barrier();
+		const __m128i raw_desc0 = _mm_load_si128((void *)(rxdp + 0));
 
-			raw_desc6_7 = _mm256_inserti128_si256(
-					_mm256_castsi128_si256(raw_desc6), raw_desc7, 1);
-			raw_desc4_5 = _mm256_inserti128_si256(
-					_mm256_castsi128_si256(raw_desc4), raw_desc5, 1);
-			raw_desc2_3 = _mm256_inserti128_si256(
-					_mm256_castsi128_si256(raw_desc2), raw_desc3, 1);
-			raw_desc0_1 = _mm256_inserti128_si256(
-					_mm256_castsi128_si256(raw_desc0), raw_desc1, 1);
-		} while (0);
+		const __m256i raw_desc6_7 = _mm256_inserti128_si256(
+				_mm256_castsi128_si256(raw_desc6), raw_desc7, 1);
+		const __m256i raw_desc4_5 = _mm256_inserti128_si256(
+				_mm256_castsi128_si256(raw_desc4), raw_desc5, 1);
+		const __m256i raw_desc2_3 = _mm256_inserti128_si256(
+				_mm256_castsi128_si256(raw_desc2), raw_desc3, 1);
+		const __m256i raw_desc0_1 = _mm256_inserti128_si256(
+				_mm256_castsi128_si256(raw_desc0), raw_desc1, 1);
 
 		if (split_packet) {
 			int j;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.809495996 +0000
+++ 0023-net-i40e-remove-incorrect-16B-descriptor-read-block.patch	2024-03-14 00:09:20.601614983 +0000
@@ -1 +1 @@
-From b527d9585d9cd0446d6bfa39d3a8e896c87883e5 Mon Sep 17 00:00:00 2001
+From 614a3bf8e098e347a3168d928dd6b55bafb76e9b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b527d9585d9cd0446d6bfa39d3a8e896c87883e5 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index f468c1fd90..19cf0ac718 100644
+index 761edb9d20..60baff7970 100644

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

* patch 'net/iavf: remove incorrect 16B descriptor read block' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (21 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/i40e: remove incorrect 16B descriptor read block' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/ice: " luca.boccassi
                       ` (36 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 0d2f5b4ca1273de6110a936d5418f766f965d6ce Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 23 Jan 2024 11:40:50 +0000
Subject: [PATCH] net/iavf: remove incorrect 16B descriptor read block

[ upstream commit d4ade5d02d188fcbe51871c5a5d66ef075ca0f86 ]

By default, the driver works with 32B descriptors, but has a separate
descriptor read block for reading two descriptors at a time when using
16B descriptors. However, the 32B reads used are not guaranteed to be
atomic, which will cause issues if that is not the case on a system,
since the descriptors may be read in an undefined order.  Remove the
block, to avoid issues, and just use the regular descriptor reading path
for 16B descriptors, if that support is enabled at build time.

Fixes: af0c246a3800 ("net/iavf: enable AVX2 for iavf")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_avx2.c | 78 ++++++++-------------------
 1 file changed, 23 insertions(+), 55 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
index b4ebac9d34..7bf22d5c0d 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
@@ -192,62 +192,30 @@ _iavf_recv_raw_pkts_vec_avx2(struct iavf_rx_queue *rxq,
 			 _mm256_loadu_si256((void *)&sw_ring[i + 4]));
 #endif
 
-		__m256i raw_desc0_1, raw_desc2_3, raw_desc4_5, raw_desc6_7;
-#ifdef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
-		/* for AVX we need alignment otherwise loads are not atomic */
-		if (avx_aligned) {
-			/* load in descriptors, 2 at a time, in reverse order */
-			raw_desc6_7 = _mm256_load_si256((void *)(rxdp + 6));
-			rte_compiler_barrier();
-			raw_desc4_5 = _mm256_load_si256((void *)(rxdp + 4));
-			rte_compiler_barrier();
-			raw_desc2_3 = _mm256_load_si256((void *)(rxdp + 2));
-			rte_compiler_barrier();
-			raw_desc0_1 = _mm256_load_si256((void *)(rxdp + 0));
-		} else
-#endif
-		{
-			const __m128i raw_desc7 =
-				_mm_load_si128((void *)(rxdp + 7));
-			rte_compiler_barrier();
-			const __m128i raw_desc6 =
-				_mm_load_si128((void *)(rxdp + 6));
-			rte_compiler_barrier();
-			const __m128i raw_desc5 =
-				_mm_load_si128((void *)(rxdp + 5));
-			rte_compiler_barrier();
-			const __m128i raw_desc4 =
-				_mm_load_si128((void *)(rxdp + 4));
-			rte_compiler_barrier();
-			const __m128i raw_desc3 =
-				_mm_load_si128((void *)(rxdp + 3));
-			rte_compiler_barrier();
-			const __m128i raw_desc2 =
-				_mm_load_si128((void *)(rxdp + 2));
-			rte_compiler_barrier();
-			const __m128i raw_desc1 =
-				_mm_load_si128((void *)(rxdp + 1));
-			rte_compiler_barrier();
-			const __m128i raw_desc0 =
-				_mm_load_si128((void *)(rxdp + 0));
+		const __m128i raw_desc7 = _mm_load_si128((void *)(rxdp + 7));
+		rte_compiler_barrier();
+		const __m128i raw_desc6 = _mm_load_si128((void *)(rxdp + 6));
+		rte_compiler_barrier();
+		const __m128i raw_desc5 = _mm_load_si128((void *)(rxdp + 5));
+		rte_compiler_barrier();
+		const __m128i raw_desc4 = _mm_load_si128((void *)(rxdp + 4));
+		rte_compiler_barrier();
+		const __m128i raw_desc3 = _mm_load_si128((void *)(rxdp + 3));
+		rte_compiler_barrier();
+		const __m128i raw_desc2 = _mm_load_si128((void *)(rxdp + 2));
+		rte_compiler_barrier();
+		const __m128i raw_desc1 = _mm_load_si128((void *)(rxdp + 1));
+		rte_compiler_barrier();
+		const __m128i raw_desc0 = _mm_load_si128((void *)(rxdp + 0));
 
-			raw_desc6_7 =
-				_mm256_inserti128_si256
-					(_mm256_castsi128_si256(raw_desc6),
-					 raw_desc7, 1);
-			raw_desc4_5 =
-				_mm256_inserti128_si256
-					(_mm256_castsi128_si256(raw_desc4),
-					 raw_desc5, 1);
-			raw_desc2_3 =
-				_mm256_inserti128_si256
-					(_mm256_castsi128_si256(raw_desc2),
-					 raw_desc3, 1);
-			raw_desc0_1 =
-				_mm256_inserti128_si256
-					(_mm256_castsi128_si256(raw_desc0),
-					 raw_desc1, 1);
-		}
+		const __m256i raw_desc6_7 =
+			_mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc6), raw_desc7, 1);
+		const __m256i raw_desc4_5 =
+			_mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc4), raw_desc5, 1);
+		const __m256i raw_desc2_3 =
+			_mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc2), raw_desc3, 1);
+		const __m256i raw_desc0_1 =
+			_mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc0), raw_desc1, 1);
 
 		if (split_packet) {
 			int j;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.850972499 +0000
+++ 0024-net-iavf-remove-incorrect-16B-descriptor-read-block.patch	2024-03-14 00:09:20.601614983 +0000
@@ -1 +1 @@
-From d4ade5d02d188fcbe51871c5a5d66ef075ca0f86 Mon Sep 17 00:00:00 2001
+From 0d2f5b4ca1273de6110a936d5418f766f965d6ce Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d4ade5d02d188fcbe51871c5a5d66ef075ca0f86 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 510b4d8f1c..49d41af953 100644
+index b4ebac9d34..7bf22d5c0d 100644
@@ -27 +28 @@
-@@ -193,62 +193,30 @@ _iavf_recv_raw_pkts_vec_avx2(struct iavf_rx_queue *rxq,
+@@ -192,62 +192,30 @@ _iavf_recv_raw_pkts_vec_avx2(struct iavf_rx_queue *rxq,

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

* patch 'net/ice: remove incorrect 16B descriptor read block' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (22 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/iavf: " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/bnx2x: fix warnings about memcpy lengths' " luca.boccassi
                       ` (35 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 4e873a75e2688cefdfba60f5a644de0f9c871b40 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 23 Jan 2024 11:40:52 +0000
Subject: [PATCH] net/ice: remove incorrect 16B descriptor read block

[ upstream commit 9aee908eddeb6e8f3de402ac5661bca5161809a6 ]

By default, the driver works with 32B descriptors, but has a separate
descriptor read block for reading two descriptors at a time when using
16B descriptors. However, the 32B reads used are not guaranteed to be
atomic, which will cause issues if that is not the case on a system,
since the descriptors may be read in an undefined order.  Remove the
block, to avoid issues, and just use the regular descriptor reading path
for 16B descriptors, if that support is enabled at build time.

Fixes: ae60d3c9b227 ("net/ice: support Rx AVX2 vector")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/net/ice/ice_rxtx_vec_avx2.c | 78 +++++++++--------------------
 1 file changed, 23 insertions(+), 55 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c
index 31d6af42fd..5d591f9834 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx2.c
@@ -254,62 +254,30 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 			 _mm256_loadu_si256((void *)&sw_ring[i + 4]));
 #endif
 
-		__m256i raw_desc0_1, raw_desc2_3, raw_desc4_5, raw_desc6_7;
-#ifdef RTE_LIBRTE_ICE_16BYTE_RX_DESC
-		/* for AVX we need alignment otherwise loads are not atomic */
-		if (avx_aligned) {
-			/* load in descriptors, 2 at a time, in reverse order */
-			raw_desc6_7 = _mm256_load_si256((void *)(rxdp + 6));
-			rte_compiler_barrier();
-			raw_desc4_5 = _mm256_load_si256((void *)(rxdp + 4));
-			rte_compiler_barrier();
-			raw_desc2_3 = _mm256_load_si256((void *)(rxdp + 2));
-			rte_compiler_barrier();
-			raw_desc0_1 = _mm256_load_si256((void *)(rxdp + 0));
-		} else
-#endif
-		{
-			const __m128i raw_desc7 =
-				_mm_load_si128((void *)(rxdp + 7));
-			rte_compiler_barrier();
-			const __m128i raw_desc6 =
-				_mm_load_si128((void *)(rxdp + 6));
-			rte_compiler_barrier();
-			const __m128i raw_desc5 =
-				_mm_load_si128((void *)(rxdp + 5));
-			rte_compiler_barrier();
-			const __m128i raw_desc4 =
-				_mm_load_si128((void *)(rxdp + 4));
-			rte_compiler_barrier();
-			const __m128i raw_desc3 =
-				_mm_load_si128((void *)(rxdp + 3));
-			rte_compiler_barrier();
-			const __m128i raw_desc2 =
-				_mm_load_si128((void *)(rxdp + 2));
-			rte_compiler_barrier();
-			const __m128i raw_desc1 =
-				_mm_load_si128((void *)(rxdp + 1));
-			rte_compiler_barrier();
-			const __m128i raw_desc0 =
-				_mm_load_si128((void *)(rxdp + 0));
+		const __m128i raw_desc7 = _mm_load_si128((void *)(rxdp + 7));
+		rte_compiler_barrier();
+		const __m128i raw_desc6 = _mm_load_si128((void *)(rxdp + 6));
+		rte_compiler_barrier();
+		const __m128i raw_desc5 = _mm_load_si128((void *)(rxdp + 5));
+		rte_compiler_barrier();
+		const __m128i raw_desc4 = _mm_load_si128((void *)(rxdp + 4));
+		rte_compiler_barrier();
+		const __m128i raw_desc3 = _mm_load_si128((void *)(rxdp + 3));
+		rte_compiler_barrier();
+		const __m128i raw_desc2 = _mm_load_si128((void *)(rxdp + 2));
+		rte_compiler_barrier();
+		const __m128i raw_desc1 = _mm_load_si128((void *)(rxdp + 1));
+		rte_compiler_barrier();
+		const __m128i raw_desc0 = _mm_load_si128((void *)(rxdp + 0));
 
-			raw_desc6_7 =
-				_mm256_inserti128_si256
-					(_mm256_castsi128_si256(raw_desc6),
-					 raw_desc7, 1);
-			raw_desc4_5 =
-				_mm256_inserti128_si256
-					(_mm256_castsi128_si256(raw_desc4),
-					 raw_desc5, 1);
-			raw_desc2_3 =
-				_mm256_inserti128_si256
-					(_mm256_castsi128_si256(raw_desc2),
-					 raw_desc3, 1);
-			raw_desc0_1 =
-				_mm256_inserti128_si256
-					(_mm256_castsi128_si256(raw_desc0),
-					 raw_desc1, 1);
-		}
+		const __m256i raw_desc6_7 =
+			_mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc6), raw_desc7, 1);
+		const __m256i raw_desc4_5 =
+			_mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc4), raw_desc5, 1);
+		const __m256i raw_desc2_3 =
+			_mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc2), raw_desc3, 1);
+		const __m256i raw_desc0_1 =
+			_mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc0), raw_desc1, 1);
 
 		if (split_packet) {
 			int j;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.892694431 +0000
+++ 0025-net-ice-remove-incorrect-16B-descriptor-read-block.patch	2024-03-14 00:09:20.605615062 +0000
@@ -1 +1 @@
-From 9aee908eddeb6e8f3de402ac5661bca5161809a6 Mon Sep 17 00:00:00 2001
+From 4e873a75e2688cefdfba60f5a644de0f9c871b40 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9aee908eddeb6e8f3de402ac5661bca5161809a6 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 6f6d790967..d6e88dbb29 100644
+index 31d6af42fd..5d591f9834 100644

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

* patch 'net/bnx2x: fix warnings about memcpy lengths' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (23 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/ice: " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'common/cnxk: remove CN9K inline IPsec FP opcodes' " luca.boccassi
                       ` (34 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Morten Brørup; +Cc: Devendra Singh Rawat, dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From fdc5c7c46a3d7d606a45b343b893b694d0423dc7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Br=C3=B8rup?= <mb@smartsharesystems.com>
Date: Fri, 23 Feb 2024 15:00:56 +0100
Subject: [PATCH] net/bnx2x: fix warnings about memcpy lengths
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit c50b86f7d60f757ea62fe14076be69bf114f1740 ]

The vlan in the bulletin does not contain a VLAN header, only the
VLAN ID, so only copy 2 byte, not 4. The target structure has padding
after the field, so copying 2 byte too many is effectively harmless.
Fix it by using generic memcpy version instead of specialized
rte version as it not used in fast path.

Also, Use RTE_PTR_ADD where copying arrays to the offset of a first field
in a structure holding multiple fields, to avoid compiler warnings with
decorated memcpy.

Bugzilla ID: 1146
Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
---
 drivers/net/bnx2x/bnx2x_stats.c | 14 ++++++++------
 drivers/net/bnx2x/bnx2x_vfpf.c  | 14 +++++++-------
 2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_stats.c b/drivers/net/bnx2x/bnx2x_stats.c
index c07b01510a..69132c7c80 100644
--- a/drivers/net/bnx2x/bnx2x_stats.c
+++ b/drivers/net/bnx2x/bnx2x_stats.c
@@ -114,7 +114,7 @@ bnx2x_hw_stats_post(struct bnx2x_softc *sc)
 
 	/* Update MCP's statistics if possible */
 	if (sc->func_stx) {
-		rte_memcpy(BNX2X_SP(sc, func_stats), &sc->func_stats,
+		memcpy(BNX2X_SP(sc, func_stats), &sc->func_stats,
 				sizeof(sc->func_stats));
 	}
 
@@ -817,10 +817,10 @@ bnx2x_hw_stats_update(struct bnx2x_softc *sc)
 			  etherstatspktsover1522octets);
     }
 
-    rte_memcpy(old, new, sizeof(struct nig_stats));
+	memcpy(old, new, sizeof(struct nig_stats));
 
-    rte_memcpy(&(estats->rx_stat_ifhcinbadoctets_hi), &(pstats->mac_stx[1]),
-	   sizeof(struct mac_stx));
+	memcpy(RTE_PTR_ADD(estats, offsetof(struct bnx2x_eth_stats, rx_stat_ifhcinbadoctets_hi)),
+			&pstats->mac_stx[1], sizeof(struct mac_stx));
     estats->brb_drop_hi = pstats->brb_drop_hi;
     estats->brb_drop_lo = pstats->brb_drop_lo;
 
@@ -1492,9 +1492,11 @@ bnx2x_stats_init(struct bnx2x_softc *sc)
 		REG_RD(sc, NIG_REG_STAT0_BRB_TRUNCATE + port*0x38);
 	if (!CHIP_IS_E3(sc)) {
 		REG_RD_DMAE(sc, NIG_REG_STAT0_EGRESS_MAC_PKT0 + port*0x50,
-				&(sc->port.old_nig_stats.egress_mac_pkt0_lo), 2);
+				RTE_PTR_ADD(&sc->port.old_nig_stats,
+				offsetof(struct nig_stats, egress_mac_pkt0_lo)), 2);
 		REG_RD_DMAE(sc, NIG_REG_STAT0_EGRESS_MAC_PKT1 + port*0x50,
-				&(sc->port.old_nig_stats.egress_mac_pkt1_lo), 2);
+				RTE_PTR_ADD(&sc->port.old_nig_stats,
+				offsetof(struct nig_stats, egress_mac_pkt1_lo)), 2);
 	}
 
 	/* function stats */
diff --git a/drivers/net/bnx2x/bnx2x_vfpf.c b/drivers/net/bnx2x/bnx2x_vfpf.c
index 63953c2979..5411df3a38 100644
--- a/drivers/net/bnx2x/bnx2x_vfpf.c
+++ b/drivers/net/bnx2x/bnx2x_vfpf.c
@@ -52,9 +52,9 @@ bnx2x_check_bull(struct bnx2x_softc *sc)
 
 	/* check the mac address and VLAN and allocate memory if valid */
 	if (valid_bitmap & (1 << MAC_ADDR_VALID) && memcmp(bull->mac, sc->old_bulletin.mac, ETH_ALEN))
-		rte_memcpy(&sc->link_params.mac_addr, bull->mac, ETH_ALEN);
+		memcpy(&sc->link_params.mac_addr, bull->mac, ETH_ALEN);
 	if (valid_bitmap & (1 << VLAN_VALID))
-		rte_memcpy(&bull->vlan, &sc->old_bulletin.vlan, RTE_VLAN_HLEN);
+		memcpy(&bull->vlan, &sc->old_bulletin.vlan, sizeof(bull->vlan));
 
 	sc->old_bulletin = *bull;
 
@@ -569,7 +569,7 @@ bnx2x_vf_set_mac(struct bnx2x_softc *sc, int set)
 
 	bnx2x_check_bull(sc);
 
-	rte_memcpy(query->filters[0].mac, sc->link_params.mac_addr, ETH_ALEN);
+	memcpy(query->filters[0].mac, sc->link_params.mac_addr, ETH_ALEN);
 
 	bnx2x_add_tlv(sc, query, query->first_tlv.tl.length,
 		      BNX2X_VF_TLV_LIST_END,
@@ -583,9 +583,9 @@ bnx2x_vf_set_mac(struct bnx2x_softc *sc, int set)
 	while (BNX2X_VF_STATUS_FAILURE == reply->status &&
 			bnx2x_check_bull(sc)) {
 		/* A new mac was configured by PF for us */
-		rte_memcpy(sc->link_params.mac_addr, sc->pf2vf_bulletin->mac,
+		memcpy(sc->link_params.mac_addr, sc->pf2vf_bulletin->mac,
 				ETH_ALEN);
-		rte_memcpy(query->filters[0].mac, sc->pf2vf_bulletin->mac,
+		memcpy(query->filters[0].mac, sc->pf2vf_bulletin->mac,
 				ETH_ALEN);
 
 		rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
@@ -622,10 +622,10 @@ bnx2x_vf_config_rss(struct bnx2x_softc *sc,
 		      BNX2X_VF_TLV_LIST_END,
 		      sizeof(struct channel_list_end_tlv));
 
-	rte_memcpy(query->rss_key, params->rss_key, sizeof(params->rss_key));
+	memcpy(query->rss_key, params->rss_key, sizeof(params->rss_key));
 	query->rss_key_size = T_ETH_RSS_KEY;
 
-	rte_memcpy(query->ind_table, params->ind_table, T_ETH_INDIRECTION_TABLE_SIZE);
+	memcpy(query->ind_table, params->ind_table, T_ETH_INDIRECTION_TABLE_SIZE);
 	query->ind_table_size = T_ETH_INDIRECTION_TABLE_SIZE;
 
 	query->rss_result_mask = params->rss_result_mask;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:21.934568781 +0000
+++ 0026-net-bnx2x-fix-warnings-about-memcpy-lengths.patch	2024-03-14 00:09:20.605615062 +0000
@@ -1 +1 @@
-From c50b86f7d60f757ea62fe14076be69bf114f1740 Mon Sep 17 00:00:00 2001
+From fdc5c7c46a3d7d606a45b343b893b694d0423dc7 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit c50b86f7d60f757ea62fe14076be69bf114f1740 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org

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

* patch 'common/cnxk: remove CN9K inline IPsec FP opcodes' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (24 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/bnx2x: fix warnings about memcpy lengths' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/cnxk: fix buffer size configuration' " luca.boccassi
                       ` (33 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 22.11.5

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

Thanks.

Luca Boccassi

---
From 41dcb6a83d55074b48db48e2efc3ef82717811de Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Mon, 26 Feb 2024 19:05:23 +0530
Subject: [PATCH] common/cnxk: remove CN9K inline IPsec FP opcodes

[ upstream commit 930d94170e044ce1a2a2f222306c7dad50898728 ]

Since now Inline IPsec in cn9k is using same opcode as LA,
remove the definitions of fast path opcode.

Also fix devarg handling for ipsec_out_max_sa to allow 32-bit.

Fixes: fe5846bcc076 ("net/cnxk: add devargs for min-max SPI")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/common/cnxk/cnxk_security.c    | 229 -------------------------
 drivers/common/cnxk/cnxk_security.h    |  12 --
 drivers/common/cnxk/roc_ie_on.h        |  60 -------