From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f182.google.com (mail-wr0-f182.google.com [209.85.128.182]) by dpdk.org (Postfix) with ESMTP id 4CBD8D16A for ; Tue, 11 Apr 2017 17:45:36 +0200 (CEST) Received: by mail-wr0-f182.google.com with SMTP id z109so715633wrb.1 for ; Tue, 11 Apr 2017 08:45:36 -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=C+oqARKne80YhtW4ilyZe2amXCM/au+yLBFlaqf0QJ8=; b=jueidSkE5whJ1tUNER4E6tQwdxZlnN6apGXHIh/XGdCdc1ug0y2rDZI/udzDTealLR JaMdNDr9f9pr7kj6paXddLizvMcPyk8iB65GJ6bDleWumdTWVBtizRnhw/nN/H2JewT8 QliNMkBVhefS1tX91I7eDNeJdONh0CnKQ/aY/McxmhOhb9MvJIHLoYX5PKaJNAQI15jT lsPV9vLbRVVPnBBu98N+Zx58KbOpeJjN995ZL8PBjkVJK6e360JFbMCvhW53rpBXsVCT yD16oPHGdFhYTeYwRa3zWkRHFC0O06Ogl42nmNxUbixXrrIdxDgA4ukAp8QQnYM657Oz pBzA== 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=C+oqARKne80YhtW4ilyZe2amXCM/au+yLBFlaqf0QJ8=; b=MK2yO2Rxig9G6++w5RsQkD9zMJ7UhkjwJwb7mOBWLxofgpQ8XXUfJ5PRMouvcR+fII CS3L08ytuRpPJEF94OdBWcBYpDEZQqoHtxyOJO5qDbvOuvSpUa6FJgswYNPIDHQ0PLov BvSs7a+gLCxqqioN+Xu83zkfh61tNLvkHQeL3lceQwZuin+7/JUlCsKYdyg63iscQ9PK 5Sj2zgpWMlfd/shZ2+tHbEZotUSzjJQPHgVqwYXB/Ia/xK+sIVm+h2E5YUI8gzz4wsHv Os4sxn7IKxCdoZwnPWicaH9fMZKKD/JOwx7IZtElSCk+8L2NzHf+HWtkVj9eqC7PV44t BoQA== X-Gm-Message-State: AN3rC/7terzozWu6hD459emqRLYD36hTZsaBzTEJPO3jge2afL6TbJxVb3PDoxEfGorD3gyX X-Received: by 10.223.130.81 with SMTP id 75mr23586416wrb.150.1491925535691; Tue, 11 Apr 2017 08:45:35 -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.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:45:35 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:38 +0200 Message-Id: <9d02b95be3c0160a209fdaef7731926c641bd281.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 31/42] net/qede: Don't use 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: , X-List-Received-Date: Tue, 11 Apr 2017 15:45:37 -0000 From: Jan Blunck Signed-off-by: Jan Blunck --- drivers/net/qede/qede_ethdev.c | 60 +++++++++++++++++++++++++----------------- drivers/net/qede/qede_ethdev.h | 1 + 2 files changed, 37 insertions(+), 24 deletions(-) diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index 5f469e5..fbad2a6 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -2382,35 +2382,47 @@ static const struct rte_pci_id pci_id_qede_map[] = { {.vendor_id = 0,} }; -static struct eth_driver rte_qedevf_pmd = { - .pci_drv = { - .id_table = pci_id_qedevf_map, - .drv_flags = - RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, - .probe = rte_eth_dev_pci_probe, - .remove = rte_eth_dev_pci_remove, - }, - .eth_dev_init = qedevf_eth_dev_init, - .eth_dev_uninit = qedevf_eth_dev_uninit, - .dev_private_size = sizeof(struct qede_dev), +static int qedevf_eth_dev_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, + struct rte_pci_device *pci_dev) +{ + return rte_eth_dev_pci_generic_probe(pci_dev, + sizeof(struct qede_dev), qedevf_eth_dev_init); +} + +static int qedevf_eth_dev_pci_remove(struct rte_pci_device *pci_dev) +{ + return rte_eth_dev_pci_generic_remove(pci_dev, qedevf_eth_dev_uninit); +} + +static struct rte_pci_driver rte_qedevf_pmd = { + .id_table = pci_id_qedevf_map, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, + .probe = qedevf_eth_dev_pci_probe, + .remove = qedevf_eth_dev_pci_remove, }; -static struct eth_driver rte_qede_pmd = { - .pci_drv = { - .id_table = pci_id_qede_map, - .drv_flags = - RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, - .probe = rte_eth_dev_pci_probe, - .remove = rte_eth_dev_pci_remove, - }, - .eth_dev_init = qede_eth_dev_init, - .eth_dev_uninit = qede_eth_dev_uninit, - .dev_private_size = sizeof(struct qede_dev), +static int qede_eth_dev_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, + struct rte_pci_device *pci_dev) +{ + return rte_eth_dev_pci_generic_probe(pci_dev, + sizeof(struct qede_dev), qede_eth_dev_init); +} + +static int qede_eth_dev_pci_remove(struct rte_pci_device *pci_dev) +{ + return rte_eth_dev_pci_generic_remove(pci_dev, qede_eth_dev_uninit); +} + +static struct rte_pci_driver rte_qede_pmd = { + .id_table = pci_id_qede_map, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, + .probe = qede_eth_dev_pci_probe, + .remove = qede_eth_dev_pci_remove, }; -RTE_PMD_REGISTER_PCI(net_qede, rte_qede_pmd.pci_drv); +RTE_PMD_REGISTER_PCI(net_qede, rte_qede_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_qede, pci_id_qede_map); RTE_PMD_REGISTER_KMOD_DEP(net_qede, "* igb_uio | uio_pci_generic | vfio"); -RTE_PMD_REGISTER_PCI(net_qede_vf, rte_qedevf_pmd.pci_drv); +RTE_PMD_REGISTER_PCI(net_qede_vf, rte_qedevf_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_qede_vf, pci_id_qedevf_map); RTE_PMD_REGISTER_KMOD_DEP(net_qede_vf, "* igb_uio | vfio"); diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h index 56703da..f5549c2 100644 --- a/drivers/net/qede/qede_ethdev.h +++ b/drivers/net/qede/qede_ethdev.h @@ -14,6 +14,7 @@ #include #include +#include #include #include -- 2.1.4