From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 89110D37C for ; Tue, 11 Apr 2017 17:45:39 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id u2so4141129wmu.0 for ; Tue, 11 Apr 2017 08:45:39 -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=Rt0aYF/61mhXgOMf7dy+xN+T1soKEwD+7dEJfC35C+o=; b=NVfcrnRBxQQ/fuiuHMINMJW6F3ZxmcOdgn2BoC2+n8PsBuOASav5+I6AVSMgUzObGa FzEcYBfzaIp2hw7sWiPVy9iUt4mRSelcmApKJtjBJ//ZDhSQ2kWM4kVTojz1r8UBMG7c YjK8LISN/jtFa553RzwEBb6JcCa9iABPzlCTsYBM65ZJQb+Mi5FGw7HiHGeQ2y0q6RBz xJwzMvOQSt9zUKg5ej6X+QMiSLIhOw9pR/u/P16dmrzJcOJ7xO3Q794wMss6zshix0Cl ETApcISBQQ1IsUrrWPfSGjqJmTqVZGUTaCHlznDchCvLe6EwJNGzIg9M2iq5xQOisKcu +xOQ== 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=Rt0aYF/61mhXgOMf7dy+xN+T1soKEwD+7dEJfC35C+o=; b=KlYygTkz/Lu9FUy2161Zteb9js1iNoHSQ9Ps7+jxBFeJuvSkpTLiuhy0FzpnJTWi87 JMZIGlqVafUKx7ji3LVGC/NXZqRVxKRf803iYMXs4qfgbbtevB3vLEFUkYuZa0Tq+cPn SumMPENgzASA6m/ZvbVPNZbcf/1ywOef5FMRvu6KcWkoznl1qAJF3zYL1B72PFrqhie4 hfpVCBkWOUwjpaRaz5hfZaTSoAbD84J/I4VtaYINZj4OkmX+BWfZHV/7xcNycQBaBhsa xDissc/n0CPEgD1t01g8cGnl7FDIL8mZpQHBN457HW+X3DS6CB+Eodt6zR512PdP4kPv nBaA== X-Gm-Message-State: AN3rC/4cDbElNIuOAQXKlFbPWqqmD2TX2faUjIAlSkZ3lhzZQ0TIye8eD0wtV+Rt8oCpOdJC X-Received: by 10.28.213.72 with SMTP id m69mr14914514wmg.9.1491925538809; Tue, 11 Apr 2017 08:45:38 -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.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:45:38 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:41 +0200 Message-Id: <7c9b47d76f333cd640fc8ad6b647d03a19768606.1491924900.git.gaetan.rivet@6wind.com> 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 34/42] 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: Tue, 11 Apr 2017 15:45:40 -0000 From: Jan Blunck 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 6c3670a..b0b9c3b 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include @@ -2131,17 +2132,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.1.4