From owner-freebsd-net@freebsd.org Fri Jan 20 15:15:15 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 655FDCB989B for ; Fri, 20 Jan 2017 15:15:15 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25F4F1674; Fri, 20 Jan 2017 15:15:15 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cUauF-0001o6-IZ; Fri, 20 Jan 2017 18:15:11 +0300 Date: Fri, 20 Jan 2017 18:15:11 +0300 From: Slawa Olhovchenkov To: Julian Elischer Cc: "freebsd-net@freebsd.org" , Randall Stewart , Ermal =?utf-8?B?THXDp2k=?= Subject: Re: all network people please review this proposal: because someone is going to commit it soon. D5017 Message-ID: <20170120151511.GR78888@zxy.spb.ru> References: <678042cf-9d5f-2f39-6689-30eadf4214a7@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <678042cf-9d5f-2f39-6689-30eadf4214a7@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false 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:15:15 -0000 On Fri, Jan 20, 2017 at 11:00:18PM +0800, Julian Elischer wrote: > 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. Good. Can you use also destination port and source IP in same way as destination address?