aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bts.cpp2
-rw-r--r--src/bts.h6
-rw-r--r--src/tbf.cpp5
3 files changed, 12 insertions, 1 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 3f9b24ac..07e97def 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -57,6 +57,8 @@ static const struct rate_ctr_desc bts_ctr_description[] = {
{ "sba.allocated", "SBA Allocated "},
{ "sba.freed", "SBA Freed "},
{ "sba.timedout", "SBA Timeout "},
+ { "llc.timeout", "Timedout Frames "},
+ { "llc.dropped", "Dropped Frames "},
};
static const struct rate_ctr_group_desc bts_ctrg_desc = {
diff --git a/src/bts.h b/src/bts.h
index 3ffd219d..259be205 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -157,6 +157,8 @@ public:
CTR_SBA_ALLOCATED,
CTR_SBA_FREED,
CTR_SBA_TIMEDOUT,
+ CTR_LLC_FRAME_TIMEDOUT,
+ CTR_LLC_FRAME_DROPPED,
};
BTS();
@@ -198,6 +200,8 @@ public:
void sba_allocated();
void sba_freed();
void sba_timedout();
+ void timedout_frame();
+ void dropped_frame();
/*
* Below for C interface for the VTY
@@ -256,6 +260,8 @@ CREATE_COUNT_INLINE(decode_error, CTR_DECODE_ERRORS)
CREATE_COUNT_INLINE(sba_allocated, CTR_SBA_ALLOCATED)
CREATE_COUNT_INLINE(sba_freed, CTR_SBA_FREED)
CREATE_COUNT_INLINE(sba_timedout, CTR_SBA_TIMEDOUT)
+CREATE_COUNT_INLINE(timedout_frame, CTR_LLC_FRAME_TIMEDOUT);
+CREATE_COUNT_INLINE(dropped_frame, CTR_LLC_FRAME_DROPPED);
#undef CREATE_COUNT_INLINE
diff --git a/src/tbf.cpp b/src/tbf.cpp
index cdd80983..1fa7c6e3 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -324,8 +324,10 @@ void tbf_free(struct gprs_rlcmac_tbf *tbf)
"be sure not to free in this state. PLEASE FIX!\n");
tbf->stop_timer();
#warning "TODO: Could/Should generate bssgp_tx_llc_discarded"
- while ((msg = msgb_dequeue(&tbf->llc_queue)))
+ while ((msg = msgb_dequeue(&tbf->llc_queue))) {
+ tbf->bts->dropped_frame();
msgb_free(msg);
+ }
tbf_unlink_pdch(tbf);
llist_del(&tbf->list);
@@ -714,6 +716,7 @@ struct msgb *gprs_rlcmac_tbf::llc_dequeue(bssgp_bvc_ctx *bctx)
LOGP(DRLCMACDL, LOGL_NOTICE, "Discarding LLC PDU of "
"DL TBF=%d, because lifetime limit reached\n",
tfi);
+ bts->timedout_frame();
frames++;
octets += msg->len;
msgb_free(msg);