From 3cee213500c22c67803578c6c738a2177146f4ee Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 6 Oct 2021 08:56:46 -0400 Subject: [PATCH] zebra: Add tracepoint for netlink_route_change_read_unicast Add a tracepoint to zebra for the netlink_route_change_read_unicast functionality. Signed-off-by: Donald Sharp --- zebra/rt_netlink.c | 3 +++ zebra/zebra_trace.h | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 686815da3b..7b377aad6d 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -701,6 +701,9 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id, void *src = NULL; /* IPv6 srcdest source prefix */ enum blackhole_type bh_type = BLACKHOLE_UNSPEC; + frrtrace(3, frr_zebra, netlink_route_change_read_unicast, h, ns_id, + startup); + rtm = NLMSG_DATA(h); if (startup && h->nlmsg_type != RTM_NEWROUTE) diff --git a/zebra/zebra_trace.h b/zebra/zebra_trace.h index 2c23224c27..a43d4a38b7 100644 --- a/zebra/zebra_trace.h +++ b/zebra/zebra_trace.h @@ -95,6 +95,19 @@ TRACEPOINT_EVENT( ) ) +TRACEPOINT_EVENT( + frr_zebra, + netlink_route_change_read_unicast, + TP_ARGS( + struct nlmsghdr *, h, + ns_id_t, ns_id, + int, startup), + TP_FIELDS( + ctf_integer_hex(intptr_t, h, h) + ctf_integer(uint32_t, ns_id, ns_id) + ctf_integer(uint32_t, startup, startup) + ) + ) #include #endif /* HAVE_LTTNG */ -- 2.39.5