gvisor/pkg/sentry/socket
Bhasker Hariharan 570fb1db6b Improve SendMsg performance.
SendMsg before this change would copy all the data over into a
new slice even if the underlying socket could only accept a
small amount of data. This is really inefficient with non-blocking
sockets and under high throughput where large writes could get
ErrWouldBlock or if there was say a timeout associated with the sendmsg()
syscall.

With this change we delay copying bytes in till they are needed and only
copy what can be potentially sent/held in the socket buffer. Reducing
the need to repeatedly copy data over.

Also a minor fix to change state FIN-WAIT-1 when shutdown(..., SHUT_WR) is called
instead of when we transmit the actual FIN. Otherwise the socket could remain in
CONNECTED state even though the user has called shutdown() on the socket.

Updates #627

PiperOrigin-RevId: 263430505
2019-08-14 14:34:27 -07:00
..
control net/tcp/setockopt: impelment setsockopt(fd, SOL_TCP, TCP_INQ) 2019-07-18 15:41:04 -07:00
epsocket Improve SendMsg performance. 2019-08-14 14:34:27 -07:00
hostinet Return a well-defined socket address type from socket funtions. 2019-08-08 16:50:33 -07:00
netfilter Plumbing for iptables sockopts. 2019-08-02 16:26:48 -07:00
netlink netlink: return an error in nlmsgerr 2019-08-09 22:34:54 -07:00
rpcinet Return a well-defined socket address type from socket funtions. 2019-08-08 16:50:33 -07:00
unix Return a well-defined socket address type from socket funtions. 2019-08-08 16:50:33 -07:00
BUILD Return a well-defined socket address type from socket funtions. 2019-08-08 16:50:33 -07:00
socket.go Return a well-defined socket address type from socket funtions. 2019-08-08 16:50:33 -07:00