Skip to contentSkip to conversation

fix inaccuracies in msg_zerocopy.rst

PATCH Applied nick black 3 participants 3 messages Feb 24, 2023 – Feb 25, 2023

Subsystems (2)
lore
Share & tools
lore

nick black

author
#0 lore raw

PATCH 1/1 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.

---
 Documentation/networking/msg_zerocopy.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
networking/msg_zerocopy.rst +3 -3
index 15920db8d35d..b3ea96af9b49 100644
@@ -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
Signature · 1 line
2.39.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · nick black

Replace "sendpage" with "sendfile". Remove comment about ENOBUFS when the sockopt hasn't been set; experimentation indicates that this is not true.

The first error was there from the start. The second is an inconsistency introduced with commit 5cf4a8532c99 ("tcp: really ignore MSG_ZEROCOPY if no SO_ZEROCOPY")

If Documentation fixes go to net, I suggest that as Fixes tag.

maintainer Applied
#2 lore raw
Quoted 7 lines · On Fri, 24 Feb 2023 09:37:55 -0500 Willem de Bruijn wrote:
Quoted 5 lines · nick black

Replace "sendpage" with "sendfile". Remove comment about ENOBUFS when the sockopt hasn't been set; experimentation indicates that this is not true.

Quoted 7 lines

The first error was there from the start. The second is an inconsistency introduced with commit 5cf4a8532c99 ("tcp: really ignore MSG_ZEROCOPY if no SO_ZEROCOPY")

If Documentation fixes go to net, I suggest that as Fixes tag.

Applied, thanks!