From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id D6A46D4CE for ; Mon, 6 Mar 2017 11:01:24 +0100 (CET) Received: by mail-wr0-f193.google.com with SMTP id u108so17053526wrb.2 for ; Mon, 06 Mar 2017 02:01:24 -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=P5VhJqF2SUvOEckhXlO0bAr7+X4lsV6tuDJMKrbSKvo=; b=Qecnf370u+/l5E/Ggm+BtStIqihw+gyNq9sK9y1ptu8AzZJBNmqwD8SZSrsrhXR9mM /imD0wb89FEoJ6CC2mMNdBtpqkVF9zR60cDEPcs/Ncy3LSuK4OXCt7gfYbvet0OW0XwD sOXy+rhu+9BnyoFgNxBqwO2ZiTrjaW06te8qUSKIJzq+cOi8WBUx7lX7XwVt8aAgj98/ poeZhLdZYx5D/y0uA/rW2affhOGLt1J3RY9jdTKL/pJfvNWW/bjqre99A6NdI+xkwxyl PZP9N0wuXT03vdfcCoJl1bQdk1z9P792zsU1bF3MoAugrgMwpm9Fs18JPaVRVrQAru1R wEXA== 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=P5VhJqF2SUvOEckhXlO0bAr7+X4lsV6tuDJMKrbSKvo=; b=ABB02TD52+A6wZgHeQMhL4ud78u+yEVRPv16rLYUjzGmQMY3jJYezZ5WLyIhxNohzS iWPhEbLqMOYtNVM/x1lYtZAA/dehGVeySraGhqNldMoLmHZ/40/oeiLT0x3daU+lfoVx W0SUREeavQRo64UrD0wT/4XCS9hxO+d4aolJ6zSmQa0IO5el7oC58tVkHwiF8nLjIjCw KjdoNHPAErIQoHcf6tutWkx0IlP2gcBf2MF0B2vOd0c4yAgLYOmlrejHiYuhKJ78o6wj lqKG1qySaxveSl6yVygRvsC2rbMFA8/z1WXkvmEvNE9SGDukRNfeKmUxMHL54wCXTV0F 9Hsg== X-Gm-Message-State: AMke39nq40jgrGFzN9w0otk0xW7T+rDCv8q3j1n7EUfnoR7zI55qA3kYrlrgQWN2lKnPMQ== X-Received: by 10.223.139.68 with SMTP id v4mr14695268wra.70.1488794484556; Mon, 06 Mar 2017 02:01:24 -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.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Mar 2017 02:01:23 -0800 (PST) Sender: Jan Blunck From: Jan Blunck To: dev@dpdk.org Date: Mon, 6 Mar 2017 11:00:26 +0100 Message-Id: <1488794430-25179-35-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 34/38] 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: Mon, 06 Mar 2017 10:01:25 -0000 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 b7b5377..9e6fffa 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 @@ -338,16 +339,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 @@ -970,6 +978,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.7.4