netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
To: Wei Wang <weiwan@google.com>, Michael Kerrisk <mtk.manpages@gmail.com>
Cc: netdev@vger.kernel.org, Yuchung Cheng <ycheng@google.com>,
	Eric Dumazet <edumazet@google.com>,
	linux-man@vger.kernel.org
Subject: Re: [patch] send.2: Add MSG_FASTOPEN flag
Date: Wed, 15 Sep 2021 22:13:55 +0200	[thread overview]
Message-ID: <4d9952e8-040b-1bde-51a4-9687d6adb320@gmail.com> (raw)
In-Reply-To: <20210915173758.2608988-1-weiwan@google.com>

Hello, Wei!

On 9/15/21 7:37 PM, Wei Wang wrote:
> MSG_FASTOPEN flag is available since Linux 3.7. Add detailed description
> in the manpage according to RFC7413.
> 
> Signed-off-by: Wei Wang <weiwan@google.com>
> Reviewed-by: Yuchung Cheng <ycheng@google.com>
> Reviewed-by: Eric Dumazet <edumazet@google.com>
> ---
>   man2/send.2 | 27 +++++++++++++++++++++++++++
>   1 file changed, 27 insertions(+)
> 
> diff --git a/man2/send.2 b/man2/send.2
> index fd28fed90..a40ae6214 100644
> --- a/man2/send.2
> +++ b/man2/send.2
> @@ -252,6 +252,33 @@ data on sockets that support this notion (e.g., of type
>   the underlying protocol must also support
>   .I out-of-band
>   data.
> +.TP
> +.BR MSG_FASTOPEN " (since Linux 3.7)"
> +Attempts TCP Fast Open (RFC7413) and sends data in the SYN like a
> +combination of
> +.BR connect (2)
> +and
> +.BR write (2)

You should merge the comma with the above, to avoid an unwanted space:

.BR write (2),

> +, by performing an implicit
> +.BR connect (2)
> +operation. It blocks until the data is buffered and the handshake

Please use semantic newlines.  See man-pages(7):

    Use semantic newlines
        In the source of a manual page,  new  sentences  should  be
        started  on  new  lines, and long sentences should be split
        into lines at clause breaks  (commas,  semicolons,  colons,
        and  so on).  This convention, sometimes known as "semantic
        newlines", makes it easier to see the  effect  of  patches,
        which often operate at the level of individual sentences or
        sentence clauses.


This is especially important after a period, since groff(1) will usually 
put 2 spaces after it, but if you hardcode it like above, it will only 
print 1 space.


> +has completed.
> +For a non-blocking socket, it returns the number of bytes buffered
> +and sent in the SYN packet. If the cookie is not available locally,
> +it returns
> +.B EINPROGRESS

.BR EINPROGRESS ,

> +, and sends a SYN with a Fast Open cookie request automatically.
> +The caller needs to write the data again when the socket is connected.
> +On errors, it returns the same errno as

errno should be highlighted:

.I errno

Also, errno is set, not returned (as far as user space is concerned); so 
something along the lines of "errno is set by connect(2)" or "it can 
fail for the same reasons that connect(2) can".  Michael probably knows 
if there's a typical wording for this in the current manual pages, to 
add some consistency.

BTW, should anything be added to the ERRORS section?

> +.BR connect (2) > +if the handshake fails. This flag requires enabling TCP Fast Open
> +client support on sysctl net.ipv4.tcp_fastopen.

net.ipv4.tcp_fastopen should be highlighted:

.IR net.ipv4.tcp_fastopen .

> +

Also from man-pages(7):

    Formatting conventions (general)
        Paragraphs should be separated by suitable markers (usually
        either .PP or .IP).  Do not separate paragraphs using blank
        lines, as this results in poor  rendering  in  some  output
        formats (such as PostScript and PDF).


Thanks!

Alex



-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

  reply	other threads:[~2021-09-15 20:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 17:37 [patch] send.2: Add MSG_FASTOPEN flag Wei Wang
2021-09-15 20:13 ` Alejandro Colomar (man-pages) [this message]
2021-09-16 21:47   ` Wei Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4d9952e8-040b-1bde-51a4-9687d6adb320@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=edumazet@google.com \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=weiwan@google.com \
    --cc=ycheng@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).