From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4 2/9] bus: add device iterator Date: Wed, 21 Jun 2017 13:55:39 +0200 Message-ID: <3755201.Yc0g0bYsoq@xps> References: <24f6e244a99903f543925067aa52baafe10cfc84.1497999601.git.gaetan.rivet@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Jan Blunck To: Gaetan Rivet Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 98C1E532C for ; Wed, 21 Jun 2017 13:55:40 +0200 (CEST) In-Reply-To: <24f6e244a99903f543925067aa52baafe10cfc84.1497999601.git.gaetan.rivet@6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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? Why not implement it for PCI?