aboutsummaryrefslogtreecommitdiffstats
path: root/src/poll_controller.cpp
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2014-08-25 16:20:09 +0200
committerDaniel Willmann <daniel@totalueberwachung.de>2014-09-10 19:19:58 +0200
commit1c15573012191e7820dabbec20d6071aea2d8b96 (patch)
treea54c6b27bd2f43675e9b451ce53998cc8af26121 /src/poll_controller.cpp
parentefd5dbb16866ffe08c675172e6456aba5d588166 (diff)
poll_controller: Be stricter with the timeout handling
There is no reason to believe that an ACK that was polled for FN X and has not arrived on the next frame will arrive sometime after. Ticket: SYS#382 Sponsored-by: On-Waves ehf.
Diffstat (limited to 'src/poll_controller.cpp')
-rw-r--r--src/poll_controller.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/poll_controller.cpp b/src/poll_controller.cpp
index 7e1aa787..0bf616ef 100644
--- a/src/poll_controller.cpp
+++ b/src/poll_controller.cpp
@@ -37,12 +37,18 @@ void PollController::expireTimedout(int frame_number)
struct llist_pods *lpods;
uint32_t elapsed;
- /* check for poll timeout */
+ /* check for poll timeout
+ * The UL frame numbers lag 3 behind the DL frames and the data
+ * indication is only sent after all 4 frames of the block have been
+ * received. Sometimes there is an idle frame between the end of one
+ * and start of another frame (every 3 blocks). So the timeout should
+ * definitely be there if we're more than 8 frames past poll_fn. Let's
+ * stay on the safe side and say 13 or more. */
llist_pods_for_each_entry(ul_tbf, &bts->ul_tbfs, list, lpods) {
if (ul_tbf->poll_state == GPRS_RLCMAC_POLL_SCHED) {
elapsed = (frame_number + 2715648 - ul_tbf->poll_fn)
% 2715648;
- if (elapsed >= 20 && elapsed < 2715400)
+ if (elapsed >= 13 && elapsed < 2715400)
ul_tbf->poll_timeout();
}
}
@@ -50,13 +56,13 @@ void PollController::expireTimedout(int frame_number)
if (dl_tbf->poll_state == GPRS_RLCMAC_POLL_SCHED) {
elapsed = (frame_number + 2715648 - dl_tbf->poll_fn)
% 2715648;
- if (elapsed >= 20 && elapsed < 2715400)
+ if (elapsed >= 13 && elapsed < 2715400)
dl_tbf->poll_timeout();
}
}
llist_for_each_entry_safe(sba, sba2, &m_bts.sba()->m_sbas, list) {
elapsed = (frame_number + 2715648 - sba->fn) % 2715648;
- if (elapsed >= 20 && elapsed < 2715400) {
+ if (elapsed >= 13 && elapsed < 2715400) {
/* sba will be freed here */
m_bts.sba()->timeout(sba);
}