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

July 2023

  • 1 participants
  • 3051 discussions
[S] Change in docker-playground[master]: debian-bullseye-jenkins: add libcdk5-dev
by osmith 11 Jul '23

11 Jul '23
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/33675 ) Change subject: debian-bullseye-jenkins: add libcdk5-dev ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/33675 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I015b6d7cb834e99ea5d04206ba5f8c519c4e6af1 Gerrit-Change-Number: 33675 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 11 Jul 2023 14:28:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in docker-playground[master]: debian-bullseye-jenkins: add libcdk5-dev
by osmith 11 Jul '23

11 Jul '23
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/33675 ) Change subject: debian-bullseye-jenkins: add libcdk5-dev ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/33675 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I015b6d7cb834e99ea5d04206ba5f8c519c4e6af1 Gerrit-Change-Number: 33675 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 11 Jul 2023 14:28:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bsc[master]: configure: add --enable-meas-udp2db/pcap2db/vis
by osmith 11 Jul '23

11 Jul '23
Attention is currently required from: fixeria. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/33681 ) Change subject: configure: add --enable-meas-udp2db/pcap2db/vis ...................................................................... Patch Set 4: (1 comment) Patchset: PS4: > Do we really want to change the default behavior, which can be described as `[default=check]`? IMO, […] I can't find it right now, but I'm pretty sure Harald said some years ago on a mailing list post / issue that this should be changed. I think that besides this leading to the bug mentioned on top of OS#5173 it's annoying if two systems build a project, then one has an additional binary and the other one does not, and one needs to go into the configure scripts to figure out why that is the case. Somewhat related: https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependenci… -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/33681 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I8b3d5efb769437a5d3036e1e627b8d477275d93e Gerrit-Change-Number: 33681 Gerrit-PatchSet: 4 Gerrit-Owner: osmith <osmith(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, 11 Jul 2023 14:23:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in docker-playground[master]: debian-bullseye-jenkins: add libcdk5-dev
by pespin 11 Jul '23

11 Jul '23
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/33675 ) Change subject: debian-bullseye-jenkins: add libcdk5-dev ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/33675 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I015b6d7cb834e99ea5d04206ba5f8c519c4e6af1 Gerrit-Change-Number: 33675 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Tue, 11 Jul 2023 14:01:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-msc[master]: ASCI: Add option to switch on or off ASCI support
by pespin 11 Jul '23

11 Jul '23
Attention is currently required from: jolly. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/33674 ) Change subject: ASCI: Add option to switch on or off ASCI support ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/33674 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Id68deb69f7395f0f8f50b3820e9d51052a34f753 Gerrit-Change-Number: 33674 Gerrit-PatchSet: 2 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Tue, 11 Jul 2023 14:00:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-msc[master]: ASCI: Add function to receive VGCS/VBS messages from BSS
by pespin 11 Jul '23

11 Jul '23
Attention is currently required from: jolly. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/33504 ) Change subject: ASCI: Add function to receive VGCS/VBS messages from BSS ...................................................................... Patch Set 14: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/33504 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie4a2f19ba75140a6f2de02b709597239c01f02a2 Gerrit-Change-Number: 33504 Gerrit-PatchSet: 14 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Tue, 11 Jul 2023 13:58:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-msc[master]: ASCI: Add decoder for VGCS/VBS messages to msc_a.c
by pespin 11 Jul '23

11 Jul '23
Attention is currently required from: jolly. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/33506 ) Change subject: ASCI: Add decoder for VGCS/VBS messages to msc_a.c ...................................................................... Patch Set 14: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/33506 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ief6259ba3914eeaceb063b562a0bcbc48349ce60 Gerrit-Change-Number: 33506 Gerrit-PatchSet: 14 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Tue, 11 Jul 2023 13:56:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[XL] Change in osmo-msc[master]: ASCI: Add call control for VGCS/VBS
by pespin 11 Jul '23

11 Jul '23
Attention is currently required from: jolly, dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/33511 ) Change subject: ASCI: Add call control for VGCS/VBS ...................................................................... Patch Set 14: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/33511 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I9947403fde8212b66758104443c60aaacc8b1e7b Gerrit-Change-Number: 33511 Gerrit-PatchSet: 14 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: dexter <pmaier(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 11 Jul 2023 13:56:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-sccp[master]: ss7: Refactor osmo_ss7_asp_find_or_create()
by pespin 11 Jul '23

11 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/33647 ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: ss7: Refactor osmo_ss7_asp_find_or_create() ...................................................................... ss7: Refactor osmo_ss7_asp_find_or_create() Move allocation code to its own function. Simplify osmo_ss7_asp_find_or_create() code paths. Change-Id: Ibbf20c63fc1d2b22a7c5d750002f94795ee31f26 --- M src/osmo_ss7.c 1 file changed, 43 insertions(+), 25 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 3851ab8..839d756 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1521,6 +1521,31 @@ return asp; } +static struct osmo_ss7_asp * +osmo_ss7_asp_alloc(struct osmo_ss7_instance *inst, const char *name, + uint16_t remote_port, uint16_t local_port, + enum osmo_ss7_asp_protocol proto) +{ + struct osmo_ss7_asp *asp = talloc_zero(inst, struct osmo_ss7_asp); + asp->ctrg = rate_ctr_group_alloc(asp, &ss7_asp_rcgd, g_ss7_asp_rcg_idx++); + if (!asp->ctrg) { + talloc_free(asp); + return NULL; + } + rate_ctr_group_set_name(asp->ctrg, name); + asp->inst = inst; + asp->cfg.remote.port = remote_port; + asp->cfg.local.port = local_port; + asp->cfg.proto = proto; + asp->cfg.name = talloc_strdup(asp, name); + llist_add_tail(&asp->list, &inst->asp_list); + + /* The SUA code internally needs SCCP to work */ + if (proto == OSMO_SS7_ASP_PROT_SUA) + osmo_ss7_ensure_sccp(inst); + return asp; +} + struct osmo_ss7_asp * osmo_ss7_asp_find_or_create(struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, @@ -1530,34 +1555,15 @@ OSMO_ASSERT(ss7_initialized); asp = osmo_ss7_asp_find_by_name(inst, name); - - if (asp && (asp->cfg.remote.port != remote_port || + if (asp) { + if (asp->cfg.remote.port != remote_port || asp->cfg.local.port != local_port || - asp->cfg.proto != proto)) - return NULL; - - if (!asp) { - /* FIXME: check if local port has SCTP? */ - asp = talloc_zero(inst, struct osmo_ss7_asp); - asp->ctrg = rate_ctr_group_alloc(asp, &ss7_asp_rcgd, g_ss7_asp_rcg_idx++); - if (!asp->ctrg) { - talloc_free(asp); + asp->cfg.proto != proto) return NULL; - } - rate_ctr_group_set_name(asp->ctrg, name); - asp->inst = inst; - asp->cfg.remote.port = remote_port; - asp->cfg.local.port = local_port; - asp->cfg.proto = proto; - asp->cfg.name = talloc_strdup(asp, name); - llist_add_tail(&asp->list, &inst->asp_list); - - /* The SUA code internally needs SCCP to work */ - if (proto == OSMO_SS7_ASP_PROT_SUA) - osmo_ss7_ensure_sccp(inst); - + return asp; } - return asp; + + return osmo_ss7_asp_alloc(inst, name, remote_port, local_port, proto); } void osmo_ss7_asp_destroy(struct osmo_ss7_asp *asp) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33647 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ibbf20c63fc1d2b22a7c5d750002f94795ee31f26 Gerrit-Change-Number: 33647 Gerrit-PatchSet: 3 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> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-sccp[master]: asp: Make ASP default LM timers VTY configurable
by pespin 11 Jul '23

11 Jul '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/33648 ) Change subject: asp: Make ASP default LM timers VTY configurable ...................................................................... asp: Make ASP default LM timers VTY configurable Related: SYS#6511 Change-Id: Ib62e19f2e528e8b2792cbb51a5900dc3463ebd06 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/osmo_ss7_vty.c M src/xua_default_lm_fsm.c M src/xua_internal.h 5 files changed, 167 insertions(+), 20 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 3c72394..ba1e214 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -437,6 +437,9 @@ struct osmo_ss7_asp_peer remote; uint8_t qos_class; uint32_t quirks; + + /* T_defs used by the default_lm: */ + struct osmo_tdef *T_defs_lm; } cfg; }; diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 839d756..e24b853 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1538,6 +1538,11 @@ asp->cfg.local.port = local_port; asp->cfg.proto = proto; asp->cfg.name = talloc_strdup(asp, name); + + asp->cfg.T_defs_lm = talloc_memdup(asp, ss7_asp_lm_timer_defaults, + sizeof(ss7_asp_lm_timer_defaults)); + osmo_tdefs_reset(asp->cfg.T_defs_lm); + llist_add_tail(&asp->list, &inst->asp_list); /* The SUA code internally needs SCCP to work */ diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 9398bc1..61f14cd 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -790,6 +790,77 @@ return CMD_SUCCESS; } +/* timer lm <name> <1-999999> + * (cmdstr and doc are dynamically generated from ss7_asp_lm_timer_names.) */ +DEFUN_ATTR(asp_timer, asp_timer_cmd, + NULL, NULL, CMD_ATTR_IMMEDIATE) +{ + struct osmo_ss7_asp *asp = vty->index; + enum ss7_asp_lm_timer timer = get_string_value(ss7_asp_lm_timer_names, argv[0]); + + if (timer <= 0 || timer >= SS7_ASP_LM_TIMERS_LEN) { + vty_out(vty, "%% Invalid timer: %s%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } + + osmo_tdef_set(asp->cfg.T_defs_lm, timer, atoi(argv[1]), OSMO_TDEF_S); + return CMD_SUCCESS; +} + +static void gen_asp_timer_cmd_strs(struct cmd_element *cmd) +{ + int i; + char *cmd_str = NULL; + char *doc_str = NULL; + + OSMO_ASSERT(cmd->string == NULL); + OSMO_ASSERT(cmd->doc == NULL); + + osmo_talloc_asprintf(tall_vty_ctx, cmd_str, "timer lm ("); + osmo_talloc_asprintf(tall_vty_ctx, doc_str, + "Configure ASP default timer values\n" + "Configure ASP default lm timer values\n"); + + for (i = 0; ss7_asp_lm_timer_names[i].str; i++) { + const struct osmo_tdef *def; + enum ss7_asp_lm_timer timer; + + timer = ss7_asp_lm_timer_names[i].value; + def = osmo_tdef_get_entry((struct osmo_tdef *)&ss7_asp_lm_timer_defaults, timer); + OSMO_ASSERT(def); + + osmo_talloc_asprintf(tall_vty_ctx, cmd_str, "%s%s", + i ? "|" : "", + ss7_asp_lm_timer_names[i].str); + osmo_talloc_asprintf(tall_vty_ctx, doc_str, "%s (default: %lu)\n", + def->desc, + def->default_val); + } + + osmo_talloc_asprintf(tall_vty_ctx, cmd_str, ") <1-999999>"); + osmo_talloc_asprintf(tall_vty_ctx, doc_str, + "Timer value, in seconds\n"); + + cmd->string = cmd_str; + cmd->doc = doc_str; +} + +static void write_asp_timers(struct vty *vty, const char *indent, + struct osmo_ss7_asp *asp) +{ + int i; + + for (i = 0; ss7_asp_lm_timer_names[i].str; i++) { + const struct osmo_tdef *tdef = osmo_tdef_get_entry(asp->cfg.T_defs_lm, ss7_asp_lm_timer_names[i].value); + if (!tdef) + continue; + if (tdef->val == tdef->default_val) + continue; + vty_out(vty, "%stimer lm %s %lu%s", indent, ss7_asp_lm_timer_names[i].str, + tdef->val, VTY_NEWLINE); + } +} + static char *as_list_for_asp(const struct osmo_ss7_asp *asp, char *buf, size_t buf_len) { struct osmo_strbuf sb = { .buf = buf, .len = buf_len }; @@ -882,6 +953,7 @@ continue; vty_out(vty, " quirk %s%s", get_value_string(asp_quirk_names, (1 << i)), VTY_NEWLINE); } + write_asp_timers(vty, " ", asp); } @@ -2127,6 +2199,8 @@ install_lib_element(L_CS7_ASP_NODE, &asp_shutdown_cmd); install_lib_element(L_CS7_ASP_NODE, &asp_quirk_cmd); install_lib_element(L_CS7_ASP_NODE, &asp_no_quirk_cmd); + gen_asp_timer_cmd_strs(&asp_timer_cmd); + install_lib_element(L_CS7_ASP_NODE, &asp_timer_cmd); install_node(&as_node, NULL); install_lib_element_ve(&show_cs7_as_cmd); diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c index 512c6c4..639d30a 100644 --- a/src/xua_default_lm_fsm.c +++ b/src/xua_default_lm_fsm.c @@ -76,17 +76,53 @@ { 0, NULL } }; -enum lm_timer { - T_WAIT_ASP_UP, - T_WAIT_NOTIFY, - T_WAIT_NOTIFY_RKM, - T_WAIT_RK_REG_RESP, +/*********************************************************************** + * Timer Handling + ***********************************************************************/ + +const struct osmo_tdef ss7_asp_lm_timer_defaults[SS7_ASP_LM_TIMERS_LEN] = { + { .T = SS7_ASP_LM_T_WAIT_ASP_UP, .default_val = 20, .unit = OSMO_TDEF_S, + .desc = "Restart ASP after timeout waiting for ASP UP (SG role) / ASP UP ACK (ASP role) (s)" }, + { .T = SS7_ASP_LM_T_WAIT_NOTIFY, .default_val = 2, .unit = OSMO_TDEF_S, + .desc = "Restart ASP after timeout waiting for NOTIFY (s)" }, + { .T = SS7_ASP_LM_T_WAIT_NOTIY_RKM, .default_val = 20, .unit = OSMO_TDEF_S, + .desc = "Restart ASP after timeout waiting for NOTIFY after RKM registration (s)" }, + { .T = SS7_ASP_LM_T_WAIT_RK_REG_RESP, .default_val = 10, .unit = OSMO_TDEF_S, + .desc = "Restart ASP after timeout waiting for RK_REG_RESP (s)" }, + {} +}; + +/* Appendix C.4 of ITU-T Q.714 */ +const struct value_string ss7_asp_lm_timer_names[] = { + { SS7_ASP_LM_T_WAIT_ASP_UP, "wait_asp_up" }, + { SS7_ASP_LM_T_WAIT_NOTIFY, "wait_notify" }, + { SS7_ASP_LM_T_WAIT_NOTIY_RKM, "wait_notify_rkm" }, + { SS7_ASP_LM_T_WAIT_RK_REG_RESP, "wait_rk_reg_resp" }, + {} +}; + +osmo_static_assert(ARRAY_SIZE(ss7_asp_lm_timer_defaults) == (SS7_ASP_LM_TIMERS_LEN) && + ARRAY_SIZE(ss7_asp_lm_timer_names) == (SS7_ASP_LM_TIMERS_LEN), + assert_ss7_asp_lm_timer_count); + +static const struct osmo_tdef_state_timeout lm_fsm_timeouts[32] = { + [S_IDLE] = { }, + [S_WAIT_ASP_UP] = { .T = SS7_ASP_LM_T_WAIT_ASP_UP }, + [S_WAIT_NOTIFY] = { .T = SS7_ASP_LM_T_WAIT_NOTIFY }, /* SS7_ASP_LM_T_WAIT_NOTIY_RKM if coming from S_RKM_REG */ + [S_RKM_REG] = { .T = SS7_ASP_LM_T_WAIT_RK_REG_RESP }, + [S_ACTIVE] = { }, }; struct lm_fsm_priv { struct osmo_ss7_asp *asp; }; +#define lm_fsm_state_chg(fi, NEXT_STATE) \ + osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \ + lm_fsm_timeouts, \ + ((struct lm_fsm_priv *)(fi->priv))->asp->cfg.T_defs_lm, \ + -1) + static struct osmo_ss7_as *find_first_as_in_asp(struct osmo_ss7_asp *asp) { struct osmo_ss7_as *as; @@ -138,8 +174,8 @@ switch (event) { case LM_E_SCTP_EST_IND: - /* Try to transition to ASP-UP, wait for 20s */ - osmo_fsm_inst_state_chg(fi, S_WAIT_ASP_UP, 20, T_WAIT_ASP_UP); + /* Try to transition to ASP-UP, wait to receive message for a few seconds */ + lm_fsm_state_chg(fi, S_WAIT_ASP_UP); osmo_fsm_inst_dispatch(lmp->asp->fi, XUA_ASP_E_M_ASP_UP_REQ, NULL); break; } @@ -151,7 +187,7 @@ case LM_E_ASP_UP_CONF: /* ASP is up, wait for some time if any NOTIFY * indications about AS in this ASP are received */ - osmo_fsm_inst_state_chg(fi, S_WAIT_NOTIFY, 2, T_WAIT_NOTIFY); + lm_fsm_state_chg(fi, S_WAIT_NOTIFY); break; } } @@ -164,13 +200,13 @@ struct osmo_ss7_as *as; switch (fi->T) { - case T_WAIT_ASP_UP: + case SS7_ASP_LM_T_WAIT_ASP_UP: /* we have been waiting for the ASP to come up, but it * failed to do so */ LOGPFSML(fi, LOGL_NOTICE, "Peer didn't send any ASP_UP in time! Restarting ASP\n"); restart_asp(fi); break; - case T_WAIT_NOTIFY: + case SS7_ASP_LM_T_WAIT_NOTIFY: if (lmp->asp->cfg.quirks & OSMO_SS7_ASP_QUIRK_NO_NOTIFY) { /* some implementations don't send the NOTIFY which they SHOULD * according to RFC4666 (see OS#5145) */ @@ -181,7 +217,7 @@ /* No AS has reported via NOTIFY that is was * (statically) configured at the SG for this ASP, so * let's dynamically register */ - osmo_fsm_inst_state_chg(fi, S_RKM_REG, 10, T_WAIT_RK_REG_RESP); + lm_fsm_state_chg(fi, S_RKM_REG); prim = xua_xlm_prim_alloc(OSMO_XLM_PRIM_M_RK_REG, PRIM_OP_REQUEST); OSMO_ASSERT(prim); as = find_first_as_in_asp(lmp->asp); @@ -195,12 +231,12 @@ prim->u.rk_reg.traf_mode = as->cfg.mode; osmo_xlm_sap_down(lmp->asp, &prim->oph); break; - case T_WAIT_NOTIFY_RKM: + case SS7_ASP_LM_T_WAIT_NOTIY_RKM: /* No AS has reported via NOTIFY even after dynamic RKM * configuration */ restart_asp(fi); break; - case T_WAIT_RK_REG_RESP: + case SS7_ASP_LM_T_WAIT_RK_REG_RESP: /* timeout of registration of routing key */ restart_asp(fi); break; @@ -220,7 +256,7 @@ if (oxp->u.notify.status_type == M3UA_NOTIFY_T_STATCHG && (oxp->u.notify.status_info == M3UA_NOTIFY_I_AS_INACT || oxp->u.notify.status_info == M3UA_NOTIFY_I_AS_PEND)) { - osmo_fsm_inst_state_chg(fi, S_ACTIVE, 0, 0); + lm_fsm_state_chg(fi, S_ACTIVE); osmo_fsm_inst_dispatch(lmp->asp->fi, XUA_ASP_E_M_ASP_ACTIVE_REQ, NULL); } break; @@ -229,7 +265,7 @@ * the SG, and that this AS is currently inactive */ /* request the ASP to go into active state (which * hopefully will bring the AS to active, too) */ - osmo_fsm_inst_state_chg(fi, S_ACTIVE, 0, 0); + lm_fsm_state_chg(fi, S_ACTIVE); osmo_fsm_inst_dispatch(lmp->asp->fi, XUA_ASP_E_M_ASP_ACTIVE_REQ, NULL); break; } @@ -237,6 +273,7 @@ static void lm_rkm_reg(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct lm_fsm_priv *lmp = fi->priv; struct osmo_xlm_prim *oxp; int rc; @@ -247,14 +284,15 @@ LOGPFSML(fi, LOGL_NOTICE, "Received RKM_REG_RSP with negative result\n"); restart_asp(fi); } else { + unsigned long timeout_sec; rc = handle_reg_conf(fi, oxp->u.rk_reg.key.l_rk_id, oxp->u.rk_reg.key.context); if (rc < 0) restart_asp(fi); - /* RKM registration was successful, we can - * transition to WAIT_NOTIFY state and assume - * that an NOTIFY/AS-INACTIVE arrives within 20 - * seconds */ - osmo_fsm_inst_state_chg(fi, S_WAIT_NOTIFY, 20, T_WAIT_NOTIFY_RKM); + /* RKM registration was successful, we can transition to WAIT_NOTIFY + * state and assume that an NOTIFY/AS-INACTIVE arrives within + * T_WAIT_NOTIFY_RKM seconds */ + timeout_sec = osmo_tdef_get(lmp->asp->cfg.T_defs_lm, SS7_ASP_LM_T_WAIT_NOTIY_RKM, OSMO_TDEF_S, -1); + osmo_fsm_inst_state_chg(fi, S_WAIT_NOTIFY, timeout_sec, SS7_ASP_LM_T_WAIT_NOTIY_RKM); } break; } diff --git a/src/xua_internal.h b/src/xua_internal.h index 5dd7066..26cb3fc 100644 --- a/src/xua_internal.h +++ b/src/xua_internal.h @@ -1,5 +1,6 @@ #pragma once +#include <osmocom/core/tdef.h> #include <osmocom/sigtran/osmo_ss7.h> #include <osmocom/sigtran/xua_msg.h> @@ -85,6 +86,22 @@ void xua_snm_pc_available(struct osmo_ss7_as *as, const uint32_t *aff_pc, unsigned int num_aff_pc, const char *info_str, bool available); +enum ss7_asp_lm_timer { + /* 0 kept unused on purpose since it's handled specially by osmo_fsm */ + SS7_ASP_LM_T_WAIT_ASP_UP = 1, + SS7_ASP_LM_T_WAIT_NOTIFY, + SS7_ASP_LM_T_WAIT_NOTIY_RKM, + SS7_ASP_LM_T_WAIT_RK_REG_RESP, + /* This must remain the last item: */ + SS7_ASP_LM_TIMERS_LEN +}; + +extern const struct osmo_tdef ss7_asp_lm_timer_defaults[SS7_ASP_LM_TIMERS_LEN]; + +extern const struct value_string ss7_asp_lm_timer_names[]; +static inline const char *ss7_asp_lm_timer_name(enum ss7_asp_lm_timer val) +{ return get_value_string(ss7_asp_lm_timer_names, val); } + extern struct osmo_fsm xua_default_lm_fsm; extern const struct value_string m3ua_rkm_reg_status_vals[]; extern const struct value_string m3ua_rkm_dereg_status_vals[]; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33648 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ib62e19f2e528e8b2792cbb51a5900dc3463ebd06 Gerrit-Change-Number: 33648 Gerrit-PatchSet: 3 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> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • ...
  • 306
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.