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 -------
 drivers/common/cnxk/roc_nix_inl.h      |  50 +-----
 drivers/common/cnxk/version.map        |   4 -
 drivers/net/cnxk/cnxk_ethdev_devargs.c |   2 +-
 6 files changed, 3 insertions(+), 354 deletions(-)

diff --git a/drivers/common/cnxk/cnxk_security.c b/drivers/common/cnxk/cnxk_security.c
index bdb5433d13..dd19ea9ab9 100644
--- a/drivers/common/cnxk/cnxk_security.c
+++ b/drivers/common/cnxk/cnxk_security.c
@@ -614,235 +614,6 @@ cnxk_ot_ipsec_outb_sa_valid(struct roc_ot_ipsec_outb_sa *sa)
 	return !!sa->w2.s.valid;
 }
 
-static inline int
-ipsec_xfrm_verify(struct rte_security_ipsec_xform *ipsec_xfrm,
-		  struct rte_crypto_sym_xform *crypto_xfrm)
-{
-	if (crypto_xfrm->next == NULL)
-		return -EINVAL;
-
-	if (ipsec_xfrm->direction == RTE_SECURITY_IPSEC_SA_DIR_INGRESS) {
-		if (crypto_xfrm->type != RTE_CRYPTO_SYM_XFORM_AUTH ||
-		    crypto_xfrm->next->type != RTE_CRYPTO_SYM_XFORM_CIPHER)
-			return -EINVAL;
-	} else {
-		if (crypto_xfrm->type != RTE_CRYPTO_SYM_XFORM_CIPHER ||
-		    crypto_xfrm->next->type != RTE_CRYPTO_SYM_XFORM_AUTH)
-			return -EINVAL;
-	}
-
-	return 0;
-}
-
-static int
-onf_ipsec_sa_common_param_fill(struct roc_ie_onf_sa_ctl *ctl, uint8_t *salt,
-			       uint8_t *cipher_key, uint8_t *hmac_opad_ipad,
-			       struct rte_security_ipsec_xform *ipsec_xfrm,
-			       struct rte_crypto_sym_xform *crypto_xfrm)
-{
-	struct rte_crypto_sym_xform *auth_xfrm, *cipher_xfrm;
-	int rc, length, auth_key_len;
-	const uint8_t *key = NULL;
-	uint8_t ccm_flag = 0;
-
-	/* Set direction */
-	switch (ipsec_xfrm->direction) {
-	case RTE_SECURITY_IPSEC_SA_DIR_INGRESS:
-		ctl->direction = ROC_IE_SA_DIR_INBOUND;
-		auth_xfrm = crypto_xfrm;
-		cipher_xfrm = crypto_xfrm->next;
-		break;
-	case RTE_SECURITY_IPSEC_SA_DIR_EGRESS:
-		ctl->direction = ROC_IE_SA_DIR_OUTBOUND;
-		cipher_xfrm = crypto_xfrm;
-		auth_xfrm = crypto_xfrm->next;
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	/* Set protocol - ESP vs AH */
-	switch (ipsec_xfrm->proto) {
-	case RTE_SECURITY_IPSEC_SA_PROTO_ESP:
-		ctl->ipsec_proto = ROC_IE_SA_PROTOCOL_ESP;
-		break;
-	case RTE_SECURITY_IPSEC_SA_PROTO_AH:
-		return -ENOTSUP;
-	default:
-		return -EINVAL;
-	}
-
-	/* Set mode - transport vs tunnel */
-	switch (ipsec_xfrm->mode) {
-	case RTE_SECURITY_IPSEC_SA_MODE_TRANSPORT:
-		ctl->ipsec_mode = ROC_IE_SA_MODE_TRANSPORT;
-		break;
-	case RTE_SECURITY_IPSEC_SA_MODE_TUNNEL:
-		ctl->ipsec_mode = ROC_IE_SA_MODE_TUNNEL;
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	/* Set encryption algorithm */
-	if (crypto_xfrm->type == RTE_CRYPTO_SYM_XFORM_AEAD) {
-		length = crypto_xfrm->aead.key.length;
-
-		switch (crypto_xfrm->aead.algo) {
-		case RTE_CRYPTO_AEAD_AES_GCM:
-			ctl->enc_type = ROC_IE_ON_SA_ENC_AES_GCM;
-			ctl->auth_type = ROC_IE_ON_SA_AUTH_NULL;
-			memcpy(salt, &ipsec_xfrm->salt, 4);
-			key = crypto_xfrm->aead.key.data;
-			break;
-		case RTE_CRYPTO_AEAD_AES_CCM:
-			ctl->enc_type = ROC_IE_ON_SA_ENC_AES_CCM;
-			ctl->auth_type = ROC_IE_ON_SA_AUTH_NULL;
-			ccm_flag = 0x07 & ~ROC_CPT_AES_CCM_CTR_LEN;
-			*salt = ccm_flag;
-			memcpy(PLT_PTR_ADD(salt, 1), &ipsec_xfrm->salt, 3);
-			key = crypto_xfrm->aead.key.data;
-			break;
-		default:
-			return -ENOTSUP;
-		}
-
-	} else {
-		rc = ipsec_xfrm_verify(ipsec_xfrm, crypto_xfrm);
-		if (rc)
-			return rc;
-
-		switch (cipher_xfrm->cipher.algo) {
-		case RTE_CRYPTO_CIPHER_AES_CBC:
-			ctl->enc_type = ROC_IE_ON_SA_ENC_AES_CBC;
-			break;
-		case RTE_CRYPTO_CIPHER_AES_CTR:
-			ctl->enc_type = ROC_IE_ON_SA_ENC_AES_CTR;
-			break;
-		default:
-			return -ENOTSUP;
-		}
-
-		switch (auth_xfrm->auth.algo) {
-		case RTE_CRYPTO_AUTH_SHA1_HMAC:
-			ctl->auth_type = ROC_IE_ON_SA_AUTH_SHA1;
-			break;
-		default:
-			return -ENOTSUP;
-		}
-		auth_key_len = auth_xfrm->auth.key.length;
-		if (auth_key_len < 20 || auth_key_len > 64)
-			return -ENOTSUP;
-
-		key = cipher_xfrm->cipher.key.data;
-		length = cipher_xfrm->cipher.key.length;
-
-		ipsec_hmac_opad_ipad_gen(auth_xfrm, hmac_opad_ipad);
-	}
-
-	switch (length) {
-	case ROC_CPT_AES128_KEY_LEN:
-		ctl->aes_key_len = ROC_IE_SA_AES_KEY_LEN_128;
-		break;
-	case ROC_CPT_AES192_KEY_LEN:
-		ctl->aes_key_len = ROC_IE_SA_AES_KEY_LEN_192;
-		break;
-	case ROC_CPT_AES256_KEY_LEN:
-		ctl->aes_key_len = ROC_IE_SA_AES_KEY_LEN_256;
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	memcpy(cipher_key, key, length);
-
-	if (ipsec_xfrm->options.esn)
-		ctl->esn_en = 1;
-
-	ctl->spi = rte_cpu_to_be_32(ipsec_xfrm->spi);
-	return 0;
-}
-
-int
-cnxk_onf_ipsec_inb_sa_fill(struct roc_onf_ipsec_inb_sa *sa,
-			   struct rte_security_ipsec_xform *ipsec_xfrm,
-			   struct rte_crypto_sym_xform *crypto_xfrm)
-{
-	struct roc_ie_onf_sa_ctl *ctl = &sa->ctl;
-	int rc;
-
-	rc = onf_ipsec_sa_common_param_fill(ctl, sa->nonce, sa->cipher_key,
-					    sa->hmac_key, ipsec_xfrm,
-					    crypto_xfrm);
-	if (rc)
-		return rc;
-
-	rte_wmb();
-
-	/* Enable SA */
-	ctl->valid = 1;
-	return 0;
-}
-
-int
-cnxk_onf_ipsec_outb_sa_fill(struct roc_onf_ipsec_outb_sa *sa,
-			    struct rte_security_ipsec_xform *ipsec_xfrm,
-			    struct rte_crypto_sym_xform *crypto_xfrm)
-{
-	struct rte_security_ipsec_tunnel_param *tunnel = &ipsec_xfrm->tunnel;
-	struct roc_ie_onf_sa_ctl *ctl = &sa->ctl;
-	int rc;
-
-	/* Fill common params */
-	rc = onf_ipsec_sa_common_param_fill(ctl, sa->nonce, sa->cipher_key,
-					    sa->hmac_key, ipsec_xfrm,
-					    crypto_xfrm);
-	if (rc)
-		return rc;
-
-	if (ipsec_xfrm->mode != RTE_SECURITY_IPSEC_SA_MODE_TUNNEL)
-		goto skip_tunnel_info;
-
-	/* Tunnel header info */
-	switch (tunnel->type) {
-	case RTE_SECURITY_IPSEC_TUNNEL_IPV4:
-		memcpy(&sa->ip_src, &tunnel->ipv4.src_ip,
-		       sizeof(struct in_addr));
-		memcpy(&sa->ip_dst, &tunnel->ipv4.dst_ip,
-		       sizeof(struct in_addr));
-		break;
-	case RTE_SECURITY_IPSEC_TUNNEL_IPV6:
-		return -ENOTSUP;
-	default:
-		return -EINVAL;
-	}
-
-	/* Update udp encap ports */
-	if (ipsec_xfrm->options.udp_encap == 1) {
-		sa->udp_src = 4500;
-		sa->udp_dst = 4500;
-	}
-
-skip_tunnel_info:
-	rte_wmb();
-
-	/* Enable SA */
-	ctl->valid = 1;
-	return 0;
-}
-
-bool
-cnxk_onf_ipsec_inb_sa_valid(struct roc_onf_ipsec_inb_sa *sa)
-{
-	return !!sa->ctl.valid;
-}
-
-bool
-cnxk_onf_ipsec_outb_sa_valid(struct roc_onf_ipsec_outb_sa *sa)
-{
-	return !!sa->ctl.valid;
-}
-
 uint8_t
 cnxk_ipsec_ivlen_get(enum rte_crypto_cipher_algorithm c_algo,
 		     enum rte_crypto_auth_algorithm a_algo,
diff --git a/drivers/common/cnxk/cnxk_security.h b/drivers/common/cnxk/cnxk_security.h
index 4e477ec53f..77fcd82b12 100644
--- a/drivers/common/cnxk/cnxk_security.h
+++ b/drivers/common/cnxk/cnxk_security.h
@@ -47,18 +47,6 @@ cnxk_ot_ipsec_outb_sa_fill(struct roc_ot_ipsec_outb_sa *sa,
 bool __roc_api cnxk_ot_ipsec_inb_sa_valid(struct roc_ot_ipsec_inb_sa *sa);
 bool __roc_api cnxk_ot_ipsec_outb_sa_valid(struct roc_ot_ipsec_outb_sa *sa);
 
-/* [CN9K, CN10K) */
-int __roc_api
-cnxk_onf_ipsec_inb_sa_fill(struct roc_onf_ipsec_inb_sa *sa,
-			   struct rte_security_ipsec_xform *ipsec_xfrm,
-			   struct rte_crypto_sym_xform *crypto_xfrm);
-int __roc_api
-cnxk_onf_ipsec_outb_sa_fill(struct roc_onf_ipsec_outb_sa *sa,
-			    struct rte_security_ipsec_xform *ipsec_xfrm,
-			    struct rte_crypto_sym_xform *crypto_xfrm);
-bool __roc_api cnxk_onf_ipsec_inb_sa_valid(struct roc_onf_ipsec_inb_sa *sa);
-bool __roc_api cnxk_onf_ipsec_outb_sa_valid(struct roc_onf_ipsec_outb_sa *sa);
-
 /* [CN9K] */
 int __roc_api
 cnxk_on_ipsec_inb_sa_create(struct rte_security_ipsec_xform *ipsec,
diff --git a/drivers/common/cnxk/roc_ie_on.h b/drivers/common/cnxk/roc_ie_on.h
index 057ff95362..585522e7d3 100644
--- a/drivers/common/cnxk/roc_ie_on.h
+++ b/drivers/common/cnxk/roc_ie_on.h
@@ -268,66 +268,6 @@ struct roc_ie_on_inb_sa {
 #define ROC_IE_ON_UCC_L2_HDR_INFO_ERR	  0xCF
 #define ROC_IE_ON_UCC_L2_HDR_LEN_ERR	  0xE0
 
-struct roc_ie_onf_sa_ctl {
-	uint32_t spi;
-	uint64_t exp_proto_inter_frag : 8;
-	uint64_t rsvd_41_40 : 2;
-	/* Disable SPI, SEQ data in RPTR for Inbound inline */
-	uint64_t spi_seq_dis : 1;
-	uint64_t esn_en : 1;
-	uint64_t rsvd_44_45 : 2;
-	uint64_t encap_type : 2;
-	uint64_t enc_type : 3;
-	uint64_t rsvd_48 : 1;
-	uint64_t auth_type : 4;
-	uint64_t valid : 1;
-	uint64_t direction : 1;
-	uint64_t outer_ip_ver : 1;
-	uint64_t inner_ip_ver : 1;
-	uint64_t ipsec_mode : 1;
-	uint64_t ipsec_proto : 1;
-	uint64_t aes_key_len : 2;
-};
-
-struct roc_onf_ipsec_outb_sa {
-	/* w0 */
-	struct roc_ie_onf_sa_ctl ctl;
-
-	/* w1 */
-	uint8_t nonce[4];
-	uint16_t udp_src;
-	uint16_t udp_dst;
-
-	/* w2 */
-	uint32_t ip_src;
-	uint32_t ip_dst;
-
-	/* w3-w6 */
-	uint8_t cipher_key[32];
-
-	/* w7-w12 */
-	uint8_t hmac_key[48];
-};
-
-struct roc_onf_ipsec_inb_sa {
-	/* w0 */
-	struct roc_ie_onf_sa_ctl ctl;
-
-	/* w1 */
-	uint8_t nonce[4]; /* Only for AES-GCM */
-	uint32_t unused;
-
-	/* w2 */
-	uint32_t esn_hi;
-	uint32_t esn_low;
-
-	/* w3-w6 */
-	uint8_t cipher_key[32];
-
-	/* w7-w12 */
-	uint8_t hmac_key[48];
-};
-
 #define ROC_ONF_IPSEC_INB_MAX_L2_SZ	  32UL
 #define ROC_ONF_IPSEC_OUTB_MAX_L2_SZ	  30UL
 #define ROC_ONF_IPSEC_OUTB_MAX_L2_INFO_SZ (ROC_ONF_IPSEC_OUTB_MAX_L2_SZ + 2)
diff --git a/drivers/common/cnxk/roc_nix_inl.h b/drivers/common/cnxk/roc_nix_inl.h
index c537262819..2201717318 100644
--- a/drivers/common/cnxk/roc_nix_inl.h
+++ b/drivers/common/cnxk/roc_nix_inl.h
@@ -4,24 +4,6 @@
 #ifndef _ROC_NIX_INL_H_
 #define _ROC_NIX_INL_H_
 
-/* ONF INB HW area */
-#define ROC_NIX_INL_ONF_IPSEC_INB_HW_SZ                                        \
-	PLT_ALIGN(sizeof(struct roc_onf_ipsec_inb_sa), ROC_ALIGN)
-/* ONF INB SW reserved area */
-#define ROC_NIX_INL_ONF_IPSEC_INB_SW_RSVD 384
-#define ROC_NIX_INL_ONF_IPSEC_INB_SA_SZ                                        \
-	(ROC_NIX_INL_ONF_IPSEC_INB_HW_SZ + ROC_NIX_INL_ONF_IPSEC_INB_SW_RSVD)
-#define ROC_NIX_INL_ONF_IPSEC_INB_SA_SZ_LOG2 9
-
-/* ONF OUTB HW area */
-#define ROC_NIX_INL_ONF_IPSEC_OUTB_HW_SZ                                       \
-	PLT_ALIGN(sizeof(struct roc_onf_ipsec_outb_sa), ROC_ALIGN)
-/* ONF OUTB SW reserved area */
-#define ROC_NIX_INL_ONF_IPSEC_OUTB_SW_RSVD 128
-#define ROC_NIX_INL_ONF_IPSEC_OUTB_SA_SZ                                       \
-	(ROC_NIX_INL_ONF_IPSEC_OUTB_HW_SZ + ROC_NIX_INL_ONF_IPSEC_OUTB_SW_RSVD)
-#define ROC_NIX_INL_ONF_IPSEC_OUTB_SA_SZ_LOG2 8
-
 /* ON INB HW area */
 #define ROC_NIX_INL_ON_IPSEC_INB_HW_SZ                                         \
 	PLT_ALIGN(sizeof(struct roc_ie_on_inb_sa), ROC_ALIGN)
@@ -31,10 +13,10 @@
 	(ROC_NIX_INL_ON_IPSEC_INB_HW_SZ + ROC_NIX_INL_ON_IPSEC_INB_SW_RSVD)
 #define ROC_NIX_INL_ON_IPSEC_INB_SA_SZ_LOG2 10
 
-/* ONF OUTB HW area */
+/* ON OUTB HW area */
 #define ROC_NIX_INL_ON_IPSEC_OUTB_HW_SZ                                        \
 	PLT_ALIGN(sizeof(struct roc_ie_on_outb_sa), ROC_ALIGN)
-/* ONF OUTB SW reserved area */
+/* ON OUTB SW reserved area */
 #define ROC_NIX_INL_ON_IPSEC_OUTB_SW_RSVD 256
 #define ROC_NIX_INL_ON_IPSEC_OUTB_SA_SZ                                        \
 	(ROC_NIX_INL_ON_IPSEC_OUTB_HW_SZ + ROC_NIX_INL_ON_IPSEC_OUTB_SW_RSVD)
@@ -107,34 +89,6 @@ roc_nix_inl_on_ipsec_outb_sa_sw_rsvd(void *sa)
 	return PLT_PTR_ADD(sa, ROC_NIX_INL_ON_IPSEC_OUTB_HW_SZ);
 }
 
-static inline struct roc_onf_ipsec_inb_sa *
-roc_nix_inl_onf_ipsec_inb_sa(uintptr_t base, uint64_t idx)
-{
-	uint64_t off = idx << ROC_NIX_INL_ONF_IPSEC_INB_SA_SZ_LOG2;
-
-	return PLT_PTR_ADD(base, off);
-}
-
-static inline struct roc_onf_ipsec_outb_sa *
-roc_nix_inl_onf_ipsec_outb_sa(uintptr_t base, uint64_t idx)
-{
-	uint64_t off = idx << ROC_NIX_INL_ONF_IPSEC_OUTB_SA_SZ_LOG2;
-
-	return PLT_PTR_ADD(base, off);
-}
-
-static inline void *
-roc_nix_inl_onf_ipsec_inb_sa_sw_rsvd(void *sa)
-{
-	return PLT_PTR_ADD(sa, ROC_NIX_INL_ONF_IPSEC_INB_HW_SZ);
-}
-
-static inline void *
-roc_nix_inl_onf_ipsec_outb_sa_sw_rsvd(void *sa)
-{
-	return PLT_PTR_ADD(sa, ROC_NIX_INL_ONF_IPSEC_OUTB_HW_SZ);
-}
-
 static inline struct roc_ot_ipsec_inb_sa *
 roc_nix_inl_ot_ipsec_inb_sa(uintptr_t base, uint64_t idx)
 {
diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map
index ae9eaf360c..dae69e7272 100644
--- a/drivers/common/cnxk/version.map
+++ b/drivers/common/cnxk/version.map
@@ -15,10 +15,6 @@ INTERNAL {
 	cnxk_logtype_sso;
 	cnxk_logtype_tim;
 	cnxk_logtype_tm;
-	cnxk_onf_ipsec_inb_sa_fill;
-	cnxk_onf_ipsec_outb_sa_fill;
-	cnxk_onf_ipsec_inb_sa_valid;
-	cnxk_onf_ipsec_outb_sa_valid;
 	cnxk_ot_ipsec_inb_sa_fill;
 	cnxk_ot_ipsec_outb_sa_fill;
 	cnxk_ot_ipsec_inb_sa_valid;
diff --git a/drivers/net/cnxk/cnxk_ethdev_devargs.c b/drivers/net/cnxk/cnxk_ethdev_devargs.c
index d28509dbda..0c89e0424f 100644
--- a/drivers/net/cnxk/cnxk_ethdev_devargs.c
+++ b/drivers/net/cnxk/cnxk_ethdev_devargs.c
@@ -75,7 +75,7 @@ parse_ipsec_out_max_sa(const char *key, const char *value, void *extra_args)
 	if (errno)
 		val = 0;
 
-	*(uint16_t *)extra_args = val;
+	*(uint32_t *)extra_args = val;
 
 	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.977057359 +0000
+++ 0027-common-cnxk-remove-CN9K-inline-IPsec-FP-opcodes.patch	2024-03-14 00:09:20.609615142 +0000
@@ -1 +1 @@
-From 930d94170e044ce1a2a2f222306c7dad50898728 Mon Sep 17 00:00:00 2001
+From 41dcb6a83d55074b48db48e2efc3ef82717811de Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 930d94170e044ce1a2a2f222306c7dad50898728 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- drivers/common/cnxk/cnxk_security.c    | 230 -------------------------
+ drivers/common/cnxk/cnxk_security.c    | 229 -------------------------
@@ -22 +23 @@
- 6 files changed, 3 insertions(+), 355 deletions(-)
+ 6 files changed, 3 insertions(+), 354 deletions(-)
@@ -25 +26 @@
-index 64c901a57a..bab015e3b3 100644
+index bdb5433d13..dd19ea9ab9 100644
@@ -28 +29 @@
-@@ -574,236 +574,6 @@ cnxk_ot_ipsec_outb_sa_valid(struct roc_ot_ipsec_outb_sa *sa)
+@@ -614,235 +614,6 @@ cnxk_ot_ipsec_outb_sa_valid(struct roc_ot_ipsec_outb_sa *sa)
@@ -155,2 +156 @@
--		roc_se_hmac_opad_ipad_gen(ctl->auth_type, auth_xfrm->auth.key.data,
--					  auth_xfrm->auth.key.length, hmac_opad_ipad, ROC_SE_IPSEC);
+-		ipsec_hmac_opad_ipad_gen(auth_xfrm, hmac_opad_ipad);
@@ -266 +266 @@
-index b323b8b757..19eb9bb03d 100644
+index 4e477ec53f..77fcd82b12 100644
@@ -269 +269 @@
-@@ -48,18 +48,6 @@ cnxk_ot_ipsec_outb_sa_fill(struct roc_ot_ipsec_outb_sa *sa,
+@@ -47,18 +47,6 @@ cnxk_ot_ipsec_outb_sa_fill(struct roc_ot_ipsec_outb_sa *sa,
@@ -286,2 +286,2 @@
- int __roc_api cnxk_on_ipsec_inb_sa_create(struct rte_security_ipsec_xform *ipsec,
- 					  struct rte_crypto_sym_xform *crypto_xform,
+ int __roc_api
+ cnxk_on_ipsec_inb_sa_create(struct rte_security_ipsec_xform *ipsec,
@@ -289 +289 @@
-index 9933ffa148..11c995e9d1 100644
+index 057ff95362..585522e7d3 100644
@@ -292 +292 @@
-@@ -269,66 +269,6 @@ struct roc_ie_on_inb_sa {
+@@ -268,66 +268,6 @@ struct roc_ie_on_inb_sa {
@@ -360 +360 @@
-index a89b40ff61..8acd7e0545 100644
+index c537262819..2201717318 100644
@@ -401 +401 @@
-@@ -86,34 +68,6 @@ roc_nix_inl_on_ipsec_outb_sa_sw_rsvd(void *sa)
+@@ -107,34 +89,6 @@ roc_nix_inl_on_ipsec_outb_sa_sw_rsvd(void *sa)
@@ -433,3 +433,3 @@
- /* Inline device SSO Work callback */
- typedef void (*roc_nix_inl_sso_work_cb_t)(uint64_t *gw, void *args,
- 					  uint32_t soft_exp_event);
+ static inline struct roc_ot_ipsec_inb_sa *
+ roc_nix_inl_ot_ipsec_inb_sa(uintptr_t base, uint64_t idx)
+ {
@@ -437 +437 @@
-index 892fcb1f0d..73fd890f20 100644
+index ae9eaf360c..dae69e7272 100644
@@ -440 +440 @@
-@@ -17,10 +17,6 @@ INTERNAL {
+@@ -15,10 +15,6 @@ INTERNAL {
@@ -452 +452 @@
-index 50dc80ce2c..1bab19fc23 100644
+index d28509dbda..0c89e0424f 100644

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

* patch 'net/cnxk: fix buffer size configuration' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (25 preceding siblings ...)
  2024-03-14  0:09     ` patch 'common/cnxk: remove CN9K inline IPsec FP opcodes' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'common/cnxk: fix Tx MTU " luca.boccassi
                       ` (32 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/36157ca75c0d6c5dca8af57243ac78cf1f4157ed

Thanks.

Luca Boccassi

---
From 36157ca75c0d6c5dca8af57243ac78cf1f4157ed Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Mon, 26 Feb 2024 19:05:28 +0530
Subject: [PATCH] net/cnxk: fix buffer size configuration

[ upstream commit 3e12147f71ffb96595bf35a92f3f3741ae9d91bb ]

In case where cnxk_nix_mtu_set() is called before
data->min_rx_buf_size is set, use buf size from first RQ's
mempool.

Fixes: 34b46320f446 ("net/cnxk: perform early MTU setup for event mode")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev_ops.c | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index 7a7478cda8..8008f5e4f3 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -508,8 +508,9 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
 	struct rte_eth_dev_data *data = eth_dev->data;
 	struct roc_nix *nix = &dev->nix;
+	struct cnxk_eth_rxq_sp *rxq_sp;
+	uint32_t buffsz = 0;
 	int rc = -EINVAL;
-	uint32_t buffsz;
 
 	frame_size += CNXK_NIX_TIMESYNC_RX_OFFSET * dev->ptp_en;
 
@@ -525,8 +526,24 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 		goto exit;
 	}
 
-	buffsz = data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM;
-	old_frame_size = data->mtu + CNXK_NIX_L2_OVERHEAD;
+	if (!eth_dev->data->nb_rx_queues)
+		goto skip_buffsz_check;
+
+	/* Perform buff size check */
+	if (data->min_rx_buf_size) {
+		buffsz = data->min_rx_buf_size;
+	} else if (eth_dev->data->rx_queues && eth_dev->data->rx_queues[0]) {
+		rxq_sp = cnxk_eth_rxq_to_sp(data->rx_queues[0]);
+
+		if (rxq_sp->qconf.mp)
+			buffsz = rte_pktmbuf_data_room_size(rxq_sp->qconf.mp);
+	}
+
+	/* Skip validation if RQ's are not yet setup */
+	if (!buffsz)
+		goto skip_buffsz_check;
+
+	buffsz -= RTE_PKTMBUF_HEADROOM;
 
 	/* Refuse MTU that requires the support of scattered packets
 	 * when this feature has not been enabled before.
@@ -544,6 +561,8 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 		goto exit;
 	}
 
+skip_buffsz_check:
+	old_frame_size = data->mtu + CNXK_NIX_L2_OVERHEAD;
 	/* if new MTU was smaller than old one, then flush all SQs before MTU change */
 	if (old_frame_size > frame_size) {
 		if (data->dev_started) {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.019427613 +0000
+++ 0028-net-cnxk-fix-buffer-size-configuration.patch	2024-03-14 00:09:20.609615142 +0000
@@ -1 +1 @@
-From 3e12147f71ffb96595bf35a92f3f3741ae9d91bb Mon Sep 17 00:00:00 2001
+From 36157ca75c0d6c5dca8af57243ac78cf1f4157ed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e12147f71ffb96595bf35a92f3f3741ae9d91bb ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index e9ab8da781..e816884d47 100644
+index 7a7478cda8..8008f5e4f3 100644
@@ -22 +23 @@
-@@ -544,8 +544,9 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
+@@ -508,8 +508,9 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
@@ -33 +34 @@
-@@ -561,8 +562,24 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
+@@ -525,8 +526,24 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
@@ -60 +61 @@
-@@ -580,6 +597,8 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
+@@ -544,6 +561,8 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)

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

* patch 'common/cnxk: fix Tx MTU configuration' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (26 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/cnxk: fix buffer size configuration' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/cnxk: fix MTU limit' " luca.boccassi
                       ` (31 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/edf3fc5d23dbf1be447fe71d5c5274977ceb19a1

Thanks.

Luca Boccassi

---
From edf3fc5d23dbf1be447fe71d5c5274977ceb19a1 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Mon, 26 Feb 2024 19:05:29 +0530
Subject: [PATCH] common/cnxk: fix Tx MTU configuration

[ upstream commit cc9f534f60815d858b946062cb1d9701c91b9b58 ]

Skip setting Tx MTU separately as now the Tx credit configuration
is based on max MTU possible for that link.

Also, initialize  MTU with max value for that port.

Fixes: 8589ec212e80 ("net/cnxk: support MTU set")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/common/cnxk/roc_nix.c      |  2 +-
 drivers/common/cnxk/roc_nix.h      |  2 --
 drivers/net/cnxk/cnxk_ethdev_ops.c | 12 +-----------
 3 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/drivers/common/cnxk/roc_nix.c b/drivers/common/cnxk/roc_nix.c
index 2a320cc291..b5c87e8056 100644
--- a/drivers/common/cnxk/roc_nix.c
+++ b/drivers/common/cnxk/roc_nix.c
@@ -426,7 +426,7 @@ skip_dev_init:
 	sdp_lbk_id_update(pci_dev, nix);
 	nix->pci_dev = pci_dev;
 	nix->reta_sz = reta_sz;
-	nix->mtu = ROC_NIX_DEFAULT_HW_FRS;
+	nix->mtu = roc_nix_max_pkt_len(roc_nix);
 
 	/* Always start with full FC for LBK */
 	if (nix->lbk_link) {
diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h
index 6654a2df78..1125fff020 100644
--- a/drivers/common/cnxk/roc_nix.h
+++ b/drivers/common/cnxk/roc_nix.h
@@ -236,8 +236,6 @@ struct roc_nix_eeprom_info {
 #define ROC_NIX_RSS_KEY_LEN	     48 /* 352 Bits */
 #define ROC_NIX_RSS_MCAM_IDX_DEFAULT (-1)
 
-#define ROC_NIX_DEFAULT_HW_FRS 1514
-
 #define ROC_NIX_VWQE_MAX_SIZE_LOG2 11
 #define ROC_NIX_VWQE_MIN_SIZE_LOG2 2
 
diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index 8008f5e4f3..c13ef26c5d 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -574,19 +574,9 @@ skip_buffsz_check:
 
 	frame_size -= RTE_ETHER_CRC_LEN;
 
-	/* Update mtu on Tx */
-	rc = roc_nix_mac_mtu_set(nix, frame_size);
-	if (rc) {
-		plt_err("Failed to set MTU, rc=%d", rc);
-		goto exit;
-	}
-
-	/* Sync same frame size on Rx */
+	/* Set frame size on Rx */
 	rc = roc_nix_mac_max_rx_len_set(nix, frame_size);
 	if (rc) {
-		/* Rollback to older mtu */
-		roc_nix_mac_mtu_set(nix,
-				    old_frame_size - RTE_ETHER_CRC_LEN);
 		plt_err("Failed to max Rx frame length, rc=%d", rc);
 		goto exit;
 	}
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.060850014 +0000
+++ 0029-common-cnxk-fix-Tx-MTU-configuration.patch	2024-03-14 00:09:20.613615221 +0000
@@ -1 +1 @@
-From cc9f534f60815d858b946062cb1d9701c91b9b58 Mon Sep 17 00:00:00 2001
+From edf3fc5d23dbf1be447fe71d5c5274977ceb19a1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cc9f534f60815d858b946062cb1d9701c91b9b58 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 97c0ae3e25..90ccb260fb 100644
+index 2a320cc291..b5c87e8056 100644
@@ -25 +26 @@
-@@ -484,7 +484,7 @@ skip_dev_init:
+@@ -426,7 +426,7 @@ skip_dev_init:
@@ -31 +31,0 @@
- 	nix->dmac_flt_idx = -1;
@@ -33 +33,2 @@
- 	/* Register error and ras interrupts */
+ 	/* Always start with full FC for LBK */
+ 	if (nix->lbk_link) {
@@ -35 +36 @@
-index 2a198de458..4db71544f0 100644
+index 6654a2df78..1125fff020 100644
@@ -38 +39 @@
-@@ -267,8 +267,6 @@ struct roc_nix_eeprom_info {
+@@ -236,8 +236,6 @@ struct roc_nix_eeprom_info {
@@ -48 +49 @@
-index e816884d47..4962f3bced 100644
+index 8008f5e4f3..c13ef26c5d 100644
@@ -51 +52 @@
-@@ -610,19 +610,9 @@ skip_buffsz_check:
+@@ -574,19 +574,9 @@ skip_buffsz_check:

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

* patch 'net/cnxk: fix MTU limit' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (27 preceding siblings ...)
  2024-03-14  0:09     ` patch 'common/cnxk: fix Tx MTU " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'common/cnxk: fix RSS RETA configuration' " luca.boccassi
                       ` (30 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Sunil Kumar Kori; +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/a2ec8fb5fa3affbd151031578c5a51a3c6bb7ed9

Thanks.

Luca Boccassi

---
From a2ec8fb5fa3affbd151031578c5a51a3c6bb7ed9 Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Mon, 26 Feb 2024 19:05:30 +0530
Subject: [PATCH] net/cnxk: fix MTU limit

[ upstream commit 402de2fd8729b61a3ace67c597e99893acb426d4 ]

Device can support maximum frame size up to 9212 bytes. While configuring
MTU, overhead is considered as ethernet header size, CRC and
2 * (VLAN tags) which translates to 26 bytes.

Exposed overhead to the user via rte_eth_dev_info() is 18 bytes which were
leading to set wrong Rx frame size.

Fixes: 8589ec212e80 ("net/cnxk: support MTU set")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev_ops.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index c13ef26c5d..be29b385a4 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -20,8 +20,7 @@ cnxk_nix_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *devinfo)
 	devinfo->max_tx_queues = RTE_MAX_QUEUES_PER_PORT;
 	devinfo->max_mac_addrs = dev->max_mac_entries;
 	devinfo->max_vfs = pci_dev->max_vfs;
-	devinfo->max_mtu = devinfo->max_rx_pktlen -
-				(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN);
+	devinfo->max_mtu = devinfo->max_rx_pktlen - CNXK_NIX_L2_OVERHEAD;
 	devinfo->min_mtu = devinfo->min_rx_bufsize - CNXK_NIX_L2_OVERHEAD;
 
 	devinfo->rx_offload_capa = dev->rx_offload_capa;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.102996312 +0000
+++ 0030-net-cnxk-fix-MTU-limit.patch	2024-03-14 00:09:20.613615221 +0000
@@ -1 +1 @@
-From 402de2fd8729b61a3ace67c597e99893acb426d4 Mon Sep 17 00:00:00 2001
+From a2ec8fb5fa3affbd151031578c5a51a3c6bb7ed9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 402de2fd8729b61a3ace67c597e99893acb426d4 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 4962f3bced..56049c5dd2 100644
+index c13ef26c5d..be29b385a4 100644

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

* patch 'common/cnxk: fix RSS RETA configuration' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (28 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/cnxk: fix MTU limit' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/cnxk: add cookies check for multi-segment offload' " luca.boccassi
                       ` (29 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Kommula Shiva Shankar; +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/ec9d6236d0381655c9cc5a9a5e36e65c20c9f4fc

Thanks.

Luca Boccassi

---
From ec9d6236d0381655c9cc5a9a5e36e65c20c9f4fc Mon Sep 17 00:00:00 2001
From: Kommula Shiva Shankar <kshankar@marvell.com>
Date: Mon, 26 Feb 2024 19:05:31 +0530
Subject: [PATCH] common/cnxk: fix RSS RETA configuration

[ upstream commit dce7f0c2400246da41049c64c0c461a24a4c0498 ]

Update queue entries copy in RETA table based on data type.

Fixes: 1bf6746e653b ("common/cnxk: support NIX RSS")

Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
---
 drivers/common/cnxk/roc_nix_rss.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/cnxk/roc_nix_rss.c b/drivers/common/cnxk/roc_nix_rss.c
index 7de69aabeb..5182c5a9cb 100644
--- a/drivers/common/cnxk/roc_nix_rss.c
+++ b/drivers/common/cnxk/roc_nix_rss.c
@@ -182,7 +182,7 @@ roc_nix_rss_reta_set(struct roc_nix *roc_nix, uint8_t group,
 	if (rc)
 		return rc;
 
-	memcpy(&nix->reta[group], reta, ROC_NIX_RSS_RETA_MAX);
+	memcpy(&nix->reta[group], reta, sizeof(uint16_t) * ROC_NIX_RSS_RETA_MAX);
 	return 0;
 }
 
@@ -195,7 +195,7 @@ roc_nix_rss_reta_get(struct roc_nix *roc_nix, uint8_t group,
 	if (group >= ROC_NIX_RSS_GRPS)
 		return NIX_ERR_PARAM;
 
-	memcpy(reta, &nix->reta[group], ROC_NIX_RSS_RETA_MAX);
+	memcpy(reta, &nix->reta[group], sizeof(uint16_t) * ROC_NIX_RSS_RETA_MAX);
 	return 0;
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.144029732 +0000
+++ 0031-common-cnxk-fix-RSS-RETA-configuration.patch	2024-03-14 00:09:20.613615221 +0000
@@ -1 +1 @@
-From dce7f0c2400246da41049c64c0c461a24a4c0498 Mon Sep 17 00:00:00 2001
+From ec9d6236d0381655c9cc5a9a5e36e65c20c9f4fc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dce7f0c2400246da41049c64c0c461a24a4c0498 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 3599eb9bae..2b88e1360d 100644
+index 7de69aabeb..5182c5a9cb 100644
@@ -20 +21 @@
-@@ -196,7 +196,7 @@ roc_nix_rss_reta_set(struct roc_nix *roc_nix, uint8_t group,
+@@ -182,7 +182,7 @@ roc_nix_rss_reta_set(struct roc_nix *roc_nix, uint8_t group,
@@ -29 +30 @@
-@@ -209,7 +209,7 @@ roc_nix_rss_reta_get(struct roc_nix *roc_nix, uint8_t group,
+@@ -195,7 +195,7 @@ roc_nix_rss_reta_get(struct roc_nix *roc_nix, uint8_t group,

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

* patch 'net/cnxk: add cookies check for multi-segment offload' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (29 preceding siblings ...)
  2024-03-14  0:09     ` patch 'common/cnxk: fix RSS RETA configuration' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'common/cnxk: fix mbox struct attributes' " luca.boccassi
                       ` (28 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Rahul Bhansali; +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/df9a4e91c6f7a2258615ee7801caa0b40a73db73

Thanks.

Luca Boccassi

---
From df9a4e91c6f7a2258615ee7801caa0b40a73db73 Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Mon, 26 Feb 2024 19:05:33 +0530
Subject: [PATCH] net/cnxk: add cookies check for multi-segment offload

[ upstream commit 26a6bda9dfd153192c4cfb73b3367398caa3afaa ]

Fix missing check cookies with multi-seg offload case

Fixes: 3626d5195d49 ("net/cnxk: add multi-segment Tx for CN10K")

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
 drivers/net/cnxk/cn10k_tx.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index 84b5faa137..0e7280bd56 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -1387,6 +1387,9 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
 	len -= dlen;
 	sg_u = sg_u | ((uint64_t)dlen);
 
+	/* Mark mempool object as "put" since it is freed by NIX */
+	RTE_MEMPOOL_CHECK_COOKIES(m->pool, (void **)&m, 1, 0);
+
 	nb_segs = m->nb_segs - 1;
 	m_next = m->next;
 
@@ -1433,6 +1436,9 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
 			slist++;
 		}
 		m->next = NULL;
+		/* Mark mempool object as "put" since it is freed by NIX */
+		RTE_MEMPOOL_CHECK_COOKIES(m->pool, (void **)&m, 1, 0);
+
 		m = m_next;
 	} while (nb_segs);
 
@@ -1469,6 +1475,8 @@ cn10k_nix_prepare_mseg_vec(struct rte_mbuf *m, uint64_t *cmd, uint64x2_t *cmd0,
 			RTE_MEMPOOL_CHECK_COOKIES(m->pool, (void **)&m, 1, 0);
 		rte_io_wmb();
 #endif
+		/* Mark mempool object as "put" since it is freed by NIX */
+		RTE_MEMPOOL_CHECK_COOKIES(m->pool, (void **)&m, 1, 0);
 		return;
 	}
 
@@ -1513,6 +1521,11 @@ cn10k_nix_prep_lmt_mseg_vector(struct rte_mbuf **mbufs, uint64x2_t *cmd0,
 			*data128 |= ((__uint128_t)7) << *shift;
 			*shift += 3;
 
+			/* Mark mempool object as "put" since it is freed by NIX */
+			RTE_MEMPOOL_CHECK_COOKIES(mbufs[0]->pool, (void **)&mbufs[0], 1, 0);
+			RTE_MEMPOOL_CHECK_COOKIES(mbufs[1]->pool, (void **)&mbufs[1], 1, 0);
+			RTE_MEMPOOL_CHECK_COOKIES(mbufs[2]->pool, (void **)&mbufs[2], 1, 0);
+			RTE_MEMPOOL_CHECK_COOKIES(mbufs[3]->pool, (void **)&mbufs[3], 1, 0);
 			return 1;
 		}
 	}
@@ -1539,6 +1552,11 @@ cn10k_nix_prep_lmt_mseg_vector(struct rte_mbuf **mbufs, uint64x2_t *cmd0,
 				vst1q_u64(lmt_addr + 10, cmd2[j + 1]);
 				vst1q_u64(lmt_addr + 12, cmd1[j + 1]);
 				vst1q_u64(lmt_addr + 14, cmd3[j + 1]);
+
+				/* Mark mempool object as "put" since it is freed by NIX */
+				RTE_MEMPOOL_CHECK_COOKIES(mbufs[j]->pool, (void **)&mbufs[j], 1, 0);
+				RTE_MEMPOOL_CHECK_COOKIES(mbufs[j + 1]->pool,
+							  (void **)&mbufs[j + 1], 1, 0);
 			} else if (flags & NIX_TX_NEED_EXT_HDR) {
 				/* EXT header take 3 each, space for 2 segs.*/
 				cn10k_nix_prepare_mseg_vec(mbufs[j],
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.184008319 +0000
+++ 0032-net-cnxk-add-cookies-check-for-multi-segment-offload.patch	2024-03-14 00:09:20.617615301 +0000
@@ -1 +1 @@
-From 26a6bda9dfd153192c4cfb73b3367398caa3afaa Mon Sep 17 00:00:00 2001
+From df9a4e91c6f7a2258615ee7801caa0b40a73db73 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 26a6bda9dfd153192c4cfb73b3367398caa3afaa ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -13,2 +14,2 @@
- drivers/net/cnxk/cn10k_tx.h | 21 ++++++++++++++++++++-
- 1 file changed, 20 insertions(+), 1 deletion(-)
+ drivers/net/cnxk/cn10k_tx.h | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
@@ -17 +18 @@
-index 9647f4259e..91b7f15c02 100644
+index 84b5faa137..0e7280bd56 100644
@@ -20 +21 @@
-@@ -1816,6 +1816,9 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
+@@ -1387,6 +1387,9 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
@@ -29,2 +30,2 @@
- 	m->next = NULL;
-@@ -1841,6 +1844,9 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
+ 
+@@ -1433,6 +1436,9 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
@@ -40,6 +41,4 @@
-@@ -1864,8 +1870,11 @@ cn10k_nix_prepare_mseg_vec(struct rte_mbuf *m, uint64_t *cmd, uint64x2_t *cmd0,
- 	union nix_send_hdr_w0_u sh;
- 	union nix_send_sg_s sg;
- 
--	if (m->nb_segs == 1)
-+	if (m->nb_segs == 1) {
+@@ -1469,6 +1475,8 @@ cn10k_nix_prepare_mseg_vec(struct rte_mbuf *m, uint64_t *cmd, uint64x2_t *cmd0,
+ 			RTE_MEMPOOL_CHECK_COOKIES(m->pool, (void **)&m, 1, 0);
+ 		rte_io_wmb();
+ #endif
@@ -49 +48 @@
-+	}
+ 	}
@@ -51,3 +50 @@
- 	sh.u = vgetq_lane_u64(cmd0[0], 0);
- 	sg.u = vgetq_lane_u64(cmd1[0], 0);
-@@ -1925,6 +1934,11 @@ cn10k_nix_prep_lmt_mseg_vector(struct cn10k_eth_txq *txq,
+@@ -1513,6 +1521,11 @@ cn10k_nix_prep_lmt_mseg_vector(struct rte_mbuf **mbufs, uint64x2_t *cmd0,
@@ -65 +62 @@
-@@ -1943,6 +1957,11 @@ cn10k_nix_prep_lmt_mseg_vector(struct cn10k_eth_txq *txq,
+@@ -1539,6 +1552,11 @@ cn10k_nix_prep_lmt_mseg_vector(struct rte_mbuf **mbufs, uint64x2_t *cmd0,

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

* patch 'common/cnxk: fix mbox struct attributes' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (30 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/cnxk: add cookies check for multi-segment offload' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/cnxk: fix mbuf fields in multi-segment Tx' " luca.boccassi
                       ` (27 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/430b2766cea6a892b22b0ca09f5d8fafa43831b9

Thanks.

Luca Boccassi

---
From 430b2766cea6a892b22b0ca09f5d8fafa43831b9 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Mon, 26 Feb 2024 19:05:34 +0530
Subject: [PATCH] common/cnxk: fix mbox struct attributes

[ upstream commit c9dca1c5e352008bda8d0edeab8fbcf328437282 ]

IO attribute is needed to mbox structs to avoid unaligned or pair
access causing by compiler optimization. Add them to structs
where it is missing.

Fixes: 503b82de2cbf ("common/cnxk: add mbox request and response definitions")
Fixes: ddf955d3917e ("common/cnxk: support CPT second pass")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/common/cnxk/roc_mbox.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/common/cnxk/roc_mbox.h b/drivers/common/cnxk/roc_mbox.h
index 18aa97b84a..9fc22d8a65 100644
--- a/drivers/common/cnxk/roc_mbox.h
+++ b/drivers/common/cnxk/roc_mbox.h
@@ -855,12 +855,12 @@ struct nix_cn10k_aq_enq_req {
 struct nix_cn10k_aq_enq_rsp {
 	struct mbox_msghdr hdr;
 	union {
-		struct nix_cn10k_rq_ctx_s rq;
-		struct nix_cn10k_sq_ctx_s sq;
-		struct nix_cq_ctx_s cq;
-		struct nix_rsse_s rss;
-		struct nix_rx_mce_s mce;
-		struct nix_band_prof_s prof;
+		__io struct nix_cn10k_rq_ctx_s rq;
+		__io struct nix_cn10k_sq_ctx_s sq;
+		__io struct nix_cq_ctx_s cq;
+		__io struct nix_rsse_s rss;
+		__io struct nix_rx_mce_s mce;
+		__io struct nix_band_prof_s prof;
 	};
 };
 
@@ -1096,11 +1096,11 @@ struct nix_rq_cpt_field_mask_cfg_req {
 #define RQ_CTX_MASK_MAX 6
 	union {
 		uint64_t __io rq_ctx_word_set[RQ_CTX_MASK_MAX];
-		struct nix_cn10k_rq_ctx_s rq_set;
+		__io struct nix_cn10k_rq_ctx_s rq_set;
 	};
 	union {
 		uint64_t __io rq_ctx_word_mask[RQ_CTX_MASK_MAX];
-		struct nix_cn10k_rq_ctx_s rq_mask;
+		__io struct nix_cn10k_rq_ctx_s rq_mask;
 	};
 	struct nix_lf_rx_ipec_cfg1_req {
 		uint32_t __io spb_cpt_aura;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.226841707 +0000
+++ 0033-common-cnxk-fix-mbox-struct-attributes.patch	2024-03-14 00:09:20.617615301 +0000
@@ -1 +1 @@
-From c9dca1c5e352008bda8d0edeab8fbcf328437282 Mon Sep 17 00:00:00 2001
+From 430b2766cea6a892b22b0ca09f5d8fafa43831b9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c9dca1c5e352008bda8d0edeab8fbcf328437282 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 4b4f48e372..d8a8494ac4 100644
+index 18aa97b84a..9fc22d8a65 100644
@@ -23 +24 @@
-@@ -1427,12 +1427,12 @@ struct nix_cn10k_aq_enq_req {
+@@ -855,12 +855,12 @@ struct nix_cn10k_aq_enq_req {
@@ -42 +43 @@
-@@ -1668,11 +1668,11 @@ struct nix_rq_cpt_field_mask_cfg_req {
+@@ -1096,11 +1096,11 @@ struct nix_rq_cpt_field_mask_cfg_req {

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

* patch 'net/cnxk: fix mbuf fields in multi-segment Tx' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (31 preceding siblings ...)
  2024-03-14  0:09     ` patch 'common/cnxk: fix mbox struct attributes' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'common/cnxk: fix link config for SDP' " luca.boccassi
                       ` (26 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Rahul Bhansali; +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/ba9eb97868d388f29899a6a612ff4cfd393c6a37

Thanks.

Luca Boccassi

---
From ba9eb97868d388f29899a6a612ff4cfd393c6a37 Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Mon, 26 Feb 2024 19:05:36 +0530
Subject: [PATCH] net/cnxk: fix mbuf fields in multi-segment Tx

[ upstream commit 8ed5ca4dda858c991b27ad6ce5a5525e26a960c0 ]

Currently in debug mode when a buffer is allocated in SW,
nb_segs will have invalid values as it didn't come from driver
Rx path. Hence reset mbuf next and nb_segs fields in multi-seg Tx path.

Fixes: 3626d5195d49 ("net/cnxk: add multi-segment Tx for CN10K")

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
 drivers/net/cnxk/cn10k_tx.h |  2 ++
 drivers/net/cnxk/cn9k_tx.h  | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index 0e7280bd56..254ddf0536 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -943,6 +943,7 @@ cn10k_nix_prepare_mseg(struct rte_mbuf *m, uint64_t *cmd, const uint16_t flags)
 	len -= sg_u & 0xFFFF;
 	nb_segs = m->nb_segs - 1;
 	m_next = m->next;
+	m->nb_segs = 1;
 	slist = &cmd[3 + off + 1];
 
 	/* Set invert df if buffer is not to be freed by H/W */
@@ -1404,6 +1405,7 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
 #endif
 
 	m->next = NULL;
+	m->nb_segs = 1;
 	m = m_next;
 	/* Fill mbuf segments */
 	do {
diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h
index 7362025a34..257f1ce1aa 100644
--- a/drivers/net/cnxk/cn9k_tx.h
+++ b/drivers/net/cnxk/cn9k_tx.h
@@ -448,6 +448,10 @@ cn9k_nix_prepare_mseg(struct rte_mbuf *m, uint64_t *cmd, const uint16_t flags)
 	if (!(sg_u & (1ULL << 55)))
 		RTE_MEMPOOL_CHECK_COOKIES(m->pool, (void **)&m, 1, 0);
 	rte_io_wmb();
+#endif
+#ifdef RTE_ENABLE_ASSERT
+	m->next = NULL;
+	m->nb_segs = 1;
 #endif
 	m = m_next;
 	if (!m)
@@ -483,6 +487,9 @@ cn9k_nix_prepare_mseg(struct rte_mbuf *m, uint64_t *cmd, const uint16_t flags)
 			sg_u = sg->u;
 			slist++;
 		}
+#ifdef RTE_ENABLE_ASSERT
+		m->next = NULL;
+#endif
 		m = m_next;
 	} while (nb_segs);
 
@@ -496,6 +503,9 @@ done:
 	segdw += (off >> 1) + 1 + !!(flags & NIX_TX_OFFLOAD_TSTAMP_F);
 	send_hdr->w0.sizem1 = segdw - 1;
 
+#ifdef RTE_ENABLE_ASSERT
+	rte_io_wmb();
+#endif
 	return segdw;
 }
 
@@ -699,6 +709,10 @@ cn9k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
 	rte_io_wmb();
 #endif
 
+#ifdef RTE_ENABLE_ASSERT
+	m->next = NULL;
+	m->nb_segs = 1;
+#endif
 	m = m_next;
 	/* Fill mbuf segments */
 	do {
@@ -728,6 +742,9 @@ cn9k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
 			sg_u = sg->u;
 			slist++;
 		}
+#ifdef RTE_ENABLE_ASSERT
+		m->next = NULL;
+#endif
 		m = m_next;
 	} while (nb_segs);
 
@@ -743,6 +760,9 @@ cn9k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
 		 !!(flags & NIX_TX_OFFLOAD_TSTAMP_F);
 	sh->sizem1 = segdw - 1;
 
+#ifdef RTE_ENABLE_ASSERT
+	rte_io_wmb();
+#endif
 	return segdw;
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.269809144 +0000
+++ 0034-net-cnxk-fix-mbuf-fields-in-multi-segment-Tx.patch	2024-03-14 00:09:20.621615380 +0000
@@ -1 +1 @@
-From 8ed5ca4dda858c991b27ad6ce5a5525e26a960c0 Mon Sep 17 00:00:00 2001
+From ba9eb97868d388f29899a6a612ff4cfd393c6a37 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8ed5ca4dda858c991b27ad6ce5a5525e26a960c0 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 91b7f15c02..266c899a05 100644
+index 0e7280bd56..254ddf0536 100644
@@ -23 +24,2 @@
-@@ -1277,6 +1277,7 @@ cn10k_nix_prepare_mseg(struct cn10k_eth_txq *txq,
+@@ -943,6 +943,7 @@ cn10k_nix_prepare_mseg(struct rte_mbuf *m, uint64_t *cmd, const uint16_t flags)
+ 	len -= sg_u & 0xFFFF;
@@ -26 +27,0 @@
- 	m->next = NULL;
@@ -30,4 +31,4 @@
- 	cookie = RTE_MBUF_DIRECT(m) ? m : rte_mbuf_from_indirect(m);
-@@ -1822,6 +1823,7 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
- 	nb_segs = m->nb_segs - 1;
- 	m_next = m->next;
+ 	/* Set invert df if buffer is not to be freed by H/W */
+@@ -1404,6 +1405,7 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
+ #endif
+ 
@@ -40 +41 @@
-index 3596651cc2..94acbe64fa 100644
+index 7362025a34..257f1ce1aa 100644
@@ -43 +44,3 @@
-@@ -647,6 +647,10 @@ cn9k_nix_prepare_mseg(struct cn9k_eth_txq *txq,
+@@ -448,6 +448,10 @@ cn9k_nix_prepare_mseg(struct rte_mbuf *m, uint64_t *cmd, const uint16_t flags)
+ 	if (!(sg_u & (1ULL << 55)))
+ 		RTE_MEMPOOL_CHECK_COOKIES(m->pool, (void **)&m, 1, 0);
@@ -45,2 +47,0 @@
- #else
- 	RTE_SET_USED(cookie);
@@ -54 +55 @@
-@@ -683,6 +687,9 @@ cn9k_nix_prepare_mseg(struct cn9k_eth_txq *txq,
+@@ -483,6 +487,9 @@ cn9k_nix_prepare_mseg(struct rte_mbuf *m, uint64_t *cmd, const uint16_t flags)
@@ -64 +65 @@
-@@ -696,6 +703,9 @@ done:
+@@ -496,6 +503,9 @@ done:
@@ -74,2 +75,2 @@
-@@ -912,6 +922,10 @@ cn9k_nix_prepare_mseg_vec_list(struct cn9k_eth_txq *txq,
- 	RTE_SET_USED(cookie);
+@@ -699,6 +709,10 @@ cn9k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
+ 	rte_io_wmb();
@@ -85 +86 @@
-@@ -942,6 +956,9 @@ cn9k_nix_prepare_mseg_vec_list(struct cn9k_eth_txq *txq,
+@@ -728,6 +742,9 @@ cn9k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
@@ -95 +96 @@
-@@ -957,6 +974,9 @@ cn9k_nix_prepare_mseg_vec_list(struct cn9k_eth_txq *txq,
+@@ -743,6 +760,9 @@ cn9k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,
@@ -97 +98 @@
- 	send_hdr->w0.sizem1 = segdw - 1;
+ 	sh->sizem1 = segdw - 1;

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

* patch 'common/cnxk: fix link config for SDP' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (32 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/cnxk: fix mbuf fields in multi-segment Tx' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'common/cnxk: remove dead code' " luca.boccassi
                       ` (25 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 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/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/66dffe8a6d5eec1dfee17bfad85f5f5f9cac2265

Thanks.

Luca Boccassi

---
From 66dffe8a6d5eec1dfee17bfad85f5f5f9cac2265 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Wed, 28 Feb 2024 00:25:19 +0530
Subject: [PATCH] common/cnxk: fix link config for SDP

[ upstream commit 48054ca3842b0fc468e3e7931143dcb154b45921 ]

Link configure registers are invalid and should not be accessed
for SDP ports. But while on Txq release which does SQ flush calls
back pressure disable API which configures these link registers.

Fixes: 58debb813a8d ("common/cnxk: enable TM to listen on Rx pause frames")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/common/cnxk/roc_nix_tm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/common/cnxk/roc_nix_tm.c b/drivers/common/cnxk/roc_nix_tm.c
index be8da714cd..810949ca76 100644
--- a/drivers/common/cnxk/roc_nix_tm.c
+++ b/drivers/common/cnxk/roc_nix_tm.c
@@ -326,6 +326,9 @@ nix_tm_bp_config_set(struct roc_nix *roc_nix, uint16_t sq, uint16_t tc,
 	uint8_t k = 0;
 	int rc = 0;
 
+	if (roc_nix_is_sdp(roc_nix))
+		return 0;
+
 	sq_s = nix->sqs[sq];
 	if (!sq_s)
 		return -ENOENT;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.315192818 +0000
+++ 0035-common-cnxk-fix-link-config-for-SDP.patch	2024-03-14 00:09:20.625615459 +0000
@@ -1 +1 @@
-From 48054ca3842b0fc468e3e7931143dcb154b45921 Mon Sep 17 00:00:00 2001
+From 66dffe8a6d5eec1dfee17bfad85f5f5f9cac2265 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 48054ca3842b0fc468e3e7931143dcb154b45921 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 6a61e448a1..4e6a28f827 100644
+index be8da714cd..810949ca76 100644
@@ -22 +23 @@
-@@ -328,6 +328,9 @@ nix_tm_bp_config_set(struct roc_nix *roc_nix, uint16_t sq, uint16_t tc,
+@@ -326,6 +326,9 @@ nix_tm_bp_config_set(struct roc_nix *roc_nix, uint16_t sq, uint16_t tc,
@@ -24 +25 @@
- 	int rc = 0, i;
+ 	int rc = 0;

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

* patch 'common/cnxk: remove dead code' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (33 preceding siblings ...)
  2024-03-14  0:09     ` patch 'common/cnxk: fix link config for SDP' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'common/cnxk: fix possible out-of-bounds access' " luca.boccassi
                       ` (24 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Nithin Dabilpuram, 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/a1f69f50e1dec75963188bc84e2f69c816815ad9

Thanks.

Luca Boccassi

---
From a1f69f50e1dec75963188bc84e2f69c816815ad9 Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Fri, 1 Mar 2024 09:05:33 +0530
Subject: [PATCH] common/cnxk: remove dead code

[ upstream commit 1ded7ef41ac888eb5e804d3337be687e5ebd324d ]

Removed dead code reported by Coverity.

Coverity issue: 380992
Fixes: da1ec39060b2 ("common/cnxk: delay inline device RQ enable to dev start")

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/common/cnxk/roc_nix_inl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c
index 92ff44888d..15fec65d93 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -399,8 +399,7 @@ roc_nix_reassembly_configure(uint32_t max_wait_time, uint16_t max_frags)
 		return -EFAULT;
 
 	PLT_SET_USED(max_frags);
-	if (idev == NULL)
-		return -ENOTSUP;
+
 	roc_cpt = idev->cpt;
 	if (!roc_cpt) {
 		plt_err("Cannot support inline inbound, cryptodev not probed");
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.356917506 +0000
+++ 0036-common-cnxk-remove-dead-code.patch	2024-03-14 00:09:20.625615459 +0000
@@ -1 +1 @@
-From 1ded7ef41ac888eb5e804d3337be687e5ebd324d Mon Sep 17 00:00:00 2001
+From a1f69f50e1dec75963188bc84e2f69c816815ad9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1ded7ef41ac888eb5e804d3337be687e5ebd324d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a205c658e9..7dbeae5017 100644
+index 92ff44888d..15fec65d93 100644
@@ -22 +23 @@
-@@ -677,8 +677,7 @@ roc_nix_reassembly_configure(uint32_t max_wait_time, uint16_t max_frags)
+@@ -399,8 +399,7 @@ roc_nix_reassembly_configure(uint32_t max_wait_time, uint16_t max_frags)

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

* patch 'common/cnxk: fix possible out-of-bounds access' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (34 preceding siblings ...)
  2024-03-14  0:09     ` patch 'common/cnxk: remove dead code' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/mlx5/hws: check not supported fields in VXLAN' " luca.boccassi
                       ` (23 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Harman Kalra, 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/f29c2d6b20f766d3e70bf98fcda41276ddb8f0bf

Thanks.

Luca Boccassi

---
From f29c2d6b20f766d3e70bf98fcda41276ddb8f0bf Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Fri, 1 Mar 2024 09:05:34 +0530
Subject: [PATCH] common/cnxk: fix possible out-of-bounds access

[ upstream commit 9a92937cf0c836b7f2b5e303523279ddf9473a35 ]

The subtraction expression in mbox_memcpy() can wrap around
causing an out-of-bounds access. Added a check on 'size' to
fix this.

Coverity issue: 384431, 384439
Fixes: 585bb3e538f9 ("common/cnxk: add VF support to base device class")

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/common/cnxk/roc_dev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c
index 31f80f6717..67fffc89fe 100644
--- a/drivers/common/cnxk/roc_dev.c
+++ b/drivers/common/cnxk/roc_dev.c
@@ -466,6 +466,8 @@ pf_vf_mbox_send_up_msg(struct dev *dev, void *rec_msg)
 	size_t size;
 
 	size = PLT_ALIGN(mbox_id2size(msg->hdr.id), MBOX_MSG_ALIGN);
+	if (size < sizeof(struct mbox_msghdr))
+		return;
 	/* Send UP message to all VF's */
 	for (vf = 0; vf < vf_mbox->ndevs; vf++) {
 		/* VF active */
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.398482021 +0000
+++ 0037-common-cnxk-fix-possible-out-of-bounds-access.patch	2024-03-14 00:09:20.625615459 +0000
@@ -1 +1 @@
-From 9a92937cf0c836b7f2b5e303523279ddf9473a35 Mon Sep 17 00:00:00 2001
+From f29c2d6b20f766d3e70bf98fcda41276ddb8f0bf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9a92937cf0c836b7f2b5e303523279ddf9473a35 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 084343c3b4..14aff233d5 100644
+index 31f80f6717..67fffc89fe 100644
@@ -24 +25 @@
-@@ -502,6 +502,8 @@ pf_vf_mbox_send_up_msg(struct dev *dev, void *rec_msg)
+@@ -466,6 +466,8 @@ pf_vf_mbox_send_up_msg(struct dev *dev, void *rec_msg)

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

* patch 'net/mlx5/hws: check not supported fields in VXLAN' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (35 preceding siblings ...)
  2024-03-14  0:09     ` patch 'common/cnxk: fix possible out-of-bounds access' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/mlx5/hws: fix VLAN item in non-relaxed mode' " luca.boccassi
                       ` (22 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Erez Shitrit; +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/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/d458f6a235bde619a8a1c95b68ea8efaf2affda2

Thanks.

Luca Boccassi

---
From d458f6a235bde619a8a1c95b68ea8efaf2affda2 Mon Sep 17 00:00:00 2001
From: Erez Shitrit <erezsh@nvidia.com>
Date: Sun, 18 Feb 2024 07:11:16 +0200
Subject: [PATCH] net/mlx5/hws: check not supported fields in VXLAN

[ upstream commit 4506703cbe96185bf3593a222fb9f51f70de78af ]

Don't allow the user to mask over rsvd1 / rsvd2 fields which are not
supported.

Fixes: 28e69588f417 ("net/mlx5/hws: fix tunnel protocol checks")

Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_definer.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index af63cdd343..9637281a1e 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -1002,6 +1002,13 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer_conv_data *cd,
 	struct mlx5dr_definer_fc *fc;
 	bool inner = cd->tunnel;
 
+	if (m && (m->rsvd0[0] != 0 || m->rsvd0[1] != 0 || m->rsvd0[2] != 0 ||
+	    m->rsvd1 != 0)) {
+		DR_LOG(ERR, "reserved fields are not supported");
+		rte_errno = ENOTSUP;
+		return rte_errno;
+	}
+
 	if (inner) {
 		DR_LOG(ERR, "Inner VXLAN item not supported");
 		rte_errno = ENOTSUP;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.440203726 +0000
+++ 0038-net-mlx5-hws-check-not-supported-fields-in-VXLAN.patch	2024-03-14 00:09:20.625615459 +0000
@@ -1 +1 @@
-From 4506703cbe96185bf3593a222fb9f51f70de78af Mon Sep 17 00:00:00 2001
+From d458f6a235bde619a8a1c95b68ea8efaf2affda2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4506703cbe96185bf3593a222fb9f51f70de78af ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 79d98bbf78..8b8757ecac 100644
+index af63cdd343..9637281a1e 100644
@@ -22 +23 @@
-@@ -1414,6 +1414,13 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer_conv_data *cd,
+@@ -1002,6 +1002,13 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer_conv_data *cd,

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

* patch 'net/mlx5/hws: fix VLAN item in non-relaxed 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
                       ` (36 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/mlx5/hws: check not supported fields in VXLAN' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/mlx5: fix use after free when releasing Tx queues' " luca.boccassi
                       ` (21 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Hamdan Igbaria; +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/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/c3d7ceece3712d9e30d7f6d24eb8b228a338ca5d

Thanks.

Luca Boccassi

---
From c3d7ceece3712d9e30d7f6d24eb8b228a338ca5d Mon Sep 17 00:00:00 2001
From: Hamdan Igbaria <hamdani@nvidia.com>
Date: Sun, 18 Feb 2024 07:11:20 +0200
Subject: [PATCH] net/mlx5/hws: fix VLAN item in non-relaxed mode

[ upstream commit 0aacd886e93df862f010a45ed333d08355f4bca8 ]

If a VLAN item was passed with null mask, the item handler would
return immediately and thus won't set default values for non relax
mode.
Also change the non relax default set to single-tagged (CVLAN).

Fixes: c55c2bf35333 ("net/mlx5/hws: add definer layer")

Signed-off-by: Hamdan Igbaria <hamdani@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_definer.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index 9637281a1e..52f615d842 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -163,7 +163,8 @@ struct mlx5dr_definer_conv_data {
 	X(SET_BE32,	gre_opt_key,		v->key.key,		rte_flow_item_gre_opt) \
 	X(SET_BE32,	gre_opt_seq,		v->sequence.sequence,	rte_flow_item_gre_opt) \
 	X(SET_BE16,	gre_opt_checksum,	v->checksum_rsvd.checksum,	rte_flow_item_gre_opt) \
-	X(SET,		meter_color,		rte_col_2_mlx5_col(v->color),	rte_flow_item_meter_color)
+	X(SET,		meter_color,		rte_col_2_mlx5_col(v->color),	rte_flow_item_meter_color) \
+	X(SET,		cvlan,			STE_CVLAN,		rte_flow_item_vlan)
 
 /* Item set function format */
 #define X(set_type, func_name, value, item_type) \
@@ -477,6 +478,15 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,
 	struct mlx5dr_definer_fc *fc;
 	bool inner = cd->tunnel;
 
+	if (!cd->relaxed) {
+		/* Mark packet as tagged (CVLAN) */
+		fc = &cd->fc[DR_CALC_FNAME(VLAN_TYPE, inner)];
+		fc->item_idx = item_idx;
+		fc->tag_mask_set = &mlx5dr_definer_ones_set;
+		fc->tag_set = &mlx5dr_definer_cvlan_set;
+		DR_CALC_SET(fc, eth_l2, first_vlan_qualifier, inner);
+	}
+
 	if (!m)
 		return 0;
 
@@ -485,8 +495,7 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,
 		return rte_errno;
 	}
 
-	if (!cd->relaxed || m->has_more_vlan) {
-		/* Mark packet as tagged (CVLAN or SVLAN) even if TCI is not specified.*/
+	if (m->has_more_vlan) {
 		fc = &cd->fc[DR_CALC_FNAME(VLAN_TYPE, inner)];
 		fc->item_idx = item_idx;
 		fc->tag_mask_set = &mlx5dr_definer_ones_set;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.483803527 +0000
+++ 0039-net-mlx5-hws-fix-VLAN-item-in-non-relaxed-mode.patch	2024-03-14 00:09:20.629615539 +0000
@@ -1 +1 @@
-From 0aacd886e93df862f010a45ed333d08355f4bca8 Mon Sep 17 00:00:00 2001
+From c3d7ceece3712d9e30d7f6d24eb8b228a338ca5d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0aacd886e93df862f010a45ed333d08355f4bca8 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/mlx5/hws/mlx5dr_definer.c | 13 +++++++++++--
- 1 file changed, 11 insertions(+), 2 deletions(-)
+ drivers/net/mlx5/hws/mlx5dr_definer.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
@@ -21 +22 @@
-index eb788a772a..b8a546989a 100644
+index 9637281a1e..52f615d842 100644
@@ -24,5 +25,7 @@
-@@ -223,6 +223,7 @@ struct mlx5dr_definer_conv_data {
- 	X(SET,		ib_l4_opcode,		v->hdr.opcode,		rte_flow_item_ib_bth) \
- 	X(SET,		random_number,		v->value,		rte_flow_item_random) \
- 	X(SET,		ib_l4_bth_a,		v->hdr.a,		rte_flow_item_ib_bth) \
-+	X(SET,		cvlan,			STE_CVLAN,		rte_flow_item_vlan) \
+@@ -163,7 +163,8 @@ struct mlx5dr_definer_conv_data {
+ 	X(SET_BE32,	gre_opt_key,		v->key.key,		rte_flow_item_gre_opt) \
+ 	X(SET_BE32,	gre_opt_seq,		v->sequence.sequence,	rte_flow_item_gre_opt) \
+ 	X(SET_BE16,	gre_opt_checksum,	v->checksum_rsvd.checksum,	rte_flow_item_gre_opt) \
+-	X(SET,		meter_color,		rte_col_2_mlx5_col(v->color),	rte_flow_item_meter_color)
++	X(SET,		meter_color,		rte_col_2_mlx5_col(v->color),	rte_flow_item_meter_color) \
++	X(SET,		cvlan,			STE_CVLAN,		rte_flow_item_vlan)
@@ -32 +35 @@
-@@ -864,6 +865,15 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,
+@@ -477,6 +478,15 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,
@@ -48 +51 @@
-@@ -872,8 +882,7 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,
+@@ -485,8 +495,7 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,

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

* patch 'net/mlx5: fix use after free when releasing Tx queues' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (37 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/mlx5/hws: fix VLAN item in non-relaxed mode' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/mlx5: fix error packets drop in regular Rx' " luca.boccassi
                       ` (20 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Pengfei Sun; +Cc: Yunjian Wang, 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/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/5126f7dd1094e8a1366cc52ac946831f3129b53b

Thanks.

Luca Boccassi

---
From 5126f7dd1094e8a1366cc52ac946831f3129b53b Mon Sep 17 00:00:00 2001
From: Pengfei Sun <sunpengfei16@huawei.com>
Date: Tue, 20 Feb 2024 17:31:39 +0800
Subject: [PATCH] net/mlx5: fix use after free when releasing Tx queues

[ upstream commit b805b7c451f1ee5bafa5628ee67f3a495f6a8682 ]

In function mlx5_dev_configure, dev->data->tx_queues is assigned
to priv->txqs. When a member is removed from a bond, the function
eth_dev_tx_queue_config is called to release dev->data->tx_queues.
However, function mlx5_dev_close will access priv->txqs again and
cause the use after free problem.

In function mlx5_dev_close, before free priv->txqs, we add a check
that dev->data->tx_queues is not NULL.

build/app/dpdk-testpmd -c7 -a 0000:08:00.2 --  -i --nb-cores=2
--total-num-mbufs=2048

testpmd> port stop 0
testpmd> create bonding device 4 0
testpmd> add bonding member 0 1
testpmd> remove bonding member 0 1
testpmd> quit

ASan reports:
==2571911==ERROR: AddressSanitizer: heap-use-after-free on address
0x000174529880 at pc 0x0000113c8440 bp 0xffffefae0ea0 sp 0xffffefae0eb0
READ of size 8 at 0x000174529880 thread T0
    #0 0x113c843c in mlx5_txq_release ../drivers/net/mlx5/mlx5_txq.c:
1203
    #1 0xffdb53c in mlx5_dev_close ../drivers/net/mlx5/mlx5.c:2286
    #2 0xe12dc0 in rte_eth_dev_close ../lib/ethdev/rte_ethdev.c:1877
    #3 0x6bac1c in close_port ../app/test-pmd/testpmd.c:3540
    #4 0x6bc320 in pmd_test_exit ../app/test-pmd/testpmd.c:3808
    #5 0x6c1a94 in main ../app/test-pmd/testpmd.c:4759
    #6 0xffff9328f038  (/usr/lib64/libc.so.6+0x2b038)
    #7 0xffff9328f110 in __libc_start_main (/usr/lib64/libc.so.6+
0x2b110)

Fixes: 6e78005a9b30 ("net/mlx5: add reference counter on DPDK Tx queues")

Reported-by: Yunjian Wang <wangyunjian@huawei.com>
Signed-off-by: Pengfei Sun <sunpengfei16@huawei.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 1a5f95b22b..d41b0d1363 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2074,7 +2074,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 		mlx5_free(priv->rxq_privs);
 		priv->rxq_privs = NULL;
 	}
-	if (priv->txqs != NULL) {
+	if (priv->txqs != NULL && dev->data->tx_queues != NULL) {
 		/* XXX race condition if mlx5_tx_burst() is still running. */
 		rte_delay_us_sleep(1000);
 		for (i = 0; (i != priv->txqs_n); ++i)
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.527955679 +0000
+++ 0040-net-mlx5-fix-use-after-free-when-releasing-Tx-queues.patch	2024-03-14 00:09:20.629615539 +0000
@@ -1 +1 @@
-From b805b7c451f1ee5bafa5628ee67f3a495f6a8682 Mon Sep 17 00:00:00 2001
+From 5126f7dd1094e8a1366cc52ac946831f3129b53b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b805b7c451f1ee5bafa5628ee67f3a495f6a8682 ]
+
@@ -40 +41,0 @@
-Cc: stable@dpdk.org
@@ -50 +51 @@
-index 881c42a97a..f2ca0ae4c2 100644
+index 1a5f95b22b..d41b0d1363 100644
@@ -53 +54 @@
-@@ -2362,7 +2362,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+@@ -2074,7 +2074,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)

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

* patch 'net/mlx5: fix error packets drop in regular Rx' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (38 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/mlx5: fix use after free when releasing Tx queues' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/mlx5: prevent querying aged flows on uninit port' " luca.boccassi
                       ` (19 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: 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/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/3032a40f28fa9cb423fee723e6c89a14d84fdee0

Thanks.

Luca Boccassi

---
From 3032a40f28fa9cb423fee723e6c89a14d84fdee0 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Tue, 20 Feb 2024 13:45:20 +0200
Subject: [PATCH] net/mlx5: fix error packets drop in regular Rx

[ upstream commit ef296e8f6140ea469b50c7bfe73501b1c9ef86e1 ]

When packet gets received with error it is reported in CQE
structure and PMD analyzes the error syndrome and provides
two options - either reset the entire queue for the critical
errors, or just ignore the packet.

The non-vectorized rx_burst did not ignore the non-critical
error packets, and in case of packet length exceeding the
mbuf data buffer length it took the next element in the queue
WQE ring, resulting in CQE/WQE consume indices synchronization
lost.

Fixes: aa67ed308458 ("net/mlx5: ignore non-critical syndromes for Rx queue")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_rx.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rx.c b/drivers/net/mlx5/mlx5_rx.c
index b41f7a51f5..56e5568f33 100644
--- a/drivers/net/mlx5/mlx5_rx.c
+++ b/drivers/net/mlx5/mlx5_rx.c
@@ -601,7 +601,8 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec,
  * @param mprq
  *   Indication if it is called from MPRQ.
  * @return
- *   0 in case of empty CQE, MLX5_REGULAR_ERROR_CQE_RET in case of error CQE,
+ *   0 in case of empty CQE,
+ *   MLX5_REGULAR_ERROR_CQE_RET in case of error CQE,
  *   MLX5_CRITICAL_ERROR_CQE_RET in case of error CQE lead to Rx queue reset,
  *   otherwise the packet size in regular RxQ,
  *   and striding byte count format in mprq case.
@@ -675,6 +676,11 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
 					if (ret == MLX5_RECOVERY_ERROR_RET ||
 						ret == MLX5_RECOVERY_COMPLETED_RET)
 						return MLX5_CRITICAL_ERROR_CQE_RET;
+					if (!mprq && ret == MLX5_RECOVERY_IGNORE_RET) {
+						*skip_cnt = 1;
+						++rxq->cq_ci;
+						return MLX5_ERROR_CQE_MASK;
+					}
 				} else {
 					return 0;
 				}
@@ -928,19 +934,18 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_cnt];
 			len = mlx5_rx_poll_len(rxq, cqe, cqe_cnt, &mcqe, &skip_cnt, false);
 			if (unlikely(len & MLX5_ERROR_CQE_MASK)) {
+				/* We drop packets with non-critical errors */
+				rte_mbuf_raw_free(rep);
 				if (len == MLX5_CRITICAL_ERROR_CQE_RET) {
-					rte_mbuf_raw_free(rep);
 					rq_ci = rxq->rq_ci << sges_n;
 					break;
 				}
+				/* Skip specified amount of error CQEs packets */
 				rq_ci >>= sges_n;
 				rq_ci += skip_cnt;
 				rq_ci <<= sges_n;
-				idx = rq_ci & wqe_cnt;
-				wqe = &((volatile struct mlx5_wqe_data_seg *)rxq->wqes)[idx];
-				seg = (*rxq->elts)[idx];
-				cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_cnt];
-				len = len & ~MLX5_ERROR_CQE_MASK;
+				MLX5_ASSERT(!pkt);
+				continue;
 			}
 			if (len == 0) {
 				rte_mbuf_raw_free(rep);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.571302258 +0000
+++ 0041-net-mlx5-fix-error-packets-drop-in-regular-Rx.patch	2024-03-14 00:09:20.633615618 +0000
@@ -1 +1 @@
-From ef296e8f6140ea469b50c7bfe73501b1c9ef86e1 Mon Sep 17 00:00:00 2001
+From 3032a40f28fa9cb423fee723e6c89a14d84fdee0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ef296e8f6140ea469b50c7bfe73501b1c9ef86e1 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 5bf1a679b2..cc087348a4 100644
+index b41f7a51f5..56e5568f33 100644
@@ -30 +31 @@
-@@ -613,7 +613,8 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec,
+@@ -601,7 +601,8 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec,
@@ -40 +41 @@
-@@ -697,6 +698,11 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
+@@ -675,6 +676,11 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
@@ -52,3 +53,3 @@
-@@ -971,19 +977,18 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
- 			cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_mask];
- 			len = mlx5_rx_poll_len(rxq, cqe, cqe_n, cqe_mask, &mcqe, &skip_cnt, false);
+@@ -928,19 +934,18 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+ 			cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_cnt];
+ 			len = mlx5_rx_poll_len(rxq, cqe, cqe_cnt, &mcqe, &skip_cnt, false);
@@ -67 +68 @@
--				idx = rq_ci & wqe_mask;
+-				idx = rq_ci & wqe_cnt;
@@ -70 +71 @@
--				cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_mask];
+-				cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_cnt];

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

* patch 'net/mlx5: prevent querying aged flows on uninit port' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (39 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/mlx5: fix error packets drop in regular Rx' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/mlx5/hws: fix VLAN inner type' " luca.boccassi
                       ` (18 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Bing Zhao; +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/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/afe47440d13a52b9493c3e8776fa0d369436806b

Thanks.

Luca Boccassi

---
From afe47440d13a52b9493c3e8776fa0d369436806b Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 21 Feb 2024 05:23:22 +0200
Subject: [PATCH] net/mlx5: prevent querying aged flows on uninit port

[ upstream commit 3b1ccc5833b0bd89931e90c5e843134839ba46ce ]

In HWS template API, the aging mechanism doesn't support shared host
mode now. When the guest's counter is set to 0, the aging won't be
initialized.

The current implementation didn't prevent the user from querying the
aged flows on the uninitialized port. The access of invalid pointers
would cause a crash.

With this commit, the flag of the per port aging initialization will
be checked. This would help to get rid of the invalid accessing.

Fixes: 04a4de756e14 ("net/mlx5: support flow age action with HWS")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 6b889e9f81..2b90748d04 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -8526,6 +8526,10 @@ flow_hw_get_q_aged_flows(struct rte_eth_dev *dev, uint32_t queue_id,
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 					  NULL, "empty context");
+	if (!priv->hws_age_req)
+		return rte_flow_error_set(error, ENOENT,
+					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+					  NULL, "No aging initialized");
 	if (priv->hws_strict_queue) {
 		if (queue_id >= age_info->hw_q_age->nb_rings)
 			return 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-14 00:09:22.613646054 +0000
+++ 0042-net-mlx5-prevent-querying-aged-flows-on-uninit-port.patch	2024-03-14 00:09:20.641615777 +0000
@@ -1 +1 @@
-From 3b1ccc5833b0bd89931e90c5e843134839ba46ce Mon Sep 17 00:00:00 2001
+From afe47440d13a52b9493c3e8776fa0d369436806b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3b1ccc5833b0bd89931e90c5e843134839ba46ce ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index bd5c46b6ad..91d1c59fbd 100644
+index 6b889e9f81..2b90748d04 100644
@@ -30 +31 @@
-@@ -11219,6 +11219,10 @@ flow_hw_get_q_aged_flows(struct rte_eth_dev *dev, uint32_t queue_id,
+@@ -8526,6 +8526,10 @@ flow_hw_get_q_aged_flows(struct rte_eth_dev *dev, uint32_t queue_id,

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

* patch 'net/mlx5/hws: fix VLAN inner type' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (40 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/mlx5: prevent querying aged flows on uninit port' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/mlx5: fix condition of LACP miss flow' " luca.boccassi
                       ` (17 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Hamdan Igbaria; +Cc: Erez Shitrit, 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/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/38b2735798d9ced9adddfac036b01a2d246560b8

Thanks.

Luca Boccassi

---
From 38b2735798d9ced9adddfac036b01a2d246560b8 Mon Sep 17 00:00:00 2001
From: Hamdan Igbaria <hamdani@nvidia.com>
Date: Wed, 21 Feb 2024 08:28:11 +0200
Subject: [PATCH] net/mlx5/hws: fix VLAN inner type

[ upstream commit d1d350d868439357e750297d5719670f706facc2 ]

Set the correct VLAN inner_type value, till today the
once the VLAN inner_type field was set, an incorrect
value was taken instead of the inner_type field.

Fixes: c55c2bf35333 ("net/mlx5/hws: add definer layer")

Signed-off-by: Hamdan Igbaria <hamdani@nvidia.com>
Reviewed-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_definer.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index 52f615d842..b3d8d9504e 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -164,7 +164,8 @@ struct mlx5dr_definer_conv_data {
 	X(SET_BE32,	gre_opt_seq,		v->sequence.sequence,	rte_flow_item_gre_opt) \
 	X(SET_BE16,	gre_opt_checksum,	v->checksum_rsvd.checksum,	rte_flow_item_gre_opt) \
 	X(SET,		meter_color,		rte_col_2_mlx5_col(v->color),	rte_flow_item_meter_color) \
-	X(SET,		cvlan,			STE_CVLAN,		rte_flow_item_vlan)
+	X(SET,		cvlan,			STE_CVLAN,		rte_flow_item_vlan) \
+	X(SET_BE16,	inner_type,		v->inner_type,		rte_flow_item_vlan)
 
 /* Item set function format */
 #define X(set_type, func_name, value, item_type) \
@@ -513,7 +514,7 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,
 	if (m->inner_type) {
 		fc = &cd->fc[DR_CALC_FNAME(ETH_TYPE, inner)];
 		fc->item_idx = item_idx;
-		fc->tag_set = &mlx5dr_definer_eth_type_set;
+		fc->tag_set = &mlx5dr_definer_inner_type_set;
 		DR_CALC_SET(fc, eth_l2, l3_ethertype, inner);
 	}
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.665845555 +0000
+++ 0043-net-mlx5-hws-fix-VLAN-inner-type.patch	2024-03-14 00:09:20.645615856 +0000
@@ -1 +1 @@
-From d1d350d868439357e750297d5719670f706facc2 Mon Sep 17 00:00:00 2001
+From 38b2735798d9ced9adddfac036b01a2d246560b8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d1d350d868439357e750297d5719670f706facc2 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/mlx5/hws/mlx5dr_definer.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ drivers/net/mlx5/hws/mlx5dr_definer.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
@@ -21 +22 @@
-index c1508e6b53..e036aca781 100644
+index 52f615d842..b3d8d9504e 100644
@@ -24,5 +25,7 @@
-@@ -224,6 +224,7 @@ struct mlx5dr_definer_conv_data {
- 	X(SET,		random_number,		v->value,		rte_flow_item_random) \
- 	X(SET,		ib_l4_bth_a,		v->hdr.a,		rte_flow_item_ib_bth) \
- 	X(SET,		cvlan,			STE_CVLAN,		rte_flow_item_vlan) \
-+	X(SET_BE16,	inner_type,		v->inner_type,		rte_flow_item_vlan) \
+@@ -164,7 +164,8 @@ struct mlx5dr_definer_conv_data {
+ 	X(SET_BE32,	gre_opt_seq,		v->sequence.sequence,	rte_flow_item_gre_opt) \
+ 	X(SET_BE16,	gre_opt_checksum,	v->checksum_rsvd.checksum,	rte_flow_item_gre_opt) \
+ 	X(SET,		meter_color,		rte_col_2_mlx5_col(v->color),	rte_flow_item_meter_color) \
+-	X(SET,		cvlan,			STE_CVLAN,		rte_flow_item_vlan)
++	X(SET,		cvlan,			STE_CVLAN,		rte_flow_item_vlan) \
++	X(SET_BE16,	inner_type,		v->inner_type,		rte_flow_item_vlan)
@@ -32,2 +35,2 @@
-@@ -990,7 +991,7 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,
- 	if (m->hdr.eth_proto) {
+@@ -513,7 +514,7 @@ mlx5dr_definer_conv_item_vlan(struct mlx5dr_definer_conv_data *cd,
+ 	if (m->inner_type) {

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

* patch 'net/mlx5: fix condition of LACP miss flow' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (41 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/mlx5/hws: fix VLAN inner type' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/mlx5: fix conntrack action handle representation' " luca.boccassi
                       ` (16 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Bing Zhao; +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/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/25f2e790457624521449eba5a35f4adf75b58e71

Thanks.

Luca Boccassi

---
From 25f2e790457624521449eba5a35f4adf75b58e71 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 21 Feb 2024 08:49:48 +0200
Subject: [PATCH] net/mlx5: fix condition of LACP miss flow

[ upstream commit 87e4384d2662f520bfae28ae14dbff2429c6923d ]

The LACP traffic is only related to the bond interface. The default
miss flow to redirect the LACP traffic with ethertype 0x8809 to the
kernel driver should only be created on the bond device.

This commit will:
  1. remove the incorrect assertion of the port role.
  2. skip the resource allocation and flow rule creation on the
     representor port.

Fixes: 0f0ae73a3287 ("net/mlx5: add parameter for LACP packets control")
Fixes: 49dffadf4b0c ("net/mlx5: fix LACP redirection in Rx domain")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 3 +--
 drivers/net/mlx5/mlx5_trigger.c | 8 ++++----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 2b90748d04..948c56099f 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -6446,7 +6446,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
 		}
 	}
 	/* Create LACP default miss table. */
-	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0) {
+	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0 && priv->master) {
 		lacp_rx_items_tmpl = flow_hw_create_lacp_rx_pattern_template(dev, error);
 		if (!lacp_rx_items_tmpl) {
 			DRV_LOG(ERR, "port %u failed to create pattern template"
@@ -9286,7 +9286,6 @@ mlx5_flow_hw_lacp_rx_flow(struct rte_eth_dev *dev)
 		.type = MLX5_HW_CTRL_FLOW_TYPE_LACP_RX,
 	};
 
-	MLX5_ASSERT(priv->master);
 	if (!priv->dr_ctx || !priv->hw_lacp_rx_tbl)
 		return 0;
 	return flow_hw_create_ctrl_flow(dev, dev, priv->hw_lacp_rx_tbl, eth_lacp, 0,
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index b12a1dc1c7..dbf5719a7e 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -1524,7 +1524,7 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
 	}
 	if (priv->isolated)
 		return 0;
-	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0)
+	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0 && priv->master)
 		if (mlx5_flow_hw_lacp_rx_flow(dev))
 			goto error;
 	if (dev->data->promiscuous)
@@ -1632,14 +1632,14 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
 		DRV_LOG(INFO, "port %u FDB default rule is disabled",
 			dev->data->port_id);
 	}
-	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0) {
+	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0 && priv->master) {
 		ret = mlx5_flow_lacp_miss(dev);
 		if (ret)
 			DRV_LOG(INFO, "port %u LACP rule cannot be created - "
 				"forward LACP to kernel.", dev->data->port_id);
 		else
-			DRV_LOG(INFO, "LACP traffic will be missed in port %u."
-				, dev->data->port_id);
+			DRV_LOG(INFO, "LACP traffic will be missed in port %u.",
+				dev->data->port_id);
 	}
 	if (priv->isolated)
 		return 0;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.709237729 +0000
+++ 0044-net-mlx5-fix-condition-of-LACP-miss-flow.patch	2024-03-14 00:09:20.653616015 +0000
@@ -1 +1 @@
-From 87e4384d2662f520bfae28ae14dbff2429c6923d Mon Sep 17 00:00:00 2001
+From 25f2e790457624521449eba5a35f4adf75b58e71 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 87e4384d2662f520bfae28ae14dbff2429c6923d ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 91d1c59fbd..e7f1b5f551 100644
+index 2b90748d04..948c56099f 100644
@@ -30 +31 @@
-@@ -8934,7 +8934,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
+@@ -6446,7 +6446,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
@@ -39 +40 @@
-@@ -12761,7 +12761,6 @@ mlx5_flow_hw_lacp_rx_flow(struct rte_eth_dev *dev)
+@@ -9286,7 +9286,6 @@ mlx5_flow_hw_lacp_rx_flow(struct rte_eth_dev *dev)
@@ -48 +49 @@
-index 5ac25d7e2d..f8d67282ce 100644
+index b12a1dc1c7..dbf5719a7e 100644

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

* patch 'net/mlx5: fix conntrack action handle representation' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (42 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/mlx5: fix condition of LACP miss flow' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/mlx5: fix connection tracking action validation' " luca.boccassi
                       ` (15 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/c2a6e4ddcaae8b8c4872da94d014c1333e55020f

Thanks.

Luca Boccassi

---
From c2a6e4ddcaae8b8c4872da94d014c1333e55020f Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Tue, 27 Feb 2024 15:52:21 +0200
Subject: [PATCH] net/mlx5: fix conntrack action handle representation

[ upstream commit 4487a79277a11bd5e78f57234b29b77b62f4e653 ]

In mlx5 PMD, handles to indirect connection tracking flow actions
are encoded in 32-bit unsigned integers as follows:

- Bits 31-29 - indirect action type.
- Bits 28-25 - port on which connection tracking action was created.
- Bits 24-0 - index of connection tracking object.

Macro defining a bit shift for owner part in this representation
was incorrectly defined as 22. This patch fixes that, as well as
aligns documented limitations.

Fixes: 463170a7c934 ("net/mlx5: support connection tracking with HWS")
Fixes: 48fbb0e93d06 ("net/mlx5: support flow meter mark indirect action with HWS")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 doc/guides/nics/mlx5.rst     | 4 ++--
 drivers/net/mlx5/mlx5_flow.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 239e297d2a..b047d7db58 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -561,8 +561,8 @@ Limitations
 
   - Cannot co-exist with ASO meter, ASO age action in a single flow rule.
   - Flow rules insertion rate and memory consumption need more optimization.
-  - 256 ports maximum.
-  - 4M connections maximum with ``dv_flow_en`` 1 mode. 16M with ``dv_flow_en`` 2.
+  - 16 ports maximum.
+  - 32M connections maximum.
 
 - Multi-thread flow insertion:
 
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index eb87f84166..42db9ba12a 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -75,7 +75,7 @@ enum {
 /* Now, the maximal ports will be supported is 16, action number is 32M. */
 #define MLX5_INDIRECT_ACT_CT_MAX_PORT 0x10
 
-#define MLX5_INDIRECT_ACT_CT_OWNER_SHIFT 22
+#define MLX5_INDIRECT_ACT_CT_OWNER_SHIFT 25
 #define MLX5_INDIRECT_ACT_CT_OWNER_MASK (MLX5_INDIRECT_ACT_CT_MAX_PORT - 1)
 
 /* 29-31: type, 25-28: owner port, 0-24: index */
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.762896602 +0000
+++ 0045-net-mlx5-fix-conntrack-action-handle-representation.patch	2024-03-14 00:09:20.657616094 +0000
@@ -1 +1 @@
-From 4487a79277a11bd5e78f57234b29b77b62f4e653 Mon Sep 17 00:00:00 2001
+From c2a6e4ddcaae8b8c4872da94d014c1333e55020f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4487a79277a11bd5e78f57234b29b77b62f4e653 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 6dce4f1c98..de286c67c8 100644
+index 239e297d2a..b047d7db58 100644
@@ -32 +33 @@
-@@ -814,8 +814,8 @@ Limitations
+@@ -561,8 +561,8 @@ Limitations
@@ -44 +45 @@
-index a4d0ff7b13..b4bf96cd64 100644
+index eb87f84166..42db9ba12a 100644
@@ -47 +48 @@
-@@ -77,7 +77,7 @@ enum mlx5_indirect_type {
+@@ -75,7 +75,7 @@ enum {

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

* patch 'net/mlx5: fix connection tracking action validation' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (43 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/mlx5: fix conntrack action handle representation' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/mlx5/hws: enable multiple integrity items' " luca.boccassi
                       ` (14 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/ff41fc17f18c2f43cf675427a920ddf727a651c8

Thanks.

Luca Boccassi

---
From ff41fc17f18c2f43cf675427a920ddf727a651c8 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Tue, 27 Feb 2024 15:52:22 +0200
Subject: [PATCH] net/mlx5: fix connection tracking action validation

[ upstream commit bd2db022c1ad154cd996b7b858c9f04f5a458416 ]

In mlx5 PMD, handles to indirect connection tracking flow actions
are encoded as 32-bit unsigned integers, where port ID is stored
in bits 28-25. Because of this, connection tracking flow actions
cannot be created on ports with IDs higher than 15.
This patch adds missing validation.

Fixes: 463170a7c934 ("net/mlx5: support connection tracking with HWS")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 9 +++++++++
 drivers/net/mlx5/mlx5_flow_hw.c | 7 +++++++
 2 files changed, 16 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 4ce6da50e8..7ed04bdb15 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -13143,6 +13143,13 @@ flow_dv_translate_create_conntrack(struct rte_eth_dev *dev,
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
 					  "Connection is not supported");
+	if (dev->data->port_id >= MLX5_INDIRECT_ACT_CT_MAX_PORT) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+				   "CT supports port indexes up to "
+				   RTE_STR(MLX5_ACTION_CTX_CT_MAX_PORT));
+		return 0;
+	}
 	idx = flow_dv_aso_ct_alloc(dev, error);
 	if (!idx)
 		return rte_flow_error_set(error, rte_errno,
@@ -15812,6 +15819,8 @@ flow_dv_action_create(struct rte_eth_dev *dev,
 	case RTE_FLOW_ACTION_TYPE_CONNTRACK:
 		ret = flow_dv_translate_create_conntrack(dev, action->conf,
 							 err);
+		if (!ret)
+			break;
 		idx = MLX5_INDIRECT_ACT_CT_GEN_IDX(PORT_ID(priv), ret);
 		break;
 	default:
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 948c56099f..fe50d23987 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -7708,6 +7708,13 @@ flow_hw_conntrack_create(struct rte_eth_dev *dev, uint32_t queue,
 				   "CT is not enabled");
 		return 0;
 	}
+	if (dev->data->port_id >= MLX5_INDIRECT_ACT_CT_MAX_PORT) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+				   "CT supports port indexes up to "
+				   RTE_STR(MLX5_ACTION_CTX_CT_MAX_PORT));
+		return 0;
+	}
 	ct = mlx5_ipool_zmalloc(pool->cts, &ct_idx);
 	if (!ct) {
 		rte_flow_error_set(error, rte_errno,
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.819810014 +0000
+++ 0046-net-mlx5-fix-connection-tracking-action-validation.patch	2024-03-14 00:09:20.681616571 +0000
@@ -1 +1 @@
-From bd2db022c1ad154cd996b7b858c9f04f5a458416 Mon Sep 17 00:00:00 2001
+From ff41fc17f18c2f43cf675427a920ddf727a651c8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bd2db022c1ad154cd996b7b858c9f04f5a458416 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 75a8a223ab..ddf19e9a51 100644
+index 4ce6da50e8..7ed04bdb15 100644
@@ -26 +27 @@
-@@ -13889,6 +13889,13 @@ flow_dv_translate_create_conntrack(struct rte_eth_dev *dev,
+@@ -13143,6 +13143,13 @@ flow_dv_translate_create_conntrack(struct rte_eth_dev *dev,
@@ -40 +41 @@
-@@ -16586,6 +16593,8 @@ flow_dv_action_create(struct rte_eth_dev *dev,
+@@ -15812,6 +15819,8 @@ flow_dv_action_create(struct rte_eth_dev *dev,
@@ -50 +51 @@
-index c8440262d8..43bde71c93 100644
+index 948c56099f..fe50d23987 100644
@@ -53 +54 @@
-@@ -10346,6 +10346,13 @@ flow_hw_conntrack_create(struct rte_eth_dev *dev, uint32_t queue,
+@@ -7708,6 +7708,13 @@ flow_hw_conntrack_create(struct rte_eth_dev *dev, uint32_t queue,

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

* patch 'net/mlx5/hws: enable multiple integrity items' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (44 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/mlx5: fix connection tracking action validation' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/mlx5: fix VLAN handling in meter split' " luca.boccassi
                       ` (13 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Michael Baum; +Cc: Erez Shitrit, 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/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/325c88d078153ecc36f5dab892a5a8396e5f6cde

Thanks.

Luca Boccassi

---
From 325c88d078153ecc36f5dab892a5a8396e5f6cde Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 28 Feb 2024 11:50:55 +0200
Subject: [PATCH] net/mlx5/hws: enable multiple integrity items

[ upstream commit 8c178ac8ce81ab0cbd9e90fd7eb4a2b47fca7c2b ]

The integrity item uses the DW "oks1" in header layout. It includes the
all supported bits for both inner and outer. When item is integrity
type, the relevant bits are turned on and all DW is submitted.

When user provides more then single integrity item in same pattern, the
last one overrides the values were submitted before. This is problematic
when user wants to match integrity bits for both inner and outer in same
pattern, he cannot merge them into single item since rte_flow API
provides encapsulation level field to match either inner or outer.

This patch avoids the overriding values, when "oks1" is submitted,
operator "or" is used instead of regular set.

Fixes: c55c2bf35333 ("net/mlx5/hws: add definer layer")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Reviewed-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_definer.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index b3d8d9504e..d81d66523a 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -31,6 +31,10 @@
 				  (bit_off))); \
 	} while (0)
 
+/* Getter function based on bit offset and mask, for 32bit DW*/
+#define DR_GET_32(p, byte_off, bit_off, mask) \
+	((rte_be_to_cpu_32(*((const rte_be32_t *)(p) + ((byte_off) / 4))) >> (bit_off)) & (mask))
+
 /* Setter function based on bit offset and mask */
 #define DR_SET(p, v, byte_off, bit_off, mask) \
 	do { \
@@ -271,7 +275,7 @@ mlx5dr_definer_integrity_set(struct mlx5dr_definer_fc *fc,
 {
 	bool inner = (fc->fname == MLX5DR_DEFINER_FNAME_INTEGRITY_I);
 	const struct rte_flow_item_integrity *v = item_spec;
-	uint32_t ok1_bits = 0;
+	uint32_t ok1_bits = DR_GET_32(tag, fc->byte_off, fc->bit_off, fc->bit_mask);
 
 	if (v->l3_ok)
 		ok1_bits |= inner ? BIT(MLX5DR_DEFINER_OKS1_SECOND_L3_OK) |
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.882320867 +0000
+++ 0047-net-mlx5-hws-enable-multiple-integrity-items.patch	2024-03-14 00:09:20.681616571 +0000
@@ -1 +1 @@
-From 8c178ac8ce81ab0cbd9e90fd7eb4a2b47fca7c2b Mon Sep 17 00:00:00 2001
+From 325c88d078153ecc36f5dab892a5a8396e5f6cde Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8c178ac8ce81ab0cbd9e90fd7eb4a2b47fca7c2b ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index e036aca781..0e15aafb8a 100644
+index b3d8d9504e..d81d66523a 100644
@@ -33 +34 @@
-@@ -44,6 +44,10 @@
+@@ -31,6 +31,10 @@
@@ -44 +45 @@
-@@ -509,7 +513,7 @@ mlx5dr_definer_integrity_set(struct mlx5dr_definer_fc *fc,
+@@ -271,7 +275,7 @@ mlx5dr_definer_integrity_set(struct mlx5dr_definer_fc *fc,
@@ -52 +53 @@
- 		ok1_bits |= inner ? BIT(MLX5DR_DEFINER_OKS1_SECOND_L3_OK) :
+ 		ok1_bits |= inner ? BIT(MLX5DR_DEFINER_OKS1_SECOND_L3_OK) |

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

* patch 'net/mlx5: fix VLAN handling in meter split' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (45 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/mlx5/hws: enable multiple integrity items' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/mlx5: fix counters map in bonding mode' " luca.boccassi
                       ` (12 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: 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/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/e7b38d0f36f3eb43c6b5360cbe5b15b725f49cd1

Thanks.

Luca Boccassi

---
From e7b38d0f36f3eb43c6b5360cbe5b15b725f49cd1 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Tue, 27 Feb 2024 14:58:15 +0100
Subject: [PATCH] net/mlx5: fix VLAN handling in meter split

[ upstream commit 5d2301a222d77e7bac3a085aa17f8ef7a3af7ffe ]

On the attempt to create a flow rule with:

- matching on REPRESENTED_PORT,
- matching on outer VLAN tag,
- matching on inner VLAN tag,
- METER action,

flow splitting mechanism for handling metering flows was causing
memory corruption. It was assumed that suffix flow will have a single
VLAN item (used for translation of OF_PUSH_VLAN/OF_SET_VLAN_VID
actions), however during flow_meter_split_prep() 2 VLAN items were
parsed. This caused the buffer overflow on allocated
suffix flow item buffer.

This patch fixes this overflow, by account for number of VLAN items
in flow rule pattern when allocating items for suffix flow.

Fixes: 50f576d657d7 ("net/mlx5: fix VLAN actions in meter")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 60 +++++++++++++++++++++++-------------
 1 file changed, 39 insertions(+), 21 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 01b463adec..89c98f95f9 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -5458,8 +5458,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 	struct mlx5_rte_flow_item_tag *tag_item_spec;
 	struct mlx5_rte_flow_item_tag *tag_item_mask;
 	uint32_t tag_id = 0;
-	struct rte_flow_item *vlan_item_dst = NULL;
-	const struct rte_flow_item *vlan_item_src = NULL;
+	bool vlan_actions;
+	struct rte_flow_item *orig_sfx_items = sfx_items;
 	const struct rte_flow_item *orig_items = items;
 	struct rte_flow_action *hw_mtr_action;
 	struct rte_flow_action *action_pre_head = NULL;
@@ -5476,6 +5476,7 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 
 	/* Prepare the suffix subflow items. */
 	tag_item = sfx_items++;
+	tag_item->type = (enum rte_flow_item_type)MLX5_RTE_FLOW_ITEM_TYPE_TAG;
 	for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
 		int item_type = items->type;
 
@@ -5498,10 +5499,13 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 			sfx_items++;
 			break;
 		case RTE_FLOW_ITEM_TYPE_VLAN:
-			/* Determine if copy vlan item below. */
-			vlan_item_src = items;
-			vlan_item_dst = sfx_items++;
-			vlan_item_dst->type = RTE_FLOW_ITEM_TYPE_VOID;
+			/*
+			 * Copy VLAN items in case VLAN actions are performed.
+			 * If there are no VLAN actions, these items will be VOID.
+			 */
+			memcpy(sfx_items, items, sizeof(*sfx_items));
+			sfx_items->type = (enum rte_flow_item_type)MLX5_RTE_FLOW_ITEM_TYPE_VLAN;
+			sfx_items++;
 			break;
 		default:
 			break;
@@ -5518,6 +5522,7 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 		tag_action = actions_pre++;
 	}
 	/* Prepare the actions for prefix and suffix flow. */
+	vlan_actions = false;
 	for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) {
 		struct rte_flow_action *action_cur = NULL;
 
@@ -5548,16 +5553,7 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 			break;
 		case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
 		case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID:
-			if (vlan_item_dst && vlan_item_src) {
-				memcpy(vlan_item_dst, vlan_item_src,
-					sizeof(*vlan_item_dst));
-				/*
-				 * Convert to internal match item, it is used
-				 * for vlan push and set vid.
-				 */
-				vlan_item_dst->type = (enum rte_flow_item_type)
-						MLX5_RTE_FLOW_ITEM_TYPE_VLAN;
-			}
+			vlan_actions = true;
 			break;
 		case RTE_FLOW_ACTION_TYPE_COUNT:
 			if (fm->def_policy)
@@ -5572,6 +5568,14 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 					actions_sfx++ : actions_pre++;
 		memcpy(action_cur, actions, sizeof(struct rte_flow_action));
 	}
+	/* If there are no VLAN actions, convert VLAN items to VOID in suffix flow items. */
+	if (!vlan_actions) {
+		struct rte_flow_item *it = orig_sfx_items;
+
+		for (; it->type != RTE_FLOW_ITEM_TYPE_END; it++)
+			if (it->type == (enum rte_flow_item_type)MLX5_RTE_FLOW_ITEM_TYPE_VLAN)
+				it->type = RTE_FLOW_ITEM_TYPE_VOID;
+	}
 	/* Add end action to the actions. */
 	actions_sfx->type = RTE_FLOW_ACTION_TYPE_END;
 	if (priv->sh->meter_aso_en) {
@@ -5661,8 +5665,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 	tag_action->type = (enum rte_flow_action_type)
 				MLX5_RTE_FLOW_ACTION_TYPE_TAG;
 	tag_action->conf = set_tag;
-	tag_item->type = (enum rte_flow_item_type)
-				MLX5_RTE_FLOW_ITEM_TYPE_TAG;
 	tag_item->spec = tag_item_spec;
 	tag_item->last = NULL;
 	tag_item->mask = tag_item_mask;
@@ -6490,6 +6492,19 @@ flow_meter_create_drop_flow_with_org_pattern(struct rte_eth_dev *dev,
 				&drop_split_info, error);
 }
 
+static int
+flow_count_vlan_items(const struct rte_flow_item items[])
+{
+	int items_n = 0;
+
+	for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
+		if (items->type == RTE_FLOW_ITEM_TYPE_VLAN ||
+		    items->type == (enum rte_flow_item_type)MLX5_RTE_FLOW_ITEM_TYPE_VLAN)
+			items_n++;
+	}
+	return items_n;
+}
+
 /**
  * The splitting for meter feature.
  *
@@ -6545,6 +6560,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
 	size_t act_size;
 	size_t item_size;
 	int actions_n = 0;
+	int vlan_items_n = 0;
 	int ret = 0;
 
 	if (priv->mtr_en)
@@ -6604,9 +6620,11 @@ flow_create_split_meter(struct rte_eth_dev *dev,
 		act_size = (sizeof(struct rte_flow_action) *
 			    (actions_n + METER_PREFIX_ACTION)) +
 			   sizeof(struct mlx5_rte_flow_action_set_tag);
-		/* Suffix items: tag, vlan, port id, end. */
-#define METER_SUFFIX_ITEM 4
-		item_size = sizeof(struct rte_flow_item) * METER_SUFFIX_ITEM +
+		/* Flow can have multiple VLAN items. Account for them in suffix items. */
+		vlan_items_n = flow_count_vlan_items(items);
+		/* Suffix items: tag, [vlans], port id, end. */
+#define METER_SUFFIX_ITEM 3
+		item_size = sizeof(struct rte_flow_item) * (METER_SUFFIX_ITEM + vlan_items_n) +
 			    sizeof(struct mlx5_rte_flow_item_tag) * 2;
 		sfx_actions = mlx5_malloc(MLX5_MEM_ZERO, (act_size + item_size),
 					  0, SOCKET_ID_ANY);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.919471838 +0000
+++ 0048-net-mlx5-fix-VLAN-handling-in-meter-split.patch	2024-03-14 00:09:20.693616809 +0000
@@ -1 +1 @@
-From 5d2301a222d77e7bac3a085aa17f8ef7a3af7ffe Mon Sep 17 00:00:00 2001
+From e7b38d0f36f3eb43c6b5360cbe5b15b725f49cd1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5d2301a222d77e7bac3a085aa17f8ef7a3af7ffe ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index c7d70b8c7b..f8943a60be 100644
+index 01b463adec..89c98f95f9 100644
@@ -36 +37 @@
-@@ -5707,8 +5707,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -5458,8 +5458,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -47 +48 @@
-@@ -5725,6 +5725,7 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -5476,6 +5476,7 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -55 +56 @@
-@@ -5747,10 +5748,13 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -5498,10 +5499,13 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -73 +74 @@
-@@ -5767,6 +5771,7 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -5518,6 +5522,7 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -81 +82 @@
-@@ -5797,16 +5802,7 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -5548,16 +5553,7 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -99 +100 @@
-@@ -5821,6 +5817,14 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -5572,6 +5568,14 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -114 +115 @@
-@@ -5910,8 +5914,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -5661,8 +5665,6 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -123 +124 @@
-@@ -6739,6 +6741,19 @@ flow_meter_create_drop_flow_with_org_pattern(struct rte_eth_dev *dev,
+@@ -6490,6 +6492,19 @@ flow_meter_create_drop_flow_with_org_pattern(struct rte_eth_dev *dev,
@@ -143 +144 @@
-@@ -6794,6 +6809,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
+@@ -6545,6 +6560,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
@@ -151 +152 @@
-@@ -6853,9 +6869,11 @@ flow_create_split_meter(struct rte_eth_dev *dev,
+@@ -6604,9 +6620,11 @@ flow_create_split_meter(struct rte_eth_dev *dev,

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

* patch 'net/mlx5: fix counters map in bonding 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
                       ` (46 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/mlx5: fix VLAN handling in meter split' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/mlx5: remove device status check in flow creation' " luca.boccassi
                       ` (11 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Viacheslav Ovsiienko, 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/cc21b4a2d2d343307af178b1fd31eed1df0b1979

Thanks.

Luca Boccassi

---
From cc21b4a2d2d343307af178b1fd31eed1df0b1979 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Thu, 29 Feb 2024 11:34:56 +0200
Subject: [PATCH] net/mlx5: fix counters map in bonding mode

[ upstream commit a687c3e658c2d889052089af8340bc0b9299c856 ]

In the HW-LAG mode, there is only one mlx5 IB device with 2 ETH
interfaces. In theory, the settings on both ports should be the same.
But in the real life, some inconsistent settings may be done by the
user and the PMD is not aware of this.

In the previous implementation, the xstats map was generated from the
information fetched on the 1st port of a bonding interface. If the
2nd port had a different settings, the number and the order of the
counters may differ from that of the 1st one. The ioctl() call may
corrupt the user buffers (copy_to_user) and cause a crash.

The commit will change the map between the driver counters to the
PMD user counters.
  1. Switch the inner and outer loop to speed up the initialization
     time AMAP - since there will be >300 counters returned from the
     driver.
  2. Generate an unique map for both ports in LAG mode.
    a. Scan the 1st port and find the supported counters' strings,
       then add to the map.
    b. In bonding, scan the 2nd port and find the strings. If one is
       already in the map, use the index. Or append to the next free
       slot.
    c. Append the device counters that needs to be fetched via sysfs
       or Devx command. This kind of counter(s) is unique per IB
       device.

After querying the statistics from the driver, the value will be read
from the proper offset in the "struct ethtool_stats" and then added
into the output array based on the map information. In bonding mode,
the statistics from both ports will be accumulated if the counters
are valid on both ports.

Compared to the system call or Devx command, the overhead introduced
by the extra index comparison is light and should not cause a
significant degradation.

The application should ensure that the port settings should not be
changed out of the DPDK application dynamically in most cases. Or
else the change cannot be notified and the counters map might not
be valid when the number doesn't change but the counters set had
changed. A device restart will help to re-initialize the map from
scrath.

Fixes: 7ed15acdcd69 ("net/mlx5: improve xstats of bonding port")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_ethdev_os.c   | 249 +++++++++++++++-------
 drivers/net/mlx5/mlx5.h                   |  15 +-
 drivers/net/mlx5/mlx5_stats.c             |  58 +++--
 drivers/net/mlx5/windows/mlx5_ethdev_os.c |  22 +-
 4 files changed, 242 insertions(+), 102 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index dd5a0c546d..0ee8c58ba7 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -1286,13 +1286,16 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
 	struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
 	unsigned int i;
 	struct ifreq ifr;
-	unsigned int stats_sz = xstats_ctrl->stats_n * sizeof(uint64_t);
+	unsigned int max_stats_n = RTE_MAX(xstats_ctrl->stats_n, xstats_ctrl->stats_n_2nd);
+	unsigned int stats_sz = max_stats_n * sizeof(uint64_t);
 	unsigned char et_stat_buf[sizeof(struct ethtool_stats) + stats_sz];
 	struct ethtool_stats *et_stats = (struct ethtool_stats *)et_stat_buf;
 	int ret;
+	uint16_t i_idx, o_idx;
 
 	et_stats->cmd = ETHTOOL_GSTATS;
-	et_stats->n_stats = xstats_ctrl->stats_n;
+	/* Pass the maximum value, the driver may ignore this. */
+	et_stats->n_stats = max_stats_n;
 	ifr.ifr_data = (caddr_t)et_stats;
 	if (pf >= 0)
 		ret = mlx5_ifreq_by_ifname(priv->sh->bond.ports[pf].ifname,
@@ -1305,21 +1308,34 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
 			dev->data->port_id);
 		return ret;
 	}
-	for (i = 0; i != xstats_ctrl->mlx5_stats_n; ++i) {
-		if (xstats_ctrl->info[i].dev)
-			continue;
-		stats[i] += (uint64_t)
-			    et_stats->data[xstats_ctrl->dev_table_idx[i]];
+	if (pf <= 0) {
+		for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+			i_idx = xstats_ctrl->dev_table_idx[i];
+			if (i_idx == UINT16_MAX || xstats_ctrl->info[i].dev)
+				continue;
+			o_idx = xstats_ctrl->xstats_o_idx[i];
+			stats[o_idx] += (uint64_t)et_stats->data[i_idx];
+		}
+	} else {
+		for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+			i_idx = xstats_ctrl->dev_table_idx_2nd[i];
+			if (i_idx == UINT16_MAX)
+				continue;
+			o_idx = xstats_ctrl->xstats_o_idx_2nd[i];
+			stats[o_idx] += (uint64_t)et_stats->data[i_idx];
+		}
 	}
 	return 0;
 }
 
-/**
+/*
  * Read device counters.
  *
  * @param dev
  *   Pointer to Ethernet device.
- * @param[out] stats
+ * @param bond_master
+ *   Indicate if the device is a bond master.
+ * @param stats
  *   Counters table output buffer.
  *
  * @return
@@ -1327,7 +1343,7 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
  *   rte_errno is set.
  */
 int
-mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
+mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *stats)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
@@ -1335,7 +1351,7 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
 
 	memset(stats, 0, sizeof(*stats) * xstats_ctrl->mlx5_stats_n);
 	/* Read ifreq counters. */
-	if (priv->master && priv->pf_bond >= 0) {
+	if (bond_master) {
 		/* Sum xstats from bonding device member ports. */
 		for (i = 0; i < priv->sh->bond.n_port; i++) {
 			ret = _mlx5_os_read_dev_counters(dev, i, stats);
@@ -1347,13 +1363,17 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
 		if (ret)
 			return ret;
 	}
-	/* Read IB counters. */
-	for (i = 0; i != xstats_ctrl->mlx5_stats_n; ++i) {
+	/*
+	 * Read IB counters.
+	 * The counters are unique per IB device but not per net IF.
+	 * In bonding mode, getting the stats name only from 1 port is enough.
+	 */
+	for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
 		if (!xstats_ctrl->info[i].dev)
 			continue;
 		/* return last xstats counter if fail to read. */
 		if (mlx5_os_read_dev_stat(priv, xstats_ctrl->info[i].ctr_name,
-			    &stats[i]) == 0)
+					  &stats[i]) == 0)
 			xstats_ctrl->xstats[i] = stats[i];
 		else
 			stats[i] = xstats_ctrl->xstats[i];
@@ -1361,18 +1381,24 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
 	return ret;
 }
 
-/**
+/*
  * Query the number of statistics provided by ETHTOOL.
  *
  * @param dev
  *   Pointer to Ethernet device.
+ * @param bond_master
+ *   Indicate if the device is a bond master.
+ * @param n_stats
+ *   Pointer to number of stats to store.
+ * @param n_stats_sec
+ *   Pointer to number of stats to store for the 2nd port of the bond.
  *
  * @return
- *   Number of statistics on success, negative errno value otherwise and
- *   rte_errno is set.
+ *   0 on success, negative errno value otherwise and rte_errno is set.
  */
 int
-mlx5_os_get_stats_n(struct rte_eth_dev *dev)
+mlx5_os_get_stats_n(struct rte_eth_dev *dev, bool bond_master,
+		    uint16_t *n_stats, uint16_t *n_stats_sec)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct ethtool_drvinfo drvinfo;
@@ -1381,18 +1407,34 @@ mlx5_os_get_stats_n(struct rte_eth_dev *dev)
 
 	drvinfo.cmd = ETHTOOL_GDRVINFO;
 	ifr.ifr_data = (caddr_t)&drvinfo;
-	if (priv->master && priv->pf_bond >= 0)
-		/* Bonding PF. */
+	/* Bonding PFs. */
+	if (bond_master) {
 		ret = mlx5_ifreq_by_ifname(priv->sh->bond.ports[0].ifname,
 					   SIOCETHTOOL, &ifr);
-	else
+		if (ret) {
+			DRV_LOG(WARNING, "bonding port %u unable to query number of"
+				" statistics for the 1st slave, %d", PORT_ID(priv), ret);
+			return ret;
+		}
+		*n_stats = drvinfo.n_stats;
+		ret = mlx5_ifreq_by_ifname(priv->sh->bond.ports[1].ifname,
+					   SIOCETHTOOL, &ifr);
+		if (ret) {
+			DRV_LOG(WARNING, "bonding port %u unable to query number of"
+				" statistics for the 2nd slave, %d", PORT_ID(priv), ret);
+			return ret;
+		}
+		*n_stats_sec = drvinfo.n_stats;
+	} else {
 		ret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr);
-	if (ret) {
-		DRV_LOG(WARNING, "port %u unable to query number of statistics",
-			dev->data->port_id);
-		return ret;
+		if (ret) {
+			DRV_LOG(WARNING, "port %u unable to query number of statistics",
+				PORT_ID(priv));
+			return ret;
+		}
+		*n_stats = drvinfo.n_stats;
 	}
-	return drvinfo.n_stats;
+	return 0;
 }
 
 static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
@@ -1578,6 +1620,101 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
 
 static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
 
+static int
+mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
+			  struct ethtool_gstrings *strings,
+			  uint32_t stats_n, uint32_t stats_n_2nd)
+{
+	struct mlx5_priv *priv = dev->data->dev_private;
+	struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
+	struct ifreq ifr;
+	int ret;
+	uint32_t i, j, idx;
+
+	/* Ensure no out of bounds access before. */
+	MLX5_ASSERT(xstats_n <= MLX5_MAX_XSTATS);
+	strings->cmd = ETHTOOL_GSTRINGS;
+	strings->string_set = ETH_SS_STATS;
+	strings->len = stats_n;
+	ifr.ifr_data = (caddr_t)strings;
+	if (bond_master)
+		ret = mlx5_ifreq_by_ifname(priv->sh->bond.ports[0].ifname,
+					   SIOCETHTOOL, &ifr);
+	else
+		ret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr);
+	if (ret) {
+		DRV_LOG(WARNING, "port %u unable to get statistic names with %d",
+			PORT_ID(priv), ret);
+		return ret;
+	}
+	/* Reorganize the orders to reduce the iterations. */
+	for (j = 0; j < xstats_n; j++) {
+		xstats_ctrl->dev_table_idx[j] = UINT16_MAX;
+		for (i = 0; i < stats_n; i++) {
+			const char *curr_string =
+				(const char *)&strings->data[i * ETH_GSTRING_LEN];
+
+			if (!strcmp(mlx5_counters_init[j].ctr_name, curr_string)) {
+				idx = xstats_ctrl->mlx5_stats_n++;
+				xstats_ctrl->dev_table_idx[j] = i;
+				xstats_ctrl->xstats_o_idx[j] = idx;
+				xstats_ctrl->info[idx] = mlx5_counters_init[j];
+			}
+		}
+	}
+	if (!bond_master) {
+		/* Add dev counters, unique per IB device. */
+		for (j = 0; j != xstats_n; j++) {
+			if (mlx5_counters_init[j].dev) {
+				idx = xstats_ctrl->mlx5_stats_n++;
+				xstats_ctrl->info[idx] = mlx5_counters_init[j];
+				xstats_ctrl->hw_stats[idx] = 0;
+			}
+		}
+		return 0;
+	}
+
+	strings->len = stats_n_2nd;
+	ret = mlx5_ifreq_by_ifname(priv->sh->bond.ports[1].ifname,
+				   SIOCETHTOOL, &ifr);
+	if (ret) {
+		DRV_LOG(WARNING, "port %u unable to get statistic names for 2nd slave with %d",
+			PORT_ID(priv), ret);
+		return ret;
+	}
+	/* The 2nd slave port may have a different strings set, based on the configuration. */
+	for (j = 0; j != xstats_n; j++) {
+		xstats_ctrl->dev_table_idx_2nd[j] = UINT16_MAX;
+		for (i = 0; i != stats_n_2nd; i++) {
+			const char *curr_string =
+				(const char *)&strings->data[i * ETH_GSTRING_LEN];
+
+			if (!strcmp(mlx5_counters_init[j].ctr_name, curr_string)) {
+				xstats_ctrl->dev_table_idx_2nd[j] = i;
+				if (xstats_ctrl->dev_table_idx[j] != UINT16_MAX) {
+					/* Already mapped in the 1st slave port. */
+					idx = xstats_ctrl->xstats_o_idx[j];
+					xstats_ctrl->xstats_o_idx_2nd[j] = idx;
+				} else {
+					/* Append the new items to the end of the map. */
+					idx = xstats_ctrl->mlx5_stats_n++;
+					xstats_ctrl->xstats_o_idx_2nd[j] = idx;
+					xstats_ctrl->info[idx] = mlx5_counters_init[j];
+				}
+			}
+		}
+	}
+	/* Dev counters are always at the last now. */
+	for (j = 0; j != xstats_n; j++) {
+		if (mlx5_counters_init[j].dev) {
+			idx = xstats_ctrl->mlx5_stats_n++;
+			xstats_ctrl->info[idx] = mlx5_counters_init[j];
+			xstats_ctrl->hw_stats[idx] = 0;
+		}
+	}
+	return 0;
+}
+
 /**
  * Init the structures to read device counters.
  *
@@ -1590,76 +1727,44 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
 	struct mlx5_stats_ctrl *stats_ctrl = &priv->stats_ctrl;
-	unsigned int i;
-	unsigned int j;
-	struct ifreq ifr;
 	struct ethtool_gstrings *strings = NULL;
-	unsigned int dev_stats_n;
+	uint16_t dev_stats_n = 0;
+	uint16_t dev_stats_n_2nd = 0;
+	unsigned int max_stats_n;
 	unsigned int str_sz;
 	int ret;
+	bool bond_master = (priv->master && priv->pf_bond >= 0);
 
 	/* So that it won't aggregate for each init. */
 	xstats_ctrl->mlx5_stats_n = 0;
-	ret = mlx5_os_get_stats_n(dev);
+	ret = mlx5_os_get_stats_n(dev, bond_master, &dev_stats_n, &dev_stats_n_2nd);
 	if (ret < 0) {
 		DRV_LOG(WARNING, "port %u no extended statistics available",
 			dev->data->port_id);
 		return;
 	}
-	dev_stats_n = ret;
+	max_stats_n = RTE_MAX(dev_stats_n, dev_stats_n_2nd);
 	/* Allocate memory to grab stat names and values. */
-	str_sz = dev_stats_n * ETH_GSTRING_LEN;
+	str_sz = max_stats_n * ETH_GSTRING_LEN;
 	strings = (struct ethtool_gstrings *)
 		  mlx5_malloc(0, str_sz + sizeof(struct ethtool_gstrings), 0,
 			      SOCKET_ID_ANY);
 	if (!strings) {
 		DRV_LOG(WARNING, "port %u unable to allocate memory for xstats",
-		     dev->data->port_id);
+			dev->data->port_id);
 		return;
 	}
-	strings->cmd = ETHTOOL_GSTRINGS;
-	strings->string_set = ETH_SS_STATS;
-	strings->len = dev_stats_n;
-	ifr.ifr_data = (caddr_t)strings;
-	if (priv->master && priv->pf_bond >= 0)
-		/* Bonding master. */
-		ret = mlx5_ifreq_by_ifname(priv->sh->bond.ports[0].ifname,
-					   SIOCETHTOOL, &ifr);
-	else
-		ret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr);
-	if (ret) {
-		DRV_LOG(WARNING, "port %u unable to get statistic names",
+	ret = mlx5_os_get_stats_strings(dev, bond_master, strings,
+					dev_stats_n, dev_stats_n_2nd);
+	if (ret < 0) {
+		DRV_LOG(WARNING, "port %u failed to get the stats strings",
 			dev->data->port_id);
 		goto free;
 	}
-	for (i = 0; i != dev_stats_n; ++i) {
-		const char *curr_string = (const char *)
-			&strings->data[i * ETH_GSTRING_LEN];
-
-		for (j = 0; j != xstats_n; ++j) {
-			if (!strcmp(mlx5_counters_init[j].ctr_name,
-				    curr_string)) {
-				unsigned int idx = xstats_ctrl->mlx5_stats_n++;
-
-				xstats_ctrl->dev_table_idx[idx] = i;
-				xstats_ctrl->info[idx] = mlx5_counters_init[j];
-				break;
-			}
-		}
-	}
-	/* Add dev counters. */
-	MLX5_ASSERT(xstats_ctrl->mlx5_stats_n <= MLX5_MAX_XSTATS);
-	for (i = 0; i != xstats_n; ++i) {
-		if (mlx5_counters_init[i].dev) {
-			unsigned int idx = xstats_ctrl->mlx5_stats_n++;
-
-			xstats_ctrl->info[idx] = mlx5_counters_init[i];
-			xstats_ctrl->hw_stats[idx] = 0;
-		}
-	}
 	xstats_ctrl->stats_n = dev_stats_n;
+	xstats_ctrl->stats_n_2nd = dev_stats_n_2nd;
 	/* Copy to base at first time. */
-	ret = mlx5_os_read_dev_counters(dev, xstats_ctrl->base);
+	ret = mlx5_os_read_dev_counters(dev, bond_master, xstats_ctrl->base);
 	if (ret)
 		DRV_LOG(ERR, "port %u cannot read device counters: %s",
 			dev->data->port_id, strerror(rte_errno));
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 96a269ccd0..9832b6df52 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -234,14 +234,22 @@ struct mlx5_counter_ctrl {
 struct mlx5_xstats_ctrl {
 	/* Number of device stats. */
 	uint16_t stats_n;
+	/* Number of device stats, for the 2nd port in bond. */
+	uint16_t stats_n_2nd;
 	/* Number of device stats identified by PMD. */
-	uint16_t  mlx5_stats_n;
+	uint16_t mlx5_stats_n;
 	/* Index in the device counters table. */
 	uint16_t dev_table_idx[MLX5_MAX_XSTATS];
+	/* Index in the output table. */
+	uint16_t xstats_o_idx[MLX5_MAX_XSTATS];
 	uint64_t base[MLX5_MAX_XSTATS];
 	uint64_t xstats[MLX5_MAX_XSTATS];
 	uint64_t hw_stats[MLX5_MAX_XSTATS];
 	struct mlx5_counter_ctrl info[MLX5_MAX_XSTATS];
+	/* Index in the device counters table, for the 2nd port in bond. */
+	uint16_t dev_table_idx_2nd[MLX5_MAX_XSTATS];
+	/* Index in the output table, for the 2nd port in bond. */
+	uint16_t xstats_o_idx_2nd[MLX5_MAX_XSTATS];
 };
 
 struct mlx5_stats_ctrl {
@@ -1974,8 +1982,9 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,
 			   struct rte_dev_eeprom_info *info);
 int mlx5_os_read_dev_stat(struct mlx5_priv *priv,
 			  const char *ctr_name, uint64_t *stat);
-int mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats);
-int mlx5_os_get_stats_n(struct rte_eth_dev *dev);
+int mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *stats);
+int mlx5_os_get_stats_n(struct rte_eth_dev *dev, bool bond_master,
+			uint16_t *n_stats, uint16_t *n_stats_sec);
 void mlx5_os_stats_init(struct rte_eth_dev *dev);
 int mlx5_get_flag_dropless_rq(struct rte_eth_dev *dev);
 
diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 615e1d073d..f4ac58e2f9 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -39,24 +39,36 @@ mlx5_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
 		unsigned int n)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
-	unsigned int i;
-	uint64_t counters[n];
+	uint64_t counters[MLX5_MAX_XSTATS];
 	struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
+	unsigned int i;
+	uint16_t stats_n = 0;
+	uint16_t stats_n_2nd = 0;
 	uint16_t mlx5_stats_n = xstats_ctrl->mlx5_stats_n;
+	bool bond_master = (priv->master && priv->pf_bond >= 0);
 
 	if (n >= mlx5_stats_n && stats) {
-		int stats_n;
 		int ret;
 
-		stats_n = mlx5_os_get_stats_n(dev);
-		if (stats_n < 0)
-			return stats_n;
-		if (xstats_ctrl->stats_n != stats_n)
+		ret = mlx5_os_get_stats_n(dev, bond_master, &stats_n, &stats_n_2nd);
+		if (ret < 0)
+			return ret;
+		/*
+		 * The number of statistics fetched via "ETH_SS_STATS" may vary because
+		 * of the port configuration each time. This is also true between 2
+		 * ports. There might be a case that the numbers are the same even if
+		 * configurations are different.
+		 * It is not recommended to change the configuration without using
+		 * RTE API. The port(traffic) restart may trigger another initialization
+		 * to make sure the map are correct.
+		 */
+		if (xstats_ctrl->stats_n != stats_n ||
+		    (bond_master && xstats_ctrl->stats_n_2nd != stats_n_2nd))
 			mlx5_os_stats_init(dev);
-		ret = mlx5_os_read_dev_counters(dev, counters);
-		if (ret)
+		ret = mlx5_os_read_dev_counters(dev, bond_master, counters);
+		if (ret < 0)
 			return ret;
-		for (i = 0; i != mlx5_stats_n; ++i) {
+		for (i = 0; i != mlx5_stats_n; i++) {
 			stats[i].id = i;
 			if (xstats_ctrl->info[i].dev) {
 				uint64_t wrap_n;
@@ -225,30 +237,32 @@ mlx5_xstats_reset(struct rte_eth_dev *dev)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
-	int stats_n;
 	unsigned int i;
 	uint64_t *counters;
 	int ret;
+	uint16_t stats_n = 0;
+	uint16_t stats_n_2nd = 0;
+	bool bond_master = (priv->master && priv->pf_bond >= 0);
 
-	stats_n = mlx5_os_get_stats_n(dev);
-	if (stats_n < 0) {
+	ret = mlx5_os_get_stats_n(dev, bond_master, &stats_n, &stats_n_2nd);
+	if (ret < 0) {
 		DRV_LOG(ERR, "port %u cannot get stats: %s", dev->data->port_id,
-			strerror(-stats_n));
-		return stats_n;
+			strerror(-ret));
+		return ret;
 	}
-	if (xstats_ctrl->stats_n != stats_n)
+	if (xstats_ctrl->stats_n != stats_n ||
+	    (bond_master && xstats_ctrl->stats_n_2nd != stats_n_2nd))
 		mlx5_os_stats_init(dev);
-	counters =  mlx5_malloc(MLX5_MEM_SYS, sizeof(*counters) *
-			xstats_ctrl->mlx5_stats_n, 0,
-			SOCKET_ID_ANY);
+	/* Considering to use stack directly. */
+	counters = mlx5_malloc(MLX5_MEM_SYS, sizeof(*counters) * xstats_ctrl->mlx5_stats_n,
+			       0, SOCKET_ID_ANY);
 	if (!counters) {
-		DRV_LOG(WARNING, "port %u unable to allocate memory for xstats "
-				"counters",
+		DRV_LOG(WARNING, "port %u unable to allocate memory for xstats counters",
 		     dev->data->port_id);
 		rte_errno = ENOMEM;
 		return -rte_errno;
 	}
-	ret = mlx5_os_read_dev_counters(dev, counters);
+	ret = mlx5_os_read_dev_counters(dev, bond_master, counters);
 	if (ret) {
 		DRV_LOG(ERR, "port %u cannot read device counters: %s",
 			dev->data->port_id, strerror(rte_errno));
diff --git a/drivers/net/mlx5/windows/mlx5_ethdev_os.c b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
index a31e1b5494..49f750be68 100644
--- a/drivers/net/mlx5/windows/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
@@ -178,20 +178,29 @@ mlx5_dev_set_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	return -ENOTSUP;
 }
 
-/**
+/*
  * Query the number of statistics provided by ETHTOOL.
  *
  * @param dev
  *   Pointer to Ethernet device.
+ * @param bond_master
+ *   Indicate if the device is a bond master.
+ * @param n_stats
+ *   Pointer to number of stats to store.
+ * @param n_stats_sec
+ *   Pointer to number of stats to store for the 2nd port of the bond.
  *
  * @return
- *   Number of statistics on success, negative errno value otherwise and
- *   rte_errno is set.
+ *   0 on success, negative errno value otherwise and rte_errno is set.
  */
 int
-mlx5_os_get_stats_n(struct rte_eth_dev *dev)
+mlx5_os_get_stats_n(struct rte_eth_dev *dev, bool bond_master,
+		    uint16_t *n_stats, uint16_t *n_stats_sec)
 {
 	RTE_SET_USED(dev);
+	RTE_SET_USED(bond_master);
+	RTE_SET_USED(n_stats);
+	RTE_SET_USED(n_stats_sec);
 	return -ENOTSUP;
 }
 
@@ -221,6 +230,8 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
  *
  * @param dev
  *   Pointer to Ethernet device.
+ * @param bond_master
+ *   Indicate if the device is a bond master.
  * @param[out] stats
  *   Counters table output buffer.
  *
@@ -229,9 +240,10 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
  *   rte_errno is set.
  */
 int
-mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
+mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *stats)
 {
 	RTE_SET_USED(dev);
+	RTE_SET_USED(bond_master);
 	RTE_SET_USED(stats);
 	return -ENOTSUP;
 }
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:22.961587116 +0000
+++ 0049-net-mlx5-fix-counters-map-in-bonding-mode.patch	2024-03-14 00:09:20.697616888 +0000
@@ -1 +1 @@
-From a687c3e658c2d889052089af8340bc0b9299c856 Mon Sep 17 00:00:00 2001
+From cc21b4a2d2d343307af178b1fd31eed1df0b1979 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a687c3e658c2d889052089af8340bc0b9299c856 ]
+
@@ -50 +51,0 @@
-Cc: stable@dpdk.org
@@ -62 +63 @@
-index 92c47a3b3d..eb47c284ec 100644
+index dd5a0c546d..0ee8c58ba7 100644
@@ -237 +238 @@
-@@ -1615,6 +1657,101 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
+@@ -1578,6 +1620,101 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
@@ -339 +340 @@
-@@ -1627,76 +1764,44 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
+@@ -1590,76 +1727,44 @@ mlx5_os_stats_init(struct rte_eth_dev *dev)
@@ -431 +432 @@
-index f11a0181b8..fb3df76cac 100644
+index 96a269ccd0..9832b6df52 100644
@@ -434 +435 @@
-@@ -263,14 +263,22 @@ struct mlx5_counter_ctrl {
+@@ -234,14 +234,22 @@ struct mlx5_counter_ctrl {
@@ -458 +459 @@
-@@ -2182,8 +2190,9 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -1974,8 +1982,9 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,

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

* patch 'net/mlx5: remove device status check in flow creation' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (47 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/mlx5: fix counters map in bonding mode' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'test: fix probing in secondary process' " luca.boccassi
                       ` (10 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Bing Zhao; +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/fccac369b501cd5dff9c89326f5c307155030717

Thanks.

Luca Boccassi

---
From fccac369b501cd5dff9c89326f5c307155030717 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Thu, 29 Feb 2024 12:51:56 +0100
Subject: [PATCH] net/mlx5: remove device status check in flow creation

[ upstream commit 4095ce34095e33ae9e8b19150b9280ff8737a590 ]

The flow rule can be inserted even before the device started. The
only exception is for a queue or RSS action.

For the other interfaces of template API, the start status is not
checked. The checking would cause some cache miss or eviction since
the flag locates on some other cache line.

Fixes: f1fecffa88df ("net/mlx5: support Direct Rules action template API")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index fe50d23987..20fa4eee0c 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -2514,10 +2514,6 @@ flow_hw_async_flow_create(struct rte_eth_dev *dev,
 	uint32_t flow_idx;
 	int ret;
 
-	if (unlikely((!dev->data->dev_started))) {
-		rte_errno = EINVAL;
-		goto error;
-	}
 	if (unlikely(!priv->hw_q[queue].job_idx)) {
 		rte_errno = ENOMEM;
 		goto error;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:23.009107573 +0000
+++ 0050-net-mlx5-remove-device-status-check-in-flow-creation.patch	2024-03-14 00:09:20.705617048 +0000
@@ -1 +1 @@
-From 4095ce34095e33ae9e8b19150b9280ff8737a590 Mon Sep 17 00:00:00 2001
+From fccac369b501cd5dff9c89326f5c307155030717 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4095ce34095e33ae9e8b19150b9280ff8737a590 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -19,2 +20,2 @@
- drivers/net/mlx5/mlx5_flow_hw.c | 5 -----
- 1 file changed, 5 deletions(-)
+ drivers/net/mlx5/mlx5_flow_hw.c | 4 ----
+ 1 file changed, 4 deletions(-)
@@ -23 +24 @@
-index 6f43e88864..8ca866059d 100644
+index fe50d23987..20fa4eee0c 100644
@@ -26,2 +27,2 @@
-@@ -3526,11 +3526,6 @@ flow_hw_async_flow_create(struct rte_eth_dev *dev,
- 	uint32_t res_idx = 0;
+@@ -2514,10 +2514,6 @@ flow_hw_async_flow_create(struct rte_eth_dev *dev,
+ 	uint32_t flow_idx;
@@ -31,3 +32,2 @@
--		rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
--				   "Port must be started before enqueueing flow operations");
--		return NULL;
+-		rte_errno = EINVAL;
+-		goto error;
@@ -35,2 +35,2 @@
- 	flow = mlx5_ipool_malloc(table->flow, &flow_idx);
- 	if (!flow)
+ 	if (unlikely(!priv->hw_q[queue].job_idx)) {
+ 		rte_errno = ENOMEM;

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

* patch 'test: fix probing in secondary process' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (48 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/mlx5: remove device status check in flow creation' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'bus/vdev: fix devargs " luca.boccassi
                       ` (9 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Mingjin Ye; +Cc: Zhimin Huang, 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/60ca8f9c7660816a62709f951558ee6de806c9c5

Thanks.

Luca Boccassi

---
From 60ca8f9c7660816a62709f951558ee6de806c9c5 Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Tue, 14 Nov 2023 10:28:15 +0000
Subject: [PATCH] test: fix probing in secondary process

[ upstream commit b3ce7891ad386310abab56352053a46ba06ca72f ]

In EAL related test cases, the allow parameters are not passed to
the secondary process, resulting in unexpected NICs being loaded.

This patch fixes this issue by appending the allow parameters to
the secondary process.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/process.h | 46 ++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 42 insertions(+), 4 deletions(-)

diff --git a/app/test/process.h b/app/test/process.h
index abf6855aaa..e8e7e5ab60 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -17,6 +17,7 @@
 #include <dirent.h>
 
 #include <rte_string_fns.h> /* strlcpy */
+#include <rte_devargs.h>
 
 #ifdef RTE_EXEC_ENV_FREEBSD
 #define self "curproc"
@@ -34,6 +35,34 @@ extern uint16_t flag_for_send_pkts;
 #endif
 #endif
 
+#define PREFIX_ALLOW "--allow="
+
+static int
+add_parameter_allow(char **argv, int max_capacity)
+{
+	struct rte_devargs *devargs;
+	int count = 0;
+
+	RTE_EAL_DEVARGS_FOREACH(NULL, devargs) {
+		if (strlen(devargs->name) == 0)
+			continue;
+
+		if (devargs->data == NULL || strlen(devargs->data) == 0) {
+			if (asprintf(&argv[count], PREFIX_ALLOW"%s", devargs->name) < 0)
+				break;
+		} else {
+			if (asprintf(&argv[count], PREFIX_ALLOW"%s,%s",
+					 devargs->name, devargs->data) < 0)
+				break;
+		}
+
+		if (++count == max_capacity)
+			break;
+	}
+
+	return count;
+}
+
 /*
  * launches a second copy of the test process using the given argv parameters,
  * which should include argv[0] as the process name. To identify in the
@@ -43,8 +72,10 @@ extern uint16_t flag_for_send_pkts;
 static inline int
 process_dup(const char *const argv[], int numargs, const char *env_value)
 {
-	int num;
-	char *argv_cpy[numargs + 1];
+	int num = 0;
+	char **argv_cpy;
+	int allow_num;
+	int argv_num;
 	int i, status;
 	char path[32];
 #ifdef RTE_LIB_PDUMP
@@ -58,14 +89,21 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
 	if (pid < 0)
 		return -1;
 	else if (pid == 0) {
+		allow_num = rte_devargs_type_count(RTE_DEVTYPE_ALLOWED);
+		argv_num = numargs + allow_num + 1;
+		argv_cpy = calloc(argv_num, sizeof(char *));
+		if (!argv_cpy)
+			rte_panic("Memory allocation failed\n");
+
 		/* make a copy of the arguments to be passed to exec */
 		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;
+		if (allow_num > 0)
+			num = add_parameter_allow(&argv_cpy[i], allow_num);
+		num += numargs;
 
 #ifdef RTE_EXEC_ENV_LINUX
 		{
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:23.054972330 +0000
+++ 0051-test-fix-probing-in-secondary-process.patch	2024-03-14 00:09:20.705617048 +0000
@@ -1 +1 @@
-From b3ce7891ad386310abab56352053a46ba06ca72f Mon Sep 17 00:00:00 2001
+From 60ca8f9c7660816a62709f951558ee6de806c9c5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3ce7891ad386310abab56352053a46ba06ca72f ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index c576c42349..9fb2bf481c 100644
+index abf6855aaa..e8e7e5ab60 100644

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

* patch 'bus/vdev: fix devargs in secondary process' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (49 preceding siblings ...)
  2024-03-14  0:09     ` patch 'test: fix probing in secondary process' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'config: fix CPU instruction set for cross-build' " luca.boccassi
                       ` (8 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Mingjin Ye; +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/ba823066bfc217927d1b4457565344e7e4dea20c

Thanks.

Luca Boccassi

---
From ba823066bfc217927d1b4457565344e7e4dea20c Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Fri, 1 Sep 2023 07:24:09 +0000
Subject: [PATCH] bus/vdev: fix devargs in secondary process

[ upstream commit 6666628362c94a0b567a39a0177539c12c97d999 ]

When a device is created by a secondary process, an empty devargs is
temporarily generated and bound to it. This causes the device to not
be associated with the correct devargs, and the empty devargs are not
released when the resource is freed.

This patch fixes the issue by matching the devargs when inserting a
device in secondary process.

Fixes: dda987315ca2 ("vdev: make virtual bus use its device struct")
Fixes: a16040453968 ("eal: extract vdev infra")

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/bus/vdev/vdev.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 05582f1727..14cf856237 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -263,6 +263,22 @@ alloc_devargs(const char *name, const char *args)
 	return devargs;
 }
 
+static struct rte_devargs *
+vdev_devargs_lookup(const char *name)
+{
+	struct rte_devargs *devargs;
+	char dev_name[32];
+
+	RTE_EAL_DEVARGS_FOREACH("vdev", devargs) {
+		devargs->bus->parse(devargs->name, &dev_name);
+		if (strcmp(dev_name, name) == 0) {
+			VDEV_LOG(INFO, "devargs matched %s", dev_name);
+			return devargs;
+		}
+	}
+	return NULL;
+}
+
 static int
 insert_vdev(const char *name, const char *args,
 		struct rte_vdev_device **p_dev,
@@ -275,7 +291,11 @@ insert_vdev(const char *name, const char *args,
 	if (name == NULL)
 		return -EINVAL;
 
-	devargs = alloc_devargs(name, args);
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+		devargs = alloc_devargs(name, args);
+	else
+		devargs = vdev_devargs_lookup(name);
+
 	if (!devargs)
 		return -ENOMEM;
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:23.090921392 +0000
+++ 0052-bus-vdev-fix-devargs-in-secondary-process.patch	2024-03-14 00:09:20.705617048 +0000
@@ -1 +1 @@
-From 6666628362c94a0b567a39a0177539c12c97d999 Mon Sep 17 00:00:00 2001
+From ba823066bfc217927d1b4457565344e7e4dea20c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6666628362c94a0b567a39a0177539c12c97d999 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org

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

* patch 'config: fix CPU instruction set for cross-build' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (50 preceding siblings ...)
  2024-03-14  0:09     ` patch 'bus/vdev: fix devargs " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'test/mbuf: fix external mbuf case with assert enabled' " luca.boccassi
                       ` (7 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Joyce Kong; +Cc: Ruifeng Wang, Stephen Hemminger, 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/0426b179f3f425dd5cc43bbe10f3524cd6db17a8

Thanks.

Luca Boccassi

---
From 0426b179f3f425dd5cc43bbe10f3524cd6db17a8 Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Tue, 5 Dec 2023 03:52:58 +0000
Subject: [PATCH] config: fix CPU instruction set for cross-build

[ upstream commit d74543f8ad30db164c08ec69910b05d6811b1b89 ]

The platform value would be 'native' only when not cross build.
Move the operation about modifying cpu_instruction_set while
platform equals 'native' to the not cross build branch.

Fixes: bf66003b51ec ("build: use platform for generic and native builds")

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 config/meson.build | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 25e41b57d6..c755083db0 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -91,13 +91,14 @@ else
             cpu_instruction_set = 'generic'
         endif
     endif
+    if platform == 'native'
+        if cpu_instruction_set == 'auto'
+            cpu_instruction_set = 'native'
+        endif
+    endif
 endif
 
-if platform == 'native'
-    if cpu_instruction_set == 'auto'
-        cpu_instruction_set = 'native'
-    endif
-elif platform == 'generic'
+if platform == 'generic'
     if cpu_instruction_set == 'auto'
         cpu_instruction_set = 'generic'
     endif
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:23.128009776 +0000
+++ 0053-config-fix-CPU-instruction-set-for-cross-build.patch	2024-03-14 00:09:20.705617048 +0000
@@ -1 +1 @@
-From d74543f8ad30db164c08ec69910b05d6811b1b89 Mon Sep 17 00:00:00 2001
+From 0426b179f3f425dd5cc43bbe10f3524cd6db17a8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d74543f8ad30db164c08ec69910b05d6811b1b89 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 8cb6429313..bbb931a457 100644
+index 25e41b57d6..c755083db0 100644
@@ -25 +26 @@
-@@ -128,13 +128,14 @@ else
+@@ -91,13 +91,14 @@ else

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

* patch 'test/mbuf: fix external mbuf case with assert enabled' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (51 preceding siblings ...)
  2024-03-14  0:09     ` patch 'config: fix CPU instruction set for cross-build' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'test/bpf: fix mbuf init in some filter test' " luca.boccassi
                       ` (6 subsequent siblings)
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Rakesh Kudurumalla; +Cc: Olivier Matz, 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/af4304e8c4e97e339c989c52214e0bc047441438

Thanks.

Luca Boccassi

---
From af4304e8c4e97e339c989c52214e0bc047441438 Mon Sep 17 00:00:00 2001
From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Date: Thu, 23 Nov 2023 12:12:21 +0530
Subject: [PATCH] test/mbuf: fix external mbuf case with assert enabled

[ upstream commit 6dbaa4ee67135ac6ff8ef35fa98a93e0f08af494 ]

when RTE_ENABLE_ASSERT is defined test_mbuf application is
failing because we are trying to attach extbuf to a cloned
buffer to which external mbuf is already attached.
To make test_mbuf pass CI we have updated ol_flags.
This patch fixes the same.

Fixes: 7b295dceea07 ("test/mbuf: add unit test cases")

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 app/test/test_mbuf.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 7a2f8a9980..7444be9399 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2345,16 +2345,13 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("%s: External buffer is not attached to mbuf\n",
 				__func__);
 
-	/* allocate one more mbuf */
+	/* allocate one more mbuf, it is attached to the same external buffer */
 	clone = rte_pktmbuf_clone(m, pktmbuf_pool);
 	if (clone == NULL)
 		GOTO_FAIL("%s: mbuf clone allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(clone) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
 
-	/* attach the same external buffer to the cloned mbuf */
-	rte_pktmbuf_attach_extbuf(clone, ext_buf_addr, buf_iova, buf_len,
-			ret_shinfo);
 	if (clone->ol_flags != RTE_MBUF_F_EXTERNAL)
 		GOTO_FAIL("%s: External buffer is not attached to mbuf\n",
 				__func__);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:23.163274618 +0000
+++ 0054-test-mbuf-fix-external-mbuf-case-with-assert-enabled.patch	2024-03-14 00:09:20.709617127 +0000
@@ -1 +1 @@
-From 6dbaa4ee67135ac6ff8ef35fa98a93e0f08af494 Mon Sep 17 00:00:00 2001
+From af4304e8c4e97e339c989c52214e0bc047441438 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6dbaa4ee67135ac6ff8ef35fa98a93e0f08af494 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 51ea6ef1c4..17be977f31 100644
+index 7a2f8a9980..7444be9399 100644
@@ -25 +26 @@
-@@ -2346,16 +2346,13 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
+@@ -2345,16 +2345,13 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)

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

* patch 'test/bpf: fix mbuf init in some filter test' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (52 preceding siblings ...)
  2024-03-14  0:09     ` patch 'test/mbuf: fix external mbuf case with assert enabled' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/tap: log Netlink extended ack unavailability' " luca.boccassi
                       ` (5 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: 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/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/7019fde3a9538022d8e4216c6257a5c301ef1476

Thanks.

Luca Boccassi

---
From 7019fde3a9538022d8e4216c6257a5c301ef1476 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 1 Mar 2024 09:57:06 -0800
Subject: [PATCH] test/bpf: fix mbuf init in some filter test

[ upstream commit 7d0420ac528aff96404e1d327996c7b52d67c373 ]

The BPF filter test was not initializing offload flags.

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 app/test/test_bpf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c
index f5af5e8a3f..51184341c2 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -3341,6 +3341,7 @@ test_bpf_filter_sanity(pcap_t *pcap)
 		struct rte_ipv4_hdr ip_hdr;
 	} *hdr;
 
+	memset(&mb, 0, sizeof(mb));
 	dummy_mbuf_prep(&mb, tbuf, sizeof(tbuf), plen);
 	m = &mb;
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:23.200427601 +0000
+++ 0055-test-bpf-fix-mbuf-init-in-some-filter-test.patch	2024-03-14 00:09:20.709617127 +0000
@@ -1 +1 @@
-From 7d0420ac528aff96404e1d327996c7b52d67c373 Mon Sep 17 00:00:00 2001
+From 7019fde3a9538022d8e4216c6257a5c301ef1476 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7d0420ac528aff96404e1d327996c7b52d67c373 ]
+
@@ -18 +20 @@
-index f83e72a9ad..53e3a31123 100644
+index f5af5e8a3f..51184341c2 100644

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

* patch 'net/tap: log Netlink extended ack unavailability' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (53 preceding siblings ...)
  2024-03-14  0:09     ` patch 'test/bpf: fix mbuf init in some filter test' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'baseband/fpga_5gnr_fec: use a better random generator' " luca.boccassi
                       ` (4 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/49989423d04abd4caa1564786290a548877122f4

Thanks.

Luca Boccassi

---
From 49989423d04abd4caa1564786290a548877122f4 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 1 Mar 2024 09:57:07 -0800
Subject: [PATCH] net/tap: log Netlink extended ack unavailability

[ upstream commit 59c1eb37478b2ee30f5821bd4fc46b3de5929121 ]

If kernel doesn't support external ack, log that to aide
in any problem diagnosis.

Coverity issue: 362848
Fixes: 647909bcf34b ("net/tap: use netlink extended ack support")

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

diff --git a/drivers/net/tap/tap_netlink.c b/drivers/net/tap/tap_netlink.c
index 75af3404b0..d9c260127d 100644
--- a/drivers/net/tap/tap_netlink.c
+++ b/drivers/net/tap/tap_netlink.c
@@ -72,7 +72,8 @@ tap_nl_init(uint32_t nl_groups)
 
 #ifdef NETLINK_EXT_ACK
 	/* Ask for extended ACK response. on older kernel will ignore request. */
-	setsockopt(fd, SOL_NETLINK, NETLINK_EXT_ACK, &one, sizeof(one));
+	if (setsockopt(fd, SOL_NETLINK, NETLINK_EXT_ACK, &one, sizeof(one)) < 0)
+		TAP_LOG(NOTICE, "Unable to request netlink error information");
 #endif
 
 	if (bind(fd, (struct sockaddr *)&local, sizeof(local)) < 0) {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:23.237634269 +0000
+++ 0056-net-tap-log-Netlink-extended-ack-unavailability.patch	2024-03-14 00:09:20.709617127 +0000
@@ -1 +1 @@
-From 59c1eb37478b2ee30f5821bd4fc46b3de5929121 Mon Sep 17 00:00:00 2001
+From 49989423d04abd4caa1564786290a548877122f4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,2 @@
+
+[ upstream commit 59c1eb37478b2ee30f5821bd4fc46b3de5929121 ]

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

* patch 'baseband/fpga_5gnr_fec: use a better random generator' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (54 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/tap: log Netlink extended ack unavailability' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'net/ice: fix version for experimental symbols' " luca.boccassi
                       ` (3 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: Tyler Retzlaff, Nicolas Chautru, 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/bd47e113a2b12529ab0b8b46824980d9f90e1ad2

Thanks.

Luca Boccassi

---
From bd47e113a2b12529ab0b8b46824980d9f90e1ad2 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 1 Mar 2024 09:57:11 -0800
Subject: [PATCH] baseband/fpga_5gnr_fec: use a better random generator

[ upstream commit dd329b2cc53dd61156b0227b0b858f9b17215574 ]

The function rand is very weak and should not be used.
Use the DPDK rte_rand() which is seeded from entropy instead.

Coverity issue: 414987
Fixes: b3d326e438f1 ("baseband/fpga_5gnr_fec: add FPGA mutex")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index 0dfeba08e1..171aed4d86 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -16,6 +16,7 @@
 #ifdef RTE_BBDEV_OFFLOAD_COST
 #include <rte_cycles.h>
 #endif
+#include <rte_random.h>
 
 #include <rte_bbdev.h>
 #include <rte_bbdev_pmd.h>
@@ -1502,7 +1503,7 @@ fpga_mutex_acquisition(struct fpga_queue *q)
 {
 	uint32_t mutex_ctrl, mutex_read, cnt = 0;
 	/* Assign a unique id for the duration of the DDR access */
-	q->ddr_mutex_uuid = rand();
+	q->ddr_mutex_uuid = rte_rand();
 	/* Request and wait for acquisition of the mutex */
 	mutex_ctrl = (q->ddr_mutex_uuid << 16) + 1;
 	do {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:23.273972879 +0000
+++ 0057-baseband-fpga_5gnr_fec-use-a-better-random-generator.patch	2024-03-14 00:09:20.713617206 +0000
@@ -1 +1 @@
-From dd329b2cc53dd61156b0227b0b858f9b17215574 Mon Sep 17 00:00:00 2001
+From bd47e113a2b12529ab0b8b46824980d9f90e1ad2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dd329b2cc53dd61156b0227b0b858f9b17215574 ]
+
@@ -20 +22 @@
-index efc1d3a772..9b253cde28 100644
+index 0dfeba08e1..171aed4d86 100644
@@ -23,3 +25,2 @@
-@@ -14,6 +14,7 @@
- #include <bus_pci_driver.h>
- #include <rte_byteorder.h>
+@@ -16,6 +16,7 @@
+ #ifdef RTE_BBDEV_OFFLOAD_COST
@@ -26,0 +28 @@
+ #endif
@@ -31 +33 @@
-@@ -1990,7 +1991,7 @@ fpga_5gnr_mutex_acquisition(struct fpga_5gnr_queue *q)
+@@ -1502,7 +1503,7 @@ fpga_mutex_acquisition(struct fpga_queue *q)

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

* patch 'net/ice: fix version for experimental symbols' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (55 preceding siblings ...)
  2024-03-14  0:09     ` patch 'baseband/fpga_5gnr_fec: use a better random generator' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'test: do not count skipped tests as executed' " luca.boccassi
                       ` (2 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/a985d4953e96238162ca43f0719692736a666c24

Thanks.

Luca Boccassi

---
From a985d4953e96238162ca43f0719692736a666c24 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 5 Mar 2024 11:36:51 +0100
Subject: [PATCH] net/ice: fix version for experimental symbols

[ upstream commit b407873ce93ac6c57618e7a7d67355bf593b2d10 ]

Fixes: 0d8d7bd720ba ("net/ice: support DDP dump switch rule binary")
Fixes: ab4eaf9a8a31 ("net/ice: dump Tx scheduling tree")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ice/version.map | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ice/version.map b/drivers/net/ice/version.map
index d70c250e9a..72d77458ba 100644
--- a/drivers/net/ice/version.map
+++ b/drivers/net/ice/version.map
@@ -7,5 +7,7 @@ EXPERIMENTAL {
 
 	# added in 19.11
 	rte_pmd_ice_dump_package;
+
+	# added in 22.11
 	rte_pmd_ice_dump_switch;
 };
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:23.311510476 +0000
+++ 0058-net-ice-fix-version-for-experimental-symbols.patch	2024-03-14 00:09:20.713617206 +0000
@@ -1 +1 @@
-From b407873ce93ac6c57618e7a7d67355bf593b2d10 Mon Sep 17 00:00:00 2001
+From a985d4953e96238162ca43f0719692736a666c24 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b407873ce93ac6c57618e7a7d67355bf593b2d10 ]
+
@@ -12,2 +14,2 @@
- drivers/net/ice/version.map | 4 ++++
- 1 file changed, 4 insertions(+)
+ drivers/net/ice/version.map | 2 ++
+ 1 file changed, 2 insertions(+)
@@ -16 +18 @@
-index 24b425d6f7..8449e98aba 100644
+index d70c250e9a..72d77458ba 100644
@@ -19 +21 @@
-@@ -7,6 +7,10 @@ EXPERIMENTAL {
+@@ -7,5 +7,7 @@ EXPERIMENTAL {
@@ -26,3 +27,0 @@
-+
-+	# added in 24.03
- 	rte_pmd_ice_dump_txsched;

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

* patch 'test: do not count skipped tests as executed' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (56 preceding siblings ...)
  2024-03-14  0:09     ` patch 'net/ice: fix version for experimental symbols' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'examples/packet_ordering: fix Rx with reorder mode disabled' " luca.boccassi
  2024-03-14  0:09     ` patch 'examples/l3fwd: fix Rx over not ready port' " luca.boccassi
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Akhil Goyal, Ciara Power, 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/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/bf8ce81fc0a0b05e8204b86f443e6d9c4af3a044

Thanks.

Luca Boccassi

---
From bf8ce81fc0a0b05e8204b86f443e6d9c4af3a044 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 13 Nov 2023 15:05:33 +0000
Subject: [PATCH] test: do not count skipped tests as executed

[ upstream commit a620df6df6d61660661afade09760b2dfba4eb42 ]

The logic around skipped tests is a little confusing in the unit test
runner.
* Any explicitly disabled tests are counted as skipped but not
  executed.
* Any tests that return TEST_SKIPPED are counted as both skipped and
  executed, using the same statistics counters.

This makes the stats very strange and hard to correlate, since the
totals don't add up.  One would expect that SKIPPED + EXECUTED +
UNSUPPORTED == TOTAL, and that PASSED + FAILED == EXECUTED.

To achieve this, mark any tests returning TEST_SKIPPED, or ENOTSUP as
not having executed.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 app/test/test.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/test/test.c b/app/test/test.c
index fb073ff795..5cf9f51c28 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -343,11 +343,13 @@ unit_test_suite_runner(struct unit_test_suite *suite)
 
 			if (test_success == TEST_SUCCESS)
 				suite->succeeded++;
-			else if (test_success == TEST_SKIPPED)
+			else if (test_success == TEST_SKIPPED) {
 				suite->skipped++;
-			else if (test_success == -ENOTSUP)
+				suite->executed--;
+			} else if (test_success == -ENOTSUP) {
 				suite->unsupported++;
-			else
+				suite->executed--;
+			} else
 				suite->failed++;
 		} else if (test_success == -ENOTSUP) {
 			suite->unsupported++;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:23.347365439 +0000
+++ 0059-test-do-not-count-skipped-tests-as-executed.patch	2024-03-14 00:09:20.713617206 +0000
@@ -1 +1 @@
-From a620df6df6d61660661afade09760b2dfba4eb42 Mon Sep 17 00:00:00 2001
+From bf8ce81fc0a0b05e8204b86f443e6d9c4af3a044 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a620df6df6d61660661afade09760b2dfba4eb42 ]
+
@@ -20,2 +21,0 @@
-Cc: stable@dpdk.org
-
@@ -31 +31 @@
-index 8b25615913..680351f6a3 100644
+index fb073ff795..5cf9f51c28 100644
@@ -34 +34 @@
-@@ -369,11 +369,13 @@ unit_test_suite_runner(struct unit_test_suite *suite)
+@@ -343,11 +343,13 @@ unit_test_suite_runner(struct unit_test_suite *suite)

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

* patch 'examples/packet_ordering: fix Rx with reorder mode disabled' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (57 preceding siblings ...)
  2024-03-14  0:09     ` patch 'test: do not count skipped tests as executed' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-14  0:09     ` patch 'examples/l3fwd: fix Rx over not ready port' " luca.boccassi
  59 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Qian Hao; +Cc: Volodymyr Fialko, 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/8b642184a925d5fb98d1f1eed353c1d6d111ecc5

Thanks.

Luca Boccassi

---
From 8b642184a925d5fb98d1f1eed353c1d6d111ecc5 Mon Sep 17 00:00:00 2001
From: Qian Hao <qi_an_hao@126.com>
Date: Wed, 13 Dec 2023 19:07:18 +0800
Subject: [PATCH] examples/packet_ordering: fix Rx with reorder mode disabled

[ upstream commit 7ba49dc729937ea97642a615e9b08f33919b94f4 ]

The packet_ordering example works in two modes (opt via --disable-reorder):
  - When reorder is enabled: rx_thread - N*worker_thread - send_thread
  - When reorder is disabled: rx_thread - N*worker_thread - tx_thread
N parallel worker_thread(s) generate out-of-order packets.

When reorder is enabled, send_thread uses sequence number generated in
rx_thread (L459) to enforce packet ordering. Otherwise rx_thread just
sends any packet it receives.

rx_thread writes sequence number into a dynamic field, which is only
registered by calling rte_reorder_create() (Line 741) when reorder is
enabled. However, rx_thread marks sequence number onto each packet no
matter whether reorder is enabled, overwriting the leading bytes in packet
mbufs when reorder is disabled, resulting in segfaults when PMD tries to
DMA packets.

`if (!disable_reorder_flag) {...}` is added in rx_thread to fix the bug.
The test is inlined by the compiler to prevent any performance loss.

Signed-off-by: Qian Hao <qi_an_hao@126.com>
Acked-by: Volodymyr Fialko <vfialko@marvell.com>
---
 .mailmap                        |  1 +
 examples/packet_ordering/main.c | 32 +++++++++++++++++++++++++-------
 2 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/.mailmap b/.mailmap
index 061ca09b98..23f3d1ddf9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1088,6 +1088,7 @@ Przemyslaw Czesnowicz <przemyslaw.czesnowicz@intel.com>
 Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
 Przemyslaw Zegan <przemyslawx.zegan@intel.com>
 Pu Xu <583493798@qq.com>
+Qian Hao <qi_an_hao@126.com>
 Qian Xu <qian.q.xu@intel.com>
 Qiao Liu <qiao.liu@intel.com>
 Qi Fu <qi.fu@intel.com>
diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index d2fd6f77e4..f839db9102 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -5,6 +5,7 @@
 #include <stdlib.h>
 #include <signal.h>
 #include <getopt.h>
+#include <stdbool.h>
 
 #include <rte_eal.h>
 #include <rte_common.h>
@@ -427,8 +428,8 @@ int_handler(int sig_num)
  * The mbufs are then passed to the worker threads via the rx_to_workers
  * ring.
  */
-static int
-rx_thread(struct rte_ring *ring_out)
+static __rte_always_inline int
+rx_thread(struct rte_ring *ring_out, bool disable_reorder_flag)
 {
 	uint32_t seqn = 0;
 	uint16_t i, ret = 0;
@@ -454,9 +455,11 @@ rx_thread(struct rte_ring *ring_out)
 				}
 				app_stats.rx.rx_pkts += nb_rx_pkts;
 
-				/* mark sequence number */
-				for (i = 0; i < nb_rx_pkts; )
-					*rte_reorder_seqn(pkts[i++]) = seqn++;
+				/* mark sequence number if reorder is enabled */
+				if (!disable_reorder_flag) {
+					for (i = 0; i < nb_rx_pkts;)
+						*rte_reorder_seqn(pkts[i++]) = seqn++;
+				}
 
 				/* enqueue to rx_to_workers ring */
 				ret = rte_ring_enqueue_burst(ring_out,
@@ -473,6 +476,18 @@ rx_thread(struct rte_ring *ring_out)
 	return 0;
 }
 
+static __rte_noinline int
+rx_thread_reorder(struct rte_ring *ring_out)
+{
+	return rx_thread(ring_out, false);
+}
+
+static __rte_noinline int
+rx_thread_reorder_disabled(struct rte_ring *ring_out)
+{
+	return rx_thread(ring_out, true);
+}
+
 /**
  * This thread takes bursts of packets from the rx_to_workers ring and
  * Changes the input port value to output port value. And feds it to
@@ -772,8 +787,11 @@ main(int argc, char **argv)
 				(void *)&send_args, last_lcore_id);
 	}
 
-	/* Start rx_thread() on the main core */
-	rx_thread(rx_to_workers);
+	/* Start rx_thread_xxx() on the main core */
+	if (disable_reorder)
+		rx_thread_reorder_disabled(rx_to_workers);
+	else
+		rx_thread_reorder(rx_to_workers);
 
 	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (rte_eal_wait_lcore(lcore_id) < 0)
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:23.383164843 +0000
+++ 0060-examples-packet_ordering-fix-Rx-with-reorder-mode-di.patch	2024-03-14 00:09:20.713617206 +0000
@@ -1 +1 @@
-From 7ba49dc729937ea97642a615e9b08f33919b94f4 Mon Sep 17 00:00:00 2001
+From 8b642184a925d5fb98d1f1eed353c1d6d111ecc5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7ba49dc729937ea97642a615e9b08f33919b94f4 ]
+
@@ -25,2 +26,0 @@
-Cc: stable@dpdk.org
-
@@ -35 +35 @@
-index 1b346f630f..55913d0450 100644
+index 061ca09b98..23f3d1ddf9 100644
@@ -38 +38 @@
-@@ -1142,6 +1142,7 @@ Przemyslaw Czesnowicz <przemyslaw.czesnowicz@intel.com>
+@@ -1088,6 +1088,7 @@ Przemyslaw Czesnowicz <przemyslaw.czesnowicz@intel.com>

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

* patch 'examples/l3fwd: fix Rx over not ready port' has been queued to stable release 22.11.5
  2024-03-14  0:08   ` patch 'Revert "build: add libarchive to optional external' " luca.boccassi
                       ` (58 preceding siblings ...)
  2024-03-14  0:09     ` patch 'examples/packet_ordering: fix Rx with reorder mode disabled' " luca.boccassi
@ 2024-03-14  0:09     ` luca.boccassi
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
  59 siblings, 1 reply; 202+ messages in thread
From: luca.boccassi @ 2024-03-14  0:09 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Konstantin Ananyev, 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/bd00ef3b097eae5625f96655cf04842ee8530c40

Thanks.

Luca Boccassi

---
From bd00ef3b097eae5625f96655cf04842ee8530c40 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Fri, 1 Mar 2024 16:39:31 +0000
Subject: [PATCH] examples/l3fwd: fix Rx over not ready port

[ upstream commit 495709d32be87cb962c55917b19ad7d4489cde3e ]

Running l3fwd in event mode with SW eventdev, service cores
can start RX before main thread is finished with PMD installation.
to reproduce:
./dpdk-l3fwd --lcores=49,51 -n 6 -a ca:00.0 -s 0x8000000000000 \
--vdev event_sw0 -- \
-L -P -p 1  --mode eventdev --eventq-sched=ordered \
--rule_ipv4=test/l3fwd_lpm_v4_u1.cfg --rule_ipv6=test/l3fwd_lpm_v6_u1.cfg \
--no-numa

At init stage user will most likely see the error message like that:
ETHDEV: lcore 51 called rx_pkt_burst for not ready port 0
0: ./dpdk-l3fwd (rte_dump_stack+0x1f) [15de723]
...
9: ./dpdk-l3fwd (eal_thread_loop+0x5a2) [15c1324]
...

And then all depends how luck/unlucky you are.
If there are some actual packet in HW RX queue, then the app will most
likely crash, otherwise it might survive.
As error message suggests, the problem is that services are started
before main thread finished with NIC setup and initialization.
The suggested fix moves services startup after NIC setup phase.

Bugzilla ID: 1390
Fixes: 8bd537e9c6cf ("examples/l3fwd: add service core setup based on caps")

Signed-off-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 examples/l3fwd/main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index a4f061537e..329427ae4f 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -1512,7 +1512,6 @@ main(int argc, char **argv)
 			l3fwd_lkp.main_loop = evt_rsrc->ops.fib_event_loop;
 		else
 			l3fwd_lkp.main_loop = evt_rsrc->ops.lpm_event_loop;
-		l3fwd_event_service_setup();
 	} else
 		l3fwd_poll_resource_setup();
 
@@ -1543,6 +1542,11 @@ main(int argc, char **argv)
 		}
 	}
 
+#ifdef RTE_LIB_EVENTDEV
+	if (evt_rsrc->enabled)
+		l3fwd_event_service_setup();
+#endif
+
 	printf("\n");
 
 	for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-14 00:09:23.421846804 +0000
+++ 0061-examples-l3fwd-fix-Rx-over-not-ready-port.patch	2024-03-14 00:09:20.717617286 +0000
@@ -1 +1 @@
-From 495709d32be87cb962c55917b19ad7d4489cde3e Mon Sep 17 00:00:00 2001
+From bd00ef3b097eae5625f96655cf04842ee8530c40 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 495709d32be87cb962c55917b19ad7d4489cde3e ]
+
@@ -31 +32,0 @@
-Cc: stable@dpdk.org
@@ -41 +42 @@
-index 3bf28aec0c..d4fb5d1971 100644
+index a4f061537e..329427ae4f 100644
@@ -44 +45 @@
-@@ -1577,7 +1577,6 @@ main(int argc, char **argv)
+@@ -1512,7 +1512,6 @@ main(int argc, char **argv)
@@ -50 +50,0 @@
- #endif
@@ -52 +52,2 @@
-@@ -1609,6 +1608,11 @@ main(int argc, char **argv)
+ 
+@@ -1543,6 +1542,11 @@ main(int argc, char **argv)

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

* patch 'build: pass cflags in subproject' has been queued to stable release 22.11.5
  2024-03-14  0:09     ` patch 'examples/l3fwd: fix Rx over not ready port' " luca.boccassi
@ 2024-03-18 15:38       ` luca.boccassi
  2024-03-18 15:38         ` patch 'examples/ipsec-secgw: fix cryptodev to SA mapping' " luca.boccassi
                           ` (26 more replies)
  0 siblings, 27 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:38 UTC (permalink / raw)
  To: Robin Jarry; +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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From a05a096f1d97dff922fe0b97b7430e14c6ec327f Mon Sep 17 00:00:00 2001
From: Robin Jarry <rjarry@redhat.com>
Date: Fri, 8 Mar 2024 12:58:40 +0100
Subject: [PATCH] build: pass cflags in subproject

[ upstream commit 3f9aa55632bd272981471516608a7eaf543bea37 ]

When DPDK is used as a subproject, include the required compile
arguments so that the parent project is also built with the appropriate
cflags (most importantly -march). Use the same cflags as pkg-config.

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

Signed-off-by: Robin Jarry <rjarry@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 buildtools/subproject/meson.build | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/buildtools/subproject/meson.build b/buildtools/subproject/meson.build
index 322e01c029..203c5d36c6 100644
--- a/buildtools/subproject/meson.build
+++ b/buildtools/subproject/meson.build
@@ -2,10 +2,15 @@
 # Copyright(c) 2022 Intel Corporation
 
 message('DPDK subproject linking: ' + get_option('default_library'))
+subproject_cflags = ['-include', 'rte_config.h'] + machine_args
+if is_freebsd
+    subproject_cflags += ['-D__BSD_VISIBLE']
+endif
 if get_option('default_library') == 'static'
     dpdk_dep = declare_dependency(
             version: meson.project_version(),
             dependencies: dpdk_static_lib_deps,
+            compile_args: subproject_cflags,
             # static library deps in DPDK build don't include "link_with" parameters,
             # so explicitly link-in both libs and drivers
             link_whole: dpdk_static_libraries + dpdk_drivers,
@@ -13,6 +18,7 @@ if get_option('default_library') == 'static'
 else
     dpdk_dep = declare_dependency(
             version: meson.project_version(),
+            compile_args: subproject_cflags,
             # shared library deps include all necessary linking parameters
             dependencies: dpdk_shared_lib_deps)
 endif
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.320431842 +0000
+++ 0001-build-pass-cflags-in-subproject.patch	2024-03-18 12:58:39.083343897 +0000
@@ -1 +1 @@
-From 3f9aa55632bd272981471516608a7eaf543bea37 Mon Sep 17 00:00:00 2001
+From a05a096f1d97dff922fe0b97b7430e14c6ec327f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3f9aa55632bd272981471516608a7eaf543bea37 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* patch 'examples/ipsec-secgw: fix cryptodev to SA mapping' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
@ 2024-03-18 15:38         ` luca.boccassi
  2024-03-18 15:38         ` patch 'crypto/qat: fix crash with CCM null AAD pointer' " luca.boccassi
                           ` (25 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:38 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Ting-Kai Ku, Ciara Power, Kai Ji, 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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 642fff58620371a9ee6a4ff01a8613dea76f59a5 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Tue, 27 Feb 2024 13:28:46 +0000
Subject: [PATCH] examples/ipsec-secgw: fix cryptodev to SA mapping

[ upstream commit f406064ff0988a53f955c74a672d696c595dc0f0 ]

There are use cases where a SA should be able to use different
cryptodevs on different lcores, for example there can be cryptodevs
with just 1 qp per VF.
Hence, the check in create lookaside session function is relaxed.
Also added a check to verify that a CQP is available for the current lcore.

Fixes: a8ade12123c3 ("examples/ipsec-secgw: create lookaside sessions at init")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Tested-by: Ting-Kai Ku <ting-kai.ku@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 .mailmap                     |  1 +
 examples/ipsec-secgw/ipsec.c | 20 ++++++++++++++++----
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/.mailmap b/.mailmap
index 23f3d1ddf9..2ad5489046 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1374,6 +1374,7 @@ Timothy McDaniel <timothy.mcdaniel@intel.com>
 Timothy Miskell <timothy.miskell@intel.com>
 Timothy Redaelli <tredaelli@redhat.com>
 Tim Shearer <tim.shearer@overturenetworks.com>
+Ting-Kai Ku <ting-kai.ku@intel.com>
 Ting Xu <ting.xu@intel.com>
 Tiwei Bie <tiwei.bie@intel.com> <btw@mail.ustc.edu.cn>
 Todd Fujinaka <todd.fujinaka@intel.com>
diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 9b52d37b81..29cb3c4785 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -110,10 +110,21 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx_lcore[],
 		if (cdev_id == RTE_CRYPTO_MAX_DEVS)
 			cdev_id = ipsec_ctx->tbl[cdev_id_qp].id;
 		else if (cdev_id != ipsec_ctx->tbl[cdev_id_qp].id) {
-			RTE_LOG(ERR, IPSEC,
-					"SA mapping to multiple cryptodevs is "
-					"not supported!");
-			return -EINVAL;
+			struct rte_cryptodev_info dev_info_1, dev_info_2;
+			rte_cryptodev_info_get(cdev_id, &dev_info_1);
+			rte_cryptodev_info_get(ipsec_ctx->tbl[cdev_id_qp].id,
+					&dev_info_2);
+			if (dev_info_1.driver_id == dev_info_2.driver_id) {
+				RTE_LOG(WARNING, IPSEC,
+					"SA mapped to multiple cryptodevs for SPI %d\n",
+					sa->spi);
+
+			} else {
+				RTE_LOG(WARNING, IPSEC,
+					"SA mapped to multiple cryptodevs of different types for SPI %d\n",
+					sa->spi);
+
+			}
 		}
 
 		/* Store per core queue pair information */
@@ -758,6 +769,7 @@ ipsec_enqueue(ipsec_xform_fn xform_func, struct ipsec_ctx *ipsec_ctx,
 			continue;
 		}
 
+		RTE_ASSERT(sa->cqp[ipsec_ctx->lcore_id] != NULL);
 		enqueue_cop(sa->cqp[ipsec_ctx->lcore_id], &priv->cop);
 	}
 }
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.358023200 +0000
+++ 0002-examples-ipsec-secgw-fix-cryptodev-to-SA-mapping.patch	2024-03-18 12:58:39.087344007 +0000
@@ -1 +1 @@
-From f406064ff0988a53f955c74a672d696c595dc0f0 Mon Sep 17 00:00:00 2001
+From 642fff58620371a9ee6a4ff01a8613dea76f59a5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f406064ff0988a53f955c74a672d696c595dc0f0 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 66ebc20666..50726e1232 100644
+index 23f3d1ddf9..2ad5489046 100644
@@ -29 +30 @@
-@@ -1442,6 +1442,7 @@ Timothy McDaniel <timothy.mcdaniel@intel.com>
+@@ -1374,6 +1374,7 @@ Timothy McDaniel <timothy.mcdaniel@intel.com>
@@ -38 +39 @@
-index f5cec4a928..c321108119 100644
+index 9b52d37b81..29cb3c4785 100644
@@ -41 +42 @@
-@@ -288,10 +288,21 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx_lcore[],
+@@ -110,10 +110,21 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx_lcore[],
@@ -67 +68 @@
-@@ -908,6 +919,7 @@ ipsec_enqueue(ipsec_xform_fn xform_func, struct ipsec_ctx *ipsec_ctx,
+@@ -758,6 +769,7 @@ ipsec_enqueue(ipsec_xform_fn xform_func, struct ipsec_ctx *ipsec_ctx,

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

* patch 'crypto/qat: fix crash with CCM null AAD pointer' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
  2024-03-18 15:38         ` patch 'examples/ipsec-secgw: fix cryptodev to SA mapping' " luca.boccassi
@ 2024-03-18 15:38         ` luca.boccassi
  2024-03-18 15:38         ` patch 'net/hns3: enable PFC for all user priorities' " luca.boccassi
                           ` (24 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:38 UTC (permalink / raw)
  To: Arkadiusz Kusztal; +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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From a56f1654c4c4d00f7df77f61733f59c840b5c090 Mon Sep 17 00:00:00 2001
From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Date: Fri, 8 Mar 2024 08:25:12 +0000
Subject: [PATCH] crypto/qat: fix crash with CCM null AAD pointer

[ upstream commit e90ef1803bb34768d1446e756046020e8cbce4bc ]

This commit fixes a segfault, that occurs when NULL pointer
is being set to the AAD pointer field.

Fixes: a815a04cea05 ("crypto/qat: support symmetric build op request")

Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index 7972c7cfeb..2b1b0eb717 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -812,10 +812,12 @@ enqueue_one_aead_job_gen1(struct qat_sym_session *ctx,
 		*(uint8_t *)&cipher_param->u.cipher_IV_array[0] =
 			q - ICP_QAT_HW_CCM_NONCE_OFFSET;
 
-		rte_memcpy((uint8_t *)aad->va +
-				ICP_QAT_HW_CCM_NONCE_OFFSET,
-			(uint8_t *)iv->va + ICP_QAT_HW_CCM_NONCE_OFFSET,
-			ctx->cipher_iv.length);
+		if (ctx->aad_len > 0) {
+			rte_memcpy((uint8_t *)aad->va +
+					ICP_QAT_HW_CCM_NONCE_OFFSET,
+				(uint8_t *)iv->va + ICP_QAT_HW_CCM_NONCE_OFFSET,
+				ctx->cipher_iv.length);
+		}
 		break;
 	default:
 		break;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.398261243 +0000
+++ 0003-crypto-qat-fix-crash-with-CCM-null-AAD-pointer.patch	2024-03-18 12:58:39.091344117 +0000
@@ -1 +1 @@
-From e90ef1803bb34768d1446e756046020e8cbce4bc Mon Sep 17 00:00:00 2001
+From a56f1654c4c4d00f7df77f61733f59c840b5c090 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e90ef1803bb34768d1446e756046020e8cbce4bc ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 60b0f0551c..1f5d2583c4 100644
+index 7972c7cfeb..2b1b0eb717 100644
@@ -22 +23 @@
-@@ -925,10 +925,12 @@ enqueue_one_aead_job_gen1(struct qat_sym_session *ctx,
+@@ -812,10 +812,12 @@ enqueue_one_aead_job_gen1(struct qat_sym_session *ctx,

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

* patch 'net/hns3: enable PFC for all user priorities' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
  2024-03-18 15:38         ` patch 'examples/ipsec-secgw: fix cryptodev to SA mapping' " luca.boccassi
  2024-03-18 15:38         ` patch 'crypto/qat: fix crash with CCM null AAD pointer' " luca.boccassi
@ 2024-03-18 15:38         ` luca.boccassi
  2024-03-18 15:38         ` patch 'doc: add traffic manager in features table' " luca.boccassi
                           ` (23 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:38 UTC (permalink / raw)
  To: Jie Hai; +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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From fc5f4ef40f77639862f54264600bf872175c417b Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Wed, 6 Mar 2024 17:20:47 +0800
Subject: [PATCH] net/hns3: enable PFC for all user priorities

[ upstream commit aae6989df36c105b917cf69975c075dfde2e6b84 ]

When user set TC number to 4 and enable PFC and ETS by dev_configure,
driver only enable user priority 0-3.
The packet with user priority 4-7 cannot trigger PFC frame.

Fix by enabling PFC for all user priorities.

By the way, the nb_tcs from user can never be 0 because of the ahead
check in driver. So remove this redundant code.

Fixes: 62e3ccc2b94c ("net/hns3: support flow control")

Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 drivers/net/hns3/hns3_dcb.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index 2831d3dc62..915e4eb768 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -1499,7 +1499,6 @@ hns3_dcb_info_update(struct hns3_adapter *hns, uint8_t num_tc)
 static int
 hns3_dcb_hw_configure(struct hns3_adapter *hns)
 {
-	struct rte_eth_dcb_rx_conf *dcb_rx_conf;
 	struct hns3_pf *pf = &hns->pf;
 	struct hns3_hw *hw = &hns->hw;
 	enum hns3_fc_status fc_status = hw->current_fc_status;
@@ -1519,12 +1518,8 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
 	}
 
 	if (hw->data->dev_conf.dcb_capability_en & RTE_ETH_DCB_PFC_SUPPORT) {
-		dcb_rx_conf = &hw->data->dev_conf.rx_adv_conf.dcb_rx_conf;
-		if (dcb_rx_conf->nb_tcs == 0)
-			hw->dcb_info.pfc_en = 1; /* tc0 only */
-		else
-			hw->dcb_info.pfc_en =
-			RTE_LEN2MASK((uint8_t)dcb_rx_conf->nb_tcs, uint8_t);
+		hw->dcb_info.pfc_en =
+			RTE_LEN2MASK((uint8_t)HNS3_MAX_USER_PRIO, uint8_t);
 
 		hw->dcb_info.hw_pfc_map =
 				hns3_dcb_undrop_tc_map(hw, hw->dcb_info.pfc_en);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.437505569 +0000
+++ 0004-net-hns3-enable-PFC-for-all-user-priorities.patch	2024-03-18 12:58:39.091344117 +0000
@@ -1 +1 @@
-From aae6989df36c105b917cf69975c075dfde2e6b84 Mon Sep 17 00:00:00 2001
+From fc5f4ef40f77639862f54264600bf872175c417b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit aae6989df36c105b917cf69975c075dfde2e6b84 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org

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

* patch 'doc: add traffic manager in features table' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (2 preceding siblings ...)
  2024-03-18 15:38         ` patch 'net/hns3: enable PFC for all user priorities' " luca.boccassi
@ 2024-03-18 15:38         ` luca.boccassi
  2024-03-18 15:38         ` patch 'doc: add link speeds configuration " luca.boccassi
                           ` (22 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:38 UTC (permalink / raw)
  To: Huisong Li
  Cc: Chengwen Feng, Ferruh Yigit, Hemant Agrawal, Cristian Dumitrescu,
	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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From d50c5dfbf4e3951e899677e4ef166e6389fe9962 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 28 Nov 2023 20:40:56 +0800
Subject: [PATCH] doc: add traffic manager in features table

[ upstream commit a905e821007e884355e01289bdc67c3548591fec ]

Add Traffic Manager feature.

Fixes: 5d109deffa87 ("ethdev: add traffic management API")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 doc/guides/nics/features.rst         | 13 +++++++++++++
 doc/guides/nics/features/cnxk.ini    |  1 +
 doc/guides/nics/features/default.ini |  1 +
 doc/guides/nics/features/dpaa2.ini   |  1 +
 doc/guides/nics/features/hns3.ini    |  1 +
 doc/guides/nics/features/i40e.ini    |  1 +
 doc/guides/nics/features/iavf.ini    |  3 ++-
 doc/guides/nics/features/ice.ini     |  1 +
 doc/guides/nics/features/ice_dcf.ini |  1 +
 doc/guides/nics/features/ipn3ke.ini  |  1 +
 doc/guides/nics/features/ixgbe.ini   |  1 +
 doc/guides/nics/features/mvpp2.ini   |  3 ++-
 doc/guides/nics/features/txgbe.ini   |  1 +
 13 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 1a1dc16c1e..e93b97a5b8 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -740,6 +740,19 @@ Supports congestion management.
   ``rte_eth_cman_config_set()``, ``rte_eth_cman_config_get()``.
 
 
+.. _nic_features_traffic_manager:
+
+Traffic manager
+---------------
+
+Supports Traffic manager.
+
+* **[implements] rte_tm_ops**: ``capabilities_get``, ``shaper_profile_add``,
+  ``hierarchy_commit`` and so on.
+* **[related]    API**: ``rte_tm_capabilities_get()``, ``rte_tm_shaper_profile_add()``,
+  ``rte_tm_hierarchy_commit()`` and so on.
+
+
 .. _nic_features_fw_version:
 
 FW version
diff --git a/doc/guides/nics/features/cnxk.ini b/doc/guides/nics/features/cnxk.ini
index f81628da77..f0ead29134 100644
--- a/doc/guides/nics/features/cnxk.ini
+++ b/doc/guides/nics/features/cnxk.ini
@@ -28,6 +28,7 @@ RSS key update       = Y
 RSS reta update      = Y
 Inner RSS            = Y
 Congestion management = Y
+Traffic manager      = Y
 Inline protocol      = Y
 Flow control         = Y
 Scattered Rx         = Y
diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index 510cc6679d..94582c7dc3 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -42,6 +42,7 @@ VLAN filter          =
 Flow control         =
 Rate limitation      =
 Congestion management =
+Traffic manager      =
 Inline crypto        =
 Inline protocol      =
 CRC offload          =
diff --git a/doc/guides/nics/features/dpaa2.ini b/doc/guides/nics/features/dpaa2.ini
index 26dc8c2178..f02da463d9 100644
--- a/doc/guides/nics/features/dpaa2.ini
+++ b/doc/guides/nics/features/dpaa2.ini
@@ -17,6 +17,7 @@ Unicast MAC filter   = Y
 RSS hash             = Y
 VLAN filter          = Y
 Flow control         = Y
+Traffic manager      = Y
 VLAN offload         = Y
 L3 checksum offload  = Y
 L4 checksum offload  = Y
diff --git a/doc/guides/nics/features/hns3.ini b/doc/guides/nics/features/hns3.ini
index 338b4e6864..a20ece20e8 100644
--- a/doc/guides/nics/features/hns3.ini
+++ b/doc/guides/nics/features/hns3.ini
@@ -28,6 +28,7 @@ RSS reta update      = Y
 DCB                  = Y
 VLAN filter          = Y
 Flow control         = Y
+Traffic manager      = Y
 CRC offload          = Y
 VLAN offload         = Y
 FEC                  = Y
diff --git a/doc/guides/nics/features/i40e.ini b/doc/guides/nics/features/i40e.ini
index e241dad047..2d168199f0 100644
--- a/doc/guides/nics/features/i40e.ini
+++ b/doc/guides/nics/features/i40e.ini
@@ -27,6 +27,7 @@ SR-IOV               = Y
 DCB                  = Y
 VLAN filter          = Y
 Flow control         = Y
+Traffic manager      = Y
 CRC offload          = Y
 VLAN offload         = Y
 QinQ offload         = P
diff --git a/doc/guides/nics/features/iavf.ini b/doc/guides/nics/features/iavf.ini
index 5cdf0ddee6..c7f8ace499 100644
--- a/doc/guides/nics/features/iavf.ini
+++ b/doc/guides/nics/features/iavf.ini
@@ -20,6 +20,8 @@ RSS hash             = Y
 RSS key update       = Y
 RSS reta update      = Y
 VLAN filter          = Y
+Traffic manager      = Y
+Inline crypto        = Y
 CRC offload          = Y
 VLAN offload         = P
 L3 checksum offload  = P
@@ -30,7 +32,6 @@ Inner L4 checksum    = P
 Packet type parsing  = Y
 Rx descriptor status = Y
 Tx descriptor status = Y
-Inline crypto        = Y
 Basic stats          = Y
 Multiprocess aware   = Y
 FreeBSD              = Y
diff --git a/doc/guides/nics/features/ice.ini b/doc/guides/nics/features/ice.ini
index 13f8871dcc..8febbc4f1e 100644
--- a/doc/guides/nics/features/ice.ini
+++ b/doc/guides/nics/features/ice.ini
@@ -26,6 +26,7 @@ RSS hash             = Y
 RSS key update       = Y
 RSS reta update      = Y
 VLAN filter          = Y
+Traffic manager      = Y
 CRC offload          = Y
 VLAN offload         = Y
 QinQ offload         = P
diff --git a/doc/guides/nics/features/ice_dcf.ini b/doc/guides/nics/features/ice_dcf.ini
index 3b11622d4c..0e86338990 100644
--- a/doc/guides/nics/features/ice_dcf.ini
+++ b/doc/guides/nics/features/ice_dcf.ini
@@ -22,6 +22,7 @@ Promiscuous mode     = Y
 Allmulticast mode    = Y
 Unicast MAC filter   = Y
 VLAN filter          = Y
+Traffic manager      = Y
 VLAN offload         = Y
 Extended stats       = Y
 Basic stats          = Y
diff --git a/doc/guides/nics/features/ipn3ke.ini b/doc/guides/nics/features/ipn3ke.ini
index 1f6b780273..e412978820 100644
--- a/doc/guides/nics/features/ipn3ke.ini
+++ b/doc/guides/nics/features/ipn3ke.ini
@@ -25,6 +25,7 @@ SR-IOV               = Y
 DCB                  = Y
 VLAN filter          = Y
 Flow control         = Y
+Traffic manager      = Y
 CRC offload          = Y
 VLAN offload         = Y
 QinQ offload         = Y
diff --git a/doc/guides/nics/features/ixgbe.ini b/doc/guides/nics/features/ixgbe.ini
index 8590ac857f..f05fcec455 100644
--- a/doc/guides/nics/features/ixgbe.ini
+++ b/doc/guides/nics/features/ixgbe.ini
@@ -27,6 +27,7 @@ DCB                  = Y
 VLAN filter          = Y
 Flow control         = Y
 Rate limitation      = Y
+Traffic manager      = Y
 Inline crypto        = Y
 CRC offload          = P
 VLAN offload         = P
diff --git a/doc/guides/nics/features/mvpp2.ini b/doc/guides/nics/features/mvpp2.ini
index 653c9d08cb..ccc2c2d4f8 100644
--- a/doc/guides/nics/features/mvpp2.ini
+++ b/doc/guides/nics/features/mvpp2.ini
@@ -12,8 +12,9 @@ Allmulticast mode    = Y
 Unicast MAC filter   = Y
 Multicast MAC filter = Y
 RSS hash             = Y
-Flow control         = Y
 VLAN filter          = Y
+Flow control         = Y
+Traffic manager      = Y
 CRC offload          = Y
 L3 checksum offload  = Y
 L4 checksum offload  = Y
diff --git a/doc/guides/nics/features/txgbe.ini b/doc/guides/nics/features/txgbe.ini
index e21083052c..3a11fb2037 100644
--- a/doc/guides/nics/features/txgbe.ini
+++ b/doc/guides/nics/features/txgbe.ini
@@ -26,6 +26,7 @@ DCB                  = Y
 VLAN filter          = Y
 Flow control         = Y
 Rate limitation      = Y
+Traffic manager      = Y
 Inline crypto        = Y
 CRC offload          = P
 VLAN offload         = P
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.477257001 +0000
+++ 0005-doc-add-traffic-manager-in-features-table.patch	2024-03-18 12:58:39.095344227 +0000
@@ -1 +1 @@
-From a905e821007e884355e01289bdc67c3548591fec Mon Sep 17 00:00:00 2001
+From d50c5dfbf4e3951e899677e4ef166e6389fe9962 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a905e821007e884355e01289bdc67c3548591fec ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index 38eba8742c..b4f7f1ee61 100644
+index 1a1dc16c1e..e93b97a5b8 100644
@@ -36 +37 @@
-@@ -762,6 +762,19 @@ Supports congestion management.
+@@ -740,6 +740,19 @@ Supports congestion management.
@@ -57 +58 @@
-index 1c8db1ad13..2de156c695 100644
+index f81628da77..f0ead29134 100644
@@ -69 +70 @@
-index e21725bdea..c06b6fea9a 100644
+index 510cc6679d..94582c7dc3 100644
@@ -117 +118 @@
-index db4f92ce71..c59115ae15 100644
+index 5cdf0ddee6..c7f8ace499 100644
@@ -120 +121 @@
-@@ -25,6 +25,8 @@ RSS hash             = Y
+@@ -20,6 +20,8 @@ RSS hash             = Y
@@ -128,2 +129,2 @@
- L3 checksum offload  = Y
-@@ -35,7 +37,6 @@ Inner L4 checksum    = Y
+ L3 checksum offload  = P
+@@ -30,7 +32,6 @@ Inner L4 checksum    = P

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

* patch 'doc: add link speeds configuration in features table' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (3 preceding siblings ...)
  2024-03-18 15:38         ` patch 'doc: add traffic manager in features table' " luca.boccassi
@ 2024-03-18 15:38         ` luca.boccassi
  2024-03-18 15:38         ` patch 'net/ena: fix fast mbuf free' " luca.boccassi
                           ` (21 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:38 UTC (permalink / raw)
  To: Huisong Li; +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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 6d307d9eaad24dbb577bedd78ca2850c9dd4bf50 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 28 Nov 2023 21:00:05 +0800
Subject: [PATCH] doc: add link speeds configuration in features table

[ upstream commit 79758d40007c56231fce3cf1004ae5168616b3aa ]

Add features for link speeds.

Fixes: 82113036e4e5 ("ethdev: redesign link speed config")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 doc/guides/nics/features.rst          | 11 +++++++++++
 doc/guides/nics/features/atlantic.ini |  1 +
 doc/guides/nics/features/bnxt.ini     |  1 +
 doc/guides/nics/features/default.ini  |  1 +
 doc/guides/nics/features/dpaa.ini     |  1 +
 doc/guides/nics/features/hns3.ini     |  1 +
 doc/guides/nics/features/i40e.ini     |  1 +
 doc/guides/nics/features/ice.ini      |  1 +
 doc/guides/nics/features/igb.ini      |  1 +
 doc/guides/nics/features/igc.ini      |  1 +
 doc/guides/nics/features/ionic.ini    |  1 +
 doc/guides/nics/features/ixgbe.ini    |  1 +
 doc/guides/nics/features/ngbe.ini     |  1 +
 doc/guides/nics/features/octeontx.ini |  1 +
 doc/guides/nics/features/sfc.ini      |  1 +
 doc/guides/nics/features/thunderx.ini |  1 +
 doc/guides/nics/features/txgbe.ini    |  1 +
 17 files changed, 27 insertions(+)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index e93b97a5b8..4332ff0a31 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -34,6 +34,17 @@ Supports getting the speed capabilities that the current device is capable of.
 * **[related]  API**: ``rte_eth_dev_info_get()``.
 
 
+.. _nic_features_link_speeds_config:
+
+Link speed configuration
+------------------------
+
+Supports configurating fixed speed and link autonegotiation.
+
+* **[uses]     user config**: ``dev_conf.link_speeds:RTE_ETH_LINK_SPEED_*``.
+* **[related]  API**: ``rte_eth_dev_configure()``.
+
+
 .. _nic_features_link_status:
 
 Link status
diff --git a/doc/guides/nics/features/atlantic.ini b/doc/guides/nics/features/atlantic.ini
index ef4155027c..29969c1493 100644
--- a/doc/guides/nics/features/atlantic.ini
+++ b/doc/guides/nics/features/atlantic.ini
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 Queue start/stop     = Y
diff --git a/doc/guides/nics/features/bnxt.ini b/doc/guides/nics/features/bnxt.ini
index 50a0b5bfa6..e7bb800f08 100644
--- a/doc/guides/nics/features/bnxt.ini
+++ b/doc/guides/nics/features/bnxt.ini
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 Rx interrupt         = Y
diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index 94582c7dc3..013c360ddf 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -8,6 +8,7 @@
 ;
 [Features]
 Speed capabilities   =
+Link speed configuration =
 Link status          =
 Link status event    =
 Removal event        =
diff --git a/doc/guides/nics/features/dpaa.ini b/doc/guides/nics/features/dpaa.ini
index a382c7160c..b136ed191a 100644
--- a/doc/guides/nics/features/dpaa.ini
+++ b/doc/guides/nics/features/dpaa.ini
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 Burst mode info      = Y
diff --git a/doc/guides/nics/features/hns3.ini b/doc/guides/nics/features/hns3.ini
index a20ece20e8..8b623d3077 100644
--- a/doc/guides/nics/features/hns3.ini
+++ b/doc/guides/nics/features/hns3.ini
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 Rx interrupt         = Y
diff --git a/doc/guides/nics/features/i40e.ini b/doc/guides/nics/features/i40e.ini
index 2d168199f0..ef7514c44b 100644
--- a/doc/guides/nics/features/i40e.ini
+++ b/doc/guides/nics/features/i40e.ini
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 Rx interrupt         = Y
diff --git a/doc/guides/nics/features/ice.ini b/doc/guides/nics/features/ice.ini
index 8febbc4f1e..62869ef0a0 100644
--- a/doc/guides/nics/features/ice.ini
+++ b/doc/guides/nics/features/ice.ini
@@ -8,6 +8,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 Rx interrupt         = Y
diff --git a/doc/guides/nics/features/igb.ini b/doc/guides/nics/features/igb.ini
index 7b4af6f86c..ee2408f3ee 100644
--- a/doc/guides/nics/features/igb.ini
+++ b/doc/guides/nics/features/igb.ini
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = P
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 Rx interrupt         = Y
diff --git a/doc/guides/nics/features/igc.ini b/doc/guides/nics/features/igc.ini
index b5deea3f61..a43b8eaefd 100644
--- a/doc/guides/nics/features/igc.ini
+++ b/doc/guides/nics/features/igc.ini
@@ -4,6 +4,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 FW version           = Y
diff --git a/doc/guides/nics/features/ionic.ini b/doc/guides/nics/features/ionic.ini
index af0fc5462a..64b2316288 100644
--- a/doc/guides/nics/features/ionic.ini
+++ b/doc/guides/nics/features/ionic.ini
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 Fast mbuf free       = Y
diff --git a/doc/guides/nics/features/ixgbe.ini b/doc/guides/nics/features/ixgbe.ini
index f05fcec455..cb9331dbcd 100644
--- a/doc/guides/nics/features/ixgbe.ini
+++ b/doc/guides/nics/features/ixgbe.ini
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 Rx interrupt         = Y
diff --git a/doc/guides/nics/features/ngbe.ini b/doc/guides/nics/features/ngbe.ini
index 2701c5f051..1dfd92e96b 100644
--- a/doc/guides/nics/features/ngbe.ini
+++ b/doc/guides/nics/features/ngbe.ini
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 Free Tx mbuf on demand = Y
diff --git a/doc/guides/nics/features/octeontx.ini b/doc/guides/nics/features/octeontx.ini
index fa1e18b120..46ae8318a9 100644
--- a/doc/guides/nics/features/octeontx.ini
+++ b/doc/guides/nics/features/octeontx.ini
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 Lock-free Tx queue   = Y
diff --git a/doc/guides/nics/features/sfc.ini b/doc/guides/nics/features/sfc.ini
index f5ac644278..1cb294384a 100644
--- a/doc/guides/nics/features/sfc.ini
+++ b/doc/guides/nics/features/sfc.ini
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 Rx interrupt         = Y
diff --git a/doc/guides/nics/features/thunderx.ini b/doc/guides/nics/features/thunderx.ini
index b33bb37c82..2ab8db7239 100644
--- a/doc/guides/nics/features/thunderx.ini
+++ b/doc/guides/nics/features/thunderx.ini
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 Queue start/stop     = Y
diff --git a/doc/guides/nics/features/txgbe.ini b/doc/guides/nics/features/txgbe.ini
index 3a11fb2037..be0af3dfad 100644
--- a/doc/guides/nics/features/txgbe.ini
+++ b/doc/guides/nics/features/txgbe.ini
@@ -5,6 +5,7 @@
 ;
 [Features]
 Speed capabilities   = Y
+Link speed configuration = Y
 Link status          = Y
 Link status event    = Y
 Rx interrupt         = Y
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.517433977 +0000
+++ 0006-doc-add-link-speeds-configuration-in-features-table.patch	2024-03-18 12:58:39.095344227 +0000
@@ -1 +1 @@
-From 79758d40007c56231fce3cf1004ae5168616b3aa Mon Sep 17 00:00:00 2001
+From 6d307d9eaad24dbb577bedd78ca2850c9dd4bf50 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 79758d40007c56231fce3cf1004ae5168616b3aa ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index b4f7f1ee61..cd0115ffb3 100644
+index e93b97a5b8..4332ff0a31 100644
@@ -69 +70 @@
-index bd4e2295dc..c33889663d 100644
+index 50a0b5bfa6..e7bb800f08 100644
@@ -81 +82 @@
-index c06b6fea9a..1e9a156a2a 100644
+index 94582c7dc3..013c360ddf 100644
@@ -153 +154 @@
-index 47d9344435..d6db18c1e8 100644
+index b5deea3f61..a43b8eaefd 100644
@@ -213 +214 @@
-index 8a9198adcb..f9654e69ed 100644
+index f5ac644278..1cb294384a 100644

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

* patch 'net/ena: fix fast mbuf free' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (4 preceding siblings ...)
  2024-03-18 15:38         ` patch 'doc: add link speeds configuration " luca.boccassi
@ 2024-03-18 15:38         ` luca.boccassi
  2024-03-18 15:38         ` patch 'net/ena/base: limit exponential backoff' " luca.boccassi
                           ` (20 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:38 UTC (permalink / raw)
  To: Shai Brandes; +Cc: Amit Bernstein, 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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From fd262a1e35203a71035baa9374a3fe05362bbedc Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Tue, 12 Mar 2024 20:06:50 +0200
Subject: [PATCH] net/ena: fix fast mbuf free

[ upstream commit 89b081e154c5f81295014fd8b5b32193dd01b9cb ]

In case the application enables fast mbuf release optimization,
the driver releases 256 TX mbufs in bulk upon reaching the
TX free threshold.
The existing implementation utilizes rte_mempool_put_bulk for bulk
freeing TXs, which exclusively supports direct mbufs.
In case the application transmits indirect bufs, the driver must
also decrement the mbuf reference count and unlink the mbuf segment.
For such case, the driver should employ rte_pktmbuf_free_bulk.

Fixes: c339f53823f3 ("net/ena: support fast mbuf free")

Signed-off-by: Shai Brandes <shaibran@amazon.com>
Reviewed-by: Amit Bernstein <amitbern@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 7345e480f8..2c4e3505d0 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -3030,8 +3030,7 @@ ena_tx_cleanup_mbuf_fast(struct rte_mbuf **mbufs_to_clean,
 		m_next = mbuf->next;
 		mbufs_to_clean[mbuf_cnt++] = mbuf;
 		if (mbuf_cnt == buf_size) {
-			rte_mempool_put_bulk(mbufs_to_clean[0]->pool, (void **)mbufs_to_clean,
-				(unsigned int)mbuf_cnt);
+			rte_pktmbuf_free_bulk(mbufs_to_clean, mbuf_cnt);
 			mbuf_cnt = 0;
 		}
 		mbuf = m_next;
@@ -3100,8 +3099,7 @@ static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)
 	}
 
 	if (mbuf_cnt != 0)
-		rte_mempool_put_bulk(mbufs_to_clean[0]->pool,
-			(void **)mbufs_to_clean, mbuf_cnt);
+		rte_pktmbuf_free_bulk(mbufs_to_clean, mbuf_cnt);
 
 	/* Notify completion handler that full cleanup was performed */
 	if (free_pkt_cnt == 0 || total_tx_pkts < cleanup_budget)
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.558767567 +0000
+++ 0007-net-ena-fix-fast-mbuf-free.patch	2024-03-18 12:58:39.103344447 +0000
@@ -1 +1 @@
-From 89b081e154c5f81295014fd8b5b32193dd01b9cb Mon Sep 17 00:00:00 2001
+From fd262a1e35203a71035baa9374a3fe05362bbedc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 89b081e154c5f81295014fd8b5b32193dd01b9cb ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 3157237c0d..537ee9f8c3 100644
+index 7345e480f8..2c4e3505d0 100644
@@ -28 +29 @@
-@@ -3122,8 +3122,7 @@ ena_tx_cleanup_mbuf_fast(struct rte_mbuf **mbufs_to_clean,
+@@ -3030,8 +3030,7 @@ ena_tx_cleanup_mbuf_fast(struct rte_mbuf **mbufs_to_clean,
@@ -38 +39 @@
-@@ -3191,8 +3190,7 @@ static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)
+@@ -3100,8 +3099,7 @@ static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)

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

* patch 'net/ena/base: limit exponential backoff' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (5 preceding siblings ...)
  2024-03-18 15:38         ` patch 'net/ena: fix fast mbuf free' " luca.boccassi
@ 2024-03-18 15:38         ` luca.boccassi
  2024-03-18 15:38         ` patch 'net/ena/base: restructure interrupt handling' " luca.boccassi
                           ` (19 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:38 UTC (permalink / raw)
  To: Shai Brandes; +Cc: Amit Bernstein, 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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From ad7591896c099491de3ce181e6c3483a74366cc5 Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Tue, 12 Mar 2024 20:06:52 +0200
Subject: [PATCH] net/ena/base: limit exponential backoff

[ upstream commit 4b378679c88ff231b97b71aaedc2d424e82f1aba ]

Limit the value of the exponent used for this backoff
at (1<<16) to prevent it from reaching to an excessive
value (1<<32) or potentially even overflowing.
In addition, for uniformity and readability purposes,
the min/max parameter in the calls of ENA_MIN32 and
ENA_MAX32 macros was changed to be first.

Fixes: 0c84e04824db ("net/ena/base: make delay exponential in polling functions")

Signed-off-by: Shai Brandes <shaibran@amazon.com>
Reviewed-by: Amit Bernstein <amitbern@amazon.com>
---
 drivers/net/ena/base/ena_com.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c
index 5ca36ab6d9..4bd85f29f5 100644
--- a/drivers/net/ena/base/ena_com.c
+++ b/drivers/net/ena/base/ena_com.c
@@ -34,6 +34,8 @@
 
 #define ENA_REGS_ADMIN_INTR_MASK 1
 
+#define ENA_MAX_BACKOFF_DELAY_EXP 16U
+
 #define ENA_MIN_ADMIN_POLL_US 100
 
 #define ENA_MAX_ADMIN_POLL_US 5000
@@ -539,8 +541,9 @@ static int ena_com_comp_status_to_errno(struct ena_com_admin_queue *admin_queue,
 
 static void ena_delay_exponential_backoff_us(u32 exp, u32 delay_us)
 {
+	exp = ENA_MIN32(ENA_MAX_BACKOFF_DELAY_EXP, exp);
 	delay_us = ENA_MAX32(ENA_MIN_ADMIN_POLL_US, delay_us);
-	delay_us = ENA_MIN32(delay_us * (1U << exp), ENA_MAX_ADMIN_POLL_US);
+	delay_us = ENA_MIN32(ENA_MAX_ADMIN_POLL_US, delay_us * (1U << exp));
 	ENA_USLEEP(delay_us);
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.600158129 +0000
+++ 0008-net-ena-base-limit-exponential-backoff.patch	2024-03-18 12:58:39.107344557 +0000
@@ -1 +1 @@
-From 4b378679c88ff231b97b71aaedc2d424e82f1aba Mon Sep 17 00:00:00 2001
+From ad7591896c099491de3ce181e6c3483a74366cc5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4b378679c88ff231b97b71aaedc2d424e82f1aba ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 6953a1fa33..31c37b0ab3 100644
+index 5ca36ab6d9..4bd85f29f5 100644
@@ -35 +36 @@
-@@ -545,8 +547,9 @@ static int ena_com_comp_status_to_errno(struct ena_com_admin_queue *admin_queue,
+@@ -539,8 +541,9 @@ static int ena_com_comp_status_to_errno(struct ena_com_admin_queue *admin_queue,

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

* patch 'net/ena/base: restructure interrupt handling' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (6 preceding siblings ...)
  2024-03-18 15:38         ` patch 'net/ena/base: limit exponential backoff' " luca.boccassi
@ 2024-03-18 15:38         ` luca.boccassi
  2024-03-18 15:39         ` patch 'net/nfp: fix switch domain free check' " luca.boccassi
                           ` (18 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:38 UTC (permalink / raw)
  To: Shai Brandes; +Cc: Amit Bernstein, 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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From c5251ed8a6f8bdd4e31ce19c5dc0a2f5588bcc41 Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Tue, 12 Mar 2024 20:07:00 +0200
Subject: [PATCH] net/ena/base: restructure interrupt handling

[ upstream commit 553653ccc18c1ed9fb0406e1b0130e945d5ab30f ]

When invoking an admin command, in interrupt mode, if the interrupt
is received after timeout and also after the calling function finished
running, the response will be written into a memory that is no longer
valid.

Fixes: 99ecfbf845b3 ("ena: import communication layer")

Signed-off-by: Shai Brandes <shaibran@amazon.com>
Reviewed-by: Amit Bernstein <amitbern@amazon.com>
---
 drivers/net/ena/base/ena_com.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c
index 4bd85f29f5..98035f3cd4 100644
--- a/drivers/net/ena/base/ena_com.c
+++ b/drivers/net/ena/base/ena_com.c
@@ -173,6 +173,7 @@ static int ena_com_admin_init_aenq(struct ena_com_dev *ena_dev,
 static void comp_ctxt_release(struct ena_com_admin_queue *queue,
 				     struct ena_comp_ctx *comp_ctx)
 {
+	comp_ctx->user_cqe = NULL;
 	comp_ctx->occupied = false;
 	ATOMIC32_DEC(&queue->outstanding_cmds);
 }
@@ -466,6 +467,9 @@ static void ena_com_handle_single_admin_completion(struct ena_com_admin_queue *a
 		return;
 	}
 
+	if (!comp_ctx->occupied)
+		return;
+
 	comp_ctx->status = ENA_CMD_COMPLETED;
 	comp_ctx->comp_status = cqe->acq_common_descriptor.status;
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.641249262 +0000
+++ 0009-net-ena-base-restructure-interrupt-handling.patch	2024-03-18 12:58:39.111344667 +0000
@@ -1 +1 @@
-From 553653ccc18c1ed9fb0406e1b0130e945d5ab30f Mon Sep 17 00:00:00 2001
+From c5251ed8a6f8bdd4e31ce19c5dc0a2f5588bcc41 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 553653ccc18c1ed9fb0406e1b0130e945d5ab30f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index fb3ad27d0a..a0c88b1a0e 100644
+index 4bd85f29f5..98035f3cd4 100644
@@ -24 +25 @@
-@@ -181,6 +181,7 @@ static int ena_com_admin_init_aenq(struct ena_com_dev *ena_dev,
+@@ -173,6 +173,7 @@ static int ena_com_admin_init_aenq(struct ena_com_dev *ena_dev,
@@ -32 +33 @@
-@@ -474,6 +475,9 @@ static void ena_com_handle_single_admin_completion(struct ena_com_admin_queue *a
+@@ -466,6 +467,9 @@ static void ena_com_handle_single_admin_completion(struct ena_com_admin_queue *a

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

* patch 'net/nfp: fix switch domain free check' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (7 preceding siblings ...)
  2024-03-18 15:38         ` patch 'net/ena/base: restructure interrupt handling' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'app/testpmd: fix --stats-period option " luca.boccassi
                           ` (17 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 75b8660005baf365fdcf579ac04577082da4f6dc Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Thu, 14 Mar 2024 15:40:17 +0800
Subject: [PATCH] net/nfp: fix switch domain free check

[ upstream commit 5b1b9f9c11bedb672cdf01c834d6c341d50a0f1e ]

CI found calling 'rte_eth_switch_domain_free()' without checking return
value.

Coverity issue: 414936
Fixes: 20eaa8e2ebae ("net/nfp: free switch domain ID on close")

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/flower/nfp_flower.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index 8490d179a9..bc1df0d369 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -1176,7 +1176,8 @@ nfp_uninit_app_fw_flower(struct nfp_pf_dev *pf_dev)
 	nfp_cpp_area_free(pf_dev->ctrl_area);
 	rte_free(app_fw_flower->pf_hw);
 	nfp_flow_priv_uninit(pf_dev);
-	rte_eth_switch_domain_free(app_fw_flower->switch_domain_id);
+	if (rte_eth_switch_domain_free(app_fw_flower->switch_domain_id) != 0)
+		PMD_DRV_LOG(WARNING, "Failed to free switch domain for device");
 	rte_free(app_fw_flower);
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.682008222 +0000
+++ 0010-net-nfp-fix-switch-domain-free-check.patch	2024-03-18 12:58:39.111344667 +0000
@@ -1 +1 @@
-From 5b1b9f9c11bedb672cdf01c834d6c341d50a0f1e Mon Sep 17 00:00:00 2001
+From 75b8660005baf365fdcf579ac04577082da4f6dc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5b1b9f9c11bedb672cdf01c834d6c341d50a0f1e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 97219ff379..303f6bd3f6 100644
+index 8490d179a9..bc1df0d369 100644
@@ -24 +25,2 @@
-@@ -793,7 +793,8 @@ nfp_uninit_app_fw_flower(struct nfp_pf_dev *pf_dev)
+@@ -1176,7 +1176,8 @@ nfp_uninit_app_fw_flower(struct nfp_pf_dev *pf_dev)
+ 	nfp_cpp_area_free(pf_dev->ctrl_area);
@@ -26 +27,0 @@
- 	nfp_mtr_priv_uninit(pf_dev);

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

* patch 'app/testpmd: fix --stats-period option check' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (8 preceding siblings ...)
  2024-03-18 15:39         ` patch 'net/nfp: fix switch domain free check' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'app/testpmd: fix burst option parsing' " luca.boccassi
                           ` (16 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: David Marchand; +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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From d6cee7ffc08fbb7aaf4df759dba3d1411a9a729a Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 14 Mar 2024 10:17:02 +0100
Subject: [PATCH] app/testpmd: fix --stats-period option check

[ upstream commit 2ae06c579ea4e1cd234c5b14bef2957ee154ec74 ]

Rather than silently ignore an invalid value, raise an error for
stats-period user input.

Fixes: cfea1f3048d1 ("app/testpmd: print statistics periodically")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/parameters.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index cddcdef045..92fa786492 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -763,7 +763,7 @@ launch_args_parse(int argc, char** argv)
 				n = strtoul(optarg, &end, 10);
 				if ((optarg[0] == '\0') || (end == NULL) ||
 						(*end != '\0'))
-					break;
+					rte_exit(EXIT_FAILURE, "Invalid stats-period value\n");
 
 				stats_period = n;
 				break;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.721013119 +0000
+++ 0011-app-testpmd-fix-stats-period-option-check.patch	2024-03-18 12:58:39.115344777 +0000
@@ -1 +1 @@
-From 2ae06c579ea4e1cd234c5b14bef2957ee154ec74 Mon Sep 17 00:00:00 2001
+From d6cee7ffc08fbb7aaf4df759dba3d1411a9a729a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ae06c579ea4e1cd234c5b14bef2957ee154ec74 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 11b0cce577..d715750bb8 100644
+index cddcdef045..92fa786492 100644
@@ -22 +23 @@
-@@ -776,7 +776,7 @@ launch_args_parse(int argc, char** argv)
+@@ -763,7 +763,7 @@ launch_args_parse(int argc, char** argv)

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

* patch 'app/testpmd: fix burst option parsing' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (9 preceding siblings ...)
  2024-03-18 15:39         ` patch 'app/testpmd: fix --stats-period option " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'app/testpmd: fix error message for invalid option' " luca.boccassi
                           ` (15 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: David Marchand; +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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 2eb0560cb0cc8d49aad3e28491c62d23d92a5f6c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 14 Mar 2024 10:17:03 +0100
Subject: [PATCH] app/testpmd: fix burst option parsing

[ upstream commit 6fa896ae804a7dbd7fb766643f733dbad12bba43 ]

rte_eth_dev_info_get() is not supposed to fail for a valid port_id, but
for the theoretical case when it would fail, raise an error rather than
skip subsequent options.

Fixes: 6f51deb903b2 ("app/testpmd: check status of getting ethdev info")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/parameters.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 92fa786492..be4d0ecec5 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -1115,7 +1115,9 @@ launch_args_parse(int argc, char** argv)
 								0,
 								&dev_info);
 					if (ret != 0)
-						return;
+						rte_exit(EXIT_FAILURE, "Failed to get driver "
+							"recommended burst size, please provide a "
+							"value between 1 and %d\n", MAX_PKT_BURST);
 
 					rec_nb_pkts = dev_info
 						.default_rxportconf.burst_size;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.760621662 +0000
+++ 0012-app-testpmd-fix-burst-option-parsing.patch	2024-03-18 12:58:39.115344777 +0000
@@ -1 +1 @@
-From 6fa896ae804a7dbd7fb766643f733dbad12bba43 Mon Sep 17 00:00:00 2001
+From 2eb0560cb0cc8d49aad3e28491c62d23d92a5f6c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6fa896ae804a7dbd7fb766643f733dbad12bba43 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d715750bb8..3414a0d38c 100644
+index 92fa786492..be4d0ecec5 100644
@@ -23 +24 @@
-@@ -1128,7 +1128,9 @@ launch_args_parse(int argc, char** argv)
+@@ -1115,7 +1115,9 @@ launch_args_parse(int argc, char** argv)

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

* patch 'app/testpmd: fix error message for invalid option' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (10 preceding siblings ...)
  2024-03-18 15:39         ` patch 'app/testpmd: fix burst option parsing' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'net/hns3: support new device' " luca.boccassi
                           ` (14 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: David Marchand; +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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 65b4f90e2e67989b4d2d8beeeba7b71ea9e88fb4 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 14 Mar 2024 10:17:04 +0100
Subject: [PATCH] app/testpmd: fix error message for invalid option

[ upstream commit c25382fa81533429d5968b47b356c79153b76212 ]

"""
The variable optind is the index of the next element to be processed in
argv.  The system initializes this value to 1.  The caller can reset it
to 1 to restart scanning of the same argv, or when scanning a new
argument vector.
"""

Hence, if an invalid option is passed through testpmd cmdline, getopt
returns '?' and increments optind to the next index in argv for a
subsequent call.
The message should log the previous index.

Fixes: 8fad2e5ab2c5 ("app/testpmd: report invalid command line parameter")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 app/test-pmd/parameters.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index be4d0ecec5..2d0a782ee0 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -1469,7 +1469,7 @@ launch_args_parse(int argc, char** argv)
 			break;
 		default:
 			usage(argv[0]);
-			fprintf(stderr, "Invalid option: %s\n", argv[optind]);
+			fprintf(stderr, "Invalid option: %s\n", argv[optind - 1]);
 			rte_exit(EXIT_FAILURE,
 				 "Command line is incomplete or incorrect\n");
 			break;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.799274869 +0000
+++ 0013-app-testpmd-fix-error-message-for-invalid-option.patch	2024-03-18 12:58:39.115344777 +0000
@@ -1 +1 @@
-From c25382fa81533429d5968b47b356c79153b76212 Mon Sep 17 00:00:00 2001
+From 65b4f90e2e67989b4d2d8beeeba7b71ea9e88fb4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c25382fa81533429d5968b47b356c79153b76212 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 3414a0d38c..a4c09e2a2b 100644
+index be4d0ecec5..2d0a782ee0 100644
@@ -31 +32 @@
-@@ -1497,7 +1497,7 @@ launch_args_parse(int argc, char** argv)
+@@ -1469,7 +1469,7 @@ launch_args_parse(int argc, char** argv)

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

* patch 'net/hns3: support new device' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (11 preceding siblings ...)
  2024-03-18 15:39         ` patch 'app/testpmd: fix error message for invalid option' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'net/mlx5: fix HWS meter actions availability' " luca.boccassi
                           ` (13 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: Jie Hai; +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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From c45c771584c29cdc43a22902647240657d30ac45 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Fri, 15 Mar 2024 10:54:48 +0800
Subject: [PATCH] net/hns3: support new device

[ upstream commit 3f1436d7006c2659232305ef2b8b186796319041 ]

This patch introduces the new devices, which are on-chip network
interface controllers with RDMA/DCB/ROH supporting. One is 100GE
and the other is 200GE. Both can be found on HIP09/HIP10 SoCs.

Signed-off-by: Jie Hai <haijie1@huawei.com>
---
 doc/guides/nics/hns3.rst       | 2 +-
 drivers/net/hns3/hns3_cmd.c    | 4 +++-
 drivers/net/hns3/hns3_ethdev.c | 2 ++
 drivers/net/hns3/hns3_ethdev.h | 2 ++
 4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
index 380024600b..836a91f86e 100644
--- a/doc/guides/nics/hns3.rst
+++ b/doc/guides/nics/hns3.rst
@@ -6,7 +6,7 @@ HNS3 Poll Mode Driver
 
 The hns3 PMD (**librte_net_hns3**) provides poll mode driver support
 for the inbuilt HiSilicon Network Subsystem(HNS) network engine
-found in the HiSilicon Kunpeng 920 SoC and Kunpeng 930 SoC .
+found in the HiSilicon Kunpeng 920 SoC (HIP08) and Kunpeng 930 SoC (HIP09/HIP10).
 
 Features
 --------
diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index 7bdf7740c1..fb515ed0ee 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -539,7 +539,9 @@ hns3_set_dcb_capability(struct hns3_hw *hw)
 	if (device_id == HNS3_DEV_ID_25GE_RDMA ||
 	    device_id == HNS3_DEV_ID_50GE_RDMA ||
 	    device_id == HNS3_DEV_ID_100G_RDMA_MACSEC ||
-	    device_id == HNS3_DEV_ID_200G_RDMA)
+	    device_id == HNS3_DEV_ID_200G_RDMA ||
+	    device_id == HNS3_DEV_ID_100G_ROH ||
+	    device_id == HNS3_DEV_ID_200G_ROH)
 		hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_DCB_B, 1);
 }
 
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index eb4223305a..6672b80c21 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6648,6 +6648,8 @@ static const struct rte_pci_id pci_id_hns3_map[] = {
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_50GE_RDMA) },
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_100G_RDMA_MACSEC) },
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_200G_RDMA) },
+	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_100G_ROH) },
+	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, HNS3_DEV_ID_200G_ROH) },
 	{ .vendor_id = 0, }, /* sentinel */
 };
 
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 9e67e93d3f..9f95a523ec 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -28,7 +28,9 @@
 #define HNS3_DEV_ID_25GE_RDMA			0xA222
 #define HNS3_DEV_ID_50GE_RDMA			0xA224
 #define HNS3_DEV_ID_100G_RDMA_MACSEC		0xA226
+#define HNS3_DEV_ID_100G_ROH	                0xA227
 #define HNS3_DEV_ID_200G_RDMA			0xA228
+#define HNS3_DEV_ID_200G_ROH	                0xA22C
 #define HNS3_DEV_ID_100G_VF			0xA22E
 #define HNS3_DEV_ID_100G_RDMA_PFC_VF		0xA22F
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.839014508 +0000
+++ 0014-net-hns3-support-new-device.patch	2024-03-18 12:58:39.127345106 +0000
@@ -1 +1 @@
-From 3f1436d7006c2659232305ef2b8b186796319041 Mon Sep 17 00:00:00 2001
+From c45c771584c29cdc43a22902647240657d30ac45 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3f1436d7006c2659232305ef2b8b186796319041 ]
+
@@ -10,2 +11,0 @@
-Cc: stable@dpdk.org
-
@@ -14,6 +14,5 @@
- doc/guides/nics/hns3.rst               | 2 +-
- doc/guides/rel_notes/release_24_03.rst | 4 ++++
- drivers/net/hns3/hns3_cmd.c            | 4 +++-
- drivers/net/hns3/hns3_ethdev.c         | 2 ++
- drivers/net/hns3/hns3_ethdev.h         | 2 ++
- 5 files changed, 12 insertions(+), 2 deletions(-)
+ doc/guides/nics/hns3.rst       | 2 +-
+ drivers/net/hns3/hns3_cmd.c    | 4 +++-
+ drivers/net/hns3/hns3_ethdev.c | 2 ++
+ drivers/net/hns3/hns3_ethdev.h | 2 ++
+ 4 files changed, 8 insertions(+), 2 deletions(-)
@@ -22 +21 @@
-index 3b0613fc1b..3e84d1ff1c 100644
+index 380024600b..836a91f86e 100644
@@ -34,15 +32,0 @@
-diff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst
-index 8e809456aa..14826ea08f 100644
---- a/doc/guides/rel_notes/release_24_03.rst
-+++ b/doc/guides/rel_notes/release_24_03.rst
-@@ -123,6 +123,10 @@ New Features
- 
-   * Added support for 5760X device family.
- 
-+* **Updated HiSilicon hns3 ethdev driver.**
-+
-+  * Added new device supporting RDMA/DCB/ROH with PCI IDs: ``0xa227, 0xa22c``.
-+
- * **Updated Marvell cnxk net driver.**
- 
-   * Added support for port representors.
@@ -50 +34 @@
-index 2c1664485b..001ff49b36 100644
+index 7bdf7740c1..fb515ed0ee 100644
@@ -53 +37 @@
-@@ -545,7 +545,9 @@ hns3_set_dcb_capability(struct hns3_hw *hw)
+@@ -539,7 +539,9 @@ hns3_set_dcb_capability(struct hns3_hw *hw)
@@ -65 +49 @@
-index b10d1216d2..9730b9a7e9 100644
+index eb4223305a..6672b80c21 100644
@@ -68 +52 @@
-@@ -6649,6 +6649,8 @@ static const struct rte_pci_id pci_id_hns3_map[] = {
+@@ -6648,6 +6648,8 @@ static const struct rte_pci_id pci_id_hns3_map[] = {
@@ -78 +62 @@
-index 12d8299def..e70c5fff2a 100644
+index 9e67e93d3f..9f95a523ec 100644

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

* patch 'net/mlx5: fix HWS meter actions availability' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (12 preceding siblings ...)
  2024-03-18 15:39         ` patch 'net/hns3: support new device' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'doc: update link to Windows DevX in mlx5 guide' " luca.boccassi
                           ` (12 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: 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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From ec91ab121a6b8afee9e2d49bbecc44f89ac18296 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Thu, 7 Mar 2024 12:19:08 +0200
Subject: [PATCH] net/mlx5: fix HWS meter actions availability

[ upstream commit 7576c32eefd3b8444cff7f946361fb5c074634a7 ]

Allow compilation of HWS meter code only on platforms
that support HWS.

Fixes: 24865366e495 ("net/mlx5: support flow meter action for HWS")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_meter.c | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
index 08f8aad70a..bcaf518227 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -618,6 +618,7 @@ mlx5_flow_meter_profile_get(struct rte_eth_dev *dev,
 							meter_profile_id);
 }
 
+#if defined(HAVE_MLX5_HWS_SUPPORT)
 /**
  * Callback to add MTR profile with HWS.
  *
@@ -707,6 +708,7 @@ mlx5_flow_meter_profile_hws_delete(struct rte_eth_dev *dev,
 	memset(fmp, 0, sizeof(struct mlx5_flow_meter_profile));
 	return 0;
 }
+#endif
 
 /**
  * Find policy by id.
@@ -849,6 +851,7 @@ mlx5_flow_meter_policy_validate(struct rte_eth_dev *dev,
 	return 0;
 }
 
+#if defined(HAVE_MLX5_HWS_SUPPORT)
 /**
  * Callback to check MTR policy action validate for HWS
  *
@@ -885,6 +888,7 @@ mlx5_flow_meter_policy_hws_validate(struct rte_eth_dev *dev,
 	}
 	return 0;
 }
+#endif
 
 static int
 __mlx5_flow_meter_policy_delete(struct rte_eth_dev *dev,
@@ -1211,6 +1215,7 @@ mlx5_flow_meter_policy_get(struct rte_eth_dev *dev,
 							      &policy_idx);
 }
 
+#if defined(HAVE_MLX5_HWS_SUPPORT)
 /**
  * Callback to delete MTR policy for HWS.
  *
@@ -1547,7 +1552,7 @@ policy_add_err:
 				  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
 				  NULL, "Failed to create meter policy.");
 }
-
+#endif
 /**
  * Check meter validation.
  *
@@ -1915,6 +1920,7 @@ error:
 		NULL, "Failed to create devx meter.");
 }
 
+#if defined(HAVE_MLX5_HWS_SUPPORT)
 /**
  * Create meter rules.
  *
@@ -1998,6 +2004,7 @@ mlx5_flow_meter_hws_create(struct rte_eth_dev *dev, uint32_t meter_id,
 	__atomic_add_fetch(&policy->ref_cnt, 1, __ATOMIC_RELAXED);
 	return 0;
 }
+#endif
 
 static int
 mlx5_flow_meter_params_flush(struct rte_eth_dev *dev,
@@ -2482,6 +2489,7 @@ static const struct rte_mtr_ops mlx5_flow_mtr_ops = {
 	.stats_read = mlx5_flow_meter_stats_read,
 };
 
+#if defined(HAVE_MLX5_HWS_SUPPORT)
 static const struct rte_mtr_ops mlx5_flow_mtr_hws_ops = {
 	.capabilities_get = mlx5_flow_mtr_cap_get,
 	.meter_profile_add = mlx5_flow_meter_profile_hws_add,
@@ -2500,6 +2508,7 @@ static const struct rte_mtr_ops mlx5_flow_mtr_hws_ops = {
 	.stats_update = NULL,
 	.stats_read = NULL,
 };
+#endif
 
 /**
  * Get meter operations.
@@ -2515,12 +2524,16 @@ static const struct rte_mtr_ops mlx5_flow_mtr_hws_ops = {
 int
 mlx5_flow_meter_ops_get(struct rte_eth_dev *dev __rte_unused, void *arg)
 {
+#if defined(HAVE_MLX5_HWS_SUPPORT)
 	struct mlx5_priv *priv = dev->data->dev_private;
 
 	if (priv->sh->config.dv_flow_en == 2)
 		*(const struct rte_mtr_ops **)arg = &mlx5_flow_mtr_hws_ops;
 	else
 		*(const struct rte_mtr_ops **)arg = &mlx5_flow_mtr_ops;
+#else
+	*(const struct rte_mtr_ops **)arg = &mlx5_flow_mtr_ops;
+#endif
 	return 0;
 }
 
@@ -2899,7 +2912,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
 	struct mlx5_flow_meter_profile *fmp;
 	struct mlx5_legacy_flow_meter *legacy_fm;
 	struct mlx5_flow_meter_info *fm;
-	struct mlx5_flow_meter_policy *policy;
 	struct mlx5_flow_meter_sub_policy *sub_policy;
 	void *tmp;
 	uint32_t i, mtr_idx, policy_idx;
@@ -2967,15 +2979,20 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
 		mlx5_l3t_destroy(priv->policy_idx_tbl);
 		priv->policy_idx_tbl = NULL;
 	}
+#if defined(HAVE_MLX5_HWS_SUPPORT)
 	if (priv->mtr_policy_arr) {
+		struct mlx5_flow_meter_policy *policy;
+
 		for (i = 0; i < priv->mtr_config.nb_meter_policies; i++) {
 			policy = mlx5_flow_meter_policy_find(dev, i,
 							     &policy_idx);
-			if (policy->initialized)
+			if (policy->initialized) {
 				mlx5_flow_meter_policy_hws_delete(dev, i,
 								  error);
+			}
 		}
 	}
+#endif
 	if (priv->mtr_profile_tbl) {
 		MLX5_L3T_FOREACH(priv->mtr_profile_tbl, i, entry) {
 			fmp = entry;
@@ -2989,14 +3006,17 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
 		mlx5_l3t_destroy(priv->mtr_profile_tbl);
 		priv->mtr_profile_tbl = NULL;
 	}
+#if defined(HAVE_MLX5_HWS_SUPPORT)
 	if (priv->mtr_profile_arr) {
 		for (i = 0; i < priv->mtr_config.nb_meter_profiles; i++) {
 			fmp = mlx5_flow_meter_profile_find(priv, i);
-			if (fmp->initialized)
+			if (fmp->initialized) {
 				mlx5_flow_meter_profile_hws_delete(dev, i,
 								   error);
+			}
 		}
 	}
+#endif
 	/* Delete default policy table. */
 	mlx5_flow_destroy_def_policy(dev);
 	if (priv->sh->refcnt == 1)
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.884620038 +0000
+++ 0015-net-mlx5-fix-HWS-meter-actions-availability.patch	2024-03-18 12:58:39.127345106 +0000
@@ -1 +1 @@
-From 7576c32eefd3b8444cff7f946361fb5c074634a7 Mon Sep 17 00:00:00 2001
+From ec91ab121a6b8afee9e2d49bbecc44f89ac18296 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7576c32eefd3b8444cff7f946361fb5c074634a7 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index c0578ce6e9..57de95b4b9 100644
+index 08f8aad70a..bcaf518227 100644
@@ -22 +23 @@
-@@ -896,6 +896,7 @@ mlx5_flow_meter_profile_get(struct rte_eth_dev *dev,
+@@ -618,6 +618,7 @@ mlx5_flow_meter_profile_get(struct rte_eth_dev *dev,
@@ -30 +31 @@
-@@ -981,6 +982,7 @@ mlx5_flow_meter_profile_hws_delete(struct rte_eth_dev *dev,
+@@ -707,6 +708,7 @@ mlx5_flow_meter_profile_hws_delete(struct rte_eth_dev *dev,
@@ -38 +39 @@
-@@ -1123,6 +1125,7 @@ mlx5_flow_meter_policy_validate(struct rte_eth_dev *dev,
+@@ -849,6 +851,7 @@ mlx5_flow_meter_policy_validate(struct rte_eth_dev *dev,
@@ -46 +47 @@
-@@ -1159,6 +1162,7 @@ mlx5_flow_meter_policy_hws_validate(struct rte_eth_dev *dev,
+@@ -885,6 +888,7 @@ mlx5_flow_meter_policy_hws_validate(struct rte_eth_dev *dev,
@@ -54 +55 @@
-@@ -1485,6 +1489,7 @@ mlx5_flow_meter_policy_get(struct rte_eth_dev *dev,
+@@ -1211,6 +1215,7 @@ mlx5_flow_meter_policy_get(struct rte_eth_dev *dev,
@@ -62 +63 @@
-@@ -1807,7 +1812,7 @@ policy_add_err:
+@@ -1547,7 +1552,7 @@ policy_add_err:
@@ -71 +72 @@
-@@ -2177,6 +2182,7 @@ error:
+@@ -1915,6 +1920,7 @@ error:
@@ -79,2 +80,2 @@
-@@ -2260,6 +2266,7 @@ mlx5_flow_meter_hws_create(struct rte_eth_dev *dev, uint32_t meter_id,
- 	__atomic_fetch_add(&policy->ref_cnt, 1, __ATOMIC_RELAXED);
+@@ -1998,6 +2004,7 @@ mlx5_flow_meter_hws_create(struct rte_eth_dev *dev, uint32_t meter_id,
+ 	__atomic_add_fetch(&policy->ref_cnt, 1, __ATOMIC_RELAXED);
@@ -87 +88 @@
-@@ -2744,6 +2751,7 @@ static const struct rte_mtr_ops mlx5_flow_mtr_ops = {
+@@ -2482,6 +2489,7 @@ static const struct rte_mtr_ops mlx5_flow_mtr_ops = {
@@ -95 +96 @@
-@@ -2762,6 +2770,7 @@ static const struct rte_mtr_ops mlx5_flow_mtr_hws_ops = {
+@@ -2500,6 +2508,7 @@ static const struct rte_mtr_ops mlx5_flow_mtr_hws_ops = {
@@ -103 +104 @@
-@@ -2777,12 +2786,16 @@ static const struct rte_mtr_ops mlx5_flow_mtr_hws_ops = {
+@@ -2515,12 +2524,16 @@ static const struct rte_mtr_ops mlx5_flow_mtr_hws_ops = {
@@ -120 +121 @@
-@@ -3161,7 +3174,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
+@@ -2899,7 +2912,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
@@ -128 +129 @@
-@@ -3229,15 +3241,20 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
+@@ -2967,15 +2979,20 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
@@ -150 +151 @@
-@@ -3251,14 +3268,17 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
+@@ -2989,14 +3006,17 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)

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

* patch 'doc: update link to Windows DevX in mlx5 guide' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (13 preceding siblings ...)
  2024-03-18 15:39         ` patch 'net/mlx5: fix HWS meter actions availability' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'net/mlx5: fix VLAN ID in flow modify' " luca.boccassi
                           ` (11 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: Ali Alnubani; +Cc: Tal Shnaiderman, 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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 78b059d7594359a43069c2ba643393bbae73c6e1 Mon Sep 17 00:00:00 2001
From: Ali Alnubani <alialnu@nvidia.com>
Date: Thu, 29 Feb 2024 18:45:26 +0200
Subject: [PATCH] doc: update link to Windows DevX in mlx5 guide

[ upstream commit 5ddc8269192ca7aeec0bf903704c0385ebbd9e87 ]

The older link no longer works.

Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
---
 doc/guides/platform/mlx5.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/platform/mlx5.rst b/doc/guides/platform/mlx5.rst
index 3cc1dd29e2..a8dcba9683 100644
--- a/doc/guides/platform/mlx5.rst
+++ b/doc/guides/platform/mlx5.rst
@@ -228,7 +228,7 @@ DevX SDK Installation
 The DevX SDK must be installed on the machine building the Windows PMD.
 Additional information can be found at
 `How to Integrate Windows DevX in Your Development Environment
-<https://docs.nvidia.com/networking/display/winof2v260/RShim+Drivers+and+Usage#RShimDriversandUsage-DevXInterface>`_.
+<https://docs.nvidia.com/networking/display/winof2v290/devx+interface>`_.
 The minimal supported WinOF2 version is 2.60.
 
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.925298996 +0000
+++ 0016-doc-update-link-to-Windows-DevX-in-mlx5-guide.patch	2024-03-18 12:58:39.131345217 +0000
@@ -1 +1 @@
-From 5ddc8269192ca7aeec0bf903704c0385ebbd9e87 Mon Sep 17 00:00:00 2001
+From 78b059d7594359a43069c2ba643393bbae73c6e1 Mon Sep 17 00:00:00 2001
@@ -6 +6 @@
-The older link no longer works.
+[ upstream commit 5ddc8269192ca7aeec0bf903704c0385ebbd9e87 ]
@@ -8 +8 @@
-Cc: stable@dpdk.org
+The older link no longer works.
@@ -17 +17 @@
-index a66cf778d1..e9a1f52aca 100644
+index 3cc1dd29e2..a8dcba9683 100644
@@ -20 +20 @@
-@@ -230,7 +230,7 @@ DevX SDK Installation
+@@ -228,7 +228,7 @@ DevX SDK Installation

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

* patch 'net/mlx5: fix VLAN ID in flow modify' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (14 preceding siblings ...)
  2024-03-18 15:39         ` patch 'doc: update link to Windows DevX in mlx5 guide' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'net/mlx5: fix meter policy priority' " luca.boccassi
                           ` (10 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: 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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From f5ff0aaf2e79c551419f48ad0b7dfa4bf20bd00c Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Fri, 1 Mar 2024 08:04:48 +0200
Subject: [PATCH] net/mlx5: fix VLAN ID in flow modify

[ upstream commit b89bfdd9be845b7ecfd50d2e9ec77f5cc2ccf94d ]

PMD uses MODIFY_FIELD to implement standalone OF_SET_VLAN_VID flow
action.
PMD assigned immediate VLAN Id value to the `.level` member of the
`rte_flow_action_modify_data` structure instead of `.value`.
That assignment has worked because both members had the same offset in
the hosting structure.

The patch assigns VLAN Id directly to `.value`

Fixes: 773ca0e91ba1 ("net/mlx5: support VLAN push/pop/modify with HWS")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index bb4693c2b4..927be86c36 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -4316,7 +4316,6 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev,
 			rm[set_vlan_vid_ix].conf)->vlan_vid != 0);
 	const struct rte_flow_action_of_set_vlan_vid *conf =
 		ra[set_vlan_vid_ix].conf;
-	rte_be16_t vid = masked ? conf->vlan_vid : 0;
 	int width = mlx5_flow_item_field_width(dev, RTE_FLOW_FIELD_VLAN_ID, 0,
 					       NULL, &error);
 	*spec = (typeof(*spec)) {
@@ -4327,8 +4326,6 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev,
 		},
 		.src = {
 			.field = RTE_FLOW_FIELD_VALUE,
-			.level = vid,
-			.offset = 0,
 		},
 		.width = width,
 	};
@@ -4340,11 +4337,15 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev,
 		},
 		.src = {
 			.field = RTE_FLOW_FIELD_VALUE,
-			.level = masked ? (1U << width) - 1 : 0,
-			.offset = 0,
 		},
 		.width = 0xffffffff,
 	};
+	if (masked) {
+		uint32_t mask_val = 0xffffffff;
+
+		rte_memcpy(spec->src.value, &conf->vlan_vid, sizeof(conf->vlan_vid));
+		rte_memcpy(mask->src.value, &mask_val, sizeof(mask_val));
+	}
 	ra[set_vlan_vid_ix].type = RTE_FLOW_ACTION_TYPE_MODIFY_FIELD;
 	ra[set_vlan_vid_ix].conf = spec;
 	rm[set_vlan_vid_ix].type = RTE_FLOW_ACTION_TYPE_MODIFY_FIELD;
@@ -4371,8 +4372,6 @@ flow_hw_set_vlan_vid_construct(struct rte_eth_dev *dev,
 		},
 		.src = {
 			.field = RTE_FLOW_FIELD_VALUE,
-			.level = vid,
-			.offset = 0,
 		},
 		.width = width,
 	};
@@ -4381,6 +4380,7 @@ flow_hw_set_vlan_vid_construct(struct rte_eth_dev *dev,
 		.conf = &conf
 	};
 
+	rte_memcpy(conf.src.value, &vid, sizeof(vid));
 	return flow_hw_modify_field_construct(job, act_data, hw_acts,
 					      &modify_action);
 }
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.964237119 +0000
+++ 0017-net-mlx5-fix-VLAN-ID-in-flow-modify.patch	2024-03-18 12:58:39.143345546 +0000
@@ -1 +1 @@
-From b89bfdd9be845b7ecfd50d2e9ec77f5cc2ccf94d Mon Sep 17 00:00:00 2001
+From f5ff0aaf2e79c551419f48ad0b7dfa4bf20bd00c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b89bfdd9be845b7ecfd50d2e9ec77f5cc2ccf94d ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index a4e204695e..658f5daf82 100644
+index bb4693c2b4..927be86c36 100644
@@ -28 +29 @@
-@@ -6858,7 +6858,6 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev,
+@@ -4316,7 +4316,6 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev,
@@ -36 +37 @@
-@@ -6869,8 +6868,6 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev,
+@@ -4327,8 +4326,6 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev,
@@ -45 +46 @@
-@@ -6882,11 +6879,15 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev,
+@@ -4340,11 +4337,15 @@ flow_hw_set_vlan_vid(struct rte_eth_dev *dev,
@@ -63 +64 @@
-@@ -6913,8 +6914,6 @@ flow_hw_set_vlan_vid_construct(struct rte_eth_dev *dev,
+@@ -4371,8 +4372,6 @@ flow_hw_set_vlan_vid_construct(struct rte_eth_dev *dev,
@@ -72 +73 @@
-@@ -6923,6 +6922,7 @@ flow_hw_set_vlan_vid_construct(struct rte_eth_dev *dev,
+@@ -4381,6 +4380,7 @@ flow_hw_set_vlan_vid_construct(struct rte_eth_dev *dev,
@@ -77 +78,2 @@
- 	return flow_hw_modify_field_construct(mhdr_cmd, act_data, hw_acts, &modify_action);
+ 	return flow_hw_modify_field_construct(job, act_data, hw_acts,
+ 					      &modify_action);
@@ -79 +80,0 @@
- 

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

* patch 'net/mlx5: fix meter policy priority' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (15 preceding siblings ...)
  2024-03-18 15:39         ` patch 'net/mlx5: fix VLAN ID in flow modify' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'net/mlx5: remove duplication of L3 flow item validation' " luca.boccassi
                           ` (9 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: Shun Hao; +Cc: Bing Zhao, 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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From bad500334cc885e74719dd772ba177e3d2261c83 Mon Sep 17 00:00:00 2001
From: Shun Hao <shunh@nvidia.com>
Date: Fri, 1 Mar 2024 10:46:05 +0200
Subject: [PATCH] net/mlx5: fix meter policy priority

[ upstream commit 1cfb78d2c40e3b3cf1bad061f21f306272fffd47 ]

Currently a meter policy's flows are always using the same priority for
all colors, so the red color flow might be before green/yellow ones.
This will impact the performance cause green/yellow packets will check
red flow first and got miss, then match green/yellow flows, introducing
more hops.

This patch fixes this by giving the same priority to flows for all
colors.

Fixes: 363db9b00f ("net/mlx5: handle yellow case in default meter policy")

Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 41 +++++++++++++++++++--------------
 1 file changed, 24 insertions(+), 17 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 7ed04bdb15..f5f33a9eca 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -17146,9 +17146,8 @@ __flow_dv_create_policy_matcher(struct rte_eth_dev *dev,
 		}
 	}
 	tbl_data = container_of(tbl_rsc, struct mlx5_flow_tbl_data_entry, tbl);
-	if (priority < RTE_COLOR_RED)
-		flow_dv_match_meta_reg(matcher.mask.buf,
-			(enum modify_reg)color_reg_c_idx, color_mask, color_mask);
+	flow_dv_match_meta_reg(matcher.mask.buf,
+		(enum modify_reg)color_reg_c_idx, color_mask, color_mask);
 	matcher.priority = priority;
 	matcher.crc = rte_raw_cksum((const void *)matcher.mask.buf,
 				    matcher.mask.size);
@@ -17199,7 +17198,6 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
 	int i;
 	int ret = mlx5_flow_get_reg_id(dev, MLX5_MTR_COLOR, 0, &flow_err);
 	struct mlx5_sub_policy_color_rule *color_rule;
-	bool svport_match;
 	struct mlx5_sub_policy_color_rule *tmp_rules[RTE_COLORS] = {NULL};
 
 	if (ret < 0)
@@ -17235,10 +17233,9 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
 		/* No use. */
 		attr.priority = i;
 		/* Create matchers for colors. */
-		svport_match = (i != RTE_COLOR_RED) ? match_src_port : false;
 		if (__flow_dv_create_policy_matcher(dev, color_reg_c_idx,
 				MLX5_MTR_POLICY_MATCHER_PRIO, sub_policy,
-				&attr, svport_match, NULL,
+				&attr, match_src_port, NULL,
 				&color_rule->matcher, &flow_err)) {
 			DRV_LOG(ERR, "Failed to create color%u matcher.", i);
 			goto err_exit;
@@ -17248,7 +17245,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
 				color_reg_c_idx, (enum rte_color)i,
 				color_rule->matcher,
 				acts[i].actions_n, acts[i].dv_actions,
-				svport_match, NULL, &color_rule->rule,
+				match_src_port, NULL, &color_rule->rule,
 				&attr)) {
 			DRV_LOG(ERR, "Failed to create color%u rule.", i);
 			goto err_exit;
@@ -18131,7 +18128,7 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
 	struct {
 		struct mlx5_flow_meter_policy *fm_policy;
 		struct mlx5_flow_meter_info *next_fm;
-		struct mlx5_sub_policy_color_rule *tag_rule[MLX5_MTR_RTE_COLORS];
+		struct mlx5_sub_policy_color_rule *tag_rule[RTE_COLORS];
 	} fm_info[MLX5_MTR_CHAIN_MAX_NUM] = { {0} };
 	uint32_t fm_cnt = 0;
 	uint32_t i, j;
@@ -18165,14 +18162,22 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
 		mtr_policy = fm_info[i].fm_policy;
 		rte_spinlock_lock(&mtr_policy->sl);
 		sub_policy = mtr_policy->sub_policys[domain][0];
-		for (j = 0; j < MLX5_MTR_RTE_COLORS; j++) {
+		for (j = 0; j < RTE_COLORS; j++) {
 			uint8_t act_n = 0;
-			struct mlx5_flow_dv_modify_hdr_resource *modify_hdr;
+			struct mlx5_flow_dv_modify_hdr_resource *modify_hdr = NULL;
 			struct mlx5_flow_dv_port_id_action_resource *port_action;
+			uint8_t fate_action;
 
-			if (mtr_policy->act_cnt[j].fate_action != MLX5_FLOW_FATE_MTR &&
-			    mtr_policy->act_cnt[j].fate_action != MLX5_FLOW_FATE_PORT_ID)
-				continue;
+			if (j == RTE_COLOR_RED) {
+				fate_action = MLX5_FLOW_FATE_DROP;
+			} else {
+				fate_action = mtr_policy->act_cnt[j].fate_action;
+				modify_hdr = mtr_policy->act_cnt[j].modify_hdr;
+				if (fate_action != MLX5_FLOW_FATE_MTR &&
+				    fate_action != MLX5_FLOW_FATE_PORT_ID &&
+				    fate_action != MLX5_FLOW_FATE_DROP)
+					continue;
+			}
 			color_rule = mlx5_malloc(MLX5_MEM_ZERO,
 						 sizeof(struct mlx5_sub_policy_color_rule),
 						 0, SOCKET_ID_ANY);
@@ -18184,9 +18189,8 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
 				goto err_exit;
 			}
 			color_rule->src_port = src_port;
-			modify_hdr = mtr_policy->act_cnt[j].modify_hdr;
 			/* Prepare to create color rule. */
-			if (mtr_policy->act_cnt[j].fate_action == MLX5_FLOW_FATE_MTR) {
+			if (fate_action == MLX5_FLOW_FATE_MTR) {
 				next_fm = fm_info[i].next_fm;
 				if (mlx5_flow_meter_attach(priv, next_fm, &attr, error)) {
 					mlx5_free(color_rule);
@@ -18213,7 +18217,7 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
 				}
 				acts.dv_actions[act_n++] = tbl_data->jump.action;
 				acts.actions_n = act_n;
-			} else {
+			} else if (fate_action == MLX5_FLOW_FATE_PORT_ID) {
 				port_action =
 					mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_PORT_ID],
 						       mtr_policy->act_cnt[j].rix_port_id_action);
@@ -18226,6 +18230,9 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
 					acts.dv_actions[act_n++] = modify_hdr->action;
 				acts.dv_actions[act_n++] = port_action->action;
 				acts.actions_n = act_n;
+			} else {
+				acts.dv_actions[act_n++] = mtr_policy->dr_drop_action[domain];
+				acts.actions_n = act_n;
 			}
 			fm_info[i].tag_rule[j] = color_rule;
 			TAILQ_INSERT_TAIL(&sub_policy->color_rules[j], color_rule, next_port);
@@ -18257,7 +18264,7 @@ err_exit:
 		mtr_policy = fm_info[i].fm_policy;
 		rte_spinlock_lock(&mtr_policy->sl);
 		sub_policy = mtr_policy->sub_policys[domain][0];
-		for (j = 0; j < MLX5_MTR_RTE_COLORS; j++) {
+		for (j = 0; j < RTE_COLORS; j++) {
 			color_rule = fm_info[i].tag_rule[j];
 			if (!color_rule)
 				continue;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:40.014648271 +0000
+++ 0018-net-mlx5-fix-meter-policy-priority.patch	2024-03-18 12:58:39.163346097 +0000
@@ -1 +1 @@
-From 1cfb78d2c40e3b3cf1bad061f21f306272fffd47 Mon Sep 17 00:00:00 2001
+From bad500334cc885e74719dd772ba177e3d2261c83 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1cfb78d2c40e3b3cf1bad061f21f306272fffd47 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 18f09b22be..f1584ed6e0 100644
+index 7ed04bdb15..f5f33a9eca 100644
@@ -29 +30 @@
-@@ -17922,9 +17922,8 @@ __flow_dv_create_policy_matcher(struct rte_eth_dev *dev,
+@@ -17146,9 +17146,8 @@ __flow_dv_create_policy_matcher(struct rte_eth_dev *dev,
@@ -41 +42 @@
-@@ -17975,7 +17974,6 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
+@@ -17199,7 +17198,6 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
@@ -49 +50 @@
-@@ -18011,10 +18009,9 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
+@@ -17235,10 +17233,9 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
@@ -61 +62 @@
-@@ -18024,7 +18021,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
+@@ -17248,7 +17245,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
@@ -70 +71 @@
-@@ -18907,7 +18904,7 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
+@@ -18131,7 +18128,7 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
@@ -79 +80 @@
-@@ -18941,14 +18938,22 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
+@@ -18165,14 +18162,22 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
@@ -107 +108 @@
-@@ -18960,9 +18965,8 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
+@@ -18184,9 +18189,8 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
@@ -118 +119 @@
-@@ -18989,7 +18993,7 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
+@@ -18213,7 +18217,7 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
@@ -127 +128 @@
-@@ -19002,6 +19006,9 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
+@@ -18226,6 +18230,9 @@ flow_dv_meter_hierarchy_rule_create(struct rte_eth_dev *dev,
@@ -137 +138 @@
-@@ -19033,7 +19040,7 @@ err_exit:
+@@ -18257,7 +18264,7 @@ err_exit:

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

* patch 'net/mlx5: remove duplication of L3 flow item validation' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (16 preceding siblings ...)
  2024-03-18 15:39         ` patch 'net/mlx5: fix meter policy priority' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'net/mlx5: fix IP-in-IP tunnels recognition' " luca.boccassi
                           ` (8 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: Gregory Etelson; +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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 03243a27739ee97b02d23050b4a6245c239428a1 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Thu, 29 Feb 2024 18:05:03 +0200
Subject: [PATCH] net/mlx5: remove duplication of L3 flow item validation

[ upstream commit 27e44a6f53eccc7d2ce80f6466fa214158f0ee81 ]

Remove code duplications in DV L3 items validation translation.

Fixes: 3193c2494eea ("net/mlx5: fix L4 protocol validation")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 151 +++++++++-----------------------
 1 file changed, 43 insertions(+), 108 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index f5f33a9eca..a4fca70b07 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -6971,6 +6971,40 @@ flow_dv_validate_item_flex(struct rte_eth_dev *dev,
 	return 0;
 }
 
+static __rte_always_inline uint8_t
+mlx5_flow_l3_next_protocol(const struct rte_flow_item *l3_item,
+			   enum MLX5_SET_MATCHER key_type)
+{
+#define MLX5_L3_NEXT_PROTOCOL(i, ms)                                            \
+	((i)->type == RTE_FLOW_ITEM_TYPE_IPV4 ?                                  \
+	((const struct rte_flow_item_ipv4 *)(i)->ms)->hdr.next_proto_id :       \
+	(i)->type == RTE_FLOW_ITEM_TYPE_IPV6 ?                                  \
+	((const struct rte_flow_item_ipv6 *)(i)->ms)->hdr.proto :               \
+	(i)->type == RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT ?                         \
+	((const struct rte_flow_item_ipv6_frag_ext *)(i)->ms)->hdr.next_header :\
+	0xff)
+
+	uint8_t next_protocol;
+
+	if (l3_item->mask != NULL && l3_item->spec != NULL) {
+		next_protocol = MLX5_L3_NEXT_PROTOCOL(l3_item, mask);
+		if (next_protocol)
+			next_protocol &= MLX5_L3_NEXT_PROTOCOL(l3_item, spec);
+		else
+			next_protocol = 0xff;
+	} else if (key_type == MLX5_SET_MATCHER_HS_M && l3_item->mask != NULL) {
+		next_protocol =  MLX5_L3_NEXT_PROTOCOL(l3_item, mask);
+	} else if (key_type == MLX5_SET_MATCHER_HS_V && l3_item->spec != NULL) {
+		next_protocol =  MLX5_L3_NEXT_PROTOCOL(l3_item, spec);
+	} else {
+		/* Reset for inner layer. */
+		next_protocol = 0xff;
+	}
+	return next_protocol;
+
+#undef MLX5_L3_NEXT_PROTOCOL
+}
+
 /**
  * Internal validation function. For validating both actions and items.
  *
@@ -7194,19 +7228,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 				return ret;
 			last_item = tunnel ? MLX5_FLOW_LAYER_INNER_L3_IPV4 :
 					     MLX5_FLOW_LAYER_OUTER_L3_IPV4;
-			if (items->mask != NULL &&
-			    ((const struct rte_flow_item_ipv4 *)
-			     items->mask)->hdr.next_proto_id) {
-				next_protocol =
-					((const struct rte_flow_item_ipv4 *)
-					 (items->spec))->hdr.next_proto_id;
-				next_protocol &=
-					((const struct rte_flow_item_ipv4 *)
-					 (items->mask))->hdr.next_proto_id;
-			} else {
-				/* Reset for inner layer. */
-				next_protocol = 0xff;
-			}
+			next_protocol = mlx5_flow_l3_next_protocol
+				(items, (enum MLX5_SET_MATCHER)-1);
 			break;
 		case RTE_FLOW_ITEM_TYPE_IPV6:
 			mlx5_flow_tunnel_ip_check(items, next_protocol,
@@ -7220,22 +7243,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 				return ret;
 			last_item = tunnel ? MLX5_FLOW_LAYER_INNER_L3_IPV6 :
 					     MLX5_FLOW_LAYER_OUTER_L3_IPV6;
-			if (items->mask != NULL &&
-			    ((const struct rte_flow_item_ipv6 *)
-			     items->mask)->hdr.proto) {
-				item_ipv6_proto =
-					((const struct rte_flow_item_ipv6 *)
-					 items->spec)->hdr.proto;
-				next_protocol =
-					((const struct rte_flow_item_ipv6 *)
-					 items->spec)->hdr.proto;
-				next_protocol &=
-					((const struct rte_flow_item_ipv6 *)
-					 items->mask)->hdr.proto;
-			} else {
-				/* Reset for inner layer. */
-				next_protocol = 0xff;
-			}
+			next_protocol = mlx5_flow_l3_next_protocol
+					(items, (enum MLX5_SET_MATCHER)-1);
 			break;
 		case RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT:
 			ret = flow_dv_validate_item_ipv6_frag_ext(items,
@@ -7246,19 +7255,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			last_item = tunnel ?
 					MLX5_FLOW_LAYER_INNER_L3_IPV6_FRAG_EXT :
 					MLX5_FLOW_LAYER_OUTER_L3_IPV6_FRAG_EXT;
-			if (items->mask != NULL &&
-			    ((const struct rte_flow_item_ipv6_frag_ext *)
-			     items->mask)->hdr.next_header) {
-				next_protocol =
-				((const struct rte_flow_item_ipv6_frag_ext *)
-				 items->spec)->hdr.next_header;
-				next_protocol &=
-				((const struct rte_flow_item_ipv6_frag_ext *)
-				 items->mask)->hdr.next_header;
-			} else {
-				/* Reset for inner layer. */
-				next_protocol = 0xff;
-			}
+			next_protocol = mlx5_flow_l3_next_protocol
+				(items, (enum MLX5_SET_MATCHER)-1);
 			break;
 		case RTE_FLOW_ITEM_TYPE_TCP:
 			ret = mlx5_flow_validate_item_tcp
@@ -13249,28 +13247,7 @@ flow_dv_translate_items(struct rte_eth_dev *dev,
 		wks->priority = MLX5_PRIORITY_MAP_L3;
 		last_item = tunnel ? MLX5_FLOW_LAYER_INNER_L3_IPV4 :
 				     MLX5_FLOW_LAYER_OUTER_L3_IPV4;
-		if (items->mask != NULL &&
-		    items->spec != NULL &&
-			((const struct rte_flow_item_ipv4 *)
-			 items->mask)->hdr.next_proto_id) {
-			next_protocol =
-				((const struct rte_flow_item_ipv4 *)
-				 (items->spec))->hdr.next_proto_id;
-			next_protocol &=
-				((const struct rte_flow_item_ipv4 *)
-				 (items->mask))->hdr.next_proto_id;
-		} else if (key_type == MLX5_SET_MATCHER_HS_M &&
-			   items->mask != NULL) {
-			next_protocol =  ((const struct rte_flow_item_ipv4 *)
-					(items->mask))->hdr.next_proto_id;
-		} else if (key_type == MLX5_SET_MATCHER_HS_V &&
-			   items->spec != NULL) {
-			next_protocol =  ((const struct rte_flow_item_ipv4 *)
-					(items->spec))->hdr.next_proto_id;
-		} else {
-			/* Reset for inner layer. */
-			next_protocol = 0xff;
-		}
+		next_protocol = mlx5_flow_l3_next_protocol(items, key_type);
 		break;
 	case RTE_FLOW_ITEM_TYPE_IPV6:
 		mlx5_flow_tunnel_ip_check(items, next_protocol,
@@ -13280,56 +13257,14 @@ flow_dv_translate_items(struct rte_eth_dev *dev,
 		wks->priority = MLX5_PRIORITY_MAP_L3;
 		last_item = tunnel ? MLX5_FLOW_LAYER_INNER_L3_IPV6 :
 				     MLX5_FLOW_LAYER_OUTER_L3_IPV6;
-		if (items->mask != NULL &&
-		    items->spec != NULL &&
-			((const struct rte_flow_item_ipv6 *)
-			 items->mask)->hdr.proto) {
-			next_protocol =
-				((const struct rte_flow_item_ipv6 *)
-				 items->spec)->hdr.proto;
-			next_protocol &=
-				((const struct rte_flow_item_ipv6 *)
-				 items->mask)->hdr.proto;
-		} else if (key_type == MLX5_SET_MATCHER_HS_M &&
-			   items->mask != NULL) {
-			next_protocol =  ((const struct rte_flow_item_ipv6 *)
-					(items->mask))->hdr.proto;
-		} else if (key_type == MLX5_SET_MATCHER_HS_V &&
-			   items->spec != NULL) {
-			next_protocol =  ((const struct rte_flow_item_ipv6 *)
-					(items->spec))->hdr.proto;
-		} else {
-			/* Reset for inner layer. */
-			next_protocol = 0xff;
-		}
+		next_protocol = mlx5_flow_l3_next_protocol(items, key_type);
 		break;
 	case RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT:
 		flow_dv_translate_item_ipv6_frag_ext
 					(key, items, tunnel, key_type);
 		last_item = tunnel ? MLX5_FLOW_LAYER_INNER_L3_IPV6_FRAG_EXT :
 				     MLX5_FLOW_LAYER_OUTER_L3_IPV6_FRAG_EXT;
-		if (items->mask != NULL &&
-		    items->spec != NULL &&
-			((const struct rte_flow_item_ipv6_frag_ext *)
-			 items->mask)->hdr.next_header) {
-			next_protocol =
-			((const struct rte_flow_item_ipv6_frag_ext *)
-			 items->spec)->hdr.next_header;
-			next_protocol &=
-			((const struct rte_flow_item_ipv6_frag_ext *)
-			 items->mask)->hdr.next_header;
-		} else if (key_type == MLX5_SET_MATCHER_HS_M &&
-			   items->mask != NULL) {
-			next_protocol =  ((const struct rte_flow_item_ipv6_frag_ext *)
-					(items->mask))->hdr.next_header;
-		} else if (key_type == MLX5_SET_MATCHER_HS_V &&
-			   items->spec != NULL) {
-			next_protocol =  ((const struct rte_flow_item_ipv6_frag_ext *)
-					(items->spec))->hdr.next_header;
-		} else {
-			/* Reset for inner layer. */
-			next_protocol = 0xff;
-		}
+		next_protocol = mlx5_flow_l3_next_protocol(items, key_type);
 		break;
 	case RTE_FLOW_ITEM_TYPE_TCP:
 		flow_dv_translate_item_tcp(key, items, tunnel, key_type);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:40.069485295 +0000
+++ 0019-net-mlx5-remove-duplication-of-L3-flow-item-validati.patch	2024-03-18 12:58:39.183346646 +0000
@@ -1 +1 @@
-From 27e44a6f53eccc7d2ce80f6466fa214158f0ee81 Mon Sep 17 00:00:00 2001
+From 03243a27739ee97b02d23050b4a6245c239428a1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 27e44a6f53eccc7d2ce80f6466fa214158f0ee81 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index f1584ed6e0..9e444c8a1c 100644
+index f5f33a9eca..a4fca70b07 100644
@@ -21 +22 @@
-@@ -7488,6 +7488,40 @@ flow_dv_validate_item_flex(struct rte_eth_dev *dev,
+@@ -6971,6 +6971,40 @@ flow_dv_validate_item_flex(struct rte_eth_dev *dev,
@@ -60 +61 @@
-  * Validate IB BTH item.
+  * Internal validation function. For validating both actions and items.
@@ -62 +63 @@
-@@ -7770,19 +7804,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7194,19 +7228,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -84 +85 @@
-@@ -7796,22 +7819,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7220,22 +7243,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -109 +110 @@
-@@ -7822,19 +7831,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7246,19 +7255,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -131 +132 @@
-@@ -13997,28 +13995,7 @@ flow_dv_translate_items(struct rte_eth_dev *dev,
+@@ -13249,28 +13247,7 @@ flow_dv_translate_items(struct rte_eth_dev *dev,
@@ -161 +162 @@
-@@ -14028,56 +14005,14 @@ flow_dv_translate_items(struct rte_eth_dev *dev,
+@@ -13280,56 +13257,14 @@ flow_dv_translate_items(struct rte_eth_dev *dev,

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

* patch 'net/mlx5: fix IP-in-IP tunnels recognition' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (17 preceding siblings ...)
  2024-03-18 15:39         ` patch 'net/mlx5: remove duplication of L3 flow item validation' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'net/mlx5: fix DR context release ordering' " luca.boccassi
                           ` (7 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: Gregory Etelson; +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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From fd3721be47bb39a9b67467e97a848d4b493bd1bd Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Thu, 29 Feb 2024 18:05:04 +0200
Subject: [PATCH] net/mlx5: fix IP-in-IP tunnels recognition

[ upstream commit 2db234e769e121446b7b6d8e97e00212bebf7a3c ]

The patch fixes IP-in-IP tunnel recognition for the following patterns

 / [ipv4|ipv6] proto is [ipv4|ipv6] / end

 / [ipv4|ipv6] / [ipv4|ipv6] /

Fixes: 3d69434113d1 ("net/mlx5: add Direct Verbs validation function")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 104 ++++++++++++++++++++++++--------
 1 file changed, 80 insertions(+), 24 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index a4fca70b07..68d3ee0c36 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -267,21 +267,41 @@ struct field_modify_info modify_tcp[] = {
 	{0, 0, 0},
 };
 
-static void
+enum mlx5_l3_tunnel_detection {
+	l3_tunnel_none,
+	l3_tunnel_outer,
+	l3_tunnel_inner
+};
+
+static enum mlx5_l3_tunnel_detection
 mlx5_flow_tunnel_ip_check(const struct rte_flow_item *item __rte_unused,
-			  uint8_t next_protocol, uint64_t *item_flags,
-			  int *tunnel)
+			  uint8_t next_protocol, uint64_t item_flags,
+			  uint64_t *l3_tunnel_flag)
 {
+	enum mlx5_l3_tunnel_detection td = l3_tunnel_none;
+
 	MLX5_ASSERT(item->type == RTE_FLOW_ITEM_TYPE_IPV4 ||
 		    item->type == RTE_FLOW_ITEM_TYPE_IPV6);
-	if (next_protocol == IPPROTO_IPIP) {
-		*item_flags |= MLX5_FLOW_LAYER_IPIP;
-		*tunnel = 1;
-	}
-	if (next_protocol == IPPROTO_IPV6) {
-		*item_flags |= MLX5_FLOW_LAYER_IPV6_ENCAP;
-		*tunnel = 1;
+	if ((item_flags & MLX5_FLOW_LAYER_OUTER_L3) == 0) {
+		switch (next_protocol) {
+		case IPPROTO_IPIP:
+			td = l3_tunnel_outer;
+			*l3_tunnel_flag = MLX5_FLOW_LAYER_IPIP;
+			break;
+		case IPPROTO_IPV6:
+			td = l3_tunnel_outer;
+			*l3_tunnel_flag = MLX5_FLOW_LAYER_IPV6_ENCAP;
+			break;
+		default:
+			break;
+		}
+	} else {
+		td = l3_tunnel_inner;
+		*l3_tunnel_flag = item->type == RTE_FLOW_ITEM_TYPE_IPV4 ?
+				  MLX5_FLOW_LAYER_IPIP :
+				  MLX5_FLOW_LAYER_IPV6_ENCAP;
 	}
+	return td;
 }
 
 static inline struct mlx5_hlist *
@@ -7142,6 +7162,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 		return ret;
 	is_root = (uint64_t)ret;
 	for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
+		enum mlx5_l3_tunnel_detection l3_tunnel_detection;
+		uint64_t l3_tunnel_flag;
 		int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);
 		int type = items->type;
 
@@ -7219,8 +7241,16 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 				vlan_m = items->mask;
 			break;
 		case RTE_FLOW_ITEM_TYPE_IPV4:
-			mlx5_flow_tunnel_ip_check(items, next_protocol,
-						  &item_flags, &tunnel);
+			next_protocol = mlx5_flow_l3_next_protocol
+				(items, (enum MLX5_SET_MATCHER)-1);
+			l3_tunnel_detection =
+				mlx5_flow_tunnel_ip_check(items, next_protocol,
+							  item_flags,
+							  &l3_tunnel_flag);
+			if (l3_tunnel_detection == l3_tunnel_inner) {
+				item_flags |= l3_tunnel_flag;
+				tunnel = 1;
+			}
 			ret = flow_dv_validate_item_ipv4(dev, items, item_flags,
 							 last_item, ether_type,
 							 error);
@@ -7228,12 +7258,20 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 				return ret;
 			last_item = tunnel ? MLX5_FLOW_LAYER_INNER_L3_IPV4 :
 					     MLX5_FLOW_LAYER_OUTER_L3_IPV4;
-			next_protocol = mlx5_flow_l3_next_protocol
-				(items, (enum MLX5_SET_MATCHER)-1);
+			if (l3_tunnel_detection == l3_tunnel_outer)
+				item_flags |= l3_tunnel_flag;
 			break;
 		case RTE_FLOW_ITEM_TYPE_IPV6:
-			mlx5_flow_tunnel_ip_check(items, next_protocol,
-						  &item_flags, &tunnel);
+			next_protocol = mlx5_flow_l3_next_protocol
+				(items, (enum MLX5_SET_MATCHER)-1);
+			l3_tunnel_detection =
+				mlx5_flow_tunnel_ip_check(items, next_protocol,
+							  item_flags,
+							  &l3_tunnel_flag);
+			if (l3_tunnel_detection == l3_tunnel_inner) {
+				item_flags |= l3_tunnel_flag;
+				tunnel = 1;
+			}
 			ret = mlx5_flow_validate_item_ipv6(items, item_flags,
 							   last_item,
 							   ether_type,
@@ -7243,8 +7281,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 				return ret;
 			last_item = tunnel ? MLX5_FLOW_LAYER_INNER_L3_IPV6 :
 					     MLX5_FLOW_LAYER_OUTER_L3_IPV6;
-			next_protocol = mlx5_flow_l3_next_protocol
-					(items, (enum MLX5_SET_MATCHER)-1);
+			if (l3_tunnel_detection == l3_tunnel_outer)
+				item_flags |= l3_tunnel_flag;
 			break;
 		case RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT:
 			ret = flow_dv_validate_item_ipv6_frag_ext(items,
@@ -13197,6 +13235,8 @@ flow_dv_translate_items(struct rte_eth_dev *dev,
 	int tunnel = !!(wks->item_flags & MLX5_FLOW_LAYER_TUNNEL);
 	int item_type = items->type;
 	uint64_t last_item = wks->last_item;
+	enum mlx5_l3_tunnel_detection l3_tunnel_detection;
+	uint64_t l3_tunnel_flag;
 	int ret;
 
 	switch (item_type) {
@@ -13240,24 +13280,40 @@ flow_dv_translate_items(struct rte_eth_dev *dev,
 					  MLX5_FLOW_LAYER_OUTER_VLAN);
 		break;
 	case RTE_FLOW_ITEM_TYPE_IPV4:
-		mlx5_flow_tunnel_ip_check(items, next_protocol,
-					  &wks->item_flags, &tunnel);
+		next_protocol = mlx5_flow_l3_next_protocol(items, key_type);
+		l3_tunnel_detection =
+			mlx5_flow_tunnel_ip_check(items, next_protocol,
+						  wks->item_flags,
+						  &l3_tunnel_flag);
+		if (l3_tunnel_detection == l3_tunnel_inner) {
+			wks->item_flags |= l3_tunnel_flag;
+			tunnel = 1;
+		}
 		flow_dv_translate_item_ipv4(key, items, tunnel,
 					    wks->group, key_type);
 		wks->priority = MLX5_PRIORITY_MAP_L3;
 		last_item = tunnel ? MLX5_FLOW_LAYER_INNER_L3_IPV4 :
 				     MLX5_FLOW_LAYER_OUTER_L3_IPV4;
-		next_protocol = mlx5_flow_l3_next_protocol(items, key_type);
+		if (l3_tunnel_detection == l3_tunnel_outer)
+			wks->item_flags |= l3_tunnel_flag;
 		break;
 	case RTE_FLOW_ITEM_TYPE_IPV6:
-		mlx5_flow_tunnel_ip_check(items, next_protocol,
-					  &wks->item_flags, &tunnel);
+		next_protocol = mlx5_flow_l3_next_protocol(items, key_type);
+		l3_tunnel_detection =
+			mlx5_flow_tunnel_ip_check(items, next_protocol,
+						  wks->item_flags,
+						  &l3_tunnel_flag);
+		if (l3_tunnel_detection == l3_tunnel_inner) {
+			wks->item_flags |= l3_tunnel_flag;
+			tunnel = 1;
+		}
 		flow_dv_translate_item_ipv6(key, items, tunnel,
 					    wks->group, key_type);
 		wks->priority = MLX5_PRIORITY_MAP_L3;
 		last_item = tunnel ? MLX5_FLOW_LAYER_INNER_L3_IPV6 :
 				     MLX5_FLOW_LAYER_OUTER_L3_IPV6;
-		next_protocol = mlx5_flow_l3_next_protocol(items, key_type);
+		if (l3_tunnel_detection == l3_tunnel_outer)
+			wks->item_flags |= l3_tunnel_flag;
 		break;
 	case RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT:
 		flow_dv_translate_item_ipv6_frag_ext
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:40.123113801 +0000
+++ 0020-net-mlx5-fix-IP-in-IP-tunnels-recognition.patch	2024-03-18 12:58:39.199347086 +0000
@@ -1 +1 @@
-From 2db234e769e121446b7b6d8e97e00212bebf7a3c Mon Sep 17 00:00:00 2001
+From fd3721be47bb39a9b67467e97a848d4b493bd1bd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2db234e769e121446b7b6d8e97e00212bebf7a3c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 9e444c8a1c..80239bebee 100644
+index a4fca70b07..68d3ee0c36 100644
@@ -25 +26 @@
-@@ -275,21 +275,41 @@ struct field_modify_info modify_tcp[] = {
+@@ -267,21 +267,41 @@ struct field_modify_info modify_tcp[] = {
@@ -77 +78 @@
-@@ -7718,6 +7738,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7142,6 +7162,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -86 +87 @@
-@@ -7795,8 +7817,16 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7219,8 +7241,16 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -105 +106 @@
-@@ -7804,12 +7834,20 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7228,12 +7258,20 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -130 +131 @@
-@@ -7819,8 +7857,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -7243,8 +7281,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -141 +142 @@
-@@ -13945,6 +13983,8 @@ flow_dv_translate_items(struct rte_eth_dev *dev,
+@@ -13197,6 +13235,8 @@ flow_dv_translate_items(struct rte_eth_dev *dev,
@@ -150 +151 @@
-@@ -13988,24 +14028,40 @@ flow_dv_translate_items(struct rte_eth_dev *dev,
+@@ -13240,24 +13280,40 @@ flow_dv_translate_items(struct rte_eth_dev *dev,

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

* patch 'net/mlx5: fix DR context release ordering' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (18 preceding siblings ...)
  2024-03-18 15:39         ` patch 'net/mlx5: fix IP-in-IP tunnels recognition' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'net/mlx5: fix template clean up of FDB control flow rule' " luca.boccassi
                           ` (6 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: Maayan Kashani; +Cc: 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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 7858502f9ae5ff1df72fd9ccf4ff12d8a57bbf38 Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani@nvidia.com>
Date: Wed, 6 Mar 2024 08:02:07 +0200
Subject: [PATCH] net/mlx5: fix DR context release ordering

[ upstream commit d068681b637da6b7857c13711eb1a675b2a341e3 ]

Creating rules on group >0, creates a jump action on the group table.
Non template code releases the group data under shared mlx5dr free code,
And the mlx5dr context was already closed in HWS code.

Remove mlx5dr context release from hws resource release function.

Fixes: b401400db24e ("net/mlx5: add port flow configuration")

Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5.c         | 7 +++++++
 drivers/net/mlx5/mlx5_flow_hw.c | 2 --
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index d41b0d1363..4d76da484b 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2058,6 +2058,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 	mlx5_flex_item_port_cleanup(dev);
 #ifdef HAVE_MLX5_HWS_SUPPORT
 	flow_hw_destroy_vport_action(dev);
+	/* dr context will be closed after mlx5_os_free_shared_dr. */
 	flow_hw_resource_release(dev);
 	flow_hw_clear_port_info(dev);
 	if (priv->sh->config.dv_flow_en == 2) {
@@ -2093,6 +2094,12 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 		mlx5_hlist_destroy(priv->mreg_cp_tbl);
 	mlx5_mprq_free_mp(dev);
 	mlx5_os_free_shared_dr(priv);
+#ifdef HAVE_MLX5_HWS_SUPPORT
+	if (priv->dr_ctx) {
+		claim_zero(mlx5dr_context_close(priv->dr_ctx));
+		priv->dr_ctx = NULL;
+	}
+#endif
 	if (priv->rss_conf.rss_key != NULL)
 		mlx5_free(priv->rss_conf.rss_key);
 	if (priv->reta_idx != NULL)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 927be86c36..881aa40262 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -7407,8 +7407,6 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
 	}
 	mlx5_free(priv->hw_q);
 	priv->hw_q = NULL;
-	claim_zero(mlx5dr_context_close(priv->dr_ctx));
-	priv->dr_ctx = NULL;
 	priv->nb_queue = 0;
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:40.176495177 +0000
+++ 0021-net-mlx5-fix-DR-context-release-ordering.patch	2024-03-18 12:58:39.211347416 +0000
@@ -1 +1 @@
-From d068681b637da6b7857c13711eb1a675b2a341e3 Mon Sep 17 00:00:00 2001
+From 7858502f9ae5ff1df72fd9ccf4ff12d8a57bbf38 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d068681b637da6b7857c13711eb1a675b2a341e3 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 39dc1830d1..8b54843a43 100644
+index d41b0d1363..4d76da484b 100644
@@ -26,2 +27,2 @@
-@@ -2355,6 +2355,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)
- 	mlx5_indirect_list_handles_release(dev);
+@@ -2058,6 +2058,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+ 	mlx5_flex_item_port_cleanup(dev);
@@ -33,2 +34,2 @@
- 	if (priv->tlv_options != NULL) {
-@@ -2391,6 +2392,12 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+ 	if (priv->sh->config.dv_flow_en == 2) {
+@@ -2093,6 +2094,12 @@ mlx5_dev_close(struct rte_eth_dev *dev)
@@ -48 +49 @@
-index 817461017f..c89bd00fb0 100644
+index 927be86c36..881aa40262 100644
@@ -51 +52 @@
-@@ -10734,13 +10734,11 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
+@@ -7407,8 +7407,6 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
@@ -56,5 +56,0 @@
- 	if (priv->shared_host) {
- 		struct mlx5_priv *host_priv = priv->shared_host->data->dev_private;
- 		__atomic_fetch_sub(&host_priv->shared_refcnt, 1, __ATOMIC_RELAXED);
- 		priv->shared_host = NULL;
- 	}
@@ -62,2 +57,0 @@
- 	mlx5_free(priv->hw_attr);
- 	priv->hw_attr = NULL;
@@ -64,0 +59,2 @@
+ }
+ 

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

* patch 'net/mlx5: fix template clean up of FDB control flow rule' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (19 preceding siblings ...)
  2024-03-18 15:39         ` patch 'net/mlx5: fix DR context release ordering' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'net/mlx5: prevent ioctl failure log flooding' " luca.boccassi
                           ` (5 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 3be62ef2f36b7afedfd69ee2989cd5b6ae115208 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Wed, 6 Mar 2024 21:21:48 +0100
Subject: [PATCH] net/mlx5: fix template clean up of FDB control flow rule

[ upstream commit 48db3b61c3b81c6efcd343b7929a000eb998cb0b ]

This patch refactors the creation and clean up of templates used for
FDB control flow rules, when HWS is enabled.
All pattern and actions templates, and template tables are stored
in a separate structure, `mlx5_flow_hw_ctrl_fdb`. It is allocated
if and only if E-Switch is enabled.
During HWS clean up, all of these templates are explicitly destroyed,
instead of relying on templates general templates clean up.

Fixes: 1939eb6f660c ("net/mlx5: support flow port action with HWS")
Fixes: 49dffadf4b0c ("net/mlx5: fix LACP redirection in Rx domain")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5.h         |   6 +-
 drivers/net/mlx5/mlx5_flow.h    |  19 +++
 drivers/net/mlx5/mlx5_flow_hw.c | 255 ++++++++++++++++++--------------
 3 files changed, 166 insertions(+), 114 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 9832b6df52..ca0e9ee647 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1739,11 +1739,7 @@ struct mlx5_priv {
 	rte_spinlock_t hw_ctrl_lock;
 	LIST_HEAD(hw_ctrl_flow, mlx5_hw_ctrl_flow) hw_ctrl_flows;
 	LIST_HEAD(hw_ext_ctrl_flow, mlx5_hw_ctrl_flow) hw_ext_ctrl_flows;
-	struct rte_flow_template_table *hw_esw_sq_miss_root_tbl;
-	struct rte_flow_template_table *hw_esw_sq_miss_tbl;
-	struct rte_flow_template_table *hw_esw_zero_tbl;
-	struct rte_flow_template_table *hw_tx_meta_cpy_tbl;
-	struct rte_flow_template_table *hw_lacp_rx_tbl;
+	struct mlx5_flow_hw_ctrl_fdb *hw_ctrl_fdb;
 	struct rte_flow_pattern_template *hw_tx_repr_tagging_pt;
 	struct rte_flow_actions_template *hw_tx_repr_tagging_at;
 	struct rte_flow_template_table *hw_tx_repr_tagging_tbl;
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 42db9ba12a..9ce34ef556 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -2186,6 +2186,25 @@ struct mlx5_flow_hw_ctrl_rx {
 						[MLX5_FLOW_HW_CTRL_RX_EXPANDED_RSS_MAX];
 };
 
+/* Contains all templates required for control flow rules in FDB with HWS. */
+struct mlx5_flow_hw_ctrl_fdb {
+	struct rte_flow_pattern_template *esw_mgr_items_tmpl;
+	struct rte_flow_actions_template *regc_jump_actions_tmpl;
+	struct rte_flow_template_table *hw_esw_sq_miss_root_tbl;
+	struct rte_flow_pattern_template *regc_sq_items_tmpl;
+	struct rte_flow_actions_template *port_actions_tmpl;
+	struct rte_flow_template_table *hw_esw_sq_miss_tbl;
+	struct rte_flow_pattern_template *port_items_tmpl;
+	struct rte_flow_actions_template *jump_one_actions_tmpl;
+	struct rte_flow_template_table *hw_esw_zero_tbl;
+	struct rte_flow_pattern_template *tx_meta_items_tmpl;
+	struct rte_flow_actions_template *tx_meta_actions_tmpl;
+	struct rte_flow_template_table *hw_tx_meta_cpy_tbl;
+	struct rte_flow_pattern_template *lacp_rx_items_tmpl;
+	struct rte_flow_actions_template *lacp_rx_actions_tmpl;
+	struct rte_flow_template_table *hw_lacp_rx_tbl;
+};
+
 #define MLX5_CTRL_PROMISCUOUS    (RTE_BIT32(0))
 #define MLX5_CTRL_ALL_MULTICAST  (RTE_BIT32(1))
 #define MLX5_CTRL_BROADCAST      (RTE_BIT32(2))
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 881aa40262..f4e125667f 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -6287,6 +6287,72 @@ flow_hw_create_ctrl_jump_table(struct rte_eth_dev *dev,
 	return flow_hw_table_create(dev, &cfg, &it, 1, &at, 1, error);
 }
 
+/**
+ * Cleans up all template tables and pattern, and actions templates used for
+ * FDB control flow rules.
+ *
+ * @param dev
+ *   Pointer to Ethernet device.
+ */
+static void
+flow_hw_cleanup_ctrl_fdb_tables(struct rte_eth_dev *dev)
+{
+	struct mlx5_priv *priv = dev->data->dev_private;
+	struct mlx5_flow_hw_ctrl_fdb *hw_ctrl_fdb;
+
+	if (!priv->hw_ctrl_fdb)
+		return;
+	hw_ctrl_fdb = priv->hw_ctrl_fdb;
+	/* Clean up templates used for LACP default miss table. */
+	if (hw_ctrl_fdb->hw_lacp_rx_tbl)
+		claim_zero(flow_hw_table_destroy(dev, hw_ctrl_fdb->hw_lacp_rx_tbl, NULL));
+	if (hw_ctrl_fdb->lacp_rx_actions_tmpl)
+		claim_zero(flow_hw_actions_template_destroy(dev, hw_ctrl_fdb->lacp_rx_actions_tmpl,
+			   NULL));
+	if (hw_ctrl_fdb->lacp_rx_items_tmpl)
+		claim_zero(flow_hw_pattern_template_destroy(dev, hw_ctrl_fdb->lacp_rx_items_tmpl,
+			   NULL));
+	/* Clean up templates used for default Tx metadata copy. */
+	if (hw_ctrl_fdb->hw_tx_meta_cpy_tbl)
+		claim_zero(flow_hw_table_destroy(dev, hw_ctrl_fdb->hw_tx_meta_cpy_tbl, NULL));
+	if (hw_ctrl_fdb->tx_meta_actions_tmpl)
+		claim_zero(flow_hw_actions_template_destroy(dev, hw_ctrl_fdb->tx_meta_actions_tmpl,
+			   NULL));
+	if (hw_ctrl_fdb->tx_meta_items_tmpl)
+		claim_zero(flow_hw_pattern_template_destroy(dev, hw_ctrl_fdb->tx_meta_items_tmpl,
+			   NULL));
+	/* Clean up templates used for default FDB jump rule. */
+	if (hw_ctrl_fdb->hw_esw_zero_tbl)
+		claim_zero(flow_hw_table_destroy(dev, hw_ctrl_fdb->hw_esw_zero_tbl, NULL));
+	if (hw_ctrl_fdb->jump_one_actions_tmpl)
+		claim_zero(flow_hw_actions_template_destroy(dev, hw_ctrl_fdb->jump_one_actions_tmpl,
+			   NULL));
+	if (hw_ctrl_fdb->port_items_tmpl)
+		claim_zero(flow_hw_pattern_template_destroy(dev, hw_ctrl_fdb->port_items_tmpl,
+			   NULL));
+	/* Clean up templates used for default SQ miss flow rules - non-root table. */
+	if (hw_ctrl_fdb->hw_esw_sq_miss_tbl)
+		claim_zero(flow_hw_table_destroy(dev, hw_ctrl_fdb->hw_esw_sq_miss_tbl, NULL));
+	if (hw_ctrl_fdb->regc_sq_items_tmpl)
+		claim_zero(flow_hw_pattern_template_destroy(dev, hw_ctrl_fdb->regc_sq_items_tmpl,
+			   NULL));
+	if (hw_ctrl_fdb->port_actions_tmpl)
+		claim_zero(flow_hw_actions_template_destroy(dev, hw_ctrl_fdb->port_actions_tmpl,
+			   NULL));
+	/* Clean up templates used for default SQ miss flow rules - root table. */
+	if (hw_ctrl_fdb->hw_esw_sq_miss_root_tbl)
+		claim_zero(flow_hw_table_destroy(dev, hw_ctrl_fdb->hw_esw_sq_miss_root_tbl, NULL));
+	if (hw_ctrl_fdb->regc_jump_actions_tmpl)
+		claim_zero(flow_hw_actions_template_destroy(dev,
+			   hw_ctrl_fdb->regc_jump_actions_tmpl, NULL));
+	if (hw_ctrl_fdb->esw_mgr_items_tmpl)
+		claim_zero(flow_hw_pattern_template_destroy(dev, hw_ctrl_fdb->esw_mgr_items_tmpl,
+			   NULL));
+	/* Clean up templates structure for FDB control flow rules. */
+	mlx5_free(hw_ctrl_fdb);
+	priv->hw_ctrl_fdb = NULL;
+}
+
 /*
  * Create a table on the root group to for the LACP traffic redirecting.
  *
@@ -6336,110 +6402,109 @@ flow_hw_create_lacp_rx_table(struct rte_eth_dev *dev,
  * @return
  *   0 on success, negative values otherwise
  */
-static __rte_unused int
+static int
 flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
-	struct rte_flow_pattern_template *esw_mgr_items_tmpl = NULL;
-	struct rte_flow_pattern_template *regc_sq_items_tmpl = NULL;
-	struct rte_flow_pattern_template *port_items_tmpl = NULL;
-	struct rte_flow_pattern_template *tx_meta_items_tmpl = NULL;
-	struct rte_flow_pattern_template *lacp_rx_items_tmpl = NULL;
-	struct rte_flow_actions_template *regc_jump_actions_tmpl = NULL;
-	struct rte_flow_actions_template *port_actions_tmpl = NULL;
-	struct rte_flow_actions_template *jump_one_actions_tmpl = NULL;
-	struct rte_flow_actions_template *tx_meta_actions_tmpl = NULL;
-	struct rte_flow_actions_template *lacp_rx_actions_tmpl = NULL;
+	struct mlx5_flow_hw_ctrl_fdb *hw_ctrl_fdb;
 	uint32_t xmeta = priv->sh->config.dv_xmeta_en;
 	uint32_t repr_matching = priv->sh->config.repr_matching;
-	int ret;
 
+	MLX5_ASSERT(priv->hw_ctrl_fdb == NULL);
+	hw_ctrl_fdb = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*hw_ctrl_fdb), 0, SOCKET_ID_ANY);
+	if (!hw_ctrl_fdb) {
+		DRV_LOG(ERR, "port %u failed to allocate memory for FDB control flow templates",
+			dev->data->port_id);
+		rte_errno = ENOMEM;
+		goto err;
+	}
+	priv->hw_ctrl_fdb = hw_ctrl_fdb;
 	/* Create templates and table for default SQ miss flow rules - root table. */
-	esw_mgr_items_tmpl = flow_hw_create_ctrl_esw_mgr_pattern_template(dev, error);
-	if (!esw_mgr_items_tmpl) {
+	hw_ctrl_fdb->esw_mgr_items_tmpl = flow_hw_create_ctrl_esw_mgr_pattern_template(dev, error);
+	if (!hw_ctrl_fdb->esw_mgr_items_tmpl) {
 		DRV_LOG(ERR, "port %u failed to create E-Switch Manager item"
 			" template for control flows", dev->data->port_id);
 		goto err;
 	}
-	regc_jump_actions_tmpl = flow_hw_create_ctrl_regc_jump_actions_template(dev, error);
-	if (!regc_jump_actions_tmpl) {
+	hw_ctrl_fdb->regc_jump_actions_tmpl = flow_hw_create_ctrl_regc_jump_actions_template
+			(dev, error);
+	if (!hw_ctrl_fdb->regc_jump_actions_tmpl) {
 		DRV_LOG(ERR, "port %u failed to create REG_C set and jump action template"
 			" for control flows", dev->data->port_id);
 		goto err;
 	}
-	MLX5_ASSERT(priv->hw_esw_sq_miss_root_tbl == NULL);
-	priv->hw_esw_sq_miss_root_tbl = flow_hw_create_ctrl_sq_miss_root_table
-			(dev, esw_mgr_items_tmpl, regc_jump_actions_tmpl, error);
-	if (!priv->hw_esw_sq_miss_root_tbl) {
+	hw_ctrl_fdb->hw_esw_sq_miss_root_tbl = flow_hw_create_ctrl_sq_miss_root_table
+			(dev, hw_ctrl_fdb->esw_mgr_items_tmpl, hw_ctrl_fdb->regc_jump_actions_tmpl,
+			 error);
+	if (!hw_ctrl_fdb->hw_esw_sq_miss_root_tbl) {
 		DRV_LOG(ERR, "port %u failed to create table for default sq miss (root table)"
 			" for control flows", dev->data->port_id);
 		goto err;
 	}
 	/* Create templates and table for default SQ miss flow rules - non-root table. */
-	regc_sq_items_tmpl = flow_hw_create_ctrl_regc_sq_pattern_template(dev, error);
-	if (!regc_sq_items_tmpl) {
+	hw_ctrl_fdb->regc_sq_items_tmpl = flow_hw_create_ctrl_regc_sq_pattern_template(dev, error);
+	if (!hw_ctrl_fdb->regc_sq_items_tmpl) {
 		DRV_LOG(ERR, "port %u failed to create SQ item template for"
 			" control flows", dev->data->port_id);
 		goto err;
 	}
-	port_actions_tmpl = flow_hw_create_ctrl_port_actions_template(dev, error);
-	if (!port_actions_tmpl) {
+	hw_ctrl_fdb->port_actions_tmpl = flow_hw_create_ctrl_port_actions_template(dev, error);
+	if (!hw_ctrl_fdb->port_actions_tmpl) {
 		DRV_LOG(ERR, "port %u failed to create port action template"
 			" for control flows", dev->data->port_id);
 		goto err;
 	}
-	MLX5_ASSERT(priv->hw_esw_sq_miss_tbl == NULL);
-	priv->hw_esw_sq_miss_tbl = flow_hw_create_ctrl_sq_miss_table(dev, regc_sq_items_tmpl,
-								     port_actions_tmpl, error);
-	if (!priv->hw_esw_sq_miss_tbl) {
+	hw_ctrl_fdb->hw_esw_sq_miss_tbl = flow_hw_create_ctrl_sq_miss_table
+			(dev, hw_ctrl_fdb->regc_sq_items_tmpl, hw_ctrl_fdb->port_actions_tmpl,
+			 error);
+	if (!hw_ctrl_fdb->hw_esw_sq_miss_tbl) {
 		DRV_LOG(ERR, "port %u failed to create table for default sq miss (non-root table)"
 			" for control flows", dev->data->port_id);
 		goto err;
 	}
 	/* Create templates and table for default FDB jump flow rules. */
-	port_items_tmpl = flow_hw_create_ctrl_port_pattern_template(dev, error);
-	if (!port_items_tmpl) {
+	hw_ctrl_fdb->port_items_tmpl = flow_hw_create_ctrl_port_pattern_template(dev, error);
+	if (!hw_ctrl_fdb->port_items_tmpl) {
 		DRV_LOG(ERR, "port %u failed to create SQ item template for"
 			" control flows", dev->data->port_id);
 		goto err;
 	}
-	jump_one_actions_tmpl = flow_hw_create_ctrl_jump_actions_template
+	hw_ctrl_fdb->jump_one_actions_tmpl = flow_hw_create_ctrl_jump_actions_template
 			(dev, MLX5_HW_LOWEST_USABLE_GROUP, error);
-	if (!jump_one_actions_tmpl) {
+	if (!hw_ctrl_fdb->jump_one_actions_tmpl) {
 		DRV_LOG(ERR, "port %u failed to create jump action template"
 			" for control flows", dev->data->port_id);
 		goto err;
 	}
-	MLX5_ASSERT(priv->hw_esw_zero_tbl == NULL);
-	priv->hw_esw_zero_tbl = flow_hw_create_ctrl_jump_table(dev, port_items_tmpl,
-							       jump_one_actions_tmpl,
-							       error);
-	if (!priv->hw_esw_zero_tbl) {
+	hw_ctrl_fdb->hw_esw_zero_tbl = flow_hw_create_ctrl_jump_table
+			(dev, hw_ctrl_fdb->port_items_tmpl, hw_ctrl_fdb->jump_one_actions_tmpl,
+			 error);
+	if (!hw_ctrl_fdb->hw_esw_zero_tbl) {
 		DRV_LOG(ERR, "port %u failed to create table for default jump to group 1"
 			" for control flows", dev->data->port_id);
 		goto err;
 	}
 	/* Create templates and table for default Tx metadata copy flow rule. */
 	if (!repr_matching && xmeta == MLX5_XMETA_MODE_META32_HWS) {
-		tx_meta_items_tmpl =
+		hw_ctrl_fdb->tx_meta_items_tmpl =
 			flow_hw_create_tx_default_mreg_copy_pattern_template(dev, error);
-		if (!tx_meta_items_tmpl) {
+		if (!hw_ctrl_fdb->tx_meta_items_tmpl) {
 			DRV_LOG(ERR, "port %u failed to Tx metadata copy pattern"
 				" template for control flows", dev->data->port_id);
 			goto err;
 		}
-		tx_meta_actions_tmpl =
+		hw_ctrl_fdb->tx_meta_actions_tmpl =
 			flow_hw_create_tx_default_mreg_copy_actions_template(dev, error);
-		if (!tx_meta_actions_tmpl) {
+		if (!hw_ctrl_fdb->tx_meta_actions_tmpl) {
 			DRV_LOG(ERR, "port %u failed to Tx metadata copy actions"
 				" template for control flows", dev->data->port_id);
 			goto err;
 		}
-		MLX5_ASSERT(priv->hw_tx_meta_cpy_tbl == NULL);
-		priv->hw_tx_meta_cpy_tbl =
-			flow_hw_create_tx_default_mreg_copy_table(dev, tx_meta_items_tmpl,
-								  tx_meta_actions_tmpl, error);
-		if (!priv->hw_tx_meta_cpy_tbl) {
+		hw_ctrl_fdb->hw_tx_meta_cpy_tbl =
+			flow_hw_create_tx_default_mreg_copy_table
+				(dev, hw_ctrl_fdb->tx_meta_items_tmpl,
+				 hw_ctrl_fdb->tx_meta_actions_tmpl, error);
+		if (!hw_ctrl_fdb->hw_tx_meta_cpy_tbl) {
 			DRV_LOG(ERR, "port %u failed to create table for default"
 				" Tx metadata copy flow rule", dev->data->port_id);
 			goto err;
@@ -6447,71 +6512,34 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
 	}
 	/* Create LACP default miss table. */
 	if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0 && priv->master) {
-		lacp_rx_items_tmpl = flow_hw_create_lacp_rx_pattern_template(dev, error);
-		if (!lacp_rx_items_tmpl) {
+		hw_ctrl_fdb->lacp_rx_items_tmpl =
+				flow_hw_create_lacp_rx_pattern_template(dev, error);
+		if (!hw_ctrl_fdb->lacp_rx_items_tmpl) {
 			DRV_LOG(ERR, "port %u failed to create pattern template"
 				" for LACP Rx traffic", dev->data->port_id);
 			goto err;
 		}
-		lacp_rx_actions_tmpl = flow_hw_create_lacp_rx_actions_template(dev, error);
-		if (!lacp_rx_actions_tmpl) {
+		hw_ctrl_fdb->lacp_rx_actions_tmpl =
+				flow_hw_create_lacp_rx_actions_template(dev, error);
+		if (!hw_ctrl_fdb->lacp_rx_actions_tmpl) {
 			DRV_LOG(ERR, "port %u failed to create actions template"
 				" for LACP Rx traffic", dev->data->port_id);
 			goto err;
 		}
-		priv->hw_lacp_rx_tbl = flow_hw_create_lacp_rx_table(dev, lacp_rx_items_tmpl,
-								    lacp_rx_actions_tmpl, error);
-		if (!priv->hw_lacp_rx_tbl) {
+		hw_ctrl_fdb->hw_lacp_rx_tbl = flow_hw_create_lacp_rx_table
+				(dev, hw_ctrl_fdb->lacp_rx_items_tmpl,
+				 hw_ctrl_fdb->lacp_rx_actions_tmpl, error);
+		if (!hw_ctrl_fdb->hw_lacp_rx_tbl) {
 			DRV_LOG(ERR, "port %u failed to create template table for"
 				" for LACP Rx traffic", dev->data->port_id);
 			goto err;
 		}
 	}
 	return 0;
+
 err:
-	/* Do not overwrite the rte_errno. */
-	ret = -rte_errno;
-	if (ret == 0)
-		ret = rte_flow_error_set(error, EINVAL,
-					 RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
-					 "Failed to create control tables.");
-	if (priv->hw_tx_meta_cpy_tbl) {
-		flow_hw_table_destroy(dev, priv->hw_tx_meta_cpy_tbl, NULL);
-		priv->hw_tx_meta_cpy_tbl = NULL;
-	}
-	if (priv->hw_esw_zero_tbl) {
-		flow_hw_table_destroy(dev, priv->hw_esw_zero_tbl, NULL);
-		priv->hw_esw_zero_tbl = NULL;
-	}
-	if (priv->hw_esw_sq_miss_tbl) {
-		flow_hw_table_destroy(dev, priv->hw_esw_sq_miss_tbl, NULL);
-		priv->hw_esw_sq_miss_tbl = NULL;
-	}
-	if (priv->hw_esw_sq_miss_root_tbl) {
-		flow_hw_table_destroy(dev, priv->hw_esw_sq_miss_root_tbl, NULL);
-		priv->hw_esw_sq_miss_root_tbl = NULL;
-	}
-	if (lacp_rx_actions_tmpl)
-		flow_hw_actions_template_destroy(dev, lacp_rx_actions_tmpl, NULL);
-	if (tx_meta_actions_tmpl)
-		flow_hw_actions_template_destroy(dev, tx_meta_actions_tmpl, NULL);
-	if (jump_one_actions_tmpl)
-		flow_hw_actions_template_destroy(dev, jump_one_actions_tmpl, NULL);
-	if (port_actions_tmpl)
-		flow_hw_actions_template_destroy(dev, port_actions_tmpl, NULL);
-	if (regc_jump_actions_tmpl)
-		flow_hw_actions_template_destroy(dev, regc_jump_actions_tmpl, NULL);
-	if (lacp_rx_items_tmpl)
-		flow_hw_pattern_template_destroy(dev, lacp_rx_items_tmpl, NULL);
-	if (tx_meta_items_tmpl)
-		flow_hw_pattern_template_destroy(dev, tx_meta_items_tmpl, NULL);
-	if (port_items_tmpl)
-		flow_hw_pattern_template_destroy(dev, port_items_tmpl, NULL);
-	if (regc_sq_items_tmpl)
-		flow_hw_pattern_template_destroy(dev, regc_sq_items_tmpl, NULL);
-	if (esw_mgr_items_tmpl)
-		flow_hw_pattern_template_destroy(dev, esw_mgr_items_tmpl, NULL);
-	return ret;
+	flow_hw_cleanup_ctrl_fdb_tables(dev);
+	return -EINVAL;
 }
 
 static void
@@ -7308,6 +7336,7 @@ err:
 		mlx5_hws_cnt_pool_destroy(priv->sh, priv->hws_cpool);
 		priv->hws_cpool = NULL;
 	}
+	flow_hw_cleanup_ctrl_fdb_tables(dev);
 	flow_hw_free_vport_actions(priv);
 	for (i = 0; i < MLX5_HW_ACTION_FLAG_MAX; i++) {
 		if (priv->hw_drop[i])
@@ -7357,6 +7386,7 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
 		return;
 	flow_hw_rxq_flag_set(dev, false);
 	flow_hw_flush_all_ctrl_flows(dev);
+	flow_hw_cleanup_ctrl_fdb_tables(dev);
 	flow_hw_cleanup_tx_repr_tagging(dev);
 	flow_hw_cleanup_ctrl_rx_tables(dev);
 	while (!LIST_EMPTY(&priv->flow_hw_tbl_ongo)) {
@@ -8958,8 +8988,9 @@ mlx5_flow_hw_esw_create_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn, bool
 			       proxy_port_id, port_id);
 		return 0;
 	}
-	if (!proxy_priv->hw_esw_sq_miss_root_tbl ||
-	    !proxy_priv->hw_esw_sq_miss_tbl) {
+	if (!proxy_priv->hw_ctrl_fdb ||
+	    !proxy_priv->hw_ctrl_fdb->hw_esw_sq_miss_root_tbl ||
+	    !proxy_priv->hw_ctrl_fdb->hw_esw_sq_miss_tbl) {
 		DRV_LOG(ERR, "Transfer proxy port (port %u) of port %u was configured, but "
 			     "default flow tables were not created.",
 			     proxy_port_id, port_id);
@@ -8991,7 +9022,8 @@ mlx5_flow_hw_esw_create_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn, bool
 	actions[2] = (struct rte_flow_action) {
 		.type = RTE_FLOW_ACTION_TYPE_END,
 	};
-	ret = flow_hw_create_ctrl_flow(dev, proxy_dev, proxy_priv->hw_esw_sq_miss_root_tbl,
+	ret = flow_hw_create_ctrl_flow(dev, proxy_dev,
+				       proxy_priv->hw_ctrl_fdb->hw_esw_sq_miss_root_tbl,
 				       items, 0, actions, 0, &flow_info, external);
 	if (ret) {
 		DRV_LOG(ERR, "Port %u failed to create root SQ miss flow rule for SQ %u, ret %d",
@@ -9022,7 +9054,8 @@ mlx5_flow_hw_esw_create_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn, bool
 		.type = RTE_FLOW_ACTION_TYPE_END,
 	};
 	flow_info.type = MLX5_HW_CTRL_FLOW_TYPE_SQ_MISS;
-	ret = flow_hw_create_ctrl_flow(dev, proxy_dev, proxy_priv->hw_esw_sq_miss_tbl,
+	ret = flow_hw_create_ctrl_flow(dev, proxy_dev,
+				       proxy_priv->hw_ctrl_fdb->hw_esw_sq_miss_tbl,
 				       items, 0, actions, 0, &flow_info, external);
 	if (ret) {
 		DRV_LOG(ERR, "Port %u failed to create HWS SQ miss flow rule for SQ %u, ret %d",
@@ -9068,8 +9101,9 @@ mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn)
 	proxy_priv = proxy_dev->data->dev_private;
 	if (!proxy_priv->dr_ctx)
 		return 0;
-	if (!proxy_priv->hw_esw_sq_miss_root_tbl ||
-	    !proxy_priv->hw_esw_sq_miss_tbl)
+	if (!proxy_priv->hw_ctrl_fdb ||
+	    !proxy_priv->hw_ctrl_fdb->hw_esw_sq_miss_root_tbl ||
+	    !proxy_priv->hw_ctrl_fdb->hw_esw_sq_miss_tbl)
 		return 0;
 	cf = LIST_FIRST(&proxy_priv->hw_ctrl_flows);
 	while (cf != NULL) {
@@ -9136,7 +9170,7 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
 			       proxy_port_id, port_id);
 		return 0;
 	}
-	if (!proxy_priv->hw_esw_zero_tbl) {
+	if (!proxy_priv->hw_ctrl_fdb || !proxy_priv->hw_ctrl_fdb->hw_esw_zero_tbl) {
 		DRV_LOG(ERR, "Transfer proxy port (port %u) of port %u was configured, but "
 			     "default flow tables were not created.",
 			     proxy_port_id, port_id);
@@ -9144,7 +9178,7 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
 		return -rte_errno;
 	}
 	return flow_hw_create_ctrl_flow(dev, proxy_dev,
-					proxy_priv->hw_esw_zero_tbl,
+					proxy_priv->hw_ctrl_fdb->hw_esw_zero_tbl,
 					items, 0, actions, 0, &flow_info, false);
 }
 
@@ -9196,10 +9230,12 @@ mlx5_flow_hw_create_tx_default_mreg_copy_flow(struct rte_eth_dev *dev)
 	};
 
 	MLX5_ASSERT(priv->master);
-	if (!priv->dr_ctx || !priv->hw_tx_meta_cpy_tbl)
+	if (!priv->dr_ctx ||
+	    !priv->hw_ctrl_fdb ||
+	    !priv->hw_ctrl_fdb->hw_tx_meta_cpy_tbl)
 		return 0;
 	return flow_hw_create_ctrl_flow(dev, dev,
-					priv->hw_tx_meta_cpy_tbl,
+					priv->hw_ctrl_fdb->hw_tx_meta_cpy_tbl,
 					eth_all, 0, copy_reg_action, 0, &flow_info, false);
 }
 
@@ -9291,10 +9327,11 @@ mlx5_flow_hw_lacp_rx_flow(struct rte_eth_dev *dev)
 		.type = MLX5_HW_CTRL_FLOW_TYPE_LACP_RX,
 	};
 
-	if (!priv->dr_ctx || !priv->hw_lacp_rx_tbl)
+	if (!priv->dr_ctx || !priv->hw_ctrl_fdb || !priv->hw_ctrl_fdb->hw_lacp_rx_tbl)
 		return 0;
-	return flow_hw_create_ctrl_flow(dev, dev, priv->hw_lacp_rx_tbl, eth_lacp, 0,
-					miss_action, 0, &flow_info, false);
+	return flow_hw_create_ctrl_flow(dev, dev,
+					priv->hw_ctrl_fdb->hw_lacp_rx_tbl,
+					eth_lacp, 0, miss_action, 0, &flow_info, false);
 }
 
 static uint32_t
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:40.228549025 +0000
+++ 0022-net-mlx5-fix-template-clean-up-of-FDB-control-flow-r.patch	2024-03-18 12:58:39.223347746 +0000
@@ -1 +1 @@
-From 48db3b61c3b81c6efcd343b7929a000eb998cb0b Mon Sep 17 00:00:00 2001
+From 3be62ef2f36b7afedfd69ee2989cd5b6ae115208 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 48db3b61c3b81c6efcd343b7929a000eb998cb0b ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 6ff8f322e0..0091a2459c 100644
+index 9832b6df52..ca0e9ee647 100644
@@ -30 +31 @@
-@@ -1894,11 +1894,7 @@ struct mlx5_priv {
+@@ -1739,11 +1739,7 @@ struct mlx5_priv {
@@ -44 +45 @@
-index ff3830a888..34b5e0f45b 100644
+index 42db9ba12a..9ce34ef556 100644
@@ -47 +48 @@
-@@ -2775,6 +2775,25 @@ struct mlx5_flow_hw_ctrl_rx {
+@@ -2186,6 +2186,25 @@ struct mlx5_flow_hw_ctrl_rx {
@@ -74 +75 @@
-index a96c829045..feeb071b4b 100644
+index 881aa40262..f4e125667f 100644
@@ -77 +78 @@
-@@ -9363,6 +9363,72 @@ flow_hw_create_ctrl_jump_table(struct rte_eth_dev *dev,
+@@ -6287,6 +6287,72 @@ flow_hw_create_ctrl_jump_table(struct rte_eth_dev *dev,
@@ -150 +151 @@
-@@ -9412,110 +9478,109 @@ flow_hw_create_lacp_rx_table(struct rte_eth_dev *dev,
+@@ -6336,110 +6402,109 @@ flow_hw_create_lacp_rx_table(struct rte_eth_dev *dev,
@@ -306 +307 @@
-@@ -9523,71 +9588,34 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
+@@ -6447,71 +6512,34 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
@@ -391,4 +392,4 @@
-@@ -10619,6 +10647,7 @@ err:
- 	action_template_drop_release(dev);
- 	mlx5_flow_quota_destroy(dev);
- 	flow_hw_destroy_send_to_kernel_action(priv);
+@@ -7308,6 +7336,7 @@ err:
+ 		mlx5_hws_cnt_pool_destroy(priv->sh, priv->hws_cpool);
+ 		priv->hws_cpool = NULL;
+ 	}
@@ -399,2 +400,2 @@
-@@ -10681,6 +10710,7 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
- 	dev->flow_fp_ops = &rte_flow_fp_default_ops;
+@@ -7357,6 +7386,7 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
+ 		return;
@@ -406,2 +407,2 @@
- 	action_template_drop_release(dev);
-@@ -13259,8 +13289,9 @@ mlx5_flow_hw_esw_create_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn, bool
+ 	while (!LIST_EMPTY(&priv->flow_hw_tbl_ongo)) {
+@@ -8958,8 +8988,9 @@ mlx5_flow_hw_esw_create_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn, bool
@@ -419 +420 @@
-@@ -13292,7 +13323,8 @@ mlx5_flow_hw_esw_create_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn, bool
+@@ -8991,7 +9022,8 @@ mlx5_flow_hw_esw_create_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn, bool
@@ -429 +430 @@
-@@ -13323,7 +13355,8 @@ mlx5_flow_hw_esw_create_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn, bool
+@@ -9022,7 +9054,8 @@ mlx5_flow_hw_esw_create_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn, bool
@@ -439 +440 @@
-@@ -13369,8 +13402,9 @@ mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn)
+@@ -9068,8 +9101,9 @@ mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn)
@@ -451 +452 @@
-@@ -13437,7 +13471,7 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
+@@ -9136,7 +9170,7 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
@@ -460 +461 @@
-@@ -13445,7 +13479,7 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
+@@ -9144,7 +9178,7 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
@@ -469 +470 @@
-@@ -13497,10 +13531,12 @@ mlx5_flow_hw_create_tx_default_mreg_copy_flow(struct rte_eth_dev *dev)
+@@ -9196,10 +9230,12 @@ mlx5_flow_hw_create_tx_default_mreg_copy_flow(struct rte_eth_dev *dev)
@@ -484 +485 @@
-@@ -13592,10 +13628,11 @@ mlx5_flow_hw_lacp_rx_flow(struct rte_eth_dev *dev)
+@@ -9291,10 +9327,11 @@ mlx5_flow_hw_lacp_rx_flow(struct rte_eth_dev *dev)

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

* patch 'net/mlx5: prevent ioctl failure log flooding' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (20 preceding siblings ...)
  2024-03-18 15:39         ` patch 'net/mlx5: fix template clean up of FDB control flow rule' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'net/mlx5: fix age position in hairpin split' " luca.boccassi
                           ` (4 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: Eli Britstein; +Cc: Viacheslav Ovsiienko, 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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 3b972375de7599a243be9094e0903d8ab29f2c1f Mon Sep 17 00:00:00 2001
From: Eli Britstein <elibr@nvidia.com>
Date: Thu, 7 Mar 2024 08:13:45 +0200
Subject: [PATCH] net/mlx5: prevent ioctl failure log flooding

[ upstream commit 84ba1440c5dff8d716c1a2643aa3eb5e806619ff ]

The following log is printed in WARNING severity:

mlx5_net: port 1 ioctl(SIOCETHTOOL, ETHTOOL_GPAUSEPARAM) failed:
    Operation not supported

Reduce the severity to DEBUG to prevent this log from flooding
when there are hundreds of ports probed without supporting this
flow ctrl query.

Fixes: 1256805dd54d ("net/mlx5: move Linux-specific functions")

Signed-off-by: Eli Britstein <elibr@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_ethdev_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 0ee8c58ba7..4f3e790c0b 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -671,7 +671,7 @@ mlx5_dev_get_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	ifr.ifr_data = (void *)&ethpause;
 	ret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr);
 	if (ret) {
-		DRV_LOG(WARNING,
+		DRV_LOG(DEBUG,
 			"port %u ioctl(SIOCETHTOOL, ETHTOOL_GPAUSEPARAM) failed:"
 			" %s",
 			dev->data->port_id, strerror(rte_errno));
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:40.281996160 +0000
+++ 0023-net-mlx5-prevent-ioctl-failure-log-flooding.patch	2024-03-18 12:58:39.227347856 +0000
@@ -1 +1 @@
-From 84ba1440c5dff8d716c1a2643aa3eb5e806619ff Mon Sep 17 00:00:00 2001
+From 3b972375de7599a243be9094e0903d8ab29f2c1f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 84ba1440c5dff8d716c1a2643aa3eb5e806619ff ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index e1bc3f7c2e..1f511d6e00 100644
+index 0ee8c58ba7..4f3e790c0b 100644

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

* patch 'net/mlx5: fix age position in hairpin split' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (21 preceding siblings ...)
  2024-03-18 15:39         ` patch 'net/mlx5: prevent ioctl failure log flooding' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'net/mlx5: fix drop action release timing' " luca.boccassi
                           ` (3 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: Bing Zhao; +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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 0ddc41f5c64f3f473f562d8bea8a5b8a68b05a32 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Thu, 7 Mar 2024 10:09:24 +0200
Subject: [PATCH] net/mlx5: fix age position in hairpin split

[ upstream commit 4c89815eab7471b98388dc958b95777d341f05fc ]

When splitting a hairpin rule implicitly, the count action will
be on either Tx or Rx subflow based on the encapsulation checking.

Once there is a flow rule with both count and age action, one counter
will be reused. If there is only age action and the ASO flow hit is
supported, the flow hit will be chosen instead of a counter.

In the previous flow splitting, the age would always be in the Rx
part, while the count would be on the Tx part when there is an encap.

Before this commit, 2 issues can be observed with a hairpin split:
  1. On the root table, one counter was used on both Rx and Tx parts
     for age and count actions. Then one ingress packet will be
     counted twice.
  2. On the non-root table, an extra ASO flow hit was used on the Rx
     part. This would cause some overhead.

The age and count actions should be in the same subflow instead of 2.

Fixes: daed4b6e3db2 ("net/mlx5: use aging by counter when counter exists")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c    | 1 +
 drivers/net/mlx5/mlx5_flow_dv.c | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 89c98f95f9..1e8d9ac978 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -5135,6 +5135,7 @@ flow_hairpin_split(struct rte_eth_dev *dev,
 			}
 			break;
 		case RTE_FLOW_ACTION_TYPE_COUNT:
+		case RTE_FLOW_ACTION_TYPE_AGE:
 			if (encap) {
 				rte_memcpy(actions_tx, actions,
 					   sizeof(struct rte_flow_action));
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 68d3ee0c36..85dcc399c2 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -18585,8 +18585,7 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev,
 	LIST_FOREACH(act, &age_info->aged_aso, next) {
 		nb_flows++;
 		if (nb_contexts) {
-			context[nb_flows - 1] =
-						act->age_params.context;
+			context[nb_flows - 1] = act->age_params.context;
 			if (!(--nb_contexts))
 				break;
 		}
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:40.319119761 +0000
+++ 0024-net-mlx5-fix-age-position-in-hairpin-split.patch	2024-03-18 12:58:39.251348516 +0000
@@ -1 +1 @@
-From 4c89815eab7471b98388dc958b95777d341f05fc Mon Sep 17 00:00:00 2001
+From 0ddc41f5c64f3f473f562d8bea8a5b8a68b05a32 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4c89815eab7471b98388dc958b95777d341f05fc ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -36 +37 @@
-index 6484874c35..f31fdfbf3d 100644
+index 89c98f95f9..1e8d9ac978 100644
@@ -39 +40 @@
-@@ -5399,6 +5399,7 @@ flow_hairpin_split(struct rte_eth_dev *dev,
+@@ -5135,6 +5135,7 @@ flow_hairpin_split(struct rte_eth_dev *dev,
@@ -48 +49 @@
-index 80239bebee..4badde1a9a 100644
+index 68d3ee0c36..85dcc399c2 100644
@@ -51 +52 @@
-@@ -19361,8 +19361,7 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev,
+@@ -18585,8 +18585,7 @@ flow_dv_get_aged_flows(struct rte_eth_dev *dev,

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

* patch 'net/mlx5: fix drop action release timing' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (22 preceding siblings ...)
  2024-03-18 15:39         ` patch 'net/mlx5: fix age position in hairpin split' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'net/mlx5: fix warning about copy length' " luca.boccassi
                           ` (2 subsequent siblings)
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: Bing Zhao; +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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 905283004dcdfb919e005f55c9a89c8a9e10ed6a Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Fri, 8 Mar 2024 05:22:37 +0200
Subject: [PATCH] net/mlx5: fix drop action release timing

[ upstream commit 22a3761b782b7c46ca428209b15b4f7382a40a62 ]

When creating the drop action Devx object, the global counter set
is also used as in the regular or hairpin queue creation.

The drop action should be destroyed before the global counter set
release procedure. Or else, the counter set object is still
referenced and cannot be released successfully. This would cause
the counter set resources to be exhausted after starting and stopping
the ports repeatedly.

Fixes: 65b3cd0dc39b ("net/mlx5: create global drop action")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 4d76da484b..96e732950d 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2084,12 +2084,12 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 		priv->txqs = NULL;
 	}
 	mlx5_proc_priv_uninit(dev);
+	if (priv->drop_queue.hrxq)
+		mlx5_drop_action_destroy(dev);
 	if (priv->q_counters) {
 		mlx5_devx_cmd_destroy(priv->q_counters);
 		priv->q_counters = NULL;
 	}
-	if (priv->drop_queue.hrxq)
-		mlx5_drop_action_destroy(dev);
 	if (priv->mreg_cp_tbl)
 		mlx5_hlist_destroy(priv->mreg_cp_tbl);
 	mlx5_mprq_free_mp(dev);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:40.381536566 +0000
+++ 0025-net-mlx5-fix-drop-action-release-timing.patch	2024-03-18 12:58:39.255348625 +0000
@@ -1 +1 @@
-From 22a3761b782b7c46ca428209b15b4f7382a40a62 Mon Sep 17 00:00:00 2001
+From 905283004dcdfb919e005f55c9a89c8a9e10ed6a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 22a3761b782b7c46ca428209b15b4f7382a40a62 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 8b54843a43..d1a63822a5 100644
+index 4d76da484b..96e732950d 100644
@@ -28 +29 @@
-@@ -2382,12 +2382,12 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+@@ -2084,12 +2084,12 @@ mlx5_dev_close(struct rte_eth_dev *dev)

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

* patch 'net/mlx5: fix warning about copy length' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (23 preceding siblings ...)
  2024-03-18 15:39         ` patch 'net/mlx5: fix drop action release timing' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 15:39         ` patch 'net/bnxt: fix number of Tx queues being created' " luca.boccassi
  2024-03-18 15:39         ` patch 'examples/ipsec-secgw: fix Rx queue ID in Rx callback' " luca.boccassi
  26 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: Morten Brørup; +Cc: Viacheslav Ovsiienko, 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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From f6a26c88648f181f03fc00b3731f8174d97dc222 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:23 +0100
Subject: [PATCH] net/mlx5: fix warning about copy length
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit c19580fb8e9ad6f153d46f731ec7cd2050b3021b ]

Use RTE_PTR_ADD where copying to the offset of a field in a structure
holding multiple fields, to avoid compiler warnings with decorated
rte_memcpy.

Fixes: 16a7dbc4f690 ("net/mlx5: make flow modify action list thread safe")

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 85dcc399c2..1069b84157 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5688,7 +5688,7 @@ flow_dv_modify_create_cb(void *tool_ctx, void *cb_ctx)
 				   "cannot allocate resource memory");
 		return NULL;
 	}
-	rte_memcpy(&entry->ft_type,
+	rte_memcpy(RTE_PTR_ADD(entry, offsetof(typeof(*entry), ft_type)),
 		   RTE_PTR_ADD(ref, offsetof(typeof(*ref), ft_type)),
 		   key_len + data_len);
 	if (entry->ft_type == MLX5DV_FLOW_TABLE_TYPE_FDB)
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:40.421415580 +0000
+++ 0026-net-mlx5-fix-warning-about-copy-length.patch	2024-03-18 12:58:39.271349065 +0000
@@ -1 +1 @@
-From c19580fb8e9ad6f153d46f731ec7cd2050b3021b Mon Sep 17 00:00:00 2001
+From f6a26c88648f181f03fc00b3731f8174d97dc222 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit c19580fb8e9ad6f153d46f731ec7cd2050b3021b ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 4badde1a9a..d434c678c8 100644
+index 85dcc399c2..1069b84157 100644
@@ -26 +27 @@
-@@ -6205,7 +6205,7 @@ flow_dv_modify_create_cb(void *tool_ctx, void *cb_ctx)
+@@ -5688,7 +5688,7 @@ flow_dv_modify_create_cb(void *tool_ctx, void *cb_ctx)

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

* patch 'net/bnxt: fix number of Tx queues being created' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (24 preceding siblings ...)
  2024-03-18 15:39         ` patch 'net/mlx5: fix warning about copy length' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-18 16:08           ` Kishore Padmanabha
  2024-03-18 15:39         ` patch 'examples/ipsec-secgw: fix Rx queue ID in Rx callback' " luca.boccassi
  26 siblings, 1 reply; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: Kishore Padmanabha; +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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From aead7fda3f5b68acb036d33ada05aa8e39643566 Mon Sep 17 00:00:00 2001
From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Date: Mon, 13 Nov 2023 11:08:52 -0500
Subject: [PATCH] net/bnxt: fix number of Tx queues being created

[ upstream commit 05b67582cc93128bbf2eb26726d781b8c5c561b3 ]

The number of Tx queues for the representor port is limited by
number of Rx rings instead of Tx rings.

Fixes: 322bd6e70272 ("net/bnxt: add port representor infrastructure")

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_reps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index f700adb629..d014714b93 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -739,10 +739,10 @@ int bnxt_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	struct bnxt_tx_queue *parent_txq, *txq;
 	struct bnxt_vf_rep_tx_queue *vfr_txq;
 
-	if (queue_idx >= rep_bp->rx_nr_rings) {
+	if (queue_idx >= rep_bp->tx_nr_rings) {
 		PMD_DRV_LOG(ERR,
 			    "Cannot create Tx rings %d. %d rings available\n",
-			    queue_idx, rep_bp->rx_nr_rings);
+			    queue_idx, rep_bp->tx_nr_rings);
 		return -EINVAL;
 	}
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:40.474735375 +0000
+++ 0027-net-bnxt-fix-number-of-Tx-queues-being-created.patch	2024-03-18 12:58:39.275349175 +0000
@@ -1 +1 @@
-From 05b67582cc93128bbf2eb26726d781b8c5c561b3 Mon Sep 17 00:00:00 2001
+From aead7fda3f5b68acb036d33ada05aa8e39643566 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 05b67582cc93128bbf2eb26726d781b8c5c561b3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index edcc27f556..79b3583636 100644
+index f700adb629..d014714b93 100644

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

* patch 'examples/ipsec-secgw: fix Rx queue ID in Rx callback' has been queued to stable release 22.11.5
  2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
                           ` (25 preceding siblings ...)
  2024-03-18 15:39         ` patch 'net/bnxt: fix number of Tx queues being created' " luca.boccassi
@ 2024-03-18 15:39         ` luca.boccassi
  2024-03-25 12:08           ` patch 'doc: fix default IP fragments maximum in programmer guide' " luca.boccassi
  26 siblings, 1 reply; 202+ messages in thread
From: luca.boccassi @ 2024-03-18 15:39 UTC (permalink / raw)
  To: Shihong Wang; +Cc: Chaoyong He, 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/20/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 6a73ac3d7a5cd78efd3bde7bfb2624342c79799e Mon Sep 17 00:00:00 2001
From: Shihong Wang <shihong.wang@corigine.com>
Date: Mon, 11 Mar 2024 10:32:47 +0800
Subject: [PATCH] examples/ipsec-secgw: fix Rx queue ID in Rx callback

[ upstream commit 179e9b44ac6d64dc10ee3116e44b66f12d43e7a8 ]

The Rx queue ID on the core and on the port are not necessarily
equal, for example, there are two RX queues on core0, queue0 and
queue1, queue0 is the rx_queueid0 on port0 and queue1 is the
rx_queueid0 on port1.

The 'rte_eth_add_rx_callback()' function is based on the port
registration callback function, so should be the RX queue ID on
the port.

Fixes: d04bb1c52647 ("examples/ipsec-secgw: use HW parsed packet type in poll mode")

Signed-off-by: Shihong Wang <shihong.wang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 86ad2b0ea5..e4c3482411 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -2056,10 +2056,10 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads,
 
 			/* Register Rx callback if ptypes are not supported */
 			if (!ptype_supported &&
-			    !rte_eth_add_rx_callback(portid, queue,
+			    !rte_eth_add_rx_callback(portid, rx_queueid,
 						     parse_ptype_cb, NULL)) {
 				printf("Failed to add rx callback: port=%d, "
-				       "queue=%d\n", portid, queue);
+				       "rx_queueid=%d\n", portid, rx_queueid);
 			}
 
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:40.512402326 +0000
+++ 0028-examples-ipsec-secgw-fix-Rx-queue-ID-in-Rx-callback.patch	2024-03-18 12:58:39.275349175 +0000
@@ -1 +1 @@
-From 179e9b44ac6d64dc10ee3116e44b66f12d43e7a8 Mon Sep 17 00:00:00 2001
+From 6a73ac3d7a5cd78efd3bde7bfb2624342c79799e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 179e9b44ac6d64dc10ee3116e44b66f12d43e7a8 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index a61bea400a..45a303850d 100644
+index 86ad2b0ea5..e4c3482411 100644
@@ -29 +30 @@
-@@ -2093,10 +2093,10 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads,
+@@ -2056,10 +2056,10 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads,

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

* RE: patch 'net/bnxt: fix number of Tx queues being created' has been queued to stable release 22.11.5
  2024-03-18 15:39         ` patch 'net/bnxt: fix number of Tx queues being created' " luca.boccassi
@ 2024-03-18 16:08           ` Kishore Padmanabha
  0 siblings, 0 replies; 202+ messages in thread
From: Kishore Padmanabha @ 2024-03-18 16:08 UTC (permalink / raw)
  To: luca.boccassi; +Cc: Ajit Kumar Khaparde, dpdk stable

[-- Attachment #1: Type: text/plain, Size: 3917 bytes --]

Hi Luca,

The patch is good to be merged. Please go ahead.

Thanks,
Kishore


-----Original Message-----
From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
Sent: Monday, March 18, 2024 11:39 AM
To: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Cc: Ajit Khaparde <ajit.khaparde@broadcom.com>; dpdk stable
<stable@dpdk.org>
Subject: patch 'net/bnxt: fix number of Tx queues being created' has been
queued to stable release 22.11.5

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/20/24. So please shout
if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From aead7fda3f5b68acb036d33ada05aa8e39643566 Mon Sep 17 00:00:00 2001
From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Date: Mon, 13 Nov 2023 11:08:52 -0500
Subject: [PATCH] net/bnxt: fix number of Tx queues being created

[ upstream commit 05b67582cc93128bbf2eb26726d781b8c5c561b3 ]

The number of Tx queues for the representor port is limited by number of
Rx rings instead of Tx rings.

Fixes: 322bd6e70272 ("net/bnxt: add port representor infrastructure")

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_reps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index f700adb629..d014714b93 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -739,10 +739,10 @@ int bnxt_rep_tx_queue_setup_op(struct rte_eth_dev
*eth_dev,
 	struct bnxt_tx_queue *parent_txq, *txq;
 	struct bnxt_vf_rep_tx_queue *vfr_txq;

-	if (queue_idx >= rep_bp->rx_nr_rings) {
+	if (queue_idx >= rep_bp->tx_nr_rings) {
 		PMD_DRV_LOG(ERR,
 			    "Cannot create Tx rings %d. %d rings
available\n",
-			    queue_idx, rep_bp->rx_nr_rings);
+			    queue_idx, rep_bp->tx_nr_rings);
 		return -EINVAL;
 	}

--
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if
non-empty:
---
--- -	2024-03-18 12:58:40.474735375 +0000
+++ 0027-net-bnxt-fix-number-of-Tx-queues-being-created.patch	2024-03-18
12:58:39.275349175 +0000
@@ -1 +1 @@
-From 05b67582cc93128bbf2eb26726d781b8c5c561b3 Mon Sep 17 00:00:00 2001
+From aead7fda3f5b68acb036d33ada05aa8e39643566 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 05b67582cc93128bbf2eb26726d781b8c5c561b3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index edcc27f556..79b3583636 100644
+index f700adb629..d014714b93 100644

-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4227 bytes --]

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

* patch 'doc: fix default IP fragments maximum in programmer guide' has been queued to stable release 22.11.5
  2024-03-18 15:39         ` patch 'examples/ipsec-secgw: fix Rx queue ID in Rx callback' " luca.boccassi
@ 2024-03-25 12:08           ` luca.boccassi
  2024-03-25 12:08             ` patch 'net/ena: fix mbuf double free in fast free mode' " luca.boccassi
                               ` (7 more replies)
  0 siblings, 8 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-25 12:08 UTC (permalink / raw)
  To: Simei Su; +Cc: 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/27/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 6e39ed2088611ad8318cdd1985d3fbc8182e505d Mon Sep 17 00:00:00 2001
From: Simei Su <simei.su@intel.com>
Date: Fri, 5 Jan 2024 10:44:17 +0800
Subject: [PATCH] doc: fix default IP fragments maximum in programmer guide

[ upstream commit 0219d467bcb1d19b386b5bae8eecd3514ba13fdb ]

Update documentation value to match default value in code base.

Fixes: f8e0f8ce9030 ("ip_frag: increase default maximum of fragments")

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 doc/guides/prog_guide/ip_fragment_reassembly_lib.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst b/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst
index 314d4adbb8..b14289eb73 100644
--- a/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst
+++ b/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst
@@ -43,7 +43,7 @@ Note that all update/lookup operations on Fragment Table are not thread safe.
 So if different execution contexts (threads/processes) will access the same table simultaneously,
 then some external syncing mechanism have to be provided.
 
-Each table entry can hold information about packets consisting of up to RTE_LIBRTE_IP_FRAG_MAX (by default: 4) fragments.
+Each table entry can hold information about packets consisting of up to RTE_LIBRTE_IP_FRAG_MAX (by default: 8) fragments.
 
 Code example, that demonstrates creation of a new Fragment table:
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-25 11:28:37.284915046 +0000
+++ 0001-doc-fix-default-IP-fragments-maximum-in-programmer-g.patch	2024-03-25 11:28:37.168387703 +0000
@@ -1 +1 @@
-From 0219d467bcb1d19b386b5bae8eecd3514ba13fdb Mon Sep 17 00:00:00 2001
+From 6e39ed2088611ad8318cdd1985d3fbc8182e505d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0219d467bcb1d19b386b5bae8eecd3514ba13fdb ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org

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

* patch 'net/ena: fix mbuf double free in fast free mode' has been queued to stable release 22.11.5
  2024-03-25 12:08           ` patch 'doc: fix default IP fragments maximum in programmer guide' " luca.boccassi
@ 2024-03-25 12:08             ` luca.boccassi
  2024-03-25 12:08             ` patch 'net/vmxnet3: ignore Rx queue interrupt setup on FreeBSD' " luca.boccassi
                               ` (6 subsequent siblings)
  7 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-25 12:08 UTC (permalink / raw)
  To: Shai Brandes; +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/27/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 3894e82ac5267b7d24e0a21791351115254be8ea Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Wed, 20 Mar 2024 16:52:32 +0200
Subject: [PATCH] net/ena: fix mbuf double free in fast free mode

[ upstream commit 237407f0c3dff2d0a6bbeb5f35c8b32fe5c8afed ]

Fixed an issue of double free of mbufs which is exposed
in mbuf fast free mode when handling multi-mbuf packets.

The faulty patch mishandled free of non-head mbufs as it
iterated over linked mbufs and collected them into an array,
which was then passed to rte_pktmbuf_free_bulk.
However, rte_pktmbuf_free_bulk already performs an internal iteration
over mbufs that are linked together which led to double free.

Fixes: 89b081e154c5 ("net/ena: fix fast mbuf free")

Signed-off-by: Shai Brandes <shaibran@amazon.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/ena/ena_ethdev.c | 39 +++++++++++-------------------------
 1 file changed, 12 insertions(+), 27 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 2c4e3505d0..29782a7fb6 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -37,10 +37,10 @@
 #define ENA_MIN_RING_DESC	128
 
 /*
- * We should try to keep ENA_CLEANUP_BUF_SIZE lower than
+ * We should try to keep ENA_CLEANUP_BUF_THRESH lower than
  * RTE_MEMPOOL_CACHE_MAX_SIZE, so we can fit this in mempool local cache.
  */
-#define ENA_CLEANUP_BUF_SIZE	256
+#define ENA_CLEANUP_BUF_THRESH	256
 
 #define ENA_PTYPE_HAS_HASH	(RTE_PTYPE_L4_TCP | RTE_PTYPE_L4_UDP)
 
@@ -3018,32 +3018,12 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
 	return 0;
 }
 
-static __rte_always_inline size_t
-ena_tx_cleanup_mbuf_fast(struct rte_mbuf **mbufs_to_clean,
-			 struct rte_mbuf *mbuf,
-			 size_t mbuf_cnt,
-			 size_t buf_size)
-{
-	struct rte_mbuf *m_next;
-
-	while (mbuf != NULL) {
-		m_next = mbuf->next;
-		mbufs_to_clean[mbuf_cnt++] = mbuf;
-		if (mbuf_cnt == buf_size) {
-			rte_pktmbuf_free_bulk(mbufs_to_clean, mbuf_cnt);
-			mbuf_cnt = 0;
-		}
-		mbuf = m_next;
-	}
-
-	return mbuf_cnt;
-}
-
 static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)
 {
-	struct rte_mbuf *mbufs_to_clean[ENA_CLEANUP_BUF_SIZE];
+	struct rte_mbuf *pkts_to_clean[ENA_CLEANUP_BUF_THRESH];
 	struct ena_ring *tx_ring = (struct ena_ring *)txp;
 	size_t mbuf_cnt = 0;
+	size_t pkt_cnt = 0;
 	unsigned int total_tx_descs = 0;
 	unsigned int total_tx_pkts = 0;
 	uint16_t cleanup_budget;
@@ -3074,8 +3054,13 @@ static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)
 
 		mbuf = tx_info->mbuf;
 		if (fast_free) {
-			mbuf_cnt = ena_tx_cleanup_mbuf_fast(mbufs_to_clean, mbuf, mbuf_cnt,
-				ENA_CLEANUP_BUF_SIZE);
+			pkts_to_clean[pkt_cnt++] = mbuf;
+			mbuf_cnt += mbuf->nb_segs;
+			if (mbuf_cnt >= ENA_CLEANUP_BUF_THRESH) {
+				rte_pktmbuf_free_bulk(pkts_to_clean, pkt_cnt);
+				mbuf_cnt = 0;
+				pkt_cnt = 0;
+			}
 		} else {
 			rte_pktmbuf_free(mbuf);
 		}
@@ -3099,7 +3084,7 @@ static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)
 	}
 
 	if (mbuf_cnt != 0)
-		rte_pktmbuf_free_bulk(mbufs_to_clean, mbuf_cnt);
+		rte_pktmbuf_free_bulk(pkts_to_clean, pkt_cnt);
 
 	/* Notify completion handler that full cleanup was performed */
 	if (free_pkt_cnt == 0 || total_tx_pkts < cleanup_budget)
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-25 11:28:37.366765928 +0000
+++ 0002-net-ena-fix-mbuf-double-free-in-fast-free-mode.patch	2024-03-25 11:28:37.176388004 +0000
@@ -1 +1 @@
-From 237407f0c3dff2d0a6bbeb5f35c8b32fe5c8afed Mon Sep 17 00:00:00 2001
+From 3894e82ac5267b7d24e0a21791351115254be8ea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 237407f0c3dff2d0a6bbeb5f35c8b32fe5c8afed ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 7b697c150a..66fc287faf 100644
+index 2c4e3505d0..29782a7fb6 100644
@@ -28,2 +29,2 @@
-@@ -48,10 +48,10 @@
- #define MAX_WIDE_LLQ_DEPTH_UNSUPPORTED 0
+@@ -37,10 +37,10 @@
+ #define ENA_MIN_RING_DESC	128
@@ -41 +42 @@
-@@ -3180,32 +3180,12 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
+@@ -3018,32 +3018,12 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
@@ -76 +77 @@
-@@ -3236,8 +3216,13 @@ static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)
+@@ -3074,8 +3054,13 @@ static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)
@@ -92 +93 @@
-@@ -3260,7 +3245,7 @@ static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)
+@@ -3099,7 +3084,7 @@ static int ena_tx_cleanup(void *txp, uint32_t free_pkt_cnt)

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

* patch 'net/vmxnet3: ignore Rx queue interrupt setup on FreeBSD' has been queued to stable release 22.11.5
  2024-03-25 12:08           ` patch 'doc: fix default IP fragments maximum in programmer guide' " luca.boccassi
  2024-03-25 12:08             ` patch 'net/ena: fix mbuf double free in fast free mode' " luca.boccassi
@ 2024-03-25 12:08             ` luca.boccassi
  2024-03-25 12:08             ` patch 'net/mlx5/hws: fix port ID for root table' " luca.boccassi
                               ` (5 subsequent siblings)
  7 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-25 12:08 UTC (permalink / raw)
  To: Tom Jones; +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/27/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 6409b2655024518d7c4f389c0afec41694a5c1c9 Mon Sep 17 00:00:00 2001
From: Tom Jones <thj@freebsd.org>
Date: Thu, 21 Mar 2024 10:31:33 +0000
Subject: [PATCH] net/vmxnet3: ignore Rx queue interrupt setup on FreeBSD

[ upstream commit 19fede459e0d22f5ac891366465dce07e68196bc ]

Interrupts disabled on FreeBSD for the vmxnet3 driver as they are not
supported. Rx queue interrupts were missed by this change, don't
attempt to enable them on FreeBSD.

Without this change applications enabling interrupts encounter an
immediate abort on FreeBSD.

Fixes: 40d5676ff1ea ("net/vmxnet3: fix initialization on FreeBSD")

Signed-off-by: Tom Jones <thj@freebsd.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 .mailmap                             | 1 +
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/.mailmap b/.mailmap
index 2ad5489046..8979c462c7 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1388,6 +1388,7 @@ Tomasz Kulasek <tomaszx.kulasek@intel.com>
 Tomasz Zawadzki <tomasz.zawadzki@intel.com>
 Tom Barbette <barbette@kth.se> <tom.barbette@ulg.ac.be>
 Tom Crugnale <tcrugnale@sandvine.com>
+Tom Jones <thj@freebsd.org>
 Tom Millington <tmillington@solarflare.com>
 Tom Rix <trix@redhat.com>
 Tone Zhang <tone.zhang@arm.com>
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 9f9d8473e0..c1c7539fff 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1826,11 +1826,13 @@ done:
 static int
 vmxnet3_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
 {
+#ifndef RTE_EXEC_ENV_FREEBSD
 	struct vmxnet3_hw *hw = dev->data->dev_private;
 
 	vmxnet3_enable_intr(hw,
 			    rte_intr_vec_list_index_get(dev->intr_handle,
 							       queue_id));
+#endif
 
 	return 0;
 }
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-25 11:28:37.443985658 +0000
+++ 0003-net-vmxnet3-ignore-Rx-queue-interrupt-setup-on-FreeB.patch	2024-03-25 11:28:37.180388155 +0000
@@ -1 +1 @@
-From 19fede459e0d22f5ac891366465dce07e68196bc Mon Sep 17 00:00:00 2001
+From 6409b2655024518d7c4f389c0afec41694a5c1c9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 19fede459e0d22f5ac891366465dce07e68196bc ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index a0b19832b5..491af1f6ff 100644
+index 2ad5489046..8979c462c7 100644
@@ -27 +28 @@
-@@ -1458,6 +1458,7 @@ Tomasz Kulasek <tomaszx.kulasek@intel.com>
+@@ -1388,6 +1388,7 @@ Tomasz Kulasek <tomaszx.kulasek@intel.com>
@@ -34 +35 @@
- Tomer Shmilovich <tshmilovich@nvidia.com>
+ Tone Zhang <tone.zhang@arm.com>
@@ -36 +37 @@
-index 2707b25148..ce7c347254 100644
+index 9f9d8473e0..c1c7539fff 100644
@@ -39 +40 @@
-@@ -1936,11 +1936,13 @@ done:
+@@ -1826,11 +1826,13 @@ done:

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

* patch 'net/mlx5/hws: fix port ID for root table' has been queued to stable release 22.11.5
  2024-03-25 12:08           ` patch 'doc: fix default IP fragments maximum in programmer guide' " luca.boccassi
  2024-03-25 12:08             ` patch 'net/ena: fix mbuf double free in fast free mode' " luca.boccassi
  2024-03-25 12:08             ` patch 'net/vmxnet3: ignore Rx queue interrupt setup on FreeBSD' " luca.boccassi
@ 2024-03-25 12:08             ` luca.boccassi
  2024-03-25 12:08             ` patch 'doc: fix typo in profiling guide' " luca.boccassi
                               ` (4 subsequent siblings)
  7 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-25 12:08 UTC (permalink / raw)
  To: Erez Shitrit; +Cc: Yevgeny Kliteynik, 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/27/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From e96de331da11975eec51055a6b991535c30bac2b Mon Sep 17 00:00:00 2001
From: Erez Shitrit <erezsh@nvidia.com>
Date: Thu, 21 Mar 2024 16:48:11 +0200
Subject: [PATCH] net/mlx5/hws: fix port ID for root table

[ upstream commit 572fe9ef2f461b7e7e195a3a4da5bf0c11f35949 ]

In root tables matcher and rule need to have their port-id, otherwise
the translate function that done in dpdk layer will not get the right
attributes.
For that whenever the matcher is matching the source-port we need to get
the relevant port-id before calling the translate function.

Fixes: 405242c52dd5 ("net/mlx5/hws: add rule object")

Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_matcher.c | 17 +++++++++++++++++
 drivers/net/mlx5/hws/mlx5dr_rule.c    | 18 ++++++++++++++++++
 drivers/net/mlx5/mlx5_flow.h          | 22 ++++++++++++++++++++++
 3 files changed, 57 insertions(+)

diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c
index 2e444c1179..c54bf88e78 100644
--- a/drivers/net/mlx5/hws/mlx5dr_matcher.c
+++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c
@@ -711,6 +711,7 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
 	struct mlx5dv_flow_match_parameters *mask;
 	struct mlx5_flow_attr flow_attr = {0};
 	struct rte_flow_error rte_error;
+	struct rte_flow_item *item;
 	uint8_t match_criteria;
 	int ret;
 
@@ -739,6 +740,22 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
 		return rte_errno;
 	}
 
+	/* We need the port id in case of matching representor */
+	item = matcher->mt[0]->items;
+	while (item->type != RTE_FLOW_ITEM_TYPE_END) {
+		if (item->type == RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR ||
+		    item->type == RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT) {
+			ret = flow_hw_get_port_id_from_ctx(ctx, &flow_attr.port_id);
+			if (ret) {
+				DR_LOG(ERR, "Failed to get port id for dev %s",
+				       ctx->ibv_ctx->device->name);
+				rte_errno = EINVAL;
+				return rte_errno;
+			}
+		}
+		++item;
+	}
+
 	mask = simple_calloc(1, MLX5_ST_SZ_BYTES(fte_match_param) +
 			     offsetof(struct mlx5dv_flow_match_parameters, match_buf));
 	if (!mask) {
diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c
index b27318e6d4..885a2bcefe 100644
--- a/drivers/net/mlx5/hws/mlx5dr_rule.c
+++ b/drivers/net/mlx5/hws/mlx5dr_rule.c
@@ -382,10 +382,28 @@ static int mlx5dr_rule_create_root(struct mlx5dr_rule *rule,
 	struct mlx5dv_flow_match_parameters *value;
 	struct mlx5_flow_attr flow_attr = {0};
 	struct mlx5dv_flow_action_attr *attr;
+	const struct rte_flow_item *cur_item;
 	struct rte_flow_error error;
 	uint8_t match_criteria;
 	int ret;
 
+	/* We need the port id in case of matching representor */
+	cur_item = items;
+	while (cur_item->type != RTE_FLOW_ITEM_TYPE_END) {
+		if (cur_item->type == RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR ||
+		    cur_item->type == RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT) {
+			ret = flow_hw_get_port_id_from_ctx(rule->matcher->tbl->ctx,
+							   &flow_attr.port_id);
+			if (ret) {
+				DR_LOG(ERR, "Failed to get port id for dev %s",
+				       rule->matcher->tbl->ctx->ibv_ctx->device->name);
+				rte_errno = EINVAL;
+				return rte_errno;
+			}
+		}
+		++cur_item;
+	}
+
 	attr = simple_calloc(num_actions, sizeof(*attr));
 	if (!attr) {
 		rte_errno = ENOMEM;
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 9ce34ef556..4f3a216ed4 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -1594,6 +1594,28 @@ flow_hw_get_reg_id(enum rte_flow_item_type type, uint32_t id)
 	}
 }
 
+static __rte_always_inline int
+flow_hw_get_port_id_from_ctx(void *dr_ctx, uint32_t *port_val)
+{
+#if defined(HAVE_IBV_FLOW_DV_SUPPORT) || !defined(HAVE_INFINIBAND_VERBS_H)
+	uint32_t port;
+
+	MLX5_ETH_FOREACH_DEV(port, NULL) {
+		struct mlx5_priv *priv;
+		priv = rte_eth_devices[port].data->dev_private;
+
+		if (priv->dr_ctx == dr_ctx) {
+			*port_val = port;
+			return 0;
+		}
+	}
+#else
+	RTE_SET_USED(dr_ctx);
+	RTE_SET_USED(port_val);
+#endif
+	return -EINVAL;
+}
+
 void flow_hw_set_port_info(struct rte_eth_dev *dev);
 void flow_hw_clear_port_info(struct rte_eth_dev *dev);
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-25 11:28:37.506569905 +0000
+++ 0004-net-mlx5-hws-fix-port-ID-for-root-table.patch	2024-03-25 11:28:37.192388606 +0000
@@ -1 +1 @@
-From 572fe9ef2f461b7e7e195a3a4da5bf0c11f35949 Mon Sep 17 00:00:00 2001
+From e96de331da11975eec51055a6b991535c30bac2b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 572fe9ef2f461b7e7e195a3a4da5bf0c11f35949 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 1c64abfa57..aeff300467 100644
+index 2e444c1179..c54bf88e78 100644
@@ -28 +29 @@
-@@ -1220,6 +1220,7 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
+@@ -711,6 +711,7 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
@@ -36 +37 @@
-@@ -1248,6 +1249,22 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
+@@ -739,6 +740,22 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
@@ -41 +42 @@
-+	item = matcher->mt[0].items;
++	item = matcher->mt[0]->items;
@@ -60 +61 @@
-index 784f614d87..022263eb1d 100644
+index b27318e6d4..885a2bcefe 100644
@@ -63 +64 @@
-@@ -687,10 +687,28 @@ static int mlx5dr_rule_create_root(struct mlx5dr_rule *rule,
+@@ -382,10 +382,28 @@ static int mlx5dr_rule_create_root(struct mlx5dr_rule *rule,
@@ -93 +94 @@
-index 34b5e0f45b..0065727a67 100644
+index 9ce34ef556..4f3a216ed4 100644
@@ -96,2 +97,2 @@
-@@ -2001,6 +2001,28 @@ flow_hw_get_reg_id(struct rte_eth_dev *dev,
- #endif
+@@ -1594,6 +1594,28 @@ flow_hw_get_reg_id(enum rte_flow_item_type type, uint32_t id)
+ 	}
@@ -122,3 +123,3 @@
- /**
-  * Get GENEVE TLV option FW information according type and class.
-  *
+ void flow_hw_set_port_info(struct rte_eth_dev *dev);
+ void flow_hw_clear_port_info(struct rte_eth_dev *dev);
+ 

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

* patch 'doc: fix typo in profiling guide' has been queued to stable release 22.11.5
  2024-03-25 12:08           ` patch 'doc: fix default IP fragments maximum in programmer guide' " luca.boccassi
                               ` (2 preceding siblings ...)
  2024-03-25 12:08             ` patch 'net/mlx5/hws: fix port ID for root table' " luca.boccassi
@ 2024-03-25 12:08             ` luca.boccassi
  2024-03-25 12:08             ` patch 'doc: fix typo in packet framework " luca.boccassi
                               ` (3 subsequent siblings)
  7 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-25 12:08 UTC (permalink / raw)
  To: Emi Aoki; +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/27/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 16eac11cb616ec79972359cd4e3075bf98448e6c Mon Sep 17 00:00:00 2001
From: Emi Aoki <embm29@gmail.com>
Date: Thu, 21 Mar 2024 19:02:25 -0400
Subject: [PATCH] doc: fix typo in profiling guide

[ upstream commit a67ce452919a3381ccdc53af7bcc0196838b3586 ]

Caught by codespell.

Fixes: 9d5ba88c2d41 ("doc: add ARM profiling methods")

Signed-off-by: Emi Aoki <embm29@gmail.com>
---
 .mailmap                              | 1 +
 doc/guides/prog_guide/profile_app.rst | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 8979c462c7..0008a56d7f 100644
--- a/.mailmap
+++ b/.mailmap
@@ -356,6 +356,7 @@ Elad Persiko <eladpe@mellanox.com>
 Elena Agostini <eagostini@nvidia.com>
 Eli Britstein <elibr@nvidia.com> <elibr@mellanox.com>
 Elza Mathew <elza.mathew@intel.com>
+Emi Aoki <embm29@gmail.com>
 Emma Finn <emma.finn@intel.com>
 Emma Kenny <emma.kenny@intel.com>
 Emmanuel Roullit <emmanuel.roullit@gmail.com>
diff --git a/doc/guides/prog_guide/profile_app.rst b/doc/guides/prog_guide/profile_app.rst
index 14292d4c25..a6b5fb4d5e 100644
--- a/doc/guides/prog_guide/profile_app.rst
+++ b/doc/guides/prog_guide/profile_app.rst
@@ -59,7 +59,7 @@ addition to the standard events, ``perf`` can be used to profile arm64
 specific PMU (Performance Monitor Unit) events through raw events (``-e``
 ``-rXX``).
 
-For more derails refer to the
+For more details refer to the
 `ARM64 specific PMU events enumeration <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.100095_0002_04_en/way1382543438508.html>`_.
 
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-25 11:28:37.595527733 +0000
+++ 0005-doc-fix-typo-in-profiling-guide.patch	2024-03-25 11:28:37.196388757 +0000
@@ -1 +1 @@
-From a67ce452919a3381ccdc53af7bcc0196838b3586 Mon Sep 17 00:00:00 2001
+From 16eac11cb616ec79972359cd4e3075bf98448e6c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a67ce452919a3381ccdc53af7bcc0196838b3586 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index f53fb59513..67687d21b1 100644
+index 8979c462c7..0008a56d7f 100644
@@ -21 +22 @@
-@@ -373,6 +373,7 @@ Elad Persiko <eladpe@mellanox.com>
+@@ -356,6 +356,7 @@ Elad Persiko <eladpe@mellanox.com>

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

* patch 'doc: fix typo in packet framework guide' has been queued to stable release 22.11.5
  2024-03-25 12:08           ` patch 'doc: fix default IP fragments maximum in programmer guide' " luca.boccassi
                               ` (3 preceding siblings ...)
  2024-03-25 12:08             ` patch 'doc: fix typo in profiling guide' " luca.boccassi
@ 2024-03-25 12:08             ` luca.boccassi
  2024-03-25 12:08             ` patch 'test/power: fix typo in error message' " luca.boccassi
                               ` (2 subsequent siblings)
  7 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-25 12:08 UTC (permalink / raw)
  To: Flore Norceide; +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/27/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From eebb999b4599b4f91a4063085ceac74fa1f8d18a Mon Sep 17 00:00:00 2001
From: Flore Norceide <florestecien@gmail.com>
Date: Thu, 21 Mar 2024 19:03:52 -0400
Subject: [PATCH] doc: fix typo in packet framework guide

[ upstream commit e4e1f2f7d24240d476cfa757e218d1532759b65d ]

Caught by codespell

Fixes: fc1f2750a3ec ("doc: programmers guide")

Signed-off-by: Flore Norceide <florestecien@gmail.com>
---
 .mailmap                                   | 1 +
 doc/guides/prog_guide/packet_framework.rst | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 0008a56d7f..cf3646b563 100644
--- a/.mailmap
+++ b/.mailmap
@@ -393,6 +393,7 @@ Fidaullah Noonari <fidaullah.noonari@emumba.com>
 Fiona Trahe <fiona.trahe@intel.com>
 Flavia Musatescu <flavia.musatescu@intel.com>
 Flavio Leitner <fbl@redhat.com> <fbl@sysclose.org>
+Flore Norceide <florestecien@gmail.com>
 Forrest Shi <xuelin.shi@nxp.com>
 Francesco Santoro <francesco.santoro@6wind.com>
 Francis Kelly <fkelly@nvidia.com> <fkelly@mellanox.com>
diff --git a/doc/guides/prog_guide/packet_framework.rst b/doc/guides/prog_guide/packet_framework.rst
index 3d4e3b66cc..b263f23f17 100644
--- a/doc/guides/prog_guide/packet_framework.rst
+++ b/doc/guides/prog_guide/packet_framework.rst
@@ -512,7 +512,7 @@ the number of L2 or L3 cache memory misses is greatly reduced, hence one of the
 This is because the cost of L2/L3 cache memory miss on memory read accesses is high, as usually due to data dependency between instructions,
 the CPU execution units have to stall until the read operation is completed from L3 cache memory or external DRAM memory.
 By using prefetch instructions, the latency of memory read accesses is hidden,
-provided that it is preformed early enough before the respective data structure is actually used.
+provided that it is performed early enough before the respective data structure is actually used.
 
 By splitting the processing into several stages that are executed on different packets (the packets from the input burst are interlaced),
 enough work is created to allow the prefetch instructions to complete successfully (before the prefetched data structures are actually accessed) and
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-25 11:28:37.665248397 +0000
+++ 0006-doc-fix-typo-in-packet-framework-guide.patch	2024-03-25 11:28:37.200388907 +0000
@@ -1 +1 @@
-From e4e1f2f7d24240d476cfa757e218d1532759b65d Mon Sep 17 00:00:00 2001
+From eebb999b4599b4f91a4063085ceac74fa1f8d18a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e4e1f2f7d24240d476cfa757e218d1532759b65d ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 67687d21b1..ac50264e66 100644
+index 0008a56d7f..cf3646b563 100644
@@ -21 +22 @@
-@@ -411,6 +411,7 @@ Fidaullah Noonari <fidaullah.noonari@emumba.com>
+@@ -393,6 +393,7 @@ Fidaullah Noonari <fidaullah.noonari@emumba.com>
@@ -27 +27,0 @@
- Francesco Mancino <francesco.mancino@tutus.se>
@@ -28,0 +29 @@
+ Francis Kelly <fkelly@nvidia.com> <fkelly@mellanox.com>
@@ -30 +31 @@
-index ebc69d8c3e..9987ead6c5 100644
+index 3d4e3b66cc..b263f23f17 100644
@@ -33 +34 @@
-@@ -509,7 +509,7 @@ the number of L2 or L3 cache memory misses is greatly reduced, hence one of the
+@@ -512,7 +512,7 @@ the number of L2 or L3 cache memory misses is greatly reduced, hence one of the

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

* patch 'test/power: fix typo in error message' has been queued to stable release 22.11.5
  2024-03-25 12:08           ` patch 'doc: fix default IP fragments maximum in programmer guide' " luca.boccassi
                               ` (4 preceding siblings ...)
  2024-03-25 12:08             ` patch 'doc: fix typo in packet framework " luca.boccassi
@ 2024-03-25 12:08             ` luca.boccassi
  2024-03-25 12:08             ` patch 'test/cfgfile: fix typo in error messages' " luca.boccassi
  2024-03-25 12:08             ` patch 'examples/ipsec-secgw: fix typo in error message' " luca.boccassi
  7 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-25 12:08 UTC (permalink / raw)
  To: Fidel Castro; +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/27/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From f4e263b02469c36ca39262532368c88ddcb9990c Mon Sep 17 00:00:00 2001
From: Fidel Castro <fidelcastro.s@hotmail.com>
Date: Thu, 21 Mar 2024 18:35:52 -0400
Subject: [PATCH] test/power: fix typo in error message

[ upstream commit 4e335241a44cf8e3a34c0549293ca73d272b6c05 ]

Caught by codespell.

Fixes: 2653bee888b4 ("test/power: check all environment types")

Signed-off-by: Fidel Castro <fidelcastro.s@hotmail.com>
---
 .mailmap              | 1 +
 app/test/test_power.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index cf3646b563..a6992311ba 100644
--- a/.mailmap
+++ b/.mailmap
@@ -390,6 +390,7 @@ Fengtian Guo <fengtian.guo@6wind.com>
 Ferdinand Thiessen <rpm@fthiessen.de>
 Ferruh Yigit <ferruh.yigit@amd.com> <ferruh.yigit@intel.com> <ferruh.yigit@xilinx.com> <ferruhy@gmail.com>
 Fidaullah Noonari <fidaullah.noonari@emumba.com>
+Fidel Castro <fidelcastro.s@hotmail.com>
 Fiona Trahe <fiona.trahe@intel.com>
 Flavia Musatescu <flavia.musatescu@intel.com>
 Flavio Leitner <fbl@redhat.com> <fbl@sysclose.org>
diff --git a/app/test/test_power.c b/app/test/test_power.c
index b7b5561348..a1b32adf58 100644
--- a/app/test/test_power.c
+++ b/app/test/test_power.c
@@ -142,7 +142,7 @@ test_power(void)
 		/* Test setting a valid environment */
 		ret = rte_power_set_env(envs[i]);
 		if (ret != 0) {
-			printf("Unexpectedly unsucceeded on setting a valid environment\n");
+			printf("Unexpectedly unsuccessful on setting a valid environment\n");
 			return -1;
 		}
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-25 11:28:37.745927565 +0000
+++ 0007-test-power-fix-typo-in-error-message.patch	2024-03-25 11:28:37.208389208 +0000
@@ -1 +1 @@
-From 4e335241a44cf8e3a34c0549293ca73d272b6c05 Mon Sep 17 00:00:00 2001
+From f4e263b02469c36ca39262532368c88ddcb9990c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e335241a44cf8e3a34c0549293ca73d272b6c05 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index ac50264e66..6bb0855236 100644
+index cf3646b563..a6992311ba 100644
@@ -21 +22 @@
-@@ -408,6 +408,7 @@ Fengtian Guo <fengtian.guo@6wind.com>
+@@ -390,6 +390,7 @@ Fengtian Guo <fengtian.guo@6wind.com>
@@ -30 +31 @@
-index f1e80299d3..403adc22d6 100644
+index b7b5561348..a1b32adf58 100644
@@ -33 +34 @@
-@@ -143,7 +143,7 @@ test_power(void)
+@@ -142,7 +142,7 @@ test_power(void)

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

* patch 'test/cfgfile: fix typo in error messages' has been queued to stable release 22.11.5
  2024-03-25 12:08           ` patch 'doc: fix default IP fragments maximum in programmer guide' " luca.boccassi
                               ` (5 preceding siblings ...)
  2024-03-25 12:08             ` patch 'test/power: fix typo in error message' " luca.boccassi
@ 2024-03-25 12:08             ` luca.boccassi
  2024-03-25 12:08             ` patch 'examples/ipsec-secgw: fix typo in error message' " luca.boccassi
  7 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-25 12:08 UTC (permalink / raw)
  To: Holly Nichols; +Cc: Vinh Tran, Thomas Monjalon, 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/27/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From 8a9e1d1f86ea2996b742e70e742ec204945b27a9 Mon Sep 17 00:00:00 2001
From: Holly Nichols <hollynichols04@gmail.com>
Date: Thu, 21 Mar 2024 19:05:29 -0400
Subject: [PATCH] test/cfgfile: fix typo in error messages

[ upstream commit fbca1ad85f7725b876d032cb732b3332d247e1f4 ]

Caught by codespell.

Fixes: c54e7234bc9e ("test/cfgfile: add basic unit tests")

Signed-off-by: Holly Nichols <hollynichols04@gmail.com>
Signed-off-by: Vinh Tran <vinh.t.tran10@gmail.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 .mailmap                | 2 ++
 app/test/test_cfgfile.c | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.mailmap b/.mailmap
index a6992311ba..918e959344 100644
--- a/.mailmap
+++ b/.mailmap
@@ -506,6 +506,7 @@ Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
 Hiroki Shirokura <slank.dev@gmail.com>
 Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
 Hiroyuki Mikita <h.mikita89@gmail.com>
+Holly Nichols <hollynichols04@gmail.com>
 Hongbo Zheng <zhenghongbo3@huawei.com>
 Hongjun Ni <hongjun.ni@intel.com>
 Hongzhi Guo <guohongzhi1@huawei.com>
@@ -1438,6 +1439,7 @@ Vincent Guo <guopengfei160@163.com>
 Vincent Jardin <vincent.jardin@6wind.com>
 Vincent Li <vincent.mc.li@gmail.com>
 Vincent S. Cojot <vcojot@redhat.com>
+Vinh Tran <vinh.t.tran10@gmail.com>
 Vipin Varghese <vipin.varghese@amd.com> <vipin.varghese@intel.com>
 Vipul Ashri <vipul.ashri@oracle.com>
 Visa Hankala <visa@hankala.org>
diff --git a/app/test/test_cfgfile.c b/app/test/test_cfgfile.c
index 2f596affee..a5e3d8699c 100644
--- a/app/test/test_cfgfile.c
+++ b/app/test/test_cfgfile.c
@@ -168,7 +168,7 @@ test_cfgfile_invalid_section_header(void)
 	struct rte_cfgfile *cfgfile;
 
 	cfgfile = rte_cfgfile_load(CFG_FILES_ETC "/invalid_section.ini", 0);
-	TEST_ASSERT_NULL(cfgfile, "Expected failured did not occur");
+	TEST_ASSERT_NULL(cfgfile, "Expected failure did not occur");
 
 	return 0;
 }
@@ -185,7 +185,7 @@ test_cfgfile_invalid_comment(void)
 
 	cfgfile = rte_cfgfile_load_with_params(CFG_FILES_ETC "/sample2.ini", 0,
 					       &params);
-	TEST_ASSERT_NULL(cfgfile, "Expected failured did not occur");
+	TEST_ASSERT_NULL(cfgfile, "Expected failure did not occur");
 
 	return 0;
 }
@@ -196,7 +196,7 @@ test_cfgfile_invalid_key_value_pair(void)
 	struct rte_cfgfile *cfgfile;
 
 	cfgfile = rte_cfgfile_load(CFG_FILES_ETC "/empty_key_value.ini", 0);
-	TEST_ASSERT_NULL(cfgfile, "Expected failured did not occur");
+	TEST_ASSERT_NULL(cfgfile, "Expected failure did not occur");
 
 	return 0;
 }
@@ -236,7 +236,7 @@ test_cfgfile_missing_section(void)
 	struct rte_cfgfile *cfgfile;
 
 	cfgfile = rte_cfgfile_load(CFG_FILES_ETC "/missing_section.ini", 0);
-	TEST_ASSERT_NULL(cfgfile, "Expected failured did not occur");
+	TEST_ASSERT_NULL(cfgfile, "Expected failure did not occur");
 
 	return 0;
 }
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-25 11:28:37.803738780 +0000
+++ 0008-test-cfgfile-fix-typo-in-error-messages.patch	2024-03-25 11:28:37.212389359 +0000
@@ -1 +1 @@
-From fbca1ad85f7725b876d032cb732b3332d247e1f4 Mon Sep 17 00:00:00 2001
+From 8a9e1d1f86ea2996b742e70e742ec204945b27a9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fbca1ad85f7725b876d032cb732b3332d247e1f4 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6bb0855236..f3a25a7402 100644
+index a6992311ba..918e959344 100644
@@ -23 +24 @@
-@@ -528,6 +528,7 @@ Hiral Shah <hshah@marvell.com>
+@@ -506,6 +506,7 @@ Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
@@ -31 +32 @@
-@@ -1513,6 +1514,7 @@ Vincent Guo <guopengfei160@163.com>
+@@ -1438,6 +1439,7 @@ Vincent Guo <guopengfei160@163.com>

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

* patch 'examples/ipsec-secgw: fix typo in error message' has been queued to stable release 22.11.5
  2024-03-25 12:08           ` patch 'doc: fix default IP fragments maximum in programmer guide' " luca.boccassi
                               ` (6 preceding siblings ...)
  2024-03-25 12:08             ` patch 'test/cfgfile: fix typo in error messages' " luca.boccassi
@ 2024-03-25 12:08             ` luca.boccassi
  7 siblings, 0 replies; 202+ messages in thread
From: luca.boccassi @ 2024-03-25 12:08 UTC (permalink / raw)
  To: Masoumeh Farhadi Nia; +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/27/24. So please
shout if anyone has objections.

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

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

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

Thanks.

Luca Boccassi

---
From efe1d783f474ea1668a3e50aac73126b2fb192e0 Mon Sep 17 00:00:00 2001
From: Masoumeh Farhadi Nia <masoumeh.farhadinia@gmail.com>
Date: Thu, 21 Mar 2024 18:41:35 -0400
Subject: [PATCH] examples/ipsec-secgw: fix typo in error message

[ upstream commit 0dc91038201be67714f92a0fd0e0e7ed4f25c6a0 ]

Caught by codespell.

Fixes: 7622291b641d ("examples/ipsec-secgw: allow to specify neighbour MAC address")

Signed-off-by: Masoumeh Farhadi Nia <masoumeh.farhadinia@gmail.com>
---
 .mailmap                      | 1 +
 examples/ipsec-secgw/parser.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 918e959344..172e7f2692 100644
--- a/.mailmap
+++ b/.mailmap
@@ -865,6 +865,7 @@ Martin Weiser <martin.weiser@allegro-packets.com>
 Martyna Szapar <martyna.szapar@intel.com>
 Maryam Tahhan <maryam.tahhan@intel.com>
 Masoud Hasanifard <masoudhasanifard@gmail.com>
+Masoumeh Farhadi Nia <masoumeh.farhadinia@gmail.com>
 Matan Azrad <matan@nvidia.com> <matan@mellanox.com>
 Matej Vido <matejvido@gmail.com> <vido@cesnet.cz>
 Mateusz Kowalski <mateusz.kowalski@intel.com>
diff --git a/examples/ipsec-secgw/parser.c b/examples/ipsec-secgw/parser.c
index 98f8176651..2bd6df335b 100644
--- a/examples/ipsec-secgw/parser.c
+++ b/examples/ipsec-secgw/parser.c
@@ -388,7 +388,7 @@ cfg_parse_neigh(void *parsed_result, __rte_unused struct cmdline *cl,
 	rc = parse_mac(res->mac, &mac);
 	APP_CHECK(rc == 0, st, "invalid ether addr:%s", res->mac);
 	rc = add_dst_ethaddr(res->port, &mac);
-	APP_CHECK(rc == 0, st, "invalid port numer:%hu", res->port);
+	APP_CHECK(rc == 0, st, "invalid port number:%hu", res->port);
 	if (st->status < 0)
 		return;
 }
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-25 11:28:37.847515265 +0000
+++ 0009-examples-ipsec-secgw-fix-typo-in-error-message.patch	2024-03-25 11:28:37.220389660 +0000
@@ -1 +1 @@
-From 0dc91038201be67714f92a0fd0e0e7ed4f25c6a0 Mon Sep 17 00:00:00 2001
+From efe1d783f474ea1668a3e50aac73126b2fb192e0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0dc91038201be67714f92a0fd0e0e7ed4f25c6a0 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index f3a25a7402..3843868716 100644
+index 918e959344..172e7f2692 100644
@@ -21,2 +22,2 @@
-@@ -908,6 +908,7 @@ Martin Weiser <martin.weiser@allegro-packets.com>
- Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@intel.com> <martyna.szapar@intel.com>
+@@ -865,6 +865,7 @@ Martin Weiser <martin.weiser@allegro-packets.com>
+ Martyna Szapar <martyna.szapar@intel.com>

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

end of thread, other threads:[~2024-03-25 12:08 UTC | newest]

Thread overview: 202+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` patch 'lib: add newline in logs' " luca.boccassi
2024-03-07  1:30 ` patch 'lib: remove redundant newline from " luca.boccassi
2024-03-07  1:30 ` patch 'bus/ifpga: remove dead code' " luca.boccassi
2024-03-07  1:30 ` patch 'dma/dpaa2: fix logtype register' " luca.boccassi
2024-03-07  1:30 ` patch 'net/i40e: remove redundant judgment in flow parsing' " luca.boccassi
2024-03-07  1:30 ` patch 'net/iavf: fix memory leak on security context error' " luca.boccassi
2024-03-07  1:30 ` patch 'net/ixgbe: fix memoy leak after device init failure' " luca.boccassi
2024-03-07  1:30 ` patch 'net/ice: fix link update' " luca.boccassi
2024-03-07  1:30 ` patch 'net/ice: fix tunnel TSO capabilities' " luca.boccassi
2024-03-07  1:30 ` patch 'net/ice: fix memory leaks' " luca.boccassi
2024-03-07  1:30 ` patch 'kernel/freebsd: fix module build on FreeBSD 14' " luca.boccassi
2024-03-07  1:30 ` patch 'build: fix reasons conflict' " luca.boccassi
2024-03-07  1:30 ` patch 'telemetry: fix connected clients count' " luca.boccassi
2024-03-07  1:30 ` patch 'telemetry: fix empty JSON dictionaries' " luca.boccassi
2024-03-07  1:30 ` patch 'ci: update versions of actions in GHA' " luca.boccassi
2024-03-07  1:30 ` patch 'eal/x86: add AMD vendor check for TSC calibration' " luca.boccassi
2024-03-07  9:44   ` Tummala, Sivaprasad
2024-03-07  1:30 ` patch 'event/opdl: fix compile-time check' " luca.boccassi
2024-03-07  1:30 ` patch 'eal: verify strdup return' " luca.boccassi
2024-03-07  1:30 ` patch 'bus/dpaa: " luca.boccassi
2024-03-07  1:30 ` patch 'bus/fslmc: " luca.boccassi
2024-03-07  1:30 ` patch 'bus/vdev: " luca.boccassi
2024-03-07  1:30 ` patch 'dma/idxd: " luca.boccassi
2024-03-07  1:30 ` patch 'event/cnxk: " luca.boccassi
2024-03-07  1:30 ` patch 'net/failsafe: fix memory leak in args parsing' " luca.boccassi
2024-03-07  1:30 ` patch 'app/dumpcap: verify strdup return' " luca.boccassi
2024-03-07  1:30 ` patch 'app/pdump: " luca.boccassi
2024-03-07  1:30 ` patch 'app/crypto-perf: " luca.boccassi
2024-03-07  1:30 ` patch 'app/testpmd: " luca.boccassi
2024-03-07  1:30 ` patch 'test: " luca.boccassi
2024-03-07  1:30 ` patch 'examples/qos_sched: fix memory leak in args parsing' " luca.boccassi
2024-03-07  1:30 ` patch 'examples/vhost: verify strdup return' " luca.boccassi
2024-03-07  1:30 ` patch 'pipeline: fix calloc parameters' " luca.boccassi
2024-03-07  1:30 ` patch 'eventdev: " luca.boccassi
2024-03-07  1:30 ` patch 'dmadev: " luca.boccassi
2024-03-07  1:30 ` patch 'rawdev: " luca.boccassi
2024-03-07  1:30 ` patch 'common/mlx5: " luca.boccassi
2024-03-07  1:30 ` patch 'net/bnx2x: " luca.boccassi
2024-03-07  1:30 ` patch 'net/nfp: " luca.boccassi
2024-03-07  1:30 ` patch 'build: fix linker warnings about undefined symbols' " luca.boccassi
2024-03-07  1:31 ` patch 'build: link static libs with whole-archive in subproject' " luca.boccassi
2024-03-07  1:31 ` patch 'net: fix TCP/UDP checksum with padding data' " luca.boccassi
2024-03-07  1:31 ` patch 'net/virtio: remove duplicate queue xstats' " luca.boccassi
2024-03-07  1:31 ` patch 'vhost: fix deadlock during vDPA SW live migration' " luca.boccassi
2024-03-07  1:31 ` patch 'vdpa/mlx5: fix queue enable drain CQ' " luca.boccassi
2024-03-07  1:31 ` patch 'vhost: fix memory leak in Virtio Tx split path' " luca.boccassi
2024-03-07  1:31 ` patch 'cryptodev: remove unused extern variable' " luca.boccassi
2024-03-07  1:31 ` patch 'examples/ipsec-secgw: fix width of variables' " luca.boccassi
2024-03-07  1:31 ` patch 'common/cnxk: fix memory leak in CPT init' " luca.boccassi
2024-03-07  1:31 ` patch 'app/crypto-perf: fix next segment mbuf' " luca.boccassi
2024-03-07  1:31 ` patch 'app/crypto-perf: fix data comparison' " luca.boccassi
2024-03-07  1:31 ` patch 'app/crypto-perf: fix encrypt operation verification' " luca.boccassi
2024-03-07  1:31 ` patch 'event/cnxk: fix dequeue timeout configuration' " luca.boccassi
2024-03-07  1:31 ` patch 'test/event: skip test if no driver is present' " luca.boccassi
2024-03-07  1:31 ` patch 'doc: fix commands in eventdev test tool guide' " luca.boccassi
2024-03-07  1:31 ` patch 'ethdev: fix NVGRE encap flow action description' " luca.boccassi
2024-03-07  1:31 ` patch 'net/nfp: fix resource leak for PF initialization' " luca.boccassi
2024-03-07  1:31 ` patch 'net/af_xdp: fix memzone leak on config failure' " luca.boccassi
2024-03-07  1:31 ` patch 'net/hns3: refactor VF mailbox message struct' " luca.boccassi
2024-03-07  1:31 ` patch 'net/hns3: refactor PF " luca.boccassi
2024-03-07  1:31 ` patch 'net/hns3: refactor send mailbox function' " luca.boccassi
2024-03-07  1:31 ` patch 'net/hns3: refactor handle " luca.boccassi
2024-03-07  1:31 ` patch 'net/hns3: fix VF multiple count on one reset' " luca.boccassi
2024-03-07  1:31 ` patch 'net/hns3: fix disable command with firmware' " luca.boccassi
2024-03-07  1:31 ` patch 'net/hns3: fix reset level comparison' " luca.boccassi
2024-03-07  1:31 ` patch 'net/hns3: remove QinQ insert support for VF' " luca.boccassi
2024-03-07  1:31 ` patch 'doc: add --latencystats option in testpmd guide' " luca.boccassi
2024-03-07  1:31 ` patch 'app/testpmd: hide --bitrate-stats in help if disabled' " luca.boccassi
2024-03-07  1:31 ` patch 'net/vmxnet3: fix initialization on FreeBSD' " luca.boccassi
2024-03-07  1:31 ` patch 'net/mana: prevent values overflow returned from RDMA layer' " luca.boccassi
2024-03-07  1:31 ` patch 'drivers/net: fix buffer overflow for packet types list' " luca.boccassi
2024-03-07  1:31 ` patch 'app/testpmd: fix crash in multi-process forwarding' " luca.boccassi
2024-03-07  1:31 ` patch 'net/ionic: fix missing volatile type for cqe pointers' " luca.boccassi
2024-03-07  1:31 ` patch 'net/ionic: fix RSS query' " luca.boccassi
2024-03-07  1:31 ` patch 'net/ionic: fix device close' " luca.boccassi
2024-03-07  1:31 ` patch 'net/bonding: fix flow count query' " luca.boccassi
2024-03-07  1:31 ` patch 'net/mana: fix memory leak on MR allocation' " luca.boccassi
2024-03-07  1:31 ` patch 'net/mana: handle MR cache expansion failure' " luca.boccassi
2024-03-07  1:31 ` patch 'common/sfc_efx/base: use C11 static assert' " luca.boccassi
2024-03-07  1:31 ` patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' " luca.boccassi
2024-03-07  1:31 ` patch 'net: add macros for VLAN metadata parsing' " luca.boccassi
2024-03-07  1:31 ` patch 'net/netvsc: fix " luca.boccassi
2024-03-07  1:31 ` patch 'net/bnxt: fix array overflow' " luca.boccassi
2024-03-07  1:31 ` patch 'net/bnxt: fix 50G and 100G forced speed' " luca.boccassi
2024-03-07  1:31 ` patch 'net/bnxt: fix speed change from 200G to 25G on Thor' " luca.boccassi
2024-03-07  1:31 ` patch 'net/bnxt: fix backward firmware compatibility' " luca.boccassi
2024-03-07  1:31 ` patch 'net/bnxt: modify locking for representor Tx' " luca.boccassi
2024-03-07  1:31 ` patch 'net/bnxt: fix deadlock in ULP timer callback' " luca.boccassi
2024-03-07  1:31 ` patch 'net/cnxk: fix flow RSS configuration' " luca.boccassi
2024-03-07  1:31 ` patch 'net/thunderx: fix DMAC control register update' " luca.boccassi
2024-03-07  1:31 ` patch 'common/cnxk: fix mbox region copy' " luca.boccassi
2024-03-07  1:31 ` patch 'common/cnxk: fix VLAN check for inner header' " luca.boccassi
2024-03-07  1:31 ` patch 'net/mlx5: fix jump action validation' " luca.boccassi
2024-03-07  1:31 ` patch 'net/mlx5: fix GENEVE TLV option management' " luca.boccassi
2024-03-07  1:31 ` patch 'common/mlx5: fix duplicate read of general capabilities' " luca.boccassi
2024-03-07  1:31 ` patch 'net/mlx5/hws: fix tunnel protocol checks' " luca.boccassi
2024-03-07  1:31 ` patch 'net/mlx5: remove GENEVE options length limitation' " luca.boccassi
2024-03-07  1:31 ` patch 'net/mlx5: fix GENEVE option item translation' " 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
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     ` patch 'doc: fix configuration in baseband 5GNR driver guide' " luca.boccassi
2024-03-14  0:09     ` patch 'event/dlb2: remove superfluous memcpy' " luca.boccassi
2024-03-14  0:09     ` patch 'test/event: fix crash in Tx adapter freeing' " luca.boccassi
2024-03-14  0:09     ` patch 'eventdev: improve Doxygen comments on configure struct' " luca.boccassi
2024-03-14  0:09     ` patch 'eventdev: fix Doxygen processing of vector " luca.boccassi
2024-03-14  0:09     ` patch 'eventdev/crypto: fix enqueueing' " luca.boccassi
2024-03-14  0:09     ` patch 'app/crypto-perf: fix copy segment size' " luca.boccassi
2024-03-14  0:09     ` patch 'app/crypto-perf: fix out-of-place mbuf " luca.boccassi
2024-03-14  0:09     ` patch 'app/crypto-perf: add missing op resubmission' " luca.boccassi
2024-03-14  0:09     ` patch 'doc: fix typos in cryptodev overview' " luca.boccassi
2024-03-14  0:09     ` patch 'net/af_xdp: fix leak on XSK configuration failure' " luca.boccassi
2024-03-14  0:09     ` patch 'app/testpmd: return if no packets in GRO heavy weight mode' " luca.boccassi
2024-03-14  0:09     ` patch 'app/testpmd: fix async flow create failure handling' " luca.boccassi
2024-03-14  0:09     ` patch 'net/tap: do not overwrite flow API errors' " luca.boccassi
2024-03-14  0:09     ` patch 'net/tap: fix traffic control handle calculation' " luca.boccassi
2024-03-14  0:09     ` patch 'net/bnxt: fix null pointer dereference' " luca.boccassi
2024-03-14  0:09     ` patch 'net/ixgbevf: fix RSS init for x550 NICs' " luca.boccassi
2024-03-14  0:09     ` patch 'net/iavf: remove error logs for VLAN offloading' " luca.boccassi
2024-03-14  0:09     ` patch 'net/ixgbe: increase VF reset timeout' " luca.boccassi
2024-03-14  0:09     ` patch 'net/i40e: remove incorrect 16B descriptor read block' " luca.boccassi
2024-03-14  0:09     ` patch 'net/iavf: " luca.boccassi
2024-03-14  0:09     ` patch 'net/ice: " luca.boccassi
2024-03-14  0:09     ` patch 'net/bnx2x: fix warnings about memcpy lengths' " luca.boccassi
2024-03-14  0:09     ` patch 'common/cnxk: remove CN9K inline IPsec FP opcodes' " luca.boccassi
2024-03-14  0:09     ` patch 'net/cnxk: fix buffer size configuration' " luca.boccassi
2024-03-14  0:09     ` patch 'common/cnxk: fix Tx MTU " luca.boccassi
2024-03-14  0:09     ` patch 'net/cnxk: fix MTU limit' " luca.boccassi
2024-03-14  0:09     ` patch 'common/cnxk: fix RSS RETA configuration' " luca.boccassi
2024-03-14  0:09     ` patch 'net/cnxk: add cookies check for multi-segment offload' " luca.boccassi
2024-03-14  0:09     ` patch 'common/cnxk: fix mbox struct attributes' " luca.boccassi
2024-03-14  0:09     ` patch 'net/cnxk: fix mbuf fields in multi-segment Tx' " luca.boccassi
2024-03-14  0:09     ` patch 'common/cnxk: fix link config for SDP' " luca.boccassi
2024-03-14  0:09     ` patch 'common/cnxk: remove dead code' " luca.boccassi
2024-03-14  0:09     ` patch 'common/cnxk: fix possible out-of-bounds access' " luca.boccassi
2024-03-14  0:09     ` patch 'net/mlx5/hws: check not supported fields in VXLAN' " luca.boccassi
2024-03-14  0:09     ` patch 'net/mlx5/hws: fix VLAN item in non-relaxed mode' " luca.boccassi
2024-03-14  0:09     ` patch 'net/mlx5: fix use after free when releasing Tx queues' " luca.boccassi
2024-03-14  0:09     ` patch 'net/mlx5: fix error packets drop in regular Rx' " luca.boccassi
2024-03-14  0:09     ` patch 'net/mlx5: prevent querying aged flows on uninit port' " luca.boccassi
2024-03-14  0:09     ` patch 'net/mlx5/hws: fix VLAN inner type' " luca.boccassi
2024-03-14  0:09     ` patch 'net/mlx5: fix condition of LACP miss flow' " luca.boccassi
2024-03-14  0:09     ` patch 'net/mlx5: fix conntrack action handle representation' " luca.boccassi
2024-03-14  0:09     ` patch 'net/mlx5: fix connection tracking action validation' " luca.boccassi
2024-03-14  0:09     ` patch 'net/mlx5/hws: enable multiple integrity items' " luca.boccassi
2024-03-14  0:09     ` patch 'net/mlx5: fix VLAN handling in meter split' " luca.boccassi
2024-03-14  0:09     ` patch 'net/mlx5: fix counters map in bonding mode' " luca.boccassi
2024-03-14  0:09     ` patch 'net/mlx5: remove device status check in flow creation' " luca.boccassi
2024-03-14  0:09     ` patch 'test: fix probing in secondary process' " luca.boccassi
2024-03-14  0:09     ` patch 'bus/vdev: fix devargs " luca.boccassi
2024-03-14  0:09     ` patch 'config: fix CPU instruction set for cross-build' " luca.boccassi
2024-03-14  0:09     ` patch 'test/mbuf: fix external mbuf case with assert enabled' " luca.boccassi
2024-03-14  0:09     ` patch 'test/bpf: fix mbuf init in some filter test' " luca.boccassi
2024-03-14  0:09     ` patch 'net/tap: log Netlink extended ack unavailability' " luca.boccassi
2024-03-14  0:09     ` patch 'baseband/fpga_5gnr_fec: use a better random generator' " luca.boccassi
2024-03-14  0:09     ` patch 'net/ice: fix version for experimental symbols' " luca.boccassi
2024-03-14  0:09     ` patch 'test: do not count skipped tests as executed' " luca.boccassi
2024-03-14  0:09     ` patch 'examples/packet_ordering: fix Rx with reorder mode disabled' " luca.boccassi
2024-03-14  0:09     ` patch 'examples/l3fwd: fix Rx over not ready port' " luca.boccassi
2024-03-18 15:38       ` patch 'build: pass cflags in subproject' " luca.boccassi
2024-03-18 15:38         ` patch 'examples/ipsec-secgw: fix cryptodev to SA mapping' " luca.boccassi
2024-03-18 15:38         ` patch 'crypto/qat: fix crash with CCM null AAD pointer' " luca.boccassi
2024-03-18 15:38         ` patch 'net/hns3: enable PFC for all user priorities' " luca.boccassi
2024-03-18 15:38         ` patch 'doc: add traffic manager in features table' " luca.boccassi
2024-03-18 15:38         ` patch 'doc: add link speeds configuration " luca.boccassi
2024-03-18 15:38         ` patch 'net/ena: fix fast mbuf free' " luca.boccassi
2024-03-18 15:38         ` patch 'net/ena/base: limit exponential backoff' " luca.boccassi
2024-03-18 15:38         ` patch 'net/ena/base: restructure interrupt handling' " luca.boccassi
2024-03-18 15:39         ` patch 'net/nfp: fix switch domain free check' " luca.boccassi
2024-03-18 15:39         ` patch 'app/testpmd: fix --stats-period option " luca.boccassi
2024-03-18 15:39         ` patch 'app/testpmd: fix burst option parsing' " luca.boccassi
2024-03-18 15:39         ` patch 'app/testpmd: fix error message for invalid option' " luca.boccassi
2024-03-18 15:39         ` patch 'net/hns3: support new device' " luca.boccassi
2024-03-18 15:39         ` patch 'net/mlx5: fix HWS meter actions availability' " luca.boccassi
2024-03-18 15:39         ` patch 'doc: update link to Windows DevX in mlx5 guide' " luca.boccassi
2024-03-18 15:39         ` patch 'net/mlx5: fix VLAN ID in flow modify' " luca.boccassi
2024-03-18 15:39         ` patch 'net/mlx5: fix meter policy priority' " luca.boccassi
2024-03-18 15:39         ` patch 'net/mlx5: remove duplication of L3 flow item validation' " luca.boccassi
2024-03-18 15:39         ` patch 'net/mlx5: fix IP-in-IP tunnels recognition' " luca.boccassi
2024-03-18 15:39         ` patch 'net/mlx5: fix DR context release ordering' " luca.boccassi
2024-03-18 15:39         ` patch 'net/mlx5: fix template clean up of FDB control flow rule' " luca.boccassi
2024-03-18 15:39         ` patch 'net/mlx5: prevent ioctl failure log flooding' " luca.boccassi
2024-03-18 15:39         ` patch 'net/mlx5: fix age position in hairpin split' " luca.boccassi
2024-03-18 15:39         ` patch 'net/mlx5: fix drop action release timing' " luca.boccassi
2024-03-18 15:39         ` patch 'net/mlx5: fix warning about copy length' " luca.boccassi
2024-03-18 15:39         ` patch 'net/bnxt: fix number of Tx queues being created' " luca.boccassi
2024-03-18 16:08           ` Kishore Padmanabha
2024-03-18 15:39         ` patch 'examples/ipsec-secgw: fix Rx queue ID in Rx callback' " luca.boccassi
2024-03-25 12:08           ` patch 'doc: fix default IP fragments maximum in programmer guide' " luca.boccassi
2024-03-25 12:08             ` patch 'net/ena: fix mbuf double free in fast free mode' " luca.boccassi
2024-03-25 12:08             ` patch 'net/vmxnet3: ignore Rx queue interrupt setup on FreeBSD' " luca.boccassi
2024-03-25 12:08             ` patch 'net/mlx5/hws: fix port ID for root table' " luca.boccassi
2024-03-25 12:08             ` patch 'doc: fix typo in profiling guide' " luca.boccassi
2024-03-25 12:08             ` patch 'doc: fix typo in packet framework " luca.boccassi
2024-03-25 12:08             ` patch 'test/power: fix typo in error message' " luca.boccassi
2024-03-25 12:08             ` patch 'test/cfgfile: fix typo in error messages' " luca.boccassi
2024-03-25 12:08             ` patch 'examples/ipsec-secgw: fix typo in error message' " luca.boccassi

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