Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
	"govindarajulu.v" <govindarajulu90@gmail.com>,
	Havard Skinnemoen <hskinnemoen@google.com>,
	Eilon Greenstein <eilong@broadcom.com>
Subject: [PATCH net-next] bnx2x: use XPS if possible for bnx2x_select_queue instead of pure hash
Date: Fri, 31 May 2013 17:32:55 -0700	[thread overview]
Message-ID: <1370046775.24311.16.camel@edumazet-glaptop> (raw)

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)

             reply	other threads:[~2013-06-01  0:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-01  0:32 Eric Dumazet [this message]
2013-06-01 11:27 ` [PATCH net-next] bnx2x: use XPS if possible for bnx2x_select_queue instead of pure hash Dmitry Kravkov
2013-06-02  2:38   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370046775.24311.16.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eilong@broadcom.com \
    --cc=govindarajulu90@gmail.com \
    --cc=hskinnemoen@google.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox