From owner-svn-src-all@FreeBSD.ORG Tue Feb 1 07:58:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 101B0106564A; Tue, 1 Feb 2011 07:58:44 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F24EF8FC15; Tue, 1 Feb 2011 07:58:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p117whjP063221; Tue, 1 Feb 2011 07:58:43 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p117whH4063219; Tue, 1 Feb 2011 07:58:43 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201102010758.p117whH4063219@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 1 Feb 2011 07:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218158 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Feb 2011 07:58:44 -0000 Author: pjd Date: Tue Feb 1 07:58:43 2011 New Revision: 218158 URL: http://svn.freebsd.org/changeset/base/218158 Log: Do not set socket send and receive buffer. It will be auto-tuned. Confirmed by: rwatson MFC after: 1 week Modified: head/sbin/hastd/proto_tcp4.c Modified: head/sbin/hastd/proto_tcp4.c ============================================================================== --- head/sbin/hastd/proto_tcp4.c Tue Feb 1 07:50:26 2011 (r218157) +++ head/sbin/hastd/proto_tcp4.c Tue Feb 1 07:58:43 2011 (r218158) @@ -170,7 +170,7 @@ static int tcp4_common_setup(const char *addr, void **ctxp, int side) { struct tcp4_ctx *tctx; - int ret, val; + int ret, nodelay; tctx = malloc(sizeof(*tctx)); if (tctx == NULL) @@ -190,21 +190,11 @@ tcp4_common_setup(const char *addr, void } /* Socket settings. */ - val = 1; - if (setsockopt(tctx->tc_fd, IPPROTO_TCP, TCP_NODELAY, &val, - sizeof(val)) == -1) { + nodelay = 1; + if (setsockopt(tctx->tc_fd, IPPROTO_TCP, TCP_NODELAY, &nodelay, + sizeof(nodelay)) == -1) { pjdlog_warning("Unable to set TCP_NOELAY on %s", addr); } - val = 131072; - if (setsockopt(tctx->tc_fd, SOL_SOCKET, SO_SNDBUF, &val, - sizeof(val)) == -1) { - pjdlog_warning("Unable to set send buffer size on %s", addr); - } - val = 131072; - if (setsockopt(tctx->tc_fd, SOL_SOCKET, SO_RCVBUF, &val, - sizeof(val)) == -1) { - pjdlog_warning("Unable to set receive buffer size on %s", addr); - } tctx->tc_side = side; tctx->tc_magic = TCP4_CTX_MAGIC;