port_cparams[i].aad.phys_addr = options->aad.phys_addr;
if (!options->aad_param)
generate_random_key(port_cparams[i].aad.data,
- sizeof(port_cparams[i].aad.length));
+ port_cparams[i].aad.length);
}
port_cparams[i].iv.phys_addr = options->iv.phys_addr;
if (!options->iv_param)
generate_random_key(port_cparams[i].iv.data,
- sizeof(port_cparams[i].iv.length));
+ port_cparams[i].iv.length);
port_cparams[i].cipher_algo = options->cipher_xform.cipher.algo;
}
printf("%s [EAL options] --\n"
" -p PORTMASK: hexadecimal bitmask of ports to configure\n"
" -q NQ: number of queue (=ports) per lcore (default is 1)\n"
- " -s manage all ports from single lcore"
- " -t PERIOD: statistics will be refreshed each PERIOD seconds"
+ " -s manage all ports from single lcore\n"
+ " -T PERIOD: statistics will be refreshed each PERIOD seconds"
" (0 to disable, 10 default, 86400 maximum)\n"
" --cdev_type HW / SW / ANY\n"
} else if (strcmp("AES_GCM", optarg) == 0) {
*algo = RTE_CRYPTO_CIPHER_AES_GCM;
return 0;
+ } else if (strcmp("NULL", optarg) == 0) {
+ *algo = RTE_CRYPTO_CIPHER_NULL;
+ return 0;
} else if (strcmp("SNOW3G_UEA2", optarg) == 0) {
*algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2;
return 0;
static int
parse_auth_algo(enum rte_crypto_auth_algorithm *algo, char *optarg)
{
- if (strcmp("MD5_HMAC", optarg) == 0) {
+ if (strcmp("AES_GCM", optarg) == 0) {
+ *algo = RTE_CRYPTO_AUTH_AES_GCM;
+ return 0;
+ } else if (strcmp("MD5_HMAC", optarg) == 0) {
*algo = RTE_CRYPTO_AUTH_MD5_HMAC;
return 0;
+ } else if (strcmp("NULL", optarg) == 0) {
+ *algo = RTE_CRYPTO_AUTH_NULL;
+ return 0;
} else if (strcmp("SHA1_HMAC", optarg) == 0) {
*algo = RTE_CRYPTO_AUTH_SHA1_HMAC;
return 0;
{
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);
break;
/* timer period */
- case 't':
+ case 'T':
retval = l2fwd_crypto_parse_timer_period(options,
optarg);
if (retval < 0) {