From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SDZ0oaK+Gp1COLAfELfm7bcOByyeN5WXJ+mDuylewQY=; b=Mvxw7nEdg+9VadqZNtJPtpyDtxmY5V9udzUILxeM1C/TvGVeprbfp0VgwlUPQF0XL5 JIb14FLSN6fRzLvSdA1btqtPaqQRAF59XZVqY12rP2sMXyokDrMbXZp98j4hIoTQg4N3 nvToCk+x3cSyERKTXqgyEHOglPYfUG0OqvNV9yU3aIolW0mQp24rg6Uu5CKqMX82Zp+u qjc6RBB19VwY9c1SL1dFHJog40MxEd+r8qIl3nF9w+Hhgopac8qKcHr+GpQM9rKFC0NE p+rL82fUjgky5KaBeAbSQ9R6zO0FAuvr3S6CUS5zUIdzeq0h1l0ejcB5yzAwW612mP/g ebfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SDZ0oaK+Gp1COLAfELfm7bcOByyeN5WXJ+mDuylewQY=; b=YV2nYT7NPOfeBVkCthvyYc/9ahoMNxdf+M8IN9tZvVOyH2pr9k/jDOXhs4Dnr/jBPI cNM/UKQPni/nsYzR5NeZs6kL+zTL3lUZVNG9dYmqtvzBSxamn6EHkHkchUX6L018My/+ T7+gp2697TFT5381uLQC2L4KWYjxZs1aBlZXClz//N17gA3h3jZb8OE7TQdW6IvePMUK gdE7o1bL40RLQcNCfeVdDC4HD3iQSF0VdA2p89QmCN77DQIrKGVTyTAPrDTNvyWj8rTz bk35JMPUJJw7tKy9jS/N5WHXF5Y6IO4Pzi7uynP6+aKqkMXNQnxfPzYzFi4dwt56an0E cAtw== X-Gm-Message-State: AIkVDXKefSgjpNNi99daZBuSTzV2l6jBB7HarIEhhWBCfune7SQq3FLt1A17PaDGL1kd5w== X-Received: by 10.84.162.204 with SMTP id o12mr6839522plg.17.1484071509016; Tue, 10 Jan 2017 10:05:09 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id h185sm7353213pfg.90.2017.01.10.10.05.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jan 2017 10:05:08 -0800 (PST) Date: Tue, 10 Jan 2017 10:05:02 -0800 From: Stephen Hemminger To: Jan Blunck Cc: dev@dpdk.org, Stephen Hemminger Message-ID: <20170110100502.5b55059b@xeon-e3> In-Reply-To: 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 Subject: Re: [dpdk-dev] [PATCH 8/8] eal: VMBUS infrastructure 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: Tue, 10 Jan 2017 18:05:10 -0000 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 ...