From: Ferenc Fejes <ferenc@fejes.dev>
To: Ido Schimmel <idosch@nvidia.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@kernel.org, dsahern@kernel.org, horms@kernel.org,
petrm@nvidia.com, rostedt@goodmis.org, daniel@iogearbox.net
Subject: Re: [PATCH net-next 0/3] Report netns cookie in FIB lookup tracepoints
Date: Wed, 07 Oct 2026 14:34:51 +0200 [thread overview]
Message-ID: <364f670e60754319fab25302b2b49e3269ec49da.camel@fejes.dev> (raw)
In-Reply-To: <20261006155454.853588-1-idosch@nvidia.com>
On Tue, 2026-10-06 at 18:54 +0300, Ido Schimmel wrote:
> The fib:fib_table_lookup and fib6:fib6_table_lookup tracepoints do
> not
> report the network namespace in which the lookup was performed, so
> lookups performed in different namespaces cannot be told apart. The
> recorded PID does not help either, as lookups in the receive path are
> performed in softIRQ context.
>
> This is a problem, for example, for netns-aware tracers [1] and
> multi-ASIC systems where each ASIC and its ports reside in a separate
> network namespace.
>
> This patchset reports the network namespace cookie in both
> tracepoints,
> as commit 27cb3de7f43a ("net: add net cookie for net device trace
> events") did for the net device tracepoints. This allows filtering
> lookups performed in a specific network namespace, for example:
>
> # perf record -a -e fib:fib_table_lookup --filter 'net_cookie == 12'
>
> The cookie of a given network namespace can be retrieved using "ip
> netns
> cookie" [2].
>
> Patch #1 reports the cookie in the IPv6 tracepoint, which is already
> passed the network namespace.
>
> Patch #2 passes the network namespace to fib_table_lookup() and from
> there to the IPv4 tracepoint.
>
> Patch #3 reports the cookie in the IPv4 tracepoint.
>
>
Thank you! With the user-facing changes given net-next is 100%
justified.
I wonder if the parameter passing itself, e.g. the line
+int fib_table_lookup(struct net *net, struct fib_table *tb, ...
can be a standalone change. It would introduce no functional or user-
facing changes and could therefore target the "net" tree, with the
potential to be backported. Pure kfunc/kprobe-based eBPF tracers could
benefit from that, with the downside of introducing an unused variable.
I assume this would be a hard sell, to say the least :-)
For the whole set:
Reviewed-by: Ferenc Fejes <ferenc@fejes.dev>
Best,
Ferenc
next prev parent reply other threads:[~2026-10-07 12:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 15:54 [PATCH net-next 0/3] Report netns cookie in FIB lookup tracepoints Ido Schimmel
2026-10-06 15:54 ` [PATCH net-next 1/3] ipv6: Report netns cookie in fib6_table_lookup tracepoint Ido Schimmel
2026-10-06 15:54 ` [PATCH net-next 2/3] ipv4: Pass netns to fib_table_lookup() Ido Schimmel
2026-10-07 23:16 ` netdev-bot+sashiko
2026-10-08 10:30 ` Ido Schimmel
2026-10-06 15:54 ` [PATCH net-next 3/3] ipv4: Report netns cookie in fib_table_lookup tracepoint Ido Schimmel
2026-10-07 12:34 ` Ferenc Fejes [this message]
2026-10-07 12:50 ` [PATCH net-next 0/3] Report netns cookie in FIB lookup tracepoints Ido Schimmel
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=364f670e60754319fab25302b2b49e3269ec49da.camel@fejes.dev \
--to=ferenc@fejes.dev \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox