[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6DCFFFAC2B@AcuExch.aculab.com>
Date: Fri, 19 May 2017 14:46:34 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Bjørn Mork' <bjorn@...k.no>
CC: 'Jim Baxter' <jim_baxter@...tor.com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Oliver Neukum <oliver@...kum.org>
Subject: RE: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory
low
From: Bjørn Mork
> Sent: 19 May 2017 14:56
...
> Unless someone has a nice way to just collect a list of skbs and have
> them converted to proper framing on the fly when transmitting, without
> having to care about USB packet boundaries.
skb can be linked into arbitrary chains (or even trees), but I suspect
the usbnet code would need to be taught about them.
For XHCI it isn't too bad because it will do arbitrary scatter-gather
(apart from the ring end).
But I believe the earlier controllers only support fragments that
end on usb packet boundaries.
I looked at the usbnet code a few years ago, I'm sure it ought to
be possible to shortcut most of the code that uses URB and directly
write to the xhci (in particular) ring descriptors.
For receive you probably want to feed the USB stack multiple (probably)
2k buffers, and handle the debatching into ethernet frames yourself.
One of the ASIX drivers used to be particularly bad, it allocated 64k
skb for receive (the hardware can merge IP packets) and then hacked
the true_size before passing upstream.
David
Powered by blists - more mailing lists