aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-13 19:36:57 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-13 19:36:57 +0100
commite9429b5d3ecb3176eaee45352d9b7d1d57fed1c5 (patch)
tree13cb50b276696f9333e144239503d3449d788311 /src
parent55cf994c29754fb18852fffee96f00c436d70ee3 (diff)
rlc: Count the sent and resent RLC blocks
Diffstat (limited to 'src')
-rw-r--r--src/bts.cpp2
-rw-r--r--src/bts.h6
-rw-r--r--src/tbf.cpp4
3 files changed, 12 insertions, 0 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 409b5d3..b261ea4 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 7aa150b..0a18b7e 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 76a9c41..909f2a6 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;
}