When passing the preferred crypto device type in the command line
parameters, the string (HW/SW/ANY) was not being saved, which is used
for error information to the user.
Fixes:
27cf2d1b18e1 ("examples/l2fwd-crypto: discover capabilities")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
{
int retval;
- if (strcmp(lgopts[option_index].name, "cdev_type") == 0)
- return parse_cryptodev_type(&options->type, optarg);
+ if (strcmp(lgopts[option_index].name, "cdev_type") == 0) {
+ retval = parse_cryptodev_type(&options->type, optarg);
+ if (retval == 0)
+ strcpy(options->string_type, optarg);
+ return retval;
+ }
else if (strcmp(lgopts[option_index].name, "chain") == 0)
return parse_crypto_opt_chain(options, optarg);