diff mbox

forcedeth: make msi-x different name for rx-tx

Message ID 498BC3A8.9040203@kernel.org
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Yinghai Lu Feb. 6, 2009, 4:59 a.m. UTC
Impact: make /proc/interrupts could show more info which irq is rx or other for msi-x

add three name fields for rx, tx, other

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 drivers/net/forcedeth.c |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

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

Comments

David Miller Feb. 6, 2009, 9:31 a.m. UTC | #1
From: Yinghai Lu <yinghai@kernel.org>
Date: Thu, 05 Feb 2009 20:59:20 -0800

> 
> Impact: make /proc/interrupts could show more info which irq is rx or other for msi-x
> 
> add three name fields for rx, tx, other
> 
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>

Applied to net-next-2.6
--
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
Ingo Molnar Feb. 6, 2009, 2:49 p.m. UTC | #2
Cool cleanups!

Would you mind to also fix the following - on all my systems that have 
forcedeth gigabit ethernet i've been getting these bogus warnings for 
_years_, under moderate load:

  eth2: too many iterations (16) in nv_nic_irq.

I think a 64 iterations limit will work much better. (i tried a limit of 50 
a year ago for a while and it worked fine and had no side effects - and the 
bogus warnings were done.)

	Ingo

--
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
Yinghai Lu Feb. 6, 2009, 4:57 p.m. UTC | #3
Ingo Molnar wrote:
> Cool cleanups!
> 
> Would you mind to also fix the following - on all my systems that have 
> forcedeth gigabit ethernet i've been getting these bogus warnings for 
> _years_, under moderate load:
> 
>   eth2: too many iterations (16) in nv_nic_irq.
> 
> I think a 64 iterations limit will work much better. (i tried a limit of 50 
> a year ago for a while and it worked fine and had no side effects - and the 
> bogus warnings were done.)

you may enable CONFIG_FORCEDETH_NAPI.

we should enable NAPI for forcedeth by default, and try to squash more bugs out.

YH
--
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
Ingo Molnar Feb. 6, 2009, 5:15 p.m. UTC | #4
* Yinghai Lu <yinghai@kernel.org> wrote:

> Ingo Molnar wrote:
> > Cool cleanups!
> > 
> > Would you mind to also fix the following - on all my systems that have 
> > forcedeth gigabit ethernet i've been getting these bogus warnings for 
> > _years_, under moderate load:
> > 
> >   eth2: too many iterations (16) in nv_nic_irq.
> > 
> > I think a 64 iterations limit will work much better. (i tried a limit of 50 
> > a year ago for a while and it worked fine and had no side effects - and the 
> > bogus warnings were done.)
> 
> you may enable CONFIG_FORCEDETH_NAPI.
> 
> we should enable NAPI for forcedeth by default, and try to squash more bugs out.

i do have that:

 CONFIG_FORCEDETH=y
 CONFIG_FORCEDETH_NAPI=y

and the messages still come.

	Ingo
--
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
Yinghai Lu Feb. 6, 2009, 5:54 p.m. UTC | #5
Ingo Molnar wrote:
> * Yinghai Lu <yinghai@kernel.org> wrote:
> 
>> Ingo Molnar wrote:
>>> Cool cleanups!
>>>
>>> Would you mind to also fix the following - on all my systems that have 
>>> forcedeth gigabit ethernet i've been getting these bogus warnings for 
>>> _years_, under moderate load:
>>>
>>>   eth2: too many iterations (16) in nv_nic_irq.
>>>
>>> I think a 64 iterations limit will work much better. (i tried a limit of 50 
>>> a year ago for a while and it worked fine and had no side effects - and the 
>>> bogus warnings were done.)
>> you may enable CONFIG_FORCEDETH_NAPI.
>>
>> we should enable NAPI for forcedeth by default, and try to squash more bugs out.
> 
> i do have that:
> 
>  CONFIG_FORCEDETH=y
>  CONFIG_FORCEDETH_NAPI=y
> 
> and the messages still come.

so you systems are using ioapic routing, or msi.

and those messages are from 
nv_nic_irq_optimized or nv_nic_irq
for TX or OTHER (timerirq).

YH
--
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
Ingo Molnar Feb. 9, 2009, noon UTC | #6
* Yinghai Lu <yinghai@kernel.org> wrote:

> Ingo Molnar wrote:
> > * Yinghai Lu <yinghai@kernel.org> wrote:
> > 
> >> Ingo Molnar wrote:
> >>> Cool cleanups!
> >>>
> >>> Would you mind to also fix the following - on all my systems that have 
> >>> forcedeth gigabit ethernet i've been getting these bogus warnings for 
> >>> _years_, under moderate load:
> >>>
> >>>   eth2: too many iterations (16) in nv_nic_irq.
> >>>
> >>> I think a 64 iterations limit will work much better. (i tried a limit of 50 
> >>> a year ago for a while and it worked fine and had no side effects - and the 
> >>> bogus warnings were done.)
> >> you may enable CONFIG_FORCEDETH_NAPI.
> >>
> >> we should enable NAPI for forcedeth by default, and try to squash more bugs out.
> > 
> > i do have that:
> > 
> >  CONFIG_FORCEDETH=y
> >  CONFIG_FORCEDETH_NAPI=y
> > 
> > and the messages still come.
> 
> so you systems are using ioapic routing, or msi.
> 
> and those messages are from 
> nv_nic_irq_optimized or nv_nic_irq
> for TX or OTHER (timerirq).

yes, IO-APIC:

 18:      81386  306713817          0          0 1413724087          0          0          
0          0          0          0          0          0          0          0          
0   IO-APIC-fasteoi   eth2

Those messages do come and are annoying.

	Ingo
--
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
Yinghai Lu Feb. 9, 2009, 7:13 p.m. UTC | #7
Ingo Molnar wrote:
> * Yinghai Lu <yinghai@kernel.org> wrote:
> 
>> Ingo Molnar wrote:
>>> * Yinghai Lu <yinghai@kernel.org> wrote:
>>>
>>>> Ingo Molnar wrote:
>>>>> Cool cleanups!
>>>>>
>>>>> Would you mind to also fix the following - on all my systems that have 
>>>>> forcedeth gigabit ethernet i've been getting these bogus warnings for 
>>>>> _years_, under moderate load:
>>>>>
>>>>>   eth2: too many iterations (16) in nv_nic_irq.
>>>>>
>>>>> I think a 64 iterations limit will work much better. (i tried a limit of 50 
>>>>> a year ago for a while and it worked fine and had no side effects - and the 
>>>>> bogus warnings were done.)
>>>> you may enable CONFIG_FORCEDETH_NAPI.
>>>>
>>>> we should enable NAPI for forcedeth by default, and try to squash more bugs out.
>>> i do have that:
>>>
>>>  CONFIG_FORCEDETH=y
>>>  CONFIG_FORCEDETH_NAPI=y
>>>
>>> and the messages still come.
>> so you systems are using ioapic routing, or msi.
>>
>> and those messages are from 
>> nv_nic_irq_optimized or nv_nic_irq
>> for TX or OTHER (timerirq).
> 
> yes, IO-APIC:
> 
>  18:      81386  306713817          0          0 1413724087          0          0          
> 0          0          0          0          0          0          0          0          
> 0   IO-APIC-fasteoi   eth2
> 
> Those messages do come and are annoying.

it seems timerirq by nic cause extra irq...
need to figure out why all devices need that workaround..., checked ck804 and mcp55 doesn't need it.

YH
--
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
diff mbox

Patch

Index: linux-2.6/drivers/net/forcedeth.c
===================================================================
--- linux-2.6.orig/drivers/net/forcedeth.c
+++ linux-2.6/drivers/net/forcedeth.c
@@ -812,6 +812,11 @@  struct fe_priv {
 
 	/* power saved state */
 	u32 saved_config_space[NV_PCI_REGSZ_MAX/4];
+
+	/* for different msi-x irq type */
+	char name_rx[IFNAMSIZ + 3];       /* -rx    */
+	char name_tx[IFNAMSIZ + 3];       /* -tx    */
+	char name_other[IFNAMSIZ + 6];    /* -other */
 };
 
 /*
@@ -3918,21 +3923,27 @@  static int nv_request_irq(struct net_dev
 			np->msi_flags |= NV_MSI_X_ENABLED;
 			if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT && !intr_test) {
 				/* Request irq for rx handling */
-				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, &nv_nic_irq_rx, IRQF_SHARED, dev->name, dev) != 0) {
+				sprintf(np->name_rx, "%s-rx", dev->name);
+				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector,
+						&nv_nic_irq_rx, IRQF_SHARED, np->name_rx, dev) != 0) {
 					printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret);
 					pci_disable_msix(np->pci_dev);
 					np->msi_flags &= ~NV_MSI_X_ENABLED;
 					goto out_err;
 				}
 				/* Request irq for tx handling */
-				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, &nv_nic_irq_tx, IRQF_SHARED, dev->name, dev) != 0) {
+				sprintf(np->name_tx, "%s-tx", dev->name);
+				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector,
+						&nv_nic_irq_tx, IRQF_SHARED, np->name_tx, dev) != 0) {
 					printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret);
 					pci_disable_msix(np->pci_dev);
 					np->msi_flags &= ~NV_MSI_X_ENABLED;
 					goto out_free_rx;
 				}
 				/* Request irq for link and timer handling */
-				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, &nv_nic_irq_other, IRQF_SHARED, dev->name, dev) != 0) {
+				sprintf(np->name_other, "%s-other", dev->name);
+				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector,
+						&nv_nic_irq_other, IRQF_SHARED, np->name_other, dev) != 0) {
 					printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret);
 					pci_disable_msix(np->pci_dev);
 					np->msi_flags &= ~NV_MSI_X_ENABLED;