Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] bnx2x: use XPS if possible for bnx2x_select_queue instead of pure hash
@ 2013-06-01  0:32 Eric Dumazet
  2013-06-01 11:27 ` Dmitry Kravkov
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2013-06-01  0:32 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, govindarajulu.v, Havard Skinnemoen, Eilon Greenstein

From: Eric Dumazet <edumazet@google.com>

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 <govindarajulu90@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Havard Skinnemoen <hskinnemoen@google.com>
Cc: Ying Cai <ycai@google.com>
Cc: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index c80f1d2..3651f6d 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -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)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-02  2:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-01  0:32 [PATCH net-next] bnx2x: use XPS if possible for bnx2x_select_queue instead of pure hash Eric Dumazet
2013-06-01 11:27 ` Dmitry Kravkov
2013-06-02  2:38   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox