From: Tejasree Kondoj <ktejasree@marvell.com>
To: Akhil Goyal <gakhil@marvell.com>
Cc: Aakash Sasidharan <asasidharan@marvell.com>,
Anoob Joseph <anoobj@marvell.com>,
Vidya Sagar Velumuri <vvelumuri@marvell.com>, <dev@dpdk.org>
Subject: [PATCH 4/6] crypto/cnxk: fail Rx inject configure if not supported
Date: Tue, 27 May 2025 09:30:34 +0530 [thread overview]
Message-ID: <20250527040036.2280893-5-ktejasree@marvell.com> (raw)
In-Reply-To: <20250527040036.2280893-1-ktejasree@marvell.com>
From: Aakash Sasidharan <asasidharan@marvell.com>
Rx inject is supported only with CPT05 microcode version.
sg_ver2 indicates if CPT05 is loaded. Fail the rx inject
configuration with ENOTSUP error if sg_ver2 is not supported.
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
---
drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
index 851e6f0a88..947f50b4c8 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
@@ -1981,6 +1981,7 @@ cn10k_cryptodev_sec_rx_inject_configure(void *device, uint16_t port_id, bool ena
{
struct rte_cryptodev *crypto_dev = device;
struct rte_eth_dev *eth_dev;
+ struct cnxk_cpt_vf *vf;
int ret;
if (!rte_eth_dev_is_valid_port(port_id))
@@ -1989,6 +1990,11 @@ cn10k_cryptodev_sec_rx_inject_configure(void *device, uint16_t port_id, bool ena
if (!(crypto_dev->feature_flags & RTE_CRYPTODEV_FF_SECURITY_RX_INJECT))
return -ENOTSUP;
+ /* Rx Inject is supported only with CPT05. sg_ver2 indicates that CPT05 is loaded */
+ vf = crypto_dev->data->dev_private;
+ if (!(vf->cpt.hw_caps[CPT_ENG_TYPE_SE].sg_ver2 && vf->cpt.hw_caps[CPT_ENG_TYPE_IE].sg_ver2))
+ return -ENOTSUP;
+
eth_dev = &rte_eth_devices[port_id];
ret = strncmp(eth_dev->device->driver->name, "net_cn10k", 8);
--
2.25.1
next prev parent reply other threads:[~2025-05-27 4:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 4:00 [PATCH 0/6] fixes and improvements to cnxk crypto PMD Tejasree Kondoj
2025-05-27 4:00 ` [PATCH 1/6] crypto/cnxk: update the sg list population Tejasree Kondoj
2025-05-27 4:00 ` [PATCH 2/6] crypto/cnxk: add lookaside IPsec CPT LF stats Tejasree Kondoj
2025-05-27 4:00 ` [PATCH 3/6] crypto/cnxk: fix qp stats PMD API Tejasree Kondoj
2025-05-27 4:00 ` Tejasree Kondoj [this message]
2025-05-27 4:00 ` [PATCH 5/6] crypto/cnxk: add check for max supported gather entries Tejasree Kondoj
2025-05-27 4:00 ` [PATCH 6/6] crypto/cnxk: enable IV from application support Tejasree Kondoj
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=20250527040036.2280893-5-ktejasree@marvell.com \
--to=ktejasree@marvell.com \
--cc=anoobj@marvell.com \
--cc=asasidharan@marvell.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=vvelumuri@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).