From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 2C87E58D4 for ; Thu, 29 Sep 2016 17:44:27 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP; 29 Sep 2016 08:44:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,415,1470726000"; d="scan'208";a="14587606" Received: from sie-lab-212-109.ir.intel.com (HELO silpixa00389029.ir.intel.com) ([10.237.212.109]) by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2016 08:44:22 -0700 From: Sergio Gonzalez Monroy To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com Date: Thu, 29 Sep 2016 16:44:10 +0100 Message-Id: <1475163857-142366-5-git-send-email-sergio.gonzalez.monroy@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1475163857-142366-1-git-send-email-sergio.gonzalez.monroy@intel.com> References: <1474616734-118291-1-git-send-email-sergio.gonzalez.monroy@intel.com> <1475163857-142366-1-git-send-email-sergio.gonzalez.monroy@intel.com> Subject: [dpdk-dev] [PATCH v3 4/9] examples/ipsec-secgw: enable AES-CTR mode 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: Thu, 29 Sep 2016 15:44:30 -0000 RFC3686: Using AES Counter (CTR) Mode With IPsec ESP.` Signed-off-by: Sergio Gonzalez Monroy --- examples/ipsec-secgw/esp.c | 2 ++ examples/ipsec-secgw/sa.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/examples/ipsec-secgw/esp.c b/examples/ipsec-secgw/esp.c index 7ee53da..ec5a2e6 100644 --- a/examples/ipsec-secgw/esp.c +++ b/examples/ipsec-secgw/esp.c @@ -102,6 +102,7 @@ esp_inbound(struct rte_mbuf *m, struct ipsec_sa *sa, ip_hdr_len + sizeof(struct esp_hdr)); sym_cop->cipher.iv.length = sa->iv_len; break; + case RTE_CRYPTO_CIPHER_AES_CTR: case RTE_CRYPTO_CIPHER_AES_GCM: icb = get_cnt_blk(m); icb->salt = sa->salt; @@ -320,6 +321,7 @@ esp_outbound(struct rte_mbuf *m, struct ipsec_sa *sa, sizeof(struct esp_hdr); sym_cop->cipher.data.length = pad_payload_len + sa->iv_len; break; + case RTE_CRYPTO_CIPHER_AES_CTR: case RTE_CRYPTO_CIPHER_AES_GCM: *iv = sa->seq; sym_cop->cipher.data.offset = ip_hdr_len + diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c index d5ad5af..00c8cce 100644 --- a/examples/ipsec-secgw/sa.c +++ b/examples/ipsec-secgw/sa.c @@ -88,6 +88,13 @@ const struct supported_cipher_algo cipher_algos[] = { .iv_len = 8, .block_size = 4, .key_len = 16 + }, + { + .keyword = "aes-128-ctr", + .algo = RTE_CRYPTO_CIPHER_AES_CTR, + .iv_len = 8, + .block_size = 16, /* XXX AESNI MB limition, should be 4 */ + .key_len = 16 } }; -- 2.5.5