From owner-freebsd-net@FreeBSD.ORG Mon Oct 27 00:16:19 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC44D16A4B3 for ; Mon, 27 Oct 2003 00:16:19 -0800 (PST) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 9D4E743FBD for ; Mon, 27 Oct 2003 00:16:16 -0800 (PST) (envelope-from silby@silby.com) Received: (qmail 919 invoked from network); 27 Oct 2003 08:16:15 -0000 Received: from niwun.pair.com (HELO localhost) (209.68.2.70) by relay.pair.com with SMTP; 27 Oct 2003 08:16:15 -0000 X-pair-Authenticated: 209.68.2.70 Date: Mon, 27 Oct 2003 02:16:13 -0600 (CST) From: Mike Silbersack To: freebsd-net@freebsd.org Message-ID: <20031027014854.K2023@odysseus.silby.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1743396347-1067242013=:2023" Content-ID: <20031027020712.K2023@odysseus.silby.com> cc: iedowse@freebsd.org Subject: Changes to PCBPORTHASH wrt TCP, review needed X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2003 08:16:20 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-1743396347-1067242013=:2023 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: <20031027020712.N2023@odysseus.silby.com> The attached patch is rather short, but makes a substantial change in how ports are bound, so I'd like a quick review of the code and the concept if possible. In short, what this patch does is remove established TCP connections from the PCBPORTHASH table, thereby allowing their ephemeral ports to be concurrently used by other tcp connections to other hosts/ports. To do this, I made the following changes: - in_pcbinshash was modified so that the "porthash" parameter determines whether or not the inp in question is added to the pcbporthash. - in_pcbrehash was modified so that the "remove" parameter determines whether the inp in question will be removed from the pcbportlist when it is rehashed in the pcbhash - in_pcbremlists was modified to account for pcbs not necessarily being in both hashes - syncache_socket uses the porthash parameter to ensure that incoming tcp connections are never added to the pcbporthash. - tcp_connect and tcp6_connect use ins_rehash to remove the inp in question from the pcbporthash list after the final ip/port has been determined. Note that the pcbhash is still consulted, so an attempt to create a tcp socket which conflicts with an already existing connection will be detected correctly. One easy way to test this patch is to install http_load, set your ephemeral port range to something in the range of 30, and have it start testing a host. It will quickly create TIME_WAIT sockets filling all ephemeral ports. Without this patch, you will be unable to create outgoing connections; with this patch, other outgoing connections will be fine. Note that since the port chosen is not released from the pcbporthash table until tcp_connect, repeated calls to bind can still reserve all ephemeral ports; I don't believe that is going to be a common case. So far, the only problem I can see is that in_pcbbind, being unaware of the state of pcbhash, may return ports which collide with in-use connections for the destination host while non-colliding ports are still available. I should be able to work around this potential issue with a simple retry loop, so it's not a big concern. Otherwise, can anyone see any problems that this change would cause? I believe that it would change behavior so that SO_REUSEADDR and SO_REUSEPORT would no longer be required for daemons which restart and attempt to listen on the same port, but I believe this to be a positive change. Ports used by tcp listen sockets and udp sockets should be protected as before, so that should be ok as well. Am I missing something subtle? Thanks, Mike "Silby" Silbersack --0-1743396347-1067242013=:2023 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="pcbporthash-change.patch" Content-Transfer-Encoding: BASE64 Content-ID: <20031027020653.V2023@odysseus.silby.com> Content-Description: Content-Disposition: ATTACHMENT; FILENAME="pcbporthash-change.patch" ZGlmZiAtdSAtciAvdXNyL3NyYy9zeXMub2xkL25ldGluZXQvaW5fcGNiLmMg L3Vzci9zcmMvc3lzL25ldGluZXQvaW5fcGNiLmMNCi0tLSAvdXNyL3NyYy9z eXMub2xkL25ldGluZXQvaW5fcGNiLmMJRnJpIE9jdCAyNCAxMjowNTowMCAy MDAzDQorKysgL3Vzci9zcmMvc3lzL25ldGluZXQvaW5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