[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1492002120.2855.3.camel@sipsolutions.net>
Date: Wed, 12 Apr 2017 15:02:00 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>
Subject: Re: eBPF - little-endian load instructions?
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
Powered by blists - more mailing lists