diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-11-28 19:01:44 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-11-28 19:01:46 +0100 |
commit | 8c723f515714d0699446492961e146b9c24584be (patch) | |
tree | 271079409159b5f433dbe05c510a0dc90340716a | |
parent | 671811f4fcf37229b5749b1091d720a9d14c7a5d (diff) |
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
-rw-r--r-- | src/osmo-bsc/paging.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c index a3f4e8492..4fa1884cd 100644 --- a/src/osmo-bsc/paging.c +++ b/src/osmo-bsc/paging.c @@ -449,19 +449,10 @@ static int _paging_request(const struct bsc_paging_params *params, struct gsm_bt 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"); |