Change in libosmocore[master]: gprs_ns2_sns: use different binds for the initial connection
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/21574 ) Change subject: gprs_ns2_sns: use different binds for the initial connection .. gprs_ns2_sns: use different binds for the initial connection In case the first bind is not working the SNS would never build a succesful connection to the SGSN. Iterate over all binds by using an offset. Instead of tracking the binds use an offset instead of a direct pointer. This might result in skipping the order of the next bind. Change-Id: I4a0a0608dac6ad8b5769ada2a14ca23f61eb0bcb --- M src/gb/gprs_ns2_sns.c 1 file changed, 13 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 b7fbbf8..0676b61 100644 --- a/src/gb/gprs_ns2_sns.c +++ b/src/gb/gprs_ns2_sns.c @@ -117,6 +117,8 @@ struct sns_endpoint *initial; /* all SNS PDU will be sent over this nsvc */ struct gprs_ns2_vc *sns_nsvc; + /* iterate over the binds after all remote has been tested */ + int bind_offset; /* local configuration to send to the remote end */ struct gprs_ns_ie_ip4_elem *ip4_local; @@ -714,9 +716,15 @@ return; } - bind = ns2_ip_get_bind_by_index(nsi, remote, 0); + bind = ns2_ip_get_bind_by_index(nsi, remote, gss->bind_offset); if (!bind) { - return; + if (gss->bind_offset) { + gss->bind_offset = 0; + bind = ns2_ip_get_bind_by_index(nsi, remote, gss->bind_offset); + } + + if (!bind) + return; } /* setup the NSVC */ @@ -1335,9 +1343,12 @@ return; } else if (!gss->initial) { gss->initial = llist_first_entry(>sns_endpoints, struct sns_endpoint, list); + gss->bind_offset = 0; } else if (gss->initial->list.next == >sns_endpoints) { /* last entry, continue with first */ gss->initial = llist_first_entry(>sns_endpoints, struct sns_endpoint, list); + gss->bind_offset++; + gss->bind_offset %= ns2_ip_count_bind(nse->nsi, >initial->saddr); } else { /* next element is an entry */ gss->initial = llist_entry(gss->initial->list.next, struct sns_endpoint, list); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21574 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4a0a0608dac6ad8b5769ada2a14ca23f61eb0bcb Gerrit-Change-Number: 21574 Gerrit-PatchSet: 12 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in libosmocore[master]: gprs_ns2_sns: use different binds for the initial connection
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/21574 ) Change subject: gprs_ns2_sns: use different binds for the initial connection .. Patch Set 10: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21574 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4a0a0608dac6ad8b5769ada2a14ca23f61eb0bcb Gerrit-Change-Number: 21574 Gerrit-PatchSet: 10 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 14 Dec 2020 11:34:47 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: gprs_ns2_sns: use different binds for the initial connection
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/21574 ) Change subject: gprs_ns2_sns: use different binds for the initial connection .. Patch Set 10: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21574 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4a0a0608dac6ad8b5769ada2a14ca23f61eb0bcb Gerrit-Change-Number: 21574 Gerrit-PatchSet: 10 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 14 Dec 2020 09:43:55 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: gprs_ns2_sns: use different binds for the initial connection
Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/21574 to look at the new patch set (#9). Change subject: gprs_ns2_sns: use different binds for the initial connection .. gprs_ns2_sns: use different binds for the initial connection In case the first bind is not working the SNS would never build a succesful connection to the SGSN. Iterate over all binds by using an offset. Instead of tracking the binds use an offset instead of a direct pointer. This might result in skipping the order of the next bind. Change-Id: I4a0a0608dac6ad8b5769ada2a14ca23f61eb0bcb --- M src/gb/gprs_ns2_sns.c 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/21574/9 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21574 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4a0a0608dac6ad8b5769ada2a14ca23f61eb0bcb Gerrit-Change-Number: 21574 Gerrit-PatchSet: 9 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset
Change in libosmocore[master]: gprs_ns2_sns: use different binds for the initial connection
Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/21574 to look at the new patch set (#8). Change subject: gprs_ns2_sns: use different binds for the initial connection .. gprs_ns2_sns: use different binds for the initial connection In case the first bind is not working the SNS would never build a succesful connection to the SGSN. Iterate over all binds by using an offset. Instead of tracking the binds use an offset instead of a direct pointer. This might result in skipping the order of the next bind. Change-Id: I4a0a0608dac6ad8b5769ada2a14ca23f61eb0bcb --- M src/gb/gprs_ns2_sns.c 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/21574/8 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21574 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4a0a0608dac6ad8b5769ada2a14ca23f61eb0bcb Gerrit-Change-Number: 21574 Gerrit-PatchSet: 8 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset
Change in libosmocore[master]: gprs_ns2_sns: use different binds for the initial connection
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/21574 ) Change subject: gprs_ns2_sns: use different binds for the initial connection .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21574 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4a0a0608dac6ad8b5769ada2a14ca23f61eb0bcb Gerrit-Change-Number: 21574 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 09 Dec 2020 16:34:35 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: gprs_ns2_sns: use different binds for the initial connection
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/21574 ) Change subject: gprs_ns2_sns: use different binds for the initial connection .. gprs_ns2_sns: use different binds for the initial connection In case the first bind is not working the SNS would never build a succesful connection to the SGSN. Iterate over all binds by using an offset. Instead of tracking the binds use an offset instead of a direct pointer. This might result in skipping the order of the next bind. Change-Id: I4a0a0608dac6ad8b5769ada2a14ca23f61eb0bcb --- M src/gb/gprs_ns2_sns.c 1 file changed, 19 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/21574/1 diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c index 718d075..e294fee 100644 --- a/src/gb/gprs_ns2_sns.c +++ b/src/gb/gprs_ns2_sns.c @@ -117,6 +117,8 @@ struct sns_endpoint *initial; /* all SNS PDU will be sent over this nsvc */ struct gprs_ns2_vc *sns_nsvc; + /* iterate over the binds after all remote has been tested */ + int bind_offset; /* local configuration to send to the remote end */ struct gprs_ns_ie_ip4_elem *ip4_local; @@ -714,9 +716,15 @@ return; } - bind = ns2_ip_get_bind_by_offset(nsi, remote, 0); + bind = ns2_ip_get_bind_by_offset(nsi, remote, gss->bind_offset); if (!bind) { - return; + if (gss->bind_offset) { + gss->bind_offset = 0; + bind = ns2_ip_get_bind_by_offset(nsi, remote, gss->bind_offset); + } + + if (!bind) + return; } /* setup the NSVC */ @@ -1333,12 +1341,18 @@ ns2_prim_status_ind(gss->nse, NULL, 0, NS_AFF_CAUSE_SNS_NO_ENDPOINTS); osmo_fsm_inst_state_chg(fi, GPRS_SNS_ST_UNCONFIGURED, 0, 3); return; - } else if (!gss->initial) + } else if (!gss->initial) { gss->initial = llist_first_entry(>sns_endpoints, struct sns_endpoint, list); - else if (gss->initial->list.next == >sns_endpoints) /* last entry, continue with first */ + gss->bind_offset = 0; + } else if (gss->initial->list.next == >sns_endpoints) { + /* last entry, continue with first */ gss->initial = llist_first_entry(>sns_endpoints, struct sns_endpoint, list); - else /* next element is an entry */ + gss->bind_offset++; + gss->bind_offset %= ns2_ip_count_bind(nse->nsi, >initial->saddr); + } else { + /* next element is an entry */ gss->initial = llist_entry(gss->initial->list.next, struct sns_endpoint, list); + } gss->reselection_running = false; osmo_fsm_inst_state_chg(fi, GPRS_SNS_ST_SIZE, nse->nsi->timeout[NS_TOUT_TSNS_PROV], 1); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21574 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4a0a0608dac6ad8b5769ada2a14ca23f61eb0bcb Gerrit-Change-Number: 21574 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-MessageType: newchange