diff options
author | Willem de Bruijn <willemb@google.com> | 2018-03-14 17:49:19 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-14 17:51:28 +0100 |
commit | ced68234b6a244355aeab07c2681bc49f695eaed (patch) | |
tree | 38f43d6e42f562bcae799dae9238502a086cf785 /Documentation/networking/msg_zerocopy.rst | |
parent | pktgen: Fix memory leak in pktgen_if_write (diff) | |
download | linux-ced68234b6a244355aeab07c2681bc49f695eaed.tar.xz linux-ced68234b6a244355aeab07c2681bc49f695eaed.zip |
sock: remove zerocopy sockopt restriction on closed tcp state
Socket option SO_ZEROCOPY determines whether the kernel ignores or
processes flag MSG_ZEROCOPY on subsequent send calls. This to avoid
changing behavior for legacy processes.
Limiting the state change to closed sockets is annoying with passive
sockets and not necessary for correctness. Once created, zerocopy skbs
are processed based on their private state, not this socket flag.
Remove the constraint.
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking/msg_zerocopy.rst')
-rw-r--r-- | Documentation/networking/msg_zerocopy.rst | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Documentation/networking/msg_zerocopy.rst b/Documentation/networking/msg_zerocopy.rst index 291a01264967..fe46d4867e2d 100644 --- a/Documentation/networking/msg_zerocopy.rst +++ b/Documentation/networking/msg_zerocopy.rst @@ -72,11 +72,6 @@ this flag, a process must first signal intent by setting a socket option: if (setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY, &one, sizeof(one))) error(1, errno, "setsockopt zerocopy"); -Setting the socket option only works when the socket is in its initial -(TCP_CLOSED) state. Trying to set the option for a socket returned by accept(), -for example, will lead to an EBUSY error. In this case, the option should be set -to the listening socket and it will be inherited by the accepted sockets. - Transmission ------------ |