Change in osmo-sgsn[master]: Send a BVC-RESET to all presistent Gb interfaces at start-up

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
Fri Jun 26 14:20:52 UTC 2020


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


Change subject: Send a BVC-RESET to all presistent Gb interfaces at start-up
......................................................................

Send a BVC-RESET to all presistent Gb interfaces at start-up

3GPP TS 48.018 Section 8.4:

> After any failure affecting the NSE, the party (BSS or SGSN) where
> the failure resided shall reset the signalling BVC. After sending or
> receiving a BVC-RESET PDU for the signalling BVC, the BSS shall stop all
> traffic and initiate the BVC-RESET procedure for all BVCs corresponding
> to PTP functional entities of the underlying network service entity. The
> BSS must complete the BVC-RESET procedure for signalling BVC before
> starting PTP BVC-RESET procedures.

TODO: We should not just trigger a single outbound BVC-RESET message,
but we should re-transmit them until we get a response.   This would
likely entail adding FSMs to libosmogb, which we will leave for a later
point - it's anticipated that the NS + BSSGP code is undergoing quite
some changes in the coming months anyway, so leave it for then.

Change-Id: I0b46035b40709c38bb9ab9493c11031a577e3ee0
Closes: OS#4629
Depends: libosmocore.git I353adc1aa72377f7d4b3336d2ff47791fb73d62c
---
M src/sgsn/sgsn_main.c
1 file changed, 20 insertions(+), 0 deletions(-)



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

diff --git a/src/sgsn/sgsn_main.c b/src/sgsn/sgsn_main.c
index 3b18b05..5b53815 100644
--- a/src/sgsn/sgsn_main.c
+++ b/src/sgsn/sgsn_main.c
@@ -42,6 +42,7 @@
 
 #include <osmocom/gprs/gprs_ns.h>
 #include <osmocom/gprs/gprs_bssgp.h>
+#include <osmocom/gprs/gprs_bssgp_bss.h>
 
 #include <osmocom/vty/telnet_interface.h>
 #include <osmocom/vty/logging.h>
@@ -199,6 +200,23 @@
 #endif
 }
 
+static void bvc_reset_persistent_nsvcs(void)
+{
+	/* Send BVC-RESET on all persistent NSVCs */
+	struct gprs_nsvc *nsvc;
+
+	llist_for_each_entry(nsvc, &sgsn_nsi->gprs_nsvcs, list) {
+		struct bssgp_bvc_ctx bctx = {
+			.nsei = nsvc->nsei,
+		};
+		if (!nsvc->persistent)
+			continue;
+		/* if it is not marked ALIVE, we cannot send any data over it. */
+		nsvc->state |= NSE_S_ALIVE;
+		bssgp_tx_bvc_reset2(&bctx, BVCI_SIGNALLING, BSSGP_CAUSE_EQUIP_FAIL, false);
+	}
+}
+
 static struct vty_app_info vty_info = {
 	.name 		= "OsmoSGSN",
 	.version	= PACKAGE_VERSION,
@@ -522,6 +540,8 @@
 	ranap_iu_init(tall_sgsn_ctx, DRANAP, "OsmoSGSN-IuPS", sccp, gsm0408_gprs_rcvmsg_iu, sgsn_ranap_iu_event);
 #endif
 
+	bvc_reset_persistent_nsvcs();
+
 	if (daemonize) {
 		rc = osmo_daemonize();
 		if (rc < 0) {

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I0b46035b40709c38bb9ab9493c11031a577e3ee0
Gerrit-Change-Number: 19027
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/20200626/340caa3d/attachment.htm>


More information about the gerrit-log mailing list