From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet Subject: Re: [PATCH v7 13/15] eal: add hotplug add/remove functions Date: Fri, 30 Jun 2017 11:11:42 +0200 Message-ID: <20170630091141.GM13355@bidouze.vm.6wind.com> References: <20170629182206.1072-1-jblunck@infradead.org> <20170629182206.1072-14-jblunck@infradead.org> <2830134.KdhWyS32Ir@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Jan Blunck , dev@dpdk.org, shreyansh.jain@nxp.com To: Thomas Monjalon Return-path: Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) by dpdk.org (Postfix) with ESMTP id C191C3772 for ; Fri, 30 Jun 2017 11:11:50 +0200 (CEST) Received: by mail-wr0-f180.google.com with SMTP id c11so201163366wrc.3 for ; Fri, 30 Jun 2017 02:11:50 -0700 (PDT) Content-Disposition: inline In-Reply-To: <2830134.KdhWyS32Ir@xps> 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 Fri, Jun 30, 2017 at 11:06:03AM +0200, Thomas Monjalon wrote: > 29/06/2017 20:22, Jan Blunck: > > /** > > + * Hotplug add a given device to a specific bus. > > + * > > + * @param busname > > + * The bus name the device is added to. > > + * @param devname > > + * The device name. Based on this device name, eal will identify a driver > > + * capable of handling it and pass it to the driver probing function. > > + * @param devargs > > + * Device arguments to be passed to the driver. > > + * @return > > + * 0 on success, negative on error. > > + */ > > +int rte_eal_hotplug_add(const char *busname, const char *devname, > > + const char *devargs); > > After the hotplug, we may need to get the rte_device. > Should we add a struct **rte_device as parameter, > or should we add a helper function to get the rte_device > from busname and devname? Also possible: return a struct *rte_device and set rte_errno on error. -- Gaëtan Rivet 6WIND