From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 10D3F2B9E for ; Fri, 1 Dec 2017 09:42:17 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7607720A8E; Fri, 1 Dec 2017 03:42:17 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 01 Dec 2017 03:42:17 -0500 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; s=mesmtp; bh=AEvF52BHnk58k9+ggF8ubLa8Hv 3SBg6J6RZs76OvXLQ=; b=o0PnEAf5vyA3rq2kpKSeqlM5Pevg3WvQtAAZTe0vF1 xCTc3Q8jYmRSenfeKpjAJuNMFiyNAW2VxdzB3XPOCrN0GM3FznYzVHu/xK6XWVqN bj3ClcHthDEDUrnSraZ0s9eAvj3RLUXynLHUEPNWVWPzGZbRDp/9W+DAOWUjylIv c= 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; s=fm1; bh=AEvF52 BHnk58k9+ggF8ubLa8Hv3SBg6J6RZs76OvXLQ=; b=QGuZdX8geo8I2ShTH+Sr8L o5O9tFN/D1N4c6BiiOTIx4o6YrPqpzejEyEb1phJytWSAAWStxbyv+LUlGvdOay+ 3KakCrE261GukI6MJfJJHL+3kJtYyU087C4iJCAcbhh1aAZsLIuXDhBDPpaaoMi2 8/MHoeSIh5fIEJ5omtuqSKCg8ifN5H+vyIK5uCLU4RaL8HMlrCOBNNhdr6xZJWyj 0Gr1cvNedEx9VkdUyiQxLMP/MGrzwKzXRVJVh7hLKeJ4Cxu23DqEe8oJ58Prmm8d tGIIsW/+MjgLgMz138TLwIIhPoNOCK8XDrRcqTj5xVs6idebfe7MKWdJCO8QGC2g == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 26C337E1D9; Fri, 1 Dec 2017 03:42:17 -0500 (EST) From: Thomas Monjalon To: "Tan, Jianfeng" Cc: dev@dpdk.org Date: Fri, 01 Dec 2017 09:42:15 +0100 Message-ID: <1811632.lxrxycaykj@xps> In-Reply-To: <8fc8dcb8-c32b-8ec4-8762-b2f2bba09c5c@intel.com> References: <20171201003642.19827-1-thomas@monjalon.net> <8fc8dcb8-c32b-8ec4-8762-b2f2bba09c5c@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] bus/vdev: add custom scan hook 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, 01 Dec 2017 08:42:18 -0000 Hi, 01/12/2017 06:48, Tan, Jianfeng: > Hi Thomas, > > Please help us to understand why we need this. > > > On 12/1/2017 8:36 AM, Thomas Monjalon wrote: > > The scan callback allows to spawn a vdev automatically > > given some custom scan rules. > > These two new APIs (rte_vdev_add_custom_scan and > rte_vdev_remove_custom_scan) are called by applications? Yes, the application can use it but it can also be used by a DPDK driver or library. > If so, why not just constructing them in the parameters before passing > to rte_eal_init? It is not only for initialization because it will also work when we will have some hotplug mechanism where the scan is run during run-time. > > It is especially useful to create a TAP device automatically > > connected to a netdevice as remote. > > It sounds like an use case. Without this patch, I suppose we can already > do this? Yes we can already update the devargs list. But this hook will help to do it on hotplug events.