From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 7929F29CA for ; Wed, 28 Jun 2017 19:03:03 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 137EB21E10; Wed, 28 Jun 2017 13:03:03 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 28 Jun 2017 13:03:03 -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=LFNwkg4xY0CSR+l HTr3C65wB+968g+4k87+ewjMpF/s=; b=CnH37WTF5tI/dxZDniiDkRHeEnQH6rc ZeyRgEQ50MC1Ei8wEWzxU/oMNnRMQqGt3UQM1L+FKyKvKcm00daGvNBcETJiSBJM B6RId1eZMdJbC6a6zc4EJTMJBlQJ4srMcW0RUKVQfxl99NRvQy4KcUhNVSn+LyLB huz3meUp9wUA= 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=LFNwkg4xY0CSR+lHTr3C65wB+968g+4k87+ewjMpF/s=; b=U5g9iFuB nYaYOFTrTCS+WU+ThFWc/ZhMlEu2IGyXcC5ou2TqvjDqayOy3lY/6vrrOfSo1dw9 1QCD+DEnTeUTO3ev+6FoIMn1EQvoOkGziu39n29wrUaWCmrTLbyLmPzDHlLBoJiZ 7qkyhmUOnO4BkOebqYauv5KkPezDK4Ww0+DajLMT+YzREfurPCoQDsoI5hZPbG9m s8DGkLYhtHvA84INzDVP0Pgv4f+s86DkmACssH1F7YI7rX933oc6NCZvyZX2vRr7 caDPTEkMlpcQbuaXPgKh+jW9EbazXuIggzsaTDVRHd+KYu/ojQgcO2vubHnVOVoq jxgEONS2KprZcw== X-ME-Sender: X-Sasl-enc: Ocs3qPDT/8yjJndEWgCQJZaXJu3Vgzlwphtj/MyLP2Ri 1498669382 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id BC4B824253; Wed, 28 Jun 2017 13:03:02 -0400 (EDT) From: Thomas Monjalon To: Jan Blunck Cc: dev@dpdk.org, Gaetan Rivet Date: Wed, 28 Jun 2017 19:03:01 +0200 Message-ID: <2359359.ae4fqFO3lF@xps> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v5 5/7] bus: add helper to find a bus from a device name 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, 28 Jun 2017 17:03:03 -0000 27/06/2017 20:55, Jan Blunck: > On Wed, Jun 21, 2017 at 1:30 AM, Gaetan Rivet wrote: > > /** > > + * Find a bus capable of identifying a device. > > + * > > + * @param str > > + * A device identifier (PCI address, virtual PMD name, ...). > > + * > > + * @return > > + * A valid bus handle if found. > > + * NULL if no bus is able to parse this device. > > + */ > > +struct rte_bus *rte_bus_from_dev(const char *str); > > I still don't agree with this. The bus name should be passed > explicitly by the user of the API. > > NAK. Please explain why you think the bus name should be explicit. If the bus is ambiguous, it can be explicited by the user. I see some good benefits in being tolerant with the bus/device representation. It provides a smooth transition to the bus model.