From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 9B3921D90 for ; Mon, 4 Dec 2017 09:08:21 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2017 00:08:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,358,1508828400"; d="scan'208";a="155809354" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga004.jf.intel.com with ESMTP; 04 Dec 2017 00:08:20 -0800 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 4 Dec 2017 00:08:19 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 4 Dec 2017 00:08:19 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.152]) with mapi id 14.03.0319.002; Mon, 4 Dec 2017 16:08:18 +0800 From: "Tan, Jianfeng" To: Thomas Monjalon CC: "dev@dpdk.org" Thread-Topic: [PATCH] bus/vdev: add custom scan hook Thread-Index: AQHTajyCdOkt7+n2M0+lLiXjXnL146Mt+3IA//+qjICABSiJ0A== Date: Mon, 4 Dec 2017 08:08:17 +0000 Message-ID: References: <20171201003642.19827-1-thomas@monjalon.net> <8fc8dcb8-c32b-8ec4-8762-b2f2bba09c5c@intel.com> <1811632.lxrxycaykj@xps> In-Reply-To: <1811632.lxrxycaykj@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Mon, 04 Dec 2017 08:08:22 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Friday, December 1, 2017 4:42 PM > To: Tan, Jianfeng > Cc: dev@dpdk.org > Subject: Re: [PATCH] bus/vdev: add custom scan hook >=20 > Hi, >=20 > 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? >=20 > Yes, the application can use it but it can also be used by a DPDK > driver or library. >=20 > > If so, why not just constructing them in the parameters before passing > > to rte_eal_init? >=20 > 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= . >=20 > > > 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 alread= y > > do this? >=20 > Yes we can already update the devargs list. > But this hook will help to do it on hotplug events. Do you mean, we will have the udev monitoring framework, and after monitori= ng the uevent (hotplug), we want to automatically add a vdev (tap) for that= detected physical device which is managed by kernel? Considering the scan hook is added in bus->parse(), how this can happen aut= omatically? Thanks, Jianfeng