From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v5 3/5] eal: add bus pointer in device structure Date: Thu, 04 Oct 2018 11:48:27 +0200 Message-ID: <1618584.QBlmI0xGr4@xps> References: <20180907222727.20521-1-thomas@monjalon.net> <20181003231046.26772-4-thomas@monjalon.net> <20181004093108.hfe7xmaubatg4ooz@bidouze.vm.6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, ophirmu@mellanox.com, qi.z.zhang@intel.com, ferruh.yigit@intel.com, ktraynor@redhat.com, Rosen Xu , Hemant Agrawal , Shreyansh Jain , Stephen Hemminger To: =?ISO-8859-1?Q?Ga=EBtan?= Rivet Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 3C7FA1B13F for ; Thu, 4 Oct 2018 11:48:34 +0200 (CEST) In-Reply-To: <20181004093108.hfe7xmaubatg4ooz@bidouze.vm.6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 04/10/2018 11:31, Ga=EBtan Rivet: > On Thu, Oct 04, 2018 at 01:10:44AM +0200, Thomas Monjalon wrote: > > When a device is added with a devargs (hotplug or whitelist), > > the bus pointer can be retrieved via its devargs. > > But there is no such devargs.bus in case of standard scan. > >=20 > > A pointer to the rte_bus handle is added to rte_device. > > When a device is allocated (during a scan), > > the pointer to its bus is assigned. > >=20 > > It will make possible to remove a rte_device, > > using the function pointer from its bus. > >=20 > > The function rte_bus_find_by_device() becomes useless, > > and may be removed later. > >=20 > > Signed-off-by: Thomas Monjalon >=20 > I agree with this change, but I think this can break ABI of > buses defining their structure by composition with rte_device (e.g. PCI > bus). Have you checked ABI? Yes I forgot it changes the size of the bus structures. I can spin a v6 with a bump of ABI version of the bus drivers, and an additional note in release notes. > Personally I don't care, I prefer a clean framework to a littered lib. >=20 > Acked-by: Gaetan Rivet Adding bus drivers maintainers to get more opinions.