Re: Typo in the man7 bpf-helpers page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux