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.orgHello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/819 to look at the new patch set (#3). Fix slot allocation based on direction configured Currently number of TS for second DL TBF is less compared to first DL TBF because PCU is considering the combined capacity during TS allocation. With this issue there was no fairness in throughput between the 2 DL TBFs This patch enables the user to maximize the number of TS allocation for the DL or UL TBF based on the direction configured through VTY with cfg_pcu_ts_alloc_maximise_cmd Related: OS#1792 Change-Id: I4b4a99194ccae68bb3417bce538d16e944d5ec71 --- M src/bts.h M src/gprs_rlcmac_ts_alloc.cpp M src/pcu_main.cpp M src/pcu_vty.c M tests/alloc/AllocTest.cpp M tests/alloc/AllocTest.ok 6 files changed, 43 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/19/819/3 diff --git a/src/bts.h b/src/bts.h index ba6fc4d..59e614f 100644 --- a/src/bts.h +++ b/src/bts.h @@ -44,6 +44,11 @@ #define LLC_CODEL_USE_DEFAULT (-1) #define MAX_GPRS_CS 9 +enum maximise_direction { + DL_ONLY, + UL_ONLY, + DL_UL_BOTH +}; struct BTS; struct GprsMs; @@ -191,6 +196,8 @@ /* 0 to support resegmentation in DL, 1 for no reseg */ uint8_t dl_arq_type; + enum maximise_direction max_ts_direction_cfgd; + uint32_t ms_idle_sec; uint8_t cs_adj_enabled; uint8_t cs_adj_upper_limit; diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 57197b2..dc908b5 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -775,8 +775,13 @@ rx_window & tx_window, 'C'), capacity); #endif - - if (capacity <= max_capacity) + if (bts->max_ts_direction_cfgd == UL_ONLY) { + if (tx_window < max_ul_slots) + continue; + } else if (bts->max_ts_direction_cfgd == DL_ONLY) { + if (rx_window < max_dl_slots) + continue; + } else if (capacity <= max_capacity) continue; max_capacity = capacity; diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp index afdfdc7..fbb16bc 100644 --- a/src/pcu_main.cpp +++ b/src/pcu_main.cpp @@ -217,6 +217,8 @@ */ bts->dl_arq_type = EGPRS_ARQ1; + bts->max_ts_direction_cfgd = DL_UL_BOTH; + msgb_set_talloc_ctx(tall_pcu_ctx); osmo_init_logging(&gprs_log_info); diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 535d512..1ffbefc 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -497,6 +497,23 @@ return CMD_SUCCESS; } +DEFUN(cfg_pcu_ts_alloc_maximise_type, + cfg_pcu_ts_alloc_maximise_cmd, + "maximise-direction (dl|ul)", + "number of TS allocation based on direction configured\n" + "maximise DL capacity\n" + "maximise UL capacity") +{ + struct gprs_rlcmac_bts *bts = bts_main_data(); + + if (!strcmp(argv[0], "dl")) + bts->max_ts_direction_cfgd = DL_ONLY; + else if (!strcmp(argv[0], "ul")) + bts->max_ts_direction_cfgd = UL_ONLY; + + return CMD_SUCCESS; +} + DEFUN(cfg_pcu_window_size, cfg_pcu_window_size_cmd, "window-size <0-1024> [<0-256>]", @@ -972,6 +989,7 @@ install_element(PCU_NODE, &cfg_pcu_cs_lqual_ranges_cmd); install_element(PCU_NODE, &cfg_pcu_mcs_cmd); install_element(PCU_NODE, &cfg_pcu_dl_arq_cmd); + install_element(PCU_NODE, &cfg_pcu_ts_alloc_maximise_cmd); install_element(PCU_NODE, &cfg_pcu_no_mcs_cmd); install_element(PCU_NODE, &cfg_pcu_mcs_max_cmd); install_element(PCU_NODE, &cfg_pcu_no_mcs_max_cmd); diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index f7794f7..44c01e6 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -118,6 +118,7 @@ bts = the_bts.bts_data(); bts->alloc_algorithm = alloc_algorithm_a; + bts->max_ts_direction_cfgd = DL_UL_BOTH; struct gprs_rlcmac_trx *trx = &bts->trx[0]; for (i = 0; i < 8; i += 1) @@ -196,6 +197,7 @@ bts = the_bts.bts_data(); bts->alloc_algorithm = alloc_algorithm_b; + bts->max_ts_direction_cfgd = DL_UL_BOTH; trx = &bts->trx[0]; trx->pdch[5].enable(); @@ -238,6 +240,7 @@ bts = the_bts.bts_data(); bts->alloc_algorithm = alloc_algorithm_b; + bts->max_ts_direction_cfgd = DL_UL_BOTH; trx = &bts->trx[0]; trx->pdch[5].enable(); @@ -285,6 +288,7 @@ bts = the_bts.bts_data(); bts->alloc_algorithm = alloc_algorithm_b; + bts->max_ts_direction_cfgd = DL_UL_BOTH; trx = &bts->trx[0]; trx->pdch[1].enable(); @@ -660,6 +664,7 @@ bts = the_bts.bts_data(); bts->alloc_algorithm = algo; + bts->max_ts_direction_cfgd = DL_UL_BOTH; trx = &bts->trx[0]; trx->pdch[3].enable(); @@ -698,6 +703,7 @@ bts = the_bts.bts_data(); bts->alloc_algorithm = algo; + bts->max_ts_direction_cfgd = DL_UL_BOTH; trx = &bts->trx[0]; trx->pdch[3].enable(); @@ -806,6 +812,7 @@ bts = the_bts.bts_data(); bts->alloc_algorithm = alloc_algorithm_b; + bts->max_ts_direction_cfgd = DL_ONLY; trx = &bts->trx[0]; trx->pdch[4].enable(); @@ -830,13 +837,8 @@ if (dl_tbf2->pdch[i]) numTs2++; } - - /* - * TODO: currently 2nd DL TBF gets 3 TS - * This behaviour will be fixed in subsequent patch - */ printf("TBF2: numTs(%d)\n", numTs2); - OSMO_ASSERT(numTs2 == 3); + OSMO_ASSERT(numTs2 == 4); tbf_free(dl_tbf1); tbf_free(dl_tbf2); diff --git a/tests/alloc/AllocTest.ok b/tests/alloc/AllocTest.ok index cbb65aa..9717411 100644 --- a/tests/alloc/AllocTest.ok +++ b/tests/alloc/AllocTest.ok @@ -10795,4 +10795,4 @@ Successfully allocated 160 TBFs Testing DL TS allocation for Multi UEs TBF1: numTs(4) -TBF2: numTs(3) +TBF2: numTs(4) -- To view, visit https://gerrit.osmocom.org/819 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4b4a99194ccae68bb3417bce538d16e944d5ec71 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar <arvind.sirsikar at radisys.com> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Holger Freyther <holger at freyther.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: arvind.sirsikar <arvind.sirsikar at radisys.com>