aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-12-14 14:00:26 +0100
committerHarald Welte <laforge@gnumonks.org>2017-12-14 15:03:43 +0100
commit62d9cb0529dce241969689cf9a8d3c44a8b58be0 (patch)
treec65f05e1b2272a7f3e74b37399158d4690d475af
parent4f59892ce6b05eb4d8ee914a9a2bda8601f39910 (diff)
Add new per-BTS "rsl:unknown" counter to count unknown RSL messages
-rw-r--r--include/osmocom/bsc/gsm_data.h2
-rw-r--r--src/libbsc/abis_rsl.c9
2 files changed, 11 insertions, 0 deletions
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 44fba861c..0341138f1 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -203,6 +203,7 @@ enum {
BTS_CTR_PAGING_EXPIRED,
BTS_CTR_CHAN_ACT_TOTAL,
BTS_CTR_CHAN_ACT_NACK,
+ BTS_CTR_RSL_UNKNOWN,
};
static const struct rate_ctr_desc bts_ctr_description[] = {
@@ -224,6 +225,7 @@ static const struct rate_ctr_desc bts_ctr_description[] = {
[BTS_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."},
[BTS_CTR_CHAN_ACT_TOTAL] = {"chan_act:total", "Total number of Channel Activations."},
[BTS_CTR_CHAN_ACT_NACK] = {"chan_act:nack", "Number of Channel Activations that the BTS NACKed"},
+ [BTS_CTR_RSL_UNKNOWN] = {"rsl:unknown", "Number of unknown/unsupported RSL messages received from BTS"},
};
static const struct rate_ctr_group_desc bts_ctrg_desc = {
diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c
index 0f5361e54..54e7b82f7 100644
--- a/src/libbsc/abis_rsl.c
+++ b/src/libbsc/abis_rsl.c
@@ -1667,10 +1667,12 @@ static int abis_rsl_rx_dchan(struct msgb *msg)
case RSL_MT_MR_CODEC_MOD_PER:
LOGP(DRSL, LOGL_NOTICE, "%s Unimplemented Abis RSL DChan "
"msg 0x%02x\n", ts_name, rslh->c.msg_type);
+ rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]);
break;
default:
LOGP(DRSL, LOGL_NOTICE, "%s unknown Abis RSL DChan msg 0x%02x\n",
ts_name, rslh->c.msg_type);
+ rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]);
return -EINVAL;
}
@@ -1724,6 +1726,7 @@ static int abis_rsl_rx_trx(struct msgb *msg)
default:
LOGP(DRSL, LOGL_NOTICE, "%s Unknown Abis RSL TRX message "
"type 0x%02x\n", gsm_trx_name(sign_link->trx), rslh->msg_type);
+ rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]);
return -EINVAL;
}
return rc;
@@ -2057,6 +2060,7 @@ static int abis_rsl_rx_cchan(struct msgb *msg)
default:
LOGP(DRSL, LOGL_NOTICE, "Unknown Abis RSL TRX message type "
"0x%02x\n", rslh->c.msg_type);
+ rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]);
return -EINVAL;
}
@@ -2197,6 +2201,7 @@ static int abis_rsl_rx_rll(struct msgb *msg)
DEBUGPC(DRLL, "UNKNOWN\n");
LOGP(DRLL, LOGL_NOTICE, "unknown Abis RLL message "
"type 0x%02x\n", rllh->c.msg_type);
+ rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]);
}
return rc;
}
@@ -2564,6 +2569,7 @@ static int abis_rsl_rx_ipacc(struct msgb *msg)
default:
LOGP(DRSL, LOGL_NOTICE, "Unknown ip.access msg_type 0x%02x\n",
rllh->c.msg_type);
+ rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]);
break;
}
@@ -2770,6 +2776,7 @@ static void dyn_ts_switchover_complete(struct gsm_lchan *lchan)
/* Entry-point where L2 RSL from BTS enters */
int abis_rsl_rcvmsg(struct msgb *msg)
{
+ struct e1inp_sign_link *sign_link;
struct abis_rsl_common_hdr *rslh;
int rc = 0;
@@ -2784,6 +2791,7 @@ int abis_rsl_rcvmsg(struct msgb *msg)
return -1;
}
+ sign_link = msg->dst;
rslh = msgb_l2(msg);
switch (rslh->msg_discr & 0xfe) {
@@ -2809,6 +2817,7 @@ int abis_rsl_rcvmsg(struct msgb *msg)
default:
LOGP(DRSL, LOGL_NOTICE, "unknown RSL message discriminator "
"0x%02x\n", rslh->msg_discr);
+ rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]);
rc = -EINVAL;
}
msgb_free(msg);