From: nick black Date: Fri, 24 Feb 2023 02:29:16 +0000 (-0500) Subject: docs: net: fix inaccuracies in msg_zerocopy.rst X-Git-Tag: v6.6.17~5406^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bce90459937376b6c7553cfbe957d73293ab7bc8;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/Y/gg/EhIIjugLdd3@schwarzgerat.orthanc Signed-off-by: Jakub Kicinski --- diff --git a/Documentation/networking/msg_zerocopy.rst b/Documentation/networking/msg_zerocopy.rst index 15920db..b3ea96a 100644 --- a/Documentation/networking/msg_zerocopy.rst +++ b/Documentation/networking/msg_zerocopy.rst @@ -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