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 31EB85599 for ; Wed, 21 Jun 2017 14:21:47 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7E5E22098C; Wed, 21 Jun 2017 08:21:47 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 21 Jun 2017 08:21:47 -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=ZkcF3Buhp/yGfuh LET09xEvm+uMWp4TxGsOlgeyEin0=; b=XijV4ZBX15LVsOD5hWrkoPU+PaJx8Za 05D+gKIPgBdNGH33ls+LDSchI1fuc+cmejeVhnJlB95dCrmN1821KNRtU/1uBBIV FMnR9Bo6R0wkOnEjB5ma9Qn25qkONx/5Ft0gGBfi5J5Sr8HbB1yKJl4LwU7YkBNH 6fQ8HpEeeY3o= 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=ZkcF3Buhp/yGfuhLET09xEvm+uMWp4TxGsOlgeyEin0=; b=fHg3M5R8 yT3fOdtrJdGy+Ix0StVxy1idqrO8buTZ1HFs4kq8W2Ht4DJkkYHqeCvH46BxQpBk E+nQH4Z35b7vVaHG3XQhtfRQeUdn6Cc27tOSrDIcZf6oNGqzU7DL1ledPhrv1Cjb fXAS5yH5pC/YldJ6rnSsu4yV6Nv4JgceZvkNwtPKVEwEccDbjfAQ5GyHinbdKjE3 RQyJ+kNXcyqVSdhzangNrKgbe2TnLos5maz3kKfpZlWc+Ed1C5KzYOePvZY+9Dza PF9FRBus3J3mRadHht6u1gC/jI3r0OCqUqTrzPJL8CElv7m/twYYeUiG60quabVV julaawJwbDjLrg== X-ME-Sender: X-Sasl-enc: o7ZhureI7YSNVSOJCzWHJUK/4AaDEpCzSDgWVSbaNavY 1498047707 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 3139D7E263; Wed, 21 Jun 2017 08:21:47 -0400 (EDT) From: Thomas Monjalon To: Gaetan Rivet Cc: dev@dpdk.org, Jan Blunck Date: Wed, 21 Jun 2017 14:21:46 +0200 Message-ID: <1984869.kcXMTlSesr@xps> In-Reply-To: <82d275852b7179929081d005e62d458283d7b304.1497999601.git.gaetan.rivet@6wind.com> References: <82d275852b7179929081d005e62d458283d7b304.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 4/9] bus: add bus helper iterator to find a particular device 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:21:48 -0000 21/06/2017 01:29, Gaetan Rivet: > /** > + * Bus iterator to find a particular device. It should be said that it is iterating over every registered buses. > + * > + * If the callback returns non-zero this function will stop iterating over any > + * more buses and devices. To continue a search the device of a previous search > + * is passed via the start parameters. > + * > + * @param start > + * Start device of the iteration. > + * > + * @param cmp > + * Callback function to check device. > + * > + * @param data > + * Data to pass to match callback. > + * > + * @return > + * A pointer to a rte_bus structure or NULL in case no bus matches. > + */ > +struct rte_device * > +rte_bus_find_device(const struct rte_device *start, > + rte_dev_cmp_t cmp, const void *data); The order of the parameters is different of rte_bus_find(): struct rte_bus *rte_bus_find(rte_bus_cmp_t cmp, const void *data, const struct rte_bus *start);