From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 5891D3572 for ; Wed, 13 Mar 2019 14:10:25 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2019 06:10:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,474,1544515200"; d="scan'208";a="306843560" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by orsmga005.jf.intel.com with ESMTP; 13 Mar 2019 06:10:23 -0700 Received: from orsmsx155.amr.corp.intel.com (10.22.240.21) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 13 Mar 2019 06:10:23 -0700 Received: from orsmsx122.amr.corp.intel.com ([169.254.11.56]) by ORSMSX155.amr.corp.intel.com ([169.254.7.86]) with mapi id 14.03.0415.000; Wed, 13 Mar 2019 06:10:23 -0700 From: "Rao, Nikhil" To: Pavan Nikhilesh Bhagavatula , "Jerin Jacob Kollanukkaran" , "Van Haaren, Harry" , "Carrillo, Erik G" , "Gujjar, Abhinandan S" , "Mcnamara, John" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 2/3] examples/eventdev: start ethdev after eth adapter setup Thread-Index: AQHU2RQDqh03UDJTdEWgv/4q8S9+6KYJiRcw Date: Wed, 13 Mar 2019 13:10:01 +0000 Message-ID: <1F668163772FA946975B9466A9DFF729EDDE00F8@ORSMSX122.amr.corp.intel.com> References: <20190227200019.1085-1-pbhagavatula@marvell.com> <20190312204037.16141-1-pbhagavatula@marvell.com> <20190312204037.16141-2-pbhagavatula@marvell.com> In-Reply-To: <20190312204037.16141-2-pbhagavatula@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmUxZGM1YTktODY2NS00ODg5LTljZjctOWE3MDBkZDQ4NTI0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoialZcL0RzNUF0MlZLUW5KcTIzeUtJaGlXV3FUUEVRTUhmSnJ6bnNwR3l0QlJiVStcL1RjMDM2Q3ZoUEJjKzRHQ0ZqIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 2/3] examples/eventdev: start ethdev after eth adapter setup 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: , X-List-Received-Date: Wed, 13 Mar 2019 13:10:25 -0000 > -----Original Message----- > From: Pavan Nikhilesh Bhagavatula [mailto:pbhagavatula@marvell.com] > Sent: Wednesday, March 13, 2019 2:11 AM > To: Jerin Jacob Kollanukkaran ; Van Haaren, Harry > ; Rao, Nikhil ; Carrill= o, > Erik G ; Gujjar, Abhinandan S > ; Mcnamara, John > > Cc: dev@dpdk.org; Pavan Nikhilesh Bhagavatula > > Subject: [dpdk-dev] [PATCH v3 2/3] examples/eventdev: start ethdev after > eth adapter setup >=20 > From: Pavan Nikhilesh >=20 > Start ethdev after the Rx/Tx adapter setup is complete as in some > architectures it might lead to undefined behaviour or events being droppe= d. >=20 > Signed-off-by: Pavan Nikhilesh > --- > v3 Changes: > - add the same changes in examples/eventdev_pipeline >=20 > examples/eventdev_pipeline/main.c | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) >=20 > diff --git a/examples/eventdev_pipeline/main.c > b/examples/eventdev_pipeline/main.c > index 92e08bc0c..22ea75e7b 100644 > --- a/examples/eventdev_pipeline/main.c > +++ b/examples/eventdev_pipeline/main.c > @@ -316,11 +316,6 @@ port_init(uint8_t port, struct rte_mempool > *mbuf_pool) > return retval; > } >=20 > - /* Start the Ethernet port. */ > - retval =3D rte_eth_dev_start(port); > - if (retval < 0) > - return retval; > - > /* Display the port MAC address. */ > struct ether_addr addr; > rte_eth_macaddr_get(port, &addr); > @@ -440,6 +435,7 @@ main(int argc, char **argv) { > struct worker_data *worker_data; > uint16_t num_ports; > + uint16_t portid; > int lcore_id; > int err; >=20 > @@ -507,6 +503,14 @@ main(int argc, char **argv) > init_ports(num_ports); > fdata->cap.adptr_setup(num_ports); >=20 > + /* Start the Ethernet port. */ > + RTE_ETH_FOREACH_DEV(portid) { > + err =3D rte_eth_dev_start(portid); > + if (err < 0) > + rte_exit(EXIT_FAILURE, "Error starting ethdev %d\n", > + portid); > + } > + Reviewed-by: Nikhil Rao > int worker_idx =3D 0; > RTE_LCORE_FOREACH_SLAVE(lcore_id) { > if (lcore_id >=3D MAX_NUM_CORE) > -- > 2.21.0