From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) by dpdk.org (Postfix) with ESMTP id 4AC032C72 for ; Wed, 21 Jun 2017 01:36:08 +0200 (CEST) Received: by mail-wr0-f180.google.com with SMTP id y25so72315557wrd.2 for ; Tue, 20 Jun 2017 16:36:08 -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=vaVxIrQFStB16/RAtUxws/AZQgaEPYpq+1Sy0IW44G0=; b=2Twt/e7j1yNwOyw4ylzeS5hC1aNsMFrbqv5rN8LsfQEofylo7eajRmTUssqB18k+Ea hCeP7rEjp8QnpCFPTQHLeMwlXItCy1akKHRKLjqoy9I7nAnELoDss4KaniindGujHMpO cWRMVPD+ADwxVz7WjKGmlpXQ6I7nbJJarBFk4WGYgRFWMotXLCI2vDt93Xp2g9rGS2kx FaZQDH2kbBS/1freXuPjERic4bxBP16lGUp14xEPL5Zxgl15jC9lV9UJ8wvFNW5PpB96 9JYj/hdbGz2tXy5za/3H+2Hv65PEcUt4dgEg62yUr8V91yGzQTXFSIGlKc/hoZ3KBwy4 S4dw== 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=vaVxIrQFStB16/RAtUxws/AZQgaEPYpq+1Sy0IW44G0=; b=HxOCj/t6al9fY27VvNOtQNMYJ8McFzAalc84HmmngKrlgGyk6pMYnYSYabnRsHSn1V 2PhcIlDrCSw0UK5LlGdKZZ0PRu8gVQl0V3pF/FQEcYgZhVac0v3Rzd7VaH66fZcsfoAg gdUTtK9BS807mmCb6aJoLgx3PbyFeE9VJ3fm02Kfja79C/bzYwgJUbYd/Hf4jlbTJM01 C0+h14GaBKTvdxj5PqRN5UQS0o5Q7GNI2O3P1sB80pq/4DByHoqwL1ADm32clzKyhYL8 MgZM+Cz7ZtmNSjzQm4hMmS7HofkjCdmrgVOww56XX/o71lvRv8lpIM/Q4aNpuF2iQRid LGzA== X-Gm-Message-State: AKS2vOyN8xf7aoaV81+5qKSFzn7OHgtmDzH6jw3SvNKESIKWFTmdTveJ JOoe9zIZF/dEARJBjEk= X-Received: by 10.28.71.147 with SMTP id m19mr4387780wmi.92.1498001767381; Tue, 20 Jun 2017 16:36:07 -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 f45sm6463684wrf.2.2017.06.20.16.36.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 16:36:06 -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:35:34 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v5 00/19] Generic devargs parsing 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:36:08 -0000 The second part of the work outlined in [1] and [2]. The first part is at [3]. In this patchset, the representation of devices in rte_devargs is made generic to remove some dependencies of the EAL on specific buses implementations. Following the device types being characterized by their bus, the DEVTYPE flags are updated not to reference virtual / PCI devices anymore. The device type was one of two elements expressed by these flags and the bus handle only covers one. The second is the bus scan behavior, namely "whitelist mode" or "blacklist mode". These two modes are consequently introduced as bus scan policies, expressed within a bus configuration structure. Finally, once all specialized parts have been removed from rte_devargs, a cleaner rte_devargs parser is proposed. This parser should allow following further changes without having to update its API, and is already available for third parties to build rte_devargs structures from device declarations. With this patchset, it is now possible to use any device type on the EAL command line, with either the -w or -b parameters. The bus name can be used to explicitly ask for one bus to handle a device if there is any ambiguity. Buses needs only to implement the "parse" method for their devices to be declared in this way. [1]: http://dpdk.org/ml/archives/dev/2017-May/065634.html [2]: http://dpdk.org/ml/archives/dev/2017-May/065670.html [3]: http://dpdk.org/ml/archives/dev/2017-May/066341.html This patchset depends on: [PATCH 0/9] rte_bus parse API http://dpdk.org/ml/archives/dev/2017-May/066341.html http://dpdk.org/dev/patchwork/patch/24499/ v1 -> v2: * fix PCI whitelist mode v2 -> v3: * Rebase the series on the new plug / unplug API v3 -> v4: * Fix rte_devargs parsing helper * Introduce new rte_devargs clone function * Introduce new rte_devargs release function * Fix test application for rte_devargs. TODO: rewrite complete rte_devargs autotest. * Fix a few rte_pci references. * Update EAL command line help for -w / -b v5: * Fix integration issue with new arbitrary bus name parsing. Gaetan Rivet (19): net/bonding: properly reference PCI header net/bnxt: properly reference PCI header net/mlx5: properly reference PCI header net/e1000: properly reference PCI header net/ixgbe: properly reference PCI header net/sfc: properly reference PCI header app/testpmd: properly reference PCI header test: properly reference PCI header dev: device kernel module is a device attribute bus: introduce bus scan policies devargs: parse bus policies devargs: generic device representation pci: update device name net/virtio: do not reference device type devargs: generic device types devargs: introduce cleaner parsing helper devargs: clone function devargs: remove function eal: change whitelist / blacklist command line doc app/test-pmd/testpmd.c | 9 +- app/test-pmd/testpmd.h | 2 + doc/guides/rel_notes/deprecation.rst | 5 + drivers/net/bnxt/bnxt.h | 1 + drivers/net/bonding/rte_eth_bond_args.c | 1 + drivers/net/e1000/e1000_ethdev.h | 1 + drivers/net/ixgbe/ixgbe_ethdev.h | 1 + drivers/net/mlx5/mlx5.h | 1 + drivers/net/sfc/sfc.h | 1 + drivers/net/virtio/virtio_pci.c | 5 +- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 2 + lib/librte_eal/common/eal_common_devargs.c | 176 ++++++++++++++++-------- lib/librte_eal/common/eal_common_options.c | 31 ++--- lib/librte_eal/common/eal_common_pci.c | 16 ++- lib/librte_eal/common/eal_common_vdev.c | 18 ++- lib/librte_eal/common/eal_options.h | 8 +- lib/librte_eal/common/include/rte_bus.h | 17 +++ lib/librte_eal/common/include/rte_dev.h | 12 ++ lib/librte_eal/common/include/rte_devargs.h | 68 ++++++--- lib/librte_eal/common/include/rte_pci.h | 9 -- lib/librte_eal/common/include/rte_vdev.h | 2 +- lib/librte_eal/linuxapp/eal/rte_eal_version.map | 2 + test/test/test_devargs.c | 45 +++--- test/test/virtual_pmd.c | 1 + 24 files changed, 278 insertions(+), 156 deletions(-) -- 2.1.4