From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id 6F789B38C for ; Mon, 1 Sep 2014 17:02:42 +0200 (CEST) Received: by mail-wi0-f177.google.com with SMTP id cc10so6271481wib.10 for ; Mon, 01 Sep 2014 08:07:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=HUeIBrUzfKf0GWIeAAIEUZnwDhN/a5XRTSNoaKJyUBk=; b=KKlEjLssrraBpH8c12Fex7L63WcLT8i4OsKhA7YHmc2RPYblvkP/NLTEnbvLf5YqTu Tl7PxJKwA+SB/gx5kvMVZIYyUNEDp8Q1XErxH0ty7UlPEUbOuJxMPWmQBSt4mHUDYg3a iVrALZTyH/NZlCOggP0oFP8bC32jupxSZX+DSszRaTWUoeiSuvGTdzGa7lFmhScpOYsV 5YnHw8l2jrh5B9jLG994DBavg3nHEdrI1t3/w1PvnF73LTJNQt1/Dew+8msKfPWF9tNm QD1PXjDDMNr0enhNBuFpN0IimBK2Vz+kx07KV2PYkBf4tDcB0wWA0WxWWEgrhiqq858G 5SxA== X-Gm-Message-State: ALoCoQkEXoXx1lrlSs14ZAHp7VU48rA2OGFynvaBQMixs1Ne41sIhRVfR6h1DGocr694tBcunJrE X-Received: by 10.180.91.111 with SMTP id cd15mr21860557wib.69.1409584025999; Mon, 01 Sep 2014 08:07:05 -0700 (PDT) Received: from [10.16.0.146] (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id s14sm25333411wik.23.2014.09.01.08.07.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Sep 2014 08:07:05 -0700 (PDT) Message-ID: <54048B98.708@6wind.com> Date: Mon, 01 Sep 2014 17:07:04 +0200 From: Guillaume Gaudonville User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Robert Sanford , Thomas Monjalon , "dev@dpdk.org" References: <20140725103627.4ca989b7@haswell.linuxnetplumber.net> <9317787.qKVt3oyQbN@xps13> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/2] igb_uio: fix compability on old kernel X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 15:02:42 -0000 On 08/22/2014 08:09 PM, Robert Sanford wrote: > This is what we came up with. It works for us. In our kernel headers' > linux/pci.h, pci_num_vf is enclosed within "#ifdef CONFIG_PCI_IOV/#endif"; > pci_intx_mask_supported and pci_check_and_mask_intx are enclosed within > "#ifdef HAVE_PCI_SET_MWI/#endif". Testing on HAVE_PCI_SET_MWI seems not correct. It is defined since linux 2.6.12. There is no define associated with the commit that adds pci_intx_mask_supported and pci_check_and_mask_intx. So I think we'll have to check the distribution, something like: -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) && \ + (!(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE == RHEL_RELEASE_VERSION(6,5))) What do you think? -- Best regards, Guillaume > > What do you think? > > -- > Thanks, > Robert > > > --- > lib/librte_eal/linuxapp/igb_uio/compat.h | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_eal/linuxapp/igb_uio/compat.h > b/lib/librte_eal/linuxapp/igb_uio/compat.h > index 2a16540..f7404d8 100644 > --- a/lib/librte_eal/linuxapp/igb_uio/compat.h > +++ b/lib/librte_eal/linuxapp/igb_uio/compat.h > @@ -17,7 +17,7 @@ > #define PCI_MSIX_ENTRY_CTRL_MASKBIT 1 > #endif > > -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34) > +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34) && > !defined(CONFIG_PCI_IOV) > static int pci_num_vf(struct pci_dev *dev) > { > struct iov { > @@ -38,7 +38,7 @@ static int pci_num_vf(struct pci_dev *dev) > #endif > > > -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) > +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) && > !defined(HAVE_PCI_SET_MWI) > > /* Check if INTX works to control irq's. > * Set's INTX_DISABLE flag and reads it back