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 5B443374 for ; Wed, 21 Jun 2017 14:12:12 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A22F4209A1; Wed, 21 Jun 2017 08:12:12 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 21 Jun 2017 08:12:12 -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=qPBhZQx7p4W8DfT we2uuaO+v2YJlUBp0dOuY5puOto4=; b=IkdJj7WgBrh935rtW/KLT074coKmjWS WXnNhw7Ih8wK96VZqiVbmpU8bqsXyC5YnrkKWPVVVeAoLiI2ul4gwubt/Um05JYT JdsgNCaUOfsztSNWIKF57THwXCs9w55UNJ7qmsE+Y0eUyngZPcHubxbM5tyoZCcS 2WD4V5wQdZ5g= 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=qPBhZQx7p4W8DfTwe2uuaO+v2YJlUBp0dOuY5puOto4=; b=f3d3W7mG 1raMRvBh5bKuxroiGJ4aoDYw//xPtbIqTCLL6iicQcgVDe6EB4xJYom26ftSae4L nwWvjw3GBPq3SXKV0prXWqaOWaR2zLoRpe90S2E0yahGb/I+PE3qf9yy/fQmFNgJ JfqMaP6f5uTvvlEQDuR//BnA3/rfEbdvjaAswb0OwUWYl9IMyD86tgNqef2c/Kde W8DRmuORduZiNRzg1tTKH9pcijymkUcU2q5zH+nfYAaEHeWBBluZiNRaj/Id1vAN VrqGUBjHW1cyLxm8jMKsvBzfnp8Xk8ijWWjxerI+UM1n+RAbARBedgQ1/48rSpqu EsZ6nURR4WJrvA== X-ME-Sender: X-Sasl-enc: 9tl/3JJA+vAeleWxvTflwSnHXxCAHvsM13Wd5VgYS74Y 1498047132 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 52D2F7E755; Wed, 21 Jun 2017 08:12:12 -0400 (EDT) From: Thomas Monjalon To: Gaetan Rivet Cc: dev@dpdk.org, Jan Blunck Date: Wed, 21 Jun 2017 14:12:11 +0200 Message-ID: <2233259.EIshgydRbt@xps> In-Reply-To: <7dcba05e933f8779a2fdc9bba0ecea7a25a0848f.1497999601.git.gaetan.rivet@6wind.com> References: <7dcba05e933f8779a2fdc9bba0ecea7a25a0848f.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 1/9] bus: add bus iterator to find a particular bus 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:12:13 -0000 21/06/2017 01:29, Gaetan Rivet: > +/** > + * Bus iterator to find a particular bus. > + * > + * If the callback returns zero this function will stop iterating over > + * any more buses. > + * If the start parameter is non-NULL, the comparison will only be determined > + * past this element. > + * > + * @param cmp > + * Comparison function. > + * > + * @param data > + * Data to pass to cmp callback > + * > + * @param start > + * Starting point for the iteration. > + * > + * @return > + * A pointer to a rte_bus structure or NULL in case no bus matches > + */ > +struct rte_bus *rte_bus_find(rte_bus_cmp_t cmp, > + const void *data, > + const struct rte_bus *start); > What will be the typical usage? find by name? Does it make sense to implement a helper for find_by_name? Or is it used only for rte_bus_find_by_device()?