From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id F303A2BE1 for ; Wed, 28 Jun 2017 13:44:42 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7F1E520769; Wed, 28 Jun 2017 07:44:42 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 28 Jun 2017 07:44:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=OuNdRtK+dTWLlTn 08JHKt3SYKuFLIBX+kFFNQKDCR/U=; b=ISQZsxiJvOZj9mNKlRqpC1Kh9+bUwKA rYJvvY2Hh54bbHvHsVYMpChTwD3GzpTE7Q0S4lBcarga1Yuj25n/UaqVWQSyq2sh tpRIBILjGpB4CdhdKgaRAXV8DVdaiQQBmDbdE7sDoR44j2wFo509Z1TjmrMwuqyz XxFip3sWhVjw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=OuNdRtK+dTWLlTn08JHKt3SYKuFLIBX+kFFNQKDCR/U=; b=QuF82NJC TyVClr7P9+4mUhi/rw0wByynIirit1Oy7EYnHLf80ENCtijIKhXPHVPE3B5QyB1m c5NfFJE9+h6hXamW/YjRJNpqr0HkfUfLuzR8uBdKutLFVvbXqW2gTW98Vna4KepG mmUttbqlqvpxmNOWY2ykaG2YEjjon1tS8AWEWZEVe6LaFfwWszyaIF8NORCowmRu wVbDUcFWMXPHWowcybXJ7P56hyFtEC+9VMMr+VlwkzjONNYw1pu/5KnUo14DaOhq zs1n3AGOotRB7wDaAX05cdXJXSszEBJUc+nmhCCc5eBxngUn5ovw9oqyAOE4R09k XyHtH2ByIb3IfQ== X-ME-Sender: X-Sasl-enc: J4aoOcnjQ9bbWXMAkO00mZowvQfw9JGlloJJ91eoQ+ij 1498650282 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 3318E7E81C; Wed, 28 Jun 2017 07:44:42 -0400 (EDT) From: Thomas Monjalon To: Jan Blunck Cc: dev@dpdk.org, Gaetan Rivet Date: Wed, 28 Jun 2017 13:44:41 +0200 Message-ID: <4639959.eMbdazoqpE@xps> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v6 05/11] bus: introduce hotplug functionality 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: Wed, 28 Jun 2017 11:44:43 -0000 27/06/2017 21:03, Jan Blunck: > On Tue, Jun 27, 2017 at 6:11 PM, Gaetan Rivet wrote: > > --- a/lib/librte_eal/common/include/rte_bus.h > > +++ b/lib/librte_eal/common/include/rte_bus.h > > /** > > + * Implementation specific probe function which is responsible for linking > > + * devices on that bus with applicable drivers. > > + * The plugged device might already have been used previously by the bus, > > + * in which case some buses might prefer to detect and re-use the relevant > > + * information pertaining to this device. > > + * > > + * @param da > > + * Device declaration. > > + * > > + * @return > > + * The pointer to a valid rte_device usable by the bus on success. > > + * NULL on error. rte_errno is then set. > > + */ > > +typedef struct rte_device * (*rte_bus_plug_t)(struct rte_devargs *da); > > Shouldn't this be orthogonal to unplug() and take a rte_device. You > should only be able to plug devices that have been found by scan > before. Plugging a device that has been scanned before is a special case. In a true hotplug scenario, we could use this plug function passing a devargs. I don't see any issue passing rte_devargs to plug and rte_device to unplug.