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/libosmo-sccp/+/16004 ) Change subject: xua: ipa_asp_fsm: Allow moving ASP to inactive state ...................................................................... xua: ipa_asp_fsm: Allow moving ASP to inactive state If AS is configured with Traffic Mode Override, then if a new ASP becomes active, all previous ASPs are considered to be inactive and new data is sent to the newly activated ASP. Remark: It's still unclear which methodology/implementation will follow when the last activated ASP becomes inactive/shutdown. Then probably another one should be activated at that time, but that logic is not there implemented as far as I know. Change-Id: I4ff246b2f899aaa3cf63bbdb3f3d317dc89b3d15 --- M src/xua_asp_fsm.c 1 file changed, 26 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 3f3d69a..0a84f28 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -749,6 +749,7 @@ enum ipa_asp_state { IPA_ASP_S_DOWN = XUA_ASP_S_DOWN, + IPA_ASP_S_INACTIVE = XUA_ASP_S_INACTIVE, IPA_ASP_S_ACTIVE = XUA_ASP_S_ACTIVE, IPA_ASP_S_WAIT_ID_RESP, /* Waiting for ID_RESP from peer */ IPA_ASP_S_WAIT_ID_GET, /* Waiting for ID_GET from peer */ @@ -977,6 +978,16 @@ } } +static void ipa_asp_fsm_inactive(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case XUA_ASP_E_M_ASP_DOWN_REQ: + ipa_asp_fsm_del_route(fi->priv); + osmo_fsm_inst_state_chg(fi, IPA_ASP_S_DOWN, 0, 0); + break; + } +} + static void ipa_asp_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct ipa_asp_fsm_priv *iafp = fi->priv; @@ -1010,6 +1021,11 @@ dispatch_to_all_as(fi, XUA_ASPAS_ASP_ACTIVE_IND); } +static void ipa_asp_fsm_inactive_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) +{ + dispatch_to_all_as(fi, XUA_ASPAS_ASP_INACTIVE_IND); +} + static void ipa_pong_timer_cb(void *_fi) { struct osmo_fsm_inst *fi = _fi; @@ -1074,11 +1090,20 @@ [IPA_ASP_S_ACTIVE] = { .in_event_mask = S(XUA_ASP_E_M_ASP_DOWN_REQ) | S(XUA_ASP_E_M_ASP_INACTIVE_REQ), - .out_state_mask = S(IPA_ASP_S_DOWN), + .out_state_mask = S(IPA_ASP_S_DOWN) | + S(IPA_ASP_S_INACTIVE), .name = "ASP_ACTIVE", .action = ipa_asp_fsm_active, .onenter = ipa_asp_fsm_active_onenter, }, + [IPA_ASP_S_INACTIVE] = { + .in_event_mask = S(XUA_ASP_E_M_ASP_DOWN_REQ), + .out_state_mask = S(IPA_ASP_S_DOWN) | + S(IPA_ASP_S_ACTIVE), + .name = "ASP_INACTIVE", + .action = ipa_asp_fsm_inactive, + .onenter = ipa_asp_fsm_inactive_onenter, + }, }; static void ipa_asp_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16004 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4ff246b2f899aaa3cf63bbdb3f3d317dc89b3d15 Gerrit-Change-Number: 16004 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191112/436df179/attachment.htm>