Change in osmo-sgsn[master]: Iu: Drop timer X3314

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/.

pespin gerrit-no-reply at lists.osmocom.org
Wed Apr 14 10:48:18 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/23747 )


Change subject: Iu: Drop timer X3314
......................................................................

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
---
M include/osmocom/sgsn/gprs_mm_state_iu_fsm.h
M src/sgsn/gprs_mm_state_iu_fsm.c
M src/sgsn/sgsn_vty.c
M tests/osmo-sgsn_test-nodes.vty
4 files changed, 5 insertions(+), 28 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/47/23747/1

diff --git a/include/osmocom/sgsn/gprs_mm_state_iu_fsm.h b/include/osmocom/sgsn/gprs_mm_state_iu_fsm.h
index 05342f9..7f02bcc 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 @@
 	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 7f2d3b4..91c9790 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_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 @@
 		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 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 @@
 		.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 @@
 	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 @@
 	.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 d7584bc..042bad5 100644
--- a/src/sgsn/sgsn_vty.c
+++ b/src/sgsn/sgsn_vty.c
@@ -110,7 +110,6 @@
 	/* 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 109e2ec..953a30e 100644
--- a/tests/osmo-sgsn_test-nodes.vty
+++ b/tests/osmo-sgsn_test-nodes.vty
@@ -13,7 +13,6 @@
 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
 ...

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/23747
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ibc71829e417bf2dd0c27deb842369dd4f17010d6
Gerrit-Change-Number: 23747
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210414/eb53dd80/attachment.htm>


More information about the gerrit-log mailing list