* [net-2.6 PATCH 1/2] ixgbe: fix tx queue index
@ 2009-04-15 3:51 Jeff Kirsher
2009-04-15 3:52 ` [net-2.6 PATCH 2/2] ixgbe: update real_num_tx_queues on changing num_rx_queues Jeff Kirsher
2009-04-15 4:54 ` [net-2.6 PATCH 1/2] ixgbe: fix tx queue index David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Jeff Kirsher @ 2009-04-15 3:51 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Wu Fengguang, Jeff Kirsher
From: Wu Fengguang <fengguang.wu@intel.com>
Don't do the num_tx_queues based masking on calculating tx queue
index.
1) num_tx_queues is not always power-of-2, because it also depends on
the online cpu numbers. So the masking could be a performance bug
on a 6 cpu system.
2) queue_mapping will be limited by real_num_tx_queues=num_tx_queues
in the generic netdev function set_cur_queue_map(). So the bound
limiting here is not necessary.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
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 9ef128a..862dd34 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -4342,7 +4342,7 @@ static int ixgbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
int count = 0;
unsigned int f;
- r_idx = (adapter->num_tx_queues - 1) & skb->queue_mapping;
+ r_idx = skb->queue_mapping;
tx_ring = &adapter->tx_ring[r_idx];
if (adapter->vlgrp && vlan_tx_tag_present(skb)) {
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [net-2.6 PATCH 2/2] ixgbe: update real_num_tx_queues on changing num_rx_queues
2009-04-15 3:51 [net-2.6 PATCH 1/2] ixgbe: fix tx queue index Jeff Kirsher
@ 2009-04-15 3:52 ` Jeff Kirsher
2009-04-15 4:54 ` David Miller
2009-04-15 4:54 ` [net-2.6 PATCH 1/2] ixgbe: fix tx queue index David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Jeff Kirsher @ 2009-04-15 3:52 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Wu Fengguang, Jeff Kirsher
From: Wu Fengguang <fengguang.wu@intel.com>
Move the update of real_num_tx_queues from
ixgbe_acquire_msix_vectors() to ixgbe_set_num_queues(), to ensure it
be always in sync with num_tx_queues.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_main.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 862dd34..11fd153 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2723,17 +2723,21 @@ static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
**/
static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter)
{
- /* Start with base case */
- adapter->num_rx_queues = 1;
- adapter->num_tx_queues = 1;
-
#ifdef CONFIG_IXGBE_DCB
if (ixgbe_set_dcb_queues(adapter))
- return;
+ goto done;
#endif
if (ixgbe_set_rss_queues(adapter))
- return;
+ goto done;
+
+ /* fallback to base case */
+ adapter->num_rx_queues = 1;
+ adapter->num_tx_queues = 1;
+
+done:
+ /* Notify the stack of the (possibly) reduced Tx Queue count. */
+ adapter->netdev->real_num_tx_queues = adapter->num_tx_queues;
}
static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter,
@@ -2992,9 +2996,6 @@ try_msi:
}
out:
- /* Notify the stack of the (possibly) reduced Tx Queue count. */
- adapter->netdev->real_num_tx_queues = adapter->num_tx_queues;
-
return err;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [net-2.6 PATCH 1/2] ixgbe: fix tx queue index
2009-04-15 3:51 [net-2.6 PATCH 1/2] ixgbe: fix tx queue index Jeff Kirsher
2009-04-15 3:52 ` [net-2.6 PATCH 2/2] ixgbe: update real_num_tx_queues on changing num_rx_queues Jeff Kirsher
@ 2009-04-15 4:54 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2009-04-15 4:54 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, fengguang.wu
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 14 Apr 2009 20:51:58 -0700
> Don't do the num_tx_queues based masking on calculating tx queue
> index.
>
> 1) num_tx_queues is not always power-of-2, because it also depends on
> the online cpu numbers. So the masking could be a performance bug
> on a 6 cpu system.
> 2) queue_mapping will be limited by real_num_tx_queues=num_tx_queues
> in the generic netdev function set_cur_queue_map(). So the bound
> limiting here is not necessary.
>
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
> 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: update real_num_tx_queues on changing num_rx_queues
2009-04-15 3:52 ` [net-2.6 PATCH 2/2] ixgbe: update real_num_tx_queues on changing num_rx_queues Jeff Kirsher
@ 2009-04-15 4:54 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-04-15 4:54 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, fengguang.wu
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 14 Apr 2009 20:52:17 -0700
> Move the update of real_num_tx_queues from
> ixgbe_acquire_msix_vectors() to ixgbe_set_num_queues(), to ensure it
> be always in sync with num_tx_queues.
>
> Signed-off-by: Wu Fengguang <fengguang.wu@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:[~2009-04-15 4:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-15 3:51 [net-2.6 PATCH 1/2] ixgbe: fix tx queue index Jeff Kirsher
2009-04-15 3:52 ` [net-2.6 PATCH 2/2] ixgbe: update real_num_tx_queues on changing num_rx_queues Jeff Kirsher
2009-04-15 4:54 ` David Miller
2009-04-15 4:54 ` [net-2.6 PATCH 1/2] ixgbe: fix tx queue index 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).