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,
petrm@nvidia.com, rostedt@goodmis.org, daniel@iogearbox.net,
ferenc@fejes.dev, Ido Schimmel <idosch@nvidia.com>
Subject: [PATCH net-next 3/3] ipv4: Report netns cookie in fib_table_lookup tracepoint
Date: Tue, 6 Oct 2026 18:54:54 +0300 [thread overview]
Message-ID: <20261006155454.853588-4-idosch@nvidia.com> (raw)
In-Reply-To: <20261006155454.853588-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>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
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 9a88060aa92e..7852e9ba3861 100644
--- a/include/trace/events/fib.h
+++ b/include/trace/events/fib.h
@@ -35,6 +35,7 @@ TRACE_EVENT(fib_table_lookup,
__field( u16, sport )
__field( u16, dport )
__array(char, name, IFNAMSIZ )
+ __field( u64, net_cookie )
),
TP_fast_assign(
@@ -90,13 +91,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
next prev parent reply other threads:[~2026-10-06 15:57 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 ` Ido Schimmel [this message]
2026-10-07 12:34 ` [PATCH net-next 0/3] Report netns cookie in FIB lookup tracepoints Ferenc Fejes
2026-10-07 12:50 ` 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=20261006155454.853588-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=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