pespin submitted this change.

View Change

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
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(-)

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");

To view, visit change 30362. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ib2e810b0bcc51eac117713584310272462c58867
Gerrit-Change-Number: 30362
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann@sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged