summaryrefslogtreecommitdiffstats
path: root/samples/bpf/test_cgrp2_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/bpf/test_cgrp2_sock.c')
-rw-r--r--samples/bpf/test_cgrp2_sock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/samples/bpf/test_cgrp2_sock.c b/samples/bpf/test_cgrp2_sock.c
index d467b3c1c55c..43b4bde5d05c 100644
--- a/samples/bpf/test_cgrp2_sock.c
+++ b/samples/bpf/test_cgrp2_sock.c
@@ -23,6 +23,8 @@
#include "libbpf.h"
+char bpf_log_buf[BPF_LOG_BUF_SIZE];
+
static int prog_load(int idx)
{
struct bpf_insn prog[] = {
@@ -34,8 +36,8 @@ static int prog_load(int idx)
BPF_EXIT_INSN(),
};
- return bpf_prog_load(BPF_PROG_TYPE_CGROUP_SOCK, prog, sizeof(prog),
- "GPL", 0);
+ return bpf_load_program(BPF_PROG_TYPE_CGROUP_SOCK, prog, sizeof(prog),
+ "GPL", 0, bpf_log_buf, BPF_LOG_BUF_SIZE);
}
static int usage(const char *argv0)