diff options
author | Harald Welte <laforge@osmocom.org> | 2021-12-09 21:58:18 +0100 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2021-12-15 20:20:30 +0000 |
commit | 7138913d664c33b2404e3d293ab820fb3516ff73 (patch) | |
tree | 17c7830de44f6ef87839fac66bac6a3520c98dfc | |
parent | 9e183726904c6cc2632186c523b0d58993fa287c (diff) |
Use alive-type components for "infrastructure" components
According to feedback received from TITAN developers in
https://www.eclipse.org/forums/index.php?t=msg&th=1106652&goto=1848616&#msg_1848616
the use of alive-type components has the following advantage:
> Also the DTE during the shutdown can be avoided to use alive type
> components. The test ports of the alive components are not
> disconnected/unmapped when the component finished only when killed or
> the MTC terminated.
So the idea of this patch is to use alive-type components for all the
underlying infrastructure, such as the *_Emulation_CT starting from M3UA
to SCCP and further up the stack. This way, only the MTC and the
highest level of components (such as ConnHdlr) remain as normal
components.
The hope is that using more alive-type components in the lower protocol
layer emulations will reduce the probability of DTE during shutdown if
some message is received during the component shutdown after the MTC
has completed.
Change-Id: I61d791d6d1bfe9226aabbe223baafc5f8f6d4f04
-rw-r--r-- | bsc/BSC_Tests.ttcn | 8 | ||||
-rw-r--r-- | gbproxy/GBProxy_Tests.ttcn | 8 | ||||
-rw-r--r-- | library/BSSAP_LE_Adapter.ttcn | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index c2ea258a..0c71581d 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -916,12 +916,12 @@ runs on test_CT { timer T := 10.0; clnt.id := "IPA" & int2str(i) & "-RSL"; - clnt.vc_IPA := IPA_Emulation_CT.create(clnt.id & "-IPA"); + clnt.vc_IPA := IPA_Emulation_CT.create(clnt.id & "-IPA") alive; clnt.ccm_pars := c_IPA_default_ccm_pars; clnt.ccm_pars.name := "Osmocom TTCN-3 BTS Simulator"; clnt.ccm_pars.unit_id := int2str(1234+i) & "/0/0"; if (handler_mode) { - clnt.vc_RSL := RSL_Emulation_CT.create(clnt.id & "-RSL"); + clnt.vc_RSL := RSL_Emulation_CT.create(clnt.id & "-RSL") alive; connect(clnt.vc_RSL:CCHAN_PT, self:RSL_CCHAN[i]); } @@ -1024,7 +1024,7 @@ function f_init_mgcp(charstring id) runs on test_CT { multi_conn_mode := (mp_bssap_cfg[0].transport == BSSAP_TRANSPORT_SCCPlite_SERVER) }; - vc_MGCP := MGCP_Emulation_CT.create(id); + vc_MGCP := MGCP_Emulation_CT.create(id) alive; vc_MGCP.start(MGCP_Emulation.main(ops, mgcp_pars, id)); } @@ -3569,7 +3569,7 @@ function f_ipa_unknown_unit_id(integer mp_bsc_ipa_port) runs on test_CT return b timer T := 10.0; bts[0].rsl.id := "IPA-0-RSL"; - bts[0].rsl.vc_IPA := IPA_Emulation_CT.create(bts[0].rsl.id & "-IPA"); + bts[0].rsl.vc_IPA := IPA_Emulation_CT.create(bts[0].rsl.id & "-IPA") alive; bts[0].rsl.ccm_pars := c_IPA_default_ccm_pars; bts[0].rsl.ccm_pars.name := "Osmocom TTCN-3 BTS Simulator"; bts[0].rsl.ccm_pars.unit_id := "99/0/0"; /* value which is unknown at BTS */ diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index ddf98a92..3f822c2a 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -447,8 +447,8 @@ private function f_fix_create_cb(inout BssgpConfig cfg) private function f_init_gb_pcu(inout GbInstance gb, charstring id, integer offset) runs on test_CT { var charstring ns_id := id & "-NS(PCU[" & int2str(offset) & "])"; var charstring bssgp_id := id & "-BSSGP(PCU[" & int2str(offset) & "])"; - gb.vc_NS := NS_CT.create(ns_id); - gb.vc_BSSGP := BSSGP_CT.create(bssgp_id); + gb.vc_NS := NS_CT.create(ns_id) alive; + gb.vc_BSSGP := BSSGP_CT.create(bssgp_id) alive; /* connect lower end of BSSGP emulation with NS upper port */ connect(gb.vc_BSSGP:BSCP, gb.vc_NS:NS_SP); @@ -470,8 +470,8 @@ private function f_init_gb_pcu(inout GbInstance gb, charstring id, integer offse private function f_init_gb_sgsn(inout GbInstance gb, charstring id, integer offset) runs on test_CT { var charstring ns_id := id & "-NS(SGSN[" & int2str(offset) & "])"; var charstring bssgp_id := id & "-BSSGP(SGSN[" & int2str(offset) & "])"; - gb.vc_NS := NS_CT.create(ns_id); - gb.vc_BSSGP := BSSGP_CT.create(bssgp_id); + gb.vc_NS := NS_CT.create(ns_id) alive; + gb.vc_BSSGP := BSSGP_CT.create(bssgp_id) alive; /* connect lower end of BSSGP emulation with NS upper port */ connect(gb.vc_BSSGP:BSCP, gb.vc_NS:NS_SP); diff --git a/library/BSSAP_LE_Adapter.ttcn b/library/BSSAP_LE_Adapter.ttcn index dba8841b..256d8fa8 100644 --- a/library/BSSAP_LE_Adapter.ttcn +++ b/library/BSSAP_LE_Adapter.ttcn @@ -85,13 +85,13 @@ function f_bssap_le_adapter_init(inout BSSAP_LE_Adapter ba, in BSSAP_LE_Configur ops.sccp_addr_peer := ba.sccp_addr_peer; /* create components */ - ba.vc_SCCP := SCCP_CT.create(id & "-SCCP"); + ba.vc_SCCP := SCCP_CT.create(id & "-SCCP") alive; if (isvalue(ops)) { - ba.vc_BSSAP_LE := BSSAP_LE_Emulation_CT.create(id & "-BSSAP_LE"); + ba.vc_BSSAP_LE := BSSAP_LE_Emulation_CT.create(id & "-BSSAP_LE") alive; } else { ba.vc_BSSAP_LE := null; } - ba.vc_M3UA := M3UA_CT.create(id & "-M3UA"); + ba.vc_M3UA := M3UA_CT.create(id & "-M3UA") alive; map(ba.vc_M3UA:SCTP_PORT, system:sctp); /* connect MTP3 service provider (M3UA) to lower side of SCCP */ connect(ba.vc_M3UA:MTP3_SP_PORT, ba.vc_SCCP:MTP3_SCCP_PORT); |