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

February 2024

  • 1 participants
  • 1748 discussions
[S] Change in libosmo-sccp[master]: xua_asp_send_xlm_prim(): use LOGPFSML() to print more context
by fixeria 27 Feb '24

27 Feb '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/36008?usp=email ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: xua_asp_send_xlm_prim(): use LOGPFSML() to print more context ...................................................................... xua_asp_send_xlm_prim(): use LOGPFSML() to print more context The LOGPFSML() prints current state of an ASP FSM instance, which is useful for debugging. Change-Id: I28f3f89a8158bbedc224922a6ec151b1bbd6c7c0 --- M src/xua_asp_fsm.c 1 file changed, 14 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 8bb5b64..fadcde9 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -112,8 +112,8 @@ if (lm && lm->prim_cb) lm->prim_cb(&prim->oph, asp); else { - LOGPASP(asp, DLSS7, LOGL_DEBUG, "No Layer Manager, dropping %s\n", - osmo_xlm_prim_name(&prim->oph)); + LOGPFSML(asp->fi, LOGL_DEBUG, "No Layer Manager, dropping %s\n", + osmo_xlm_prim_name(&prim->oph)); } msgb_free(prim->oph.msg); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36008?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I28f3f89a8158bbedc224922a6ec151b1bbd6c7c0 Gerrit-Change-Number: 36008 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(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
[S] Change in libosmo-sccp[master]: cosmetic: reduce nesting in osmo_ss7_as_find_by_proto()
by fixeria 27 Feb '24

27 Feb '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/36086?usp=email ) Change subject: cosmetic: reduce nesting in osmo_ss7_as_find_by_proto() ...................................................................... cosmetic: reduce nesting in osmo_ss7_as_find_by_proto() Change-Id: I16e460b91f57bea6606c111335257d717d5423d0 Related: SYS#5424 --- M src/osmo_ss7.c 1 file changed, 19 insertions(+), 10 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index dbbef6b..dadb68e 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -915,18 +915,17 @@ /* Loop through the list with AS and try to find one where the proto matches up */ llist_for_each_entry(as, &inst->as_list, list) { - if (as->cfg.proto == proto) { + if (as->cfg.proto != proto) + continue; - /* Put down the first AS that matches the proto, just in - * case we will not find any matching ASP */ - if (!as_without_asp) - as_without_asp = as; + /* Put down the first AS that matches the proto, just in + * case we will not find any matching ASP */ + if (!as_without_asp) + as_without_asp = as; - /* Check if the candicate we have here has any suitable - * ASP */ - if (osmo_ss7_asp_find_by_proto(as, proto)) - return as; - } + /* Check if the candicate we have here has any suitable ASP */ + if (osmo_ss7_asp_find_by_proto(as, proto)) + return as; } /* Return with the second best find, if there is any */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36086?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I16e460b91f57bea6606c111335257d717d5423d0 Gerrit-Change-Number: 36086 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(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
[S] Change in libosmo-sccp[master]: cosmetic: reduce nesting in osmo_ss7_as_find_by_proto()
by osmith 27 Feb '24

27 Feb '24
Attention is currently required from: fixeria, laforge. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/36086?usp=email ) Change subject: cosmetic: reduce nesting in osmo_ss7_as_find_by_proto() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36086?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I16e460b91f57bea6606c111335257d717d5423d0 Gerrit-Change-Number: 36086 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 27 Feb 2024 11:46:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-sccp[master]: VTY: rename 'sctp-role' to 'transport-role', add an alias
by osmith 27 Feb '24

27 Feb '24
Attention is currently required from: fixeria. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35978?usp=email ) Change subject: VTY: rename 'sctp-role' to 'transport-role', add an alias ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35978?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Iab6c898181d79a5ed2bea767ee90e55bc3af16a5 Gerrit-Change-Number: 35978 Gerrit-PatchSet: 6 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder 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: Tue, 27 Feb 2024 10:39:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-sccp[master]: osmo_ss7_asp_find_by_name(): improve docs and coding style
by osmith 27 Feb '24

27 Feb '24
Attention is currently required from: fixeria, laforge. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/36087?usp=email ) Change subject: osmo_ss7_asp_find_by_name(): improve docs and coding style ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36087?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ia90776c9c3efc3402d59c4f10e5f2cf26274b3f8 Gerrit-Change-Number: 36087 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 27 Feb 2024 10:34:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: pgw: Introduce test TC_s2b_createSession_v4_apco
by osmith 27 Feb '24

27 Feb '24
Attention is currently required from: pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36085?usp=email ) Change subject: pgw: Introduce test TC_s2b_createSession_v4_apco ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36085?usp=email 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: Ib01fe0512866924a5afc4d6719ceacb0b4b54df2 Gerrit-Change-Number: 36085 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: Tue, 27 Feb 2024 10:04:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: pgw: Introduce test TC_s2b_createSession_v4_no_apco
by osmith 27 Feb '24

27 Feb '24
Attention is currently required from: laforge, lynxis lazus, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36075?usp=email ) Change subject: pgw: Introduce test TC_s2b_createSession_v4_no_apco ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36075?usp=email 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: I38e469edf0e00feca5a648035b64645e2c905937 Gerrit-Change-Number: 36075 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Tue, 27 Feb 2024 10:03:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-bsc[master]: ctrl: Add lchan show to all ctrl levels
by pespin 27 Feb '24

27 Feb '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/36084?usp=email ) Change subject: ctrl: Add lchan show to all ctrl levels ...................................................................... ctrl: Add lchan show to all ctrl levels This new commands show information about logical channels: net.btsN.trxM.tsI.show-lchan.full net.btsN.trxM.show-lchan.full net.btsN.show-lchan.full net.show-lchan.full Change-Id: I23c1a7e6f6679e3964e359fb202ffe6781a07e8a --- M include/osmocom/bsc/ctrl.h M src/osmo-bsc/bsc_ctrl.c M src/osmo-bsc/bts_ctrl.c M src/osmo-bsc/bts_trx_ctrl.c M src/osmo-bsc/bts_trx_ts_ctrl.c M src/osmo-bsc/bts_trx_ts_lchan_ctrl.c 6 files changed, 224 insertions(+), 29 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve diff --git a/include/osmocom/bsc/ctrl.h b/include/osmocom/bsc/ctrl.h index 86eb3b1..c61e01f 100644 --- a/include/osmocom/bsc/ctrl.h +++ b/include/osmocom/bsc/ctrl.h @@ -1,6 +1,7 @@ #pragma once #include <osmocom/ctrl/control_cmd.h> +#include <osmocom/bsc/gsm_data.h> struct gsm_network; struct gsm_bts; @@ -15,6 +16,10 @@ int bsc_bts_trx_ts_lchan_ctrl_cmds_install(void); void ctrl_generate_bts_location_state_trap(struct gsm_bts *bts, struct bsc_msc_data *msc); void osmo_bsc_send_trap(struct ctrl_cmd *cmd, struct bsc_msc_data *msc_data); +char *lchan_dump_full_ctrl(const void *t, struct gsm_lchan *lchan); +char *ts_lchan_dump_full_ctrl(const void *t, struct gsm_bts_trx_ts *ts); +char *trx_lchan_dump_full_ctrl(const void *t, struct gsm_bts_trx *trx); +char *bts_lchan_dump_full_ctrl(const void *t, struct gsm_bts *bts); enum bsc_ctrl_node { diff --git a/src/osmo-bsc/bsc_ctrl.c b/src/osmo-bsc/bsc_ctrl.c index cfba3e2..aff1d83 100644 --- a/src/osmo-bsc/bsc_ctrl.c +++ b/src/osmo-bsc/bsc_ctrl.c @@ -820,6 +820,45 @@ return CTRL_CMD_HANDLED; } +/* Return full information about all logical channels. + * format: show-lchan.full + * result format: New line delimited list of <bts>,<trx>,<ts>,<lchan>,<type>,<connection>,<state>,<last error>,<bs power>, + * <ms power>,<interference dbm>, <interference band>,<channel mode>,<imsi>,<tmsi>,<ipa bound ip>,<ipa bound port>, + * <ipa bound conn id>,<ipa conn ip>,<ipa conn port>,<ipa conn speech mode> + */ +static int get_net_show_lchan_full(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_network *net = cmd->node; + int bts_nr; + bool first_bts = true; + char *bts_dump; + + cmd->reply = talloc_strdup(cmd, ""); + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + + for (bts_nr = 0; bts_nr < net->num_bts; bts_nr++) { + bts_dump = bts_lchan_dump_full_ctrl(cmd, gsm_bts_num(net, bts_nr)); + if (!bts_dump) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + if (!strlen(bts_dump)) + continue; + cmd->reply = talloc_asprintf_append(cmd->reply, first_bts ? "%s" : "\n%s", bts_dump); + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + first_bts = false; + } + + return CTRL_CMD_REPLY; +} +CTRL_CMD_DEFINE_RO(net_show_lchan_full, "show-lchan full"); + static int bsc_base_ctrl_cmds_install(struct gsm_network *net) { int rc = 0; @@ -837,6 +876,7 @@ rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_msc0_connection_status); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_notification); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_inform_msc); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_show_lchan_full); rc |= ctrl_cmd_install(CTRL_NODE_MSC, &cmd_msc_connection_status); diff --git a/src/osmo-bsc/bts_ctrl.c b/src/osmo-bsc/bts_ctrl.c index eac01bf..814a17d 100644 --- a/src/osmo-bsc/bts_ctrl.c +++ b/src/osmo-bsc/bts_ctrl.c @@ -1479,6 +1479,53 @@ CTRL_CMD_DEFINE_RO(bts_neighbor_list_si2quater_earfcn, "neighbor-list si2quater earfcns"); +char *bts_lchan_dump_full_ctrl(const void *t, struct gsm_bts *bts) +{ + int trx_nr; + bool first_trx = true; + char *trx_dump, *dump; + struct gsm_bts_trx *trx; + + dump = talloc_strdup(t, ""); + if (!dump) + return NULL; + + for (trx_nr = 0; trx_nr < bts->num_trx; trx_nr++) { + trx = gsm_bts_trx_num(bts, trx_nr); + trx_dump = trx_lchan_dump_full_ctrl(t, trx); + if (!trx_dump) + return NULL; + if (!strlen(trx_dump)) + continue; + dump = talloc_asprintf_append(dump, first_trx ? "%s" : "\n%s", trx_dump); + if (!dump) + return NULL; + first_trx = false; + } + + return dump; +} + +/* Return full information about all logical channels in a BTS. + * format: bts.<0-255>.show-lchan.full + * result format: New line delimited list of <bts>,<trx>,<ts>,<lchan>,<type>,<connection>,<state>,<last error>,<bs power>, + * <ms power>,<interference dbm>, <interference band>,<channel mode>,<imsi>,<tmsi>,<ipa bound ip>,<ipa bound port>, + * <ipa bound conn id>,<ipa conn ip>,<ipa conn port>,<ipa conn speech mode> + */ +static int get_bts_show_lchan_full(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts *bts = cmd->node; + + cmd->reply = bts_lchan_dump_full_ctrl(cmd, bts); + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + + return CTRL_CMD_REPLY; +} +CTRL_CMD_DEFINE_RO(bts_show_lchan_full, "show-lchan full"); + int bsc_bts_ctrl_cmds_install(void) { int rc = 0; @@ -1523,6 +1570,7 @@ rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_rach_max_trans); rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_neighbor_list_si2quater_uarfcn); rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_neighbor_list_si2quater_earfcn); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_show_lchan_full); rc |= neighbor_ident_ctrl_init(); diff --git a/src/osmo-bsc/bts_trx_ctrl.c b/src/osmo-bsc/bts_trx_ctrl.c index d5e8f5a..1e30e85 100644 --- a/src/osmo-bsc/bts_trx_ctrl.c +++ b/src/osmo-bsc/bts_trx_ctrl.c @@ -97,6 +97,51 @@ } CTRL_CMD_DEFINE(trx_max_power, "max-power-reduction"); +char *trx_lchan_dump_full_ctrl(const void *t, struct gsm_bts_trx *trx) +{ + int ts_nr; + bool first_ts = true; + char *ts_dump, *dump; + + dump = talloc_strdup(t, ""); + if (!dump) + return NULL; + + for (ts_nr = 0; ts_nr < TRX_NR_TS; ts_nr++) { + ts_dump = ts_lchan_dump_full_ctrl(t, &trx->ts[ts_nr]); + if (!ts_dump) + return NULL; + if (!strlen(ts_dump)) + continue; + dump = talloc_asprintf_append(dump, first_ts ? "%s" : "\n%s", ts_dump); + if (!dump) + return NULL; + first_ts = false; + } + + return dump; +} + +/* Return full information about all logical channels in a TRX. + * format: bts.<0-255>.trx.<0-255>.show-lchan.full + * result format: New line delimited list of <bts>,<trx>,<ts>,<lchan>,<type>,<connection>,<state>,<last error>,<bs power>, + * <ms power>,<interference dbm>, <interference band>,<channel mode>,<imsi>,<tmsi>,<ipa bound ip>,<ipa bound port>, + * <ipa bound conn id>,<ipa conn ip>,<ipa conn port>,<ipa conn speech mode> + */ +static int get_trx_show_lchan_full(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts_trx *trx = cmd->node; + + cmd->reply = trx_lchan_dump_full_ctrl(cmd, trx); + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + + return CTRL_CMD_REPLY; +} +CTRL_CMD_DEFINE_RO(trx_show_lchan_full, "show-lchan full"); + int bsc_bts_trx_ctrl_cmds_install(void) { int rc = 0; @@ -104,6 +149,7 @@ rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_max_power); rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_arfcn); rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_rf_locked); + rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_show_lchan_full); rc |= bsc_bts_trx_ts_ctrl_cmds_install(); diff --git a/src/osmo-bsc/bts_trx_ts_ctrl.c b/src/osmo-bsc/bts_trx_ts_ctrl.c index f0a592d..a1a17f0 100644 --- a/src/osmo-bsc/bts_trx_ts_ctrl.c +++ b/src/osmo-bsc/bts_trx_ts_ctrl.c @@ -94,6 +94,48 @@ /* Parameter format: "(<arfcn>|all)" */ CTRL_CMD_DEFINE_WO(ts_hopping_arfcn_del, "hopping-arfcn-del"); +char *ts_lchan_dump_full_ctrl(const void *t, struct gsm_bts_trx_ts *ts) +{ + bool first_lchan = true; + char *lchan_dump, *dump; + struct gsm_lchan *lchan; + + dump = talloc_strdup(t, ""); + if (!dump) + return NULL; + + ts_for_n_lchans(lchan, ts, ts->max_lchans_possible) { + lchan_dump = lchan_dump_full_ctrl(t, lchan); + if (!lchan_dump) + return NULL; + dump = talloc_asprintf_append(dump, first_lchan ? "%s" : "\n%s", lchan_dump); + if (!dump) + return NULL; + first_lchan = false; + } + + return dump; +} + +/* Return full information about all logical channels in a timeslot. + * format: bts.<0-255>.trx.<0-255>.ts.<0-8>.show-lchan.full + * result format: New line delimited list of <bts>,<trx>,<ts>,<lchan>,<type>,<connection>,<state>,<last error>,<bs power>, + * <ms power>,<interference dbm>, <interference band>,<channel mode>,<imsi>,<tmsi>,<ipa bound ip>,<ipa bound port>, + * <ipa bound conn id>,<ipa conn ip>,<ipa conn port>,<ipa conn speech mode> + */ +static int get_ts_show_lchan_full(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts_trx_ts *ts = cmd->node; + + cmd->reply = ts_lchan_dump_full_ctrl(cmd, ts); + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + + return CTRL_CMD_REPLY; +} +CTRL_CMD_DEFINE_RO(ts_show_lchan_full, "show-lchan full"); int bsc_bts_trx_ts_ctrl_cmds_install(void) { @@ -101,6 +143,7 @@ rc |= ctrl_cmd_install(CTRL_NODE_TS, &cmd_ts_hopping_arfcn_add); rc |= ctrl_cmd_install(CTRL_NODE_TS, &cmd_ts_hopping_arfcn_del); + rc |= ctrl_cmd_install(CTRL_NODE_TS, &cmd_ts_show_lchan_full); rc |= bsc_bts_trx_ts_lchan_ctrl_cmds_install(); diff --git a/src/osmo-bsc/bts_trx_ts_lchan_ctrl.c b/src/osmo-bsc/bts_trx_ts_lchan_ctrl.c index 6ddbe1e..be5e755 100644 --- a/src/osmo-bsc/bts_trx_ts_lchan_ctrl.c +++ b/src/osmo-bsc/bts_trx_ts_lchan_ctrl.c @@ -68,55 +68,41 @@ CTRL_CMD_DEFINE(lchan_ms_power, "ms-power"); -/* Return full information about a logical channel. - * format: bts.<0-255>.trx.<0-255>.ts.<0-8>.lchan.<0-8>.show.full - * result format: <bts>,<trx>,<ts>,<lchan>,<type>,<connection>,<state>,<last error>,<bs power>,<ms power>,<interference dbm>, - * <interference band>,<channel mode>,<imsi>,<tmsi>,<ipa bound ip>,<ipa bound port>,<ipa bound conn id>,<ipa conn ip>, - * <ipa conn port>,<ipa conn sppech mode> - */ -static int get_lchan_show_full(struct ctrl_cmd *cmd, void *data) + +char *lchan_dump_full_ctrl(const void *t, struct gsm_lchan *lchan) { - struct gsm_lchan *lchan = cmd->node; struct in_addr ia; char *interference = ",", *tmsi = "", *ipa_bound = ",,", *ipa_conn = ",,"; if (lchan->interf_dbm != INTERF_DBM_UNKNOWN) { - interference = talloc_asprintf(cmd, "%d,%u", lchan->interf_dbm, lchan->interf_band); - if (!interference) { - cmd->reply = "OOM"; - return CTRL_CMD_ERROR; - } + interference = talloc_asprintf(t, "%d,%u", lchan->interf_dbm, lchan->interf_band); + if (!interference) + return NULL; } if (lchan->conn && lchan->conn->bsub && lchan->conn->bsub->tmsi != GSM_RESERVED_TMSI) { - tmsi = talloc_asprintf(cmd, "0x%08x", lchan->conn->bsub->tmsi); - if (!tmsi) { - cmd->reply = "OOM"; - return CTRL_CMD_ERROR; - } + tmsi = talloc_asprintf(t, "0x%08x", lchan->conn->bsub->tmsi); + if (!tmsi) + return NULL; } if (is_ipa_abisip_bts(lchan->ts->trx->bts) && lchan->abis_ip.bound_ip) { ia.s_addr = htonl(lchan->abis_ip.bound_ip); - ipa_bound = talloc_asprintf(cmd, "%s,%u,%u", inet_ntoa(ia), lchan->abis_ip.bound_port, + ipa_bound = talloc_asprintf(t, "%s,%u,%u", inet_ntoa(ia), lchan->abis_ip.bound_port, lchan->abis_ip.conn_id); - if (!ipa_bound) { - cmd->reply = "OOM"; - return CTRL_CMD_ERROR; - } + if (!ipa_bound) + return NULL; } if (is_ipa_abisip_bts(lchan->ts->trx->bts) && lchan->abis_ip.connect_ip) { ia.s_addr = htonl(lchan->abis_ip.connect_ip); - ipa_conn = talloc_asprintf(cmd, "%s,%u,0x%02x", inet_ntoa(ia), lchan->abis_ip.connect_port, + ipa_conn = talloc_asprintf(t, "%s,%u,0x%02x", inet_ntoa(ia), lchan->abis_ip.connect_port, lchan->abis_ip.speech_mode); - if (!ipa_conn) { - cmd->reply = "OOM"; - return CTRL_CMD_ERROR; - } + if (!ipa_conn) + return NULL; } - cmd->reply = talloc_asprintf(cmd, "%u,%u,%u,%u,%s,%u,%s,%s,%u,%u,%s,%s,%s,%s,%s,%s", + return talloc_asprintf(t, "%u,%u,%u,%u,%s,%u,%s,%s,%u,%u,%s,%s,%s,%s,%s,%s", lchan->ts->trx->bts->nr, lchan->ts->trx->nr, lchan->ts->nr, @@ -133,6 +119,18 @@ ipa_bound, ipa_conn ); +} + +/* Return full information about a logical channel. + * format: bts.<0-255>.trx.<0-255>.ts.<0-8>.lchan.<0-8>.show.full + * result format: <bts>,<trx>,<ts>,<lchan>,<type>,<connection>,<state>,<last error>,<bs power>,<ms power>,<interference dbm>, + * <interference band>,<channel mode>,<imsi>,<tmsi>,<ipa bound ip>,<ipa bound port>,<ipa bound conn id>,<ipa conn ip>, + * <ipa conn port>,<ipa conn speech mode> + */ +static int get_lchan_show_full(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_lchan *lchan = cmd->node; + cmd->reply = lchan_dump_full_ctrl(cmd, lchan); if (!cmd->reply) { cmd->reply = "OOM"; return CTRL_CMD_ERROR; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/36084?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I23c1a7e6f6679e3964e359fb202ffe6781a07e8a Gerrit-Change-Number: 36084 Gerrit-PatchSet: 3 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[L] Change in osmo-bsc[master]: ctrl: Add lchan show to all ctrl levels
by pespin 27 Feb '24

27 Feb '24
Attention is currently required from: matanp. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/36084?usp=email ) Change subject: ctrl: Add lchan show to all ctrl levels ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/36084?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I23c1a7e6f6679e3964e359fb202ffe6781a07e8a Gerrit-Change-Number: 36084 Gerrit-PatchSet: 3 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: matanp <matan1008(a)gmail.com> Gerrit-Comment-Date: Tue, 27 Feb 2024 09:16:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ggsn[master]: gtp/gsn: gtp_new: replace calloc with talloc_zero
by laforge 27 Feb '24

27 Feb '24
Attention is currently required from: osmith. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/36071?usp=email ) Change subject: gtp/gsn: gtp_new: replace calloc with talloc_zero ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: introducing this would break any hypothetical users of libgtp that use multiple threads, as we're introducing a single talloc context. Going for __thread would have a per-thread talloc context. Alternatively, you could simply add a new function where the user can pass in explicitly a talloc context. Then it's the users choice whether to use the legacy API (uses libgtp-internal talloc context like your patch) or pass in a (potentially thread specific) talloc context when creating the gsn. -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/36071?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: Ie10dd6f32a42513f6d2b5c7dd0dd84b4f0d20afb Gerrit-Change-Number: 36071 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Tue, 27 Feb 2024 08:32:54 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • ...
  • 175
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.