On Tue, 2017-04-11 at 13:06 +0200, Daniel Borkmann wrote: > > There are instructions to convert endianess, see __bpf_prog_run(), > the ALU_END_TO_BE, ALU_END_TO_LE labels for details. There's a > BPF_ENDIAN() macro used in the test suite and other places.
Are these hooked up to llvm intrinsics or so? If not, can I do that through some kind of inline asm statement? In the samples, I only see people doing #define _htonl __builtin_bswap32 but I'm not even completely convinced that's correct, since it assumes a little-endian host? johannes