From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by dpdk.org (Postfix) with ESMTP id 411AFD39B for ; Tue, 11 Apr 2017 17:45:37 +0200 (CEST) Received: by mail-wr0-f177.google.com with SMTP id c55so663534wrc.3 for ; Tue, 11 Apr 2017 08:45:37 -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=t4izWHpuJTcXunypKrmvl3K6J85WQVNPdUyml/f3LYE=; b=iUOX7ya+9JS04DkTdmHj1rEAFxsgnwFmuetu4Ib0bggEo+Q57UjWj8Pyn9rnSQKEln PyLIdDXPo6/Dleqz+ESFONL9F8a8SQTyk3ce+M+TYASFSWVtt+jT4o+uhaaE9B7x3Wts Y3DtjPqfdrICcJDy2oFn4HRYIlq4nmPCJseU9LlBP6XWwJVE18PYGhmRWaYDyW1V+p5A C3ORVllKDNuhcGYNp2o3KjCStjoXuCs/Jm9LYhIH3PMPgCFrOt1kcEPNTd+kOSACtTxh dYwhuFaR2xCGhEpB6BwCqsgAz7H49N/UF76A7zxGt2msDHfFQUIbHt8X6ujS37N8x8nY is3w== 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=t4izWHpuJTcXunypKrmvl3K6J85WQVNPdUyml/f3LYE=; b=EvaJrzQSb4dFlcWFlTeb3djIiEb+gKolk3F+yS5jCA63Kto2GTwfHylWredOR0W6W7 2iSTNzSeClOybjZR6nlmY4e2ocS78Tnad+GYyyBLWOdHSn/oGanwK43Wt3uUNyAnTLt8 +omezkkDGT1iNDX1EbeY8dhF7QdPsllh2pXW10E6KkcOQ7fSfZ2C0GHOTdx6tMy0xRDN sOWz1C9MbCLx6Yl7imzz5TZYpbFNhNU7uV+oBA96ga/5RMpgvdqr1xk1LKctvc7SatmU x5c33X1buN8qD4oTD2Ol4xRF0brbM70qxcPNoBn6+8G50YIndHd4sndJiuuJAkvnUYiK nUBg== X-Gm-Message-State: AFeK/H2jaIvaP+VCIaLqBhe+i8BtCye39A3q7ho4NavBnUcJp58BNjf26oAYS6n9MZbIA44V X-Received: by 10.223.143.107 with SMTP id p98mr35440989wrb.3.1491925536796; Tue, 11 Apr 2017 08:45:36 -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.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:45:35 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:39 +0200 Message-Id: <9b9fd8ef9a20a4c1144f88c880d2361d3b3ea108.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 32/42] net/sfc: 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:37 -0000 From: Jan Blunck Signed-off-by: Jan Blunck --- drivers/net/sfc/sfc_ethdev.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index 4f7b640..7620080 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -1596,21 +1597,28 @@ static const struct rte_pci_id pci_id_sfc_efx_map[] = { { .vendor_id = 0 /* sentinel */ } }; -static struct eth_driver sfc_efx_pmd = { - .pci_drv = { - .id_table = pci_id_sfc_efx_map, - .drv_flags = - RTE_PCI_DRV_INTR_LSC | - RTE_PCI_DRV_NEED_MAPPING, - .probe = rte_eth_dev_pci_probe, - .remove = rte_eth_dev_pci_remove, - }, - .eth_dev_init = sfc_eth_dev_init, - .eth_dev_uninit = sfc_eth_dev_uninit, - .dev_private_size = sizeof(struct sfc_adapter), +static int sfc_eth_dev_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 sfc_adapter), sfc_eth_dev_init); +} + +static int sfc_eth_dev_pci_remove(struct rte_pci_device *pci_dev) +{ + return rte_eth_dev_pci_generic_remove(pci_dev, sfc_eth_dev_uninit); +} + +static struct rte_pci_driver sfc_efx_pmd = { + .id_table = pci_id_sfc_efx_map, + .drv_flags = + RTE_PCI_DRV_INTR_LSC | + RTE_PCI_DRV_NEED_MAPPING, + .probe = sfc_eth_dev_pci_probe, + .remove = sfc_eth_dev_pci_remove, }; -RTE_PMD_REGISTER_PCI(net_sfc_efx, sfc_efx_pmd.pci_drv); +RTE_PMD_REGISTER_PCI(net_sfc_efx, sfc_efx_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_sfc_efx, pci_id_sfc_efx_map); RTE_PMD_REGISTER_KMOD_DEP(net_sfc_efx, "* igb_uio | uio_pci_generic | vfio"); RTE_PMD_REGISTER_PARAM_STRING(net_sfc_efx, -- 2.1.4