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 94C0BA04FD; Mon, 16 May 2022 11:45:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F22440A7A; Mon, 16 May 2022 11:45:52 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20080.outbound.protection.outlook.com [40.107.2.80]) by mails.dpdk.org (Postfix) with ESMTP id 1065A40A79 for ; Mon, 16 May 2022 11:45:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NTGCIGz5pQxiSTfn2+yj87sECZgX6FHkEyVH8R4hJPoNWzVo+2SjNvO2VBtlbm6Uz0FAf6swmyrwAbtzS5fJf5J558lOQU/HchbDG/1U+W79AhCF+efeWH/41T1XUzjZskMKGenSRuiskITzVdJoGlxSqWavuyyHcB6qvFrUeLOep34CaU8Ti+4tF+o6q6Z/k4XSf5L0GnjpYvJTyNhopayRkIF4e5oaLG51SUXuIfxyTUAyCyyG6IJa53eXcKPGVF27IsZKf6BJpRRgeqNJmWLLBNGX1EtYM1lbfcTg9n8DgLTOP+BmoOsfKdFWvzk2EFRepFPjLMwtIMVODLWyYA== 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=3xxgZvNowr+t29NYHM1U+g33PQ8fSpe4sB6/Cs0gxCs=; b=oKI/2YgkikMQaTSLGERzV6HqrhrEI7ANa6NUf9hKlNQS2vRU5SMPrn7O3NVY1WfRvrhZLjw5zzRu3DAXHUsAUBtCDI+67yF9TGq07zlmqamuOgDWAN6N6iqoJp7aC+MhCicByABlig98MRW6nUtlQA8f5xFwXcscAXK9K5+CWiWbgE/LsJb4QGEBAaOSpjB4yjUT6a3jEA9XdGhWngFsWNjHZGXdp10UOVtzrFbzN/BX9vrJv7sMZ6jF2ppUiZ7i4GFSi57LMRUIWO5qrbkRAJYjlCJLFB1zKh/yCN7MqL/0JY8MZyaZlE2IY0xvNx39E5ZSNbWmeu60v9V4Dl8b4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3xxgZvNowr+t29NYHM1U+g33PQ8fSpe4sB6/Cs0gxCs=; b=aqypDfVKINja2KI+JTFIaIX6cYAUCi8bpOa+yTz277vKxwJQK+skv5qozZDOpSlcnctuOgeyGTcwzEg9QTkAoYcn+fAvxZ8oQeOPxNqHyn/sudlfTwhnUeIcnXJmyZtfOcJEN3PReVdGm4hn8o3AANNulSuwM0KIYp28bmw/tww= Received: from AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) by DB8PR04MB5756.eurprd04.prod.outlook.com (2603:10a6:10:ab::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.18; Mon, 16 May 2022 09:45:49 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2%9]) with mapi id 15.20.5250.018; Mon, 16 May 2022 09:45:49 +0000 From: Gagandeep Singh To: Akhil Goyal , "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: AQHYWFsLe26VXrjQw0m8vpYJdr3V/a0crhUAgAS0W9A= Date: Mon, 16 May 2022 09:45:49 +0000 Message-ID: References: <20220425041423.2232034-1-g.singh@nxp.com> <20220425041423.2232034-3-g.singh@nxp.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 76b1a27d-d766-44a3-a7c5-08da3720dbf8 x-ms-traffictypediagnostic: DB8PR04MB5756: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: OnUBhz5aCDmkHx2mnhyLJjJYe9Gk5IkcCWvHzf8KrUkvHzw2sijd44TeHi91cgnJcZwv+6Es/S3jFdXHKGdnchpl6nIUZRl6Hjl6p80XRS+vsyQKzomewIRqgf3AZmfgr2nQ1Y1Vl2p4ime2xkBqNUgBE1kA547imSjCCRPDWB4LbDduTgHVdUAXu36C8K6dS1bjX27KJzyCfhSue0K3xAHRf08uU55UH21NtYNw8qU0O5qLpOU15DTjjv+SbbhmZlS4nobQFPInlrhqCd+/oiws0ONuwR/imo5PqgqlWorf8GTBj8fdd//AE06UQaaBvlK6h+L8DB7jPEsiGnZwN3wdgbqBkIZFLGNsqRHij5Xu0wadShKtIZyqaV8g+Ot5+Ecjo5rCXxGQg0x4i3/LKFqCp4HdAIvlApCo8eMjpXpYG05jOEcyTp4FIXTz12hcvqZfr/xhN66oQE+jZxehBClcXWf+9clAjFd3ffC3afKiAAROS7gEsXjVujArlVoICaR9Swnm0LIAAeMUIRjHbt90Z/HpLXrBWINXxDOKliO8ad0qSY2FEUMZIvescX2urtq/Ae906bFWIr0Er1+SqdsSdMSn2lw9dH2OBoCeSsfhFZQplhdIltP6YBc16DlP7ISaTXyitjMb9p8YMhaVEsNs7/L2OauzqBuHpZNeeXMkX1900GmZ11RH8g9Bo1e5sWi8J9f17y22E0RT5zz1lg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8198.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(316002)(5660300002)(7696005)(66476007)(2906002)(8936002)(66446008)(76116006)(8676002)(55016003)(186003)(66946007)(66556008)(83380400001)(38070700005)(64756008)(9686003)(71200400001)(122000001)(26005)(55236004)(86362001)(6506007)(53546011)(52536014)(508600001)(33656002)(38100700002)(110136005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3kJq7bNq2hlHHNMoM6JHR1Fb/813DuJdqL4Ta4Hnbk3x2D1Psh6NiRkDU+5i?= =?us-ascii?Q?kBmicQ0S9fFrqSUTz0DNuxx/jdmnvo0DbLaQy1ZUdNTciUBCeEBnfTDs4O+v?= =?us-ascii?Q?z2lCqCiJIOV6lG1RXOWWFFgT56xncxSrfiJ2hWuFuM8TuQHn4aeQSlu0JiMS?= =?us-ascii?Q?ujPrVQv2Llbw4/kfEiFiQaygPR+NbQKiroroE82dREMwgPs2LYJgAoAVqhzI?= =?us-ascii?Q?yWT42syQpAhUi8gO9RHfIGih1yXCE3xfzPxbquwdSSCHShtIrco8fX1ChWUl?= =?us-ascii?Q?vSWLdped05+LhH35AM3Wjz7whngPCYrRp2VZ/gmIPe8dCRa73/eLKtuN3LTn?= =?us-ascii?Q?ObqvqguZ/L0RkSn9mG+6CEVw9ZSA7sy/FUOW3mx1QK6SUpXitvhFZnqsNWNp?= =?us-ascii?Q?eFdX49hXoeo0vAfbFzw1DqtsJ5ynerMOY4FomzKBSGq1KFYRJA2LqFBLj9xQ?= =?us-ascii?Q?DQXiZORPTEypPh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us-ascii?Q?2jFs4qsHmGEeNNJLWEWOx7+kqJumsPjAMffOio8KY9Uzq7F3JMPR19F8Uigr?= =?us-ascii?Q?ch7vB6sAw8jYCuu2411CHRF2yzJH7nRn03daQ8H8iP6xx+0aABvdWt4yLK5e?= =?us-ascii?Q?IXLL7G84WiBoaqFeM7uzE4igv9xFzl+drg80W94bEgpvbfGmYwXnYp4ei+58?= =?us-ascii?Q?oM/bZ6O4Fo7slFue1xmlkCDgZgprZ6kAfYS/u4JyCgtj4+azz69veIov4lW/?= =?us-ascii?Q?x9qHzk027YoEQdH3op2tWsFuuHF3CKsFAcYpf+jrVhwypygvFhERDc5QAMeR?= =?us-ascii?Q?zjHlzwcH/1jp14aFbAj7YFnM6bdiDg6JqXZhr8MMjOp8YiF8?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76b1a27d-d766-44a3-a7c5-08da3720dbf8 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 May 2022 09:45:49.4865 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: cPlqFzf3Kf92ujJw3iDkL6JQGRorRPu+spb81hRRwuAbN84oqfytbsMnA5Zw5AE9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB5756 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 > -----Original Message----- > From: Akhil Goyal > Sent: Friday, May 13, 2022 3:24 PM > To: Gagandeep Singh ; dev@dpdk.org > Subject: RE: [EXT] [PATCH 3/8] examples/ipsec-secgw: support XCBC-MAC/DES= - > CBC >=20 > > ipsec-secgw application is updated to support DES-CBC ciphering and > > XCBC-MAC authentication based IPsec functionality. > > > > 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" Ok, It appears algo SHA256_HMAC is also missing in the document.=20 >=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, > > > > 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 *s= a, > > } 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 *s= a, > > } 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 > > } > > }; > > > > @@ -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