Skip to content

Commit

Permalink
doc: clarification about setting SO_ZEROCOPY
Browse files Browse the repository at this point in the history
Signed-off-by: Kornilios Kourtis <[email protected]>
Acked-by: Willem de Bruijn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
kkourt authored and davem330 committed Jan 10, 2018
1 parent 11d827a commit af60d61
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Documentation/networking/msg_zerocopy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ 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
------------
Expand Down

0 comments on commit af60d61

Please sign in to comment.