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_is_running(): Drop duplicate check
by pespin 06 May '22

06 May '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28040 ) Change subject: nm_is_running(): Drop duplicate check ...................................................................... nm_is_running(): Drop duplicate check NM_AVSTATE_OK is 0xff, so we are checking twice against same value. Change-Id: Idac56e5eca2b6f6998195ec764fac7edbc8f53e2 --- M src/osmo-bsc/gsm_data.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved osmith: Looks good to me, approved fixeria: Looks good to me, approved diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index de298a8..3438eaf 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -760,7 +760,7 @@ bool nm_is_running(const struct gsm_nm_state *s) { if (s->operational != NM_OPSTATE_ENABLED) return false; - if ((s->availability != NM_AVSTATE_OK) && (s->availability != 0xff)) + if (s->availability != NM_AVSTATE_OK) return false; if (s->administrative != NM_STATE_UNLOCKED) return false; 3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28040 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Idac56e5eca2b6f6998195ec764fac7edbc8f53e2 Gerrit-Change-Number: 28040 Gerrit-PatchSet: 4 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-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[master]: nm_statechg_signal_data: Convert state ptr to data
by pespin 06 May '22

06 May '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28038 ) Change subject: nm_statechg_signal_data: Convert state ptr to data ...................................................................... nm_statechg_signal_data: Convert state ptr to data There's no need to use pointers there, it is only asking for errors from code handling the data structe from the signal by attempting to change them. Even for mem size point of view it doesn't make sense, since it's 3 byte vs a 4 byte pointer. Furthermore, this is a preparation for new commit, where the NM object current state will be updated before emitting the signal. This patch eases a lot the follow up mentioned patch. Change-Id: I9b648dfd8392b7b40bfe2b38f3345017481f5129 --- M include/osmocom/bsc/signal.h M src/ipaccess/ipaccess-config.c M src/osmo-bsc/abis_nm.c M src/osmo-bsc/abis_om2000.c M src/osmo-bsc/acc.c M src/osmo-bsc/nm_bb_transc_fsm.c M src/osmo-bsc/nm_bts_fsm.c M src/osmo-bsc/nm_bts_sm_fsm.c M src/osmo-bsc/nm_channel_fsm.c M src/osmo-bsc/nm_gprs_cell_fsm.c M src/osmo-bsc/nm_gprs_nse_fsm.c M src/osmo-bsc/nm_gprs_nsvc_fsm.c M src/osmo-bsc/nm_rcarrier_fsm.c 13 files changed, 98 insertions(+), 102 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/include/osmocom/bsc/signal.h b/include/osmocom/bsc/signal.h index f775b5b..17c9c03 100644 --- a/include/osmocom/bsc/signal.h +++ b/include/osmocom/bsc/signal.h @@ -131,8 +131,8 @@ struct gsm_bts *bts; uint8_t obj_class; void *obj; - const struct gsm_nm_state *old_state; - const struct gsm_nm_state *new_state; + struct gsm_nm_state old_state; + struct gsm_nm_state new_state; /* This pointer is valid for TS 12.21 MO */ struct abis_om_obj_inst *obj_inst; diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index 332e349..76f10f5 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -369,8 +369,8 @@ break; case S_NM_STATECHG: nsd = signal_data; - nm_state_event(signal, nsd->obj_class, nsd->obj, nsd->old_state, - nsd->new_state, nsd->obj_inst); + nm_state_event(signal, nsd->obj_class, nsd->obj, &nsd->old_state, + &nsd->new_state, nsd->obj_inst); break; case S_NM_GET_ATTR_REP: fprintf(stderr, "Received SIGNAL S_NM_GET_ATTR_REP\n"); diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index e1e8efa..cdb1fa6 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -210,7 +210,7 @@ static int update_admstate(struct gsm_bts *bts, uint8_t obj_class, struct abis_om_obj_inst *obj_inst, uint8_t adm_state) { - struct gsm_nm_state *nm_state, new_state; + struct gsm_nm_state *nm_state; struct nm_statechg_signal_data nsd; memset(&nsd, 0, sizeof(nsd)); @@ -222,18 +222,16 @@ if (!nm_state) return -1; - new_state = *nm_state; - new_state.administrative = adm_state; - nsd.bts = bts; nsd.obj_class = obj_class; - nsd.old_state = nm_state; - nsd.new_state = &new_state; + nsd.old_state = *nm_state; + nsd.new_state = *nm_state; nsd.obj_inst = obj_inst; + + nsd.new_state.administrative = adm_state; + osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd); - nm_state->administrative = adm_state; - return 0; } @@ -244,17 +242,27 @@ struct e1inp_sign_link *sign_link = mb->dst; struct gsm_bts *bts = sign_link->trx->bts; struct tlv_parsed tp; - struct gsm_nm_state *nm_state, new_state; + struct gsm_nm_state *nm_state; + struct nm_statechg_signal_data nsd; - memset(&new_state, 0, sizeof(new_state)); + memset(&nsd, 0, sizeof(nsd)); + nsd.obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst); + if (!nsd.obj) { + LOGPFOH(DNM, LOGL_ERROR, foh, "unknown managed object\n"); + return -EINVAL; + } nm_state = gsm_objclass2nmstate(bts, foh->obj_class, &foh->obj_inst); if (!nm_state) { LOGPFOH(DNM, LOGL_ERROR, foh, "unknown managed object\n"); return -EINVAL; } - new_state = *nm_state; + nsd.obj_class = foh->obj_class; + nsd.old_state = *nm_state; + nsd.new_state = *nm_state; + nsd.obj_inst = &foh->obj_inst; + nsd.bts = bts; if (abis_nm_tlv_parse(&tp, bts, foh->data, oh->length - sizeof(*foh)) < 0) { LOGPFOH(DNM, LOGL_ERROR, foh, "%s(): tlv_parse failed\n", __func__); @@ -263,45 +271,35 @@ DEBUGPFOH(DNM, foh, "STATE CHG: "); if (TLVP_PRESENT(&tp, NM_ATT_OPER_STATE)) { - new_state.operational = *TLVP_VAL(&tp, NM_ATT_OPER_STATE); + nsd.new_state.operational = *TLVP_VAL(&tp, NM_ATT_OPER_STATE); DEBUGPC(DNM, "OP_STATE=%s ", - abis_nm_opstate_name(new_state.operational)); + abis_nm_opstate_name(nsd.new_state.operational)); } if (TLVP_PRESENT(&tp, NM_ATT_AVAIL_STATUS)) { if (TLVP_LEN(&tp, NM_ATT_AVAIL_STATUS) == 0) - new_state.availability = NM_AVSTATE_OK; + nsd.new_state.availability = NM_AVSTATE_OK; else - new_state.availability = *TLVP_VAL(&tp, NM_ATT_AVAIL_STATUS); + nsd.new_state.availability = *TLVP_VAL(&tp, NM_ATT_AVAIL_STATUS); DEBUGPC(DNM, "AVAIL=%s(%02x) ", - abis_nm_avail_name(new_state.availability), - new_state.availability); + abis_nm_avail_name(nsd.new_state.availability), + nsd.new_state.availability); } else - new_state.availability = NM_AVSTATE_OK; + nsd.new_state.availability = NM_AVSTATE_OK; if (TLVP_PRESENT(&tp, NM_ATT_ADM_STATE)) { - new_state.administrative = *TLVP_VAL(&tp, NM_ATT_ADM_STATE); + nsd.new_state.administrative = *TLVP_VAL(&tp, NM_ATT_ADM_STATE); DEBUGPC(DNM, "ADM=%2s ", get_value_string(abis_nm_adm_state_names, - new_state.administrative)); + nsd.new_state.administrative)); } - if ((new_state.administrative != 0 && nm_state->administrative == 0) || - new_state.operational != nm_state->operational || - new_state.availability != nm_state->availability) { + if ((nsd.new_state.administrative != 0 && nsd.old_state.administrative == 0) || + nsd.new_state.operational != nsd.old_state.operational || + nsd.new_state.availability != nsd.old_state.availability) { DEBUGPC(DNM, "\n"); /* Update the operational state of a given object in our in-memory data * structures and send an event to the higher layer */ - struct nm_statechg_signal_data nsd; - nsd.obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst); - nsd.obj_class = foh->obj_class; - nsd.old_state = nm_state; - nsd.new_state = &new_state; - nsd.obj_inst = &foh->obj_inst; - nsd.bts = bts; osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd); - nm_state->operational = new_state.operational; - nm_state->availability = new_state.availability; - if (nm_state->administrative == 0) - nm_state->administrative = new_state.administrative; + *nm_state = nsd.new_state; } else { DEBUGPC(DNM, "(No State change detected)\n"); } diff --git a/src/osmo-bsc/abis_om2000.c b/src/osmo-bsc/abis_om2000.c index 18d0728..04c783b 100644 --- a/src/osmo-bsc/abis_om2000.c +++ b/src/osmo-bsc/abis_om2000.c @@ -950,13 +950,20 @@ static void update_mo_state(struct gsm_bts *bts, struct abis_om2k_mo *mo, uint8_t mo_state) { struct gsm_nm_state *nm_state = mo2nm_state(bts, mo); - struct gsm_nm_state new_state; struct nm_statechg_signal_data nsd; bool has_enabled_state; if (!nm_state) return; + memset(&nsd, 0, sizeof(nsd)); + + nsd.bts = bts; + nsd.obj = mo2obj(bts, mo); + nsd.old_state = *nm_state; + nsd.new_state = *nm_state; + nsd.om2k_mo = mo; + switch (mo->class) { case OM2K_MO_CLS_CF: case OM2K_MO_CLS_TRXC: @@ -967,36 +974,27 @@ break; } - new_state = *nm_state; switch (mo_state) { case OM2K_MOSTATE_RESET: - new_state.availability = NM_AVSTATE_POWER_OFF; + nsd.new_state.availability = NM_AVSTATE_POWER_OFF; break; case OM2K_MOSTATE_STARTED: - new_state.availability = has_enabled_state ? NM_AVSTATE_OFF_LINE : NM_AVSTATE_OK; + nsd.new_state.availability = has_enabled_state ? NM_AVSTATE_OFF_LINE : NM_AVSTATE_OK; break; case OM2K_MOSTATE_ENABLED: - new_state.availability = NM_AVSTATE_OK; + nsd.new_state.availability = NM_AVSTATE_OK; break; case OM2K_MOSTATE_DISABLED: - new_state.availability = NM_AVSTATE_POWER_OFF; + nsd.new_state.availability = NM_AVSTATE_POWER_OFF; break; default: - new_state.availability = NM_AVSTATE_DEGRADED; + nsd.new_state.availability = NM_AVSTATE_DEGRADED; break; } - memset(&nsd, 0, sizeof(nsd)); - - nsd.bts = bts; - nsd.obj = mo2obj(bts, mo); - nsd.old_state = nm_state; - nsd.new_state = &new_state; - nsd.om2k_mo = mo; - osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd); - nm_state->availability = new_state.availability; + nm_state->availability = nsd.new_state.availability; } static void update_op_state(struct gsm_bts *bts, const struct abis_om2k_mo *mo, uint8_t op_state) diff --git a/src/osmo-bsc/acc.c b/src/osmo-bsc/acc.c index 1172fd8..61a226c 100644 --- a/src/osmo-bsc/acc.c +++ b/src/osmo-bsc/acc.c @@ -427,11 +427,11 @@ trx = nsd->obj; LOG_TRX(trx, DRSL, LOGL_DEBUG, "ACC RAMP: administrative state %s -> %s\n", - get_value_string(abis_nm_adm_state_names, nsd->old_state->administrative), - get_value_string(abis_nm_adm_state_names, nsd->new_state->administrative)); + get_value_string(abis_nm_adm_state_names, nsd->old_state.administrative), + get_value_string(abis_nm_adm_state_names, nsd->new_state.administrative)); LOG_TRX(trx, DRSL, LOGL_DEBUG, "ACC RAMP: operational state %s -> %s\n", - abis_nm_opstate_name(nsd->old_state->operational), - abis_nm_opstate_name(nsd->new_state->operational)); + abis_nm_opstate_name(nsd->old_state.operational), + abis_nm_opstate_name(nsd->new_state.operational)); /* We only care about state changes of the first TRX. */ if (trx->nr != 0) @@ -445,21 +445,21 @@ } /* Trigger or abort ACC ramping based on the new state of this TRX. */ - if (nsd->old_state->administrative != nsd->new_state->administrative) { - switch (nsd->new_state->administrative) { + if (nsd->old_state.administrative != nsd->new_state.administrative) { + switch (nsd->new_state.administrative) { case NM_STATE_UNLOCKED: - if (nsd->old_state->operational != nsd->new_state->operational) { + if (nsd->old_state.operational != nsd->new_state.operational) { /* * Administrative and operational state have both changed. * Trigger ramping only if TRX 0 will be both enabled and unlocked. */ - if (nsd->new_state->operational == NM_OPSTATE_ENABLED) + if (nsd->new_state.operational == NM_OPSTATE_ENABLED) trigger_ramping = true; else LOG_TRX(trx, DRSL, LOGL_DEBUG, "ACC RAMP: ignoring state change because TRX is " "transitioning into operational state '%s'\n", - abis_nm_opstate_name(nsd->new_state->operational)); + abis_nm_opstate_name(nsd->new_state.operational)); } else { /* * Operational state has not changed. @@ -479,24 +479,24 @@ case NM_STATE_NULL: default: LOG_TRX(trx, DRSL, LOGL_ERROR, "ACC RAMP: unrecognized administrative state '0x%x' " - "reported for TRX 0\n", nsd->new_state->administrative); + "reported for TRX 0\n", nsd->new_state.administrative); break; } } - if (nsd->old_state->operational != nsd->new_state->operational) { - switch (nsd->new_state->operational) { + if (nsd->old_state.operational != nsd->new_state.operational) { + switch (nsd->new_state.operational) { case NM_OPSTATE_ENABLED: - if (nsd->old_state->administrative != nsd->new_state->administrative) { + if (nsd->old_state.administrative != nsd->new_state.administrative) { /* * Administrative and operational state have both changed. * Trigger ramping only if TRX 0 will be both enabled and unlocked. */ - if (nsd->new_state->administrative == NM_STATE_UNLOCKED) + if (nsd->new_state.administrative == NM_STATE_UNLOCKED) trigger_ramping = true; else LOG_TRX(trx, DRSL, LOGL_DEBUG, "ACC RAMP: ignoring state change " "because TRX is transitioning into administrative state '%s'\n", - get_value_string(abis_nm_adm_state_names, nsd->new_state->administrative)); + get_value_string(abis_nm_adm_state_names, nsd->new_state.administrative)); } else { /* * Administrative state has not changed. @@ -516,7 +516,7 @@ case NM_OPSTATE_NULL: default: LOG_TRX(trx, DRSL, LOGL_ERROR, "ACC RAMP: unrecognized operational state '0x%x' " - "reported for TRX 0\n", nsd->new_state->administrative); + "reported for TRX 0\n", nsd->new_state.administrative); break; } } diff --git a/src/osmo-bsc/nm_bb_transc_fsm.c b/src/osmo-bsc/nm_bb_transc_fsm.c index dc8c682..a4cef9c 100644 --- a/src/osmo-bsc/nm_bb_transc_fsm.c +++ b/src/osmo-bsc/nm_bb_transc_fsm.c @@ -64,7 +64,7 @@ break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /*should not happen... */ nm_bb_transc_fsm_state_chg(fi, NM_BB_TRANSC_ST_OP_ENABLED); @@ -149,7 +149,7 @@ return; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /* should not happen... */ nm_bb_transc_fsm_state_chg(fi, NM_BB_TRANSC_ST_OP_ENABLED); @@ -199,7 +199,7 @@ return; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { nm_bb_transc_fsm_state_chg(fi, NM_BB_TRANSC_ST_OP_ENABLED); return; @@ -253,7 +253,7 @@ switch (event) { case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) return; switch (new_state->availability) { /* operational = DISABLED */ diff --git a/src/osmo-bsc/nm_bts_fsm.c b/src/osmo-bsc/nm_bts_fsm.c index 5216ec8..79ae6a7 100644 --- a/src/osmo-bsc/nm_bts_fsm.c +++ b/src/osmo-bsc/nm_bts_fsm.c @@ -66,7 +66,7 @@ break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /*should not happen... */ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_ENABLED); @@ -177,7 +177,7 @@ return; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /* should not happen... */ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_ENABLED); @@ -229,7 +229,7 @@ return; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_ENABLED); return; @@ -285,7 +285,7 @@ switch (event) { case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) return; switch (new_state->availability) { /* operational = DISABLED */ diff --git a/src/osmo-bsc/nm_bts_sm_fsm.c b/src/osmo-bsc/nm_bts_sm_fsm.c index b99fb53..03bf43c 100644 --- a/src/osmo-bsc/nm_bts_sm_fsm.c +++ b/src/osmo-bsc/nm_bts_sm_fsm.c @@ -64,7 +64,7 @@ break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /* nanobts always go directly into Reported ENABLED state during startup, but we still need to OPSTART it, otherwise it won't @@ -107,7 +107,7 @@ switch (event) { case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { nm_bts_sm_fsm_state_chg(fi, NM_BTS_SM_ST_OP_ENABLED); return; @@ -147,7 +147,7 @@ switch (event) { case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { nm_bts_sm_fsm_state_chg(fi, NM_BTS_SM_ST_OP_ENABLED); return; @@ -178,7 +178,7 @@ switch (event) { case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) return; switch (new_state->availability) { /* operational = DISABLED */ diff --git a/src/osmo-bsc/nm_channel_fsm.c b/src/osmo-bsc/nm_channel_fsm.c index a4f0839..680e658 100644 --- a/src/osmo-bsc/nm_channel_fsm.c +++ b/src/osmo-bsc/nm_channel_fsm.c @@ -65,7 +65,7 @@ break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /*should not happen... */ nm_chan_fsm_state_chg(fi, NM_CHAN_ST_OP_ENABLED); @@ -138,7 +138,7 @@ return; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /* should not happen... */ nm_chan_fsm_state_chg(fi, NM_CHAN_ST_OP_ENABLED); @@ -187,7 +187,7 @@ return; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { nm_chan_fsm_state_chg(fi, NM_CHAN_ST_OP_ENABLED); return; @@ -241,7 +241,7 @@ switch (event) { case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) return; switch (new_state->availability) { /* operational = DISABLED */ diff --git a/src/osmo-bsc/nm_gprs_cell_fsm.c b/src/osmo-bsc/nm_gprs_cell_fsm.c index cf91397..9a656e1 100644 --- a/src/osmo-bsc/nm_gprs_cell_fsm.c +++ b/src/osmo-bsc/nm_gprs_cell_fsm.c @@ -64,7 +64,7 @@ break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /* should not happen... */ nm_gprs_cell_fsm_state_chg(fi, NM_GPRS_CELL_ST_OP_ENABLED); @@ -148,7 +148,7 @@ return; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /* should not happen... */ nm_gprs_cell_fsm_state_chg(fi, NM_GPRS_CELL_ST_OP_ENABLED); @@ -198,7 +198,7 @@ return; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { nm_gprs_cell_fsm_state_chg(fi, NM_GPRS_CELL_ST_OP_ENABLED); return; @@ -252,7 +252,7 @@ switch (event) { case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) return; switch (new_state->availability) { /* operational = DISABLED */ diff --git a/src/osmo-bsc/nm_gprs_nse_fsm.c b/src/osmo-bsc/nm_gprs_nse_fsm.c index 2d6e13b..4ad623e 100644 --- a/src/osmo-bsc/nm_gprs_nse_fsm.c +++ b/src/osmo-bsc/nm_gprs_nse_fsm.c @@ -65,7 +65,7 @@ break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /* should not happen... */ nm_gprs_nse_fsm_state_chg(fi, NM_GPRS_NSE_ST_OP_ENABLED); @@ -149,7 +149,7 @@ return; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /* should not happen... */ nm_gprs_nse_fsm_state_chg(fi, NM_GPRS_NSE_ST_OP_ENABLED); @@ -199,7 +199,7 @@ return; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { nm_gprs_nse_fsm_state_chg(fi, NM_GPRS_NSE_ST_OP_ENABLED); return; @@ -253,7 +253,7 @@ switch (event) { case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) return; switch (new_state->availability) { /* operational = DISABLED */ diff --git a/src/osmo-bsc/nm_gprs_nsvc_fsm.c b/src/osmo-bsc/nm_gprs_nsvc_fsm.c index c2b7db3..75cf4d6 100644 --- a/src/osmo-bsc/nm_gprs_nsvc_fsm.c +++ b/src/osmo-bsc/nm_gprs_nsvc_fsm.c @@ -68,7 +68,7 @@ break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /* should not happen... */ nm_gprs_nsvc_fsm_state_chg(fi, NM_GPRS_NSVC_ST_OP_ENABLED); @@ -164,7 +164,7 @@ return; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /* should not happen... */ nm_gprs_nsvc_fsm_state_chg(fi, NM_GPRS_NSVC_ST_OP_ENABLED); @@ -216,7 +216,7 @@ return; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { nm_gprs_nsvc_fsm_state_chg(fi, NM_GPRS_NSVC_ST_OP_ENABLED); return; @@ -270,7 +270,7 @@ switch (event) { case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) return; switch (new_state->availability) { /* operational = DISABLED */ diff --git a/src/osmo-bsc/nm_rcarrier_fsm.c b/src/osmo-bsc/nm_rcarrier_fsm.c index 0cdba68..f3c230d 100644 --- a/src/osmo-bsc/nm_rcarrier_fsm.c +++ b/src/osmo-bsc/nm_rcarrier_fsm.c @@ -64,7 +64,7 @@ break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /*should not happen... */ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_ENABLED); @@ -144,7 +144,7 @@ return; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { /* should not happen... */ nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_ENABLED); @@ -193,7 +193,7 @@ return; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) { nm_rcarrier_fsm_state_chg(fi, NM_RCARRIER_ST_OP_ENABLED); return; @@ -238,7 +238,7 @@ switch (event) { case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; - new_state = nsd->new_state; + new_state = &nsd->new_state; if (new_state->operational == NM_OPSTATE_ENABLED) return; switch (new_state->availability) { /* operational = DISABLED */ -- 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: 4 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-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[master]: nm_statechg_signal_data: Convert state ptr to data
by pespin 06 May '22

06 May '22
Attention is currently required from: fixeria. pespin 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 4: Code-Review+2 -- 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: 4 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-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 06 May 2022 13:26:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: fix fallout from: 'stats: new trackers for lchan life duration'
by neels 06 May '22

06 May '22
Attention is currently required from: iedemam. Hello Jenkins Builder, iedemam, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/28061 to look at the new patch set (#2). Change subject: fix fallout from: 'stats: new trackers for lchan life duration' ...................................................................... fix fallout from: 'stats: new trackers for lchan life duration' In lchan_fsm_cleanup(), ensure that the time_cc timer is actually inactive before deallocating. Do so via lchan_reset(), to also make sure the timer is stopped in all other situations where the lchan is deactivated. This fixes an infinite-loop deadlock as described in OS#5554: - run BSC_Tests.TC_chan_act_ack_est_ind_noreply - restart the BTS process after the test is done - osmo-bsc enters infinite loop in osmo_timer_del() The reason is that lchan_fsm_cleanup() fails to stop a running active_cc timer upon lchan deallocation. TC_chan_act_ack_est_ind_noreply incidentally terminates OML while the timer is still active. Related: OS#5554 Change-Id: I901bb86a78d7d021c8efe751fd9d93e5956ac0e0 --- M src/osmo-bsc/lchan_fsm.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/61/28061/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28061 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I901bb86a78d7d021c8efe751fd9d93e5956ac0e0 Gerrit-Change-Number: 28061 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: iedemam <michael(a)kapsulate.com> Gerrit-Attention: iedemam <michael(a)kapsulate.com> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-bsc[master]: fix fallout from: 'stats: new trackers for lchan life duration'
by neels 06 May '22

06 May '22
Attention is currently required from: iedemam. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28061 ) Change subject: fix fallout from: 'stats: new trackers for lchan life duration' ...................................................................... Patch Set 1: (1 comment) File src/osmo-bsc/lchan_fsm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/28061/comment/002ab155_9a0c1a72 PS1, Line 531: osmo_time_cc_cleanup(&lchan->active_cc); > hm, this fix works, yet below, the active_cc is actually not cleared out but kept as-is. […] it is like this: when a BTS terminates the connection, it terminates and deallocates the timeslot and lchan FSM instances. So the important part is that the timer is deactivated in lchan_fsm_cleanup(), before deallocation. calling osmo_time_cc_cleanup() stops the timer if running. it's anyway also a good thing to make sure the timer is stopped in lchan_reset(), which is called in the lchan life cycle whenever the lchan "stops" or "starts over". -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28061 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I901bb86a78d7d021c8efe751fd9d93e5956ac0e0 Gerrit-Change-Number: 28061 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: iedemam <michael(a)kapsulate.com> Gerrit-Attention: iedemam <michael(a)kapsulate.com> Gerrit-Comment-Date: Fri, 06 May 2022 13:12:25 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: fix fallout from: 'stats: new trackers for lchan life duration'
by neels 06 May '22

06 May '22
Attention is currently required from: iedemam. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28061 ) Change subject: fix fallout from: 'stats: new trackers for lchan life duration' ...................................................................... Patch Set 1: (1 comment) File src/osmo-bsc/lchan_fsm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/28061/comment/b01bc750_57ad3807 PS1, Line 531: osmo_time_cc_cleanup(&lchan->active_cc); hm, this fix works, yet below, the active_cc is actually not cleared out but kept as-is. i realize i'm not entirely sure why this makes a difference -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28061 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I901bb86a78d7d021c8efe751fd9d93e5956ac0e0 Gerrit-Change-Number: 28061 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: iedemam <michael(a)kapsulate.com> Gerrit-CC: Jenkins Builder Gerrit-Attention: iedemam <michael(a)kapsulate.com> Gerrit-Comment-Date: Fri, 06 May 2022 13:05:29 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: fix fallout from: 'stats: new trackers for lchan life duration'
by neels 06 May '22

06 May '22
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28061 ) Change subject: fix fallout from: 'stats: new trackers for lchan life duration' ...................................................................... fix fallout from: 'stats: new trackers for lchan life duration' In lchan_reset(), ensure that the time_cc timer is actually inactive before nulling the entire lchan state. This fixes an infinite-loop deadlock as described in OS#5554: - run BSC_Tests.TC_chan_act_ack_est_ind_noreply - restart the BTS process after the test is done - osmo-bsc enters infinite loop in osmo_timer_del() The reason is that lchan_reset() is called from a different place than lchan_fsm_unused_onenter(), where the time_cc is stopped first. The timer is still active when lchan_reset() clears all lchan state. Related: OS#5554 Change-Id: I901bb86a78d7d021c8efe751fd9d93e5956ac0e0 --- M src/osmo-bsc/lchan_fsm.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/61/28061/1 diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index d693189..4f1a2e5 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -528,6 +528,8 @@ lchan->mgw_endpoint_ci_bts = NULL; } + osmo_time_cc_cleanup(&lchan->active_cc); + /* NUL all volatile state */ *lchan = (struct gsm_lchan){ .ts = lchan->ts, -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28061 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I901bb86a78d7d021c8efe751fd9d93e5956ac0e0 Gerrit-Change-Number: 28061 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bts[master]: osmo-bts-trx: drop Uplink loss detection from Downlink path
by fixeria 06 May '22

06 May '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/20674 ) Change subject: osmo-bts-trx: drop Uplink loss detection from Downlink path ...................................................................... osmo-bts-trx: drop Uplink loss detection from Downlink path Attempting to detect missing Uplink frames in the *Downlink* path is an ugly hack, that was needed before we had proper per-lchan detection of missing bursts and NOPE indications in TRXDv1. * [1] per-lchan detection of missing bursts was fixed in Aug 2018. * [2] TRXDv1 support was introduced in Jul 2019. Today is 2022 and it makes no sense to keep this hack. Even if the transceiver does not support TRXDv1, per-lchan detection will compensate the missing Uplink bursts. Change-Id: Ic292d180ba64206fb4d88adb284f9f9d058b4587 Related: [1] I70d05b67a35ddcbdd1b6394dbd7198404a440e76 Related: [2] If61c71d20d590bf07bfd019afb33000a0b6135bd --- M include/osmo-bts/scheduler.h M src/common/scheduler.c M src/osmo-bts-trx/sched_lchan_tchf.c M src/osmo-bts-trx/sched_lchan_xcch.c M src/osmo-bts-virtual/scheduler_virtbts.c 5 files changed, 0 insertions(+), 122 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h index eab904c..51b1846 100644 --- a/include/osmo-bts/scheduler.h +++ b/include/osmo-bts/scheduler.h @@ -103,7 +103,6 @@ uint8_t ul_mask; /* mask of received bursts */ /* loss detection */ - uint8_t lost_frames; /* how many L2 frames were lost */ uint32_t last_tdma_fn; /* last processed TDMA frame number */ uint32_t proc_tdma_fs; /* how many TDMA frames were processed */ uint32_t lost_tdma_fs; /* how many TDMA frames were lost */ diff --git a/src/common/scheduler.c b/src/common/scheduler.c index d166909..6564e5a 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -788,9 +788,6 @@ if (l2_len) memcpy(msg->l2h, l2, l2_len); - if (L1SAP_IS_LINK_SACCH(trx_chan_desc[chan].link_id)) - l1ts->chan_state[chan].lost_frames = 0; - /* forward primitive */ l1sap_up(l1ts->ts->trx, l1sap); @@ -828,9 +825,6 @@ if (tch_len) memcpy(msg->l2h, tch, tch_len); - if (l1ts->chan_state[chan].lost_frames) - l1ts->chan_state[chan].lost_frames--; - LOGL1S(DL1P, LOGL_DEBUG, l1ts, chan, l1sap->u.data.fn, "%s Rx -> RTP: %s\n", gsm_lchan_name(lchan), osmo_hexdump(msgb_l2(msg), msgb_l2len(msg))); /* forward primitive */ diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c index 20abfe1..6a90327 100644 --- a/src/osmo-bts-trx/sched_lchan_tchf.c +++ b/src/osmo-bts-trx/sched_lchan_tchf.c @@ -332,59 +332,6 @@ uint8_t tch_mode = chan_state->tch_mode; struct osmo_phsap_prim *l1sap; - /* handle loss detection of received TCH frames */ - if (rsl_cmode == RSL_CMOD_SPD_SPEECH - && ++(chan_state->lost_frames) > 5) { - uint8_t tch_data[GSM_FR_BYTES]; - int len; - - LOGL1SB(DL1P, LOGL_NOTICE, l1ts, br, "Missing TCH bursts detected, sending BFI\n"); - - /* indicate bad frame */ - switch (tch_mode) { - case GSM48_CMODE_SPEECH_V1: /* FR / HR */ - if (br->chan != TRXC_TCHF) { /* HR */ - tch_data[0] = 0x70; /* F = 0, FT = 111 */ - memset(tch_data + 1, 0, 14); - len = 15; - break; - } - memset(tch_data, 0, GSM_FR_BYTES); - len = GSM_FR_BYTES; - break; - case GSM48_CMODE_SPEECH_EFR: /* EFR */ - if (br->chan != TRXC_TCHF) - goto inval_mode1; - memset(tch_data, 0, GSM_EFR_BYTES); - len = GSM_EFR_BYTES; - break; - case GSM48_CMODE_SPEECH_AMR: /* AMR */ - len = osmo_amr_rtp_enc(tch_data, - chan_state->codec[chan_state->dl_cmr], - chan_state->codec[chan_state->dl_ft], AMR_BAD); - if (len < 2) { - LOGL1SB(DL1P, LOGL_ERROR, l1ts, br, - "Failed to encode AMR_BAD frame (rc=%d), " - "not sending BFI\n", len); - len = 0; - break; - } - memset(tch_data + 2, 0, len - 2); - break; - default: -inval_mode1: - LOGL1SB(DL1P, LOGL_ERROR, l1ts, br, "TCH mode invalid, please fix!\n"); - len = 0; - } - - if (len) { - /* Note: RSSI/ToA256 is set to 0 to indicate to the higher - * layers that this is a faked tch_ind */ - _sched_compose_tch_ind(l1ts, br->fn, br->chan, - tch_data, len, 0, 10000, 0, 0, 0); - } - } - /* get frame and unlink from queue */ msg1 = _sched_dequeue_prim(l1ts, br); msg2 = _sched_dequeue_prim(l1ts, br); diff --git a/src/osmo-bts-trx/sched_lchan_xcch.c b/src/osmo-bts-trx/sched_lchan_xcch.c index 1d529f2..e936621 100644 --- a/src/osmo-bts-trx/sched_lchan_xcch.c +++ b/src/osmo-bts-trx/sched_lchan_xcch.c @@ -207,21 +207,6 @@ /* BURST BYPASS */ - /* handle loss detection of SACCH */ - if (L1SAP_IS_LINK_SACCH(trx_chan_desc[br->chan].link_id)) { - /* count and send BFI */ - if (++(l1ts->chan_state[br->chan].lost_frames) > 1) { - /* TODO: Should we pass old TOA here? Otherwise we risk - * unnecessary decreasing TA */ - - /* Note: RSSI is set to 0 to indicate to the higher - * layers that this is a faked ph_data_ind */ - _sched_compose_ph_data_ind(l1ts, 0, br->chan, NULL, 0, - 0, 0, 0, 10000, - PRES_INFO_INVALID); - } - } - /* allocate burst memory, if not already */ if (!*bursts_p) { *bursts_p = talloc_zero_size(l1ts, 464); diff --git a/src/osmo-bts-virtual/scheduler_virtbts.c b/src/osmo-bts-virtual/scheduler_virtbts.c index a9edb3a..d20cc39 100644 --- a/src/osmo-bts-virtual/scheduler_virtbts.c +++ b/src/osmo-bts-virtual/scheduler_virtbts.c @@ -244,53 +244,6 @@ uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; struct osmo_phsap_prim *l1sap; -#if 0 - /* handle loss detection of received TCH frames */ - if (rsl_cmode == RSL_CMOD_SPD_SPEECH - && ++(chan_state->lost_frames) > 5) { - uint8_t tch_data[GSM_FR_BYTES]; - int len; - - LOGL1SB(DL1P, LOGL_NOTICE, l1ts, br, "Missing TCH bursts detected, sending " - "BFI for %s\n", trx_chan_desc[br->chan].name); - - /* indicate bad frame */ - switch (tch_mode) { - case GSM48_CMODE_SPEECH_V1: /* FR / HR */ - if (br->chan != TRXC_TCHF) { /* HR */ - tch_data[0] = 0x70; /* F = 0, FT = 111 */ - memset(tch_data + 1, 0, 14); - len = 15; - break; - } - memset(tch_data, 0, GSM_FR_BYTES); - len = GSM_FR_BYTES; - break; - case GSM48_CMODE_SPEECH_EFR: /* EFR */ - if (br->chan != TRXC_TCHF) - goto inval_mode1; - memset(tch_data, 0, GSM_EFR_BYTES); - len = GSM_EFR_BYTES; - break; - case GSM48_CMODE_SPEECH_AMR: /* AMR */ - len = amr_compose_payload(tch_data, - chan_state->codec[chan_state->dl_cmr], - chan_state->codec[chan_state->dl_ft], 1); - if (len < 2) - break; - memset(tch_data + 2, 0, len - 2); - _sched_compose_tch_ind(l1ts, 0, br->chan, tch_data, len); - break; - default: -inval_mode1: - LOGP(DL1P, LOGL_ERROR, "TCH mode invalid, please " - "fix!\n"); - len = 0; - } - if (len) - _sched_compose_tch_ind(l1ts, 0, br->chan, tch_data, len); - } -#endif /* get frame and unlink from queue */ msg1 = _sched_dequeue_prim(l1ts, br); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/20674 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ic292d180ba64206fb4d88adb284f9f9d058b4587 Gerrit-Change-Number: 20674 Gerrit-PatchSet: 6 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bts[master]: osmo-bts-trx: drop Uplink loss detection from Downlink path
by fixeria 06 May '22

06 May '22
Attention is currently required from: osmith, dexter. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/20674 ) Change subject: osmo-bts-trx: drop Uplink loss detection from Downlink path ...................................................................... Patch Set 5: Code-Review+2 (1 comment) Patchset: PS5: 1+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/20674 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ic292d180ba64206fb4d88adb284f9f9d058b4587 Gerrit-Change-Number: 20674 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 06 May 2022 12:54:43 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: nm_statechg_signal_data: Convert state ptr to data
by pespin 06 May '22

06 May '22
Attention is currently required from: pespin, fixeria. Hello osmith, Jenkins Builder, laforge, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/28038 to look at the new patch set (#4). Change subject: nm_statechg_signal_data: Convert state ptr to data ...................................................................... nm_statechg_signal_data: Convert state ptr to data There's no need to use pointers there, it is only asking for errors from code handling the data structe from the signal by attempting to change them. Even for mem size point of view it doesn't make sense, since it's 3 byte vs a 4 byte pointer. Furthermore, this is a preparation for new commit, where the NM object current state will be updated before emitting the signal. This patch eases a lot the follow up mentioned patch. Change-Id: I9b648dfd8392b7b40bfe2b38f3345017481f5129 --- M include/osmocom/bsc/signal.h M src/ipaccess/ipaccess-config.c M src/osmo-bsc/abis_nm.c M src/osmo-bsc/abis_om2000.c M src/osmo-bsc/acc.c M src/osmo-bsc/nm_bb_transc_fsm.c M src/osmo-bsc/nm_bts_fsm.c M src/osmo-bsc/nm_bts_sm_fsm.c M src/osmo-bsc/nm_channel_fsm.c M src/osmo-bsc/nm_gprs_cell_fsm.c M src/osmo-bsc/nm_gprs_nse_fsm.c M src/osmo-bsc/nm_gprs_nsvc_fsm.c M src/osmo-bsc/nm_rcarrier_fsm.c 13 files changed, 98 insertions(+), 102 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/38/28038/4 -- 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: 4 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-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • ...
  • 135
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.