From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jianfeng.tan@intel.com>
Received: from mga02.intel.com (mga02.intel.com [134.134.136.20])
 by dpdk.org (Postfix) with ESMTP id 6D071271
 for <dev@dpdk.org>; Tue,  5 Dec 2017 14:56:43 +0100 (CET)
Received: from orsmga008.jf.intel.com ([10.7.209.65])
 by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 05 Dec 2017 05:56:42 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.45,364,1508828400"; d="scan'208,217";a="252346"
Received: from tanjianf-mobl.ccr.corp.intel.com (HELO [10.255.28.96])
 ([10.255.28.96])
 by orsmga008.jf.intel.com with ESMTP; 05 Dec 2017 05:56:41 -0800
To: Thomas Monjalon <thomas@monjalon.net>
References: <20171201003642.19827-1-thomas@monjalon.net>
 <2579199.neyJOE5Nyd@xps> <fd26c5ea-bbff-8036-cd54-b9f7fb1f1926@intel.com>
 <5374836.XgGFu4empV@xps>
Cc: dev@dpdk.org
From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
Message-ID: <f0aa8638-f0cd-4b1e-7b87-a7bfe0e04c9c@intel.com>
Date: Tue, 5 Dec 2017 21:56:40 +0800
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <5374836.XgGFu4empV@xps>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Content-Filtered-By: Mailman/MimeDel 2.1.15
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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Dec 2017 13:56:44 -0000


On 12/5/2017 4:41 PM, Thomas Monjalon wrote:
>
> 05/12/2017 09:27, Tan, Jianfeng:
>
> >
>
> > On 12/4/2017 5:31 PM, Thomas Monjalon wrote:
>
> > >
>
> > > The hook is in bus->scan().
>
> > > I think we should launch a bus scan when there is a new device event.
>
> >
>
> > That's what I'm trying to say. We finally need to execute a handler as
>
> > of a device event to finish the job.
>
> Please be more specific, I am not sure to understand.
>

By the handler, I mean when we monitor the udev by select/poll/epoll and 
device uevents come, the application will execute a handler (or just a 
function) for each of such uevent. Then why not adding the vdev there?

Thanks,
Jianfeng