From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com [209.85.128.169]) by dpdk.org (Postfix) with ESMTP id AC132D2D3 for ; Tue, 11 Apr 2017 17:45:27 +0200 (CEST) Received: by mail-wr0-f169.google.com with SMTP id o21so685742wrb.2 for ; Tue, 11 Apr 2017 08:45:27 -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=p9AfHgdQfOW8jtrjW22Z53xc3+9Ncmbhqtsjhijm4PQ=; b=BS8qGuXk97DNE3ZzkdYrmpmy15JWTOFghdtBrspN8xOx6k7L+2/SlallJQDgnGlhXx azks4n/Nu7qFE/xXNypqic80d9bPLud458Fn7um5XMz6fUOY+TTyEjgdBSOx7eytkebb omGB49fB0YdueIcwwsBlLNpuegeIADQe1rLJqvgHVhJowPax5u242tSep46lg4CFF61v DwvjC+yg9rlrhJaseHxYJZUGHHhwi8Bhpubb2N5gZk59A89gcUc9EDhFUr310oCywfCh 3pXAlYGwpQyGhzCyAcy/mZ5lYYWuubnJmf2VWdycETrfqoh65VSJ2Y4jfB1lDwaw6o4R Axvw== 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=p9AfHgdQfOW8jtrjW22Z53xc3+9Ncmbhqtsjhijm4PQ=; b=J0Tb9O0MqQH0V8D5911vjD4yz1eEkepXocZhELE6gfSr1hh1VZec+FWjLegNfa0nF7 PyoR0MxCdf1FhH4w8KIC2Fkgf/qQeAe+LEDAxY45s2vtk2t7h+HO+ooAeKJakUbG5VMI m0mUG0DThWylxJ6Y4+iGb/3y85iUgrcCtWnzlR1e5zf0bZ8Gk2zC6OcbkOoil1PZ43tb 2EJNxUzI8pkSJW6N/76UG10clgrbfvpZJv+t0DVe2ePvqQ57NOECwiu9GmK2ZonCSM0k uo7UnUZLrdeQBHKrdYc/2PQdKejVlEFlxx+BDJAHuA8Z0jUtCqzi4jagDk1IEU8MgIfz y4HQ== X-Gm-Message-State: AFeK/H0z9sfCwKX7YTStd6URbl988ulZ7Yz7rXhMzbiBgEYLKJZ1S0D8XfGoDn6i7oQiqRJw X-Received: by 10.223.175.23 with SMTP id z23mr33580417wrc.84.1491925527203; Tue, 11 Apr 2017 08:45:27 -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.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:45:26 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:30 +0200 Message-Id: <92b8622da0955dd97dbd33808868fbf8a311777b.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 23/42] net/ena: 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:28 -0000 From: Jan Blunck Signed-off-by: Jan Blunck --- drivers/net/ena/ena_ethdev.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 5dd44d7..f5f748f 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -1776,17 +1777,25 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, return sent_idx; } -static struct eth_driver rte_ena_pmd = { - .pci_drv = { - .id_table = pci_id_ena_map, - .drv_flags = RTE_PCI_DRV_NEED_MAPPING, - .probe = rte_eth_dev_pci_probe, - .remove = rte_eth_dev_pci_remove, - }, - .eth_dev_init = eth_ena_dev_init, - .dev_private_size = sizeof(struct ena_adapter), +static int eth_ena_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 ena_adapter), eth_ena_dev_init); +} + +static int eth_ena_pci_remove(struct rte_pci_device *pci_dev) +{ + return rte_eth_dev_pci_generic_remove(pci_dev, NULL); +} + +static struct rte_pci_driver rte_ena_pmd = { + .id_table = pci_id_ena_map, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING, + .probe = eth_ena_pci_probe, + .remove = eth_ena_pci_remove, }; -RTE_PMD_REGISTER_PCI(net_ena, rte_ena_pmd.pci_drv); +RTE_PMD_REGISTER_PCI(net_ena, rte_ena_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_ena, pci_id_ena_map); RTE_PMD_REGISTER_KMOD_DEP(net_ena, "* igb_uio | uio_pci_generic | vfio"); -- 2.1.4