From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Marchand Subject: [PATCH v3 05/13] virtio: move pci device ids to driver Date: Wed, 20 Apr 2016 14:43:48 +0200 Message-ID: <1461156236-25349-6-git-send-email-david.marchand@6wind.com> References: <1453120248-28274-1-git-send-email-david.marchand@6wind.com> <1461156236-25349-1-git-send-email-david.marchand@6wind.com> Cc: thomas.monjalon@6wind.com, stephen@networkplumber.org, bruce.richardson@intel.com, nhorman@tuxdriver.com, pmatilai@redhat.com, christian.ehrhardt@canonical.com, Huawei Xie , Yuanhan Liu To: dev@dpdk.org 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 617A037B2 for ; Wed, 20 Apr 2016 14:44:08 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id l6so34671355wml.1 for ; Wed, 20 Apr 2016 05:44:08 -0700 (PDT) In-Reply-To: <1461156236-25349-1-git-send-email-david.marchand@6wind.com> 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 --- 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 f8cc158..ee95cab 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -102,11 +102,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 -- 1.9.1