Change in osmo-pcu[master]: NACC: Configure neighbor and SI resolution timeout values

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
Fri Jan 29 14:05:00 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/22450 )

Change subject: NACC: Configure neighbor and SI resolution timeout values
......................................................................

NACC: Configure neighbor and SI resolution timeout values

Upon timeout, we move directly to NACC_ST_TX_CELL_CHG_CONTINUE in order
to submit a Cell Change Continue against the MS without providing any
Packet Neighbor Cell Data beforehand, as per spec that's probably the
best we can do in this scenario (TS 44.060):
"""
1)  The network responds with a PACKET CELL CHANGE CONTINUE message.
If a mobile station as response to a PACKET CELL CHANGE NOTIFICATION
message receives a PACKET CELL CHANGE CONTINUE message without receiving
any neighbour cell system information, the mobile station shall stop timer
T3208, stop timer T3210 if still running, leave CCN mode and continue cell
reselection in NC0/NC1 mode.
"""

Related: SYS#4909
Change-Id: Ia9932ab082ec095294e85dc4d532046970e17986
---
M src/gprs_pcu.c
M src/gprs_pcu.h
M src/nacc_fsm.c
3 files changed, 37 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, but someone else must approve



diff --git a/src/gprs_pcu.c b/src/gprs_pcu.c
index 31ed8b7..554007e 100644
--- a/src/gprs_pcu.c
+++ b/src/gprs_pcu.c
@@ -33,6 +33,8 @@
 	{ .T=1,     .default_val=30,  .unit=OSMO_TDEF_S,  .desc="BSSGP (un)blocking procedures timer (s)",  .val=0 },
 	{ .T=2,     .default_val=30,  .unit=OSMO_TDEF_S,  .desc="BSSGP reset procedure timer (s)",          .val=0 },
 	{ .T=3190,  .default_val=5,   .unit=OSMO_TDEF_S,  .desc="Return to packet idle mode after Packet DL Assignment on CCCH (s)", .val=0},
+	{ .T=PCU_TDEF_NEIGH_RESOLVE_TO,    .default_val=1000,  .unit=OSMO_TDEF_MS,   .desc="[ARFCN+BSIC]->[RAC+CI] resolution timeout (ms)", .val=0 },
+	{ .T=PCU_TDEF_SI_RESOLVE_TO,	   .default_val=1000,  .unit=OSMO_TDEF_MS,   .desc="RIM RAN-INFO response timeout (ms)",	    .val=0 },
 	{ .T=PCU_TDEF_NEIGH_CACHE_ALIVE,   .default_val=5,  .unit=OSMO_TDEF_S,   .desc="[ARFCN+BSIC]->[RAC+CI] resolution cache entry storage timeout (s)", .val=0 },
 	{ .T=PCU_TDEF_SI_CACHE_ALIVE,      .default_val=5,  .unit=OSMO_TDEF_S,   .desc="[RAC+CI]->[SI] resolution cache entry storage timeout (s)", .val=0 },
 	{ .T=-2000, .default_val=2,   .unit=OSMO_TDEF_MS, .desc="Tbf reject for PRR timer (ms)",            .val=0 },
diff --git a/src/gprs_pcu.h b/src/gprs_pcu.h
index 4f22f68..9f75fb8 100644
--- a/src/gprs_pcu.h
+++ b/src/gprs_pcu.h
@@ -37,6 +37,8 @@
 #define MAX_EDGE_MCS 9
 #define MAX_GPRS_CS 4
 
+#define PCU_TDEF_NEIGH_RESOLVE_TO (-1)
+#define PCU_TDEF_SI_RESOLVE_TO (-2)
 #define PCU_TDEF_NEIGH_CACHE_ALIVE (-10)
 #define PCU_TDEF_SI_CACHE_ALIVE    (-11)
 
diff --git a/src/nacc_fsm.c b/src/nacc_fsm.c
index 5e8d51b..85e29c5 100644
--- a/src/nacc_fsm.c
+++ b/src/nacc_fsm.c
@@ -40,8 +40,24 @@
 
 #define X(s) (1 << (s))
 
+static const struct osmo_tdef_state_timeout nacc_fsm_timeouts[32] = {
+	[NACC_ST_INITIAL] = {},
+	[NACC_ST_WAIT_RESOLVE_RAC_CI] = { .T = PCU_TDEF_NEIGH_RESOLVE_TO },
+	[NACC_ST_WAIT_REQUEST_SI] = { .T = PCU_TDEF_SI_RESOLVE_TO },
+	[NACC_ST_TX_NEIGHBOUR_DATA] = {},
+	[NACC_ST_TX_CELL_CHG_CONTINUE] = {},
+	[NACC_ST_DONE] = {},
+};
+
+/* Transition to a state, using the T timer defined in assignment_fsm_timeouts.
+ * The actual timeout value is in turn obtained from conn->T_defs.
+ * Assumes local variable fi exists. */
+
 #define nacc_fsm_state_chg(fi, NEXT_STATE) \
-	osmo_fsm_inst_state_chg(fi, NEXT_STATE, 0, 0)
+	osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \
+				     nacc_fsm_timeouts, \
+				     ((struct nacc_fsm_ctx*)(fi->priv))->ms->bts->pcu->T_defs, \
+				     -1)
 
 const struct value_string nacc_fsm_event_names[] = {
 	{ NACC_EV_RX_CELL_CHG_NOTIFICATION, "RX_CELL_CHG_NOTIFICATION" },
@@ -469,6 +485,17 @@
 	talloc_free(ctx);
 }
 
+static int nacc_fsm_timer_cb(struct osmo_fsm_inst *fi)
+{
+	switch (fi->T) {
+	case PCU_TDEF_NEIGH_RESOLVE_TO:
+	case PCU_TDEF_SI_RESOLVE_TO:
+		nacc_fsm_state_chg(fi, NACC_ST_TX_CELL_CHG_CONTINUE);
+		break;
+	}
+	return 0;
+}
+
 static struct osmo_fsm_state nacc_fsm_states[] = {
 	[NACC_ST_INITIAL] = {
 		.in_event_mask =
@@ -482,7 +509,8 @@
 		.in_event_mask =
 			X(NACC_EV_RX_RAC_CI),
 		.out_state_mask =
-			X(NACC_ST_WAIT_REQUEST_SI),
+			X(NACC_ST_WAIT_REQUEST_SI) |
+			X(NACC_ST_TX_CELL_CHG_CONTINUE),
 		.name = "WAIT_RESOLVE_RAC_CI",
 		.onenter = st_wait_resolve_rac_ci_on_enter,
 		.action = st_wait_resolve_rac_ci,
@@ -492,7 +520,8 @@
 			X(NACC_EV_RX_CELL_CHG_NOTIFICATION) |
 			X(NACC_EV_RX_SI),
 		.out_state_mask =
-			X(NACC_ST_TX_NEIGHBOUR_DATA),
+			X(NACC_ST_TX_NEIGHBOUR_DATA) |
+			X(NACC_ST_TX_CELL_CHG_CONTINUE),
 		.name = "WAIT_REQUEST_SI",
 		.onenter = st_wait_request_si_on_enter,
 		.action = st_wait_request_si,
@@ -529,6 +558,7 @@
 	.name = "NACC",
 	.states = nacc_fsm_states,
 	.num_states = ARRAY_SIZE(nacc_fsm_states),
+	.timer_cb = nacc_fsm_timer_cb,
 	.cleanup = nacc_fsm_cleanup,
 	.log_subsys = DNACC,
 	.event_names = nacc_fsm_event_names,

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ia9932ab082ec095294e85dc4d532046970e17986
Gerrit-Change-Number: 22450
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210129/3416a32b/attachment.htm>


More information about the gerrit-log mailing list