bts: Count the number of llc frames that were "scheduled" to be sent
This does not mean that they have been successfully transferred
to the SGSN/MS but at least that they have reached a certain point
in the message flow.
diff --git a/src/bts.cpp b/src/bts.cpp
index e4c4bfa..409b5d3 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -60,6 +60,7 @@
{ "sba.timedout", "SBA Timeout "},
{ "llc.timeout", "Timedout Frames "},
{ "llc.dropped", "Dropped Frames "},
+ { "llc.scheduled", "Scheduled Frames "},
{ "rach.requests", "RACH requests "},
};
diff --git a/src/bts.h b/src/bts.h
index 5a55ed0..7aa150b 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -164,6 +164,7 @@
CTR_SBA_TIMEDOUT,
CTR_LLC_FRAME_TIMEDOUT,
CTR_LLC_FRAME_DROPPED,
+ CTR_LLC_FRAME_SCHED,
CTR_RACH_REQUESTS,
};
@@ -207,8 +208,9 @@
void sba_allocated();
void sba_freed();
void sba_timedout();
- void timedout_frame();
- void dropped_frame();
+ void llc_timedout_frame();
+ void llc_dropped_frame();
+ void llc_frame_sched();
void rach_frame();
/*
@@ -269,8 +271,9 @@
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);
+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);
#undef CREATE_COUNT_INLINE
diff --git a/src/llc.cpp b/src/llc.cpp
index 88b701a..1787daa 100644
--- a/src/llc.cpp
+++ b/src/llc.cpp
@@ -60,7 +60,7 @@
struct msgb *msg;
while ((msg = msgb_dequeue(&queue))) {
- bts->dropped_frame();
+ bts->llc_dropped_frame();
msgb_free(msg);
}
}
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 2310f85..aa0f223 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -101,6 +101,7 @@
#warning "verify that m_llc.index/length is 0... check the state change"
bts->tbf_reused();
m_llc.put_frame(data, len);
+ bts->llc_frame_sched();
/* reset rlc states */
memset(&dir.dl, 0, sizeof(dir.dl));
/* keep to flags */
@@ -190,6 +191,7 @@
/* new TBF, so put first frame */
tbf->m_llc.put_frame(data, len);
+ tbf->bts->llc_frame_sched();
/* Store IMSI for later look-up and PCH retransmission */
tbf->assign_imsi(imsi);
@@ -695,7 +697,7 @@
LOGP(DRLCMACDL, LOGL_NOTICE, "%s Discarding LLC PDU "
"because lifetime limit reached\n",
tbf_name(this));
- bts->timedout_frame();
+ bts->llc_timedout_frame();
frames++;
octets += msg->len;
msgb_free(msg);
@@ -1083,6 +1085,7 @@
LOGP(DRLCMACDL, LOGL_INFO, "- Dequeue next LLC for "
"%s (len=%d)\n", tbf_name(this), msg->len);
m_llc.put_frame(msg->data, msg->len);
+ bts->llc_frame_sched();
msgb_free(msg);
}
/* if we have more data and we have space left */
@@ -1538,6 +1541,7 @@
}
#warning "Copy and paste on the sender path"
m_llc.put_frame(msg->data, msg->len);
+ bts->llc_frame_sched();
msgb_free(msg);
/* we have a message, so we trigger downlink assignment, and there