From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 29037D592 for ; Mon, 6 Mar 2017 11:01:27 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id u132so4783741wmg.1 for ; Mon, 06 Mar 2017 02:01:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=saKHfLu+DNDGUcIDE8sDyF8I4UpDBcQ6OIDIxDz/VzQ=; b=eF9R8h5y03kSnesWoMZgz8ALXJu3hrJbCGoqpuvLa/BNxRQHPawZPvc/azQC+WlKSo 0Y4a1OaDB/J9k+nPreIEkwr7KO6w4LbgAlYxIYitQq9bqVPrG/YJ+y3RhvLPDd7lieq0 JwMr4fiCYCRwTMkRNkdaSWxO6NiiJs0bsI9eQhaw7r2r8a0O5BmsFNl562aeGdy1KTEx rTn64SDiZOYPomostP/iCWUaal0fcHF+VDQAkcUYZpCc7pOsT+VCfPGfHgYDXL2GoHIU 2HcUsmshrXoxKCvXiuMgMIOXoUPy46Yt6B7wO9qdm3dks+orM8CACFAcqbMZOYFBrM8a U4bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=saKHfLu+DNDGUcIDE8sDyF8I4UpDBcQ6OIDIxDz/VzQ=; b=AQMag4sfhD9ZMQl+uOVycqZ5YAfxpU/+RsJGdmgyHkilTOaHHG6+yqltEGa+OE7iZx rPjXpLaSO0Xt1i6Tc32+BE1a5xHszcFxniDf3u18phma5w0xmB9c/nHqj97o4+iv0RUZ MZ8FKoJ8ucIcBJlrI1uA0nvcf0nz99nJ91/PFWfvV/dM+VVo7hXHyeQeK3hdnQTQJq/r 8IDDM6EOR+gDNBJ7g0BwTJhv4dYwYDO/unnJw2e0toC8oP57yn8clRb0DQ7tBhhFhus0 tb2OeR3rbFSflX3vSxWhyZZzOHtX4GwixHKaLlIUeKMkMK51eKZoZkgowNwhRyqqqbtu vy2Q== X-Gm-Message-State: AMke39mfZJlI1AFrHLbluoo0NmppeMryfCa66scarnJ+SyPODZ/YxqksfJj/RVt9k6Y3ZA== X-Received: by 10.28.208.72 with SMTP id h69mr13161283wmg.100.1488794486512; Mon, 06 Mar 2017 02:01:26 -0800 (PST) Received: from weierstrass.local.net ([91.200.109.169]) by smtp.gmail.com with ESMTPSA id u145sm3829237wmu.1.2017.03.06.02.01.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Mar 2017 02:01:25 -0800 (PST) Sender: Jan Blunck From: Jan Blunck To: dev@dpdk.org Date: Mon, 6 Mar 2017 11:00:28 +0100 Message-Id: <1488794430-25179-37-git-send-email-jblunck@infradead.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488794430-25179-1-git-send-email-jblunck@infradead.org> References: <1488794430-25179-1-git-send-email-jblunck@infradead.org> Subject: [dpdk-dev] [PATCH 36/38] ethdev: remove unused ethdev driver 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, 06 Mar 2017 10:01:27 -0000 This removes the now unused struct eth_driver. Signed-off-by: Jan Blunck --- drivers/net/cxgbe/cxgbe_main.c | 1 - drivers/net/ring/rte_eth_ring.c | 1 - lib/librte_ether/rte_ethdev.h | 73 -------------------------------------- lib/librte_ether/rte_ethdev_pci.h | 2 -- lib/librte_ether/rte_ethdev_vdev.h | 1 - 5 files changed, 78 deletions(-) diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c index 541fc40..f895b18 100644 --- a/drivers/net/cxgbe/cxgbe_main.c +++ b/drivers/net/cxgbe/cxgbe_main.c @@ -1165,7 +1165,6 @@ int cxgbe_probe(struct adapter *adapter) allocate_mac: pi->eth_dev->device = &adapter->pdev->device; pi->eth_dev->data->dev_private = pi; - pi->eth_dev->driver = adapter->eth_dev->driver; pi->eth_dev->dev_ops = adapter->eth_dev->dev_ops; pi->eth_dev->tx_pkt_burst = adapter->eth_dev->tx_pkt_burst; pi->eth_dev->rx_pkt_burst = adapter->eth_dev->rx_pkt_burst; diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 62606e7..d6fc97a 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -338,7 +338,6 @@ do_eth_dev_ring_create(const char *name, data->mac_addrs = &internals->address; eth_dev->data = data; - eth_dev->driver = NULL; eth_dev->dev_ops = &ops; data->dev_flags = RTE_ETH_DEV_DETACHABLE; data->kdrv = RTE_KDRV_NONE; diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 1bfb8e7..87c33bb 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1628,7 +1628,6 @@ struct rte_eth_dev { eth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */ eth_tx_prep_t tx_pkt_prepare; /**< Pointer to PMD transmit prepare function. */ struct rte_eth_dev_data *data; /**< Pointer to device data */ - const struct eth_driver *driver;/**< Driver for this device */ const struct eth_dev_ops *dev_ops; /**< Functions exported by PMD */ struct rte_device *device; /**< Backing device */ struct rte_intr_handle *intr_handle; /**< Device interrupt handle */ @@ -1812,78 +1811,6 @@ int rte_eth_dev_attach(const char *devargs, uint8_t *port_id); */ int rte_eth_dev_detach(uint8_t port_id, char *devname); -struct eth_driver; -/** - * @internal - * Initialization function of an Ethernet driver invoked for each matching - * Ethernet PCI device detected during the PCI probing phase. - * - * @param eth_dev - * The *eth_dev* pointer is the address of the *rte_eth_dev* structure - * associated with the matching device and which have been [automatically] - * allocated in the *rte_eth_devices* array. - * The *eth_dev* structure is supplied to the driver initialization function - * with the following fields already initialized: - * - * - *pci_dev*: Holds the pointers to the *rte_pci_device* structure which - * contains the generic PCI information of the matching device. - * - * - *driver*: Holds the pointer to the *eth_driver* structure. - * - * - *dev_private*: Holds a pointer to the device private data structure. - * - * - *mtu*: Contains the default Ethernet maximum frame length (1500). - * - * - *port_id*: Contains the port index of the device (actually the index - * of the *eth_dev* structure in the *rte_eth_devices* array). - * - * @return - * - 0: Success, the device is properly initialized by the driver. - * In particular, the driver MUST have set up the *dev_ops* pointer - * of the *eth_dev* structure. - * - <0: Error code of the device initialization failure. - */ -typedef int (*eth_dev_init_t)(struct rte_eth_dev *eth_dev); - -/** - * @internal - * Finalization function of an Ethernet driver invoked for each matching - * Ethernet PCI device detected during the PCI closing phase. - * - * @param eth_dev - * The *eth_dev* pointer is the address of the *rte_eth_dev* structure - * associated with the matching device and which have been [automatically] - * allocated in the *rte_eth_devices* array. - * @return - * - 0: Success, the device is properly finalized by the driver. - * In particular, the driver MUST free the *dev_ops* pointer - * of the *eth_dev* structure. - * - <0: Error code of the device initialization failure. - */ -typedef int (*eth_dev_uninit_t)(struct rte_eth_dev *eth_dev); - -/** - * @internal - * The structure associated with a PMD Ethernet driver. - * - * Each Ethernet driver acts as a PCI driver and is represented by a generic - * *eth_driver* structure that holds: - * - * - An *rte_pci_driver* structure (which must be the first field). - * - * - The *eth_dev_init* function invoked for each matching PCI device. - * - * - The *eth_dev_uninit* function invoked for each matching PCI device. - * - * - The size of the private data to allocate for each matching device. - */ -struct eth_driver { - struct rte_pci_driver pci_drv; /**< The PMD is also a PCI driver. */ - eth_dev_init_t eth_dev_init; /**< Device init function. */ - eth_dev_uninit_t eth_dev_uninit; /**< Device uninit function. */ - unsigned int dev_private_size; /**< Size of device private data. */ -}; - /** * Convert a numerical speed in Mbps to a bitmap flag that can be used in * the bitmap link_speeds of the struct rte_eth_conf diff --git a/lib/librte_ether/rte_ethdev_pci.h b/lib/librte_ether/rte_ethdev_pci.h index fe62589..f85d26f 100644 --- a/lib/librte_ether/rte_ethdev_pci.h +++ b/lib/librte_ether/rte_ethdev_pci.h @@ -84,7 +84,6 @@ rte_eth_dev_pci_allocate(struct rte_pci_device *dev, size_t private_data_size) } eth_dev->device = &dev->device; - eth_dev->driver = NULL; eth_dev->intr_handle = &dev->intr_handle; rte_eth_copy_pci_info(eth_dev, dev); return eth_dev; @@ -102,7 +101,6 @@ rte_eth_dev_pci_release(struct rte_eth_dev *eth_dev) eth_dev->data->dev_private = NULL; eth_dev->device = NULL; - eth_dev->driver = NULL; eth_dev->intr_handle = NULL; } diff --git a/lib/librte_ether/rte_ethdev_vdev.h b/lib/librte_ether/rte_ethdev_vdev.h index 0b47535..fa2cb61 100644 --- a/lib/librte_ether/rte_ethdev_vdev.h +++ b/lib/librte_ether/rte_ethdev_vdev.h @@ -73,7 +73,6 @@ rte_eth_vdev_allocate(struct rte_vdev_device *dev, size_t private_data_size) } eth_dev->device = &dev->device; - eth_dev->driver = NULL; eth_dev->intr_handle = NULL; eth_dev->data->kdrv = RTE_KDRV_NONE; -- 2.7.4