lkml.org 
[lkml]   [2021]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 1/2] net: snmp: add tracepoint support for snmp
On Thu, 11 Nov 2021 21:35:29 +0800
menglong8.dong@gmail.com wrote:

> +#define DEFINE_SNMP_EVENT(proto) \
> +DEFINE_EVENT(snmp_template, snmp_##proto, \
> + TP_PROTO(struct sk_buff *skb, int field, int val), \
> + TP_ARGS(skb, field, val) \
> +)
> +
> +#define TRACE_SNMP(skb, proto, field, val) \
> + trace_snmp_##proto(skb, field, val)
> +
> +#endif

Why make a separate trace event for each protocol, and not just create an
enum that gets passed to the trace event? Then you could just filter on
what you want.

-- Steve

\
 
 \ /
  Last update: 2021-11-16 22:35    [W:1.999 / U:1.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site