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 621861B026 for ; Mon, 12 Feb 2018 10:47:06 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E472220782; Mon, 12 Feb 2018 04:47:05 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 12 Feb 2018 04:47:05 -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=x8mJeyp1gtZEc/IywvWuSidbYQ bpfgmkp09UWIFNCOg=; b=XL6T6rvH6X5rBJ+wqYYDrNTyirLjfGTdZD5otd1txG jWJL8BbZrp1ei4U0MJ/+LAiPh/KlX276qi273sHWupB1WGidmbrH+6XxVZvFBQGe ChoBrFipUS04Cw7t3MEzWRG3swf1D6eBTHzo+E1sCwpVx9ihgI/uHivNWo4ULlGr 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=fm2; bh=x8mJey p1gtZEc/IywvWuSidbYQbpfgmkp09UWIFNCOg=; b=Nl/Jh4AVerNxRrnqoURRcp Kuxun0FPsKMU6oUcMBw1acKVbVNMLe6m3AouUH1ptyBZVnTeX/50pLpNccrIUYRN GfmFydp1Dags56TaD1bkNldaYqRljwYGqvw5EMWJUMX6qRQuke6/lAqYCySBUtZh 984nsR90mzXeagTC3X5n/u7CJIVu8mIV5TDIRZo4cIclOT9nRzHKGlalBOYJQHsR MjlQIYX2vqSdB5mK/lTv3SZAV3frN8k9+JovbDIuJwhF62LvHb9t7gdjMeiy3z9a ZvJG9GQ2U4DmryjcJLS2pA8+uHCQ9cYqiO0tF78/At823X88FeIJzBd+D7PqXneQ == 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 90B9B7E168; Mon, 12 Feb 2018 04:47:05 -0500 (EST) From: Thomas Monjalon To: "Guo, Jia" Cc: ferruh.yigit@intel.com, dev@dpdk.org, jingjing.wu@intel.com, jianfeng.tan@intel.com Date: Mon, 12 Feb 2018 10:46:56 +0100 Message-ID: <3951509.LRgmqiM9ue@xps> In-Reply-To: <899b1116-cf19-249e-cc55-8993ef7729e6@intel.com> References: <1517306475-2153-1-git-send-email-jia.guo@intel.com> <10497764.pzdNBqvViL@xps> <899b1116-cf19-249e-cc55-8993ef7729e6@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] igb_uio: fix uevent montior issue 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, 12 Feb 2018 09:47:06 -0000 12/02/2018 09:28, Guo, Jia: > > On 2/9/2018 6:01 AM, Thomas Monjalon wrote: > > 30/01/2018 11:01, Jeff Guo: > >> udev could not detect remove and add event of device when hotplug in > >> and out devices, that related with the fix about using pointer of > >> rte_uio_pci_dev as dev_id instead of uio_device for irq device handler, > >> that would result igb uio irq failure when kernel version after than 3.17. > >> so this patch correct it by use kernel version check before handle the > >> pci interrupt. > >> > >> Fixes: 6b9ed026a870 ("igb_uio: fix build with kernel <= 3.17") > >> Signed-off-by: Jeff Guo > >> --- > >> +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) > >> struct rte_uio_pci_dev *udev = (struct rte_uio_pci_dev *)dev_id; > >> struct uio_info *info = &udev->info; > >> - > >> +#else > >> + struct uio_device *idev = (struct uio_device *)dev_id; > >> + struct uio_info *info = idev->info; > >> + struct rte_uio_pci_dev *udev = info->priv; > >> +#endif > > Can we avoid checking Linux version number? > > This method won't work with kernel backports. > i don't think that is a bug rather than a kernel feature parameter > change , so i am not sure if it will definitely a chance exist for the > kernel backport fix for that. Features are also backported in some kernels.