pespin submitted this change.

View Change

Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified
m3ua: Forward SCON messages in SG role

The rx handler for SG role was missing to call the already existing code
to propagate state of congestion state towards ASP peers.
Spec references to the feature are added in place in the code.

Change-Id: Ic68345688d39f5430c30e156b94b1501d77e388c
---
M src/m3ua.c
M src/xua_snm.c
2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/src/m3ua.c b/src/m3ua.c
index 4af17a9..8c30775 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -1058,15 +1058,32 @@
* xua is owned by parent call m3ua_rx_snm() */
static int m3ua_rx_snm_sg(struct osmo_ss7_asp *asp, struct xua_msg *xua)
{
+ struct osmo_ss7_as *as = NULL;
+ struct xua_msg_part *rctx_ie;
+ int rc = 0;
+
switch (xua->hdr.msg_type) {
- case M3UA_SNM_DAUD: /* Audit: ASP inquires about availability of Point Codes */
+ case M3UA_SNM_SCON:
+ /* RFC4666 1.4.6: "The M3UA layer at an ASP or IPSP MAY indicate local congestion
+ * to an M3UA peer with an SCON message."
+ * RFC4666 3.4.4: The SCON message MAY also be sent from the M3UA layer of an ASP
+ * to an M3UA peer, indicating that the congestion level of the M3UA layer or the
+ * ASP has changed.*/
+ rctx_ie = xua_msg_find_tag(xua, M3UA_IEI_ROUTE_CTX);
+ rc = xua_find_as_for_asp(&as, asp, rctx_ie);
+ if (rc)
+ return rc;
+ xua_snm_rx_scon(asp, as, xua);
+ break;
+ case M3UA_SNM_DAUD:
+ /* Audit: ASP inquires about availability of Point Codes */
xua_snm_rx_daud(asp, xua);
break;
default:
return M3UA_ERR_UNSUPP_MSG_TYPE;
}

- return 0;
+ return rc;
}

/* received SNM message
diff --git a/src/xua_snm.c b/src/xua_snm.c
index eda03c9..344cc63 100644
--- a/src/xua_snm.c
+++ b/src/xua_snm.c
@@ -339,9 +339,13 @@
uint32_t rctx[OSMO_SS7_MAX_RCTX_COUNT];
unsigned int num_rctx;

- /* TODO: How to translate to MTP and towards SCCP (create N-PCSTATE.ind to SCU) */
+ /* TODO: Translate to MTP-STATUS.ind towards SCCP (will create N-PCSTATE.ind to SCU) */

- /* inform remote ASPs via SCON */
+ /* RFC4666 1.4.6: "When an SG receives a congestion message (SCON) from an ASP and the SG
+ * determines that an SPMC is now encountering congestion, it MAY trigger SS7 MTP3 Transfer
+ * Controlled management messages to concerned SS7 destinations according to congestion
+ * procedures of the relevant MTP3 standard."
+ * ie. inform remote ASPs via SCON: */
llist_for_each_entry(asp, &s7i->asp_list, list) {
/* SSNM is only permitted for ASPs in ACTIVE state */
if (!osmo_ss7_asp_active(asp))

To view, visit change 41091. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ic68345688d39f5430c30e156b94b1501d77e388c
Gerrit-Change-Number: 41091
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>