From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f182.google.com (mail-wr0-f182.google.com [209.85.128.182]) by dpdk.org (Postfix) with ESMTP id 5FF8A3256 for ; Wed, 21 Jun 2017 01:30:50 +0200 (CEST) Received: by mail-wr0-f182.google.com with SMTP id r103so111493697wrb.0 for ; Tue, 20 Jun 2017 16:30:50 -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=xEyaRQK+TJ8TYrS/H6AMfatjxBR4bJFyGG2PFLAzK4s=; b=bC4c2CDmF1PLp3AuqrpkDLJ+y2E69WQK2ZJRKOc2G5M542AtoJN4fOyZL30vTyuQ2V sMBMMvdo8oRKc3ManqGvZRLFN6t/AaWcwYB77K+llk0V+7CjQJK9rBLIeonSGB+XxJQu H5EzeRf6XpVo6xH+Rs9kUMVsVR7kcCl18yEx378p16Gz5kftkgWYpmJNB+JQmD5aCCyP ejigDLL2VMpfQAXdob2kS6fUR4Qv5eYxMkOI9B/yu2i0ghgL9iKRZrrB4QgNoQ+wtVtK xjpQRMX8Q0LfRrFmk+jwvEDYkzMmJx9LKz4U7XF1LSuWkwZ+EJidQMk9xBYtANOxMJrV gTzg== 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=xEyaRQK+TJ8TYrS/H6AMfatjxBR4bJFyGG2PFLAzK4s=; b=LQBrSaNav1lFqmMK/j2SSkwa+0h83S+pH/7w8PxLAWezrgadrrTGJBypbttjW9KAsM iI0ZPfEJ1OpE2FH9WbbVovQh/fdoDJJdpxs6m+9NrUo5h5n+TOqbDsLsctQIzz5ktr9v +V759TwfqM2e9McF/WhH1En4nFPd2DobWoJHA62xifszHTcjNUAulmh0QzQYL8aUst46 Yi3iSlAm9amGqupHXlCXwVwHI7mS65mlBWkuHugBZKP8PXefccbRM3fp6MA5aOsb2TZ+ XJ+YN2UjYaYmsCEvZzlmSJsOW+RZEpcjd5kzhDw2gAoUTWO7otfZRZprlDD8+c/UFQ0I 81Gw== X-Gm-Message-State: AKS2vOyM+g3j/H3Mjk9Nmye0WDEhSVFylR0voeReYguf4iroPC6JEBf1 C3i6upzQH4NXQrBHO30= X-Received: by 10.28.146.12 with SMTP id u12mr4572781wmd.15.1498001449720; Tue, 20 Jun 2017 16:30:49 -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 w30sm17593338wrb.49.2017.06.20.16.30.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 16:30:48 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet , Jan Blunck , Stephen Hemminger , Maxime Coquelin , Jerin Jacob , David Marchand Date: Wed, 21 Jun 2017 01:30:29 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v5 0/7] 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: Tue, 20 Jun 2017 23:30:50 -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 v2 --> v3: * Rebase the series on the new plug / unplug API v3 --> v4: * Several bug fixes, commit log rewrite. * Follow the changes to the plug / unplug API. v5: * Do not verify bus name on bus registration. Actually, a legal bus name is not defined anymore. The bus/device separator in a device declaration can be anything, as long as it is a single character. The behavior is otherwise unchanged. Gaetan Rivet (7): bus: fix bus name registration bus: introduce parsing functionality vdev: implement parse bus operation pci: implement parse bus operation 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 | 31 +++++++++++ lib/librte_eal/common/eal_common_devargs.c | 15 +++++- lib/librte_eal/common/eal_common_pci.c | 19 +++++++ lib/librte_eal/common/eal_common_vdev.c | 68 +++++++++++++------------ 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 +++ 9 files changed, 169 insertions(+), 34 deletions(-) -- 2.1.4