From: Pablo de Lara Date: Fri, 11 Mar 2016 00:02:47 +0000 (+0000) Subject: examples/l2fwd-crypto: update auth algo list X-Git-Tag: spdx-start~7486 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ef120cbc80ec8300afddd3a112d6fca23bdb0edc;p=dpdk.git examples/l2fwd-crypto: update auth algo list Updated authentication algorithm list: - Added MD5_HMAC and SHA384_HMAC - Removed SHA1, SHA224, SHA256 Signed-off-by: Pablo de Lara Tested-by: Min Cao Acked-by: Sergio Gonzalez Monroy --- diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 12854e383b..d1e05d96f0 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -773,29 +773,23 @@ parse_key(struct l2fwd_key *key __rte_unused, static int parse_auth_algo(enum rte_crypto_auth_algorithm *algo, char *optarg) { - if (strcmp("SHA1", optarg) == 0) { - *algo = RTE_CRYPTO_AUTH_SHA1; + if (strcmp("MD5_HMAC", optarg) == 0) { + *algo = RTE_CRYPTO_AUTH_MD5_HMAC; return 0; } else if (strcmp("SHA1_HMAC", optarg) == 0) { *algo = RTE_CRYPTO_AUTH_SHA1_HMAC; return 0; - } else if (strcmp("SHA224", optarg) == 0) { - *algo = RTE_CRYPTO_AUTH_SHA224; - return 0; } else if (strcmp("SHA224_HMAC", optarg) == 0) { *algo = RTE_CRYPTO_AUTH_SHA224_HMAC; return 0; - } else if (strcmp("SHA256", optarg) == 0) { - *algo = RTE_CRYPTO_AUTH_SHA256; - return 0; } else if (strcmp("SHA256_HMAC", optarg) == 0) { *algo = RTE_CRYPTO_AUTH_SHA256_HMAC; return 0; - } else if (strcmp("SHA512", optarg) == 0) { - *algo = RTE_CRYPTO_AUTH_SHA256; + } else if (strcmp("SHA384_HMAC", optarg) == 0) { + *algo = RTE_CRYPTO_AUTH_SHA384_HMAC; return 0; } else if (strcmp("SHA512_HMAC", optarg) == 0) { - *algo = RTE_CRYPTO_AUTH_SHA256_HMAC; + *algo = RTE_CRYPTO_AUTH_SHA512_HMAC; return 0; }