I thought the RAN should send a RLSD to the MSC, but 3GPP TS 48.006 (9.2
Connection release) is clear:

"The MSC sends a SCCP released message. This message shall not contain any user
data field."

So we do all of the Iu-ReleaseCommand and Iu-ReleaseComplete in N_DATA prims,
and only after that will the MSC send an SCCP RLSD.

So the new SCCP FSM in osmo-hnbgw doesn't stick around to wait for a RLC, it
sticks around to wait for a RLSD. libosmo-sigtran sends that up the sap as
N_DISCONNECT and takes care of the RLC implicitly.

~N


On Thu, Feb 16, 2023 at 05:28:04AM +0100, Neels Hofmeyr wrote:
> I'm trying to clean up the connection management in osmo-hnbgw.
> For that purpose I'd like to be notified of the SCCP RLC message:
> I'd like to free a HNB-to-CN / RUA-to-SCCP context mapping when the SCCP local
> reference becomes invalid.
> I kind of thought I would receive a OSMO_SCU_PRIM_N_DISCONNECT PRIM_OP_CONFIRM
> up the user_sap, but that's not happening.
> 
> I see the SCCP RLC logged like this:
> 
> 20230216042453894 DLSS7 DEBUG 0: asp-asp-clnt-OsmoHNBGW: xua_cli_read_cb(): 
> sctp_recvmsg() returned 40 (flags=0x80) (osmo_ss7.c:1906)
> 20230216042453894 DLM3UA DEBUG 0: asp-asp-clnt-OsmoHNBGW: Received M3UA 
> Message (XFER:DATA) (m3ua.c:714)
> 20230216042453894 DLM3UA DEBUG 0: asp-asp-clnt-OsmoHNBGW: m3ua_rx_xfer 
> (m3ua.c:543)
> 20230216042453894 DLM3UA DEBUG 0: asp-asp-clnt-OsmoHNBGW: m3ua_rx_xfer(): 
> M3UA data header: opc=188=0.23.4 dpc=189=0.23.5 (m3ua.c:566)
> 20230216042453894 DLSS7 DEBUG m3ua_hmdc_rx_from_l2(): found dpc=189=0.23.5 as 
> local (osmo_ss7_hmrt.c:276)
> 20230216042453894 DLSS7 DEBUG scrc_rx_mtp_xfer_ind_xua: 
> HDR=(CO:RELCO,V=0,LEN=0), PART(T=Destination Reference,L=4,D=000003f0), 
> PART(T=Source Reference,L=4,D=0073dcf0) (sccp_scrc.c:472)
> 20230216042453894 DLSCCP DEBUG Received CO:RELCO for local reference 1008 
> (sccp_scoc.c:1799)
> 20230216042453894 DLSCCP DEBUG SCCP-SCOC(1008)[0x612000008da0]{DISCONN_PEND}: 
> Received Event RCOC-RELEASE_COMPLETE.ind (sccp_scoc.c:1833)
> 20230216042453894 DLSCCP DEBUG SCCP-SCOC(1008)[0x612000008da0]{DISCONN_PEND}: 
> state_chg to IDLE (sccp_scoc.c:1309)
> 20230216042453894 DLSCCP DEBUG SCCP-SCOC(1008)[0x612000008da0]{IDLE}: 
> Terminating (cause = OSMO_FSM_TERM_REQUEST) (sccp_scoc.c:539)
> 20230216042453894 DLSCCP DEBUG SCCP-SCOC(1008)[0x612000008da0]{IDLE}: Freeing 
> instance (sccp_scoc.c:539)
> 20230216042453894 DLSCCP DEBUG SCCP-SCOC(1008)[0x612000008da0]{IDLE}: 
> Deallocated (fsm.c:568)
> 
> but nothing arrives at sccp_sap_up() in hnbgw_cn.c
> Is my idea flawed somehow, or is the prim dispatch missing in libosmo-sigtran?
> 
> Thanks!
> ~N

-- 
- Neels Hofmeyr <[email protected]>          http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschäftsführer / Managing Directors: Harald Welte
  • SCCP RLC Neels Hofmeyr
    • Re: SCCP RLC Neels Hofmeyr

Reply via email to