HomeFreeBSD

Disconnect a temporarily-connected UDP socket in out-of-mbufs case. This
rS130559Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

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)

Details

Provenance
bmsAuthored on
Parents
rS130558: Disable gdb from the build due to the impending binutils 2.15 import.
Branches
Unknown
Tags
Unknown

Event Timeline