DPDK patches and discussions
 help / color / mirror / Atom feed
From: Guillaume Gaudonville <guillaume.gaudonville@6wind.com>
To: Robert Sanford <rsanford2@gmail.com>,
	 Thomas Monjalon <thomas.monjalon@6wind.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/2] igb_uio: fix compability on old kernel
Date: Mon, 01 Sep 2014 17:07:04 +0200	[thread overview]
Message-ID: <54048B98.708@6wind.com> (raw)
In-Reply-To: <CA+cr1coJs9yokaDT1ya=5ChSWuSYWiF4TqmAhpcP0qLZKC4odA@mail.gmail.com>

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

  parent reply	other threads:[~2014-09-01 15:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25 17:36 Stephen Hemminger
2014-07-25 17:37 ` [dpdk-dev] [PATCH 2/2] igb_uio: handle no IRQ fallback Stephen Hemminger
2014-08-01 13:11   ` Thomas Monjalon
2014-08-01 13:10 ` [dpdk-dev] [PATCH 1/2] igb_uio: fix compability on old kernel Thomas Monjalon
2014-08-22 17:29   ` Sanford, Robert
2014-08-22 18:09     ` Robert Sanford
2014-08-23 15:14       ` Stephen Hemminger
2014-08-26 16:08         ` Sanford, Robert
2014-09-01 11:15           ` Thomas Monjalon
2014-09-01 15:07       ` Guillaume Gaudonville [this message]
2014-09-01 14:55 ` Guillaume Gaudonville
2014-09-03  2:28   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54048B98.708@6wind.com \
    --to=guillaume.gaudonville@6wind.com \
    --cc=dev@dpdk.org \
    --cc=rsanford2@gmail.com \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).