From: "Ethy H. Brito" <ethy.brito@inexo.com.br>
To: Ivan Koveshnikov <ikoveshnik@gmail.com>
Cc: "xdp-newbies@vger.kernel.org" <xdp-newbies@vger.kernel.org>
Subject: Re: bpf_debug output
Date: Thu, 15 Jul 2021 16:25:53 -0300 [thread overview]
Message-ID: <20210715162553.3e151bae@babalu> (raw)
In-Reply-To: <CAHQrGVPbu8WVEaGWV1ytuOwx=-yam0OHD2fpOQdVVHTUz9F2GQ@mail.gmail.com>
On Wed, 14 Jul 2021 22:06:48 +0500
Ivan Koveshnikov <ikoveshnik@gmail.com> wrote:
> Hi Ethy,
Hi Ivan (and others behind the bushes)
>
> Correct. The output is available via file
> `/sys/kernel/debug/tracing/trace_pipe`. There are other helper
> programs that can also read it, like `bpftool prog tracelog` or `tc
> exec bpf dbg`.
>
> But you need to pay attention, what you're trying to print, since
> `bpf_printk()` supports much fewer formats than usual `printk()`. I.e.
> only `%d %i %u %x %ld %li %lu %lx %lld %lli %llu %llx %p %s`
> conversion specifiers are allowed. If an unsupported specifier is
> spotted, the string is silently dropped and never appears in trace
> log.
Very useful info.
I couldn't see my logs just because of this: unsupported format.
Now it is OK.
>
> Here you can find some examples:
> https://github.com/xdp-project/xdp-tutorial/tree/master/tracing03-xdp-debug-print
Thanx
Regards
Ethy
>
>
> Best regards,
> Ivan Koveshnikov
>
> On Wed, 14 Jul 2021 at 08:08, Ethy H. Brito <ethy.brito@inexo.com.br> wrote:
> >
> >
> > Hi!
> >
> > I am working on some minor modifications in xdp-cpumap-tc to accommodate NAT at WAN side.
> > But the things are not working as expected.
> >
> > How can bpf_debug be used to help debugging?
> >
> > I read that its output ends-up in /sys/kernel/debug/tracing/trace_pipe.
> > But how can it be read?
> > I tried "cat trace_pipe" but this produced no output whatsoever.
> >
> > Any hints will be appreciated.
> >
> > Thanx
> >
> > Regards
> >
> > Ethy
--
Ethy H. Brito /"\
InterNexo Ltda. \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860 X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil / \
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc
prev parent reply other threads:[~2021-07-15 19:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 3:08 bpf_debug output Ethy H. Brito
2021-07-14 17:06 ` Ivan Koveshnikov
2021-07-15 19:25 ` Ethy H. Brito [this message]
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=20210715162553.3e151bae@babalu \
--to=ethy.brito@inexo.com.br \
--cc=ikoveshnik@gmail.com \
--cc=xdp-newbies@vger.kernel.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.