Skip to content

Commit a9a5f41

Browse files
rostedtAlexei Starovoitov
authored andcommitted
xdp: Remove unused events xdp_redirect_map and xdp_redirect_map_err
Each TRACE_EVENT() defined can take up around 5K of text and meta data regardless if they are used or not. New code is being developed that will warn when a tracepoint is defined but not used. The trace events xdp_redirect_map and xdp_redirect_map_err are defined but not used, but there's also a comment that states these are kept around for backward compatibility. Which is interesting because since they are not used, any old BPF program that expects them to exist will get incorrect data (no data) when they use them. It's worse than not working, it's silently failing. Remove them as they will soon cause warnings, or if they really need to stick around, then code needs to be added to use them. Signed-off-by: Steven Rostedt (Google) <[email protected]> Reviewed-by: Toke Høiland-Jørgensen <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 7f12c33 commit a9a5f41

File tree

1 file changed

+0
-19
lines changed
  • include/trace/events

1 file changed

+0
-19
lines changed

include/trace/events/xdp.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -168,25 +168,6 @@ DEFINE_EVENT(xdp_redirect_template, xdp_redirect_err,
168168
#define _trace_xdp_redirect_map_err(dev, xdp, to, map_type, map_id, index, err) \
169169
trace_xdp_redirect_err(dev, xdp, to, err, map_type, map_id, index)
170170

171-
/* not used anymore, but kept around so as not to break old programs */
172-
DEFINE_EVENT(xdp_redirect_template, xdp_redirect_map,
173-
TP_PROTO(const struct net_device *dev,
174-
const struct bpf_prog *xdp,
175-
const void *tgt, int err,
176-
enum bpf_map_type map_type,
177-
u32 map_id, u32 index),
178-
TP_ARGS(dev, xdp, tgt, err, map_type, map_id, index)
179-
);
180-
181-
DEFINE_EVENT(xdp_redirect_template, xdp_redirect_map_err,
182-
TP_PROTO(const struct net_device *dev,
183-
const struct bpf_prog *xdp,
184-
const void *tgt, int err,
185-
enum bpf_map_type map_type,
186-
u32 map_id, u32 index),
187-
TP_ARGS(dev, xdp, tgt, err, map_type, map_id, index)
188-
);
189-
190171
TRACE_EVENT(xdp_cpumap_kthread,
191172

192173
TP_PROTO(int map_id, unsigned int processed, unsigned int drops,

0 commit comments

Comments
 (0)