public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk@codeconstruct.com.au>
To: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>,
	"G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>, linux-man@vger.kernel.org
Subject: Re: [PATCH v2] mctp.7: Add man page for Linux MCTP support
Date: Fri, 12 Nov 2021 09:12:49 +0800	[thread overview]
Message-ID: <d6c9edca79f9aedd4dd9e07e46a4587153f35149.camel@codeconstruct.com.au> (raw)
In-Reply-To: <76dd85f7-ab8a-1dcc-5b1a-5eb9a87d23bc@gmail.com>

Hi Alex,

Thanks for the review! I've updated in line with most of your comments,
and will send a v3 soon. However, I do have a couple of queries, mainly
for my own understanding:

> > +.SH SYNOPSIS
> > +.nf
> > +.B #include <sys/socket.h>
> > +.B #include <linux/mctp.h>
> 
> I prefer alphabetic sorting of includes.

OK, does that take priority over the convention to list the header(s)
specific to this man page last?

In that case, we end up with:

    #include <linux/mctp.h>
    #include <sys/socket.h> /* Definition of socket() & SOCK_DGRAM */

> > +.PP
> > +The API for MCTP messaging uses a standard sockets interface, using the
> > +.BR sendto (2)
> > +and
> > +.BR recvfrom (2)
> > +classes of system calls to transfer messages.
> > +Messages may be fragmented into packets before transmission, and reassembled at
> > +the remote endpoint.
> 
> Break at the comma.

Just this comma? or all of them? There's a couple of sentences right
before this one that would seem to have a similar style - if it's the
former, for my own learning here: what makes this one different?

[and you mean a line-break, right? or a break-point escape sequence?]

> > +Packets between a local and remote endpoint are identified by the source
> 
> Break after "by" (or perhaps just before it).

Same as the above, why is this?

> > +struct sockaddr_mctp {
> > +    unsigned short     smctp_family;  /* = AF_MCTP */
> > +    uint16_t           __smctp_pad0;  /* pad, must be zero */
> > +    int                smctp_network; /* local network identifier */
> > +    struct mctp_addr   smctp_addr;    /* EID */
> > +    uint8_t            smctp_type;    /* message type byte */
> > +    uint8_t            smctp_tag;     /* tag value, including TO flag */
> > +    uint8_t            __smctp_pad1;  /* pad, must be zero */
> 
> Do we want to tie the implementation to this pad?

Yes. The pad will be there anyway, due to the natural alignment of the
struct. Since we want to be explicit about the padding (and require it
to be zeroed), I would strongly suggest keeping it documented.

There is an 'extended' MCTP addressing struct, which encapsulates a
struct sockaddr_mctp. For us to be absolutely clear about the layout of
that structure, the explicit pad here makes that unambiguous.

[unless, for man pages, we don't care about the ABI, only the API?]

> Future implementations of sockaddr_mctp are not going to use that
> byte for anything else?

They might, hence requiring zero at present.

Cheers,


Jeremy


  reply	other threads:[~2021-11-12  1:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11  1:53 [PATCH v2] mctp.7: Add man page for Linux MCTP support Jeremy Kerr
2021-11-11 21:38 ` Alejandro Colomar (man-pages)
2021-11-12  1:12   ` Jeremy Kerr [this message]
2021-11-12 18:45     ` Alejandro Colomar (man-pages)
2021-11-12 19:40       ` G. Branden Robinson
2021-11-12 20:07         ` Alejandro Colomar (man-pages)
2021-11-12 20:07           ` Alejandro Colomar (man-pages)
2021-11-18  5:08       ` Jeremy Kerr
2021-11-22 16:35         ` Alejandro Colomar (man-pages)
2021-11-12  9:35   ` G. Branden Robinson
2021-11-12 19:50     ` Alejandro Colomar (man-pages)
2021-11-22  9:06       ` Bold and italics, semantics and constness (was: [PATCH v2] mctp.7: Add man page for Linux MCTP support) G. Branden Robinson
2021-11-22 11:50         ` Alejandro Colomar (man-pages)
2021-11-22 13:52           ` G. Branden Robinson
2021-11-22 16:00             ` Alejandro Colomar (man-pages)

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=d6c9edca79f9aedd4dd9e07e46a4587153f35149.camel@codeconstruct.com.au \
    --to=jk@codeconstruct.com.au \
    --cc=alx.manpages@gmail.com \
    --cc=g.branden.robinson@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.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