From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gaetan.rivet@6wind.com>
Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44])
 by dpdk.org (Postfix) with ESMTP id 2F7C023B
 for <dev@dpdk.org>; Wed, 24 May 2017 18:16:04 +0200 (CEST)
Received: by mail-wm0-f44.google.com with SMTP id d127so73299573wmf.0
 for <dev@dpdk.org>; Wed, 24 May 2017 09:16:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=6wind-com.20150623.gappssmtp.com; s=20150623;
 h=from:to:cc:subject:date:message-id:in-reply-to:references;
 bh=RLo6hf5hAX2PCPhX9HGxQjTTVZPkwwoG1MpgGXrN+/I=;
 b=2DStyMdqXLuTiP2olq8OssfydW+xkj3pFHbSfemXCLojnoTIHUQVHc/PLa7tfYBmtU
 chaNzJhT/dFpwaLXIjeYMfLK8o6a3DP+v7eK/7IBE+W7MJ1vInFtX70k9FTWyqgSJcg5
 ETQP0ntiYqZ671jDvqLqYaGXrTEOBQhQ4w8RQUaR/i+cetvgAjlCtygTk+fJ7/aEHr4E
 30BXh42PmfuBbcp177FnRZq3Qy5RxLWRpV//sM8z9R18Fa0Zu2q0bPXylEc9vR7Tmtkm
 HUarwaWmk81dc/E80wqkkPLRJMR2DChtPkfW3LSK1g6bRTLe2Ri/7yHN1ILnRu0AcqmF
 7EDw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references;
 bh=RLo6hf5hAX2PCPhX9HGxQjTTVZPkwwoG1MpgGXrN+/I=;
 b=TqfCgGRihc+4pmJABiyklc0eN0meYC+D7YIZ/dHaLccu9UdUy3d0LcO4wk1s9uw1Qc
 WpoZI8W6AvudlUIIja9S5+wnN0BkvkD7sgifTzQ/GobPDokeqH9PrlsVewYQkgJiRBWK
 tERgufnuBs25GxRT7cs9rXhTCJ2cOzjNIIHbCTeIOq3+GkWLVcP1+iM7EHFv5BBNyzVm
 7SBNIjCfccNPKX7rCC1yFAZL9hyAoh+i7QtcM0TfqQwVPw3/40DVtGCze+uAjU9t3Wdj
 Epd/8d7A9XRAHcmhVHA9t/KQIR1jczuOy98tJHyjAvxYBofeOg7/Ccz9pwItK+BOJjI8
 eYhg==
X-Gm-Message-State: AODbwcDD1UH2d8UXYRp2PnSyZNTNdqlkiJbf0It6e6j4tSLMdWeK7E9G
 MAIYcT+DX6BLtwq6erY=
X-Received: by 10.28.209.131 with SMTP id i125mr6470827wmg.57.1495642563448;
 Wed, 24 May 2017 09:16:03 -0700 (PDT)
Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com.
 [62.23.145.78])
 by smtp.gmail.com with ESMTPSA id l7sm7783055wrc.52.2017.05.24.09.16.02
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Wed, 24 May 2017 09:16:02 -0700 (PDT)
From: Gaetan Rivet <gaetan.rivet@6wind.com>
To: dev@dpdk.org
Cc: Gaetan Rivet <gaetan.rivet@6wind.com>
Date: Wed, 24 May 2017 18:15:43 +0200
Message-Id: <cover.1495642202.git.gaetan.rivet@6wind.com>
X-Mailer: git-send-email 2.1.4
In-Reply-To: <cover.1495629122.git.gaetan.rivet@6wind.com>
References: <cover.1495629122.git.gaetan.rivet@6wind.com>
Subject: [dpdk-dev] [PATCH v2 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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 24 May 2017 16:16:04 -0000

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

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/

v1 -> v2:

  * fix PCI parse implementation

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