From 3bed5d11d210b599f56a1df3a5339b0a74cedcff Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Thu, 19 Mar 2015 11:22:38 +0100 Subject: tbf: Implement delayed release of a downlink TBF Currently a DL TBF is immediately closed, when the LLC queue is drained. This will lead to a new DL assignment if data is received afterwards. In addition, it is not possible to keep the PACCH open to poll the MS for UL establishment requests there. GSM 44.060, 9.3.1a suggests to delay the release of an inactive TBF for some time (max 5s). This commit mainly changes create_new_bsn() to send LLC dummy commands as filler if no LLC data is available until keep_open() returns false. The keep_open() functions returns true unless a configurable time has passed after the LLC data store drained. By default, that time is not set which causes keep_open() to always return false, so that delayed release is effectively disabled. The following VTY commands are added: - dl-tbf-idle-time <1-5000> to set the delay in ms - no dl-tbf-idle-time to disable delayed release Ticket: #556 Sponsored-by: On-Waves ehf --- src/pcu_vty.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/pcu_vty.c') diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 578a10ba..9b597ad1 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -105,6 +105,9 @@ static int config_write_pcu(struct vty *vty) vty_out(vty, " two-phase-access%s", VTY_NEWLINE); vty_out(vty, " alpha %d%s", bts->alpha, VTY_NEWLINE); vty_out(vty, " gamma %d%s", bts->gamma * 2, VTY_NEWLINE); + if (bts->dl_tbf_idle_msec) + vty_out(vty, " dl-tbf-idle-time %d%s", bts->dl_tbf_idle_msec, + VTY_NEWLINE); return CMD_SUCCESS; } @@ -287,6 +290,31 @@ DEFUN(show_bts_stats, return CMD_SUCCESS; } +#define IDLE_TIME_STR "keep an idle DL TBF alive for the time given\n" +DEFUN(cfg_pcu_dl_tbf_idle_time, + cfg_pcu_dl_tbf_idle_time_cmd, + "dl-tbf-idle-time <1-5000>", + IDLE_TIME_STR "idle time in msec") +{ + struct gprs_rlcmac_bts *bts = bts_main_data(); + + bts->dl_tbf_idle_msec = atoi(argv[0]); + + return CMD_SUCCESS; +} + +DEFUN(cfg_pcu_no_dl_tbf_idle_time, + cfg_pcu_no_dl_tbf_idle_time_cmd, + "no dl-tbf-idle-time", + NO_STR IDLE_TIME_STR) +{ + struct gprs_rlcmac_bts *bts = bts_main_data(); + + bts->dl_tbf_idle_msec = 0; + + return CMD_SUCCESS; +} + DEFUN(show_tbf, show_tbf_cmd, "show tbf all", @@ -343,6 +371,8 @@ int pcu_vty_init(const struct log_info *cat) install_element(PCU_NODE, &cfg_pcu_fc_interval_cmd); install_element(PCU_NODE, &cfg_pcu_alpha_cmd); install_element(PCU_NODE, &cfg_pcu_gamma_cmd); + install_element(PCU_NODE, &cfg_pcu_dl_tbf_idle_time_cmd); + install_element(PCU_NODE, &cfg_pcu_no_dl_tbf_idle_time_cmd); install_element(PCU_NODE, &ournode_end_cmd); install_element_ve(&show_bts_stats_cmd); -- cgit v1.2.3