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 429DD239 for ; Tue, 5 Dec 2017 16:21:19 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CBD5121C57; Tue, 5 Dec 2017 10:21:18 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 05 Dec 2017 10:21:18 -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=/88zN4clQeO5eki1XU38bBWivS P42m3Y4qRqOvSEy5Y=; b=pzQJq7peJ+CtSTLHz80Zjag3JkFr8imUV1JQJLY0wb 3WveI9vioUnADHN4ERaPPcMK9kvy+YqqLXVj02kN89aliStZ+N6vI6WJTBWEp0Lh s07TqMP7u2BlUPYDlgVPViCMeSlhUAZIyEbpxLtzyOodgWqmg372SZsohP0cU714 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=/88zN4 clQeO5eki1XU38bBWivSP42m3Y4qRqOvSEy5Y=; b=MN8R+uo+ucl2YQ5SFrba18 YjStTrscbJKHoAJAvA69ll+9RiL2eZOpqiEQz8BsrOH4UK7n1emM2umy0/OmY6HI gqbkyx3Lu/oW73ZPnvc1YmPY0hY6Zuu+QnyFDpjp2XxzsMWzXF99P0bcfGw+CKGf +Cd3aBAZY9VBmRZkkNdPg7Jk53uGyycMAnJBX7QMvIN+n/UoHBEf/8xVtRbDmuiz 2nj8eQJKUIjORUWtS9t3V2dwpaXqlx3/wKcGf/Z5YonUngMYaRTIaYqSxesJvo34 YBvcGZJamMk/e2BiFtS5VbvXj6pIbfbrxhjl75PytHPsDjw20GOiHRwk4VEzMjtQ == 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 7E31F7F91B; Tue, 5 Dec 2017 10:21:18 -0500 (EST) From: Thomas Monjalon To: "Tan, Jianfeng" Cc: dev@dpdk.org Date: Tue, 05 Dec 2017 16:21:17 +0100 Message-ID: <1712827.SmiPysL3o0@xps> In-Reply-To: References: <20171201003642.19827-1-thomas@monjalon.net> <5374836.XgGFu4empV@xps> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 15:21:19 -0000 05/12/2017 14:56, Tan, Jianfeng: > > 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? Because it must work for hotplug, and initial scan too. We can also think to application requiring a manual scan. The bus scan is the right place to have every scans called. That's simple.