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 DC2A3A0613 for ; Fri, 27 Sep 2019 15:15:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1A6581BE93; Fri, 27 Sep 2019 15:15:39 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60043.outbound.protection.outlook.com [40.107.6.43]) by dpdk.org (Postfix) with ESMTP id BCFB31BE92 for ; Fri, 27 Sep 2019 15:15:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ax8ejqJ0+lp0XfQg1TOi7f+QmI7ccGo/lYPJAmhpawqpcxuPuhUT6VRqHKyPLMq3RExgtuv4bU6f+6HSG6pY8quaih7hIGI4/AFqxT12D9Dw/V/Gr9My7hY9XZZdjP4CsxIfXoTpy7fYw51II3/A0XMnt0cdh1cbTx4t734kbYf459LqHcyiOBVajW15FYlQeXZOZ9djTc0zsqAkCXflMkJsupLL6sHVPc/b/PfIa6t1kcBdPaCuANyn8V0JQ16COL5QvVUm7nATvrOhI2EaheZzZxQTkIVCAYdp38PzDyf1WLEm2N/tpwwwZ7wz/Fota/VkohwJiSV7iPWWrDTcKw== 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=fbDMVBg5Rol8unQ7I8Um/9n3givD9a0/0NvQ4KQ6Vg8=; b=Lv1LebLfseDTlN8ZBXgmmS1iGFYJ1ngF9pHtIWqzAmpAeVSnKsXEt+5v4DkmLqjaTAlf/vVDj1pflkcD11RVcGcT68J9B6Rh4NhLHF0Duy0be8r7AVWhbTdlqEFZsE1SHVKs2MwFbYx9qSXDS4RJ30mf2F2U0/H6vN8XL80UjP5A0hC/loyixINvhGJXcCtKdKqmurRdQodMp1z1CBqiPTvBHqgUN/GjuqXXNUcSxABC0SZKSPcD9yProxcC1x/vSwMHD+Cd4Fut0DJ5k8dLuODVMXp6d/W7M3GzPbqLFb4tH6Hs1wXEF+QUZG/upZhRcrORVo+6ISNTni94VPqdLQ== 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=fbDMVBg5Rol8unQ7I8Um/9n3givD9a0/0NvQ4KQ6Vg8=; b=Y/Urykl4m6MEcLrcrBOzCmE4UAxR6Uex4MfC3wE2RY9kxjhdcCxi4EBkgL/vOBA+eHRhmILXDMT5yqbR2rBu1CLL6ts/OaZ3hOSJvd2lUDcZYsdBldjM8sblpkj6AnCZMWwcdMSQrAIaLSqZwBVB5jsNK8J6hnMEtllMbT3WwMA= Received: from VI1PR04MB4480.eurprd04.prod.outlook.com (20.177.53.224) by VI1PR04MB4813.eurprd04.prod.outlook.com (20.177.48.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.23; Fri, 27 Sep 2019 13:15:36 +0000 Received: from VI1PR04MB4480.eurprd04.prod.outlook.com ([fe80::74ce:408a:d65a:3f4a]) by VI1PR04MB4480.eurprd04.prod.outlook.com ([fe80::74ce:408a:d65a:3f4a%4]) with mapi id 15.20.2284.028; Fri, 27 Sep 2019 13:15:36 +0000 From: Nipun Gupta To: "pbhagavatula@marvell.com" , "jerinj@marvell.com" , "bruce.richardson@intel.com" , Akhil Goyal , Marko Kovacevic , Ori Kam , Radu Nicolau , Tomasz Kantecki , Sunil Kumar Kori CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4 04/10] examples/l2fwd-event: add eth port setup for eventdev Thread-Index: AQHVcrxx+cN8zea9a0q42ICBQ0A26ac/hNRg Date: Fri, 27 Sep 2019 13:15:36 +0000 Message-ID: References: <20190919101346.8832-1-pbhagavatula@marvell.com> <20190924094209.3827-1-pbhagavatula@marvell.com> <20190924094209.3827-5-pbhagavatula@marvell.com> In-Reply-To: <20190924094209.3827-5-pbhagavatula@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=nipun.gupta@nxp.com; x-originating-ip: [92.120.1.68] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b4d249fc-c94f-4e61-65ca-08d7434cc92b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VI1PR04MB4813; x-ms-traffictypediagnostic: VI1PR04MB4813:|VI1PR04MB4813: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3968; x-forefront-prvs: 0173C6D4D5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(39860400002)(376002)(136003)(346002)(366004)(199004)(189003)(13464003)(64756008)(71190400001)(66446008)(44832011)(110136005)(66946007)(86362001)(55016002)(14454004)(5660300002)(229853002)(4326008)(2501003)(52536014)(81156014)(81166006)(2201001)(76116006)(6436002)(9686003)(316002)(99286004)(305945005)(7736002)(66066001)(256004)(478600001)(6246003)(11346002)(25786009)(71200400001)(102836004)(2906002)(186003)(26005)(14444005)(6116002)(33656002)(3846002)(53546011)(446003)(6506007)(66476007)(7696005)(8936002)(76176011)(486006)(66556008)(476003)(74316002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4813; H:VI1PR04MB4480.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: guk7voThVKER1gVBSbIuKwDYCx+Pq3TOjJ9PKBg6Fus07Zm5BlaUF1gsRCWs/c9jL5bdsbIRs7OgTugsOBgj/smI8OvTATeC/PromEPrtfElmalEZ+2W3APNZt4bEsENGH0CW6j3J2HBL0Tm5rLNklAnobbuMzZILrLc7XUY1VuPanHqoSJ9yrcfc5EQgbQQWeD/BH7p4I7ox57os3N3MMfXFF6RIac9DpBryuCyreG5WFT/4h6NyfgwX8JurLgRQ6R1/n+0xqEz/1HEIbWmEw2BCLmqL/4f8cWFd9X//rBKx43vjpXGC0Dnw7ymD9BHdx5YBjr8a4+RrI0yTN3rBv6IFZ82rQ2jig9T1GTOncSrw1J/n7hvC2ca1bmYEY3jN8q0Do3lqJnQAyWqz/n52O9fkqxmIoJ+QTsQwI/DAqQ= 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: b4d249fc-c94f-4e61-65ca-08d7434cc92b X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Sep 2019 13:15:36.5765 (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: qK5vNYea26/lkGlEMVR+kzDGcYwdOtDjFZGecLSpzKxS+uddHn0xUSKa97llUejtcLsFxjAkXygSQ/9pfCzjjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4813 Subject: Re: [dpdk-dev] [PATCH v4 04/10] examples/l2fwd-event: add eth port setup for eventdev 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" > -----Original Message----- > From: dev On Behalf Of > pbhagavatula@marvell.com > Sent: Tuesday, September 24, 2019 3:12 PM > To: jerinj@marvell.com; bruce.richardson@intel.com; Akhil Goyal > ; Marko Kovacevic ; > Ori Kam ; Radu Nicolau ; > Tomasz Kantecki ; Sunil Kumar Kori > ; Pavan Nikhilesh > Cc: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v4 04/10] examples/l2fwd-event: add eth port > setup for eventdev >=20 > From: Sunil Kumar Kori >=20 > Add ethernet port Rx/Tx queue setup for event device which are later > used for setting up event eth Rx/Tx adapters. >=20 > Signed-off-by: Sunil Kumar Kori > --- > examples/l2fwd-event/l2fwd_eventdev.c | 114 > ++++++++++++++++++++++++++ > examples/l2fwd-event/l2fwd_eventdev.h | 1 + > examples/l2fwd-event/main.c | 17 ++++ > 3 files changed, 132 insertions(+) >=20 > + > static void > eventdev_capability_setup(void) > { > @@ -105,6 +215,7 @@ void > eventdev_resource_setup(void) > { > struct eventdev_resources *eventdev_rsrc =3D get_eventdev_rsrc(); > + uint16_t ethdev_count =3D rte_eth_dev_count_avail(); Why do we need to use all the Ethernet devices available? We should use the devices in the portmask instead. > uint32_t service_id; > int32_t ret; >=20 > @@ -119,6 +230,9 @@ eventdev_resource_setup(void) > /* Setup eventdev capability callbacks */ > eventdev_capability_setup(); >=20 > + /* Ethernet device configuration */ > + eth_dev_port_setup(ethdev_count); > + > /* Start event device service */ > ret =3D rte_event_dev_service_id_get(eventdev_rsrc->event_d_id, > &service_id); > diff --git a/examples/l2fwd-event/l2fwd_eventdev.h b/examples/l2fwd- > event/l2fwd_eventdev.h > index 8b6606b4c..d380faff5 100644 > --- a/examples/l2fwd-event/l2fwd_eventdev.h > +++ b/examples/l2fwd-event/l2fwd_eventdev.h > @@ -51,6 +51,7 @@ struct eventdev_resources { > uint8_t enabled; > uint8_t nb_args; > char **args; > + struct rte_ether_addr ports_eth_addr[RTE_MAX_ETHPORTS]; > }; >=20 > static inline struct eventdev_resources * > diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c > index 087e84588..3f72d0579 100644 > --- a/examples/l2fwd-event/main.c > +++ b/examples/l2fwd-event/main.c > @@ -619,6 +619,22 @@ main(int argc, char **argv) >=20 > /* Configure eventdev parameters if user has requested */ > eventdev_resource_setup(); > + if (eventdev_rsrc->enabled) { > + /* All settings are done. Now enable eth devices */ > + RTE_ETH_FOREACH_DEV(portid) { > + /* skip ports that are not enabled */ > + if ((l2fwd_enabled_port_mask & (1 << portid)) =3D=3D 0) > + continue; > + > + ret =3D rte_eth_dev_start(portid); > + if (ret < 0) > + rte_exit(EXIT_FAILURE, > + "rte_eth_dev_start:err=3D%d, > port=3D%u\n", > + ret, portid); > + } > + > + goto skip_port_config; > + } >=20 > /* Initialize the port/queue configuration of each logical core */ > RTE_ETH_FOREACH_DEV(portid) { > @@ -750,6 +766,7 @@ main(int argc, char **argv) > "All available ports are disabled. Please set > portmask.\n"); > } >=20 > +skip_port_config: > check_all_ports_link_status(l2fwd_enabled_port_mask); >=20 > ret =3D 0; > -- > 2.17.1