This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Stefan Sperling gerrit-no-reply at lists.osmocom.orgStefan Sperling has uploaded this change for review. ( https://gerrit.osmocom.org/11762 Change subject: show dynamic timeslot details in 'show timeslot' vty command ...................................................................... show dynamic timeslot details in 'show timeslot' vty command The 'show lchan' command already shows details about timeslot state, indicating whether a channel is currently being switched to a different channel type. However, this information was not shown by 'show timeslot' yet. There are TTCN3 BSC tests which use 'show timeslot' and are seeing sporadic failures when 'show timeout' is invoked during a channel type transition. With this change, VTY sessions recorded in pcap files for these tests will contain information about the current channel type transition state. Change-Id: Ib854945756fb54c0e1c7d4212ea7b8746eec0db5 Related: OS#3690 --- M src/osmo-bsc/bsc_vty.c 1 file changed, 34 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/62/11762/1 diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 84752dd..4331ca2 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -1151,6 +1151,38 @@ return CMD_SUCCESS; } +/* call vty_out() to print a string like " as TCH/H" for dynamic timeslots. + * Don't do anything if the ts is not dynamic. */ +static void vty_out_dyn_ts_status(struct vty *vty, struct gsm_bts_trx_ts *ts) +{ + enum gsm_phys_chan_config target; + if (ts_is_pchan_switching(ts, &target)) { + vty_out(vty, " switching %s -> %s", gsm_pchan_name(ts->pchan_is), + gsm_pchan_name(target)); + } else if (ts->pchan_is != ts->pchan_on_init) { + vty_out(vty, " as %s", gsm_pchan_name(ts->pchan_is)); + } +} + +static void vty_out_dyn_ts_details(struct vty *vty, struct gsm_bts_trx_ts *ts) +{ + /* show dyn TS details, if applicable */ + switch (ts->pchan_on_init) { + case GSM_PCHAN_TCH_F_TCH_H_PDCH: + vty_out(vty, " Osmocom Dyn TS:"); + vty_out_dyn_ts_status(vty, ts); + vty_out(vty, VTY_NEWLINE); + break; + case GSM_PCHAN_TCH_F_PDCH: + vty_out(vty, " IPACC Dyn PDCH TS:"); + vty_out_dyn_ts_status(vty, ts); + vty_out(vty, VTY_NEWLINE); + break; + default: + /* no dyn ts */ + break; + } +} static void ts_dump_vty(struct vty *vty, struct gsm_bts_trx_ts *ts) { @@ -1160,6 +1192,7 @@ if (ts->pchan_is != ts->pchan_on_init) vty_out(vty, " (%s mode)", gsm_pchan_name(ts->pchan_is)); vty_out(vty, ", TSC %u%s NM State: ", gsm_ts_tsc(ts), VTY_NEWLINE); + vty_out_dyn_ts_details(vty, ts); net_dump_nmstate(vty, &ts->mo.nm_state); if (!is_ipaccess_bts(ts->trx->bts)) vty_out(vty, " E1 Line %u, Timeslot %u, Subslot %u%s", @@ -1287,19 +1320,6 @@ } -/* call vty_out() to print a string like " as TCH/H" for dynamic timeslots. - * Don't do anything if the ts is not dynamic. */ -static void vty_out_dyn_ts_status(struct vty *vty, struct gsm_bts_trx_ts *ts) -{ - enum gsm_phys_chan_config target; - if (ts_is_pchan_switching(ts, &target)) { - vty_out(vty, " switching %s -> %s", gsm_pchan_name(ts->pchan_is), - gsm_pchan_name(target)); - } else if (ts->pchan_is != ts->pchan_on_init) { - vty_out(vty, " as %s", gsm_pchan_name(ts->pchan_is)); - } -} - static void lchan_dump_full_vty(struct vty *vty, struct gsm_lchan *lchan) { int idx; @@ -1307,22 +1327,7 @@ vty_out(vty, "BTS %u, TRX %u, Timeslot %u, Lchan %u: Type %s%s", lchan->ts->trx->bts->nr, lchan->ts->trx->nr, lchan->ts->nr, lchan->nr, gsm_lchant_name(lchan->type), VTY_NEWLINE); - /* show dyn TS details, if applicable */ - switch (lchan->ts->pchan_on_init) { - case GSM_PCHAN_TCH_F_TCH_H_PDCH: - vty_out(vty, " Osmocom Dyn TS:"); - vty_out_dyn_ts_status(vty, lchan->ts); - vty_out(vty, VTY_NEWLINE); - break; - case GSM_PCHAN_TCH_F_PDCH: - vty_out(vty, " IPACC Dyn PDCH TS:"); - vty_out_dyn_ts_status(vty, lchan->ts); - vty_out(vty, VTY_NEWLINE); - break; - default: - /* no dyn ts */ - break; - } + vty_out_dyn_ts_details(vty, lchan->ts); vty_out(vty, " Connection: %u, State: %s%s%s%s", lchan->conn ? 1: 0, lchan_state_name(lchan), lchan->fi && lchan->fi->state == LCHAN_ST_BORKEN ? " Error reason: " : "", -- To view, visit https://gerrit.osmocom.org/11762 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib854945756fb54c0e1c7d4212ea7b8746eec0db5 Gerrit-Change-Number: 11762 Gerrit-PatchSet: 1 Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181113/67a215cf/attachment.htm>