From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0048.outbound.protection.outlook.com [104.47.38.48]) by dpdk.org (Postfix) with ESMTP id C588258D6 for ; Fri, 16 Sep 2016 06:32:17 +0200 (CEST) Received: from BN6PR03CA0034.namprd03.prod.outlook.com (10.175.124.20) by CY1PR0301MB2012.namprd03.prod.outlook.com (10.164.2.18) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.619.10; Fri, 16 Sep 2016 04:32:16 +0000 Received: from BY2FFO11FD002.protection.gbl (2a01:111:f400:7c0c::164) by BN6PR03CA0034.outlook.office365.com (2603:10b6:404:10c::20) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.609.9 via Frontend Transport; Fri, 16 Sep 2016 04:32:16 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.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 BY2FFO11FD002.mail.protection.outlook.com (10.1.14.124) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.619.6 via Frontend Transport; Fri, 16 Sep 2016 04:32:16 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u8G4Trfk029256; Thu, 15 Sep 2016 21:32:13 -0700 From: Shreyansh Jain To: CC: , David Marchand , , Thomas Monjalon , Shreyansh Jain Date: Fri, 16 Sep 2016 09:59:39 +0530 Message-ID: <1474000200-16705-5-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474000200-16705-1-git-send-email-shreyansh.jain@nxp.com> References: <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> <1474000200-16705-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131184739363106135; (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)(1109001)(1110001)(339900001)(199003)(189002)(8676002)(76176999)(586003)(2351001)(48376002)(104016004)(92566002)(11100500001)(50986999)(5003940100001)(50466002)(81156014)(47776003)(4326007)(105606002)(106466001)(33646002)(19580395003)(50226002)(5660300001)(81166006)(86362001)(626004)(36756003)(229853001)(575784001)(19580405001)(2950100001)(2906002)(8666005)(85426001)(8936002)(68736007)(305945005)(189998001)(97736004)(110136003)(87936001)(7846002)(356003)(77096005)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB2012; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD002; 1:/CTXbe2/sBC9P8K0H9KPzfXaY4zTAFoBksvEO+yS4nYRjfhvlSpu/BCZP2bSzRTpdN/zSPu+Ji7k1WmwWXDBk6767YthJMjsa4QgxgDlBvGw3Um58dPOsf+qdLCX7MSkwELq0HoREpkN6khYofbPRx6BcJH7lThaeLBKuCOeu+fQ6BiPZQ4zCdTbsKIxobPP6yWWQ1HV+TDqvh/sazDYL0kMrAChKCt/fOy8BmGnG+xYdKuJ4Th3hXr1iTZLSGDKJJzJLdMJDuvEl80TPxUFGsAvxqP0faAJ4p9YXnDOhmlB9/AXC1Zl4QYa45BGsIdGl1ntMmqO0ZRUkn5/5OjewgTV5YNH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7uleKyMjDzyEQTvGpYIn7/kvk3xGHOXdkCuhhevpMh4zlLNcnn5w4l4Qim4UcWfCuh2bSIXLTpv2zDudbdm1DSgJVgapPa/i0IbCkMy8Utgmt8Hzs+eOSxlsSdE3VgWDT0WKmwTON6L1+wChqIL1NscQ9 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13017025)(5005006)(8121501046)(13015025)(13024025)(13023025)(13018025)(10201501046)(3002001)(6055026); SRVR:CY1PR0301MB2012; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR0301MB2012; X-Forefront-PRVS: 0067A8BA2A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB2012; 23:ZMhrpZ3ALPeWXVJdahgDRg8c/t6fYFYbGaXdIOg?= =?us-ascii?Q?D2R5bC87wZ75kydi2mHoE52Qwh9Lts23/ESIaxWaqy1KaiLV1UAnYRniZNA3?= =?us-ascii?Q?5ITVOTCr9b45lR+jhDtyAzNy10mJaSGyKaDf40NgSYHvSvcCvcdWdpYkhZr9?= =?us-ascii?Q?QUifWgohjeU+waA2TpSBdP8V00H9QuJsE1F+O+GbD3XILSZoXk8JUhwA5noD?= =?us-ascii?Q?qJsvkh7yWIxvCkc21DEc2DkSjNA3oGl0c0V2CcTbqGAkU9ACBy/6cQOJaUF5?= =?us-ascii?Q?vUfzQ9OnVz8swHPQ02Bc+ycPVv9JJdEzUmPncht3k3lhiLAOJ5BJTm53cR82?= =?us-ascii?Q?YBJcyyuln7uHtxL9ycXq2Lg/xUIOumSRaxVUYR4aUzcLemtMb98brTdkR7J1?= =?us-ascii?Q?NqIjbhth2G10BwEHH+gZ/TUMj8pIuos33rgHYxDvh7ndTwChdq3ocd4gAaJ8?= =?us-ascii?Q?Z+lXS26GbcMTo4lM+4dIj32zy+ObWCxvoTjR8lHs7bKIaySZlzBzd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TXkUgJTOoZJDyX/FyxHa2+i2fkWodS7KxOJWl7J2WT55z6Z2EJAmBYnnk3v+iNIHoxQXZvKSz+DqG+xb8YZcnQe85EyX+KTRmJ3R26rhCqaFAoDSqz1Z/Bn8sPi6j89WVZVuIqAA=; 5:E88G5x7Eqo+0ECKHSViAC5Zh+JQDgPx71wGN6rGcKPEHYsnEshX4I4wGfq9QfxDEiZbj6bVVB55mcQT5oTFrVSRO+ZV6Tqpbgxx3Fctpcr4vjK74DYeC5ncco9k3+CQPVhSLkDxGfYUMkuBHel0Ui+EZ7CppuNp5noWgcVKbFh0=; 24:SfsKOuo0hnIOmp77tOa92Xr7Ip83H30dvVymvN/s0LvKgqSn2m2TwgA9kFkE8KX5MzpMt74reDuFScYSDB69dQbQ/35FRuKasWGeTRMeopI=; 7:xqV5nUEe4UlBy31QuXfTzhVU1RNNE03HJnO/UcTzfoWvIUpompnxyx7C2QPMM1rEKoG5xZdkdouPKM3eyo/ripvpuZUhEyJc6UqCPEAGFU3fn7Hib+udjchG+ome4jzqgoVqdVsGIXMnzcLJzCBr+tmY3+C2zNcEfjAO6/KFsYvXvUNtP2aCgon7A1WndfB50Mje89Rlj2p+MWe1s7zTEFgByoTGZMvMXs739VesgFcaRChxY30MQcthQSU0wPjv SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Sep 2016 04:32:16.1078 (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: CY1PR0301MB2012 Subject: [dpdk-dev] [PATCH v10 04/25] eal/pci: replace PCI devinit/devuninit with probe/remove X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2016 04:32:18 -0000 Probe and Remove are more appropriate names for PCI init and uninint operations. This is a cosmetic change. Only MLX* uses the PCI direct registeration, bypassing PMD_* macro. The calls backs for this too have been updated. VDEV are left out. For them, init/uninit are more appropriate. Suggested-by: David Marchand Signed-off-by: Shreyansh Jain --- app/test/test_pci.c | 8 ++++---- drivers/net/mlx4/mlx4.c | 4 ++-- drivers/net/mlx5/mlx5.c | 4 ++-- lib/librte_cryptodev/rte_cryptodev.c | 4 ++-- lib/librte_cryptodev/rte_cryptodev_pmd.h | 2 +- lib/librte_eal/common/eal_common_pci.c | 16 ++++++++-------- lib/librte_eal/common/include/rte_dev.h | 4 ++-- lib/librte_eal/common/include/rte_pci.h | 10 +++++----- lib/librte_ether/rte_ethdev.c | 8 ++++---- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/app/test/test_pci.c b/app/test/test_pci.c index 69f78d9..f1b988a 100644 --- a/app/test/test_pci.c +++ b/app/test/test_pci.c @@ -52,11 +52,11 @@ * PCI test * ======== * - * - Register a driver with a ``devinit()`` function. + * - Register a driver with a ``probe()`` function. * * - Dump all PCI devices. * - * - Check that the ``devinit()`` function is called at least once. + * - Check that the ``probe()`` function is called at least once. */ int test_pci_run = 0; /* value checked by the multiprocess test */ @@ -79,14 +79,14 @@ struct rte_pci_id my_driver_id2[] = { struct rte_pci_driver my_driver = { .name = "test_driver", - .devinit = my_driver_init, + .probe = my_driver_init, .id_table = my_driver_id, .drv_flags = 0, }; struct rte_pci_driver my_driver2 = { .name = "test_driver2", - .devinit = my_driver_init, + .probe = my_driver_init, .id_table = my_driver_id2, .drv_flags = 0, }; diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 304c846..5c709ee 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -5544,7 +5544,7 @@ static struct eth_driver mlx4_driver; * 0 on success, negative errno value on failure. */ static int -mlx4_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) +mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) { struct ibv_device **list; struct ibv_device *ibv_dev; @@ -5913,7 +5913,7 @@ static struct eth_driver mlx4_driver = { .pci_drv = { .name = MLX4_DRIVER_NAME, .id_table = mlx4_pci_id_map, - .devinit = mlx4_pci_devinit, + .probe = mlx4_pci_probe, .drv_flags = RTE_PCI_DRV_INTR_LSC, }, .dev_private_size = sizeof(struct priv) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index d96a9af..7768231 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -355,7 +355,7 @@ static struct eth_driver mlx5_driver; * 0 on success, negative errno value on failure. */ static int -mlx5_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) +mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) { struct ibv_device **list; struct ibv_device *ibv_dev; @@ -730,7 +730,7 @@ static struct eth_driver mlx5_driver = { .pci_drv = { .name = MLX5_DRIVER_NAME, .id_table = mlx5_pci_id_map, - .devinit = mlx5_pci_devinit, + .probe = mlx5_pci_probe, .drv_flags = RTE_PCI_DRV_INTR_LSC, }, .dev_private_size = sizeof(struct priv) diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index fc4123b..da5ad73 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -548,8 +548,8 @@ rte_cryptodev_pmd_driver_register(struct rte_cryptodev_driver *cryptodrv, * Register PCI driver for physical device intialisation during * PCI probing */ - cryptodrv->pci_drv.devinit = rte_cryptodev_init; - cryptodrv->pci_drv.devuninit = rte_cryptodev_uninit; + cryptodrv->pci_drv.probe = rte_cryptodev_init; + cryptodrv->pci_drv.remove = rte_cryptodev_uninit; rte_eal_pci_register(&cryptodrv->pci_drv); diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h index cd46674..130290e 100644 --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h @@ -505,7 +505,7 @@ rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev); * device, by invoking the rte_eal_pci_register() function to * register the *pci_drv* structure embedded in the *crypto_drv* * structure, after having stored the address of the - * rte_cryptodev_init() function in the *devinit* field of the + * rte_cryptodev_init() function in the *probe* field of the * *pci_drv* structure. * * During the PCI probing phase, the rte_cryptodev_init() diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 6a0f6ac..db8cba0 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -153,7 +153,7 @@ pci_unmap_resource(void *requested_addr, size_t size) } /* - * If vendor/device ID match, call the devinit() function of the + * If vendor/device ID match, call the probe() function of the * driver. */ static int @@ -212,15 +212,15 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d /* reference driver structure */ dev->driver = dr; - /* call the driver devinit() function */ - return dr->devinit(dr, dev); + /* call the driver probe() function */ + return dr->probe(dr, dev); } /* return positive value if driver doesn't support this device */ return 1; } /* - * If vendor/device ID match, call the devuninit() function of the + * If vendor/device ID match, call the remove() function of the * driver. */ static int @@ -257,7 +257,7 @@ rte_eal_pci_detach_dev(struct rte_pci_driver *dr, RTE_LOG(DEBUG, EAL, " remove driver: %x:%x %s\n", dev->id.vendor_id, dev->id.device_id, dr->name); - if (dr->devuninit && (dr->devuninit(dev) < 0)) + if (dr->remove && (dr->remove(dev) < 0)) return -1; /* negative value is an error */ /* clear driver structure */ @@ -275,7 +275,7 @@ rte_eal_pci_detach_dev(struct rte_pci_driver *dr, } /* - * If vendor/device ID match, call the devinit() function of all + * If vendor/device ID match, call the probe() function of all * registered driver for the given device. Return -1 if initialization * failed, return 1 if no driver is found for this device. */ @@ -302,7 +302,7 @@ pci_probe_all_drivers(struct rte_pci_device *dev) } /* - * If vendor/device ID match, call the devuninit() function of all + * If vendor/device ID match, call the remove() function of all * registered driver for the given device. Return -1 if initialization * failed, return 1 if no driver is found for this device. */ @@ -392,7 +392,7 @@ err_return: } /* - * Scan the content of the PCI bus, and call the devinit() function for + * Scan the content of the PCI bus, and call the probe() function for * all registered drivers that have a matching entry in its id_table * for discovered devices. */ diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h index 95789f9..8233a2a 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -185,8 +185,8 @@ static const char DRIVER_EXPORT_NAME_ARRAY(this_pmd_name, idx) \ __attribute__((used)) = RTE_STR(name) #define PMD_REGISTER_DRIVER(drv, nm)\ -void devinitfn_ ##drv(void);\ -void __attribute__((constructor, used)) devinitfn_ ##drv(void)\ +void probefn_ ##drv(void);\ +void __attribute__((constructor, used)) probefn_ ##drv(void)\ {\ (drv).name = RTE_STR(nm);\ rte_eal_driver_register(&drv);\ diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index fa74962..803c78a 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -193,12 +193,12 @@ struct rte_pci_driver; /** * Initialisation function for the driver called during PCI probing. */ -typedef int (pci_devinit_t)(struct rte_pci_driver *, struct rte_pci_device *); +typedef int (pci_probe_t)(struct rte_pci_driver *, struct rte_pci_device *); /** * Uninitialisation function for the driver called during hotplugging. */ -typedef int (pci_devuninit_t)(struct rte_pci_device *); +typedef int (pci_remove_t)(struct rte_pci_device *); /** * A structure describing a PCI driver. @@ -206,8 +206,8 @@ typedef int (pci_devuninit_t)(struct rte_pci_device *); struct rte_pci_driver { TAILQ_ENTRY(rte_pci_driver) next; /**< Next in list. */ const char *name; /**< Driver name. */ - pci_devinit_t *devinit; /**< Device init. function. */ - pci_devuninit_t *devuninit; /**< Device uninit function. */ + pci_probe_t *probe; /**< Device Probe function. */ + pci_remove_t *remove; /**< Device Remove function. */ const struct rte_pci_id *id_table; /**< ID table, NULL terminated. */ uint32_t drv_flags; /**< Flags contolling handling of device. */ }; @@ -442,7 +442,7 @@ int rte_eal_pci_probe_one(const struct rte_pci_addr *addr); * Close the single PCI device. * * Scan the content of the PCI bus, and find the pci device specified by pci - * address, then call the devuninit() function for registered driver that has a + * address, then call the remove() function for registered driver that has a * matching entry in its id_table for discovered device. * * @param addr diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index f62a9ec..d07348e 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -348,7 +348,7 @@ rte_eth_dev_uninit(struct rte_pci_device *pci_dev) * Poll Mode Driver. * Invokes the rte_eal_pci_register() function to register the *pci_drv* * structure embedded in the *eth_drv* structure, after having stored the - * address of the rte_eth_dev_init() function in the *devinit* field of + * address of the rte_eth_dev_init() function in the *probe* field of * the *pci_drv* structure. * During the PCI probing phase, the rte_eth_dev_init() function is * invoked for each PCI [Ethernet device] matching the embedded PCI @@ -357,8 +357,8 @@ rte_eth_dev_uninit(struct rte_pci_device *pci_dev) void rte_eth_driver_register(struct eth_driver *eth_drv) { - eth_drv->pci_drv.devinit = rte_eth_dev_init; - eth_drv->pci_drv.devuninit = rte_eth_dev_uninit; + eth_drv->pci_drv.probe = rte_eth_dev_init; + eth_drv->pci_drv.remove = rte_eth_dev_uninit; rte_eal_pci_register(ð_drv->pci_drv); } @@ -538,7 +538,7 @@ rte_eth_dev_detach_pdev(uint8_t port_id, struct rte_pci_addr *addr) if (rte_eal_compare_pci_addr(&vp, &freed_addr) == 0) goto err; - /* invoke devuninit func of the pci driver, + /* invoke remove func of the pci driver, * also remove the device from pci_device_list */ if (rte_eal_pci_detach(&freed_addr)) goto err; -- 2.7.4