aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-28 16:11:19 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-28 17:40:15 +0200
commita098c19b5531e175a308fbe4aee39c54cb3c71f1 (patch)
tree797e16ad6adc9fc5a54d47a34a90d9f1cf557d13
parentd9e102472a97c767cba1bd5687db30028436d623 (diff)
tbf: Set MS timeout
This commit sets the MS timeout when the MS object is created. The value is taken from the ms_idle_sec field in gprs_rlcmac_bts which can be changed by the VTY commands shown below. The following VTY commands are added to the config-pcu node: - ms-idle-time <1-7200> Set the timeout in seconds - no ms-idle-time Disable the timeout Another timer that is related is T3314 (Ready Timer, default 44s, GSM 24.008, 11.2.2) which requires the SGSN to use paging after its expiry. Longer timeouts can help if adaptive coding scheme selection is used (not yet implemented). On the other hand, measurement values (TA, signal quality) can get invalid after some time, especially with a moving MS. So a value slightly above T3314 is probably a good value to start with. Sponsored-by: On-Waves ehf
-rw-r--r--src/bts.h1
-rw-r--r--src/pcu_vty.c27
-rw-r--r--src/tbf.cpp4
3 files changed, 31 insertions, 1 deletions
diff --git a/src/bts.h b/src/bts.h
index 28ecfc1..af66dfc 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -141,6 +141,7 @@ struct gprs_rlcmac_bts {
uint8_t force_two_phase;
uint8_t alpha, gamma;
uint32_t dl_tbf_idle_msec; /* hold time for idle DL TBFs */
+ uint32_t ms_idle_sec;
/* TBF handling, make private or move into TBFController */
/* list of uplink TBFs */
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index a08ec36..9490664 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -483,6 +483,31 @@ DEFUN(cfg_pcu_no_dl_tbf_idle_time,
return CMD_SUCCESS;
}
+#define MS_IDLE_TIME_STR "keep an idle MS object alive for the time given\n"
+DEFUN(cfg_pcu_ms_idle_time,
+ cfg_pcu_ms_idle_time_cmd,
+ "ms-idle-time <1-7200>",
+ MS_IDLE_TIME_STR "idle time in sec")
+{
+ struct gprs_rlcmac_bts *bts = bts_main_data();
+
+ bts->ms_idle_sec = atoi(argv[0]);
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_pcu_no_ms_idle_time,
+ cfg_pcu_no_ms_idle_time_cmd,
+ "no ms-idle-time",
+ NO_STR MS_IDLE_TIME_STR)
+{
+ struct gprs_rlcmac_bts *bts = bts_main_data();
+
+ bts->ms_idle_sec = 0;
+
+ return CMD_SUCCESS;
+}
+
DEFUN(show_tbf,
show_tbf_cmd,
"show tbf all",
@@ -555,6 +580,8 @@ int pcu_vty_init(const struct log_info *cat)
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, &cfg_pcu_ms_idle_time_cmd);
+ install_element(PCU_NODE, &cfg_pcu_no_ms_idle_time_cmd);
install_element_ve(&show_bts_stats_cmd);
install_element_ve(&show_tbf_cmd);
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 53f1ae1..8501b16 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -126,8 +126,10 @@ void gprs_rlcmac_tbf::update_ms(uint32_t tlli, enum gprs_rlcmac_tbf_direction di
{
if (!ms()) {
GprsMs *new_ms = bts->ms_store().get_ms(tlli);
- if (!new_ms)
+ if (!new_ms) {
new_ms = bts->ms_store().create_ms(tlli, dir);
+ new_ms->set_timeout(bts->bts_data()->ms_idle_sec);
+ }
if (dir == GPRS_RLCMAC_UL_TBF)
new_ms->set_ta(m_ta);