netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: hagen@jauu.net
Cc: netdev@vger.kernel.org, kaber@trash.net, eric.dumazet@gmail.com,
	ilpo.jarvinen@helsinki.fi
Subject: Re: [PATCH] tcp: allow effective reduction of TCP's rcv-buffer via setsockopt
Date: Sun, 22 Aug 2010 21:44:28 -0700 (PDT)	[thread overview]
Message-ID: <20100822.214428.52175315.davem@davemloft.net> (raw)
In-Reply-To: <1282235585-14206-1-git-send-email-hagen@jauu.net>

From: Hagen Paul Pfeifer <hagen@jauu.net>
Date: Thu, 19 Aug 2010 18:33:05 +0200

> Via setsockopt it is possible to reduce the socket RX buffer
> (SO_RCVBUF). TCP method to select the initial window and window scaling
> option in tcp_select_initial_window() currently misbehaves and do not
> consider a reduced RX socket buffer via setsockopt.
> 
> Even though the server's RX buffer is reduced via setsockopt() to 256
> byte (Initial Window 384 byte => 256 * 2 - (256 * 2 / 4)) the window
> scale option is still 7:
> 
> 192.168.1.38.40676 > 78.47.222.210.5001: Flags [S], seq 2577214362, win 5840, options [mss 1460,sackOK,TS val 338417 ecr 0,nop,wscale 0], length 0
> 78.47.222.210.5001 > 192.168.1.38.40676: Flags [S.], seq 1570631029, ack 2577214363, win 384, options [mss 1452,sackOK,TS val 2435248895 ecr 338417,nop,wscale 7], length 0
> 192.168.1.38.40676 > 78.47.222.210.5001: Flags [.], ack 1, win 5840, options [nop,nop,TS val 338421 ecr 2435248895], length 0
> 
> Within tcp_select_initial_window() the original space argument - a
> representation of the rx buffer size - is expanded during
> tcp_select_initial_window(). Only sysctl_tcp_rmem[2], sysctl_rmem_max
> and window_clamp are considered to calculate the initial window.
> 
> This patch adjust the window_clamp argument if the user explicitly
> reduce the receive buffer.
> 
> Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>

Applied, thanks.

  reply	other threads:[~2010-08-23  4:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-19 16:33 [PATCH] tcp: allow effective reduction of TCP's rcv-buffer via setsockopt Hagen Paul Pfeifer
2010-08-23  4:44 ` David Miller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-08-15 19:36 Hagen Paul Pfeifer
2010-08-19  6:33 ` David Miller
2010-08-19  6:58   ` Hagen Paul Pfeifer

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=20100822.214428.52175315.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=hagen@jauu.net \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=kaber@trash.net \
    --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).