From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 86F9A4C74 for ; Thu, 22 Mar 2018 12:31:56 +0100 (CET) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Mar 2018 04:31:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,344,1517904000"; d="scan'208";a="213652447" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.52]) by fmsmga006.fm.intel.com with SMTP; 22 Mar 2018 04:31:52 -0700 Received: by (sSMTP sendmail emulation); Thu, 22 Mar 2018 11:31:51 +0000 Date: Thu, 22 Mar 2018 11:31:51 +0000 From: Bruce Richardson To: Gaetan Rivet Cc: dev@dpdk.org Message-ID: <20180322113151.GA608@bricha3-MOBL.ger.corp.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v2 00/18] Device querying 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: Thu, 22 Mar 2018 11:31:57 -0000 On Wed, Mar 21, 2018 at 06:15:21PM +0100, Gaetan Rivet wrote: > This patchset introduces a new EAL API for querying devices, > filtered by arbitrary properties. > > The following elements are introduced to this end: > > * A new object, "rte_class", is used to describe > the device class abstraction layer (eth, crypto, ...). > > * Both rte_bus and rte_class now offer a way to > list their devices and filter the result > using locally defined properties. > > * The rte_dev API now has an rte_dev_iterator, which > is the way for the user to define the device filter > and iterate upon the resulting set. > > As an example, the "eth" device class is implemented. > > Additionally, the device filters for > > + rte_bus_pci > + rte_bus_vdev > + rte_class_eth > > are implemented and can be used with some > properties each, to show how to extend those. > > Some example of filters: > > "bus=pci/class=eth" > "bus=pci" > "class=eth" > "class=eth,name=net_ring0" > "bus=pci,id=00:00.0" > "bus=vdev,driver=net_ring" > > --- > > v2: > > * Reworked the dev_iterate callback to simplify > its implementation. > > Now dev_iterate implementation do not need to learn > about the intricacies of the rte_dev_iterator. > The rte_dev_iterator is managed purely by the > rte_dev_iterator_next function. Buses and classes then > do not have to care about settings things right. > > Additionally, dev_iterate implementations do not > have to sanitize their dev string anymore, they > are prepared by the rte_dev layer prior, which also > reduces the number of dynamic allocations. > > Gaetan Rivet (18): > eal: introduce dtor macros > eal: introduce device class abstraction > eal/class: register destructor > eal: add lightweight kvarg parsing utility > eal/dev: add device iterator interface > eal/class: add device iteration > eal/bus: add device iteration > eal/dev: implement device iteration initialization > eal/dev: implement device iteration > bus/pci: fix find device implementation > bus/pci: implement device iteration and comparison > bus/pci: add device matching field id > bus/vdev: fix find device implementation > bus/vdev: implement device iteration > bus/vdev: add device matching field driver > ethdev: register ether layer as a class > ethdev: add device matching field name > app/testpmd: add show device command > > app/test-pmd/cmdline.c | 52 ++++++ > drivers/bus/pci/Makefile | 2 +- > drivers/bus/pci/pci_common.c | 77 ++++++++- > drivers/bus/pci/rte_bus_pci.h | 3 + > drivers/bus/vdev/Makefile | 2 +- > drivers/bus/vdev/rte_bus_vdev.h | 3 + > drivers/bus/vdev/vdev.c | 66 +++++++- > lib/Makefile | 2 +- > lib/librte_eal/bsdapp/eal/Makefile | 1 + > lib/librte_eal/common/Makefile | 2 +- > lib/librte_eal/common/eal_common_class.c | 62 +++++++ > lib/librte_eal/common/eal_common_dev.c | 255 +++++++++++++++++++++++++++++ > lib/librte_eal/common/eal_private.h | 34 ++++ > lib/librte_eal/common/include/rte_bus.h | 1 + > lib/librte_eal/common/include/rte_class.h | 127 ++++++++++++++ > lib/librte_eal/common/include/rte_common.h | 23 +++ > lib/librte_eal/common/include/rte_dev.h | 95 +++++++++++ > lib/librte_eal/linuxapp/eal/Makefile | 1 + > lib/librte_eal/rte_eal_version.map | 4 + > lib/librte_ether/Makefile | 3 +- > lib/librte_ether/rte_class_eth.c | 79 +++++++++ > 21 files changed, 875 insertions(+), 19 deletions(-) > create mode 100644 lib/librte_eal/common/eal_common_class.c > create mode 100644 lib/librte_eal/common/include/rte_class.h > create mode 100644 lib/librte_ether/rte_class_eth.c > Not seeing any meson.build files in the list above, but plenty of makefiles. :-)