Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jun 2004 05:41:00 +0000 (UTC)
From:      Bruce M Simpson <bms@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/netinet udp_usrreq.c
Message-ID:  <200406160541.i5G5f0gR002614@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406160541.i5G5f0gR002614>