Change in libosmocore[master]: ns2: status ind: add additional flags (first and persistent)

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

lynxis lazus gerrit-no-reply at lists.osmocom.org
Thu Oct 1 21:24:48 UTC 2020


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/20391 )


Change subject: ns2: status ind: add additional flags (first and persistent)
......................................................................

ns2: status ind: add additional flags (first and persistent)

Both flags are required to allow the NS user to sent BVC RESET for persistent NSE.
On persistent NSE with persistent NS alive configuration (no RESET/UNBLOCK/BLOCK) the
PCU can't detect if the SGSN has restartet or crashed.

Change-Id: Iaad7b53d44338e5dd81dc2202f23bdcb715af804
---
M include/osmocom/gprs/gprs_ns2.h
M src/gb/gprs_ns2.c
M src/gb/gprs_ns2_internal.h
3 files changed, 14 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/91/20391/1

diff --git a/include/osmocom/gprs/gprs_ns2.h b/include/osmocom/gprs/gprs_ns2.h
index 8048176..5cebf27 100644
--- a/include/osmocom/gprs/gprs_ns2.h
+++ b/include/osmocom/gprs/gprs_ns2.h
@@ -79,6 +79,12 @@
 			enum gprs_ns2_affecting_cause cause;
 			/* 48.016 5.2.2.6 transfer capability */
 			int transfer;
+			/* osmocom specific */
+			/* Persistent NSE/NSVC are configured by vty */
+			bool persistent;
+			/* Only true on the first time it's available.
+			 * Allow the BSSGP layer to reset persistent NSE */
+			bool first;
 		} status;
 	} u;
 };
diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 53500d1..aca8994 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -353,6 +353,8 @@
 	nsp.bvci = bvci;
 	nsp.u.status.cause = cause;
 	nsp.u.status.transfer = -1;
+	nsp.u.status.first = nse->first;
+	nsp.u.status.persistent = nse->persistent;
 	osmo_prim_init(&nsp.oph, SAP_NS, PRIM_NS_STATUS,
 			PRIM_OP_INDICATION, NULL);
 	nse->nsi->cb(&nsp.oph, nse->nsi->cb_data);
@@ -559,6 +561,7 @@
 
 	nse->nsei = nsei;
 	nse->nsi = nsi;
+	nse->first = true;
 	llist_add(&nse->list, &nsi->nse);
 	INIT_LLIST_HEAD(&nse->nsvc);
 
@@ -931,6 +934,7 @@
 		/* this is the first unblocked NSVC on an unavailable NSE */
 		nse->alive = true;
 		ns2_prim_status_ind(nse, 0, NS_AFF_CAUSE_RECOVERY);
+		nse->first = false;
 		return;
 	}
 
diff --git a/src/gb/gprs_ns2_internal.h b/src/gb/gprs_ns2_internal.h
index 1980ef8..3d0f96d 100644
--- a/src/gb/gprs_ns2_internal.h
+++ b/src/gb/gprs_ns2_internal.h
@@ -120,6 +120,10 @@
 	/*! true if this NSE was created by VTY or pcu socket) */
 	bool persistent;
 
+	/*! true if this NSE wasn't yet alive at all.
+	 * Will be true after the first status ind with NS_AFF_CAUSE_RECOVERY */
+	bool first;
+
 	/*! true if this NSE has at least one alive VC */
 	bool alive;
 

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iaad7b53d44338e5dd81dc2202f23bdcb715af804
Gerrit-Change-Number: 20391
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201001/b7269089/attachment.htm>


More information about the gerrit-log mailing list