[dpdk-dev,v7,3/6] igb_uio: fix MSI-X IRQ assignment with new IRQ function

Message ID 1504613046-7259-3-git-send-email-markus.theil@tu-ilmenau.de (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Markus Theil Sept. 5, 2017, 12:04 p.m. UTC
The patch which introduced the usage of pci_alloc_irq_vectors
came after the patch which switched to non-threaded ISR (f0d1896fa1),
but did not use non-threaded ISR, if pci_alloc_irq_vectors
is used.

Fixes: 99bb58f3adc7 ("igb_uio: switch to new irq function for
MSI-X")
Cc: nicolas.dichtel@6wind.com

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Ferruh Yigit Sept. 11, 2017, 5:56 p.m. UTC | #1
On 9/5/2017 1:04 PM, Markus Theil wrote:
> The patch which introduced the usage of pci_alloc_irq_vectors
> came after the patch which switched to non-threaded ISR (f0d1896fa1),
> but did not use non-threaded ISR, if pci_alloc_irq_vectors
> is used.
> 
> Fixes: 99bb58f3adc7 ("igb_uio: switch to new irq function for
> MSI-X")
> Cc: nicolas.dichtel@6wind.com
> 
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> ---
>  lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> index 93bb71d..6885e72 100644
> --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> @@ -331,6 +331,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev)
>  #else
>  		if (pci_alloc_irq_vectors(udev->pdev, 1, 1, PCI_IRQ_MSIX) == 1) {
>  			dev_dbg(&udev->pdev->dev, "using MSI-X");
> +			udev->info.irq_flags = IRQF_NO_THREAD;

IRQF_NO_THREAD seems has been introduced in 2.6.39, so using this flag
causing build error for kernel versions < 2.6.39.

btw, the flag is already in use, so issue is not related to this patch.

In DPDK documentation supported Linux kernel version is >= 2.6.34 [1].

We should either increase supported version to 2.6.39, or update igb_uio
code.

I am for increasing minimum supported kernel version to 2.6.39, any
objection / comment?

2.6.39 released on May 2011
2.6.34 released on May 2010


[1]
http://dpdk.org/doc/guides/linux_gsg/sys_reqs.html#system-software

>  			udev->info.irq = pci_irq_vector(udev->pdev, 0);
>  			udev->mode = RTE_INTR_MODE_MSIX;
>  			break;
>
  
Stephen Hemminger Sept. 11, 2017, 10:04 p.m. UTC | #2
I wonder if it is time to move the bar forward to oldest LTS which is
3.2.92


On Sep 11, 2017 10:56 AM, "Ferruh Yigit" <ferruh.yigit@intel.com> wrote:

> On 9/5/2017 1:04 PM, Markus Theil wrote:
> > The patch which introduced the usage of pci_alloc_irq_vectors
> > came after the patch which switched to non-threaded ISR (f0d1896fa1),
> > but did not use non-threaded ISR, if pci_alloc_irq_vectors
> > is used.
> >
> > Fixes: 99bb58f3adc7 ("igb_uio: switch to new irq function for
> > MSI-X")
> > Cc: nicolas.dichtel@6wind.com
> >
> > Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> > ---
> >  lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > index 93bb71d..6885e72 100644
> > --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > @@ -331,6 +331,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev
> *udev)
> >  #else
> >               if (pci_alloc_irq_vectors(udev->pdev, 1, 1, PCI_IRQ_MSIX)
> == 1) {
> >                       dev_dbg(&udev->pdev->dev, "using MSI-X");
> > +                     udev->info.irq_flags = IRQF_NO_THREAD;
>
> IRQF_NO_THREAD seems has been introduced in 2.6.39, so using this flag
> causing build error for kernel versions < 2.6.39.
>
> btw, the flag is already in use, so issue is not related to this patch.
>
> In DPDK documentation supported Linux kernel version is >= 2.6.34 [1].
>
> We should either increase supported version to 2.6.39, or update igb_uio
> code.
>
> I am for increasing minimum supported kernel version to 2.6.39, any
> objection / comment?
>
> 2.6.39 released on May 2011
> 2.6.34 released on May 2010
>
>
> [1]
> http://dpdk.org/doc/guides/linux_gsg/sys_reqs.html#system-software
>
> >                       udev->info.irq = pci_irq_vector(udev->pdev, 0);
> >                       udev->mode = RTE_INTR_MODE_MSIX;
> >                       break;
> >
>
>
  
Bruce Richardson Sept. 12, 2017, 8:14 a.m. UTC | #3
On Mon, Sep 11, 2017 at 03:04:01PM -0700, Stephen Hemminger wrote:
> I wonder if it is time to move the bar forward to oldest LTS which is
> 3.2.92
> 

That seems reasonable. Probably best to do a deprecation notice for it
in 17.11 and move the bar in 18.02.

/Bruce

> 
> On Sep 11, 2017 10:56 AM, "Ferruh Yigit" <ferruh.yigit@intel.com> wrote:
> 
> > On 9/5/2017 1:04 PM, Markus Theil wrote:
> > > The patch which introduced the usage of pci_alloc_irq_vectors
> > > came after the patch which switched to non-threaded ISR (f0d1896fa1),
> > > but did not use non-threaded ISR, if pci_alloc_irq_vectors
> > > is used.
> > >
> > > Fixes: 99bb58f3adc7 ("igb_uio: switch to new irq function for
> > > MSI-X")
> > > Cc: nicolas.dichtel@6wind.com
> > >
> > > Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> > > ---
> > >  lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > > index 93bb71d..6885e72 100644
> > > --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > > +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > > @@ -331,6 +331,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev
> > *udev)
> > >  #else
> > >               if (pci_alloc_irq_vectors(udev->pdev, 1, 1, PCI_IRQ_MSIX)
> > == 1) {
> > >                       dev_dbg(&udev->pdev->dev, "using MSI-X");
> > > +                     udev->info.irq_flags = IRQF_NO_THREAD;
> >
> > IRQF_NO_THREAD seems has been introduced in 2.6.39, so using this flag
> > causing build error for kernel versions < 2.6.39.
> >
> > btw, the flag is already in use, so issue is not related to this patch.
> >
> > In DPDK documentation supported Linux kernel version is >= 2.6.34 [1].
> >
> > We should either increase supported version to 2.6.39, or update igb_uio
> > code.
> >
> > I am for increasing minimum supported kernel version to 2.6.39, any
> > objection / comment?
> >
> > 2.6.39 released on May 2011
> > 2.6.34 released on May 2010
> >
> >
> > [1]
> > http://dpdk.org/doc/guides/linux_gsg/sys_reqs.html#system-software
> >
> > >                       udev->info.irq = pci_irq_vector(udev->pdev, 0);
> > >                       udev->mode = RTE_INTR_MODE_MSIX;
> > >                       break;
> > >
> >
> >
  
Bruce Richardson Sept. 12, 2017, 8:16 a.m. UTC | #4
On Mon, Sep 11, 2017 at 06:56:39PM +0100, Ferruh Yigit wrote:
> On 9/5/2017 1:04 PM, Markus Theil wrote:
> > The patch which introduced the usage of pci_alloc_irq_vectors
> > came after the patch which switched to non-threaded ISR (f0d1896fa1),
> > but did not use non-threaded ISR, if pci_alloc_irq_vectors
> > is used.
> > 
> > Fixes: 99bb58f3adc7 ("igb_uio: switch to new irq function for
> > MSI-X")
> > Cc: nicolas.dichtel@6wind.com
> > 
> > Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> > ---
> >  lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > index 93bb71d..6885e72 100644
> > --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > @@ -331,6 +331,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev)
> >  #else
> >  		if (pci_alloc_irq_vectors(udev->pdev, 1, 1, PCI_IRQ_MSIX) == 1) {
> >  			dev_dbg(&udev->pdev->dev, "using MSI-X");
> > +			udev->info.irq_flags = IRQF_NO_THREAD;
> 
> IRQF_NO_THREAD seems has been introduced in 2.6.39, so using this flag
> causing build error for kernel versions < 2.6.39.
> 
> btw, the flag is already in use, so issue is not related to this patch.
> 
> In DPDK documentation supported Linux kernel version is >= 2.6.34 [1].
> 
> We should either increase supported version to 2.6.39, or update igb_uio
> code.
> 
> I am for increasing minimum supported kernel version to 2.6.39, any
> objection / comment?
> 
> 2.6.39 released on May 2011
> 2.6.34 released on May 2010
> 

Only thing I can think of here is:
* is the necessary support for this in RHEL 6.x series
* anyone still care about RHEL 6 support?

/Bruce
  
Stephen Hemminger Sept. 12, 2017, 3:01 p.m. UTC | #5
Why not have an ongoing sliding window policy? So each release it is set

On Sep 12, 2017 1:14 AM, "Bruce Richardson" <bruce.richardson@intel.com>
wrote:

> On Mon, Sep 11, 2017 at 03:04:01PM -0700, Stephen Hemminger wrote:
> > I wonder if it is time to move the bar forward to oldest LTS which is
> > 3.2.92
> >
>
> That seems reasonable. Probably best to do a deprecation notice for it
> in 17.11 and move the bar in 18.02.
>
> /Bruce
>
> >
> > On Sep 11, 2017 10:56 AM, "Ferruh Yigit" <ferruh.yigit@intel.com> wrote:
> >
> > > On 9/5/2017 1:04 PM, Markus Theil wrote:
> > > > The patch which introduced the usage of pci_alloc_irq_vectors
> > > > came after the patch which switched to non-threaded ISR (f0d1896fa1),
> > > > but did not use non-threaded ISR, if pci_alloc_irq_vectors
> > > > is used.
> > > >
> > > > Fixes: 99bb58f3adc7 ("igb_uio: switch to new irq function for
> > > > MSI-X")
> > > > Cc: nicolas.dichtel@6wind.com
> > > >
> > > > Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> > > > ---
> > > >  lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > > b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > > > index 93bb71d..6885e72 100644
> > > > --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > > > +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> > > > @@ -331,6 +331,7 @@ igbuio_pci_enable_interrupts(struct
> rte_uio_pci_dev
> > > *udev)
> > > >  #else
> > > >               if (pci_alloc_irq_vectors(udev->pdev, 1, 1,
> PCI_IRQ_MSIX)
> > > == 1) {
> > > >                       dev_dbg(&udev->pdev->dev, "using MSI-X");
> > > > +                     udev->info.irq_flags = IRQF_NO_THREAD;
> > >
> > > IRQF_NO_THREAD seems has been introduced in 2.6.39, so using this flag
> > > causing build error for kernel versions < 2.6.39.
> > >
> > > btw, the flag is already in use, so issue is not related to this patch.
> > >
> > > In DPDK documentation supported Linux kernel version is >= 2.6.34 [1].
> > >
> > > We should either increase supported version to 2.6.39, or update
> igb_uio
> > > code.
> > >
> > > I am for increasing minimum supported kernel version to 2.6.39, any
> > > objection / comment?
> > >
> > > 2.6.39 released on May 2011
> > > 2.6.34 released on May 2010
> > >
> > >
> > > [1]
> > > http://dpdk.org/doc/guides/linux_gsg/sys_reqs.html#system-software
> > >
> > > >                       udev->info.irq = pci_irq_vector(udev->pdev, 0);
> > > >                       udev->mode = RTE_INTR_MODE_MSIX;
> > > >                       break;
> > > >
> > >
> > >
>
  
Kevin Traynor Sept. 12, 2017, 4:31 p.m. UTC | #6
On 09/12/2017 09:16 AM, Bruce Richardson wrote:
> On Mon, Sep 11, 2017 at 06:56:39PM +0100, Ferruh Yigit wrote:
>> On 9/5/2017 1:04 PM, Markus Theil wrote:
>>> The patch which introduced the usage of pci_alloc_irq_vectors
>>> came after the patch which switched to non-threaded ISR (f0d1896fa1),
>>> but did not use non-threaded ISR, if pci_alloc_irq_vectors
>>> is used.
>>>
>>> Fixes: 99bb58f3adc7 ("igb_uio: switch to new irq function for
>>> MSI-X")
>>> Cc: nicolas.dichtel@6wind.com
>>>
>>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>>> ---
>>>  lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
>>> index 93bb71d..6885e72 100644
>>> --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
>>> +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
>>> @@ -331,6 +331,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev)
>>>  #else
>>>  		if (pci_alloc_irq_vectors(udev->pdev, 1, 1, PCI_IRQ_MSIX) == 1) {
>>>  			dev_dbg(&udev->pdev->dev, "using MSI-X");
>>> +			udev->info.irq_flags = IRQF_NO_THREAD;
>>
>> IRQF_NO_THREAD seems has been introduced in 2.6.39, so using this flag
>> causing build error for kernel versions < 2.6.39.
>>
>> btw, the flag is already in use, so issue is not related to this patch.
>>
>> In DPDK documentation supported Linux kernel version is >= 2.6.34 [1].
>>
>> We should either increase supported version to 2.6.39, or update igb_uio
>> code.
>>
>> I am for increasing minimum supported kernel version to 2.6.39, any
>> objection / comment?
>>
>> 2.6.39 released on May 2011
>> 2.6.34 released on May 2010
>>
> 
> Only thing I can think of here is:
> * is the necessary support for this in RHEL 6.x series

It doesn't look to be there

> * anyone still care about RHEL 6 support?
> 

Not an issue with DPDK packages as igb_uio is not included. If someone
was using RHEL6/CentOS6 and igb_uio from DPDK source then seems like it
would be an issue for them. In general, a deprecation notice would be a
good idea if the minimum kernel version is changing.

> /Bruce
>
  

Patch

diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index 93bb71d..6885e72 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -331,6 +331,7 @@  igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev)
 #else
 		if (pci_alloc_irq_vectors(udev->pdev, 1, 1, PCI_IRQ_MSIX) == 1) {
 			dev_dbg(&udev->pdev->dev, "using MSI-X");
+			udev->info.irq_flags = IRQF_NO_THREAD;
 			udev->info.irq = pci_irq_vector(udev->pdev, 0);
 			udev->mode = RTE_INTR_MODE_MSIX;
 			break;