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

May 2022

  • 2 participants
  • 1343 discussions
Change in osmo-bsc[master]: nm_statechg_signal_data: Convert state ptr to data
by osmith 05 May '22

05 May '22
Attention is currently required from: pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28038 ) Change subject: nm_statechg_signal_data: Convert state ptr to data ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28038 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I9b648dfd8392b7b40bfe2b38f3345017481f5129 Gerrit-Change-Number: 28038 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 05 May 2022 07:56:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: abis_nm: Merge signals S_NM_STATECHG_ADM and S_NM_STATECHG_OPER
by osmith 05 May '22

05 May '22
Attention is currently required from: pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28036 ) Change subject: abis_nm: Merge signals S_NM_STATECHG_ADM and S_NM_STATECHG_OPER ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File include/osmocom/bsc/signal.h: https://gerrit.osmocom.org/c/osmo-bsc/+/28036/comment/da10eae0_6289e049 PS1, Line 72: S_NM_STATECHG, /* NM Oper/Admin/Avail State changed. arg is struct nm_statechg_signal_data*/ Add a second tab for consistent alignment -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28036 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ia86d20a42b859063d0327b940ba528ec1438b04a Gerrit-Change-Number: 28036 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 05 May 2022 07:50:13 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: Remove commented out code
by osmith 05 May '22

05 May '22
Attention is currently required from: pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28033 ) Change subject: Remove commented out code ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I2c65e0803fbde7de9497089b562275baad58936a Gerrit-Change-Number: 28033 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 05 May 2022 07:45:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-msc[master]: CM Serv Rej: do not crash on use count mismatch
by neels 04 May '22

04 May '22
neels has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/27916 ) Change subject: CM Serv Rej: do not crash on use count mismatch ...................................................................... Abandoned superseded by https://gerrit.osmocom.org/c/osmo-msc/+/28049 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/27916 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I2009df42d1f27ec0d011e22bfc46dbc17afe7239 Gerrit-Change-Number: 27916 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: abandon
1 0
0 0
Change in osmo-msc[master]: fix crash on CM Serv Rej: fix use count mismatch
by neels 04 May '22

04 May '22
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/28049 ) Change subject: fix crash on CM Serv Rej: fix use count mismatch ...................................................................... fix crash on CM Serv Rej: fix use count mismatch With comments, clarify the code paths where a CM Service use count has not yet been placed on the conn (just send CM Service Reject) and where the use count is placed (decrement count on CM Service Reject). Place the CM Service use count slightly earlier: - it is then correctly present when checking the mobile identity in cm_serv_reuse_conn(), avoiding the crash reported in OS#5532. - there is only one place incrementing the use count instead of two. Related: OS#5532 Change-Id: I6c735b79b67108bcaadada3f01c7046e262f939b --- M src/libmsc/gsm_04_08.c M src/libmsc/msc_a.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err 3 files changed, 24 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/49/28049/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index b5d46fd..9d3b5a2 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -246,7 +246,9 @@ return msc_a_tx_dtap_to_i(msc_a, msg); } -/* 9.2.6 CM service reject */ +/* 9.2.6 CM service reject. + * For an active and valid CM Service Request, instead use msc_vlr_tx_cm_serv_rej(), which also takes care of + * decrementing the use token for that service type. */ static int msc_gsm48_tx_mm_serv_rej(struct msc_a *msc_a, enum gsm48_reject_value value) { @@ -701,7 +703,6 @@ accept_reuse: LOG_MSC_A_CAT(msc_a, DMM, LOGL_DEBUG, "re-using already accepted connection\n"); - msc_a_get(msc_a, msc_a_cm_service_type_to_use(cm_serv_type)); msub_update_id(msc_a->c.msub); return net->vlr->ops.tx_cm_serv_acc(msc_a, cm_serv_type); } @@ -729,6 +730,14 @@ struct osmo_mobile_identity mi; int rc; + /* There are two ways to respond with a CM Service Reject: + * Directly and only send the CM Service Reject with msc_gsm48_tx_mm_serv_rej(). + * Decrement the CM Service use count token and send the message with msc_vlr_tx_cm_serv_rej(). + * + * Until we accept the CM Service Request message as such, there is no use count placed for the service type. + * So in here use msc_gsm48_tx_mm_serv_rej() to respond. + */ + /* Make sure that both header and CM Service Request fit into the buffer */ if (msgb_l3len(msg) < sizeof(*gh) + sizeof(*req)) { LOG_MSC_A(msc_a, LOGL_ERROR, "Rx CM SERVICE REQUEST: wrong message size (%u < %zu)\n", @@ -791,13 +800,16 @@ if (!msc_a_cm_service_type_to_use(req->cm_service_type)) return msc_gsm48_tx_mm_serv_rej(msc_a, GSM48_REJECT_SRV_OPT_NOT_SUPPORTED); + /* At this point, the CM Service Request message is being accepted. + * Increment the matching use token, and from here on use msc_vlr_tx_cm_serv_rej() to respond in case of + * failure. */ + msc_a_get(msc_a, msc_a_cm_service_type_to_use(req->cm_service_type)); + if (msc_a_is_accepted(msc_a)) return cm_serv_reuse_conn(msc_a, &mi, req->cm_service_type); osmo_signal_dispatch(SS_SUBSCR, S_SUBSCR_IDENTITY, &mi); - msc_a_get(msc_a, msc_a_cm_service_type_to_use(req->cm_service_type)); - is_utran = (msc_a->c.ran->type == OSMO_RAT_UTRAN_IU); vlr_proc_acc_req(msc_a->c.fi, MSC_A_EV_AUTHENTICATED, MSC_A_EV_CN_CLOSE, NULL, @@ -1508,7 +1520,8 @@ return gsm48_tx_mm_info(msc_a); } -/* VLR asks us to transmit a CM Service Reject */ +/* VLR asks us to transmit a CM Service Reject. + * Decrement the CM Service type's use token and send the CM Service Reject message. */ static int msc_vlr_tx_cm_serv_rej(void *msc_conn_ref, enum osmo_cm_service_type cm_service_type, enum gsm48_reject_value cause) { diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index e2bf975..5761ed7 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -1792,6 +1792,10 @@ return msc_a_start_assignment(msc_a, cc_trans); } +/* Map CM Service type to use token. + * Given a CM Service type, return a matching token intended for osmo_use_count. + * For unknown service type, return NULL. + */ const char *msc_a_cm_service_type_to_use(enum osmo_cm_service_type cm_service_type) { switch (cm_service_type) { diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err index 67b4819..25ccdfb 100644 --- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err +++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err @@ -1032,8 +1032,8 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: Dispatching 04.08 message: MM GSM48_MT_MM_CM_SERV_REQ DMM msc_a(IMSI-901700000004620:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: Rx CM SERVICE REQUEST cm_service_type=Short-Messaging-Service -DMM msc_a(IMSI-901700000004620:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: re-using already accepted connection DREF msc_a(IMSI-901700000004620:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: + cm_service_sms: now used by 3 (2*cm_service_sms,rx_from_ms) +DMM msc_a(IMSI-901700000004620:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: re-using already accepted connection DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: Sending DTAP: MM GSM48_MT_MM_CM_SERV_ACC DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: RAN encode: DTAP on GERAN-A - DTAP --GERAN-A--> MS: GSM48_MT_MM_CM_SERV_ACC: 0521 @@ -1842,8 +1842,8 @@ DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: RAN decode: DTAP DRLL msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:PAGING_RESP){MSC_A_ST_AUTHENTICATED}: Dispatching 04.08 message: MM GSM48_MT_MM_CM_SERV_REQ DMM msc_a(IMSI-901700000004620:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: Rx CM SERVICE REQUEST cm_service_type=Short-Messaging-Service -DMM msc_a(IMSI-901700000004620:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: re-using already accepted connection DREF msc_a(IMSI-901700000004620:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: + cm_service_sms: now used by 3 (sms,rx_from_ms,cm_service_sms) +DMM msc_a(IMSI-901700000004620:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: re-using already accepted connection DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: Sending DTAP: MM GSM48_MT_MM_CM_SERV_ACC DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:CM_SERVICE_REQ){MSC_A_ST_AUTHENTICATED}: RAN encode: DTAP on GERAN-A - DTAP --GERAN-A--> MS: GSM48_MT_MM_CM_SERV_ACC: 0521 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28049 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I6c735b79b67108bcaadada3f01c7046e262f939b Gerrit-Change-Number: 28049 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: msc: add test for OS#5532: crash from CM Serv Rej
by neels 04 May '22

04 May '22
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28048 ) Change subject: msc: add test for OS#5532: crash from CM Serv Rej ...................................................................... msc: add test for OS#5532: crash from CM Serv Rej Reproduce the assertion trigger crashing osmo-msc reported in OS#5532, i.e. a CM Service Request that contains a mismatching Mobile Identity. Causes osmo-msc to crash with an assertion, so run it last. Fix of the crash: I6c735b79b67108bcaadada3f01c7046e262f939b Related: OS#5532 Depends: I6c735b79b67108bcaadada3f01c7046e262f939b (osmo-msc) Change-Id: I3f84d00f456aaee578787059d7010c25efcdcf56 --- M msc/MSC_Tests.ttcn 1 file changed, 28 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/48/28048/1 diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 2fad7b4..5bf199c 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -6801,6 +6801,32 @@ vc_conn2.done; } +/* Establish a conn with a valid Mobile Identity. Then send a CM Service Request containing a mismatching Mobile + * Identity on the same conn. Caused a crash, see OS#5532. */ +friend function f_tc_cm_serv_wrong_mi(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + f_init_handler(pars); + + /* Set up a fully identified conn */ + f_perform_lu(); + f_establish_fully(); + + /* CM Serv Req with mismatching Mobile Identity */ + var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(f_gen_imsi(99999))); /* ensure it is different from below*/ + BSSAP.send(ts_PDU_DTAP_MO(ts_CM_SERV_REQ(CM_TYPE_MO_SMS, mi))); + BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ)); + + /* Cancel the first CM Service from f_establish_fully() */ + BSSAP.send(ts_BSSMAP_ClearRequest(0)); + + f_expect_clear(); +} +testcase TC_cm_serv_wrong_mi() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(); + vc_conn := f_start_handler(refers(f_tc_cm_serv_wrong_mi), 94); + vc_conn.done; +} + control { execute( TC_cr_before_reset() ); execute( TC_lu_imsi_noauth_tmsi() ); @@ -6963,6 +6989,8 @@ execute( TC_call_re_establishment() ); execute( TC_call_re_establishment_auth() ); execute( TC_call_re_establishment_ciph() ); + + execute( TC_cm_serv_wrong_mi() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28048 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: I3f84d00f456aaee578787059d7010c25efcdcf56 Gerrit-Change-Number: 28048 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: Introduce new signal S_NM_RUNNING_CHG and implement it for rcarrier,b...
by pespin 04 May '22

04 May '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28046 ) Change subject: Introduce new signal S_NM_RUNNING_CHG and implement it for rcarrier,bbtransc ...................................................................... Introduce new signal S_NM_RUNNING_CHG and implement it for rcarrier,bbtransc This allows different parts of the code to hook to some signals which allow start/stopping processes based, for instance, on whether C0 is available or not. This can be later used by paging or CBSP code. Also ACC code can be ported to this new system (acc_ramp_nm_sig_cb()). Same signal can be used for other NM objects, but is left unimplemented until there's use for them. Change-Id: I206d4c7863a77fbab6a600126742a6a6b8fc3614 --- M include/osmocom/bsc/signal.h M src/osmo-bsc/nm_bb_transc_fsm.c M src/osmo-bsc/nm_rcarrier_fsm.c 3 files changed, 78 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/46/28046/1 diff --git a/include/osmocom/bsc/signal.h b/include/osmocom/bsc/signal.h index 60ba868..26b2fd7 100644 --- a/include/osmocom/bsc/signal.h +++ b/include/osmocom/bsc/signal.h @@ -77,6 +77,7 @@ S_NM_SET_RADIO_ATTR_ACK, /* Received Set Radio Carrier Attributes Ack, arg is struct msgb *oml_msg */ S_NM_SET_CHAN_ATTR_ACK, /* Received Set Radio Channel Attributes Ack, arg is struct msgb *oml_msg */ S_NM_SET_BTS_ATTR_ACK, /* Received Set BTS Attributes Ack, arg is struct msgb *oml_msg */ + S_NM_RUNNING_CHG, /* Object moves from/to NM running state (op=Enabled admm=Unlocked avail=OK) */ }; /* SS_LCHAN signals */ @@ -140,6 +141,14 @@ struct abis_om2k_mo *om2k_mo; }; +/* data for <SS_NM, S_NM_RUNNING_CHG>: */ +struct nm_running_chg_signal_data { + struct gsm_bts *bts; + uint8_t obj_class; + void *obj; + bool running; +}; + struct nm_om2k_signal_data { struct gsm_bts *bts; void *obj; diff --git a/src/osmo-bsc/nm_bb_transc_fsm.c b/src/osmo-bsc/nm_bb_transc_fsm.c index a4cef9c..9244134 100644 --- a/src/osmo-bsc/nm_bb_transc_fsm.c +++ b/src/osmo-bsc/nm_bb_transc_fsm.c @@ -40,6 +40,31 @@ #define nm_bb_transc_fsm_state_chg(fi, NEXT_STATE) \ osmo_fsm_inst_state_chg(fi, NEXT_STATE, 0, 0) +static void nm_obj_becomes_enabled_disabled(struct gsm_bts_bb_trx *bb_transc, bool running) +{ + struct gsm_bts_trx *trx = gsm_bts_bb_trx_get_trx(bb_transc); + struct nm_running_chg_signal_data nsd; + + memset(&nsd, 0, sizeof(nsd)); + + nsd.bts = trx->bts; + nsd.obj_class = NM_OC_BASEB_TRANSC; + nsd.obj = bb_transc; + nsd.running = running; + + osmo_signal_dispatch(SS_NM, S_NM_RUNNING_CHG, &nsd); +} + +static inline void nm_obj_becomes_enabled(struct gsm_bts_bb_trx *bb_transc) +{ + nm_obj_becomes_enabled_disabled(bb_transc, true); +} + +static inline void nm_obj_becomes_disabled(struct gsm_bts_bb_trx *bb_transc) +{ + nm_obj_becomes_enabled_disabled(bb_transc, false); +} + ////////////////////////// // FSM STATE ACTIONS ////////////////////////// @@ -243,13 +268,16 @@ bb_transc->mo.get_attr_rep_received = false; bb_transc->mo.opstart_sent = false; bb_transc->mo.adm_unlock_sent = false; + nm_obj_becomes_enabled(bb_transc); } static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct gsm_bts_bb_trx *bb_transc = (struct gsm_bts_bb_trx *)fi->priv; struct nm_statechg_signal_data *nsd; const struct gsm_nm_state *new_state; + switch (event) { case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; @@ -259,13 +287,16 @@ switch (new_state->availability) { /* operational = DISABLED */ case NM_AVSTATE_NOT_INSTALLED: case NM_AVSTATE_POWER_OFF: + nm_obj_becomes_disabled(bb_transc); nm_bb_transc_fsm_state_chg(fi, NM_BB_TRANSC_ST_OP_DISABLED_NOTINSTALLED); return; case NM_AVSTATE_DEPENDENCY: + nm_obj_becomes_disabled(bb_transc); nm_bb_transc_fsm_state_chg(fi, NM_BB_TRANSC_ST_OP_DISABLED_DEPENDENCY); return; case NM_AVSTATE_OFF_LINE: case NM_AVSTATE_OK: + nm_obj_becomes_disabled(bb_transc); nm_bb_transc_fsm_state_chg(fi, NM_BB_TRANSC_ST_OP_DISABLED_OFFLINE); return; default: @@ -287,8 +318,11 @@ bb_transc->mo.opstart_sent = false; break; case NM_EV_OML_DOWN: - if (fi->state != NM_BB_TRANSC_ST_OP_DISABLED_NOTINSTALLED) + if (fi->state != NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED) { + if (fi->state == NM_RCARRIER_ST_OP_ENABLED) + nm_obj_becomes_disabled(bb_transc); nm_bb_transc_fsm_state_chg(fi, NM_BB_TRANSC_ST_OP_DISABLED_NOTINSTALLED); + } break; default: OSMO_ASSERT(0); diff --git a/src/osmo-bsc/nm_rcarrier_fsm.c b/src/osmo-bsc/nm_rcarrier_fsm.c index f3c230d..b3dca81 100644 --- a/src/osmo-bsc/nm_rcarrier_fsm.c +++ b/src/osmo-bsc/nm_rcarrier_fsm.c @@ -40,6 +40,30 @@ #define nm_rcarrier_fsm_state_chg(fi, NEXT_STATE) \ osmo_fsm_inst_state_chg(fi, NEXT_STATE, 0, 0) +static void nm_obj_becomes_enabled_disabled(struct gsm_bts_trx *trx, bool running) +{ + struct nm_running_chg_signal_data nsd; + + memset(&nsd, 0, sizeof(nsd)); + + nsd.bts = trx->bts; + nsd.obj_class = NM_OC_RADIO_CARRIER; + nsd.obj = trx; + nsd.running = running; + + osmo_signal_dispatch(SS_NM, S_NM_RUNNING_CHG, &nsd); +} + +static inline void nm_obj_becomes_enabled(struct gsm_bts_trx *trx) +{ + nm_obj_becomes_enabled_disabled(trx, true); +} + +static inline void nm_obj_becomes_disabled(struct gsm_bts_trx *trx) +{ + nm_obj_becomes_enabled_disabled(trx, false); +} + ////////////////////////// // FSM STATE ACTIONS ////////////////////////// @@ -228,10 +252,13 @@ trx->mo.adm_unlock_sent = false; trx->mo.set_attr_ack_received = false; trx->mo.set_attr_sent = false; + + nm_obj_becomes_enabled(trx); } static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct gsm_bts_trx *trx = (struct gsm_bts_trx *)fi->priv; struct nm_statechg_signal_data *nsd; const struct gsm_nm_state *new_state; @@ -244,13 +271,16 @@ switch (new_state->availability) { /* operational = DISABLED */ case NM_AVSTATE_NOT_INSTALLED: case NM_AVSTATE_POWER_OFF: + nm_obj_becomes_disabled(trx); nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED); return; case NM_AVSTATE_DEPENDENCY: + nm_obj_becomes_disabled(trx); nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY); return; case NM_AVSTATE_OFF_LINE: case NM_AVSTATE_OK: + nm_obj_becomes_disabled(trx); nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_OFFLINE); return; default: @@ -278,8 +308,11 @@ trx->mo.force_rf_lock ? NM_STATE_LOCKED : NM_STATE_UNLOCKED); break; case NM_EV_OML_DOWN: - if (fi->state != NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED) + if (fi->state != NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED) { + if (fi->state == NM_RCARRIER_ST_OP_ENABLED) + nm_obj_becomes_disabled(trx); nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED); + } break; default: OSMO_ASSERT(0); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28046 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I206d4c7863a77fbab6a600126742a6a6b8fc3614 Gerrit-Change-Number: 28046 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: WIP: paging: start/stop credit_timer based on C0 running
by pespin 04 May '22

04 May '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28047 ) Change subject: WIP: paging: start/stop credit_timer based on C0 running ...................................................................... WIP: paging: start/stop credit_timer based on C0 running Change-Id: I1b5b1a98115b4e9d821eb3330fc5b970a0e78a44 --- M include/osmocom/bsc/paging.h M src/osmo-bsc/osmo_bsc_main.c M src/osmo-bsc/paging.c 3 files changed, 60 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/47/28047/1 diff --git a/include/osmocom/bsc/paging.h b/include/osmocom/bsc/paging.h index 9b63225..154dd67 100644 --- a/include/osmocom/bsc/paging.h +++ b/include/osmocom/bsc/paging.h @@ -113,6 +113,8 @@ uint16_t available_slots; }; +void paging_global_init(void); + void paging_init(struct gsm_bts *bts); void paging_destructor(struct gsm_bts *bts); diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 12ddbd2..b986b0e 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -929,6 +929,7 @@ assignment_fsm_init(); handover_fsm_init(); lb_init(); + paging_global_init(); /* Read the config */ rc = bsc_network_configure(config_file); diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c index e7a0ee2..b69907e 100644 --- a/src/osmo-bsc/paging.c +++ b/src/osmo-bsc/paging.c @@ -220,10 +220,6 @@ return; } - /* Skip paging if the bts is down. */ - if (!bts->c0->rsl_link_primary) - goto sched_next_iter; - osmo_clock_gettime(CLOCK_MONOTONIC, &now); /* do while loop: Try send at most first MAX_PAGE_REQ_PER_ITER paging @@ -300,12 +296,10 @@ { bts->paging.bts = bts; bts->paging.free_chans_need = -1; - unsigned int load_ind_timeout = bts_no_ccch_load_ind_timeout_sec(bts); - bts->paging.available_slots = paging_estimate_available_slots(bts, load_ind_timeout); + bts->paging.available_slots = 0; INIT_LLIST_HEAD(&bts->paging.pending_requests); osmo_timer_setup(&bts->paging.work_timer, paging_worker, &bts->paging); osmo_timer_setup(&bts->paging.credit_timer, paging_give_credit, &bts->paging); - osmo_timer_schedule(&bts->paging.credit_timer, load_ind_timeout, 0); } /* Called upon the bts struct being freed */ @@ -593,10 +587,12 @@ LOG_BTS(bts, DPAG, LOGL_DEBUG, "Rx CCCH Load Indication from BTS (available_slots %u -> %u)\n", bts->paging.available_slots, free_slots); bts->paging.available_slots = free_slots; - paging_schedule_if_needed(&bts->paging); - /* Re-arm credit_timer */ - osmo_timer_schedule(&bts->paging.credit_timer, - bts_no_ccch_load_ind_timeout_sec(bts), 0); + /* Re-arm credit_timer if needed */ + if (trx_is_usable(bts->c0)) { + paging_schedule_if_needed(&bts->paging); + osmo_timer_schedule(&bts->paging.credit_timer, + bts_no_ccch_load_ind_timeout_sec(bts), 0); + } } /*! Count the number of pending paging requests on given BTS */ @@ -680,3 +676,53 @@ } return time_us; } + +/* Callback function to be called every time we receive a signal from NM */ +static int nm_sig_cb(unsigned int subsys, unsigned int signal, + void *handler_data, void *signal_data) +{ + struct nm_running_chg_signal_data *nsd; + struct gsm_bts *bts; + struct gsm_bts_trx *trx; + unsigned int load_ind_timeout; + + if (signal != S_NM_RUNNING_CHG) + return 0; + nsd = signal_data; + bts = nsd->bts; + switch (nsd->obj_class) { + case NM_OC_RADIO_CARRIER: + trx = (struct gsm_bts_trx *)nsd->obj; + break; + case NM_OC_BASEB_TRANSC: + trx = gsm_bts_bb_trx_get_trx((struct gsm_bts_bb_trx *)nsd->obj); + break; + default: + return 0; + } + if (trx != trx->bts->c0) + return 0; + if (nsd->running) { + if (trx_is_usable(trx)) { + LOG_BTS(bts, DPAG, LOGL_INFO, "C0 becomes available for paging\n"); + /* Fill in initial credit */ + load_ind_timeout = bts_no_ccch_load_ind_timeout_sec(bts); + bts->paging.available_slots = paging_estimate_available_slots(bts, load_ind_timeout); + /* Start scheduling credit_timer */ + osmo_timer_schedule(&bts->paging.credit_timer, + bts_no_ccch_load_ind_timeout_sec(bts), 0); + /* work_timer will be started when new paging requests arrive. */ + } + } else { + LOG_BTS(bts, DPAG, LOGL_INFO, "C0 becomes unavailable for paging\n"); + osmo_timer_del(&bts->paging.work_timer); + osmo_timer_del(&bts->paging.credit_timer); + } + return 0; +} + +/* To be called once at startup of the process: */ +void paging_global_init(void) +{ + osmo_signal_register_handler(SS_NM, nm_sig_cb, NULL); +} -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28047 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I1b5b1a98115b4e9d821eb3330fc5b970a0e78a44 Gerrit-Change-Number: 28047 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: acc: Fix erratic ramping behavior when several BTS configured
by pespin 04 May '22

04 May '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28045 ) Change subject: acc: Fix erratic ramping behavior when several BTS configured ...................................................................... acc: Fix erratic ramping behavior when several BTS configured One callback function was being registered for each BTS. That means, when a C0 RCARRIER of one specific BTS changed NM state, the outcome on whether to trigger/abort ramping would end up being applied to all BTS. Change-Id: I56c4dd1809fdcf8441a69bf77ad173e1ccc8eea7 --- M include/osmocom/bsc/acc.h M src/osmo-bsc/acc.c M src/osmo-bsc/osmo_bsc_main.c 3 files changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/45/28045/1 diff --git a/include/osmocom/bsc/acc.h b/include/osmocom/bsc/acc.h index c7be38c..531a69a 100644 --- a/include/osmocom/bsc/acc.h +++ b/include/osmocom/bsc/acc.h @@ -161,6 +161,8 @@ return acc_ramp->step_interval_sec; } +void acc_ramp_global_init(void); + void acc_ramp_init(struct acc_ramp *acc_ramp, struct gsm_bts *bts); int acc_ramp_set_step_size(struct acc_ramp *acc_ramp, unsigned int step_size); int acc_ramp_set_step_interval(struct acc_ramp *acc_ramp, unsigned int step_interval); diff --git a/src/osmo-bsc/acc.c b/src/osmo-bsc/acc.c index 9734a28..b75e9b8 100644 --- a/src/osmo-bsc/acc.c +++ b/src/osmo-bsc/acc.c @@ -414,7 +414,6 @@ static int acc_ramp_nm_sig_cb(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) { struct nm_statechg_signal_data *nsd = signal_data; - struct acc_ramp *acc_ramp = handler_data; struct gsm_bts_trx *trx = NULL; bool trigger_ramping = false, abort_ramping = false; @@ -523,9 +522,9 @@ } if (trigger_ramping) - acc_ramp_trigger(acc_ramp); + acc_ramp_trigger(&trx->bts->acc_ramp); else if (abort_ramping) - acc_ramp_abort(acc_ramp); + acc_ramp_abort(&trx->bts->acc_ramp); return 0; } @@ -548,7 +547,6 @@ acc_ramp->chan_load_lower_threshold = ACC_RAMP_CHAN_LOAD_THRESHOLD_LOW; acc_ramp->chan_load_upper_threshold = ACC_RAMP_CHAN_LOAD_THRESHOLD_UP; osmo_timer_setup(&acc_ramp->step_timer, do_acc_ramping_step, acc_ramp); - osmo_signal_register_handler(SS_NM, acc_ramp_nm_sig_cb, acc_ramp); } /*! @@ -646,3 +644,8 @@ acc_mgr_set_len_allowed_ramp(&acc_ramp->bts->acc_mgr, 10); } + +void acc_ramp_global_init(void) +{ + osmo_signal_register_handler(SS_NM, acc_ramp_nm_sig_cb, NULL); +} diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 12ddbd2..8d63183 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -929,6 +929,7 @@ assignment_fsm_init(); handover_fsm_init(); lb_init(); + acc_ramp_global_init(); /* Read the config */ rc = bsc_network_configure(config_file); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28045 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I56c4dd1809fdcf8441a69bf77ad173e1ccc8eea7 Gerrit-Change-Number: 28045 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: constify state pointers of struct gsm_nm_state
by fixeria 04 May '22

04 May '22
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28037 ) Change subject: constify state pointers of struct gsm_nm_state ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28037 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I9979e62eac861e25bbe2161ab187ddb2b40fd097 Gerrit-Change-Number: 28037 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 04 May 2022 17:07:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • ...
  • 135
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.