summaryrefslogtreecommitdiffstats
path: root/samples/bpf/sockex1_user.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-12-20 20:13:37 +0100
committerIngo Molnar <mingo@kernel.org>2016-12-20 20:13:37 +0100
commit037569172083a59c0cc5b66c5e1cf80dcf27ebb7 (patch)
treede00115c5bbf4b55f8f5ac5e6e990e2aacf7a044 /samples/bpf/sockex1_user.c
parent297e765e390a2ac996000b5f7228cbd84d995174 (diff)
parent9899694a7f67714216665b87318eb367e2c5c901 (diff)
downloadlinux-stable-037569172083a59c0cc5b66c5e1cf80dcf27ebb7.tar.gz
linux-stable-037569172083a59c0cc5b66c5e1cf80dcf27ebb7.tar.bz2
linux-stable-037569172083a59c0cc5b66c5e1cf80dcf27ebb7.zip
Merge tag 'perf-core-for-mingo-20161220' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/core improvements and fixes: New features: - Introduce 'perf sched timehist --idle', to analyse processes going to/from idle state (Namhyung Kim) Fixes: - Allow 'perf record -u user' to continue when facing races with threads going away after having scanned them via /proc (Jiri Olsa) - Fix 'perf mem' --all-user/--all-kernel options (Jiri Olsa) - Support jumps with multiple arguments (Ravi Bangoria) - Fix jumps to before the function where they are located (Ravi Bangoria) - Fix lock-pi help string (Davidlohr Bueso) - Fix build of 'perf trace' in odd systems such as a RHEL PPC one (Jiri Olsa) - Do not overwrite valid build id in 'perf diff' (Kan Liang) - Don't throw error for zero length symbols, allowing the use of the TUI in PowerPC, where such symbols became more common recently (Ravi Bangoria) Infrastructure changes: - Switch of samples/bpf/ to use tools/lib/bpf, removing libbpf duplication (Joe Stringer) - Move headers check into bash script (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'samples/bpf/sockex1_user.c')
-rw-r--r--samples/bpf/sockex1_user.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/samples/bpf/sockex1_user.c b/samples/bpf/sockex1_user.c
index 678ce4693551..6cd2feb3e9b3 100644
--- a/samples/bpf/sockex1_user.c
+++ b/samples/bpf/sockex1_user.c
@@ -3,6 +3,7 @@
#include <linux/bpf.h>
#include "libbpf.h"
#include "bpf_load.h"
+#include "sock_example.h"
#include <unistd.h>
#include <arpa/inet.h>
@@ -32,13 +33,13 @@ int main(int ac, char **argv)
int key;
key = IPPROTO_TCP;
- assert(bpf_lookup_elem(map_fd[0], &key, &tcp_cnt) == 0);
+ assert(bpf_map_lookup_elem(map_fd[0], &key, &tcp_cnt) == 0);
key = IPPROTO_UDP;
- assert(bpf_lookup_elem(map_fd[0], &key, &udp_cnt) == 0);
+ assert(bpf_map_lookup_elem(map_fd[0], &key, &udp_cnt) == 0);
key = IPPROTO_ICMP;
- assert(bpf_lookup_elem(map_fd[0], &key, &icmp_cnt) == 0);
+ assert(bpf_map_lookup_elem(map_fd[0], &key, &icmp_cnt) == 0);
printf("TCP %lld UDP %lld ICMP %lld bytes\n",
tcp_cnt, udp_cnt, icmp_cnt);