DragonFly-2.3.2.186.g5b0b9 master sys/kern uipc_socket.c uipc_socket2.c uipc_usrreq.c sys/netinet tcp.h tcp_input.c tcp_output.c tcp_subr.c tcp_usrreq.c tcp_var.h sys/sys socketvar.h

Peter Avalos pavalos at crater.dragonflybsd.org
Sun Jul 26 14:56:41 PDT 2009


commit 5b0b9fa51337cb0f3a9c78c8f74fbe4be19d719e
Author: Peter Avalos <pavalos at theshell.com>
Date:   Sun Jul 19 15:50:00 2009 -1000

    Implement autosizing TCP socket buffers.
    
    Normally the socket buffers are static (either derived from global
    defaults or set with setsockopt) and do not adapt to real network
    conditions. Two things happen: a) your socket buffers are too small
    and you can't reach the full potential of the network between both
    hosts; b) your socket buffers are too big and you waste a lot of
    kernel memory for data just sitting around.
    
    With automatic TCP send and receive socket buffers we can start with a
    small buffer and quickly grow it in parallel with the TCP congestion
    window to match real network conditions.
    
    New sysctls are:
      net.inet.tcp.sendbuf_auto=1 (enabled)
      net.inet.tcp.sendbuf_inc=8192 (8K, step size)
      net.inet.tcp.sendbuf_max=16777216 (16M, growth limit)
      net.inet.tcp.recvbuf_auto=1 (enabled)
      net.inet.tcp.recvbuf_inc=16384 (16K, step size)
      net.inet.tcp.recvbuf_max=16777216 (16M, growth limit)
    
    Additionally, add limiters and sanity checks for TCP MSS (maximum segment
    size) resource exhaustion attacks.
    
    Obtained-from: FreeBSD

Summary of changes:
 sys/kern/uipc_socket.c   |    6 ++
 sys/kern/uipc_socket2.c  |    8 ++-
 sys/kern/uipc_usrreq.c   |    2 +-
 sys/netinet/tcp.h        |   19 ++++++
 sys/netinet/tcp_input.c  |  145 +++++++++++++++++++++++++++++++++++++++++++++-
 sys/netinet/tcp_output.c |   69 +++++++++++++++++++++-
 sys/netinet/tcp_subr.c   |   24 ++++++++
 sys/netinet/tcp_usrreq.c |    5 +-
 sys/netinet/tcp_var.h    |   11 ++++
 sys/sys/socketvar.h      |    1 +
 10 files changed, 281 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5b0b9fa51337cb0f3a9c78c8f74fbe4be19d719e


-- 
DragonFly BSD source repository





More information about the Commits mailing list