[PATCH v3 3/7] crypto/octeontx: use new API for event metadata

Gujjar, Abhinandan S abhinandan.gujjar at intel.com
Sun May 1 15:18:50 CEST 2022


Acked-by: Abhinandan Gujjar <Abhinandan.gujjar at intel.com>

> -----Original Message-----
> From: Akhil Goyal <gakhil at marvell.com>
> Sent: Thursday, April 21, 2022 8:07 PM
> To: dev at dpdk.org
> Cc: anoobj at marvell.com; jerinj at marvell.com; Gujjar, Abhinandan S
> <abhinandan.gujjar at intel.com>; Jayatheerthan, Jay
> <jay.jayatheerthan at intel.com>; Vangati, Narender
> <narender.vangati at intel.com>; vfialko at marvell.com; Akhil Goyal
> <gakhil at marvell.com>
> Subject: [PATCH v3 3/7] crypto/octeontx: use new API for event metadata
> 
> For getting event crypto metadata from crypto_op, the new API
> rte_cryptodev_get_session_event_mdata can be used directly instead of
> getting userdata inside PMD.
> 
> Signed-off-by: Akhil Goyal <gakhil at marvell.com>
> ---
>  drivers/crypto/octeontx/otx_cryptodev_ops.c | 20 +-------------------
>  1 file changed, 1 insertion(+), 19 deletions(-)
> 
> diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c
> b/drivers/crypto/octeontx/otx_cryptodev_ops.c
> index ddb1266c3c..d5851d9987 100644
> --- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
> +++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
> @@ -684,24 +684,6 @@ submit_request_to_sso(struct ssows *ws, uintptr_t
> req,
>  	ssovf_store_pair(add_work, req, ws->grps[rsp_info->queue_id]);  }
> 
> -static inline union rte_event_crypto_metadata * -
> get_event_crypto_mdata(struct rte_crypto_op *op) -{
> -	union rte_event_crypto_metadata *ec_mdata;
> -
> -	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
> -		ec_mdata = rte_cryptodev_sym_session_get_user_data(
> -							   op->sym->session);
> -	else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS &&
> -		 op->private_data_offset)
> -		ec_mdata = (union rte_event_crypto_metadata *)
> -			((uint8_t *)op + op->private_data_offset);
> -	else
> -		return NULL;
> -
> -	return ec_mdata;
> -}
> -
>  uint16_t __rte_hot
>  otx_crypto_adapter_enqueue(void *port, struct rte_crypto_op *op)  { @@ -
> 712,7 +694,7 @@ otx_crypto_adapter_enqueue(void *port, struct
> rte_crypto_op *op)
>  	uint8_t op_type, cdev_id;
>  	uint16_t qp_id;
> 
> -	ec_mdata = get_event_crypto_mdata(op);
> +	ec_mdata = rte_cryptodev_session_event_mdata_get(op);
>  	if (unlikely(ec_mdata == NULL)) {
>  		rte_errno = EINVAL;
>  		return 0;
> --
> 2.25.1



More information about the dev mailing list