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 8FD6C8DA2 for ; Mon, 6 Mar 2017 11:01:11 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id v190so12807218wme.3 for ; Mon, 06 Mar 2017 02:01:11 -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=cyETkFKfm+5WCCYulXpcbHP/JyKg30mfXN3LqjZcLp4=; b=oBqpQcbY31UoC1dmEio9ygC9r+HlD+HZR13g/0eYEv+3tOW7qLZqUoSi/N7xUuCjQ8 QPQFzQXXP2rSBJrUXXDmeFDl5MMzsBsSPlJXJj2n7jiEaOgzPGR0gw9i1H1JzVbtX0Aa v/n6B6upWm4xqKTDDd+VXQrgVhsAgygKKSkxVFk64LcBcConN+kgpoOiDS5yN/UYKW0W QSsjymKkIT96GPAnu9PRscCy6Q7ejb2UCASyXja35EeGCf6a9vTQ9RXlPwpgD+XqIRAR 3wKxjn9tW30N+GAwNJM4w72ZJ9j+Roun8DW1vlS50zpEdUVkFzB6nyr36wZr9b++lqr6 VluQ== 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=cyETkFKfm+5WCCYulXpcbHP/JyKg30mfXN3LqjZcLp4=; b=fsNt1BhdS/hCwcTN83l9yh6QunOXiX6P/tvDavx+qBsltF01zacPHCFiDh8nHlbZso ahKCRV2enGb60Q+HIZwZHUpEun4HoimAUuKXmhFX9y5+M06b2f4S7kJ1LiYBS3vDRZLo FN1XEZsWNuMbpUjh97+PHM5UPCONoBMgnBx9jAhExTT88r0DFOychXCZbAqvOSJT6ope NBUiEtiKY0w8Fa1Up6asL6lv9LrOgoY7j6sUW/l1c0t7tEpzoDHElCYugcxmrmV9rz4M 8lw7hGVQPY/TYoF8S8TGWZMh2KdnLgSdsGDrQzueyu4GuLFqbaI8VuKp1prYZ/w1GMMq 6xGA== X-Gm-Message-State: AMke39kCO5+Ag8LI8PPfHsGsbCJj75BHGtGzdZrLJQRB77t6sVgT8v8OdPxJ0oOz5fFVSQ== X-Received: by 10.28.103.194 with SMTP id b185mr13062623wmc.13.1488794471234; Mon, 06 Mar 2017 02:01:11 -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.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Mar 2017 02:01:10 -0800 (PST) Sender: Jan Blunck From: Jan Blunck To: dev@dpdk.org Date: Mon, 6 Mar 2017 11:00:15 +0100 Message-Id: <1488794430-25179-24-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 23/38] net/enic: 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: Mon, 06 Mar 2017 10:01:11 -0000 Signed-off-by: Jan Blunck --- drivers/net/enic/enic_ethdev.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index bffa870..57f71c7 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include "vnic_intr.h" @@ -634,17 +635,25 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev) return enic_probe(enic); } -static struct eth_driver rte_enic_pmd = { - .pci_drv = { - .id_table = pci_id_enic_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 = eth_enicpmd_dev_init, - .dev_private_size = sizeof(struct enic), +static int eth_enic_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 enic), + eth_enicpmd_dev_init); +} + +static int eth_enic_pci_remove(struct rte_pci_device *pci_dev) +{ + return rte_eth_dev_pci_generic_remove(pci_dev, NULL); +} + +static struct rte_pci_driver rte_enic_pmd = { + .id_table = pci_id_enic_map, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, + .probe = eth_enic_pci_probe, + .remove = eth_enic_pci_remove, }; -RTE_PMD_REGISTER_PCI(net_enic, rte_enic_pmd.pci_drv); +RTE_PMD_REGISTER_PCI(net_enic, rte_enic_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_enic, pci_id_enic_map); RTE_PMD_REGISTER_KMOD_DEP(net_enic, "* igb_uio | uio_pci_generic | vfio"); -- 2.7.4