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...@intel.com>
---
 drivers/net/ixgbe/ixgbe_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- mm.orig/drivers/net/ixgbe/ixgbe_main.c
+++ mm/drivers/net/ixgbe/ixgbe_main.c
@@ -4223,7 +4223,7 @@ static int ixgbe_xmit_frame(struct sk_bu
        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)) {

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel

Reply via email to