From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id A520939EA for ; Fri, 30 Jun 2017 11:20:21 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP; 30 Jun 2017 02:20:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,285,1496127600"; d="scan'208";a="280553275" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.28]) by fmsmga004.fm.intel.com with SMTP; 30 Jun 2017 02:20:18 -0700 Received: by (sSMTP sendmail emulation); Fri, 30 Jun 2017 10:20:17 +0100 Date: Fri, 30 Jun 2017 10:20:17 +0100 From: Bruce Richardson To: =?iso-8859-1?Q?Ga=EBtan?= Rivet Cc: Thomas Monjalon , Jan Blunck , dev@dpdk.org, shreyansh.jain@nxp.com Message-ID: <20170630092017.GA18672@bricha3-MOBL3.ger.corp.intel.com> References: <20170629182206.1072-1-jblunck@infradead.org> <20170629182206.1072-14-jblunck@infradead.org> <2830134.KdhWyS32Ir@xps> <20170630091141.GM13355@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170630091141.GM13355@bidouze.vm.6wind.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.8.1 (2017-04-11) Subject: Re: [dpdk-dev] [PATCH v7 13/15] eal: add hotplug add/remove functions 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: Fri, 30 Jun 2017 09:20:22 -0000 On Fri, Jun 30, 2017 at 11:11:42AM +0200, Gaëtan Rivet wrote: > 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. > +1 for this option.