From e9429b5d3ecb3176eaee45352d9b7d1d57fed1c5 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 13 Nov 2013 19:36:57 +0100 Subject: rlc: Count the sent and resent RLC blocks --- src/bts.cpp | 2 ++ src/bts.h | 6 ++++++ src/tbf.cpp | 4 ++++ 3 files changed, 12 insertions(+) (limited to 'src') diff --git a/src/bts.cpp b/src/bts.cpp index 409b5d39..b261ea45 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -54,6 +54,8 @@ static const struct rate_ctr_desc bts_ctr_description[] = { { "tbf.ul.alloc", "TBF UL Allocated "}, { "tbf.ul.freed", "TBF UL Freed "}, { "tbf.reused", "TBF Reused "}, + { "rlc.sent", "RLC Sent "}, + { "rlc.resent", "RLC Resent "}, { "decode.errors", "Decode Errors "}, { "sba.allocated", "SBA Allocated "}, { "sba.freed", "SBA Freed "}, diff --git a/src/bts.h b/src/bts.h index 7aa150b0..0a18b7e8 100644 --- a/src/bts.h +++ b/src/bts.h @@ -158,6 +158,8 @@ public: CTR_TBF_UL_ALLOCATED, CTR_TBF_UL_FREED, CTR_TBF_REUSED, + CTR_RLC_SENT, + CTR_RLC_RESENT, CTR_DECODE_ERRORS, CTR_SBA_ALLOCATED, CTR_SBA_FREED, @@ -204,6 +206,8 @@ public: void tbf_ul_created(); void tbf_ul_freed(); void tbf_reused(); + void rlc_sent(); + void rlc_resent(); void decode_error(); void sba_allocated(); void sba_freed(); @@ -267,6 +271,8 @@ CREATE_COUNT_INLINE(tbf_dl_freed, CTR_TBF_DL_FREED) CREATE_COUNT_INLINE(tbf_ul_created, CTR_TBF_UL_ALLOCATED) CREATE_COUNT_INLINE(tbf_ul_freed, CTR_TBF_UL_FREED) CREATE_COUNT_INLINE(tbf_reused, CTR_TBF_REUSED) +CREATE_COUNT_INLINE(rlc_sent, CTR_RLC_SENT) +CREATE_COUNT_INLINE(rlc_resent, CTR_RLC_RESENT) 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 76a9c412..909f2a6f 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -901,6 +901,7 @@ do_resend: bsn); /* re-send block with negative aknowlegement */ dir.dl.v_b[index] = 'U'; /* unacked */ + bts->rlc_resent(); return create_dl_acked_block(fn, ts, index, first_fin_ack); } } @@ -930,6 +931,7 @@ do_resend: "so we re-transmit final block!\n"); /* we just send final block again */ index = ((dir.dl.v_s - 1) & mod_sns_half); + bts->rlc_resent(); return create_dl_acked_block(fn, ts, index, first_fin_ack); } @@ -951,6 +953,7 @@ do_resend: " != V(S). PLEASE FIX!\n"); /* we just send final block again */ index = ((dir.dl.v_s - 1) & mod_sns_half); + bts->rlc_resent(); return create_dl_acked_block(fn, ts, index, first_fin_ack); } goto do_resend; @@ -1186,6 +1189,7 @@ struct msgb *gprs_rlcmac_tbf::create_dl_acked_block( if (!dl_msg) return NULL; memcpy(msgb_put(dl_msg, len), data, len); + bts->rlc_sent(); return dl_msg; } -- cgit v1.2.3