From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] bus/vdev: add custom scan hook Date: Fri, 01 Dec 2017 09:42:15 +0100 Message-ID: <1811632.lxrxycaykj@xps> References: <20171201003642.19827-1-thomas@monjalon.net> <8fc8dcb8-c32b-8ec4-8762-b2f2bba09c5c@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: "Tan, Jianfeng" 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) In-Reply-To: <8fc8dcb8-c32b-8ec4-8762-b2f2bba09c5c@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.