aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-04-14 12:10:11 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-04-14 12:14:52 +0200
commit3caa7f6d97c3c7fec6535585b502d05ca04217b6 (patch)
treeae1573a5ed2fdae706083c7450fbf7887def68e2
parent223754fde5cf1b8720232b0185faa3c4d940e5a7 (diff)
Iu: Drop timer X3314
This Iu timer is Osmocom specific, but is made to resemble T3314 timer from GERAN (also named READY timer). The idea of this activity timer was to arm it whenever PMM state transitions to CONNECTED, and then rearm it every time there's some sort of activity, until there's none for some time, then we send a Release Command to close the conn with the HNGBW/RNC. That's the same principle as per spec-defined READY timer T3314. However, there's still a fundamental problem with it: GTP-U in GERAN passes through the SGSN, but in UTRAN, the GTP-U stream goes directly from the HnodeB to the GGSN. Hence, there's no proper way to re-arm this timer upon activity in UTRAN, basically because the SGSN will never see (userplane data) activity. That explains why the E_MM_PDU_RECEPTION event exists for mm_state_gb_fsm, but doesn't exist for mm_state_iu_fsm. As a result, the timer is currently never rearmed, which means it will transition to IDLE always after 44 seconds (default value) once it went into CONNECTED state. In UTRAN, there is a SCCP connection for each subscriber between RNC/hNB and SGSN. If the subscriber is no longer in the respective state, the RNC/hNB should release that IuPS SCCP connection, whcih in turn means the SGSN cleans up its state. Furthermore, SCCP has a built-in IT (inactivity timer). So should the RNC/hNB die, that timer would time out, and the SGSN-side local SCCP stack (provider) wold send a RELEASE.ind for that connection to the user (SGSN). TLDR; this timer is not really needed and cannot be implemented properly in UTRAN, so let's remove it. Related: OS#5116 Change-Id: Ibc71829e417bf2dd0c27deb842369dd4f17010d6
-rw-r--r--include/osmocom/sgsn/gprs_mm_state_iu_fsm.h1
-rw-r--r--src/sgsn/gprs_mm_state_iu_fsm.c30
-rw-r--r--src/sgsn/sgsn_vty.c1
-rw-r--r--tests/osmo-sgsn_test-nodes.vty1
4 files changed, 5 insertions, 28 deletions
diff --git a/include/osmocom/sgsn/gprs_mm_state_iu_fsm.h b/include/osmocom/sgsn/gprs_mm_state_iu_fsm.h
index 05342f9fb..7f02bcc45 100644
--- a/include/osmocom/sgsn/gprs_mm_state_iu_fsm.h
+++ b/include/osmocom/sgsn/gprs_mm_state_iu_fsm.h
@@ -19,7 +19,6 @@ enum mm_state_iu_fsm_events {
E_PMM_PS_CONN_ESTABLISH,
E_PMM_IMPLICIT_DETACH, /* = E_PS_ATTACH_REJECT, E_RAU_REJECT */
E_PMM_RA_UPDATE, /* = Serving RNC relocation */
- E_PMM_USER_INACTIVITY, /* when the inactivity timer runs out */
};
extern struct osmo_fsm mm_state_iu_fsm;
diff --git a/src/sgsn/gprs_mm_state_iu_fsm.c b/src/sgsn/gprs_mm_state_iu_fsm.c
index 7f2d3b4d3..91c979008 100644
--- a/src/sgsn/gprs_mm_state_iu_fsm.c
+++ b/src/sgsn/gprs_mm_state_iu_fsm.c
@@ -12,8 +12,7 @@
static const struct osmo_tdef_state_timeout mm_state_iu_fsm_timeouts[32] = {
[ST_PMM_DETACHED] = { },
- /* non-spec -T3314 (User inactivity timer) */
- [ST_PMM_CONNECTED] = { .T=-3314 },
+ [ST_PMM_CONNECTED] = { },
[ST_PMM_IDLE] = { },
};
@@ -48,10 +47,6 @@ static void st_pmm_detached(struct osmo_fsm_inst *fi, uint32_t event, void *data
static void st_pmm_connected(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct sgsn_mm_ctx *ctx = fi->priv;
- const struct RANAP_Cause user_inactive_cause = {
- .present = RANAP_Cause_PR_radioNetwork,
- .choice.radioNetwork = RANAP_CauseRadioNetwork_user_inactivity,
- };
switch(event) {
case E_PMM_PS_CONN_RELEASE:
@@ -62,9 +57,6 @@ static void st_pmm_connected(struct osmo_fsm_inst *fi, uint32_t event, void *dat
sgsn_ranap_iu_release_free(ctx, NULL);
mm_state_iu_fsm_state_chg(fi, ST_PMM_DETACHED);
break;
- case E_PMM_USER_INACTIVITY:
- sgsn_ranap_iu_release_free(ctx, &user_inactive_cause);
- break;
case E_PMM_RA_UPDATE:
break;
}
@@ -90,18 +82,6 @@ static void st_pmm_idle(struct osmo_fsm_inst *fi, uint32_t event, void *data)
}
}
-static int pmm_state_fsm_timer_cb(struct osmo_fsm_inst *fi)
-{
- switch(fi->state) {
- case ST_PMM_CONNECTED:
- /* timer for pmm state. state=CONNECTED: -T3314 (User inactivity timer) */
- osmo_fsm_inst_dispatch(fi, E_PMM_USER_INACTIVITY, NULL);
- break;
- }
-
- return 0;
-}
-
static struct osmo_fsm_state mm_state_iu_fsm_states[] = {
[ST_PMM_DETACHED] = {
.in_event_mask = X(E_PMM_PS_ATTACH) | X(E_PMM_IMPLICIT_DETACH),
@@ -110,8 +90,10 @@ static struct osmo_fsm_state mm_state_iu_fsm_states[] = {
.action = st_pmm_detached,
},
[ST_PMM_CONNECTED] = {
- .in_event_mask = X(E_PMM_PS_CONN_RELEASE) | X(E_PMM_RA_UPDATE)
- | X(E_PMM_IMPLICIT_DETACH) | X(E_PMM_USER_INACTIVITY),
+ .in_event_mask =
+ X(E_PMM_PS_CONN_RELEASE) |
+ X(E_PMM_RA_UPDATE) |
+ X(E_PMM_IMPLICIT_DETACH),
.out_state_mask = X(ST_PMM_DETACHED) | X(ST_PMM_IDLE),
.name = "Connected",
.action = st_pmm_connected,
@@ -134,7 +116,6 @@ const struct value_string mm_state_iu_fsm_event_names[] = {
OSMO_VALUE_STRING(E_PMM_PS_CONN_ESTABLISH),
OSMO_VALUE_STRING(E_PMM_IMPLICIT_DETACH),
OSMO_VALUE_STRING(E_PMM_RA_UPDATE),
- OSMO_VALUE_STRING(E_PMM_USER_INACTIVITY),
{ 0, NULL }
};
@@ -143,7 +124,6 @@ struct osmo_fsm mm_state_iu_fsm = {
.states = mm_state_iu_fsm_states,
.num_states = ARRAY_SIZE(mm_state_iu_fsm_states),
.event_names = mm_state_iu_fsm_event_names,
- .timer_cb = pmm_state_fsm_timer_cb,
.log_subsys = DMM,
};
diff --git a/src/sgsn/sgsn_vty.c b/src/sgsn/sgsn_vty.c
index d7584bcb4..042bad5f3 100644
--- a/src/sgsn/sgsn_vty.c
+++ b/src/sgsn/sgsn_vty.c
@@ -110,7 +110,6 @@ static struct osmo_tdef sgsn_T_defs[] = {
/* non spec timers */
{ .T=-1001, .default_val=NONSPEC_X1001_SECS, .desc="RANAP Release timeout. Wait for RANAP Release Complete."
"On expiry release Iu connection (s)" },
- { .T=-3314, .default_val=GSM0408_T3314_SECS, .desc="Iu User inactivity timer. On expiry release Iu connection (s)" },
{}
};
diff --git a/tests/osmo-sgsn_test-nodes.vty b/tests/osmo-sgsn_test-nodes.vty
index 109e2ece2..953a30ecd 100644
--- a/tests/osmo-sgsn_test-nodes.vty
+++ b/tests/osmo-sgsn_test-nodes.vty
@@ -13,7 +13,6 @@ T3386 = 8 s Wait for MODIFY PDP CTX ACK timer (s) (default: 8 s)
T3395 = 8 s Wait for DEACT PDP CTX ACK timer (s) (default: 8 s)
T3397 = 8 s Wait for DEACT AA PDP CTX ACK timer (s) (default: 8 s)
X1001 = 5 s RANAP Release timeout. Wait for RANAP Release Complete.On expiry release Iu connection (s) (default: 5 s)
-X3314 = 44 s Iu User inactivity timer. On expiry release Iu connection (s) (default: 44 s)
OsmoSGSN# configure terminal
OsmoSGSN(config)# list
...