From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id A4942235 for ; Fri, 7 Jul 2017 09:56:17 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 353B8207CC; Fri, 7 Jul 2017 03:56:16 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Fri, 07 Jul 2017 03:56:16 -0400 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:x-sasl-enc; s=mesmtp; bh=vkGD+WsPdFrxDY/ 6syNPZstQySXZoZ4p5hBxbCBe4VY=; b=KHWdXVOlSxQJhNTI/87XU2b5nSNo/Qu GEMC+eSGe37bVpx51TyEmFHzOrmmsMWwrTserlCWpwVfPkNtYHlkFMj82rlw5cuF o/NVqlPrn5IPgPdXTGBNiPnQy9K4i0WAYeY1cJ1ySa3+v7gQfmc9ca3BTkI1gV08 BkZ7r3SuoFtk= 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:x-sasl-enc; s= fm1; bh=vkGD+WsPdFrxDY/6syNPZstQySXZoZ4p5hBxbCBe4VY=; b=ZZUI0Qj4 miKGZYpmpytrzpSrU7bieM/5sBFuXUCdRsoJStK6JPPjboGKkU57LhgO23UuwU1/ UMxtqRTuFyGxSvbYdPbxO/Onfkvl8IDLhveO4pA4//9wT7vNTA42otEEVZP197jg 1UTvgcGwTL+pT0XorPLPduLTOxBQXmSgBC4F+0qrO9R1976L0OAaZbHR6R2AuKN4 zl1y6OjGvkZTV0KMtnZfGl+g6Dnh4BXaBH48niniUdSQPHN8HRgtiCL1SmZTfw0y 1eqkd+WXqrJpJhY6hgpHrggpxoyVdmuJUbwS7dAzt23qDHhsBwAGfIG4wYRXXjU7 yjgNSQ690JaOIA== X-ME-Sender: X-Sasl-enc: VP2CiOHKnD/4Ntb5kPznGD3WvzlwAJXmf+vOY5aliWLx 1499414175 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id DAB73240AF; Fri, 7 Jul 2017 03:56:15 -0400 (EDT) From: Thomas Monjalon To: Jeff Guo Cc: dev@dpdk.org, helin.zhang@intel.com, jingjing.wu@intel.com, bruce.richardson@intel.com, konstantin.ananyev@intel.com, gaetan.rivet@6wind.com, thomas.monjalon@6wind.com, ferruh.yigit@intel.com Date: Fri, 07 Jul 2017 09:56:15 +0200 Message-ID: <1888554.fe4JxUsZG9@xps> In-Reply-To: <1498712510-44217-3-git-send-email-jia.guo@intel.com> References: <1498648044-57541-2-git-send-email-jia.guo@intel.com> <1498712510-44217-1-git-send-email-jia.guo@intel.com> <1498712510-44217-3-git-send-email-jia.guo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3 2/2] net/i40e: add hot plug monitor in i40e 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: Fri, 07 Jul 2017 07:56:17 -0000 29/06/2017 07:01, Jeff Guo: > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -1283,6 +1283,7 @@ static inline void i40e_GLQF_reg_init(struct i40e_hw *hw) > > /* enable uio intr after callback register */ > rte_intr_enable(intr_handle); > + > /* > * Add an ethertype filter to drop all flow control frames transmitted > * from VSIs. By doing so, we stop VF from sending out PAUSE or PFC > @@ -5832,11 +5833,29 @@ struct i40e_vsi * > { > struct rte_eth_dev *dev = (struct rte_eth_dev *)param; > struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); > + struct rte_uevent event; > uint32_t icr0; > + struct rte_pci_device *pci_dev; > + struct rte_intr_handle *intr_handle; > + > + pci_dev = RTE_ETH_DEV_TO_PCI(dev); > + intr_handle = &pci_dev->intr_handle; > > /* Disable interrupt */ > i40e_pf_disable_irq0(hw); > > + /* check device uevent */ > + if (rte_uevent_get(intr_handle->uevent_fd, &event) == 0) { > + if (event.subsystem == RTE_UEVENT_SUBSYSTEM_UIO) { > + if (event.action == RTE_UEVENT_REMOVE) { > + _rte_eth_dev_callback_process(dev, > + RTE_ETH_EVENT_INTR_RMV, NULL); > + return; > + } > + } > + goto done; > + } There is nothing specific to i40e in this patch. It seems wrong to add such generic code in every drivers.