From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 43B7120CD2; Wed, 21 Jun 2017 07:55:40 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 21 Jun 2017 07:55:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=sAtjHiexcELTUXy dYQqnoJaI8Uk/qa93hA46hhGZjqg=; b=TrUbcU+EBLviLC+cbei5MlO9oZUW+fQ 9XMo53ov5EqEPNsXzUFCgttcuphhAct80SMM/71AS8IgzxV0TsfvTXrp96yZpn7N 0LyX28VTnoAxImUmA90oit383cC5iWREEnVx0DLKD/tj47SjLE7t8NEdgfT+GTEy pc8NXOmWmoD8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=sAtjHiexcELTUXydYQqnoJaI8Uk/qa93hA46hhGZjqg=; b=PX8c/fsr sXDwPlHWXzmYtQHOp63eZ0FeI4Sru8if5HdU5/WfBs/n8fMaGUXJ9nfu7ox11x3S Ep2HMGvn6IWa0IeU/EufS/wO5UzTeblsWsm+ogHaSznsLu3gnD7U355ccuoF99rF vau+NEpgtZiRVNp+cLxF7xSnFLKRr93Gnk3SZ4FTDj8w3HSvFD4yut8TYkVqXTRl ua0emhO0o8vtlS9NytIx/tMxbajw9t8fmi7lqA1s6V/Iy0QzQYQnEfuY29jkZ/+X b25uAFElsPxvRaIwvaJkwRDb+XGhcPlkbmfs6HrIvjHjr5MEFFuPOH78BrMzcuf3 +wXK8UkKhg4naQ== X-ME-Sender: X-Sasl-enc: L1vqiYOhvWp5z1SD+99jHJlPnbMAL9QtfKJK0XojBdc0 1498046139 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id F059B7E71B; Wed, 21 Jun 2017 07:55:39 -0400 (EDT) From: Thomas Monjalon To: Gaetan Rivet Cc: dev@dpdk.org, Jan Blunck Date: Wed, 21 Jun 2017 13:55:39 +0200 Message-ID: <3755201.Yc0g0bYsoq@xps> In-Reply-To: <24f6e244a99903f543925067aa52baafe10cfc84.1497999601.git.gaetan.rivet@6wind.com> References: <24f6e244a99903f543925067aa52baafe10cfc84.1497999601.git.gaetan.rivet@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 11:55:40 -0000 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?