This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/19009 ) Change subject: osmo-bts-trx: fix trx_sched_fn(): properly advance frame number ...................................................................... osmo-bts-trx: fix trx_sched_fn(): properly advance frame number In trx_sched_fn() we schedule Downlink bursts in advance, in order to give the transceiver some time to process them. This function handles all timeslots of all transceivers in a loop. The problem is that the given frame number is overwritten on each iteration. Let's say we have 4 transceivers, each with default fn-advance 20. The given frame number N will be advanced 4 times, so the resulting frame number for 4-th transceiver would be (N + 4 * 20) instead of (N + 20) as expected. Therefore, all additional transceivers would be served more and more in the future (depending on their position). Change-Id: Ie3ab544eac81a675266df09cd2b7740e4183188e --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 6 insertions(+), 4 deletions(-) Approvals: pespin: Looks good to me, approved Hoernchen: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 3936124..47cc4b5 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -56,10 +56,11 @@ } /* schedule all frames of all TRX for given FN */ -static int trx_sched_fn(struct gsm_bts *bts, uint32_t fn) +static int trx_sched_fn(struct gsm_bts *bts, const uint32_t fn) { struct trx_dl_burst_req br; struct gsm_bts_trx *trx; + uint32_t sched_fn; uint8_t tn; /* send time indication */ @@ -74,7 +75,7 @@ /* advance frame number, so the transceiver has more * time until it must be transmitted. */ - fn = GSM_TDMA_FN_SUM(fn, plink->u.osmotrx.clock_advance); + sched_fn = GSM_TDMA_FN_SUM(fn, plink->u.osmotrx.clock_advance); /* we don't schedule, if power is off */ if (!trx_if_powered(l1h)) @@ -83,11 +84,12 @@ /* process every TS of TRX */ for (tn = 0; tn < ARRAY_SIZE(l1t->ts); tn++) { /* ready-to-send */ - _sched_rts(l1t, tn, GSM_TDMA_FN_SUM(fn, plink->u.osmotrx.rts_advance)); + _sched_rts(l1t, tn, GSM_TDMA_FN_SUM(sched_fn, plink->u.osmotrx.rts_advance)); /* All other parameters to be set by _sched_dl_burst() */ br = (struct trx_dl_burst_req) { - .fn = fn, .tn = tn, + .fn = sched_fn, + .tn = tn, }; /* get burst for FN */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/19009 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ie3ab544eac81a675266df09cd2b7740e4183188e Gerrit-Change-Number: 19009 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200625/1383056c/attachment.htm>