public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: bpf <bpf@vger.kernel.org>, Quentin Monnet <quentin@isovalent.com>
Cc: linux-man@vger.kernel.org, Alejandro Colomar <alx@kernel.org>,
	Zexuan Luo <spacewanderlzx@gmail.com>
Subject: Re: Typo in the man7 bpf-helpers page
Date: Tue, 31 Jan 2023 12:51:40 +0100	[thread overview]
Message-ID: <e27489a9-6ae5-0f31-0289-fe6344c58bd3@gmail.com> (raw)
In-Reply-To: <877b57f5-77ba-805b-ed5f-57e47fa83b16@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3542 bytes --]

Hi Quentin,

On 1/31/23 12:40, Alejandro Colomar wrote:
> [Resend with Quentin's right address, I hope]
> 
> Hi Zexuan, Quentin,
> 
> On 1/31/23 11:03, Zexuan Luo wrote:
>  > Hello Colomar,
>  >
>  > I just found a potential bug in the bpf-helpers page.
> 
> Thanks for reporting bugs :)
> 
>  >
>  > Under the https://www.man7.org/linux/man-pages/man7/bpf-helpers.7.html:
> 
> This page is generated from the Linux kernel sources.  I've CCed Quentin and the 
> BPF list so they can check it there.
> 
> BTW, I'm refreshing the page now.
> 
> Quentin, I realized in the diff that there is some inconsistency in the number 
> of spaces after a sentence-ending period.  Could you please use two spaces for 
> that?  It's especially important for groff(1), which will render it differently. 
>    However, it's not a big issue, so don't feel urged to do that.

I also found some trailing whitespace.  I'm not sure if it's necessary for rst, 
but in man(7) it causes trailing whitespace.  grep for '^\.\. $'  (and maybe 
there are others that I didn't notice.

Cheers,

Alex

> 
> Cheers,
> 
> Alex
> 
>  >
>  > ```
>  >         u64 bpf_get_socket_cookie(struct sk_buff *skb)
>  >
>  >                Description
>  >                       If the struct sk_buff pointed by skb has a known
>  >                       socket, retrieve the cookie (generated by the
>  >                       kernel) of this socket.  If no cookie has been set
>  >                       yet, generate a new cookie. Once generated, the
>  >                       socket cookie remains stable for the life of the
>  >                       socket. This helper can be useful for monitoring
>  >                       per socket networking traffic statistics as it
>  >                       provides a global socket identifier that can be
>  >                       assumed unique.
>  >
>  >                Return A 8-byte long non-decreasing number on success, or
>  >                       0 if the socket field is missing inside skb.
>  >
>  >         u64 bpf_get_socket_cookie(struct bpf_sock_addr *ctx)
>  >
>  >                Description
>  >                       Equivalent to bpf_get_socket_cookie() helper that
>  >                       accepts skb, but gets socket from struct
>  >                       bpf_sock_addr context.
>  >
>  >                Return A 8-byte long non-decreasing number.
>  >
>  >         u64 bpf_get_socket_cookie(struct bpf_sock_ops *ctx)
>  >
>  >                Description
>  >                       Equivalent to bpf_get_socket_cookie() helper that
>  >                       accepts skb, but gets socket from struct
>  >                       bpf_sock_ops context.
>  >
>  >                Return A 8-byte long non-decreasing number.
>  > ```
>  >
>  > The function bpf_get_socket_cookie repeats three times. The second one
>  > should be bpf_get_socket_cookie_addr and the third one should be
>  > bpf_get_socket_cookie_ops.
> 

-- 
<http://www.alejandro-colomar.es/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-01-31 11:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 10:03 Typo in the man7 bpf-helpers page Zexuan Luo
2023-01-31 11:00 ` Alejandro Colomar
2023-01-31 11:40   ` Alejandro Colomar
2023-01-31 11:51     ` Alejandro Colomar [this message]
2023-01-31 12:02     ` Quentin Monnet
2023-01-31 14:36       ` Zexuan Luo
2023-01-31 14:45         ` Zexuan Luo
2023-01-31 14:51         ` Quentin Monnet

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=e27489a9-6ae5-0f31-0289-fe6344c58bd3@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=alx@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=quentin@isovalent.com \
    --cc=spacewanderlzx@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