All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [doc] msg_zerocopy.rst: clarify the TCP shutdown scenario
@ 2022-06-01  2:47 Frederik Deweerdt
  2022-06-01 13:24 ` Willem de Bruijn
  0 siblings, 1 reply; 7+ messages in thread
From: Frederik Deweerdt @ 2022-06-01  2:47 UTC (permalink / raw)
  To: netdev; +Cc: willemb, Frederik Deweerdt

Hi folks,

Based on my understanding, retransmissions of zero copied buffers can
happen after `close(2)`, the patch below amends the docs to suggest how
notifications should be handled in that case.

Explicitly mention that applications shouldn't be calling `close(2)` on
a TCP socket without draining the error queue.
---
 Documentation/networking/msg_zerocopy.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/networking/msg_zerocopy.rst b/Documentation/networking/msg_zerocopy.rst
index 15920db8d35d..cb44fc1f3e3e 100644
--- a/Documentation/networking/msg_zerocopy.rst
+++ b/Documentation/networking/msg_zerocopy.rst
@@ -144,6 +144,10 @@ the socket. A socket that has an error queued would normally block
 other operations until the error is read. Zerocopy notifications have
 a zero error code, however, to not block send and recv calls.
 
+For protocols like TCP, where retransmissions can occur after the
+application is done with a given connection, applications should signal
+the close to the peer via shutdown(2), and keep polling the error queue
+until all transmissions have completed.
 
 Notification Batching
 ~~~~~~~~~~~~~~~~~~~~~
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-06-06  7:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01  2:47 [PATCH] [doc] msg_zerocopy.rst: clarify the TCP shutdown scenario Frederik Deweerdt
2022-06-01 13:24 ` Willem de Bruijn
2022-06-01 23:01   ` Frederik Deweerdt
2022-06-02  0:29     ` Willem de Bruijn
2022-06-03 13:09     ` David Laight
2022-06-03 13:30       ` Willem de Bruijn
2022-06-06  7:58         ` David Laight

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.