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/.
Max gerrit-no-reply at lists.osmocom.orgMax has uploaded this change for review. ( https://gerrit.osmocom.org/12247 Change subject: cosmetic: move bit counter outside of egprs_window_size() ...................................................................... cosmetic: move bit counter outside of egprs_window_size() As a preparation to moving window size calculation to C code, let's move bit counter call outside. It makes more sense that way as well because egprs_window_size() now deals with actual number of allocated slots instead of raw bitmap. Change-Id: I5b59919e7b4c9fd2c91958659bafe470ed8fcff7 --- M src/tbf.cpp M src/tbf_dl.cpp M src/tbf_ul.cpp 3 files changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/47/12247/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 6792d08..832aa60 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -500,8 +500,6 @@ uint16_t egprs_window_size(const struct gprs_rlcmac_bts *bts_data, uint8_t slots) { - uint8_t num_pdch = pcu_bitcount(slots); - return OSMO_MIN((num_pdch != 1) ? (128 * num_pdch) : 192, OSMO_MAX(64, (bts_data->ws_base + num_pdch * bts_data->ws_pdch) / 32 * 32)); } diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 01331a6..a3fef2c 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -1358,7 +1358,7 @@ void gprs_rlcmac_dl_tbf::set_window_size() { const struct gprs_rlcmac_bts *b = bts->bts_data(); - uint16_t ws = egprs_window_size(b, dl_slots()); + uint16_t ws = egprs_window_size(b, pcu_bitcount(dl_slots())); LOGPTBFDL(this, LOGL_INFO, "setting EGPRS DL window size to %u, base(%u) slots(%u) ws_pdch(%u)\n", ws, b->ws_base, pcu_bitcount(dl_slots()), b->ws_pdch); m_window.set_ws(ws); diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index f877484..9233f2c 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -594,7 +594,7 @@ void gprs_rlcmac_ul_tbf::set_window_size() { const struct gprs_rlcmac_bts *b = bts->bts_data(); - uint16_t ws = egprs_window_size(b, ul_slots()); + uint16_t ws = egprs_window_size(b, pcu_bitcount(ul_slots())); LOGPTBFUL(this, LOGL_INFO, "setting EGPRS UL window size to %u, base(%u) slots(%u) ws_pdch(%u)\n", ws, b->ws_base, pcu_bitcount(ul_slots()), b->ws_pdch); m_window.set_ws(ws); -- To view, visit https://gerrit.osmocom.org/12247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5b59919e7b4c9fd2c91958659bafe470ed8fcff7 Gerrit-Change-Number: 12247 Gerrit-PatchSet: 1 Gerrit-Owner: Max <msuraev at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181211/5d85f0a6/attachment.htm>