linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf v2 0/1] bpf: btf: Fix endianness of bitfields
@ 2018-07-10 21:33 Okash Khawaja
  2018-07-10 21:33 ` [PATCH bpf v2 1/1] bpf: btf: Fix bitfield extraction for big endian Okash Khawaja
  0 siblings, 1 reply; 4+ messages in thread
From: Okash Khawaja @ 2018-07-10 21:33 UTC (permalink / raw)
  To: Daniel Borkmann, Martin KaFai Lau, Alexei Starovoitov,
	Yonghong Song, Jakub Kicinski, David S. Miller
  Cc: netdev, kernel-team, linux-kernel

Hi,

Following are the changes from v1:

- use compile time check for endianness
- factor out right_shift_bits from the check as it is same in both
- change size of bit shift variables to match length of bit offset in
BTF specification

Please note that I have considered non-big endians to be little endians
for our purposes. Let me know if you think that's a problem. We need to
then decide what to do in case neither of macros are defined.

Thanks,
Okash

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

end of thread, other threads:[~2018-07-11 22:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-10 21:33 [PATCH bpf v2 0/1] bpf: btf: Fix endianness of bitfields Okash Khawaja
2018-07-10 21:33 ` [PATCH bpf v2 1/1] bpf: btf: Fix bitfield extraction for big endian Okash Khawaja
2018-07-10 23:46   ` Martin KaFai Lau
2018-07-11 22:12     ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).