From: Ido Schimmel <idosch@nvidia.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@kernel.org, dsahern@kernel.org, horms@kernel.org,
rostedt@goodmis.org, mhiramat@kernel.org,
mathieu.desnoyers@efficios.com, daniel@iogearbox.net,
petrm@nvidia.com, ferenc@fejes.dev,
Ido Schimmel <idosch@nvidia.com>
Subject: [PATCH net-next v2 3/3] ipv4: Report netns cookie in fib_table_lookup tracepoint
Date: Thu, 8 Oct 2026 16:31:58 +0300 [thread overview]
Message-ID: <20261008133158.1438907-4-idosch@nvidia.com> (raw)
In-Reply-To: <20261008133158.1438907-1-idosch@nvidia.com>
The fib_table_lookup tracepoint does not report the network namespace in
which the lookup was performed, making it impossible to tell apart
lookups performed in different namespaces.
Report the network namespace cookie now that the namespace is passed to
the tracepoint.
Assisted-by: LLM
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ferenc Fejes <ferenc@fejes.dev>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
Notes:
Sashiko: There is a pre-existing issue here regarding an uninitialized
gateway address. I will take care of it separately.
include/trace/events/fib.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/trace/events/fib.h b/include/trace/events/fib.h
index 341905b5edf3..e0ee14d6ca45 100644
--- a/include/trace/events/fib.h
+++ b/include/trace/events/fib.h
@@ -36,6 +36,7 @@ TRACE_EVENT(fib_table_lookup,
__field( u16, sport )
__field( u16, dport )
__array(char, name, IFNAMSIZ )
+ __field( u64, net_cookie )
),
TP_fast_assign(
@@ -91,13 +92,16 @@ TRACE_EVENT(fib_table_lookup,
in6 = (struct in6_addr *)__entry->gw6;
*in6 = in6addr_any;
}
+
+ __entry->net_cookie = net->net_cookie;
),
- TP_printk("table %u oif %d iif %d proto %u %pI4/%u -> %pI4/%u tos %d scope %d flags %x ==> dev %s gw %pI4/%pI6c err %d",
+ TP_printk("table %u oif %d iif %d proto %u %pI4/%u -> %pI4/%u tos %d scope %d flags %x ==> dev %s gw %pI4/%pI6c err %d net_cookie %llu",
__entry->tb_id, __entry->oif, __entry->iif, __entry->proto,
__entry->src, __entry->sport, __entry->dst, __entry->dport,
__entry->tos, __entry->scope, __entry->flags,
- __entry->name, __entry->gw4, __entry->gw6, __entry->err)
+ __entry->name, __entry->gw4, __entry->gw6, __entry->err,
+ __entry->net_cookie)
);
#endif /* _TRACE_FIB_H */
--
2.55.0
prev parent reply other threads:[~2026-10-08 13:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 13:31 [PATCH net-next v2 0/3] Report netns cookie in FIB lookup tracepoints Ido Schimmel
2026-10-08 13:31 ` [PATCH net-next v2 1/3] ipv6: Report netns cookie in fib6_table_lookup tracepoint Ido Schimmel
2026-10-08 13:31 ` [PATCH net-next v2 2/3] ipv4: Pass netns to fib_table_lookup() Ido Schimmel
2026-10-08 13:31 ` Ido Schimmel [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=20261008133158.1438907-4-idosch@nvidia.com \
--to=idosch@nvidia.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=ferenc@fejes.dev \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@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