From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0048.outbound.protection.outlook.com [104.47.32.48]) by dpdk.org (Postfix) with ESMTP id B5F5137A8 for ; Mon, 5 Dec 2016 11:24:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Q/pBByPXlq6VEgTbKpp2hVr7PUVu+FMRo91T0YlxgFk=; b=Nt4rho0XkDY6jIaCKhIkr9dwbCH8SjuTVty19Ll9y8J57zUdSRXSpLuptfzCrOzNSIhyj5QbXOFTy9g/Kfz5x8XGzeEadOI4G0VXmTdfnG6UVqamRiJWX1HR35xynMA+QeVRrq5VG045G0W+2452KgeUr4NupgGHSAYYbyWBZ6k= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (50.254.132.37) by BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.693.12; Mon, 5 Dec 2016 10:24:10 +0000 Date: Mon, 5 Dec 2016 15:54:04 +0530 From: Jerin Jacob To: Shreyansh Jain CC: , , , Message-ID: <20161205102404.GA29487@localhost.localdomain> 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> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [50.254.132.37] X-ClientProxiedBy: BY2PR12CA0035.namprd12.prod.outlook.com (10.160.121.45) To BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 2:Sju1wEGevvheiIfA84iKzXAxpwDNmKSzXwduDcaUf7nrmRzctsilDfcuCJ4IN/JUBhrWuSaKhimYyTf/pSU5evbGnEWzP2Ls625KCKttREfiYyer7NYSKv9cFAwq61RhXmN48M8+cJY+cEOaPelVvuypZjWjQoZl8Kml36Qbnj0=; 3:DR3uA3UoYrZkNhH/DmlUu7PPAVsSt0iJ1f4zLyeI2Bj/4BWgqyhYRpZZoxh0LEYWD5ZEYCzbxIL90sivGv2nj2N2tp0gMGxqqLW2uB9dpEGCMAADiuk5PXQ31DRlq39ibYY7PUWlVX5l/uo16vcH8qXi8GZtDn3KaTOKClmsF14=; 25:OobRs2/NKYJJ2ZWBY7yDy/ivdsEu4KNNzrWELGcs5I06JdkUfaUbfLLgV1PBzOkgOxKm1pr3HrpAEvjbgukcfJlIGLsc2oLSPA9ovcVb+49jTwn6HGxZSsMNw87U1+xEx3/XH6rUnzHD0XAT4gb6VStZAhnaTTZsDd5M+tqVX//UCjp9R0lWuGi8RZ9jHwtFVu3wDyK7hGuZ4hmFCi8Sy/ZceGGJPLrXF0VlPRYUOuIJ8hkp4x8EYJfN1HeiDTe/VPbTsy6CSf7Xbmy1c64s44Ah0dyx6T2NxUUgyBHrJE3J0ZUKHejkTfUxZ7TMMorw9HLa4/sZFqa1nTKZ98v0o+nO1zXMESgst15gF60MobhBPdAuZB1beZzCgdDgj97wy9zOTyt3YSS0w/PPq1jFtGGs29xanlqHBf5YGd2iRIDO/L+4JPiMPLdFXSusdKByakYg9iY4NirGa+giXBRIIw== X-MS-Office365-Filtering-Correlation-Id: 97cf577a-f28e-4609-b5ac-08d41cf8daf1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 31:UXh8HqwRUpQQo5YO3bTgCMNK8mqRFaJnmCUbgJc3DoKnsujY2i43xO+psuLC2Iqys/cHzogyq1TIAL61jABB08f9nHNLvs5IpQlf3JsOGTS8LqrtGqLJHEnGdTIIv9qiodFHEKeJaTnwkf7NXJ5/EH532ndYuPVNpsVfHarQ9ewFmbbndS/PEeV42ZXxX86iWruq1ROI1Yj2miWBG7EwrwKQetJUSGwXE+trnjGK4j/+5h519INVJDxmov1Mi2sqHNvKLkzIkM4JRp0U4xnzx/EPT/RMMkvTTJ/8sfte8XE=; 20:YCmAfAuVo8ltOTRFWvZrT4YgnaLD4ToxG5jtiISMNPP/8mz75Kv7U67vDBuPjEGurlXzHRaWomg3TalA94INDIiVLD8BBnEMyXg1gwaTzkYLCmTuN9dOQjZxjEyVG7/ya7JqpIc7Qh2u1ttzONuAnTi+l9dOsQ7/kI70AdzBm7AU1aS9uk0YltOoW1u2aXKmlyIBJkzA79unmyjsxRE88NqEAk89DhTa43+vLWLZrRfW9GcJ1rmWLpXLmCD/S3D0I40sv0fcY8KOG24yMsq1RPglKL+VOi86CtqXuKVx2IIsZapT69BuHaINjAg1dI43zCzIN06XeN/rJenQ2O6Ko9N1917fGnaOPQqMOo6sa7y8dGdpq1pkdT19gkX/X9CvFiT26iWEMti93GKjEj8uhgHDeCFd+Gwxk8C9XZwJnZfSbTfMPdPrROccaM4rYSu/MLXB969RgGFkeSWFK21EnCBhSHmDN2N5N9sA8VUnVMfaT1rb9FcVEj+UwgofXDIAauChlrEvi1PTzCZNle76D96HP3/X0muP+uneF3CfkUC+tpXqd+GApaqr1QQsAeAou5je4eKB5VJMA0owzmCjIjmdXpVlECO0WRfx6P36AcI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148); SRVR:BN3PR0701MB1719; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 4:fb7VWeu9MIx3E8QNBlrTpUZXyp86Tc0ozN7XrIaOeB+6fRdAdypgS1lBHXip6AVUljCJ17b5Z8Qay6UkADmNK0xkJJ+3skmGBO/xQxi5nCHL/1KUkola7o3/NT0V+BPOvTpMQjhCAah39PKrw679FxBu4s8x7aTQAGK7EsqhnH1oRF+vgJclr+nhcNnpbPUBJoP6xr70JqNuw2f7U9VB19oZOhmAZOFE/Wt5MJH6CI6gjCGI8t4yYPNuvU3Gmt1g3sROG0R8KKyW82rTbaNgKvvLlD99NYL50AR/b4dgDRfTblXEoEV/U5tLvf1BIR+wf6q9DYpgtQWTdSpxKN2KmpNcrUkyE8UF3JDZhrNY7n3iZLtKs2k6Glr0GL7sAuPrn2tjqYnBsNFbB2zDkdsJBbEkmi9Dz4zPHwkr9rZ/rITaGhtT5xMQ7xpB5g+uoZCJiASlBk56vs1Q5kMVZqaN4qZ10nsP2vtbRNPhD/6KpNh2g7z0mAJqjYmmw/ugw+oe9mQfynnozUw4GBd4LX1m1PCgrG/K4CCnm/7TgpVOIg5DVoRa/1G8puqUaWY9WSrn4ps0TkpPo2zE3t+sm1m1FRMLKqIFxsyppvInV8J9iDoSzZ1wfCz0XMboVU8hfWfj X-Forefront-PRVS: 0147E151B5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(199003)(24454002)(189002)(377454003)(6916009)(4326007)(6116002)(8676002)(2906002)(39450400002)(38730400001)(33656002)(92566002)(97756001)(61506002)(68736007)(1076002)(83506001)(50986999)(7846002)(8666005)(5660300001)(39850400001)(4001350100001)(110136003)(733004)(66066001)(42882006)(47776003)(3846002)(6666003)(2950100002)(81156014)(101416001)(39410400001)(229853002)(81166006)(6506006)(42186005)(7736002)(46406003)(105586002)(50466002)(93886004)(97736004)(106356001)(39840400001)(23726003)(305945005)(9686002)(54356999)(189998001)(76176999)(18370500001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1719; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1719; 23:5oI0k0G7veMSp/rgFAA/+q+yLj56Z5XfuUCfORB?= =?us-ascii?Q?j2XahH+ymUgYJ9ovT1M5yBJyhkSQMdLOUwFuwl47aot7qJz0uxjxxMsG9SkK?= =?us-ascii?Q?L+3t6KTTm1Mg3bhxQIWuanXegy7yLSADUCFXCfLcNTslhRDb9y2c4ZhlBPw8?= =?us-ascii?Q?FSJiXV+iVv82kQ7IuZwtBOiv6dNdwZp0ckcdsOgac7drWoYNudhNmKfEhqnz?= =?us-ascii?Q?IAbBuW2Kvpt7HJga8ip0rr26y/d28o86LA3BitG9m2R8jj66yr6rboaZQwNv?= =?us-ascii?Q?fZ13CI4RWqz1rX1ejp4Z2yVS3wGBiETbHvGmKRHJWJWidbbevG+TLry1VSA7?= =?us-ascii?Q?wfoYQ3BFf6PzkAf45XYGNLpbp+tEXb1mUX0i06BRLYybPV3hf/TeGllZNIS8?= =?us-ascii?Q?khZyCNtiAB0/WxzFMNNqYZIMdzilUSR/MF4DtXzhl1rZLxO9yYn4wpT4uPON?= =?us-ascii?Q?ZwjcF/tuWDGaPhnfcc4S2448KJcIRqJM7E3OcprQ0E9f61teNEKRww+g2eqV?= =?us-ascii?Q?bTumhucQd243bO+5Fv/UIJCKKziY/+nlWg1pRsIGfkujAhyF7FyUJerWKenW?= =?us-ascii?Q?uPI8FUIwiYpLuUx5QQERq58xnV9XDSF7ER8PH3b1FaKn8MC+iGZz91iq3Etg?= =?us-ascii?Q?3mje8iA2MtU+UYSsL0Q0JxlTs5Clk8Yo3cZvAtSJUlM/LYlhD8S+RZ6VfJ4l?= =?us-ascii?Q?zDMFGswr407F7iRyq64NR8aCme2OTJKKrTPI94qItKgjR+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Q9YGstOlYrzonnkljTVJTWkeyCHVMjYYRVl0iwDmTfQ/8c/JyimbHXV2oQrGdfsJRZATRRPjl1gjP6dzqH9Hrz4O8Y59f8txKGSwxGHXluTQG3LSdXsMt3aQZXm1vczPQMHGmB2Wu+kv29WHrE2hzRuglGO65m68xvlq0t+41NHBYcByzQNhKrLKH4JeaCeSLeJcY/vo=; 5:w4lDVWRtJA0JEKayYflfYwD43YMrtUgbQuaOo+Gh4q9zeoSuX4+iOyAp1vwdQp3cYIuQuRItP/MxTlQiapVe/BNd5Yv95UbmPCJegzgJRSogy7wfoFTuoddhbGbhAD/g0OiRz1mwjIVqkCHBcAHXwHKl6hMBz84Ojb5kYIHH1mQ=; 24:6BZ/a6BlRU4usS/fqXW44JhfzkqtTvpxM1GPNs40cIGEbcePZIn6vF3sOV0O7K87jlhoVJwVez1HSRyuRDHhlGnE1C07JAY8HrrBov4G0KA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 7:EfsvUY0D+0k8vQhNOHvaHHC+ha3gjWkw9ayWl5j5Npa7z3/hc2lfVMwTliyoUX6ss2OM0akQgOgqCyAWaYLw4mAoKxCaOOXsVDu3I3+g7gEolfgGvM9c03iTvl4OGrhGkvJqPadSfTzseHoyMxDbAvxytNR7uSFllLQfcB1JG7GCdez3GRw3Rb2Sx1J3YYwTDZ/I5qNCBnTq0s8lFN8pj6BKhDNULFZ2uTrmqcHO1WnnkTeqZWJJcrUmPgy6sPtx6oLdAhLLbGg9YT84OAcKmaVbS7hYRUrei1xrYXjG3J2f3bGrpTxtzDCok4akjfj+TigcALwCBd/qmRn/xNcw8p+j6ShHGTLCVdNhcSpJoKQ= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2016 10:24:10.8706 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 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:24:15 -0000 On Mon, Dec 05, 2016 at 03:42:18PM +0530, Shreyansh Jain wrote: > Hello Jerin, Hello Shreyansh, > > 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 > > --- > > +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() IMO, We don't need to remove rte_eal_vdev_init() as it is an application API that uses to create vdev driver instance.Moreover, change and removing that name will result in ABI breakage. grep -ri "rte_eal_vdev_init" app/ app/test/test_cryptodev.c: ret = rte_eal_vdev_init( app/test/test_cryptodev.c: TEST_ASSERT_SUCCESS(rte_eal_vdev_init( app/test/test_cryptodev.c: TEST_ASSERT_SUCCESS(rte_eal_vdev_init( app/test/test_cryptodev.c: TEST_ASSERT_SUCCESS(rte_eal_vdev_init( app/test/test_cryptodev.c: TEST_ASSERT_SUCCESS(rte_eal_vdev_init( app/test/test_cryptodev.c: int dev_id = rte_eal_vdev_init( app/test/test_cryptodev.c: ret = rte_eal_vdev_init( app/test/test_cryptodev_perf.c: ret = rte_eal_vdev_init( app/test/test_cryptodev_perf.c: ret = rte_eal_vdev_init( app/test/test_cryptodev_perf.c: ret = rte_eal_vdev_init( app/test/test_cryptodev_perf.c: ret = rte_eal_vdev_init( > > 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; > > >