]> git.baikalelectronics.ru Git - kernel.git/commit
samples/bpf: Xdp_redirect_cpu fix missing tracepoint attach
authorJesper Dangaard Brouer <brouer@redhat.com>
Fri, 20 Dec 2019 16:19:36 +0000 (17:19 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 21 Dec 2019 00:13:43 +0000 (16:13 -0800)
commit6a14fc6fd0182ada8b9ec386a74ef213c34a05aa
treeac70f4b3f3111f5c8001e2beec6510d527279109
parenta01c1b7347f71b9b7a8ee57ec9a371ed390c1774
samples/bpf: Xdp_redirect_cpu fix missing tracepoint attach

When sample xdp_redirect_cpu was converted to use libbpf, the
tracepoints used by this sample were not getting attached automatically
like with bpf_load.c. The BPF-maps was still getting loaded, thus
nobody notice that the tracepoints were not updating these maps.

This fix doesn't use the new skeleton code, as this bug was introduced
in v5.1 and stable might want to backport this. E.g. Red Hat QA uses
this sample as part of their testing.

Fixes: 6732d8f48a7a ("samples/bpf: Convert XDP samples to libbpf usage")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/157685877642.26195.2798780195186786841.stgit@firesoul
samples/bpf/xdp_redirect_cpu_user.c