From: Akhil Goyal <akhil.goyal@nxp.com>
To: Radu Nicolau <radu.nicolau@intel.com>, <dev@dpdk.org>
Cc: <konstantin.ananyev@intel.com>, <ferruh.yigit@intel.com>,
<sergio.gonzalez.monroy@intel.com>,
<pablo.de.lara.guarch@intel.com>, <declan.doherty@intel.com>
Subject: Re: [dpdk-dev] [PATCH 1/3] lib/librte_security: added get size
Date: Mon, 8 Jan 2018 16:58:37 +0530 [thread overview]
Message-ID: <92a56e18-5af4-8154-6fa1-13deacfa4933@nxp.com> (raw)
In-Reply-To: <1513083027-11741-1-git-send-email-radu.nicolau@intel.com>
On 12/12/2017 6:20 PM, Radu Nicolau wrote:
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> ---
> lib/librte_security/rte_security.c | 7 +++++++
> lib/librte_security/rte_security.h | 12 ++++++++++++
> lib/librte_security/rte_security_driver.h | 14 ++++++++++++++
> lib/librte_security/rte_security_version.map | 1 +
> 4 files changed, 34 insertions(+)
>
> diff --git a/lib/librte_security/rte_security.c b/lib/librte_security/rte_security.c
> index 1227fca..56f2345 100644
> --- a/lib/librte_security/rte_security.c
> +++ b/lib/librte_security/rte_security.c
> @@ -70,6 +70,13 @@ rte_security_session_update(struct rte_security_ctx *instance,
> return instance->ops->session_update(instance->device, sess, conf);
> }
>
> +unsigned int
> +rte_security_session_get_size(struct rte_security_ctx *instance)
> +{
> + RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->session_get_size, 0);
> + return instance->ops->session_get_size(instance->device);
> +}
> +
> int
> rte_security_session_stats_get(struct rte_security_ctx *instance,
> struct rte_security_session *sess,
> diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h
> index 653929b..2c5429f 100644
> --- a/lib/librte_security/rte_security.h
> +++ b/lib/librte_security/rte_security.h
> @@ -312,6 +312,18 @@ rte_security_session_update(struct rte_security_ctx *instance,
> struct rte_security_session_conf *conf);
>
> /**
> + * Get the size of the security session data for a device.
> + *
> + * @param instance security instance.
> + *
> + * @return
> + * - Size of the private data, if successful
> + * - 0 if device is invalid or does not support the operation.
> + */
> +unsigned int
> +rte_security_session_get_size(struct rte_security_ctx *instance);
> +
> +/**
> * Free security session header and the session private data and
> * return it to its original mempool.
> *
> diff --git a/lib/librte_security/rte_security_driver.h b/lib/librte_security/rte_security_driver.h
> index 997fbe7..3839d45 100644
> --- a/lib/librte_security/rte_security_driver.h
> +++ b/lib/librte_security/rte_security_driver.h
> @@ -91,6 +91,18 @@ typedef int (*security_session_destroy_t)(void *device,
> typedef int (*security_session_update_t)(void *device,
> struct rte_security_session *sess,
> struct rte_security_session_conf *conf);
> +
> +/**
> + * Get the size of a security session
> + *
> + * @param device Crypto/eth device pointer
> + *
> + * @return
> + * - On success returns the size of the session structure for device
> + * - On failure returns 0
> + */
> +typedef int (*security_session_get_size)(void *device);
I believe this should be unsigned int.
For rest of the patch Acked.
next prev parent reply other threads:[~2018-01-08 11:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-12 12:50 Radu Nicolau
2017-12-12 12:50 ` [dpdk-dev] [PATCH 2/3] net/ixgbe: implemented security session " Radu Nicolau
2018-01-08 10:15 ` De Lara Guarch, Pablo
2018-01-15 10:27 ` Radu Nicolau
2017-12-12 12:50 ` [dpdk-dev] [PATCH 3/3] examples/ipsec_secgw: create session mempools for ethdevs Radu Nicolau
2018-01-08 11:03 ` De Lara Guarch, Pablo
2018-01-15 10:41 ` Radu Nicolau
2018-01-08 10:14 ` [dpdk-dev] [PATCH 1/3] lib/librte_security: added get size De Lara Guarch, Pablo
2018-01-08 11:28 ` Akhil Goyal [this message]
2018-01-15 10:39 ` [dpdk-dev] [PATCH v2 1/3] security: add get session size function Radu Nicolau
2018-01-15 10:39 ` [dpdk-dev] [PATCH v2 2/3] net/ixgbe: implement security session get size Radu Nicolau
2018-01-15 10:39 ` [dpdk-dev] [PATCH v2 3/3] examples/ipsec_secgw: create session mempools for ethdevs Radu Nicolau
2018-01-18 9:58 ` Akhil Goyal
2018-01-18 15:11 ` De Lara Guarch, Pablo
2018-01-18 15:18 ` Nicolau, Radu
2018-01-18 15:41 ` [dpdk-dev] [PATCH v3 1/3] security: add get session size function Radu Nicolau
2018-01-18 15:41 ` [dpdk-dev] [PATCH v3 2/3] net/ixgbe: implement security session get size Radu Nicolau
2018-01-18 15:41 ` [dpdk-dev] [PATCH v3 3/3] examples/ipsec_secgw: create session mempools for ethdevs Radu Nicolau
2018-01-19 8:55 ` [dpdk-dev] [PATCH v3 1/3] security: add get session size function De Lara Guarch, Pablo
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=92a56e18-5af4-8154-6fa1-13deacfa4933@nxp.com \
--to=akhil.goyal@nxp.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=konstantin.ananyev@intel.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=radu.nicolau@intel.com \
--cc=sergio.gonzalez.monroy@intel.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).