From patchwork Thu Feb 23 15:43:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejasree Kondoj X-Patchwork-Id: 124472 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 39BA941D52; Thu, 23 Feb 2023 16:43:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C15CB40ED5; Thu, 23 Feb 2023 16:43:13 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id EB82D40DFD for ; Thu, 23 Feb 2023 16:43:11 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31NFRnhQ031237; Thu, 23 Feb 2023 07:43:11 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=bUz5DOy5QTJIUx21xEjgSImd55ejnpmq6Mj1o75DuU4=; b=aMXWRqxCfKB/LhXxmsDmKPEJ7c+WIzKHk4ZWYDFisY2AegSmp7P0gw1h4KUPsc4WadYk 61+/d8i+3RtC1MTb3ycumpU1FyK9kREcJyKQpCHk9uSIF8R1r1VU8QV1FiXwsawSsmln LO71a02lRsg+nReO7bN9ud1+g+dKEoPkOAjUFFOAyL5P5xXDdWdSRi6wRI1yag5RB8P0 LRGmBS3mpz4Ab09SHMifTCmnBBcPGzyq/6AVLAdfrWrx5rnLc5LrhIDhLCl253T2AQ8Y tgnmoJiEy/3B+3cdngCmGmdQiIKif6+JiWnrB/xk9dby9kxWvawGJsVC8uPpFYM52765 AQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3nwy5h1tsb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 23 Feb 2023 07:43:10 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 23 Feb 2023 07:43:09 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Thu, 23 Feb 2023 07:43:09 -0800 Received: from hyd1554.marvell.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id 74C3E3F708C; Thu, 23 Feb 2023 07:43:07 -0800 (PST) From: Tejasree Kondoj To: Akhil Goyal , Radu Nicolau CC: Anoob Joseph , Subject: [PATCH v3] examples/ipsec-secgw: set AES-CTR IV length to 16 Date: Thu, 23 Feb 2023 21:13:06 +0530 Message-ID: <20230223154306.2807523-1-ktejasree@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221215054211.1919093-1-ktejasree@marvell.com> References: <20221215054211.1919093-1-ktejasree@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: jforgnZALOY8ZkEYmLkXR1mvZMPYsO4P X-Proofpoint-ORIG-GUID: jforgnZALOY8ZkEYmLkXR1mvZMPYsO4P X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-23_10,2023-02-23_01,2023-02-09_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Set AES-CTR IV length to 16 which includes 8B per packet IV, 4B nonce and 4B counter as populated in datapath. Signed-off-by: Tejasree Kondoj Acked-by: Akhil Goyal --- v3: * Changed IV length in initialization. v2: * Rebased v1 examples/ipsec-secgw/sa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c index 7da9444a7b..eb485e6b2b 100644 --- a/examples/ipsec-secgw/sa.c +++ b/examples/ipsec-secgw/sa.c @@ -96,7 +96,10 @@ const struct supported_cipher_algo cipher_algos[] = { { .keyword = "aes-128-ctr", .algo = RTE_CRYPTO_CIPHER_AES_CTR, - .iv_len = 8, + /* iv_len includes 8B per packet IV, 4B nonce + * and 4B counter + */ + .iv_len = 16, .block_size = 4, .key_len = 20 },