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>,
Sarah Sharp <sarah.a.sharp@linux.intel.com>,
netdev@vger.kernel.org, linux-usb@vger.kernel.org
Subject: [PATCH v3 0/4] USB & USBNET: loose SG check and support usbnet DMA SG
Date: Tue, 6 Aug 2013 08:52:45 +0800 [thread overview]
Message-ID: <1375750370-18194-1-git-send-email-ming.lei@canonical.com> (raw)
Hi,
This patchset allows drivers to pass sg buffers which size can't be divided
by max packet size of endpoint if the host controllers(such ax xHCI) support
this kind of sg buffers.
Previously we added check[1] on the situation and don't allow these sg buffers
passed to USB HCD, looks the check is too strict to make use of new feature of
new hardware(xHCI) for some applications(such as network stack) which can't
provide this kind of sg buffers to usbnet driver, so the patch looses the check
in case that the host controller supports it.
Patch 3/4 implements DMA SG on usbnet driver, and patch 4/4 uses it on ax88179_178a
USB3 NIC for supporting TSO, so both CPU utilization and tx throughput can be
improved with TSO and DMA SG in case of the USB NIC is attached to xHCI controller.
This patchset depends on both net-next and usb-next tree, so hope David and Greg
to figure out one elegent way to merge it.
[1], http://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit/?h=usb-next&id=10e232c597ac757e7f8600649f7e872e86de190f
V3:
- save 3 lines code for usb_device_no_sg_constraint() as suggested by Alan
- fix urb->sg leak in xmit failure path
V2:
- add missed kfree(urb->sg) in 3/4
- rename no_sg_limit as no_sg_constraint as suggested by Alan
V1:
- introduce and apply usb_device_no_sg_limit() helper as suggested by Greg
- simplify patch 4/4 against Eric Dumazet's patch(ax88179_178a: avoid copy of tx tcp packets)
- don't pass usbnet header as sg buffer
drivers/net/usb/ax88179_178a.c | 12 +++++++++++
drivers/net/usb/usbnet.c | 45 +++++++++++++++++++++++++++++++++++++---
drivers/usb/core/urb.c | 3 ++-
drivers/usb/host/xhci.c | 4 ++++
include/linux/usb.h | 8 ++++++-
include/linux/usb/usbnet.h | 1 +
6 files changed, 68 insertions(+), 5 deletions(-)
Thanks,
--
Ming Lei
next reply other threads:[~2013-08-06 0:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-06 0:52 Ming Lei [this message]
2013-08-06 0:52 ` [PATCH v3 1/4] USB: introduce usb_device_no_sg_constraint() helper Ming Lei
2013-08-06 0:52 ` [PATCH v3 2/4] USB: XHCI: mark no_sg_constraint Ming Lei
2013-08-06 0:52 ` [PATCH v3 3/4] USBNET: support DMA SG Ming Lei
2013-08-06 12:08 ` Oliver Neukum
2013-08-06 0:52 ` [PATCH v3 4/4] USBNET: ax88179_178a: enable tso if usb host supports sg dma Ming Lei
2013-08-06 12:22 ` Eric Dumazet
2013-08-06 15:07 ` Ming Lei
2013-08-06 17:09 ` Grant Grundler
2013-08-07 0:41 ` Ming Lei
2013-08-08 17:25 ` Grant Grundler
2013-08-08 23:48 ` Ming Lei
2013-08-09 0:18 ` Grant Grundler
2013-08-09 1:44 ` Ming Lei
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=1375750370-18194-1-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 \
--cc=sarah.a.sharp@linux.intel.com \
/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