From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 371F5D3EB for ; Tue, 11 Apr 2017 17:45:40 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id w64so67216664wma.0 for ; Tue, 11 Apr 2017 08:45:40 -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=2cHTTtU2NS+zKxnFDBDajdb3E69BXb2LDMuL94XZdlU=; b=GYRGmjok9eL3z9zAhMpj2nwo/a3ohv+F+nhdXsJJfwTnzP/KcAniNFSKyP3JGcyOXG YkR+paF5SHso7LHVG+tn6akynH94ITlJQKjh/KZBCbKbHYlvXrE6/W4VSlQnW8/9u2Ck GBIDt33+t1kCH2y8zPLsweJuseWrI/FbZA0vSau3HE8PPR8Vzw4OevZC+C2o6liYP4Oo H3oL/6o+sVcaaVXdwd8UnWr7bcEvOMD5Lebd093ldr0wmlnj0ko+a4iTQhZidJOPhcgC iCGZ8cu1kj6WdMLvUCcQkEPXbim0T54B2h36aAY36p3RuTaFgHHXfS0ho8A2nX/eEGc6 dOlQ== 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=2cHTTtU2NS+zKxnFDBDajdb3E69BXb2LDMuL94XZdlU=; b=qn/9yaRtWzszwHkXymtxIc8OQDGV7V+lnz4X3JmoMuUahpt8biu9fKv5VccsoxqA/X t5FTdadqYKRKGdBhWPacajwVxAnUbOqVJYuB7UneuyTj48rD/2Mc8OuaZtOD+rJq4t0e IYSeKRazzfhPBhlk1s4C6j1CchFafCzgUARZn7bfipi0giRUjk/KE71uFGQ0h/4OA8V7 d0XubafoMwFt6ZHKEOrl6Uld/3zYcVbnPaQP+yNWnVGvavSEvIdgJiIE9ilt387+eXqh satCTI7l9ZZWA6gQOIIDxO85PbTKa6nxvPabo6rTmJ4tlBFkVQUyQjzIFD8+OrmEAGUb UgSg== X-Gm-Message-State: AN3rC/6VZ7RGRqZxq8aPcb/CPa+baGFMWUTfj4p/qLhezOVu7j6ODp21 DpjmhhEturEQbZ50f6k= X-Received: by 10.28.0.201 with SMTP id 192mr11965276wma.126.1491925539753; Tue, 11 Apr 2017 08:45:39 -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.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:45:39 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:42 +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 35/42] net/vmxnet3: 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:40 -0000 From: Jan Blunck Signed-off-by: Jan Blunck --- drivers/net/vmxnet3/vmxnet3_ethdev.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index ae3efaa..0e8eb75 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include @@ -377,16 +378,23 @@ eth_vmxnet3_dev_uninit(struct rte_eth_dev *eth_dev) return 0; } -static struct eth_driver rte_vmxnet3_pmd = { - .pci_drv = { - .id_table = pci_id_vmxnet3_map, - .drv_flags = RTE_PCI_DRV_NEED_MAPPING, - .probe = rte_eth_dev_pci_probe, - .remove = rte_eth_dev_pci_remove, - }, - .eth_dev_init = eth_vmxnet3_dev_init, - .eth_dev_uninit = eth_vmxnet3_dev_uninit, - .dev_private_size = sizeof(struct vmxnet3_hw), +static int eth_vmxnet3_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 vmxnet3_hw), eth_vmxnet3_dev_init); +} + +static int eth_vmxnet3_pci_remove(struct rte_pci_device *pci_dev) +{ + return rte_eth_dev_pci_generic_remove(pci_dev, eth_vmxnet3_dev_uninit); +} + +static struct rte_pci_driver rte_vmxnet3_pmd = { + .id_table = pci_id_vmxnet3_map, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING, + .probe = eth_vmxnet3_pci_probe, + .remove = eth_vmxnet3_pci_remove, }; static int @@ -1116,6 +1124,6 @@ vmxnet3_process_events(struct vmxnet3_hw *hw) } #endif -RTE_PMD_REGISTER_PCI(net_vmxnet3, rte_vmxnet3_pmd.pci_drv); +RTE_PMD_REGISTER_PCI(net_vmxnet3, rte_vmxnet3_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_vmxnet3, pci_id_vmxnet3_map); RTE_PMD_REGISTER_KMOD_DEP(net_vmxnet3, "* igb_uio | uio_pci_generic | vfio"); -- 2.1.4