From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by dpdk.org (Postfix) with ESMTP id 08D8AE5D for ; Thu, 29 Mar 2018 19:01:07 +0200 (CEST) Received: by mail-pf0-f195.google.com with SMTP id y66so3612133pfi.7 for ; Thu, 29 Mar 2018 10:01:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nXDT/4K7RplnciSvGLOU94k/KT6ZNK+0qjVxMw1DOL8=; b=nN9Mx2EUtye9744/jbZFsGz7ozIxzLoeTzEOtR/uuI1/KJvclQaoNugsGfy1+SyI4t UBXO+fEexhjmd7MpXl3lC5Az86wn5MJ2YP6B2LJWPUdIA/3EEvc+pHcpRz2adJBdX0uk 2m+S0kum6SEHJhJP46EtZqz2oVNHzakPXP5rdL0/enw/KZc94fGpS5B/ziV8VyEHmAQg OaRYInP5ZGP7/vXnxpZOqnnWTePnubhCFjhkAQZQz8UvQ/aTlMLDKqlqB8nXxrSJbMea 9/5mFv9B64AUbcVfDo84htazUHNRAJEWmqtwIgIFKN1MlZX5CSktpTz03k4aW+6y70+e sGKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nXDT/4K7RplnciSvGLOU94k/KT6ZNK+0qjVxMw1DOL8=; b=DLyDw/oFs6GNG4pTL8WMsJaBOhAFNCW+9Msob3wPyollnz5vUrlX+4kb96DKEbY86E 6Kz6Kz+tzPb/uXnm9tHLMIMtn9gkigNSCLSj7UnLLlOHtefkEbS6CjdhNSWN4iguPvhP 8CDmquYdUelUgkGhuQbeUGdgdsXKamowkBC4t+4fclzzOVJa/a+z7FA8WeztMLCbawO3 N+ri+1La2HL3gyGYsbpu94DD3+9WB61p5gVjYLwkx7DArzNSs8hha4Hrrw5NDVa5mp4Q JhrOdiBpCFIBwLQ5jsD/TJHRJU0HgjwXrb1YTKsZltyR7UlawvcrqUkQLWyC/QNx6Pg0 +unQ== X-Gm-Message-State: AElRT7GtExEUtI0ufAOixKzDjCWcHvLDxwfILtSCHBODWC1k/uGUaEjb RXopgLaWLuvdqcq0DXpiOZZPCA== X-Google-Smtp-Source: AIpwx48ZAGs4PBua9ImuY4mhB46RKDlhto5hJCq3V1sCEA1xMILM0lSjxOYQxgXp5ApcP5RI90DzYQ== X-Received: by 10.98.247.19 with SMTP id h19mr6921491pfi.239.1522342861447; Thu, 29 Mar 2018 10:01:01 -0700 (PDT) Received: from xeon-e3 (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id q75sm13969289pfj.99.2018.03.29.10.01.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Mar 2018 10:01:01 -0700 (PDT) Date: Thu, 29 Mar 2018 10:00:59 -0700 From: Stephen Hemminger To: Jeff Guo Cc: bruce.richardson@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, gaetan.rivet@6wind.com, jingjing.wu@intel.com, thomas@monjalon.net, motih@mellanox.com, harry.van.haaren@intel.com, jianfeng.tan@intel.com, jblunck@infradead.org, shreyansh.jain@nxp.com, dev@dpdk.org, helin.zhang@intel.com Message-ID: <20180329100059.0f10a32a@xeon-e3> In-Reply-To: <1522339205-27698-5-git-send-email-jia.guo@intel.com> References: <1522063256-3997-5-git-send-email-jia.guo@intel.com> <1522339205-27698-1-git-send-email-jia.guo@intel.com> <1522339205-27698-5-git-send-email-jia.guo@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH V17 4/4] app/testpmd: enable device hotplug monitoring 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: Thu, 29 Mar 2018 17:01:07 -0000 On Fri, 30 Mar 2018 00:00:05 +0800 Jeff Guo wrote: > Use testpmd for example, to show an application how to use device event > mechanism to monitor the hotplug event, involve both hot removal event > and the hot insertion event. > > The process is that, testpmd first enable hotplug monitoring and register > the user's callback, when device being hotplug insertion or hotplug > removal, the eal monitor the event and call user's callbacks, the > application according their hot plug policy to detach or attach the device > from the bus. > > Signed-off-by: Jeff Guo > --- > v17->v16: > unregister all user's callback when stop event monitor > --- > app/test-pmd/parameters.c | 5 +- > app/test-pmd/testpmd.c | 242 +++++++++++++++++++++++++++++++++++++++++++++- > app/test-pmd/testpmd.h | 11 +++ > 3 files changed, 256 insertions(+), 2 deletions(-) > > diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c > index 97d22b8..825d602 100644 > --- a/app/test-pmd/parameters.c > +++ b/app/test-pmd/parameters.c > @@ -186,6 +186,7 @@ usage(char* progname) > printf(" --flow-isolate-all: " > "requests flow API isolated mode on all ports at initialization time.\n"); > printf(" --tx-offloads=0xXXXXXXXX: hexadecimal bitmask of TX queue offloads\n"); > + printf(" --hot-plug: enalbe hot plug for device.\n") s/enalbe/enable/