K 10 svn:author V 7 rwatson K 8 svn:date V 27 2008-09-15T20:46:32.200635Z K 7 svn:log V 1440 Merge r180198, r180211, r180365, r182682 from head to stable/7: Add soreceive_dgram(9), an optimized socket receive function for use by datagram-only protocols, such as UDP. This version removes use of sblock(), which is not required due to an inability to interlace data improperly with datagrams, as well as avoiding some of the larger loops and state management that don't apply on datagram sockets. This is experimental code, so hook it up only for UDPv4 for testing; if there are problems we may need to revise it or turn it off by default, but it offers *significant* performance improvements for threaded UDP applications such as BIND9, nsd, and memcached using UDP. Tested by: kris, ps Update copyright date in light of soreceive_dgram(9). Use soreceive_dgram() and sosend_dgram() with UDPv6, as we do with UDPv4. Tested by: ps Remove XXXRW in soreceive_dgram that proves unnecessary. Remove unused orig_resid variable in soreceive_dgram. Submitted by: alfred Note: in the MFC, we do enable sosend_dgram for UDPv6 by default (it was already used for UDPv4), but use of soreceive_dgram for both UDPv4 and UDPv6 is controlled by a new loader tunable, net.inet.udp.soreceive_dgram_enabled as soreceive_dgram has less testing exposure than sosend_dgram. We may wish to change the default (and eliminate the tunable) in 7.2. MFC requested by: gnn, kris, ps Approved by: re (kib) END