On Wed, 19 Dec 2018 17:40:49 +0100 Jesper Dangaard Brouer <bro...@redhat.com> wrote:
> My napi_monitor use-case is not a slow-path event, even-though in > optimal cases we should handle 64 packets per tracepoint invocation, > but I'm using this for 100G NICs with >20Mpps. And I mostly use the > tool when something looks wrong and I don't see 64 packet bulks, which > is also why I detect when this gets invoked from idle task or from > ksoftirqd. > Would it be possible to add an interface that just connects to the tracepoint without having to use the trace event itself (the trace event is what shows up in tracefs/events/*/*). That would give you full control of what you want: void my_probe(void *data, const struct netdev_notifier_info *info, unsigned long val) { do_something_with(info->dev->ifindex); } void setup(void) { register_trace_netdev_notifier_entry(my_probe, data); } That allows you to attach a function to the tracepoint and not worry about the overhead of what the trace event gives you. -- Steve