[dpdk-dev] [PATCH] examples/vhost_crypto: fix parsing

Maxime Coquelin maxime.coquelin at redhat.com
Tue Apr 10 11:40:32 CEST 2018



On 04/09/2018 07:57 PM, Fan Zhang wrote:
> Fixes: 2ce5bd8c442d ("examples/vhost_crypto: add vhost crypto sample application")
> 
> This patch fixes the parsing of cryptodev id in the cmdline.
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang at intel.com>
> ---
>   examples/vhost_crypto/main.c | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
> index bc867240d..860200e29 100644
> --- a/examples/vhost_crypto/main.c
> +++ b/examples/vhost_crypto/main.c
> @@ -95,11 +95,6 @@ parse_cryptodev_id(const char *q_arg)
>   
>   	/* parse decimal string */
>   	pm = strtoul(q_arg, &end, 10);
> -	if ((pm == '\0') || (end == NULL) || (*end != '\0')) {
> -		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
> -		return -1;
> -	}
> -
>   	if (pm > rte_cryptodev_count()) {
>   		RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg);
>   		return -1;
> 

Acked-by: Maxime Coquelin <maxime.coquelin at redhat.com>

I'll squash it with faulty commit if not yet merged by Ferruh.

Thanks,
Maxime


More information about the dev mailing list