From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id E3F467CDF for ; Wed, 24 May 2017 17:12:52 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id e127so78169422wmg.1 for ; Wed, 24 May 2017 08:12:52 -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; bh=2MWtVyDzE03NKpq5AiugnO2RA07UuXoE7RUX09k3x/4=; b=Gzk06UHcFJ0jHmPdZxxmMHw5Y6nhsfYBNjQ+qG374EKERgD2Kim3aDDiOVqaOFSE0/ tCovbP142zYeXF+4HN8uTgnioRAxAF5SuGeEuZzPZu5YS8EPmGp07kzkRyGowWdYyoM2 1ZUYvhSb+JSXsuxqhjW4LPg6QR3h3579hkWsxTbQ2Iq9p1ddej3188N+4sTQ7EyaJwgb IGON7NNregZiTcuDD9GvJwVIS0Mszwc3bbyQPM/LGSmq8p2SmAVsM5Nwgmgp2u0g8Jn1 4nKCfHd8qkASSYmZw92eEE7tblBO3MPVgJ8x7P+qRfEPnvWeYqSgg2Le8DOybOctFA7S npOg== 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; bh=2MWtVyDzE03NKpq5AiugnO2RA07UuXoE7RUX09k3x/4=; b=JJH6XAudwtKazIAmHuk8TiETTHsHTsgvO0i9Hz6FRwjK+Zlbgp5O9NU9Dknvs/zd9q kOp6cdoq57GdGWBwjxNBq7wcJ02TD9l2YSt7063HQ6OSZfESeQq0pzMydOYMjfD22mq+ 3vbjE5rY7r7BVuywuYfto4LjRTssLEUvCdqroVTRS6uUzouDBbBticqI4xitZRYDHYIN /BJJ9HZvvRofktUy3sVyaYmDZpyfN0FoUJ4BdzPpqOZijsjUGfiJIUtN1hPmpZQg/3K4 BkoIPv3PO93X5V062/TCSHUCw0aUGESFsMEV2kQ14YvCWzIceMpzlXJQ+kSlMHya5Foo Jvgg== X-Gm-Message-State: AODbwcCuu2sB9trMgWauGtbMLCiqTfgGXr6WYaf3s9Pvyqs71Q4Q6J6P iD5nJm85TDLQzF8a X-Received: by 10.28.9.204 with SMTP id 195mr6240606wmj.97.1495638772454; Wed, 24 May 2017 08:12:52 -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 9sm5633351wmh.17.2017.05.24.08.12.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 May 2017 08:12:51 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet , Jan Blunck , Stephen Hemminger , Maxime Coquelin , Jerin Jacob , David Marchand Date: Wed, 24 May 2017 17:12:32 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 Subject: [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, 24 May 2017 15:12:53 -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/ 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