linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk@codeconstruct.com.au>
To: Tal Yacobi <talycb8@gmail.com>
Cc: matt@codeconstruct.com.au, rostedt@goodmis.org,
	mhiramat@kernel.org,  mathieu.desnoyers@efficios.com,
	netdev@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] mctp i2c: Add rx trace
Date: Thu, 30 May 2024 16:42:12 +0800	[thread overview]
Message-ID: <a9f559ac6da9e44cdcffe1cb80a4468096efb1f8.camel@codeconstruct.com.au> (raw)
In-Reply-To: <CAN7-cG5w9rjhJnDJJSOTiopxkj75mOJEC9eKZqmJaqbeMudPQQ@mail.gmail.com>

Hi Tal,

> > > mctp-i2c rx implementation doesn't call
> > > __i2c_transfer which calls the i2c reply trace function.
> > 
> > No, but we can trace the i2c rx path through the trace_i2c_slave
> > tracepoint. It is a little messier than tracing trace_i2c_write,
> > but
> > has been sufficient with the debugging I've needed in the past.
> 
> Oh, I missed that.
> I had to test it with an older kernel without i2c_slave tracing
> so I looked only at the regular i2c and mctp trace paths.

OK! That tracepoint was (coincidentally) added in 5.18, same as the
MCTP-over-i2c transport. So we should have coverage for both features
on upstream kernels, at least.

> > > Add an mctp_reply trace function that will be used instead.
> > 
> > Can you elaborate a little on what you were/are looking to inspect
> > here? (mainly: which packet fields are you interested in?) That
> > will
> > help to determine the best approach here.
> 
> Sure, I basically wanted to trace the i2c packet buffer in a simple
> way.

OK - did you specifically need the i2c transport headers? Since the
MCTP interfaces are regular net devices, the easiest way to trace
generic MCTP transfers is generally via a packet capture (tcpdump,
wireshark, etc).

Cheers,


Jeremy


  reply	other threads:[~2024-05-30  8:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-28 14:34 [PATCH] mctp i2c: Add rx trace Tal Yacobi
2024-05-28 23:54 ` Jeremy Kerr
2024-05-29 17:01   ` Tal Yacobi
2024-05-30  8:42     ` Jeremy Kerr [this message]
2024-05-31 22:13 ` kernel test robot

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=a9f559ac6da9e44cdcffe1cb80a4468096efb1f8.camel@codeconstruct.com.au \
    --to=jk@codeconstruct.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=matt@codeconstruct.com.au \
    --cc=mhiramat@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=talycb8@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;
as well as URLs for NNTP newsgroup(s).