aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-04-15 00:53:48 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-15 00:53:48 -0400
commit95615d90a321349709c80091f2a9cb284757ff0d (patch)
tree32c338118b4d267a6a7d764424989283189144e0
parent6fd4777a1fec1f7757b5a302ad3fdcc1eae2abba (diff)
ixgbe: fix tx queue index
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> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 9ef128ae6458..862dd344533e 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)
4342 int count = 0; 4342 int count = 0;
4343 unsigned int f; 4343 unsigned int f;
4344 4344
4345 r_idx = (adapter->num_tx_queues - 1) & skb->queue_mapping; 4345 r_idx = skb->queue_mapping;
4346 tx_ring = &adapter->tx_ring[r_idx]; 4346 tx_ring = &adapter->tx_ring[r_idx];
4347 4347
4348 if (adapter->vlgrp && vlan_tx_tag_present(skb)) { 4348 if (adapter->vlgrp && vlan_tx_tag_present(skb)) {