lkml.org 
[lkml]   [2017]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next] bpf: update perf event helper function signature and documentation
From
From: Teng Qin <qinteng@fb.com>
Date: Tue, 23 May 2017 03:17:31 +0000

> Alexei said it was due to Clang not taking u64, u32 etc. for compilation.
> I didn’t know the context and just used them. But apparently, something
> changed and now they build and run OK......

These types are %100 compiler agnostic. Clang doesn't care. All
compilers can understand:

typedef unsigned int u32;

So it's not a Clang specific issue.

The problem could only have to do with whether the types get typdef'd
or not with the header files that are used in conjunction with the
file we are talking about here.

And if we do get a proper set of defines from linux/types.h these days
we should:

1) Make that explicit, by including linux/types.h in bpf_helpers.h

2) Use those types universally in this file where we were avoiding
doing so

This header file also uses "SEC" and expects to get this definition
implicitly, and therefore there is another header file that
bpf_helpers.h must include in order to explicitly and reliably have
that definition.

Just changing one prototype, and relying on getting the types
indirectly by other header files including by whoever incudes
bpf_helpers.h is not the way to go.

Thanks.

\
 
 \ /
  Last update: 2017-05-25 18:08    [W:0.065 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site