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 6436E43351; Fri, 17 Nov 2023 10:38:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0834B40648; Fri, 17 Nov 2023 10:38:58 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 0E3E840273; Fri, 17 Nov 2023 10:38:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700213936; x=1731749936; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=bPPfRHUR4D0lzGMcslCput6+5t70fqyhs1Wr63rAkcw=; b=L5tgWV0+xcUc2F3X3Dhxdm3mT9/gBB9+f8i+TieuEkSidq+ETXRsAWCa 1XpBKCwf8102v5+ge2Jd1TQx8QxCKY9N4EglOGK8eNE/CIwSjrm9OX5/L dyD0DC8HDU6dJ7WLgQJ0QMDvPJrMHYpPEI6yjvRhQt0XEQ/5HcWQ2zs6y 8YRb2rFlK0/FiHg4g1MQ9RTyJnzQ0aRbJjAdxFmszq1y/iFYfY/XsbX3I RjbDaHdJ6CELRcTh4V6qSOSev9T+Nh0AXnnlYt6VCAMsUauroForoESFF FmbOIzFnsbyo/y2AzvMJtiaK0p/B1+2kcIwz6sKkimLlBYs6+XVZ6Siy0 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10896"; a="395196043" X-IronPort-AV: E=Sophos;i="6.04,206,1695711600"; d="scan'208";a="395196043" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2023 01:38:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10896"; a="836020836" X-IronPort-AV: E=Sophos;i="6.04,206,1695711600"; d="scan'208";a="836020836" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga004.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 Nov 2023 01:38:54 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) 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.34; Fri, 17 Nov 2023 01:38:54 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 17 Nov 2023 01:38:53 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Fri, 17 Nov 2023 01:38:53 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) 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.34; Fri, 17 Nov 2023 01:38:53 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VzGpJWpvpUqsVB5ox9yCi9P1blOL56+X36bSPPZmC5HkveRqF2f1b3k4pllpLXSxid7xEJWcDf38AEJMuQ/Nhoh6RztIXw8f5LDU3DjTs2VCHCYIVlMx9v8s15xCu347JpmzXDzSdtlPn8sZbBVMPcpcJypSEpar7Xk0q8rhTEVce7NMtRKPLrWoPBofc08fCoSrrs20jUEzh2j5Uc13Pqv/gbv6ihppJWc/MkjFP2qBfAur8bd9CzQElrJRDFuXZLvpTc/kx+xFZL7N5JphZf1D/4fPsB3o3AbKXOJRZ6y73VWK90tluLRB+I0AJTT+dRC2dv79x+g3rCUqMWkNcQ== 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=G83sN9bfft0bsWJVIktufIy0DFK/DtNVx0LoAxyoi0M=; b=egmwbBvfoX2e8+dwN3AGISmqzcqopej5EuUsNBAcBkD85bKT/wrLiuKK7Mx9MxFkTl8+OxoSgWL1fc3txbUzdPAqHVCM7Gf0Sb9R1u5f9vRzowvgCx1TjstfNh6rBMYh57eiMxmlVub8u1FTx8Vz4OVhf3JVcJX+f+HVrJn6CKBuWNY46MmkVMhgIo3VdwRP+1rsTXnrwXHay+mXosEMbgnSgiUu3PlSztgf2q7BucQ3rOlh4AFH28hIGzgMV88ywY1nJxCD7DyqhrSGXOAonGx+vFV+SAiFLqetdsmhd1jwqi2S2s2icpYY6UYff2+PzmeQRnzvi5MLEh0gteoGCw== 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 DM6PR11MB3468.namprd11.prod.outlook.com (2603:10b6:5:5c::20) by CO1PR11MB5137.namprd11.prod.outlook.com (2603:10b6:303:92::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.17; Fri, 17 Nov 2023 09:38:51 +0000 Received: from DM6PR11MB3468.namprd11.prod.outlook.com ([fe80::2a45:ea7a:a9ad:1c6b]) by DM6PR11MB3468.namprd11.prod.outlook.com ([fe80::2a45:ea7a:a9ad:1c6b%4]) with mapi id 15.20.7002.021; Fri, 17 Nov 2023 09:38:51 +0000 From: "Sivaramakrishnan, VenkatX" To: Akhil Goyal , Fan Zhang CC: "dev@dpdk.org" , "stable@dpdk.org" , "Power, Ciara" , "Kusztal, ArkadiuszX" Subject: RE: [EXT] [PATCH 2/2] test/crypto: add negative test cases for cipher buffer alignment Thread-Topic: [EXT] [PATCH 2/2] test/crypto: add negative test cases for cipher buffer alignment Thread-Index: AQHaDln+jq4CXhBGGUKWfYLHxk1tWLB34Y+AgAZyFkA= Date: Fri, 17 Nov 2023 09:38:51 +0000 Message-ID: References: <20231103133037.782512-1-venkatx.sivaramakrishnan@intel.com> <20231103133037.782512-2-venkatx.sivaramakrishnan@intel.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=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR11MB3468:EE_|CO1PR11MB5137:EE_ x-ms-office365-filtering-correlation-id: 3fad9142-aded-4f49-cbb7-08dbe75101ce x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: z1u7FPYqQAsyjswcEdaRObrC7LrG4iLYp3ALUIMow4rtQbeznVNS6c37h4GQQuutJ6Bsh+jVbYZVybquD3sJTutvvT1qqv29ondbd9afhEbOKi5pB0pCehUEggN/wiy8lfwK9UIet7Lb8HHaaS6YvxC9Ie0PKhYcayGkF7sVcK/cj20N1ZLF7aHq1UZT3E0SVwpJkGmq9F55dHCB/7XrMIIlh4x5ZDsVAuzc9HyHtp/o+YsTCUY4pTrzJnOmy+4wNasieDrXYhZdglZ0nR3dVWvkHehst+jwUJ8Yj15pVpNLDqqEME/HjxZ4YUEQwdgT1mgA4DsVSJd8ZZGlQix66ijBtaEZ4Y6drY/2157hPT901i7wX20pjRUwwOz03IMlgVSNn7Qj5ouj+Dl1YII9rS5VVpK6SsKMlsqDVV0MukzhMyJhTGvFk3R8CCmxrDZHhYqrtA3JP+UvVDWq3yaUvbTNLI3HKHIRZalX7AwgPjsaFojKbPCvKSfkM43bvCbIuK1OAomYiv4LeVSIOqoVPU1wIYXqEMzLP0qe9OQgo/Dr7fFQ9SpbeQJPgnLEDNUgLgRxnNQyB4xQqLl97da+9kXjwM0eHIznJ82PSOSwEdBCFbyVHvgE+1omYALDrW4k x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3468.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(346002)(376002)(366004)(396003)(136003)(230922051799003)(64100799003)(186009)(1800799009)(451199024)(8936002)(55016003)(2906002)(64756008)(5660300002)(4326008)(83380400001)(52536014)(8676002)(38070700009)(66556008)(66476007)(66946007)(86362001)(478600001)(110136005)(107886003)(316002)(66446008)(41300700001)(82960400001)(38100700002)(33656002)(54906003)(122000001)(6506007)(7696005)(71200400001)(76116006)(53546011)(9686003)(26005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?UHNKbsDe+uKGia5xOlLRcw6uwdsS6KxavLR152RO64ICO1jP06AnvusGuAJQ?= =?us-ascii?Q?Tb86+UR4uOvYvMtHQ8wbFiC/dqt6OE0QENA2gJy0LOYnVFpaeTmN8Jf581QC?= =?us-ascii?Q?4YT4NiJoAgD8gFzcyvnp8GOjBv5H/M+Qs1hb6IFvpwtZZ+6kxDMIEc4WtQGs?= =?us-ascii?Q?aakXnQ32Y+jPPvcs9Wmk9596x6ARAI8hQeaqdKIv5WJAyCc7/QqBfql7YuFC?= =?us-ascii?Q?JMDOySTLxGqPnmavcRpYwIq2ybwh/+esdaVKH96QaJPzPe3Y0GB2sgI/KWt4?= =?us-ascii?Q?EFDCI8IhXPJ8ckvOKV9uCZfm5ct7chjaBEfT19ARoAR3HdOe45wx390GJv++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mxEoyXFbFctMVKwf8HNk+8MA07KQ?= =?us-ascii?Q?ciPmj13mqPMOK8vbR7l5ogZi+tpXqE1ASOecqrvqYNdRqqiBI3YN2541LUeF?= =?us-ascii?Q?XWqE/ZkvtxwhUhqHOO2JsYX1Hb+zIUnNMBiK2XwXF6SUSBNI1ZFNvScBoIvi?= =?us-ascii?Q?4mKZH/XIiO1ueVxfPv6Y1ARn+Tr4HLdrembdSnrHXmc4d24L1cHyCI3wVIFv?= =?us-ascii?Q?8/Qfh6TnXr9RWbH9XPxG6hZBLcQNSOpDuV/JUyI8B7ZKiv0gaf2TQ7r9MOu8?= =?us-ascii?Q?VX3ITSlvCmaoHSVLqdwSF/YJaJfBtDphKPa1Uss4XsQEHPM5cevBx9MjHoSH?= =?us-ascii?Q?wEoViZ/jqXBytBqH5wxeGx/OHJnu9JM/fBZFgwJgiZHv/Pqdvz3hbGEv/fb/?= =?us-ascii?Q?TA=3D=3D?= 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: DM6PR11MB3468.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3fad9142-aded-4f49-cbb7-08dbe75101ce X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Nov 2023 09:38:51.1636 (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: eLx6kiQhFC0RNaNkNl/KqJGLg/DYbfjrNCixQOjaVTfSWG88NUc1UhWeYFhCcNfHEbXb/5N00st6pE1ngTBBzU2m3aqKAIrirMobJczBPZzAjg8DxqLAQ1nIAQk5ensj X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5137 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 Akhil, > -----Original Message----- > From: Akhil Goyal > Sent: Monday, November 13, 2023 12:31 PM > To: Sivaramakrishnan, VenkatX ; Fan > Zhang > Cc: dev@dpdk.org; stable@dpdk.org > Subject: RE: [EXT] [PATCH 2/2] test/crypto: add negative test cases for c= ipher > buffer alignment >=20 > > add negative test cases for 3DES CBC and AES CBC cipher algorithms for > > buffer misalignment > > > > Signed-off-by: Sivaramakrishnan Venkat > > > > --- > > app/test/test_cryptodev.c | 321 ++++++++++++++++++++- > > app/test/test_cryptodev_aes_test_vectors.h | 119 ++++++++ > > app/test/test_cryptodev_blockcipher.c | 20 +- > > app/test/test_cryptodev_blockcipher.h | 1 + > > app/test/test_cryptodev_des_test_vectors.h | 38 +++ > > 5 files changed, 491 insertions(+), 8 deletions(-) > > > > diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c > > index d2c4c6f8b5..12e0cf8044 100644 > > --- a/app/test/test_cryptodev.c > > +++ b/app/test/test_cryptodev.c > > @@ -1371,6 +1371,42 @@ negative_hmac_sha1_testsuite_setup(void) > > return 0; > > } > > > > +static int > > +negative_input_buffer_misalignment_testsuite_setup(void) > > +{ > > + struct crypto_testsuite_params *ts_params =3D &testsuite_params; > > + uint8_t dev_id =3D ts_params->valid_devs[0]; > > + struct rte_cryptodev_info dev_info; > > + const enum rte_crypto_cipher_algorithm ciphers[] =3D { > > + RTE_CRYPTO_CIPHER_3DES_CBC, > > + RTE_CRYPTO_CIPHER_AES_CBC > > + }; > > + const enum rte_crypto_auth_algorithm auths[] =3D { > > + RTE_CRYPTO_AUTH_SHA256, > > + RTE_CRYPTO_AUTH_SHA256, > > + }; > > + > > + rte_cryptodev_info_get(dev_id, &dev_info); > > + > > + if (!(dev_info.feature_flags & > > RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) || > > + ((global_api_test_type =3D=3D > CRYPTODEV_RAW_API_TEST) > > && > > + !(dev_info.feature_flags & > > RTE_CRYPTODEV_FF_SYM_RAW_DP))) { > > + RTE_LOG(INFO, USER1, "Feature flag requirements for > Negative > > " > > + "Input Buffer misalignment testsuite not > > met\n"); > > + return TEST_SKIPPED; > > + } > > + > > + if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) > !=3D 0 > > + && check_auth_capabilities_supported(auths, > > + RTE_DIM(auths)) !=3D 0) { > > + RTE_LOG(INFO, USER1, "Capability requirements for Negative > " > > + "Input Buffer misalignment testsuite not > > met\n"); > > + return TEST_SKIPPED; > > + } > > + > > + return 0; > > +} > > + > > static int > > dev_configure_and_start(uint64_t ff_disable) { @@ -14469,6 > > +14505,192 @@ aes128cbc_hmac_sha1_test_vector =3D { > > } > > }; > > > > +static const struct test_crypto_vector > > +aes128cbc_sha256_misalign_test_vector =3D { > > + .crypto_algo =3D RTE_CRYPTO_CIPHER_AES_CBC, > > + .cipher_offset =3D 0, > > + .cipher_len =3D 511, > > + .cipher_key =3D { > > + .data =3D { > > + 0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2, > > + 0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A > > + }, > > + .len =3D 16 > > + }, > > + .iv =3D { > > + .data =3D { > > + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, > > + 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F > > + }, > > + .len =3D 16 > > + }, > > + .plaintext =3D { > > + .data =3D plaintext_aes_common, > > + .len =3D 511 > > + }, > > + .ciphertext =3D { > > + .data =3D ciphertext512_aes128cbc, > > + .len =3D 511 > > + }, > > + .auth_algo =3D RTE_CRYPTO_AUTH_SHA256, > > + .auth_offset =3D 0, > > + .auth_key =3D { > > + .data =3D { > > + 0x42, 0x1A, 0x7D, 0x3D, 0xF5, 0x82, 0x80, 0xF1, > > + 0xF1, 0x35, 0x5C, 0x3B, 0xDD, 0x9A, 0x65, 0xBA, > > + 0x58, 0x34, 0x85, 0x61, 0x1C, 0x42, 0x10, 0x76, > > + 0x9A, 0x4F, 0x88, 0x1B, 0xB6, 0x8F, 0xD8, 0x60 > > + }, > > + .len =3D 32 > > + }, > > + .digest =3D { > > + .data =3D { > > + 0xA8, 0xBC, 0xDB, 0x99, 0xAA, 0x45, 0x91, 0xA3, > > + 0x2D, 0x75, 0x41, 0x92, 0x28, 0x01, 0x87, 0x5D, > > + 0x45, 0xED, 0x49, 0x05, 0xD3, 0xAE, 0x32, 0x57, > > + 0xB7, 0x79, 0x65, 0xFC, 0xFA, 0x6C, 0xFA, 0xDF > > + }, > > + .len =3D 32 > > + } > > +}; >=20 > Why are the vectors added in .c file? >=20 We will move the tests to blockcipher test vectors and put in test vector h= eader files with others. >=20 > > + > > static const struct test_crypto_vector > > aes128cbc_hmac_sha1_aad_test_vector =3D { > > .crypto_algo =3D RTE_CRYPTO_CIPHER_AES_CBC, @@ -15058,7 > +15280,7 @@ > > test_authenticated_decryption_fail_when_corruption( > > } > > > > static int > > -test_authenticated_encrypt_with_esn( > > +test_authenticated_encrypt( >=20 > Any specific reason of changing the name of this function in this patch. > =20 Renamed so that we could reuse with these tests and not just the ESN tests. For the next version, as tests are moved to blockcipher test functions, thi= s change is no longer needed. >=20 > > struct crypto_testsuite_params *ts_params, > > struct crypto_unittest_params *ut_params, > > const struct test_crypto_vector *reference) @@ -15159,7 > +15381,7 @@ more work is needed on the tests so will drop this patch for 23.11. Will send a new version of QAT patch Today. Thanks, Venkat.