From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 665C8A0563; Wed, 15 Apr 2020 20:35:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 09C541D9C6; Wed, 15 Apr 2020 20:35:55 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2042.outbound.protection.outlook.com [40.107.22.42]) by dpdk.org (Postfix) with ESMTP id 30AA61C2DB for ; Wed, 15 Apr 2020 20:35:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=deUbab4G9D2z0S9Q+/tMeT2lmauiE5lsRJ1+RySPBvX8J68V5NzI31AF966ELdhVdb9szd1W4yAV8XlrvG68dtrltGdowSbSU9LLdVyLyQBKB80ZNtEPT79pECWj0lOH3zYuaLgI8rUXj2nFkSQ7g5ZS553s/EMhmuxREfHrrzSW+QK2r2LSd6twXQP0yJvWqX9xe8TA6cV0BfTBhkrcCC3qukwnn9J+8SVFIvszsART5LYRelHJWBfLn95PfuIxzPk9wxxomZwTa1sTjqSyE0jQNIzkuVpUe8S1UjIZs9KJILPQnmePLzOJPhbGVGFfs1y5CQaynWwioEbbb8wNsw== 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=New1nfxrYFhIM4e1kcKS4nBN9eNTJdtIuCYCIO5e8No=; b=UtmT5kLgg9dw8FWqavrXBoh0SC64FW3yFzmaNr5DuRDFYLklyajVyqCGAoIr/1LdKKCOvAIhGnjW9Dp/Uk4xLE7G0kBoQiIdtMS0b578EytBklqf94pH65nJo1EAKptzxTb5zVyh3tCLQtjzSRxhkklzj4KjHJkE9s141oWNhmeC3Nq3AU4uD/tgejUHzL4oS42LrQA4gm+FBij6Vi0VQSFpGAV6m8wvmadtZHQVJvg6WBnN4hxUevRleqpRbetnKnfvnR5nIRyxRyxgn5cxTwdhBxRAGt8tYoi1+w2zxXf4zuEJeRRL08JFLR+jbcBZF2BHV9tZd4Hpu8OVXqulSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=New1nfxrYFhIM4e1kcKS4nBN9eNTJdtIuCYCIO5e8No=; b=LBDmWm8RYv0wqoCTjvHba4S0Ou1T4zKpi8U8po55o2lC1p54vzjEaDvQHoXNTAYGYvO21SMKkkJkMo87QhLHTDGQi09f58wPOuSWJWstPGGVubpdso23fYDBHwbL+JSs6qbr1Gwn9SOLIAMlR4hQVGGoLojRRzJB/ft8r9QA7J4= Received: from VI1PR04MB3168.eurprd04.prod.outlook.com (2603:10a6:802:6::10) by VI1PR04MB4782.eurprd04.prod.outlook.com (2603:10a6:803:55::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.25; Wed, 15 Apr 2020 18:35:52 +0000 Received: from VI1PR04MB3168.eurprd04.prod.outlook.com ([fe80::8c03:2f5:3b48:ba74]) by VI1PR04MB3168.eurprd04.prod.outlook.com ([fe80::8c03:2f5:3b48:ba74%7]) with mapi id 15.20.2900.028; Wed, 15 Apr 2020 18:35:52 +0000 From: Akhil Goyal To: Adam Dybkowski , "dev@dpdk.org" , "fiona.trahe@intel.com" CC: Shally Verma Thread-Topic: [PATCH v2 2/2] test/compress: im buffer too small - add unit tests Thread-Index: AQHWDaRhlhVWnQmb702KIK9DOAfFGqh6jO/Q Date: Wed, 15 Apr 2020 18:35:52 +0000 Message-ID: References: <20200408125101.25764-1-adamx.dybkowski@intel.com> <20200408125101.25764-3-adamx.dybkowski@intel.com> In-Reply-To: <20200408125101.25764-3-adamx.dybkowski@intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; x-originating-ip: [45.118.166.69] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 58bf0216-ccc6-47b1-fd12-08d7e16bd3e7 x-ms-traffictypediagnostic: VI1PR04MB4782: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0374433C81 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB3168.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(39860400002)(376002)(136003)(346002)(396003)(366004)(186003)(86362001)(55016002)(8936002)(52536014)(316002)(5660300002)(81156014)(8676002)(9686003)(7696005)(33656002)(26005)(2906002)(110136005)(4326008)(478600001)(44832011)(76116006)(66446008)(66556008)(64756008)(66476007)(66946007)(71200400001)(6506007)(160913001)(15963001); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UhoNtVXejjzV0QN9QtUCoeKOplYLnWx0gmtnmxYHBjhuk+o6pQCx7jUVUS+iByE2Szy3ohPNs9kNRvMrUGuzxlJsiplhlw8v0moQVXgOaTELMvknSjtZyIc8htI7Mmbpbt2QeEbhIQn382thn2osY04thReLHRBewzCqFI0ebI8/s0BWwDaC4YO0MK6n3RocxX8jIBDRY9m7Ox4UMKyk/KQraXDCYTjELrPs2Qx/g1DCvVxXPkWLlAlpxa+k2BjCWfRJ+nVdvlKwUVIbzh371Ac7q3roV1KALy2f5RHlkxg9H53RmAVPbc2qn0ME4pS/o2ZM+TPyfnBbUMPK/S+wPGKDevDqPd43CZ1LSSeiOxxfMyaaODVrogTNS68Wnt3A64uA/ooLyEBC827XiCZwoDurW5FUdpy0yH0j30966KXmfBUuG+0tlD17owMM0puWAGEGwfLZvXcB9p0fTa9spUGMTxxdOf6IDgwrds4aWx44FA85g8Ol1baHOfB+Gqc5Dz7s7OPOHrQ7P/kKWckBuA== x-ms-exchange-antispam-messagedata: jhjsj157wLv/86qMqbmxXk3tKxTor6ryFboNYCJZ8IB1pFE3gWcfkgDXP9awwgXaSCMcaoKkO9+v0Dz6tB4EC+sF4B6Th+NBGGhi4tW3aVfQZEKF3+W4TerdS92a/AhSlfcYOV/nMeW6J5UPo+TNVg== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58bf0216-ccc6-47b1-fd12-08d7e16bd3e7 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2020 18:35:52.8311 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DCzrXmcHNgl+u4f0od04G1VEULvIj2mFYcAkCidrOPNnmjsNdUvvzv/iwY5vIUVa4Z+i0gMeeRNauhNeW09NmQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4782 Subject: Re: [dpdk-dev] [PATCH v2 2/2] test/compress: im buffer too small - add unit tests X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Fiona/Adam, > This patch adds a new test suite for verification of the "internal > QAT IM buffer too small" case handling. These unit tests are > specific to the QAT PMD only - that's why they are contained in > a separate test suite. >=20 > Signed-off-by: Adam Dybkowski > --- Why do we need to have separate testsuite for QAT? Can't we have a single one and based on capability of the driver, Determine which tests need to be skipped in case they are not supported. This would create a mess in the longer run just like cryptodev. Please fix this, we cannot take this patch as is. > + > +static struct unit_test_suite compressdev_testsuite =3D { > + .suite_name =3D "compressdev unit test suite", > + .setup =3D testsuite_setup, > + .teardown =3D testsuite_teardown, > + .unit_test_cases =3D { > + TEST_CASE_ST(NULL, NULL, > + test_compressdev_invalid_configuration), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_stateless_fixed), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_stateless_dynamic), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_stateless_dynamic_big), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_stateless_multi_op), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_stateless_multi_level), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_stateless_multi_xform), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_stateless_sgl), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_stateless_checksum), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_out_of_space_buffer), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_stateful_decomp), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + > test_compressdev_deflate_stateful_decomp_checksum), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_external_mbufs), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_stateless_fixed_oos_recoverable), > + TEST_CASES_END() /**< NULL terminate unit test array */ > + } > +}; > + > +/**********************************/ > + > +static struct unit_test_suite compressdev_testsuite_qat =3D { > + .suite_name =3D "compressdev unit test suite for QAT PMD", > + .setup =3D testsuite_setup, > + .teardown =3D testsuite_teardown, > + .unit_test_cases =3D { > + /* Positive test cases for IM buffer handling verification */ > + > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_im_buffers_LB_1op), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_im_buffers_LB_2ops_first), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + > test_compressdev_deflate_im_buffers_LB_2ops_second), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_im_buffers_LB_3ops), > + > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_im_buffers_LB_4ops), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_im_buffers_SGL_1op), > + > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_im_buffers_SGL_2ops_first), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + > test_compressdev_deflate_im_buffers_SGL_2ops_second), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_im_buffers_SGL_3ops), > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_im_buffers_SGL_4ops), > + > + /* Negative test cases for IM buffer handling verification */ > + > + /* For this test huge mempool is necessary. > + * It tests one case: > + * only one op containing big amount of data, so that > + * number of requested descriptors higher than number > + * of available descriptors (128) > + */ > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + test_compressdev_deflate_im_buffers_SGL_over_1op), > + > + /* For this test huge mempool is necessary. > + * 2 ops. First op contains big amount of data: > + * number of requested descriptors higher than number > + * of available descriptors (128), the second op is > + * relatively small. In this case both ops are rejected > + */ > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + > test_compressdev_deflate_im_buffers_SGL_over_2ops_first), > + > + TEST_CASE_ST(generic_ut_setup, generic_ut_teardown, > + > test_compressdev_deflate_im_buffers_SGL_over_2ops_second), > + > + TEST_CASES_END() /**< NULL terminate unit test array */ > + } > +}; > + > +static int > +test_compressdev(void) > +{ > + testsuite_params.suite_name =3D compressdev_testsuite.suite_name; > + return unit_test_suite_runner(&compressdev_testsuite); > +} > + > +static int > +test_compressdev_qat_specific(void) > +{ > + /* All tests are run on device 0. Check if it's QAT PMD. */ > + if (rte_compressdev_count() =3D=3D 0 || > + !ENDS_WITH(rte_compressdev_name_get(0), > "qat_comp")) { > + RTE_LOG(ERR, USER1, "QAT PMD must be loaded. Check if " > + "CONFIG_RTE_LIBRTE_PMD_QAT is enabled " > + "in config file to run this testsuite.\n"); > + return TEST_FAILED; > + } > + > + testsuite_params.suite_name =3D compressdev_testsuite_qat.suite_name; > + return unit_test_suite_runner(&compressdev_testsuite_qat); > } >=20 > REGISTER_TEST_COMMAND(compressdev_autotest, test_compressdev); > +REGISTER_TEST_COMMAND(compressdev_qat_specific, > test_compressdev_qat_specific); > -- > 2.17.1