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 C3C84A0524; Tue, 13 Apr 2021 19:51:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4047816123E; Tue, 13 Apr 2021 19:51:35 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 3DC7D16123D for ; Tue, 13 Apr 2021 19:51:34 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13DHZG43001824; Tue, 13 Apr 2021 10:51:27 -0700 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2102.outbound.protection.outlook.com [104.47.58.102]) by mx0a-0016f401.pphosted.com with ESMTP id 37w6vuhy88-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Apr 2021 10:51:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ln6N0UXrn/kdEQkxfofW9cvWtVzcxcBoHl4kVBrApEfIiiJPzCj9bJAgiV39U+m9HxprEcaXznT9RHx5cKg3fjbYnNbX7wFC1n4fZuTPZH8eFEyckaQ3z4oiZeberqdtlI5cahaZuKBgJ9KnBYB09bKZy7QDESEWNzDJcBi48vBVs/QEQttx69jvBlnWtBeqiTwfpe7JqeLulKtLs3pbz2wXH1LYIaDM9Lt/ZQSAJHMWU8YOnQ+h3bFB/44/7FGymDPUz00RBs/F+31BVB0HkEmMg6cwPS5va3MAQGsG3gSUCAWJkbu6uFmHLDoLfgr1BsZIfuJN/d0pUNfTulCaPg== 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=LfFrYed0wzBq8PHx3IGLZAF1HRjzvFfleKdb/n0TrJ0=; b=D7FYVQ7+QakctKbaoWCWbh5tqvM02XRZRLk7N1Drm4pzEcc0Ovy1WgZYkUpzJXUs7ju7J0roYPAUywhbZmjyObTG0Iq67ihBEfFyTzzreEplnap0a9FEsWh4cwHVjhzynjngmRa/SD5PyFF9nHdbfqQKMCyM+5HpFQ2Ls0PBWyg9/wVUUSFuvDaTv6hGARZjrJuYUCzSgORJnXHbEl9tYaOJ8FqqcvQlRYJbHJ7d3TOuOVc6svqkU4hzJyb8eS4gLogw35M9/jQaOGGVSmH0Rx0LDYU70BFF08gdgvcMKm+OTNRDqSSW6Xrl2z95u3wyYL84jk5S4fkDqfzSJAH9qQ== 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=LfFrYed0wzBq8PHx3IGLZAF1HRjzvFfleKdb/n0TrJ0=; b=er7dpaeaaN549sxcyySQ6UrLUaWV2Bv6a+gGuYiCEHamNaKADZME8nmefHdzfRY8Dw0s9z+SpHkRhMtIhWfGbxWj1sm6IuAhV1wmrrnyfnai8nyw497zA1m1XBT4jnxAvbJavhsmxxiEAYEaKsmRJor4Cn4FhoD9zmuUu7qLY+g= Received: from MW2PR18MB2284.namprd18.prod.outlook.com (2603:10b6:907:10::16) by MWHPR18MB1101.namprd18.prod.outlook.com (2603:10b6:300:a2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Tue, 13 Apr 2021 17:51:25 +0000 Received: from MW2PR18MB2284.namprd18.prod.outlook.com ([fe80::3168:cb00:6607:743f]) by MW2PR18MB2284.namprd18.prod.outlook.com ([fe80::3168:cb00:6607:743f%7]) with mapi id 15.20.4020.022; Tue, 13 Apr 2021 17:51:25 +0000 From: Akhil Goyal To: Ciara Power , "dev@dpdk.org" CC: "declan.doherty@intel.com" , "aconole@redhat.com" , "hemant.agrawal@nxp.com" , Anoob Joseph , "ruifeng.wang@arm.com" , "asomalap@amd.com" , "ajit.khaparde@broadcom.com" , "g.singh@nxp.com" , Matan Azrad , NBU-Contact-Thomas Monjalon Thread-Topic: [EXT] [PATCH v2 3/6] test/crypto: refactor to use sub-testsuites Thread-Index: AQHXJ8v0IGOnaSkXdEK/hUlyc2SKGKqyw/Fg Date: Tue, 13 Apr 2021 17:51:24 +0000 Message-ID: References: <20210402142424.1353789-1-ciara.power@intel.com> <20210402142424.1353789-4-ciara.power@intel.com> In-Reply-To: <20210402142424.1353789-4-ciara.power@intel.com> Accept-Language: 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-originating-ip: [182.69.47.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2d5018ed-c90b-4043-5364-08d8fea4c1b1 x-ms-traffictypediagnostic: MWHPR18MB1101: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vGA5JMc7yo4SoHYjtvdbf4wAApuDUwFaF3NVS420rjPxYdA9jvgCX6j57HYVAzJLK37kkHSQqPJt3zA90YXGuxqvvTo+d6sZYNlg0e8rRSQHCUoxlEeAPr8ellUSeuyaTZAk2TRwSXgLfzSO09xUNjHnAIXAeZPGPeYA+mZv3/44yh9wae+ZGKPS5b1Ozk3x3ytsEK5KlU87GSDgJwmDN+yiRiBxPgIzpUnE3diKRo1F9WkWzwRje96IffGJvqxGjSqyRQX+VGIWcGkjcI4dl/2aOdfIKWmCg3IuCsU6a+LODy1G6SaOtDv0Sv5olh9Bys+QzW7BloD1V9mjxSWxiShalg2WgY+6KX7IDt5WLvF/Kf5SZb1bgcDfIwhKvy5uRseZF9QbwySWystJKnK5tZjPa8CQxyA46w2UWV3apUIx1ZlUBL1Utc1kj4rIIp+xbTumgLSUZDBFjuyXKx+wjuC1YXXgUVupXi+wwT6q2nSexmcee6Ve998JnV0E35JpaaBRqllZGlOmjEGthhJBnMm3y9K+PjGk479+gcne9PPOkYwKyIjeNUe1BFDePBeV4DHwiFmdaGBbtuH1vNiumnmzyy8w3Q2q+ywrC667dpk= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR18MB2284.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(39850400004)(376002)(396003)(346002)(9686003)(8936002)(33656002)(52536014)(186003)(83380400001)(122000001)(38100700002)(2906002)(66446008)(66556008)(86362001)(64756008)(8676002)(66476007)(55016002)(7416002)(76116006)(66946007)(478600001)(6506007)(316002)(7696005)(5660300002)(110136005)(54906003)(71200400001)(26005)(4326008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?jhJuBpgg7rH0ZSgFmbqHih/9tTtrTyim34BU2FjIrKs08yTw13KZ7c3pbTe8?= =?us-ascii?Q?IK+XaJ9hfGjp6kkViyxRI4PaE0xPQPtDFRdLqlb4Tyo1zyjnBpr1nCp/PNyG?= =?us-ascii?Q?0kJgmt4QKdehyVcFiAd05QvhqTLBH5y86uNc7KgVRcBn4GJhcCTyVvPN6rqm?= =?us-ascii?Q?yKAYUw9L369+RbtzeY9/7VIlIHmJnA0dMGv9gdWBZ8GCDgoNOcVXd0v//oTR?= =?us-ascii?Q?WPxiHHVadymqXUBZjy5P/l5Zbq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4XARvrIPuiNJlc9T3MaGXIPYMEdJsUIlRWr3UZIck9E/jNyMSTG1uCAeW?= =?us-ascii?Q?/JCSN2Gx1jt+aEgDviGTWljx7YARXryqg2LUSoMG0CxfV8FYy2rm9ZG7ZDnv?= =?us-ascii?Q?eZJNH4V2rJEqZ/t0rhcOWTGBg6JqJ8H9W5HlYx7yLTcjoiXAorAdvJd4z6r7?= =?us-ascii?Q?q24=3D?= 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: MW2PR18MB2284.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d5018ed-c90b-4043-5364-08d8fea4c1b1 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Apr 2021 17:51:24.8691 (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: +Lm5Qk/FtZSZ5jI87wDz9F+86g+wfEMuD+hsZ/iodwTpuuxEi1+qJ+7UbljC2AoMPZU32nUQNa+uxyI9a5jm1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR18MB1101 X-Proofpoint-GUID: Bif-1BmZ3QAMxwA6flbjR8FDkiJzCfdI X-Proofpoint-ORIG-GUID: Bif-1BmZ3QAMxwA6flbjR8FDkiJzCfdI X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-13_12:2021-04-13, 2021-04-13 signatures=0 Subject: Re: [dpdk-dev] [EXT] [PATCH v2 3/6] test/crypto: refactor to use sub-testsuites 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, //snip > nb_devs =3D rte_cryptodev_count(); > if (nb_devs < 1) { > RTE_LOG(WARNING, USER1, "No crypto devices found?\n"); > @@ -838,6 +630,228 @@ testsuite_setup(void) > return TEST_SUCCESS; > } >=20 > +static int > +qat_testsuite_setup(void) > +{ > + return testsuite_params_setup(); > +} > + > +static int > +aesni_mb_testsuite_setup(void) > +{ > + int32_t nb_devs, ret; > + nb_devs =3D rte_cryptodev_device_count_by_driver( > + rte_cryptodev_driver_id_get( > + RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD))); > + if (nb_devs < 1) { > + ret =3D > rte_vdev_init(RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD), NULL); > + > + TEST_ASSERT(ret =3D=3D 0, > + "Failed to create instance of pmd : %s", > + RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)); > + } > + return testsuite_params_setup(); > +} Why is it required to have a separate function for each of the PMD? I believe a single function with an argument should be sufficient. And in that single function a simple switch case may process the vdevs diff= erently. As of now, it looks that moving the unnecessary duplicate code from one place to another. This was one cleanup we have been looking forward to from quite some time. Every time a new PMD comes, a separate function is formed and the length of the code increases. //snip >=20 > -static struct unit_test_suite cryptodev_virtio_testsuite =3D { > +static struct unit_test_suite cryptodev_virtio_sub_testsuite =3D { > .suite_name =3D "Crypto VIRTIO Unit Test Suite", > - .setup =3D testsuite_setup, > - .teardown =3D testsuite_teardown, > .unit_test_cases =3D { > TEST_CASE_ST(ut_setup, ut_teardown, > test_AES_cipheronly_all), >=20 > @@ -13935,15 +14107,12 @@ static struct unit_test_suite > cryptodev_virtio_testsuite =3D { > } > }; >=20 > -static struct unit_test_suite cryptodev_caam_jr_testsuite =3D { > - .suite_name =3D "Crypto CAAM JR Unit Test Suite", > - .setup =3D testsuite_setup, > - .teardown =3D testsuite_teardown, > +static struct unit_test_suite cryptodev_caam_jr_sub_testsuite =3D { > + .suite_name =3D "Crypto CAAM JR Sub Unit Test Suite", > .unit_test_cases =3D { > TEST_CASE_ST(ut_setup, ut_teardown, > - test_device_configure_invalid_dev_id), > - TEST_CASE_ST(ut_setup, ut_teardown, > - test_multi_session), > + test_device_configure_invalid_dev_id), > + TEST_CASE_ST(ut_setup, ut_teardown, test_multi_session), >=20 > TEST_CASE_ST(ut_setup, ut_teardown, test_AES_chain_all), > TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_chain_all), > @@ -13955,58 +14124,28 @@ static struct unit_test_suite > cryptodev_caam_jr_testsuite =3D { > } > }; Splitting the complete testsuite into logical generic algo based sub testsu= ite Is a good idea. I appreciate that. But introducing PMD based test suite is not recommended. We have been trying from past few releases to clean this up. And this patch is again int= roducing the same. When I first saw this series, I saw only the algo based splitting= and when it was run on the board, it was showing results in an organized way. But this was not expected that, PMD based test suites are reintroduced by Intel who helped in removing them in last few releases. This will make an unnecessary addition of duplicate code whenever a new PMD is introduced. I recommend to use a single parent suite - cryptodev_testsuite and there Can be multiple sub testsuites based on Algos etc. but not on the basis of = PMD. Regards, Akhil