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/+/26182 ) Change subject: ts_alloc: rename variable to clarify meaning ...................................................................... ts_alloc: rename variable to clarify meaning The variable counts reserved slots, not available one. It can easily be seen by checking function count_slots() documentation "Number of reserved TS". The previous naming was used probably to indicate "available to reserve" TS, but the naming is misleading. Change-Id: Ib58e87d5a067d20d0b331fe32dff61b95ecc3e3f --- M src/gprs_rlcmac_ts_alloc.cpp 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/82/26182/1 diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index dc46b84..d86d9c3 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -659,12 +659,12 @@ * \param[in] slots Timeslots in use * \param[in] reserved_slots Reserved timeslots * \param[out] slotcount Number of TS in use - * \param[out] avail_count Number of reserved TS + * \param[out] reserve_count Number of reserved TS */ -static void count_slots(uint8_t slots, uint8_t reserved_slots, uint8_t *slotcount, uint8_t *avail_count) +static void count_slots(uint8_t slots, uint8_t reserved_slots, uint8_t *slotcount, uint8_t *reserve_count) { (*slotcount) = pcu_bitcount(slots); - (*avail_count) = pcu_bitcount(reserved_slots); + (*reserve_count) = pcu_bitcount(reserved_slots); } /*! Return slot mask with single TS from a given UL/DL set according to TBF's direction, ts pointer is set to that TS @@ -867,7 +867,7 @@ uint8_t reserved_ul_slots; int8_t first_common_ts; uint8_t slotcount = 0; - uint8_t avail_count = 0, trx_no; + uint8_t reserve_count = 0, trx_no; int first_ts = -1; int usf[8] = {-1, -1, -1, -1, -1, -1, -1, -1}; int rc; @@ -910,7 +910,7 @@ /* Step 3b: Derive the slot set for a given direction */ if (tbf->direction == GPRS_RLCMAC_DL_TBF) { dl_slots = rc; - count_slots(dl_slots, reserved_dl_slots, &slotcount, &avail_count); + count_slots(dl_slots, reserved_dl_slots, &slotcount, &reserve_count); } else { rc = allocate_usf(trx, rc, dl_slots, usf); if (rc < 0) @@ -919,7 +919,7 @@ ul_slots = rc; reserved_ul_slots = ul_slots; - count_slots(ul_slots, reserved_ul_slots, &slotcount, &avail_count); + count_slots(ul_slots, reserved_ul_slots, &slotcount, &reserve_count); } first_ts = ffs(rc) - 1; @@ -936,7 +936,7 @@ } if (single && slotcount) { - tbf->upgrade_to_multislot = (avail_count > slotcount); + tbf->upgrade_to_multislot = (reserve_count > slotcount); LOGPAL(tbf, "B", single, use_trx, LOGL_INFO, "using single slot at TS %d\n", first_ts); } else { tbf->upgrade_to_multislot = false; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/26182 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ib58e87d5a067d20d0b331fe32dff61b95ecc3e3f Gerrit-Change-Number: 26182 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/aa924f15/attachment.htm>