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/+/21877 ) Change subject: gprs_ns2: rework frame relay load distribution function ...................................................................... gprs_ns2: rework frame relay load distribution function For frame relay the traffic will be even distributed across all NS-VCs. Do not differentiate between signalling and data traffic. Change-Id: I6c060941db335a7a6a555ac8d1b9269fa8fb2023 --- M src/gb/gprs_ns2.c M src/gb/gprs_ns2_internal.h 2 files changed, 18 insertions(+), 23 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c index 5603fce..1098f22 100644 --- a/src/gb/gprs_ns2.c +++ b/src/gb/gprs_ns2.c @@ -350,15 +350,12 @@ uint32_t load_selector) { struct gprs_ns2_vc *tmp; - uint32_t mod = (bvci + load_selector) % nse->nsvc_data_count; + uint32_t mod = (bvci + load_selector) % nse->nsvc_count; uint32_t i = 0; llist_for_each_entry(tmp, &nse->nsvc, list) { if (!gprs_ns2_vc_is_unblocked(tmp)) continue; - if (tmp->data_weight == 0) - continue; - if (i == mod) return tmp; i++; @@ -393,22 +390,20 @@ { struct gprs_ns2_vc *nsvc = NULL; - if (bvci == 0) { - /* signalling */ - nsvc = ns2_load_sharing_signal(nse); - } else { - /* data with load sharing parameter */ - if (llist_empty(&nse->nsvc)) - return NULL; - - switch (nse->ll) { - case GPRS_NS2_LL_FR: - nsvc = ns2_load_sharing_modulor(nse, bvci, link_selector); - break; - default: + switch (nse->ll) { + case GPRS_NS2_LL_FR: + nsvc = ns2_load_sharing_modulor(nse, bvci, link_selector); + break; + case GPRS_NS2_LL_UDP: + default: + if (bvci == 0) { + /* signalling */ + nsvc = ns2_load_sharing_signal(nse); + } else { + /* data with load sharing parameter */ nsvc = ns2_load_sharing_first(nse); - break; } + break; } return nsvc; @@ -1087,13 +1082,13 @@ void ns2_nse_data_sum(struct gprs_ns2_nse *nse) { struct gprs_ns2_vc *nsvc; - nse->nsvc_data_count = 0; + nse->nsvc_count = 0; llist_for_each_entry(nsvc, &nse->nsvc, list) { if (!gprs_ns2_vc_is_unblocked(nsvc)) continue; - if (nsvc->data_weight > 0) - nse->nsvc_data_count++; + + nse->nsvc_count++; } } diff --git a/src/gb/gprs_ns2_internal.h b/src/gb/gprs_ns2_internal.h index 5cb1630..4c0cdd0 100644 --- a/src/gb/gprs_ns2_internal.h +++ b/src/gb/gprs_ns2_internal.h @@ -116,8 +116,8 @@ /*! llist head to hold all nsvc */ struct llist_head nsvc; - /*! count all active NSVCs with data capabilities */ - int nsvc_data_count; + /*! count all active NSVCs */ + int nsvc_count; /*! true if this NSE was created by VTY or pcu socket) */ bool persistent; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21877 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6c060941db335a7a6a555ac8d1b9269fa8fb2023 Gerrit-Change-Number: 21877 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis at fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201227/536d50bf/attachment.htm>