From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 8/8] eal: VMBUS infrastructure Date: Tue, 10 Jan 2017 10:05:02 -0800 Message-ID: <20170110100502.5b55059b@xeon-e3> References: <20170107181756.1944-1-sthemmin@microsoft.com> <20170107181756.1944-9-sthemmin@microsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Stephen Hemminger To: Jan Blunck Return-path: Received: from mail-pf0-f174.google.com (mail-pf0-f174.google.com [209.85.192.174]) by dpdk.org (Postfix) with ESMTP id 731A35320 for ; Tue, 10 Jan 2017 19:05:09 +0100 (CET) Received: by mail-pf0-f174.google.com with SMTP id f144so41117374pfa.2 for ; Tue, 10 Jan 2017 10:05:09 -0800 (PST) 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" On Tue, 10 Jan 2017 18:27:31 +0100 Jan Blunck wrote: > > +#ifdef RTE_LIBRTE_HV_PMD > > +/** > > + * @internal > > + * Wrapper for use by vmbus drivers as a .probe function to attach to a ethdev > > + * interface. > > + */ > > +int rte_eth_dev_vmbus_probe(struct rte_vmbus_driver *vmbus_drv, > > + struct rte_vmbus_device *vmbus_dev); > > + > > +/** > > + * @internal > > + * Wrapper for use by vmbus drivers as a .remove function to detach a ethdev > > + * interface. > > + */ > > +int rte_eth_dev_vmbus_remove(struct rte_vmbus_device *vmbus_dev); > > +#endif > > I don't think that replicating the PCI probe/remove wrappers is the > right thing to do. To me it looks like this should move into the > rte_vmbus_driver's probe function instead. That way the ethdev header > can decoupled from the low-level device implementations. With a real bus model. There would be registration of busses. And the probe would be: foreach bus foreach device on bus ...