From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 361BA47D0 for ; Mon, 11 Jul 2016 16:41:11 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id p190so15437612wmp.1 for ; Mon, 11 Jul 2016 07:41:11 -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; bh=gfJqyw33Vuxcct8JslPtApQBhh+1Crwg8KoYRCxvr/g=; b=EzvczzP5BwwbxOgqWmox9pzATy8p9VUkveZTLid+uC9Raxz2LW8cA4oscDy7OYQhhp Csyz8rRunsv3zxN2UfvcxTxLshvO8Uscgk5VB8Ka8Wytv0U3T7m3AJksPFFP6SulaPYQ woVB8loj+dGINZdbHw6glXA6p7ZYQ4eyH8hGJLrfBpRvcGBJLuoYV5a5hjiviP1MG6dm 7Z+PpEBezharIZCUoul5nA9XoVXx2cT50FV2FybbGCBSt+tgL3FOuWrbmHu45/n5GkiM RwXm+x88CGALB4+dGaca1BpBCq6dvXf1vUAFdnBcf9PPBBtxMfzBchXIwpzkh+26sN23 zAHQ== 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=gfJqyw33Vuxcct8JslPtApQBhh+1Crwg8KoYRCxvr/g=; b=HtQNywce+3kHoX+gdbDgBMBYOfEyPfgzbdc2terH2tKoxwD+WOcEataw3sRBOA6R34 xQFmZfNpcCqswqIFk2hbv7ZK70rpMr5ewGIGT6eixa8oZw+L6dZzvM0vAV89cgo1j9mz OYTy6Q/HaBMcQe76HbkCoSo/9o4lrrYvcbecLMtmzrJxsuRPiENenoHDKTGGP7NWiIXg t31yMrLUzWOsmJbAd/aPozXDxsLo+i2sKRqofDQcCD+ksGUMetwhawBJHNf3hwl0oLji 779r1ZDjdZVzEMUH/N2SgQuaNVSOZTPZKxUKnLutroxz1HQBBcM0SzpLU2+9RqHBkZvE T47w== X-Gm-Message-State: ALyK8tIrXG4WLJg46f2Ywv6V6A7jMAKRaFwWxz+wk4f1jvM/cR9PK/gYRhu7YD9XIwvWlC/K X-Received: by 10.28.41.195 with SMTP id p186mr20569718wmp.41.1468248070953; Mon, 11 Jul 2016 07:41:10 -0700 (PDT) Received: from gloops.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id h7sm158371wji.47.2016.07.11.07.41.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Jul 2016 07:41:10 -0700 (PDT) From: David Marchand To: dev@dpdk.org Cc: bruce.richardson@intel.com, thomas.monjalon@6wind.com, nhorman@tuxdriver.com, pmatilai@redhat.com, christian.ehrhardt@canonical.com, stephen@networkplumber.com, John Daley , Nelson Escobar Date: Mon, 11 Jul 2016 16:40:42 +0200 Message-Id: <1468248045-3495-8-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1468248045-3495-1-git-send-email-david.marchand@6wind.com> References: <1461156236-25349-1-git-send-email-david.marchand@6wind.com> <1468248045-3495-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH v4 07/10] net/enic: move PCI device ids to the 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: , X-List-Received-Date: Mon, 11 Jul 2016 14:41:11 -0000 Moved cisco vendor id since the driver had no such information. Used RTE_PCI_DEVICE in place of RTE_PCI_DEV_ID_DECL* stuff. Signed-off-by: David Marchand --- drivers/net/enic/enic_ethdev.c | 12 ++++-------- lib/librte_eal/common/include/rte_pci_dev_ids.h | 17 ----------------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index 633e431..3c87b49 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -57,15 +57,11 @@ /* * The set of PCI devices this driver supports */ +#define CISCO_PCI_VENDOR_ID 0x1137 static const struct rte_pci_id pci_id_enic_map[] = { -#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#ifndef PCI_VENDOR_ID_CISCO -#define PCI_VENDOR_ID_CISCO 0x1137 -#endif -#include "rte_pci_dev_ids.h" -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) -{.vendor_id = 0, /* Sentinal */}, + { RTE_PCI_DEVICE(CISCO_PCI_VENDOR_ID, PCI_DEVICE_ID_CISCO_VIC_ENET) }, + { RTE_PCI_DEVICE(CISCO_PCI_VENDOR_ID, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) }, + {.vendor_id = 0, /* sentinel */}, }; static int 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 a4aba6d..ef85d08 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -73,10 +73,6 @@ #define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) #endif -#ifndef RTE_PCI_DEV_ID_DECL_ENIC -#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_BNX2X #define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev) #endif @@ -94,11 +90,6 @@ #define PCI_VENDOR_ID_INTEL 0x8086 #endif -#ifndef PCI_VENDOR_ID_CISCO -/** Vendor ID used by Cisco VIC devices */ -#define PCI_VENDOR_ID_CISCO 0x1137 -#endif - #ifndef PCI_VENDOR_ID_BROADCOM /** Vendor ID used by Broadcom devices */ #define PCI_VENDOR_ID_BROADCOM 0x14E4 @@ -343,14 +334,6 @@ RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_VF_HV) RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_VF) RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_VF_HV) -/****************** Cisco VIC devices ******************/ - -#define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043 /* ethernet vnic */ -#define PCI_DEVICE_ID_CISCO_VIC_ENET_VF 0x0071 /* enet SRIOV VF */ - -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) - /****************** QLogic devices ******************/ /* Broadcom/QLogic BNX2X */ -- 1.9.1