From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 6EC312C8 for ; Wed, 28 Mar 2018 15:26:17 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id l16so5311803wmh.3 for ; Wed, 28 Mar 2018 06:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=IUXJo3hbO50x+o0xNukNXg6Dppj27Y1F6RjWHYutngM=; b=AgXqjDDHvXx+YhS+RrM8cURx6MqGX2XRhHZVohjcN545dY3imH7t131wi37QtRQ5Ja ARa2ULDa3PkYbDHiviOKrfK+jM+a2HSZJFjFKOHTKBWta7ZI9g1BBNRLhvZDEMpcrklU rkmDoQYGJqruZSFtO1wCTNqD5CmXDrIKLthFH2YcTNXBhSLsolz0FBoLu7g8t/v2Otjw pt4gjPkvwDeVH8tm+NtE0Y3WyzZ5fBI/AkB2+Hf4wb9SKjdSRtFDWRA4uWrZXrQNVxau k+j4nzkyc8xdA4jZm+mwPbVDKcVik1yqWc53DhaNPPVKtJriG/ZMVfFdh0JFkClNme18 FUzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=IUXJo3hbO50x+o0xNukNXg6Dppj27Y1F6RjWHYutngM=; b=UEj+zn47KckOmP6ftWeqTFJuxJJ8w7D+H6gqKbu/bhgJ/nt5uQWpKd1tfXjgzuLF+q eKYkim46Kn37JigGGdHKeY5WtUn8aK2hqaeIEhuc0uwAQsfBXZ6a64Gi7ocNN7OHAdGM oGO2kePArlDUlqb+5LPOXwDdFapAZP8iprSz2MyRxQRSFPda+SQahY/1SnOmOlX0SjBd o3pfKRgHb/2kqEJXJLvHC1f5zdvW2clZyMC2eFIE+yS68133d4oiVHMiKeo0Yk4kQdiI 69xTd3+TIileaeF/PqRloOGlQnTP93hu9ij4udrKGf9nDQs8j+6zP1y2KTjt2GM59LjW ZfTw== X-Gm-Message-State: AElRT7Ej9VXyXt9p+UGXAxuor1kVkyLXlnPWmSLeB/Hfyx+uTY+uD1rm PK5L5wHVpzHd59I/4UsyMYPNcA== X-Google-Smtp-Source: AIpwx4/dvp+/grZvnq98d0gk4M7cWsB8LjMfXdadXQWDSHYPJtt3YvaAdqeHj01+yy+a1yJHs6NyzA== X-Received: by 10.28.227.66 with SMTP id a63mr2525304wmh.128.1522243576957; Wed, 28 Mar 2018 06:26:16 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id r71sm5140590wmd.48.2018.03.28.06.26.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Mar 2018 06:26:16 -0700 (PDT) Date: Wed, 28 Mar 2018 15:26:03 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Rosen Xu Cc: dev@dpdk.org, declan.doherty@intel.com, bruce.richardson@intel.com, shreyansh.jain@nxp.com, tianfei.zhang@intel.com, hao.wu@intel.com Message-ID: <20180328132603.eqb62ydah2gpdlnz@bidouze.vm.6wind.com> References: <1521553556-62982-1-git-send-email-rosen.xu@intel.com> <1522229396-17898-1-git-send-email-rosen.xu@intel.com> <1522229396-17898-2-git-send-email-rosen.xu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1522229396-17898-2-git-send-email-rosen.xu@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v3 1/6] 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: , X-List-Received-Date: Wed, 28 Mar 2018 13:26:17 -0000 On Wed, Mar 28, 2018 at 05:29:51PM +0800, Rosen Xu wrote: > 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; why do you need to add a new option if you only insert a virtual devargs? Why wouldn't --vdev option work instead? and for that matter, I was expecting you to provide a PCI address. Can you give a command line showing how you create your device? The devtype is essentially ignored currently (at option stage, maybe there are still cruft left in PCI bus), instead the devargs parsing will detect the bus from the given optarg. This part of EAL will change rather soon, I'd prefer not to deal with additional options unless necessary. > /* 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 > }; > > -- > 1.8.3.1 > -- Gaëtan Rivet 6WIND