From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id 216042C2A for ; Sat, 10 Jun 2017 10:50:14 +0200 (CEST) Received: by mail-wr0-f196.google.com with SMTP id u101so11201849wrc.1 for ; Sat, 10 Jun 2017 01:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=Li36QBPFBpY91qRxNudiTWUgAv8Pul3NmKvtFFVO3Y0=; b=P8eEoTsrFF1xh31UUXOvA+bVR4/NDd0Wif5qRRPSm8qy6PjM1y4isZiJpFM4Cb9Nan PrTC+FrRDqXvavvHTYW87VAW6NZaqYwdWnBuxgO3xBtUJ0a+JpnJyYLGaLHcSEZ/0lq1 T5n6M4yz+KSoLIP+YOX4v+vufK+LguRGGfD5a3r6kFBurQtHIY83vrrgTDFYKj5ktxrH kTWD88ehEWynLpL21wxgL4uQzNdaWNXLkREjtVzJubFF8cer7xUShGwG7mo38Kk+FnRh 2LaiIxI4Qb4yzlcikB/sNXLZ2g4Kk7StK9YN+S9OhgvQcpkyNGBZsXeGwSTdpSx6EBC4 O2eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=Li36QBPFBpY91qRxNudiTWUgAv8Pul3NmKvtFFVO3Y0=; b=aufy2aM0oFvta1X60W6CF4TCgoPeXjkdYNySZQnAymRQFrqLp95q1zrti3RyoBHEkZ pzJDFO3uknMsXR+GWxXhNyjtYqhbv4pyG6W7qmklvj9cSo3sOduXRjTwqeNasBNakf0/ /ofgCSSCyLlHcX05BcBYXAPBOU1XBtbFR6dIKyNWR7DTSqfu/x6zJFvRfb+tiJIUKv1U VbcBDgbIMcZ7t6Yvy0l4qKvy9QKYR6z0Yu2Zgv0/bNz/PVdAKma3LY+VNPqzV4jTMedh Wivd5/bRFTAAyPGoFkciYhdsFkAgVDFHMnPZynCwwa8ocOUomu6tLodxY12s5d5urx8u 8jMQ== X-Gm-Message-State: AODbwcCItlp4hTuOkJswZi+H/jiiME7jn6ycewqvGvbkWPre3/wJrAcl 3U0pXwyVqYA/q28U3HPS2BNWKrxBsg== X-Received: by 10.223.182.152 with SMTP id j24mr1451098wre.122.1497084613762; Sat, 10 Jun 2017 01:50:13 -0700 (PDT) MIME-Version: 1.0 Sender: jblunck@gmail.com Received: by 10.28.25.65 with HTTP; Sat, 10 Jun 2017 01:50:12 -0700 (PDT) In-Reply-To: <20170608125150.GC18840@bidouze.vm.6wind.com> References: <1a54f0dd79200960921ca495aa7381817a599bc0.1495629122.git.gaetan.rivet@6wind.com> <20170607200331.GU18840@bidouze.vm.6wind.com> <20170608113630.GB18840@bidouze.vm.6wind.com> <20170608125150.GC18840@bidouze.vm.6wind.com> From: Jan Blunck Date: Sat, 10 Jun 2017 10:50:12 +0200 X-Google-Sender-Auth: D39W_5lCJCLPHT3rXzoyqx_8woQ Message-ID: To: =?UTF-8?Q?Ga=C3=ABtan_Rivet?= Cc: dev , Stephen Hemminger , Maxime Coquelin , Jerin Jacob , David Marchand Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH 7/9] bus: add helper to find a bus from a device name 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: Sat, 10 Jun 2017 08:50:14 -0000 On Thu, Jun 8, 2017 at 2:51 PM, Ga=C3=ABtan Rivet = wrote: > On Thu, Jun 08, 2017 at 01:40:46PM +0200, Jan Blunck wrote: >> On Thu, Jun 8, 2017 at 1:36 PM, Ga=C3=ABtan Rivet wrote: >> > On Thu, Jun 08, 2017 at 12:45:17PM +0200, Jan Blunck wrote: >> >> On Wed, Jun 7, 2017 at 10:03 PM, Ga=C3=ABtan Rivet wrote: >> >> > On Wed, Jun 07, 2017 at 07:28:07PM +0200, Jan Blunck wrote: >> >> >> On Wed, May 24, 2017 at 5:12 PM, Gaetan Rivet wrote: >> >> >> > Find which bus should be able to parse this device name into an = internal >> >> >> > device representation. >> >> >> > >> >> >> >> >> >> No, please don't add this. One should know to what bus a device >> >> >> belongs to before plugging it. Artificially encoding the parent bu= s >> >> >> into the device name is not the right thing to do. Please keep tho= se >> >> >> things separate. >> >> >> >> >> > >> >> >> >> When plugging a device the users know about: >> >> - bus name >> >> - device name >> >> >> >> Its not the case that the users invent the device names out of thin >> >> air. The EAL shouldn't codify what the users of the EAL already know >> >> about. >> >> >> >> >> > >> > Yes, but in that case the user is forced to explicitly name the bus us= ed >> > for a device. >> > >> > I think it might be sufficient to have this as a private function to t= he >> > EAL, as it is currently only used within the rte_devargs parsing. >> > Applications could use this helper to recognize a bus from a device >> > name, but this is contrived. >> > >> >> Just remove it. Putting the knowledge of what bus a device name could >> be for into code has failed before (e.g. biosdevname etc.). If the >> application doesn't know what bus the device is living on we have a >> different problem. >> > > This means that devices will be declared as follows: > > -w PCI:00:02.0 -w virtual:net_ring0 > > Without a way to keep the legacy behavior. > Do you agree with it? > This adds ':' as another character not usable in identifiers for buses. I wouldn't touch the meaning of -w at all and instead use it as an alias fo= r --dev 00:02.0,bus=3Dpci --bus pci,whitelist This would clearly separate the device arguments from the bus arguments. What do you think? Does this make sense?