From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 1/5] bus/vmbus: add devargs support Date: Fri, 14 Sep 2018 08:21:51 -0700 Message-ID: <20180914082151.389c3f13@xeon-e3> References: <20180830223512.21297-1-stephen@networkplumber.org> <20180830223512.21297-2-stephen@networkplumber.org> <20180914130646.cuyl55ycqfz2yvtp@bidouze.vm.6wind.com> <20180914135804.qhvusuub4kdqrhpz@bidouze.vm.6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Ferruh Yigit , dev@dpdk.org, Stephen Hemminger To: =?UTF-8?B?R2HDq3Rhbg==?= Rivet Return-path: Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id C18145911 for ; Fri, 14 Sep 2018 17:22:00 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id x26-v6so4544208pge.12 for ; Fri, 14 Sep 2018 08:22:00 -0700 (PDT) In-Reply-To: <20180914135804.qhvusuub4kdqrhpz@bidouze.vm.6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 14 Sep 2018 15:58:04 +0200 Ga=C3=ABtan Rivet wrote: > On Fri, Sep 14, 2018 at 02:19:19PM +0100, Ferruh Yigit wrote: > > On 9/14/2018 2:06 PM, Ga=C3=ABtan Rivet wrote: =20 > > > Hi, > > >=20 > > > On Fri, Sep 14, 2018 at 01:46:59PM +0100, Ferruh Yigit wrote: =20 > > >> On 8/30/2018 11:35 PM, Stephen Hemminger wrote: =20 > > >>> From: Stephen Hemminger > > >>> > > >>> Take device arguments from command line and put > > >>> them in the device devargs. > > >>> > > >>> Signed-off-by: Stephen Hemminger =20 > > >> > > >> <...> > > >> =20 > > >>> @@ -204,6 +203,27 @@ vmbus_parse(const char *name, void *addr) > > >>> return ret; > > >>> } > > >>> =20 > > >>> +/* > > >>> + * scan for matching device args on command line > > >>> + * example: > > >>> + * -w 'vmbus(635a7ae3-091e-4410-ad59-667c4f8c04c3,latency=3D20)' = =20 > > >> > > >> This is just in comment but, > > >> > > >> I guess latest syntax is: > > >> -w "vmbus:635a7ae3-091e-4410-ad59-667c4f8c04c3,latency=3D20" > > >> > > >> @Gaetan, is latest devarg syntax documented somewhere? =20 > > >=20 > > > That's the current syntax indeed. Some documentation is found at > > >=20 > > > lib/librte_eal/common/include/rte_devargs.h:100 > > >=20 > > > Where it is specified that the bus name can be either omitted or > > > followed by any character, to separate it from the device identifier. > > >=20 > > > This means that using ':' is fine, as well as '('. As long as the dev= ice > > > PMD afterward ignore the dangling ')' during devargs parsing, this sh= ould > > > be fine. > > >=20 > > > I don't think this is very clean, but it works. =20 > >=20 > > Thanks for the info, I see how "(" works, but ")" is takes as part of a= rgument > > and causing problem, I think better to not give "()" as supported synta= x at all. > >=20 > > btw, now both -w and --vdev are valid and can be used interchangeably, = right? I > > mean all following are valid? > > -w pci:0000:86:06.0,enable_floating_veb=3D1 > > -w vdev:net_pcap,iface=3Dlo > > --vdev pci:0000:86:06.0,enable_floating_veb=3D1 > > --vdev vdev:net_pcap,iface=3Dlo > >=20 > > =20 >=20 > They are both valid but cannot be used interchangeably. >=20 > This was the case at one point, between two rcs, because I had removed > the devtype and the bus black/white-listing was configured another way. >=20 > A user complained about the API change because it was not announced in > time IIRC, and this was scrapped. Since then, the effort has been to on > the new syntax instead of cleaning the old system. >=20 > They cannot be used interchangeably because an rte_devtype is defined by > the parameter choosen. BLACKLISTED_PCI for -b, WHITELISTED_PCI for -w, > and VIRTUAL for --vdev. >=20 > -b will actually change the bus configuration to "blacklist mode", -w to > "whitelist mode", and --vdev will do nothing. >=20 > So a PCI device declared using --vdev, will actually be skipped during > PCI probe because by default it operates in blacklist mode, and the > device policy is not WHITELISTED. This could surprise the one attempting > this trick. >=20 > This semantic is subtle and bug-prone. I'm adding it to the pile of > reasons I'd like to remove the blacklist mode altogether. >=20 It would have been nice if there was a --devargs instead of overloading -w = and -b. Especially when just changing parameter on a device.