lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

April 2023

  • 1 participants
  • 2252 discussions
[M] Change in osmo-ttcn3-hacks[master]: RSL_Types: Add (most) VGCS/VBS related IEs + Messages
by laforge 30 Apr '23

30 Apr '23
Attention is currently required from: jolly, laforge. Hello Jenkins Builder, jolly, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32404 to look at the new patch set (#3). Change subject: RSL_Types: Add (most) VGCS/VBS related IEs + Messages ...................................................................... RSL_Types: Add (most) VGCS/VBS related IEs + Messages This will help us to start tests for VGCS/VBS. Change-Id: I4c4a9ac1bbd5114cb2237ea282d7bace13a52abe --- M library/GSM_Types.ttcn M library/RSL_Types.ttcn 2 files changed, 143 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/04/32404/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32404 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I4c4a9ac1bbd5114cb2237ea282d7bace13a52abe Gerrit-Change-Number: 32404 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: WIP: bsc: ASCI Assignment test (VBS/VGCS)
by laforge 30 Apr '23

30 Apr '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32555 ) Change subject: WIP: bsc: ASCI Assignment test (VBS/VGCS) ...................................................................... WIP: bsc: ASCI Assignment test (VBS/VGCS) Change-Id: I9b824a08d3948dc01e4748d4a4d61b889d31e5ff --- M bsc/BSC_Tests.ttcn A bsc/BSC_Tests_ASCI.ttcn 2 files changed, 159 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/55/32555/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 878083e..4e72383 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -23,6 +23,7 @@ friend module BSC_Tests_VAMOS; friend module BSC_Tests_CBSP; friend module BSC_Tests_LCLS; +friend module BSC_Tests_ASCI; import from Misc_Helpers all; import from General_Types all; @@ -106,7 +107,7 @@ * BTS 2 has BSIC 12, TSC = (BSIC & 7) = 4. * BTS 2 has BSIC 12, TSC = (BSIC & 7) = 4. */ -private const BtsParams c_BtsParams[NUM_BTS_CFG] := { +friend const BtsParams c_BtsParams[NUM_BTS_CFG] := { /* BTS0 */ { trx_num := 1, tsc := 2 }, /* BTS1 */ { trx_num := 1, tsc := 3 }, /* BTS2 */ { trx_num := 4, tsc := 4 }, diff --git a/bsc/BSC_Tests_ASCI.ttcn b/bsc/BSC_Tests_ASCI.ttcn new file mode 100644 index 0000000..27538a7 --- /dev/null +++ b/bsc/BSC_Tests_ASCI.ttcn @@ -0,0 +1,148 @@ +module BSC_Tests_ASCI { + +/* Integration Tests for OsmoBSC + * (C) 2023 by Harald Welte <laforge(a)gnumonks.org> + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This test suite tests OsmoBSC while emulating both multiple BTS + MS as + * well as the MSC. See README for more details. + */ + +import from General_Types all; +import from Osmocom_Types all; +import from GSM_Types all; +import from Misc_Helpers all; + +import from BSC_Tests all; +import from BSSAP_Types all; +import from BSSAP_CodecPort all; +import from BSSMAP_Templates all; +import from RSL_Types all; +import from RSL_Emulation all; +import from MGCP_Emulation all; + +import from MobileL3_CommonIE_Types all; +import from MobileL3_Types all; +import from L3_Templates all; +import from GSM_RR_Types all; + +import from MSC_ConnectionHandler all; +import from RAN_Adapter all; +import from RAN_Emulation all; + + +function f_gen_asci_ass_req(integer bssap_idx := 0, + template (value) BSSMAP_IE_ChannelType ch_type := ts_BSSMAP_IE_ChannelType, + template (value) OCT1 ass_requirement := '00'O, + template (value) BSSMAP_IE_CellIdentifier cell_id := ts_CellID_LAC_CI(1, 0), + template (value) GroupCallRef group_call_ref := '2342'O, + charstring aoip_tla :="1.2.3.4") +runs on MSC_ConnHdlr return template (value) PDU_BSSAP { + if (mp_bssap_cfg[bssap_idx].transport == BSSAP_TRANSPORT_AoIP) { + var template (value) BSSMAP_IE_AoIP_TransportLayerAddress tla := + f_ts_BSSMAP_IE_AoIP_TLA(aoip_tla, 2342); + return ts_BSSMAP_VGCS_VBS_AssignmentReq(ch_type, ass_requirement, cell_id, + group_call_ref, omit, tla); + } else { + var template (value) BSSMAP_IE_CircuitIdentityCode cic := ts_BSSMAP_IE_CIC(0,1); + return ts_BSSMAP_VGCS_VBS_AssignmentReq(ch_type, ass_requirement, cell_id, + group_call_ref, cic, omit); + } +} + + +private function f_tc_asci_assignment(charstring id) runs on MSC_ConnHdlr { + var PDU_BSSAP rx_bssap; + /* Hack: the proper way would be to wait for the BSSMAP VGCS Assignment Result and extract the + * actual assigned chan_nr from it. But osmo-bsc starts acting on the lchan even before we get a + * chance to evaluate the BSSMAP Handover Request ACK. So we need to assume that osmo-bsc will + * activate TS 1 and already set up this lchan's RSL emulation + * before we get started. */ + var RslChannelNr new_chan_nr := valueof(t_RslChanNr0(1, RSL_CHAN_NR_Bm_ACCH)); + f_rslem_register(0, new_chan_nr); + g_chan_nr := new_chan_nr; + var uint3_t expect_target_tsc := c_BtsParams[0].tsc; + f_sleep(1.0); + + f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); + f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", FR_AMR); + var default as_media := activate(as_Media()); + + /* TODO: Encryption */ + var template (value) BSSMAP_IE_ChannelType ch_type := ts_BSSMAP_IE_ChannelType; + var template (value) BSSMAP_IE_CellIdentifier cell_id := ts_CellID_LAC_CI(1, 0); + var template (value) PDU_BSSAP ass_req := f_gen_asci_ass_req(ch_type := ch_type, cell_id := cell_id); + if (false) { /* VGCS/VBS ASS REQ in SCCP CR */ + BSSAP.send(ts_BSSAP_Conn_Req(g_pars.sccp_addr_bsc, g_pars.sccp_addr_msc, ass_req)); + BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_CONF_IND); + } else { /* VGCS/VBS ASS REQ in SCCP DT1 */ + BSSAP.send(ts_BSSAP_Conn_Req(g_pars.sccp_addr_bsc, g_pars.sccp_addr_msc, omit)); + BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_CONF_IND); + BSSAP.send(ass_req); + } + + alt { + [] BSSAP.receive(tr_BSSMAP_VGCS_VBS_AssignmentRes(ch_type, cell_id)) -> value rx_bssap { + if (g_pars.expect_ho_fail) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + "Expected ASCI Assignment to fail, but got success"); + } + } + [] BSSAP.receive(tr_BSSMAP_VGCS_VBS_AssignmentFail) -> value rx_bssap { + if (not g_pars.expect_ho_fail) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + "Expected ASCI Assignment to succeed, but got fail"); + } + /* TOOD: evaluate correct cause value. But osmo-bsc doesn't seem to send meaningful causes * yet! */ + BSSAP.receive(tr_BSSMAP_ClearRequest); + setverdict(pass); + return; + } + } + + /* The RSL Emulation magically accepts the Chan Activ behind the scenes. */ + + /* we're sure that the channel activation is done now, verify the parameters in it */ + var RSL_Message chan_act := f_rslem_get_last_act(RSL_PROC, 0, g_chan_nr); + /* TODO: Encryption */ + f_chan_act_verify_tsc(chan_act, expect_target_tsc); + + if (ispresent(rx_bssap.pdu.bssmap.vGCS_VBSAssignmentResult.speechCodec)) { + if (not g_pars.aoip) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + "Expected no Speech Codec (Chosen)"); + } + } else { + if (g_pars.aoip) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + "Expected Speech Codec (Chosen)"); + } + } + +} + +testcase TC_vbs_assignment() runs on test_CT { + var MSC_ConnHdlr vc_conn; + var TestHdlrParams pars := f_gen_test_hdlr_pars(); + + f_init(1, true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_asci_assignment), pars); + vc_conn.done; + + f_shutdown_helper(); +} + +control { + execute( TC_vbs_assignment() ); + +} + + +} -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32555 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I9b824a08d3948dc01e4748d4a4d61b889d31e5ff Gerrit-Change-Number: 32555 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: RSL_Types: Add (most) VGCS/VBS related IEs + Messages
by fixeria 30 Apr '23

30 Apr '23
Attention is currently required from: jolly, laforge. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32404 ) Change subject: RSL_Types: Add (most) VGCS/VBS related IEs + Messages ...................................................................... Patch Set 2: Code-Review+1 (2 comments) File library/RSL_Types.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32404/comment/23dae2f9_8825… PS2, Line 2757: value `(present)`, also for `chan_desc` https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32404/comment/4a9d951f_c79d… PS2, Line 2779: value `(present)` -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32404 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I4c4a9ac1bbd5114cb2237ea282d7bace13a52abe Gerrit-Change-Number: 32404 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Sun, 30 Apr 2023 07:40:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: RSL_Types: Add (most) VGCS/VBS related IEs + Messages
by laforge 30 Apr '23

30 Apr '23
Attention is currently required from: jolly, fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32404 ) Change subject: RSL_Types: Add (most) VGCS/VBS related IEs + Messages ...................................................................... Patch Set 1: (1 comment) File library/RSL_Types.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32404/comment/e6af6c5c_6d14… PS1, Line 2762: ts_RslChanNr_PCH_AGCH > This can probably work fine, but still it's better to avoid using send templates in definitions of r […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32404 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I4c4a9ac1bbd5114cb2237ea282d7bace13a52abe Gerrit-Change-Number: 32404 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 30 Apr 2023 07:12:57 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: RSL_Types: Add (most) VGCS/VBS related IEs + Messages
by laforge 30 Apr '23

30 Apr '23
Attention is currently required from: jolly, laforge. Hello Jenkins Builder, jolly, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32404 to look at the new patch set (#2). Change subject: RSL_Types: Add (most) VGCS/VBS related IEs + Messages ...................................................................... RSL_Types: Add (most) VGCS/VBS related IEs + Messages This will help us to start tests for VGCS/VBS. Change-Id: I4c4a9ac1bbd5114cb2237ea282d7bace13a52abe --- M library/GSM_Types.ttcn M library/RSL_Types.ttcn 2 files changed, 143 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/04/32404/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32404 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I4c4a9ac1bbd5114cb2237ea282d7bace13a52abe Gerrit-Change-Number: 32404 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newpatchset
1 0
0 0
[L] Change in libosmo-gprs[master]: gmm, rlcmac: Properly handle P-TMSI vs TLLI
by fixeria 30 Apr '23

30 Apr '23
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32507 ) Change subject: gmm, rlcmac: Properly handle P-TMSI vs TLLI ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32507 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I44c95b3bc973b9dfcc79daf6b529fd2826f574e8 Gerrit-Change-Number: 32507 Gerrit-PatchSet: 3 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: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sun, 30 Apr 2023 05:57:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: gsm_objclass2obj(): Change signature/set NACK cause
by fixeria 30 Apr '23

30 Apr '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32354 ) Change subject: gsm_objclass2obj(): Change signature/set NACK cause ...................................................................... gsm_objclass2obj(): Change signature/set NACK cause - Add out-parameter to enable returning a NACK cause (ignored if NULL) - Return appropriate NACK cause if TRX number is unknown (fixes OS#5967 together with change I37e6b23ed95260a8188910cf9754faffcba519c5) Change-Id: If734ea2c8cae4c1f99b02520dffa4e3862a67745 Related: OS#5961, OS#5967 --- M include/osmo-bts/oml.h M src/common/oml.c M src/osmo-bts-trx/trx_provision_fsm.c 3 files changed, 44 insertions(+), 19 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index add00c8..c35122e 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -82,6 +82,7 @@ enum abis_nm_nack_cause *c); void *gsm_objclass2obj(struct gsm_bts *bts, uint8_t obj_class, - const struct abis_om_obj_inst *obj_inst); + const struct abis_om_obj_inst *obj_inst, + enum abis_nm_nack_cause *c); #endif // _OML_H */ diff --git a/src/common/oml.c b/src/common/oml.c index 6bdb49b..7ab1bc2 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1103,8 +1103,8 @@ /* Step 1: Resolve MO by obj_class/obj_inst */ if ((mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst, &c)) == NULL) return oml_fom_ack_nack(msg, c); - if ((obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst)) == NULL) - return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); + if ((obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst, &c)) == NULL) + return oml_fom_ack_nack(msg, c); /* Step 2: Do some global dependency/consistency checking */ if (mo->nm_state.operational == NM_OPSTATE_ENABLED) { @@ -1149,8 +1149,8 @@ /* Step 1: Resolve MO by obj_class/obj_inst */ if ((mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst, &c)) == NULL) return oml_fom_ack_nack(msg, c); - if ((obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst)) == NULL) - return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); + if ((obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst, &c)) == NULL) + return oml_fom_ack_nack(msg, c); /* Step 2: Do some global dependency/consistency checking */ if (mo->nm_state.administrative == adm_state) { @@ -1491,8 +1491,8 @@ /* Resolve MO by obj_class/obj_inst */ if ((mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst, &c)) == NULL) return oml_fom_ack_nack(msg, c); - if ((obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst)) == NULL) - return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); + if ((obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst, &c)) == NULL) + return oml_fom_ack_nack(msg, c); switch (mo->obj_class) { @@ -1793,10 +1793,11 @@ return NULL; } -/* obtain the in-memory data structure of a given object instance */ -void * -gsm_objclass2obj(struct gsm_bts *bts, uint8_t obj_class, - const struct abis_om_obj_inst *obj_inst) +/* Obtain the in-memory data structure of a given object instance + * \param[out] c nack cause for reply in case of error. Ignored if NULL */ +void *gsm_objclass2obj(struct gsm_bts *bts, uint8_t obj_class, + const struct abis_om_obj_inst *obj_inst, + enum abis_nm_nack_cause *c) { struct gsm_bts_trx *trx; void *obj = NULL; @@ -1807,19 +1808,19 @@ break; case NM_OC_RADIO_CARRIER: if (!(trx = gsm_bts_trx_num(bts, obj_inst->trx_nr))) - return NULL; + goto nm_nack_trxnr_unkn; obj = trx; break; case NM_OC_BASEB_TRANSC: if (!(trx = gsm_bts_trx_num(bts, obj_inst->trx_nr))) - return NULL; + goto nm_nack_trxnr_unkn; obj = &trx->bb_transc; break; case NM_OC_CHANNEL: if (!(trx = gsm_bts_trx_num(bts, obj_inst->trx_nr))) - return NULL; + goto nm_nack_trxnr_unkn; if (obj_inst->ts_nr >= TRX_NR_TS) - return NULL; + goto nm_nack_objinst_unkn; obj = &trx->ts[obj_inst->ts_nr]; break; case NM_OC_SITE_MANAGER: @@ -1827,7 +1828,7 @@ break; case NM_OC_GPRS_NSE: if (obj_inst->bts_nr > 0) - return NULL; + goto nm_nack_objinst_unkn; obj = &g_bts_sm->gprs.nse; break; case NM_OC_GPRS_CELL: @@ -1835,11 +1836,20 @@ break; case NM_OC_GPRS_NSVC: if (obj_inst->bts_nr > 0) - return NULL; + goto nm_nack_objinst_unkn; if (obj_inst->trx_nr >= ARRAY_SIZE(g_bts_sm->gprs.nse.nsvc)) - return NULL; + goto nm_nack_objinst_unkn; obj = &g_bts_sm->gprs.nse.nsvc[obj_inst->trx_nr]; break; } return obj; + +nm_nack_trxnr_unkn: + if (c != NULL) + *c = NM_NACK_TRXNR_UNKN; + return NULL; +nm_nack_objinst_unkn: + if (c != NULL) + *c = NM_NACK_OBJINST_UNKN; + return NULL; } diff --git a/src/osmo-bts-trx/trx_provision_fsm.c b/src/osmo-bts-trx/trx_provision_fsm.c index 8b20b10..2731010 100644 --- a/src/osmo-bts-trx/trx_provision_fsm.c +++ b/src/osmo-bts-trx/trx_provision_fsm.c @@ -340,7 +340,7 @@ return 0; if (nsd->old_state != NM_OPSTATE_ENABLED && nsd->new_state == NM_OPSTATE_ENABLED) { - trx = gsm_objclass2obj(nsd->mo->bts, nsd->mo->obj_class, &nsd->mo->obj_inst); + trx = gsm_objclass2obj(nsd->mo->bts, nsd->mo->obj_class, &nsd->mo->obj_inst, NULL); l1if_trx_start_power_ramp(trx, NULL); } return 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32354 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: If734ea2c8cae4c1f99b02520dffa4e3862a67745 Gerrit-Change-Number: 32354 Gerrit-PatchSet: 4 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-bts[master]: gsm_objclass2mo(): Change signature/set NACK cause
by fixeria 30 Apr '23

30 Apr '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32075 ) Change subject: gsm_objclass2mo(): Change signature/set NACK cause ...................................................................... gsm_objclass2mo(): Change signature/set NACK cause - Add out-parameter to enable returning a NACK cause (ignored if NULL) - Return appropriate NACK cause if TRX number is unknown (part of fix for OS#5967) Change-Id: I37e6b23ed95260a8188910cf9754faffcba519c5 Related: OS#5961, OS#5967 --- M include/osmo-bts/oml.h M src/common/oml.c 2 files changed, 54 insertions(+), 27 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index 38568b5..add00c8 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -78,7 +78,8 @@ uint8_t obj_class, uint8_t p1, uint8_t p2, uint8_t p3); struct gsm_abis_mo *gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class, - const struct abis_om_obj_inst *obj_inst); + const struct abis_om_obj_inst *obj_inst, + enum abis_nm_nack_cause *c); void *gsm_objclass2obj(struct gsm_bts *bts, uint8_t obj_class, const struct abis_om_obj_inst *obj_inst); diff --git a/src/common/oml.c b/src/common/oml.c index db95747..6bdb49b 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -534,6 +534,7 @@ const struct gsm_abis_mo *mo; struct tlv_parsed tp; int rc; + enum abis_nm_nack_cause c; if (!foh || !bts) return -EINVAL; @@ -541,10 +542,9 @@ DEBUGPFOH(DOML, foh, "Rx GET ATTR\n"); /* Determine which OML object is addressed */ - mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); - if (!mo) { + if ((mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst, &c)) == NULL) { LOGPFOH(DOML, LOGL_ERROR, foh, "Get Attributes for unknown Object Instance\n"); - return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); + return oml_fom_ack_nack(msg, c); } rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); @@ -1096,13 +1096,14 @@ struct gsm_abis_mo *mo; void *obj; int rc; + enum abis_nm_nack_cause c; DEBUGPFOH(DOML, foh, "Rx OPSTART\n"); /* Step 1: Resolve MO by obj_class/obj_inst */ - mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); - obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst); - if (!mo || !obj) + if ((mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst, &c)) == NULL) + return oml_fom_ack_nack(msg, c); + if ((obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst)) == NULL) return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); /* Step 2: Do some global dependency/consistency checking */ @@ -1128,6 +1129,7 @@ uint8_t adm_state; void *obj; int rc; + enum abis_nm_nack_cause c; DEBUGPFOH(DOML, foh, "Rx CHG ADM STATE\n"); @@ -1145,9 +1147,9 @@ adm_state = *TLVP_VAL(&tp, NM_ATT_ADM_STATE); /* Step 1: Resolve MO by obj_class/obj_inst */ - mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); - obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst); - if (!mo || !obj) + if ((mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst, &c)) == NULL) + return oml_fom_ack_nack(msg, c); + if ((obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst)) == NULL) return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); /* Step 2: Do some global dependency/consistency checking */ @@ -1473,23 +1475,23 @@ struct tlv_parsed tp, *tp_merged; void *obj; int rc; + enum abis_nm_nack_cause c; DEBUGPFOH(DOML, foh, "Rx IPA SET ATTR\n"); rc = oml_tlv_parse(&tp, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { - mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); - if (!mo) - return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); + if ((mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst, &c)) == NULL) + return oml_fom_ack_nack(msg, c); oml_tx_failure_event_rep(mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UNSUP_ATTR, "New value for IPAC Set Attribute not supported\n"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } /* Resolve MO by obj_class/obj_inst */ - mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst); - obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst); - if (!mo || !obj) + if ((mo = gsm_objclass2mo(bts, foh->obj_class, &foh->obj_inst, &c)) == NULL) + return oml_fom_ack_nack(msg, c); + if ((obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst)) == NULL) return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); @@ -1730,10 +1732,11 @@ mo->nm_state.administrative = NM_STATE_LOCKED; } -/* obtain the MO structure for a given object instance */ -struct gsm_abis_mo * -gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class, - const struct abis_om_obj_inst *obj_inst) +/* Obtain the MO structure for a given object instance + * \param[out] c nack cause for reply in case of error. Ignored if NULL */ +struct gsm_abis_mo *gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class, + const struct abis_om_obj_inst *obj_inst, + enum abis_nm_nack_cause *c) { struct gsm_bts_trx *trx; struct gsm_abis_mo *mo = NULL; @@ -1744,19 +1747,19 @@ break; case NM_OC_RADIO_CARRIER: if (!(trx = gsm_bts_trx_num(bts, obj_inst->trx_nr))) - return NULL; + goto nm_nack_trxnr_unkn; mo = &trx->mo; break; case NM_OC_BASEB_TRANSC: if (!(trx = gsm_bts_trx_num(bts, obj_inst->trx_nr))) - return NULL; + goto nm_nack_trxnr_unkn; mo = &trx->bb_transc.mo; break; case NM_OC_CHANNEL: if (!(trx = gsm_bts_trx_num(bts, obj_inst->trx_nr))) - return NULL; + goto nm_nack_trxnr_unkn; if (obj_inst->ts_nr >= TRX_NR_TS) - return NULL; + goto nm_nack_objinst_unkn; mo = &trx->ts[obj_inst->ts_nr].mo; break; case NM_OC_SITE_MANAGER: @@ -1764,7 +1767,7 @@ break; case NM_OC_GPRS_NSE: if (obj_inst->bts_nr > 0) - return NULL; + goto nm_nack_objinst_unkn; mo = &g_bts_sm->gprs.nse.mo; break; case NM_OC_GPRS_CELL: @@ -1772,13 +1775,22 @@ break; case NM_OC_GPRS_NSVC: if (obj_inst->bts_nr > 0) - return NULL; + goto nm_nack_objinst_unkn; if (obj_inst->trx_nr >= ARRAY_SIZE(g_bts_sm->gprs.nse.nsvc)) - return NULL; + goto nm_nack_objinst_unkn; mo = &g_bts_sm->gprs.nse.nsvc[obj_inst->trx_nr].mo; break; } return mo; + +nm_nack_trxnr_unkn: + if (c != NULL) + *c = NM_NACK_TRXNR_UNKN; + return NULL; +nm_nack_objinst_unkn: + if (c != NULL) + *c = NM_NACK_OBJINST_UNKN; + return NULL; } /* obtain the in-memory data structure of a given object instance */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32075 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I37e6b23ed95260a8188910cf9754faffcba519c5 Gerrit-Change-Number: 32075 Gerrit-PatchSet: 8 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-bts[master]: gsm_objclass2obj(): Change signature/set NACK cause
by fixeria 30 Apr '23

30 Apr '23
Attention is currently required from: arehbein. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32354 ) Change subject: gsm_objclass2obj(): Change signature/set NACK cause ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32354 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: If734ea2c8cae4c1f99b02520dffa4e3862a67745 Gerrit-Change-Number: 32354 Gerrit-PatchSet: 4 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Comment-Date: Sun, 30 Apr 2023 05:22:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: gsm_objclass2mo(): Change signature/set NACK cause
by fixeria 30 Apr '23

30 Apr '23
Attention is currently required from: arehbein, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32075 ) Change subject: gsm_objclass2mo(): Change signature/set NACK cause ...................................................................... Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32075 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I37e6b23ed95260a8188910cf9754faffcba519c5 Gerrit-Change-Number: 32075 Gerrit-PatchSet: 8 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sun, 30 Apr 2023 05:22:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • ...
  • 226
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.