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 DF3DAA0C53; Fri, 3 Sep 2021 12:04:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C896940E78; Fri, 3 Sep 2021 12:04:48 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 4D57740E64 for ; Fri, 3 Sep 2021 12:04:47 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1837tRTX012104; Fri, 3 Sep 2021 03:04:46 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2173.outbound.protection.outlook.com [104.47.58.173]) by mx0b-0016f401.pphosted.com with ESMTP id 3aufr88fb8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Sep 2021 03:04:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XxTK7vg4IV+xu84NaK2GaCM8wexOsysOH1B9J5d4+r34AAOYNvzB33Sca99zjQl0mfIw8jEUjjdjc4kkjxOJvP6Q4AS0UvykVrIIPx0u51z17+mXAk6R8ukJreIR7i09kx3VWYGVw5k+LcjVIEsNXjJU5rA6pdJzj7wQ99JZMqJtXePrjIPmbAOH/gUYudMhxmIRv+NMquDiPYkWkgrDecyxfZTBwtfaj3/T46OMuFu7s0R9K9X1HI0BkhFgbhGe08a2kmuMEWtogZvVndEme+l7DYZ59L/TnfelmAbFKE4RA5i7xxpfEFhpPRK4M9aBVcDmfCA7LxMJCXoB48RVog== 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=0kxd95HJjeZEL7U9mX7i1zd9tEo+sl+qKH4pr+sHklQ=; b=jbwUKy+Iooh7ypKsTx1jYc8Sl5ZzB6ZB3aFcYrcNyNssqKG2J1J6trJTL/jPgaf1ev+rX+KHPYRPAPPpYMPqZSEp+ACupLykBl8YJWfPfyfXOJLquPOsSZPf+I4Ye7Iu5jW9iFCRAkbKQDoVAk1asOayARp0avoeojq83DYya6y2x6XAQ206qPb0LVp2dCNmCf42zz1IK+OWZw4CsPJUkeAUCjtzEHeG7sAqRyJl7JVAFGLNsS5kditnK80qHx5xyxLQLEO2WTrc15dOHGjBskWjMrl5kq45KEUJBcHPCuobUrbbpXNiIrAl/LLG+IyQlREWRC1Kd1Iigc28tuj4Ow== 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=0kxd95HJjeZEL7U9mX7i1zd9tEo+sl+qKH4pr+sHklQ=; b=dkIPshkpM1DrnVnEHkh7duLKbzMsR6XG7Iw+cmTbg7fPxb1xde8uZdXrnlTq61sXWQqp//65IY86XZAiLu+/3pW1cuDkJR3t5g6Zfu4hap3nxi8nRb4F6+1zB4CVUbfzjVl7GP5zysHXVeAdFC9CxGdFZHRdPAESCz2fpngC7uk= Received: from PH0PR18MB4672.namprd18.prod.outlook.com (2603:10b6:510:c9::16) by PH0PR18MB4541.namprd18.prod.outlook.com (2603:10b6:510:a6::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19; Fri, 3 Sep 2021 10:04:45 +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 10:04:45 +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/TquSDvKAgAABcQA= Date: Fri, 3 Sep 2021 10:04:44 +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: 033c0bd4-092a-42c7-53ac-08d96ec24176 x-ms-traffictypediagnostic: PH0PR18MB4541: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OkFeSTuU2J2yhDhJ551axWgzJT9XB9cQSqj7w9AjGRGSVOeqtgrpMzvekDQXbnfyv2bahI0r+8bZLPDOLjxqLJTuGQGXL82bGTGP491TVrwz3rdFDcIWqxNaT/T1CcvqnXOrbtydo9+6Fs6hy4GItV3te4fEdwbmyfO9IDJgxVnW8WkinE7Kqk2t47l5X3U9EL8Ak1gjQKxlzsYYufUaqHKUEbC+VL7yvy0/nua/KaKxxHP4UVgIXh5Avj3IMQdb6YOgAABeg15aUaE71g9btHZnyK2XLN/oO4jU1JSJXmx73tr9GQRiuR4xz2lDxAhMNf7b9OJgQcMrcSR3e6OZP1gGax3gvkXeCssS8ttvdxbUVIdgYZeW3H9GkhdLJllXRADBnQd1pkAnpJMHFp08jfVmIqVOTIwN0Ds5zeeeaLQwPz5FO35v2UGhv6/HNThEiAlbgE1TZcMqkyNNBdkD3Y+nkiYgNfwHqTEbiur+4c9QGjQt+V4lkHjnmexpW+cRufAI40Z0vvPMlqb1qCYtLxAp3fGTbjPQ3hXhr23DBj4NmanAzAaIksatHSD5dQ+fZ0oznwu3UBk13jJ2N0zUzD5/VWrnALKZyvYjnK6LGQzSveRiZ0ScVCovRpnDTUvu1J63k3JVnQQFvVLocONG62iL/bZE9AbFfMXP3lRTyM+9jMpGwy4sO39Xmd0CMFEPfRP2MOJmM9Qo28nzJ3yNOg== 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)(346002)(136003)(39860400002)(396003)(366004)(376002)(9686003)(33656002)(55016002)(110136005)(316002)(7696005)(5660300002)(38070700005)(66476007)(52536014)(8936002)(76116006)(66446008)(66556008)(64756008)(66946007)(8676002)(38100700002)(6506007)(86362001)(71200400001)(186003)(26005)(122000001)(54906003)(83380400001)(478600001)(2906002)(4326008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?OFaUHrE6PJy8vg3W7uzVphLVryAPru8cr0AYSjL9klxLe/0/YV2qB2H98MdA?= =?us-ascii?Q?LiCRXQL+HQKH585SZB8P/UkJbQo95EsTlQytppA6hwUst4z9rSN9JtKlKIyd?= =?us-ascii?Q?F/ZgalXYqwQjtPLko/UC56oaMJXRWZFl8ymDsUa1gnQ7VZ+zfQuyCxtpoEaJ?= =?us-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ULZdvwWIjGKNKWGrRBs67BsOUODn9z?= =?us-ascii?Q?QzsLcRp4zgbVwqIr9ywbvE9b1lfK5pQRut9xOv82P5wSZMsG+csn2uoQ/zgA?= =?us-ascii?Q?UMreJY+dkuCfLYfe9eW4EQ/I5b5w97G1dmkAP8YApkZnlAK1nPU29qyW4yNH?= =?us-ascii?Q?5i6AtmqBc1nP6WjUelAG0RvBVcS3YCzDEwFLn4q9cDrAu4tlipeRRiUZUNKP?= =?us-ascii?Q?eCfstfu7XOLD51J8AIuPqpxEeYVlLyOmOeJAykl2nwkn8Af5lCf7I+OJ+egK?= =?us-ascii?Q?pBaig+rrnB2jZ2YiOCrNpS71?= 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: 033c0bd4-092a-42c7-53ac-08d96ec24176 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Sep 2021 10:04:44.9495 (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: OiJfyycb4UFuyxeIyfbARSMyWV0zQlY9vzDh01md996OWg6fN/S1qGK6ynJZNyeeVWoAp6K2Yoo9pzox29GacA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB4541 X-Proofpoint-ORIG-GUID: xpvu8hZZIbwpvA_mcWcbGTkdwaf7iQbT X-Proofpoint-GUID: xpvu8hZZIbwpvA_mcWcbGTkdwaf7iQbT 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_02,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 > >-----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 > >--- > >=20 > >+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; > >+ >=20 > 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 UD= P encapsulation) without tying it to any specific algorithm. So what this d= oes is, it loops over a list of possible combinations and then runs the tes= t 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 U= DP 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 ex= pect an error while normal tests would have the operation return original p= lain 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 ea= ch test case, this approach seemed more straightforward. Do you think sub-t= estsuite makes more sense here? =20 >=20 > Thanks, > Ciara >=20 > >+ 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; > >+} > >+ >