Change in libosmocore[master]: gprs_ns2_vc_fsm: In IP-SNS/ALIVE mode, initial state is ALIVE/UNBLOCKED

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

laforge gerrit-no-reply at lists.osmocom.org
Tue Mar 23 10:58:40 UTC 2021


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/23468 )


Change subject: gprs_ns2_vc_fsm: In IP-SNS/ALIVE mode, initial state is ALIVE/UNBLOCKED
......................................................................

gprs_ns2_vc_fsm: In IP-SNS/ALIVE mode, initial state is ALIVE/UNBLOCKED

Only when the ALIVE procedure fails, we mark a NS-VC as RECOVERING.

Change-Id: Ieb860827c2149306b135c0e6c8b3cd3bbb78851e
---
M src/gb/gprs_ns2_vc_fsm.c
1 file changed, 5 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/68/23468/1

diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c
index cca724f..48680a5 100644
--- a/src/gb/gprs_ns2_vc_fsm.c
+++ b/src/gb/gprs_ns2_vc_fsm.c
@@ -245,7 +245,9 @@
 	case GPRS_NS2_EV_REQ_START:
 		switch (priv->nsvc->mode) {
 		case GPRS_NS2_VC_MODE_ALIVE:
-			osmo_fsm_inst_state_chg(fi, GPRS_NS2_ST_RECOVERING, nsi->timeout[NS_TOUT_TNS_ALIVE], NS_TOUT_TNS_ALIVE);
+			/* In IP-SNS, the NS-VC are assumed initially alive, until the alive
+			 * procedure should fail at some future point */
+			osmo_fsm_inst_state_chg(fi, GPRS_NS2_ST_UNBLOCKED, 0, 0);
 			break;
 		case GPRS_NS2_VC_MODE_BLOCKRESET:
 			osmo_fsm_inst_state_chg(fi, GPRS_NS2_ST_RESET, nsi->timeout[NS_TOUT_TNS_RESET], NS_TOUT_TNS_RESET);
@@ -428,17 +430,13 @@
 
 	ns2_tx_alive(priv->nsvc);
 	ns2_nse_notify_unblocked(priv->nsvc, false);
-}
-
-static void ns2_st_alive_onleave(struct osmo_fsm_inst *fi, uint32_t next_state)
-{
-	start_test_procedure(fi->priv);
+	start_test_procedure(priv);
 }
 
 static const struct osmo_fsm_state ns2_vc_states[] = {
 	[GPRS_NS2_ST_UNCONFIGURED] = {
 		.in_event_mask = S(GPRS_NS2_EV_REQ_START),
-		.out_state_mask = S(GPRS_NS2_ST_RESET) | S(GPRS_NS2_ST_RECOVERING),
+		.out_state_mask = S(GPRS_NS2_ST_RESET) | S(GPRS_NS2_ST_UNBLOCKED),
 		.name = "UNCONFIGURED",
 		.action = ns2_st_unconfigured,
 		.onenter = ns2_st_unconfigured_onenter,
@@ -483,7 +481,6 @@
 		.name = "RECOVERING",
 		.action = ns2_st_alive,
 		.onenter = ns2_st_alive_onenter,
-		.onleave = ns2_st_alive_onleave,
 	},
 };
 

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ieb860827c2149306b135c0e6c8b3cd3bbb78851e
Gerrit-Change-Number: 23468
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210323/6776c690/attachment.htm>


More information about the gerrit-log mailing list