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
This commit is contained in:
Jacob Erlbeck 2015-12-11 16:09:41 +01:00
parent 845c01ef3f
commit 6e75bc7fe3
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ static struct msgb *sched_select_ctrl_msg(
continue;
}
pdch->next_ctrl_prio += i + 1;
pdch->next_ctrl_prio += 1;
pdch->next_ctrl_prio %= 3;
break;
}