lynxis lazus submitted this change.

View Change

Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified daniel: Looks good to me, but someone else must approve lynxis lazus: Looks good to me, approved
tcap loadshare: Rework initial selection of a node

The original TCAP loadshare plan was to used the OTID of a TCAP Begin to select
the node.
However this should not be used anymore. Instead the correct one would be to
do a load-sharing across all available ASP and keep this relation ("sticky" sessions).

The counter SS7_AS_CTR_TCAP_ASP_FALLBACK will be re-used by a later patch.

Related: SYS#5432
Change-Id: I151e6acb59e1f3c481487e76d2b01236fcee755f
---
M src/tcap_as_loadshare.c
1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/src/tcap_as_loadshare.c b/src/tcap_as_loadshare.c
index 1dc4f71..5cc7d44 100644
--- a/src/tcap_as_loadshare.c
+++ b/src/tcap_as_loadshare.c
@@ -522,23 +522,15 @@
goto out_free_sua;
}

- /* lookup a new ASP */
- asp = tcap_as_asp_find_by_tcap_id(as, &calling_addr, &called_addr, parsed.otid);
-
+ asp = select_asp_tcap_enabled_rr(as);
if (asp) {
rate_ctr_inc2(as->ctrg, SS7_AS_CTR_TCAP_ASP_SELECTED);
} else {
- /* if no ASP found for this TCAP, try to find a non-tcap-range ASP as fallback*/
- asp = select_asp_tcap_enabled_rr(as);
- if (asp)
- rate_ctr_inc2(as->ctrg, SS7_AS_CTR_TCAP_ASP_FALLBACK);
- else {
- /* couldn't find a suitable canditate for OTID */
- rate_ctr_inc2(as->ctrg, SS7_AS_CTR_TCAP_ASP_FAILED);
- LOGPAS(as, DLTCAP, LOGL_DEBUG, "Couldn't find a suitable canditate for TCAP Begin otid %u\n", parsed.otid);
- rc = -ENOKEY;
- goto out_free_sua;
- }
+ /* Couldn't find a suitable canditate */
+ LOGPAS(as, DLTCAP, LOGL_DEBUG, "Couldn't find a suitable canditate for TCAP Begin otid %u\n", parsed.otid);
+ rate_ctr_inc2(as->ctrg, SS7_AS_CTR_TCAP_ASP_FAILED);
+ rc = -ENOKEY;
+ goto out_free_sua;
}

tcap_trans_track_begin(as, asp, &called_addr, NULL, &calling_addr, &parsed.otid);

To view, visit change 42755. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I151e6acb59e1f3c481487e76d2b01236fcee755f
Gerrit-Change-Number: 42755
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus <lynxis@fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann@sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>