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/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/22185 )
Change subject: Move cs_downgrade_threshold field from BTS to PCU
......................................................................
Move cs_downgrade_threshold field from BTS to PCU
Change-Id: I3e1c65eb3cccff565d5d84588bdce93a47909a0f
---
M src/bts.cpp
M src/bts.h
M src/gprs_ms.c
M src/gprs_pcu.c
M src/gprs_pcu.h
M src/pcu_vty.c
M tests/ms/MsTest.cpp
M tests/tbf/TbfTest.cpp
8 files changed, 14 insertions(+), 25 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/85/22185/1
diff --git a/src/bts.cpp b/src/bts.cpp
index 3795ca2..32ec71e 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -232,7 +232,6 @@
bts->mcs_lqual_ranges[7].high = 24;
bts->mcs_lqual_ranges[8].low = 23;
bts->mcs_lqual_ranges[8].high = 256;
- bts->cs_downgrade_threshold = 200;
bts->ns_dialect = NS2_DIALECT_IPACCESS;
/* TODO: increase them when CRBB decoding is implemented */
diff --git a/src/bts.h b/src/bts.h
index 1f4da4e..16be7da 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -108,10 +108,6 @@
uint8_t si13[GSM_MACBLOCK_LEN];
bool si13_is_set;
-
- /* downgrade DL CS when less than specified octets are left in tx queue. Optimization, see paper:
- "Theoretical Analysis of GPRS Throughput and Delay" */
- uint16_t cs_downgrade_threshold;
/* Link quality range for each UL (M)CS. Below or above, next/prev (M)CS is selected. */
struct {int16_t low; int16_t high; } cs_lqual_ranges[MAX_GPRS_CS];
struct {int16_t low; int16_t high; } mcs_lqual_ranges[MAX_EDGE_MCS];
diff --git a/src/gprs_ms.c b/src/gprs_ms.c
index cc64c86..c0fb55e 100644
--- a/src/gprs_ms.c
+++ b/src/gprs_ms.c
@@ -794,7 +794,7 @@
unencoded_octets += llc_chunk_size(tbf_llc((struct gprs_rlcmac_tbf *)ms->dl_tbf));
/* There are many unencoded octets, don't reduce */
- if (unencoded_octets >= bts_data(ms->bts)->cs_downgrade_threshold)
+ if (unencoded_octets >= the_pcu->vty.cs_downgrade_threshold)
return cs;
/* RF conditions are good, don't reduce */
diff --git a/src/gprs_pcu.c b/src/gprs_pcu.c
index d7a851b..ba48c38 100644
--- a/src/gprs_pcu.c
+++ b/src/gprs_pcu.c
@@ -58,6 +58,7 @@
pcu->vty.cs_adj_enabled = true;
pcu->vty.cs_adj_upper_limit = 33; /* Decrease CS if the error rate is above */
pcu->vty.cs_adj_lower_limit = 10; /* Increase CS if the error rate is below */
+ pcu->vty.cs_downgrade_threshold = 200;
pcu->T_defs = T_defs_pcu;
osmo_tdefs_reset(pcu->T_defs);
diff --git a/src/gprs_pcu.h b/src/gprs_pcu.h
index 6c9eae1..146b8b8 100644
--- a/src/gprs_pcu.h
+++ b/src/gprs_pcu.h
@@ -82,6 +82,9 @@
bool cs_adj_enabled; /* whether cs_adj_{upper,lower}_limit are used to adjust DL CS */
uint8_t cs_adj_upper_limit; /* downgrade DL CS if error rate above its value */
uint8_t cs_adj_lower_limit; /* upgrade DL CS if error rate below its value */
+ /* downgrade DL CS when less than specified octets are left in tx queue. Optimization, see paper:
+ "Theoretical Analysis of GPRS Throughput and Delay" */
+ uint16_t cs_downgrade_threshold;
} vty;
struct gsmtap_inst *gsmtap;
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index c830400..e0edf91 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -143,9 +143,9 @@
else
vty_out(vty, " no cs threshold%s", VTY_NEWLINE);
- if (bts->cs_downgrade_threshold)
+ if (the_pcu->vty.cs_downgrade_threshold)
vty_out(vty, " cs downgrade-threshold %d%s",
- bts->cs_downgrade_threshold, VTY_NEWLINE);
+ the_pcu->vty.cs_downgrade_threshold, VTY_NEWLINE);
else
vty_out(vty, " no cs downgrade-threshold%s", VTY_NEWLINE);
@@ -947,10 +947,7 @@
CS_STR CS_DOWNGRADE_STR "downgrade if less octets left\n",
CMD_ATTR_IMMEDIATE)
{
- struct gprs_rlcmac_bts *bts = bts_main_data();
-
- bts->cs_downgrade_threshold = atoi(argv[0]);
-
+ the_pcu->vty.cs_downgrade_threshold = atoi(argv[0]);
return CMD_SUCCESS;
}
@@ -960,10 +957,7 @@
NO_STR CS_STR CS_DOWNGRADE_STR,
CMD_ATTR_IMMEDIATE)
{
- struct gprs_rlcmac_bts *bts = bts_main_data();
-
- bts->cs_downgrade_threshold = 0;
-
+ the_pcu->vty.cs_downgrade_threshold = 0;
return CMD_SUCCESS;
}
diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp
index b914f01..d6c8f18 100644
--- a/tests/ms/MsTest.cpp
+++ b/tests/ms/MsTest.cpp
@@ -510,7 +510,7 @@
bts->initial_cs_dl = 4;
bts->initial_cs_ul = 1;
- bts->cs_downgrade_threshold = 0;
+ the_pcu->vty.cs_downgrade_threshold = 0;
the_pcu->vty.cs_adj_lower_limit = 0;
ms = ms_alloc(&the_bts, tlli);
@@ -525,7 +525,7 @@
OSMO_ASSERT(mcs_chan_code(ms_current_cs_dl(ms)) == 3);
- bts->cs_downgrade_threshold = 200;
+ the_pcu->vty.cs_downgrade_threshold = 200;
OSMO_ASSERT(mcs_chan_code(ms_current_cs_dl(ms)) == 2);
@@ -559,7 +559,7 @@
bts->initial_cs_dl = 4;
bts->initial_cs_ul = 1;
- bts->cs_downgrade_threshold = 0;
+ the_pcu->vty.cs_downgrade_threshold = 0;
ms2 = ms_alloc(&the_bts, tlli + 1);
dump_ms(ms2, "2: with BTS defaults");
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 52403e1..75b51bf 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -3070,13 +3070,11 @@
{
the_pcu->bts = bts_alloc(the_pcu);
BTS *the_bts = the_pcu->bts;
- gprs_rlcmac_bts *bts;
uint8_t ts_no = 4;
fprintf(stderr, "=== start %s ===\n", __func__);
- bts = the_bts->bts_data();
- bts->cs_downgrade_threshold = 0;
+ the_pcu->vty.cs_downgrade_threshold = 0;
setup_bts(the_bts, ts_no);
OSMO_ASSERT(osmo_tdef_set(the_pcu->T_defs, -2031, 200, OSMO_TDEF_MS) == 0);
/* ARQ II */
@@ -3100,13 +3098,11 @@
{
the_pcu->bts = bts_alloc(the_pcu);
BTS *the_bts = the_pcu->bts;
- gprs_rlcmac_bts *bts;
uint8_t ts_no = 4;
fprintf(stderr, "=== start %s ===\n", __func__);
- bts = the_bts->bts_data();
- bts->cs_downgrade_threshold = 0;
+ the_pcu->vty.cs_downgrade_threshold = 0;
setup_bts(the_bts, ts_no);
OSMO_ASSERT(osmo_tdef_set(the_pcu->T_defs, -2031, 200, OSMO_TDEF_MS) == 0);
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/22185
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I3e1c65eb3cccff565d5d84588bdce93a47909a0f
Gerrit-Change-Number: 22185
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210114/92ffc7cf/attachment.htm>