eal: remove generic driver and device lists
authorThomas Monjalon <thomas@monjalon.net>
Mon, 1 May 2017 23:05:32 +0000 (01:05 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 4 May 2017 15:43:47 +0000 (17:43 +0200)
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
lib/librte_eal/common/eal_common_dev.c
lib/librte_eal/common/eal_common_vdev.c
lib/librte_eal/common/include/rte_dev.h
lib/librte_eal/linuxapp/eal/rte_eal_version.map

index 9d3338a..183ce0f 100644 (file)
@@ -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;
index 12a2286..a306e25 100644 (file)
 
 #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;
index 9158a1c..e436dac 100644 (file)
@@ -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) {
 
index d18e6b8..b63d054 100644 (file)
@@ -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;
 
@@ -142,22 +137,6 @@ struct rte_device {
        struct rte_devargs *devargs;  /**< Device user arguments */
 };
 
-/**
- * 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.
  */
@@ -167,24 +146,6 @@ struct rte_driver {
        const char *alias;              /**< Driver alias. */
 };
 
-/**
- * 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.
  *
index 98460cd..4607b76 100644 (file)
@@ -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;