From 7631182563159c3316e5889ce9bc629f52eb06d4 Mon Sep 17 00:00:00 2001 From: Aravind Sirsikar Date: Wed, 3 Aug 2016 11:48:01 +0530 Subject: Fix issue with DL window size calculation During performance testing it is found that when DL data alone is triggered using Iperf, window size was being calculated as 160 for EGPRS DL even when window size 480 is configured from VTY of osmo-pcu.cfg. There was an issue with gprs_rlcmac_tbf::update function causing this erroneous behavior. --- src/tbf.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/tbf.cpp b/src/tbf.cpp index 69b9e3a..8493505 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -375,6 +375,24 @@ int gprs_rlcmac_tbf::update() return -rc; } + /* Only for DL direction. update the window size*/ + if (is_egprs_enabled()) { + unsigned int num_pdch = pcu_bitcount(dl_slots()); + unsigned int ws = bts->bts_data()->ws_base + num_pdch * bts->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 num_pdch(%d) ws_base(%d) ws_pdch(%d)\n", + name(), ws, num_pdch, bts->bts_data()->ws_base, + bts->bts_data()->ws_pdch); + + window()->set_ws(ws); + } return 0; } -- cgit v1.2.3