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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/22995 )
Change subject: find_multi_slots: Avoid multiple calls to mslot_class_get_rx()
......................................................................
find_multi_slots: Avoid multiple calls to mslot_class_get_rx()
Change-Id: I06c97d81636e251f81c26f3aa042c70717be083a
---
M src/gprs_rlcmac_ts_alloc.cpp
1 file changed, 4 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp
index 469ede3..1645b87 100644
--- a/src/gprs_rlcmac_ts_alloc.cpp
+++ b/src/gprs_rlcmac_ts_alloc.cpp
@@ -516,7 +516,8 @@
*/
int find_multi_slots(struct gprs_rlcmac_trx *trx, uint8_t mslot_class, uint8_t *ul_slots, uint8_t *dl_slots)
{
- uint8_t Tx = mslot_class_get_tx(mslot_class), /* Max number of Tx slots */
+ uint8_t Rx = mslot_class_get_rx(mslot_class), /* Max number of Rx slots */
+ Tx = mslot_class_get_tx(mslot_class), /* Max number of Tx slots */
Sum = mslot_class_get_sum(mslot_class), /* Max number of Tx + Rx slots */
max_slots, num_rx, num_tx, mask_sel, pdch_slots, ul_ts, dl_ts;
int16_t rx_window, tx_window;
@@ -534,7 +535,7 @@
return -EINVAL;
}
- max_slots = OSMO_MAX(mslot_class_get_rx(mslot_class), Tx);
+ max_slots = OSMO_MAX(Rx, Tx);
if (*dl_slots == 0)
*dl_slots = 0xff;
@@ -590,7 +591,7 @@
if ((tx_window & (1 << ((ul_ts+num_tx-1) % 8))) == 0)
continue;
- num_rx = OSMO_MIN(mslot_class_get_rx(mslot_class), Sum - num_tx);
+ num_rx = OSMO_MIN(Rx, Sum - num_tx);
rx_valid_win = (1 << num_rx) - 1;
/* Rotate group of RX slots: DDD-----, -DDD----, ..., DD-----D */
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/22995
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I06c97d81636e251f81c26f3aa042c70717be083a
Gerrit-Change-Number: 22995
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210220/91ec70e1/attachment.htm>