diff options
author | Maria Matějka <mq@jmq.cz> | 2018-10-26 09:32:35 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2018-12-18 15:08:31 +0100 |
commit | 82b742533bdbf977ec95997fc0011a47a672bcc8 (patch) | |
tree | d806c6229340325494ce757e13f149ff9e27948b /nest | |
parent | 78131eee64aeaf14cf418d6e5bf3f17ca602afb7 (diff) |
Perf: Protocol to measure BIRD performance internally
This protocol is highly experimental and nobody should use it in
production. Anyway it may help you getting some insight into what eats
so much time in filter processing.
Diffstat (limited to 'nest')
-rw-r--r-- | nest/proto.c | 3 | ||||
-rw-r--r-- | nest/protocol.h | 4 | ||||
-rw-r--r-- | nest/route.h | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/nest/proto.c b/nest/proto.c index de727dac..fadce6c7 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -1379,6 +1379,9 @@ protos_build(void) #ifdef CONFIG_RPKI proto_build(&proto_rpki); #endif +#ifdef CONFIG_PERF + proto_build(&proto_perf); +#endif proto_pool = rp_new(&root_pool, "Protocols"); proto_shutdown_timer = tm_new(proto_pool); diff --git a/nest/protocol.h b/nest/protocol.h index aa836f38..7f539aef 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -47,6 +47,7 @@ enum protocol_class { PROTOCOL_KERNEL, PROTOCOL_OSPF, PROTOCOL_MRT, + PROTOCOL_PERF, PROTOCOL_PIPE, PROTOCOL_RADV, PROTOCOL_RIP, @@ -100,7 +101,8 @@ void protos_dump_all(void); extern struct protocol proto_device, proto_radv, proto_rip, proto_static, proto_mrt, - proto_ospf, proto_pipe, proto_bgp, proto_bfd, proto_babel, proto_rpki; + proto_ospf, proto_perf, + proto_pipe, proto_bgp, proto_bfd, proto_babel, proto_rpki; /* * Routing Protocol Instance diff --git a/nest/route.h b/nest/route.h index 93afae57..8dfbb376 100644 --- a/nest/route.h +++ b/nest/route.h @@ -428,8 +428,8 @@ typedef struct rta { #define RTS_PIPE 12 /* Inter-table wormhole */ #define RTS_BABEL 13 /* Babel route */ #define RTS_RPKI 14 /* Route Origin Authorization */ -#define RTS_MAX 15 - +#define RTS_PERF 15 /* Perf checker */ +#define RTS_MAX 16 #define RTC_UNICAST 0 #define RTC_BROADCAST 1 |