From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 290AD3239 for ; Fri, 11 Mar 2016 01:00:37 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 10 Mar 2016 16:00:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,317,1455004800"; d="scan'208";a="63916652" Received: from sie-lab-212-116.ir.intel.com ([10.237.212.116]) by fmsmga004.fm.intel.com with ESMTP; 10 Mar 2016 16:00:36 -0800 From: Pablo de Lara To: dev@dpdk.org Date: Fri, 11 Mar 2016 00:02:47 +0000 Message-Id: <1457654571-17432-3-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1457654571-17432-1-git-send-email-pablo.de.lara.guarch@intel.com> References: <1457654571-17432-1-git-send-email-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH 2/6] l2fwd-crypto: update auth algo list X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2016 00:00:39 -0000 Updated authentication algorithm list: - Added MD5_HMAC and SHA384_HMAC - Removed SHA1, SHA224, SHA256 Signed-off-by: Pablo de Lara --- examples/l2fwd-crypto/main.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 12854e3..d1e05d9 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; } -- 2.5.0