From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v5 5/7] bus: add helper to find a bus from a device name Date: Wed, 28 Jun 2017 19:03:01 +0200 Message-ID: <2359359.ae4fqFO3lF@xps> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Gaetan Rivet To: Jan Blunck 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) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.