diff options
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-11 16:09:41 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-16 19:57:13 +0100
commit6e75bc7fe304eec274f6e485a8b23a164fd4e28e (patch)
parent845c01ef3f7df788308e56ad22408991c7d2c5ff (diff)
sched: Change next_ctrl_prio increment
Currently the control block scheduler does not seem to be fair in all cases. At least it happend while testing the EGPRS code, that a Uplink Ack/Nack message got never be sent, because a Downlink assignment took over all the times. This commit changes the round robin code to always increment the priority offset by 1 instead of (i + 1). The former definitely ensures that every message type gets the highest priority after some steps. The latter might be more fair in some situations, but that and its correctness are not proven. Sponsored-by: On-Waves ehf
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index ac1991d..b4db88c 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -140,7 +140,7 @@ static struct msgb *sched_select_ctrl_msg(
- pdch->next_ctrl_prio += i + 1;
+ pdch->next_ctrl_prio += 1;
pdch->next_ctrl_prio %= 3;