From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gaetan.rivet@6wind.com>
Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com
 [209.85.128.169]) by dpdk.org (Postfix) with ESMTP id 2F2157CC3
 for <dev@dpdk.org>; Thu,  8 Jun 2017 01:57:19 +0200 (CEST)
Received: by mail-wr0-f169.google.com with SMTP id q97so12022700wrb.2
 for <dev@dpdk.org>; Wed, 07 Jun 2017 16:57:19 -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=pRc2FxtGc8EpUO4MmefVCihiN/xEwzM3qC5D65cZBo4=;
 b=UQ3xmh52R63mARb+GR+4n6sYPNP8Pn5ENIO68kljom3onUY+iPLG1p11u9O+XCgqm7
 9ub8DlHJfL/XzRNs5NUd1oPWQtpYazvwrOxLsBK6Ezed+tjjocCt4u2wU459vu7igM/O
 ZyeNKta6g7eGr5Vduf7ajDWhf4xq9mhMDGBdAYp1PF0iwQ+n9b7q3JaiznjGpc8RVKFF
 jVla23p+fLmkzQePzPHSDGjF23VF9l+mZ8qpj+0BGuP5ZKgY03yrI7KC3kZDEkJUkp7L
 8vWGssroPJLSVYorfejbFp6YiipVCbZQN2/+CWIHe2l0i3mzf0cYQ8WYhX+Z04br4Frw
 mIsA==
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=pRc2FxtGc8EpUO4MmefVCihiN/xEwzM3qC5D65cZBo4=;
 b=HhEDavy5kWf9N1ppAPUXFDG7QXan9AvfW3OjbgYDdurdJFc3Gv/lwWaN9/sWloJJOu
 ta5320mR4PbG/GxMODdhlS2XMmA3taPYWNzUF8VxIDTGVAqh4hlfDVIan+r2xnNhlyTY
 9I0RTzWuJzG2Rtz1OtUuMQ83eHeZ27Xyz7PK+oR7XYP0j80VEoLK24bwSdXEQO05+kHe
 UTXYwhkJOLIeYoKxtGxQIgjkHQtG3gZIw+a4cRgoyqciTmdGpFB9kq/owVtBcJJx5O9p
 dst3j0z7Gi0sS9fxTWbYS7rek7nnxDomTnzsmtBdFW2AwLYPo34m0UFOkLi+E5DfO1G0
 0KLw==
X-Gm-Message-State: AODbwcDVKVaciU7PC4j/GWIcc08dmA1atO6UGuFx4wbmOJvS0XwmJv7C
 jnMMXkoX/INo5L8naa0=
X-Received: by 10.223.174.194 with SMTP id y60mr21510852wrc.155.1496879838519; 
 Wed, 07 Jun 2017 16:57:18 -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 185sm22397056wmp.1.2017.06.07.16.57.17
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Wed, 07 Jun 2017 16:57:17 -0700 (PDT)
From: Gaetan Rivet <gaetan.rivet@6wind.com>
To: dev@dpdk.org
Cc: Gaetan Rivet <gaetan.rivet@6wind.com>, Jan Blunck <jblunck@infradead.org>,
 Stephen Hemminger <stephen@networkplumber.org>,
 Maxime Coquelin <maxime.coquelin@redhat.com>,
 Jerin Jacob <jerin.jacob@caviumnetworks.com>,
 David Marchand <david.marchand@6wind.com>
Date: Thu,  8 Jun 2017 01:56:46 +0200
Message-Id: <cover.1496876859.git.gaetan.rivet@6wind.com>
X-Mailer: git-send-email 2.1.4
In-Reply-To: <cover.1496309846.git.gaetan.rivet@6wind.com>
References: <cover.1496309846.git.gaetan.rivet@6wind.com>
Subject: [dpdk-dev] [PATCH v4 00/19] Generic devargs parsing
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, 07 Jun 2017 23:57:19 -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

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      | 178 ++++++++++++++++--------
 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(+), 158 deletions(-)

-- 
2.1.4