summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_trace.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@nvidia.com>2020-09-17 01:16:35 +0200
committerQuentin Young <qlyoung@nvidia.com>2020-10-23 21:13:51 +0200
commit6401252f7fe68123c6dc122958649dfd384c98e6 (patch)
tree393c938d78e6fa558710a57c625c5cc42178d8d3 /bgpd/bgp_trace.h
parentbgpd: add basic packet-related tracepoints (diff)
downloadfrr-6401252f7fe68123c6dc122958649dfd384c98e6.tar.xz
frr-6401252f7fe68123c6dc122958649dfd384c98e6.zip
bgpd: route processing tracepoints
Add tracepoints for route process, input filter and output filter. Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Diffstat (limited to 'bgpd/bgp_trace.h')
-rw-r--r--bgpd/bgp_trace.h48
1 files changed, 47 insertions, 1 deletions
diff --git a/bgpd/bgp_trace.h b/bgpd/bgp_trace.h
index fd0d26bd5..4b79155ef 100644
--- a/bgpd/bgp_trace.h
+++ b/bgpd/bgp_trace.h
@@ -68,11 +68,57 @@ TRACEPOINT_EVENT(
TP_ARGS(struct peer *, peer, struct stream *, pkt),
TP_FIELDS(
ctf_string(peer, peer->host ? peer->host : "(unknown peer)")
- ctf_integer(size_t, size, STREAM_READABLE(pkt))
ctf_sequence_hex(uint8_t, packet, pkt->data, size_t, STREAM_READABLE(pkt))
)
)
+TRACEPOINT_LOGLEVEL(frr_bgp, packet_read, TRACE_INFO)
+
+TRACEPOINT_EVENT(
+ frr_bgp,
+ process_update,
+ TP_ARGS(struct peer *, peer, char *, pfx, uint32_t, addpath_id, afi_t, afi, safi_t, safi, struct attr *, attr),
+ TP_FIELDS(
+ ctf_string(peer, peer->host ? peer->host : "(unknown peer)")
+ ctf_string(prefix, pfx)
+ ctf_integer(uint32_t, addpath_id, addpath_id)
+ ctf_integer(afi_t, afi, afi)
+ ctf_integer(safi_t, safi, safi)
+ ctf_integer_hex(intptr_t, attribute_ptr, attr)
+ )
+)
+
+TRACEPOINT_LOGLEVEL(frr_bgp, process_update, TRACE_INFO)
+
+TRACEPOINT_EVENT(
+ frr_bgp,
+ input_filter,
+ TP_ARGS(struct peer *, peer, char *, pfx, afi_t, afi, safi_t, safi, const char *, result),
+ TP_FIELDS(
+ ctf_string(peer, peer->host ? peer->host : "(unknown peer)")
+ ctf_string(prefix, pfx)
+ ctf_integer(afi_t, afi, afi)
+ ctf_integer(safi_t, safi, safi)
+ ctf_string(action, result)
+ )
+)
+
+TRACEPOINT_LOGLEVEL(frr_bgp, input_filter, TRACE_INFO)
+
+TRACEPOINT_EVENT(
+ frr_bgp,
+ output_filter,
+ TP_ARGS(struct peer *, peer, char *, pfx, afi_t, afi, safi_t, safi, const char *, result),
+ TP_FIELDS(
+ ctf_string(peer, peer->host ? peer->host : "(unknown peer)")
+ ctf_string(prefix, pfx)
+ ctf_integer(afi_t, afi, afi)
+ ctf_integer(safi_t, safi, safi)
+ ctf_string(action, result)
+ )
+)
+
+TRACEPOINT_LOGLEVEL(frr_bgp, output_filter, TRACE_INFO)
#include <lttng/tracepoint-event.h>