* [dpdk-dev] [PATCH] eal: remove generic driver and device lists
@ 2017-05-01 23:05 Thomas Monjalon
2017-05-04 15:34 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Monjalon @ 2017-05-01 23:05 UTC (permalink / raw)
To: dev
These lists were unused and useless because they are maintained per bus:
struct rte_driver_list dev_driver_list
struct rte_device_list dev_device_list
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
lib/librte_eal/bsdapp/eal/rte_eal_version.map | 2 --
lib/librte_eal/common/eal_common_dev.c | 34 ---------------------
lib/librte_eal/common/eal_common_vdev.c | 11 -------
lib/librte_eal/common/include/rte_dev.h | 39 -------------------------
lib/librte_eal/linuxapp/eal/rte_eal_version.map | 2 --
5 files changed, 88 deletions(-)
diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
index 9d3338a13..183ce0f4d 100644
--- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
@@ -23,8 +23,6 @@ DPDK_2.0 {
rte_eal_devargs_add;
rte_eal_devargs_dump;
rte_eal_devargs_type_count;
- rte_eal_driver_register;
- rte_eal_driver_unregister;
rte_eal_get_configuration;
rte_eal_get_lcore_state;
rte_eal_get_physmem_layout;
diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index 12a22866e..a306e2525 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -45,40 +45,6 @@
#include "eal_private.h"
-/** Global list of device drivers. */
-static struct rte_driver_list dev_driver_list =
- TAILQ_HEAD_INITIALIZER(dev_driver_list);
-/** Global list of device drivers. */
-static struct rte_device_list dev_device_list =
- TAILQ_HEAD_INITIALIZER(dev_device_list);
-
-/* register a driver */
-void
-rte_eal_driver_register(struct rte_driver *driver)
-{
- TAILQ_INSERT_TAIL(&dev_driver_list, driver, next);
-}
-
-/* unregister a driver */
-void
-rte_eal_driver_unregister(struct rte_driver *driver)
-{
- TAILQ_REMOVE(&dev_driver_list, driver, next);
-}
-
-void rte_eal_device_insert(struct rte_device *dev)
-{
- RTE_VERIFY(dev->name);
- RTE_VERIFY(dev->name[0] != '\0');
-
- TAILQ_INSERT_TAIL(&dev_device_list, dev, next);
-}
-
-void rte_eal_device_remove(struct rte_device *dev)
-{
- TAILQ_REMOVE(&dev_device_list, dev, next);
-}
-
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 9158a1ca0..e436dac03 100644
--- a/lib/librte_eal/common/eal_common_vdev.c
+++ b/lib/librte_eal/common/eal_common_vdev.c
@@ -61,14 +61,12 @@ rte_eal_vdrv_register(struct rte_vdev_driver *driver)
rte_vdev_bus_register();
TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next);
- rte_eal_driver_register(&driver->driver);
}
/* unregister a driver */
void
rte_eal_vdrv_unregister(struct rte_vdev_driver *driver)
{
- rte_eal_driver_unregister(&driver->driver);
TAILQ_REMOVE(&vdev_driver_list, driver, next);
}
@@ -232,7 +230,6 @@ rte_eal_vdev_init(const char *name, const char *args)
TAILQ_INSERT_TAIL(&devargs_list, devargs, next);
- rte_eal_device_insert(&dev->device);
TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
return 0;
@@ -280,7 +277,6 @@ rte_eal_vdev_uninit(const char *name)
return ret;
TAILQ_REMOVE(&vdev_device_list, dev, next);
- rte_eal_device_remove(&dev->device);
TAILQ_REMOVE(&devargs_list, devargs, next);
@@ -315,7 +311,6 @@ vdev_scan(void)
dev->device.numa_node = SOCKET_ID_ANY;
dev->device.name = devargs->virt.drv_name;
- rte_eal_device_insert(&dev->device);
TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
}
@@ -327,12 +322,6 @@ vdev_probe(void)
{
struct rte_vdev_device *dev;
- /*
- * 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(dev, &vdev_device_list, next) {
diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index d18e6b89a..b63d0540d 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -123,11 +123,6 @@ struct rte_mem_resource {
void *addr; /**< Virtual address, NULL when not mapped. */
};
-/** Double linked list of device drivers. */
-TAILQ_HEAD(rte_driver_list, rte_driver);
-/** Double linked list of devices. */
-TAILQ_HEAD(rte_device_list, rte_device);
-
/* Forward declaration */
struct rte_driver;
@@ -143,22 +138,6 @@ struct rte_device {
};
/**
- * Insert a device detected by a bus scanning.
- *
- * @param dev
- * A pointer to a rte_device structure describing the detected device.
- */
-void rte_eal_device_insert(struct rte_device *dev);
-
-/**
- * Remove a device (e.g. when being unplugged).
- *
- * @param dev
- * A pointer to a rte_device structure describing the device to be removed.
- */
-void rte_eal_device_remove(struct rte_device *dev);
-
-/**
* A structure describing a device driver.
*/
struct rte_driver {
@@ -168,24 +147,6 @@ struct rte_driver {
};
/**
- * Register a device driver.
- *
- * @param driver
- * A pointer to a rte_dev structure describing the driver
- * to be registered.
- */
-void rte_eal_driver_register(struct rte_driver *driver);
-
-/**
- * Unregister a device driver.
- *
- * @param driver
- * A pointer to a rte_dev structure describing the driver
- * to be unregistered.
- */
-void rte_eal_driver_unregister(struct rte_driver *driver);
-
-/**
* Initialize a driver specified by name.
*
* @param name
diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
index 98460cd72..4607b7658 100644
--- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
@@ -23,8 +23,6 @@ DPDK_2.0 {
rte_eal_devargs_add;
rte_eal_devargs_dump;
rte_eal_devargs_type_count;
- rte_eal_driver_register;
- rte_eal_driver_unregister;
rte_eal_get_configuration;
rte_eal_get_lcore_state;
rte_eal_get_physmem_layout;
--
2.12.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] eal: remove generic driver and device lists
2017-05-01 23:05 [dpdk-dev] [PATCH] eal: remove generic driver and device lists Thomas Monjalon
@ 2017-05-04 15:34 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2017-05-04 15:34 UTC (permalink / raw)
To: dev
02/05/2017 01:05, Thomas Monjalon:
> These lists were unused and useless because they are maintained per bus:
> struct rte_driver_list dev_driver_list
> struct rte_device_list dev_device_list
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> lib/librte_eal/bsdapp/eal/rte_eal_version.map | 2 --
> lib/librte_eal/common/eal_common_dev.c | 34 ---------------------
> lib/librte_eal/common/eal_common_vdev.c | 11 -------
> lib/librte_eal/common/include/rte_dev.h | 39 -------------------------
> lib/librte_eal/linuxapp/eal/rte_eal_version.map | 2 --
> 5 files changed, 88 deletions(-)
Applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-04 15:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-01 23:05 [dpdk-dev] [PATCH] eal: remove generic driver and device lists Thomas Monjalon
2017-05-04 15:34 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).