kernel - Adjust ssb_space_prealloc() use cases
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 18 Jul 2014 16:32:46 +0000 (09:32 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 18 Jul 2014 16:32:46 +0000 (09:32 -0700)
commita5e9382686e31add8639d621f888ae44457bdda2
treeaf4994e17b6acbf425b0810a447652dc7c1ea344
parentdab842be9e4b6b67ea23800303234aae9de63dd1
kernel - Adjust ssb_space_prealloc() use cases

* Add two flags to the signalsockbuf ssb_flags field.

  SSB_PREALLOC  - Indicates that data preallocation tracking is being used
  SSB_STOPSUPP - Indicates that SSB_STOP flow control is being used

* unix domain sockets set SSB_STOPSUPP, tcp and sctp sockets
  set SSB_PREALLOC.

* sendfile() requires that either SSB_PREALLOC or SSB_STOPSUPP be specified.

* Code now conditionalizes the use of ssb_space() vs ssb_space_prealloc()
  based on the presence of the SSB_PREALLOC flag.

Reported-by: sephe
sys/kern/uipc_socket2.c
sys/kern/uipc_syscalls.c
sys/kern/uipc_usrreq.c
sys/netinet/sctp_usrreq.c
sys/netinet/tcp_usrreq.c
sys/sys/socketvar.h