All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhu Yi <yi.zhu@intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	"Pekka Savola (ipv6)" <pekkas@netcore.fi>,
	Patrick McHardy <kaber@trash.net>,
	Vlad Yasevich <vladislav.yasevich@hp.com>,
	Sridhar Samudrala <sri@us.ibm.com>,
	Per Liden <per.liden@ericsson.com>,
	Jon Maloy <jon.maloy@ericsson.com>,
	Allan Stephens <allan.stephens@windriver.com>,
	Andrew Hendry <andrew.hendry@gmail.com>
Subject: Re: [PATCH 1/8] net: add limit for socket backlog
Date: Wed, 03 Mar 2010 16:14:13 +0800	[thread overview]
Message-ID: <1267604053.2370.102.camel@debian> (raw)
In-Reply-To: <1267603357.2839.105.camel@edumazet-laptop>

On Wed, 2010-03-03 at 16:02 +0800, Eric Dumazet wrote:
> > sk->sk_rcvbuf can be adjusted by setsockopt from user at run time.
> The
> > minimum allowed value is 256. I'm afraid this will break most
> protocols.
> 
> I see, then maybe use some offset in your test, to allow some extra
> space.
> 
> #define MINBACKLOG 2048
> 
> if (sk->sk_backlog.len >= (sk->sk_rcvbuf << 1) + MINBACKLOG)
>         return -ENOBUFS;

I want to provide a method for protocols to set its sock backlog limit.
For example, the sctp_rmem is 373500 (sysctl_sctp_rmem[1]) which is
larger than (sysctl_rmem_default << 1). But I'm not very sure about the
actual required size. So I didn't make it in the sctp patch. What do you
think?

Thanks,
-yi


  reply	other threads:[~2010-03-03  8:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-03  6:35 [PATCH 1/8] net: add limit for socket backlog Zhu Yi
2010-03-03  6:35 ` [PATCH 2/8] dccp: use limited " Zhu Yi
2010-03-03  6:35   ` [PATCH 3/8] tcp: " Zhu Yi
2010-03-03  6:35     ` [PATCH 4/8] udp: " Zhu Yi
2010-03-03  6:35       ` [PATCH 5/8] llc: " Zhu Yi
2010-03-03  6:35         ` [PATCH 6/8] sctp: " Zhu Yi
2010-03-03  6:35           ` [PATCH 7/8] tipc: " Zhu Yi
2010-03-03  6:35             ` [PATCH 8/8] x25: " Zhu Yi
2010-03-03  7:08               ` Eric Dumazet
2010-03-03 11:38                 ` andrew hendry
2010-03-03 14:00                   ` Zhu, Yi
2010-03-03 14:33                     ` Eric Dumazet
2010-03-03 22:44                       ` andrew hendry
2010-03-03  6:56   ` [PATCH 2/8] dccp: " Eric Dumazet
2010-03-03  7:43     ` Zhu Yi
2010-03-03  6:54 ` [PATCH 1/8] net: add limit for " Eric Dumazet
2010-03-03  7:35   ` Zhu Yi
2010-03-03  8:02     ` Eric Dumazet
2010-03-03  8:14       ` Zhu Yi [this message]
2010-03-03  8:47         ` Eric Dumazet
2010-03-03  8:59           ` Zhu Yi

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=1267604053.2370.102.camel@debian \
    --to=yi.zhu@intel.com \
    --cc=acme@ghostprotocols.net \
    --cc=allan.stephens@windriver.com \
    --cc=andrew.hendry@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jon.maloy@ericsson.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=pekkas@netcore.fi \
    --cc=per.liden@ericsson.com \
    --cc=sri@us.ibm.com \
    --cc=vladislav.yasevich@hp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.