diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bts.cpp | 1 | ||||
-rw-r--r-- | src/bts.h | 4 | ||||
-rw-r--r-- | src/gprs_ms.c | 2 | ||||
-rw-r--r-- | src/gprs_pcu.c | 1 | ||||
-rw-r--r-- | src/gprs_pcu.h | 3 | ||||
-rw-r--r-- | src/pcu_vty.c | 14 |
6 files changed, 9 insertions, 16 deletions
diff --git a/src/bts.cpp b/src/bts.cpp index 3795ca2c..32ec71ea 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -232,7 +232,6 @@ static void bts_init(struct gprs_rlcmac_bts *bts, BTS* bts_obj) 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 */ @@ -108,10 +108,6 @@ struct gprs_rlcmac_bts { 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 cc64c86f..c0fb55e0 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -794,7 +794,7 @@ enum CodingScheme ms_current_cs_dl(const struct GprsMs *ms) 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 d7a851b7..ba48c389 100644 --- a/src/gprs_pcu.c +++ b/src/gprs_pcu.c @@ -58,6 +58,7 @@ struct gprs_pcu *gprs_pcu_alloc(void *ctx) 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 6c9eae10..146b8b80 100644 --- a/src/gprs_pcu.h +++ b/src/gprs_pcu.h @@ -82,6 +82,9 @@ struct gprs_pcu { 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 c830400c..e0edf91c 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -143,9 +143,9 @@ static int config_write_pcu(struct vty *vty) 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 @@ DEFUN_ATTR(cfg_pcu_cs_downgrade_thrsh, 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 @@ DEFUN_ATTR(cfg_pcu_no_cs_downgrade_thrsh, 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; } |