pespin has uploaded this change for review.

View Change

AS loadsharing: Pick 1st ASP upon 1st roundrobin assignment

Before this patch, the AS started filling it's loadsharing tables with
the 2nd ASP in the list, which is actually fine too but a bit
unexpected when debugging.

Change-Id: I9ac08d371dde2cfd433be22f1fb6cd01d6ef12be
---
M src/osmo_ss7_as.c
1 file changed, 2 insertions(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/00/40000/1
diff --git a/src/osmo_ss7_as.c b/src/osmo_ss7_as.c
index e84a36d..c568d8e 100644
--- a/src/osmo_ss7_as.c
+++ b/src/osmo_ss7_as.c
@@ -127,6 +127,7 @@
as->cfg.mode = OSMO_SS7_AS_TMOD_OVERRIDE;
as->cfg.recovery_timeout_msec = 2000;
as->cfg.routing_key.l_rk_id = ss7_find_free_l_rk_id(inst);
+ as->cfg.last_asp_idx_assigned = 0xff; /* Pick 1st ASP upon 1st roundrobin assignment. */
as->fi = xua_as_fsm_start(as, LOGL_DEBUG);
llist_add_tail(&as->list, &inst->as_list);

@@ -356,7 +357,7 @@
void ss7_as_loadshare_binding_table_reset(struct osmo_ss7_as *as)
{
memset(&as->aesls_table[0], 0, sizeof(as->aesls_table));
- as->cfg.last_asp_idx_assigned = 0;
+ as->cfg.last_asp_idx_assigned = 0xff;
}

static as_ext_sls_t osmo_ss7_instance_calc_itu_as_ext_sls(const struct osmo_ss7_as *as, uint32_t opc, uint8_t sls)

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

Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I9ac08d371dde2cfd433be22f1fb6cd01d6ef12be
Gerrit-Change-Number: 40000
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>