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 EB0FAD34B for ; Tue, 11 Apr 2017 17:45:31 +0200 (CEST) Received: by mail-wr0-f171.google.com with SMTP id z109so714380wrb.1 for ; Tue, 11 Apr 2017 08:45:31 -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=1XnZRpGkiIiRfREfqQ3SEi2LYBpeTUiSVqGjLXTR9gI=; b=mLDMyFrM1rFaakFWxckbETm5LUpaUhwPfkaCLG4c2mg5ydAuf+RsxVNR3A0QzBWKwn rRBtuPuCAjpSkCaNyYtunkSqYJifGrPR/Ht66FqgojPw/LFpbB7ldFxJGih0gq6FwkBu Bz94RO7ZDY2mm7idY+NvvJgMX5r9oq/2jDuaB7QZEI9pKTfTg3cxw+DQZVioPLxGDBYG zv+EYdeN4Yxx9sw7aE7UFjsDp2oGJt9Ce7/poX4H6c9mYVnOAjDx4xsn6GfCgrHmRntL jrJX0Un4DGZwJ4UKBn2ZZ6e288dqW++IKupFWDsBDG2HqCqGl9FvpZxBXmOdsyxNx+L3 KvBg== 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=1XnZRpGkiIiRfREfqQ3SEi2LYBpeTUiSVqGjLXTR9gI=; b=F3u+qeatSd/yOD2DoXwQ+HHx13m1BcZNoXu15SctEt9OZsyJSlUb9CrMJGeKW05/Bt vtfp3NJ2F6WvoZsAKNLBQG5xYIRHQVfvugfgUJccJ5Yr71bn968VL63Sp6kzmQTEv43t gjQMouhCf9FbWqwMzHajFNXE8ll/SCjFQbo/WGhovYF0C9p7PKLUEL/6TjJi0RuzdL+y DT80vI7Y496JvQCGDZXAJxwbNud2s4vxFLw2Cn7T9uMNBaTj2Ome/jG0yzKDLFo5MCak qpgRuqRusqVL1mDcYPUNUWEstThEnyB5lt/GEUfdvq+UB2nq+W7vW49KSe/j5UH99N2y zD6g== X-Gm-Message-State: AFeK/H3sx2bwBB9IMPSWP4r3iLZhgw8yAmi3Hsivmt9Em2AZXEtTLzTdU3HFKr7zrodAF1b9 X-Received: by 10.223.175.81 with SMTP id z75mr34241045wrc.11.1491925531490; Tue, 11 Apr 2017 08:45:31 -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.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:45:30 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:34 +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 27/42] net/i40evf: 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:32 -0000 From: Jan Blunck Signed-off-by: Jan Blunck --- drivers/net/i40e/i40e_ethdev_vf.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 7e48fea..cd9e51f 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -1543,22 +1544,30 @@ i40evf_dev_uninit(struct rte_eth_dev *eth_dev) return 0; } + +static int eth_i40evf_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 i40e_adapter), i40evf_dev_init); +} + +static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev) +{ + return rte_eth_dev_pci_generic_remove(pci_dev, i40evf_dev_uninit); +} + /* * virtual function driver struct */ -static struct eth_driver rte_i40evf_pmd = { - .pci_drv = { - .id_table = pci_id_i40evf_map, - .drv_flags = RTE_PCI_DRV_NEED_MAPPING, - .probe = rte_eth_dev_pci_probe, - .remove = rte_eth_dev_pci_remove, - }, - .eth_dev_init = i40evf_dev_init, - .eth_dev_uninit = i40evf_dev_uninit, - .dev_private_size = sizeof(struct i40e_adapter), +static struct rte_pci_driver rte_i40evf_pmd = { + .id_table = pci_id_i40evf_map, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING, + .probe = eth_i40evf_pci_probe, + .remove = eth_i40evf_pci_remove, }; -RTE_PMD_REGISTER_PCI(net_i40e_vf, rte_i40evf_pmd.pci_drv); +RTE_PMD_REGISTER_PCI(net_i40e_vf, rte_i40evf_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_i40e_vf, pci_id_i40evf_map); RTE_PMD_REGISTER_KMOD_DEP(net_i40e_vf, "* igb_uio | vfio"); -- 2.1.4