Skip to content

Commit bce9045

Browse files
dankamongmenkuba-moo
authored andcommitted
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: nick black <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Link: https://lore.kernel.org/r/Y/gg/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 766d1bd commit bce9045

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Documentation/networking/msg_zerocopy.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Opportunity and Caveats
1515

1616
Copying large buffers between user process and kernel can be
1717
expensive. Linux supports various interfaces that eschew copying,
18-
such as sendpage and splice. The MSG_ZEROCOPY flag extends the
18+
such as sendfile and splice. The MSG_ZEROCOPY flag extends the
1919
underlying copy avoidance mechanism to common socket send calls.
2020

2121
Copy avoidance is not a free lunch. As implemented, with page pinning,
@@ -83,8 +83,8 @@ Pass the new flag.
8383
ret = send(fd, buf, sizeof(buf), MSG_ZEROCOPY);
8484

8585
A zerocopy failure will return -1 with errno ENOBUFS. This happens if
86-
the socket option was not set, the socket exceeds its optmem limit or
87-
the user exceeds its ulimit on locked pages.
86+
the socket exceeds its optmem limit or the user exceeds their ulimit on
87+
locked pages.
8888

8989

9090
Mixing copy avoidance and copying

0 commit comments

Comments
 (0)