DragonFly-2.3.2.186.g5b0b9 master sys/kern uipc_socket.c uipc_so

看板DFBSD_commit作者時間16年前 (2009/07/27 10:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 5b0b9fa51337cb0f3a9c78c8f74fbe4be19d719e Author: Peter Avalos <pavalos@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
文章代碼(AID): #1ARGfny0 (DFBSD_commit)