ns2: Implement more rate counters
The counters had all been lost in the ns -> ns2 configuration,
let's try to implement some more of them: LOST_ALIVE, BLOCKED,
LOST_RESET.
Change-Id: I75d8637bd142722fdf9a162a2369aa9cdc980a57
diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c
index 457a41f..e69f327 100644
--- a/src/gb/gprs_ns2_vc_fsm.c
+++ b/src/gb/gprs_ns2_vc_fsm.c
@@ -204,6 +204,7 @@
osmo_timer_schedule(&priv->alive.timer, nsi->timeout[NS_TOUT_TNS_ALIVE], 0);
break;
case NS_TOUT_TNS_ALIVE:
+ rate_ctr_inc(&priv->nsvc->ctrg->ctr[NS_CTR_LOST_ALIVE]);
priv->alive.N++;
if (priv->alive.N <= nsi->timeout[NS_TOUT_TNS_ALIVE_RETRIES]) {
@@ -296,8 +297,10 @@
{
struct gprs_ns2_vc_priv *priv = fi->priv;
- if (old_state != GPRS_NS2_ST_BLOCKED)
+ if (old_state != GPRS_NS2_ST_BLOCKED) {
priv->N = 0;
+ rate_ctr_inc(&priv->nsvc->ctrg->ctr[NS_CTR_BLOCKED]);
+ }
if (priv->om_blocked) {
/* we are already blocked after a RESET */
@@ -480,6 +483,7 @@
switch (fi->state) {
case GPRS_NS2_ST_RESET:
if (priv->initiate_reset) {
+ rate_ctr_inc(&priv->nsvc->ctrg->ctr[NS_CTR_LOST_RESET]);
priv->N++;
if (priv->N <= nsi->timeout[NS_TOUT_TNS_RESET_RETRIES]) {
osmo_fsm_inst_state_chg(fi, GPRS_NS2_ST_RESET, nsi->timeout[NS_TOUT_TNS_RESET], 0);