pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40000?usp=email )
Change subject: AS loadsharing: Pick 1st ASP upon 1st roundrobin assignment ......................................................................
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, 5 insertions(+), 1 deletion(-)
Approvals: osmith: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/src/osmo_ss7_as.c b/src/osmo_ss7_as.c index e84a36d..4dedfc3 100644 --- a/src/osmo_ss7_as.c +++ b/src/osmo_ss7_as.c @@ -127,6 +127,10 @@ 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); + + /* Pick 1st ASP upon 1st roundrobin assignment: */ + as->cfg.last_asp_idx_assigned = ARRAY_SIZE(as->cfg.asps) - 1; + as->fi = xua_as_fsm_start(as, LOGL_DEBUG); llist_add_tail(&as->list, &inst->as_list);
@@ -356,7 +360,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 = ARRAY_SIZE(as->cfg.asps) - 1; }
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)