osmith has uploaded this change for review.
fsms: use configurable timers instead of T23042
It looks like T23042 was a placeholder for timers to be filled in later,
it cannot be configured via VTY and I cannot find it mentioned in any
specs on etsi.org. git blame shows it first appeard in 31f525e ("large
refactoring: use FSMs for lchans; add inter-BSC HO"). Replace T23042
with timers that can be configured via VTY.
Previous timeout for the states was 5s.
* ASSIGNMENT_ST_WAIT_MGW_ENDPOINT_TO_MSC and
HO_ST_WAIT_MGW_ENDPOINT_TO_MSC:
* Runs gscon_connect_mgw_to_msc() on enter, which waits for one MGCP
CRCX or MDCX response (or changes state immediatelly)
* Use existing X9 ("Timeout for availability of MGW endpoint"), 5s,
which is already being used by lchan_rtp_fsm for a similar purpose
* HO_ST_WAIT_LCHAN_ACTIVE:
* Runs lchan_activate() on enter, and waits for the lchan fsm to go
through LCHAN_ST_WAIT_TS_READY (X5) and LCHAN_ST_WAIT_ACTIV_ACK
(X6).
* Use new X29, 10s (5s from X5 + 5s from X6)
* HO_ST_WAIT_RR_HO_DETECT:
* Handover initiation as described in 3GPP TS 04.08 § 3.4.4.1:
"The network initiates the handover procedure by sending a HANDOVER
COMMAND message to the mobile station on the main DCCH. It then
starts timer T3103."
* Use existing but unused timer T3103 ("Handover"), 5s
* HO_ST_WAIT_RR_HO_COMPLETE:
* Handover completion as described in 3GPP TS 04.08 § 3.4.4.3:
"When receiving the HANDOVER COMPLETE message, the network stops
timer T3103 and releases the old channels."
* Continue using T3103 with keep_timer = true
* HO_ST_WAIT_LCHAN_ESTABLISHED:
* Waits for HO_EV_LCHAN_ESTABLISHED from the lchan fsm (if it was not
received yet, otherwise the state gets skipped without wait)
* Use new X30, 5s
Closes: OS#5787
Change-Id: Id0d4d0788f609f3272fc81c80a754383dde25c16
---
M src/osmo-bsc/assignment_fsm.c
M src/osmo-bsc/handover_fsm.c
M src/osmo-bsc/net_init.c
M tests/timer.vty
4 files changed, 12 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/07/30307/1
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index f00b26d..3a832a4 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -54,7 +54,7 @@
[ASSIGNMENT_ST_WAIT_LCHAN_ACTIVE] = { .T = 10 },
[ASSIGNMENT_ST_WAIT_RR_ASS_COMPLETE] = { .keep_timer = true },
[ASSIGNMENT_ST_WAIT_LCHAN_ESTABLISHED] = { .keep_timer = true },
- [ASSIGNMENT_ST_WAIT_MGW_ENDPOINT_TO_MSC] = { .T = 23042 },
+ [ASSIGNMENT_ST_WAIT_MGW_ENDPOINT_TO_MSC] = { .T = -9 },
};
/* Transition to a state, using the T timer defined in assignment_fsm_timeouts.
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 0d888e0..558dcd4 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -193,11 +193,11 @@
}
static const struct osmo_tdef_state_timeout ho_fsm_timeouts[32] = {
- [HO_ST_WAIT_LCHAN_ACTIVE] = { .T = 23042 },
- [HO_ST_WAIT_MGW_ENDPOINT_TO_MSC] = { .T = 23042 },
- [HO_ST_WAIT_RR_HO_DETECT] = { .T = 23042 },
- [HO_ST_WAIT_RR_HO_COMPLETE] = { .T = 23042 },
- [HO_ST_WAIT_LCHAN_ESTABLISHED] = { .T = 23042 },
+ [HO_ST_WAIT_LCHAN_ACTIVE] = { .T = -29 },
+ [HO_ST_WAIT_MGW_ENDPOINT_TO_MSC] = { .T = -9 },
+ [HO_ST_WAIT_RR_HO_DETECT] = { .T = 3103 },
+ [HO_ST_WAIT_RR_HO_COMPLETE] = { .keep_timer = true },
+ [HO_ST_WAIT_LCHAN_ESTABLISHED] = { .T = -30 },
[HO_OUT_ST_WAIT_HO_COMMAND] = { .T = 7 },
[HO_OUT_ST_WAIT_CLEAR] = { .T = 8 },
};
diff --git a/src/osmo-bsc/net_init.c b/src/osmo-bsc/net_init.c
index ad2f9bf..fdfe3ac 100644
--- a/src/osmo-bsc/net_init.c
+++ b/src/osmo-bsc/net_init.c
@@ -73,6 +73,8 @@
" after this amount of idle time, forget internally cumulated time remainders. Zero to always"
" keep remainders. See also X16, X17." },
{ .T = -25, .default_val = 5, .desc = "Timeout for initial user data after an MSC initiated an SCCP connection to the BSS" },
+ { .T = -29, .default_val = 10, .desc = "Timeout for activating an lchan for handover (should be X5 + X6)" },
+ { .T = -30, .default_val = 5, .desc = "Timeout for establishing new lchan at the end of handover" },
{ .T = -3111, .default_val = 4, .desc = "Wait time after lchan was released in error (should be T3111 + 2s)" },
{ .T = -3210, .default_val = 20, .desc = "After L3 Complete, wait for MSC to confirm" },
{}
diff --git a/tests/timer.vty b/tests/timer.vty
index 04c9872..01d51fb 100644
--- a/tests/timer.vty
+++ b/tests/timer.vty
@@ -34,6 +34,8 @@
net: X17 = 0 ms Rounding threshold for all_allocated:* rate counters: round up to the next counter increment after this many milliseconds. If set to half of X16 (or 0), employ the usual round() behavior: round up after half of a granularity period. If set to 1, behave like ceil(): already increment the counter immediately when all channels are allocated. If set >= X16, behave like floor(): only increment after a full X16 period of all channels being occupied. See also X16, X18 (default: 0 ms)
net: X18 = 60000 ms Forget-sum period for all_allocated:* rate counters: after this amount of idle time, forget internally cumulated time remainders. Zero to always keep remainders. See also X16, X17. (default: 60000 ms)
net: X25 = 5 s Timeout for initial user data after an MSC initiated an SCCP connection to the BSS (default: 5 s)
+net: X29 = 10 s Timeout for activating an lchan for handover (should be X5 + X6) (default: 10 s)
+net: X30 = 5 s Timeout for establishing new lchan at the end of handover (default: 5 s)
net: X3111 = 4 s Wait time after lchan was released in error (should be T3111 + 2s) (default: 4 s)
net: X3210 = 20 s After L3 Complete, wait for MSC to confirm (default: 20 s)
mgw: X2427 = 5 s timeout for MGCP response from MGW (default: 5 s)
@@ -88,6 +90,8 @@
net: X17 = 0 ms Rounding threshold for all_allocated:* rate counters: round up to the next counter increment after this many milliseconds. If set to half of X16 (or 0), employ the usual round() behavior: round up after half of a granularity period. If set to 1, behave like ceil(): already increment the counter immediately when all channels are allocated. If set >= X16, behave like floor(): only increment after a full X16 period of all channels being occupied. See also X16, X18 (default: 0 ms)
net: X18 = 60000 ms Forget-sum period for all_allocated:* rate counters: after this amount of idle time, forget internally cumulated time remainders. Zero to always keep remainders. See also X16, X17. (default: 60000 ms)
net: X25 = 5 s Timeout for initial user data after an MSC initiated an SCCP connection to the BSS (default: 5 s)
+net: X29 = 10 s Timeout for activating an lchan for handover (should be X5 + X6) (default: 10 s)
+net: X30 = 5 s Timeout for establishing new lchan at the end of handover (default: 5 s)
net: X3111 = 4 s Wait time after lchan was released in error (should be T3111 + 2s) (default: 4 s)
net: X3210 = 20 s After L3 Complete, wait for MSC to confirm (default: 20 s)
mgw: X2427 = 5 s timeout for MGCP response from MGW (default: 5 s)
To view, visit change 30307. To unsubscribe, or for help writing mail filters, visit settings.