pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/40232?usp=email )
Change subject: sccp: Drop error logging for expected scenario
......................................................................
sccp: Drop error logging for expected scenario
The CN is free to release the SCCP conn at any point through an RLSD,
eg. because the end user on the other side decided to do so.
This was spotted in a osmo-hnbgw deployed in production, where the CN is
sometimes not answering the SCCP-CR[RANAP["Activate PDP Context Req"]]
(only answering with CC but never answering the DTAP on the upper layers).
As a result, most probably the peer times out and decides to
unilaterally release the SCCP conn.
Related: SYS#7454
Change-Id: Ia0941574b05256d6e49babe58df59d938cf637a2
---
M src/osmo-hnbgw/context_map_sccp.c
1 file changed, 1 insertion(+), 3 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
diff --git a/src/osmo-hnbgw/context_map_sccp.c b/src/osmo-hnbgw/context_map_sccp.c
index 5ee584d..987e410 100644
--- a/src/osmo-hnbgw/context_map_sccp.c
+++ b/src/osmo-hnbgw/context_map_sccp.c
@@ -360,9 +360,7 @@
case MAP_SCCP_EV_RX_RELEASED:
ranap_msg = data;
- /* The CN sends an N-Disconnect (SCCP Released) out of the usual sequence. Not what we expected, but
- * handle it. */
- LOGPFSML(fi, LOGL_ERROR, "CN sends SCCP Released sooner than expected\n");
+ /* The CN sends an N-Disconnect (SCCP Released). */
handle_rx_sccp(fi, ranap_msg);
map_sccp_fsm_state_chg(MAP_SCCP_ST_DISCONNECTED);
return;
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40232?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Ia0941574b05256d6e49babe58df59d938cf637a2
Gerrit-Change-Number: 40232
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(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-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: laforge, neels.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/40232?usp=email )
Change subject: sccp: Drop error logging for expected scenario
......................................................................
Patch Set 1: Code-Review+2
(2 comments)
Patchset:
PS1:
Done
PS1:
> IMHO it would be great to have at least some kind of metric (rate_ctr) for those events
Done here: https://gerrit.osmocom.org/c/osmo-hnbgw/+/40248 sccp: Introduce rate counter CNLINK_CTR_SCCP_RLSD_CN_ORIGIN
merging this one to get rid of the error loggings already.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40232?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Ia0941574b05256d6e49babe58df59d938cf637a2
Gerrit-Change-Number: 40232
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(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-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 07 May 2025 17:23:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/40248?usp=email )
Change subject: sccp: Introduce rate counter CNLINK_CTR_SCCP_RLSD_CN_ORIGIN
......................................................................
sccp: Introduce rate counter CNLINK_CTR_SCCP_RLSD_CN_ORIGIN
In the general usual case we expect the CN to orderly tear down the conn
by sending a SCCP-DT[RANAP-Iu-ReleaseCommand], which HNB will answer
with RUA-Disconnect[RANAP-Iu-ReleaseComplete], which will trigger a RLC
HNBGW->CN and finally (in state WAIT_RLSD in context_map_sccp) we will
receive a RLSD.
The fact that the CN is unilaterally and directly tearing down the conn
at SCCP level may be useful to spot malfunctions at the CN (eg. SCCP
conn at CN timing out because it never answered the RANAP/DTAP on top,
etc), so it's a good thing to count.
Related: SYS#7454
Change-Id: Icc6d29192574536d3c954a06645f178fa66bff50
---
M include/osmocom/hnbgw/hnbgw_cn.h
M src/osmo-hnbgw/context_map_sccp.c
M src/osmo-hnbgw/hnbgw_cn.c
3 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/48/40248/1
diff --git a/include/osmocom/hnbgw/hnbgw_cn.h b/include/osmocom/hnbgw/hnbgw_cn.h
index 6299cde..917cc07 100644
--- a/include/osmocom/hnbgw/hnbgw_cn.h
+++ b/include/osmocom/hnbgw/hnbgw_cn.h
@@ -62,6 +62,7 @@
CNLINK_CTR_SCCP_N_DATA_IND,
CNLINK_CTR_SCCP_N_DISCONNECT_IND,
CNLINK_CTR_SCCP_N_PCSTATE_IND,
+ CNLINK_CTR_SCCP_RLSD_CN_ORIGIN,
/* Counters related to link selection from a CN pool. */
CNLINK_CTR_CNPOOL_SUBSCR_NEW,
diff --git a/src/osmo-hnbgw/context_map_sccp.c b/src/osmo-hnbgw/context_map_sccp.c
index 987e410..f0bbe1b 100644
--- a/src/osmo-hnbgw/context_map_sccp.c
+++ b/src/osmo-hnbgw/context_map_sccp.c
@@ -211,6 +211,7 @@
static void map_sccp_init_action(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct msgb *ranap_msg = NULL;
+ struct hnbgw_context_map *map = fi->priv;
switch (event) {
@@ -238,6 +239,7 @@
case MAP_SCCP_EV_RX_RELEASED:
/* SCCP RLSD received from CN. This will never happen since we haven't even asked for a connection, but
* for completeness: */
+ CNLINK_CTR_INC(map->cnlink, CNLINK_CTR_SCCP_RLSD_CN_ORIGIN);
map_sccp_fsm_state_chg(MAP_SCCP_ST_DISCONNECTED);
return;
@@ -283,6 +285,7 @@
ranap_msg = data;
/* SCCP RLSD received from CN. This will never happen since we haven't even received a Connection
* Confirmed, but for completeness: */
+ CNLINK_CTR_INC(map->cnlink, CNLINK_CTR_SCCP_RLSD_CN_ORIGIN);
handle_rx_sccp(fi, ranap_msg);
map_sccp_fsm_state_chg(MAP_SCCP_ST_DISCONNECTED);
return;
@@ -311,6 +314,7 @@
static void map_sccp_connected_action(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
+ struct hnbgw_context_map *map = fi->priv;
struct msgb *ranap_msg = NULL;
bool rua_disconnect_err_condition;
@@ -361,6 +365,7 @@
case MAP_SCCP_EV_RX_RELEASED:
ranap_msg = data;
/* The CN sends an N-Disconnect (SCCP Released). */
+ CNLINK_CTR_INC(map->cnlink, CNLINK_CTR_SCCP_RLSD_CN_ORIGIN);
handle_rx_sccp(fi, ranap_msg);
map_sccp_fsm_state_chg(MAP_SCCP_ST_DISCONNECTED);
return;
diff --git a/src/osmo-hnbgw/hnbgw_cn.c b/src/osmo-hnbgw/hnbgw_cn.c
index 372116b..b44c31c 100644
--- a/src/osmo-hnbgw/hnbgw_cn.c
+++ b/src/osmo-hnbgw/hnbgw_cn.c
@@ -482,6 +482,10 @@
"sccp:n_pcstate:ind",
"Received SCCP N-PCSTATE.ind"
},
+ [CNLINK_CTR_SCCP_RLSD_CN_ORIGIN] = {
+ "sccp:rlsd_cn_origin",
+ "Received unexpected SCCP RSLD originated unilaterally by CN"
+ },
/* Indicators for CN pool usage */
[CNLINK_CTR_CNPOOL_SUBSCR_NEW] = {
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40248?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Icc6d29192574536d3c954a06645f178fa66bff50
Gerrit-Change-Number: 40248
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/40243?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: Move SCCP prim handling to its own hnbgw_sccp.{c,h} file
......................................................................
Move SCCP prim handling to its own hnbgw_sccp.{c,h} file
Similar to what we already have for other protocols; helps properly
splitting logic per layer.
Change-Id: Idb45a25f7ff4bcd38ffd27bf1d3360b9d34149b3
---
M include/osmocom/hnbgw/Makefile.am
M include/osmocom/hnbgw/hnbgw.h
M include/osmocom/hnbgw/hnbgw_cn.h
A include/osmocom/hnbgw/hnbgw_sccp.h
M src/osmo-hnbgw/Makefile.am
M src/osmo-hnbgw/hnbgw_cn.c
A src/osmo-hnbgw/hnbgw_sccp.c
7 files changed, 432 insertions(+), 376 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/43/40243/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40243?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Idb45a25f7ff4bcd38ffd27bf1d3360b9d34149b3
Gerrit-Change-Number: 40243
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/40242?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: Split struct hnbgw_sccp_user allocation & setup to its own function
......................................................................
Split struct hnbgw_sccp_user allocation & setup to its own function
Preparation for follow-up commit splitting whole SCCP handling to its
own file.
Change-Id: I04c36bc0193554fcaf6be5e20573052c421af49d
---
M src/osmo-hnbgw/hnbgw_cn.c
1 file changed, 56 insertions(+), 49 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/42/40242/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40242?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I04c36bc0193554fcaf6be5e20573052c421af49d
Gerrit-Change-Number: 40242
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder