summaryrefslogtreecommitdiffstats
path: root/src/plugins/lacp/lacp.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-03-01 15:51:18 +0100
committerDamjan Marion <dmarion@me.com>2022-03-09 13:51:31 +0000
commit8973b07eecbbfe23a5267975f8052a5c6339c756 (patch)
treefe4d3507ff24c18743d3241cd9ab049ee2add062 /src/plugins/lacp/lacp.c
parent317cace6185ae134d78a38e1a20249baf751035e (diff)
stats: refactor
Type: refactor Change-Id: Ifd533a095d979dc55bfbe5fac7e0b7510a4d900c Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/lacp/lacp.c')
-rw-r--r--src/plugins/lacp/lacp.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/plugins/lacp/lacp.c b/src/plugins/lacp/lacp.c
index 44a32aa23a9..ad7710266f9 100644
--- a/src/plugins/lacp/lacp.c
+++ b/src/plugins/lacp/lacp.c
@@ -21,7 +21,7 @@
#include <vppinfra/hash.h>
#include <vnet/bonding/node.h>
#include <lacp/node.h>
-#include <vpp/stats/stat_segment.h>
+#include <vlib/stats/stats.h>
lacp_main_t lacp_main;
@@ -173,16 +173,16 @@ lacp_periodic (vlib_main_t * vm)
if (actor_state != mif->actor.state)
{
bif = bond_get_bond_if_by_dev_instance (mif->bif_dev_instance);
- stat_segment_set_state_counter (bm->stats[bif->sw_if_index]
- [mif->sw_if_index].actor_state,
- mif->actor.state);
+ vlib_stats_set_gauge (
+ bm->stats[bif->sw_if_index][mif->sw_if_index].actor_state,
+ mif->actor.state);
}
if (partner_state != mif->partner.state)
{
bif = bond_get_bond_if_by_dev_instance (mif->bif_dev_instance);
- stat_segment_set_state_counter (bm->stats[bif->sw_if_index]
- [mif->sw_if_index].partner_state,
- mif->partner.state);
+ vlib_stats_set_gauge (
+ bm->stats[bif->sw_if_index][mif->sw_if_index].partner_state,
+ mif->partner.state);
}
}
/* *INDENT-ON* */
@@ -380,12 +380,12 @@ lacp_init_state_machines (vlib_main_t * vm, member_if_t * mif)
lacp_init_mux_machine (vm, mif);
lacp_init_ptx_machine (vm, mif);
lacp_init_rx_machine (vm, mif);
- stat_segment_set_state_counter (bm->stats[bif->sw_if_index]
- [mif->sw_if_index].actor_state,
- mif->actor.state);
- stat_segment_set_state_counter (bm->stats[bif->sw_if_index]
- [mif->sw_if_index].partner_state,
- mif->partner.state);
+ vlib_stats_set_gauge (
+ bm->stats[bif->sw_if_index][mif->sw_if_index].actor_state,
+ mif->actor.state);
+ vlib_stats_set_gauge (
+ bm->stats[bif->sw_if_index][mif->sw_if_index].partner_state,
+ mif->partner.state);
}
VLIB_INIT_FUNCTION (lacp_periodic_init);