1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM napi
5 #if !defined(_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ)
8 #include <linux/netdevice.h>
9 #include <linux/tracepoint.h>
10 #include <linux/ftrace.h>
12 #define NO_DEV "(no_device)"
14 TRACE_EVENT(napi_poll
,
16 TP_PROTO(struct napi_struct
*napi
, int work
, int budget
),
18 TP_ARGS(napi
, work
, budget
),
21 __field( struct napi_struct
*, napi
)
22 __string( dev_name
, napi
->dev
? napi
->dev
->name
: NO_DEV
)
29 __assign_str(dev_name
, napi
->dev
? napi
->dev
->name
: NO_DEV
);
31 __entry
->budget
= budget
;
34 TP_printk("napi poll on napi struct %p for device %s work %d budget %d",
35 __entry
->napi
, __get_str(dev_name
),
36 __entry
->work
, __entry
->budget
)
41 #endif /* _TRACE_NAPI_H */
43 /* This part must be outside protection */
44 #include <trace/define_trace.h>