From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id A6A2C1BB92 for ; Wed, 27 Jun 2018 12:55:07 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2018 03:55:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,278,1526367600"; d="scan'208";a="240713295" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.107]) by fmsmga005.fm.intel.com with SMTP; 27 Jun 2018 03:55:03 -0700 Received: by (sSMTP sendmail emulation); Wed, 27 Jun 2018 11:55:03 +0100 Date: Wed, 27 Jun 2018 11:55:02 +0100 From: Bruce Richardson To: Gaetan Rivet Cc: dev@dpdk.org, Neil Horman , Keith Wiles , Matan Azrad , Shreyansh Jain Message-ID: <20180627105502.GA18792@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.10.0 (2018-05-17) Subject: Re: [dpdk-dev] [PATCH v8 00/21] 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: Wed, 27 Jun 2018 10:55:08 -0000 On Tue, Jun 26, 2018 at 06:56:03PM +0200, 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. > > v3: > > * Introduced central constructor priority list. > * Removed lightweight kvarg parsing utility, > using librte_kvargs instead. > * Reversed dependencies of librte_kvargs and > librte_eal. > * Fixed a few bugs. > * @Bruce: I have noted the request for meson support. > I will install it and attempt it once the bulk of the work is done. > > v4: > > * Fixed a few bugs, added relevant acks, > fixed some typos. > * Made each matching functions actually check for a proper > list of accepted properties. > * rte_kvargs now includes rte_eal directly and keeps rte_log. > * added generic string comparison function to rte_kvargs, > as some kind of comparison should probably be shared by many layers. > > v5: > > * Rebased on master > * Use strcspn instead of custom function. > * Introduce private generic rte_eth_dev iterator. > This could be generalized to other iterators > (port_next, owner_id-aware, etc). > * Attempted to support meson.build. > Got lost in the implicit variables declared > when inversing dependencies between kvargs and EAL. > Removed anything related to meson. > * Postponed genericization of work from > device query to device declaration. > Much bigger than anticipated, will let this > part get in first and iterate over it. > > v6: > > * Rebased on master > * Introduce RTE_PRIORITY_LAST, to explicitly set > the lowest constructor priority. > * Fix copyright notice for eth_privage.* files. > > v7: > > * Rebased on master > * Fix rte_kvargs_strcmp return value. > * Fix layer parsing error > devstr "bus=pci/onemorelayer" now tells > that the additional layer is not recognized. > > v8: > > * Rebased on master > * Cleaned kvargs use: introduced > a new parser function, that simplifies > using the library for DPDK devargs. > * Refactored devargs parsing in a single > function within rte_devargs. > This function is useful both for rte_dev > parsing its iterator, and for rte_devargs > parsing --dev parameters (not yet implemented). > * A few small bugfixes. > Hi Gaetan, did you test building with shared library builds? I get build failures for shared libs after applying this set. It appears you may still have a circular dependency between EAL and kvargs libs. /Bruce