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 2025

  • 1 participants
  • 1182 discussions
[M] Change in libosmo-abis[master]: rtp2trau HR: remove broken TRAU-16k-UL support
by pespin 26 Feb '25

26 Feb '25
Attention is currently required from: falconia, laforge. pespin has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39623?usp=email ) Change subject: rtp2trau HR: remove broken TRAU-16k-UL support ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: letting @laforge@osmocom.org decide here since he added that code afaiu. -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39623?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: If50036c4de9a11db524abffcd87d053878104982 Gerrit-Change-Number: 39623 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Wed, 26 Feb 2025 12:21:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[L] Change in libosmo-abis[master]: rtp2trau HR: add support for TRAU-8k-UL frame output
by pespin 26 Feb '25

26 Feb '25
Attention is currently required from: falconia. pespin has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39622?usp=email ) Change subject: rtp2trau HR: add support for TRAU-8k-UL frame output ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39622?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I288cfa7d467125f7732ef1d0ef83b933e41da536 Gerrit-Change-Number: 39622 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Wed, 26 Feb 2025 12:20:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in libosmo-abis[master]: tests: add unit tests for osmo_rtp2trau()
by pespin 26 Feb '25

26 Feb '25
Attention is currently required from: falconia. pespin has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39621?usp=email ) Change subject: tests: add unit tests for osmo_rtp2trau() ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File tests/trau_conv/tw5reader.c: https://gerrit.osmocom.org/c/libosmo-abis/+/39621/comment/b729ab93_e7696ce0… : PS1, Line 37: int twts005_read_frame(FILE *hexf, unsigned *lineno, uint8_t *frame, In case you don't know about it, you may want to have a look at osmo_hexparse(). -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39621?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ia5ca8af6bd3a899253bbcc718b70e43f2265b495 Gerrit-Change-Number: 39621 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Wed, 26 Feb 2025 12:17:51 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in libosmo-abis[master]: trau_rtp_conv: document API functions
by pespin 26 Feb '25

26 Feb '25
Attention is currently required from: falconia. pespin has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39620?usp=email ) Change subject: trau_rtp_conv: document API functions ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39620?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ib7ee2466aaab47e47f78ff94c5179b90cf393d0e Gerrit-Change-Number: 39620 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Wed, 26 Feb 2025 12:13:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in libosmo-sigtran[master]: vty: Add cmd to look up route
by pespin 26 Feb '25

26 Feb '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39611?usp=email ) Change subject: vty: Add cmd to look up route ...................................................................... vty: Add cmd to look up route Implement a command which allows looking up a given route, similar to linux "ip route get", which is helpful to debug routing setup. Related: SYS#7112 Change-Id: I4dbe04862c018a1beea253de99404adb88bb7f4b --- M src/osmo_ss7_vty.c M tests/vty/osmo_stp_route_prio.vty M tests/vty/osmo_stp_test.vty 3 files changed, 53 insertions(+), 0 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved daniel: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 6b404b3..d1885ea 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -539,6 +539,51 @@ return CMD_SUCCESS; } +DEFUN(show_cs7_route_lookup, show_cs7_route_lookup_cmd, + "show cs7 instance <0-15> route-lookup POINT_CODE from POINT_CODE sls <0-15> [list-asps]", + SHOW_STR CS7_STR INST_STR INST_STR + "Look up route\n" "Destination PC\n" + "From\n" "Origin PC\n" + "SLS\n" "SLS value\n" + "List ASPs of the AS if route points to an AS") +{ + int id = atoi(argv[0]); + bool list_asps = argc > 4; + struct osmo_ss7_instance *inst; + struct osmo_ss7_route *rt; + uint32_t dpc; + int pc; + + inst = osmo_ss7_instance_find(id); + if (!inst) { + vty_out(vty, "No SS7 instance %d found%s", id, VTY_NEWLINE); + return CMD_WARNING; + } + + pc = osmo_ss7_pointcode_parse(inst, argv[1]); + if (pc < 0 || !osmo_ss7_pc_is_valid((uint32_t)pc)) { + vty_out(vty, "Invalid point code (%s)%s", argv[1], VTY_NEWLINE); + return CMD_WARNING; + } + dpc = pc; + + pc = osmo_ss7_pointcode_parse(inst, argv[2]); + if (pc < 0 || !osmo_ss7_pc_is_valid((uint32_t)pc)) { + vty_out(vty, "Invalid point code (%s)%s", argv[2], VTY_NEWLINE); + return CMD_WARNING; + } + + rt = osmo_ss7_route_lookup(inst, dpc); + if (!rt) { + vty_out(vty, "No route found for DPC %s%s", + osmo_ss7_pointcode_print(inst, dpc), VTY_NEWLINE); + return CMD_WARNING; + } + + vty_out(vty, "%s%s", osmo_ss7_route_name(rt, list_asps), VTY_NEWLINE); + return CMD_SUCCESS; +} + /*********************************************************************** * xUA Listener Configuration (SG) ***********************************************************************/ @@ -3103,6 +3148,7 @@ install_lib_element(L_CS7_AS_NODE, &as_pc_patch_sccp_cmd); install_lib_element_ve(&show_cs7_route_cmd); + install_lib_element_ve(&show_cs7_route_lookup_cmd); vty_init_addr(); } diff --git a/tests/vty/osmo_stp_route_prio.vty b/tests/vty/osmo_stp_route_prio.vty index 10833ea..2c68080 100644 --- a/tests/vty/osmo_stp_route_prio.vty +++ b/tests/vty/osmo_stp_route_prio.vty @@ -86,3 +86,7 @@ 3.2.1/14 2 as3 ? ? ? 3.2.1/14 5 as2 ? ? ? 3.2.1/14 6 as1 ? ? ? + +OsmoSTP(config-cs7-rt)# ! NOW TEST LOOKUP WORKS AS DESIRED (as3 PICKED): +OsmoSTP(config-cs7-rt)# do show cs7 instance 0 route-lookup 3.2.1 from 0.0.1 sls 0 +pc=6161=3.2.1 mask=0x3fff=7.255.7 via AS as3 proto=m3ua diff --git a/tests/vty/osmo_stp_test.vty b/tests/vty/osmo_stp_test.vty index cb24560..9394cf4 100644 --- a/tests/vty/osmo_stp_test.vty +++ b/tests/vty/osmo_stp_test.vty @@ -12,6 +12,7 @@ show cs7 instance <0-15> asp-assoc-status name ASP_NAME show cs7 instance <0-15> as (active|all|m3ua|sua) show cs7 instance <0-15> route + show cs7 instance <0-15> route-lookup POINT_CODE from POINT_CODE sls <0-15> [list-asps] show cs7 instance <0-15> sccp addressbook show cs7 instance <0-15> sccp users show cs7 instance <0-15> sccp ssn <0-65535> @@ -35,6 +36,7 @@ show cs7 instance <0-15> asp-assoc-status name ASP_NAME show cs7 instance <0-15> as (active|all|m3ua|sua) show cs7 instance <0-15> route + show cs7 instance <0-15> route-lookup POINT_CODE from POINT_CODE sls <0-15> [list-asps] show cs7 instance <0-15> sccp addressbook show cs7 instance <0-15> sccp users show cs7 instance <0-15> sccp ssn <0-65535> @@ -78,6 +80,7 @@ asp-assoc-status Application Server Process (ASP) SCTP association status as Application Server (AS) route Routing Table + route-lookup Look up route sccp Signalling Connection Control Part OsmoSTP# show cs7 instance 0 as ? -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39611?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I4dbe04862c018a1beea253de99404adb88bb7f4b Gerrit-Change-Number: 39611 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmo-sigtran[master]: Move osmo_ss7_route_name() to osmo_ss7_route.c
by pespin 26 Feb '25

26 Feb '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39608?usp=email ) Change subject: Move osmo_ss7_route_name() to osmo_ss7_route.c ...................................................................... Move osmo_ss7_route_name() to osmo_ss7_route.c Change-Id: I6889a9b6c86453044a6cf6728e7e61264d594a4e --- M src/osmo_ss7_hmrt.c M src/osmo_ss7_route.c 2 files changed, 60 insertions(+), 59 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/src/osmo_ss7_hmrt.c b/src/osmo_ss7_hmrt.c index 5fca2d8..839b8ad 100644 --- a/src/osmo_ss7_hmrt.c +++ b/src/osmo_ss7_hmrt.c @@ -146,65 +146,6 @@ } } -/*! Return human readable representation of the route, in a static buffer. - * This uses both osmo_ss7_pointcode_print() and osmo_ss7_pointcode_print2(), so pairing - * osmo_ss7_route_name() with osmo_ss7_pointcode_print() in the same printf statement is likely to - * conflict. - * \param[in] rt The route information to print, or NULL. - * \param[in] list_asps If true, append info for all ASPs for the route's AS. - * \returns A string constant or static buffer. */ -const char *osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps) -{ - static char buf[256]; - char *pos = buf; - struct osmo_ss7_instance *inst; - size_t l; - - if (!rt) - return "no route"; - - inst = rt->rtable->inst; - -#define APPEND(fmt, args ...) \ - do { \ - l = snprintf(pos, sizeof(buf) - (pos - buf), fmt, ## args); \ - pos += l; \ - if (pos - buf >= sizeof(buf) ) \ - goto out; \ - } while (0) - - APPEND("pc=%u=%s mask=0x%x=%s", - rt->cfg.pc, osmo_ss7_pointcode_print(inst, rt->cfg.pc), - rt->cfg.mask, osmo_ss7_pointcode_print2(inst, rt->cfg.mask)); - - if (rt->dest.as) { - struct osmo_ss7_as *as = rt->dest.as; - int i; - APPEND(" via AS %s proto=%s", as->cfg.name, osmo_ss7_asp_protocol_name(as->cfg.proto)); - - if (list_asps) { - for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { - struct osmo_ss7_asp *asp = as->cfg.asps[i]; - if (!asp) - continue; - APPEND(" ASP"); - if (asp->cfg.name) - APPEND(" %s", asp->cfg.name); - if (asp->sock_name) - APPEND(" %s", asp->sock_name); - } - } - } else if (rt->dest.linkset) - APPEND(" via linkset %s", rt->dest.linkset->cfg.name); - else - APPEND(" has no route set"); -#undef APPEND - -out: - buf[sizeof(buf)-1] = '\0'; - return buf; -} - /* HMDC->HMRT Msg For Routing; Figure 26/Q.704 */ /* local message was receive d from L4, SRM, SLM, STM or SLTC, or * remote message received from L2 and HMDC determined msg for routing */ diff --git a/src/osmo_ss7_route.c b/src/osmo_ss7_route.c index 1afc75c..8a1592f 100644 --- a/src/osmo_ss7_route.c +++ b/src/osmo_ss7_route.c @@ -28,6 +28,7 @@ #include "ss7_linkset.h" #include "ss7_as.h" +#include "ss7_asp.h" #include "ss7_route.h" #include "ss7_route_table.h" #include "ss7_internal.h" @@ -295,6 +296,65 @@ return buf; } +/*! Return human readable representation of the route, in a static buffer. + * This uses both osmo_ss7_pointcode_print() and osmo_ss7_pointcode_print2(), so pairing + * osmo_ss7_route_name() with osmo_ss7_pointcode_print() in the same printf statement is likely to + * conflict. + * \param[in] rt The route information to print, or NULL. + * \param[in] list_asps If true, append info for all ASPs for the route's AS. + * \returns A string constant or static buffer. */ +const char *osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps) +{ + static char buf[256]; + char *pos = buf; + struct osmo_ss7_instance *inst; + size_t l; + + if (!rt) + return "no route"; + + inst = rt->rtable->inst; + +#define APPEND(fmt, args ...) \ + do { \ + l = snprintf(pos, sizeof(buf) - (pos - buf), fmt, ## args); \ + pos += l; \ + if (pos - buf >= sizeof(buf)) \ + goto out; \ + } while (0) + + APPEND("pc=%u=%s mask=0x%x=%s", + rt->cfg.pc, osmo_ss7_pointcode_print(inst, rt->cfg.pc), + rt->cfg.mask, osmo_ss7_pointcode_print2(inst, rt->cfg.mask)); + + if (rt->dest.as) { + struct osmo_ss7_as *as = rt->dest.as; + int i; + APPEND(" via AS %s proto=%s", as->cfg.name, osmo_ss7_asp_protocol_name(as->cfg.proto)); + + if (list_asps) { + for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { + struct osmo_ss7_asp *asp = as->cfg.asps[i]; + if (!asp) + continue; + APPEND(" ASP"); + if (asp->cfg.name) + APPEND(" %s", asp->cfg.name); + if (asp->sock_name) + APPEND(" %s", asp->sock_name); + } + } + } else if (rt->dest.linkset) + APPEND(" via linkset %s", rt->dest.linkset->cfg.name); + else + APPEND(" has no route set"); +#undef APPEND + +out: + buf[sizeof(buf)-1] = '\0'; + return buf; +} + /*! \brief Find a SS7 route for given destination point code in given SS7 */ struct osmo_ss7_route * osmo_ss7_route_lookup(struct osmo_ss7_instance *inst, uint32_t dpc) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39608?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I6889a9b6c86453044a6cf6728e7e61264d594a4e Gerrit-Change-Number: 39608 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(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>
1 0
0 0
[S] Change in libosmo-sigtran[master]: vty: show cs7 route: display qos-class configured value
by pespin 26 Feb '25

26 Feb '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39613?usp=email ) Change subject: vty: show cs7 route: display qos-class configured value ...................................................................... vty: show cs7 route: display qos-class configured value Change-Id: I2d2a246c7fbdf495af94ac5da14d4a93ef837f81 --- M src/osmo_ss7_vty.c M tests/vty/osmo_stp_route_prio.vty 2 files changed, 13 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve daniel: Looks good to me, approved diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index d1885ea..a15b7c6 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -518,7 +518,14 @@ llist_for_each_entry(rt, &rtbl->routes, list) { vty_out(vty, "%-22s %c %c %u %-19s %-7s %-7s %-7s%s", osmo_ss7_route_print(rt), - ' ', ' ', rt->cfg.priority, rt->cfg.linkset_name, "?", "?", "?", VTY_NEWLINE); + ' ', + '0' + rt->cfg.qos_class, + rt->cfg.priority, + rt->cfg.linkset_name, + "?", + "?", + "?", + VTY_NEWLINE); } } diff --git a/tests/vty/osmo_stp_route_prio.vty b/tests/vty/osmo_stp_route_prio.vty index 2c68080..255128e 100644 --- a/tests/vty/osmo_stp_route_prio.vty +++ b/tests/vty/osmo_stp_route_prio.vty @@ -65,7 +65,7 @@ OsmoSTP(config-cs7)# ! ADD 2 ROUTES WITH DECREASING PRIORITIES. THEY SHOULD END UP REORDERED BY PRIORITY: OsmoSTP(config-cs7)# route-table system -OsmoSTP(config-cs7-rt)# update route 3.2.1 7.255.7 linkset as1 priority 6 +OsmoSTP(config-cs7-rt)# update route 3.2.1 7.255.7 linkset as1 priority 6 qos-class 7 OsmoSTP(config-cs7-rt)# update route 3.2.1 7.255.7 linkset as2 OsmoSTP(config-cs7-rt)# update route 3.2.1 7.255.7 linkset as3 priority 2 OsmoSTP(config-cs7-rt)# show running-config @@ -75,7 +75,7 @@ route-table system update route 3.2.1 7.255.7 linkset as3 priority 2 update route 3.2.1 7.255.7 linkset as2 - update route 3.2.1 7.255.7 linkset as1 priority 6 + update route 3.2.1 7.255.7 linkset as1 priority 6 qos-class 7 ... OsmoSTP(config-cs7-rt)# do show cs7 instance 0 route Routing table = system @@ -83,9 +83,9 @@ Destination C Q P Linkset Name Linkset Non-adj Route ---------------------- - - - ------------------- ------- ------- ------- -3.2.1/14 2 as3 ? ? ? -3.2.1/14 5 as2 ? ? ? -3.2.1/14 6 as1 ? ? ? +3.2.1/14 0 2 as3 ? ? ? +3.2.1/14 0 5 as2 ? ? ? +3.2.1/14 7 6 as1 ? ? ? OsmoSTP(config-cs7-rt)# ! NOW TEST LOOKUP WORKS AS DESIRED (as3 PICKED): OsmoSTP(config-cs7-rt)# do show cs7 instance 0 route-lookup 3.2.1 from 0.0.1 sls 0 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39613?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I2d2a246c7fbdf495af94ac5da14d4a93ef837f81 Gerrit-Change-Number: 39613 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmo-sigtran[master]: vty: Improve route status display in show cs7 instance route
by pespin 26 Feb '25

26 Feb '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39617?usp=email ) Change subject: vty: Improve route status display in show cs7 instance route ...................................................................... vty: Improve route status display in show cs7 instance route Change-Id: I7f4ca56f9308803a306e7d6a3cde2faec27c3e7f --- M src/osmo_ss7_link.c M src/osmo_ss7_linkset.c M src/osmo_ss7_route.c M src/osmo_ss7_vty.c M src/ss7_link.h M src/ss7_linkset.h M src/ss7_route.h M tests/vty/osmo_stp_route_prio.vty 8 files changed, 48 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, approved osmith: Looks good to me, but someone else must approve diff --git a/src/osmo_ss7_link.c b/src/osmo_ss7_link.c index 321d72e..6310824 100644 --- a/src/osmo_ss7_link.c +++ b/src/osmo_ss7_link.c @@ -75,3 +75,11 @@ return link; } + +/* Whether link is available, ITU Q.704 section 3.2 */ +bool +ss7_link_is_available(const struct osmo_ss7_link *link) +{ + /* TODO: manage operational availability of a link... */ + return link->cfg.adm_state == OSMO_SS7_LS_ENABLED; +} diff --git a/src/osmo_ss7_linkset.c b/src/osmo_ss7_linkset.c index 146ec92..c6d4a68 100644 --- a/src/osmo_ss7_linkset.c +++ b/src/osmo_ss7_linkset.c @@ -100,3 +100,14 @@ return lset; } + +bool +ss7_linkset_is_available(const struct osmo_ss7_linkset *lset) +{ + for (unsigned int i = 0; i < ARRAY_SIZE(lset->links); i++) { + struct osmo_ss7_link *link = lset->links[i]; + if (link && ss7_link_is_available(link)) + return true; + } + return false; +} diff --git a/src/osmo_ss7_route.c b/src/osmo_ss7_route.c index 8a1592f..2787895 100644 --- a/src/osmo_ss7_route.c +++ b/src/osmo_ss7_route.c @@ -372,3 +372,15 @@ { return rt->dest.as; } + + +/* Whether route is available, ITU Q.704 */ +bool ss7_route_is_available(const struct osmo_ss7_route *rt) +{ + OSMO_ASSERT(rt); + if (rt->dest.as) + return osmo_ss7_as_active(rt->dest.as); + if (rt->dest.linkset) + return ss7_linkset_is_available(rt->dest.linkset); + return false; +} diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index b29c93a..576ad7c 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -520,15 +520,18 @@ if ((filter_pc != OSMO_SS7_PC_INVALID) && ((filter_pc & rt->cfg.mask) != rt->cfg.pc)) continue; /* Skip routes not matching destination */ - vty_out(vty, "%-22s %c %c %u %-19s %-7s %-7s %-7s%s", + bool rt_avail = ss7_route_is_available(rt); + + vty_out(vty, "%-16s %-5s %c %c %u %-19s %-7s %-7s %-7s%s", osmo_ss7_route_print(rt), + rt_avail ? "acces" : "INACC", ' ', '0' + rt->cfg.qos_class, rt->cfg.priority, rt->cfg.linkset_name, + rt_avail ? "avail" : "UNAVAIL", "?", - "?", - "?", + rt_avail ? "avail" : "UNAVAIL", VTY_NEWLINE); } } diff --git a/src/ss7_link.h b/src/ss7_link.h index 5ea6556..1bdcf12 100644 --- a/src/ss7_link.h +++ b/src/ss7_link.h @@ -31,3 +31,6 @@ void ss7_link_destroy(struct osmo_ss7_link *link); struct osmo_ss7_link * ss7_link_find_or_create(struct osmo_ss7_linkset *lset, uint32_t id); + +bool +ss7_link_is_available(const struct osmo_ss7_link *link); diff --git a/src/ss7_linkset.h b/src/ss7_linkset.h index daa442f..beb60a1 100644 --- a/src/ss7_linkset.h +++ b/src/ss7_linkset.h @@ -30,3 +30,6 @@ ss7_linkset_find_by_name(struct osmo_ss7_instance *inst, const char *name); struct osmo_ss7_linkset * ss7_linkset_find_or_create(struct osmo_ss7_instance *inst, const char *name, uint32_t pc); + +bool +ss7_linkset_is_available(const struct osmo_ss7_linkset *lset); diff --git a/src/ss7_route.h b/src/ss7_route.h index 7a29b7b..0382564 100644 --- a/src/ss7_route.h +++ b/src/ss7_route.h @@ -54,3 +54,5 @@ int ss7_route_set_linkset(struct osmo_ss7_route *rt, const char *linkset_name); int ss7_route_insert(struct osmo_ss7_route *rt); + +bool ss7_route_is_available(const struct osmo_ss7_route *rt); diff --git a/tests/vty/osmo_stp_route_prio.vty b/tests/vty/osmo_stp_route_prio.vty index 255128e..6f60d9a 100644 --- a/tests/vty/osmo_stp_route_prio.vty +++ b/tests/vty/osmo_stp_route_prio.vty @@ -83,9 +83,9 @@ Destination C Q P Linkset Name Linkset Non-adj Route ---------------------- - - - ------------------- ------- ------- ------- -3.2.1/14 0 2 as3 ? ? ? -3.2.1/14 0 5 as2 ? ? ? -3.2.1/14 7 6 as1 ? ? ? +3.2.1/14 INACC 0 2 as3 UNAVAIL ? UNAVAIL +3.2.1/14 INACC 0 5 as2 UNAVAIL ? UNAVAIL +3.2.1/14 INACC 7 6 as1 UNAVAIL ? UNAVAIL OsmoSTP(config-cs7-rt)# ! NOW TEST LOOKUP WORKS AS DESIRED (as3 PICKED): OsmoSTP(config-cs7-rt)# do show cs7 instance 0 route-lookup 3.2.1 from 0.0.1 sls 0 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39617?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I7f4ca56f9308803a306e7d6a3cde2faec27c3e7f Gerrit-Change-Number: 39617 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-sigtran[master]: vty: Allow filtering by DPC in show cs7 instance route
by pespin 26 Feb '25

26 Feb '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39616?usp=email ) Change subject: vty: Allow filtering by DPC in show cs7 instance route ...................................................................... vty: Allow filtering by DPC in show cs7 instance route As available in Cisco ITP too. Change-Id: Iff92e61c7e2cc3186de75cb622686657b6c9cae5 --- M src/osmo_ss7_vty.c M tests/vty/osmo_stp_test.vty 2 files changed, 22 insertions(+), 6 deletions(-) Approvals: daniel: Looks good to me, approved Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index a15b7c6..b29c93a 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -505,7 +505,8 @@ } } -static void vty_dump_rtable(struct vty *vty, struct osmo_ss7_route_table *rtbl) +/* "filter_pc == OSMO_SS7_PC_INVALID" means "show all" */ +static void vty_dump_rtable(struct vty *vty, struct osmo_ss7_route_table *rtbl, uint32_t filter_pc) { struct osmo_ss7_route *rt; @@ -516,6 +517,9 @@ vty_out(vty, "---------------------- - - - ------------------- ------- ------- -------%s", VTY_NEWLINE); llist_for_each_entry(rt, &rtbl->routes, list) { + if ((filter_pc != OSMO_SS7_PC_INVALID) && ((filter_pc & rt->cfg.mask) != rt->cfg.pc)) + continue; /* Skip routes not matching destination */ + vty_out(vty, "%-22s %c %c %u %-19s %-7s %-7s %-7s%s", osmo_ss7_route_print(rt), ' ', @@ -530,11 +534,14 @@ } DEFUN(show_cs7_route, show_cs7_route_cmd, - "show cs7 instance <0-15> route", - SHOW_STR CS7_STR INST_STR INST_STR "Routing Table\n") + "show cs7 instance <0-15> route [POINT_CODE]", + SHOW_STR CS7_STR INST_STR INST_STR + "Routing Table\n" + "Destination Point Code\n") { int id = atoi(argv[0]); struct osmo_ss7_instance *inst; + uint32_t filter_pc = OSMO_SS7_PC_INVALID; inst = osmo_ss7_instance_find(id); if (!inst) { @@ -542,7 +549,16 @@ return CMD_WARNING; } - vty_dump_rtable(vty, inst->rtable_system); + if (argc > 1) { + int pc = osmo_ss7_pointcode_parse(inst, argv[1]); + if (pc < 0 || !osmo_ss7_pc_is_valid((uint32_t)pc)) { + vty_out(vty, "Invalid point code (%s)%s", argv[1], VTY_NEWLINE); + return CMD_WARNING; + } + filter_pc = (uint32_t)pc; + } + + vty_dump_rtable(vty, inst->rtable_system, filter_pc); return CMD_SUCCESS; } diff --git a/tests/vty/osmo_stp_test.vty b/tests/vty/osmo_stp_test.vty index 9394cf4..747c7b7 100644 --- a/tests/vty/osmo_stp_test.vty +++ b/tests/vty/osmo_stp_test.vty @@ -11,7 +11,7 @@ show cs7 instance <0-15> asp-assoc-status show cs7 instance <0-15> asp-assoc-status name ASP_NAME show cs7 instance <0-15> as (active|all|m3ua|sua) - show cs7 instance <0-15> route + show cs7 instance <0-15> route [POINT_CODE] show cs7 instance <0-15> route-lookup POINT_CODE from POINT_CODE sls <0-15> [list-asps] show cs7 instance <0-15> sccp addressbook show cs7 instance <0-15> sccp users @@ -35,7 +35,7 @@ show cs7 instance <0-15> asp-assoc-status show cs7 instance <0-15> asp-assoc-status name ASP_NAME show cs7 instance <0-15> as (active|all|m3ua|sua) - show cs7 instance <0-15> route + show cs7 instance <0-15> route [POINT_CODE] show cs7 instance <0-15> route-lookup POINT_CODE from POINT_CODE sls <0-15> [list-asps] show cs7 instance <0-15> sccp addressbook show cs7 instance <0-15> sccp users -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39616?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: Iff92e61c7e2cc3186de75cb622686657b6c9cae5 Gerrit-Change-Number: 39616 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmo-sigtran[master]: snm: Fix generating wrong format in 'affected PCs' log string
by pespin 26 Feb '25

26 Feb '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39618?usp=email ) Change subject: snm: Fix generating wrong format in 'affected PCs' log string ...................................................................... snm: Fix generating wrong format in 'affected PCs' log string The previous code wrongly added an extra ", " string between each element. Change-Id: I338a700e705f15bec962dca5ea69533ddec5e8a6 --- M src/xua_snm.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/src/xua_snm.c b/src/xua_snm.c index 36fe3c7..971380b 100644 --- a/src/xua_snm.c +++ b/src/xua_snm.c @@ -59,7 +59,7 @@ uint8_t mask = _aff_pc >> 24; /* append point code + mask */ - out = talloc_asprintf_append(out, "%s%s/%u, ", i == 0 ? "" : ", ", + out = talloc_asprintf_append(out, "%s%s/%u", i == 0 ? "" : ", ", osmo_ss7_pointcode_print(s7i, pc), mask); } return out; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39618?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I338a700e705f15bec962dca5ea69533ddec5e8a6 Gerrit-Change-Number: 39618 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • ...
  • 119
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.