bnx2x: use XPS if possible for bnx2x_select_queue instead of pure hash
authorEric Dumazet <[email protected]>
Fri, 31 May 2013 14:32:55 +0000 (14:32 +0000)
committerDavid S. Miller <[email protected]>
Sun, 2 Jun 2013 02:38:32 +0000 (19:38 -0700)
The bnx2x_select_queue() was using __skb_tx_hash() to select the
transmit queue, totally ignoring XPS settings, while XPS can help
performance quite significantly, so change the bnx2x_select_queue()
to use __dev_pick_tx() instead which will use XPS if configured.

Based on patches from Ying Cai and Havard Skinnemoen

Reported-by: govindarajulu.v <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Havard Skinnemoen <[email protected]>
Cc: Ying Cai <[email protected]>
Cc: Eilon Greenstein <[email protected]>
Acked-by: Dmitry Kravkov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c

index c80f1d26f40d5487fd0db150b62f8e7bd5c9b9f8..3651f6d449ebe7a245139aaf792fd1d6cac6497f 100644 (file)
@@ -1829,7 +1829,7 @@ u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb)
        }
 
        /* select a non-FCoE queue */
-       return __skb_tx_hash(dev, skb, BNX2X_NUM_ETH_QUEUES(bp));
+       return __netdev_pick_tx(dev, skb) % BNX2X_NUM_ETH_QUEUES(bp);
 }
 
 void bnx2x_set_num_queues(struct bnx2x *bp)