netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net/mlx4_core: Test interrupts fail if not all comp vectors called request_irq
@ 2015-09-29 18:38 clsoto
  2015-10-04  8:03 ` Or Gerlitz
  0 siblings, 1 reply; 6+ messages in thread
From: clsoto @ 2015-09-29 18:38 UTC (permalink / raw)
  To: davem; +Cc: netdev, ogerlitz, brking, amirv, Carol L Soto

From: Carol L Soto <clsoto@linux.vnet.ibm.com>

Test interrupts fails if not all completion vectors called
request_irq. This case can happen if only mlx4_en loads and
we have more completion vectors than rx rings.

Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
---
 drivers/net/ethernet/mellanox/mlx4/eq.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c
index 8e81e53..c344884 100644
--- a/drivers/net/ethernet/mellanox/mlx4/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
@@ -1364,6 +1364,10 @@ int mlx4_test_interrupts(struct mlx4_dev *dev)
 	 * and performing a NOP command
 	 */
 	for(i = 0; !err && (i < dev->caps.num_comp_vectors); ++i) {
+		/* Make sure request_irq was called */
+		if (!priv->eq_table.eq[i].have_irq)
+			continue;
+
 		/* Temporary use polling for command completions */
 		mlx4_cmd_use_polling(dev);
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] net/mlx4_core: Test interrupts fail if not all comp vectors called request_irq
  2015-09-29 18:38 [PATCH net-next] net/mlx4_core: Test interrupts fail if not all comp vectors called request_irq clsoto
@ 2015-10-04  8:03 ` Or Gerlitz
  2015-10-05 15:24   ` Carol Soto
  0 siblings, 1 reply; 6+ messages in thread
From: Or Gerlitz @ 2015-10-04  8:03 UTC (permalink / raw)
  To: clsoto, davem; +Cc: netdev, brking, amirv

On 9/29/2015 9:38 PM, clsoto@linux.vnet.ibm.com wrote:
> From: Carol L Soto <clsoto@linux.vnet.ibm.com>
>
> Test interrupts fails if not all completion vectors called
> request_irq. This case can happen if only mlx4_en loads and
> we have more completion vectors than rx rings.

good catch! is this a bug since the driver 0-day or was introduced by
some recent commit? in the latercase, please add a Fixes: tag before 
your S.O.B note.
>
> Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
> ---
>   drivers/net/ethernet/mellanox/mlx4/eq.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c
> index 8e81e53..c344884 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/eq.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
> @@ -1364,6 +1364,10 @@ int mlx4_test_interrupts(struct mlx4_dev *dev)
>   	 * and performing a NOP command
>   	 */
>   	for(i = 0; !err && (i < dev->caps.num_comp_vectors); ++i) {
> +		/* Make sure request_irq was called */
> +		if (!priv->eq_table.eq[i].have_irq)
> +			continue;
> +
>   		/* Temporary use polling for command completions */
>   		mlx4_cmd_use_polling(dev);
>   

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] net/mlx4_core: Test interrupts fail if not all comp vectors called request_irq
  2015-10-04  8:03 ` Or Gerlitz
@ 2015-10-05 15:24   ` Carol Soto
  2015-10-06  6:24     ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Carol Soto @ 2015-10-05 15:24 UTC (permalink / raw)
  To: Or Gerlitz, davem; +Cc: netdev, brking, amirv



On 10/4/2015 3:03 AM, Or Gerlitz wrote:
> On 9/29/2015 9:38 PM, clsoto@linux.vnet.ibm.com wrote:
>> From: Carol L Soto <clsoto@linux.vnet.ibm.com>
>>
>> Test interrupts fails if not all completion vectors called
>> request_irq. This case can happen if only mlx4_en loads and
>> we have more completion vectors than rx rings.
>
> good catch! is this a bug since the driver 0-day or was introduced by
> some recent commit? in the latercase, please add a Fixes: tag before 
> your S.O.B note.
Probably the issue was introduced by this one
Fixes: c66fa19c405a ('net/mlx4: Add EQ pool')
>>
>> Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
>> ---
>>   drivers/net/ethernet/mellanox/mlx4/eq.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c 
>> b/drivers/net/ethernet/mellanox/mlx4/eq.c
>> index 8e81e53..c344884 100644
>> --- a/drivers/net/ethernet/mellanox/mlx4/eq.c
>> +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
>> @@ -1364,6 +1364,10 @@ int mlx4_test_interrupts(struct mlx4_dev *dev)
>>        * and performing a NOP command
>>        */
>>       for(i = 0; !err && (i < dev->caps.num_comp_vectors); ++i) {
>> +        /* Make sure request_irq was called */
>> +        if (!priv->eq_table.eq[i].have_irq)
>> +            continue;
>> +
>>           /* Temporary use polling for command completions */
>>           mlx4_cmd_use_polling(dev);
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] net/mlx4_core: Test interrupts fail if not all comp vectors called request_irq
@ 2015-10-05 20:12 Or Gerlitz
  2015-10-06  7:28 ` Matan Barak
  0 siblings, 1 reply; 6+ messages in thread
From: Or Gerlitz @ 2015-10-05 20:12 UTC (permalink / raw)
  To: Carol Soto, Matan Barak
  Cc: Or Gerlitz, David Miller, Linux Netdev List, brking, Amir Vadai

On Mon, Oct 5, 2015 at 6:24 PM, Carol Soto <clsoto@linux.vnet.ibm.com> wrote:
>
>
> On 10/4/2015 3:03 AM, Or Gerlitz wrote:
>>
>> On 9/29/2015 9:38 PM, clsoto@linux.vnet.ibm.com wrote:
>>>
>>> From: Carol L Soto <clsoto@linux.vnet.ibm.com>
>>>
>>> Test interrupts fails if not all completion vectors called
>>> request_irq. This case can happen if only mlx4_en loads and
>>> we have more completion vectors than rx rings.
>>
>>
>> good catch! is this a bug since the driver 0-day or was introduced by
>> some recent commit? in the latercase, please add a Fixes: tag before your
>> S.O.B note.
>
> Probably the issue was introduced by this one
> Fixes: c66fa19c405a ('net/mlx4: Add EQ pool')

Matan, agree to the fix and analysis? if yes, Carol, please add the
Fixes: tag to the change-log
and anyway respin/submit the patch against/for net not net-next

Or.

>
>>>
>>> Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
>>> ---
>>>   drivers/net/ethernet/mellanox/mlx4/eq.c | 4 ++++
>>>   1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c
>>> b/drivers/net/ethernet/mellanox/mlx4/eq.c
>>> index 8e81e53..c344884 100644
>>> --- a/drivers/net/ethernet/mellanox/mlx4/eq.c
>>> +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
>>> @@ -1364,6 +1364,10 @@ int mlx4_test_interrupts(struct mlx4_dev *dev)
>>>        * and performing a NOP command
>>>        */
>>>       for(i = 0; !err && (i < dev->caps.num_comp_vectors); ++i) {
>>> +        /* Make sure request_irq was called */
>>> +        if (!priv->eq_table.eq[i].have_irq)
>>> +            continue;
>>> +
>>>           /* Temporary use polling for command completions */
>>>           mlx4_cmd_use_polling(dev);
>>
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] net/mlx4_core: Test interrupts fail if not all comp vectors called request_irq
  2015-10-05 15:24   ` Carol Soto
@ 2015-10-06  6:24     ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-10-06  6:24 UTC (permalink / raw)
  To: clsoto; +Cc: ogerlitz, netdev, brking, amirv

From: Carol Soto <clsoto@linux.vnet.ibm.com>
Date: Mon, 5 Oct 2015 10:24:19 -0500

> 
> 
> On 10/4/2015 3:03 AM, Or Gerlitz wrote:
>> On 9/29/2015 9:38 PM, clsoto@linux.vnet.ibm.com wrote:
>>> From: Carol L Soto <clsoto@linux.vnet.ibm.com>
>>>
>>> Test interrupts fails if not all completion vectors called
>>> request_irq. This case can happen if only mlx4_en loads and
>>> we have more completion vectors than rx rings.
>>
>> good catch! is this a bug since the driver 0-day or was introduced by
>> some recent commit? in the latercase, please add a Fixes: tag before
>> your S.O.B note.
> Probably the issue was introduced by this one
> Fixes: c66fa19c405a ('net/mlx4: Add EQ pool')

Please resubmit this patch with the Fixes: tag properly
added, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] net/mlx4_core: Test interrupts fail if not all comp vectors called request_irq
  2015-10-05 20:12 Or Gerlitz
@ 2015-10-06  7:28 ` Matan Barak
  0 siblings, 0 replies; 6+ messages in thread
From: Matan Barak @ 2015-10-06  7:28 UTC (permalink / raw)
  To: Or Gerlitz, Carol Soto
  Cc: Or Gerlitz, David Miller, Linux Netdev List, brking, Amir Vadai



On 10/5/2015 11:12 PM, Or Gerlitz wrote:
> On Mon, Oct 5, 2015 at 6:24 PM, Carol Soto <clsoto@linux.vnet.ibm.com> wrote:
>>
>>
>> On 10/4/2015 3:03 AM, Or Gerlitz wrote:
>>>
>>> On 9/29/2015 9:38 PM, clsoto@linux.vnet.ibm.com wrote:
>>>>
>>>> From: Carol L Soto <clsoto@linux.vnet.ibm.com>
>>>>
>>>> Test interrupts fails if not all completion vectors called
>>>> request_irq. This case can happen if only mlx4_en loads and
>>>> we have more completion vectors than rx rings.
>>>
>>>
>>> good catch! is this a bug since the driver 0-day or was introduced by
>>> some recent commit? in the latercase, please add a Fixes: tag before your
>>> S.O.B note.
>>
>> Probably the issue was introduced by this one
>> Fixes: c66fa19c405a ('net/mlx4: Add EQ pool')
>
> Matan, agree to the fix and analysis? if yes, Carol, please add the
> Fixes: tag to the change-log
> and anyway respin/submit the patch against/for net not net-next
>

Yeah, we should (obviously) only check EQs which are assigned to
interrupts, so skipping unassigned EQs is a good idea.
Good catch and thanks for the fix.

Matan

> Or.
>
>>
>>>>
>>>> Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
>>>> ---
>>>>    drivers/net/ethernet/mellanox/mlx4/eq.c | 4 ++++
>>>>    1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c
>>>> b/drivers/net/ethernet/mellanox/mlx4/eq.c
>>>> index 8e81e53..c344884 100644
>>>> --- a/drivers/net/ethernet/mellanox/mlx4/eq.c
>>>> +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
>>>> @@ -1364,6 +1364,10 @@ int mlx4_test_interrupts(struct mlx4_dev *dev)
>>>>         * and performing a NOP command
>>>>         */
>>>>        for(i = 0; !err && (i < dev->caps.num_comp_vectors); ++i) {
>>>> +        /* Make sure request_irq was called */
>>>> +        if (!priv->eq_table.eq[i].have_irq)
>>>> +            continue;
>>>> +
>>>>            /* Temporary use polling for command completions */
>>>>            mlx4_cmd_use_polling(dev);
>>>
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-06  7:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-29 18:38 [PATCH net-next] net/mlx4_core: Test interrupts fail if not all comp vectors called request_irq clsoto
2015-10-04  8:03 ` Or Gerlitz
2015-10-05 15:24   ` Carol Soto
2015-10-06  6:24     ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2015-10-05 20:12 Or Gerlitz
2015-10-06  7:28 ` Matan Barak

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).