On 2019/05/23 22:12, Jesper Dangaard Brouer wrote: > On Thu, 23 May 2019 19:56:47 +0900 > Toshiaki Makita <makita.toshiaki@xxxxxxxxxxxxx> wrote: > >> This is introduced for admins to check what is happening on XDP_TX when >> bulk XDP_TX is in use. >> >> Signed-off-by: Toshiaki Makita <makita.toshiaki@xxxxxxxxxxxxx> >> --- >> include/trace/events/xdp.h | 25 +++++++++++++++++++++++++ >> kernel/bpf/core.c | 1 + >> 2 files changed, 26 insertions(+) >> >> diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h >> index e95cb86..e06ea65 100644 >> --- a/include/trace/events/xdp.h >> +++ b/include/trace/events/xdp.h >> @@ -50,6 +50,31 @@ >> __entry->ifindex) >> ); >> >> +TRACE_EVENT(xdp_bulk_tx, >> + > > You are using this tracepoint like/instead of trace_xdp_devmap_xmit if > I understand correctly? Or maybe the trace_xdp_redirect tracepoint. Yes, I have trace_xdp_devmap_xmit in mind, which is for XDP_REDIRECT. > The point is that is will be good if the tracepoints can share the > TP_STRUCT layout beginning, as it allows for attaching and reusing eBPF > code that is only interested in the top part of the struct. It's good, but this tracepoint does not have map concept so differs from xdp_devmap_xmit. > I would also want to see some identifier, that trace programs can use > to group and corrolate these events, you do have ifindex, but most > other XDP tracepoints also have "prog_id". I have considered that too. The problem is that we cannot pass a reliable prog_id since bulk xmit happens after RCU critical section of XDP_TX. xdp_devmap_xmit does not have prog_id and I guess there is a similar reason for it? -- Toshiaki Makita