Change in libosmocore[master]: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI
lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/24686 ) Change subject: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI .. Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/24686/1/src/gb/gprs_ns2_vty.c File src/gb/gprs_ns2_vty.c: https://gerrit.osmocom.org/c/libosmocore/+/24686/1/src/gb/gprs_ns2_vty.c@1876 PS1, Line 1876: if (nsvc->nsvci_is_valid) > Jenkins fails because of the VTY tests... […] Done -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/24686 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iaadc806a9136436468e2b02eb0bc1f4570a10ecc Gerrit-Change-Number: 24686 Gerrit-PatchSet: 3 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: dexter Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 06 Jul 2021 09:50:21 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: dexter Gerrit-MessageType: comment
Change in libosmocore[master]: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/24686 ) Change subject: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI .. gprs_ns2_vty: dump_nsvc: change output depending on NSVCI If the NSVCI is valid, there is no signalling or data weight defined (internally this is 1). For NSVC with NSVCI don't print the signalling or data weight. For NSVC without NSVCI, don't print NSVCI at all. Related: OS#5180 Change-Id: Iaadc806a9136436468e2b02eb0bc1f4570a10ecc --- M src/gb/gprs_ns2_vty.c M tests/gb/gprs_ns2_vty.vty 2 files changed, 17 insertions(+), 18 deletions(-) Approvals: daniel: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c index 2f540c2..0aa7902 100644 --- a/src/gb/gprs_ns2_vty.c +++ b/src/gb/gprs_ns2_vty.c @@ -1873,18 +1873,17 @@ /* non-config commands */ void ns2_vty_dump_nsvc(struct vty *vty, struct gprs_ns2_vc *nsvc, bool stats) { - char nsvci_str[32]; - if (nsvc->nsvci_is_valid) - snprintf(nsvci_str, sizeof(nsvci_str), "%05u", nsvc->nsvci); + vty_out(vty, " NSVCI %05u: %s %s %s%s", nsvc->nsvci, + osmo_fsm_inst_state_name(nsvc->fi), + nsvc->persistent ? "PERSIST" : "DYNAMIC", + gprs_ns2_ll_str(nsvc), VTY_NEWLINE); else - snprintf(nsvci_str, sizeof(nsvci_str), "none"); - - vty_out(vty, " NSVCI %s: %s %s data_weight=%u sig_weight=%u %s%s", nsvci_str, - osmo_fsm_inst_state_name(nsvc->fi), - nsvc->persistent ? "PERSIST" : "DYNAMIC", - nsvc->data_weight, nsvc->sig_weight, - gprs_ns2_ll_str(nsvc), VTY_NEWLINE); + vty_out(vty, " %s %s sig_weight=%u data_weight=%u %s%s", + osmo_fsm_inst_state_name(nsvc->fi), + nsvc->persistent ? "PERSIST" : "DYNAMIC", + nsvc->sig_weight, nsvc->data_weight, + gprs_ns2_ll_str(nsvc), VTY_NEWLINE); if (stats) { vty_out_rate_ctr_group(vty, "", nsvc->ctrg); diff --git a/tests/gb/gprs_ns2_vty.vty b/tests/gb/gprs_ns2_vty.vty index 458e2c8..45c8a16 100644 --- a/tests/gb/gprs_ns2_vty.vty +++ b/tests/gb/gprs_ns2_vty.vty @@ -40,11 +40,11 @@ OsmoNSdummy# show ns NSEI 01234: UDP, DEAD 1 NS-VC: - NSVCI none: RECOVERING PERSIST data_weight=1 sig_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 + RECOVERING PERSIST sig_weight=1 data_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 UDP bind: 127.0.0.14:42999 DSCP: 0 Priority: 0 IP-SNS signalling weight: 1 data weight: 1 1 NS-VC: - NSVCI none: RECOVERING PERSIST data_weight=1 sig_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 + RECOVERING PERSIST sig_weight=1 data_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 OsmoNSdummy# configure terminal OsmoNSdummy(config)# ns OsmoNSdummy(config-ns)# nse 1234 @@ -54,15 +54,15 @@ OsmoNSdummy# show ns NSEI 01234: UDP, DEAD 3 NS-VC: - NSVCI none: RECOVERING PERSIST data_weight=1 sig_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 - NSVCI none: RECOVERING PERSIST data_weight=9 sig_weight=0 udp)[127.0.0.14]:42999<>[127.0.0.16]:9496 - NSVCI none: RECOVERING PERSIST data_weight=0 sig_weight=0 udp)[127.0.0.14]:42999<>[127.0.0.17]:9496 + RECOVERING PERSIST sig_weight=1 data_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 + RECOVERING PERSIST sig_weight=0 data_weight=9 udp)[127.0.0.14]:42999<>[127.0.0.16]:9496 + RECOVERING PERSIST sig_weight=0 data_weight=0 udp)[127.0.0.14]:42999<>[127.0.0.17]:9496 UDP bind: 127.0.0.14:42999 DSCP: 0 Priority: 0 IP-SNS signalling weight: 1 data weight: 1 3 NS-VC: - NSVCI none: RECOVERING PERSIST data_weight=1 sig_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 - NSVCI none: RECOVERING PERSIST data_weight=9 sig_weight=0 udp)[127.0.0.14]:42999<>[127.0.0.16]:9496 - NSVCI none: RECOVERING PERSIST data_weight=0 sig_weight=0 udp)[127.0.0.14]:42999<>[127.0.0.17]:9496 + RECOVERING PERSIST sig_weight=1 data_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496 + RECOVERING PERSIST sig_weight=0 data_weight=9 udp)[127.0.0.14]:42999<>[127.0.0.16]:9496 + RECOVERING PERSIST sig_weight=0 data_weight=0 udp)[127.0.0.14]:42999<>[127.0.0.17]:9496 OsmoNSdummy# configure terminal OsmoNSdummy(config)# ns OsmoNSdummy(config-ns)# nse 1234 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/24686 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iaadc806a9136436468e2b02eb0bc1f4570a10ecc Gerrit-Change-Number: 24686 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel
Change in libosmocore[master]: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/24686 ) Change subject: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/24686 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iaadc806a9136436468e2b02eb0bc1f4570a10ecc Gerrit-Change-Number: 24686 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: dexter Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 05 Jul 2021 11:40:58 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/24686 ) Change subject: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/24686 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iaadc806a9136436468e2b02eb0bc1f4570a10ecc Gerrit-Change-Number: 24686 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 02 Jul 2021 15:24:23 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI
Hello Jenkins Builder, dexter, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/24686 to look at the new patch set (#2). Change subject: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI .. gprs_ns2_vty: dump_nsvc: change output depending on NSVCI If the NSVCI is valid, there is no signalling or data weight defined (internally this is 1). For NSVC with NSVCI don't print the signalling or data weight. For NSVC without NSVCI, don't print NSVCI at all. Related: OS#5180 Change-Id: Iaadc806a9136436468e2b02eb0bc1f4570a10ecc --- M src/gb/gprs_ns2_vty.c M tests/gb/gprs_ns2_vty.vty 2 files changed, 17 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/24686/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/24686 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iaadc806a9136436468e2b02eb0bc1f4570a10ecc Gerrit-Change-Number: 24686 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-MessageType: newpatchset
Change in libosmocore[master]: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/24686 ) Change subject: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI .. Patch Set 1: Code-Review+1 (1 comment) The VTY tests need an update, otherwise looks it good to me. https://gerrit.osmocom.org/c/libosmocore/+/24686/1/src/gb/gprs_ns2_vty.c File src/gb/gprs_ns2_vty.c: https://gerrit.osmocom.org/c/libosmocore/+/24686/1/src/gb/gprs_ns2_vty.c@1876 PS1, Line 1876: if (nsvc->nsvci_is_valid) Jenkins fails because of the VTY tests... Mismatch: Expect: ' NSVCI none: RECOVERING PERSIST data_weight=1 sig_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496' Got: ' RECOVERING PERSIST sig_weight=1 data_weight=1 udp)[127.0.0.14]:42999<>[127.0.0.15]:9496' -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/24686 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iaadc806a9136436468e2b02eb0bc1f4570a10ecc Gerrit-Change-Number: 24686 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Comment-Date: Wed, 23 Jun 2021 11:53:04 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/24686 ) Change subject: gprs_ns2_vty: dump_nsvc: change output depending on NSVCI .. gprs_ns2_vty: dump_nsvc: change output depending on NSVCI If the NSVCI is valid, there is no signalling or data weight defined (internally this is 1). For NSVC with NSVCI don't print the signalling or data weight. For NSVC without NSVCI, don't print NSVCI at all. Related: OS#5180 Change-Id: Iaadc806a9136436468e2b02eb0bc1f4570a10ecc --- M src/gb/gprs_ns2_vty.c 1 file changed, 9 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/24686/1 diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c index 819e0c8..4932b68 100644 --- a/src/gb/gprs_ns2_vty.c +++ b/src/gb/gprs_ns2_vty.c @@ -1873,18 +1873,17 @@ /* non-config commands */ void ns2_vty_dump_nsvc(struct vty *vty, struct gprs_ns2_vc *nsvc, bool stats) { - char nsvci_str[32]; - if (nsvc->nsvci_is_valid) - snprintf(nsvci_str, sizeof(nsvci_str), "%05u", nsvc->nsvci); + vty_out(vty, " NSVCI %05u: %s %s %s%s", nsvc->nsvci, + osmo_fsm_inst_state_name(nsvc->fi), + nsvc->persistent ? "PERSIST" : "DYNAMIC", + gprs_ns2_ll_str(nsvc), VTY_NEWLINE); else - snprintf(nsvci_str, sizeof(nsvci_str), "none"); - - vty_out(vty, " NSVCI %s: %s %s data_weight=%u sig_weight=%u %s%s", nsvci_str, - osmo_fsm_inst_state_name(nsvc->fi), - nsvc->persistent ? "PERSIST" : "DYNAMIC", - nsvc->data_weight, nsvc->sig_weight, - gprs_ns2_ll_str(nsvc), VTY_NEWLINE); + vty_out(vty, " %s %s sig_weight=%u data_weight=%u %s%s", + osmo_fsm_inst_state_name(nsvc->fi), + nsvc->persistent ? "PERSIST" : "DYNAMIC", + nsvc->sig_weight, nsvc->data_weight, + gprs_ns2_ll_str(nsvc), VTY_NEWLINE); if (stats) { vty_out_rate_ctr_group(vty, "", nsvc->ctrg); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/24686 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iaadc806a9136436468e2b02eb0bc1f4570a10ecc Gerrit-Change-Number: 24686 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-MessageType: newchange