From patchwork Mon Jan 18 12:30:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 9939 X-Patchwork-Delegate: bruce.richardson@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 57C908E8D; Mon, 18 Jan 2016 13:31:04 +0100 (CET) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 3B8B38E8D for ; Mon, 18 Jan 2016 13:31:00 +0100 (CET) Received: by mail-wm0-f51.google.com with SMTP id 123so50435611wmz.0 for ; Mon, 18 Jan 2016 04:31:00 -0800 (PST) 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; bh=GcXCLQhjZDUTIXs1itqeEm1tRsipEZ/AAEkefuwp8No=; b=X2zKJrZ/PrEj+mJHO1iWYR4aRP+OH9S3YGtoZ/O2Ig41VIWmGBH2iTRl0udz6jGEBN +GSe7RJSysQ9zBrvjMgAZ5H8cO2WVSui5oHUtiXHWGB93mqZk5VbhYjJxLBt4L6t6kDK iEMTyfLR4rI6an0zqdNwmyaT9XY7WMskERuFnonkWbGzbpmvisLiXrRKm0VIhrd7FQz8 IDcstgS01hHtmr6zYgfJF1NhA/xxyWDCsb2ruazG4YmSEDBNlp6OVZG6oVEGfpnGett6 aOQ2yRFp6pAOJPCxSk372/v4SpZJhLYgBXhn/FW9sfPEtxN7TdZWfnCcfeP+3GfbLtL0 /mIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GcXCLQhjZDUTIXs1itqeEm1tRsipEZ/AAEkefuwp8No=; b=KGwd2Rm8rNyXAuvcJ6EeZCKtDBj6tloTPhsvq/NxCCJxd2pGV14mbsyD90mM42R5L/ zt+OyorPSCqk4RIEluh7hFwWnfOcB9oasM03B0QMrMV4DqhbEKSliNq3zwdOgRRN0THE wJVjl0ZaAsaeuvAjzLLgubN/nhzfpPESExSVyLLmkhCi4U8ocrLSQYlYuuTKKqR879mB n/vtqA6wgqhOmqqA43mKZaWZWFI3JrD9V+WF384g4Yt/+EEUYtInoV8HmA1UfhlbnUvc 97tnZXGXcpPhGl5a8QlNoF9Fp50FzRQ2gWX86k8CdG8g/gIyLTRfEG3/2cJBbnUxZqLh DrHQ== X-Gm-Message-State: ALoCoQlfUAu0AixOPehQf1feWyQSUchiqVc9bInCQnblRN7OmxUrhLvQ01j25lwsW70XTEoLnPhR4L6s3MxuZnigYKiORO0gug== X-Received: by 10.194.243.6 with SMTP id wu6mr23382068wjc.14.1453120260106; Mon, 18 Jan 2016 04:31:00 -0800 (PST) Received: from gloops.dev.6wind.com (144.77.126.78.rev.sfr.net. [78.126.77.144]) by smtp.gmail.com with ESMTPSA id u191sm15606572wmd.4.2016.01.18.04.30.58 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Jan 2016 04:30:59 -0800 (PST) From: David Marchand To: dev@dpdk.org Date: Mon, 18 Jan 2016 13:30:43 +0100 Message-Id: <1453120248-28274-6-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1453120248-28274-1-git-send-email-david.marchand@6wind.com> References: <1452430254-30390-1-git-send-email-david.marchand@6wind.com> <1453120248-28274-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH v2 05/10] virtio: move pci device ids to driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Reused defines from virtio_pci.h. Signed-off-by: David Marchand --- Changes since v1: - indent fix drivers/net/virtio/virtio_ethdev.c | 7 ++----- lib/librte_eal/common/include/rte_pci_dev_ids.h | 17 ----------------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index d928339..94486e6 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -106,11 +106,8 @@ static int virtio_dev_queue_stats_mapping_set( * The set of PCI devices this driver supports */ static const struct rte_pci_id pci_id_virtio_map[] = { - -#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" - -{ .vendor_id = 0, /* sentinel */ }, + { RTE_PCI_DEVICE(VIRTIO_PCI_VENDORID, VIRTIO_PCI_DEVICEID_MIN) }, + { .vendor_id = 0, /* sentinel */ }, }; struct rte_virtio_xstats_name_off { diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h index a19fdfa..448b5e1 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -68,7 +68,6 @@ * driver which is a para virtualization driver running in guest virtual machine. * The inclusion of these in an array built using this file depends on the * definition of - * RTE_PCI_DEV_ID_DECL_VIRTIO * at the time when this file is included. * * In order to populate an array, the user of this file must define this macro: @@ -89,10 +88,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_VIRTIO -#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_VMXNET3 #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) #endif @@ -109,11 +104,6 @@ #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) #endif -#ifndef PCI_VENDOR_ID_QUMRANET -/** Vendor ID used by virtio devices */ -#define PCI_VENDOR_ID_QUMRANET 0x1AF4 -#endif - #ifndef PCI_VENDOR_ID_VMWARE /** Vendor ID used by VMware devices */ #define PCI_VENDOR_ID_VMWARE 0x15AD @@ -129,12 +119,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/****************** Virtio devices from virtio.h ******************/ - -#define QUMRANET_DEV_ID_VIRTIO 0x1000 - -RTE_PCI_DEV_ID_DECL_VIRTIO(PCI_VENDOR_ID_QUMRANET, QUMRANET_DEV_ID_VIRTIO) - /****************** VMware VMXNET3 devices ******************/ #define VMWARE_DEV_ID_VMXNET3 0x07B0 @@ -199,5 +183,4 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#undef RTE_PCI_DEV_ID_DECL_VIRTIO #undef RTE_PCI_DEV_ID_DECL_VMXNET3