Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1645660

RE: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

From David Laight <David.Laight@ACULAB.COM>
Newsgroups linux.kernel
Subject RE: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low
Date 2017-05-19 16:50 +0200
Message-ID <tIRo5-3Bo-13@gated-at.bofh.it> (permalink)
References <tHOLD-9u-3@gated-at.bofh.it> <tHOLD-9u-1@gated-at.bofh.it> <tIO6S-1nG-19@gated-at.bofh.it> <tIQBH-2TK-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low Jim Baxter <jim_baxter@mentor.com> - 2017-05-16 19:50 +0200
  Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low Bjørn Mork <bjorn@mork.no> - 2017-05-16 20:30 +0200
    Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory  low Oliver Neukum <oneukum@suse.com> - 2017-05-17 09:50 +0200
      Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory  low "Baxter, Jim" <jim_baxter@mentor.com> - 2017-05-17 13:00 +0200
    Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel  memory low David Miller <davem@davemloft.net> - 2017-05-17 20:20 +0200
      Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory  low Oliver Neukum <oneukum@suse.com> - 2017-05-18 12:10 +0200
      Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory  low "Baxter, Jim" <jim_baxter@mentor.com> - 2017-05-22 17:50 +0200
        Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel  memory low David Miller <davem@davemloft.net> - 2017-05-22 18:00 +0200
          Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory  low Oliver Neukum <oneukum@suse.com> - 2017-05-23 10:50 +0200
            Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel  memory low David Miller <davem@davemloft.net> - 2017-05-23 17:30 +0200
              Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory  low "Baxter, Jim" <jim_baxter@mentor.com> - 2017-05-23 21:10 +0200
  RE: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory  low David Laight <David.Laight@ACULAB.COM> - 2017-05-19 13:20 +0200
    Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low Bjørn Mork <bjorn@mork.no> - 2017-05-19 16:00 +0200
      RE: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory  low David Laight <David.Laight@ACULAB.COM> - 2017-05-19 16:50 +0200
        Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory  low Oliver Neukum <oneukum@suse.com> - 2017-05-22 15:30 +0200

csiph-web