lkml.org 
[lkml]   [2021]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] bpf.2: Use standard types and attributes
From
Date
Hello Alexei,

On 4/24/21 1:20 AM, Alexei Starovoitov wrote:
> Nack.
> The man page should describe the kernel api the way it is in .h file.

Why?

When glibc uses __size_t (or any other non-standard types) just because
the standard doesn't allow it to define some types in some specific
header, the manual pages document the equivalent standard type, (i.e.,
if glibc uses __size_t, we document size_t).

The compiler, AFAIK (gcc is CCd, so they can jump in if I'm wrong),
using uint32_t in every situation where __u32 is expected. They're both
typedefs for the same basic type.

I can understand why Linux will keep using u32 types (and their __ user
space variants), but that doesn't mean user space programs need to use
the same type.

If we have a standard syntax for fixed-width integral types (and for
anything, actually), the manual pages should probably follow it,
whenever possible. Any deviation from the standard (be it C or POSIX)
should have a very good reason to be; otherwise, it only creates confusion.

Thanks,

Alex

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

\
 
 \ /
  Last update: 2021-04-24 19:57    [W:0.208 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site