From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 17C8D56A3 for ; Fri, 14 Sep 2018 15:58:22 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id r1-v6so750718wmh.0 for ; Fri, 14 Sep 2018 06:58:22 -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=rexbWHJUjB/wvWx1arVKLHoF8L2e/Z9X0S6JUaG3wpQ=; b=Fgy8vvk3h8HCMja/lofU3MO2nWY1tOIk9DLnva43xzaTiACmnnLXy+n95Gg9TlMsyV mOD3AXr3nB2GHHzc3NofGZflgUgPpCPxEPFNk8ffvbMiZuiUrKBS5G/e+TvO19YB7Hro NRZYpNmzHKuh9q+Ie8/3Nbw1TRyBUXqnzokmm0JeHJ/t5r6AHKQ5GZ4LXKThZlrV2t/g 4XpNStIl3w89zGuctvgYh8TA15VsC5ZAFdG0bhP6EpU+RUqLKWGKJ7NK3INFKsIsnz8A dCb6etFNkLktCx3MY/yQOFXAItpLWrqOAwNv/me7b8qji5+w+2fzqA3eU560LnpTwgo+ kAeg== 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=rexbWHJUjB/wvWx1arVKLHoF8L2e/Z9X0S6JUaG3wpQ=; b=CRrnAGPb8Md86UQR1vkSvPRyGYo1dmdUCv3XmtpSv4OMRPkAuAAdIHr2Y8fkUntBd4 KuaAUta5OgI7yhpQLu9b5HzV4+wNgK4DHbbGwnYWSmlTe4/lcDX05m075MEeVA4o0ekY AxbdWG7ym1VSa2dyx9GBd+PMpbP78qftk+xLAGfivPZp1YQnfJ0U7O321yZdiBXlaBe/ iMiO3REERD2JmYiScoal3hHUkkcHUplvCNKaODVgr4utyboK+6kPTaLBEoZKPFK70yKL cgGhdhKFIhffcA/pUYq8WGqnQxzzfTG7UDk2HNmS6jo06hzsxAubKs5goJj8tbACdfnx z3eA== X-Gm-Message-State: APzg51ApPYqqqIn91/yFq2WTjWDiAyj7wlr9RDZrSteW2lcIzAmNmahX eBwfmvyNigM13TazJEjeABAUDQ== X-Google-Smtp-Source: ANB0VdZtQHaqHR5uwFYkmYenmfSi7tpqeRUufe/d3eyGI0CmTZkjJyAjgEmPjq/vqqJ0Dkl+DF+tQA== X-Received: by 2002:a1c:8dc6:: with SMTP id p189-v6mr2538728wmd.3.1536933501511; Fri, 14 Sep 2018 06:58:21 -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 i125-v6sm2635113wmd.23.2018.09.14.06.58.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Sep 2018 06:58:20 -0700 (PDT) Date: Fri, 14 Sep 2018 15:58:04 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Ferruh Yigit Cc: Stephen Hemminger , dev@dpdk.org, Stephen Hemminger Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) 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 13:58:22 -0000 On Fri, Sep 14, 2018 at 02:19:19PM +0100, Ferruh Yigit wrote: > On 9/14/2018 2:06 PM, Gaëtan Rivet wrote: > > Hi, > > > > On Fri, Sep 14, 2018 at 01:46:59PM +0100, Ferruh Yigit wrote: > >> On 8/30/2018 11:35 PM, Stephen Hemminger wrote: > >>> From: Stephen Hemminger > >>> > >>> Take device arguments from command line and put > >>> them in the device devargs. > >>> > >>> Signed-off-by: Stephen Hemminger > >> > >> <...> > >> > >>> @@ -204,6 +203,27 @@ vmbus_parse(const char *name, void *addr) > >>> return ret; > >>> } > >>> > >>> +/* > >>> + * scan for matching device args on command line > >>> + * example: > >>> + * -w 'vmbus(635a7ae3-091e-4410-ad59-667c4f8c04c3,latency=20)' > >> > >> This is just in comment but, > >> > >> I guess latest syntax is: > >> -w "vmbus:635a7ae3-091e-4410-ad59-667c4f8c04c3,latency=20" > >> > >> @Gaetan, is latest devarg syntax documented somewhere? > > > > That's the current syntax indeed. Some documentation is found at > > > > lib/librte_eal/common/include/rte_devargs.h:100 > > > > Where it is specified that the bus name can be either omitted or > > followed by any character, to separate it from the device identifier. > > > > This means that using ':' is fine, as well as '('. As long as the device > > PMD afterward ignore the dangling ')' during devargs parsing, this should > > be fine. > > > > I don't think this is very clean, but it works. > > Thanks for the info, I see how "(" works, but ")" is takes as part of argument > and causing problem, I think better to not give "()" as supported syntax at all. > > 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=1 > -w vdev:net_pcap,iface=lo > --vdev pci:0000:86:06.0,enable_floating_veb=1 > --vdev vdev:net_pcap,iface=lo > > They are both valid but cannot be used interchangeably. 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. 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. 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. -b will actually change the bus configuration to "blacklist mode", -w to "whitelist mode", and --vdev will do nothing. 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. 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. -- Gaëtan Rivet 6WIND