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 B0145A034C; Wed, 22 Jun 2022 19:30:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED8434282C; Wed, 22 Jun 2022 19:30:16 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 0CF5542824 for ; Wed, 22 Jun 2022 19:30:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655919015; x=1687455015; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=04bGQ/QtwryPzLgCQrkDvkQLQ3Sxnh1db+AlbFNhOmU=; b=Z+KHv9GRTyOyvtc57ofOV+oyit8cY59DivnouPqO+F2etIomB2VgXkKX krVRYEsEh6PLZ6ilFIgD1BXKAKEu8zTJuaRATN1zi5eB5JwgzsPakyjNo 6bezOGDm5SrafCcerwhuHye0fHj6oOXwy79jUDGhXkVt/faNkkvdoTLBo IAnUoit1AXmVBwPUEM/CeBc69Zw/LoecVZKFY7fpPDNVqbsEXSn802DG3 8GCm9Qon/BD1dS9xqSSSwRZEe0eniaPO4BrWE/igpJrj3OUZ3yYbB1C6L VtQKPDEEpG4WvGuWaOfxtL42kBg1b9jY+/1YDZnkHACDGvL5/9aI+S4ee Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10386"; a="342170307" X-IronPort-AV: E=Sophos;i="5.92,212,1650956400"; d="scan'208";a="342170307" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 10:30:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,212,1650956400"; d="scan'208";a="690608775" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga002.fm.intel.com with ESMTP; 22 Jun 2022 10:30:13 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 22 Jun 2022 10:30:13 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 22 Jun 2022 10:30:12 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 22 Jun 2022 10:30:12 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 22 Jun 2022 10:30:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MQxO4va+xEOWGhfFvKYf9PZ93Oo/IZWcID2EwV9EcfOt1y5lX/VvyRFe1Sm17NQSeONkEngwNPS+BXbJwn3RQGeieTH06LtOyVJUveZH1VjjCOE3+z4kOsSaa4jCIRuLhcBKIO7qKe29OPpr1nJ5umW5awbzmmzr7c3W4OnhX3zz4GkLkPoXafhBkvDPzZhH/pMjwPC8X31Nqhk5OwCFdSUBcVxQm9G8AO9EgjWGPdze1hiorN5mX+OUkL31B5bgC27id5cHGIB1SH7PzSmod0xiQBA+OZPYcNsnyo3cP6agh+mB/2oZmGIsGRDCxHICH8oizoTgDFFhIHsE1VX50w== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PBmBP+TIhWXGl5iRe9LDI6ASSAXW8s58e+78FPNJL8w=; b=lgbgFctAUhwAgfvtyjDWYJq89X4sVgFaC6D/tH82a1KEW7FrQ49szn57Z8lUcNQgOcXcju9R4IPuIj3MkDry9HjLPrqhK9DKekFRTbZElmG8TmC2+8Lf4PsMZ3LDYoU5kNwH2uZK7e0UE7ZXIN+RKMxFYN7KXBUE5cqp1fr58BlPPac6F5IejblwRXcpvYWvEMRbTod+s33mhOSh/MldlToFqXpNX7yOoJJsE8vpwNH9LyfzNYtfRcTZ7/V3Skd9C0YNUEvAuLWf7DZIJbvJnKJB19qGMO88os1fx4Pul00J7tCSh/nxfTb+344zkBCajwdp3N/ax2/0zX3HnWdXRQ== 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 Received: from DM6PR11MB3868.namprd11.prod.outlook.com (2603:10b6:5:19f::13) by BL1PR11MB5320.namprd11.prod.outlook.com (2603:10b6:208:316::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Wed, 22 Jun 2022 17:30:11 +0000 Received: from DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::3d91:62dc:c665:9083]) by DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::3d91:62dc:c665:9083%6]) with mapi id 15.20.5353.022; Wed, 22 Jun 2022 17:30:11 +0000 From: "Naga Harish K, S V" To: "Kundapura, Ganapati" , "dev@dpdk.org" , "jerinj@marvell.com" , "Jayatheerthan, Jay" Subject: RE: [PATCH v8 5/7] test/eth_tx: add testcase for instance get API Thread-Topic: [PATCH v8 5/7] test/eth_tx: add testcase for instance get API Thread-Index: AQHYhli4NMMVTJJUwkOP7NPEFJtqrq1brrrw Date: Wed, 22 Jun 2022 17:30:11 +0000 Message-ID: References: <20220622103756.421869-1-ganapati.kundapura@intel.com> <20220622165405.533042-1-ganapati.kundapura@intel.com> <20220622165405.533042-5-ganapati.kundapura@intel.com> In-Reply-To: <20220622165405.533042-5-ganapati.kundapura@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8728d6f2-9aa9-4660-8276-08da5474dc15 x-ms-traffictypediagnostic: BL1PR11MB5320:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OzGJDMollVdsn6VB+qqp46c0V122Bgigd0ZWyZJABdLntjKublKz+SEslkrCqAbQqSrlQwXA0hXPdCl030ab0Ff8UcvTzhJz5V3BNlr4cz+4BJcFob6LQqR3IcGU3uer9WIrubychBHTzdkNW5tuTN79vK/wFjwT5Ho/yq+8e+kY8g1K0g59c0zNwNNDvqOBCdYY4xaowFtuc89usYvXlU2uTl6vhpbQJcKNlap9b33nUuefnpqH8PIQxAikwMjrRTyaZatq399AVoofQacYqmzWcmOTTZWecUcZ8IuKhPgJLFuf+JWozfCdHnVHKYo5wRztkgbZpYaldtm0BDsToN5SrhlPxFsphEhKYGwiScJfMVwHiwaqw3HrcXjIPc8S3maASCuZdOybYEGiA1rBfGbwkK6BbTVOGz3ULwg4xc/JaaXl/Hip9ai7mgPZ4yk2gvWM+BSVEpJso0N/zQkIPB4O/VWvaqOI5699VsxXrJxIieh6hISrjZbyVWLIvGCpZsBZwjrjVSqAXs7rZj9m2TC0M2ODmOkBbcjUUWFuEfKj6tC+AUEL5O4Kf92tU++vNlH56rNNRAy59v/XHqrjctgP8FuCMRH/izwDGWrFaUlwTFNyV1cQJfFoqMpjP3kuTz458sORwAXhKoM7N29P061QBuiAYOCzeZBn/0YQ1TrpmjlpbG74G5aI+Jjm9OGxv8js6GHUPyZWBU6zM7wZrdS4vL297ZtbMI2Lke+lx7TdKFtXj3iTDlS0F18jug4LGdfTprgzl8CwS2WLoRgmYA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3868.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(39860400002)(376002)(346002)(366004)(396003)(33656002)(38100700002)(5660300002)(8936002)(66446008)(38070700005)(478600001)(86362001)(316002)(122000001)(2906002)(71200400001)(76116006)(41300700001)(52536014)(8676002)(66556008)(66476007)(110136005)(55016003)(7696005)(55236004)(82960400001)(6506007)(83380400001)(53546011)(6636002)(66946007)(64756008)(9686003)(26005)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ewcQcf4dOEg69eiyRdsFMcwThqW/mvrALpYVQmC5waCsa0IQPD66XVAd6w9R?= =?us-ascii?Q?r9Qi3ApZ7pZGYdm2lBPitCltVEVtuBelqfeuONDtT4Lvjmn5XvTsi2dQ82d5?= =?us-ascii?Q?OlHSmwa5kpegTIoU6eHNGvDgPOy1nqEA/DA9ziB8ckDqHVkXXqKh+y5GNhrG?= =?us-ascii?Q?wP8C3DyGXam+9JqIHhkujB75Jsb0MPLwUIK8447NoJc3EkBBaDkyUxEEkJj/?= =?us-ascii?Q?HrwJjEIVKhtgytiQVcGrwMD4aF72xt7wLliRJ7Kzf4K9XNlx56ObcEsnEJhH?= =?us-ascii?Q?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8u3f9qQV25jjt3dqJb7oU?= =?us-ascii?Q?M6K/jlo2DAwkRYxa7ZwzIg6vbI1RlOGg7I75V8BhJ6lUUnSnH4ubhO3iNg1N?= =?us-ascii?Q?orzMIir8EcJHIkX/8GEC4aCzNYUz4fWAVM+hMJmLpK7eMysO1IToAdn9dIOv?= =?us-ascii?Q?MMryz3obJSu7k4wPiIkm382Zh3pMhy2MVtgHX4EbCrtdQF81aH7wp2IRMlj+?= =?us-ascii?Q?Tu6XjZfgPl9q+32NQl8HuMGU0T3MVUFEEgUL4MS17Se8lhJLHfi0xk5D0YvN?= =?us-ascii?Q?349/omgIPI0xROPZx68/MLsFwQCB/1W4eNLKLLG/QpXQpg+kHf5tp3bzlG3r?= =?us-ascii?Q?A2zT+kvWnUIrnuMn2Gzv//kBAB820ekXiPktt0oZfeLEDsxPvLSKYcHQFIRv?= =?us-ascii?Q?UcYVmfSk3sSIV+RYeA13YmxN8SisPePz/ZY461t9l/JeRbnMOLFWIK2pMaXi?= =?us-ascii?Q?q24dny9MuHi+A8biM9BNqVhATLzb2dzpLFxRhLITr/nzayAMn3fS+rb9tYPr?= =?us-ascii?Q?U5/BuJ2e+XX2q+IjY5i2ZIFDtGMfRnLhKbi49Rgav3vtTi8CzA0QRzkDRZDP?= =?us-ascii?Q?oTWpGmoAogtJxS0TnuHhDxYlbP2uyjA=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: DM6PR11MB3868.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8728d6f2-9aa9-4660-8276-08da5474dc15 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jun 2022 17:30:11.1214 (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: GDHpDnHQFizs6TCMy/yv24V5BkNNMiswj4Mb1DkRPgOswQ7vDOsTHpOcSvuAR9ys9Be7dqe1RHMMJAXwjhxVfU3iMoDe5muWrs9c11ipA7A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5320 X-OriginatorOrg: intel.com 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 Reviewed-by: Naga Harish K S V > -----Original Message----- > From: Kundapura, Ganapati > Sent: Wednesday, June 22, 2022 10:24 PM > To: dev@dpdk.org; jerinj@marvell.com; Jayatheerthan, Jay > ; Naga Harish K, S V > > Subject: [PATCH v8 5/7] test/eth_tx: add testcase for instance get API >=20 > Added testcase for rte_event_eth_tx_adapter_instance_get() >=20 > Signed-off-by: Ganapati Kundapura > --- > app/test/test_event_eth_tx_adapter.c | 75 > ++++++++++++++++++++++++++++++++++++ > 1 file changed, 75 insertions(+) >=20 > diff --git a/app/test/test_event_eth_tx_adapter.c > b/app/test/test_event_eth_tx_adapter.c > index 2900532..98debfd 100644 > --- a/app/test/test_event_eth_tx_adapter.c > +++ b/app/test/test_event_eth_tx_adapter.c > @@ -29,6 +29,7 @@ test_event_eth_tx_adapter_common(void) > #define MAX_NUM_QUEUE RTE_PMD_RING_MAX_RX_RINGS > #define TEST_INST_ID 0 > #define TEST_DEV_ID 0 > +#define TEST_ETH_QUEUE_ID 0 > #define SOCKET0 0 > #define RING_SIZE 256 > #define ETH_NAME_LEN 32 > @@ -639,6 +640,78 @@ tx_adapter_service(void) } >=20 > static int > +tx_adapter_instance_get(void) > +{ > + int err; > + uint8_t inst_id; > + uint16_t eth_dev_id; > + struct rte_eth_dev_info dev_info; > + > + /* Case 1: Test without configuring eth */ > + err =3D rte_event_eth_tx_adapter_instance_get(TEST_ETHDEV_ID, > + TEST_ETH_QUEUE_ID, > + &inst_id); > + TEST_ASSERT(err =3D=3D -EINVAL, "Expected -EINVAL got %d", err); > + > + /* Case 2: Test with wrong eth port */ > + eth_dev_id =3D rte_eth_dev_count_total() + 1; > + err =3D rte_event_eth_tx_adapter_instance_get(eth_dev_id, > + TEST_ETH_QUEUE_ID, > + &inst_id); > + TEST_ASSERT(err =3D=3D -EINVAL, "Expected -EINVAL got %d", err); > + > + /* Case 3: Test with wrong tx queue */ > + err =3D rte_eth_dev_info_get(TEST_ETHDEV_ID, &dev_info); > + TEST_ASSERT(err =3D=3D 0, "Expected 0 got %d", err); > + > + err =3D rte_event_eth_tx_adapter_instance_get(TEST_ETHDEV_ID, > + dev_info.max_tx_queues + > 1, > + &inst_id); > + TEST_ASSERT(err =3D=3D -EINVAL, "Expected -EINVAL got %d", err); > + > + /* Case 4: Test with right instance, port & rxq */ > + /* Add queue to tx adapter */ > + err =3D rte_event_eth_tx_adapter_queue_add(TEST_INST_ID, > + TEST_ETHDEV_ID, > + TEST_ETH_QUEUE_ID); > + TEST_ASSERT(err =3D=3D 0, "Expected 0 got %d", err); > + > + err =3D rte_event_eth_tx_adapter_instance_get(TEST_ETHDEV_ID, > + TEST_ETH_QUEUE_ID, > + &inst_id); > + TEST_ASSERT(err =3D=3D 0, "Expected 0 got %d", err); > + TEST_ASSERT(inst_id =3D=3D TEST_INST_ID, "Expected %d got %d", > + TEST_INST_ID, err); > + > + /* Add another queue to tx adapter */ > + err =3D rte_event_eth_tx_adapter_queue_add(TEST_INST_ID, > + TEST_ETHDEV_ID, > + TEST_ETH_QUEUE_ID + 1); > + TEST_ASSERT(err =3D=3D 0, "Expected 0 got %d", err); > + > + err =3D rte_event_eth_tx_adapter_instance_get(TEST_ETHDEV_ID, > + TEST_ETH_QUEUE_ID + 1, > + &inst_id); > + TEST_ASSERT(err =3D=3D 0, "Expected 0 got %d", err); > + TEST_ASSERT(inst_id =3D=3D TEST_INST_ID, "Expected %d got %d", > + TEST_INST_ID, err); > + > + /* Case 5: Test with right instance, port & wrong rxq */ > + err =3D rte_event_eth_tx_adapter_instance_get(TEST_ETHDEV_ID, > + TEST_ETH_QUEUE_ID + 2, > + &inst_id); > + TEST_ASSERT(err =3D=3D -EINVAL, "Expected -EINVAL got %d", err); > + > + /* Delete all queues from the Tx adapter */ > + err =3D rte_event_eth_tx_adapter_queue_del(TEST_INST_ID, > + TEST_ETHDEV_ID, > + -1); > + TEST_ASSERT(err =3D=3D 0, "Expected 0 got %d", err); > + > + return TEST_SUCCESS; > +} > + > +static int > tx_adapter_dynamic_device(void) > { > uint16_t port_id =3D rte_eth_dev_count_avail(); @@ -695,6 +768,8 > @@ static struct unit_test_suite event_eth_tx_tests =3D { > tx_adapter_start_stop), > TEST_CASE_ST(tx_adapter_create, tx_adapter_free, > tx_adapter_service), > + TEST_CASE_ST(tx_adapter_create, tx_adapter_free, > + tx_adapter_instance_get), > TEST_CASE_ST(NULL, NULL, tx_adapter_dynamic_device), > TEST_CASES_END() /**< NULL terminate unit test array */ > } > -- > 2.6.4