From patchwork Fri Mar 9 15:39:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xu, Rosen" X-Patchwork-Id: 35865 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0CAAD5F36; Fri, 9 Mar 2018 16:35:46 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 423125F1D for ; Fri, 9 Mar 2018 16:35:44 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Mar 2018 07:35:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,446,1515484800"; d="scan'208";a="210253980" Received: from dpdkx8602.sh.intel.com ([10.67.110.200]) by fmsmga006.fm.intel.com with ESMTP; 09 Mar 2018 07:35:41 -0800 From: Rosen Xu To: dev@dpdk.org Cc: declan.doherty@intel.com, shreyansh.jain@nxp.com, tianfei.zhang@intel.com, hao.wu@intel.com, gaetan.rivet@6wind.com Date: Fri, 9 Mar 2018 23:39:00 +0800 Message-Id: <1520609944-120305-2-git-send-email-rosen.xu@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1520609944-120305-1-git-send-email-rosen.xu@intel.com> References: <1520609944-120305-1-git-send-email-rosen.xu@intel.com> Subject: [dpdk-dev] [RFC 1/5] Add Intel FPGA BUS Command Parse Code 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Rosen Xu --- lib/librte_eal/common/eal_common_options.c | 8 +++++++- lib/librte_eal/common/eal_options.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 9f2f8d2..4fe0875 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -73,6 +73,7 @@ {OPT_VDEV, 1, NULL, OPT_VDEV_NUM }, {OPT_VFIO_INTR, 1, NULL, OPT_VFIO_INTR_NUM }, {OPT_VMWARE_TSC_MAP, 0, NULL, OPT_VMWARE_TSC_MAP_NUM }, + {OPT_IFPGA, 1, NULL, OPT_IFPGA_NUM }, {0, 0, NULL, 0 } }; @@ -1160,7 +1161,12 @@ static int xdigit2val(unsigned char c) core_parsed = LCORE_OPT_MAP; break; - + case OPT_IFPGA_NUM: + if (eal_option_device_add(RTE_DEVTYPE_VIRTUAL, + optarg) < 0) { + return -1; + } + break; /* don't know what to do, leave this to caller */ default: return 1; diff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h index e86c711..bdbb2c4 100644 --- a/lib/librte_eal/common/eal_options.h +++ b/lib/librte_eal/common/eal_options.h @@ -55,6 +55,8 @@ enum { OPT_VFIO_INTR_NUM, #define OPT_VMWARE_TSC_MAP "vmware-tsc-map" OPT_VMWARE_TSC_MAP_NUM, +#define OPT_IFPGA "ifpga" + OPT_IFPGA_NUM, OPT_LONG_MAX_NUM };