From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B47D62C15 for ; Mon, 9 Jul 2018 10:46:58 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2018 01:46:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,329,1526367600"; d="scan'208";a="214458555" Received: from jguo15x-mobl3.ccr.corp.intel.com (HELO [10.67.68.84]) ([10.67.68.84]) by orsmga004.jf.intel.com with ESMTP; 09 Jul 2018 01:46:07 -0700 To: Andrew Rybchenko , stephen@networkplumber.org, 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, matan@mellanox.com, harry.van.haaren@intel.com, qi.z.zhang@intel.com, shaopeng.he@intel.com, bernard.iremonger@intel.com References: <1530787185-5915-1-git-send-email-jia.guo@intel.com> <1531119413-17298-1-git-send-email-jia.guo@intel.com> <1531119413-17298-2-git-send-email-jia.guo@intel.com> <1b0cab80-2a89-3b8c-e849-cceadc3e029c@solarflare.com> Cc: jblunck@infradead.org, shreyansh.jain@nxp.com, dev@dpdk.org, helin.zhang@intel.com From: Jeff Guo Message-ID: Date: Mon, 9 Jul 2018 16:46:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1b0cab80-2a89-3b8c-e849-cceadc3e029c@solarflare.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 1/3] net/ixgbe: enable hotplug detect in ixgbe 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, 09 Jul 2018 08:46:59 -0000 On 7/9/2018 4:13 PM, Andrew Rybchenko wrote: > On 09.07.2018 09:56, Jeff Guo wrote: >> This patch aim to enable hotplug detect in ixgbe pmd driver. Firstly it >> set the flags RTE_PCI_DRV_INTR_RMV in drv_flags to announce the hotplug >> ability, and then use rte_dev_event_callback_register to register >> the hotplug event callback to eal. When eal detect the hotplug event, >> it will call the callback to process it, if the event is hotplug remove, >> it will trigger the RTE_ETH_EVENT_INTR_RMV event into ethdev callback >> to let app process the hotplug for the ethdev. >> >> This is an example for other driver, that if any driver support hotplug >> feature could be use this way to enable hotplug detect. > > I see nothing ixgbe specific in the callback. Yes, support of removal > event should be in drv_flags, but it looks like the callback may be > generic and located in ethdev. > Let it be generic and located in ethdev should be a good idea. > Also search of the device by name could be done using querying > mechanism to be added by Gaetan [1]. > > [1] https://patches.dpdk.org/project/dpdk/list/?series=419 here, i just want to check if the eth port is belong to the removal device.