From: Okash Khawaja Subject: [PATCH bpf v2 0/1] bpf: btf: Fix endianness of bitfields Date: Tue, 10 Jul 2018 14:33:06 -0700 Message-ID: <20180710213306.646146378@fb.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , To: Daniel Borkmann , Martin KaFai Lau , Alexei Starovoitov , Yonghong Song , Jakub Kicinski , "David S. Miller" Return-path: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org 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