From patchwork Tue Apr 11 15:44:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ga=C3=ABtan_Rivet?= X-Patchwork-Id: 23553 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 6DC2FF8AA; Tue, 11 Apr 2017 17:46:17 +0200 (CEST) Received: from mail-wr0-f182.google.com (mail-wr0-f182.google.com [209.85.128.182]) by dpdk.org (Postfix) with ESMTP id 17ACCD37C for ; Tue, 11 Apr 2017 17:45:34 +0200 (CEST) Received: by mail-wr0-f182.google.com with SMTP id l28so755995wre.0 for ; Tue, 11 Apr 2017 08:45:34 -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=L1JDUMp2dUzR2dfheG9nYmr/nAFjcVg+j8dRJBtJYyw=; b=xZGg1QoISyLQZHfxaEXg+6aSL7bejWorECx8ziweroFesJArvi9/9kYnvoEPTyNG8d vtW/VxgwVkXbss5hGh0Ix2yED+cuIavbLxS6E2W1bKamepDck3TjHCphE9Z5HvcQSXio LoHQYFaAaeYrgnDbg0w2PnTZP6sMa56y5cIZeAiK1apN9gqq5hsgSTKxyuVTiDjNnrfH Eenf/t2RGIAy8t2Q4t1XVwcsiAt6QyueVZWXzYoZ0MZjAAiaSEp9ERPFJ4PGje+MXuvh WMO+HQ0ezZ053QEvBqFOVS2Mr+u1f2cUrpY+dlfHS2ofZXzutO6QsKSjFofMgNNLiqkp 8Mrg== 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=L1JDUMp2dUzR2dfheG9nYmr/nAFjcVg+j8dRJBtJYyw=; b=MJvNLEyoVMUUjwjkwT9A9hfl/HVrqSS7SUgma04k4lCYdhj6QgG9bpn495Ib4Y0mX7 pikCMu4OFVky8i3JCD7TZEPk8cmD4LOouW+OzCe+/O2QSIjmWMTHQio3NF+BcdAItDKC bxwPo22N+F3bHCd/ufXkNirwsjR3GEycHizsvHjHK1j2fjyCb60FArXclsedf8mB9Vw5 OJtahd8NBL5V0IzgOPUqdZwBXh13QwikwknyusYgaAZD7MdwoBKO0g3JKljgam+g/prF VkKfMt7vZFulWSropgbN4TGHnBGC+xOCc4zpofDA21/om4q7fCFx58hQVyc/07vZ1inq vSOA== X-Gm-Message-State: AN3rC/55beoPhR6J8y+cG74nIfhrA2ugop5kw/aRK4Iy9y+vEf8hc3orqNZZEQKyCTibA+KM X-Received: by 10.223.146.225 with SMTP id 88mr8625052wrn.161.1491925533749; Tue, 11 Apr 2017 08:45:33 -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.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:45:32 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:36 +0200 Message-Id: <8c9ae412fbf648cd0f4188bf4449ac859573030d.1491924900.git.gaetan.rivet@6wind.com> 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 29/42] net/mlx: Don't reference eth_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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Jan Blunck The eth_driver concept is unused in the mlx drivers so don't reference it. Signed-off-by: Jan Blunck --- drivers/net/mlx4/mlx4.c | 24 +++++++++++------------- drivers/net/mlx5/mlx5.c | 24 +++++++++++------------- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index aff9155..a1363c8 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -60,6 +60,7 @@ #include #include +#include #include #include #include @@ -5477,7 +5478,7 @@ mlx4_args(struct rte_devargs *devargs, struct mlx4_conf *conf) return ret; } -static struct eth_driver mlx4_driver; +static struct rte_pci_driver mlx4_driver; /** * DPDK callback to register a PCI device. @@ -5509,7 +5510,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) int i; (void)pci_drv; - assert(pci_drv == &mlx4_driver.pci_drv); + assert(pci_drv == &mlx4_driver); /* Get mlx4_dev[] index. */ idx = mlx4_dev_idx(&pci_dev->addr); if (idx == -1) { @@ -5808,7 +5809,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) rte_eth_copy_pci_info(eth_dev, pci_dev); - eth_dev->driver = &mlx4_driver; + eth_dev->device->driver = &mlx4_driver.driver; priv->dev = eth_dev; eth_dev->dev_ops = &mlx4_dev_ops; @@ -5872,16 +5873,13 @@ static const struct rte_pci_id mlx4_pci_id_map[] = { } }; -static struct eth_driver mlx4_driver = { - .pci_drv = { - .driver = { - .name = MLX4_DRIVER_NAME - }, - .id_table = mlx4_pci_id_map, - .probe = mlx4_pci_probe, - .drv_flags = RTE_PCI_DRV_INTR_LSC, +static struct rte_pci_driver mlx4_driver = { + .driver = { + .name = MLX4_DRIVER_NAME }, - .dev_private_size = sizeof(struct priv) + .id_table = mlx4_pci_id_map, + .probe = mlx4_pci_probe, + .drv_flags = RTE_PCI_DRV_INTR_LSC, }; /** @@ -5900,7 +5898,7 @@ rte_mlx4_pmd_init(void) */ setenv("RDMAV_HUGEPAGES_SAFE", "1", 1); ibv_fork_init(); - rte_eal_pci_register(&mlx4_driver.pci_drv); + rte_eal_pci_register(&mlx4_driver); } RTE_PMD_EXPORT_NAME(net_mlx4, __COUNTER__); diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index b7eb9b5..6de4e4c 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -56,6 +56,7 @@ #endif #include #include +#include #include #include #include @@ -365,7 +366,7 @@ mlx5_args(struct priv *priv, struct rte_devargs *devargs) return 0; } -static struct eth_driver mlx5_driver; +static struct rte_pci_driver mlx5_driver; /** * DPDK callback to register a PCI device. @@ -396,7 +397,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) int i; (void)pci_drv; - assert(pci_drv == &mlx5_driver.pci_drv); + assert(pci_drv == &mlx5_driver); /* Get mlx5_dev[] index. */ idx = mlx5_dev_idx(&pci_dev->addr); if (idx == -1) { @@ -731,7 +732,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) eth_dev->device = &pci_dev->device; rte_eth_copy_pci_info(eth_dev, pci_dev); - eth_dev->driver = &mlx5_driver; + eth_dev->device->driver = &mlx5_driver.driver; priv->dev = eth_dev; eth_dev->dev_ops = &mlx5_dev_ops; @@ -813,16 +814,13 @@ static const struct rte_pci_id mlx5_pci_id_map[] = { } }; -static struct eth_driver mlx5_driver = { - .pci_drv = { - .driver = { - .name = MLX5_DRIVER_NAME - }, - .id_table = mlx5_pci_id_map, - .probe = mlx5_pci_probe, - .drv_flags = RTE_PCI_DRV_INTR_LSC, +static struct rte_pci_driver mlx5_driver = { + .driver = { + .name = MLX5_DRIVER_NAME }, - .dev_private_size = sizeof(struct priv) + .id_table = mlx5_pci_id_map, + .probe = mlx5_pci_probe, + .drv_flags = RTE_PCI_DRV_INTR_LSC, }; /** @@ -840,7 +838,7 @@ rte_mlx5_pmd_init(void) */ setenv("RDMAV_HUGEPAGES_SAFE", "1", 1); ibv_fork_init(); - rte_eal_pci_register(&mlx5_driver.pci_drv); + rte_eal_pci_register(&mlx5_driver); } RTE_PMD_EXPORT_NAME(net_mlx5, __COUNTER__);