From: Steven Rostedt <rost...@goodmis.org> The events xdp_cpumap_kthread, xdp_cpumap_enqueue and xdp_devmap_xmit are only called when CONFIG_BPF_SYSCALL is defined. As each event can take up to 5K regardless if they are used or not, it's best not to define them when they are not used. Add #ifdef around these events when they are not used.
Acked-by: Jesper Dangaard Brouer <h...@kernel.org> Signed-off-by: Steven Rostedt (Google) <rost...@goodmis.org> --- Changes since v1: https://lore.kernel.org/20250612101612.3d450...@batman.local.home - Rebased on top of bpf-next include/trace/events/xdp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h index d3ef86c97ae3..746a9e95a52a 100644 --- a/include/trace/events/xdp.h +++ b/include/trace/events/xdp.h @@ -187,6 +187,7 @@ DEFINE_EVENT(xdp_redirect_template, xdp_redirect_map_err, TP_ARGS(dev, xdp, tgt, err, map_type, map_id, index) ); +#ifdef CONFIG_BPF_SYSCALL TRACE_EVENT(xdp_cpumap_kthread, TP_PROTO(int map_id, unsigned int processed, unsigned int drops, @@ -300,6 +301,7 @@ TRACE_EVENT(xdp_devmap_xmit, __entry->sent, __entry->drops, __entry->err) ); +#endif /* CONFIG_BPF_SYSCALL */ /* Expect users already include <net/xdp.h>, but not xdp_priv.h */ #include <net/xdp_priv.h> -- 2.47.2