Commit bce90459 authored by nick black's avatar nick black Committed by Jakub Kicinski

docs: net: fix inaccuracies in msg_zerocopy.rst

Replace "sendpage" with "sendfile". Remove comment about
ENOBUFS when the sockopt hasn't been set; experimentation
indicates that this is not true.
Signed-off-by: default avatarnick black <dankamongmen@gmail.com>
Reviewed-by: default avatarWillem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/Y/gg/EhIIjugLdd3@schwarzgerat.orthancSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 766d1bdc
......@@ -15,7 +15,7 @@ Opportunity and Caveats
Copying large buffers between user process and kernel can be
expensive. Linux supports various interfaces that eschew copying,
such as sendpage and splice. The MSG_ZEROCOPY flag extends the
such as sendfile and splice. The MSG_ZEROCOPY flag extends the
underlying copy avoidance mechanism to common socket send calls.
Copy avoidance is not a free lunch. As implemented, with page pinning,
......@@ -83,8 +83,8 @@ Pass the new flag.
ret = send(fd, buf, sizeof(buf), MSG_ZEROCOPY);
A zerocopy failure will return -1 with errno ENOBUFS. This happens if
the socket option was not set, the socket exceeds its optmem limit or
the user exceeds its ulimit on locked pages.
the socket exceeds its optmem limit or the user exceeds their ulimit on
locked pages.
Mixing copy avoidance and copying
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment