Change in osmo-bsc[master]: bssap: do not send a Clear Request after a Clear Command

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

neels gerrit-no-reply at lists.osmocom.org
Sun Aug 30 00:20:39 UTC 2020


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/19899 )


Change subject: bssap: do not send a Clear Request after a Clear Command
......................................................................

bssap: do not send a Clear Request after a Clear Command

During handover cleanup due to a Clear Command from the MSC, do not send
another Clear Request to the MSC. Only send that when no Clear Command was
received yet.

Add a flag rx_clear_command per gscon instance, indicating whether a Clear
Command was received, and exit early in gscon_bssmap_clear() when true.

This is part of patches fixing the rate counters around handover, which uncover
some bugs:
- Another patch enables proper handover result handling when receiving a Clear
  Command.
- After that, the handover_end() handling would always cause sending a Clear
  Request, even if a Clear Command was already received.
- This patch removes the extraneous Clear Request, for this scenario and for
  all other corner cases that might still exist.

Related: OS#4736
Change-Id: Iab82cac0a7ffa7d36338c8ff7c0618a813025f13
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/bsc_subscr_conn_fsm.c
2 files changed, 9 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/99/19899/1

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 09c0214..ca96c56 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -303,6 +303,8 @@
 
 	/* MS Power Class, TS 05.05 sec 4.1.1 "Mobile station". 0 means unset. */
 	uint8_t ms_power_class:3;
+
+	bool rx_clear_command;
 };
 
 
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 281ab71..e7c6efe 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -141,6 +141,11 @@
 	struct msgb *resp;
 	int rc;
 
+	if (conn->rx_clear_command) {
+		LOGPFSML(conn->fi, LOGL_DEBUG, "Not sending BSSMAP CLEAR REQUEST, already got CLEAR COMMAND from MSC\n");
+		return;
+	}
+
 	LOGPFSML(conn->fi, LOGL_DEBUG, "Tx BSSMAP CLEAR REQUEST(%s) to MSC\n", gsm0808_cause_name(cause));
 	resp = gsm0808_create_clear_rqst(cause);
 	if (!resp) {
@@ -764,6 +769,8 @@
 	/* Regular allstate event processing */
 	switch (event) {
 	case GSCON_EV_A_CLEAR_CMD:
+		conn->rx_clear_command = true;
+
 		OSMO_ASSERT(data);
 		ccd = data;
 		if (conn->lchan)

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iab82cac0a7ffa7d36338c8ff7c0618a813025f13
Gerrit-Change-Number: 19899
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200830/89fca02e/attachment.htm>


More information about the gerrit-log mailing list