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 submitted this change and it was merged. ( https://gerrit.osmocom.org/13151 ) Change subject: Tighten lqual table limits check ...................................................................... Tighten lqual table limits check Previously MAX_GPRS_CS was used for both EDGE and GPRS which means that we waste extra memory in GPRS case. It also leads to misleading name. Let's fix this by introducing separate definitions for GPRS and EDGE cases and use them as appropriate in limit checks. Change-Id: I3ae1ee64ec8e80247b8fe669cc79505b4dadf58f --- M src/bts.h M src/gprs_ms.cpp M src/pcu_main.cpp 3 files changed, 13 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Pau Espin Pedrol: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/bts.h b/src/bts.h index 578cece..b83ab4b 100644 --- a/src/bts.h +++ b/src/bts.h @@ -45,7 +45,9 @@ #define LLC_CODEL_DISABLE 0 #define LLC_CODEL_USE_DEFAULT (-1) -#define MAX_GPRS_CS 9 + +#define MAX_EDGE_MCS 9 +#define MAX_GPRS_CS 4 /* see bts->gsmtap_categ_mask */ enum pcu_gsmtap_category { @@ -143,7 +145,7 @@ uint8_t cs_adj_upper_limit; uint8_t cs_adj_lower_limit; struct {int16_t low; int16_t high; } cs_lqual_ranges[MAX_GPRS_CS]; - struct {int16_t low; int16_t high; } mcs_lqual_ranges[MAX_GPRS_CS]; + struct {int16_t low; int16_t high; } mcs_lqual_ranges[MAX_EDGE_MCS]; uint16_t cs_downgrade_threshold; /* downgrade if less packets left (DL) */ uint16_t ws_base; uint16_t ws_pdch; /* increase WS by this value per PDCH */ diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp index 740ef6b..87a35d1 100644 --- a/src/gprs_ms.cpp +++ b/src/gprs_ms.cpp @@ -620,7 +620,7 @@ int low; int high; GprsCodingScheme new_cs_ul = m_current_cs_ul; - unsigned current_cs_num = m_current_cs_ul.to_num(); + uint8_t current_cs_num = m_current_cs_ul.to_num(); bts_data = m_bts->bts_data(); @@ -642,11 +642,13 @@ old_link_qual = meas->link_qual; if (m_current_cs_ul.isGprs()) { + if (current_cs_num > MAX_GPRS_CS) + current_cs_num = MAX_GPRS_CS; low = bts_data->cs_lqual_ranges[current_cs_num-1].low; high = bts_data->cs_lqual_ranges[current_cs_num-1].high; } else if (m_current_cs_ul.isEgprs()) { - if (current_cs_num > MAX_GPRS_CS) - current_cs_num = MAX_GPRS_CS; + if (current_cs_num > MAX_EDGE_MCS) + current_cs_num = MAX_EDGE_MCS; low = bts_data->mcs_lqual_ranges[current_cs_num-1].low; high = bts_data->mcs_lqual_ranges[current_cs_num-1].high; } else { diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp index fe85160..a0f31d1 100644 --- a/src/pcu_main.cpp +++ b/src/pcu_main.cpp @@ -214,10 +214,10 @@ bts->cs_adj_enabled = 1; bts->cs_adj_upper_limit = 33; /* Decrease CS if the error rate is above */ bts->cs_adj_lower_limit = 10; /* Increase CS if the error rate is below */ - bts->max_cs_ul = 4; - bts->max_cs_dl = 4; - bts->max_mcs_ul = MAX_GPRS_CS; - bts->max_mcs_dl = MAX_GPRS_CS; + bts->max_cs_ul = MAX_GPRS_CS; + bts->max_cs_dl = MAX_GPRS_CS; + bts->max_mcs_ul = MAX_EDGE_MCS; + bts->max_mcs_dl = MAX_EDGE_MCS; /* CS-1 to CS-4 */ bts->cs_lqual_ranges[0].low = -256; bts->cs_lqual_ranges[0].high = 6; -- To view, visit https://gerrit.osmocom.org/13151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I3ae1ee64ec8e80247b8fe669cc79505b4dadf58f Gerrit-Change-Number: 13151 Gerrit-PatchSet: 2 Gerrit-Owner: Max <msuraev at sysmocom.de> Gerrit-Reviewer: Daniel Willmann <dwillmann at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max <msuraev at sysmocom.de> Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de> Gerrit-Reviewer: osmith <osmith at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190306/11d63836/attachment.htm>