From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f171.google.com (mail-wr0-f171.google.com [209.85.128.171]) by dpdk.org (Postfix) with ESMTP id D5535D462 for ; Tue, 11 Apr 2017 17:45:45 +0200 (CEST) Received: by mail-wr0-f171.google.com with SMTP id l28so759259wre.0 for ; Tue, 11 Apr 2017 08:45:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=0RcyXzxhoJkb9Bij33ORNqcSUrPkJfYv2+9s5hjqbko=; b=n69XLc9uCDHX9+wKav3q57ipaq6mcO56XT3vz4R8LoXS7rvo0tUfEqZag3Uilk7hpq 96H9H5xQv7K8Zsa9/awSdbcTftQrI425wgYS21uc9EMYbOiSWGZ5k3ZN9gxQxpAVJNom oEUkiNliO5SydrRMmt9TJntWZK+vUlzrkibbQ71F7m13HCnjcKRkzP9CU7vwz1BBqPY9 6RRhPbj5DS/nUebog1tFp7DhjMm8FN99BIO0FG8C8OdhUjq0gdNuO9Qnq6fAUda0JXl4 Gv6tTMvC0KjmPffsTyPs2cwBEiiin8aODx23q0+zaZqB2ukzb91Y3ThN4aLqUBgtJYJM vdlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=0RcyXzxhoJkb9Bij33ORNqcSUrPkJfYv2+9s5hjqbko=; b=ZBwqdG1tdIDvlydnpniLBDtk5BpmC6MCfhYmjPZO5zyaJnn0vL7rg1hSl60BGTSekm t4BHKiXMK9wle5Qfvh/bL5SxNm1ilSNoa7w/9bAH3xkS4TSisTY54na7/xHcR5PXPqgI xg6+/lTOPhbcoahx7nhwGKD9O0xLxd8Sw/SDtRxUTrt7OKGueT7A6aVccAnuyHeDb6LU U8R609NBYsUv+DxSxnG8sx1Xpaw5lmbOCfTn/i10HQytlo641UPmJG1bPmzgLEmwiLCe DOZoACIxnrx5mZf9esgHAHGfFbdbz7SIBRb5DpKaSJpJt3Wo8nncSEz3qDUe9+RTIhO0 V/iQ== X-Gm-Message-State: AFeK/H16VJfYRfD8sUlf0ZU0jawOLJvtGS9c1KMRNrhBdXIdqlmuQWkJIkUBS+1Vv7ojktCR X-Received: by 10.223.128.231 with SMTP id 94mr55158405wrl.20.1491925544207; Tue, 11 Apr 2017 08:45:44 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id u63sm2933738wmu.22.2017.04.11.08.45.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:45:43 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:46 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: <1488794430-25179-1-git-send-email-jblunck@infradead.org> In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 39/42] 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: Tue, 11 Apr 2017 15:45:46 -0000 From: Jan Blunck 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 4bae895..36867e6 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 abef70f..9fb8432 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1651,7 +1651,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 */ @@ -1854,78 +1853,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.1.4