From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: shemminger@vyatta.com, greearb@candelatech.com, netdev@vger.kernel.org
Subject: Re: iproute uses too small of a receive buffer
Date: Wed, 28 Oct 2009 00:55:59 -0700 (PDT) [thread overview]
Message-ID: <20091028.005559.92092291.davem@davemloft.net> (raw)
In-Reply-To: <4AE7F859.7020105@gmail.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 28 Oct 2009 08:52:57 +0100
> Stephen Hemminger a écrit :
>>
>> Just having larger buffer isn't guarantee of success. Allocating
>> a huge buffer is not going to work on embedded.
>>
>
> Please note we do not allocate a big buffer, only allow more small skbs
> to be queued on socket receive queue.
>
> If memory is not available, skb allocation will eventually fail
> and be reported as well, embedded or not.
>
> I vote for allowing 1024*1024 bytes instead of 32768,
> and eventually user should be warned that it is capped by
> /proc/sys/net/core/rmem_max
This discussion constantly reminds me of:
/*
* skb should fit one page. This choice is good for headerless malloc.
* But we should limit to 8K so that userspace does not have to
* use enormous buffer sizes on recvmsg() calls just to avoid
* MSG_TRUNC when PAGE_SIZE is very large.
*/
#if PAGE_SIZE < 8192UL
#define NLMSG_GOODSIZE SKB_WITH_OVERHEAD(PAGE_SIZE)
#else
#define NLMSG_GOODSIZE SKB_WITH_OVERHEAD(8192UL)
#endif
#define NLMSG_DEFAULT_SIZE (NLMSG_GOODSIZE - NLMSG_HDRLEN)
next prev parent reply other threads:[~2009-10-28 7:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-27 23:16 iproute uses too small of a receive buffer Ben Greear
2009-10-27 23:24 ` Stephen Hemminger
2009-10-27 23:30 ` Ben Greear
2009-10-28 7:01 ` Eric Dumazet
2009-10-28 7:09 ` Eric Dumazet
2009-10-28 7:37 ` Eric Dumazet
2009-10-28 7:52 ` Eric Dumazet
2009-10-28 7:55 ` David Miller [this message]
2009-10-28 19:05 ` Patrick McHardy
2009-10-28 19:19 ` Ben Greear
2009-10-28 19:50 ` Patrick McHardy
2009-10-28 20:04 ` Ben Greear
2009-10-28 20:07 ` Patrick McHardy
2009-10-28 20:21 ` Ben Greear
2009-11-10 17:15 ` Stephen Hemminger
2009-10-28 20:38 ` Eric Dumazet
2009-10-29 8:17 ` 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=20091028.005559.92092291.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=greearb@candelatech.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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;
as well as URLs for NNTP newsgroup(s).