diff options
author | Maria Matejka <mq@ucw.cz> | 2023-03-05 16:22:55 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-04-04 17:00:58 +0200 |
commit | adbce76517f53e06243ed954b20172cc1313d5c3 (patch) | |
tree | ec4d9cdd5b0250066c81375b49ed9c74c21d3048 /proto/bgp | |
parent | 6543303ad4d509340643ae1f2b585f6278cf0463 (diff) |
BGP: show detailed TX state in show proto all output
Diffstat (limited to 'proto/bgp')
-rw-r--r-- | proto/bgp/bgp.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 104e5862..26fccdc3 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -2670,6 +2670,9 @@ bgp_show_proto_info(struct proto *P) tm_remains(p->conn->hold_timer), p->conn->hold_time); cli_msg(-1006, " Keepalive timer: %t/%u", tm_remains(p->conn->keepalive_timer), p->conn->keepalive_time); + cli_msg(-1006, " TX pending: %d bytes%s", + p->conn->sk->tpos - p->conn->sk->ttx, + ev_active(p->conn->tx_ev) ? " (refill scheduled)" : ""); } #if 0 @@ -2723,6 +2726,22 @@ bgp_show_proto_info(struct proto *P) if (c->base_table) cli_msg(-1006, " Base table: %s", c->base_table->name); + + uint bucket_cnt = 0; + uint prefix_cnt = 0; + struct bgp_bucket *buck; + struct bgp_prefix *px; + if (c->ptx) + WALK_LIST(buck, c->ptx->bucket_queue) + { + bucket_cnt++; + WALK_LIST(px, buck->prefixes) + if (px->cur) + prefix_cnt++; + } + + cli_msg(-1006, " Pending %u attribute sets with total %u prefixes to send", + bucket_cnt, prefix_cnt); } } } |