From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0056.outbound.protection.outlook.com [104.47.38.56]) by dpdk.org (Postfix) with ESMTP id 999CF7DEC for ; Tue, 20 Sep 2016 14:42:16 +0200 (CEST) Received: from BN6PR03CA0040.namprd03.prod.outlook.com (10.175.124.26) by DM5PR03MB2444.namprd03.prod.outlook.com (10.168.233.14) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.629.8; Tue, 20 Sep 2016 12:42:15 +0000 Received: from BL2FFO11FD016.protection.gbl (2a01:111:f400:7c09::174) by BN6PR03CA0040.outlook.office365.com (2603:10b6:404:10c::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.619.10 via Frontend Transport; Tue, 20 Sep 2016 12:42:15 +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 BL2FFO11FD016.mail.protection.outlook.com (10.173.160.224) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.629.5 via Frontend Transport; Tue, 20 Sep 2016 12:42:14 +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 u8KCexsV006559; Tue, 20 Sep 2016 05:42:11 -0700 From: Shreyansh Jain To: CC: , David Marchand , , Thomas Monjalon , Shreyansh Jain Date: Tue, 20 Sep 2016 18:11:15 +0530 Message-ID: <1474375296-26078-4-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474375296-26078-1-git-send-email-shreyansh.jain@nxp.com> References: <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> <1474375296-26078-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131188489349519475; (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)(68736007)(626004)(5003940100001)(47776003)(97736004)(2950100001)(19580395003)(575784001)(4326007)(105606002)(92566002)(19580405001)(8936002)(586003)(86362001)(77096005)(85426001)(81166006)(48376002)(189998001)(7846002)(104016004)(305945005)(36756003)(229853001)(50466002)(2906002)(2351001)(11100500001)(81156014)(106466001)(8676002)(356003)(110136003)(50226002)(5660300001)(87936001)(50986999)(33646002)(8666005)(76176999)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2444; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD016; 1:NJxsU9R/jTiv74HGButogLpXquiN7yW9qFd/no3K+ONCZ/FKnYKwkTcb/KJCvY8l/u2ptzYUNK5b3mrd/RcVklPG/yaScpUx/AdMktPyMyogqVkY4IOfozHKjmcfMQHw3HjKN+OF/+BOgXxsFHN43c8LN0h5A18SB7DCN68K4fs+pyDIhh03rUP6i8ociPRvXfxP6hIh//AO0ANxch3FGdZXqt9AoC+DezrcxrEQBRzwQ+Eu4jaJqoacySODrhhBu2e6UNz4zigkx7zEhTeR2aWUTSOhSvtAyJA0O4mT846QvSOglCA3ucO+VLM7XEant52z+NCp98mbq730tPYmNBt2KR+G/tzVi2JS/DK8TFOkRC+I2i3UB8lSiaspa1wt2+j4oPwGYUeCAlN45P0WsKadRIGR4TKRE6Sr4l76oTLojRj6P8p9KzEQcOkW3NodRdqfV80f90qeLpU4RDvXptQ85JBkVcEBs0diMGt05j0azfwcr0q3hA1Iescpe7Zdpk5ou9sttplTuxYzorRSsIySUB9oBAXXw3FsKSCw84EtBlBkIDIiaibqX5KkZ7c6tGgkxSU7wf19TQSepqIAaoVZZ/2+NQQEJ/3k2fhzMttluCJ3itPTQjV5CqbfBVr/jLz0kJlkULoMjwpY5mUE1eu87NQUZFvKuEthsAemimaDn/ERLCdcrWkVzuQTv7mOHBGn7mOfIfreDkUrrVRnWNoR/kDQHWlzg0EdsL+Wa4s= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 5f3bb0e1-9d82-450e-ec0a-08d3e1538cad X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2444; 2:poio8bruq56M0SigmNAdy94UpfTwBGyec1+ItNP36ANzQLTXeHrdhJI61DXLoIsFVoYGIdEaWdD5b0F9Plny9o/fSTwF4VfYa41lDXEmeGmyiTqNH7RLBzpdZmkxRFaN690CD3hxzaK4wMuuJ7r/A0KmzzaRHzsopNvnTqpPrcmqprrrDldwuj+eHEc79d7F; 3:CMOv2wLeFb6z3icTd8+bJDpzJ9h30h9xlFh8hHnXvsh2oapJ9cq52VgQyHoowLPjMqW6anYTlRnlHJUo3XValbHgnqnGv6Y2+4bhQnmEbqm4hV7M40JA9zhvv825EEmoHe/bAKADP5xhlwuInH6tsxVm1gUa7amk/6rKpv1rsNgBfRo7yOGP78SndNgObp3F4lcd1UhoAX9KGAXemsaFATSbpvqsVf/M7VuTpel5qf4=; 25:SkQqXCBxoBKTJj8qYOF6SMqAalvxEKPUAxWZzQzNjMH8EoHnuADhyPzsxbE64dj1SPsS8ZWXKeECwA96F0WwzsDf67xaP1uuVhFBJB0LMfvd7Y6xMtX2rIEH14g0MtIUupSBKi1pPUqEkbCuxvth3GLb4bj5xtNEH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MiNLmfr9BIS8iuQmmXCA8wOygLHU/du91peePKb4JX5oaw/YV7P+3Yg/gPNwMEwPIUOPaATUV0JuWEMyKjFRcefa96CyE4RJzs9VnwYxQF0zjBjRG 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)(13018025)(13024025)(13017025)(13015025)(13023025)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:DM5PR03MB2444; BCL:0; PCL:0; RULEID:(400006); SRVR:DM5PR03MB2444; X-Forefront-PRVS: 0071BFA85B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2444; 23:u5xqLVCRNgUjT0LdozuSP2zubWkP1W6tSoa6DS7dd?= =?us-ascii?Q?obJHfdvCCDOrBYWz8LEuTklFmmiEljkNGlxagMVroPc7HsXs8J74ftXwOOCp?= =?us-ascii?Q?zoTEdIF8uM97YiW4v023kADJ2dBTzGLvNRMzimAjGRP8u0UUFoeppKOGKDHs?= =?us-ascii?Q?jScwVKjlJOHZ9GdsGSHQe3AudXerawYPxAXBwZ1m0gto384EymZ++Nf1Qoji?= =?us-ascii?Q?dCro/rkPQmZY12XTboO6s/TTrRRqFo+15ULgGewaiouOIJm2cOE/nJit2FDt?= =?us-ascii?Q?j0CifaL2RynhxRjnnW1LI2uKy8MfGMg+JZxKAk0ovL6vVTsi/VibfA0vrZwq?= =?us-ascii?Q?rcbCslUuC78Y6CrUSMXjpy4xwBiR7oNxX2hgkK1YOYFpdR943kI/k58WnRO5?= =?us-ascii?Q?p+P78+3rKB5lc/TRVjLgHqRy4bKG1y7IrfBscri7xMijT190uXKE5v47+I4w?= =?us-ascii?Q?zmjrTLdVMplB2tqegsV3VXfAXOlAX+1TD+L0010xxsf06r8uNz8cD+fMxaE1?= =?us-ascii?Q?1pkKtRz23PLCdnENDcGV3b+jlt1SV0kQKZyJQ/I4E8Obot8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QNHvBVU/5nM1pCMqh08artI9csrX9k+2TEtqTNiKGMVpdurjOJpAnFMWzmSGgSNhTAMT4=; 5:6OUYcCp9oQD8RIsCfaPoK3XnlyuCJuviNMiCmc4hIlY3SnWM8spML0WwoLHhgBFg8+ndwWKJGJEaPJWkjs2lBa6YTCKlvj38xkw/0Sh8FJQjKaVH8VYEzHXa0zbD9w7XDMK4P8DbFJ3KPvGEX/mCeoOldQVh4anH3dymoHKWvyk=; 24:ck9dPOxQFnbZf82/WeKVlDvdfI6Q+uCoQUxM7Rn6rrwDFFdZ1i+hgPDhgkkl3zWZHYos/4rlKstoJQRBuVxud0yFG99PehsoqcUh9m1vyJ4=; 7:FQKrHWU+qfYdGLAhW3AzeH0t2LLJLmYo23nQPK2RAtknd+zwdP3Qxvr/PV4Hcp1MHVxxE3EirEGtxyec753zKwE6C2r5136sDGYkdpMJfKyXdUt1MvsJDSOs8xUldTF9zql8JaFkJAmua1+4O75BzjtdefgOC+SI4dZEyXDRsfoBlykyDy6m8gL05LH6NYWrZuqvdFIyqb8Gjy1Fs2kHVhPKXdr0xSRKkkRb+3xVj8GHHE/unlGi/KKrz+TTEpO9+Xwy82QTUFzahdllAj2NLfpZ6WwcyUzA1KYuUP7/9dM9atkbrOpy6nAj56AljfAM SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2016 12:42:14.6399 (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: DM5PR03MB2444 Subject: [dpdk-dev] [PATCH v11 03/24] 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: Tue, 20 Sep 2016 12:42:19 -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 efe60cf..ab7ed23 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 7264968..9113121 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 715f93d..ea75562 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -547,8 +547,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 382c959..aa41a0c 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -347,7 +347,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 @@ -356,8 +356,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); } @@ -537,7 +537,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