summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_vty.c')
-rw-r--r--bgpd/bgp_vty.c42
1 files changed, 34 insertions, 8 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index af702ac85..095379060 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -7068,14 +7068,40 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
vty_out(vty, "4 %10u %7u %7u %8" PRIu64 " %4d %4zd %8s",
peer->as,
- peer->open_in + peer->update_in
- + peer->keepalive_in + peer->notify_in
- + peer->refresh_in
- + peer->dynamic_cap_in,
- peer->open_out + peer->update_out
- + peer->keepalive_out + peer->notify_out
- + peer->refresh_out
- + peer->dynamic_cap_out,
+ atomic_load_explicit(&peer->open_in,
+ memory_order_relaxed)
+ + atomic_load_explicit(
+ &peer->update_in,
+ memory_order_relaxed)
+ + atomic_load_explicit(
+ &peer->keepalive_in,
+ memory_order_relaxed)
+ + atomic_load_explicit(
+ &peer->notify_in,
+ memory_order_relaxed)
+ + atomic_load_explicit(
+ &peer->refresh_in,
+ memory_order_relaxed)
+ + atomic_load_explicit(
+ &peer->dynamic_cap_in,
+ memory_order_relaxed),
+ atomic_load_explicit(&peer->open_out,
+ memory_order_relaxed)
+ + atomic_load_explicit(
+ &peer->update_out,
+ memory_order_relaxed)
+ + atomic_load_explicit(
+ &peer->keepalive_out,
+ memory_order_relaxed)
+ + atomic_load_explicit(
+ &peer->notify_out,
+ memory_order_relaxed)
+ + atomic_load_explicit(
+ &peer->refresh_out,
+ memory_order_relaxed)
+ + atomic_load_explicit(
+ &peer->dynamic_cap_out,
+ memory_order_relaxed),
peer->version[afi][safi], 0, peer->obuf->count,
peer_uptime(peer->uptime, timebuf,
BGP_UPTIME_LEN, 0, NULL));