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 16249A0C54; Fri, 3 Sep 2021 18:14:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96DF7410D7; Fri, 3 Sep 2021 18:14:13 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 8CFD640E78 for ; Fri, 3 Sep 2021 18:14:12 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 183A4tt6011876; Fri, 3 Sep 2021 09:14:11 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2173.outbound.protection.outlook.com [104.47.57.173]) by mx0a-0016f401.pphosted.com with ESMTP id 3auhmw99t3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Sep 2021 09:14:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VN+Yk3o87ufOvohw3T4Vnu+jJX0RaxCWDUYdEWdTzIUy0vXnRKGTUeg2YUCtV6SCo4lEeY0DIJ8B1tdiRf4gKbtQbi8eGrA1F3ikvKaV6LI8O+AUIyu31h8vlBtcJ60etMbesezA8SVBVlVyJ6PWZdACOrb6QyRV9F8M3RslWvJFAVMabLknBgMsD/d/xG48uenSOkzM4uvE28oakfJyeS30nWB99uNEa4pfCXjgS0TT13IPd9xAlCNcf1PVlDf+/qUZpogKklFaf1TkGuayDNZJ6fzESEQQSKXwD7WrpW0paQiErEqvx6+LHgBlEGblTkk5uENJhS+nRuMjKGIAzA== 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; bh=0cHpyahtfDlqJNvsMhvbA4RF9qINfo4iD+G049Ji7rQ=; b=getgPTwlHJ8tdbAmIGDmd5TqeW8KoYydnxGveDXaSdQnOUXBzjJ9Z/lsLC1NmYUTVfGRH1JoYF1iRSNI4sFjb9xgUFZX0URsiU+A94OD7RENefmi6VbdIKp0IUk/68fZNBadS3zXD7ebomYq0T5cUK6sajvPLsNswRTZNbXaOMYWrt3ctlDUIS1AKan9lNEJT73bBroMKA2LJ8KfsJKBwYvGn9hV8lw3fVtlINGHNy1MP/gHmm/fbcC95gIlFyMCD1tDTjqht+tU1AP2pQ5b3Z8PTrXb32EfMnIPaGHh7vslXrDlc2kKAJC8dgKclpgDRC9ybvGKCnKZYqe2Y246pw== 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=0cHpyahtfDlqJNvsMhvbA4RF9qINfo4iD+G049Ji7rQ=; b=ombh/VUOYtX2yZPx1Crb5VIkcEvpfDqA8Wbw9O2ZPn4auoFp4OTgt6rgNyUZ5ta68B+MnVUhNNojiN25l8xtDwEB33rXlFg/xA8SBsNts7YLtPPaaPUB+ZK0sBFlCkgjtYgv43Hs4pePonzxpHSTtVDHH30+BbAAdgX2UV6Y+GU= Received: from PH0PR18MB4672.namprd18.prod.outlook.com (2603:10b6:510:c9::16) by PH0PR18MB4524.namprd18.prod.outlook.com (2603:10b6:510:ef::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.22; Fri, 3 Sep 2021 16:14:08 +0000 Received: from PH0PR18MB4672.namprd18.prod.outlook.com ([fe80::85aa:3d01:94f6:984]) by PH0PR18MB4672.namprd18.prod.outlook.com ([fe80::85aa:3d01:94f6:984%5]) with mapi id 15.20.4478.022; Fri, 3 Sep 2021 16:14:08 +0000 From: Anoob Joseph To: "Power, Ciara" , Akhil Goyal , "Doherty, Declan" , "Zhang, Roy Fan" , "Ananyev, Konstantin" CC: Jerin Jacob Kollanukkaran , Archana Muniganti , Tejasree Kondoj , Hemant Agrawal , "Nicolau, Radu" , Gagandeep Singh , "dev@dpdk.org" Thread-Topic: [PATCH v3 2/5] test/crypto: add combined mode tests Thread-Index: AQHXoH7TcxaHXYPmZ028thQHxgv/TquSDvKAgAABcQCAAFilgIAACtyw Date: Fri, 3 Sep 2021 16:14:07 +0000 Message-ID: References: <1628675138-17300-1-git-send-email-anoobj@marvell.com> <1630644420-1256-1-git-send-email-anoobj@marvell.com> <1630644420-1256-3-git-send-email-anoobj@marvell.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=marvell.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7d4403b7-7cbb-4f65-f22d-08d96ef5dba3 x-ms-traffictypediagnostic: PH0PR18MB4524: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZtIaKA25incbb7q3W8Cf8fIH6+ukIzQUZUqmb1UV4TqnbTcJcp4XqJxRupegZB6Qwf7lEn6Vaxf/Iwjbtz9fqKOCiMD2dCEFfk9YlXejONniJgRNJaDzJhlMHGYMC9i1pQah0u6htJN4WX9y9Y8qE+HZEy9OHwh28wVB7c55TYZvoGTwErH1fJIP7VEjHIBOURVZQ/b/isrmTlTpkYn5SL931Gz4j9zTopamcSez5Hre6yydSto1fCYa7lGKfZJbvVz+qqGlKH9l1pAbWtcrbYtKF36+DmbmdUx6VU52NGVY2vq2HkQA5NL3IwC5um5DvSsyaHFkgKsyhMYewylZDcHRWZGIuQfDGKQ7hfbzjELHYWmd8lLr3cCxut7GboEBQkbODnpBiWsIsJQlsEr6VQoPb1v5SdFhVHscUXRji46zASEqkCtIodvAzS7ZbriePPTM2elvVIwQ1yZ1YSCsuz8fTt+lJVigxzLILzIfYgIsJNYcsi+6esHCFSvz322WZ7G7TxzzKKdUA6sQ7MrnyL7nOA/sPPfVU2J9Oqwo9JMX4505of5N6Abdb2PFrlVlofhBCDQek+3Sx56eCOrNZjig8ntNockO1V8oV0nsfsuNiGKiLaaOPcoMQr1yFI8+oLc9FBJwxSPs20GMipOwKe/p7f0VVX7A+GiXpF66N+aL+KQAwN54ixhhi6Dbv4AJl4zV0vXQlF4Vl6FIiWxTYg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4672.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(39860400002)(376002)(346002)(136003)(366004)(52536014)(122000001)(54906003)(83380400001)(38070700005)(478600001)(8936002)(6506007)(186003)(4326008)(33656002)(86362001)(66556008)(9686003)(64756008)(66446008)(316002)(71200400001)(5660300002)(66476007)(66946007)(76116006)(38100700002)(2906002)(8676002)(7696005)(55016002)(110136005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?K1V/m/Xr1mjSCcfLGHzok5l3f89gNslV7BxwnoiOLL/HaLww8rZi/Sj90sxv?= =?us-ascii?Q?fwLO1OvyMlMR3fRBgM0WP/0I9vSkmwEaejIqpCF0n8KkEQVrgvqFhYxvE5Ij?= =?us-ascii?Q?1lK2o+4ohjOSFqwWEPZOkMT6r6x/lyz9ud0YK6gZqyjPvmf973l0+P9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ApkQXKFdFqMHir/4GrzftqTa/P72c?= =?us-ascii?Q?DpsTzWg2YkhE7BOeegUDtSmlHZmLVYN0D4nS5SjWwEmiVJkEEhW3l0mRj+DD?= =?us-ascii?Q?gjAlb6EGK+QB+/20VfjvW3R0p8oPDC41y+wrnOTACIfEZjOJxCGAhiNNfaRh?= =?us-ascii?Q?udr6Dse+2KaXn5w8BsEdsSZqJNoKs3lZ7Wl5k5Ca6Y6UcFUK/Zb2H36fwuvu?= =?us-ascii?Q?MjfqQ8jR0UMMmmffrDWpG4zqwgkPKlPo6PyEcWb2cA8oJiLqQPcsgDl7gD9C?= =?us-ascii?Q?5xXqC/52qZw/nDjVezRFnqEJZsFzAA0Iv1+bXJSqwlar2r/3FRh6m0DhEUjb?= =?us-ascii?Q?Hy8HUlAZ/IAsj/ZejSaBMRXQAjXV?= 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: PH0PR18MB4672.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d4403b7-7cbb-4f65-f22d-08d96ef5dba3 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Sep 2021 16:14:07.8891 (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: bOziG3t6mG0lat3wubfWBquSgz08YGVhQ2gQGnZlq/2+18x0/3N3JI8dUByOYgGqNWziXe1X7R/g/ufxZnKhQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB4524 X-Proofpoint-GUID: 8aSN_Vgt-FOtWmHDVaYw9nu9GXWzYNjH X-Proofpoint-ORIG-GUID: 8aSN_Vgt-FOtWmHDVaYw9nu9GXWzYNjH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-03_07,2021-09-03_01,2020-04-07_01 Subject: Re: [dpdk-dev] [PATCH v3 2/5] test/crypto: add combined mode tests 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 Sender: "dev" HI Ciara, Please see inline. Thanks, Anoob >=20 > External Email >=20 > ---------------------------------------------------------------------- > Hi Anoob, >=20 >=20 > >-----Original Message----- > >From: Anoob Joseph > >Sent: Friday 3 September 2021 11:05 > >To: Power, Ciara ; Akhil Goyal > >; Doherty, Declan ; > >Zhang, Roy Fan ; Ananyev, Konstantin > > > >Cc: Jerin Jacob Kollanukkaran ; Archana Muniganti > >; Tejasree Kondoj ; > Hemant > >Agrawal ; Nicolau, Radu > >; Gagandeep Singh ; > >dev@dpdk.org > >Subject: RE: [PATCH v3 2/5] test/crypto: add combined mode tests > > > >Hi Ciara, > > > >Please see inline. > > > >Thanks, > >Anoob > > > >> > >> External Email > >> > >> --------------------------------------------------------------------- > >> - > >> Hi Anoob, > >> > >> >-----Original Message----- > >> >From: Anoob Joseph > >> >Sent: Friday 3 September 2021 05:47 > >> >To: Akhil Goyal ; Doherty, Declan > >> >; Zhang, Roy Fan > >> >; Ananyev, Konstantin > >> > > >> >Cc: Anoob Joseph ; Jerin Jacob > >> >; Archana Muniganti ; > >> >Tejasree Kondoj ; Hemant Agrawal > >> >; Nicolau, Radu ; > >> >Power, Ciara ; Gagandeep Singh > >> >; dev@dpdk.org > >> >Subject: [PATCH v3 2/5] test/crypto: add combined mode tests > >> > > >> >Add framework to test IPsec features with all supported combinations > >> >of > >> ciphers. > >> > > >> >Signed-off-by: Anoob Joseph > >> >Signed-off-by: Tejasree Kondoj > >> >--- > >> > >> > >> >+static int > >> >+test_ipsec_proto_all(const struct ipsec_test_flags *flags) { > >> >+ struct ipsec_test_data td_outb[IPSEC_TEST_PACKETS_MAX]; > >> >+ struct ipsec_test_data td_inb[IPSEC_TEST_PACKETS_MAX]; > >> >+ unsigned int i, nb_pkts =3D 1, pass_cnt =3D 0; > >> >+ int ret; > >> >+ > >> > >> Is this testcase actually running multiple testcases under the hood? > >> I wonder could it be suited to use a sub-testsuite structure to bring > >> the testcase results up to the top level, as done with cryptodev > >> blockcipher > >tests. > >> Have you considered this approach? > > > >[Anoob] The idea behind this framework is to test an IPsec feature > >(like UDP > >encapsulation) without tying it to any specific algorithm. So what this > >does is, it loops over a list of possible combinations and then runs > >the test for each combination. The test would be like this, > > > >1. Do outbound processing to generate encrypted packet 2. Basic checks > >or validation as required for the test (for example, with UDP > >encapsulation, we would validate UDP hdr in the processed packet). > >3. Any manipulations required (like for ICV corruption negative test) > >4. Do inbound processing to get decrypted packet 5. Validate results > >based on the type of test (ICV corruption would give expect an error > >while normal tests would have the operation return original plain text > >packet) > > > >It's actually the array (aead_list) and this loop which initiates the > >test to be run for all algos. And, since we are not having static > >vectors for each test case, this approach seemed more straightforward. > >Do you think sub-testsuite makes more sense here? > > >=20 > Thanks for the explanation. > I still think having each test reporting its individual result to the top= level > provides more clarity when running tests, rather than having multiple tes= ts > being run under the disguise of one, and reporting one result. >=20 > Even without the sub-testsuite approach, I wonder could something such as > the following be more descriptive when looking at results? >=20 > static struct unit_test_suite ipsec_proto_testsuite =3D { > .suite_name =3D "IPsec Proto Unit Test Suite", > .setup =3D ipsec_proto_testsuite_setup, > .unit_test_cases =3D { > < Inbound known vector test cases as before > >=20 > TEST_CASE_NAMED_WITH_DATA( > "Combination test (AES-GCM 128)", > ut_setup_security, ut_teardown, > test_ipsec_proto_display_list, &aead_list[0]), > TEST_CASE_NAMED_WITH_DATA( > "Combination test (AES-GCM 192)", > ut_setup_security, ut_teardown, > test_ipsec_proto_display_list, &aead_list[1]), > TEST_CASE_NAMED_WITH_DATA( > "Combination test (AES-GCM 256)", > ut_setup_security, ut_teardown, > test_ipsec_proto_display_list, &aead_list[2]), >=20 > TEST_CASE_NAMED_WITH_DATA( > "IV Generation (AES-GCM 128)", > ut_setup_security, ut_teardown, > test_ipsec_proto_iv_gen, &aead_list[0]), >=20 > etc. > } >=20 > static int > test_ipsec_proto_display_list(const void *data) { > struct ipsec_test_flags flags; >=20 > memset(&flags, 0, sizeof(flags)); >=20 > flags.display_alg =3D true; >=20 > return test_ipsec_proto(&flags, (const struct crypto_param *)data); } >=20 > static int > test_ipsec_proto(const struct ipsec_test_flags *flags, const struct > crypto_param *data) { > struct ipsec_test_data td_outb[IPSEC_TEST_PACKETS_MAX]; > struct ipsec_test_data td_inb[IPSEC_TEST_PACKETS_MAX]; > unsigned int i, nb_pkts =3D 1, pass_cnt =3D 0; > int ret; >=20 > if (flags->iv_gen) > nb_pkts =3D IPSEC_TEST_PACKETS_MAX; >=20 >=20 > test_ipsec_td_prepare(&data, > NULL, > flags, > td_outb, > nb_pkts); >=20 > < the rest of the function as before but without the loop, using data ins= tead > of looping aead values > [Anoob] Your suggestion is to not have the loop walk through `aead_list` bu= t instead let the list be defined by test-suite, right? I agree regarding result reporting part. Squashing all results into one may= not be the most desired. But then I didn't want to bombard with large numb= er of prints from IPsec tests, either. The only issue I see is with a long list of tests. We are actually preparin= g chained mode tests which would have combinations. Like, if we have AES-CB= C & 3DES-CBC supported as ciphers and NULL, SHA1, SHA2 as auth supported, t= hen we are talking about 6 combinations. And currently we have the followin= g tests, 1. ICV corruption 2. IV generation 3. UDP encapsulation In pipeline (submitted with proposals) 1. Soft expiry 2. Hard expiry 3. IP hdr verify 4. UDP port verify And if we consider some of the more fundamental tests that we would add lik= e 1. AH 2. Transport 3. Tunnel (IPv4 in IPv4) 4. Tunnel (IPv4 in IPv6) 5. Tunnel (IPv6 in IPv4) 6. Tunnel (IPv6 in IPv6) Each of the above would become more like test suite on its own and then we = would have the list just duplicated for each kind of feature test. But then= , let me check an alternate approach. More like, 1. Let the common test suite setup function set flags etc to denote the IPs= ec feature (be it ICV corruption or UDP encap) 2. The list of tests (cipher combinations) would be common for all feature = tests.=20 Would something like this work?