summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPablo de Lara <pablo.de.lara.guarch@intel.com>2016-03-22 21:24:00 +0000
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-03-24 20:53:40 +0100
commit3d6e4bcf51cbfff1b0d40157a71cdbb0d97991a5 (patch)
tree5aa2cf9d875013188b915611cb84f1397633d249 /examples
parentd29ea843932f91a1affbd7faffae99aeaf72c991 (diff)
downloaddpdk-3d6e4bcf51cbfff1b0d40157a71cdbb0d97991a5.zip
dpdk-3d6e4bcf51cbfff1b0d40157a71cdbb0d97991a5.tar.gz
dpdk-3d6e4bcf51cbfff1b0d40157a71cdbb0d97991a5.tar.xz
examples/l2fwd-crypto: add AES-GCM algorithm
AES GCM is an algorithm for both ciphering and authentication, but the authentication algorithm was missing in the list of supported algorithms that can be passed from command line. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/l2fwd-crypto/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 2722b0d..c209b42 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -910,7 +910,10 @@ parse_key(uint8_t *data, char *input_arg)
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("SHA1_HMAC", optarg) == 0) {