From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id E801E44C3 for ; Tue, 12 Mar 2019 21:41:15 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2CKZQLY007220; Tue, 12 Mar 2019 13:41:15 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=sv6gJo2AnW2tikztRrAWA8Qhh7TnElX91+vlvS0jNZg=; b=Nn6TFksCXAS/qP7cOEXvb3LFxdCC+k+UQzBZVbhhGTaNUFA68FfNLYv+RzfdUkjBSglz FBtYf84+YP94hMlV/Hdw98rirXnmbk0KvtkhYFpfXGTOW1eKPjqyqqweO5EDENOopuhf 5DGUaXOIH1DVlwE12uQlSO8jlhxbTq/IzICgKla6wfCQoaNU9gkZOVR2PqLQQxOVdCxn xj5ITJKtKjwOZ8ZLjjOpRag7inZlfZjrnVwGp4ep8RSG1nvxv/gX/MJt7jbhF5zTeM5w MWnN3bXR/Z8gaInCYM+KWE/m4zRf4QxhW6CFe7KE83HVc8s233rmGKN4q8L1UBHsZkvd hQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2r69kgtacn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 12 Mar 2019 13:41:14 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 12 Mar 2019 13:41:13 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.54) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 12 Mar 2019 13:41:13 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sv6gJo2AnW2tikztRrAWA8Qhh7TnElX91+vlvS0jNZg=; b=hL/7zyBRxnBKDy0My5zTcxfAb0m5b7YtOC1pJ1ZkO9mSwl+F6UY0o+uCj3wXWf0oBssYAK6fhdAEL9DU7lVlFteSqJkR2Z2JUgyBslSyifDRarpgueT/v46Me4MUhlYIB0dwX8ZAOMFnCnif3qfejwBVxJENSXD7WIklLT0w8o4= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.14) by CY4PR1801MB1848.namprd18.prod.outlook.com (10.171.255.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.21; Tue, 12 Mar 2019 20:41:09 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::286d:5e93:974e:8bfa]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::286d:5e93:974e:8bfa%2]) with mapi id 15.20.1686.021; Tue, 12 Mar 2019 20:41:09 +0000 From: Pavan Nikhilesh Bhagavatula To: Jerin Jacob Kollanukkaran , "harry.van.haaren@intel.com" , "nikhil.rao@intel.com" , "erik.g.carrillo@intel.com" , "abhinandan.gujjar@intel.com" , "john.mcnamara@intel.com" CC: "dev@dpdk.org" , Pavan Nikhilesh Bhagavatula Thread-Topic: [dpdk-dev] [PATCH v3 2/3] examples/eventdev: start ethdev after eth adapter setup Thread-Index: AQHU2RPs8Nbc/si+CEGxwh6gooznfg== Date: Tue, 12 Mar 2019 20:41:09 +0000 Message-ID: <20190312204037.16141-2-pbhagavatula@marvell.com> References: <20190227200019.1085-1-pbhagavatula@marvell.com> <20190312204037.16141-1-pbhagavatula@marvell.com> In-Reply-To: <20190312204037.16141-1-pbhagavatula@marvell.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MAXPR0101CA0029.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:d::15) To CY4PR1801MB1863.namprd18.prod.outlook.com (2603:10b6:910:7a::14) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.21.0 x-originating-ip: [117.216.244.113] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 196f618a-21d7-42dc-1e5d-08d6a72b0ec4 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:CY4PR1801MB1848; x-ms-traffictypediagnostic: CY4PR1801MB1848: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; CY4PR1801MB1848; 23:i9uZBDvlwjFOGuc8sezEId3jF9PMix4RicwOx?= =?iso-8859-1?Q?L6wSlOEjlMV3YW92txjOgdrOcuLBMUL4yW19BZ+InIaoZWR8GgCG8VvLd4?= =?iso-8859-1?Q?p+lB9237P1l5e3CRg0dXGVVejmsXXoK1MufZBn8t1s6PniPHWvp1W04F7D?= =?iso-8859-1?Q?HXqqrd5cY5inNGyCXd2S1gjvOxOOF7cLdg61A+babDeOaaumHNgNXRU/9O?= =?iso-8859-1?Q?YZA8E7hwI5+aw5bJ3+yLN0fecefv6lmNTbYSL0EUs+YMu4rq7I3nfdhbV1?= =?iso-8859-1?Q?ntf7E+8HdPZClEC9EvX5qNEe/VRQ2QkNp5vluXBJ4udHCwXA1jLUPHo9Wz?= =?iso-8859-1?Q?+wLhTywBOs+x5gy0icbFHIJOfzpA98Vfx3+NGWhnHHtf6arMZLV4S0fLG+?= =?iso-8859-1?Q?45dDIgTXtbfRb81gPVe20bbDxqqdtOKPhfAgj3tW1IY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1?Q?SxweWSJ+gkeDagApkL9th4JMwzgk2eGV6Z7ps2Sq04s79PVPwQ8zmjVhKC?= =?iso-8859-1?Q?iaBCmFoBV8=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09749A275C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(396003)(346002)(376002)(136003)(189003)(199004)(55236004)(25786009)(81156014)(3846002)(81166006)(11346002)(486006)(476003)(2616005)(316002)(305945005)(8676002)(68736007)(2501003)(8936002)(7736002)(66066001)(6116002)(446003)(110136005)(54906003)(14444005)(1076003)(186003)(256004)(14454004)(99286004)(106356001)(71200400001)(6506007)(105586002)(52116002)(50226002)(107886003)(2906002)(86362001)(71190400001)(4326008)(102836004)(2201001)(5660300002)(478600001)(76176011)(36756003)(26005)(386003)(6436002)(6512007)(6486002)(97736004)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB1848; H:CY4PR1801MB1863.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 3O3AI72ErUbRZ6O3+SArG1GfZiwCocHDsZ5yEHb4Ershz46fk+gEL4GYixMy30EQ34f6xqUrpCk8X7CEbZaOOyQCJVRxrt16fRn1Z+KPFiIH3f+aJd1NegdLx+CZswpKif9DnwtpAqO5Du72jxtYijUqanB1ZD7VNOHcVU745NTtXuq7/ExtsDsuhJbN9Z3/nMMpXnlk4a/PKzt4I/joXP+A12IoZRfmR9WZBPLPJ9pVMPcpj3Tx4gwaZPYUAixWOe6fktSKIomkepJsh7qnVFk+GzXaLsWcp5EofJE6WzPRSuDnFefK7lspJuKABud5Pt4reppQPIPlxbIuJs8EDJ/szMV3xF8XMisRoqQfipseUwLCQuawQdjBI3EAe7ViaDIAnk+e2CxDSKvHyoevbk8E9inGxULua5efOTOw4mE= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 196f618a-21d7-42dc-1e5d-08d6a72b0ec4 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Mar 2019 20:41:09.5762 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB1848 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-12_12:, , signatures=0 Subject: [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: Tue, 12 Mar 2019 20:41:16 -0000 From: Pavan Nikhilesh Start ethdev after the Rx/Tx adapter setup is complete as in some architectures it might lead to undefined behaviour or events being dropped. Signed-off-by: Pavan Nikhilesh --- v3 Changes: - add the same changes in examples/eventdev_pipeline examples/eventdev_pipeline/main.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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; } - /* 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; @@ -507,6 +503,14 @@ main(int argc, char **argv) init_ports(num_ports); fdata->cap.adptr_setup(num_ports); + /* 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); + } + int worker_idx =3D 0; RTE_LCORE_FOREACH_SLAVE(lcore_id) { if (lcore_id >=3D MAX_NUM_CORE) -- 2.21.0