[dpdk-dev] [PATCH] crypto: recognize OP_TYPE_UNDEFINED in rte_crypto_op_pool_create

Akhil Goyal akhil.goyal at nxp.com
Tue Oct 9 12:50:49 CEST 2018


Hi  Junxiao,

On 10/3/2018 12:35 AM, Junxiao Shi wrote:
> Signed-off-by: Junxiao Shi <git at mail1.yoursunny.com>
> ---
>   lib/librte_cryptodev/rte_cryptodev.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
> index 63ae23f..3d6f474 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.c
> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> @@ -1477,6 +1477,8 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type,
>   		elt_size += sizeof(struct rte_crypto_sym_op);
>   	} else if (type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC) {
>   		elt_size += sizeof(struct rte_crypto_asym_op);
> +	} else if (type == RTE_CRYPTO_OP_TYPE_UNDEFINED) {
> +		elt_size += RTE_MAX(sizeof(struct rte_crypto_sym_op), sizeof(struct rte_crypto_asym_op));
>   	} else {
>   		CDEV_LOG_ERR("Invalid op_type\n");
>   		return NULL;
Could you please explain the need for this change. If there is some type 
which is missing, we can add that.
defining the size of undefined op type does not make sense.

-Akhil


More information about the dev mailing list