From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f173.google.com (mail-wr0-f173.google.com [209.85.128.173]) by dpdk.org (Postfix) with ESMTP id 610DCD382 for ; Tue, 11 Apr 2017 17:45:35 +0200 (CEST) Received: by mail-wr0-f173.google.com with SMTP id c55so662872wrc.3 for ; Tue, 11 Apr 2017 08:45:35 -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=dhxW0Pdd/yybkGaMcqiQTIH6tgg2QTA1z3qvkgjeTRM=; b=fWPm8yEpabAHmxF96l9VlTIvn/O+JgQOaASZnRiA6cwym5sPMm6x+2I4I1hsOUF/XW 7+wruMr7lQQxAevK4vWHxNjWr3xmq+WQRiHXcy1mgFAcMEXkAPc0hPDPhneWRW+mF9Qo p9sYCQESK7vqjvWk9tgF4VS7r5/PjkiFnH3BMjMZY3K5NhwnaG7/F9KM+gGfbOB+A70A 5utalsT+tB/gs/U/GT3EpoBoR5eJsf5mSsw15/4Kxh2ud/xgcAHea+F1LPyDkBcWoQEQ qnL1hCSuNp1EiPfBCN0vmqMXE3rgVBFyqKiYS9LUzuy7Kpjk0WgphiTOpmoZPjL8CB+p /2DQ== 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=dhxW0Pdd/yybkGaMcqiQTIH6tgg2QTA1z3qvkgjeTRM=; b=Ql67+AG91DWCqWWonghBXf4AfnPQay1DcUE4HKyXblN6zL68k/ywYlnwOLElTHXr6o cwknqyQo6nJG6kqCBzIfMghRB9oS/hcrtWUTwT/gbrNNP8jQDY2qpuGV4Buzn6Z8pGhX cktGu/RSUZOer9Og430cEcX/hmTHgCdv8FBfpumPA1yRvror6Rx7o5X6gEaEnXVIiW4x CDKX+6CG2KTA4/0qXrwdSxKWATqoyd8CLZ47XSl02mLJD8/i9tDQrPkLP1EnIEDQmqQ+ nRzhHNfqv2mmfb5f9CFYcke8IIrCgTWkMpksrgRznyAizEx9uD7vKW46/0hjdOlPy/Ic /Sog== X-Gm-Message-State: AFeK/H3sSnqLq0pNh3SLKk89H/7+YO6n3+1Vaya2/ZEi0UTjItBWGgHJGRYufC4fV3I56mKi X-Received: by 10.223.176.202 with SMTP id j10mr36772674wra.10.1491925534758; Tue, 11 Apr 2017 08:45:34 -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.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:45:34 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:37 +0200 Message-Id: <303f33cb8c26b320e0607aed05f6b0599f0c3d46.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 30/42] net/nfp: 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:36 -0000 From: Jan Blunck Signed-off-by: Jan Blunck --- drivers/net/nfp/nfp_net.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index d06b10a..eda87a5 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -2580,18 +2581,26 @@ static const struct rte_pci_id pci_id_nfp_net_map[] = { }, }; -static struct eth_driver rte_nfp_net_pmd = { - .pci_drv = { - .id_table = pci_id_nfp_net_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 = nfp_net_init, - .dev_private_size = sizeof(struct nfp_net_adapter), +static int eth_nfp_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 nfp_net_adapter), nfp_net_init); +} + +static int eth_nfp_pci_remove(struct rte_pci_device *pci_dev) +{ + return rte_eth_dev_pci_generic_remove(pci_dev, NULL); +} + +static struct rte_pci_driver rte_nfp_net_pmd = { + .id_table = pci_id_nfp_net_map, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, + .probe = eth_nfp_pci_probe, + .remove = eth_nfp_pci_remove, }; -RTE_PMD_REGISTER_PCI(net_nfp, rte_nfp_net_pmd.pci_drv); +RTE_PMD_REGISTER_PCI(net_nfp, rte_nfp_net_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_nfp, pci_id_nfp_net_map); RTE_PMD_REGISTER_KMOD_DEP(net_nfp, "* igb_uio | uio_pci_generic | vfio"); -- 2.1.4