[dpdk-dev] [EXT] [dpdk-dev v3 08/10] crypto/qat: add gen specific data and function

Akhil Goyal gakhil at marvell.com
Sat Oct 16 13:46:15 CEST 2021


> +/* Macro to add a capability */
> +#define QAT_SYM_PLAIN_AUTH_CAP(n, b, d)

Can you add a comment for each of the defines, specifying what these
 variables (n,b,d,k,a,I etc)depict.
> 	\
> +	{								\
> +		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
> 	\
> +		{.sym = {						\
> +			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
> 	\
> +			{.auth = {					\
> +				.algo = RTE_CRYPTO_AUTH_##n,
> 	\
> +				b, d					\
> +			}, }						\
> +		}, }							\
> +	}
> +
> +#define QAT_SYM_AUTH_CAP(n, b, k, d, a, i)				\
> +	{								\
> +		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
> 	\
> +		{.sym = {						\
> +			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
> 	\
> +			{.auth = {					\
> +				.algo = RTE_CRYPTO_AUTH_##n,
> 	\
> +				b, k, d, a, i				\
> +			}, }						\
> +		}, }							\
> +	}
> +
> +#define QAT_SYM_AEAD_CAP(n, b, k, d, a, i)				\
> +	{								\
> +		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
> 	\
> +		{.sym = {						\
> +			.xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,
> 	\
> +			{.aead = {					\
> +				.algo = RTE_CRYPTO_AEAD_##n,
> 	\
> +				b, k, d, a, i				\
> +			}, }						\
> +		}, }							\
> +	}
> +
> +#define QAT_SYM_CIPHER_CAP(n, b, k, i)
> 	\
> +	{								\
> +		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
> 	\
> +		{.sym = {						\
> +			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
> 	\
> +			{.cipher = {					\
> +				.algo = RTE_CRYPTO_CIPHER_##n,
> 	\
> +				b, k, i					\
> +			}, }						\
> +		}, }							\
> +	}
> +
>  extern uint8_t qat_sym_driver_id;
> 
> +extern struct qat_crypto_gen_dev_ops qat_sym_gen_dev_ops[];
> +
>  int
>  qat_sym_dev_create(struct qat_pci_device *qat_pci_dev,
>  		struct qat_dev_cmd_param *qat_dev_cmd_param);
> --
> 2.25.1



More information about the dev mailing list