* [net-2.6 PATCH 1/2] ixgbe: Fix ixgbe_tx_map error path
@ 2010-02-03 23:12 Jeff Kirsher
2010-02-03 23:13 ` [net-2.6 PATCH 2/2] ixgbe: Fix return of invalid txq Jeff Kirsher
2010-02-04 3:17 ` [net-2.6 PATCH 1/2] ixgbe: Fix ixgbe_tx_map error path David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Jeff Kirsher @ 2010-02-03 23:12 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Anton Blanchard, Jeff Kirsher
From: Anton Blanchard <anton@samba.org>
Commit e5a43549f7a58509a91b299a51337d386697b92c (ixgbe: remove
skb_dma_map/unmap calls from driver) looks to have introduced a bug in
ixgbe_tx_map. If we get an error from a PCI DMA call, we loop backwards
through count until it becomes -1 and return that.
The caller of ixgbe_tx_map expects 0 on error, so return that instead.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index b5f64ad..37e2af0 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -5179,7 +5179,7 @@ dma_error:
ixgbe_unmap_and_free_tx_resource(adapter, tx_buffer_info);
}
- return count;
+ return 0;
}
static void ixgbe_tx_queue(struct ixgbe_adapter *adapter,
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [net-2.6 PATCH 2/2] ixgbe: Fix return of invalid txq
2010-02-03 23:12 [net-2.6 PATCH 1/2] ixgbe: Fix ixgbe_tx_map error path Jeff Kirsher
@ 2010-02-03 23:13 ` Jeff Kirsher
2010-02-04 3:17 ` David Miller
2010-02-04 3:17 ` [net-2.6 PATCH 1/2] ixgbe: Fix ixgbe_tx_map error path David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Jeff Kirsher @ 2010-02-03 23:13 UTC (permalink / raw)
To: davem
Cc: netdev, gospo, Krishna Kumar, Jesse Brandeburg,
Peter P Waskiewicz Jr, Jeff Kirsher
From: Krishna Kumar <krkumar2@in.ibm.com>
a developer had complained of getting lots of warnings:
"eth16 selects TX queue 98, but real number of TX queues is 64"
http://www.mail-archive.com/e1000-devel@lists.sourceforge.net/msg02200.html
As there was no follow up on that bug, I am submitting this
patch assuming that the other return points will not return
invalid txq's, and also that this fixes the bug (not tested).
Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_main.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 37e2af0..7b7c848 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -5329,8 +5329,11 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)
struct ixgbe_adapter *adapter = netdev_priv(dev);
int txq = smp_processor_id();
- if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE)
+ if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) {
+ while (unlikely(txq >= dev->real_num_tx_queues))
+ txq -= dev->real_num_tx_queues;
return txq;
+ }
#ifdef IXGBE_FCOE
if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) &&
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [net-2.6 PATCH 1/2] ixgbe: Fix ixgbe_tx_map error path
2010-02-03 23:12 [net-2.6 PATCH 1/2] ixgbe: Fix ixgbe_tx_map error path Jeff Kirsher
2010-02-03 23:13 ` [net-2.6 PATCH 2/2] ixgbe: Fix return of invalid txq Jeff Kirsher
@ 2010-02-04 3:17 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2010-02-04 3:17 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, anton
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 03 Feb 2010 15:12:51 -0800
> From: Anton Blanchard <anton@samba.org>
>
> Commit e5a43549f7a58509a91b299a51337d386697b92c (ixgbe: remove
> skb_dma_map/unmap calls from driver) looks to have introduced a bug in
> ixgbe_tx_map. If we get an error from a PCI DMA call, we loop backwards
> through count until it becomes -1 and return that.
>
> The caller of ixgbe_tx_map expects 0 on error, so return that instead.
>
> Signed-off-by: Anton Blanchard <anton@samba.org>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [net-2.6 PATCH 2/2] ixgbe: Fix return of invalid txq
2010-02-03 23:13 ` [net-2.6 PATCH 2/2] ixgbe: Fix return of invalid txq Jeff Kirsher
@ 2010-02-04 3:17 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-02-04 3:17 UTC (permalink / raw)
To: jeffrey.t.kirsher
Cc: netdev, gospo, krkumar2, jesse.brandeburg, peter.p.waskiewicz.jr
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 03 Feb 2010 15:13:10 -0800
> From: Krishna Kumar <krkumar2@in.ibm.com>
>
> a developer had complained of getting lots of warnings:
>
> "eth16 selects TX queue 98, but real number of TX queues is 64"
>
> http://www.mail-archive.com/e1000-devel@lists.sourceforge.net/msg02200.html
>
> As there was no follow up on that bug, I am submitting this
> patch assuming that the other return points will not return
> invalid txq's, and also that this fixes the bug (not tested).
>
> Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-02-04 3:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-03 23:12 [net-2.6 PATCH 1/2] ixgbe: Fix ixgbe_tx_map error path Jeff Kirsher
2010-02-03 23:13 ` [net-2.6 PATCH 2/2] ixgbe: Fix return of invalid txq Jeff Kirsher
2010-02-04 3:17 ` David Miller
2010-02-04 3:17 ` [net-2.6 PATCH 1/2] ixgbe: Fix ixgbe_tx_map error path David Miller
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).