Linux userland API discussions
 help / color / mirror / Atom feed
* Please remove all bit fields in bpf uapi
@ 2020-12-18  8:52 Meng Zhuo
  2020-12-18  8:56 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Meng Zhuo @ 2020-12-18  8:52 UTC (permalink / raw)
  To: linux-api; +Cc: bpf

Hi, all

I'm tring to port bpf.h to Go, however it's very hard to make it right
with cgo since bit fields some fields didn't match any type of Go.

i.e.
struct bpf_prog_info {
        /* .... */
        __u32 gpl_compatible:1;             <-- boolean ?
        __u32 :31; /* alignment pad */   <--- padding with 31 ?

UAPI(User application interface) not just for GCC only right? If it's
true, I think remove all bit fields is more appropriate.

Thanks. Regards
Meng Zhuo

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-18 13:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-18  8:52 Please remove all bit fields in bpf uapi Meng Zhuo
2020-12-18  8:56 ` Greg KH
2020-12-18  9:09   ` Meng Zhuo
2020-12-18 10:31     ` Greg KH
2020-12-18 11:04       ` Florian Weimer
2020-12-18 13:05         ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox