All of lore.kernel.org
 help / color / mirror / Atom feed
From: Menglong Dong <menglong8.dong@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Jakub Kicinski <kuba@kernel.org>,
	David Miller <davem@davemloft.net>,
	mingo@redhat.com, Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	dsahern@kernel.org, Menglong Dong <imagedong@tencent.com>,
	LKML <linux-kernel@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 1/2] net: snmp: add tracepoint support for snmp
Date: Wed, 17 Nov 2021 21:55:20 +0800	[thread overview]
Message-ID: <CADxym3bHJZ+3HX3V=JjHfk7ZiUQAwwwdXL07e-JBSp9-wjdVXQ@mail.gmail.com> (raw)
In-Reply-To: <20211116163407.7e0c6129@gandalf.local.home>

On Wed, Nov 17, 2021 at 5:34 AM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> 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.

enn....I'm not sure, just feel comfortable to create a separate trace event for
each protocol. Maybe it is easier to use? However, making them together
seems more fridently to users who want to do statistics for all protocols. I'll
think over it~~~

Thanks!
Menglong Dong

>
> -- Steve

  reply	other threads:[~2021-11-17 13:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 13:35 [PATCH net-next 0/2] net: snmp: tracepoint support for snmp menglong8.dong
2021-11-11 13:35 ` [PATCH net-next 1/2] net: snmp: add " menglong8.dong
2021-11-16 21:34   ` Steven Rostedt
2021-11-17 13:55     ` Menglong Dong [this message]
2021-11-11 13:35 ` [PATCH net-next 2/2] net: snmp: add snmp tracepoint support for udp menglong8.dong
2021-11-11 21:07   ` kernel test robot
2021-11-11 21:07     ` kernel test robot
2021-11-13  3:32   ` kernel test robot
2021-11-13  3:32     ` kernel test robot
2021-11-11 14:08 ` [PATCH net-next 0/2] net: snmp: tracepoint support for snmp Jakub Kicinski
2021-11-12  1:40   ` Menglong Dong
2021-11-12  1:50     ` Jakub Kicinski
2021-11-12  6:42       ` Menglong Dong
2021-11-12 14:31         ` Steven Rostedt
2021-11-16  2:27           ` Menglong Dong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADxym3bHJZ+3HX3V=JjHfk7ZiUQAwwwdXL07e-JBSp9-wjdVXQ@mail.gmail.com' \
    --to=menglong8.dong@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=imagedong@tencent.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.