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 465A81B7C3 for ; Thu, 8 Feb 2018 23:01:49 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CD73320D5D; Thu, 8 Feb 2018 17:01:48 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 08 Feb 2018 17:01:48 -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=gQsNvR5quCKkRzBMnjRCtUyvLm SM0m4NDCTWEeVjTIo=; b=TjIE9/f4BcAmAMhXCfh9BJcrTLgNF7hTzbCGMrkoqR qt5cFO6DrNCbLkhkstLIf/1xwuE12aINL2wnMVvSAK2oVm9OvIQmSFSxhFeVtIoy A3shJIf4SHQJdN/SLP9Cz1abtofstsfixsUh+gcluvjrXZTSzMVZ68vJ3UMWau6/ 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=fm1; bh=gQsNvR 5quCKkRzBMnjRCtUyvLmSM0m4NDCTWEeVjTIo=; b=FoXBpXq96TtFn16MXb1Tjs zDgaS0vFxJF37YCQvBYXPDdeS8FzKeu1lF9cHj8nr0OfwzpyzP/EW0VX3k6i3PwP EO25SBW2MyicGRn0Hypfho0awyLr424MQ/KWTlLtksYM8zUXXUfZtBWQs8KoNS34 p7BYcyxN8gDKIUH4BXuHMfBkBnVcx2Q9u7lHA4VP+un97TFdSr9wwPJuTxC0twL2 VFs8ATTz8hJMp0p6HRzgma7++qUe0h/2FZxTO2LWymsq/DKaKuRVuCC2gwKwFoSP JTVEO0O4GGzpgaFqRXHOuqtMTc0z16IXqbs44RShgbSNRmqUM4oflQpnmgWVLNwA == 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 7247E240DB; Thu, 8 Feb 2018 17:01:48 -0500 (EST) From: Thomas Monjalon To: Jeff Guo , ferruh.yigit@intel.com Cc: dev@dpdk.org, jingjing.wu@intel.com, jianfeng.tan@intel.com Date: Thu, 08 Feb 2018 23:01:43 +0100 Message-ID: <10497764.pzdNBqvViL@xps> In-Reply-To: <1517306475-2153-1-git-send-email-jia.guo@intel.com> References: <1517306475-2153-1-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] 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: Thu, 08 Feb 2018 22:01:49 -0000 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.