From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Ian McDonald <ian.mcdonald@jandi.co.nz>,
Vlad Yasevich <vyasevich@gmail.com>,
Stephen Hemminger <stephen@networkplumber.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
"H . Peter Anvin" <hpa@zytor.com>,
Gerrit Renker <gerrit@erg.abdn.ac.uk>,
"David S . Miller" <davem@davemloft.net>,
Neil Horman <nhorman@tuxdriver.com>,
dccp@vger.kernel.org, netdev@vger.kernel.org,
linux-sctp@vger.kernel.org,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [v2 PATCH -tip 3/6] net: sctp: Add SCTP ACK tracking trace event
Date: Tue, 19 Dec 2017 10:31:38 +0900 [thread overview]
Message-ID: <20171219103138.f3076f81e14f0837c4b2386d@kernel.org> (raw)
In-Reply-To: <20171218120516.2d4398b2@gandalf.local.home>
On Mon, 18 Dec 2017 12:05:16 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:
> On Mon, 18 Dec 2017 17:12:15 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
>
> > Add SCTP ACK tracking trace event to trace the changes of SCTP
> > association state in response to incoming packets.
> > It is used for debugging SCTP congestion control algorithms,
> > and will replace sctp_probe module.
> >
> > Note that this event a bit tricky. Since this consists of 2
> > events (sctp_probe and sctp_probe_path) so you have to enable
> > both events as below.
> >
> > # cd /sys/kernel/debug/tracing
> > # echo 1 > events/sctp/sctp_probe/enable
> > # echo 1 > events/sctp/sctp_probe_path/enable
> >
> > Or, you can enable all the events under sctp.
> >
> > # echo 1 > events/sctp/enable
> >
> > Since sctp_probe_path event is always invoked from sctp_probe
> > event, you can not see any output if you only enable
> > sctp_probe_path.
>
> I have to ask, why did you do it this way?
>
>
> > +#include <trace/define_trace.h>
> > diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
> > index 8f8ccded13e4..c5f92b2cc5c3 100644
> > --- a/net/sctp/sm_statefuns.c
> > +++ b/net/sctp/sm_statefuns.c
> > @@ -59,6 +59,9 @@
> > #include <net/sctp/sm.h>
> > #include <net/sctp/structs.h>
> >
> > +#define CREATE_TRACE_POINTS
> > +#include <trace/events/sctp.h>
> > +
> > static struct sctp_packet *sctp_abort_pkt_new(
> > struct net *net,
> > const struct sctp_endpoint *ep,
> > @@ -3219,6 +3222,8 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
> > struct sctp_sackhdr *sackh;
> > __u32 ctsn;
> >
> > + trace_sctp_probe(ep, asoc, chunk);
>
> What about doing this right after this probe:
>
> if (trace_sctp_probe_path_enabled()) {
> struct sctp_transport *sp;
>
> list_for_each_entry(sp, &asoc->peer.transpor_addr_list,
> transports) {
> trace_sctp_probe_path(sp, asoc);
> }
> }
>
> The "trace_sctp_probe_path_enabled()" is a static branch, which means
> it's a nop just like a tracepoint is, and will not add any overhead if
> the trace_sctp_probe_path is not enabled.
That's a good idea! I'll update to use it :)
Thank you,
>
> -- Steve
>
> > +
> > if (!sctp_vtag_verify(chunk, asoc))
> > return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
> >
>
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2017-12-19 1:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 8:10 [v2 PATCH -tip 0/6] net: tcp: sctp: dccp: Replace jprobe usage with trace events Masami Hiramatsu
2017-12-18 8:11 ` [v2 PATCH -tip 1/6] net: tcp: Add trace events for TCP congestion window tracing Masami Hiramatsu
2017-12-20 1:44 ` kbuild test robot
2017-12-18 8:11 ` [v2 PATCH -tip 2/6] net: tcp: Remove TCP probe module Masami Hiramatsu
2017-12-18 8:12 ` [v2 PATCH -tip 3/6] net: sctp: Add SCTP ACK tracking trace event Masami Hiramatsu
2017-12-18 17:05 ` Steven Rostedt
2017-12-19 1:31 ` Masami Hiramatsu [this message]
2017-12-20 0:48 ` kbuild test robot
2017-12-18 8:12 ` [v2 PATCH -tip 4/6] net: sctp: Remove debug SCTP probe module Masami Hiramatsu
2017-12-18 8:13 ` [v2 PATCH -tip 5/6] net: dccp: Add DCCP sendmsg trace event Masami Hiramatsu
2017-12-18 8:13 ` [v2 PATCH -tip 6/6] net: dccp: Remove dccpprobe module Masami Hiramatsu
2017-12-19 8:31 ` [v2 PATCH -tip 0/6] net: tcp: sctp: dccp: Replace jprobe usage with trace events Masami Hiramatsu
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=20171219103138.f3076f81e14f0837c4b2386d@kernel.org \
--to=mhiramat@kernel.org \
--cc=davem@davemloft.net \
--cc=dccp@vger.kernel.org \
--cc=gerrit@erg.abdn.ac.uk \
--cc=hpa@zytor.com \
--cc=ian.mcdonald@jandi.co.nz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sfr@canb.auug.org.au \
--cc=stephen@networkplumber.org \
--cc=tglx@linutronix.de \
--cc=vyasevich@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox