From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-eopbgr730062.outbound.protection.outlook.com [40.107.73.62]) by dpdk.org (Postfix) with ESMTP id 090602C6D for ; Mon, 5 Dec 2016 11:09:34 +0100 (CET) Received: from BN6PR03CA0050.namprd03.prod.outlook.com (10.173.137.12) by BN1PR0301MB0737.namprd03.prod.outlook.com (10.160.78.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.10; Mon, 5 Dec 2016 10:09:33 +0000 Received: from BL2FFO11FD032.protection.gbl (2a01:111:f400:7c09::134) by BN6PR03CA0050.outlook.office365.com (2603:10b6:404:4c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.10 via Frontend Transport; Mon, 5 Dec 2016 10:09:32 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; caviumnetworks.com; dkim=none (message not signed) header.d=none;caviumnetworks.com; dmarc=fail action=none header.from=nxp.com;caviumnetworks.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD032.mail.protection.outlook.com (10.173.160.73) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.734.4 via Frontend Transport; Mon, 5 Dec 2016 10:09:31 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:1036; Count:13 Received: from [10.232.14.87] ([10.232.14.87]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id uB5A9ScL027793; Mon, 5 Dec 2016 03:09:29 -0700 To: Jerin Jacob References: <1479628850-27202-1-git-send-email-jerin.jacob@caviumnetworks.com> <1480798539-13360-1-git-send-email-jerin.jacob@caviumnetworks.com> <1480798539-13360-3-git-send-email-jerin.jacob@caviumnetworks.com> CC: , , , From: Shreyansh Jain Message-ID: Date: Mon, 5 Dec 2016 15:42:18 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1480798539-13360-3-git-send-email-jerin.jacob@caviumnetworks.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131254061723012814; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(336004)(24454002)(189002)(377454003)(199003)(50986999)(81156014)(76176999)(4001350100001)(50466002)(39410400001)(77096006)(65826007)(39380400001)(39400400001)(39450400002)(5660300001)(104016004)(110136003)(97736004)(86362001)(33646002)(356003)(626004)(85426001)(7846002)(83506001)(68736007)(39850400001)(47776003)(5890100001)(230700001)(92566002)(2906002)(38730400001)(64126003)(31686004)(105606002)(36756003)(23746002)(6916009)(189998001)(31696002)(106466001)(305945005)(65806001)(2950100002)(8676002)(65956001)(8936002)(81166006)(39840400001)(54356999)(6666003)(4326007)(229853002)(39860400001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0737; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD032; 1:9zWml2hPw2qzP2hIN1u/2MkBcNVeVkEQKq6WCO7vNcjjslOQZwgn+wcj8FKDkk1/I1hBJNhUvkCKd4CXd7eXTzuPiVQjAs1bwLIBjKGcc3F8fAdXirWdM5D2Kh6W2gmZGVFF29bxfQk1xVZ0YYYeFEStqWpRyel31FOHfPugBdhQqI0gkLaXbIzKmojovoiWms9xzBzgwsGqiEqcv4a3IVaoYCwmszk4idfju+ibGSdAACnwsyySky+ySQPP+z2LItqyJr+aHUADzxzLOytUSsPxoY3MalmFdq+F8f1WfW+7O6i8ANjaOVHMfnqAYPEmMlrnZcanmkb8yEl6KYqbneMcuzUbefZvMWA1/O7KPbXuqVm3n9z0r2arOlJ3ThdHldHQ3hnZ0vcvOm0EmRKq/Az7mG/6bWllDKIBqTZ1hBq4+CX5xd9dlvFamVzGnVjo2Sqxty5EAH5uuQ7jmrFh5oqHYnau+wuu4ocEYGFcU1YrSKK8xaH3xEyLVHPUJeW4r6Gv+IJLibYoIRQ0++5b2CekBk5uL3I0bUIjqA3W7AZSCqSZpfCNpIMMrOaco16z6TUKUC0DFV5pbdR7riU+u75YGL7vowmbiCAkEZgNFsykRIhg3jfW8rRLf7lOtFa4x7e4aewOaMe8Co/I4R1kLw== X-MS-Office365-Filtering-Correlation-Id: 3b79f681-a844-477e-6265-08d41cf6ceb5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN1PR0301MB0737; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0737; 3:5bvhFKUwAR446hFAYWyFg//RcLOMLjQfMiBB4FLGOV2eP2rPOsJ7iI4oXdf2FNGpWxANmv1MV+T0Q7ndFnVUm8hJtBZww4ADqH4SPcEBzqNyOfQLn6myVVukaCu8HrBJtnSIu00JD0UGp+E93poomL+Av/d6VJmOE9hv90BMBBYcpB3IqRPRr6DURvRTMYeBuomsVR+EJmtfbMhV32V0wKI9QS7iSArcJCSGxneJDALRwMFMNLcIHqU8ibdoXycSop+WKtedLMMMW5wVqISehH0cfMkRxwQndp0gxh0WbInNnr45MIJFw0sTZoe293MPERV9AjKgyWrST4+LS7/H9/FnSxs7urpayEf8Dqk3wP1YZn5EJDV36bFC4WgCH+iu; 25:Ptu7tF+g1GK9v4iBHpFIwWc3USxiL/2W662B08fm29fkMvSfInxLedBTIev2HiRI3TkufzKyW/qeDr6SplhLTT2Dw24cZt7cIcE2ZWWvWlMHZURwZ97z0WeV+ek5qA9pfGDqt8vpU0mqJZ9F56bWhKf8CLmZPR6ZBZJbhX7IRmXRQRYXTlH7YHb2Ut9RLT/9aKqGEsTqZZm56606GLRAkD7nDAzl+hi483SYt3ngpLfpVMRfKcvibszPoCRTfHw80HL6ERl+XBGJ58oGkZRKJujhccf78bl8frR4pA3BaI76eoLx9rRjCYroKEjazXHtCJcaIHFK9dkKi2YwJJDqmbI7VwRW63Cb2t3UNIdxDgqcW0cMOL1BzayJZMjybI1OYmHFdaFx6rWr6o7V+7E8EBzObg2botEO+AEWCm7+DNIixXk94d5e0tMctbXYvaj6EN5ZQNsQisU31Hp/zjwMBQ== X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0737; 31:9G4LV5TI0hXnH2Vo6wkb4dRPB3O8gyiwflKxhQCmTmGOwbjaEzQlu3xG4hD82fuDD654AaRccuIhiuklpzYjKfHa92fFCF3OgpLo5BSt/RQQFzACVkW1/CXCmLpZG7UUJ46fMKAynEr1fqIMOKhUHoPCXccr4W/v/yfQvLrL6yPz6gb6TEUbSxOcH/ef8fhgdYYBG+S7mNR0R3fqZKCSFPCmVLXGo1V/S/ow+rwLUtkzJf5g/7l/IJ42Tk+EqMsQ/T9GrB31rvtH2YUAawCMng== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13018025)(13017025)(13015025)(13023025)(8121501046)(5005006)(13024025)(10201501046)(3002001)(6055026)(6096035)(20161123556025)(20161123565025)(20161123563025)(20161123561025)(20161123559025); SRVR:BN1PR0301MB0737; BCL:0; PCL:0; RULEID:(400006); SRVR:BN1PR0301MB0737; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0737; 4:sms6pPHFj6LUBrR3p+WQTSpsAkjhD08EY3LM6DnD2wN4j4k4wvVaAnaJlKLNlKYzBqVIwedvWsfNFEJgsX6wHoaqa3xxvfiU5DVrMs/cld46qHHP3H87j+cQDZ3EY0qxOIs3RHHjS8S070urrGjsDOw7LelUysOmn/Cc0m2xe2BZTvqCaDFsWVoF4FCGTMz9mhl77y4m2i4OWZkFM5adlX7c0sIivYeh3jmuulZIuW5FzYy8Hv3oSg7uGlf2mCICz7CLHVdSkTqWUIwkVFv0xACrEo9yuKfULhMtFKJ19wdeXe/1TidCG79YlX6NbTofmNvQHd7B/kOG+IhdRWoj8lSMIx9DaHjf8lTfBZoOcXzWsRtFJnGbScBLqm/pbwvRA+2ls9zb54C9wUxRZowr56kWfy7y7HJRalDmYnBA8DnZULnsgq7nYrEyz60lcaX35mHjlWX21mpkZm7pzzaV0exwLnUSfuVEmro9KXWjZz0QKD9Wn1PoS/2NMPSO/UEGQHpXAt/YhwCTVEHCcsZhDeafbRZBh2wNTeKzzVHJ5IpyMiAXd+9VVabzv1FXbXK+bV/Rxw0D2ofom1z00/0AQJ+y50bxj8R98mH9fKq9FBtsDGaGK55NWgaUEMNqZtaol0EqaYUgTFbUxEGMchLG6S+wt8HUcdJqJH96p0iBI3IgelyJzUmdl6MJpf+mk1BEFuZGY2OlIdyHLUV8lvaGXR5cGjQjsS4KUCUX1kQvi5hDMrbQHeDow5TN9tvWyrHi X-Forefront-PRVS: 0147E151B5 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BN1PR0301MB0737; 23:czw8T8ogkX1WYy6LMeAfDr3t5AGofUX0/U/?= =?Windows-1252?Q?S61OcYYJMOqX473eEJrk3/MdVMbERmHtVB1zxacGS2pOFkCfRWcKqNOp?= =?Windows-1252?Q?t41k4u8DQwKff00nWLAZa03Ejt8v4nWAuurX3a4NVfs1isJOq1cnu22g?= =?Windows-1252?Q?mMHWmXwLfcUyDNB1sAYl6HuwV6Cqg5aDn503XmhXehIuj68OUc9BaM9O?= =?Windows-1252?Q?ZBBg6BS0OAGhCG9maVsjgFy63Sdh36bKsHdLxcG/HCiiSwNQMZtjD6/E?= =?Windows-1252?Q?40z1iE9GQqAgpDgsIGHaE4ViONgCRjoZ/V9GWlEHCGjSqWQ+46LF6BXk?= =?Windows-1252?Q?f2lDbtLC5y6mRz1bwZTMitC9RVZSQyfP84L3KEY6/Re3Vfi7Nm4zlt0d?= =?Windows-1252?Q?SpchovtoIvBKcufiJcHCspLg+LHY6vBb87xgahsR7g4ggeHjKi2gIQxB?= =?Windows-1252?Q?IjRcoUGVa74+o7PT+r6bZlCRUQB/BWJZXeE4IIxOc6+RKv6jqJoCt2WR?= =?Windows-1252?Q?cEOSx+l2BVjUC60kkskDZ5VTm2pm6QOx/cb0ho6kwa0shZgVbV7e2YID?= =?Windows-1252?Q?TneZFQmtS7OlglFgqfH0sSrDUzj6umdFafJy+xK4kfWEhQ/zZEkYX7/q?= =?Windows-1252?Q?WaTvW8YKCbM+F6kQps282uKVMUNf9Gf3/UODh+kiTeMWQpvOGaIkR4ad?= =?Windows-1252?Q?81VyX4TA6diPdYP2ULr6wA009NS2hrOZ8tLfPmX41tE5LWeu/YAbkJYx?= =?Windows-1252?Q?i/AMbr9fhCL9V0S41T4iAojHld3sXt85Openw0z0uzLJWXVhWPOgQniI?= =?Windows-1252?Q?UslEGpOslGupvYKU3sm6/JgKjhE/MqxuppMLgdST3GNmL1GwCZ2Xn780?= =?Windows-1252?Q?Uj4My5rqGv0UztcNjWSyyK5ygSSbdSMc7v6uu0AJJqF4hkrPE7WUDP5p?= =?Windows-1252?Q?ewbgsuniEPDcPIAJgdXq2XeY3Mc9/Ue/4mEE3HsgKbLeE8au/vx+OnBK?= =?Windows-1252?Q?qxoVDPH6QplGbcCnoM91kD0+va8eqmINX2lgMWT3zWqHwiNa8t2aogqE?= =?Windows-1252?Q?I6NBP6XzSXjAnSDYFQQ8ACFR1fd7POSeKJsQxXgXW6/LlDDZNZHB2CXZ?= =?Windows-1252?Q?TXCXQiZqYKVelBxz4CReLePYjJHWPJPrH9pIHGXb+djk7u9QuxuMPfZu?= =?Windows-1252?Q?N+7l/1flwz9gWCE0G+k1I7nR/fneaZ2st1/VDiXecCCwGWF/Y9g3fkhb?= =?Windows-1252?Q?XRKNiiCnXxdxQjGN/1VCkfUSEo0sMRgeJOHUvjsDJSpWADLlYBxMCvQe?= =?Windows-1252?Q?RYZymgzjj5xyLGL92v6Difyii7uFZtMyRUhZ1NKAUV3mGT4yCfhcoo+o?= =?Windows-1252?Q?PSOwV0p/fAjY284gAUIvfmnom/hP6xxGU6MdV8y8szpQNSqW/Srw+TaD?= =?Windows-1252?Q?2jjaD69ATjC7bZiumQiwPd4+lcQZ4mXoJDR19HiIbLcUotVPKEA8B8VM?= =?Windows-1252?Q?5zauYfr8lsrQphss2ycDdYOGrP/UEa/7n0Uw3d9RWd0Xaqd83UZe50km?= =?Windows-1252?Q?ZWS8x4Ph1voCu1OP/kwHul4MU+c9ezKepAN6sRp0PRFDab84+zc8hmj+?= =?Windows-1252?Q?of7s7PqMROu0LgpV9e2VpWyY=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0737; 6:o4lGTM5Pj8M3inrM8a3oa3J8zigrFf1mx/G0WbtOPjNLNP5zRvv0e3m3nFx3FxTelOAOv1TZ8tLIrTrR4C1kAvBNDGC9ShaKfaPPB6JqL6HgtIgkj5QSKLVPgqvmGYE09XtSq+5NXdUvc3BQQtPKfA22mVlqoWx+wguhWP6xqxN3r0JzL1uV8PeX86x2NAw0Ovusl9XxgnMjHdixvLx5WdNhmSKxfJrCHooCUoNGGnuUBs+HlqKOJUcc3q9ub38M5U5WTFfEF1qpD5jgQLxPEF4PggojXHc0hNSdjDIikUIUmjsBsw4qCl0wbdVavCkKid1hHTCPvHEqhpyT4Co68OAOZborb1nMeVSRYB3ByDSjUrsOtKg8o0+WETuHTd7zYXLNhBcSozp0022zw43Xg0Fymv3eCwadysUekXGGXn4O3JkjdBRgLkoezIQOXR45; 5:6/nmuD8vbLnCqP/h0tU38TP8S+TF3waIaRqakQZkGM+Ev5n2ohNRcnb/drX36FCfrWQz1ArpgYXIm3xcVqQ3iEXMX7GdHGPnGm8U2LiMy/X7gDwBU7logcZRdWJUZRWcm3Ov+5NnBkNiYyl7r0RwV2q2HdXe1kbdzju6P5sZ0WwxEer0Ei+uQ99aVhY19t0l; 24:FgoAbXSk5dISDTU2vkkVILIHxASUx2I796TErVVM9HVCcr9NN76b5joskZY/0gQoNmTveSfUYwYgNKtSXs/tJ9a4M6+BqwjTWK5PBsHb7hQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0737; 7:9aHrVKBpnyFcJVOBaIn60hERAmSvELd+Xa+/T/jKjzUBAM6inUwdWNpYyHTx+pxZFBQNOW8BXMlgJqytPziK2epYDG+SGWUUeSmoZ2IXfPB9oA/d+qK1I9bZxL5rzu53E8UK6jffDQ110kWjyBFZvfreatMEvL3DseyYielF3utU3yorR31NMsj7mwloXktT48qdFLd1Q2OdXYfsyNpwluo27F286PNC1rweOVEWS085jtt3dpvEE3/S+7QbQ+V6TF7exg/rSFJYPMIJZ92i6ghsd28Z6KTMOCrLs9bN5sw4QQVPymOD5t0rfxsBUU+gbe/OqM2gUIj7ustgtKulCzbF7aqGNlxJFhzXURFV6sQS9oP9sxOl3+zV5rWYm8BCaEP6HpdMa1HbK9cSaPgGFJ+j1BYXfd8ztbddv+pVV3vJ7ESD+G0xClxMsaL45vyJ2DPb0G+fzSiYV9XBODuNcA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2016 10:09:31.8956 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0737 Subject: Re: [dpdk-dev] [PATCH v2 2/2] eal: rename dev init API for consistency 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, 05 Dec 2016 10:09:34 -0000 Hello Jerin, On Sunday 04 December 2016 02:25 AM, Jerin Jacob wrote: > rte_eal_dev_init() is a misleading name. > It actually performs the driver->probe for vdev, > which is parallel to rte_eal_pci_probe. > > Changed to rte_eal_vdev_probe for consistency and > moved the vdev specific probe to eal_common_vdev.c > > Suggested-by: Shreyansh Jain > Signed-off-by: Jerin Jacob > --- > drivers/net/virtio/virtio_user_ethdev.c | 2 +- > lib/librte_eal/bsdapp/eal/eal.c | 4 ++-- > lib/librte_eal/bsdapp/eal/rte_eal_version.map | 2 +- > lib/librte_eal/common/eal_common_dev.c | 29 ------------------------- > lib/librte_eal/common/eal_common_vdev.c | 29 +++++++++++++++++++++++++ > lib/librte_eal/common/include/rte_dev.h | 4 ++-- > lib/librte_eal/linuxapp/eal/eal.c | 4 ++-- > lib/librte_eal/linuxapp/eal/rte_eal_version.map | 2 +- > 8 files changed, 38 insertions(+), 38 deletions(-) > > diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c > index 406beea..3b8f111 100644 > --- a/drivers/net/virtio/virtio_user_ethdev.c > +++ b/drivers/net/virtio/virtio_user_ethdev.c > @@ -327,7 +327,7 @@ virtio_user_eth_dev_free(struct rte_eth_dev *eth_dev) > } > > /* Dev initialization routine. Invoked once for each virtio vdev at > - * EAL init time, see rte_eal_dev_init(). > + * EAL init time, see rte_eal_vdev_probe(). > * Returns 0 on success. > */ > static int > diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c > index 2206277..62245f3 100644 > --- a/lib/librte_eal/bsdapp/eal/eal.c > +++ b/lib/librte_eal/bsdapp/eal/eal.c > @@ -613,8 +613,8 @@ rte_eal_init(int argc, char **argv) > if (rte_eal_pci_probe()) > rte_panic("Cannot probe PCI\n"); > > - if (rte_eal_dev_init() < 0) > - rte_panic("Cannot init pmd devices\n"); > + if (rte_eal_vdev_probe() < 0) > + rte_panic("Cannot probe vdev drivers\n"); > > rte_eal_mcfg_complete(); > > diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map > index 2f81f7c..f90bde9 100644 > --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map > +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map > @@ -22,7 +22,7 @@ DPDK_2.0 { > rte_dump_tailq; > rte_eal_alarm_cancel; > rte_eal_alarm_set; > - rte_eal_dev_init; > + rte_eal_vdev_probe; > rte_eal_devargs_add; > rte_eal_devargs_dump; > rte_eal_devargs_type_count; > diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c > index 4f3b493..6d6868f 100644 > --- a/lib/librte_eal/common/eal_common_dev.c > +++ b/lib/librte_eal/common/eal_common_dev.c > @@ -38,7 +38,6 @@ > #include > > #include > -#include > #include > #include > #include > @@ -76,34 +75,6 @@ void rte_eal_device_remove(struct rte_device *dev) > TAILQ_REMOVE(&dev_device_list, dev, next); > } > > -int > -rte_eal_dev_init(void) > -{ > - struct rte_devargs *devargs; > - > - /* > - * Note that the dev_driver_list is populated here > - * from calls made to rte_eal_driver_register from constructor functions > - * embedded into PMD modules via the RTE_PMD_REGISTER_VDEV macro > - */ > - > - /* call the init function for each virtual device */ > - TAILQ_FOREACH(devargs, &devargs_list, next) { > - > - if (devargs->type != RTE_DEVTYPE_VIRTUAL) > - continue; > - > - if (rte_eal_vdev_init(devargs->virt.drv_name, > - devargs->args)) { > - RTE_LOG(ERR, EAL, "failed to initialize %s device\n", > - devargs->virt.drv_name); > - return -1; > - } > - } > - > - return 0; > -} > - > int rte_eal_dev_attach(const char *name, const char *devargs) > { > struct rte_pci_addr addr; > diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c > index 0ff2377..ed6a751 100644 > --- a/lib/librte_eal/common/eal_common_vdev.c > +++ b/lib/librte_eal/common/eal_common_vdev.c > @@ -37,6 +37,7 @@ > #include > #include > > +#include > #include > #include > > @@ -114,3 +115,31 @@ rte_eal_vdev_uninit(const char *name) > RTE_LOG(ERR, EAL, "no driver found for %s\n", name); > return -EINVAL; > } > + > +int > +rte_eal_vdev_probe(void) > +{ > + struct rte_devargs *devargs; > + > + /* > + * Note that the dev_driver_list is populated here > + * from calls made to rte_eal_driver_register from constructor functions > + * embedded into PMD modules via the RTE_PMD_REGISTER_VDEV macro > + */ > + > + /* call the init function for each virtual device */ > + TAILQ_FOREACH(devargs, &devargs_list, next) { > + > + if (devargs->type != RTE_DEVTYPE_VIRTUAL) > + continue; > + > + if (rte_eal_vdev_init(devargs->virt.drv_name, The situation now is: rte_eal_init=>rte_eal_vdev_probe()=>rte_eal_vdev_init()=> driver->probe() Even though I had suggested this, my intention was to completely do away with rte_*_[v]dev_init as it is misleading. rte_eal_init=>rte_eal_vdev_probe=>driver->probe() should be the ideal order, IMO. Apologies, I was not completely clear then. > + devargs->args)) { > + RTE_LOG(ERR, EAL, "failed to initialize %s device\n", > + devargs->virt.drv_name); > + return -1; > + } > + } > + > + return 0; > +} > diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h > index 8840380..146f505 100644 > --- a/lib/librte_eal/common/include/rte_dev.h > +++ b/lib/librte_eal/common/include/rte_dev.h > @@ -171,9 +171,9 @@ void rte_eal_driver_register(struct rte_driver *driver); > void rte_eal_driver_unregister(struct rte_driver *driver); > > /** > - * Initalize all the registered drivers in this process > + * Probe all the registered vdev drivers in this process > */ > -int rte_eal_dev_init(void); > +int rte_eal_vdev_probe(void); > > /** > * Initialize a driver specified by name. > diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c > index 16dd5b9..faf75cf 100644 > --- a/lib/librte_eal/linuxapp/eal/eal.c > +++ b/lib/librte_eal/linuxapp/eal/eal.c > @@ -884,8 +884,8 @@ rte_eal_init(int argc, char **argv) > if (rte_eal_pci_probe()) > rte_panic("Cannot probe PCI\n"); > > - if (rte_eal_dev_init() < 0) > - rte_panic("Cannot init pmd devices\n"); > + if (rte_eal_vdev_probe() < 0) > + rte_panic("Cannot probe vdev drivers\n"); > > rte_eal_mcfg_complete(); > > diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map > index 83721ba..67fc95b 100644 > --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map > +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map > @@ -22,7 +22,7 @@ DPDK_2.0 { > rte_dump_tailq; > rte_eal_alarm_cancel; > rte_eal_alarm_set; > - rte_eal_dev_init; > + rte_eal_vdev_probe; > rte_eal_devargs_add; > rte_eal_devargs_dump; > rte_eal_devargs_type_count; >