patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'hash: remove some dead code' has been queued to stable release 21.11.7
@ 2024-03-05 15:33 Kevin Traynor
  2024-03-05 15:33 ` patch 'regexdev: fix logtype register' " Kevin Traynor
                   ` (69 more replies)
  0 siblings, 70 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 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 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 014409d9f3b67ebff18d7c9b990c46818561920f 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
@@ -30,15 +30,4 @@
 #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.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:54.779152597 +0000
+++ 0001-hash-remove-some-dead-code.patch	2024-03-05 14:08:54.588520601 +0000
@@ -1 +1 @@
-From 25e3fe362b3ad7484750eb7134bfca8e3fab5703 Mon Sep 17 00:00:00 2001
+From 014409d9f3b67ebff18d7c9b990c46818561920f 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] 71+ messages in thread

* patch 'regexdev: fix logtype register' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'net/i40e: remove redundant judgment in flow parsing' " Kevin Traynor
                   ` (68 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 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 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 570eff65fd9063cce8cc7a9169f54c054612c5de 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 04ab713730..c66e251509 100644
--- a/lib/regexdev/rte_regexdev.c
+++ b/lib/regexdev/rte_regexdev.c
@@ -22,5 +22,5 @@ static struct {
 } *rte_regexdev_shared_data;
 
-int rte_regexdev_logtype;
+RTE_LOG_REGISTER_DEFAULT(rte_regexdev_logtype, INFO);
 
 static uint16_t
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:54.800212621 +0000
+++ 0002-regexdev-fix-logtype-register.patch	2024-03-05 14:08:54.589520604 +0000
@@ -1 +1 @@
-From 6351bdeb975dcf4b00ae1319f1d901eb65d4d4d3 Mon Sep 17 00:00:00 2001
+From 570eff65fd9063cce8cc7a9169f54c054612c5de Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6351bdeb975dcf4b00ae1319f1d901eb65d4d4d3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index caec069182..d38a85eb0b 100644
+index 04ab713730..c66e251509 100644
@@ -24 +25 @@
-@@ -20,5 +20,5 @@ static struct {
+@@ -22,5 +22,5 @@ static struct {


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

* patch 'net/i40e: remove redundant judgment in flow parsing' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
  2024-03-05 15:33 ` patch 'regexdev: fix logtype register' " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'net/iavf: fix memory leak on security context error' " Kevin Traynor
                   ` (67 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 3c1d8f321d84a9a2595884ffaadf80b008f636c3 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 b4cdefafa5..5c7f445018 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2466,6 +2466,5 @@ 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)) {
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:54.821576440 +0000
+++ 0003-net-i40e-remove-redundant-judgment-in-flow-parsing.patch	2024-03-05 14:08:54.594520617 +0000
@@ -1 +1 @@
-From e930f8622e05e410a475c6b57dd7edd73b2e1705 Mon Sep 17 00:00:00 2001
+From 3c1d8f321d84a9a2595884ffaadf80b008f636c3 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 b4cdefafa5..5c7f445018 100644
@@ -32,2 +33,2 @@
-@@ -1709,6 +1709,5 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
- 				ether_type = rte_be_to_cpu_16(eth_spec->hdr.ether_type);
+@@ -2466,6 +2466,5 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
+ 				ether_type = rte_be_to_cpu_16(eth_spec->type);


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

* patch 'net/iavf: fix memory leak on security context error' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
  2024-03-05 15:33 ` patch 'regexdev: fix logtype register' " Kevin Traynor
  2024-03-05 15:33 ` patch 'net/i40e: remove redundant judgment in flow parsing' " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'net/ixgbe: fix memoy leak after device init failure' " Kevin Traynor
                   ` (66 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 835b8ab53cd43dfe312e027b3fcd932c8d8130ee 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 9ab09778e2..1fbffac6bc 100644
--- a/drivers/net/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/iavf/iavf_ipsec_crypto.c
@@ -1498,6 +1498,9 @@ iavf_security_ctx_create(struct iavf_adapter *adapter)
 		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;
+		}
 	}
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:54.843722404 +0000
+++ 0004-net-iavf-fix-memory-leak-on-security-context-error.patch	2024-03-05 14:08:54.597520625 +0000
@@ -1 +1 @@
-From 8758ad5f8633ce4197271d41ece0cc7f799d3d6e Mon Sep 17 00:00:00 2001
+From 835b8ab53cd43dfe312e027b3fcd932c8d8130ee 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 9ab09778e2..1fbffac6bc 100644
@@ -24 +25 @@
-@@ -1519,6 +1519,9 @@ iavf_security_ctx_create(struct iavf_adapter *adapter)
+@@ -1498,6 +1498,9 @@ iavf_security_ctx_create(struct iavf_adapter *adapter)


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

* patch 'net/ixgbe: fix memoy leak after device init failure' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (2 preceding siblings ...)
  2024-03-05 15:33 ` patch 'net/iavf: fix memory leak on security context error' " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'net/ice: fix link update' " Kevin Traynor
                   ` (65 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 4f2f83c0a6c9f2837d930bc4cdd49ca4e03fe68c 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 e9dd243d5b..96dc34eb83 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1188,5 +1188,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	if (diag != IXGBE_SUCCESS) {
 		PMD_INIT_LOG(ERR, "The EEPROM checksum is not valid: %d", diag);
-		return -EIO;
+		ret = -EIO;
+		goto err_exit;
 	}
 
@@ -1226,5 +1227,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	if (diag) {
 		PMD_INIT_LOG(ERR, "Hardware Initialization Failure: %d", diag);
-		return -EIO;
+		ret = -EIO;
+		goto err_exit;
 	}
 
@@ -1246,5 +1248,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 			     "MAC addresses",
 			     RTE_ETHER_ADDR_LEN * hw->mac.num_rar_entries);
-		return -ENOMEM;
+		ret = -ENOMEM;
+		goto err_exit;
 	}
 	/* Copy the permanent MAC address */
@@ -1261,5 +1264,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 		rte_free(eth_dev->data->mac_addrs);
 		eth_dev->data->mac_addrs = NULL;
-		return -ENOMEM;
+		ret = -ENOMEM;
+		goto err_exit;
 	}
 
@@ -1345,4 +1349,9 @@ err_pf_host_init:
 	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.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:54.865113526 +0000
+++ 0005-net-ixgbe-fix-memoy-leak-after-device-init-failure.patch	2024-03-05 14:08:54.607520651 +0000
@@ -1 +1 @@
-From 4d70ae0f1bb88e2aa100f5f7bf50b6484f0685cd Mon Sep 17 00:00:00 2001
+From 4f2f83c0a6c9f2837d930bc4cdd49ca4e03fe68c 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 e9dd243d5b..96dc34eb83 100644
@@ -23 +24 @@
-@@ -1191,5 +1191,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1188,5 +1188,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -31 +32 @@
-@@ -1229,5 +1230,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1226,5 +1227,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -39 +40 @@
-@@ -1249,5 +1251,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1246,5 +1248,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -47 +48 @@
-@@ -1264,5 +1267,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1261,5 +1264,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -55 +56 @@
-@@ -1348,4 +1352,9 @@ err_pf_host_init:
+@@ -1345,4 +1349,9 @@ err_pf_host_init:


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

* patch 'net/ice: fix link update' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (3 preceding siblings ...)
  2024-03-05 15:33 ` patch 'net/ixgbe: fix memoy leak after device init failure' " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'net/ice: fix tunnel TSO capabilities' " Kevin Traynor
                   ` (64 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 78c0d6dd0bc3400e9013062f50311efa1f4393c7 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 5e84894e5f..0b7555cc55 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -1688,4 +1688,5 @@ ice_pf_setup(struct ice_pf *pf)
 
 	pf->main_vsi = vsi;
+	rte_spinlock_init(&pf->link_lock);
 
 	return 0;
@@ -3477,8 +3478,23 @@ ice_rxq_intr_setup(struct rte_eth_dev *dev)
 }
 
+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;
@@ -3486,6 +3502,5 @@ ice_get_init_link_status(struct rte_eth_dev *dev)
 	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");
@@ -3842,5 +3857,5 @@ 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;
@@ -3856,6 +3871,5 @@ 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;
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index ac56c3cc60..6209575a9b 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -473,4 +473,8 @@ struct ice_pf {
 	uint64_t supported_rxdid; /* bitmap for supported RXDID */
 	uint64_t rss_hf;
+	/* lock prevent race condition between lsc interrupt handler
+	 * and link status update during dev_start.
+	 */
+	rte_spinlock_t link_lock;
 };
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:54.890591393 +0000
+++ 0006-net-ice-fix-link-update.patch	2024-03-05 14:08:54.613520667 +0000
@@ -1 +1 @@
-From 4e5dc111464e83e9a55fa466d8f682f0027b721e Mon Sep 17 00:00:00 2001
+From 78c0d6dd0bc3400e9013062f50311efa1f4393c7 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 5e84894e5f..0b7555cc55 100644
@@ -26 +27 @@
-@@ -1805,4 +1805,5 @@ ice_pf_setup(struct ice_pf *pf)
+@@ -1688,4 +1688,5 @@ ice_pf_setup(struct ice_pf *pf)
@@ -32 +33 @@
-@@ -3622,8 +3623,23 @@ ice_rxq_intr_setup(struct rte_eth_dev *dev)
+@@ -3477,8 +3478,23 @@ ice_rxq_intr_setup(struct rte_eth_dev *dev)
@@ -57 +58 @@
-@@ -3631,6 +3647,5 @@ ice_get_init_link_status(struct rte_eth_dev *dev)
+@@ -3486,6 +3502,5 @@ ice_get_init_link_status(struct rte_eth_dev *dev)
@@ -65 +66 @@
-@@ -3997,5 +4012,5 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -3842,5 +3857,5 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
@@ -72 +73 @@
-@@ -4011,6 +4026,5 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -3856,6 +3871,5 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
@@ -81 +82 @@
-index abe6dcdc23..d607f028e0 100644
+index ac56c3cc60..6209575a9b 100644
@@ -84,3 +85,3 @@
-@@ -549,4 +549,8 @@ struct ice_pf {
- 	struct ice_tm_conf tm_conf;
- 	uint16_t outer_ethertype;
+@@ -473,4 +473,8 @@ struct ice_pf {
+ 	uint64_t supported_rxdid; /* bitmap for supported RXDID */
+ 	uint64_t rss_hf;


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

* patch 'net/ice: fix tunnel TSO capabilities' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (4 preceding siblings ...)
  2024-03-05 15:33 ` patch 'net/ice: fix link update' " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'kernel/freebsd: fix module build on FreeBSD 14' " Kevin Traynor
                   ` (63 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Kaiwen Deng; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From c354880dcf5fafc48392f079ac73aaf55469cf33 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 0b7555cc55..ef24a21239 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3746,5 +3746,9 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			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 ac939a3ba6..f07e304e20 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -252,4 +252,8 @@ ice_rxq_vec_setup_default(struct ice_rx_queue *rxq)
 		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)
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:54.915785737 +0000
+++ 0007-net-ice-fix-tunnel-TSO-capabilities.patch	2024-03-05 14:08:54.619520683 +0000
@@ -1 +1 @@
-From daac90272857812b3da1db95caf5922f03a83343 Mon Sep 17 00:00:00 2001
+From c354880dcf5fafc48392f079ac73aaf55469cf33 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 0b7555cc55..ef24a21239 100644
@@ -28 +29 @@
-@@ -3892,5 +3892,9 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -3746,5 +3746,9 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -40 +41 @@
-index 55840cf170..4b73465af5 100644
+index ac939a3ba6..f07e304e20 100644


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

* patch 'kernel/freebsd: fix module build on FreeBSD 14' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (5 preceding siblings ...)
  2024-03-05 15:33 ` patch 'net/ice: fix tunnel TSO capabilities' " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'ci: update versions of actions in GHA' " Kevin Traynor
                   ` (62 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Daxue Gao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 7f994fccfe7f81d6ac04efc86c3816d76f1f7cfb 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
@@ -79,8 +79,12 @@ struct pci_bdf {
 };
 
-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
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:54.940538396 +0000
+++ 0008-kernel-freebsd-fix-module-build-on-FreeBSD-14.patch	2024-03-05 14:08:54.619520683 +0000
@@ -1 +1 @@
-From 5eedf66ac0e5ce62cd333e523996c63a3c4c2c00 Mon Sep 17 00:00:00 2001
+From 7f994fccfe7f81d6ac04efc86c3816d76f1f7cfb 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] 71+ messages in thread

* patch 'ci: update versions of actions in GHA' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (6 preceding siblings ...)
  2024-03-05 15:33 ` patch 'kernel/freebsd: fix module build on FreeBSD 14' " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'eal/x86: add AMD vendor check for TSC calibration' " Kevin Traynor
                   ` (61 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: David Marchand; +Cc: Aaron Conole, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 100a4dc25e56e44bcf65155290321950ad9c90f0 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 | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f1079d840e..12436403bb 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -72,5 +72,5 @@ jobs:
     steps:
     - name: Checkout sources
-      uses: actions/checkout@v3
+      uses: actions/checkout@v4
     - name: Generate cache keys
       id: get_ref_keys
@@ -80,5 +80,5 @@ jobs:
         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
@@ -88,5 +88,5 @@ jobs:
     - name: Retrieve libabigail cache
       id: libabigail-cache
-      uses: actions/cache@v3
+      uses: actions/cache@v4
       if: env.ABI_CHECKS == 'true'
       with:
@@ -94,5 +94,5 @@ jobs:
         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:
@@ -137,5 +137,5 @@ jobs:
     - name: Upload logs on failure
       if: failure()
-      uses: actions/upload-artifact@v3
+      uses: actions/upload-artifact@v4
       with:
         name: meson-logs-${{ join(matrix.config.*, '-') }}
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:54.960792529 +0000
+++ 0009-ci-update-versions-of-actions-in-GHA.patch	2024-03-05 14:08:54.619520683 +0000
@@ -1 +1 @@
-From 2ea7994ae39ff979b15899ec9eb9c68c944d4b11 Mon Sep 17 00:00:00 2001
+From 100a4dc25e56e44bcf65155290321950ad9c90f0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ea7994ae39ff979b15899ec9eb9c68c944d4b11 ]
+
@@ -12,2 +13,0 @@
-Cc: stable@dpdk.org
-
@@ -17,2 +17,2 @@
- .github/workflows/build.yml | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
+ .github/workflows/build.yml | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
@@ -21 +21 @@
-index 421207c241..776fbf6f30 100644
+index f1079d840e..12436403bb 100644
@@ -24 +24 @@
-@@ -73,5 +73,5 @@ jobs:
+@@ -72,5 +72,5 @@ jobs:
@@ -31,2 +31,2 @@
-@@ -81,5 +81,5 @@ jobs:
-         echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
+@@ -80,5 +80,5 @@ jobs:
+         echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
@@ -38 +38 @@
-@@ -89,5 +89,5 @@ jobs:
+@@ -88,5 +88,5 @@ jobs:
@@ -45 +45 @@
-@@ -95,5 +95,5 @@ jobs:
+@@ -94,5 +94,5 @@ jobs:
@@ -52 +52 @@
-@@ -144,5 +144,5 @@ jobs:
+@@ -137,5 +137,5 @@ jobs:
@@ -59,35 +58,0 @@
-@@ -172,5 +172,5 @@ jobs:
-     - name: Retrieve image cache
-       id: image_cache
--      uses: actions/cache@v3
-+      uses: actions/cache@v4
-       with:
-         path: ~/.image
-@@ -219,5 +219,5 @@ jobs:
-     steps:
-     - name: Checkout sources
--      uses: actions/checkout@v3
-+      uses: actions/checkout@v4
-     - name: Generate various keys
-       id: get_keys
-@@ -227,5 +227,5 @@ jobs:
-     - name: Retrieve image cache
-       id: image_cache
--      uses: actions/cache@v3
-+      uses: actions/cache@v4
-       with:
-         path: ~/.image
-@@ -237,5 +237,5 @@ jobs:
-         false
-     - name: Retrieve ccache cache
--      uses: actions/cache@v3
-+      uses: actions/cache@v4
-       with:
-         path: ~/.ccache
-@@ -277,5 +277,5 @@ jobs:
-     - name: Upload logs on failure
-       if: failure()
--      uses: actions/upload-artifact@v3
-+      uses: actions/upload-artifact@v4
-       with:
-         name: ${{ steps.get_keys.outputs.logs }}


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

* patch 'eal/x86: add AMD vendor check for TSC calibration' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (7 preceding siblings ...)
  2024-03-05 15:33 ` patch 'ci: update versions of actions in GHA' " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'eal: verify strdup return' " Kevin Traynor
                   ` (60 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Sivaprasad Tummala; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 83776248bca6d7eeb077bb7f25dad6c806b8f989 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 | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/lib/eal/x86/rte_cycles.c b/lib/eal/x86/rte_cycles.c
index edd9621abb..2a601d7035 100644
--- a/lib/eal/x86/rte_cycles.c
+++ b/lib/eal/x86/rte_cycles.c
@@ -7,5 +7,8 @@
 #include <cpuid.h>
 
-#include <rte_common.h>
+#define x86_vendor_amd(t1, t2, t3)        \
+	((t1 == 0x68747541) && /* htuA */   \
+	 (t2 == 0x444d4163) && /* DMAc */   \
+	 (t3 == 0x69746e65))   /* itne */
 
 #include "eal_private.h"
@@ -92,4 +95,16 @@ get_tsc_freq_arch(void)
 	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
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:54.981404678 +0000
+++ 0010-eal-x86-add-AMD-vendor-check-for-TSC-calibration.patch	2024-03-05 14:08:54.620520686 +0000
@@ -1 +1 @@
-From 31d72ff4dc7c057366153e9918ac92bf9123a3bc Mon Sep 17 00:00:00 2001
+From 83776248bca6d7eeb077bb7f25dad6c806b8f989 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 31d72ff4dc7c057366153e9918ac92bf9123a3bc ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +17,2 @@
- lib/eal/x86/rte_cycles.c | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
+ lib/eal/x86/rte_cycles.c | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
@@ -20 +21 @@
-index 69ed59b4f0..f147a5231d 100644
+index edd9621abb..2a601d7035 100644
@@ -23,2 +24,2 @@
-@@ -11,4 +11,8 @@
- #endif
+@@ -7,5 +7,8 @@
+ #include <cpuid.h>
@@ -25,0 +27 @@
+-#include <rte_common.h>
@@ -32 +34 @@
-@@ -111,4 +115,16 @@ get_tsc_freq_arch(void)
+@@ -92,4 +95,16 @@ get_tsc_freq_arch(void)


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

* patch 'eal: verify strdup return' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (8 preceding siblings ...)
  2024-03-05 15:33 ` patch 'eal/x86: add AMD vendor check for TSC calibration' " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'bus/dpaa: " Kevin Traynor
                   ` (59 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 7fc3309c5d8719c2141305797b74d8a5b738438c 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 1cfdd75f3b..1cd7a33fbf 100644
--- a/lib/eal/common/eal_common_options.c
+++ b/lib/eal/common/eal_common_options.c
@@ -227,4 +227,6 @@ eal_save_args(int argc, char **argv)
 			break;
 		eal_args[i] = strdup(argv[i]);
+		if (eal_args[i] == NULL)
+			goto error;
 	}
 	eal_args[i++] = NULL; /* always finish with NULL */
@@ -236,11 +238,29 @@ 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 52fe336572..28a8ddc18c 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -186,4 +186,6 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
 			strlcpy(pci_slot_name, buf, sizeof(subsystem));
 			event->devname = strdup(pci_slot_name);
+			if (event->devname == NULL)
+				return -1;
 		}
 		for (; i < length; i++) {
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.001873193 +0000
+++ 0011-eal-verify-strdup-return.patch	2024-03-05 14:08:54.622520691 +0000
@@ -1 +1 @@
-From 5821a384a4ca611e0f67786400b9f5b18f34a416 Mon Sep 17 00:00:00 2001
+From 7fc3309c5d8719c2141305797b74d8a5b738438c 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 1cfdd75f3b..1cd7a33fbf 100644
@@ -62 +63 @@
-index e678dce6c7..fff4e8fa83 100644
+index 52fe336572..28a8ddc18c 100644
@@ -65 +66 @@
-@@ -183,4 +183,6 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
+@@ -186,4 +186,6 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)


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

* patch 'bus/dpaa: verify strdup return' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (9 preceding siblings ...)
  2024-03-05 15:33 ` patch 'eal: verify strdup return' " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'bus/fslmc: " Kevin Traynor
                   ` (58 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Sachin Saxena, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From f128469220822165671c0c7e60313b11e84eb692 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 5546a9cb8d..7fba928d59 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -783,4 +783,8 @@ 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=");
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.023045546 +0000
+++ 0012-bus-dpaa-verify-strdup-return.patch	2024-03-05 14:08:54.623520694 +0000
@@ -1 +1 @@
-From 2729fa6654b328bb4b9a0ede6d1e1019bd6caf0c Mon Sep 17 00:00:00 2001
+From f128469220822165671c0c7e60313b11e84eb692 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 5546a9cb8d..7fba928d59 100644
@@ -21 +22 @@
-@@ -793,4 +793,8 @@ dpaa_bus_dev_iterate(const void *start, const char *str,
+@@ -783,4 +783,8 @@ dpaa_bus_dev_iterate(const void *start, const char *str,


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

* patch 'bus/fslmc: verify strdup return' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (10 preceding siblings ...)
  2024-03-05 15:33 ` patch 'bus/dpaa: " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'bus/vdev: " Kevin Traynor
                   ` (57 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Sachin Saxena, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 5a753bd6ddef093ad394bb8859db1cc57656bebe 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 53fd75539e..2993af2563 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -639,4 +639,8 @@ 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=");
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.043511419 +0000
+++ 0013-bus-fslmc-verify-strdup-return.patch	2024-03-05 14:08:54.623520694 +0000
@@ -1 +1 @@
-From 180d52bc7de2395ce9f4e5a707f4d8bb52be2fe4 Mon Sep 17 00:00:00 2001
+From 5a753bd6ddef093ad394bb8859db1cc57656bebe 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 53fd75539e..2993af2563 100644
@@ -21 +22 @@
-@@ -636,4 +636,8 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
+@@ -639,4 +639,8 @@ fslmc_bus_dev_iterate(const void *start, const char *str,


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

* patch 'bus/vdev: verify strdup return' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (11 preceding siblings ...)
  2024-03-05 15:33 ` patch 'bus/fslmc: " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'dma/idxd: " Kevin Traynor
                   ` (56 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Huisong Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From fa4c241ce79dd4e001ee57355829eca098c07ca4 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 a8d8b2327e..272ea704e5 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -250,4 +250,8 @@ alloc_devargs(const char *name, const char *args)
 	else
 		devargs->data = strdup("");
+	if (devargs->data == NULL) {
+		free(devargs);
+		return NULL;
+	}
 	devargs->args = devargs->data;
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.063799441 +0000
+++ 0014-bus-vdev-verify-strdup-return.patch	2024-03-05 14:08:54.624520696 +0000
@@ -1 +1 @@
-From 83f275fa8124daf3a6b3e56f4b40a2be4b07a3b4 Mon Sep 17 00:00:00 2001
+From fa4c241ce79dd4e001ee57355829eca098c07ca4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 83f275fa8124daf3a6b3e56f4b40a2be4b07a3b4 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 7974b27295..05582f1727 100644
+index a8d8b2327e..272ea704e5 100644
@@ -21 +22 @@
-@@ -248,4 +248,8 @@ alloc_devargs(const char *name, const char *args)
+@@ -250,4 +250,8 @@ alloc_devargs(const char *name, const char *args)


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

* patch 'dma/idxd: verify strdup return' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (12 preceding siblings ...)
  2024-03-05 15:33 ` patch 'bus/vdev: " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'event/cnxk: " Kevin Traynor
                   ` (55 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 93cc8c419ff1ea0dc30c2045b75f86ade33c1f1e 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 594b3e1d5a..7aaccd50f4 100644
--- a/drivers/dma/idxd/idxd_bus.c
+++ b/drivers/dma/idxd/idxd_bus.c
@@ -249,7 +249,13 @@ is_for_this_process_use(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)
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.084369232 +0000
+++ 0015-dma-idxd-verify-strdup-return.patch	2024-03-05 14:08:54.625520699 +0000
@@ -1 +1 @@
-From 83cfa2cbf3f3fb78e2f2dd228109adcb38e18a5c Mon Sep 17 00:00:00 2001
+From 93cc8c419ff1ea0dc30c2045b75f86ade33c1f1e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 83cfa2cbf3f3fb78e2f2dd228109adcb38e18a5c ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 3b2d4c2b65..ba8076715d 100644
+index 594b3e1d5a..7aaccd50f4 100644
@@ -20 +21 @@
-@@ -262,7 +262,13 @@ is_for_this_process_use(struct rte_dsa_device *dev, const char *name)
+@@ -249,7 +249,13 @@ is_for_this_process_use(const char *name)


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

* patch 'event/cnxk: verify strdup return' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (13 preceding siblings ...)
  2024-03-05 15:33 ` patch 'dma/idxd: " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'net/failsafe: fix memory leak in args parsing' " Kevin Traynor
                   ` (54 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From bb7030a551b7cee930ab0666c7eb3139634bc123 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 27c1840f71..19164f7b86 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -523,4 +523,7 @@ parse_qos_list(const char *value, void *opaque)
 	char *f = s;
 
+	if (s == NULL)
+		return;
+
 	while (*s) {
 		if (*s == '[')
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.105246711 +0000
+++ 0016-event-cnxk-verify-strdup-return.patch	2024-03-05 14:08:54.625520699 +0000
@@ -1 +1 @@
-From b4b3a7037b2cab4dc5d004ed0fb9ec1e5911334e Mon Sep 17 00:00:00 2001
+From bb7030a551b7cee930ab0666c7eb3139634bc123 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 27c1840f71..19164f7b86 100644
@@ -20 +21 @@
-@@ -554,4 +554,7 @@ parse_list(const char *value, void *opaque, param_parse_t fn)
+@@ -523,4 +523,7 @@ parse_qos_list(const char *value, void *opaque)


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

* patch 'net/failsafe: fix memory leak in args parsing' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (14 preceding siblings ...)
  2024-03-05 15:33 ` patch 'event/cnxk: " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'app/dumpcap: verify strdup return' " Kevin Traynor
                   ` (53 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From b8422c5011caa63214bc3d343e56208eb84fbedb 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
@@ -249,5 +249,5 @@ fs_parse_device_param(struct rte_eth_dev *dev, const char *param,
 	} else {
 		ERROR("Unrecognized device type: %.*s", (int)b, param);
-		return -EINVAL;
+		ret = -EINVAL;
 	}
 free_args:
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.125535921 +0000
+++ 0017-net-failsafe-fix-memory-leak-in-args-parsing.patch	2024-03-05 14:08:54.626520702 +0000
@@ -1 +1 @@
-From 2ddf2d7a15deeac3585e08fd7f9ef46ad082b126 Mon Sep 17 00:00:00 2001
+From b8422c5011caa63214bc3d343e56208eb84fbedb 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] 71+ messages in thread

* patch 'app/dumpcap: verify strdup return' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (15 preceding siblings ...)
  2024-03-05 15:33 ` patch 'net/failsafe: fix memory leak in args parsing' " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'app/pdump: " Kevin Traynor
                   ` (52 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 59b5633558a0ce472d328a69f4dda1c3084d5765 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 74dd72b3ac..44576bed42 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -528,4 +528,9 @@ static void dpdk_init(void)
 		eal_argv[i] = strdup(args[i]);
 
+	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.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.145524824 +0000
+++ 0018-app-dumpcap-verify-strdup-return.patch	2024-03-05 14:08:54.627520704 +0000
@@ -1 +1 @@
-From 6bb5ffe3ea9a5ad41848c19c2787df42de2a3cab Mon Sep 17 00:00:00 2001
+From 59b5633558a0ce472d328a69f4dda1c3084d5765 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 74dd72b3ac..44576bed42 100644
@@ -20,2 +21,2 @@
-@@ -629,4 +629,9 @@ static void dpdk_init(void)
- 	}
+@@ -528,4 +528,9 @@ static void dpdk_init(void)
+ 		eal_argv[i] = strdup(args[i]);


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

* patch 'app/pdump: verify strdup return' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (16 preceding siblings ...)
  2024-03-05 15:33 ` patch 'app/dumpcap: verify strdup return' " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'app/crypto-perf: " Kevin Traynor
                   ` (51 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 268ceff07fbed1e963a16bc99fa3fb717e929801 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 101ac7db9a..71fd83dada 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -172,4 +172,7 @@ parse_device_id(const char *key __rte_unused, const char *value,
 
 	pt->device_id = strdup(value);
+	if (pt->device_id == NULL)
+		return -1;
+
 	pt->dump_by_type = DEVICE_ID;
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.166635207 +0000
+++ 0019-app-pdump-verify-strdup-return.patch	2024-03-05 14:08:54.628520707 +0000
@@ -1 +1 @@
-From 32e1cb918d4bbe94c5da8d0888ce29fac1f4dbb4 Mon Sep 17 00:00:00 2001
+From 268ceff07fbed1e963a16bc99fa3fb717e929801 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 101ac7db9a..71fd83dada 100644


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

* patch 'app/crypto-perf: verify strdup return' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (17 preceding siblings ...)
  2024-03-05 15:33 ` patch 'app/pdump: " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'test: " Kevin Traynor
                   ` (50 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 868c62ad591652fc8623ed4c5f04c02a0c711e58 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 1d91bea0c9..c29a1c31e1 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -502,4 +502,8 @@ parse_test_file(struct cperf_options *opts,
 {
 	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;
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.187363364 +0000
+++ 0020-app-crypto-perf-verify-strdup-return.patch	2024-03-05 14:08:54.628520707 +0000
@@ -1 +1 @@
-From bf4728da1842bd264b2038e9f67e519ae9a0b4e3 Mon Sep 17 00:00:00 2001
+From 868c62ad591652fc8623ed4c5f04c02a0c711e58 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 1d91bea0c9..c29a1c31e1 100644
@@ -20 +21 @@
-@@ -517,4 +517,8 @@ parse_test_file(struct cperf_options *opts,
+@@ -502,4 +502,8 @@ parse_test_file(struct cperf_options *opts,


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

* patch 'test: verify strdup return' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (18 preceding siblings ...)
  2024-03-05 15:33 ` patch 'app/crypto-perf: " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'examples/qos_sched: fix memory leak in args parsing' " Kevin Traynor
                   ` (49 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Huisong Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From f30f9a3c5e8b07630ca28b9355cfba56ca9f53ed 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 5b10cf64df..622cb0b218 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -58,6 +58,9 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
 	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.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.207991337 +0000
+++ 0021-test-verify-strdup-return.patch	2024-03-05 14:08:54.629520709 +0000
@@ -1 +1 @@
-From 68edcacf428994d3088afb6f5278958cc76665da Mon Sep 17 00:00:00 2001
+From f30f9a3c5e8b07630ca28b9355cfba56ca9f53ed 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 5b10cf64df..622cb0b218 100644
@@ -21 +22 @@
-@@ -60,6 +60,9 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
+@@ -58,6 +58,9 @@ process_dup(const char *const argv[], int numargs, const char *env_value)


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

* patch 'examples/qos_sched: fix memory leak in args parsing' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (19 preceding siblings ...)
  2024-03-05 15:33 ` patch 'test: " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'common/mlx5: fix calloc parameters' " Kevin Traynor
                   ` (48 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From f6975c91bc2922390c2aaf62263f910918b189e7 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 ff51d0215a..7c92f14a02 100644
--- a/examples/qos_sched/args.c
+++ b/examples/qos_sched/args.c
@@ -143,6 +143,8 @@ 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++)
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.228732399 +0000
+++ 0022-examples-qos_sched-fix-memory-leak-in-args-parsing.patch	2024-03-05 14:08:54.629520709 +0000
@@ -1 +1 @@
-From db8aee153e43375538667c6f861e981a47574476 Mon Sep 17 00:00:00 2001
+From f6975c91bc2922390c2aaf62263f910918b189e7 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 ff51d0215a..7c92f14a02 100644
@@ -20 +21 @@
-@@ -104,6 +104,8 @@ app_parse_opt_vals(const char *conf_str, char separator, uint32_t n_vals, uint32
+@@ -143,6 +143,8 @@ app_parse_opt_vals(const char *conf_str, char separator, uint32_t n_vals, uint32


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

* patch 'common/mlx5: fix calloc parameters' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (20 preceding siblings ...)
  2024-03-05 15:33 ` patch 'examples/qos_sched: fix memory leak in args parsing' " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'net/bnx2x: " Kevin Traynor
                   ` (47 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Morten Brørup, Dariusz Sosnowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From bb4eb1f8fc7cdd9207b7f7509c3a869277cc14a2 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 7f56e1f973..73a8e3adae 100644
--- a/drivers/common/mlx5/mlx5_common_mr.c
+++ b/drivers/common/mlx5/mlx5_common_mr.c
@@ -1383,5 +1383,5 @@ 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;
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.249012058 +0000
+++ 0023-common-mlx5-fix-calloc-parameters.patch	2024-03-05 14:08:54.631520715 +0000
@@ -1 +1 @@
-From f805f70bc5511cd98a34fa2f8f7bd7a3e4cd8aa3 Mon Sep 17 00:00:00 2001
+From bb4eb1f8fc7cdd9207b7f7509c3a869277cc14a2 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 7f56e1f973..73a8e3adae 100644
@@ -38 +39 @@
-@@ -1382,5 +1382,5 @@ mlx5_mempool_get_chunks(struct rte_mempool *mp, struct mlx5_range **out,
+@@ -1383,5 +1383,5 @@ mlx5_mempool_get_chunks(struct rte_mempool *mp, struct mlx5_range **out,


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

* patch 'net/bnx2x: fix calloc parameters' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (21 preceding siblings ...)
  2024-03-05 15:33 ` patch 'common/mlx5: fix calloc parameters' " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'net/nfp: " Kevin Traynor
                   ` (46 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 59160624f8f007a1c301493257a61bfc7177d1a1 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
@@ -2390,5 +2390,5 @@ 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.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.270505601 +0000
+++ 0024-net-bnx2x-fix-calloc-parameters.patch	2024-03-05 14:08:54.639520736 +0000
@@ -1 +1 @@
-From ff0d80191617d3b4435e0f473b129cdc539c23f5 Mon Sep 17 00:00:00 2001
+From 59160624f8f007a1c301493257a61bfc7177d1a1 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] 71+ messages in thread

* patch 'net/nfp: fix calloc parameters' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (22 preceding siblings ...)
  2024-03-05 15:33 ` patch 'net/bnx2x: " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:33 ` patch 'build: fix linker warnings about undefined symbols' " Kevin Traynor
                   ` (45 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Chaoyong He, Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 8fd1646a47739c84d4c029fea79cb5048eabd270 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
@@ -152,5 +152,5 @@ nfp_cpp_mutex_alloc(struct nfp_cpp *cpp, int target,
 		return NFP_ERRPTR(EEXIST);
 
-	mutex = calloc(sizeof(*mutex), 1);
+	mutex = calloc(1, sizeof(*mutex));
 	if (!mutex)
 		return NFP_ERRPTR(ENOMEM);
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.298043154 +0000
+++ 0025-net-nfp-fix-calloc-parameters.patch	2024-03-05 14:08:54.639520736 +0000
@@ -1 +1 @@
-From 0352f47a3bf923574afe17e822af58bedc7ead49 Mon Sep 17 00:00:00 2001
+From 8fd1646a47739c84d4c029fea79cb5048eabd270 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,2 +39,2 @@
-@@ -169,5 +169,5 @@ nfp_cpp_mutex_alloc(struct nfp_cpp *cpp,
- 		return NULL;
+@@ -152,5 +152,5 @@ nfp_cpp_mutex_alloc(struct nfp_cpp *cpp, int target,
+ 		return NFP_ERRPTR(EEXIST);
@@ -43,2 +44,2 @@
- 	if (mutex == NULL)
- 		return NULL;
+ 	if (!mutex)
+ 		return NFP_ERRPTR(ENOMEM);


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

* patch 'build: fix linker warnings about undefined symbols' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (23 preceding siblings ...)
  2024-03-05 15:33 ` patch 'net/nfp: " Kevin Traynor
@ 2024-03-05 15:33 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'vhost: fix virtqueue access check in vhost-user setup' " Kevin Traynor
                   ` (44 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:33 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From d27dfc1a757f032cc07eea5c6cc76d8e98765b88 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 a79a3ed39c..63a4eb9f7e 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -145,4 +145,7 @@ 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
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.318343313 +0000
+++ 0026-build-fix-linker-warnings-about-undefined-symbols.patch	2024-03-05 14:08:54.640520739 +0000
@@ -1 +1 @@
-From 51c9428dca9fad10bd60ca668ffdf78e4a801e2f Mon Sep 17 00:00:00 2001
+From d27dfc1a757f032cc07eea5c6cc76d8e98765b88 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 a79a3ed39c..63a4eb9f7e 100644
@@ -34 +34 @@
-@@ -189,4 +189,7 @@ dpdk_conf.set('RTE_ARCH_32', cc.sizeof('void *') == 4)
+@@ -145,4 +145,7 @@ dpdk_conf.set('RTE_ARCH_32', cc.sizeof('void *') == 4)


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

* patch 'vhost: fix virtqueue access check in vhost-user setup' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (24 preceding siblings ...)
  2024-03-05 15:33 ` patch 'build: fix linker warnings about undefined symbols' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/virtio: remove duplicate queue xstats' " Kevin Traynor
                   ` (43 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: David Marchand; +Cc: Eelco Chaudron, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 7293e69ddf77c3ed83f1e14ab3a96f13d2ff144b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 5 Dec 2023 10:45:33 +0100
Subject: [PATCH] vhost: fix virtqueue access check in vhost-user setup

[ upstream commit b3e42d92362bcc75df21c5b86ba7c0685b40a3bf ]

Calling vring_invalidate must be done with a (write) lock taken on the
virtqueue.

Fixes: 72d002b3ebda ("vhost: fix vring address handling during live migration")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/vhost_user.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index bf489cb13b..af0062dd1f 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -2190,5 +2190,7 @@ vhost_user_get_vring_base(struct virtio_net **pdev,
 	vhost_user_iotlb_flush_all(vq);
 
+	rte_spinlock_lock(&vq->access_lock);
 	vring_invalidate(dev, vq);
+	rte_spinlock_unlock(&vq->access_lock);
 
 	return RTE_VHOST_MSG_RESULT_REPLY;
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.338989180 +0000
+++ 0027-vhost-fix-virtqueue-access-check-in-vhost-user-setup.patch	2024-03-05 14:08:54.642520744 +0000
@@ -1 +1 @@
-From b3e42d92362bcc75df21c5b86ba7c0685b40a3bf Mon Sep 17 00:00:00 2001
+From 7293e69ddf77c3ed83f1e14ab3a96f13d2ff144b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3e42d92362bcc75df21c5b86ba7c0685b40a3bf ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index bac10e6182..931dc690ad 100644
+index bf489cb13b..af0062dd1f 100644
@@ -23,2 +24,2 @@
-@@ -2199,5 +2199,7 @@ vhost_user_get_vring_base(struct virtio_net **pdev,
- 	vhost_user_iotlb_flush_all(dev);
+@@ -2190,5 +2190,7 @@ vhost_user_get_vring_base(struct virtio_net **pdev,
+ 	vhost_user_iotlb_flush_all(vq);
@@ -26 +27 @@
-+	rte_rwlock_write_lock(&vq->access_lock);
++	rte_spinlock_lock(&vq->access_lock);
@@ -28 +29 @@
-+	rte_rwlock_write_unlock(&vq->access_lock);
++	rte_spinlock_unlock(&vq->access_lock);


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

* patch 'net/virtio: remove duplicate queue xstats' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (25 preceding siblings ...)
  2024-03-05 15:34 ` patch 'vhost: fix virtqueue access check in vhost-user setup' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'vhost: fix deadlock during vDPA SW live migration' " Kevin Traynor
                   ` (42 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Edwin Brossette; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 519dd4c280d390bf7a634115d77547e648097e88 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 bcad27817e..c6155e9ae5 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2240,6 +2240,4 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 		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) ||
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.361097782 +0000
+++ 0028-net-virtio-remove-duplicate-queue-xstats.patch	2024-03-05 14:08:54.644520749 +0000
@@ -1 +1 @@
-From 4b0a1fdb745c39003d70c75696d6730eba5636a5 Mon Sep 17 00:00:00 2001
+From 519dd4c280d390bf7a634115d77547e648097e88 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 bcad27817e..c6155e9ae5 100644
@@ -32 +33 @@
-@@ -1794,6 +1794,4 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
+@@ -2240,6 +2240,4 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)


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

* patch 'vhost: fix deadlock during vDPA SW live migration' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (26 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/virtio: remove duplicate queue xstats' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'vhost: fix memory leak in Virtio Tx split path' " Kevin Traynor
                   ` (41 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Hao Chen; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 15afe0935f9e0e6e216bfee114c0e17855899bea 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 09ad5d866e..bd00c9d2c2 100644
--- a/lib/vhost/vdpa.c
+++ b/lib/vhost/vdpa.c
@@ -20,4 +20,5 @@
 #include "vdpa_driver.h"
 #include "vhost.h"
+#include "iotlb.h"
 
 /** Double linked list of vDPA devices. */
@@ -177,15 +178,19 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
 				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;
@@ -204,7 +209,10 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
 				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.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.383056216 +0000
+++ 0029-vhost-fix-deadlock-during-vDPA-SW-live-migration.patch	2024-03-05 14:08:54.644520749 +0000
@@ -1 +1 @@
-From 19639c3b693bcfdc941c56d9d5bd60f65a8eeecb Mon Sep 17 00:00:00 2001
+From 15afe0935f9e0e6e216bfee114c0e17855899bea 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 09ad5d866e..bd00c9d2c2 100644
@@ -48,7 +49 @@
-@@ -148,5 +149,4 @@ 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);
-@@ -194,15 +194,19 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
+@@ -177,15 +178,19 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
@@ -74 +69 @@
-@@ -221,7 +225,10 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
+@@ -204,7 +209,10 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)


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

* patch 'vhost: fix memory leak in Virtio Tx split path' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (27 preceding siblings ...)
  2024-03-05 15:34 ` patch 'vhost: fix deadlock during vDPA SW live migration' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'cryptodev: remove unused extern variable' " Kevin Traynor
                   ` (40 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From b3ec4db23d97a9b4be49777fc70ea95619051a4a 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 | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index b211799687..fa0779d03d 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -2518,5 +2518,4 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 	uint16_t i;
 	uint16_t free_entries;
-	uint16_t dropped = 0;
 	static bool allocerr_warned;
 
@@ -2558,9 +2557,6 @@ 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;
@@ -2579,6 +2575,4 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 				allocerr_warned = true;
 			}
-			dropped += 1;
-			i++;
 			break;
 		}
@@ -2593,24 +2587,19 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 				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;
 }
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.403464317 +0000
+++ 0030-vhost-fix-memory-leak-in-Virtio-Tx-split-path.patch	2024-03-05 14:08:54.646520755 +0000
@@ -1 +1 @@
-From 7746fba831509fdb4c528266d0b38a89566e01e5 Mon Sep 17 00:00:00 2001
+From b3ec4db23d97a9b4be49777fc70ea95619051a4a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7746fba831509fdb4c528266d0b38a89566e01e5 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -20,2 +21,2 @@
- lib/vhost/virtio_net.c | 24 ++++++------------------
- 1 file changed, 6 insertions(+), 18 deletions(-)
+ lib/vhost/virtio_net.c | 23 ++++++-----------------
+ 1 file changed, 6 insertions(+), 17 deletions(-)
@@ -24 +25 @@
-index c738b7edc9..9951842b9f 100644
+index b211799687..fa0779d03d 100644
@@ -27 +28 @@
-@@ -3105,5 +3105,4 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -2518,5 +2518,4 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -29 +30 @@
- 	uint16_t avail_entries;
+ 	uint16_t free_entries;
@@ -33 +34 @@
-@@ -3144,9 +3143,6 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -2558,9 +2557,6 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -44 +45 @@
-@@ -3165,6 +3161,4 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -2579,6 +2575,4 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -51 +52 @@
-@@ -3177,25 +3171,19 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -2593,24 +2587,19 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -58 +58,0 @@
--


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

* patch 'cryptodev: remove unused extern variable' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (28 preceding siblings ...)
  2024-03-05 15:34 ` patch 'vhost: fix memory leak in Virtio Tx split path' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'common/cnxk: fix memory leak in CPT init' " Kevin Traynor
                   ` (39 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 7683a750962c93f7a0405dea7cebb1d70b1faa23 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 99fd4c3569..f40f8dd418 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -28,6 +28,4 @@ extern "C" {
 #include "rte_cryptodev_trace_fp.h"
 
-extern const char **rte_cyptodev_names;
-
 /* Logging Macros */
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.425516162 +0000
+++ 0031-cryptodev-remove-unused-extern-variable.patch	2024-03-05 14:08:54.648520760 +0000
@@ -1 +1 @@
-From b6f30094e511c22f038907a507d16f7cc022c682 Mon Sep 17 00:00:00 2001
+From 7683a750962c93f7a0405dea7cebb1d70b1faa23 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 99fd4c3569..f40f8dd418 100644
@@ -21 +22 @@
-@@ -27,6 +27,4 @@ extern "C" {
+@@ -28,6 +28,4 @@ extern "C" {
@@ -26,2 +27,2 @@
- /**
-  * @internal Logtype used for cryptodev related messages.
+ /* Logging Macros */
+ 


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

* patch 'common/cnxk: fix memory leak in CPT init' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (29 preceding siblings ...)
  2024-03-05 15:34 ` patch 'cryptodev: remove unused extern variable' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'app/crypto-perf: fix next segment mbuf' " Kevin Traynor
                   ` (38 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From aed510b37cc20eab04a7dcaa9083962295bb407f 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 6179df2f1f..17b5d1e383 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -642,5 +642,5 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
 	if (rc) {
 		plt_err("Failed to init roc device");
-		goto fail;
+		return rc;
 	}
 
@@ -674,4 +674,5 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
 
 fail:
+	dev_fini(dev, pci_dev);
 	return rc;
 }
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.446994811 +0000
+++ 0032-common-cnxk-fix-memory-leak-in-CPT-init.patch	2024-03-05 14:08:54.648520760 +0000
@@ -1 +1 @@
-From ffe0b570cfd04a35b3a2f8f753efbbbe0225c38c Mon Sep 17 00:00:00 2001
+From aed510b37cc20eab04a7dcaa9083962295bb407f 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 6179df2f1f..17b5d1e383 100644
@@ -21 +22 @@
-@@ -757,5 +757,5 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
+@@ -642,5 +642,5 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
@@ -28 +29 @@
-@@ -789,4 +789,5 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)
+@@ -674,4 +674,5 @@ roc_cpt_dev_init(struct roc_cpt *roc_cpt)


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

* patch 'app/crypto-perf: fix next segment mbuf' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (30 preceding siblings ...)
  2024-03-05 15:34 ` patch 'common/cnxk: fix memory leak in CPT init' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'app/crypto-perf: fix data comparison' " Kevin Traynor
                   ` (37 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Anoob Joseph, Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From fa23c86e3404748fd06624fa4336a8733eed56dd 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 5a65e11ba7..228798dca8 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -51,5 +51,4 @@ 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;
@@ -72,13 +71,13 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
 		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;
 }
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.467765342 +0000
+++ 0033-app-crypto-perf-fix-next-segment-mbuf.patch	2024-03-05 14:08:54.649520762 +0000
@@ -1 +1 @@
-From 06a109ca5dc551631d9251e81966a4bc52f98c5a Mon Sep 17 00:00:00 2001
+From fa23c86e3404748fd06624fa4336a8733eed56dd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 06a109ca5dc551631d9251e81966a4bc52f98c5a ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 932aab16df..b3bf9f67e8 100644
+index 5a65e11ba7..228798dca8 100644
@@ -27 +28 @@
-@@ -50,5 +50,4 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
+@@ -51,5 +51,4 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
@@ -33 +34 @@
-@@ -71,13 +70,13 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
+@@ -72,13 +71,13 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,


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

* patch 'app/crypto-perf: fix data comparison' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (31 preceding siblings ...)
  2024-03-05 15:34 ` patch 'app/crypto-perf: fix next segment mbuf' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'app/crypto-perf: fix encrypt operation verification' " Kevin Traynor
                   ` (36 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Anoob Joseph, Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 4fe2036cef8a481892791e7c06f85172285841ad 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 496eb0de00..372d1560e3 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -176,9 +176,9 @@ 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);
@@ -187,5 +187,5 @@ cperf_verify_op(struct rte_crypto_op *op,
 	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.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.488292722 +0000
+++ 0034-app-crypto-perf-fix-data-comparison.patch	2024-03-05 14:08:54.649520762 +0000
@@ -1 +1 @@
-From ddec2a39bae12da2817392239ddce19f3953fd53 Mon Sep 17 00:00:00 2001
+From 4fe2036cef8a481892791e7c06f85172285841ad 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 496eb0de00..372d1560e3 100644
@@ -29 +30 @@
-@@ -187,9 +187,9 @@ cperf_verify_op(struct rte_crypto_op *op,
+@@ -176,9 +176,9 @@ cperf_verify_op(struct rte_crypto_op *op,
@@ -41 +42 @@
-@@ -198,5 +198,5 @@ cperf_verify_op(struct rte_crypto_op *op,
+@@ -187,5 +187,5 @@ cperf_verify_op(struct rte_crypto_op *op,


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

* patch 'app/crypto-perf: fix encrypt operation verification' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (32 preceding siblings ...)
  2024-03-05 15:34 ` patch 'app/crypto-perf: fix data comparison' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'event/cnxk: fix dequeue timeout configuration' " Kevin Traynor
                   ` (35 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 33266c133110744050d629007949033f977c7235 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 372d1560e3..5574429196 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -101,6 +101,8 @@ cperf_verify_op(struct rte_crypto_op *op,
 	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;
 
@@ -140,32 +142,33 @@ 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:
@@ -174,6 +177,6 @@ cperf_verify_op(struct rte_crypto_op *op,
 	}
 
-	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,
@@ -185,10 +188,6 @@ cperf_verify_op(struct rte_crypto_op *op,
 	}
 
-	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:
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.509548391 +0000
+++ 0035-app-crypto-perf-fix-encrypt-operation-verification.patch	2024-03-05 14:08:54.650520765 +0000
@@ -1 +1 @@
-From 7d55ca15124c47561120d23d5023843ad99c1a81 Mon Sep 17 00:00:00 2001
+From 33266c133110744050d629007949033f977c7235 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 372d1560e3..5574429196 100644
@@ -25 +26 @@
-@@ -112,6 +112,8 @@ cperf_verify_op(struct rte_crypto_op *op,
+@@ -101,6 +101,8 @@ cperf_verify_op(struct rte_crypto_op *op,
@@ -36 +37 @@
-@@ -151,32 +153,33 @@ cperf_verify_op(struct rte_crypto_op *op,
+@@ -140,32 +142,33 @@ cperf_verify_op(struct rte_crypto_op *op,
@@ -88 +89 @@
-@@ -185,6 +188,6 @@ cperf_verify_op(struct rte_crypto_op *op,
+@@ -174,6 +177,6 @@ cperf_verify_op(struct rte_crypto_op *op,
@@ -97 +98 @@
-@@ -196,10 +199,6 @@ cperf_verify_op(struct rte_crypto_op *op,
+@@ -185,10 +188,6 @@ cperf_verify_op(struct rte_crypto_op *op,


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

* patch 'event/cnxk: fix dequeue timeout configuration' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (33 preceding siblings ...)
  2024-03-05 15:34 ` patch 'app/crypto-perf: fix encrypt operation verification' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'test/event: skip test if no driver is present' " Kevin Traynor
                   ` (34 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From d84482b4ce1de2429f7e17e8c3b06d39c344cf98 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 | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 19164f7b86..2d422aea07 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -244,14 +244,15 @@ 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;
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.529764883 +0000
+++ 0036-event-cnxk-fix-dequeue-timeout-configuration.patch	2024-03-05 14:08:54.650520765 +0000
@@ -1 +1 @@
-From efcf81e1a89fa7b20aae17accfcb4a8e7ddc3d02 Mon Sep 17 00:00:00 2001
+From d84482b4ce1de2429f7e17e8c3b06d39c344cf98 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit efcf81e1a89fa7b20aae17accfcb4a8e7ddc3d02 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -14,2 +15,2 @@
- drivers/event/cnxk/cnxk_eventdev.c | 13 +++++++------
- 1 file changed, 7 insertions(+), 6 deletions(-)
+ drivers/event/cnxk/cnxk_eventdev.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
@@ -18 +19 @@
-index 1ec281e735..20f7f0d6df 100644
+index 19164f7b86..2d422aea07 100644
@@ -21 +22 @@
-@@ -163,14 +163,15 @@ cnxk_sso_dev_validate(const struct rte_eventdev *event_dev, uint32_t deq_depth,
+@@ -244,14 +244,15 @@ cnxk_sso_dev_validate(const struct rte_eventdev *event_dev)
@@ -42,7 +42,0 @@
-@@ -667,5 +668,5 @@ 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;


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

* patch 'test/event: skip test if no driver is present' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (34 preceding siblings ...)
  2024-03-05 15:34 ` patch 'event/cnxk: fix dequeue timeout configuration' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'doc: fix commands in eventdev test tool guide' " Kevin Traynor
                   ` (33 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 15d001811d3d1bbc22ab973c593c9593a78493a5 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 843d9766b0..c4cbd84f27 100644
--- a/app/test/test_eventdev.c
+++ b/app/test/test_eventdev.c
@@ -23,7 +23,13 @@ testsuite_setup(void)
 	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.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.550224815 +0000
+++ 0037-test-event-skip-test-if-no-driver-is-present.patch	2024-03-05 14:08:54.651520768 +0000
@@ -1 +1 @@
-From f1caf6ff072ad932d93f3d5587c504d5f90d5d70 Mon Sep 17 00:00:00 2001
+From 15d001811d3d1bbc22ab973c593c9593a78493a5 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 843d9766b0..c4cbd84f27 100644
@@ -21 +22 @@
-@@ -34,7 +34,13 @@ testsuite_setup(void)
+@@ -23,7 +23,13 @@ testsuite_setup(void)


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

* patch 'doc: fix commands in eventdev test tool guide' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (35 preceding siblings ...)
  2024-03-05 15:34 ` patch 'test/event: skip test if no driver is present' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'ethdev: fix NVGRE encap flow action description' " Kevin Traynor
                   ` (32 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From b1d48396f283b0970b20359bdae448f81c46e674 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 48efb9ea6e..4f934f67e4 100644
--- a/doc/guides/tools/testeventdev.rst
+++ b/doc/guides/tools/testeventdev.rst
@@ -271,5 +271,5 @@ 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
 
@@ -334,5 +334,5 @@ 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
 
@@ -436,5 +436,5 @@ 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
 
@@ -443,5 +443,5 @@ 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
@@ -451,5 +451,5 @@ 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
 
@@ -458,6 +458,6 @@ 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
 
@@ -544,5 +544,5 @@ 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
 
@@ -551,6 +551,6 @@ 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
 
@@ -772,5 +772,5 @@ 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
 
@@ -779,5 +779,5 @@ 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.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.571406052 +0000
+++ 0038-doc-fix-commands-in-eventdev-test-tool-guide.patch	2024-03-05 14:08:54.652520770 +0000
@@ -1 +1 @@
-From b3342d76189e46f4b97d09245617a1188145d384 Mon Sep 17 00:00:00 2001
+From b1d48396f283b0970b20359bdae448f81c46e674 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 48efb9ea6e..4f934f67e4 100644
@@ -28 +29 @@
-@@ -309,5 +309,5 @@ Example command to run order queue test:
+@@ -271,5 +271,5 @@ Example command to run order queue test:
@@ -35 +36 @@
-@@ -372,5 +372,5 @@ Example command to run order ``all types queue`` test:
+@@ -334,5 +334,5 @@ Example command to run order ``all types queue`` test:
@@ -42 +43 @@
-@@ -476,5 +476,5 @@ Example command to run perf queue test:
+@@ -436,5 +436,5 @@ Example command to run perf queue test:
@@ -49 +50 @@
-@@ -483,5 +483,5 @@ Example command to run perf queue test with producer enqueuing a burst of events
+@@ -443,5 +443,5 @@ Example command to run perf queue test with producer enqueuing a burst of events
@@ -56 +57 @@
-@@ -491,5 +491,5 @@ Example command to run perf queue test with ethernet ports:
+@@ -451,5 +451,5 @@ Example command to run perf queue test with ethernet ports:
@@ -63 +64 @@
-@@ -498,6 +498,6 @@ Example command to run perf queue test with event timer adapter:
+@@ -458,6 +458,6 @@ Example command to run perf queue test with event timer adapter:
@@ -72 +73 @@
-@@ -586,5 +586,5 @@ Example command to run perf ``all types queue`` test:
+@@ -544,5 +544,5 @@ Example command to run perf ``all types queue`` test:
@@ -79 +80 @@
-@@ -593,6 +593,6 @@ Example command to run perf ``all types queue`` test with event timer adapter:
+@@ -551,6 +551,6 @@ Example command to run perf ``all types queue`` test with event timer adapter:
@@ -88 +89 @@
-@@ -818,5 +818,5 @@ Example command to run pipeline atq test:
+@@ -772,5 +772,5 @@ Example command to run pipeline atq test:
@@ -95 +96 @@
-@@ -825,5 +825,5 @@ Example command to run pipeline atq test with vector events:
+@@ -779,5 +779,5 @@ Example command to run pipeline atq test with vector events:


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

* patch 'ethdev: fix NVGRE encap flow action description' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (36 preceding siblings ...)
  2024-03-05 15:34 ` patch 'doc: fix commands in eventdev test tool guide' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/af_xdp: fix memzone leak on config failure' " Kevin Traynor
                   ` (31 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 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 21.11.7

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

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

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

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

Thanks.

Kevin

---
From b886b2c079cca8a1a675d7c7a11ec3c7bf1d83fe 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 3a6b6db725..2df4418aa9 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -218,5 +218,5 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
 	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)),
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index 1031fb246b..5af9bdd88c 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -3280,5 +3280,5 @@ 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).
 	 */
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.592170386 +0000
+++ 0039-ethdev-fix-NVGRE-encap-flow-action-description.patch	2024-03-05 14:08:54.656520781 +0000
@@ -1 +1 @@
-From f59d78b5803be7b0c0831309c703273bd2c92a50 Mon Sep 17 00:00:00 2001
+From b886b2c079cca8a1a675d7c7a11ec3c7bf1d83fe 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 3a6b6db725..2df4418aa9 100644
@@ -26 +27 @@
-@@ -220,5 +220,5 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
+@@ -218,5 +218,5 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
@@ -34 +35 @@
-index 78b6bbb159..440396be78 100644
+index 1031fb246b..5af9bdd88c 100644
@@ -37 +38 @@
-@@ -3469,5 +3469,5 @@ struct rte_flow_action_vxlan_encap {
+@@ -3280,5 +3280,5 @@ struct rte_flow_action_vxlan_encap {


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

* patch 'net/af_xdp: fix memzone leak on config failure' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (37 preceding siblings ...)
  2024-03-05 15:34 ` patch 'ethdev: fix NVGRE encap flow action description' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/hns3: refactor VF mailbox message struct' " Kevin Traynor
                   ` (30 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ciara Loftus, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 13696b1aa8c91c1b1659c6a7a60bc1ac59794950 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 6bc7178fc5..dde4024267 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -1180,4 +1180,5 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
 		goto err;
 	}
+	umem->mz = mz;
 
 	ret = xsk_umem__create(&umem->umem, mz->addr,
@@ -1190,5 +1191,4 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
 		goto err;
 	}
-	umem->mz = mz;
 
 #endif
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.616074085 +0000
+++ 0040-net-af_xdp-fix-memzone-leak-on-config-failure.patch	2024-03-05 14:08:54.657520784 +0000
@@ -1 +1 @@
-From 960775fc5b7d43cfbf9fa31e4c0b36c4da79615a Mon Sep 17 00:00:00 2001
+From 13696b1aa8c91c1b1659c6a7a60bc1ac59794950 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 6bc7178fc5..dde4024267 100644
@@ -25 +26 @@
-@@ -1235,4 +1235,5 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
+@@ -1180,4 +1180,5 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
@@ -31 +32 @@
-@@ -1245,5 +1246,4 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
+@@ -1190,5 +1191,4 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
@@ -36 +37 @@
- 	return umem;
+ #endif


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

* patch 'net/hns3: refactor VF mailbox message struct' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (38 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/af_xdp: fix memzone leak on config failure' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/hns3: refactor PF " Kevin Traynor
                   ` (29 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 8b31b471949f8919493fb991270832a30fe330f0 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 0d1d271f37..639a00615e 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -335,9 +335,10 @@ hns3vf_set_promisc_mode(struct hns3_hw *hw, bool en_bc_pmc,
 	 */
 	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);
@@ -428,28 +429,26 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
 			     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;
@@ -1081,17 +1080,14 @@ 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);
 }
 
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
@@ -12,6 +12,4 @@
 #include "hns3_rxtx.h"
 
-#define HNS3_CMD_CODE_OFFSET		2
-
 static const struct errno_respcode_map err_code_map[] = {
 	{0, 0},
@@ -128,5 +126,4 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
 	struct hns3_cmd_desc desc;
 	bool is_ring_vector_msg;
-	int offset;
 	int ret;
 
@@ -134,21 +131,23 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
 
 	/* 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);
 	}
 
@@ -297,9 +296,6 @@ 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 1d9a788df5..172b044575 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -86,5 +86,4 @@ enum hns3_mbx_link_fail_subcode {
 };
 
-#define HNS3_MBX_MAX_MSG_SIZE	16
 #define HNS3_MBX_MAX_RESP_DATA_SIZE	8
 #define HNS3_MBX_DEF_TIME_LIMIT_MS	500
@@ -104,4 +103,44 @@ struct hns3_mbx_resp_status {
 };
 
+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;
@@ -119,5 +158,5 @@ struct hns3_mbx_vf_to_pf_cmd {
 	uint8_t rsv2;
 	uint16_t match_id;
-	uint8_t msg[HNS3_MBX_MAX_MSG_SIZE];
+	struct hns3_vf_to_pf_msg msg;
 };
 
@@ -131,17 +170,4 @@ struct hns3_mbx_pf_to_vf_cmd {
 };
 
-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;
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.638027428 +0000
+++ 0041-net-hns3-refactor-VF-mailbox-message-struct.patch	2024-03-05 14:08:54.660520792 +0000
@@ -1 +1 @@
-From 692b35be121b724119da001d7ec4c0fabd51177b Mon Sep 17 00:00:00 2001
+From 8b31b471949f8919493fb991270832a30fe330f0 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 0d1d271f37..639a00615e 100644
@@ -34 +35 @@
-@@ -255,9 +255,10 @@ hns3vf_set_promisc_mode(struct hns3_hw *hw, bool en_bc_pmc,
+@@ -335,9 +335,10 @@ hns3vf_set_promisc_mode(struct hns3_hw *hw, bool en_bc_pmc,
@@ -50 +51 @@
-@@ -348,28 +349,26 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
+@@ -428,28 +429,26 @@ hns3vf_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id,
@@ -92 +93 @@
-@@ -966,17 +965,14 @@ static int
+@@ -1081,17 +1080,14 @@ static int
@@ -176 +177 @@
-index 4a328802b9..59fb73abcc 100644
+index 1d9a788df5..172b044575 100644
@@ -179 +180 @@
-@@ -90,5 +90,4 @@ enum hns3_mbx_link_fail_subcode {
+@@ -86,5 +86,4 @@ enum hns3_mbx_link_fail_subcode {
@@ -185 +186 @@
-@@ -108,4 +107,44 @@ struct hns3_mbx_resp_status {
+@@ -104,4 +103,44 @@ struct hns3_mbx_resp_status {
@@ -230 +231 @@
-@@ -123,5 +162,5 @@ struct hns3_mbx_vf_to_pf_cmd {
+@@ -119,5 +158,5 @@ struct hns3_mbx_vf_to_pf_cmd {
@@ -237 +238 @@
-@@ -135,17 +174,4 @@ struct hns3_mbx_pf_to_vf_cmd {
+@@ -131,17 +170,4 @@ struct hns3_mbx_pf_to_vf_cmd {


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

* patch 'net/hns3: refactor PF mailbox message struct' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (39 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/hns3: refactor VF mailbox message struct' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/hns3: fix VF multiple count on one reset' " Kevin Traynor
                   ` (28 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 9b6c3117a18fad65f55a4d29648e4a05d24c1486 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
@@ -193,15 +193,15 @@ 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);
 }
@@ -212,5 +212,4 @@ hns3_handle_asserting_reset(struct hns3_hw *hw,
 {
 	enum hns3_reset_level reset_level;
-	uint16_t *msg_q = req->msg;
 
 	/*
@@ -220,5 +219,5 @@ hns3_handle_asserting_reset(struct hns3_hw *hw,
 	 * 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);
 
@@ -242,6 +241,7 @@ hns3_handle_mbx_response(struct hns3_hw *hw, struct hns3_mbx_pf_to_vf_cmd *req)
 		 */
 		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();
@@ -256,5 +256,6 @@ hns3_handle_mbx_response(struct hns3_hw *hw, struct hns3_mbx_pf_to_vf_cmd *req)
 	 * 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,
@@ -264,6 +265,6 @@ hns3_handle_mbx_response(struct hns3_hw *hw, struct hns3_mbx_pf_to_vf_cmd *req)
 	}
 
-	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();
@@ -306,6 +307,5 @@ 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;
 	/*
@@ -356,5 +356,5 @@ hns3_handle_mbx_msg_out_intr(struct hns3_hw *hw)
 		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);
@@ -429,5 +429,5 @@ 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);
@@ -485,5 +485,5 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 			 * mailbox message from PF driver.
 			 */
-			hns3_handle_promisc_info(hw, req->msg[1]);
+			hns3_handle_promisc_info(hw, req->msg.promisc_en);
 			break;
 		default:
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index 172b044575..8dee17bd03 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -115,4 +115,11 @@ struct hns3_mbx_vlan_filter {
 } __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
@@ -143,4 +150,20 @@ 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;
@@ -167,5 +190,5 @@ struct hns3_mbx_pf_to_vf_cmd {
 	uint8_t rsv1;
 	uint16_t match_id;
-	uint16_t msg[8];
+	struct hns3_pf_to_vf_msg msg;
 };
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.660970365 +0000
+++ 0042-net-hns3-refactor-PF-mailbox-message-struct.patch	2024-03-05 14:08:54.660520792 +0000
@@ -1 +1 @@
-From 4d534598d922130d12c244d3237652fbfdad0f4b Mon Sep 17 00:00:00 2001
+From 9b6c3117a18fad65f55a4d29648e4a05d24c1486 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4d534598d922130d12c244d3237652fbfdad0f4b ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -122 +123 @@
-index 59fb73abcc..09780fcebd 100644
+index 172b044575..8dee17bd03 100644
@@ -125 +126 @@
-@@ -119,4 +119,11 @@ struct hns3_mbx_vlan_filter {
+@@ -115,4 +115,11 @@ struct hns3_mbx_vlan_filter {
@@ -137 +138 @@
-@@ -147,4 +154,20 @@ struct hns3_vf_to_pf_msg {
+@@ -143,4 +150,20 @@ struct hns3_vf_to_pf_msg {
@@ -158 +159 @@
-@@ -171,5 +194,5 @@ struct hns3_mbx_pf_to_vf_cmd {
+@@ -167,5 +190,5 @@ struct hns3_mbx_pf_to_vf_cmd {


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

* patch 'net/hns3: fix VF multiple count on one reset' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (40 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/hns3: refactor PF " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/hns3: fix disable command with firmware' " Kevin Traynor
                   ` (27 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 72126b1d1cefd4bb79dc989f6186cc71aec39488 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 639a00615e..deef914649 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -643,11 +643,6 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
 		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;
@@ -664,7 +659,7 @@ 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;
 }
@@ -1821,9 +1816,23 @@ is_vf_reset_done(struct hns3_hw *hw)
 }
 
+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;
 
 	/*
@@ -1848,11 +1857,16 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
 		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.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.681563979 +0000
+++ 0043-net-hns3-fix-VF-multiple-count-on-one-reset.patch	2024-03-05 14:08:54.662520797 +0000
@@ -1 +1 @@
-From 072a07a9dcbd604b1983bf2cb266d3dd4dc89824 Mon Sep 17 00:00:00 2001
+From 72126b1d1cefd4bb79dc989f6186cc71aec39488 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 639a00615e..deef914649 100644
@@ -31 +32 @@
-@@ -570,11 +570,6 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
+@@ -643,11 +643,6 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
@@ -45 +46 @@
-@@ -591,7 +586,7 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
+@@ -664,7 +659,7 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
@@ -55 +56 @@
-@@ -1732,9 +1727,23 @@ is_vf_reset_done(struct hns3_hw *hw)
+@@ -1821,9 +1816,23 @@ is_vf_reset_done(struct hns3_hw *hw)
@@ -80 +81 @@
-@@ -1759,11 +1768,16 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
+@@ -1848,11 +1857,16 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)


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

* patch 'net/hns3: fix disable command with firmware' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (41 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/hns3: fix VF multiple count on one reset' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/hns3: fix reset level comparison' " Kevin Traynor
                   ` (26 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From a327482169f382747f71150316c5969e6937abb9 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 a805046d19..619346b5ac 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5605,11 +5605,8 @@ 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)
@@ -5617,4 +5614,5 @@ hns3_detect_reset_event(struct hns3_hw *hw)
 
 	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.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.703198202 +0000
+++ 0044-net-hns3-fix-disable-command-with-firmware.patch	2024-03-05 14:08:54.667520810 +0000
@@ -1 +1 @@
-From 66048270a49088f79c2a020bd28ee0a93c4a73ed Mon Sep 17 00:00:00 2001
+From a327482169f382747f71150316c5969e6937abb9 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 a805046d19..619346b5ac 100644
@@ -22 +23 @@
-@@ -5553,11 +5553,8 @@ hns3_detect_reset_event(struct hns3_hw *hw)
+@@ -5605,11 +5605,8 @@ hns3_detect_reset_event(struct hns3_hw *hw)
@@ -36 +37 @@
-@@ -5565,4 +5562,5 @@ hns3_detect_reset_event(struct hns3_hw *hw)
+@@ -5617,4 +5614,5 @@ hns3_detect_reset_event(struct hns3_hw *hw)


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

* patch 'net/hns3: fix reset level comparison' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (42 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/hns3: fix disable command with firmware' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/hns3: remove QinQ insert support for VF' " Kevin Traynor
                   ` (25 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 51fd05c6ade223a85b25dd9779c9bf883ae146e9 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 619346b5ac..4f60b83b3a 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5598,10 +5598,7 @@ 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)
@@ -5610,13 +5607,4 @@ hns3_detect_reset_event(struct hns3_hw *hw)
 		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;
 }
@@ -5637,8 +5625,12 @@ hns3_is_reset_pending(struct hns3_adapter *hns)
 
 	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;
 	}
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.727067894 +0000
+++ 0045-net-hns3-fix-reset-level-comparison.patch	2024-03-05 14:08:54.671520821 +0000
@@ -1 +1 @@
-From 1ceb5ad2dfdcc3e6658119d25253bced5be3cc32 Mon Sep 17 00:00:00 2001
+From 51fd05c6ade223a85b25dd9779c9bf883ae146e9 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 619346b5ac..4f60b83b3a 100644
@@ -28 +29 @@
-@@ -5546,10 +5546,7 @@ static enum hns3_reset_level
+@@ -5598,10 +5598,7 @@ static enum hns3_reset_level
@@ -39 +40 @@
-@@ -5558,13 +5555,4 @@ hns3_detect_reset_event(struct hns3_hw *hw)
+@@ -5610,13 +5607,4 @@ hns3_detect_reset_event(struct hns3_hw *hw)
@@ -53 +54 @@
-@@ -5585,8 +5573,12 @@ hns3_is_reset_pending(struct hns3_adapter *hns)
+@@ -5637,8 +5625,12 @@ hns3_is_reset_pending(struct hns3_adapter *hns)


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

* patch 'net/hns3: remove QinQ insert support for VF' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (43 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/hns3: fix reset level comparison' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'doc: add --latencystats option in testpmd guide' " Kevin Traynor
                   ` (24 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Jie Hai, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From d2d6bdae86ac9b001ae269bc5c7d5583eee2de81 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 ace5be01d5..02328d18bc 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -85,5 +85,5 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 				 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;
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.750835490 +0000
+++ 0046-net-hns3-remove-QinQ-insert-support-for-VF.patch	2024-03-05 14:08:54.672520823 +0000
@@ -1 +1 @@
-From f6e79b8d3968150736499bc225762b62fbf1b768 Mon Sep 17 00:00:00 2001
+From d2d6bdae86ac9b001ae269bc5c7d5583eee2de81 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 ace5be01d5..02328d18bc 100644
@@ -35 +35 @@
-@@ -86,5 +86,5 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+@@ -85,5 +85,5 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)


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

* patch 'doc: add --latencystats option in testpmd guide' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (44 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/hns3: remove QinQ insert support for VF' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'app/testpmd: hide --bitrate-stats in help if disabled' " Kevin Traynor
                   ` (23 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From e690cae685af715b0bc881587db0892d5c5b6ce9 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 ccc1bd6ddb..720d5717f3 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -442,4 +442,8 @@ 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|all>``
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.771513502 +0000
+++ 0047-doc-add-latencystats-option-in-testpmd-guide.patch	2024-03-05 14:08:54.673520826 +0000
@@ -1 +1 @@
-From 8cd8f0a90bba2862d8044529e11276d6f6321192 Mon Sep 17 00:00:00 2001
+From e690cae685af715b0bc881587db0892d5c5b6ce9 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 ccc1bd6ddb..720d5717f3 100644
@@ -21 +22 @@
-@@ -423,4 +423,8 @@ The command line options are:
+@@ -442,4 +442,8 @@ The command line options are:
@@ -28 +29 @@
- *   ``--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>``
+ *   ``--print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|dev_probed|dev_released|flow_aged|all>``


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

* patch 'app/testpmd: hide --bitrate-stats in help if disabled' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (45 preceding siblings ...)
  2024-03-05 15:34 ` patch 'doc: add --latencystats option in testpmd guide' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/vmxnet3: fix initialization on FreeBSD' " Kevin Traynor
                   ` (22 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 2597a7df7c42e851ed9dbdc63ae01e0a5470963d 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 e3c9757f3f..79ba728f69 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -113,8 +113,4 @@ usage(char* progname)
 	       "If the drop-queue doesn't exist, the packet is dropped. "
 	       "By default drop-queue=127.\n");
-#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");
@@ -177,6 +173,12 @@ usage(char* progname)
 	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|all>: "
 	       "enable print of designated event or all of them.\n");
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.793175386 +0000
+++ 0048-app-testpmd-hide-bitrate-stats-in-help-if-disabled.patch	2024-03-05 14:08:54.674520829 +0000
@@ -1 +1 @@
-From e96491cb91fd048a79e848d713d65d45f0dde915 Mon Sep 17 00:00:00 2001
+From 2597a7df7c42e851ed9dbdc63ae01e0a5470963d 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 e3c9757f3f..79ba728f69 100644
@@ -24,4 +25,3 @@
-@@ -101,8 +101,4 @@ usage(char* progname)
- 	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
+@@ -113,8 +113,4 @@ usage(char* progname)
+ 	       "If the drop-queue doesn't exist, the packet is dropped. "
+ 	       "By default drop-queue=127.\n");
@@ -31 +31 @@
- #endif
+-#endif
@@ -33 +33,2 @@
-@@ -168,6 +164,12 @@ usage(char* progname)
+ 	printf("  --enable-scatter: enable scattered Rx.\n");
+@@ -177,6 +173,12 @@ usage(char* progname)
@@ -44 +45 @@
- 	printf("  --print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|flow_aged|err_recovering|recovery_success|recovery_failed|all>: "
+ 	printf("  --print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|flow_aged|all>: "


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

* patch 'net/vmxnet3: fix initialization on FreeBSD' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (46 preceding siblings ...)
  2024-03-05 15:34 ` patch 'app/testpmd: hide --bitrate-stats in help if disabled' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'drivers/net: fix buffer overflow for packet types list' " Kevin Traynor
                   ` (21 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Lewis Donzis, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From be2dc69e862528861874f84e21604504ddfe3011 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 fe94cbe1ff..813e42b2d5 100644
--- a/.mailmap
+++ b/.mailmap
@@ -755,4 +755,5 @@ 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>
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index a48a355d39..da9635507e 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -207,4 +207,5 @@ vmxnet3_disable_intr(struct vmxnet3_hw *hw, unsigned int intr_idx)
 }
 
+#ifndef RTE_EXEC_ENV_FREEBSD
 /*
  * Enable all intrs used by the device
@@ -228,4 +229,5 @@ vmxnet3_enable_all_intrs(struct vmxnet3_hw *hw)
 	}
 }
+#endif
 
 /*
@@ -964,4 +966,5 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
 	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,
@@ -975,4 +978,5 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
 	/* enable all intrs */
 	vmxnet3_enable_all_intrs(hw);
+#endif
 
 	vmxnet3_process_events(dev);
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.814921386 +0000
+++ 0049-net-vmxnet3-fix-initialization-on-FreeBSD.patch	2024-03-05 14:08:54.677520837 +0000
@@ -1 +1 @@
-From 40d5676ff1ea43cc2c121fd66d19a29a1c9107bb Mon Sep 17 00:00:00 2001
+From be2dc69e862528861874f84e21604504ddfe3011 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 fe94cbe1ff..813e42b2d5 100644
@@ -27 +28 @@
-@@ -787,4 +787,5 @@ Levend Sayar <levendsayar@gmail.com>
+@@ -755,4 +755,5 @@ Levend Sayar <levendsayar@gmail.com>
@@ -34 +35 @@
-index b239ea3ede..1e6febb092 100644
+index a48a355d39..da9635507e 100644
@@ -37 +38 @@
-@@ -259,4 +259,5 @@ vmxnet3_disable_all_intrs(struct vmxnet3_hw *hw)
+@@ -207,4 +207,5 @@ vmxnet3_disable_intr(struct vmxnet3_hw *hw, unsigned int intr_idx)
@@ -43 +44 @@
-@@ -282,4 +283,5 @@ vmxnet3_enable_all_intrs(struct vmxnet3_hw *hw)
+@@ -228,4 +229,5 @@ vmxnet3_enable_all_intrs(struct vmxnet3_hw *hw)
@@ -49 +50 @@
-@@ -1131,4 +1133,5 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
+@@ -964,4 +966,5 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
@@ -55 +56 @@
-@@ -1142,4 +1145,5 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
+@@ -975,4 +978,5 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)


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

* patch 'drivers/net: fix buffer overflow for packet types list' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (47 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/vmxnet3: fix initialization on FreeBSD' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'app/testpmd: fix crash in multi-process forwarding' " Kevin Traynor
                   ` (20 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Sivaramakrishnan Venkat; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 15d533ce941f245389f87d1fa3bf91c5d30264ef 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 bae6c5abf2..3bf356fa2c 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -352,5 +352,6 @@ dpaa_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_L4_TCP,
 		RTE_PTYPE_L4_UDP,
-		RTE_PTYPE_L4_SCTP
+		RTE_PTYPE_L4_SCTP,
+		RTE_PTYPE_UNKNOWN
 	};
 
diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index d79d069120..309336eec3 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -204,5 +204,6 @@ mvneta_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
 		RTE_PTYPE_L3_IPV6,
 		RTE_PTYPE_L4_TCP,
-		RTE_PTYPE_L4_UDP
+		RTE_PTYPE_L4_UDP,
+		RTE_PTYPE_UNKNOWN
 	};
 
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index a1c800aaf8..2133fb7717 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -1783,5 +1783,6 @@ mrvl_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
 		RTE_PTYPE_L2_ETHER_ARP,
 		RTE_PTYPE_L4_TCP,
-		RTE_PTYPE_L4_UDP
+		RTE_PTYPE_L4_UDP,
+		RTE_PTYPE_UNKNOWN
 	};
 
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index c5158bbf31..fe48ccea8e 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -537,5 +537,6 @@ pfe_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_L4_TCP,
 		RTE_PTYPE_L4_UDP,
-		RTE_PTYPE_L4_SCTP
+		RTE_PTYPE_L4_SCTP,
+		RTE_PTYPE_UNKNOWN
 	};
 
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 29b4860656..3a11f36e6f 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1838,4 +1838,5 @@ tap_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
 		RTE_PTYPE_L4_TCP,
 		RTE_PTYPE_L4_SCTP,
+		RTE_PTYPE_UNKNOWN
 	};
 
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index fc334cf734..a177bca3ff 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -311,4 +311,5 @@ nicvf_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_L4_UDP,
 		RTE_PTYPE_L4_FRAG,
+		RTE_PTYPE_UNKNOWN
 	};
 	static const uint32_t ptypes_tunnel[] = {
@@ -317,4 +318,5 @@ nicvf_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_TUNNEL_VXLAN,
 		RTE_PTYPE_TUNNEL_NVGRE,
+		RTE_PTYPE_UNKNOWN
 	};
 	static const uint32_t ptypes_end = RTE_PTYPE_UNKNOWN;
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.837293658 +0000
+++ 0050-drivers-net-fix-buffer-overflow-for-packet-types-lis.patch	2024-03-05 14:08:54.685520858 +0000
@@ -1 +1 @@
-From 2e3ddb568044308b40f60fdb2ddc62160b95b1b1 Mon Sep 17 00:00:00 2001
+From 15d533ce941f245389f87d1fa3bf91c5d30264ef 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 bae6c5abf2..3bf356fa2c 100644
@@ -35 +35,2 @@
-@@ -364,5 +364,6 @@ dpaa_supported_ptypes_get(struct rte_eth_dev *dev)
+@@ -352,5 +352,6 @@ dpaa_supported_ptypes_get(struct rte_eth_dev *dev)
+ 		RTE_PTYPE_L4_TCP,
@@ -37,3 +38,2 @@
- 		RTE_PTYPE_L4_SCTP,
--		RTE_PTYPE_TUNNEL_ESP
-+		RTE_PTYPE_TUNNEL_ESP,
+-		RTE_PTYPE_L4_SCTP
++		RTE_PTYPE_L4_SCTP,
@@ -44 +44 @@
-index daa69e533a..212c300c14 100644
+index d79d069120..309336eec3 100644
@@ -47 +47 @@
-@@ -199,5 +199,6 @@ mvneta_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
+@@ -204,5 +204,6 @@ mvneta_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
@@ -56 +56 @@
-index a91509d92a..82cb8d5368 100644
+index a1c800aaf8..2133fb7717 100644
@@ -59 +59 @@
-@@ -1778,5 +1778,6 @@ mrvl_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
+@@ -1783,5 +1783,6 @@ mrvl_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
@@ -67,10 +66,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
-@@ -1366,4 +1366,5 @@ nfp_net_supported_ptypes_get(struct rte_eth_dev *dev)
- 		RTE_PTYPE_INNER_L4_ICMP,
- 		RTE_PTYPE_INNER_L4_SCTP,
-+		RTE_PTYPE_UNKNOWN
- 	};
- 
@@ -78 +68 @@
-index 551f3cf193..0073dd7405 100644
+index c5158bbf31..fe48ccea8e 100644
@@ -81 +71 @@
-@@ -521,5 +521,6 @@ pfe_supported_ptypes_get(struct rte_eth_dev *dev)
+@@ -537,5 +537,6 @@ pfe_supported_ptypes_get(struct rte_eth_dev *dev)
@@ -90 +80 @@
-index b41fa971cb..3fa03cdbee 100644
+index 29b4860656..3a11f36e6f 100644
@@ -93 +83 @@
-@@ -1804,4 +1804,5 @@ tap_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
+@@ -1838,4 +1838,5 @@ tap_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
@@ -100 +90 @@
-index a504d41dfe..5a0c3dc4a6 100644
+index fc334cf734..a177bca3ff 100644
@@ -103 +93 @@
-@@ -393,4 +393,5 @@ nicvf_dev_supported_ptypes_get(struct rte_eth_dev *dev)
+@@ -311,4 +311,5 @@ nicvf_dev_supported_ptypes_get(struct rte_eth_dev *dev)
@@ -109 +99 @@
-@@ -399,4 +400,5 @@ nicvf_dev_supported_ptypes_get(struct rte_eth_dev *dev)
+@@ -317,4 +318,5 @@ nicvf_dev_supported_ptypes_get(struct rte_eth_dev *dev)


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

* patch 'app/testpmd: fix crash in multi-process forwarding' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (48 preceding siblings ...)
  2024-03-05 15:34 ` patch 'drivers/net: fix buffer overflow for packet types list' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/ionic: fix RSS query' " Kevin Traynor
                   ` (19 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Dengdui Huang; +Cc: Chengwen Feng, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 04fb58b84f1c130cf5968e713821d4181281fe08 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 fef7fa71e4..cb576732d2 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3328,5 +3328,4 @@ rss_fwd_config_setup(void)
 	streamid_t  sm_id;
 	int start;
-	int end;
 
 	nb_q = nb_rxq;
@@ -3336,5 +3335,5 @@ rss_fwd_config_setup(void)
 	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)
@@ -3358,5 +3357,4 @@ rss_fwd_config_setup(void)
 	 */
 	start = proc_id * nb_q / num_procs;
-	end = start + nb_q / num_procs;
 	rxp = 0;
 	rxq = start;
@@ -3377,6 +3375,4 @@ rss_fwd_config_setup(void)
 		rxp = 0;
 		rxq++;
-		if (rxq >= end)
-			rxq = start;
 	}
 }
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.864965010 +0000
+++ 0051-app-testpmd-fix-crash-in-multi-process-forwarding.patch	2024-03-05 14:08:54.688520866 +0000
@@ -1 +1 @@
-From b3a33138f317d1c651cd86f423cc703176eb7b07 Mon Sep 17 00:00:00 2001
+From 04fb58b84f1c130cf5968e713821d4181281fe08 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 fef7fa71e4..cb576732d2 100644
@@ -46 +47 @@
-@@ -4795,5 +4795,4 @@ rss_fwd_config_setup(void)
+@@ -3328,5 +3328,4 @@ rss_fwd_config_setup(void)
@@ -52 +53 @@
-@@ -4803,5 +4802,5 @@ rss_fwd_config_setup(void)
+@@ -3336,5 +3335,5 @@ rss_fwd_config_setup(void)
@@ -59 +60 @@
-@@ -4825,5 +4824,4 @@ rss_fwd_config_setup(void)
+@@ -3358,5 +3357,4 @@ rss_fwd_config_setup(void)
@@ -65 +66 @@
-@@ -4844,6 +4842,4 @@ rss_fwd_config_setup(void)
+@@ -3377,6 +3375,4 @@ rss_fwd_config_setup(void)


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

* patch 'net/ionic: fix RSS query' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (49 preceding siblings ...)
  2024-03-05 15:34 ` patch 'app/testpmd: fix crash in multi-process forwarding' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/ionic: fix device close' " Kevin Traynor
                   ` (18 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Akshay Dorwat; +Cc: Andrew Boyer, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From bee2ac79066df271ed0624892176b0bae3e4455f 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 813e42b2d5..af1a1103cb 100644
--- a/.mailmap
+++ b/.mailmap
@@ -28,4 +28,5 @@ 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>
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 28280c5377..31fe23ef34 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -568,5 +568,5 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *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);
 
@@ -589,7 +589,8 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,
 
 	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.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.889340148 +0000
+++ 0052-net-ionic-fix-RSS-query.patch	2024-03-05 14:08:54.691520874 +0000
@@ -1 +1 @@
-From 1df32bfd0317a3c8aed1e91b51ca2aa8317812e4 Mon Sep 17 00:00:00 2001
+From bee2ac79066df271ed0624892176b0bae3e4455f 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 813e42b2d5..af1a1103cb 100644
@@ -24 +25,2 @@
-@@ -30,4 +30,5 @@ Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
+@@ -28,4 +28,5 @@ Akash Saxena <akash.saxena@caviumnetworks.com>
+ Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
@@ -26 +27,0 @@
- Akihiko Odaki <akihiko.odaki@daynix.com>
@@ -29 +30 @@
- Alan Brady <alan.brady@intel.com>
+ Alan Carew <alan.carew@intel.com>
@@ -31 +32 @@
-index 340fd0cd59..008e50e0b9 100644
+index 28280c5377..31fe23ef34 100644
@@ -34 +35 @@
-@@ -562,5 +562,5 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,
+@@ -568,5 +568,5 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,
@@ -41 +42 @@
-@@ -583,7 +583,8 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,
+@@ -589,7 +589,8 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,


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

* patch 'net/ionic: fix device close' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (50 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/ionic: fix RSS query' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'common/sfc_efx/base: use C11 static assert' " Kevin Traynor
                   ` (17 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Andrew Boyer; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 3b7cc646a988ea82e94d4a00091ac74a1ad4c66f 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 | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 31fe23ef34..8a2b105238 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -953,14 +953,15 @@ 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);
 	ionic_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 */
+
+	lif->adapter = NULL;
 	rte_free(adapter);
 
@@ -1039,7 +1040,4 @@ 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();
 
@@ -1047,11 +1045,11 @@ eth_ionic_dev_uninit(struct rte_eth_dev *eth_dev)
 		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;
@@ -1258,4 +1256,5 @@ eth_ionic_pci_remove(struct rte_pci_device *pci_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 */
@@ -1264,10 +1263,10 @@ eth_ionic_pci_remove(struct rte_pci_device *pci_dev)
 	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",
 			pci_dev->device.name);
 
-	return 0;
+	return ret;
 }
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.911671690 +0000
+++ 0053-net-ionic-fix-device-close.patch	2024-03-05 14:08:54.692520876 +0000
@@ -1 +1 @@
-From 73028be3b4d4d52f5d73becfd22bff3f57a81252 Mon Sep 17 00:00:00 2001
+From 3b7cc646a988ea82e94d4a00091ac74a1ad4c66f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 73028be3b4d4d52f5d73becfd22bff3f57a81252 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- drivers/net/ionic/ionic_ethdev.c | 30 +++++++++++++++---------------
- 1 file changed, 15 insertions(+), 15 deletions(-)
+ drivers/net/ionic/ionic_ethdev.c | 29 ++++++++++++++---------------
+ 1 file changed, 14 insertions(+), 15 deletions(-)
@@ -22 +23 @@
-index 7c55a26956..bedcf958e2 100644
+index 31fe23ef34..8a2b105238 100644
@@ -25 +26 @@
-@@ -1010,17 +1010,19 @@ ionic_dev_close(struct rte_eth_dev *eth_dev)
+@@ -953,14 +953,15 @@ ionic_dev_close(struct rte_eth_dev *eth_dev)
@@ -31,2 +32 @@
- 	if (adapter->intf->unconfigure_intr)
- 		(*adapter->intf->unconfigure_intr)(adapter);
+ 	ionic_unconfigure_intr(adapter);
@@ -38 +38 @@
-+
+ 
@@ -43,3 +42,0 @@
- 	if (adapter->intf->unmap_bars)
- 		(*adapter->intf->unmap_bars)(adapter);
- 
@@ -49 +46 @@
-@@ -1099,7 +1101,4 @@ static int
+@@ -1039,7 +1040,4 @@ static int
@@ -57 +54 @@
-@@ -1107,11 +1106,11 @@ eth_ionic_dev_uninit(struct rte_eth_dev *eth_dev)
+@@ -1047,11 +1045,11 @@ eth_ionic_dev_uninit(struct rte_eth_dev *eth_dev)
@@ -75 +72 @@
-@@ -1268,4 +1267,5 @@ eth_ionic_dev_remove(struct rte_device *rte_dev)
+@@ -1258,4 +1256,5 @@ eth_ionic_pci_remove(struct rte_pci_device *pci_dev)
@@ -81 +78 @@
-@@ -1274,9 +1274,9 @@ eth_ionic_dev_remove(struct rte_device *rte_dev)
+@@ -1264,10 +1263,10 @@ eth_ionic_pci_remove(struct rte_pci_device *pci_dev)
@@ -87 +84,2 @@
- 		IONIC_PRINT(DEBUG, "Cannot find device %s", rte_dev->name);
+ 		IONIC_PRINT(DEBUG, "Cannot find device %s",
+ 			pci_dev->device.name);


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

* patch 'common/sfc_efx/base: use C11 static assert' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (51 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/ionic: fix device close' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' " Kevin Traynor
                   ` (16 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Morten Brørup, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 82aea5d9b46d7bb62c4b18e9a91033a1583287ea 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 398eb8dbd2..74fcd06583 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -8,4 +8,6 @@
 #define	_SYS_EFX_H
 
+#include <assert.h>
+
 #include "efx_annote.h"
 #include "efsys.h"
@@ -18,6 +20,12 @@ 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)			\
@@ -25,5 +33,5 @@ extern "C" {
 
 #define	EFX_FIELD_OFFSET(_type, _field)		\
-	((size_t)&(((_type *)0)->_field))
+	offsetof(_type, _field)
 
 /* The macro expands divider twice */
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.932739434 +0000
+++ 0054-common-sfc_efx-base-use-C11-static-assert.patch	2024-03-05 14:08:54.695520884 +0000
@@ -1 +1 @@
-From 047d7032b76a226f2f1c36775688950933f9121b Mon Sep 17 00:00:00 2001
+From 82aea5d9b46d7bb62c4b18e9a91033a1583287ea 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 398eb8dbd2..74fcd06583 100644


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

* patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (52 preceding siblings ...)
  2024-03-05 15:34 ` patch 'common/sfc_efx/base: use C11 static assert' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net: add macros for VLAN metadata parsing' " Kevin Traynor
                   ` (15 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 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 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 18fb9b63a8efdfdb26512bfcfe72bc19cf9f86d9 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 af1a1103cb..5891d511a4 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1453,4 +1453,5 @@ 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>
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index abaf98c65e..88908a42a5 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -265,6 +265,4 @@ memif_free_stored_mbufs(struct pmd_process_private *proc_private, struct memif_q
 	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++;
@@ -711,8 +709,4 @@ 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];
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.955732512 +0000
+++ 0055-net-memif-fix-extra-mbuf-refcnt-update-in-zero-copy-.patch	2024-03-05 14:08:54.698520892 +0000
@@ -1 +1 @@
-From aa3e97fcb55d7b68fef864aa76078bdae375ad3d Mon Sep 17 00:00:00 2001
+From 18fb9b63a8efdfdb26512bfcfe72bc19cf9f86d9 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 af1a1103cb..5891d511a4 100644
@@ -36 +37 @@
-@@ -1519,4 +1519,5 @@ Wang Sheng-Hui <shhuiw@gmail.com>
+@@ -1453,4 +1453,5 @@ Wang Sheng-Hui <shhuiw@gmail.com>
@@ -43 +44 @@
-index 6f45a00172..18377d9caf 100644
+index abaf98c65e..88908a42a5 100644
@@ -46 +47 @@
-@@ -266,6 +266,4 @@ memif_free_stored_mbufs(struct pmd_process_private *proc_private, struct memif_q
+@@ -265,6 +265,4 @@ memif_free_stored_mbufs(struct pmd_process_private *proc_private, struct memif_q
@@ -53 +54 @@
-@@ -826,8 +824,4 @@ next_in_chain:
+@@ -711,8 +709,4 @@ next_in_chain:


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

* patch 'net: add macros for VLAN metadata parsing' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (53 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/netvsc: fix " Kevin Traynor
                   ` (14 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Alan Elder; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From d100a5e79625ddcd2617f39b3147a16f658c0a70 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 5891d511a4..dde19c1fe8 100644
--- a/.mailmap
+++ b/.mailmap
@@ -32,4 +32,5 @@ 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>
diff --git a/lib/net/rte_ether.h b/lib/net/rte_ether.h
index 3d9852d9e2..1d84fc1098 100644
--- a/lib/net/rte_ether.h
+++ b/lib/net/rte_ether.h
@@ -48,4 +48,18 @@ 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:
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.978579391 +0000
+++ 0056-net-add-macros-for-VLAN-metadata-parsing.patch	2024-03-05 14:08:54.700520898 +0000
@@ -1 +1 @@
-From b74087f15e16c42fe4ff9c4d603cc7a51a1aa1dc Mon Sep 17 00:00:00 2001
+From d100a5e79625ddcd2617f39b3147a16f658c0a70 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 5891d511a4..dde19c1fe8 100644
@@ -22 +23 @@
-@@ -35,4 +35,5 @@ Alan Brady <alan.brady@intel.com>
+@@ -32,4 +32,5 @@ Alain Leon <xerebz@gmail.com>
@@ -29 +30 @@
-index ce073ea818..75285bdd12 100644
+index 3d9852d9e2..1d84fc1098 100644
@@ -32 +33 @@
-@@ -47,4 +47,18 @@ extern "C" {
+@@ -48,4 +48,18 @@ extern "C" {


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

* patch 'net/netvsc: fix VLAN metadata parsing' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (54 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net: add macros for VLAN metadata parsing' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/bnxt: fix array overflow' " Kevin Traynor
                   ` (13 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Alan Elder; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 7d331e7bd1bc0f69539c6b48b7ea732742b7dfcb 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 7a3bd523a5..aba206565d 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -615,5 +615,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
 
 	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;
 
@@ -1335,5 +1337,7 @@ static void hn_encap(struct rndis_packet_msg *pkt,
 		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));
 	}
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.000706478 +0000
+++ 0057-net-netvsc-fix-VLAN-metadata-parsing.patch	2024-03-05 14:08:54.701520900 +0000
@@ -1 +1 @@
-From f7654c8c13f46ab537e8220ea4d6b4911f9f0fd5 Mon Sep 17 00:00:00 2001
+From 7d331e7bd1bc0f69539c6b48b7ea732742b7dfcb 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 7a3bd523a5..aba206565d 100644
@@ -25 +26 @@
-@@ -613,5 +613,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
+@@ -615,5 +615,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
@@ -34 +35 @@
-@@ -1333,5 +1335,7 @@ static void hn_encap(struct rndis_packet_msg *pkt,
+@@ -1335,5 +1337,7 @@ static void hn_encap(struct rndis_packet_msg *pkt,


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

* patch 'net/bnxt: fix array overflow' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (55 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/netvsc: fix " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/bnxt: fix 50G and 100G forced speed' " Kevin Traynor
                   ` (12 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Damodharam Ammepalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From f6e82481277302959b2e0b05a73a61d5607ec240 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 76783eb3a1..31761f4804 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -442,6 +442,6 @@ 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 44fd45a4e9..55f96f0699 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4691,5 +4691,5 @@ 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;
@@ -4703,4 +4703,17 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
 			 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;
@@ -4710,11 +4723,11 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
 
 	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,
@@ -4735,9 +4748,9 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
 	}
 
-	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,
@@ -4785,4 +4798,15 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
 
 	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);
@@ -4797,4 +4821,6 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
 
 	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.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.021503363 +0000
+++ 0058-net-bnxt-fix-array-overflow.patch	2024-03-05 14:08:54.706520913 +0000
@@ -1 +1 @@
-From 4371b402c7bdbe821fff77e3c08e2faba67cb9b3 Mon Sep 17 00:00:00 2001
+From f6e82481277302959b2e0b05a73a61d5607ec240 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 76783eb3a1..31761f4804 100644
@@ -25 +26 @@
-@@ -456,6 +456,6 @@ struct bnxt_ring_mem_info {
+@@ -442,6 +442,6 @@ struct bnxt_ring_mem_info {
@@ -35 +36 @@
-index b0589e2e49..762d863f14 100644
+index 44fd45a4e9..55f96f0699 100644
@@ -38 +39 @@
-@@ -4770,5 +4770,5 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4691,5 +4691,5 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
@@ -45 +46 @@
-@@ -4782,4 +4782,17 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4703,4 +4703,17 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
@@ -63 +64 @@
-@@ -4789,11 +4802,11 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4710,11 +4723,11 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
@@ -79 +80 @@
-@@ -4814,9 +4827,9 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4735,9 +4748,9 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
@@ -92 +93 @@
-@@ -4864,4 +4877,15 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
+@@ -4785,4 +4798,15 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
@@ -108 +109 @@
-@@ -4876,4 +4900,6 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
+@@ -4797,4 +4821,6 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)


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

* patch 'net/bnxt: fix 50G and 100G forced speed' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (56 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/bnxt: fix array overflow' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/bnxt: fix speed change from 200G to 25G on Thor' " Kevin Traynor
                   ` (11 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From e3391de3f743d40835372d75d87519d64af4522d 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
@@ -2973,4 +2973,6 @@ 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;
 
@@ -3010,21 +3012,21 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
 		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;
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.046518523 +0000
+++ 0059-net-bnxt-fix-50G-and-100G-forced-speed.patch	2024-03-05 14:08:54.709520921 +0000
@@ -1 +1 @@
-From dd8d40bc8294ee1f5753205d14f37accc7a7debc Mon Sep 17 00:00:00 2001
+From e3391de3f743d40835372d75d87519d64af4522d 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 @@
-@@ -3159,4 +3159,6 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
+@@ -2973,4 +2973,6 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
@@ -34 +35 @@
-@@ -3196,21 +3198,21 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
+@@ -3010,21 +3012,21 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,


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

* patch 'net/bnxt: fix speed change from 200G to 25G on Thor' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (57 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/bnxt: fix 50G and 100G forced speed' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/bnxt: fix backward firmware compatibility' " Kevin Traynor
                   ` (10 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From c208fb7ed9631f00ce41f351247e7fd5ea6600ef 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
@@ -3006,4 +3006,5 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
 		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:
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.071222675 +0000
+++ 0060-net-bnxt-fix-speed-change-from-200G-to-25G-on-Thor.patch	2024-03-05 14:08:54.713520932 +0000
@@ -1 +1 @@
-From 753b8ff26162ffaf118c03e47ab75cfd2229d4e8 Mon Sep 17 00:00:00 2001
+From c208fb7ed9631f00ce41f351247e7fd5ea6600ef 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 @@
-@@ -3192,4 +3192,5 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
+@@ -3006,4 +3006,5 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed,
@@ -28 +29 @@
- 			HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_25GB;
+ 			HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_25GB;


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

* patch 'net/bnxt: fix backward firmware compatibility' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (58 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/bnxt: fix speed change from 200G to 25G on Thor' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/bnxt: modify locking for representor Tx' " Kevin Traynor
                   ` (9 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From f7380ba80901ef3e6c762944b2ff5f330fa5b7e5 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 | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 31761f4804..b70d8d3f98 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -868,4 +868,5 @@ struct bnxt {
 	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 */
 
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 098f84fbae..3ade65456b 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -908,4 +908,6 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 	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)) {
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.095819225 +0000
+++ 0061-net-bnxt-fix-backward-firmware-compatibility.patch	2024-03-05 14:08:54.718520945 +0000
@@ -1 +1 @@
-From 589619999b0411a4266e335fe105e1c7cba6e02b Mon Sep 17 00:00:00 2001
+From f7380ba80901ef3e6c762944b2ff5f330fa5b7e5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 589619999b0411a4266e335fe105e1c7cba6e02b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 3290c57a72..4b8a691f80 100644
+index 31761f4804..b70d8d3f98 100644
@@ -25 +26 @@
-@@ -975,4 +975,5 @@ struct bnxt {
+@@ -868,4 +868,5 @@ struct bnxt {
@@ -32 +33 @@
-index 441e3aef51..9260bcb4cd 100644
+index 098f84fbae..3ade65456b 100644
@@ -35 +36 @@
-@@ -902,4 +902,6 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+@@ -908,4 +908,6 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
@@ -40 +40,0 @@
- 	memcpy(bp->dsn, resp->device_serial_number, sizeof(bp->dsn));
@@ -41,0 +42 @@
+ 	if (BNXT_PF(bp)) {


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

* patch 'net/bnxt: modify locking for representor Tx' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (59 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/bnxt: fix backward firmware compatibility' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/bnxt: fix deadlock in ULP timer callback' " Kevin Traynor
                   ` (8 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Peter Spreadborough, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 659e7c7b2dd3d8c1a94b7544a2a71d9554a4f725 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 b70d8d3f98..bbbd2ae0d6 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -543,5 +543,4 @@ 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 55f96f0699..63ef5593b0 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1648,8 +1648,6 @@ bnxt_uninit_locks(struct bnxt *bp)
 	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);
-	}
 }
 
@@ -6089,11 +6087,4 @@ static int bnxt_init_rep_info(struct bnxt *bp)
 		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) {
diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index 299b4c24a8..5b2d9aee3a 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -125,6 +125,6 @@ bnxt_rep_tx_burst(void *tx_queue,
 	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;
@@ -135,7 +135,7 @@ bnxt_rep_tx_burst(void *tx_queue,
 	}
 
-	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
@@ -112,4 +112,5 @@ void bnxt_tx_queue_release_op(struct rte_eth_dev *dev, uint16_t queue_idx)
 
 		rte_free(txq->free);
+		pthread_mutex_destroy(&txq->txq_lock);
 		rte_free(txq);
 		dev->data->tx_queues[queue_idx] = NULL;
@@ -195,4 +196,9 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	}
 
+	rc = pthread_mutex_init(&txq->txq_lock, NULL);
+	if (rc != 0) {
+		PMD_DRV_LOG(ERR, "TxQ mutex init failed!");
+		goto err;
+	}
 	return 0;
 err:
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
@@ -27,4 +27,5 @@ struct bnxt_tx_queue {
 	int			tx_wake_thresh;
 	uint32_t		vfr_tx_cfa_action;
+	pthread_mutex_t		txq_lock;
 	struct bnxt_tx_ring_info	*tx_ring;
 
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index ec63b97fe2..c0518b4a26 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -493,4 +493,17 @@ 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;
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
@@ -47,5 +47,7 @@ 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,
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.120751326 +0000
+++ 0062-net-bnxt-modify-locking-for-representor-Tx.patch	2024-03-05 14:08:54.724520961 +0000
@@ -1 +1 @@
-From d46406c7070724c8cfd04b805849339d1178f528 Mon Sep 17 00:00:00 2001
+From 659e7c7b2dd3d8c1a94b7544a2a71d9554a4f725 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 b70d8d3f98..bbbd2ae0d6 100644
@@ -33 +34 @@
-@@ -624,5 +624,4 @@ struct bnxt_mark_info {
+@@ -543,5 +543,4 @@ struct bnxt_mark_info {
@@ -40 +41 @@
-index 74064e8971..72debaca64 100644
+index 55f96f0699..63ef5593b0 100644
@@ -43 +44 @@
-@@ -1803,8 +1803,6 @@ bnxt_uninit_locks(struct bnxt *bp)
+@@ -1648,8 +1648,6 @@ bnxt_uninit_locks(struct bnxt *bp)
@@ -53 +54 @@
-@@ -6524,11 +6522,4 @@ static int bnxt_init_rep_info(struct bnxt *bp)
+@@ -6089,11 +6087,4 @@ static int bnxt_init_rep_info(struct bnxt *bp)
@@ -66 +67 @@
-index d96d972904..3a4720bc3c 100644
+index 299b4c24a8..5b2d9aee3a 100644
@@ -88 +89 @@
-index 7d91e88c9d..05032f7807 100644
+index c8745add5e..0f41193038 100644
@@ -91 +92 @@
-@@ -115,4 +115,5 @@ void bnxt_tx_queue_release_op(struct rte_eth_dev *dev, uint16_t queue_idx)
+@@ -112,4 +112,5 @@ void bnxt_tx_queue_release_op(struct rte_eth_dev *dev, uint16_t queue_idx)
@@ -97 +98 @@
-@@ -198,4 +199,9 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -195,4 +196,9 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -108 +109 @@
-index 3a483ad5c3..9e54985c4c 100644
+index f3a03812ad..6e2d87de09 100644
@@ -118 +119 @@
-index d74d271d91..7fc44e989d 100644
+index ec63b97fe2..c0518b4a26 100644
@@ -121 +122 @@
-@@ -568,4 +568,17 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
+@@ -493,4 +493,17 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
@@ -140 +141 @@
-index e64ea2c7d1..09078d545d 100644
+index e11343c082..2be3ba4cac 100644
@@ -143 +144 @@
-@@ -48,5 +48,7 @@ int bnxt_init_one_tx_ring(struct bnxt_tx_queue *txq);
+@@ -47,5 +47,7 @@ int bnxt_init_one_tx_ring(struct bnxt_tx_queue *txq);


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

* patch 'net/bnxt: fix deadlock in ULP timer callback' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (60 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/bnxt: modify locking for representor Tx' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/cnxk: fix flow RSS configuration' " Kevin Traynor
                   ` (7 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Weiguo Li; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 638141e6c51fb350f13924c7a26f3cb2039ee098 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
@@ -172,4 +172,5 @@ 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.");
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.146016131 +0000
+++ 0063-net-bnxt-fix-deadlock-in-ULP-timer-callback.patch	2024-03-05 14:08:54.724520961 +0000
@@ -1 +1 @@
-From 81132be766f57ad39a7fe0ad86717b9618e60889 Mon Sep 17 00:00:00 2001
+From 638141e6c51fb350f13924c7a26f3cb2039ee098 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 @@
-@@ -254,4 +254,5 @@ ulp_ha_mgr_timer_cb(void *arg)
+@@ -172,4 +172,5 @@ ulp_ha_mgr_timer_cb(void *arg)


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

* patch 'net/cnxk: fix flow RSS configuration' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (61 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/bnxt: fix deadlock in ULP timer callback' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'common/cnxk: fix mbox region copy' " Kevin Traynor
                   ` (6 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Kiran Kumar K; +Cc: Satheesh Paul, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 5a59e070c092f555366aa7b3f401acd79692e71d 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_rte_flow.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/cnxk/cnxk_rte_flow.c b/drivers/net/cnxk/cnxk_rte_flow.c
index 0410f2d82e..bdff3c0fc9 100644
--- a/drivers/net/cnxk/cnxk_rte_flow.c
+++ b/drivers/net/cnxk/cnxk_rte_flow.c
@@ -94,13 +94,17 @@ 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);
 }
 
@@ -197,5 +201,6 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
 			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;
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.166683282 +0000
+++ 0064-net-cnxk-fix-flow-RSS-configuration.patch	2024-03-05 14:08:54.725520964 +0000
@@ -1 +1 @@
-From 752ce2f3e5bf7bd8add8dc9629f3b824886c641e Mon Sep 17 00:00:00 2001
+From 5a59e070c092f555366aa7b3f401acd79692e71d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 752ce2f3e5bf7bd8add8dc9629f3b824886c641e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- drivers/net/cnxk/cnxk_flow.c | 15 ++++++++++-----
+ drivers/net/cnxk/cnxk_rte_flow.c | 15 ++++++++++-----
@@ -18,5 +19,5 @@
-diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c
-index 11670d37e0..a92b61c332 100644
---- a/drivers/net/cnxk/cnxk_flow.c
-+++ b/drivers/net/cnxk/cnxk_flow.c
-@@ -104,13 +104,17 @@ npc_rss_action_validate(struct rte_eth_dev *eth_dev, const struct rte_flow_attr
+diff --git a/drivers/net/cnxk/cnxk_rte_flow.c b/drivers/net/cnxk/cnxk_rte_flow.c
+index 0410f2d82e..bdff3c0fc9 100644
+--- a/drivers/net/cnxk/cnxk_rte_flow.c
++++ b/drivers/net/cnxk/cnxk_rte_flow.c
+@@ -94,13 +94,17 @@ npc_rss_action_validate(struct rte_eth_dev *eth_dev,
@@ -44 +45 @@
-@@ -294,5 +298,6 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,
+@@ -197,5 +201,6 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,


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

* patch 'common/cnxk: fix mbox region copy' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (62 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/cnxk: fix flow RSS configuration' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/mlx5: fix jump action validation' " Kevin Traynor
                   ` (5 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Harman Kalra; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 79c2b508d9425473add3d6cb850a3c5923e52a02 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 0a9c722db3..f45078568f 100644
--- a/drivers/common/cnxk/roc_dev.c
+++ b/drivers/common/cnxk/roc_dev.c
@@ -191,7 +191,6 @@ af_pf_wait_msg(struct dev *dev, uint16_t vf, int num_msg)
 			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;
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.187581301 +0000
+++ 0065-common-cnxk-fix-mbox-region-copy.patch	2024-03-05 14:08:54.726520966 +0000
@@ -1 +1 @@
-From 4590d008892ce8a2d17ee7f1ed3fb10204a809e4 Mon Sep 17 00:00:00 2001
+From 79c2b508d9425473add3d6cb850a3c5923e52a02 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 0a9c722db3..f45078568f 100644
@@ -20 +21 @@
-@@ -199,7 +199,6 @@ af_pf_wait_msg(struct dev *dev, uint16_t vf, int num_msg)
+@@ -191,7 +191,6 @@ af_pf_wait_msg(struct dev *dev, uint16_t vf, int num_msg)


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

* patch 'net/mlx5: fix jump action validation' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (63 preceding siblings ...)
  2024-03-05 15:34 ` patch 'common/cnxk: fix mbox region copy' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/mlx5: fix GENEVE TLV option management' " Kevin Traynor
                   ` (4 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 9fe858d7b9758f06d06f29bb2aa09905e88e729e 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 0c66c76ef5..7cddeab48f 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -4999,11 +4999,4 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,
 	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,
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.208759837 +0000
+++ 0066-net-mlx5-fix-jump-action-validation.patch	2024-03-05 14:08:54.738520998 +0000
@@ -1 +1 @@
-From 9c289272ae692bd03d1dc9726ef19785beedd313 Mon Sep 17 00:00:00 2001
+From 9fe858d7b9758f06d06f29bb2aa09905e88e729e 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 0c66c76ef5..7cddeab48f 100644
@@ -47 +48 @@
-@@ -5485,11 +5485,4 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,
+@@ -4999,11 +4999,4 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,


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

* patch 'net/mlx5: fix GENEVE TLV option management' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (64 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/mlx5: fix jump action validation' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'common/mlx5: fix duplicate read of general capabilities' " Kevin Traynor
                   ` (3 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 5c8bbc6b7d8b1ab647c5ab5fee86f1c68717b405 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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 7cddeab48f..e3132995a3 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -14607,7 +14607,7 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
 	else if (flow->age)
 		flow_dv_aso_age_release(dev, flow->age);
-	if (flow->geneve_tlv_option) {
+	while (flow->geneve_tlv_option) {
 		flow_dv_geneve_tlv_option_resource_release(dev);
-		flow->geneve_tlv_option = 0;
+		flow->geneve_tlv_option--;
 	}
 	while (flow->dev_handles) {
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.240607925 +0000
+++ 0067-net-mlx5-fix-GENEVE-TLV-option-management.patch	2024-03-05 14:08:54.751521033 +0000
@@ -1 +1 @@
-From 0303967e1127c00e78fc9ce742aa531b943a2a8b Mon Sep 17 00:00:00 2001
+From 5c8bbc6b7d8b1ab647c5ab5fee86f1c68717b405 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0303967e1127c00e78fc9ce742aa531b943a2a8b ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -29,2 +30,2 @@
- drivers/net/mlx5/mlx5_flow_dv.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
@@ -33 +34 @@
-index 80eee00813..e1d09d4455 100644
+index 7cddeab48f..e3132995a3 100644
@@ -36,8 +37 @@
-@@ -14374,5 +14374,5 @@ flow_dv_translate_items_sws(struct rte_eth_dev *dev,
- 	 */
- 	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;
- }
-@@ -15983,7 +15983,7 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
+@@ -14607,7 +14607,7 @@ flow_dv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
@@ -48 +42 @@
- 		flow_dev_geneve_tlv_option_resource_release(priv->sh);
+ 		flow_dv_geneve_tlv_option_resource_release(dev);


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

* patch 'common/mlx5: fix duplicate read of general capabilities' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (65 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/mlx5: fix GENEVE TLV option management' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'net/mlx5: fix stats query crash in secondary process' " Kevin Traynor
                   ` (2 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Michael Baum; +Cc: Suanming Mou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 83738589f715441c8d9673b1ce41f01aa814d6dc 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 70a430f134..d9585bf3a9 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -869,16 +869,4 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 			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);
@@ -904,4 +892,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 	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);
@@ -966,6 +957,5 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 	if (attr->crypto)
 		attr->aes_xts = MLX5_GET(cmd_hca_cap, hcattr, aes_xts);
-	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);
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.271626890 +0000
+++ 0068-common-mlx5-fix-duplicate-read-of-general-capabiliti.patch	2024-03-05 14:08:54.753521038 +0000
@@ -1 +1 @@
-From e8ffd7c26637b9119694368f16d2eb1341767fc6 Mon Sep 17 00:00:00 2001
+From 83738589f715441c8d9673b1ce41f01aa814d6dc 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 70a430f134..d9585bf3a9 100644
@@ -33 +34 @@
-@@ -967,16 +967,4 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
+@@ -869,16 +869,4 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
@@ -50 +51 @@
-@@ -1002,4 +990,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
+@@ -904,4 +892,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
@@ -58,3 +59,3 @@
-@@ -1075,6 +1066,5 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
- 	attr->wait_on_time = MLX5_GET(cmd_hca_cap, hcattr, wait_on_time);
- 	attr->crypto = MLX5_GET(cmd_hca_cap, hcattr, crypto);
+@@ -966,6 +957,5 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
+ 	if (attr->crypto)
+ 		attr->aes_xts = MLX5_GET(cmd_hca_cap, hcattr, aes_xts);


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

* patch 'net/mlx5: fix stats query crash in secondary process' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (66 preceding siblings ...)
  2024-03-05 15:34 ` patch 'common/mlx5: fix duplicate read of general capabilities' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'telemetry: fix connected clients count' " Kevin Traynor
  2024-03-05 15:34 ` patch 'telemetry: fix empty JSON dictionaries' " Kevin Traynor
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Rongwei Liu; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 40625500ace1a348152f2894016a88feae6e9c6c 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 85eda47f7d..1e1de4b547 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -2896,7 +2896,13 @@ 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,
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.293710546 +0000
+++ 0069-net-mlx5-fix-stats-query-crash-in-secondary-process.patch	2024-03-05 14:08:54.755521043 +0000
@@ -1 +1 @@
-From d312cab568ecdc8411cb3dc896e7d5020836399b Mon Sep 17 00:00:00 2001
+From 40625500ace1a348152f2894016a88feae6e9c6c 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 85eda47f7d..1e1de4b547 100644
@@ -28 +29 @@
-@@ -2999,7 +2999,13 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name,
+@@ -2896,7 +2896,13 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name,


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

* patch 'telemetry: fix connected clients count' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (67 preceding siblings ...)
  2024-03-05 15:34 ` patch 'net/mlx5: fix stats query crash in secondary process' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  2024-03-05 15:34 ` patch 'telemetry: fix empty JSON dictionaries' " Kevin Traynor
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 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 21.11.7

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

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

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

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

Thanks.

Kevin

---
From 1af693e0074daa8f727c3d68592b67f99916359b 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 dde19c1fe8..8cb4e2f619 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1233,4 +1233,5 @@ 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>
diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index e73f4a593e..075672d91d 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -375,6 +375,6 @@ client_handler(void *sock_id)
 			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\n");
+		goto exit;
 	}
 
@@ -401,4 +401,5 @@ client_handler(void *sock_id)
 		bytes = read(s, buffer, sizeof(buffer) - 1);
 	}
+exit:
 	close(s);
 	__atomic_sub_fetch(&v2_clients, 1, __ATOMIC_RELAXED);
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.316085733 +0000
+++ 0070-telemetry-fix-connected-clients-count.patch	2024-03-05 14:08:54.758521051 +0000
@@ -1 +1 @@
-From e14bb5f1050924de1602033596d5b417bfbeee52 Mon Sep 17 00:00:00 2001
+From 1af693e0074daa8f727c3d68592b67f99916359b 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 dde19c1fe8..8cb4e2f619 100644
@@ -31 +32 @@
-@@ -1282,4 +1282,5 @@ Shannon Nelson <snelson@pensando.io>
+@@ -1233,4 +1233,5 @@ Shannon Nelson <snelson@pensando.io>
@@ -38 +39 @@
-index 47846ef868..d4720197ba 100644
+index e73f4a593e..075672d91d 100644
@@ -41 +42 @@
-@@ -379,6 +379,6 @@ client_handler(void *sock_id)
+@@ -375,6 +375,6 @@ client_handler(void *sock_id)
@@ -46 +47 @@
-+		TMTY_LOG_LINE(ERR, "Socket write base info to client failed");
++		TMTY_LOG(ERR, "Socket write base info to client failed\n");
@@ -50 +51 @@
-@@ -405,4 +405,5 @@ client_handler(void *sock_id)
+@@ -401,4 +401,5 @@ client_handler(void *sock_id)
@@ -55 +56 @@
- 	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] 71+ messages in thread

* patch 'telemetry: fix empty JSON dictionaries' has been queued to stable release 21.11.7
  2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
                   ` (68 preceding siblings ...)
  2024-03-05 15:34 ` patch 'telemetry: fix connected clients count' " Kevin Traynor
@ 2024-03-05 15:34 ` Kevin Traynor
  69 siblings, 0 replies; 71+ messages in thread
From: Kevin Traynor @ 2024-03-05 15:34 UTC (permalink / raw)
  To: Jonathan Erb; +Cc: Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 21.11.7

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

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

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

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

Thanks.

Kevin

---
From a5224aa51717e08700862bb16a5711f3bedb6350 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 8cb4e2f619..7776e85d57 100644
--- a/.mailmap
+++ b/.mailmap
@@ -653,5 +653,5 @@ John Ousterhout <ouster@cs.stanford.edu>
 John W. Linville <linville@tuxdriver.com>
 Jonas Pfefferle <jpf@zurich.ibm.com> <pepperjo@japf.ch>
-Jonathan Erb <jonathan.erb@banduracyber.com>
+(??)Jonathan Erb <jonathan.erb@threatblockr.com> <jonathan.erb@banduracyber.com>
 Jonathan Tsai <jonathan1.tsai@intel.com>
 Jon DeVree <nuxi@vault24.org>
diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index 075672d91d..36cdec26ef 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -161,5 +161,9 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
 		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++)
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:56.337499329 +0000
+++ 0071-telemetry-fix-empty-JSON-dictionaries.patch	2024-03-05 14:08:54.760521056 +0000
@@ -1 +1 @@
-From 324ec1df541711ca829f4d99b7e2d32ffe38d3ca Mon Sep 17 00:00:00 2001
+From a5224aa51717e08700862bb16a5711f3bedb6350 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 8cb4e2f619..7776e85d57 100644
@@ -26 +27 @@
-@@ -677,5 +677,5 @@ John Romein <romein@astron.nl>
+@@ -653,5 +653,5 @@ John Ousterhout <ouster@cs.stanford.edu>
@@ -29,2 +30,2 @@
--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 Erb <jonathan.erb@banduracyber.com>
++(??)Jonathan Erb <jonathan.erb@threatblockr.com> <jonathan.erb@banduracyber.com>
@@ -34 +35 @@
-index d4720197ba..1663bd8c68 100644
+index 075672d91d..36cdec26ef 100644
@@ -37 +38 @@
-@@ -171,5 +171,9 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
+@@ -161,5 +161,9 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
@@ -41 +42 @@
-+	if (d->type == TEL_DICT)
++	if (d->type == RTE_TEL_DICT)
@@ -46 +47 @@
- 	if (d->type == TEL_ARRAY_UINT)
+ 	if (d->type == RTE_TEL_ARRAY_U64)


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

end of thread, other threads:[~2024-03-05 15:36 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-05 15:33 patch 'hash: remove some dead code' has been queued to stable release 21.11.7 Kevin Traynor
2024-03-05 15:33 ` patch 'regexdev: fix logtype register' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/i40e: remove redundant judgment in flow parsing' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/iavf: fix memory leak on security context error' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/ixgbe: fix memoy leak after device init failure' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/ice: fix link update' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/ice: fix tunnel TSO capabilities' " Kevin Traynor
2024-03-05 15:33 ` patch 'kernel/freebsd: fix module build on FreeBSD 14' " Kevin Traynor
2024-03-05 15:33 ` patch 'ci: update versions of actions in GHA' " Kevin Traynor
2024-03-05 15:33 ` patch 'eal/x86: add AMD vendor check for TSC calibration' " Kevin Traynor
2024-03-05 15:33 ` patch 'eal: verify strdup return' " Kevin Traynor
2024-03-05 15:33 ` patch 'bus/dpaa: " Kevin Traynor
2024-03-05 15:33 ` patch 'bus/fslmc: " Kevin Traynor
2024-03-05 15:33 ` patch 'bus/vdev: " Kevin Traynor
2024-03-05 15:33 ` patch 'dma/idxd: " Kevin Traynor
2024-03-05 15:33 ` patch 'event/cnxk: " Kevin Traynor
2024-03-05 15:33 ` patch 'net/failsafe: fix memory leak in args parsing' " Kevin Traynor
2024-03-05 15:33 ` patch 'app/dumpcap: verify strdup return' " Kevin Traynor
2024-03-05 15:33 ` patch 'app/pdump: " Kevin Traynor
2024-03-05 15:33 ` patch 'app/crypto-perf: " Kevin Traynor
2024-03-05 15:33 ` patch 'test: " Kevin Traynor
2024-03-05 15:33 ` patch 'examples/qos_sched: fix memory leak in args parsing' " Kevin Traynor
2024-03-05 15:33 ` patch 'common/mlx5: fix calloc parameters' " Kevin Traynor
2024-03-05 15:33 ` patch 'net/bnx2x: " Kevin Traynor
2024-03-05 15:33 ` patch 'net/nfp: " Kevin Traynor
2024-03-05 15:33 ` patch 'build: fix linker warnings about undefined symbols' " Kevin Traynor
2024-03-05 15:34 ` patch 'vhost: fix virtqueue access check in vhost-user setup' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/virtio: remove duplicate queue xstats' " Kevin Traynor
2024-03-05 15:34 ` patch 'vhost: fix deadlock during vDPA SW live migration' " Kevin Traynor
2024-03-05 15:34 ` patch 'vhost: fix memory leak in Virtio Tx split path' " Kevin Traynor
2024-03-05 15:34 ` patch 'cryptodev: remove unused extern variable' " Kevin Traynor
2024-03-05 15:34 ` patch 'common/cnxk: fix memory leak in CPT init' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/crypto-perf: fix next segment mbuf' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/crypto-perf: fix data comparison' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/crypto-perf: fix encrypt operation verification' " Kevin Traynor
2024-03-05 15:34 ` patch 'event/cnxk: fix dequeue timeout configuration' " Kevin Traynor
2024-03-05 15:34 ` patch 'test/event: skip test if no driver is present' " Kevin Traynor
2024-03-05 15:34 ` patch 'doc: fix commands in eventdev test tool guide' " Kevin Traynor
2024-03-05 15:34 ` patch 'ethdev: fix NVGRE encap flow action description' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/af_xdp: fix memzone leak on config failure' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: refactor VF mailbox message struct' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: refactor PF " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: fix VF multiple count on one reset' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: fix disable command with firmware' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: fix reset level comparison' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/hns3: remove QinQ insert support for VF' " Kevin Traynor
2024-03-05 15:34 ` patch 'doc: add --latencystats option in testpmd guide' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/testpmd: hide --bitrate-stats in help if disabled' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/vmxnet3: fix initialization on FreeBSD' " Kevin Traynor
2024-03-05 15:34 ` patch 'drivers/net: fix buffer overflow for packet types list' " Kevin Traynor
2024-03-05 15:34 ` patch 'app/testpmd: fix crash in multi-process forwarding' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/ionic: fix RSS query' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/ionic: fix device close' " Kevin Traynor
2024-03-05 15:34 ` patch 'common/sfc_efx/base: use C11 static assert' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' " Kevin Traynor
2024-03-05 15:34 ` patch 'net: add macros for VLAN metadata parsing' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/netvsc: fix " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix array overflow' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix 50G and 100G forced speed' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix speed change from 200G to 25G on Thor' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix backward firmware compatibility' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: modify locking for representor Tx' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/bnxt: fix deadlock in ULP timer callback' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/cnxk: fix flow RSS configuration' " Kevin Traynor
2024-03-05 15:34 ` patch 'common/cnxk: fix mbox region copy' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/mlx5: fix jump action validation' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/mlx5: fix GENEVE TLV option management' " Kevin Traynor
2024-03-05 15:34 ` patch 'common/mlx5: fix duplicate read of general capabilities' " Kevin Traynor
2024-03-05 15:34 ` patch 'net/mlx5: fix stats query crash in secondary process' " Kevin Traynor
2024-03-05 15:34 ` patch 'telemetry: fix connected clients count' " Kevin Traynor
2024-03-05 15:34 ` patch 'telemetry: fix empty JSON dictionaries' " Kevin Traynor

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