Change in osmo-pcu[master]: sched: Fix scheduling UL TBF not matching conditions

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/.

pespin gerrit-no-reply at lists.osmocom.org
Thu Mar 25 11:36:25 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/23487 )

Change subject: sched: Fix scheduling UL TBF not matching conditions
......................................................................

sched: Fix scheduling UL TBF not matching conditions

With previous code, a skipped TBF could be returned despite not matching
the conditions, since at the end of the loop the tbf pointer was
returned.

Related: OS#5020
Change-Id: If6dccec86c7a655bf1c62f333cfbc8d2c507c94f
---
M src/gprs_rlcmac_sched.cpp
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved



diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index c63ed6e..c54f533 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -87,7 +87,7 @@
 static struct gprs_rlcmac_ul_tbf *sched_select_uplink(uint8_t trx, uint8_t ts, uint32_t fn,
 	uint8_t block_nr, struct gprs_rlcmac_pdch *pdch, bool require_gprs_only)
 {
-	struct gprs_rlcmac_ul_tbf *tbf = NULL;
+	struct gprs_rlcmac_ul_tbf *tbf;
 	uint8_t i, tfi;
 
 	/* select uplink resource */
@@ -114,10 +114,10 @@
 			block_nr, tbf->m_usf[ts], tfi);
 		/* next TBF to handle resource is the next one */
 		pdch->next_ul_tfi = (tfi + 1) & 31;
-		break;
+		return tbf;
 	}
 
-	return tbf;
+	return NULL;
 }
 
 struct msgb *sched_app_info(struct gprs_rlcmac_tbf *tbf) {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/23487
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: If6dccec86c7a655bf1c62f333cfbc8d2c507c94f
Gerrit-Change-Number: 23487
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin 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/20210325/9de67ade/attachment.htm>


More information about the gerrit-log mailing list