summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2023-08-02 14:21:12 -0700
committerAlexei Starovoitov <ast@kernel.org>2023-08-02 14:21:12 -0700
commit87dc2bb3291832994d216c7c86e3f4898022272f (patch)
tree48d166244fee603c968d23d1c6ddc55767a29566 /include
parent416c6d01244ecbf0abfdb898fd091b50ef951b48 (diff)
parent7fedbf32fcc779a07abdba1347e759ad52bded2c (diff)
Merge branch 'bpf-xdp-add-tracepoint-to-xdp-attaching-failure'
Leon Hwang says: ==================== bpf, xdp: Add tracepoint to xdp attaching failure This series introduces a new tracepoint in bpf_xdp_link_attach(). By this tracepoint, error message will be captured when error happens in dev_xdp_attach(), e.g. invalid attaching flags. v4 -> v5: * Initialise the extack variable. * Fix code style issue of variable declaration lines. v3 -> v4: * Fix selftest-crashed issue. ==================== Link: https://lore.kernel.org/r/20230801142621.7925-1-hffilwlqm@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/trace/events/xdp.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h
index c40fc97f9417..cd89f1d5ce7b 100644
--- a/include/trace/events/xdp.h
+++ b/include/trace/events/xdp.h
@@ -404,6 +404,23 @@ TRACE_EVENT(mem_return_failed,
)
);
+TRACE_EVENT(bpf_xdp_link_attach_failed,
+
+ TP_PROTO(const char *msg),
+
+ TP_ARGS(msg),
+
+ TP_STRUCT__entry(
+ __string(msg, msg)
+ ),
+
+ TP_fast_assign(
+ __assign_str(msg, msg);
+ ),
+
+ TP_printk("errmsg=%s", __get_str(msg))
+);
+
#endif /* _TRACE_XDP_H */
#include <trace/define_trace.h>