From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id 8649F1B8C8 for ; Wed, 27 Jun 2018 13:29:31 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id l2-v6so1093164wro.7 for ; Wed, 27 Jun 2018 04:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=HznG8DDwFPVmp21+J/II+pP8wjDqoFd48Y4IdtcdwAM=; b=CKxo6f2FI88vB3nf6QxbmHdtFlyt24YKMgldFb6Cou0t3+gsobcsQRv9/9tcE90L9U lR/gTIaiIcJ4pyZkQDoIM0qrgfUpUND6jn+3iAVSej78K9WrZrtS6FfiHnpjPGr/TaNg zLlWbDj/rRzgplbWL6+azpBWyXjEdef8T5GwW/DZ6QASj90WpnuWLxXxsuiAl3cR18oK jp1oGpK8GvKXO6HrpduwB26IRSS6SKRzWm62Qny6nNad9okEkDrJ0ZhdsMgNvqJ+kfWP 3gnozN0d7nUIRb5z+tK4Ka5tTtQlN79w5fMHdfuBUOoRq5TURImkD7n622dHAhwalYDk q5vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=HznG8DDwFPVmp21+J/II+pP8wjDqoFd48Y4IdtcdwAM=; b=nnV2Bb4IZAu4BU+IXIM0Y1ivLaFSnlju2CngHoSRosymaTYPqwhTN/vrOlOKZgNW42 O+DbWu7XNv4IThrGk1DVRkGz9MSM6gixbwPE8IvSuGZ8wQTvt7ygNQ9JJi/sCcKbAPJW mNgrm6nE8DPaZkCoXIZJLrZ06q54OKCzvokvs4yRk0e8wOyIswiICUZ2hh0irZLKUB+i 2KBb1o8TGKOss5v1YvcQ86DNhQpGKwIC1Hg4Gy4N98+PuZf+o+U+IDHVtQ99sDu0uqbk tn1C8DJQoeY6eu9f/fMDGvgCQxFEKilPvfWIeT1HcYSw3/RafidZwD6/JNeYorwSV8r+ pnCA== X-Gm-Message-State: APt69E3V4Uo08amgHvtGOFfO3vm3LnoGNj+T+YCQVi9ujju7Z7oI/1LB yKngsZspznbta1nkuYPWq1flgg== X-Google-Smtp-Source: AAOMgpc98jSKWPWj4u3xRWU17Y7R5E7mJDU8bOZp7ATSVQnjG0gGHKp8Lco9Kfe1enGDYM4eFbYGAQ== X-Received: by 2002:adf:e0c5:: with SMTP id e5-v6mr4809289wri.199.1530098971053; Wed, 27 Jun 2018 04:29:31 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id q14-v6sm5982048wmd.20.2018.06.27.04.29.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Jun 2018 04:29:30 -0700 (PDT) Date: Wed, 27 Jun 2018 13:29:13 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Bruce Richardson Cc: dev@dpdk.org, Neil Horman , Keith Wiles , Matan Azrad , Shreyansh Jain Message-ID: <20180627112913.xr6ur2ib66eyh6d2@bidouze.vm.6wind.com> References: <20180627105502.GA18792@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180627105502.GA18792@bricha3-MOBL.ger.corp.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) 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 11:29:31 -0000 On Wed, Jun 27, 2018 at 11:55:02AM +0100, Bruce Richardson wrote: > 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 Hi Bruce, Ha, yes, I forgot about that, there is a simple fix, I will update it. I have other fixes as well, a v9 is on its way. -- Gaëtan Rivet 6WIND