From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 7B8CE5F0D for ; Mon, 9 Jul 2018 10:13:36 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id C5971B40055; Mon, 9 Jul 2018 08:13:34 +0000 (UTC) Received: from [192.168.1.16] (85.187.13.33) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Mon, 9 Jul 2018 09:13:22 +0100 To: Jeff Guo , , , , , , , , , , , , , CC: , , , , 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> From: Andrew Rybchenko Message-ID: <1b0cab80-2a89-3b8c-e849-cceadc3e029c@solarflare.com> Date: Mon, 9 Jul 2018 11:13:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1531119413-17298-2-git-send-email-jia.guo@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [85.187.13.33] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23956.003 X-TM-AS-Result: No--2.534400-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1531124016-fkv2vTJSEWI4 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:13:36 -0000 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. 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