From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0059.outbound.protection.outlook.com [104.47.0.59]) by dpdk.org (Postfix) with ESMTP id 2ABDF1C9E9 for ; Mon, 14 May 2018 19:00:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=4r8zMKsCTghf76ckHfv82ul5l2egFkW0kbKL1ZC0c2Q=; b=YW6DsYp8klTDmAElfSG0XouXDvuVVmowXQ4rN5oKPM1+TKd7L0O/yMVy6QWjVPZWL/jOV44Wd8gqP4OH54GR8aa4dFCS0ORF0HmnDDwm2iyu1lb8LBDCzTFeWyyYJWcBN+t5ZlmlHtF1qU2Gcjs9xI/BUV+SOmwaJw+AMFzxnRM= Received: from VI1PR05MB4269.eurprd05.prod.outlook.com (52.133.12.22) by VI1PR05MB3325.eurprd05.prod.outlook.com (10.170.238.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Mon, 14 May 2018 17:00:11 +0000 Received: from VI1PR05MB4269.eurprd05.prod.outlook.com ([fe80::d124:6bf:c236:d61a]) by VI1PR05MB4269.eurprd05.prod.outlook.com ([fe80::d124:6bf:c236:d61a%13]) with mapi id 15.20.0755.018; Mon, 14 May 2018 17:00:11 +0000 From: Ali Alnubani To: 'Anatoly Burakov' , "dev@dpdk.org" CC: Wenzhuo Lu , Jingjing Wu , Thomas Monjalon , "ferruh.yigit@intel.com" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: fix testpmd initialization Thread-Index: AQHT65rI7bJ2CzEqhUmSrPeZzBL1bqQvcg6g Date: Mon, 14 May 2018 17:00:10 +0000 Message-ID: References: <99dbef2bd2d8652f20b4d349048d018756f09290.1526310468.git.anatoly.burakov@intel.com> In-Reply-To: <99dbef2bd2d8652f20b4d349048d018756f09290.1526310468.git.anatoly.burakov@intel.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=alialnu@mellanox.com; x-originating-ip: [212.29.221.74] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR05MB3325; 7:JwLP8eO4p5uU24QcjJeJ8a3kTgxdHpvXkFfLpa9vYDgeIOkcv8QGCAQ7bKAFNS1UaM4TEPOiN5xbf8wdmBv3vx9IPDiHs34+Qu4KWxCjgnsIn8P7Xw7Fp7r98vqIvAPKkqKvc6Wqq3BhidJK8EoJbgZ/+D+05qAvFdqlNgkmxmZtkhq5UK7aVZjQ9+mCxDGNh97HWcxO01fYRrfjM1H2D25F5tGHRL6dTBJAsg+EEFieiQNmhztupJFN7/yeplfn x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR05MB3325; x-ms-traffictypediagnostic: VI1PR05MB3325: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:VI1PR05MB3325; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB3325; x-forefront-prvs: 067270ECAF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(39380400002)(396003)(39860400002)(376002)(13464003)(189003)(199004)(26005)(74316002)(305945005)(33656002)(6246003)(486006)(81166006)(3846002)(8676002)(81156014)(14454004)(4326008)(476003)(8936002)(6116002)(186003)(53936002)(53546011)(55016002)(54906003)(7736002)(110136005)(6506007)(66066001)(316002)(9686003)(7696005)(478600001)(76176011)(68736007)(59450400001)(97736004)(102836004)(99286004)(5660300001)(11346002)(5250100002)(86362001)(2900100001)(3660700001)(3280700002)(106356001)(2906002)(2501003)(446003)(6436002)(25786009)(229853002)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3325; H:VI1PR05MB4269.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: y3czZdKKgjd1YgQThxioN/tTgvCqjB1d4QHsNzd0L6qoK/CGNycNDRFN4K+Rxd0lqchCnpyXuUNK+Vm3GNjFYdgaIITZWbDjpaabL5V9CdKW8JzgHdJn1+jaJQ0CUIIxISx52/q5aaDoNp4xpcRcvOyHRFWAZqNKRPB3BzubcUwVJSbXNeszOwvJ5EdcWv0z spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: ce885789-bdf3-460b-d9f6-08d5b9bc2785 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce885789-bdf3-460b-d9f6-08d5b9bc2785 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 May 2018 17:00:10.8835 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3325 Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd initialization 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: Mon, 14 May 2018 17:00:12 -0000 Tested-by: Ali Alnubani > -----Original Message----- > From: dev On Behalf Of Anatoly Burakov > Sent: Monday, May 14, 2018 6:47 PM > To: dev@dpdk.org > Cc: Wenzhuo Lu ; Jingjing Wu > ; Thomas Monjalon ; > ferruh.yigit@intel.com > Subject: [dpdk-dev] [PATCH] app/testpmd: fix testpmd initialization >=20 > Patch adding configurable locking has reshuffled some init stages, but di= d not > put them back in correct order. Fix order of init by moving everything th= at > was before arguments parsing into correct places. >=20 > Fixes: e505d84c64ab ("app/testpmd: make locking memory configurable") >=20 > Reported-by: Thomas Monjalon >=20 > Signed-off-by: Anatoly Burakov > --- > app/test-pmd/testpmd.c | 34 +++++++++++++++++----------------- > 1 file changed, 17 insertions(+), 17 deletions(-) >=20 > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > 664c435..6c3b64a 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -2646,6 +2646,23 @@ main(int argc, char** argv) > rte_panic("Cannot register log type"); > rte_log_set_level(testpmd_logtype, RTE_LOG_DEBUG); >=20 > +#ifdef RTE_LIBRTE_PDUMP > + /* initialize packet capture framework */ > + rte_pdump_init(NULL); > +#endif > + > + nb_ports =3D (portid_t) rte_eth_dev_count_avail(); > + if (nb_ports =3D=3D 0) > + TESTPMD_LOG(WARNING, "No probed ethernet > devices\n"); > + > + /* allocate port structures, and init them */ > + init_port(); > + > + set_def_fwd_config(); > + if (nb_lcores =3D=3D 0) > + rte_panic("Empty set of forwarding logical cores - check the " > + "core mask supplied in the command > parameters\n"); > + > /* Bitrate/latency stats disabled by default */ #ifdef > RTE_LIBRTE_BITRATE > bitrate_enabled =3D 0; > @@ -2671,23 +2688,6 @@ main(int argc, char** argv) > strerror(errno)); > } >=20 > -#ifdef RTE_LIBRTE_PDUMP > - /* initialize packet capture framework */ > - rte_pdump_init(NULL); > -#endif > - > - nb_ports =3D (portid_t) rte_eth_dev_count_avail(); > - if (nb_ports =3D=3D 0) > - TESTPMD_LOG(WARNING, "No probed ethernet > devices\n"); > - > - /* allocate port structures, and init them */ > - init_port(); > - > - set_def_fwd_config(); > - if (nb_lcores =3D=3D 0) > - rte_panic("Empty set of forwarding logical cores - check the " > - "core mask supplied in the command > parameters\n"); > - > if (tx_first && interactive) > rte_exit(EXIT_FAILURE, "--tx-first cannot be used on " > "interactive mode.\n"); > -- > 2.7.4