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

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

index 9810ede1929ae50ede571e9172ee6194e7944fda..9facf48e80f0db7f8282581bc4af6b9e8efadb54 100644 (file)
@@ -1122,6 +1122,9 @@ static int netlink_request_intf_addr(struct nlsock *netlink_cmd, int family,
                char buf[256];
        } req;
 
+       frrtrace(4, frr_zebra, netlink_request_intf_addr, netlink_cmd, family,
+                type, filter_mask);
+
        /* Form the request, specifying filter (rtattr) if needed. */
        memset(&req, 0, sizeof(req));
        req.n.nlmsg_type = type;
index 14be95dca4aa4c8a1c6e83e296f94c6cf104f74d..3175c1a124e1dc75166df74ba1801e4e3fdfc2ae 100644 (file)
 #include <lib/ns.h>
 #include <lib/table.h>
 
+#include <zebra/zebra_ns.h>
+
+TRACEPOINT_EVENT(
+       frr_zebra,
+       netlink_request_intf_addr,
+       TP_ARGS(struct nlsock *, netlink_cmd,
+               int, family,
+               int, type,
+               uint32_t, filter_mask),
+       TP_FIELDS(
+               ctf_integer_hex(intptr_t, netlink_cmd, netlink_cmd)
+               ctf_integer(int, family, family)
+               ctf_integer(int, type, type)
+               ctf_integer(uint32_t, filter_mask, filter_mask)
+               )
+       )
+
 TRACEPOINT_EVENT(
        frr_zebra,
        netlink_interface,