[dpdk-dev] [PATCH] test/crypto: add operation status checks

Trahe, Fiona fiona.trahe at intel.com
Fri Dec 20 13:38:33 CET 2019


Hi Adam,


> -----Original Message-----
> From: Dybkowski, AdamX <adamx.dybkowski at intel.com>
> Sent: Friday, December 20, 2019 11:50 AM
> To: dev at dpdk.org; Trahe, Fiona <fiona.trahe at intel.com>; akhil.goyal at nxp.com; Doherty, Declan
> <declan.doherty at intel.com>
> Cc: Dybkowski, AdamX <adamx.dybkowski at intel.com>
> Subject: [PATCH] test/crypto: add operation status checks
> 
> This patch adds checking of the symmetric crypto operation status
> that was silently skipped before. It fixes the wireless algorithms
> session creation (SNOW3G, KASUMI, ZUC) and passing of the digest
> data for the verification by PMD.
> 
[Fiona] This should be marked as a fix for backporting

> Signed-off-by: Adam Dybkowski <adamx.dybkowski at intel.com>
> ---
>  app/test/test_cryptodev.c | 96 +++++++++++++++++++++------------------
>  1 file changed, 52 insertions(+), 44 deletions(-)
> 
> diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
> index 1b561456d..241a1f97a 100644
> --- a/app/test/test_cryptodev.c
> +++ b/app/test/test_cryptodev.c
> @@ -143,7 +143,7 @@ static struct rte_crypto_op *
>  process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op)
>  {
>  	if (rte_cryptodev_enqueue_burst(dev_id, 0, &op, 1) != 1) {
> -		printf("Error sending packet for encryption");
> +		printf("Error sending packet for encryption\n");
[Fiona] Can you replace this with RTE_LOG while you're modifying it please

>  		return NULL;
>  	}
> 
> @@ -152,6 +152,11 @@ process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op)
>  	while (rte_cryptodev_dequeue_burst(dev_id, 0, &op, 1) == 0)
>  		rte_pause();
> 
> +	if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
> +		RTE_LOG(DEBUG, USER1, "Operation status %d\n", op->status);
> +		return NULL;
> +	}
> +
[Fiona] are there any negative tests - e.g. that expect to see an auth verify failure or invalid session -
that would be affected by this? If so should the actual status be returned?


More information about the dev mailing list