cvs commit: src/sys/netinet udp_usrreq.c

Bruce M Simpson bms at FreeBSD.org
Tue Jun 15 22:41:01 PDT 2004


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


More information about the cvs-src mailing list