DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
To: <jerinj@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>,
	"Kiran Kumar K" <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	Harman Kalra <hkalra@marvell.com>
Cc: <dev@dpdk.org>, Rakesh Kudurumalla <rkudurumalla@marvell.com>
Subject: [PATCH v2 16/17] net/cnxk: handle OOP for inbound packet
Date: Tue, 1 Oct 2024 11:30:54 +0530	[thread overview]
Message-ID: <20241001060055.3747591-16-ndabilpuram@marvell.com> (raw)
In-Reply-To: <20241001060055.3747591-1-ndabilpuram@marvell.com>

From: Rakesh Kudurumalla <rkudurumalla@marvell.com>

To handle OOP for inbound packet, processing
is done based on NIX_RX_REAS_F flag. but for
boards that does not support reassembly
Inbound Out-Of-Place processing test case fails
because reassembly flag is not updated in event mode.
This patch fixes the same.

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 drivers/net/cnxk/cn10k_ethdev_sec.c | 10 ++++++++++
 drivers/net/cnxk/cnxk_ethdev.h      |  4 ++++
 drivers/net/cnxk/version.map        |  1 +
 3 files changed, 15 insertions(+)

diff --git a/drivers/net/cnxk/cn10k_ethdev_sec.c b/drivers/net/cnxk/cn10k_ethdev_sec.c
index 84e570f5b9..e911c3730b 100644
--- a/drivers/net/cnxk/cn10k_ethdev_sec.c
+++ b/drivers/net/cnxk/cn10k_ethdev_sec.c
@@ -28,6 +28,13 @@ PLT_STATIC_ASSERT(RTE_PMD_CNXK_AR_WIN_SIZE_MAX == ROC_AR_WIN_SIZE_MAX);
 PLT_STATIC_ASSERT(RTE_PMD_CNXK_LOG_MIN_AR_WIN_SIZE_M1 == ROC_LOG_MIN_AR_WIN_SIZE_M1);
 PLT_STATIC_ASSERT(RTE_PMD_CNXK_AR_WINBITS_SZ == ROC_AR_WINBITS_SZ);
 
+cnxk_ethdev_rx_offload_cb_t cnxk_ethdev_rx_offload_cb;
+void
+cnxk_ethdev_rx_offload_cb_register(cnxk_ethdev_rx_offload_cb_t cb)
+{
+	cnxk_ethdev_rx_offload_cb = cb;
+}
+
 static struct rte_cryptodev_capabilities cn10k_eth_sec_crypto_caps[] = {
 	{	/* AES GCM */
 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
@@ -908,6 +915,9 @@ cn10k_eth_sec_session_create(void *device,
 		    !(dev->rx_offload_flags & NIX_RX_REAS_F)) {
 			dev->rx_offload_flags |= NIX_RX_REAS_F;
 			cn10k_eth_set_rx_function(eth_dev);
+			if (cnxk_ethdev_rx_offload_cb)
+				cnxk_ethdev_rx_offload_cb(eth_dev->data->port_id,
+							  NIX_RX_REAS_F);
 		}
 	} else {
 		struct roc_ot_ipsec_outb_sa *outb_sa, *outb_sa_dptr;
diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h
index d4440b25ac..350adc1161 100644
--- a/drivers/net/cnxk/cnxk_ethdev.h
+++ b/drivers/net/cnxk/cnxk_ethdev.h
@@ -725,6 +725,10 @@ int cnxk_nix_lookup_mem_metapool_set(struct cnxk_eth_dev *dev);
 int cnxk_nix_lookup_mem_metapool_clear(struct cnxk_eth_dev *dev);
 __rte_internal
 int cnxk_nix_inb_mode_set(struct cnxk_eth_dev *dev, bool use_inl_dev);
+typedef void (*cnxk_ethdev_rx_offload_cb_t)(uint16_t port_id, uint64_t flags);
+__rte_internal
+void cnxk_ethdev_rx_offload_cb_register(cnxk_ethdev_rx_offload_cb_t cb);
+
 struct cnxk_eth_sec_sess *cnxk_eth_sec_sess_get_by_spi(struct cnxk_eth_dev *dev,
 						       uint32_t spi, bool inb);
 struct cnxk_eth_sec_sess *
diff --git a/drivers/net/cnxk/version.map b/drivers/net/cnxk/version.map
index 099c518ecf..edb0a1c059 100644
--- a/drivers/net/cnxk/version.map
+++ b/drivers/net/cnxk/version.map
@@ -23,4 +23,5 @@ EXPERIMENTAL {
 INTERNAL {
 	global:
 	cnxk_nix_inb_mode_set;
+	cnxk_ethdev_rx_offload_cb_register;
 };
-- 
2.34.1


  parent reply	other threads:[~2024-10-01  6:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01  6:00 [PATCH v2 01/17] net/cnxk: added telemetry support do dump SA information Nithin Dabilpuram
2024-10-01  6:00 ` [PATCH v2 02/17] net/cnxk: handle timestamp correctly for VF Nithin Dabilpuram
2024-10-01  6:00 ` [PATCH v2 03/17] net/cnxk: update Rx offloads to handle timestamp Nithin Dabilpuram
2024-10-01  6:00 ` [PATCH v2 04/17] event/cnxk: handle timestamp for event mode Nithin Dabilpuram
2024-10-01  6:00 ` [PATCH v2 05/17] net/cnxk: update mbuf and rearm data for Rx inject packets Nithin Dabilpuram
2024-10-01  6:00 ` [PATCH v2 06/17] common/cnxk: remove restriction to clear RPM stats Nithin Dabilpuram
2024-10-01  6:00 ` [PATCH v2 07/17] common/cnxk: allow MAC address set/add with active VFs Nithin Dabilpuram
2024-10-01  6:00 ` [PATCH v2 08/17] net/cnxk: move PMD function defines to common code Nithin Dabilpuram
2024-10-01  6:00 ` [PATCH v2 09/17] common/cnxk: add flush wait after write of inline ctx Nithin Dabilpuram
2024-10-01  6:00 ` [PATCH v2 10/17] common/cnxk: fix CPT HW word size for outbound SA Nithin Dabilpuram
2024-10-01  6:00 ` [PATCH v2 11/17] net/cnxk: add PMD APIs for IPsec SA base and flush Nithin Dabilpuram
2024-10-01  6:00 ` [PATCH v2 12/17] net/cnxk: add PMD APIs to submit CPT instruction Nithin Dabilpuram
2024-10-01  6:00 ` [PATCH v2 13/17] net/cnxk: add PMD API to retrieve CPT queue statistics Nithin Dabilpuram
2024-10-01  6:00 ` [PATCH v2 14/17] net/cnxk: add option to enable custom inbound sa usage Nithin Dabilpuram
2024-10-01  6:00 ` [PATCH v2 15/17] net/cnxk: add PMD API to retrieve the model string Nithin Dabilpuram
2024-10-01  6:00 ` Nithin Dabilpuram [this message]
2024-10-01  6:00 ` [PATCH v2 17/17] event/cnxk: handle inbound out of place processing Nithin Dabilpuram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241001060055.3747591-16-ndabilpuram@marvell.com \
    --to=ndabilpuram@marvell.com \
    --cc=dev@dpdk.org \
    --cc=hkalra@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=rkudurumalla@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).