From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f171.google.com (mail-wr0-f171.google.com [209.85.128.171]) by dpdk.org (Postfix) with ESMTP id ABF88D45F for ; Tue, 11 Apr 2017 17:45:45 +0200 (CEST) Received: by mail-wr0-f171.google.com with SMTP id o21so691020wrb.2 for ; Tue, 11 Apr 2017 08:45:45 -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=zYKRdqX27u3rUtzRzXcjaeeCwU/d3/ivcdyIW2BTbuY=; b=kBo/TJRlo5T3UZr5PV0YIujXfWBPx7tGn5RY9O+rDOjBVwMZkAirVTfDsfvQwKB7P5 zCcdgYOI2bPsj6WRBTyYdoLlky4LaTW0awOEzXZvq40G61ByDto2KlOcPZj9dFuG8G3a 8lHL9oyXqBYq4hNUn45abZRToRv6ukiZ/i9kPww2Tf6VLTkK5NOU5wCS5AX/l15B4Q5e +jogIFbUYeh6poDqBF8rSwwu4769HlD7MhM1LuntzI678CSvqE2VXP2RfLFDg8RsFySk LIesiimxSbIG9+feB+sfBkkiF1BjyT1cg5gSjAfoNd1y434MnHEp4R76NE8k8iiDgEs9 G0wQ== 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=zYKRdqX27u3rUtzRzXcjaeeCwU/d3/ivcdyIW2BTbuY=; b=AHpQfQpeb2UGWkpDql1pTpIQqNC9Hp2dOHoTNYlK9s1KH3JrXwCQ5SBVlN5Jj7nkOc 1C0dATAqRQQc05sFuwVV9/ICHV4HTRnRHA9BPuPKS8048GD2EYZ/Eian7KLY+O02xVZj QEn9XYBLOEyHrz1PdS1qkkchkTsL988kTERLk1XKCXfnkKkdGG9qWkGumAzemnTdSn5E LGB0uGp4wpMViAm2Yiv16jG+HTsqG0uw9ZJ1jqKyNS2AJjuue7xlaE0k4veOY8TVYdMp OZKF7kUXH8STRWJXR62R79BnbTYuZPHMaRD4OTImmlCOQ4WftKu6Upbonm8gjcF5bPen BJnQ== X-Gm-Message-State: AFeK/H3Bg5QiX4IPaJJbRlxPwp8qy+7gCrDxsZFsWda0mQ2BDQ5hmb9KWAWR304Mfz4Eu6k1 X-Received: by 10.223.152.107 with SMTP id v98mr33371478wrb.60.1491925545215; Tue, 11 Apr 2017 08:45:45 -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.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:45:44 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:47 +0200 Message-Id: <9abb3429fc8034fdfeddc7a6bd146f5a4f5a18a5.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 40/42] test: remove unused ethdev 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:46 -0000 Signed-off-by: Gaetan Rivet --- test/test/virtual_pmd.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/test/test/virtual_pmd.c b/test/test/virtual_pmd.c index b209355..186d9b7 100644 --- a/test/test/virtual_pmd.c +++ b/test/test/virtual_pmd.c @@ -532,7 +532,6 @@ virtual_ethdev_create(const char *name, struct ether_addr *mac_addr, { struct rte_pci_device *pci_dev = NULL; struct rte_eth_dev *eth_dev = NULL; - struct eth_driver *eth_drv = NULL; struct rte_pci_driver *pci_drv = NULL; struct rte_pci_id *id_table = NULL; struct virtual_ethdev_private *dev_private = NULL; @@ -550,10 +549,6 @@ virtual_ethdev_create(const char *name, struct ether_addr *mac_addr, if (pci_dev == NULL) goto err; - eth_drv = rte_zmalloc_socket(name, sizeof(*eth_drv), 0, socket_id); - if (eth_drv == NULL) - goto err; - pci_drv = rte_zmalloc_socket(name, sizeof(*pci_drv), 0, socket_id); if (pci_drv == NULL) goto err; @@ -594,8 +589,8 @@ virtual_ethdev_create(const char *name, struct ether_addr *mac_addr, pci_drv->drv_flags &= ~RTE_PCI_DRV_INTR_LSC; - eth_drv->pci_drv = (struct rte_pci_driver)(*pci_drv); - eth_dev->driver = eth_drv; + eth_dev->device = &pci_dev->device; + eth_dev->device->driver = &pci_drv->driver; eth_dev->data->nb_rx_queues = (uint16_t)1; eth_dev->data->nb_tx_queues = (uint16_t)1; @@ -622,7 +617,7 @@ virtual_ethdev_create(const char *name, struct ether_addr *mac_addr, dev_private->dev_ops = virtual_ethdev_default_dev_ops; eth_dev->dev_ops = &dev_private->dev_ops; - pci_dev->device.driver = ð_drv->pci_drv.driver; + pci_dev->device.driver = &pci_drv->driver; eth_dev->device = &pci_dev->device; eth_dev->rx_pkt_burst = virtual_ethdev_rx_burst_success; @@ -633,7 +628,6 @@ virtual_ethdev_create(const char *name, struct ether_addr *mac_addr, err: rte_free(pci_dev); rte_free(pci_drv); - rte_free(eth_drv); rte_free(id_table); rte_free(dev_private); -- 2.1.4