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/.
arvind.sirsikar gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/832 Refactoring: New function to calculate EGPRS DL window size New function is added to calculate the DL EGPRS window size Change-Id: I7c7777d43f843bbd3421503fc2a8600f148ca035 Related: OS#1808 --- M src/tbf.cpp M src/tbf.h 2 files changed, 23 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/32/832/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 1fc1aef..49968dd 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -780,20 +780,8 @@ return NULL; } - if (tbf->is_egprs_enabled()) { - unsigned int num_pdch = pcu_bitcount(tbf->dl_slots()); - unsigned int ws = bts->ws_base + num_pdch * bts->ws_pdch; - ws = (ws / 32) * 32; - ws = OSMO_MAX(64, ws); - if (num_pdch == 1) - ws = OSMO_MIN(192, ws); - else - ws = OSMO_MIN(128 * num_pdch, ws); - - LOGP(DRLCMAC, LOGL_INFO, "%s: Setting EGPRS window size to %d\n", - tbf->name(), ws); - tbf->m_window.set_ws(ws); - } + if (tbf->is_egprs_enabled()) + tbf->calc_egprs_window_size(); llist_add(&tbf->list(), &bts->bts->dl_tbfs()); tbf->bts->tbf_dl_created(); @@ -1246,3 +1234,23 @@ { return ts == control_ts; } + +void gprs_rlcmac_tbf::calc_egprs_window_size() +{ + struct gprs_rlcmac_bts *bts_data = bts->bts_data(); + unsigned int num_pdch = pcu_bitcount(dl_slots()); + unsigned int ws = bts_data->ws_base + num_pdch * bts_data->ws_pdch; + + ws = (ws / 32) * 32; + ws = OSMO_MAX(64, ws); + + if (num_pdch == 1) + ws = OSMO_MIN(192, ws); + else + ws = OSMO_MIN(128 * num_pdch, ws); + + LOGP(DRLCMAC, LOGL_INFO, "%s: Setting EGPRS window size to %d\n", + name(), ws); + + window()->set_ws(ws); +} diff --git a/src/tbf.h b/src/tbf.h index 2a1bfe8..0013520 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -155,6 +155,7 @@ bool is_egprs_enabled() const; void enable_egprs(); void disable_egprs(); + void calc_egprs_window_size(); /* attempt to make things a bit more fair */ void rotate_in_list(); -- To view, visit https://gerrit.osmocom.org/832 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c7777d43f843bbd3421503fc2a8600f148ca035 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar <arvind.sirsikar at radisys.com>