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 47205A0C54; Fri, 3 Sep 2021 17:04:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42EE3410FE; Fri, 3 Sep 2021 17:04:44 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id B56B0410E0 for ; Fri, 3 Sep 2021 17:04:42 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10096"; a="217584270" X-IronPort-AV: E=Sophos;i="5.85,265,1624345200"; d="scan'208";a="217584270" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2021 08:04:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,265,1624345200"; d="scan'208";a="500431818" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga008.fm.intel.com with ESMTP; 03 Sep 2021 08:04:40 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 3 Sep 2021 08:04:39 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Fri, 3 Sep 2021 08:04:39 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.45) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Fri, 3 Sep 2021 08:04:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cyVNfNvNGN+WvJKMdUgnPb6OczSYXD+5VhE7tVhoWz3XJ9FVO9LPlJxBpALZeReVXzxmJ5+hCz3ZR2HQUoR5A7BNK/lBvcc8ssBa34MAzQov4pcOQ40XD3xTZL2VUyZ4s3EOT1C3Iz8MG4YXaG/Tav8SIu4NST7gQqYbcsryMFlfoATdXXvzVinxN6sMW14uNYjkKlmEx4ZfsUFZrPo5UqQhx/NRsdnyTU7rDqEbcVRs/8xcMr+d837hrxqSBxYLhkNu96/Zr9rl+wklloNLOCP4OP3+D/9uqSJLDVxKotmO+ruW0sOOksVFOb+8zkLXxeQkbYRQlZi6GnlCp9Cihw== 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-SenderADCheck; bh=m8ApVtaa/T5AX3Owy+PTcoLQsczQs8ug5Gopeijzh4k=; b=RZSzmGiTSkiXswOEfC3QTFcL3taLTakL5dPjVPMaNlYyC2CwOImlfn6QI1B6BNq45MR9AeFWiJ9jl+hznVbM6esGmD8lyZJGiNMfz9F+4tKihzsOdCv9rd03QCm7/PK6Pn1h0qY9RjEVYMXyUt/w/ejSoK3pPSTlUQLK0ZP2LFCMMCyimLr2wT/xIlV10vKDbvR/noF+1J+N1VwCDwsZJ8eHGoUvRi95CpGNYmSL275AcRMmCKvFvhpzIvzoHRFuM/MCYG4x7u5TKgEs6v8HQEe8OjTROH3ny+AWLNUt69ivENDW9KvHN+nGw3DWiJcfhEVx3EX848qdk2B25L83yQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m8ApVtaa/T5AX3Owy+PTcoLQsczQs8ug5Gopeijzh4k=; b=WOfqIojcV/9M1tB7ux2ncqRrJEsKAC9LEsHSiwdHtlYTdCXQ/A2iwCCZGrQxkIV0jkmAw2tfif28/yIDsbwj8LtI+hPuIsKEL1XeqyOZdbQG6hoCqJ4C3wLDzSyEwpzmERVu0w362BcNtUIUHezxiyuREXGYH+xJZ0yyWa3qv+c= Received: from MN2PR11MB3821.namprd11.prod.outlook.com (2603:10b6:208:f7::24) by MN2PR11MB4159.namprd11.prod.outlook.com (2603:10b6:208:13a::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Fri, 3 Sep 2021 15:04:38 +0000 Received: from MN2PR11MB3821.namprd11.prod.outlook.com ([fe80::ec2a:14c6:a7de:bcb3]) by MN2PR11MB3821.namprd11.prod.outlook.com ([fe80::ec2a:14c6:a7de:bcb3%6]) with mapi id 15.20.4478.022; Fri, 3 Sep 2021 15:04:37 +0000 From: "Power, Ciara" To: Anoob Joseph , 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: AQHXoH7WDhk0tg6QY0eBWiwtc4kI5quSDgwggAAHMwCAAE1AIA== Date: Fri, 3 Sep 2021 15:04:37 +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-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.200.16 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b74003e8-eea1-44e7-d243-08d96eec260f x-ms-traffictypediagnostic: MN2PR11MB4159: 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: 4FQMkPjLUB/7UbXr+YbnwKxkdE1zyiBYWWUfssyLOfSx6S1A7FK+kfdVf70S+0RFsbjHAMRu++FfABUcyMIdvQBcLbm8YgiRQ1nvYObYTFbvIzYHR9APfv5y4aNXltalkTi+dgKfRUASp9rD9nYMfmOWHd8fsYQMCuVeQTe6irykU8dKNKQNNVvRaqbBW6p8x30OOCNH8dmh5B2GMgkbrlhp14pJQcx6Utmkhe9O257MTF9TNRlT2FwdRqEPi0eC8hdrhlFhRkcVLAe13V4PgLFJB/UVygApJRmGUF/i63ElkteVuRLeoQ+e8+jLUdNkzOECn42js1bd2GrFddI4XeTHBMch/KiUXM6E7w5PwellIISltgQjMeqpVePObITQLI0lsInQb58RXbVhxYcESdsqDPZCdota3e9oXYPWnAWZQvxuN2VREaxkYqtvlWjsx7ItRz0RO/CpPcBm9leBURH2Em+8UQNG+1O5FEes3Kwg8s33xh1Q3Uk8ZcepFu2qK1rN4jFzlHjvF1soIDjzXx2hHynCNzVKVw2JWHiE8u1ytnkTDQKjqhDuLn6oV/b7MuEsn0Y84yXeoXHNOL/ED1MR6kYTaSk/W+HR5NOb5UV/R7ew//8C7IzL+raBb2Uw0Kfz8q9yREjqhOyfXWx+DGQ7p4U9RuvY570yXFhnZo+1Ooikzl3JALHclXQmv9LaL2OHUKhgiBBNvDipJw9Ehw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB3821.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(136003)(396003)(346002)(39860400002)(366004)(66946007)(38100700002)(8936002)(71200400001)(186003)(83380400001)(110136005)(64756008)(4326008)(6636002)(66556008)(5660300002)(38070700005)(66446008)(66476007)(2906002)(9686003)(76116006)(7696005)(478600001)(52536014)(26005)(316002)(6506007)(55016002)(33656002)(8676002)(122000001)(54906003)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Fl8624UhbVG4C6k04tLEIQexjQva7QmglECOTK5WpQlYImcwPnkc2yap4MZY?= =?us-ascii?Q?fIKbzhzwTolJhVC5id3nkjvT1Kc+bGxVK8W91CweXM9jzVUA3h7Jr5bKPmSq?= =?us-ascii?Q?1P/awIoZBVkUrEVlJIgxJPk3t/08JmVoV4JsnfGqN/ZthgOsOMh3tnyjOjyq?= =?us-ascii?Q?nYXdaGBssqamDmVpUoymXXIJVGsTdV+cY4cp7+uHD7PU2igCUXXV8ZV0BT0b?= =?us-ascii?Q?bwoQ4290KzU92hJrq1xgscjY9qtEcf2UfaBCQLn8iOn1JCB5GO5MgZ3qGJtI?= =?us-ascii?Q?I/kHFiJRMdEdgJMyUmfulesNAY3EHQc+LxQ8G+Nd7UQbXXrkUHMKEMBPsjma?= =?us-ascii?Q?tROLEzehEyMTn8DnTxPPM7sB2HznyiftD5n4Qg/hIPrFz5NfH9E3Nv86XMp7?= =?us-ascii?Q?aONfjmIsTceMWZXfyxFyPDXu+w1USVU6xZtOPdCXvUn1n2ciCt6kRE94fyCz?= =?us-ascii?Q?1m07JeCNsMQWV/sLuiti+U/wntz24EVHM7WmyJdLtvTXT4IGWEz0Q57oHKMy?= =?us-ascii?Q?bcf/XzpUkYydFdrMRuqX38x/ZSUb9l92LrHSkid48X6eYJqQoibdboKRRRPK?= =?us-ascii?Q?t8bJNt05hdshgfu2asoAaqG0uBH40aKP3Db8/aRTpea66UbV0yG2D0KEcgtJ?= =?us-ascii?Q?2ogsJAgP9Pg2lm4v0xRIrMiMK2qHWZpeccZqcbl+MAVEpu4l1L6ajXpg4OYt?= =?us-ascii?Q?CLiIyroT8HoKweiVLGga/KkFny+zpxF7cCL8b7ZHGbN7hInXKHVtWqB9R9mU?= =?us-ascii?Q?i5l4tXh4HFhlS2/kOgLCbK9Hd60//7t0+wkmc/R9gTApuynY4CGE9wmXEiQb?= =?us-ascii?Q?ebyB7/HfUFNq06m8+POXXekVFWcE/XBUAC105JWE29dlG/JlipJEwrZPL1T5?= =?us-ascii?Q?esFUydTDWfq4IcvXdvod0RjSeyXyWs8tQUwNlov3lUOwO+1OpAQAnKJbpfqH?= =?us-ascii?Q?y/6lUq5eC2FuW/5gIraj1+Zrgszb/o/cm8TgoZ2BE+2hTQxSWECQheL2PW8M?= =?us-ascii?Q?LuxlI5DZ4u7AW+muoeNsNqkFTUNV9C2bIaDF2cxQO9dQFp5wGxHjeIp6Mvaq?= =?us-ascii?Q?oVob4JFrPe7Qsq23//X1lUf/ko+/mdsQuAfMDajvTrWCQiPm3x6VDAvPF/Sq?= =?us-ascii?Q?/Z/Wq3wPWGQtSwSIGlZ1vbAVhxm8hk1rNWHW9tsDjrRswa967trcL3EQByCT?= =?us-ascii?Q?ZB5/CkiYNSKoUYuY3k/J1bDQv8CS4DxTpZhg5L++xEL/mje8cxH35YnG6G6w?= =?us-ascii?Q?zt1B49YTpNXuOMQVR5Zc42X4fNOP6AOstWB1CG6ALVebfDX5D/9o1xSAZrar?= =?us-ascii?Q?9zE=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: MN2PR11MB3821.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b74003e8-eea1-44e7-d243-08d96eec260f X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Sep 2021 15:04:37.8594 (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: 23NMn9CUn3Z4PMGeqrpUghLAd+IfqwP1jdmHWMjvcJ61JKcBqOQM5YqGOWXr/JabXSyVkNx/GBba96bTCLQzGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4159 X-OriginatorOrg: intel.com 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 Anoob, >-----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 blockci= pher >tests. >> Have you considered this approach? > >[Anoob] The idea behind this framework is to test an IPsec feature (like U= DP >encapsulation) without tying it to any specific algorithm. So what this do= es 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. D= o >inbound processing to get decrypted packet 5. Validate results based on th= e type >of test (ICV corruption would give expect an error while normal tests woul= d 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 mor= e >sense here? > Thanks for the explanation. I still think having each test reporting its individual result to the top l= evel provides more clarity when running tests, rather than having multiple tests being run under the disguise of one, and = reporting one result. Even without the sub-testsuite approach, I wonder could something such as t= he following be more descriptive when looking at results? 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 > =09 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]), TEST_CASE_NAMED_WITH_DATA( "IV Generation (AES-GCM 128)", ut_setup_security, ut_teardown, test_ipsec_proto_iv_gen, &aead_list[0]), etc. } static int test_ipsec_proto_display_list(const void *data) { struct ipsec_test_flags flags; memset(&flags, 0, sizeof(flags)); flags.display_alg =3D true; return test_ipsec_proto(&flags, (const struct crypto_param *)data); } 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; if (flags->iv_gen) nb_pkts =3D IPSEC_TEST_PACKETS_MAX; =09 test_ipsec_td_prepare(&data, NULL, flags, td_outb, nb_pkts); < the rest of the function as before but without the loop, using data inste= ad of looping aead values > Thanks, Ciara >> >> Thanks, >> Ciara >> >> >+ for (i =3D 0; i < RTE_DIM(aead_list); i++) { >> >+ test_ipsec_td_prepare(&aead_list[i], >> >+ NULL, >> >+ flags, >> >+ td_outb, >> >+ nb_pkts); >> >+ >> >+ ret =3D test_ipsec_proto_process(td_outb, td_inb, nb_pkts, >> true, >> >+ flags); >> >+ if (ret =3D=3D TEST_SKIPPED) >> >+ continue; >> >+ >> >+ if (ret =3D=3D TEST_FAILED) >> >+ return TEST_FAILED; >> >+ >> >+ test_ipsec_td_update(td_inb, td_outb, nb_pkts, flags); >> >+ >> >+ ret =3D test_ipsec_proto_process(td_inb, NULL, nb_pkts, true, >> >+ flags); >> >+ if (ret =3D=3D TEST_SKIPPED) >> >+ continue; >> >+ >> >+ if (ret =3D=3D TEST_FAILED) >> >+ return TEST_FAILED; >> >+ >> >+ if (flags->display_alg) >> >+ test_ipsec_display_alg(&aead_list[i], NULL); >> >+ >> >+ pass_cnt++; >> >+ } >> >+ >> >+ if (pass_cnt > 0) >> >+ return TEST_SUCCESS; >> >+ else >> >+ return TEST_SKIPPED; >> >+} >> >+ >>