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.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/26183 ) Change subject: pdch: Update ms_reserved_slots in GprsMS when TS becomes disabled ...................................................................... pdch: Update ms_reserved_slots in GprsMS when TS becomes disabled Otherwise, after the TS is disabled, a new TBF created for that MS may end up in alloc_algorithm assigning the disabled TS, since it will be in the mask of reserved PDCH TS for that MS. Related: SYS#5356 Change-Id: Ifc59ac37fa6b0ad9ecc8f76326928611e748b11c --- M src/pdch.cpp 1 file changed, 28 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/83/26183/1 diff --git a/src/pdch.cpp b/src/pdch.cpp index 6aae7d1..4d82ab1 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -131,6 +131,32 @@ } } +/* Make sure the PDCH vanished from the mask of reserved PDCHs for all MS, to + * avoid alloc_algorithm using it. */ +static void pdch_unreserve_all_ms_reserved_slots(struct gprs_rlcmac_pdch *pdch) +{ + struct llist_head *tmp; + uint8_t ts_rm_mask = (~(1 << pdch->ts_no)); + struct gprs_rlcmac_trx *trx = pdch->trx; + + llist_for_each(tmp, bts_ms_list(trx->bts)) { + struct GprsMs *ms = llist_entry(tmp, typeof(*ms), list); + if (ms->current_trx != trx) + continue; + uint8_t old_dl_slots = ms_reserved_dl_slots(ms); + uint8_t old_ul_slots = ms_reserved_ul_slots(ms); + uint8_t new_dl_slots = old_dl_slots & ts_rm_mask; + uint8_t new_ul_slots = old_ul_slots & ts_rm_mask; + if (old_dl_slots == new_dl_slots && old_ul_slots == new_ul_slots) + continue; + ms_set_reserved_slots(ms, trx, new_ul_slots, new_dl_slots); + } + if (pdch->num_reserved(GPRS_RLCMAC_UL_TBF) > 0 || pdch->num_reserved(GPRS_RLCMAC_DL_TBF) > 0) + LOGPDCH(pdch, DRLCMAC, LOGL_ERROR, + "Reserved TS count not zero after unreserving from all current MS in list! UL=%u DL=%u\n", + pdch->num_reserved(GPRS_RLCMAC_UL_TBF), pdch->num_reserved(GPRS_RLCMAC_DL_TBF)); +} + void pdch_init(struct gprs_rlcmac_pdch *pdch, struct gprs_rlcmac_trx *trx, uint8_t ts_nr) { pdch->ts_no = ts_nr; @@ -171,6 +197,8 @@ /* kick all TBF on slot */ pdch_free_all_tbf(this); + pdch_unreserve_all_ms_reserved_slots(this); + /* flush all pending paging messages */ while ((pag = dequeue_paging())) talloc_free(pag); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/26183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ifc59ac37fa6b0ad9ecc8f76326928611e748b11c Gerrit-Change-Number: 26183 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211109/46c5298d/attachment.htm>