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 -----
  • 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

July 2025

  • 1 participants
  • 1492 discussions
[S] Change in osmo-ttcn3-hacks[master]: smlc: fix running against latest
by osmith 15 Jul '25

15 Jul '25
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40683?usp=email ) Change subject: smlc: fix running against latest ...................................................................... smlc: fix running against latest osmo-smlc from latest doesn't support statsd yet. Use a separate config that doesn't have the statsd block and don't try to initialize it for latest. Change-Id: If7b1d46777703f0511ee15520571d0313bdfa5ed Fixes: 5268d5 ("smlc: Add suport to obtain statsd output") --- M smlc/SMLC_Tests.ttcn A smlc/osmo-smlc.latest.cfg M smlc/testenv.cfg 3 files changed, 39 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/83/40683/1 diff --git a/smlc/SMLC_Tests.ttcn b/smlc/SMLC_Tests.ttcn index be69c7d..671f483 100644 --- a/smlc/SMLC_Tests.ttcn +++ b/smlc/SMLC_Tests.ttcn @@ -193,7 +193,10 @@ f_bssap_le_adapter_start(g_bssap_le[bssap_le_idx]); } - f_init_statsd("SMLC_Test", vc_STATSD, mp_test_ip, mp_statsd_port, g_statd_timeout); + /* Remove nightly condition after osmo-smlc >= 0.4.x is released */ + if (Misc_Helpers.f_osmo_repo_is("nightly")) { + f_init_statsd("SMLC_Test", vc_STATSD, mp_test_ip, mp_statsd_port, g_statd_timeout); + } } function f_init_vty(charstring id := "foo") runs on test_CT { diff --git a/smlc/osmo-smlc.latest.cfg b/smlc/osmo-smlc.latest.cfg new file mode 100644 index 0000000..32b3084 --- /dev/null +++ b/smlc/osmo-smlc.latest.cfg @@ -0,0 +1,32 @@ +log gsmtap 127.0.0.203 + logging level set-all debug + logging filter all 1 +log stderr + logging filter all 1 + logging color 1 + logging print level 1 + logging print category 1 + logging print category-hex 0 + logging print extended-timestamp 1 + logging print file basename last + logging level set-all debug +! +line vty + no login + bind 0.0.0.0 +! +cs7 instance 0 + point-code 0.23.6 + asp asp-clnt-Lb-0 2905 2905 m3ua + local-ip 127.0.0.20 + remote-ip 127.0.0.200 + role asp + sctp-role client + as as-clnt-Lb m3ua + asp asp-clnt-Lb-0 + routing-key 6 0.23.6 + +cells + lac-ci 23 42 lat 23.23 lon 42.42 + cgi 001 02 3 4 lat 5.678 lon 6.789 + cgi 001 02 1 17 lat 7.890123 lon 8.90123 diff --git a/smlc/testenv.cfg b/smlc/testenv.cfg index 1268300..401dbb5 100644 --- a/smlc/testenv.cfg +++ b/smlc/testenv.cfg @@ -15,3 +15,6 @@ package=osmo-smlc copy=osmo-smlc.cfg vty_port=4271 +# Remove *_latest lines and related cfg after osmo-smlc >= 0.4.x is released +copy_latest=osmo-smlc.latest.cfg +program_latest=osmo-smlc -c osmo-smlc.latest.cfg -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40683?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: If7b1d46777703f0511ee15520571d0313bdfa5ed Gerrit-Change-Number: 40683 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-smlc[master]: vty: Create smlc_vty.c
by pespin 15 Jul '25

15 Jul '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-smlc/+/40678?usp=email ) Change subject: vty: Create smlc_vty.c ...................................................................... vty: Create smlc_vty.c We already have a smlc_vty.h file, but no usual smlc_vty.c file where we put commands or init functions existed yet. Change-Id: I6899602c3a6e22ee6ff93540466f839b2bf5ccc1 --- M include/osmocom/smlc/smlc_vty.h M src/osmo-smlc/Makefile.am M src/osmo-smlc/smlc_main.c A src/osmo-smlc/smlc_vty.c 4 files changed, 52 insertions(+), 14 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/include/osmocom/smlc/smlc_vty.h b/include/osmocom/smlc/smlc_vty.h index d5d82f8..1c53a25 100644 --- a/include/osmocom/smlc/smlc_vty.h +++ b/include/osmocom/smlc/smlc_vty.h @@ -5,3 +5,5 @@ enum smlc_vty_node { CELLS_NODE = _LAST_OSMOVTY_NODE + 1, }; + +void smlc_vty_init(struct vty_app_info *vty_app_info); diff --git a/src/osmo-smlc/Makefile.am b/src/osmo-smlc/Makefile.am index 585d1de..185a8d9 100644 --- a/src/osmo-smlc/Makefile.am +++ b/src/osmo-smlc/Makefile.am @@ -32,6 +32,7 @@ smlc_loc_req.c \ smlc_main.c \ smlc_subscr.c \ + smlc_vty.c \ $(NULL) osmo_smlc_LDADD = \ diff --git a/src/osmo-smlc/smlc_main.c b/src/osmo-smlc/smlc_main.c index f72ec4b..4ec0f65 100644 --- a/src/osmo-smlc/smlc_main.c +++ b/src/osmo-smlc/smlc_main.c @@ -19,7 +19,6 @@ #include <osmocom/ctrl/control_cmd.h> #include <osmocom/ctrl/control_if.h> #include <osmocom/ctrl/ports.h> -#include <osmocom/ctrl/control_vty.h> #include <osmocom/core/application.h> #include <osmocom/core/linuxlist.h> @@ -29,9 +28,6 @@ #include <osmocom/core/rate_ctr.h> #include <osmocom/vty/telnet_interface.h> #include <osmocom/vty/ports.h> -#include <osmocom/vty/logging.h> -#include <osmocom/vty/command.h> -#include <osmocom/vty/misc.h> #include <osmocom/sigtran/xua_msg.h> #include <osmocom/sigtran/sccp_sap.h> @@ -40,7 +36,7 @@ #include <osmocom/smlc/debug.h> #include <osmocom/smlc/smlc_data.h> #include <osmocom/smlc/sccp_lb_inst.h> -#include <osmocom/smlc/cell_locations.h> +#include <osmocom/smlc/smlc_vty.h> #define _GNU_SOURCE #include <getopt.h> @@ -241,17 +237,11 @@ g_smlc = smlc_state_alloc(tall_smlc_ctx); - /* This needs to precede handle_options() */ - vty_init(&vty_info); - logging_vty_add_cmds(); - osmo_talloc_vty_add_cmds(); - ctrl_vty_init(tall_smlc_ctx); - cell_locations_vty_init(); - /* Initialize SS7 */ OSMO_ASSERT(osmo_ss7_init() == 0); - osmo_ss7_vty_init_asp(tall_smlc_ctx); - osmo_sccp_vty_init(); + + /* This needs to precede handle_options() */ + smlc_vty_init(&vty_info); /* parse options */ handle_options(argc, argv); diff --git a/src/osmo-smlc/smlc_vty.c b/src/osmo-smlc/smlc_vty.c new file mode 100644 index 0000000..36ca47e --- /dev/null +++ b/src/osmo-smlc/smlc_vty.c @@ -0,0 +1,45 @@ +/* + * (C) 2025 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * All Rights Reserved + * + * SPDX-License-Identifier: AGPL-3.0+ + * + * Author: Pau Espin Pedrol + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <osmocom/ctrl/control_vty.h> +#include <osmocom/vty/logging.h> +#include <osmocom/vty/misc.h> + +#include <osmocom/sigtran/osmo_ss7.h> +#include <osmocom/sigtran/sccp_sap.h> + +#include <osmocom/smlc/cell_locations.h> + +void smlc_vty_init(struct vty_app_info *vty_app_info) +{ + vty_init(vty_app_info); + + logging_vty_add_cmds(); + osmo_talloc_vty_add_cmds(); + ctrl_vty_init(vty_app_info->tall_ctx); + osmo_fsm_vty_add_cmds(); + + osmo_ss7_vty_init_asp(vty_app_info->tall_ctx); + osmo_sccp_vty_init(); + + cell_locations_vty_init(); +} -- To view, visit https://gerrit.osmocom.org/c/osmo-smlc/+/40678?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-smlc Gerrit-Branch: master Gerrit-Change-Id: I6899602c3a6e22ee6ff93540466f839b2bf5ccc1 Gerrit-Change-Number: 40678 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-smlc[master]: smlc: Initial implementation of N-PCSTATE.ind
by pespin 15 Jul '25

15 Jul '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-smlc/+/40665?usp=email ) ( 4 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: smlc: Initial implementation of N-PCSTATE.ind ...................................................................... smlc: Initial implementation of N-PCSTATE.ind Related: OS#5917 Change-Id: Id034a0c4d8bff0647a64658480dfa9b4cea563de --- M include/osmocom/smlc/lb_peer.h M src/osmo-smlc/lb_peer.c M src/osmo-smlc/sccp_lb_inst.c 3 files changed, 155 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/smlc/lb_peer.h b/include/osmocom/smlc/lb_peer.h index 5851a95..dc65b24 100644 --- a/include/osmocom/smlc/lb_peer.h +++ b/include/osmocom/smlc/lb_peer.h @@ -1,5 +1,7 @@ #pragma once +#include <stdint.h> + #include <osmocom/core/linuxlist.h> #include <osmocom/gsm/gsm0808.h> #include <osmocom/sigtran/sccp_sap.h> @@ -49,6 +51,8 @@ LB_PEER_EV_MSG_DOWN_CO, LB_PEER_EV_RX_RESET, LB_PEER_EV_RX_RESET_ACK, + LB_PEER_EV_AVAILABLE, + LB_PEER_EV_UNAVAILABLE, }; struct lb_peer_ev_ctx { @@ -59,6 +63,7 @@ struct lb_peer *lb_peer_find_or_create(struct sccp_lb_inst *sli, const struct osmo_sccp_addr *peer_addr); struct lb_peer *lb_peer_find(const struct sccp_lb_inst *sli, const struct osmo_sccp_addr *peer_addr); +struct lb_peer *lb_peer_find_by_pc(const struct sccp_lb_inst *sli, uint32_t pc); int lb_peer_up_l2(struct sccp_lb_inst *sli, const struct osmo_sccp_addr *calling_addr, bool co, uint32_t conn_id, struct msgb *l2); diff --git a/src/osmo-smlc/lb_peer.c b/src/osmo-smlc/lb_peer.c index 54e0ad2..fa2bc17 100644 --- a/src/osmo-smlc/lb_peer.c +++ b/src/osmo-smlc/lb_peer.c @@ -1,5 +1,5 @@ /* - * (C) 2019 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * (C) 2019-2025 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> * All Rights Reserved * * SPDX-License-Identifier: AGPL-3.0+ @@ -80,6 +80,15 @@ return NULL; } +/* Find an lb_peer by its remote SCCP address */ +struct lb_peer *lb_peer_find_by_pc(const struct sccp_lb_inst *sli, uint32_t pc) +{ + struct osmo_sccp_addr rem_addr; + + osmo_sccp_make_addr_pc_ssn(&rem_addr, pc, OSMO_SCCP_SSN_BSC_BSSAP_LE); + return lb_peer_find(sli, &rem_addr); +} + static const struct osmo_tdef_state_timeout lb_peer_fsm_timeouts[32] = { [LB_PEER_ST_WAIT_RX_RESET_ACK] = { .T = -13 }, [LB_PEER_ST_DISCARDING] = { .T = -14 }, @@ -235,6 +244,15 @@ lb_peer_rx_reset(lbp, msg); return; + case LB_PEER_EV_AVAILABLE: + /* Send a RESET to the peer. */ + lb_peer_reset(lbp); + return; + + case LB_PEER_EV_UNAVAILABLE: + /* Do nothing, wait for peer to come up again. */ + return; + default: LOG_LB_PEER(lbp, LOGL_ERROR, "Unhandled event: %s\n", osmo_fsm_event_name(&lb_peer_fsm, event)); return; @@ -270,6 +288,15 @@ lb_peer_rx_reset(lbp, msg); return; + case LB_PEER_EV_AVAILABLE: + /* Send a RESET to the peer. */ + lb_peer_reset(lbp); + return; + + case LB_PEER_EV_UNAVAILABLE: + lb_peer_state_chg(lbp, LB_PEER_ST_WAIT_RX_RESET); + return; + default: LOG_LB_PEER(lbp, LOGL_ERROR, "Unhandled event: %s\n", osmo_fsm_event_name(&lb_peer_fsm, event)); return; @@ -334,6 +361,16 @@ lb_peer_rx_reset(lbp, msg); return; + case LB_PEER_EV_AVAILABLE: + /* Send a RESET to the peer. */ + lb_peer_reset(lbp); + return; + + case LB_PEER_EV_UNAVAILABLE: + lb_peer_discard_all_conns(lbp); + lb_peer_state_chg(lbp, LB_PEER_ST_WAIT_RX_RESET); + return; + default: LOG_LB_PEER(lbp, LOGL_ERROR, "Unhandled event: %s\n", osmo_fsm_event_name(&lb_peer_fsm, event)); return; @@ -363,6 +400,8 @@ OSMO_VALUE_STRING(LB_PEER_EV_MSG_DOWN_CO), OSMO_VALUE_STRING(LB_PEER_EV_RX_RESET), OSMO_VALUE_STRING(LB_PEER_EV_RX_RESET_ACK), + OSMO_VALUE_STRING(LB_PEER_EV_AVAILABLE), + OSMO_VALUE_STRING(LB_PEER_EV_UNAVAILABLE), {} }; @@ -376,6 +415,8 @@ | S(LB_PEER_EV_RX_RESET) | S(LB_PEER_EV_MSG_UP_CO_INITIAL) | S(LB_PEER_EV_MSG_UP_CO) + | S(LB_PEER_EV_AVAILABLE) + | S(LB_PEER_EV_UNAVAILABLE) , .out_state_mask = 0 | S(LB_PEER_ST_WAIT_RX_RESET) @@ -392,6 +433,8 @@ | S(LB_PEER_EV_RX_RESET_ACK) | S(LB_PEER_EV_MSG_UP_CO_INITIAL) | S(LB_PEER_EV_MSG_UP_CO) + | S(LB_PEER_EV_AVAILABLE) + | S(LB_PEER_EV_UNAVAILABLE) , .out_state_mask = 0 | S(LB_PEER_ST_WAIT_RX_RESET) @@ -410,6 +453,8 @@ | S(LB_PEER_EV_MSG_DOWN_CO_INITIAL) | S(LB_PEER_EV_MSG_DOWN_CO) | S(LB_PEER_EV_MSG_DOWN_CL) + | S(LB_PEER_EV_AVAILABLE) + | S(LB_PEER_EV_UNAVAILABLE) , .out_state_mask = 0 | S(LB_PEER_ST_WAIT_RX_RESET) diff --git a/src/osmo-smlc/sccp_lb_inst.c b/src/osmo-smlc/sccp_lb_inst.c index e10effe..bfe8a0e 100644 --- a/src/osmo-smlc/sccp_lb_inst.c +++ b/src/osmo-smlc/sccp_lb_inst.c @@ -1,5 +1,5 @@ /* - * (C) 2020 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * (C) 2020-2025 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> * All Rights Reserved * * SPDX-License-Identifier: AGPL-3.0+ @@ -85,6 +85,96 @@ return sli; } +static void handle_pcstate_ind(struct sccp_lb_inst *sli, const struct osmo_scu_pcstate_param *pcst) +{ + struct osmo_ss7_instance *cs7 = osmo_sccp_get_ss7(sli->sccp); + struct lb_peer *lbp; + bool connected; + bool disconnected; + + LOG_SCCP_LB(sli, LOGL_DEBUG, "N-PCSTATE ind: affected_pc=%u=%s sp_status=%s remote_sccp_status=%s\n", + pcst->affected_pc, osmo_ss7_pointcode_print(cs7, pcst->affected_pc), + osmo_sccp_sp_status_name(pcst->sp_status), + osmo_sccp_rem_sccp_status_name(pcst->remote_sccp_status)); + + /* If we don't care about that point-code, ignore PCSTATE. */ + lbp = lb_peer_find_by_pc(sli, pcst->affected_pc); + if (!lbp) { + LOG_SCCP_LB(sli, LOGL_DEBUG, "No lb_peer found under pc=%u=%s\n", + pcst->affected_pc, osmo_ss7_pointcode_print(cs7, pcst->affected_pc)); + return; + } + + /* See if this marks the point code to have become available, or to have been lost. + * + * I want to detect two events: + * - connection event (both indicators say PC is reachable). + * - disconnection event (at least one indicator says the PC is not reachable). + * + * There are two separate incoming indicators with various possible values -- the incoming events can be: + * + * - neither connection nor disconnection indicated -- just indicating congestion + * connected == false, disconnected == false --> do nothing. + * - both incoming values indicate that we are connected + * --> trigger connected + * - both indicate we are disconnected + * --> trigger disconnected + * - one value indicates 'connected', the other indicates 'disconnected' + * --> trigger disconnected + * + * Congestion could imply that we're connected, but it does not indicate that a PC's reachability changed, so no need to + * trigger on that. + */ + connected = false; + disconnected = false; + + switch (pcst->sp_status) { + case OSMO_SCCP_SP_S_ACCESSIBLE: + connected = true; + break; + case OSMO_SCCP_SP_S_INACCESSIBLE: + disconnected = true; + break; + default: + case OSMO_SCCP_SP_S_CONGESTED: + /* Neither connecting nor disconnecting */ + break; + } + + switch (pcst->remote_sccp_status) { + case OSMO_SCCP_REM_SCCP_S_AVAILABLE: + if (!disconnected) + connected = true; + break; + case OSMO_SCCP_REM_SCCP_S_UNAVAILABLE_UNKNOWN: + case OSMO_SCCP_REM_SCCP_S_UNEQUIPPED: + case OSMO_SCCP_REM_SCCP_S_INACCESSIBLE: + disconnected = true; + connected = false; + break; + default: + case OSMO_SCCP_REM_SCCP_S_CONGESTED: + /* Neither connecting nor disconnecting */ + break; + } + + if (disconnected) { + LOG_SCCP_LB(sli, LOGL_NOTICE, + "now unreachable: N-PCSTATE ind: pc=%u=%s sp_status=%s remote_sccp_status=%s\n", + pcst->affected_pc, osmo_ss7_pointcode_print(cs7, pcst->affected_pc), + osmo_sccp_sp_status_name(pcst->sp_status), + osmo_sccp_rem_sccp_status_name(pcst->remote_sccp_status)); + osmo_fsm_inst_dispatch(lbp->fi, LB_PEER_EV_UNAVAILABLE, NULL); + } else if (connected) { + LOG_SCCP_LB(sli, LOGL_NOTICE, + "now available: N-PCSTATE ind: pc=%u=%s sp_status=%s remote_sccp_status=%s\n", + pcst->affected_pc, osmo_ss7_pointcode_print(cs7, pcst->affected_pc), + osmo_sccp_sp_status_name(pcst->sp_status), + osmo_sccp_rem_sccp_status_name(pcst->remote_sccp_status)); + osmo_fsm_inst_dispatch(lbp->fi, LB_PEER_EV_AVAILABLE, NULL); + } +} + static int sccp_lb_sap_up(struct osmo_prim_hdr *oph, void *_scu) { struct osmo_sccp_user *scu = _scu; @@ -163,6 +253,19 @@ rc = lb_peer_up_l2(sli, peer_addr, false, 0, oph->msg); break; + case OSMO_PRIM(OSMO_SCU_PRIM_N_PCSTATE, PRIM_OP_INDICATION): + handle_pcstate_ind(sli, &prim->u.pcstate); + rc = 0; + break; + + case OSMO_PRIM(OSMO_SCU_PRIM_N_STATE, PRIM_OP_INDICATION): + LOG_SCCP_LB(sli, LOGL_INFO, + "SCCP-User-SAP: Ignoring %s.%s\n", + osmo_scu_prim_type_name(oph->primitive), + get_value_string(osmo_prim_op_names, oph->operation)); + rc = 0; + break; + default: LOG_SCCP_LB_CL(sli, NULL, LOGL_ERROR, "%s(%s) unsupported\n", __func__, osmo_scu_prim_name(oph)); rc = -1; -- To view, visit https://gerrit.osmocom.org/c/osmo-smlc/+/40665?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-smlc Gerrit-Branch: master Gerrit-Change-Id: Id034a0c4d8bff0647a64658480dfa9b4cea563de Gerrit-Change-Number: 40665 Gerrit-PatchSet: 5 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: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-smlc[master]: Introduce stats msc.ran_peers.{total,active}
by pespin 15 Jul '25

15 Jul '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-smlc/+/40679?usp=email ) ( 3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: Introduce stats msc.ran_peers.{total,active} ...................................................................... Introduce stats msc.ran_peers.{total,active} osmo_stats_init() was already being called despite no stats were being used. Change-Id: Ib01576036f34ac7f21c5bce0155b50932eb9b72a --- M include/osmocom/smlc/smlc_data.h M src/osmo-smlc/lb_peer.c M src/osmo-smlc/smlc_data.c M src/osmo-smlc/smlc_vty.c 4 files changed, 55 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/include/osmocom/smlc/smlc_data.h b/include/osmocom/smlc/smlc_data.h index dc77507..2e17dd0 100644 --- a/include/osmocom/smlc/smlc_data.h +++ b/include/osmocom/smlc/smlc_data.h @@ -37,6 +37,7 @@ _LAST_CTRL_NODE_SMLC }; +/* rate_ctr */ enum { SMLC_CTR_BSSMAP_LE_RX_UDT_RESET, SMLC_CTR_BSSMAP_LE_RX_UDT_RESET_ACK, @@ -58,3 +59,9 @@ SMLC_CTR_BSSMAP_LE_TX_DT1_PERFORM_LOCATION_RESPONSE, SMLC_CTR_BSSMAP_LE_TX_DT1_BSSLAP_TA_REQUEST, }; + +/* osmo_stat */ +enum { + SMLC_STAT_LB_PEERS_TOTAL, + SMLC_STAT_LB_PEERS_ACTIVE, +}; diff --git a/src/osmo-smlc/lb_peer.c b/src/osmo-smlc/lb_peer.c index fa2bc17..d9d3b38 100644 --- a/src/osmo-smlc/lb_peer.c +++ b/src/osmo-smlc/lb_peer.c @@ -23,6 +23,7 @@ #include <osmocom/core/linuxlist.h> #include <osmocom/core/logging.h> #include <osmocom/core/fsm.h> +#include <osmocom/core/stat_item.h> #include <osmocom/gsm/bssmap_le.h> #include <osmocom/sigtran/sccp_helpers.h> @@ -57,6 +58,7 @@ fi->priv = lbp; llist_add(&lbp->entry, &sli->lb_peers); + osmo_stat_item_inc(osmo_stat_item_group_get_item(g_smlc->statg, SMLC_STAT_LB_PEERS_TOTAL), 1); return lbp; } @@ -303,6 +305,12 @@ } } +static void lb_peer_st_ready_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) +{ + if (prev_state != LB_PEER_ST_READY) + osmo_stat_item_inc(osmo_stat_item_group_get_item(g_smlc->statg, SMLC_STAT_LB_PEERS_ACTIVE), 1); +} + static void lb_peer_st_ready(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct lb_peer *lbp = fi->priv; @@ -377,6 +385,12 @@ } } +static void lb_peer_st_ready_onleave(struct osmo_fsm_inst *fi, uint32_t next_state) +{ + if (next_state != LB_PEER_ST_READY) + osmo_stat_item_dec(osmo_stat_item_group_get_item(g_smlc->statg, SMLC_STAT_LB_PEERS_ACTIVE), 1); +} + static int lb_peer_fsm_timer_cb(struct osmo_fsm_inst *fi) { struct lb_peer *lbp = fi->priv; @@ -384,10 +398,17 @@ return 0; } +/* struct lb_peer destructor: */ static void lb_peer_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) { struct lb_peer *lbp = fi->priv; + lb_peer_discard_all_conns(lbp); + + if (lbp->fi->state == LB_PEER_ST_READY) + osmo_stat_item_dec(osmo_stat_item_group_get_item(g_smlc->statg, SMLC_STAT_LB_PEERS_ACTIVE), 1); + osmo_stat_item_dec(osmo_stat_item_group_get_item(g_smlc->statg, SMLC_STAT_LB_PEERS_TOTAL), 1); + llist_del(&lbp->entry); } @@ -446,6 +467,8 @@ [LB_PEER_ST_READY] = { .name = "READY", .action = lb_peer_st_ready, + .onenter = lb_peer_st_ready_onenter, + .onleave = lb_peer_st_ready_onleave, .in_event_mask = 0 | S(LB_PEER_EV_RX_RESET) | S(LB_PEER_EV_MSG_UP_CO_INITIAL) diff --git a/src/osmo-smlc/smlc_data.c b/src/osmo-smlc/smlc_data.c index d51bceb..1e25e39 100644 --- a/src/osmo-smlc/smlc_data.c +++ b/src/osmo-smlc/smlc_data.c @@ -54,6 +54,19 @@ smlc_ctr_description, }; +static const struct osmo_stat_item_desc smlc_stat_item_description[] = { + [SMLC_STAT_LB_PEERS_TOTAL] = { "lb_peers.total", "Total Lb peers seen since startup", OSMO_STAT_ITEM_NO_UNIT, 4, 0}, + [SMLC_STAT_LB_PEERS_ACTIVE] = { "lb_peers.active", "Currently active Lb peers", OSMO_STAT_ITEM_NO_UNIT, 4, 0}, +}; + +static const struct osmo_stat_item_group_desc smlc_statg_desc = { + "smlc", + "serving mobile location center", + OSMO_STATS_CLASS_GLOBAL, + ARRAY_SIZE(smlc_stat_item_description), + smlc_stat_item_description, +}; + struct smlc_state *smlc_state_alloc(void *ctx) { struct smlc_state *smlc = talloc_zero(ctx, struct smlc_state); @@ -61,5 +74,14 @@ INIT_LLIST_HEAD(&smlc->subscribers); INIT_LLIST_HEAD(&smlc->cell_locations); smlc->ctrs = rate_ctr_group_alloc(smlc, &smlc_ctrg_desc, 0); + + smlc->statg = osmo_stat_item_group_alloc(smlc, &smlc_statg_desc, 0); + if (!smlc->statg) + goto ret_free; return smlc; + +ret_free: + rate_ctr_group_free(smlc->ctrs); + talloc_free(smlc); + return NULL; } diff --git a/src/osmo-smlc/smlc_vty.c b/src/osmo-smlc/smlc_vty.c index 36ca47e..c6ae83a 100644 --- a/src/osmo-smlc/smlc_vty.c +++ b/src/osmo-smlc/smlc_vty.c @@ -23,6 +23,8 @@ #include <osmocom/ctrl/control_vty.h> #include <osmocom/vty/logging.h> #include <osmocom/vty/misc.h> +#include <osmocom/vty/stats.h> +#include <osmocom/vty/vty.h> #include <osmocom/sigtran/osmo_ss7.h> #include <osmocom/sigtran/sccp_sap.h> @@ -37,6 +39,7 @@ osmo_talloc_vty_add_cmds(); ctrl_vty_init(vty_app_info->tall_ctx); osmo_fsm_vty_add_cmds(); + osmo_stats_vty_add_cmds(); osmo_ss7_vty_init_asp(vty_app_info->tall_ctx); osmo_sccp_vty_init(); -- To view, visit https://gerrit.osmocom.org/c/osmo-smlc/+/40679?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-smlc Gerrit-Branch: master Gerrit-Change-Id: Ib01576036f34ac7f21c5bce0155b50932eb9b72a Gerrit-Change-Number: 40679 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: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-smlc[master]: vty: Create smlc_vty.c
by pespin 15 Jul '25

15 Jul '25
Attention is currently required from: fixeria, laforge. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-smlc/+/40678?usp=email ) Change subject: vty: Create smlc_vty.c ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-smlc/+/40678?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-smlc Gerrit-Branch: master Gerrit-Change-Id: I6899602c3a6e22ee6ff93540466f839b2bf5ccc1 Gerrit-Change-Number: 40678 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 15 Jul 2025 10:53:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-smlc[master]: smlc: Initial implementation of N-PCSTATE.ind
by pespin 15 Jul '25

15 Jul '25
Attention is currently required from: pespin. Hello Jenkins Builder, fixeria, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-smlc/+/40665?usp=email to look at the new patch set (#5). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: smlc: Initial implementation of N-PCSTATE.ind ...................................................................... smlc: Initial implementation of N-PCSTATE.ind Related: OS#5917 Change-Id: Id034a0c4d8bff0647a64658480dfa9b4cea563de --- M include/osmocom/smlc/lb_peer.h M src/osmo-smlc/lb_peer.c M src/osmo-smlc/sccp_lb_inst.c 3 files changed, 155 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-smlc refs/changes/65/40665/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-smlc/+/40665?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-smlc Gerrit-Branch: master Gerrit-Change-Id: Id034a0c4d8bff0647a64658480dfa9b4cea563de Gerrit-Change-Number: 40665 Gerrit-PatchSet: 5 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-Attention: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-smlc[master]: vty: Create smlc_vty.c
by pespin 15 Jul '25

15 Jul '25
Attention is currently required from: fixeria, laforge. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-smlc/+/40678?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by laforge, Verified+1 by Jenkins Builder Change subject: vty: Create smlc_vty.c ...................................................................... vty: Create smlc_vty.c We already have a smlc_vty.h file, but no usual smlc_vty.c file where we put commands or init functions existed yet. Change-Id: I6899602c3a6e22ee6ff93540466f839b2bf5ccc1 --- M include/osmocom/smlc/smlc_vty.h M src/osmo-smlc/Makefile.am M src/osmo-smlc/smlc_main.c A src/osmo-smlc/smlc_vty.c 4 files changed, 52 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-smlc refs/changes/78/40678/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-smlc/+/40678?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-smlc Gerrit-Branch: master Gerrit-Change-Id: I6899602c3a6e22ee6ff93540466f839b2bf5ccc1 Gerrit-Change-Number: 40678 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-smlc[master]: Introduce stats msc.ran_peers.{total,active}
by pespin 15 Jul '25

15 Jul '25
Attention is currently required from: pespin. Hello Jenkins Builder, fixeria, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-smlc/+/40679?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: Introduce stats msc.ran_peers.{total,active} ...................................................................... Introduce stats msc.ran_peers.{total,active} osmo_stats_init() was already being called despite no stats were being used. Change-Id: Ib01576036f34ac7f21c5bce0155b50932eb9b72a --- M include/osmocom/smlc/smlc_data.h M src/osmo-smlc/lb_peer.c M src/osmo-smlc/smlc_data.c M src/osmo-smlc/smlc_vty.c 4 files changed, 55 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-smlc refs/changes/79/40679/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-smlc/+/40679?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-smlc Gerrit-Branch: master Gerrit-Change-Id: Ib01576036f34ac7f21c5bce0155b50932eb9b72a Gerrit-Change-Number: 40679 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-Attention: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-smlc[master]: vty: Create smlc_vty.c
by pespin 15 Jul '25

15 Jul '25
Attention is currently required from: fixeria. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-smlc/+/40678?usp=email ) Change subject: vty: Create smlc_vty.c ...................................................................... Patch Set 1: (2 comments) File src/osmo-smlc/smlc_main.c: https://gerrit.osmocom.org/c/osmo-smlc/+/40678/comment/58880c03_d036d103?us… : PS1, Line 22: osmocom/ctrl/control_vty.h > not needed anymore? Done https://gerrit.osmocom.org/c/osmo-smlc/+/40678/comment/8e47064a_90acc922?us… : PS1, Line 32: #include <osmocom/vty/logging.h> : #include <osmocom/vty/command.h> : #i > not needed anymore? Done -- To view, visit https://gerrit.osmocom.org/c/osmo-smlc/+/40678?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-smlc Gerrit-Branch: master Gerrit-Change-Id: I6899602c3a6e22ee6ff93540466f839b2bf5ccc1 Gerrit-Change-Number: 40678 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 15 Jul 2025 10:15:25 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-iuh[master]: iu_client: Initial N-PCSTATE.ind support
by pespin 15 Jul '25

15 Jul '25
Attention is currently required from: lynxis lazus, pespin. Hello Jenkins Builder, lynxis lazus, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-iuh/+/40643?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: iu_client: Initial N-PCSTATE.ind support ...................................................................... iu_client: Initial N-PCSTATE.ind support There's currently no way to submit the indication to upper layers (app). It's not worth changing the API now since anyway sole user of this API (osmo-sgsn) will actually merged the implementation directly and get rid of this layer at some point. Related: OS#5487 Related: OS#3403 Change-Id: I36818ca9d2ef42a68698e5c3b66367207d177b67 --- M src/iu_client.c 1 file changed, 126 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/43/40643/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/40643?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I36818ca9d2ef42a68698e5c3b66367207d177b67 Gerrit-Change-Number: 40643 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • ...
  • 150
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.