From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0q5Nx/K6i5C//7pZpogYbgga70vMXbhCEbUgoIvK1BI=; b=pAxxtqdWkkYZG3iqTUGLh2uy3hIB3gDx/bWd6hQ67nDgbjmvM0+7410+vxMkXhBDzY q/4tc6jTsrC1s+ap1pHCBO7DzXvZhAFlMJSCucVRoD/ZDahgj/CYdPaCPWVvh7C9CGXT Yz0lD4iXTYGlVS3UavwUBw3zNkQLPtXrpM+LWwNmIlZV+ZLkn/G8A+BEQjDgDSuTu1RU zw6ad1ce4oM3+isrzlzPcB0ZT2uR7/1NU575xh7f9Zdc931dA3P9Xp6OYJ8fzsUenBv+ hc/OpwGIYRwiBQ0NWR0MUPZIj6AeFCTEMG73MpHUy5AME2zUMOM3eUikdABZO7dLFg1B bREg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=0q5Nx/K6i5C//7pZpogYbgga70vMXbhCEbUgoIvK1BI=; b=jTUj9cl5/vL9YtWfZAkqZoxLu3K2PYYnLa2eucJJNDjz/B98aRmcSc+85H4rZSA/4W 1XL4fEK7/QsuTZ06yAWq2zTQb61VpJkKb3IUEUeW2KcFxfSySsQLyCoUMMdysp1dfHt7 EaQ1Ep+cT4P07njDcikHwH9gBEl0mUlv6G4w1AcVtXirlnl+Fokpojk5NGXqK5ncTQ3A IUZPXWA0NC1MAdoELbOn6deb1mYGD+Ys+KRPbWCsV6iT+LiUQjvEqnpEo5g8Z3G2dORo OTySNTMNFOM6ccwKSbb8cFyQeALhRfkJAiKK1Xg7lLOmcgLpi2SyR1IIvjeXxehh5JlF lKPA== X-Gm-Message-State: APzg51CaWM7bLypYRoJxne0xXs8ToqqDIQekJGd5265VbsbEQ2kKN+K3 5RqYl/y6LNgXASuyRzIdk0oGRw== X-Google-Smtp-Source: ANB0VdZlCuKY5ALiiSm4PY9mkSvIKT923L82Fb4G5R/8ZoOZ6GX26SlsPd/XKoQ1VCb7VL7ku7Mk4g== X-Received: by 2002:a62:438f:: with SMTP id l15-v6mr13315372pfi.196.1536938519414; Fri, 14 Sep 2018 08:21:59 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id h4-v6sm10807509pfe.49.2018.09.14.08.21.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Sep 2018 08:21:59 -0700 (PDT) Date: Fri, 14 Sep 2018 08:21:51 -0700 From: Stephen Hemminger To: =?UTF-8?B?R2HDq3Rhbg==?= Rivet Cc: Ferruh Yigit , dev@dpdk.org, Stephen Hemminger Message-ID: <20180914082151.389c3f13@xeon-e3> In-Reply-To: <20180914135804.qhvusuub4kdqrhpz@bidouze.vm.6wind.com> 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 Subject: Re: [dpdk-dev] [PATCH 1/5] bus/vmbus: add devargs support 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: Fri, 14 Sep 2018 15:22:01 -0000 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.