From patchwork Thu May 7 03:49:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sujith Sankar X-Patchwork-Id: 4642 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 E489D2A07; Thu, 7 May 2015 05:51:30 +0200 (CEST) Received: from bgl-iport-2.cisco.com (bgl-iport-2.cisco.com [72.163.197.26]) by dpdk.org (Postfix) with ESMTP id 5F0731396 for ; Thu, 7 May 2015 05:51:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2383; q=dns/txt; s=iport; t=1430970690; x=1432180290; h=from:to:cc:subject:date:message-id; bh=zRQCO0EmPuAjc8RRfqbwAaVblCQMYF4d9AInyjiRyDQ=; b=aaB4MRjIKUjUW5Y7y834fXUKl+uuB2aMOl879ckudHCGQ7A9T737pes/ jPDSxf5NrvNEv2lWZcB4crXYGZDlW+0J2HNPw3A1fwJ9K5Y7JMVtLWgb3 NSqGpzgt0YAksJQRYpQZQxnlq69riqsv0FxokKldg3aXphOvbwR71UUPI g=; X-IronPort-AV: E=Sophos;i="5.13,382,1427760000"; d="scan'208";a="51815223" Received: from vla196-nat.cisco.com (HELO bgl-core-3.cisco.com) ([72.163.197.24]) by bgl-iport-2.cisco.com with ESMTP; 07 May 2015 03:51:28 +0000 Received: from localhost ([10.106.186.168]) (authenticated bits=0) by bgl-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id t473pOBQ000636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 7 May 2015 03:51:27 GMT From: Sujith Sankar To: dev@dpdk.org Date: Thu, 7 May 2015 09:19:09 +0530 Message-Id: <1430970549-14965-1-git-send-email-ssujith@cisco.com> X-Mailer: git-send-email 1.9.1 X-Authenticated-User: ssujith@cisco.com Subject: [dpdk-dev] [PATCH] enic: add support for enic in nic_uio driver for FreeBSD 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" This patch adds support for enic in the nic_uio driver so that enic could be used on FreeBSD. Signed-off-by: Sujith Sankar Acked-by: Bruce Richardson Acked-by: David Marchand --- lib/librte_eal/bsdapp/nic_uio/nic_uio.c | 1 + lib/librte_eal/common/include/rte_pci_dev_ids.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/lib/librte_eal/bsdapp/nic_uio/nic_uio.c b/lib/librte_eal/bsdapp/nic_uio/nic_uio.c index 5ae8560..e649e32 100644 --- a/lib/librte_eal/bsdapp/nic_uio/nic_uio.c +++ b/lib/librte_eal/bsdapp/nic_uio/nic_uio.c @@ -113,6 +113,7 @@ struct pci_bdf { #define RTE_PCI_DEV_ID_DECL_I40EVF(vend, dev) {vend, dev}, #define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) {vend, dev}, #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) {vend, dev}, +#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) {vend, dev}, const struct device devices[] = { #include 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 21d2eed..5d1b285 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -140,6 +140,10 @@ #define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) #endif +#ifndef RTE_PCI_DEV_ID_DECL_ENIC +#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) +#endif + #ifndef PCI_VENDOR_ID_INTEL /** Vendor ID used by Intel devices */ #define PCI_VENDOR_ID_INTEL 0x8086 @@ -155,6 +159,11 @@ #define PCI_VENDOR_ID_VMWARE 0x15AD #endif +#ifndef PCI_VENDOR_ID_CISCO +/** Vendor ID used by Cisco VIC devices */ +#define PCI_VENDOR_ID_CISCO 0x1137 +#endif + /******************** Physical EM devices from e1000_hw.h ********************/ #define E1000_DEV_ID_82542 0x1000 @@ -548,6 +557,14 @@ RTE_PCI_DEV_ID_DECL_VMXNET3(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) RTE_PCI_DEV_ID_DECL_FM10KVF(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_VF) +/****************** 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) + /* * Undef all RTE_PCI_DEV_ID_DECL_* here. */