From patchwork Wed Sep 19 16:03:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ga=C3=ABtan_Rivet?= X-Patchwork-Id: 44957 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 938D154AE; Wed, 19 Sep 2018 18:04:07 +0200 (CEST) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id D96B14CE4 for ; Wed, 19 Sep 2018 18:04:05 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id s14-v6so6373259wrw.6 for ; Wed, 19 Sep 2018 09:04:05 -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=uEySwAQgAUYR03kxeGJnDZe+KzQu8yIyP2EHj4pWHjA=; b=ANBTjT9EyHRDJNneFiTUA1IkDWtBIsg0OXmGxMgEdWGrLlF3YTP92wIeobkM1bVVs1 SwBgvCVI/77gXm5t6CB8R5nrXXK3phJ0wKrKe7V2kTRoaBmmjTOJ6C/ovn3y+rFcRB+K 7IDcgoW3LXxmxdG3p+a2iDhRrwY0QISr6p+0STxKCnVyVwkhSRaTRaZltobo9oSFAd/z 7tGof11xlAy0ONXQkx91bplk5+RdsIOZiH24JEyPjtMu5Zu4doocrXmBD5k6f9GCGwqV cKHWAigzV/sZXte+PLb8gdRj7ylQIOlAAiC5TLlar110oDg8pMzBQS+yZzi5kD+0SG4I W6FA== 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=uEySwAQgAUYR03kxeGJnDZe+KzQu8yIyP2EHj4pWHjA=; b=InLvrdK0nwiTMlsiAihwImw/f6bksX37QVje+yH53ofbUbySIMxyg6dP1DEVZWZnLV 6fXhJ6rUnecT3a36so1swv6meRPJrJJ/iuNyJMgr3h1n7AnQyFHThtUrm9Y12Xdaes4r 9XrAEucx4lIF43bscK94NNkkTU6xsK4P8ka2D+0UH3dN9uab3qC3r9f2zzOQp9SHTN4B EToCaaXMIRecFIIiAbgNOie0VUCwfummI2ffkA/5Y/OQ0hHqfW4D6YMlVFu+xr06bs5w CSCuWK81Yujd4h5Ysi7FoE5I2zJzHN6HuTg/xVrBjysK/L5cRVkEnLqP7PNvRHMkP2MO osxA== X-Gm-Message-State: APzg51CbwsPwT2s7jluqA7AXmIjAYZvqXUPD6Uj3VD5VFTqw8Z8sgqLH AdFPChIflZc/K9mhxZ2mSa/4CXcDWtE= X-Google-Smtp-Source: ANB0VdagNAiQ8iSQrVVraMIQWUyqRgSzTXVc40F7EBb0NKN6bVIkRSjIljaTX4EdRkVxHqZrxvumsg== X-Received: by 2002:a5d:428a:: with SMTP id k10-v6mr30802683wrq.225.1537373044890; Wed, 19 Sep 2018 09:04:04 -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 x24-v6sm34983671wrd.13.2018.09.19.09.04.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Sep 2018 09:04:03 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet , Shreyansh Jain , Andrew Rybchenko Date: Wed, 19 Sep 2018 18:03:30 +0200 Message-Id: X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 00/13] Implement new devargs framework 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Last release saw the introduction of the new devargs system. To this end, the "class" abstraction was described as well as a common API for querying and declaring devices. This patchset implements the "eth" device class and the query/declaration part of the framework for PCI and vdev buses, enabling a minimal support for the new system. A new testpmd command is added to test device querying. Devargs parsing is extended in the relevant buses to test device declaration. This part uses the new "rte_eth_dev_create" API, introduced last release and used by only two PMDs, for now. The new devargs format is also made available through the new --dev parameter. Next work is to generalize use of new API for eth_dev creation, compatibility layer for -w, -b and --vdev with --dev, and devargs unit test. --- v2: fixed Andrew's and Stephen's remarks, added acks. Gaetan Rivet (13): bus/pci: implement device iteration and comparison bus/pci: add device matching field id bus/vdev: implement device iteration bus/vdev: add device matching field driver ethdev: add private generic device iterator ethdev: register ether layer as a class ethdev: add device matching field name app/testpmd: add show device command bus/pci: pre-process declarative PCI devargs bus/vdev: pre-process declarative vdev devargs bus/pci: process declarative PCI devargs ethdev: process declarative eth devargs eal: add generic dev parameter app/test-pmd/cmdline.c | 54 +++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 24 +++ drivers/bus/pci/Makefile | 3 +- drivers/bus/pci/bsd/pci.c | 5 + drivers/bus/pci/linux/pci.c | 5 + drivers/bus/pci/meson.build | 6 +- drivers/bus/pci/pci_common.c | 6 +- drivers/bus/pci/pci_params.c | 136 +++++++++++++++++ drivers/bus/pci/private.h | 54 +++++++ drivers/bus/vdev/Makefile | 3 +- drivers/bus/vdev/meson.build | 5 +- drivers/bus/vdev/vdev.c | 20 ++- drivers/bus/vdev/vdev_params.c | 112 ++++++++++++++ drivers/bus/vdev/vdev_private.h | 32 ++++ lib/librte_eal/common/eal_common_devargs.c | 4 + lib/librte_eal/common/eal_common_options.c | 36 ++++- lib/librte_eal/common/eal_options.h | 2 + lib/librte_ethdev/Makefile | 4 +- lib/librte_ethdev/ethdev_private.c | 31 ++++ lib/librte_ethdev/ethdev_private.h | 31 ++++ lib/librte_ethdev/meson.build | 4 +- lib/librte_ethdev/rte_class_eth.c | 158 ++++++++++++++++++++ lib/librte_ethdev/rte_ethdev.c | 7 + 23 files changed, 721 insertions(+), 21 deletions(-) create mode 100644 drivers/bus/pci/pci_params.c create mode 100644 drivers/bus/vdev/vdev_params.c create mode 100644 drivers/bus/vdev/vdev_private.h create mode 100644 lib/librte_ethdev/ethdev_private.c create mode 100644 lib/librte_ethdev/ethdev_private.h create mode 100644 lib/librte_ethdev/rte_class_eth.c