patch 'net/cnxk: register callback early to handle initial packets' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Tue Mar 1 11:42:46 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.1

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

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

Thanks.

Kevin

---
>From 667b3995446d943219c906bde6d13f10f2aeff5b Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram at marvell.com>
Date: Wed, 23 Feb 2022 01:05:04 +0530
Subject: [PATCH] net/cnxk: register callback early to handle initial packets

[ upstream commit fb35a2c703ca5e05067a2f94965a06da8626875d ]

Register callback early to handle initial error packets from
inline device.

Fixes: 69daa9e5022b ("net/cnxk: support inline security setup for cn10k")

Signed-off-by: Nithin Dabilpuram <ndabilpuram at marvell.com>
Acked-by: Jerin Jacob <jerinj at marvell.com>
---
 drivers/net/cnxk/cn10k_ethdev.c     | 6 ++++++
 drivers/net/cnxk/cn10k_ethdev.h     | 3 +++
 drivers/net/cnxk/cn10k_ethdev_sec.c | 5 +----
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/cnxk/cn10k_ethdev.c b/drivers/net/cnxk/cn10k_ethdev.c
index 8378cbffc2..c36b858110 100644
--- a/drivers/net/cnxk/cn10k_ethdev.c
+++ b/drivers/net/cnxk/cn10k_ethdev.c
@@ -314,4 +314,10 @@ cn10k_nix_configure(struct rte_eth_dev *eth_dev)
 		return rc;
 
+	if (dev->tx_offloads & RTE_ETH_TX_OFFLOAD_SECURITY ||
+	    dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SECURITY) {
+		/* Register callback to handle security error work */
+		roc_nix_inl_cb_register(cn10k_eth_sec_sso_work_cb, NULL);
+	}
+
 	/* Update offload flags */
 	dev->rx_offload_flags = nix_rx_offload_flags(eth_dev);
diff --git a/drivers/net/cnxk/cn10k_ethdev.h b/drivers/net/cnxk/cn10k_ethdev.h
index 0982158c62..13403e14c4 100644
--- a/drivers/net/cnxk/cn10k_ethdev.h
+++ b/drivers/net/cnxk/cn10k_ethdev.h
@@ -83,4 +83,7 @@ void cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev);
 void cn10k_eth_sec_ops_override(void);
 
+/* SSO Work callback */
+void cn10k_eth_sec_sso_work_cb(uint64_t *gw, void *args);
+
 #define LMT_OFF(lmt_addr, lmt_num, offset)                                     \
 	(void *)((uintptr_t)(lmt_addr) +                                       \
diff --git a/drivers/net/cnxk/cn10k_ethdev_sec.c b/drivers/net/cnxk/cn10k_ethdev_sec.c
index 235c16840e..a517421b12 100644
--- a/drivers/net/cnxk/cn10k_ethdev_sec.c
+++ b/drivers/net/cnxk/cn10k_ethdev_sec.c
@@ -139,5 +139,5 @@ static const struct rte_security_capability cn10k_eth_sec_capabilities[] = {
 };
 
-static void
+void
 cn10k_eth_sec_sso_work_cb(uint64_t *gw, void *args)
 {
@@ -250,7 +250,4 @@ cn10k_eth_sec_session_create(void *device,
 		return -ENOTSUP;
 
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-		roc_nix_inl_cb_register(cn10k_eth_sec_sso_work_cb, NULL);
-
 	ipsec = &conf->ipsec;
 	crypto = conf->crypto_xform;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-01 10:41:03.887217543 +0000
+++ 0090-net-cnxk-register-callback-early-to-handle-initial-p.patch	2022-03-01 10:41:01.459244130 +0000
@@ -1 +1 @@
-From fb35a2c703ca5e05067a2f94965a06da8626875d Mon Sep 17 00:00:00 2001
+From 667b3995446d943219c906bde6d13f10f2aeff5b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fb35a2c703ca5e05067a2f94965a06da8626875d ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 03ca1abe45..c6890f3699 100644
+index 8378cbffc2..c36b858110 100644
@@ -24 +25 @@
-@@ -295,4 +295,10 @@ cn10k_nix_configure(struct rte_eth_dev *eth_dev)
+@@ -314,4 +314,10 @@ cn10k_nix_configure(struct rte_eth_dev *eth_dev)
@@ -36 +37 @@
-index ec40e53152..fd7273078a 100644
+index 0982158c62..13403e14c4 100644
@@ -39 +40 @@
-@@ -82,4 +82,7 @@ void cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev);
+@@ -83,4 +83,7 @@ void cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev);
@@ -48 +49 @@
-index 6fbf444038..ac45056936 100644
+index 235c16840e..a517421b12 100644
@@ -58 +59 @@
-@@ -252,7 +252,4 @@ cn10k_eth_sec_session_create(void *device,
+@@ -250,7 +250,4 @@ cn10k_eth_sec_session_create(void *device,



More information about the stable mailing list