summaryrefslogtreecommitdiff
path: root/samples/bpf/xdp_sample_user.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2022-01-24 22:42:53 +0300
committerAlexei Starovoitov <ast@kernel.org>2022-01-26 04:59:07 +0300
commit61afd3da089417520ba828dd4a25e83c8efda345 (patch)
tree152b958b414b6bc6f07526b0ce0e6db1c466bb1a /samples/bpf/xdp_sample_user.h
parent379d19ecdc208c7b8d3d221f29e39d84a5f3b00b (diff)
downloadlinux-61afd3da089417520ba828dd4a25e83c8efda345.tar.xz
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_sample_user.h')
-rw-r--r--samples/bpf/xdp_sample_user.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/xdp_sample_user.h b/samples/bpf/xdp_sample_user.h
index 5f44b877ecf5..f45051679977 100644
--- a/samples/bpf/xdp_sample_user.h
+++ b/samples/bpf/xdp_sample_user.h
@@ -61,7 +61,7 @@ static inline char *safe_strncpy(char *dst, const char *src, size_t size)
#define __attach_tp(name) \
({ \
- if (!bpf_program__is_tracing(skel->progs.name)) \
+ if (bpf_program__type(skel->progs.name) != BPF_PROG_TYPE_TRACING)\
return -EINVAL; \
skel->links.name = bpf_program__attach(skel->progs.name); \
if (!skel->links.name) \