aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-07 09:33:29 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-07 09:33:29 +0200
commitc91c18e6ef9ee5fca3d10b57ebddf211d3655a8d (patch)
treefc3486b62928b9534320ca8502eb88a43c72a51c
parente0c734dcfe6501198e56bd3a89ad03ce5cfd5129 (diff)
tbf: Add Poll Timeout counters
This commits adds three poll timeout counters - RLC Assign Timeout - RLC Ack Timeout - RLC Release Timeout to help diagnosing to cause for these events. There seems to be an increased rate of these when a PDCH is shared by multiple TBFs. Sponsored-by: On-Waves ehf
-rw-r--r--src/bts.cpp3
-rw-r--r--src/bts.h9
-rw-r--r--src/tbf.cpp8
3 files changed, 20 insertions, 0 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index d14420c6..87a22def 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -59,6 +59,9 @@ static const struct rate_ctr_desc bts_ctr_description[] = {
{ "rlc.restarted", "RLC Restarted "},
{ "rlc.stalled", "RLC Stalled "},
{ "rlc.nacked", "RLC Nacked "},
+ { "rlc.ass.timedout", "RLC Assign Timeout "},
+ { "rlc.ack.timedout", "RLC Ack Timeout "},
+ { "rlc.rel.timedout", "RLC Release Timeout "},
{ "decode.errors", "Decode Errors "},
{ "sba.allocated", "SBA Allocated "},
{ "sba.freed", "SBA Freed "},
diff --git a/src/bts.h b/src/bts.h
index 093a8e3e..79640af0 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -202,6 +202,9 @@ public:
CTR_RLC_RESTARTED,
CTR_RLC_STALLED,
CTR_RLC_NACKED,
+ CTR_RLC_ASS_TIMEDOUT,
+ CTR_RLC_ACK_TIMEDOUT,
+ CTR_RLC_REL_TIMEDOUT,
CTR_DECODE_ERRORS,
CTR_SBA_ALLOCATED,
CTR_SBA_FREED,
@@ -261,6 +264,9 @@ public:
void rlc_restarted();
void rlc_stalled();
void rlc_nacked();
+ void rlc_ass_timedout();
+ void rlc_ack_timedout();
+ void rlc_rel_timedout();
void decode_error();
void sba_allocated();
void sba_freed();
@@ -347,6 +353,9 @@ CREATE_COUNT_INLINE(rlc_resent, CTR_RLC_RESENT)
CREATE_COUNT_INLINE(rlc_restarted, CTR_RLC_RESTARTED)
CREATE_COUNT_INLINE(rlc_stalled, CTR_RLC_STALLED)
CREATE_COUNT_INLINE(rlc_nacked, CTR_RLC_NACKED)
+CREATE_COUNT_INLINE(rlc_ass_timedout, CTR_RLC_ASS_TIMEDOUT);
+CREATE_COUNT_INLINE(rlc_ack_timedout, CTR_RLC_ACK_TIMEDOUT);
+CREATE_COUNT_INLINE(rlc_rel_timedout, CTR_RLC_REL_TIMEDOUT);
CREATE_COUNT_INLINE(decode_error, CTR_DECODE_ERRORS)
CREATE_COUNT_INLINE(sba_allocated, CTR_SBA_ALLOCATED)
CREATE_COUNT_INLINE(sba_freed, CTR_SBA_FREED)
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 1d72ffcd..4a8fd337 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -356,6 +356,7 @@ void gprs_rlcmac_tbf::poll_timeout()
state_flags |= (1 << GPRS_RLCMAC_FLAG_TO_UL_ACK);
}
ul_ack_state = GPRS_RLCMAC_UL_ACK_NONE;
+ bts->rlc_ack_timedout();
if (state_is(GPRS_RLCMAC_FINISHED)) {
gprs_rlcmac_ul_tbf *ul_tbf = static_cast<gprs_rlcmac_ul_tbf *>(this);
ul_tbf->m_n3103++;
@@ -369,6 +370,7 @@ void gprs_rlcmac_tbf::poll_timeout()
/* reschedule UL ack */
ul_tbf->ul_ack_state = GPRS_RLCMAC_UL_ACK_SEND_ACK;
}
+
} else if (ul_ass_state == GPRS_RLCMAC_UL_ASS_WAIT_ACK) {
if (!(state_flags & (1 << GPRS_RLCMAC_FLAG_TO_UL_ASS))) {
LOGP(DRLCMAC, LOGL_NOTICE, "- Timeout for polling "
@@ -379,6 +381,7 @@ void gprs_rlcmac_tbf::poll_timeout()
}
ul_ass_state = GPRS_RLCMAC_UL_ASS_NONE;
n3105++;
+ bts->rlc_ass_timedout();
if (n3105 == bts_data()->n3105) {
LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n");
set_state(GPRS_RLCMAC_RELEASING);
@@ -397,6 +400,7 @@ void gprs_rlcmac_tbf::poll_timeout()
}
dl_ass_state = GPRS_RLCMAC_DL_ASS_NONE;
n3105++;
+ bts->rlc_ass_timedout();
if (n3105 == bts->bts_data()->n3105) {
LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n");
set_state(GPRS_RLCMAC_RELEASING);
@@ -415,6 +419,10 @@ void gprs_rlcmac_tbf::poll_timeout()
dl_tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_TO_DL_ACK);
}
dl_tbf->n3105++;
+ if (dl_tbf->state_is(GPRS_RLCMAC_RELEASING))
+ bts->rlc_rel_timedout();
+ else
+ bts->rlc_ack_timedout();
if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) {
LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n");
dl_tbf->set_state(GPRS_RLCMAC_RELEASING);