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 B7BBCBD32 for ; Mon, 6 Mar 2017 11:01:23 +0100 (CET) Received: by mail-wr0-f193.google.com with SMTP id l37so20984351wrc.3 for ; Mon, 06 Mar 2017 02:01:23 -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=YIXUi7P7mUABBpFMcvwxpq5cEGkAL8nbPVMFXL8d1Co=; b=AGbJ2jPuPqOfmXUiNlx9lYM3F5tJe+npNdyvrBLrEHRN+jkRZJYkdXciEQE8EFGaEU nMdzWPuO8bwSUY+YRZlH61Xh4dE4YCbEi9A8vrRiBloElCYUcKA1Ln5AXmUeqJdFovLB ObZ/irh9IgqaywWHHW3I3CH1eZhKNpUCzpBkO6BlQQvAt/AFpoAF9QOOrofIVN2Yk6Q1 HnOsSFHthclsFyg60juVFUxEqoiB4dnRXtNVRQCm81WS6AIxpUIq39/WL3ACcjEKDMCG zV/wSybzgDkWbFqJae4615NW6BaUZdwkXB3KTIQPy2uOJk8Rlxcm8v1kquokPBVN82Bv NQeg== 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=YIXUi7P7mUABBpFMcvwxpq5cEGkAL8nbPVMFXL8d1Co=; b=n77jADBT8a55HwbtJkw//3z+qNZ9OLP8GjqpgnPdAgNJZsn2ZY1NfnrQbE1J83Ggds Ucf+79RfXlQSTnGPGwWn8TwLdSyGJk8378Vn0WyTw47NHRUAK/XoTHUk+iqUHbz0sigh eMpW0Nu99z5xsTKr4UHgOpQRjBmbNsx0jrlc+np1EWKhV6w65rAePm4bb+uDquPfHw+Q CmvMmoTg5VMzqMHVnuvRquY9/yDG1MPTV+twarWF1O8dkMg+Pcdw0K/6kWrip0ahVl6u E10JLGhCFkVxno4ZA57Xb+DTqaBZhW2ZyVEoHvmwIUqg+xWPAydq8v3nBMbFhkOzR5bA 7blQ== X-Gm-Message-State: AMke39mGKRUogtR1mYX195BhcydiH2ThRj0pPMCJLsoEk3PLNLF4ZY+gishcBJjo0rTFCw== X-Received: by 10.223.141.148 with SMTP id o20mr14143946wrb.75.1488794483409; Mon, 06 Mar 2017 02:01:23 -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.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Mar 2017 02:01:22 -0800 (PST) Sender: Jan Blunck From: Jan Blunck To: dev@dpdk.org Date: Mon, 6 Mar 2017 11:00:25 +0100 Message-Id: <1488794430-25179-34-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 33/38] net/thunderx: 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:23 -0000 Signed-off-by: Jan Blunck --- drivers/net/thunderx/nicvf_ethdev.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 1060319..fa17f10 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -2111,17 +2112,25 @@ static const struct rte_pci_id pci_id_nicvf_map[] = { }, }; -static struct eth_driver rte_nicvf_pmd = { - .pci_drv = { - .id_table = pci_id_nicvf_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 = nicvf_eth_dev_init, - .dev_private_size = sizeof(struct nicvf), +static int nicvf_eth_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 nicvf), + nicvf_eth_dev_init); +} + +static int nicvf_eth_pci_remove(struct rte_pci_device *pci_dev) +{ + return rte_eth_dev_pci_generic_remove(pci_dev, NULL); +} + +static struct rte_pci_driver rte_nicvf_pmd = { + .id_table = pci_id_nicvf_map, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, + .probe = nicvf_eth_pci_probe, + .remove = nicvf_eth_pci_remove, }; -RTE_PMD_REGISTER_PCI(net_thunderx, rte_nicvf_pmd.pci_drv); +RTE_PMD_REGISTER_PCI(net_thunderx, rte_nicvf_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_thunderx, pci_id_nicvf_map); RTE_PMD_REGISTER_KMOD_DEP(net_thunderx, "* igb_uio | uio_pci_generic | vfio"); -- 2.7.4