This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/24682 ) Change subject: gprs_ns2: use llist_add_tail to keep order ...................................................................... gprs_ns2: use llist_add_tail to keep order When configuring multiple NSE/BINDs the order of the configuration should be keeped. Related: OS#5181 Change-Id: Ibbc03f0780b49543b5bd97ee059f11cfd6c2a126 --- M src/gb/gprs_ns2.c M src/gb/gprs_ns2_vty.c M tests/gb/gprs_ns2_vty.vty 3 files changed, 10 insertions(+), 10 deletions(-) Approvals: dexter: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c index 618d55e..3bf31a3 100644 --- a/src/gb/gprs_ns2.c +++ b/src/gb/gprs_ns2.c @@ -609,8 +609,8 @@ rate_ctr_group_set_name(nsvc->ctrg, id); osmo_stat_item_group_set_name(nsvc->statg, id); - llist_add(&nsvc->list, &nse->nsvc); - llist_add(&nsvc->blist, &bind->nsvc); + llist_add_tail(&nsvc->list, &nse->nsvc); + llist_add_tail(&nsvc->blist, &bind->nsvc); ns2_nse_update_mtu(nse); return nsvc; @@ -809,7 +809,7 @@ nse->nsi = nsi; nse->first = true; nse->mtu = 0; - llist_add(&nse->list, &nsi->nse); + llist_add_tail(&nse->list, &nsi->nse); INIT_LLIST_HEAD(&nse->nsvc); return nse; @@ -1633,7 +1633,7 @@ bind->sns_data_weight = 1; bind->nsi = nsi; INIT_LLIST_HEAD(&bind->nsvc); - llist_add(&bind->list, &nsi->binding); + llist_add_tail(&bind->list, &nsi->binding); nsi->bind_rate_ctr_idx++; diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c index 2777641..705b60e 100644 --- a/src/gb/gprs_ns2_vty.c +++ b/src/gb/gprs_ns2_vty.c @@ -141,7 +141,7 @@ vbind->ip_sns_sig_weight = 1; vbind->ip_sns_data_weight = 1; - llist_add(&vbind->list, &binds); + llist_add_tail(&vbind->list, &binds); return vbind; } @@ -172,7 +172,7 @@ vnse->nsei = nsei; INIT_LLIST_HEAD(&vnse->binds); - llist_add(&vnse->list, &nses); + llist_add_tail(&vnse->list, &nses); return vnse; } diff --git a/tests/gb/gprs_ns2_vty.vty b/tests/gb/gprs_ns2_vty.vty index 891bde5..4589f96 100644 --- a/tests/gb/gprs_ns2_vty.vty +++ b/tests/gb/gprs_ns2_vty.vty @@ -54,15 +54,15 @@ OsmoNSdummy# show ns NSEI 01234: UDP, DEAD 3 NS-VC: - NSVCI none: RECOVERING PERSIST data_weight=0 sig_weight=0 udp)[127.0.0.14]:42999<>[127.0.0.17]: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=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 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=0 sig_weight=0 udp)[127.0.0.14]:42999<>[127.0.0.17]: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=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 OsmoNSdummy# configure terminal OsmoNSdummy(config)# ns OsmoNSdummy(config-ns)# nse 1234 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/24682 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibbc03f0780b49543b5bd97ee059f11cfd6c2a126 Gerrit-Change-Number: 24682 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus <lynxis at fe80.eu> Gerrit-Assignee: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-CC: daniel <dwillmann at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210625/cb92a787/attachment.htm>