[PATCH v2 1/1] tools/lib/libbpf.c: fix string format to allow build on arm32

2018-05-23 Thread Sirio Balmelli
To fix, typecast 'key_size' and amend format string. Signed-off-by: Sirio Balmelli --- tools/lib/bpf/libbpf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 8f1707dbfcfa..e5cd4a958846 100644 --- a/too

Re: [PATCH 1/1] tools/lib/libbpf.c: fix string format to allow build on arm32

2018-05-23 Thread Sirio Balmelli
On Wed, May 23, 2018 at 08:49:47AM -0700, Martin KaFai Lau wrote: > On Wed, May 23, 2018 at 12:41:14PM +0200, Daniel Borkmann wrote: > > [ +Martin ] > > > > On 05/21/2018 08:59 AM, Sirio Balmelli wrote: > > > On arm32, 'cd tools/testing/selftests/bpf &&

[PATCH 1/1] selftests/bpf: Makefile fix "missing" headers on build with -idirafter

2018-05-21 Thread Sirio Balmelli
th '-idirafter' The choice of -idirafter is to catch this error without injecting unexpected include behavior: if an arch-specific tree is built for bpf in the future, this will be correctly found by Clang. Signed-off-by: Sirio Balmelli --- tools/testing/selftests/bpf/Makefile |

[PATCH 1/1] tools/lib/libbpf.c: fix string format to allow build on arm32

2018-05-21 Thread Sirio Balmelli
o fix, include 'inttypes.h' and change format directive to 'PRIi64'. Signed-off-by: Sirio Balmelli --- tools/lib/bpf/libbpf.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 3dbe217bf23e..e2cc8f

[PATCH v4 2/2] selftests/bpf: ignore build products

2018-05-08 Thread Sirio Balmelli
Update .gitignore files Signed-off-by: Sirio Balmelli --- tools/bpf/bpftool/.gitignore | 3 +++ tools/testing/selftests/bpf/.gitignore | 1 + 2 files changed, 4 insertions(+) create mode 100644 tools/bpf/bpftool/.gitignore diff --git a/tools/bpf/bpftool/.gitignore b/tools/bpf

[PATCH v4 1/2] selftests/bpf: add architecture-agnostic headers

2018-05-08 Thread Sirio Balmelli
bpf selftests fail to build with missing headers 'asm/bitsperlong.h' and 'asm/errno.h' These already exist in 'tools/arch/[arch]/include'; add architecture-agnostic header files in 'tools/include/uapi' to reference them. Signed-off-by: Sirio Balmelli -

[PATCH v4 0/2] selftests/bpf

2018-05-08 Thread Sirio Balmelli
Review of v3 patch much appreciated. Respun the series to omit the Makefile include, will work on a separate patch for that; replied to the v3 thread with queries specific to the include issue. best, Sirio Sirio Balmelli (2): selftests/bpf: add architecture-agnostic headers selftests/bpf

[PATCH v3 3/3] selftests/bpf: ignore build products

2018-05-02 Thread Sirio Balmelli
Update .gitignore files Signed-off-by: Sirio Balmelli --- tools/bpf/bpftool/.gitignore | 3 +++ tools/testing/selftests/bpf/.gitignore | 1 + 2 files changed, 4 insertions(+) create mode 100644 tools/bpf/bpftool/.gitignore diff --git a/tools/bpf/bpftool/.gitignore b/tools/bpf

[PATCH v3 0/3] selftests/bpf

2018-05-02 Thread Sirio Balmelli
simply point at '$(KERNEL)/usr/include'. The idea is to rely less on the headers outside the kernel tree, but also avoid adding maintenance burden by duplicating headers into 'tools'. Let me know what you think. Sirio Balmelli (3): selftests/bpf: add architecture-agnostic header

[PATCH v3 2/3] selftests/bpf: Makefile: add include path

2018-05-02 Thread Sirio Balmelli
ture- and distro-specific. The solution is to add $(KERNEL)/usr/include to the Makefile, so the build references these from the current kernel build and not the running system. Signed-off-by: Sirio Balmelli --- tools/testing/selftests/bpf/Makefile | 5 - 1 file changed, 4 insertions(+), 1 d

[PATCH v3 1/3] selftests/bpf: add architecture-agnostic headers

2018-05-02 Thread Sirio Balmelli
bpf selftests fail to build with missing headers 'asm/bitsperlong.h' and 'asm/errno.h' These already exist in 'tools/arch/[arch]/include'; add architecture-agnostic header files in 'tools/include/uapi' to reference them. Signed-off-by: Sirio Balmelli -

[PATCH v2 1/2] selftests/bpf: Makefile: add includes to fix broken test build

2018-04-30 Thread Sirio Balmelli
-p` and include /usr/include/x86_64-linux-gnu/asm/byteorder.h instead of $(ROOT)/usr/include. Signed-off-by: Sirio Balmelli --- tools/testing/selftests/bpf/Makefile | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/tes

[PATCH v2 2/2] selftests/bpf: update .gitignore files

2018-04-30 Thread Sirio Balmelli
Build products polluting Git cache. Add to respective .gitignore files. Signed-off-by: Sirio Balmelli --- tools/bpf/bpftool/.gitignore | 12 tools/testing/selftests/bpf/.gitignore | 1 + 2 files changed, 13 insertions(+) create mode 100644 tools/bpf/bpftool/.gitignore

[PATCH v2 0/2] selftests/bpf

2018-04-30 Thread Sirio Balmelli
Thank you for reviewing earlier patch :) Resubmitting with a saner include chain. I was unsure whether to reply to your mail directly or submit an entirely new set of patches marked 'v2'; apologies if this breaks the workflow. Sirio Balmelli (2): selftests/bpf: Makefile: add inclu

[PATCH 0/3] selftests/bpf

2018-04-26 Thread Sirio Balmelli
InstalledDir: /usr/local/bin llc --version LLVM (http://llvm.org/): LLVM version 7.0.0svn Optimized build. Default target: x86_64-unknown-linux-gnu Host CPU: haswell Sirio Balmelli (3): selftests/bpf: Makefile: add includes to fix broken test build selftests/bpf: test_xdp_noinline.c: fix

[PATCH 2/3] selftests/bpf: test_xdp_noinline.c: fix 'noinline' macro expansion

2018-04-26 Thread Sirio Balmelli
an #ifndef. Homogenize function declarations. Signed-off-by: Sirio Balmelli --- tools/testing/selftests/bpf/test_xdp_noinline.c | 79 + 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/tools/testing/selftests/bpf/test_xdp_noinline.c b/tools/testing/selftests

[PATCH 3/3] selftests/bpf: .gitignore: add test_btf

2018-04-26 Thread Sirio Balmelli
Signed-off-by: Sirio Balmelli --- tools/testing/selftests/bpf/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore index 5e1ab2f..9513c77 100644 --- a/tools/testing/selftests/bpf/.gitignore +++ b/tools

[PATCH 1/3] selftests/bpf: Makefile: add includes to fix broken test build

2018-04-26 Thread Sirio Balmelli
:10: fatal error: 'linux/compiler_types.h' file not found Fix this with -I$(ROOT)/include Signed-off-by: Sirio Balmelli --- tools/testing/selftests/bpf/Makefile | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/t