From: Akhil Goyal <gakhil@marvell.com>
To: <dev@dpdk.org>
Cc: <thomas@monjalon.net>, <david.marchand@redhat.com>,
<hemant.agrawal@nxp.com>, <vattunuru@marvell.com>,
<ferruh.yigit@xilinx.com>, <andrew.rybchenko@oktetlabs.ru>,
<konstantin.v.ananyev@yandex.ru>, <jiawenwu@trustnetic.com>,
<yisen.zhuang@huawei.com>, <irusskikh@marvell.com>,
<jerinj@marvell.com>, <adwivedi@marvell.com>,
<maxime.coquelin@redhat.com>, <chandu@amd.com>,
<ruifeng.wang@arm.com>, <ajit.khaparde@broadcom.com>,
<anoobj@marvell.com>, <pablo.de.lara.guarch@intel.com>,
<matan@nvidia.com>, <g.singh@nxp.com>, <qiming.yang@intel.com>,
<wenjun1.wu@intel.com>, <jianwang@trustnetic.com>,
<jingjing.wu@intel.com>, <beilei.xing@intel.com>,
<ndabilpuram@marvell.com>, <roy.fan.zhang@intel.com>,
Akhil Goyal <gakhil@marvell.com>, Kai Ji <kai.ji@intel.com>,
David Coyle <david.coyle@intel.com>,
Kevin O'Sullivan <kevin.osullivan@intel.com>
Subject: [PATCH v3 5/6] drivers/crypto: support security session get size op
Date: Sat, 24 Sep 2022 22:05:41 +0530 [thread overview]
Message-ID: <20220924163542.4159562-6-gakhil@marvell.com> (raw)
In-Reply-To: <20220924163542.4159562-1-gakhil@marvell.com>
Added the support for rte_security_op.session_get_size()
in all the PMDs which support rte_security sessions and the
op was not supported.
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Tested-by: Gagandeep Singh <g.singh@nxp.com>
Tested-by: David Coyle <david.coyle@intel.com>
Tested-by: Kevin O'Sullivan <kevin.osullivan@intel.com>
---
drivers/crypto/caam_jr/caam_jr.c | 6 ++++++
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 7 +++++++
drivers/crypto/dpaa_sec/dpaa_sec.c | 8 ++++++++
drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 7 +++++++
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 7 +++++++
drivers/crypto/qat/dev/qat_sym_pmd_gen1.c | 1 +
drivers/crypto/qat/qat_sym_session.c | 6 ++++++
drivers/crypto/qat/qat_sym_session.h | 2 ++
8 files changed, 44 insertions(+)
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 7891254d78..a6d3a494e6 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -1937,6 +1937,11 @@ caam_jr_security_session_destroy(void *dev __rte_unused,
return 0;
}
+static unsigned int
+caam_jr_security_session_get_size(void *device __rte_unused)
+{
+ return sizeof(struct caam_jr_session);
+}
static int
caam_jr_dev_configure(struct rte_cryptodev *dev,
@@ -2031,6 +2036,7 @@ static struct rte_cryptodev_ops caam_jr_ops = {
static struct rte_security_ops caam_jr_security_ops = {
.session_create = caam_jr_security_session_create,
.session_update = NULL,
+ .session_get_size = caam_jr_security_session_get_size,
.session_stats_get = NULL,
.session_destroy = caam_jr_security_session_destroy,
.set_pkt_metadata = NULL,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 563ba79418..3c51913dd8 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3733,6 +3733,12 @@ dpaa2_sec_security_session_destroy(void *dev __rte_unused,
}
return 0;
}
+
+static unsigned int
+dpaa2_sec_security_session_get_size(void *device __rte_unused)
+{
+ return sizeof(dpaa2_sec_session);
+}
#endif
static int
dpaa2_sec_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
@@ -4184,6 +4190,7 @@ dpaa2_sec_capabilities_get(void *device __rte_unused)
static const struct rte_security_ops dpaa2_sec_security_ops = {
.session_create = dpaa2_sec_security_session_create,
.session_update = NULL,
+ .session_get_size = dpaa2_sec_security_session_get_size,
.session_stats_get = NULL,
.session_destroy = dpaa2_sec_security_session_destroy,
.set_pkt_metadata = NULL,
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index c2216987ca..72b848fd49 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -3289,6 +3289,13 @@ dpaa_sec_security_session_destroy(void *dev __rte_unused,
}
return 0;
}
+
+static unsigned int
+dpaa_sec_security_session_get_size(void *device __rte_unused)
+{
+ return sizeof(dpaa_sec_session);
+}
+
#endif
static int
dpaa_sec_dev_configure(struct rte_cryptodev *dev __rte_unused,
@@ -3547,6 +3554,7 @@ dpaa_sec_capabilities_get(void *device __rte_unused)
static const struct rte_security_ops dpaa_sec_security_ops = {
.session_create = dpaa_sec_security_session_create,
.session_update = NULL,
+ .session_get_size = dpaa_sec_security_session_get_size,
.session_stats_get = NULL,
.session_destroy = dpaa_sec_security_session_destroy,
.set_pkt_metadata = NULL,
diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
index 76cb1c543a..fc9ee01124 100644
--- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
@@ -2130,6 +2130,12 @@ aesni_mb_pmd_sec_sess_destroy(void *dev __rte_unused,
return 0;
}
+static unsigned int
+aesni_mb_pmd_sec_sess_get_size(void *device __rte_unused)
+{
+ return sizeof(struct aesni_mb_session);
+}
+
/** Get security capabilities for aesni multi-buffer */
static const struct rte_security_capability *
aesni_mb_pmd_sec_capa_get(void *device __rte_unused)
@@ -2140,6 +2146,7 @@ aesni_mb_pmd_sec_capa_get(void *device __rte_unused)
static struct rte_security_ops aesni_mb_pmd_sec_ops = {
.session_create = aesni_mb_pmd_sec_sess_create,
.session_update = NULL,
+ .session_get_size = aesni_mb_pmd_sec_sess_get_size,
.session_stats_get = NULL,
.session_destroy = aesni_mb_pmd_sec_sess_destroy,
.set_pkt_metadata = NULL,
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 98a5d7ee2f..c6e9ab03fe 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -907,6 +907,12 @@ mrvl_crypto_pmd_security_session_destroy(void *dev __rte_unused,
return 0;
}
+static unsigned int
+mrvl_crypto_pmd_security_session_create(void *device __rte_unused)
+{
+ return sizeof(struct mrvl_crypto_session);
+}
+
static const
struct rte_security_capability mrvl_crypto_pmd_sec_security_cap[] = {
{ /* IPsec Lookaside Protocol offload ESP Tunnel Egress */
@@ -971,6 +977,7 @@ mrvl_crypto_pmd_security_capabilities_get(void *device __rte_unused)
struct rte_security_ops mrvl_sec_security_pmd_ops = {
.session_create = mrvl_crypto_pmd_security_session_create,
.session_update = NULL,
+ .session_get_size = mrvl_crypto_pmd_security_session_get_size,
.session_stats_get = NULL,
.session_destroy = mrvl_crypto_pmd_security_session_destroy,
.set_pkt_metadata = NULL,
diff --git a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
index 99f5a22a06..462c1a722f 100644
--- a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
+++ b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
@@ -428,6 +428,7 @@ qat_security_cap_get_gen1(void *dev __rte_unused)
struct rte_security_ops security_qat_ops_gen1 = {
.session_create = qat_security_session_create,
.session_update = NULL,
+ .session_get_size = qat_security_session_get_size,
.session_stats_get = NULL,
.session_destroy = qat_security_session_destroy,
.set_pkt_metadata = NULL,
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 7ff3aff4d3..dce185d424 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -2641,4 +2641,10 @@ qat_security_session_destroy(void *dev __rte_unused,
# endif
return 0;
}
+
+unsigned int
+qat_security_session_get_size(void *device __rte_unused)
+{
+ return sizeof(struct qat_sym_session);
+}
#endif
diff --git a/drivers/crypto/qat/qat_sym_session.h b/drivers/crypto/qat/qat_sym_session.h
index ac57e0b240..6322d7e3bc 100644
--- a/drivers/crypto/qat/qat_sym_session.h
+++ b/drivers/crypto/qat/qat_sym_session.h
@@ -180,6 +180,8 @@ qat_security_session_create(void *dev, struct rte_security_session_conf *conf,
struct rte_security_session *sess);
int
qat_security_session_destroy(void *dev, struct rte_security_session *sess);
+unsigned int
+qat_security_session_get_size(void *dev __rte_unused);
#endif
#endif /* _QAT_SYM_SESSION_H_ */
--
2.25.1
next prev parent reply other threads:[~2022-09-24 16:36 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 16:06 [PATCH 0/3] cryptodev: sym session framework rework Fan Zhang
2022-08-29 16:06 ` [PATCH 1/3] cryptodev: rework session framework Fan Zhang
2022-09-15 7:07 ` [EXT] " Akhil Goyal
2022-09-15 7:26 ` Akhil Goyal
2022-08-29 16:06 ` [PATCH 2/3] crypto/scheduler: use unified session Fan Zhang
2022-09-15 7:06 ` [EXT] " Akhil Goyal
2022-09-15 7:23 ` Akhil Goyal
2022-09-18 13:01 ` Akhil Goyal
2022-08-29 16:06 ` [PATCH 3/3] cryptodev: hide sym session structure Fan Zhang
2022-09-18 13:19 ` [EXT] " Akhil Goyal
2022-09-21 15:02 ` [PATCH v2 0/6] crypto/security session framework rework Akhil Goyal
2022-09-21 15:02 ` [PATCH v2 1/6] cryptodev: rework session framework Akhil Goyal
2022-09-22 14:06 ` Ji, Kai
2022-09-21 15:02 ` [PATCH v2 2/6] crypto/scheduler: use unified session Akhil Goyal
2022-09-22 14:04 ` Ji, Kai
2022-09-21 15:02 ` [PATCH v2 3/6] cryptodev: hide sym session structure Akhil Goyal
2022-09-22 13:49 ` Ji, Kai
2022-09-21 15:02 ` [PATCH v2 4/6] security: remove priv mempool usage Akhil Goyal
2022-09-21 15:02 ` [PATCH v2 5/6] drivers/crypto: support security session get size op Akhil Goyal
2022-09-22 13:52 ` Ji, Kai
2022-09-21 15:02 ` [PATCH v2 6/6] security: hide session structure Akhil Goyal
2022-09-21 15:11 ` [PATCH v2 0/6] crypto/security session framework rework Akhil Goyal
2022-09-23 13:00 ` Coyle, David
2022-09-23 9:29 ` Gagandeep Singh
2022-09-24 16:35 ` [PATCH v3 " Akhil Goyal
2022-09-24 16:35 ` [PATCH v3 1/6] cryptodev: rework session framework Akhil Goyal
2022-09-24 16:35 ` [PATCH v3 2/6] crypto/scheduler: use unified session Akhil Goyal
2022-09-24 16:35 ` [PATCH v3 3/6] cryptodev: hide sym session structure Akhil Goyal
2022-09-24 16:35 ` [PATCH v3 4/6] security: remove priv mempool usage Akhil Goyal
2022-09-24 16:35 ` Akhil Goyal [this message]
2022-09-24 16:35 ` [PATCH v3 6/6] security: hide session structure Akhil Goyal
2022-09-24 16:39 ` [PATCH v3 0/6] crypto/security session framework rework Akhil Goyal
2022-09-26 10:09 ` Ruifeng Wang
2022-09-26 10:12 ` Akhil Goyal
2022-09-26 19:14 ` [PATCH v4 " Akhil Goyal
2022-09-26 19:14 ` [PATCH v4 1/6] cryptodev: rework session framework Akhil Goyal
2022-09-26 19:14 ` [PATCH v4 2/6] crypto/scheduler: use unified session Akhil Goyal
2022-09-27 11:03 ` Ji, Kai
2022-09-27 19:25 ` Akhil Goyal
2022-09-28 12:56 ` Akhil Goyal
2022-09-28 15:29 ` Ji, Kai
2022-09-26 19:14 ` [PATCH v4 3/6] cryptodev: hide sym session structure Akhil Goyal
2022-09-26 19:14 ` [PATCH v4 4/6] security: remove priv mempool usage Akhil Goyal
2022-09-26 19:14 ` [PATCH v4 5/6] drivers/crypto: support security session get size op Akhil Goyal
2022-09-26 19:14 ` [PATCH v4 6/6] security: hide session structure Akhil Goyal
2022-09-26 19:23 ` [PATCH v4 0/6] crypto/security session framework rework Akhil Goyal
2022-09-27 3:27 ` Ruifeng Wang
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=20220924163542.4159562-6-gakhil@marvell.com \
--to=gakhil@marvell.com \
--cc=adwivedi@marvell.com \
--cc=ajit.khaparde@broadcom.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=anoobj@marvell.com \
--cc=beilei.xing@intel.com \
--cc=chandu@amd.com \
--cc=david.coyle@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@xilinx.com \
--cc=g.singh@nxp.com \
--cc=hemant.agrawal@nxp.com \
--cc=irusskikh@marvell.com \
--cc=jerinj@marvell.com \
--cc=jianwang@trustnetic.com \
--cc=jiawenwu@trustnetic.com \
--cc=jingjing.wu@intel.com \
--cc=kai.ji@intel.com \
--cc=kevin.osullivan@intel.com \
--cc=konstantin.v.ananyev@yandex.ru \
--cc=matan@nvidia.com \
--cc=maxime.coquelin@redhat.com \
--cc=ndabilpuram@marvell.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=qiming.yang@intel.com \
--cc=roy.fan.zhang@intel.com \
--cc=ruifeng.wang@arm.com \
--cc=thomas@monjalon.net \
--cc=vattunuru@marvell.com \
--cc=wenjun1.wu@intel.com \
--cc=yisen.zhuang@huawei.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).