From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 909BD58D1 for ; Tue, 2 May 2017 01:05:42 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2304620A2C; Mon, 1 May 2017 19:05:42 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 01 May 2017 19:05:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= date:from:message-id:subject:to:x-me-sender:x-me-sender :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=zi1NgfXvl9v2GkcDgfyMOzP0Evs VJXpA4hhfY7liFVA=; b=sK62pjnzn9K5klij491DHKvCNYPjHXURJlxRzcf0HsG /TzMq9y7gK/ihCrQRrMZ9xUegiCmC4SllKRmyLmR6Dk2tYykVAgibGyLxKnYFJbd U2Yx5RgRR3JP4/hUbzgM72CPFmcs9M0MISqwQ3tln1eOGGB9JQ6A1Etb9JnNUZLc = DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=zi1Ngf Xvl9v2GkcDgfyMOzP0EvsVJXpA4hhfY7liFVA=; b=pjfYBQy+r+8xA/YX9LaPr5 CKk1DGVIztkrRece7ceVhDqe9DG8aURknV+Kmd/7eO9Jr++aREwux5KGeie2/T+h LnfjIYfSKyRTNXrNGk0DaLO7P63Q3S+vvmH3SH6LZyS+KXVrJneduM39rCctxv7F RLvgcaMFV4YzfddhYdrQ+jwLdIBkIRC9Bcy52hCVzVhql4TQO5AaF6zZKo5zoTye onCidV7b9OExcXmEnhebvhljejkkPR4kr7oQBNHgHpk2Avm4QOuZL6bgJtQ0Sa1M yHNWmZkqtoytEzIRUixxy9mxHhk2VWclP/p3z0SM1xnpFlyCVAcYqP3QF+st8u+w == X-ME-Sender: X-Sasl-enc: pawH19B5E5adHyb9AeaB/QzzyMew4t1Nl9jKiOm2zn7J 1493679941 Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id A2FA57E1BE for ; Mon, 1 May 2017 19:05:41 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Date: Tue, 2 May 2017 01:05:32 +0200 Message-Id: <20170501230532.22780-1-thomas@monjalon.net> X-Mailer: git-send-email 2.12.2 Subject: [dpdk-dev] [PATCH] eal: remove generic driver and device lists 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, 01 May 2017 23:05:43 -0000 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 --- 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