diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2022-01-24 11:42:53 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-01-25 17:59:07 -0800 |
commit | 61afd3da089417520ba828dd4a25e83c8efda345 (patch) | |
tree | 152b958b414b6bc6f07526b0ce0e6db1c466bb1a /samples/bpf/xdp_redirect_cpu_user.c | |
parent | 379d19ecdc208c7b8d3d221f29e39d84a5f3b00b (diff) | |
download | linux-61afd3da089417520ba828dd4a25e83c8efda345.tar.bz2 |
samples/bpf: use preferred getters/setters instead of deprecated ones
Use preferred setter and getter APIs instead of deprecated ones.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20220124194254.2051434-7-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'samples/bpf/xdp_redirect_cpu_user.c')
-rw-r--r-- | samples/bpf/xdp_redirect_cpu_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/xdp_redirect_cpu_user.c b/samples/bpf/xdp_redirect_cpu_user.c index a81704d3317b..5f74a70a9021 100644 --- a/samples/bpf/xdp_redirect_cpu_user.c +++ b/samples/bpf/xdp_redirect_cpu_user.c @@ -70,7 +70,7 @@ static void print_avail_progs(struct bpf_object *obj) printf(" Programs to be used for -p/--progname:\n"); bpf_object__for_each_program(pos, obj) { - if (bpf_program__is_xdp(pos)) { + if (bpf_program__type(pos) == BPF_PROG_TYPE_XDP) { if (!strncmp(bpf_program__name(pos), "xdp_prognum", sizeof("xdp_prognum") - 1)) printf(" %s\n", bpf_program__name(pos)); |