diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-07-02 14:35:57 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-07-02 14:46:35 +0200 |
commit | a0ea29a5968308224b24b8718a8baa09806ad645 (patch) | |
tree | 5da1eb2658104b63325f9a5d7b0e964bacb86b77 | |
parent | bdcfb71161aed1dd882ec7f9dcc4880146175155 (diff) |
FIXUP bts: Add Poll Timeout counter (TODO)
-rw-r--r-- | src/bts.cpp | 4 | ||||
-rw-r--r-- | src/bts.h | 12 | ||||
-rw-r--r-- | src/tbf.cpp | 10 |
3 files changed, 20 insertions, 6 deletions
diff --git a/src/bts.cpp b/src/bts.cpp index fb43b3d2..b96971db 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 "}, @@ -67,7 +70,6 @@ static const struct rate_ctr_desc bts_ctr_description[] = { { "llc.dropped", "Dropped Frames "}, { "llc.scheduled", "Scheduled Frames "}, { "rach.requests", "RACH requests "}, - { "poll.timedout", "Poll Timeout "}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { @@ -207,6 +207,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, @@ -215,7 +218,6 @@ public: CTR_LLC_FRAME_DROPPED, CTR_LLC_FRAME_SCHED, CTR_RACH_REQUESTS, - CTR_POLL_TIMEDOUT, }; enum { @@ -267,6 +269,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(); @@ -275,7 +280,6 @@ public: void llc_dropped_frame(); void llc_frame_sched(); void rach_frame(); - void poll_timedout(); /* * Below for C interface for the VTY @@ -364,6 +368,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) @@ -372,7 +379,6 @@ CREATE_COUNT_INLINE(llc_timedout_frame, CTR_LLC_FRAME_TIMEDOUT); CREATE_COUNT_INLINE(llc_dropped_frame, CTR_LLC_FRAME_DROPPED); CREATE_COUNT_INLINE(llc_frame_sched, CTR_LLC_FRAME_SCHED); CREATE_COUNT_INLINE(rach_frame, CTR_RACH_REQUESTS); -CREATE_COUNT_INLINE(poll_timedout, CTR_POLL_TIMEDOUT); #undef CREATE_COUNT_INLINE diff --git a/src/tbf.cpp b/src/tbf.cpp index 66d62212..4a8fd337 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -346,8 +346,6 @@ void gprs_rlcmac_tbf::poll_timeout() LOGP(DRLCMAC, LOGL_NOTICE, "%s poll timeout\n", tbf_name(this)); - bts->poll_timedout(); - poll_state = GPRS_RLCMAC_POLL_NONE; if (ul_ack_state == GPRS_RLCMAC_UL_ACK_WAIT_ACK) { @@ -358,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++; @@ -371,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 " @@ -381,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); @@ -399,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); @@ -417,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); |