pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30362 )
Change subject: paging: Fix wrong count of reqs_before if queue only contains retransmissions ......................................................................
paging: Fix wrong count of reqs_before if queue only contains retransmissions
When adding a new incoming request (aka "initial_req"), if the queue is full only of retransmis (no not-yet-ever-transmitted initial requests queued), then the new incoming request is inserted at the start of the queue, in order to take scheduling priority over retransmits.
This was already fine before this patch, but the counting of requests before it (used to calculate its T3113) was wrong, because it counted all the retransmissions. This patch fixes it to end up with reqs_before(_same_group)=0.
Change-Id: Ib2e810b0bcc51eac117713584310272462c58867 --- M src/osmo-bsc/paging.c 1 file changed, 4 insertions(+), 13 deletions(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve daniel: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c index a3f4e84..4fa1884 100644 --- a/src/osmo-bsc/paging.c +++ b/src/osmo-bsc/paging.c @@ -449,19 +449,10 @@ reqs_before_same_pgroup++; continue; } - /* Here first retransmit in queue is reached: */ - if (last_initial_req) { - /* There were no-retransmit in the queue, done - * iterating, new req will be inserted here - * (see below the current loop). */ - break; - } - - /* last_initial_req == NULL: No req with attempts=0 was found, - * we'll append to end of list, so keep counting. */ - reqs_before++; - if (req->pgroup == pgroup) - reqs_before_same_pgroup++; + /* Here first retransmit in queue is reached: last_initial_req points + * to last initial (non-retrans) req if there was any, NULL otherwise. + */ + break; }
LOG_PAGING_BTS(params, bts, DPAG, LOGL_DEBUG, "Start paging\n");