From owner-freebsd-net@freebsd.org Fri Jan 20 15:00:32 2017 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 7308DCB930F for ; Fri, 20 Jan 2017 15:00:32 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 51DEB1B6A; Fri, 20 Jan 2017 15:00:28 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-228-247.lns20.per1.internode.on.net [121.45.228.247]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v0KF0OpC049540 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 20 Jan 2017 07:00:27 -0800 (PST) (envelope-from julian@freebsd.org) To: "freebsd-net@freebsd.org" , Randall Stewart , =?UTF-8?Q?Ermal_Lu=c3=a7i?= From: Julian Elischer Subject: all network people please review this proposal: because someone is going to commit it soon. D5017 Message-ID: <678042cf-9d5f-2f39-6689-30eadf4214a7@freebsd.org> Date: Fri, 20 Jan 2017 23:00:18 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.6.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.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2017 15:00:32 -0000 Unless eri gets to it first I will. see https://reviews.freebsd.org/D5017 If you have a server, you can put an arbitrary number of clients on the same port number because they all have different addresses. However in the case of a client accessing multiple servers we are limited to 65535 sessions because we strictly don't allow the same port to be used more than once. This is silly because TCP is a symmetrical protocol and of it works for the server it should work for the client. So this patch changes the allocation of ports to allow the client to use a port that has been used before as long as the previous port user is not talking to the same host/port. This removes the limitation of a freebsd machine being only capable of contacting 65000 hosts in a single port shutdown timeout period. With modern machines capable of initiating MILLIONS of sessions per second, having a limitation of 65000 per 2 minutes is a bit silly. Please read the patch if you suspect this will have a bad effect of any sort. Once the session is started there is no record as to who started it so any issues would have to be in the startup phase. Julian