Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1370776 > unrolled thread
| Started by | "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> |
|---|---|
| First post | 2016-04-04 19:10 +0200 |
| Last post | 2016-04-06 22:10 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
[PATCHv2 net 1/3] samples/bpf: Fix build breakage with map_perf_test_user.c "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-04-04 19:10 +0200
[PATCHv2 net 2/3] samples/bpf: Use llc in PATH, rather than a hardcoded value "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2016-04-04 19:10 +0200
Re: [PATCHv2 net 2/3] samples/bpf: Use llc in PATH, rather than a hardcoded value Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2016-04-04 19:30 +0200
Re: [PATCHv2 net 2/3] samples/bpf: Use llc in PATH, rather than a hardcoded value David Miller <davem@davemloft.net> - 2016-04-06 22:10 +0200
Re: [PATCHv2 net 1/3] samples/bpf: Fix build breakage with map_perf_test_user.c David Miller <davem@davemloft.net> - 2016-04-06 22:10 +0200
| From | "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> |
|---|---|
| Date | 2016-04-04 19:10 +0200 |
| Subject | [PATCHv2 net 1/3] samples/bpf: Fix build breakage with map_perf_test_user.c |
| Message-ID | <rkgaJ-6mK-5@gated-at.bofh.it> |
Building BPF samples is failing with the below error:
samples/bpf/map_perf_test_user.c: In function ‘main’:
samples/bpf/map_perf_test_user.c:134:9: error: variable ‘r’ has
initializer but incomplete type
struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
^
samples/bpf/map_perf_test_user.c:134:21: error: ‘RLIM_INFINITY’
undeclared (first use in this function)
struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
^
samples/bpf/map_perf_test_user.c:134:21: note: each undeclared
identifier is reported only once for each function it appears in
samples/bpf/map_perf_test_user.c:134:9: warning: excess elements in
struct initializer [enabled by default]
struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
^
samples/bpf/map_perf_test_user.c:134:9: warning: (near initialization
for ‘r’) [enabled by default]
samples/bpf/map_perf_test_user.c:134:9: warning: excess elements in
struct initializer [enabled by default]
samples/bpf/map_perf_test_user.c:134:9: warning: (near initialization
for ‘r’) [enabled by default]
samples/bpf/map_perf_test_user.c:134:16: error: storage size of ‘r’
isn’t known
struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
^
samples/bpf/map_perf_test_user.c:139:2: warning: implicit declaration of
function ‘setrlimit’ [-Wimplicit-function-declaration]
setrlimit(RLIMIT_MEMLOCK, &r);
^
samples/bpf/map_perf_test_user.c:139:12: error: ‘RLIMIT_MEMLOCK’
undeclared (first use in this function)
setrlimit(RLIMIT_MEMLOCK, &r);
^
samples/bpf/map_perf_test_user.c:134:16: warning: unused variable ‘r’
[-Wunused-variable]
struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
^
make[2]: *** [samples/bpf/map_perf_test_user.o] Error 1
Fix this by including the necessary header file.
Cc: Alexei Starovoitov <ast@fb.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: David S. Miller <davem@davemloft.net>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
---
v2: no changes
samples/bpf/map_perf_test_user.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/samples/bpf/map_perf_test_user.c b/samples/bpf/map_perf_test_user.c
index 95af56e..3147377 100644
--- a/samples/bpf/map_perf_test_user.c
+++ b/samples/bpf/map_perf_test_user.c
@@ -17,6 +17,7 @@
#include <linux/bpf.h>
#include <string.h>
#include <time.h>
+#include <sys/resource.h>
#include "libbpf.h"
#include "bpf_load.h"
--
2.7.4
[toc] | [next] | [standalone]
| From | "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> |
|---|---|
| Date | 2016-04-04 19:10 +0200 |
| Subject | [PATCHv2 net 2/3] samples/bpf: Use llc in PATH, rather than a hardcoded value |
| Message-ID | <rkgaL-6mK-45@gated-at.bofh.it> |
| In reply to | #1370776 |
While at it, remove the generation of .s files and fix some typos in the related comment. Cc: Alexei Starovoitov <ast@fb.com> Cc: David S. Miller <davem@davemloft.net> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> --- v2: removed generation of .s files samples/bpf/Makefile | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 502c9fc..b820cc9 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -76,16 +76,10 @@ HOSTLOADLIBES_offwaketime += -lelf HOSTLOADLIBES_spintest += -lelf HOSTLOADLIBES_map_perf_test += -lelf -lrt -# point this to your LLVM backend with bpf support -LLC=$(srctree)/tools/bpf/llvm/bld/Debug+Asserts/bin/llc - -# asm/sysreg.h inline assmbly used by it is incompatible with llvm. -# But, ehere is not easy way to fix it, so just exclude it since it is +# asm/sysreg.h - inline assembly used by it is incompatible with llvm. +# But, there is no easy way to fix it, so just exclude it since it is # useless for BPF samples. $(obj)/%.o: $(src)/%.c clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \ - -O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@ - clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ - -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \ - -O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=asm -o $@.s + -O2 -emit-llvm -c $< -o -| llc -march=bpf -filetype=obj -o $@ -- 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Alexei Starovoitov <alexei.starovoitov@gmail.com> |
|---|---|
| Date | 2016-04-04 19:30 +0200 |
| Subject | Re: [PATCHv2 net 2/3] samples/bpf: Use llc in PATH, rather than a hardcoded value |
| Message-ID | <rkgu6-6wi-23@gated-at.bofh.it> |
| In reply to | #1370782 |
On Mon, Apr 04, 2016 at 10:31:33PM +0530, Naveen N. Rao wrote: > While at it, remove the generation of .s files and fix some typos in the > related comment. > > Cc: Alexei Starovoitov <ast@fb.com> > Cc: David S. Miller <davem@davemloft.net> > Cc: Daniel Borkmann <daniel@iogearbox.net> > Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> > Cc: Michael Ellerman <mpe@ellerman.id.au> > Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Acked-by: Alexei Starovoitov <ast@kernel.org>
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-04-06 22:10 +0200 |
| Subject | Re: [PATCHv2 net 2/3] samples/bpf: Use llc in PATH, rather than a hardcoded value |
| Message-ID | <rl1W2-Pq-17@gated-at.bofh.it> |
| In reply to | #1370782 |
From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> Date: Mon, 4 Apr 2016 22:31:33 +0530 > While at it, remove the generation of .s files and fix some typos in the > related comment. > > Cc: Alexei Starovoitov <ast@fb.com> > Cc: David S. Miller <davem@davemloft.net> > Cc: Daniel Borkmann <daniel@iogearbox.net> > Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> > Cc: Michael Ellerman <mpe@ellerman.id.au> > Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Applied.
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-04-06 22:10 +0200 |
| Subject | Re: [PATCHv2 net 1/3] samples/bpf: Fix build breakage with map_perf_test_user.c |
| Message-ID | <rl1W2-Pq-13@gated-at.bofh.it> |
| In reply to | #1370776 |
From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> Date: Mon, 4 Apr 2016 22:31:32 +0530 > Building BPF samples is failing with the below error: ... > Fix this by including the necessary header file. > > Cc: Alexei Starovoitov <ast@fb.com> > Cc: Daniel Borkmann <daniel@iogearbox.net> > Cc: David S. Miller <davem@davemloft.net> > Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> > Cc: Michael Ellerman <mpe@ellerman.id.au> > Acked-by: Alexei Starovoitov <ast@kernel.org> > Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web