From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id A6920D31F for ; Tue, 11 Apr 2017 17:45:25 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id t189so4290657wmt.1 for ; Tue, 11 Apr 2017 08:45:25 -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=ZxASKpyARp0YPy8xosMeAXrvVi9uj1uLRHQZwdNadc8=; b=SVT6oJb06jb9m4kvOLjnSKggQlSqIAtOQAmYbeFUyXefs3suYCffJXcS5L8vFJ6+vZ uAjl+KmA+2A5pR0rhoUEYAY1toLpUZfdoX04foz9zhJqa3cF6rip1Hqq1oNPL60AZ1bo wE+oOHmaM6dISfo1WZc9SktMCNZulFfe6HSYq/3BZ6QkJllIjtc50zTQklUUgB4gZEez qlmenF3nTOV3VgqmlKg2lyfCmkgDO+FW3gjEaN5xQVExAeFgIdEvVpA40LnsQ4GR5qaG TZaCIHTF9KJcFCeNtOBURbTVdg0y71iwB4D7KIdj/luPk9O/oY3q+xtSiplk+V2GWTdr LwTQ== 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=ZxASKpyARp0YPy8xosMeAXrvVi9uj1uLRHQZwdNadc8=; b=SE7AP1EvLFVgXF9SSmuW7XGzTw7mMhSg3Rf9rGq7B4zwT7WHtAyO5tReUh+NKqqa1i MDhbaNGeDxJfRlTNus7p3SRkq5R2yjvHhgyqO7gtb5nLqtdT7ATXrSWEQRTYkRyOCPHt Hu3JYedOgRFt3O+jvToSDp1nFWQNb47vFwSYwzPmwsFg6mjKAUQagrlgpxHa1DFwjOvJ zBlHvzs+cA6UOXbkE3rUifxKOFFTHyOKmTLZVuktdivyfgf763xvILaXX7y2a8h1QJKQ fLCOKqS7wV5EHfOj6fb8g//bpUHmsNAXu79drNaDiOjnverepZlSrpdvkPhvXyQ5SEcF 0PWg== X-Gm-Message-State: AN3rC/7zcXmQv0vZa10UoY9rz5PhB8lUdEiluK2jqFl6ZeR7+sK4GSfb OJV7ZCFx/Rb5ozc4 X-Received: by 10.28.0.201 with SMTP id 192mr11964186wma.126.1491925525381; Tue, 11 Apr 2017 08:45:25 -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.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:45:24 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:28 +0200 Message-Id: <4250e262152fc7050845e124b93fdb54a4d8c829.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 21/42] net/em: 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:26 -0000 From: Jan Blunck Signed-off-by: Jan Blunck --- drivers/net/e1000/em_ethdev.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index ecefa56..599b9e0 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -417,16 +418,23 @@ eth_em_dev_uninit(struct rte_eth_dev *eth_dev) return 0; } -static struct eth_driver rte_em_pmd = { - .pci_drv = { - .id_table = pci_id_em_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 = eth_em_dev_init, - .eth_dev_uninit = eth_em_dev_uninit, - .dev_private_size = sizeof(struct e1000_adapter), +static int eth_em_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 e1000_adapter), eth_em_dev_init); +} + +static int eth_em_pci_remove(struct rte_pci_device *pci_dev) +{ + return rte_eth_dev_pci_generic_remove(pci_dev, eth_em_dev_uninit); +} + +static struct rte_pci_driver rte_em_pmd = { + .id_table = pci_id_em_map, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, + .probe = eth_em_pci_probe, + .remove = eth_em_pci_remove, }; static int @@ -1857,6 +1865,6 @@ eth_em_set_mc_addr_list(struct rte_eth_dev *dev, return 0; } -RTE_PMD_REGISTER_PCI(net_e1000_em, rte_em_pmd.pci_drv); +RTE_PMD_REGISTER_PCI(net_e1000_em, rte_em_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_e1000_em, pci_id_em_map); RTE_PMD_REGISTER_KMOD_DEP(net_e1000_em, "* igb_uio | uio_pci_generic | vfio"); -- 2.1.4