From: Ming Lei <ming.lei@canonical.com>
To: "David S. Miller" <davem@davemloft.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Oliver Neukum <oneukum@suse.de>,
netdev@vger.kernel.org, linux-usb@vger.kernel.org,
Ming Lei <ming.lei@canonical.com>
Subject: [PATCH 2/2] USBNET: increase max rx/tx qlen for improving USB3 thoughtput
Date: Thu, 25 Jul 2013 13:47:54 +0800 [thread overview]
Message-ID: <1374731274-27415-3-git-send-email-ming.lei@canonical.com> (raw)
In-Reply-To: <1374731274-27415-1-git-send-email-ming.lei@canonical.com>
The default RX_QLEN()/TX_QLEN() didn't consider susper speed
USB device, so only max 4 URBs are scheduled at the same time
for tx/rx, then USB3 NIC can't perform very well.
With this patch, both rx and tx thoughput are increased more than
100Mbps when doing iperf test on ax88179_178a USB 3.0 NIC.
Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
drivers/net/usb/usbnet.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index d74de07..e4811d7 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -355,6 +355,15 @@ void usbnet_update_max_qlen(struct usbnet *dev)
dev->rx_qlen = MAX_QUEUE_MEMORY / dev->rx_urb_size;
dev->tx_qlen = MAX_QUEUE_MEMORY / dev->hard_mtu;
break;
+ case USB_SPEED_SUPER:
+ /*
+ * Not take default 5ms qlen for super speed HC to
+ * save memory, and iperf tests show 2.5ms qlen can
+ * work well
+ */
+ dev->rx_qlen = 5 * MAX_QUEUE_MEMORY / dev->rx_urb_size;
+ dev->tx_qlen = 5 * MAX_QUEUE_MEMORY / dev->hard_mtu;
+ break;
default:
dev->rx_qlen = dev->tx_qlen = 4;
}
--
1.7.9.5
next prev parent reply other threads:[~2013-07-25 5:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-25 5:47 [PATCH 0/2] USBNET: max rx/tx qlen change Ming Lei
2013-07-25 5:47 ` [PATCH 1/2] USBNET: centralize computing of max rx/tx qlen Ming Lei
2013-07-25 5:47 ` Ming Lei [this message]
[not found] ` <1374731274-27415-1-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2013-07-25 7:38 ` [PATCH 0/2] USBNET: max rx/tx qlen change Oliver Neukum
2013-07-25 14:19 ` Ming Lei
[not found] ` <CACVXFVO5XCY2i+QhHL500TqDp7DiLEyvgUvDWxVpMRwd+pt3VA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-26 9:27 ` Oliver Neukum
2013-07-28 3:11 ` 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=1374731274-27415-3-git-send-email-ming.lei@canonical.com \
--to=ming.lei@canonical.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oneukum@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).