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/+/21556 )
Change subject: gprs_ns2_sns: dynamic calculate the maximum NS-VCs
......................................................................
gprs_ns2_sns: dynamic calculate the maximum NS-VCs
The previous hard-coded value could be not enough if the user configures
too many local binds. Allow at least 8 NS-VCs. In case the user
configures too many binds (> 2) increase the maximum NS-VCs to allow
the SGSN to have 4 redundant connections.
Change-Id: Iae859dc504716fd6f705e72db5fc293b4b3298e7
---
M src/gb/gprs_ns2_sns.c
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
laforge: 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_sns.c b/src/gb/gprs_ns2_sns.c
index 9091c9a..50a1f9b 100644
--- a/src/gb/gprs_ns2_sns.c
+++ b/src/gb/gprs_ns2_sns.c
@@ -1265,6 +1265,7 @@
gss->sns_nsvc = nsvc;
nsvc->sns_only = true;
+ /* count how many bindings are available (only UDP binds) */
int count = 0;
llist_for_each_entry(bind, &nsi->binding, list) {
if (!gprs_ns2_is_ip_bind(bind))
@@ -1320,6 +1321,7 @@
gss->num_ip4_local = count;
gss->num_max_ip4_remote = 4;
+ gss->num_max_nsvcs = OSMO_MAX(gss->num_max_ip4_remote * 4, 8);
break;
case IPv6:
/* IPv6 */
@@ -1358,11 +1360,10 @@
}
gss->num_ip6_local = count;
gss->num_max_ip6_remote = 4;
+ gss->num_max_nsvcs = OSMO_MAX(gss->num_max_ip6_remote * 4, 8);
break;
}
- gss->num_max_nsvcs = 8;
-
return osmo_fsm_inst_dispatch(nse->bss_sns_fi, GPRS_SNS_EV_START, NULL);
err:
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21556
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iae859dc504716fd6f705e72db5fc293b4b3298e7
Gerrit-Change-Number: 21556
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201207/473abf91/attachment.htm>