From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com [209.85.128.169]) by dpdk.org (Postfix) with ESMTP id 18661374 for ; Wed, 21 Jun 2017 14:16:04 +0200 (CEST) Received: by mail-wr0-f169.google.com with SMTP id r103so132524048wrb.0 for ; Wed, 21 Jun 2017 05:16:04 -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=hrsR6zBhEMCzXCVMzPocx2+Q9jf7QpavsTGDXivP8DA=; b=EWW6Kxj+1HDw/buXfdAkvFRhj5WC+4ZfR5XWgx60LIhiVNUaz4l6KH5LA+sKKvpG99 Zr0ni9Xz161g5CPONoJ9IHVMl92oqivHq4WpS/4jpS0oqejG63hSfOP5IgGkid/Fuq9h 4tgSGdEPSND6L/rMMsjAMP3IjwCM5nG2DD1bnEjewERL5u6VPlk0jutAkUpsvvheZtuA c1bLOA/eK+pVsfMmIbQLxdLooGVWSQ1ZAMPSBqB0LmczJciDNBIsoxcgk2csSho/V2mq Letx/2TRf7zX+gdb0i6gq7N+0qZyTRiR85he1jdW+WtZOqpGbICzWbmAvj7+PmyJpsms nxNg== 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=hrsR6zBhEMCzXCVMzPocx2+Q9jf7QpavsTGDXivP8DA=; b=KeTLTxyxiUCjm/O/peg7DxwRjwwdU+LMEZCDJlNZy00ybK5EpE9Jorv509yl3VC9Sw hlt4ArpGzI9MVB3muf4AxY0eOzN2nHyqNVpVDeQ2nK+zA4mhPZzJVgNnV3Jq4RcxsG9R aDpYbu8q4E9F9gSfOJDc082l31vozKC6W3SUETIIc9K06co31xDfxAZKD+FGizD1NjcO 7UxzZzSiDiCMwifQw8ejZPsldzMKderAf5+ki/Dx6pBdsrkv0OaoOeGaTuTRsj+wmZ/C wfxMynZ+6tHvL9daz8R7LnRpQ9Y4sS9bYd4xiqRsYCBMtg19MGGKumvoZ1z0hu2vOmQU O/4Q== X-Gm-Message-State: AKS2vOzaYmgB/HlxLl1YiI/YlNBdQ2fadCvXxcWcKUUVZaTdtkNUxZtD ne5oHfnrk8bAKelJh0U= X-Received: by 10.28.46.145 with SMTP id u139mr6448058wmu.5.1498047364509; Wed, 21 Jun 2017 05:16:04 -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 z194sm8867517wmc.31.2017.06.21.05.16.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jun 2017 05:16:03 -0700 (PDT) Date: Wed, 21 Jun 2017 14:15:56 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Thomas Monjalon Cc: dev@dpdk.org, Jan Blunck Message-ID: <20170621121555.GF2344@bidouze.vm.6wind.com> References: <24f6e244a99903f543925067aa52baafe10cfc84.1497999601.git.gaetan.rivet@6wind.com> <3755201.Yc0g0bYsoq@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3755201.Yc0g0bYsoq@xps> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v4 2/9] bus: add device iterator 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, 21 Jun 2017 12:16:05 -0000 On Wed, Jun 21, 2017 at 01:55:39PM +0200, Thomas Monjalon wrote: > 21/06/2017 01:29, Gaetan Rivet: > > +/** > > + * Device comparison function. > > + * > > + * @param dev > > + * Device handle. > > + * > > + * @param data > > + * Data to compare against. > > + * > > + * @return > > + * 0 if the device matches the data. > > + * !0 if the device does not match. > > + * <0 if ordering is possible and the device is lower than the data. > > + * >0 if ordering is possible and the device is greater than the data. > > + */ > > +typedef int (*rte_dev_cmp_t)(const struct rte_device *dev, const void *data); > > data is really abstract. > Maybe a comment is missing to explain that data is better specified > in bus implementations? > I'm not sure it is better specified in rte_bus though :). However, the usage can be understood there, why it exists in the first place. I think bus iterators could benefit some more explanation about the why. > Why not implement it for PCI? > I sent this series with only the patches from Jan, initially in the version he solely developed. Only afterward did I fix a few bugs, reworked a few APIs. As such, two other series complete this patchset: [dpdk-dev] [PATCH v3] pci: implement find_device bus operation http://dpdk.org/ml/archives/dev/2017-June/067485.html And [dpdk-dev] [PATCH v3 0/3] eal: complete attach / detach support http://dpdk.org/ml/archives/dev/2017-June/067516.html It might make sense to merge all three series together. They are conceptually linked very closely. The only reason I did not do so at first was because I was unsure about who would take responsibility for the attach / detach patchset, and if it had not be me I did not want to put undue responsibility of my patches on whomever would. But that point is moot now. -- Gaëtan Rivet 6WIND