Re: [PATCH bpf-next] selftests/bpf: don't use bpf helpers in non-bpf environment

2018-12-12 Thread Daniel Borkmann
On 12/12/2018 04:13 AM, Stanislav Fomichev wrote: > On 12/12, Daniel Borkmann wrote: >> On 12/11/2018 10:49 PM, Stanislav Fomichev wrote: >>> On 12/11, Stanislav Fomichev wrote: We're using bpf_htons in test_progs.c to initialize some static global data and I think I hit some weird case o

Re: [PATCH bpf-next] selftests/bpf: don't use bpf helpers in non-bpf environment

2018-12-11 Thread Stanislav Fomichev
On 12/12, Daniel Borkmann wrote: > On 12/11/2018 10:49 PM, Stanislav Fomichev wrote: > > On 12/11, Stanislav Fomichev wrote: > >> We're using bpf_htons in test_progs.c to initialize some static > >> global data and I think I hit some weird case on an older compiler > >> which doesn't have __builtin

Re: [PATCH bpf-next] selftests/bpf: don't use bpf helpers in non-bpf environment

2018-12-11 Thread Daniel Borkmann
On 12/11/2018 10:49 PM, Stanislav Fomichev wrote: > On 12/11, Stanislav Fomichev wrote: >> We're using bpf_htons in test_progs.c to initialize some static >> global data and I think I hit some weird case on an older compiler >> which doesn't have __builtin_bswap16 (and __builtin_constant_p >> expan

Re: [PATCH bpf-next] selftests/bpf: don't use bpf helpers in non-bpf environment

2018-12-11 Thread Stanislav Fomichev
On 12/11, Stanislav Fomichev wrote: > We're using bpf_htons in test_progs.c to initialize some static > global data and I think I hit some weird case on an older compiler > which doesn't have __builtin_bswap16 (and __builtin_constant_p > expands to false). > > In this case I see: > error: implicit