From: Jim Baxter <jim_baxter@mentor.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Felipe Balbi" <balbi@ti.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
"Bjørn Mork" <bjorn@mork.no>,
"David Laight" <David.Laight@ACULAB.COM>,
netdev@vger.kernel.org
Subject: Re: [PATCH v1 3/3] usb: gadget: NCM: Stop RX TCP Bursts getting dropped.
Date: Fri, 30 May 2014 12:25:48 +0100 [thread overview]
Message-ID: <53886ABC.8030303@mentor.com> (raw)
In-Reply-To: <1401390263.3645.51.camel@edumazet-glaptop2.roam.corp.google.com>
On 29/05/14 20:04, Eric Dumazet wrote:
> On Thu, 2014-05-29 at 18:12 +0100, Jim Baxter wrote:
>> This fixes a problem with dropped packets over 16k CDC-NCM
>> when the connection is being heavily used.
>>
>> The issue was that the skb truesize for the unpacked NCM
>> packets was too high after they were cloned from the 16k
>> skb, this lead to the potential memory calculated by the
>> Kernel running out of memory earlier then it should.
>>
>> Signed-off-by: Jim Baxter <jim_baxter@mentor.com>
>> ---
>
> Note the patch is OK, but changelog a bit misleading ;)
>
> Kernel was not running out of memory, because truesize was correct.
>
> The problem here is that a frame was consuming more kernel memory than
> really needed, so chances of hitting socket sk_rcvbuf limit was high.
>
> BTW :
> #define NTB_OUT_SIZE 16384
>
> alloc_skb(size) ->
> kmalloc(16384 + sizeof(struct skb_shared_info)) ->
> roundup() => 32768
>
> So truesize of the skb was infact ~32KB, which is really insane indeed.
> After your patch, its back to ~2KB
>
> Acked-by: Eric Dumazet <edumazet@google.com>
>
>
>
Thank you, I will clarify the description.
Jim
next prev parent reply other threads:[~2014-05-30 11:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Jim Baxter <jim_baxter@mentor.com>
2013-07-16 18:29 ` [RFC] kbuild: Build samples directory with make modules Jim Baxter
2013-07-16 19:37 ` Sam Ravnborg
2013-07-16 21:15 ` Jim Baxter
[not found] ` <CAAZheXmEuSB0C-xDS1HWa2npX13s5TdPfpxfmnYQU6y4r9T66A@mail.gmail.com>
2014-01-09 16:01 ` Fwd: " Syed Muhammad Mohsin Kazmi
2014-05-29 17:12 ` [PATCH v1 0/3] usb: gadget: NCM: Fixes and Multi-frame for TX Jim Baxter
2014-05-29 17:12 ` [PATCH v1 1/3] usb: gadget: NCM: RX function support multiple NDPs Jim Baxter
2014-05-29 18:55 ` Bjørn Mork
2014-05-30 11:45 ` Jim Baxter
2014-05-29 17:12 ` [PATCH v1 2/3] usb: gadget: NCM: Add transmit multi-frame Jim Baxter
2014-05-29 17:12 ` [PATCH v1 3/3] usb: gadget: NCM: Stop RX TCP Bursts getting dropped Jim Baxter
2014-05-29 19:04 ` Eric Dumazet
2014-05-30 11:25 ` Jim Baxter [this message]
2014-06-12 9:38 ` Jim Baxter
2014-06-12 9:42 ` David Laight
2014-07-07 17:33 ` [PATCH v2 0/3] usb: gadget: NCM: Fixes and Multi-frame for TX Jim Baxter
2014-07-07 17:33 ` [PATCH v2 1/3] usb: gadget: NCM: RX function support multiple NDPs Jim Baxter
2014-07-07 17:33 ` [PATCH v2 2/3] usb: gadget: NCM: Add transmit multi-frame Jim Baxter
2014-07-07 17:33 ` [PATCH v2 3/3] usb: gadget: NCM: Stop RX TCP Bursts getting dropped Jim Baxter
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=53886ABC.8030303@mentor.com \
--to=jim_baxter@mentor.com \
--cc=David.Laight@ACULAB.COM \
--cc=balbi@ti.com \
--cc=bjorn@mork.no \
--cc=eric.dumazet@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).