From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 9F6AF137C for ; Wed, 7 Jun 2017 19:22:06 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id 7so122883245wmo.1 for ; Wed, 07 Jun 2017 10:22:06 -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; bh=qpTElRz2sEjOTdb1wybuBsjYTTjhBxomN/m5n8fORfw=; b=ptwb9/kVoc3j7fWSE/CBgl0YUGKh4VdJpetyLwTvnG3mLg6i/MeJQwQE081rJYSJC+ S91o0SVEsiXYJLwZSb1xByAS25xVLOR878QzyrJxEbhfGzSw7/HKcai3jOUA7hbIKedW tc8UhdzgNn5GYyjhoO1uTtB+p0ihWR/UKYyUGUtv3AApoeA1NC6Cehtr+h6Q13aGwLme U6holtjvyYkRNhpB0edivbPFF7ZZo08U9F7dSpgVjJ78/x7yMRlECqocmSTBx5Pvk4YW iRKceFdeYFn0FvCE6/xyQ3svDVWkoqZBKHXnTl/c/aqLUI5CYitmhVG+hbzD2kuAAhQZ rx7g== 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; bh=qpTElRz2sEjOTdb1wybuBsjYTTjhBxomN/m5n8fORfw=; b=XSPvE2BYxVcOzTZmShdJE3yag9Wc7IxpK8tLREYtmMOU3DDbe9IyUHYBgsTS83rt+5 JwtyzR0+xU4SF9AtSHVK+Anva6bW04bl4kWpW97CyKpo6TSbx9MoemIK5pW3cUPWYxpe ROv3nz0AIpEuywUfTx15w3WRSzeJK2Iml/jDUti1K61MIQ46AgkVGDY7MgOoYqRao6PG XBXSQwGrqODJMFTHmgbeSfD1KDu+6NlcwRfqLNT0UYauJOrptIYCf84gYhyZzvzAI7ki m3DjBvn2NGjFtlIwU4isbvd9iSRhlr2OVuOEvzKPSPX9G319Y/inotEy69UyNnu18q6y m+gA== X-Gm-Message-State: AODbwcBxa1im1YlvfPbP/616tRxf5p2RPUo8UStHCqiRKZY9XwrvEYUU 0OCCL6CqFbPuriEZOKhR8LdYsNn2lS0A X-Received: by 10.28.155.65 with SMTP id d62mr571411wme.78.1496856125996; Wed, 07 Jun 2017 10:22:05 -0700 (PDT) MIME-Version: 1.0 Sender: jblunck@gmail.com Received: by 10.28.25.65 with HTTP; Wed, 7 Jun 2017 10:22:05 -0700 (PDT) In-Reply-To: References: From: Jan Blunck Date: Wed, 7 Jun 2017 19:22:05 +0200 X-Google-Sender-Auth: 78wRpLboHXTOzEc78YhcKwvgwkY Message-ID: To: Gaetan Rivet Cc: dev , Stephen Hemminger , Maxime Coquelin , Jerin Jacob , David Marchand Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 0/9] rte_bus parse API 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, 07 Jun 2017 17:22:06 -0000 On Wed, May 24, 2017 at 5:12 PM, Gaetan Rivet wrote: > Following the evolutions announced in [1], here is the first part of > the rte_devargs rework planned for 17.08. The rationale has been partially > explained in [2]. > > This first part covers the introduction of the necessary facilities in > rte_bus to allow for generic device parsing. This API is implemented for > the virtual and PCI buses. Additionally, this rte_bus evolution is being > used within rte_devargs to characterize a device type by its bus. > This work is the first of two parts to reduce the dependency of the EAL > upon specific bus implementations. > > Two public functions are added to rte_bus to help bus recognition: > > - rte_bus_from_name > - rte_bus_from_dev > > These functions are made public because the bus handle within devargs > becomes the generic device type. Recognizing device types is useful for > buses and PMDs alike. > The modified rte_devargs parsing allows declaring on the EAL command line > explicit buses to handle a device. The format is as follow: > > --vdev="virtual:net_ring0" --vdev="net_tap0,iface=tap0" > -w PCI:00:02.0 -w 00:03.0 > I don't see the point of doing this. The --vdev parameter implicitly defines the bus by its name (--vdev aka virtual device). Why don't you add a commandline "--dev" parameter that supports a "bus=" devarg? You would need to clarify what that means for other busses than the virtual one. Is the bus switched into whitelist mode by that? > This explicit bus designation is optional; no evolution is currently > forced on users to migrate to this new format. The separating character is > arbitrary and can be any character illegal within a bus name. > Subsequently, what is allowed within a bus name has been formally > defined and is now enforced. > > [1]: http://dpdk.org/ml/archives/dev/2017-May/065634.html > [2]: http://dpdk.org/ml/archives/dev/2017-May/065670.html > > This patchset depends on: > > bus: attach / detach API > http://dpdk.org/ml/archives/dev/2017-May/066330.html > http://dpdk.org/dev/patchwork/patch/24489/ > > Gaetan Rivet (9): > bus: fix bus name registration > bus: verify bus name on registration > bus: introduce parsing functionality > vdev: implement parse bus operation > pci: implement parse bus operation > bus: add helper to find bus from a name > bus: add helper to find a bus from a device name > vdev: expose bus name > devargs: parse bus info > > lib/librte_eal/bsdapp/eal/rte_eal_version.map | 8 +++ > lib/librte_eal/common/eal_common_bus.c | 47 +++++++++++++++++ > lib/librte_eal/common/eal_common_devargs.c | 17 +++++- > lib/librte_eal/common/eal_common_pci.c | 19 +++++++ > lib/librte_eal/common/eal_common_vdev.c | 70 ++++++++++++++----------- > lib/librte_eal/common/eal_private.h | 16 ++++++ > lib/librte_eal/common/include/rte_bus.h | 49 ++++++++++++++++- > lib/librte_eal/common/include/rte_devargs.h | 3 ++ > lib/librte_eal/common/include/rte_vdev.h | 2 + > lib/librte_eal/linuxapp/eal/rte_eal_version.map | 8 +++ > 10 files changed, 205 insertions(+), 34 deletions(-) > > -- > 2.1.4 >