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 94FD3A04BB for ; Tue, 6 Oct 2020 19:47:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8D4E429AC; Tue, 6 Oct 2020 19:47:58 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 52B7229AC; Tue, 6 Oct 2020 19:47:55 +0200 (CEST) IronPort-SDR: lw0snJ+zuUBbZG0CdRqzYNOXo9U8/Ru2NIg098okNLarA5qc1kUdAeYO8GAawyYfzUWxOOo0dx EAQa176nbVrg== X-IronPort-AV: E=McAfee;i="6000,8403,9765"; a="163831749" X-IronPort-AV: E=Sophos;i="5.77,343,1596524400"; d="scan'208";a="163831749" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2020 10:47:34 -0700 IronPort-SDR: MXqVs2DaqJ6IuQpLKLisDALAq0mkwcPjH8dpOGn0QrJnMvFPfphlMYeHJWDowo/AbybKjGUmDT 9f0rgePWEURQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,343,1596524400"; d="scan'208";a="311322376" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga003.jf.intel.com with ESMTP; 06 Oct 2020 10:47:33 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 6 Oct 2020 10:47:28 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 6 Oct 2020 10:47:28 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.174) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 6 Oct 2020 10:47:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JkhHMHKHmGB5IZuSZYEMZaJ2fg527MFeSiy4/eD1VpYS6iTP4zGOHOP7yKHRPNtgl8LDMrtiskCatV/rwvEicRiFQwj8fLtXvuvWnxVQ2qh7fklvvaIXpefhzeY6QMTGkreCGRoXZ2iB5fo399XPRjv7sX2PMLb6Xu27yYk4Rb2MlHhrKviE+fX8Ez3TQ+yeAXAT8a54AeTjVY8H/HOMPfyAVqfyz+tZFd07fy5l3WIGeCa6gDGxzZw5o6b0d9fmFyfRJk7YHaTNl5Kt3LS5eMCF3JaDDAnl9j7bENKMg6DBut0GI22Nu4ptuo8HjXMdVSll1BlQJI1HZK/Pxdz23A== 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=SpFSpBGHmIVUhO23PMGWkiQJ7J9CmvQJJ8PVVXZoAH4=; b=Y2pksxsESUyVG4bRI0i3yfHWuW59H18rEIqOsh/gZuvsUt33J/m6BWLt4duST5jk2gkHM5zosGER3rO2S7HxaqZshIQkpY7M6ZAkUyHPjOIMSr5NOlMJtYSNYFC4mForExbyQqSqhIETqimx+RyVfna2Vxi1Ew283Zg6J/RPwKUF6hUdaYtSuuJ473w0VMmdxrkvGFjeIe5YgdBNaJHP51nUTTz2MccpNAsmvwIHBJUALrapC4e5PT/ZpoxBbNJukZFcMop7tgZeGd338HbxHzfljAcVnnXLh96qo5qUfjmOHHVCdZaPd2dCTIlcotke+7vDimAc8x09G0fX4qYmyQ== 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=SpFSpBGHmIVUhO23PMGWkiQJ7J9CmvQJJ8PVVXZoAH4=; b=PrUM+UqhoPP0UyHi1wy2UCX5HsYISyiQxEjfINQb5twwPBicut4z9vW+nVq5XtADFwKlp/t1iUMHgoYaO+b801deqHrEk1qNzmhT7pD2SnMFfvIfJ/jPX+4nAXD7hE8d4O4qDUFOUTO0KZvm/XV6zeL5ZgXbO++t3jhv2/D/Ai0= Received: from SN6PR11MB3117.namprd11.prod.outlook.com (2603:10b6:805:d7::32) by SA0PR11MB4734.namprd11.prod.outlook.com (2603:10b6:806:99::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.36; Tue, 6 Oct 2020 17:47:20 +0000 Received: from SN6PR11MB3117.namprd11.prod.outlook.com ([fe80::50a1:d009:8d68:4064]) by SN6PR11MB3117.namprd11.prod.outlook.com ([fe80::50a1:d009:8d68:4064%7]) with mapi id 15.20.3433.045; Tue, 6 Oct 2020 17:47:20 +0000 From: "Jayatheerthan, Jay" To: "Jayatheerthan, Jay" , "jerinj@marvell.com" , "thomas@monjalon.net" , "Rao, Nikhil" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH 2/2] app/test: add net null dev creation in Rx adapter autotest Thread-Index: AQHWmWVPElan91JDWky6qVx/J03pj6mK3ppQ Date: Tue, 6 Oct 2020 17:47:20 +0000 Message-ID: References: <20201003090541.32449-1-jay.jayatheerthan@intel.com> <20201003090541.32449-2-jay.jayatheerthan@intel.com> In-Reply-To: <20201003090541.32449-2-jay.jayatheerthan@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.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [106.201.118.203] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f0b8848a-f693-4ed7-c4a4-08d86a1fdfd9 x-ms-traffictypediagnostic: SA0PR11MB4734: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4941; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xeev6dxeUJsqwZRK8XQ2QMuown8KeeGgtX2go3T0GctGuDLSNPE/A5qaR6cn1mFDWXFdjP6Kv6O+Tk7xbdFH4U1m36jgw5hDTppPg2vhZzMmMuekbH+0WrlylI4ay0kdX1bb3ajNnCsaTElmPDCb7aQPV1t5nXe0lQoFsS4lXCEYSIHccmzoY3tjGNuACaj2YkXta6xGGWvV8207II4PrmzRAR+3PHDwtP/Rw/te8GMVa/ayr3/nTYpphPUMC/JZWzJ9POzg9R2r3Jbdfd0eoQvsVKP+wKvdcweO7NhSGeR0mG1CAnVsmwbUASlMJ7acK+AeucJ3LBG3YJY7qEV76A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3117.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(39860400002)(376002)(136003)(346002)(66446008)(2906002)(186003)(55236004)(86362001)(5660300002)(53546011)(110136005)(6506007)(83380400001)(64756008)(8936002)(478600001)(54906003)(7696005)(26005)(55016002)(71200400001)(33656002)(6636002)(66946007)(66556008)(4326008)(66476007)(52536014)(76116006)(9686003)(8676002)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: QlQ0p6yScJwkI6qPltFQDuVH5k/lqeBSGpXelYNMtE84e1OKvCkPjvmIC3v3Mi42Iwej5jQCjdVKVaK8DGHua7BwLunS4Jwaa9VNTdWA4F7keCYBdcloNkWrZ74DvnrkLWmZnXJyy/I0s4PMQnIoKbCrUIOz6mjhIB5Y8mjYvka6x23f9zQ1H9dTXTfNcTHnRl6U8fumfa+Oso7Bi3tqwUdle6Gfva9FvnOUJLkBvF0jnCVb+XAkI3V8YGY5dQJLuFL1EGYukDylyqL2zEZ77+a4vx4Nf7Y3/ge6nvrLeQAhfcxXaroLg8bw91mZx6wzaWGmDO133p7iJGZlpcO/93oi8QvRiittFkfzFx3x1PcbLV2kWA8ax5PgAphxBlfgFv/dHdY508cWsH6kSx2Jdqc62Oyk8TVYfgxXHc/S5VSWomGAshPLCBFZIg4GmWX3b60kfJN9Qvx0BGyfv9vuYr7zi4wzee+pzHZ04C0oiTbME1RdHaLxYo9+5nWRf+jajRzV+KZHckbUxo7B5z/UUo9qeGbU6nwFjJsJY+3/PMGogaXUbBHEOUZtPWmFvc0LXLDH3Cv3zxdx2xaI8FVTtWnP1OEHc8QYUmve4NgoHDXhOI2NEnxB3lFG1NM4YoK4xJYbyxHKq+O8mzmzS5FVfA== 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: SN6PR11MB3117.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0b8848a-f693-4ed7-c4a4-08d86a1fdfd9 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Oct 2020 17:47:20.3777 (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: OcVzcK7/aOtGg5YUV2cMuB5KQD8+eXZ0UCYcampqi0kEzMvZQ8TfiU4H/RS73WKx+tKMMB7AM1aSVJz/F5yOeoZT+ISNTDbimLnS1Wx5f14= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4734 X-OriginatorOrg: intel.com Subject: Re: [dpdk-stable] [PATCH 2/2] app/test: add net null dev creation in Rx adapter autotest X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, Request to review the changes below. Regards, Jay > -----Original Message----- > From: Jayatheerthan, Jay > Sent: Saturday, October 3, 2020 2:36 PM > To: jerinj@marvell.com; thomas@monjalon.net; Rao, Nikhil > Cc: dev@dpdk.org; stable@dpdk.org; Jayatheerthan, Jay > Subject: [PATCH 2/2] app/test: add net null dev creation in Rx adapter au= totest >=20 > From: "Jay Jayatheerthan" >=20 > Allows creation of net_null if vdev EAL option is not specified and > uninit vdev created in the test. The change also adds error checks > for vdev init and uninit. >=20 > Signed-off-by: Jay Jayatheerthan > --- > app/test/test_event_eth_rx_adapter.c | 61 +++++++++++++++++++++++++++- > 1 file changed, 59 insertions(+), 2 deletions(-) >=20 > diff --git a/app/test/test_event_eth_rx_adapter.c b/app/test/test_event_e= th_rx_adapter.c > index 71c946164..dbf85be35 100644 > --- a/app/test/test_event_eth_rx_adapter.c > +++ b/app/test/test_event_eth_rx_adapter.c > @@ -30,6 +30,8 @@ struct event_eth_rx_adapter_test_params { > }; >=20 > static struct event_eth_rx_adapter_test_params default_params; > +static bool event_dev_created; > +static bool eth_dev_created; >=20 > static inline int > port_init_common(uint16_t port, const struct rte_eth_conf *port_conf, > @@ -202,7 +204,10 @@ testsuite_setup(void) > if (!count) { > printf("Failed to find a valid event device," > " testing with event_skeleton device\n"); > - rte_vdev_init("event_skeleton", NULL); > + err =3D rte_vdev_init("event_skeleton", NULL); > + TEST_ASSERT(err =3D=3D 0, "Failed to create event_skeleton. err=3D%d", > + err); > + event_dev_created =3D true; > } >=20 > struct rte_event_dev_config config =3D { > @@ -222,6 +227,15 @@ testsuite_setup(void) > TEST_ASSERT(err =3D=3D 0, "Event device initialization failed err %d\n"= , > err); >=20 > + count =3D rte_eth_dev_count_total(); > + if (!count) { > + printf("Testing with net_null device\n"); > + err =3D rte_vdev_init("net_null", NULL); > + TEST_ASSERT(err =3D=3D 0, "Failed to create net_null. err=3D%d", > + err); > + eth_dev_created =3D true; > + } > + > /* > * eth devices like octeontx use event device to receive packets > * so rte_eth_dev_start invokes rte_event_dev_start internally, so > @@ -249,7 +263,10 @@ testsuite_setup_rx_intr(void) > if (!count) { > printf("Failed to find a valid event device," > " testing with event_skeleton device\n"); > - rte_vdev_init("event_skeleton", NULL); > + err =3D rte_vdev_init("event_skeleton", NULL); > + TEST_ASSERT(err =3D=3D 0, "Failed to create event_skeleton. err=3D%d", > + err); > + event_dev_created =3D true; > } >=20 > struct rte_event_dev_config config =3D { > @@ -270,6 +287,15 @@ testsuite_setup_rx_intr(void) > TEST_ASSERT(err =3D=3D 0, "Event device initialization failed err %d\n"= , > err); >=20 > + count =3D rte_eth_dev_count_total(); > + if (!count) { > + printf("Testing with net_null device\n"); > + err =3D rte_vdev_init("net_null", NULL); > + TEST_ASSERT(err =3D=3D 0, "Failed to create net_null. err=3D%d", > + err); > + eth_dev_created =3D true; > + } > + > /* > * eth devices like octeontx use event device to receive packets > * so rte_eth_dev_start invokes rte_event_dev_start internally, so > @@ -292,21 +318,52 @@ testsuite_setup_rx_intr(void) > static void > testsuite_teardown(void) > { > + int err; > uint32_t i; > RTE_ETH_FOREACH_DEV(i) > rte_eth_dev_stop(i); >=20 > + if (eth_dev_created) { > + err =3D rte_vdev_uninit("net_null"); > + if (err) > + printf("Failed to delete net_null. err=3D%d", err); > + eth_dev_created =3D false; > + } > + > rte_mempool_free(default_params.mp); > + if (event_dev_created) { > + err =3D rte_vdev_uninit("event_skeleton"); > + if (err) > + printf("Failed to delete event_skeleton. err=3D%d", err); > + event_dev_created =3D false; > + } > + > + memset(&default_params, 0, sizeof(default_params)); > } >=20 > static void > testsuite_teardown_rx_intr(void) > { > + int err; > if (!default_params.rx_intr_port_inited) > return; >=20 > rte_eth_dev_stop(default_params.rx_intr_port); > + if (eth_dev_created) { > + err =3D rte_vdev_uninit("net_null"); > + if (err) > + printf("Failed to delete net_null. err=3D%d", err); > + eth_dev_created =3D false; > + } > rte_mempool_free(default_params.mp); > + if (event_dev_created) { > + err =3D rte_vdev_uninit("event_skeleton"); > + if (err) > + printf("Failed to delete event_skeleton. err=3D%d", err); > + event_dev_created =3D false; > + } > + > + memset(&default_params, 0, sizeof(default_params)); > } >=20 > static int > -- > 2.17.1