From owner-cvs-all@FreeBSD.ORG Wed Jun 16 05:41:01 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B84D16A4CE; Wed, 16 Jun 2004 05:41:01 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22C7E43D39; Wed, 16 Jun 2004 05:41:01 +0000 (GMT) (envelope-from bms@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i5G5f0Pm002615; Wed, 16 Jun 2004 05:41:00 GMT (envelope-from bms@repoman.freebsd.org) Received: (from bms@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i5G5f0gR002614; Wed, 16 Jun 2004 05:41:00 GMT (envelope-from bms) Message-Id: <200406160541.i5G5f0gR002614@repoman.freebsd.org> From: Bruce M Simpson Date: Wed, 16 Jun 2004 05:41:00 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/netinet udp_usrreq.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2004 05:41:01 -0000 bms 2004-06-16 05:41:00 UTC FreeBSD src repository Modified files: sys/netinet udp_usrreq.c Log: Disconnect a temporarily-connected UDP socket in out-of-mbufs case. This fixes the problem of UDP sockets getting wedged in a connected state (and bound to their destination) under heavy load. Temporary bind/connect should probably be deleted in future as an optimization, as described in "A Faster UDP" [Partridge/Pink 1993]. Notes: - INP_LOCK() is already held in udp_output(). The connection is in effect happening at a layer lower than the socket layer, therefore in theory socket locking should not be needed. - Inlining the in_pcbdisconnect() operation buys us nothing (in the case of the current state of the code), as laddr is not part of the inpcb hash or the udbinfo hash. Therefore there should be no need to rehash after restoring laddr in the error case (this was a concern of the original author of the patch). PR: kern/41765 Requested by: gnn Submitted by: Jinmei Tatuya (with cleanups) Tested by: spray(8) Revision Changes Path 1.154 +7 -1 src/sys/netinet/udp_usrreq.c