From owner-freebsd-net@freebsd.org Tue Dec 29 19:24:48 2015 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 218BDA552BD for ; Tue, 29 Dec 2015 19:24:48 +0000 (UTC) (envelope-from chris@stankevitz.com) Received: from mango.stankevitz.com (mango.stankevitz.com [208.79.93.194]) by mx1.freebsd.org (Postfix) with ESMTP id 1438D1D5F for ; Tue, 29 Dec 2015 19:24:47 +0000 (UTC) (envelope-from chris@stankevitz.com) Received: from Chriss-MacBook-Pro.local (209-203-101-124.static.twtelecom.net [209.203.101.124]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mango.stankevitz.com (Postfix) with ESMTPSA id 4DDA16EBE for ; Tue, 29 Dec 2015 11:16:39 -0800 (PST) From: Chris Stankevitz Subject: getsockopt(SO_SNDBUF) and openssh/HPN To: "freebsd-net@freebsd.org" Message-ID: <5682DC16.9030504@stankevitz.com> Date: Tue, 29 Dec 2015 11:16:38 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2015 19:24:48 -0000 Hello, Please identify any false statements (particularly statement 7 which accuses FreeBSD 10.1 of having a bug): 1. openssh limits the size of "the outgoing buffer" to 65KB 2. (1) limits bandwidth on high BDP links. 3. FreeBSD 10.1 supplied openssh/HPN tries to fix (2) by increasing the size of "the outgoing buffer" to match the SO_SNDBUF capacity 4. openssh/HPN accomplishes (3) by periodically calling getsockopt(SO_SNDBUF) 5. In FreeBSD 10.1, getsockopt(SO_SNDBUF) does not return the value set by setsockopt(SO_SNDBUF). Instead it reports the high watermark of the outgoing buffer. 6. (3) does nothing because of (4) and (5) 7. There is a bug in FreeBSD 10.1 networking or FreeBSD 10.1 supplied openssh/HPN: 7a. FreeBSD bug: getsockopt(SO_SNDBUF) does not return value set by setsockopt(SO_SNDBUF) 7b. openssh/HPN bug: do not use getsockopt(SO_SNDBUF) to get the value set by setsockopt(SO_SNDBUF) -- use something else Original thread from August 2015: https://www.mail-archive.com/freebsd-net@freebsd.org/msg49793.html Thank you, Chris