Attention is currently required from: laforge.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/32041 )
Change subject: [RFC] drop list of HNBAP UE Context
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> I think this could have implications when we start to support things like SABP (Service Area Broadca […]
The point being, we don't use ue_context for active Iu connections.
This is some completely optional HNBAP, it has no effect on any RUA conns at all.
Actually I recently noticed, our ttcn3-hnbgw tests omit the HNBAP UE Register completely, they only do HNBAP HNB Register
On HNBAP UE Register, we store the allocated context id in a linked list.
On HNBAP UE De-Register, we always ACK that, and also drop the id from the list without caring whether it exists.
That is literally all that osmo-hnbgw does with the HNBAP UE Context.
So I guess we can apply this patch to completely drop ue_context in case that the ue_context leak situation continues to steal our time. Let's wait how the just merged patches turn out.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/32041
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Ida7eadf36abcf465ae40003725c49e8e321a28c9
Gerrit-Change-Number: 32041
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 28 Mar 2023 02:14:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/32038 )
Change subject: release UE Contexts on SCTP_RESTART
......................................................................
release UE Contexts on SCTP_RESTART
When receiving SCTP_RESTART for a given HNB, directly clear the UE
Contexts.
(The HNB typically connects via HNBAP shortly after this causing a UE
Context clearing too, but UE state should always be cleared on
SCTP_RESTART, no matter what.)
Change-Id: I583922193ba73e17ab85152005535188c2762b85
---
M src/osmo-hnbgw/hnbgw.c
1 file changed, 17 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c
index 5b4e9b6..0624803 100644
--- a/src/osmo-hnbgw/hnbgw.c
+++ b/src/osmo-hnbgw/hnbgw.c
@@ -264,6 +264,7 @@
case SCTP_RESTART:
LOGHNB(hnb, DMAIN, LOGL_NOTICE, "HNB SCTP conn RESTARTed, marking as HNBAP-unregistered\n");
hnb->hnb_registered = false;
+ hnb_context_release_ue_state(hnb);
/* The tx queue may be quite full after an SCTP RESTART: (SYS#6113)
* The link may have been flaky (a possible reason for the peer restarting the conn) and
* hence the kernel socket Tx queue may be full (no ACKs coming back) and our own userspace
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/32038
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I583922193ba73e17ab85152005535188c2762b85
Gerrit-Change-Number: 32038
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: merged
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/32037 )
Change subject: release UE Contexts on HNB (Re-)Register
......................................................................
release UE Contexts on HNB (Re-)Register
Whenever a HNB reconnects, we want to discard all previous UE state and
any active connections.
In one HNB reconnect scenario, we receive SCTP_RESTART. This sets
hnb_registered == false, which in turn skipped the UE cleanup step in
hnbgw_rx_hnb_register_req(), leaking UE Contexts.
Remove all weird conditions like that, and simply clear out all UE state
whenever a HNB registers, period.
Change-Id: I370966d2d76fd263714e727918fcc1ea2f2315fa
---
M src/osmo-hnbgw/hnbgw_hnbap.c
1 file changed, 24 insertions(+), 7 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/osmo-hnbgw/hnbgw_hnbap.c b/src/osmo-hnbgw/hnbgw_hnbap.c
index 19ebd38..a1cbec5 100644
--- a/src/osmo-hnbgw/hnbgw_hnbap.c
+++ b/src/osmo-hnbgw/hnbgw_hnbap.c
@@ -469,13 +469,11 @@
ctx->identity_info, ctx->id.mcc, ctx->id.mnc, ctx->id.lac, ctx->id.rac, ctx->id.sac, ctx->id.cid,
name, ctx->hnb_registered ? " (re-connecting)" : "");
- if (ctx->hnb_registered) {
- /* The HNB is already registered, and we are seeing a new HNB Register Request. The HNB has restarted
- * without us noticing. Clearly, the HNB does not expect any UE state to be active here, so discard any
- * UE contexts and SCCP connections associated with this HNB. */
- LOGHNB(ctx, DHNBAP, LOGL_NOTICE, "HNB reconnecting, discarding all previous UE state\n");
- hnb_context_release_ue_state(ctx);
- }
+ /* The HNB is already registered, and we are seeing a new HNB Register Request. The HNB has restarted
+ * without us noticing. Clearly, the HNB does not expect any UE state to be active here, so discard any
+ * UE contexts and SCCP connections associated with this HNB. */
+ LOGHNB(ctx, DHNBAP, LOGL_NOTICE, "HNB (re)connecting, discarding all previous UE state\n");
+ hnb_context_release_ue_state(ctx);
ctx->hnb_registered = true;
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/32037
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I370966d2d76fd263714e727918fcc1ea2f2315fa
Gerrit-Change-Number: 32037
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: merged
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/32036 )
Change subject: map_sccp: on timeout during WAIT_CC, send N-DISCONNECT to SCCP-SCOC
......................................................................
map_sccp: on timeout during WAIT_CC, send N-DISCONNECT to SCCP-SCOC
When waiting for CC expires, we should tell the SCCP-SCOC that we've
stopped waiting: send N-DISCONNECT, instead of nothing.
Change-Id: Ie94fcee4e2507a55449050aab96307199aed99a2
---
M src/osmo-hnbgw/context_map_sccp.c
1 file changed, 16 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, but someone else must approve
neels: Looks good to me, approved
diff --git a/src/osmo-hnbgw/context_map_sccp.c b/src/osmo-hnbgw/context_map_sccp.c
index deb6e0f..cea0817 100644
--- a/src/osmo-hnbgw/context_map_sccp.c
+++ b/src/osmo-hnbgw/context_map_sccp.c
@@ -442,11 +442,13 @@
/* Return 1 to terminate FSM instance, 0 to keep running */
switch (fi->state) {
case MAP_SCCP_ST_INIT:
- case MAP_SCCP_ST_WAIT_CC:
- /* cannot sent SCCP RLSD, because the other side hasn't responded with the remote reference. */
+ /* cannot sent SCCP RLSD, because we haven't set up an SCCP link */
map_sccp_fsm_state_chg(MAP_SCCP_ST_DISCONNECTED);
return 0;
+ case MAP_SCCP_ST_WAIT_CC:
+ /* send N-DISCONNECT. libosmo-sigtran/sccp_scoc.c will do the SCCP connection cleanup, like waiting a
+ * bit whether the SCCP CC might still arrive, and cleanup the conn if not. */
case MAP_SCCP_ST_CONNECTED:
case MAP_SCCP_ST_WAIT_RLSD:
/* send SCCP RLSD. libosmo-sigtran/sccp_scoc.c will do the SCCP connection cleanup.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/32036
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Ie94fcee4e2507a55449050aab96307199aed99a2
Gerrit-Change-Number: 32036
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: laforge.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/32036 )
Change subject: map_sccp: on timeout during WAIT_CC, send N-DISCONNECT to SCCP-SCOC
......................................................................
Patch Set 2: Code-Review+2
(2 comments)
Patchset:
PS2:
> I'm actually wondering why we have such a state to begin with? Isn't it the job of the SCCP provide […]
yes, after the FSMs were merged, it has already occurred to me that the new code could/should have relied more on sccp_scoc.c timeouts that are already in place, instead of "duplicating" SCCP states. Now the code is there and works correctly... maybe i can take another look some time.
PS2:
combine votes
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/32036
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Ie94fcee4e2507a55449050aab96307199aed99a2
Gerrit-Change-Number: 32036
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 28 Mar 2023 02:04:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32093 )
Change subject: Replace explicit gsm_lchan_name() calls with LOGPLCHAN
......................................................................
Patch Set 1:
(4 comments)
File src/common/rsl.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5484):
https://gerrit.osmocom.org/c/osmo-bts/+/32093/comment/be654ccb_6fd417be
PS1, Line 3298: gsm_pchan_name(ts->pchan), pdch_act? "PDCH" : "TCH/F", ts->flags);
spaces required around that '?' (ctx:VxW)
File src/osmo-bts-lc15/oml.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5484):
https://gerrit.osmocom.org/c/osmo-bts/+/32093/comment/ba488bd5_770ecb3d
PS1, Line 937: LOGPLCHAN(lchan, DL1C, LOGL_INFO, "%s tch_mode=0x%02x\n", __FUNCTION__, lchan->tch_mode);
__func__ should be used instead of gcc specific __FUNCTION__
File src/osmo-bts-oc2g/oml.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5484):
https://gerrit.osmocom.org/c/osmo-bts/+/32093/comment/4ba0608a_8b1db3b7
PS1, Line 952: LOGPLCHAN(lchan, DL1C, LOGL_INFO, "%s tch_mode=0x%02x\n", __FUNCTION__, lchan->tch_mode);
__func__ should be used instead of gcc specific __FUNCTION__
File src/osmo-bts-sysmo/oml.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5484):
https://gerrit.osmocom.org/c/osmo-bts/+/32093/comment/a551c51d_46b38895
PS1, Line 945: __FUNCTION__, lchan->tch_mode);
__func__ should be used instead of gcc specific __FUNCTION__
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32093
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: If4f4f555f5ca61dfa624b298805f5375efc0b137
Gerrit-Change-Number: 32093
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Tue, 28 Mar 2023 01:29:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment