Skip to content

Commit

Permalink
ixgbe: fix tx queue index
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wu Fengguang authored and David S. Miller committed Apr 15, 2009
1 parent 6fd4777 commit 95615d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 95615d9

Please sign in to comment.