From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [PATCH] bpf: fix build error with clang Date: Mon, 27 Aug 2018 20:44:44 -0700 Message-ID: <20180828034442.drkvs6erk4dh65eu@ast-mbp> References: <20180827193042.3573-1-stefan@agner.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: daniel@iogearbox.net, kafai@fb.com, ast@kernel.org, mka@chromium.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: Stefan Agner Return-path: Content-Disposition: inline In-Reply-To: <20180827193042.3573-1-stefan@agner.ch> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Mon, Aug 27, 2018 at 09:30:42PM +0200, Stefan Agner wrote: > Building the newly introduced BPF_PROG_TYPE_SK_REUSEPORT leads to > a compile time error when building with clang: > net/core/filter.o: In function `sk_reuseport_convert_ctx_access': > ../net/core/filter.c:7284: undefined reference to `__compiletime_assert_7284' > > It seems that clang has issues resolving hweight_long at compile > time. Since SK_FL_PROTO_MASK is a constant, we can use the interface > for known constant arguments which works fine with clang. > > Fixes: 2dbb9b9e6df6 ("bpf: Introduce BPF_PROG_TYPE_SK_REUSEPORT") > Signed-off-by: Stefan Agner Applied, Thanks