From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8744CA00C3; Fri, 13 May 2022 11:54:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A71640E64; Fri, 13 May 2022 11:54:18 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id A7E2940DDE for ; Fri, 13 May 2022 11:54:16 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24D65hiY007613; Fri, 13 May 2022 02:54:15 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2174.outbound.protection.outlook.com [104.47.57.174]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3g0yqwndwg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 May 2022 02:54:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B+lMzZUlYZffH6EpAEyWmo5u8ChWaTI8PvJJoK6but+kdWMlLIeLw/ZQDy/SK2/1iX9M1QGeUI/e4vBUM86/gUU4tn6aN+KMNE6wA5DthWJ0e3cxCJSUjedeSQYdG+/bNg8Mvcozv8azzYiLpElYV2F8+aZrdigDGX7x0NdC/7ziOUF/NzXNkMF6CApsm0wKknKg8rgQN2dMMLSIw6mWOdTYswwGuGFSAH3gGMjliJmfRUbnmwsUgA2uwaFjSeieSwo/WutnXsiYtTfaL3pWoLWOIo9YC76UvCya3GOMQLn7Km0oKzLt7IDM227iw49uI3heOOeRHbSxv/vLPGAjPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=l+8IEd61TOsQi+/2KMi5EvHLkZm32ZElBZ1Q/0XYrRQ=; b=MhBYq0znNLsFWfvB0704ulWHLMbanR4SQPMPj5BGF0B/Ct6GYdCEGbnW7BjWAEugGkv6Tjuom/5Fq7Tf1fzx6Pz6qMM3/SGVO9oyCQEYYGSq8ct/7NDrRbcfG0DG/KmUM3y+7wUcrlGAnVdBYItk8/+1BZy9Ik3+q1YrLGkvHQb+/hXbgq6ECzH8dbr+UztDZ/XxA6kMGlrK5h6L0WZ+WNutsn4RHmZDBYGfPtgoZ/tv2yb8XoWoDYeMb40hKiKyU18/fCcQ/mznsXLmTbjO/uF4K8v89MAn7fWY0ZqORiixvoboV0/wL9CiZzSOH3/zp0dfnnXEjYsaX1bBp3e6cw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l+8IEd61TOsQi+/2KMi5EvHLkZm32ZElBZ1Q/0XYrRQ=; b=O8Skgby5rrysop9Zkc2l9HpbaJjSut5DR8J7fcHX6FNEEOby5tK9Ea8o4pCo3FikdcjUFlHNEQLnR8xxjdW4PzD1a7ia9AdIlwRb9UvsDPxbXyFK50FaKvXXlBscFSJhN/QafhS5vQ5Yb6Bjf1m/uIzn/PBlWqkFqQbln6K7ZgM= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by PH0PR18MB4781.namprd18.prod.outlook.com (2603:10b6:510:ca::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.16; Fri, 13 May 2022 09:54:12 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::9c76:3b01:eb04:db4d]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::9c76:3b01:eb04:db4d%6]) with mapi id 15.20.5250.015; Fri, 13 May 2022 09:54:12 +0000 From: Akhil Goyal To: Gagandeep Singh , "dev@dpdk.org" Subject: RE: [EXT] [PATCH 3/8] examples/ipsec-secgw: support XCBC-MAC/DES-CBC Thread-Topic: [EXT] [PATCH 3/8] examples/ipsec-secgw: support XCBC-MAC/DES-CBC Thread-Index: AQHYWFsOMyGfOp8Ohk6UMeVnHoZFWq0creZw Date: Fri, 13 May 2022 09:54:12 +0000 Message-ID: References: <20220425041423.2232034-1-g.singh@nxp.com> <20220425041423.2232034-3-g.singh@nxp.com> In-Reply-To: <20220425041423.2232034-3-g.singh@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 16bc9097-8b78-458f-5f20-08da34c68898 x-ms-traffictypediagnostic: PH0PR18MB4781:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yMMM4e47fTPiYSxwsX2bpPcycP+gdirV3sYEolV9HqmJQCk0r6S6uUrWAzEM6AR29tRJx4u97R7O/XFRivSi1+PnofksIU25rG/crqBgN8qTxW08SbHYRL7hch864pczEZI3iv+S+WI1rNxUfjo/lY8aFdrBuGL6YpUMvnEghploQvMIU6AXYNSBMSIdzfv1/UfW/vVc9GrlXH+YHI4ysPz0WpdosOji9xdClhAn50e12dTVdEvH5FwnwUJapFH2Z1vmdwP4al8Y+DWsu4Ht6QcJsqZ/OoWSgdWurUc2uPlAV9QHWjuWqf5irjUZj4+bqO/sHpdtCGfCt0EvOzAicJ3JpAOaEUnQyxKAumx4erTt+JU19eX+IL7p/UACYlVhuUdqtdtlzONGhMnfY21I/ffnFtagDQhSquDGlMF2+g22Ph646Pn/9XNaMBvqgz5rK2uXUZgws8Ji5NhcZXKo0UVxuIVB/aC++eFfqMC1OSKhjysy2Qokzan3/FhiO/GOhBbqeO+55eA1Yi141jaiLLBJuSlYgvIWEyn+pPFzuEXtDPFOlQnhpEaTyMKgpGyAsYwAItgvS1qVJcqkF7ndD3l1pIxc+iNYGuhwfVkqYoDFDev8MFdgUAmsc4abVpdzRAeM+rsE04GRPelQ0KMXkTwub5Y8btxb4qhpjBq5gyz9a11jsLUMU9GnlcY61eFk2R7seX3adj2zxcJEwPnwFA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(6506007)(55236004)(26005)(7696005)(83380400001)(2906002)(33656002)(9686003)(55016003)(8936002)(5660300002)(52536014)(38070700005)(38100700002)(64756008)(66446008)(66476007)(122000001)(66556008)(66946007)(76116006)(8676002)(71200400001)(86362001)(110136005)(186003)(508600001)(316002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?6ZmTUbwtKbCIeYT+qRFvqZYVZDLiy7dAjMOXEKTsgroMcFw+JwronnAAC5ga?= =?us-ascii?Q?ddZ7N39Kh5TnxDzIke0BkMLXQYYg56OHEr/yQgz8o1X31p2Q4qlr3o2BOQ7p?= =?us-ascii?Q?w/Fn6iBNyzm5boo2kI17sSj1dPXA48PZD6Be30whtx1+4fZRGS7kjKfpCMH6?= =?us-ascii?Q?MG9Aa4Myy/dQ84y4KwsjyruR/lv0wTW6d6hxTkOkv/7HLgCgPCyIwA/R/9xK?= =?us-ascii?Q?rleSZ74kYaOgLdolVvw+wveLs1tJ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DVIvyyKDfJ+bwBObQ4Z21PPrpUMqsGIvQHl66nkoMhqhhrT9sNH?= =?us-ascii?Q?Az93Mqd3m8qjfA5ODRiVugbPNpK+vhVxPZcHn514ZAYTbnRAqVC6LZPsL84R?= =?us-ascii?Q?t43YJUkX1BEkCDBV//9jVD1I0eItPICQGY+PTZQzj230zhCQWptaOoYRHyKp?= =?us-ascii?Q?12DCPbaNtV1q3TvYEsmsP3T9Oz6o7/OD/xMsDuQN3PbC0NyjSFKUGQpGC0F3?= =?us-ascii?Q?uI9SlzzJxrLEhzs+ozUV4XBlZfZMzcA2JV5yGXWHTt/cSu+RyDSC0ihvFeFo?= =?us-ascii?Q?qcCrimN8fcCYw6QBOFStde4ag9a1vPpuYRDg+Coo5j6b6e2+vGNcwVoZS4tO?= =?us-ascii?Q?DvVhhgOuos1UaY+ylgJnsD7etWtQJKH3UGzYG2ZgeEDoR8NTSOzI01p43Wv8?= =?us-ascii?Q?jmIgo0aqhYOFmpjH5bIDs4p0Jt17RhKiR7vnZ/UqVwDnZKpDDigb9xxVGOWq?= =?us-ascii?Q?nGWd1Pcpwo3obST+nl2UkLJagkUAGfG6YTs/qNdjpQhg/UgFbSXHCwxsF3NG?= =?us-ascii?Q?sTwf5wISoORng1g8MTL+RArUDm0eFJ+eishKlFOYdi4KhjAHZg3dRRDXF6X7?= =?us-ascii?Q?imm5i1rwvg=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 16bc9097-8b78-458f-5f20-08da34c68898 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2022 09:54:12.5890 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: TTCZBW4izvMosX7EFjBO3Nmwp1pau7Vi7C+g0hj2vuJywljJ9IsdmbJYERW+8ZcgQhDNOfylg6kTczaUotcQ2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB4781 X-Proofpoint-ORIG-GUID: Ultqb11e06OVb44m4B1NQTVM3pknM7c5 X-Proofpoint-GUID: Ultqb11e06OVb44m4B1NQTVM3pknM7c5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-13_04,2022-05-12_01,2022-02-23_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 > ipsec-secgw application is updated to support > DES-CBC ciphering and XCBC-MAC authentication > based IPsec functionality. >=20 > Signed-off-by: Gagandeep Singh > --- > examples/ipsec-secgw/esp.c | 5 +++++ > examples/ipsec-secgw/sa.c | 8 ++++++++ > 2 files changed, 13 insertions(+) Documentation updates missing for new algos "doc/guides/sample_app_ug/ipsec_secgw.rst" >=20 > diff --git a/examples/ipsec-secgw/esp.c b/examples/ipsec-secgw/esp.c > index bd233752c8..b72a5604c8 100644 > --- a/examples/ipsec-secgw/esp.c > +++ b/examples/ipsec-secgw/esp.c > @@ -100,6 +100,7 @@ esp_inbound(struct rte_mbuf *m, struct ipsec_sa *sa, >=20 > switch (sa->cipher_algo) { > case RTE_CRYPTO_CIPHER_NULL: > + case RTE_CRYPTO_CIPHER_DES_CBC: > case RTE_CRYPTO_CIPHER_3DES_CBC: > case RTE_CRYPTO_CIPHER_AES_CBC: > /* Copy IV at the end of crypto operation */ > @@ -121,6 +122,7 @@ esp_inbound(struct rte_mbuf *m, struct ipsec_sa *sa, > case RTE_CRYPTO_AUTH_NULL: > case RTE_CRYPTO_AUTH_SHA1_HMAC: > case RTE_CRYPTO_AUTH_SHA256_HMAC: > + case RTE_CRYPTO_AUTH_AES_XCBC_MAC: > sym_cop->auth.data.offset =3D ip_hdr_len; > sym_cop->auth.data.length =3D sizeof(struct rte_esp_hdr) > + > sa->iv_len + payload_len; > @@ -336,6 +338,7 @@ esp_outbound(struct rte_mbuf *m, struct ipsec_sa *sa, > } else { > switch (sa->cipher_algo) { > case RTE_CRYPTO_CIPHER_NULL: > + case RTE_CRYPTO_CIPHER_DES_CBC: > case RTE_CRYPTO_CIPHER_3DES_CBC: > case RTE_CRYPTO_CIPHER_AES_CBC: > memset(iv, 0, sa->iv_len); > @@ -399,6 +402,7 @@ esp_outbound(struct rte_mbuf *m, struct ipsec_sa *sa, > } else { > switch (sa->cipher_algo) { > case RTE_CRYPTO_CIPHER_NULL: > + case RTE_CRYPTO_CIPHER_DES_CBC: > case RTE_CRYPTO_CIPHER_3DES_CBC: > case RTE_CRYPTO_CIPHER_AES_CBC: > sym_cop->cipher.data.offset =3D ip_hdr_len + > @@ -431,6 +435,7 @@ esp_outbound(struct rte_mbuf *m, struct ipsec_sa *sa, > case RTE_CRYPTO_AUTH_NULL: > case RTE_CRYPTO_AUTH_SHA1_HMAC: > case RTE_CRYPTO_AUTH_SHA256_HMAC: > + case RTE_CRYPTO_AUTH_AES_XCBC_MAC: > sym_cop->auth.data.offset =3D ip_hdr_len; > sym_cop->auth.data.length =3D sizeof(struct rte_esp_hdr) > + > sa->iv_len + pad_payload_len; > diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c > index 1839ac71af..8159b32a72 100644 > --- a/examples/ipsec-secgw/sa.c > +++ b/examples/ipsec-secgw/sa.c > @@ -119,6 +119,13 @@ const struct supported_cipher_algo cipher_algos[] = =3D { > .iv_len =3D 8, > .block_size =3D 8, > .key_len =3D 24 > + }, > + { > + .keyword =3D "des-cbc", > + .algo =3D RTE_CRYPTO_CIPHER_DES_CBC, > + .iv_len =3D 8, > + .block_size =3D 8, > + .key_len =3D 8 > } > }; >=20 > @@ -1301,6 +1308,7 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct > ipsec_sa entries[], > } else { > switch (sa->cipher_algo) { > case RTE_CRYPTO_CIPHER_NULL: > + case RTE_CRYPTO_CIPHER_DES_CBC: > case RTE_CRYPTO_CIPHER_3DES_CBC: > case RTE_CRYPTO_CIPHER_AES_CBC: > case RTE_CRYPTO_CIPHER_AES_CTR: > -- > 2.25.1