From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Guo, Jia" Subject: Re: [PATCH] igb_uio: fix uevent montior issue Date: Mon, 12 Feb 2018 16:28:21 +0800 Message-ID: <899b1116-cf19-249e-cc55-8993ef7729e6@intel.com> References: <1517306475-2153-1-git-send-email-jia.guo@intel.com> <10497764.pzdNBqvViL@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, jingjing.wu@intel.com, jianfeng.tan@intel.com To: Thomas Monjalon , ferruh.yigit@intel.com Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id D9B6D1B2DE for ; Mon, 12 Feb 2018 09:28:23 +0100 (CET) In-Reply-To: <10497764.pzdNBqvViL@xps> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.