]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Add tracepoint for netlink_rule_change
authorDonald Sharp <sharpd@nvidia.com>
Wed, 6 Oct 2021 12:59:27 +0000 (08:59 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Wed, 20 Apr 2022 13:43:47 +0000 (09:43 -0400)
Add a tracepoint for the netlink_rule_change function.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/rule_netlink.c
zebra/zebra_trace.h

index fbf2620375f3b2b4d18fb3dffa1f6b6a86a32682..135f06542836d63edd764c5955528991a12514e2 100644 (file)
@@ -42,6 +42,7 @@
 #include "zebra/zebra_pbr.h"
 #include "zebra/zebra_errors.h"
 #include "zebra/zebra_dplane.h"
+#include "zebra/zebra_trace.h"
 
 /* definitions */
 
@@ -243,6 +244,8 @@ int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
        uint8_t proto = 0;
        uint8_t ip_proto = 0;
 
+       frrtrace(3, frr_zebra, netlink_rule_change, h, ns_id, startup);
+
        /* Basic validation followed by extracting attributes. */
        if (h->nlmsg_type != RTM_NEWRULE && h->nlmsg_type != RTM_DELRULE)
                return 0;
index a43d4a38b7d44a4b8af0d9e0c49cf20cdfc47a00..b2983b7631cc4616ecce2f313413ca72337b2bfc 100644 (file)
@@ -108,6 +108,21 @@ TRACEPOINT_EVENT(
                ctf_integer(uint32_t, startup, startup)
                )
        )
+
+TRACEPOINT_EVENT(
+       frr_zebra,
+       netlink_rule_change,
+       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 <lttng/tracepoint-event.h>
 
 #endif /* HAVE_LTTNG */