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 AE86043C30; Thu, 29 Feb 2024 17:23:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E67C402B4; Thu, 29 Feb 2024 17:23:54 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by mails.dpdk.org (Postfix) with ESMTP id 480654025C for ; Thu, 29 Feb 2024 17:23:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709223833; x=1740759833; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=vYQig+zMBD0R8FRArn0psSQ6nNRfUOCIp3uPPQxrCEo=; b=Sj9Q59EO+QVLXAjkpTx057A9u9IR6/MtmVgPcfUC0rzHSzA30chdXSUj 7MJl8uIaj+SnLMLAKgKd9gGuPv6n3XD1JdUxniTd57U6Vt5aNf/VSm2Br yl/zgNFpo4LmsaFDS2Fravw6YGPRNbloePB4FE9dgC8cpelCAPYgPJTJL Q04qZ6jFBdibWUQEBL4IEi6id6OGE+Eyxgd9Fd1l+gGisD4QOKYtw/Vnj ZnSuzqMBEqW0EMIGrq6jLREFXTV0RV2KZYJxVjUQ2szSfjHdefEbswtJP C/qCjgCqSgirip5R0zS3/5uO/7420Lqnqat2zQc6gJlBF4YB0QkYRZCv7 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="15143500" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="15143500" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Feb 2024 08:23:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="31065268" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmviesa002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 29 Feb 2024 08:23:50 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 29 Feb 2024 08:23:49 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 29 Feb 2024 08:23:49 -0800 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.41) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 29 Feb 2024 08:23:49 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NY2+PhofEqC4tCFfMSRl3KNYLGyIusOyopITJ9DtdbKq+yskdKYsmz52Lm4ZXf4TL+GFdAM0lRBK/BbUDUkK1+r3r8QmvMrbvrZ94JMPsXDtQia1ONQglp2LY1xXkaLsjOc+paSE0nVez46gEp9pNzSYbR4tYKAhI/2em5135MTmsSDDgj/Ktw10EgHroRl3ku1XGIPphFsUVay1q1Lebs1VZfU4HqCooNSEmjGLwfjprnsxPTEtd2bAiJOwoPfgXBqhz+SbD4vKU5ROvwwGDU6CJiyjDuVNsPtrMCgIkw3vtiJY4f//0jHjEuB2VrSFVCna8R/4eG8loYMiqy5u7w== 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=BXPl5CBiaz7gEK8+K4Ob2iI7jh1MZH1SHhjvkWR5jmk=; b=fzPc5u68L1rxxJNBnxMhARLkcEpggc6ucaKqIvW8ht4M7lQvEBP+37xxO0lOWpMT9xjVdFTik5tFSbPYjGyptaNmjaQAwhPQWWhITNdBYNSXvUQ36Df1E1gu9dAoacs3UQM70VwaUTJtFKLPhZNRaFw7dAXbkm5I4ZGwg35YRJ273ggRduLy2XYv65bgDDgCLv+Jydmxj//YgTfx1ksFqQc4dC1hTqx4Ia1Nz7WWodeP1KQESl8HDhfN7aJUUOTp+d1OxIV3uuNCtuH4rbanX/TWmCf+WOC4G0uXOfzxr0QHy/jl7P87qjECTHvYPBHgGZQ+VNmHFLyzlwnIw5oMZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SA2PR11MB5052.namprd11.prod.outlook.com (2603:10b6:806:fa::15) by DM6PR11MB4753.namprd11.prod.outlook.com (2603:10b6:5:2ac::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.25; Thu, 29 Feb 2024 16:23:46 +0000 Received: from SA2PR11MB5052.namprd11.prod.outlook.com ([fe80::51b4:ee7d:abac:d3fd]) by SA2PR11MB5052.namprd11.prod.outlook.com ([fe80::51b4:ee7d:abac:d3fd%7]) with mapi id 15.20.7339.024; Thu, 29 Feb 2024 16:23:46 +0000 From: "Dooley, Brian" To: "Ji, Kai" , "De Lara Guarch, Pablo" , "Power, Ciara" CC: "dev@dpdk.org" , "gakhil@marvell.com" , "wathsala.vithanage@arm.com" , "ruifeng.wang@arm.com" , "honnappa.nagarahalli@arm.com" , "Jack.Bond-Preston@arm.com" Subject: RE: [PATCH v4] crypto/ipsec_mb: unified IPsec MB interface Thread-Topic: [PATCH v4] crypto/ipsec_mb: unified IPsec MB interface Thread-Index: AQHaajnxs0puzSgpl0OHmdOKCVQWrLEhglCg Date: Thu, 29 Feb 2024 16:23:46 +0000 Message-ID: References: <20231212153640.1561504-1-brian.dooley@intel.com> <20240228113301.934291-1-brian.dooley@intel.com> In-Reply-To: <20240228113301.934291-1-brian.dooley@intel.com> 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=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SA2PR11MB5052:EE_|DM6PR11MB4753:EE_ x-ms-office365-filtering-correlation-id: b2ebab48-1bdc-4977-36ab-08dc3942ce0c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ISlaR9mQrvoBBwZ6Re8UVY3cQ2bnYOro9kG0CxXfBkmwWtW3/lwkhdUI2SOy0JYw0rRXbtxuf7fNWZQBy58Jg76axrz/wCC+SWISyD3p7S9BV58G/Zpty2+QakZIXLVAmLmXw1IRoxD6CRzJGvJZNR8VWR1Ko1d16Td7lS4vmPOWrkteuA+0cPaPALkRzxBMazMU6IrevvFyFOa4ALl/uXA30QvYSRTKmDF+a9svUp4gM7cm+8U7ThTidB8aIf90BRBNcZQCBXMZX4dnuB9bRH9zctsI2UIPst706N24uHY5TbUwryaUTsOAZmie3SwRqtz0MV9KX68aoamtJS/SQUTM0p3gVS5ve3jmWvvvH8cvNESpdNSwM46DeXsQ7w5xDtmSsStEWPBgmohJpHHw94cjc2yVOfAfwlqRzqhjXlI1EAoID1Ug3m7iU8UjsLi3RP2AKUBeJpM/2Tigmi59frD9lumm5Xip0FPbQSOv+k01xSM6FzCtINtNMl/3JvHsmgFdauwtLQG0/L9iiMVsCjNyiwkXK4s9Ml7pwoGmG40AqYHBNMGSt190GEzq8gC4of7tBDpgRx0gcMkCI9sLn2CSvFoz9gzcZd/DqqZTPfsV1fWWxs1cc5KZYTeETn0Oubpq34R3p4kaFUQNpjHmBUIiGbBYeAb7w2N9NTkWHIs= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR11MB5052.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?vJa9OauYyOSXPqhRSAuZupx8HZRML19jypz1UG7r3TJEhl5v7KQYg/7652dR?= =?us-ascii?Q?4fG5g6f9z/uTQ8GRZZ18emikFJ9Uiw/ZNx1HMxtJOpizZcA+0EzwU2yVJH5Z?= =?us-ascii?Q?tAWcRabHm3g5gtnZbrHAdQ60tZa/vlKLZ33x0jVraYZ35jtXWEhqyQT/pBeq?= =?us-ascii?Q?j+pZ0Lov7l1I9RmBzp2mgR7V9+TscdMJJeK8bM+9/BF85DwZdoyi0EDVShBP?= =?us-ascii?Q?CF4WoXJd8Vq9YiTrcIkzeY8OfJy8pYhNFiwhCkriWMZJc5XE6LPCq8BiYn+9?= =?us-ascii?Q?4OOVJJ77CBm+IqZTfo/7O2KDjgsAwfm1i5X+OLkBvVeaohfm5GDEhPPFcBu9?= =?us-ascii?Q?sjW+9bZUx4S+yjYplqctJ2h8cQ/3j4MczqAdk7R7sboexZt9apAbst8AfFpg?= =?us-ascii?Q?0h0aRbBPnJEbObg2RzeUF9Ie4o0zUflIs8qxmD1VxHvXgkv1Jug/Ionu2MfD?= =?us-ascii?Q?o+H/iuikD2DhV2zKAE95Ev4NACROXUP70UeTq9r53pglyeJJREF214nZpWXA?= =?us-ascii?Q?Ckv3EzsTLi01+UTLfiPBKOrHIMo6xbFum7ww64H8PUFOCEouxNyWiiJCg1Wk?= =?us-ascii?Q?L960M4z5mz5TTlAmhdAVfXAfodHot7gr9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WdYm3vGwbAaC7IeF7TI5J0Pov4wTCHxyRmnfvdQZKZA9aFUJHaS5YnUWsL?= =?us-ascii?Q?eRhRLn0+0ENVn4rF6pqySMrsHl7A3ZsSO3UzcMiZ?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR11MB5052.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2ebab48-1bdc-4977-36ab-08dc3942ce0c X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Feb 2024 16:23:46.7009 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: CRn3G0tmmmCcdwvg19PInCiw4wyXZMoiEih9VYXVavHzrbpUXwOLvqCpdKt1XseOtyT7vTPv59wqffq1rYhGWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4753 X-OriginatorOrg: intel.com 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 Hi folks, The introduction of a more unified IPsec MB library for DPDK is causing the= snow3g tests to fail on ARM. Artifact here: https://lab.dpdk.org/results/d= ashboard/patchsets/29315/ PMDs using the direct API (KASUMI, CHACHA, ZUC, SNOW3G) will use the job AP= I, from the AESNI MB PMD code. We have come across a similar issue in the past that related to an offset i= ssue as SNOW3G uses bits instead of bytes. =20 commit a501609ea6466ed8526c0dfadedee332a4d4a451 Author: Pablo de Lara pablo.de.lara.guarch@intel.com Date: Wed Feb 23 16:01:16 2022 +0000 =20 crypto/ipsec_mb: fix length and offset settings =20 KASUMI, SNOW3G and ZUC require lengths and offsets to be set in bits or bytes depending on the algorithm. There were some algorithms that were mixing these two, so this commit is fixing this issue.=20 =20 This bug only appeared recently when the ARM ipsec version was bumped to 1.= 4. It appears there could be a similar scenario happening now and this is a= potential fix that needs to be made in the ARM IPsec-mb repo: =20 diff --git a/lib/aarch64/mb_mgr_snow3g_submit_flush_common_aarch64.h b/lib/= aarch64/mb_mgr_snow3g_submit_flush_common_aarch64.h index 13bca11b..de284ade 100644 --- a/lib/aarch64/mb_mgr_snow3g_submit_flush_common_aarch64.h +++ b/lib/aarch64/mb_mgr_snow3g_submit_flush_common_aarch64.h @@ -94,8 +94,8 @@ static void snow3g_mb_mgr_insert_uea2_job(MB_MGR_SNOW3G_O= OO *state, IMB_JOB *job state->num_lanes_inuse++; state->args.iv[used_lane_idx] =3D job->iv; state->args.keys[used_lane_idx] =3D job->enc_keys; - state->args.in[used_lane_idx] =3D job->src + job->cipher_start_src_off= set_in_bytes; - state->args.out[used_lane_idx] =3D job->dst; + state->args.in[used_lane_idx] =3D job->src + (job->cipher_start_src_of= fset_in_bits / 8); + state->args.out[used_lane_idx] =3D job->dst + (job->cipher_start_src_o= ffset_in_bits / 8); state->args.byte_length[used_lane_idx] =3D job->msg_len_to_cipher_in_b= its / 8; state->args.INITIALIZED[used_lane_idx] =3D 0; state->lens[used_lane_idx] =3D job->msg_len_to_cipher_in_bits / 8; Thanks, Brian > -----Original Message----- > From: Dooley, Brian > Sent: Wednesday, February 28, 2024 11:33 AM > To: Ji, Kai ; De Lara Guarch, Pablo > > Cc: dev@dpdk.org; gakhil@marvell.com; Dooley, Brian > > Subject: [PATCH v4] crypto/ipsec_mb: unified IPsec MB interface >=20 > Currently IPsec MB provides both the JOB API and direct API. > AESNI_MB PMD is using the JOB API codepath while ZUC, KASUMI, SNOW3G > and CHACHA20_POLY1305 are using the direct API. > Instead of using the direct API for these PMDs, they should now make > use of the JOB API codepath. This would remove all use of the IPsec MB > direct API for these PMDs. >=20 > Signed-off-by: Brian Dooley > --- > v2: > - Fix compilation failure > v3: > - Remove session configure pointer for each PMD > v4: > - Keep AES GCM PMD and fix extern issue > --- > doc/guides/rel_notes/release_24_03.rst | 6 + > drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 10 +- > drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h | 15 +- > drivers/crypto/ipsec_mb/pmd_chacha_poly.c | 338 +---------- > .../crypto/ipsec_mb/pmd_chacha_poly_priv.h | 28 - > drivers/crypto/ipsec_mb/pmd_kasumi.c | 410 +------------ > drivers/crypto/ipsec_mb/pmd_kasumi_priv.h | 20 - > drivers/crypto/ipsec_mb/pmd_snow3g.c | 543 +----------------- > drivers/crypto/ipsec_mb/pmd_snow3g_priv.h | 21 - > drivers/crypto/ipsec_mb/pmd_zuc.c | 347 +---------- > drivers/crypto/ipsec_mb/pmd_zuc_priv.h | 20 - > 11 files changed, 48 insertions(+), 1710 deletions(-) >=20