Ack, code review only. Thanks, Praveen
On 18-Jan-17 9:50 AM, Minh Hon Chau wrote: > src/amf/amfd/role.cc | 2 +- > src/amf/amfd/sg.h | 1 - > src/amf/amfd/sg_2n_fsm.cc | 142 > ++++++++++++++++++++-------------------- > src/amf/amfd/sg_npm_fsm.cc | 138 +++++++++++++++++++------------------- > src/amf/amfd/sg_nway_fsm.cc | 108 +++++++++++++++--------------- > src/amf/amfd/sg_nwayact_fsm.cc | 80 +++++++++++----------- > src/amf/amfd/si.cc | 6 +- > src/amf/amfd/si_dep.cc | 10 +- > 8 files changed, 243 insertions(+), 244 deletions(-) > > > AMFD currently is using both m_AVD_SET_SG_FSM and set_fsm_state(), > this patch removes m_AVD_SET_SG_FSM > > diff --git a/src/amf/amfd/role.cc b/src/amf/amfd/role.cc > --- a/src/amf/amfd/role.cc > +++ b/src/amf/amfd/role.cc > @@ -676,7 +676,7 @@ void avd_role_switch_ncs_su_evh(AVD_CL_C > } else { > avd_sg_su_oper_list_add(cb, i_su, false); > i_su->set_su_switch(AVSV_SI_TOGGLE_SWITCH); > - m_AVD_SET_SG_FSM(cb, (i_su->sg_of_su), > AVD_SG_FSM_SU_OPER); > + > i_su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > } > } > } > diff --git a/src/amf/amfd/sg.h b/src/amf/amfd/sg.h > --- a/src/amf/amfd/sg.h > +++ b/src/amf/amfd/sg.h > @@ -577,7 +577,6 @@ private: > }; > > // TODO(hafe) remove when all code has been changed > -#define m_AVD_SET_SG_FSM(cb,sg,state) (sg)->set_fsm_state(state) > #define m_AVD_SET_SG_ADMIN_SI(cb,si) (si)->sg_of_si->set_admin_si((si)) > #define m_AVD_CLEAR_SG_ADMIN_SI(cb,sg) (sg)->clear_admin_si() > #define m_AVD_CHK_OPLIST(i_su,flag) (flag) = > (i_su)->sg_of_su->in_su_oper_list(i_su) > diff --git a/src/amf/amfd/sg_2n_fsm.cc b/src/amf/amfd/sg_2n_fsm.cc > --- a/src/amf/amfd/sg_2n_fsm.cc > +++ b/src/amf/amfd/sg_2n_fsm.cc > @@ -735,7 +735,7 @@ uint32_t SG_2N::si_assign(AVD_CL_CB *cb, > /* Add the SU to the list and change the FSM state */ > avd_sg_su_oper_list_add(cb, l_su, false); > > - m_AVD_SET_SG_FSM(cb, (si->sg_of_si), AVD_SG_FSM_SG_REALIGN); > + si->sg_of_si->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > done: > TRACE_LEAVE(); > @@ -778,7 +778,7 @@ SaAisErrorT SG_2N::si_swap(AVD_SI *si, S > > /* Add the SU to the operation list and change the SG state to > SU_operation. */ > avd_sg_su_oper_list_add(avd_cb, susi->su, false); > - m_AVD_SET_SG_FSM(avd_cb, susi->su->sg_of_su, AVD_SG_FSM_SU_OPER); > + susi->su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > susi->su->set_su_switch(AVSV_SI_TOGGLE_SWITCH); > si->invocation = invocation; > > @@ -867,7 +867,7 @@ uint32_t SG_2N::su_fault_su_oper(AVD_SU > > /* add the SU to the operation list and change the SG > FSM to SG realign. */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, this, AVD_SG_FSM_SG_REALIGN); > + set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > /* if the other SUs switch field is true, it is in > service, > * having quiesced assigning state Send > D2N-INFO_SU_SI_ASSIGN modify > @@ -925,7 +925,7 @@ uint32_t SG_2N::su_fault_su_oper(AVD_SU > > /* add the SU to the operation list and change the SG > FSM to SG realign. */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, this, AVD_SG_FSM_SG_REALIGN); > + set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > /* If the other SUs switch field is true, it is in > service, > * having quiesced assigned state Change switch field > to false. > @@ -996,7 +996,7 @@ uint32_t SG_2N::su_fault_si_oper(AVD_SU > > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SU_OPER); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > } else { > /* The SU has standby assignments. Send > D2N-INFO_SU_SI_ASSIGN > * with remove all to the SU. > @@ -1052,7 +1052,7 @@ uint32_t SG_2N::su_fault_si_oper(AVD_SU > > su->sg_of_su->admin_si->set_admin_state(SA_AMF_ADMIN_UNLOCKED); > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SU_OPER); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > } else { > /* The SU has standby assignments. Change the > SI admin state to > * unlock. Remove the SI from the SI admin > pointer. > @@ -1069,7 +1069,7 @@ uint32_t SG_2N::su_fault_si_oper(AVD_SU > avd_sg_su_si_del_snd(cb, su); > avd_sg_su_oper_list_add(cb, su, false); > avd_sg_su_oper_list_add(cb, o_susi->su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { /* if (l_susi != AVD_SU_SI_REL_NULL) */ > > @@ -1089,7 +1089,7 @@ uint32_t SG_2N::su_fault_si_oper(AVD_SU > avd_sg_su_si_del_snd(cb, su); > avd_sg_su_oper_list_add(cb, su, false); > avd_sg_su_oper_list_add(cb, o_susi->su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* else (l_susi != AVD_SU_SI_REL_NULL) */ > > } else { > @@ -1137,7 +1137,7 @@ uint32_t SG_2N::su_fault(AVD_CL_CB *cb, > > /* add the SU to the operation list and change the SG > FSM to SU operation. */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SU_OPER); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > } else { > > /* means standby */ > @@ -1149,7 +1149,7 @@ uint32_t SG_2N::su_fault(AVD_CL_CB *cb, > > /* add the SU to the operation list and change the SG > FSM to SG realign. */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > break; /* case AVD_SG_FSM_STABLE: */ > case AVD_SG_FSM_SG_REALIGN: > @@ -1361,7 +1361,7 @@ uint32_t SG_2N::su_insvc(AVD_CL_CB *cb, > /* Add the SU to the list and change the FSM state */ > avd_sg_su_oper_list_add(cb, l_su, false); > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > done: > TRACE_LEAVE2("%u", rc); > @@ -1463,7 +1463,7 @@ uint32_t SG_2N::susi_success_sg_realign( > > if ((l_su = avd_sg_2n_su_chose_asgn(cb, > su->sg_of_su)) == nullptr) { > /* all the assignments have > already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > avd_sg_app_su_inst_func(cb, > su->sg_of_su); > } else { > @@ -1523,7 +1523,7 @@ uint32_t SG_2N::susi_success_sg_realign( > > if ((l_su = > avd_sg_2n_su_chose_asgn(cb, su->sg_of_su)) == nullptr) { > /* all the assignments > have already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > > avd_sg_app_su_inst_func(cb, su->sg_of_su); > } else { > @@ -1568,7 +1568,7 @@ uint32_t SG_2N::susi_success_sg_realign( > > if ((l_su = avd_sg_2n_su_chose_asgn(cb, > su->sg_of_su)) == nullptr) { > /* all the assignments have > already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > avd_sg_app_su_inst_func(cb, > su->sg_of_su); > } else { > @@ -1597,7 +1597,7 @@ uint32_t SG_2N::susi_success_sg_realign( > if (all_assignments_done(o_su)) { > if ((l_su = avd_sg_2n_su_chose_asgn(cb, > su->sg_of_su)) == nullptr) { > /* all the assignments have > already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > } else { > avd_sg_su_oper_list_add(cb, > l_su, true); > @@ -1631,7 +1631,7 @@ uint32_t SG_2N::susi_success_sg_realign( > > if ((l_su = avd_sg_2n_su_chose_asgn(cb, > su->sg_of_su)) == nullptr) { > /* all the assignments have > already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > avd_sg_app_su_inst_func(cb, > su->sg_of_su); > } else { > @@ -1679,7 +1679,7 @@ uint32_t SG_2N::susi_success_sg_realign( > > if ((l_su = avd_sg_2n_su_chose_asgn(cb, > su->sg_of_su)) == nullptr) { > /* all the assignments have > already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > avd_sg_app_su_inst_func(cb, > su->sg_of_su); > } else { > @@ -1741,7 +1741,7 @@ uint32_t SG_2N::susi_success_sg_realign( > } else { > if ((l_su = > avd_sg_2n_su_chose_asgn(cb, su->sg_of_su)) == nullptr) { > /* all the assignments > have already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > > avd_sg_app_su_inst_func(cb, su->sg_of_su); > } else { > @@ -1842,7 +1842,7 @@ uint32_t SG_2N::susi_success_su_oper(AVD > LOG_ER("%s:%u: %s (%zu)", > __FILE__, __LINE__, su->name.c_str(), su->name.length()); > goto done; > } > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { > n_susi = avd_siass_next_susi_to_quiesce(susi); > @@ -1917,7 +1917,7 @@ uint32_t SG_2N::susi_success_su_oper(AVD > goto done; > } > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > > @@ -1994,7 +1994,7 @@ uint32_t SG_2N::susi_success_su_oper(AVD > goto done; > } > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > complete_siswap(su, SA_AIS_OK); > > } > @@ -2011,7 +2011,7 @@ uint32_t SG_2N::susi_success_su_oper(AVD > AVD_SU *su_at_head = su_oper_list.front(); > su_at_head->set_su_switch(AVSV_SI_TOGGLE_STABLE); > avd_sg_su_oper_list_del(cb, su_at_head, false); > - m_AVD_SET_SG_FSM(cb, su->sg_of_su, AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si dependencies and take action > on whole sg*/ > avd_sidep_update_si_dep_state_for_all_sis(su->sg_of_su); > avd_sidep_sg_take_action(su->sg_of_su); > @@ -2080,7 +2080,7 @@ uint32_t SG_2N::susi_success_su_oper(AVD > } > /* Add that SU to operation list and Change > state to SG_realign state. */ > avd_sg_su_oper_list_add(cb, s_susi->su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* if ((s_susi != AVD_SU_SI_REL_NULL) && > (avd_su_state_determine(s_susi->su) == > SA_AMF_HA_STANDBY) && > (s_susi->su->readiness_state == > NCS_IN_SERVICE)) */ > @@ -2090,13 +2090,13 @@ uint32_t SG_2N::susi_success_su_oper(AVD > */ > avd_sg_su_oper_list_add(cb, a_susi->su, false); > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* if((avd_su_state_determine(a_susi->su) == > SA_AMF_HA_ACTIVE) && (a_susi->su != su)) */ > else { > /* single SU that failed while taking quiesced > or > * quiescing assignmenents. > */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si dependencies > and take action on whole sg*/ > > avd_sidep_update_si_dep_state_for_all_sis(su->sg_of_su); > avd_sidep_sg_take_action(su->sg_of_su); > @@ -2139,7 +2139,7 @@ uint32_t SG_2N::susi_success_su_oper(AVD > /* Add the SU to the list and change the FSM state */ > avd_sg_su_oper_list_add(cb, l_su, false); > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } else { > @@ -2186,7 +2186,7 @@ uint32_t SG_2N::susi_success_si_oper(AVD > avd_sg_su_oper_list_add(cb, > susi->si->list_of_sisu->su, false); > } > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* if ((act == AVSV_SUSI_ACT_MOD) && (state == > SA_AMF_HA_QUIESCED) > && (susi->si == su->sg_of_su->admin_si) > && (susi->si->admin_state == > NCS_ADMIN_STATE_LOCK)) */ > @@ -2221,7 +2221,7 @@ uint32_t SG_2N::susi_success_si_oper(AVD > > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* if ((act == AVSV_SUSI_ACT_MOD) && (state == > SA_AMF_HA_QUIESCED) > && (susi->si == su->sg_of_su->admin_si) > && (susi->si->admin_state == > NCS_ADMIN_STATE_SHUTDOWN)) */ > @@ -2255,7 +2255,7 @@ uint32_t SG_2N::susi_success_si_oper(AVD > su->sg_of_su->admin_si->set_si_switch(cb, > AVSV_SI_TOGGLE_STABLE); > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } /* if ((act == AVSV_SUSI_ACT_DEL) && (susi->state == > SA_AMF_HA_QUIESCED)) */ > @@ -2336,7 +2336,7 @@ uint32_t SG_2N::susi_success(AVD_CL_CB * > > if (all_unassigned == true) { > /* the SG doesnt have any SI > assignments.Change state to stable. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si > dependencies and take action on whole sg*/ > > avd_sidep_update_si_dep_state_for_all_sis(su->sg_of_su); > avd_sidep_sg_take_action(su->sg_of_su); > @@ -2549,7 +2549,7 @@ uint32_t SG_2N::susi_failed(AVD_CL_CB *c > } > > su->set_su_switch(AVSV_SI_TOGGLE_STABLE); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > complete_siswap(su, SA_AIS_ERR_BAD_OPERATION); > > } else if ((act == AVSV_SUSI_ACT_MOD) && > @@ -2627,7 +2627,7 @@ uint32_t SG_2N::susi_failed(AVD_CL_CB *c > avd_sg_su_oper_list_add(cb, o_susi->su, false); > } > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* if ((susi != AVD_SU_SI_REL_NULL) && (act == > AVSV_SUSI_ACT_MOD) && > (state == SA_AMF_HA_QUIESCED) && (susi->si > == su->sg_of_su->admin_si) > && (susi->si->admin_state == > NCS_ADMIN_STATE_LOCK)) */ > @@ -2664,7 +2664,7 @@ uint32_t SG_2N::susi_failed(AVD_CL_CB *c > > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > } else { > /* message with remove for a SU SI relationship having > standby value. > @@ -2769,7 +2769,7 @@ uint32_t SG_2N::realign(AVD_CL_CB *cb, A > avd_sg_su_oper_list_add(cb, l_su, false); > > set_adjust_state(AVSV_SG_STABLE); > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > done: > TRACE_LEAVE(); > @@ -2820,16 +2820,16 @@ void SG_2N::node_fail_su_oper(AVD_SU *su > > avd_sg_su_oper_list_del(cb, su, false); > su->delete_all_susis(); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else { /* if (s_susi != AVD_SU_SI_REL_NULL) */ > > avd_sg_su_oper_list_del(cb, su, false); > su->delete_all_susis(); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > if ((o_su = avd_sg_2n_su_chose_asgn(cb, > su->sg_of_su)) != nullptr) { > /* add the SU to the operation list and > change the SG FSM to SG realign. */ > avd_sg_su_oper_list_add(cb, o_su, > false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > else > avd_sidep_sg_take_action(su->sg_of_su); > @@ -2870,7 +2870,7 @@ void SG_2N::node_fail_su_oper(AVD_SU *su > avd_sg_su_oper_list_del(cb, su, false); > su->delete_all_susis(); > su->set_su_switch(AVSV_SI_TOGGLE_STABLE); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si dependencies > and take action on whole sg*/ > > avd_sidep_update_si_dep_state_for_all_sis(su->sg_of_su); > avd_sidep_sg_take_action(su->sg_of_su); > @@ -2885,13 +2885,13 @@ void SG_2N::node_fail_su_oper(AVD_SU *su > if (su->saAmfSUAdminState == > SA_AMF_ADMIN_SHUTTING_DOWN) { > > su->set_admin_state(SA_AMF_ADMIN_LOCKED); > avd_sg_su_oper_list_add(cb, a_susi->su, > false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else if (su_node_ptr->saAmfNodeAdminState == > SA_AMF_ADMIN_SHUTTING_DOWN) { > if (su_node_ptr->is_node_lock() == > true) { > > node_admin_state_set(su_node_ptr, SA_AMF_ADMIN_LOCKED); > } > avd_sg_su_oper_list_add(cb, a_susi->su, > false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else if (su->su_switch == > AVSV_SI_TOGGLE_SWITCH) { > /* During si-swap, NodeFailover or > SuFailover got escalated > * while the *su* just finishes > quiesced assignment and > @@ -2900,11 +2900,11 @@ void SG_2N::node_fail_su_oper(AVD_SU *su > > su->set_su_switch(AVSV_SI_TOGGLE_STABLE); > if > (a_susi->su->any_susi_fsm_in(AVD_SU_SI_STATE_MODIFY) == true) { > avd_sg_su_oper_list_add(cb, > a_susi->su, false); > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { > avd_sg_su_oper_list_add(cb, a_susi->su, > false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } > @@ -2936,12 +2936,12 @@ void SG_2N::node_fail_su_oper(AVD_SU *su > > avd_sg_su_oper_list_del(cb, su, false); > su->delete_all_susis(); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else { /* if (s_susi != AVD_SU_SI_REL_NULL) */ > > avd_sg_su_oper_list_del(cb, su, false); > su->delete_all_susis(); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si dependencies > and take action on whole sg*/ > > avd_sidep_update_si_dep_state_for_all_sis(su->sg_of_su); > avd_sidep_sg_take_action(su->sg_of_su); > @@ -2975,7 +2975,7 @@ void SG_2N::node_fail_su_oper(AVD_SU *su > avd_su_role_failover(su, > su_oper_list.front()); > } > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > AVD_SU *su_at_head = su_oper_list.front(); > @@ -3009,10 +3009,10 @@ void SG_2N::node_fail_su_oper(AVD_SU *su > avd_su_role_failover(su, > su_oper_list.front()); > } > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else { > avd_sg_su_si_del_snd(cb, su_oper_list.front()); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > AVD_SU *su_at_head = su->sg_of_su->su_oper_list.front(); > @@ -3075,7 +3075,7 @@ void SG_2N::node_fail_si_oper(AVD_SU *su > } > avd_sg_su_oper_list_add(cb, s_susi->su, > false); > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > @@ -3084,12 +3084,12 @@ void SG_2N::node_fail_si_oper(AVD_SU *su > else { > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > su->delete_all_susis(); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > if ((o_su = avd_sg_2n_su_chose_asgn(cb, > su->sg_of_su)) != nullptr) { > /* add the SU to the operation list and > change the SG FSM to SG realign. */ > avd_sg_su_oper_list_add(cb, o_su, > false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > else > avd_sidep_sg_take_action(su->sg_of_su); > @@ -3146,7 +3146,7 @@ void SG_2N::node_fail_si_oper(AVD_SU *su > } > avd_sg_su_oper_list_add(cb, s_susi->su, > false); > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > > su->sg_of_su->admin_si->set_admin_state(SA_AMF_ADMIN_UNLOCKED); > @@ -3157,12 +3157,12 @@ void SG_2N::node_fail_si_oper(AVD_SU *su > > su->sg_of_su->admin_si->set_admin_state(SA_AMF_ADMIN_LOCKED); > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > su->delete_all_susis(); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > if ((o_su = avd_sg_2n_su_chose_asgn(cb, > su->sg_of_su)) != nullptr) { > /* add the SU to the operation list and > change the SG FSM to SG realign. */ > avd_sg_su_oper_list_add(cb, o_su, > false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > else > avd_sidep_sg_take_action(su->sg_of_su); > @@ -3242,7 +3242,7 @@ void SG_2N::node_fail(AVD_CL_CB *cb, AVD > } > avd_sg_su_oper_list_add(cb, s_susi->su, > false); > } > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > su->delete_all_susis(); > } /* if (s_susi != AVD_SU_SI_REL_NULL) */ > else { > @@ -3251,7 +3251,7 @@ void SG_2N::node_fail(AVD_CL_CB *cb, AVD > if ((o_su = avd_sg_2n_su_chose_asgn(cb, > su->sg_of_su)) != nullptr) { > /* add the SU to the operation list and > change the SG FSM to SG realign. */ > avd_sg_su_oper_list_add(cb, o_su, > false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > else > avd_sidep_sg_take_action(su->sg_of_su); > @@ -3271,7 +3271,7 @@ void SG_2N::node_fail(AVD_CL_CB *cb, AVD > if ((o_su = avd_sg_2n_su_chose_asgn(cb, su->sg_of_su)) > != nullptr) { > /* add the SU to the operation list and change > the SG FSM to SG realign. */ > avd_sg_su_oper_list_add(cb, o_su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > else > avd_sidep_sg_take_action(su->sg_of_su); > @@ -3363,11 +3363,11 @@ void SG_2N::node_fail(AVD_CL_CB *cb, AVD > su->delete_all_susis(); > avd_sg_su_oper_list_del(cb, su, false); > if (su_oper_list.empty() == true) { > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > if ((o_su = avd_sg_2n_su_chose_asgn(cb, > su->sg_of_su)) != nullptr) { > /* add the SU to the operation > list and change the SG FSM to SG realign. */ > avd_sg_su_oper_list_add(cb, > o_su, false); > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > else > > avd_sidep_sg_take_action(su->sg_of_su); > @@ -3384,11 +3384,11 @@ void SG_2N::node_fail(AVD_CL_CB *cb, AVD > su->delete_all_susis(); > avd_sg_su_oper_list_del(cb, su, false); > if (su_oper_list.empty() == true) { > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > if ((o_su = avd_sg_2n_su_chose_asgn(cb, > su->sg_of_su)) != nullptr) { > /* add the SU to the operation list and > change the SG FSM to SG realign. */ > avd_sg_su_oper_list_add(cb, o_su, > false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > else > avd_sidep_sg_take_action(su->sg_of_su); > @@ -3420,7 +3420,7 @@ void SG_2N::node_fail(AVD_CL_CB *cb, AVD > > if (found_assigned == false) { > /* the SG doesnt have any SI assignments.Change > state to stable. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si dependencies > and take action on whole sg*/ > > avd_sidep_update_si_dep_state_for_all_sis(su->sg_of_su); > avd_sidep_sg_take_action(su->sg_of_su); > @@ -3452,7 +3452,7 @@ void SG_2N::node_fail(AVD_CL_CB *cb, AVD > TRACE("node_oper_list > size:%u",node->admin_ng->oper_list_size()); > } > } else { > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si > dependencies and take action on whole sg*/ > > avd_sidep_update_si_dep_state_for_all_sis(su->sg_of_su); > avd_sidep_sg_take_action(su->sg_of_su); > @@ -3524,7 +3524,7 @@ uint32_t SG_2N::su_admin_down(AVD_CL_CB > > /* add the SU to the operation list and change > the SG FSM to SU operation. */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SU_OPER); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > > } else { /* if (avd_su_state_determine(su) == > SA_AMF_HA_ACTIVE) */ > > @@ -3537,7 +3537,7 @@ uint32_t SG_2N::su_admin_down(AVD_CL_CB > > /* add the SU to the operation list and change > the SG FSM to SG realign. */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* else (avd_su_state_determine(su) == > SA_AMF_HA_ACTIVE) */ > } /* if ((su->admin_state == > NCS_ADMIN_STATE_LOCK) || > ((avnd != AVD_AVND_NULL) && > (avnd->su_admin_state == NCS_ADMIN_STATE_LOCK))) */ > @@ -3561,7 +3561,7 @@ uint32_t SG_2N::su_admin_down(AVD_CL_CB > > /* add the SU to the operation list and change > the SG FSM to SU operation. */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SU_OPER); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > } else { /* if (avd_su_state_determine(su) == > SA_AMF_HA_ACTIVE) */ > > /* means standby */ > @@ -3575,7 +3575,7 @@ uint32_t SG_2N::su_admin_down(AVD_CL_CB > avd_sg_su_oper_list_add(cb, su, false); > if (su->saAmfSUAdminState == > SA_AMF_ADMIN_SHUTTING_DOWN) > > su->set_admin_state(SA_AMF_ADMIN_LOCKED); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* else (avd_su_state_determine(su) == > SA_AMF_HA_ACTIVE) */ > } /* if ((su->admin_state == > NCS_ADMIN_STATE_SHUTDOWN) || > ((avnd != AVD_AVND_NULL) && > (avnd->su_admin_state == NCS_ADMIN_STATE_SHUTDOWN))) */ > @@ -3658,7 +3658,7 @@ uint32_t SG_2N::si_admin_down(AVD_CL_CB > > /* add the SI to the admin list and change the SG FSM > to SI operation. */ > m_AVD_SET_SG_ADMIN_SI(cb, si); > - m_AVD_SET_SG_FSM(cb, (si->sg_of_si), > AVD_SG_FSM_SI_OPER); > + si->sg_of_si->set_fsm_state(AVD_SG_FSM_SI_OPER); > } /* if (si->admin_state == NCS_ADMIN_STATE_LOCK) */ > else if (si->saAmfSIAdminState == SA_AMF_ADMIN_SHUTTING_DOWN) { > /* SI shutdown. Identify the SU that is active > @@ -3680,7 +3680,7 @@ uint32_t SG_2N::si_admin_down(AVD_CL_CB > > /* add the SI to the admin list and change the SG FSM > to SI operation. */ > m_AVD_SET_SG_ADMIN_SI(cb, si); > - m_AVD_SET_SG_FSM(cb, (si->sg_of_si), > AVD_SG_FSM_SI_OPER); > + si->sg_of_si->set_fsm_state(AVD_SG_FSM_SI_OPER); > } /* if (si->admin_state == > NCS_ADMIN_STATE_SHUTDOWN) */ > break; /* case AVD_SG_FSM_STABLE: */ > case AVD_SG_FSM_SI_OPER: > @@ -3740,7 +3740,7 @@ uint32_t SG_2N::sg_admin_down(AVD_CL_CB > a_susi = avd_sg_2n_act_susi(cb, sg, &s_susi); > if (a_susi == AVD_SU_SI_REL_NULL) { > avd_sg_admin_state_set(sg, SA_AMF_ADMIN_LOCKED); > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_STABLE); > + sg->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si dependencies and take > action on whole sg*/ > avd_sidep_update_si_dep_state_for_all_sis(sg); > avd_sidep_sg_take_action(sg); > @@ -3772,7 +3772,7 @@ uint32_t SG_2N::sg_admin_down(AVD_CL_CB > avd_sg_su_si_del_snd(cb, s_susi->su); > } > > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_ADMIN); > + sg->set_fsm_state(AVD_SG_FSM_SG_ADMIN); > } /* if (sg->admin_state == NCS_ADMIN_STATE_LOCK) */ > else if (sg->saAmfSGAdminState == SA_AMF_ADMIN_SHUTTING_DOWN) { > /* SG shutdown. Identify the SU that is active > @@ -3794,7 +3794,7 @@ uint32_t SG_2N::sg_admin_down(AVD_CL_CB > } > } > > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_ADMIN); > + sg->set_fsm_state(AVD_SG_FSM_SG_ADMIN); > } /* if (sg->admin_state == > NCS_ADMIN_STATE_SHUTDOWN) */ > break; /* case AVD_SG_FSM_STABLE: */ > case AVD_SG_FSM_SG_ADMIN: > diff --git a/src/amf/amfd/sg_npm_fsm.cc b/src/amf/amfd/sg_npm_fsm.cc > --- a/src/amf/amfd/sg_npm_fsm.cc > +++ b/src/amf/amfd/sg_npm_fsm.cc > @@ -959,7 +959,7 @@ uint32_t SG_NPM::si_assign(AVD_CL_CB *cb > } > > /* change the FSM state */ > - m_AVD_SET_SG_FSM(cb, (si->sg_of_si), AVD_SG_FSM_SG_REALIGN); > + si->sg_of_si->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > return NCSCC_RC_SUCCESS; > } > @@ -1049,7 +1049,7 @@ uint32_t SG_NPM::su_fault_su_oper(AVD_CL > } > avd_sg_su_oper_list_add(cb, su, false); > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > } else { /* if (su->list_of_susi->state == > SA_AMF_HA_ACTIVE) */ > > @@ -1063,7 +1063,7 @@ uint32_t SG_NPM::su_fault_su_oper(AVD_CL > } > > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* else (su->list_of_susi->state == > SA_AMF_HA_ACTIVE) */ > > } /* else (su->sg_of_su->su_oper_list.su == su) */ > @@ -1116,7 +1116,7 @@ uint32_t SG_NPM::su_fault_si_oper(AVD_CL > avd_sg_su_oper_list_add(cb, su, false); > if (su->sg_of_su->sg_fsm_state == AVD_SG_FSM_SI_OPER) { > /*It is in SI oper state change state to > sg_realign */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } else { /* if (su->list_of_susi->state == > SA_AMF_HA_ACTIVE) */ > @@ -1131,7 +1131,7 @@ uint32_t SG_NPM::su_fault_si_oper(AVD_CL > avd_sg_su_oper_list_add(cb, su, false); > if (su->sg_of_su->sg_fsm_state == AVD_SG_FSM_SI_OPER) { > /*It is in SI oper state change state to > sg_realign */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } /* else (su->list_of_susi->state == > SA_AMF_HA_ACTIVE) */ > @@ -1165,7 +1165,7 @@ uint32_t SG_NPM::su_fault_si_oper(AVD_CL > > if (su->sg_of_su->sg_fsm_state == > AVD_SG_FSM_SI_OPER) { > /*It is in SI oper state change state > to sg_realign */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } /* if (l_susi->fsm == AVD_SU_SI_STATE_ASGND) */ > @@ -1179,7 +1179,7 @@ uint32_t SG_NPM::su_fault_si_oper(AVD_CL > avd_sg_su_oper_list_add(cb, su, false); > if (su->sg_of_su->sg_fsm_state == > AVD_SG_FSM_SI_OPER) { > /*It is in SI oper state change state > to su_oper */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SU_OPER); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > } > } /* else if (l_susi->fsm == > AVD_SU_SI_STATE_MODIFY) */ > } /* if (l_susi->state == SA_AMF_HA_QUIESCED) */ > @@ -1196,7 +1196,7 @@ uint32_t SG_NPM::su_fault_si_oper(AVD_CL > avd_sg_su_oper_list_add(cb, su, false); > if (su->sg_of_su->sg_fsm_state == AVD_SG_FSM_SI_OPER) { > /*It is in SI oper state change state to > sg_realign */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } /*else if ((l_susi->state == SA_AMF_HA_STANDBY) > && > (l_susi->fsm == AVD_SU_SI_STATE_ASGND)) */ > @@ -1212,7 +1212,7 @@ uint32_t SG_NPM::su_fault_si_oper(AVD_CL > > if (su->sg_of_su->sg_fsm_state == AVD_SG_FSM_SI_OPER) { > /*It is in SI oper state change state to > sg_realign */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } > @@ -1236,7 +1236,7 @@ uint32_t SG_NPM::su_fault_si_oper(AVD_CL > > if (su->sg_of_su->sg_fsm_state == AVD_SG_FSM_SI_OPER) { > /*It is in SI oper state change state to > su_oper */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SU_OPER); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > } > > } /* if ((l_susi->state == SA_AMF_HA_QUIESCED) || > @@ -1253,7 +1253,7 @@ uint32_t SG_NPM::su_fault_si_oper(AVD_CL > avd_sg_su_oper_list_add(cb, su, false); > if (su->sg_of_su->sg_fsm_state == AVD_SG_FSM_SI_OPER) { > /*It is in SI oper state change state to > sg_realign */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > /* if ((l_susi->state == SA_AMF_HA_STANDBY) && > @@ -1433,7 +1433,7 @@ uint32_t SG_NPM::su_fault(AVD_CL_CB *cb, > > /* add the SU to the operation list and change the SG > FSM to SU operation. */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SU_OPER); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > } else { /* if (su->list_of_susi->state == > SA_AMF_HA_ACTIVE) */ > > /* means standby */ > @@ -1445,7 +1445,7 @@ uint32_t SG_NPM::su_fault(AVD_CL_CB *cb, > > /* add the SU to the operation list and change the SG > FSM to SG realign. */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* else (su->list_of_susi->state == > SA_AMF_HA_ACTIVE) */ > break; /* case AVD_SG_FSM_STABLE: */ > case AVD_SG_FSM_SG_REALIGN: > @@ -1550,7 +1550,7 @@ uint32_t SG_NPM::su_insvc(AVD_CL_CB *cb, > } > > /* change the FSM state */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > return NCSCC_RC_SUCCESS; > } > > @@ -1763,7 +1763,7 @@ uint32_t SG_NPM::susi_sucss_sg_reln(AVD_ > */ > if (avd_sg_npm_su_chose_asgn(cb, su->sg_of_su) > == nullptr) { > /* all the assignments have already > been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > avd_sidep_sg_take_action(su->sg_of_su); > avd_sg_app_su_inst_func(cb, > su->sg_of_su); > if ((AVD_SG_FSM_STABLE == > su->sg_of_su->sg_fsm_state) && > @@ -1826,7 +1826,7 @@ uint32_t SG_NPM::susi_sucss_sg_reln(AVD_ > */ > if > (avd_sg_npm_su_chose_asgn(cb, su->sg_of_su) == nullptr) { > /* all the assignments > have already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > > avd_sg_app_su_inst_func(cb, su->sg_of_su); > if ((AVD_SG_FSM_STABLE > == su->sg_of_su->sg_fsm_state) && > @@ -1858,7 +1858,7 @@ uint32_t SG_NPM::susi_sucss_sg_reln(AVD_ > */ > if (avd_sg_npm_su_chose_asgn(cb, su->sg_of_su) > == nullptr) { > /* all the assignments have already > been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > avd_sidep_sg_take_action(su->sg_of_su); > avd_sg_app_su_inst_func(cb, > su->sg_of_su); > if ((AVD_SG_FSM_STABLE == > su->sg_of_su->sg_fsm_state) && > @@ -1936,7 +1936,7 @@ uint32_t SG_NPM::susi_sucss_sg_reln(AVD_ > */ > if > (avd_sg_npm_su_chose_asgn(cb, su->sg_of_su) == nullptr) { > /* all the > assignments have already been done in the SG. */ > - > m_AVD_SET_SG_FSM(cb, (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > > avd_sg_app_su_inst_func(cb, su->sg_of_su); > if > ((AVD_SG_FSM_STABLE == su->sg_of_su->sg_fsm_state) && > @@ -1968,7 +1968,7 @@ uint32_t SG_NPM::susi_sucss_sg_reln(AVD_ > */ > if > (avd_sg_npm_su_chose_asgn(cb, su->sg_of_su) == nullptr) { > /* all the assignments > have already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > > avd_sg_app_su_inst_func(cb, su->sg_of_su); > if ((AVD_SG_FSM_STABLE > == su->sg_of_su->sg_fsm_state) && > @@ -2029,7 +2029,7 @@ uint32_t SG_NPM::susi_sucss_sg_reln(AVD_ > */ > if (avd_sg_npm_su_chose_asgn(cb, > su->sg_of_su) == nullptr) { > /* all the assignments have > already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > avd_sg_app_su_inst_func(cb, > su->sg_of_su); > if ((AVD_SG_FSM_STABLE == > su->sg_of_su->sg_fsm_state) && > @@ -2283,7 +2283,7 @@ static void avd_sg_npm_si_transfer_for_r > > /* Add the SU to the operation list and change the SG FSM to > SU operation. */ > avd_sg_su_oper_list_add(avd_cb, susi->su, false); > - m_AVD_SET_SG_FSM(avd_cb, avd_sg, AVD_SG_FSM_SU_OPER); > + avd_sg->set_fsm_state(AVD_SG_FSM_SU_OPER); > } > > /* If susi state is Standby then swap SI from max_assign_su to > min_assign_su */ > @@ -2300,7 +2300,7 @@ static void avd_sg_npm_si_transfer_for_r > } > > /* Change the SG FSM to AVD_SG_FSM_SG_REALIGN */ > - m_AVD_SET_SG_FSM(avd_cb, avd_sg, AVD_SG_FSM_SG_REALIGN); > + avd_sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > /* Reset the SI transfer fields, SG si assignment flow will > take care of assigning the removed > SI to the possible minimum assigned SU*/ > @@ -2388,7 +2388,7 @@ void avd_sg_npm_stdbysu_role_change(AVD_ > avd_sg_su_oper_list_add(avd_cb, > std_susi->su, false); > > /*Change state to SG_realign. */ > - m_AVD_SET_SG_FSM(avd_cb, su->sg_of_su, > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > } else { > /* Check if node failover is undergoing > or admin opr is going on the node*/ > @@ -2440,7 +2440,7 @@ void avd_sg_npm_stdbysu_role_change(AVD_ > avd_sg_su_oper_list_add(avd_cb, > std_susi->su, false); > > /*Change state to SG_realign. */ > - m_AVD_SET_SG_FSM(avd_cb, > su->sg_of_su, AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > } else { > TRACE("Role failover is > deferred as sponsors role failover is under going"); > @@ -2507,7 +2507,7 @@ uint32_t SG_NPM::susi_success_su_oper(AV > > /* Add the SU to the operation > list and set SG FSM to AVD_SG_FSM_SG_REALIGN */ > avd_sg_su_oper_list_add(cb, > su->sg_of_su->min_assigned_su, false); > - m_AVD_SET_SG_FSM(cb, > susi->su->sg_of_su, AVD_SG_FSM_SG_REALIGN); > + > susi->su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > } else { > LOG_ER("susi assgn failed > %s:%u: SU:%s SI:%s", __FILE__,__LINE__, > @@ -2531,8 +2531,8 @@ uint32_t SG_NPM::susi_success_su_oper(AV > su->sg_of_su->si_tobe_redistributed = > nullptr; > m_AVSV_SEND_CKPT_UPDT_ASYNC_RMV(cb, > su->sg_of_su, AVSV_CKPT_AVD_SI_TRANS); > > - /* max_assigned_su is already in the > su_oper_list, move SG to AVD_SG_FSM_SG_REALIGN */ > - m_AVD_SET_SG_FSM(cb, > (susi->su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + /* max_assigned_su is already in the > su_oper_list, move SG to AVD_SG_FSM_SG_REALIGN */ > + > susi->su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } > @@ -2569,7 +2569,7 @@ uint32_t SG_NPM::susi_success_su_oper(AV > } > > avd_sg_su_si_del_snd(cb, su); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > } /* if ((act == AVSV_SUSI_ACT_MOD) && (state == > SA_AMF_HA_QUIESCED) && > @@ -2627,7 +2627,7 @@ uint32_t SG_NPM::susi_success_su_oper(AV > */ > if (avd_sg_npm_su_chose_asgn(cb, su->sg_of_su) == > nullptr) { > /* all the assignments have already been done > in the SG. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > avd_sidep_sg_take_action(su->sg_of_su); > avd_sg_app_su_inst_func(cb, su->sg_of_su); > if ((AVD_SG_FSM_STABLE == > su->sg_of_su->sg_fsm_state) && > @@ -2638,10 +2638,10 @@ uint32_t SG_NPM::susi_success_su_oper(AV > > avd_sg_npm_screening_for_si_redistr(su->sg_of_su); > } > } else { > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } > @@ -2715,7 +2715,7 @@ static uint32_t avd_sg_npm_susi_sucss_si > avd_sg_su_oper_list_add(cb, o_susi->su, > false); > > su->sg_of_su->admin_si->set_si_switch(cb, AVSV_SI_TOGGLE_STABLE); > m_AVD_CLEAR_SG_ADMIN_SI(cb, > (su->sg_of_su)); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > /* if (i_susi == AVD_SU_SI_REL_NULL) */ > @@ -2751,7 +2751,7 @@ static uint32_t avd_sg_npm_susi_sucss_si > } > > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > /* if ((state == SA_AMF_HA_QUIESCED) && > (susi->si == su->sg_of_su->admin_si) && > @@ -2784,7 +2784,7 @@ static uint32_t avd_sg_npm_susi_sucss_si > su->sg_of_su->admin_si->set_si_switch(cb, > AVSV_SI_TOGGLE_STABLE); > avd_sg_su_oper_list_add(cb, su, false); > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* if(o_susi == AVD_SU_SI_REL_NULL) */ > else if ((o_susi->state == SA_AMF_HA_STANDBY) && > (o_susi->su->saAmfSuReadinessState == > SA_AMF_READINESS_IN_SERVICE)) { > @@ -2828,7 +2828,7 @@ static uint32_t avd_sg_npm_susi_sucss_si > avd_sg_su_oper_list_add(cb, o_susi->su, > false); > > su->sg_of_su->admin_si->set_si_switch(cb, AVSV_SI_TOGGLE_STABLE); > m_AVD_CLEAR_SG_ADMIN_SI(cb, > (su->sg_of_su)); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > /* if ((su->sg_of_su->admin_si->si_switch == > AVSV_SI_TOGGLE_SWITCH) && > ((i_susi = > avd_su_susi_struc_find(cb,su,su->sg_of_su->admin_si->name,false)) > @@ -2917,7 +2917,7 @@ uint32_t SG_NPM::susi_success(AVD_CL_CB > avd_sg_su_oper_list_del(cb, su, false); > if (su_oper_list.empty() == true) { > avd_sg_admin_state_set(su->sg_of_su, > SA_AMF_ADMIN_LOCKED); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si dependencies > and take action on whole sg*/ > > avd_sidep_update_si_dep_state_for_all_sis(su->sg_of_su); > avd_sidep_sg_take_action(su->sg_of_su); > @@ -3014,7 +3014,7 @@ uint32_t SG_NPM::susi_failed(AVD_CL_CB * > > /* max_assigned_su is already > in the su_oper_list, move SG to > AVD_SG_FSM_SG_REALIGN */ > - m_AVD_SET_SG_FSM(avd_cb, > (susi->su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + > susi->su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } > @@ -3060,7 +3060,7 @@ uint32_t SG_NPM::susi_failed(AVD_CL_CB * > avd_sg_su_oper_list_add(cb, o_susi->su, false); > } > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* if ((susi != AVD_SU_SI_REL_NULL) && (act == > AVSV_SUSI_ACT_MOD) && > ((state == SA_AMF_HA_QUIESCED) || (state == > SA_AMF_HA_QUIESCING)) > && (susi->si == su->sg_of_su->admin_si)) */ > @@ -3088,7 +3088,7 @@ uint32_t SG_NPM::susi_failed(AVD_CL_CB * > > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* if ((susi == AVD_SU_SI_REL_NULL) && (act == > AVSV_SUSI_ACT_MOD) && > (state == SA_AMF_HA_QUIESCED) && > (su->sg_of_su->admin_si != AVD_SI_NULL) > && (su->sg_of_su->admin_si->si_switch == > AVSV_SI_TOGGLE_SWITCH) && > @@ -3192,7 +3192,7 @@ uint32_t SG_NPM::realign(AVD_CL_CB *cb, > } > > set_adjust_state(AVSV_SG_STABLE); > - m_AVD_SET_SG_FSM(cb, (sg), AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > done: > TRACE_LEAVE(); > @@ -3340,7 +3340,7 @@ static void avd_sg_npm_node_fail_sg_relg > */ > if > (avd_sg_npm_su_chose_asgn(cb, su->sg_of_su) == nullptr) { > /* all the assignments > have already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > if ((AVD_SG_FSM_STABLE > == su->sg_of_su->sg_fsm_state) && > (true > == su->sg_of_su->equal_ranked_su) && > @@ -3378,7 +3378,7 @@ static void avd_sg_npm_node_fail_sg_relg > */ > if > (avd_sg_npm_su_chose_asgn(cb, su->sg_of_su) == nullptr) { > /* all the assignments > have already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > if ((AVD_SG_FSM_STABLE > == su->sg_of_su->sg_fsm_state) && > (true > == su->sg_of_su->equal_ranked_su) && > @@ -3438,7 +3438,7 @@ static void avd_sg_npm_node_fail_sg_relg > */ > if > (avd_sg_npm_su_chose_asgn(cb, su->sg_of_su) == nullptr) { > /* all the assignments > have already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > if ((AVD_SG_FSM_STABLE > == su->sg_of_su->sg_fsm_state) && > (true > == su->sg_of_su->equal_ranked_su) && > @@ -3492,7 +3492,7 @@ static void avd_sg_npm_node_fail_sg_relg > */ > if > (avd_sg_npm_su_chose_asgn(cb, su->sg_of_su) == nullptr) { > /* all the assignments > have already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > if ((AVD_SG_FSM_STABLE > == su->sg_of_su->sg_fsm_state) && > (true > == su->sg_of_su->equal_ranked_su) && > @@ -3606,7 +3606,7 @@ static void avd_sg_npm_node_fail_sg_relg > */ > if (avd_sg_npm_su_chose_asgn(cb, su->sg_of_su) > == nullptr) { > /* all the assignments have already > been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > avd_sidep_sg_take_action(su->sg_of_su); > if ((AVD_SG_FSM_STABLE > == su->sg_of_su->sg_fsm_state) && > (true > == su->sg_of_su->equal_ranked_su) && > @@ -3733,7 +3733,7 @@ void SG_NPM::node_fail_su_oper(AVD_CL_CB > */ > if (avd_sg_npm_su_chose_asgn(cb, su->sg_of_su) == > nullptr) { > /* all the assignments have already been done > in the SG. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > avd_sidep_sg_take_action(su->sg_of_su); > if ((AVD_SG_FSM_STABLE > == su->sg_of_su->sg_fsm_state) && > (true > == su->sg_of_su->equal_ranked_su) && > @@ -3744,11 +3744,11 @@ void SG_NPM::node_fail_su_oper(AVD_CL_CB > } > } else { > /* new assignments need to be done in the SG. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { > /* Change state to SG realign. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { /* if(su->sg_of_su->su_oper_list.su == su) */ > > @@ -3769,7 +3769,7 @@ void SG_NPM::node_fail_su_oper(AVD_CL_CB > if (avd_sg_npm_su_chk_snd(cb, o_susi->su, su) > == NCSCC_RC_SUCCESS) > avd_sg_su_oper_list_add(cb, o_susi->su, > false); > /* Change state to SG realign. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > > @@ -3838,7 +3838,7 @@ void SG_NPM::node_fail_si_oper(AVD_CL_CB > if (avd_sg_npm_su_chk_snd(cb, ot_susi->su, su) > == NCSCC_RC_SUCCESS) > avd_sg_su_oper_list_add(cb, > ot_susi->su, false); > /* Change state to SG realign. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > > @@ -3887,7 +3887,7 @@ void SG_NPM::node_fail_si_oper(AVD_CL_CB > */ > if (avd_sg_npm_su_chose_asgn(cb, > su->sg_of_su) == nullptr) { > /* all the assignments have > already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > if ((AVD_SG_FSM_STABLE > == su->sg_of_su->sg_fsm_state) && > (true > == su->sg_of_su->equal_ranked_su) && > @@ -3898,11 +3898,11 @@ void SG_NPM::node_fail_si_oper(AVD_CL_CB > } > } else { > /* Change state to SG realign. > */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { > /* Change state to SG realign. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } /* if ((l_susi->state == SA_AMF_HA_QUIESCED) && > @@ -3930,7 +3930,7 @@ void SG_NPM::node_fail_si_oper(AVD_CL_CB > */ > if (avd_sg_npm_su_chose_asgn(cb, > su->sg_of_su) == nullptr) { > /* all the assignments have > already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > if ((AVD_SG_FSM_STABLE > == su->sg_of_su->sg_fsm_state) && > (true > == su->sg_of_su->equal_ranked_su) && > @@ -3941,11 +3941,11 @@ void SG_NPM::node_fail_si_oper(AVD_CL_CB > } > } else { > /* Change state to SG realign. > */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { > /* Change state to SG realign. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } /* else if ((l_susi->state == > SA_AMF_HA_QUIESCED) && > (l_susi->fsm == AVD_SU_SI_STATE_ASGND)) */ > @@ -3988,7 +3988,7 @@ void SG_NPM::node_fail_si_oper(AVD_CL_CB > */ > if (avd_sg_npm_su_chose_asgn(cb, > su->sg_of_su) == nullptr) { > /* all the assignments have > already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > if ((AVD_SG_FSM_STABLE > == su->sg_of_su->sg_fsm_state) && > (true > == su->sg_of_su->equal_ranked_su) && > @@ -3999,11 +3999,11 @@ void SG_NPM::node_fail_si_oper(AVD_CL_CB > } > } else { > /* Change state to SG realign. > */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { > /* Change state to SG realign. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > /* else if (l_susi->state == SA_AMF_HA_ACTIVE) */ > @@ -4045,7 +4045,7 @@ void SG_NPM::node_fail_si_oper(AVD_CL_CB > */ > if (avd_sg_npm_su_chose_asgn(cb, > su->sg_of_su) == nullptr) { > /* all the assignments have > already been done in the SG. */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > if ((AVD_SG_FSM_STABLE > == su->sg_of_su->sg_fsm_state) && > (true > == su->sg_of_su->equal_ranked_su) && > @@ -4056,11 +4056,11 @@ void SG_NPM::node_fail_si_oper(AVD_CL_CB > } > } else { > /* Change state to SG realign. > */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { > /* Change state to SG realign. */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } /* if ((l_susi->state == SA_AMF_HA_QUIESCING) || > @@ -4127,7 +4127,7 @@ void SG_NPM::node_fail(AVD_CL_CB *cb, AV > if ((o_su = avd_sg_npm_su_chose_asgn(cb, su->sg_of_su)) > != nullptr) { > /* add the SU to the operation list and change > the SG FSM to SG realign. */ > avd_sg_su_oper_list_add(cb, o_su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } /* else (su->list_of_susi->state == > SA_AMF_HA_ACTIVE) */ > @@ -4179,7 +4179,7 @@ void SG_NPM::node_fail(AVD_CL_CB *cb, AV > avd_sg_admin_state_set(su->sg_of_su, > SA_AMF_ADMIN_LOCKED); > } > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si dependencies and take > action on whole sg*/ > avd_sidep_update_si_dep_state_for_all_sis(su->sg_of_su); > avd_sidep_sg_take_action(su->sg_of_su); > @@ -4239,7 +4239,7 @@ uint32_t SG_NPM::su_admin_down(AVD_CL_CB > > /* add the SU to the operation list and change the SG > FSM to SU operation. */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SU_OPER); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > } else { /* if (su->list_of_susi->state == > SA_AMF_HA_ACTIVE) */ > > /* means standby */ > @@ -4253,7 +4253,7 @@ uint32_t SG_NPM::su_admin_down(AVD_CL_CB > avd_sg_su_oper_list_add(cb, su, false); > if (su->saAmfSUAdminState == SA_AMF_ADMIN_SHUTTING_DOWN) > su->set_admin_state(SA_AMF_ADMIN_LOCKED); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* else (su->list_of_susi->state == > SA_AMF_HA_ACTIVE) */ > break; /* case AVD_SG_FSM_STABLE: */ > case AVD_SG_FSM_SU_OPER: > @@ -4312,7 +4312,7 @@ uint32_t SG_NPM::si_admin_down(AVD_CL_CB > > /* add the SI to the admin list and change the SG FSM > to SI operation. */ > m_AVD_SET_SG_ADMIN_SI(cb, si); > - m_AVD_SET_SG_FSM(cb, (si->sg_of_si), > AVD_SG_FSM_SI_OPER); > + si->sg_of_si->set_fsm_state(AVD_SG_FSM_SI_OPER); > } /* if (si->admin_state == NCS_ADMIN_STATE_LOCK) */ > else if (si->saAmfSIAdminState == SA_AMF_ADMIN_SHUTTING_DOWN) { > /* SI shutdown. Identify the SU that is active > @@ -4327,7 +4327,7 @@ uint32_t SG_NPM::si_admin_down(AVD_CL_CB > > /* add the SI to the admin list and change the SG FSM > to SI operation. */ > m_AVD_SET_SG_ADMIN_SI(cb, si); > - m_AVD_SET_SG_FSM(cb, (si->sg_of_si), > AVD_SG_FSM_SI_OPER); > + si->sg_of_si->set_fsm_state(AVD_SG_FSM_SI_OPER); > } /* if (si->admin_state == > NCS_ADMIN_STATE_SHUTDOWN) */ > break; /* case AVD_SG_FSM_STABLE: */ > case AVD_SG_FSM_SI_OPER: > @@ -4414,7 +4414,7 @@ uint32_t SG_NPM::sg_admin_down(AVD_CL_CB > } > > if (su_oper_list.empty() == false) { > - m_AVD_SET_SG_FSM(cb, (sg), AVD_SG_FSM_SG_ADMIN); > + sg->set_fsm_state(AVD_SG_FSM_SG_ADMIN); > } > > break; /* case AVD_SG_FSM_STABLE: */ > diff --git a/src/amf/amfd/sg_nway_fsm.cc b/src/amf/amfd/sg_nway_fsm.cc > --- a/src/amf/amfd/sg_nway_fsm.cc > +++ b/src/amf/amfd/sg_nway_fsm.cc > @@ -160,7 +160,7 @@ uint32_t avd_sg_nway_siswitch_func(AVD_C > > /* Add the SI to the SG admin pointer and change the SG state to > SI_operation. */ > m_AVD_SET_SG_ADMIN_SI(cb, si); > - m_AVD_SET_SG_FSM(cb, si->sg_of_si, AVD_SG_FSM_SI_OPER); > + si->sg_of_si->set_fsm_state(AVD_SG_FSM_SI_OPER); > > done: > TRACE_LEAVE2(" return value: %d",rc); > @@ -334,7 +334,7 @@ uint32_t SG_NWAY::susi_failed(AVD_CL_CB > avd_sg_su_oper_list_add(cb, susi->su, false); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else if (susi && sg->si_tobe_redistributed == susi->si) { > /* if si redistribution is going on */ > if ((susi->state == SA_AMF_HA_QUIESCED) && (susi->su == > sg->max_assigned_su)) { > @@ -343,7 +343,7 @@ uint32_t SG_NWAY::susi_failed(AVD_CL_CB > rc = avd_susi_mod_send(susi, SA_AMF_HA_ACTIVE); > if (rc == NCSCC_RC_SUCCESS) { > avd_sg_su_oper_list_add(cb, susi->su, > false); > - m_AVD_SET_SG_FSM(cb, sg, > AVD_SG_FSM_SG_REALIGN); > + > sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > else if ((susi->state == SA_AMF_HA_ACTIVE) && (susi->su > == sg->min_assigned_su)) { > @@ -358,7 +358,7 @@ uint32_t SG_NWAY::susi_failed(AVD_CL_CB > if (avd_susi_del_send(t_susi) == > NCSCC_RC_SUCCESS) { > /* add the su to su-oper list and move > the SG to Realign */ > avd_sg_su_oper_list_add(avd_cb, > t_susi->su, false); > - m_AVD_SET_SG_FSM(avd_cb, > t_susi->su->sg_of_su, AVD_SG_FSM_SG_REALIGN); > + > t_susi->su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > /* reset all the pointers marked for si transfer */ > @@ -560,7 +560,7 @@ uint32_t SG_NWAY::su_admin_down(AVD_CL_C > } > > /* transition to su-oper state */ > - m_AVD_SET_SG_FSM(cb, su->sg_of_su, > AVD_SG_FSM_SU_OPER); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > > is_all_stdby = false; > } /* for */ > @@ -578,7 +578,7 @@ uint32_t SG_NWAY::su_admin_down(AVD_CL_C > } > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, su->sg_of_su, > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > /* add su to the su-oper list */ > @@ -651,7 +651,7 @@ uint32_t SG_NWAY::si_admin_down(AVD_CL_C > > /* Add the SI to the SG admin pointer and change the SG > state to SI_operation. */ > m_AVD_SET_SG_ADMIN_SI(cb, si); > - m_AVD_SET_SG_FSM(cb, si->sg_of_si, AVD_SG_FSM_SI_OPER); > + si->sg_of_si->set_fsm_state(AVD_SG_FSM_SI_OPER); > } > break; > > @@ -736,7 +736,7 @@ uint32_t SG_NWAY::sg_admin_down(AVD_CL_C > > /* add the su to su-oper list & transition to > sg-admin state */ > avd_sg_su_oper_list_add(cb, curr_su, false); > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_ADMIN); > + sg->set_fsm_state(AVD_SG_FSM_SG_ADMIN); > } /* for */ > > /* if sg is still in stable state, lock it */ > @@ -815,7 +815,7 @@ static void avd_sg_nway_swap_si_redistr( > sg->si_tobe_redistributed = nullptr; > m_AVSV_SEND_CKPT_UPDT_ASYNC_RMV(avd_cb, sg, > AVSV_CKPT_AVD_SI_TRANS); > } else { > - m_AVD_SET_SG_FSM(avd_cb, susi->su->sg_of_su, > AVD_SG_FSM_SI_OPER); > + susi->su->sg_of_su->set_fsm_state(AVD_SG_FSM_SI_OPER); > > } > > @@ -826,7 +826,7 @@ static void avd_sg_nway_swap_si_redistr( > */ > if (avd_susi_del_send(susi) == NCSCC_RC_SUCCESS) { > avd_sg_su_oper_list_add(avd_cb, susi->su, false); > - m_AVD_SET_SG_FSM(avd_cb, susi->su->sg_of_su, > AVD_SG_FSM_SG_REALIGN); > + > susi->su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > /* reset the min max Sus and si to be redistributed > * as they are not needed further, SG si assignment > @@ -1233,7 +1233,7 @@ uint32_t avd_sg_nway_si_assign(AVD_CL_CB > > TRACE_ENTER2("%s", sg->name.c_str()); > > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_STABLE); > + sg->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_update_si_dep_state_for_all_sis(sg); > /* assign active assignments to unassigned sis */ > @@ -1373,7 +1373,7 @@ uint32_t avd_sg_nway_si_assign(AVD_CL_CB > if (NCSCC_RC_SUCCESS == rc) { > /* add su to the su-oper list & change the fsm > state to sg-realign */ > avd_sg_su_oper_list_add(cb, curr_su, false); > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > is_act_ass_sent = true; > } else { > LOG_ER("%s:%u: %s (%zu)", __FILE__, __LINE__, > curr_si->name.c_str(), curr_si->name.length()); > @@ -1437,7 +1437,7 @@ uint32_t avd_sg_nway_si_assign(AVD_CL_CB > if (NCSCC_RC_SUCCESS == rc) { > /* add su to the su-oper list & change the fsm > state to sg-realign */ > avd_sg_su_oper_list_add(cb, curr_su, false); > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > /* verify if si needs more assigments */ > if (curr_si->curr_standby_assignments() == > curr_si->pref_standby_assignments()) > @@ -1465,7 +1465,7 @@ uint32_t avd_sg_nway_si_assign(AVD_CL_CB > if (NCSCC_RC_SUCCESS == rc) { > /* add su to the su-oper list & change > the fsm state to sg-realign */ > avd_sg_su_oper_list_add(cb, curr_su, > false); > - m_AVD_SET_SG_FSM(cb, sg, > AVD_SG_FSM_SG_REALIGN); > + > sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > /* verify if si needs more assigments */ > if (curr_si->curr_standby_assignments() > == curr_si->pref_standby_assignments()) > @@ -1504,7 +1504,7 @@ uint32_t avd_sg_nway_si_assign(AVD_CL_CB > if (NCSCC_RC_SUCCESS == rc) { > /* add su to the su-oper list & change the fsm > state to sg-realign */ > avd_sg_su_oper_list_add(cb, curr_su, false); > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > /* verify if si needs more assigments */ > if (curr_si->curr_standby_assignments() == > curr_si->pref_standby_assignments()) > @@ -1557,7 +1557,7 @@ uint32_t avd_sg_nway_su_fault_stable(AVD > goto done; > > /* transition to su-oper state */ > - m_AVD_SET_SG_FSM(cb, su->sg_of_su, AVD_SG_FSM_SU_OPER); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > > is_all_stdby = false; > } /* for */ > @@ -1571,7 +1571,7 @@ uint32_t avd_sg_nway_su_fault_stable(AVD > } > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, su->sg_of_su, AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > /* add su to the su-oper list */ > @@ -1653,7 +1653,7 @@ uint32_t avd_sg_nway_su_fault_sg_realign > rc = avd_sg_nway_su_fault_stable(cb, su); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { > /* => su is not present in the su-oper list */ > @@ -1662,7 +1662,7 @@ uint32_t avd_sg_nway_su_fault_sg_realign > rc = avd_sg_nway_su_fault_stable(cb, su); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { > /* => si operation in progress */ > @@ -1736,7 +1736,7 @@ uint32_t avd_sg_nway_su_fault_sg_realign > rc = avd_sg_nway_su_fault_stable(cb, > su); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, > AVD_SG_FSM_SG_REALIGN); > + > sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > } else { > @@ -1746,7 +1746,7 @@ uint32_t avd_sg_nway_su_fault_sg_realign > rc = avd_sg_nway_su_fault_stable(cb, su); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > done: > @@ -1825,7 +1825,7 @@ uint32_t SG_NWAY::su_fault_su_oper(AVD_C > } > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, su->sg_of_su, AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > /* add su to the su-oper list */ > avd_sg_su_oper_list_add(cb, su, false); > @@ -1887,7 +1887,7 @@ uint32_t SG_NWAY::su_fault_si_oper(AVD_C > /* add the su to su-oper list and move > the SG to Realign */ > avd_sg_su_oper_list_add(cb, > curr_susi->su, false); > } > - m_AVD_SET_SG_FSM(cb, curr_susi->su->sg_of_su, > AVD_SG_FSM_SG_REALIGN); > + > curr_susi->su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } else if (su->sg_of_su->max_assigned_su == su) { > @@ -1900,10 +1900,10 @@ uint32_t SG_NWAY::su_fault_si_oper(AVD_C > > /* add su to the su-oper list & > transition to su-oper state */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, sg, > AVD_SG_FSM_SU_OPER); > + sg->set_fsm_state(AVD_SG_FSM_SU_OPER); > } else { > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, > AVD_SG_FSM_SG_REALIGN); > + > sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > avd_sg_su_oper_list_add(cb, su, false); > } > } > @@ -1911,7 +1911,7 @@ uint32_t SG_NWAY::su_fault_si_oper(AVD_C > } else { > /* any other su has faulted then add to su oper and > move to oper state */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SU_OPER); > + sg->set_fsm_state(AVD_SG_FSM_SU_OPER); > } > /* reset all pointers for SI transfer */ > su->sg_of_su->si_tobe_redistributed = nullptr; > @@ -1942,7 +1942,7 @@ uint32_t SG_NWAY::su_fault_si_oper(AVD_C > m_AVD_CLEAR_SG_ADMIN_SI(cb, sg); > > /* transition to su-oper state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SU_OPER); > + sg->set_fsm_state(AVD_SG_FSM_SU_OPER); > > /* add su to the su-oper list */ > avd_sg_su_oper_list_add(cb, su, false); > @@ -1982,7 +1982,7 @@ uint32_t SG_NWAY::su_fault_si_oper(AVD_C > goto done; > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, > AVD_SG_FSM_SG_REALIGN); > + > sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > /* add su to the su-oper list */ > avd_sg_su_oper_list_add(cb, susi->su, > false); > @@ -2009,7 +2009,7 @@ uint32_t SG_NWAY::su_fault_si_oper(AVD_C > goto done; > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > /* add su to the su-oper list */ > avd_sg_su_oper_list_add(cb, curr_susi->su, > false); > @@ -2038,7 +2038,7 @@ uint32_t SG_NWAY::su_fault_si_oper(AVD_C > } > > /* transition to su-oper state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SU_OPER); > + sg->set_fsm_state(AVD_SG_FSM_SU_OPER); > > /* add su to the su-oper list */ > avd_sg_su_oper_list_add(cb, su, false); > @@ -2062,7 +2062,7 @@ uint32_t SG_NWAY::su_fault_si_oper(AVD_C > goto done; > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, > AVD_SG_FSM_SG_REALIGN); > + > sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > /* add su to the su-oper list */ > avd_sg_su_oper_list_add(cb, susi->su, > false); > @@ -2089,7 +2089,7 @@ uint32_t SG_NWAY::su_fault_si_oper(AVD_C > goto done; > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > /* add su to the su-oper list */ > avd_sg_su_oper_list_add(cb, susi->su, false); > @@ -2593,7 +2593,7 @@ uint32_t SG_NWAY::susi_success_su_oper(A > } > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > /* As susi failover is not possible, delete all the > assignments corresponding to > * curr_susi->si > @@ -2633,7 +2633,7 @@ uint32_t SG_NWAY::susi_success_su_oper(A > } > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else if (!susi && (AVSV_SUSI_ACT_DEL == act)) { > /* => remove all success */ > @@ -2669,7 +2669,7 @@ uint32_t SG_NWAY::susi_success_su_oper(A > > /* transition to sg-realign state or initiate si assignments */ > if (su_oper_list.empty() == false) { > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else > avd_sg_nway_si_assign(cb, sg); > } else if (susi && (AVSV_SUSI_ACT_DEL == act)) { > @@ -2687,7 +2687,7 @@ uint32_t SG_NWAY::susi_success_su_oper(A > > /* transition to sg-realign state or initiate si assignments */ > if (su_oper_list.empty() == false) { > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else > avd_sg_nway_si_assign(cb, sg); > } > @@ -2745,7 +2745,7 @@ uint32_t avd_sg_nway_susi_succ_si_oper(A > > /* reset si-admin ptr & transition to sg-realign state > */ > m_AVD_CLEAR_SG_ADMIN_SI(cb, sg); > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > /* transition to locked admin state (if shutdown) */ > if (SA_AMF_ADMIN_SHUTTING_DOWN == > susi->si->saAmfSIAdminState) { > @@ -2773,7 +2773,7 @@ uint32_t avd_sg_nway_susi_succ_si_oper(A > > /* add the su to su-oper list & transition to > sg-realign state */ > avd_sg_su_oper_list_add(cb, susi->su, false); > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else if (susi->si->sg_of_si->si_tobe_redistributed == > susi->si) { > TRACE("SI transfer '%s'", susi->si->name.c_str()); > @@ -2827,7 +2827,7 @@ uint32_t avd_sg_nway_susi_succ_si_oper(A > if (NCSCC_RC_SUCCESS == rc) { > /* add the su to su-oper list & > transition to sg-realign state */ > avd_sg_su_oper_list_add(avd_cb, > susi->su, false); > - m_AVD_SET_SG_FSM(avd_cb, > susi->si->sg_of_si, AVD_SG_FSM_SG_REALIGN); > + > susi->si->sg_of_si->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > } > @@ -2855,7 +2855,7 @@ uint32_t avd_sg_nway_susi_succ_si_oper(A > > /* add the su to su-oper list & transition to > sg-realign state */ > avd_sg_su_oper_list_add(cb, curr_susi->su, > false); > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else { > LOG_ER("%s:%u: %s (%zu)", __FILE__, __LINE__, > susi->su->name.c_str(), susi->su->name.length()); > LOG_ER("%s:%u: %s (%zu)", __FILE__, __LINE__, > susi->si->name.c_str(), susi->si->name.length()); > @@ -2875,7 +2875,7 @@ uint32_t avd_sg_nway_susi_succ_si_oper(A > rc = avd_susi_del_send(t_susi); > if (NCSCC_RC_SUCCESS == rc) { > avd_sg_su_oper_list_add(avd_cb, t_susi->su, > false); > - m_AVD_SET_SG_FSM(avd_cb, t_susi->su->sg_of_su, > AVD_SG_FSM_SG_REALIGN); > + > t_susi->su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > t_susi->si->sg_of_si->max_assigned_su = nullptr; > t_susi->si->sg_of_si->min_assigned_su = nullptr; > @@ -2954,7 +2954,7 @@ uint32_t avd_sg_nway_susi_succ_sg_admin( > /* if oper list is empty, transition the sg back to > stable state */ > if (sg->su_oper_list.empty() == true) { > avd_sg_admin_state_set(sg, SA_AMF_ADMIN_LOCKED); > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_STABLE); > + sg->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si dependencies > and take action on whole sg*/ > avd_sidep_update_si_dep_state_for_all_sis(sg); > avd_sidep_sg_take_action(sg); > @@ -3041,7 +3041,7 @@ void avd_sg_nway_node_fail_stable(AVD_CL > > /* transition to sg-realign state */ > if (sg->su_oper_list.empty() == false) { > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } /* for */ > > @@ -3123,7 +3123,7 @@ void SG_NWAY::node_fail_su_oper(AVD_SU * > avd_sg_su_oper_list_add(avd_cb, > curr_sisu->su, false); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, > AVD_SG_FSM_SG_REALIGN); > + > sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else if ((SA_AMF_HA_QUIESCED == curr_susi->state) && > (AVD_SU_SI_STATE_ASGND == curr_susi->fsm)) { > @@ -3141,7 +3141,7 @@ void SG_NWAY::node_fail_su_oper(AVD_SU * > avd_sg_su_oper_list_add(avd_cb, > curr_sisu->su, false); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } /* for */ > > @@ -3168,7 +3168,7 @@ void SG_NWAY::node_fail_su_oper(AVD_SU * > avd_sg_su_oper_list_add(avd_cb, > curr_sisu->su, false); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, > AVD_SG_FSM_SG_REALIGN); > + > sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* if (curr_sisu) */ > } > } /* for */ > @@ -3247,13 +3247,13 @@ void SG_NWAY::node_fail_si_oper(AVD_SU * > avd_sg_nway_node_fail_stable(avd_cb, su, 0); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else { > /* process the susis assigned to this su as in stable > state */ > avd_sg_nway_node_fail_stable(avd_cb, su, 0); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > /* reset the pointer for SI transfer */ > su->sg_of_su->si_tobe_redistributed = nullptr; > @@ -3277,7 +3277,7 @@ void SG_NWAY::node_fail_si_oper(AVD_SU * > avd_sg_nway_node_fail_stable(avd_cb, su, 0); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else { > /* abort the si lock / shutdown operation */ > susi->si->set_admin_state(SA_AMF_ADMIN_UNLOCKED); > @@ -3289,7 +3289,7 @@ void SG_NWAY::node_fail_si_oper(AVD_SU * > avd_sg_nway_node_fail_stable(avd_cb, su, 0); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else if ((SA_AMF_HA_STANDBY == susi->state) && > (AVD_SU_SI_STATE_ASGND == susi->fsm)) { > /* identify in-svc quiesced/quiescing > assignment & > send an active assignment */ > @@ -3316,7 +3316,7 @@ void SG_NWAY::node_fail_si_oper(AVD_SU * > avd_sg_nway_node_fail_stable(avd_cb, su, susi); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(avd_cb, sg, > AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > } else if (AVSV_SI_TOGGLE_SWITCH == sg->admin_si->si_switch) { > @@ -3346,7 +3346,7 @@ void SG_NWAY::node_fail_si_oper(AVD_SU * > avd_sg_nway_node_fail_stable(avd_cb, su, 0); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(avd_cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else { > /* relationship exists between SU with the SI > undergoing si-swap.*/ > TRACE("For susi, su:'%s', si:'%s', state:%u, fsm:%u" > @@ -3411,7 +3411,7 @@ void SG_NWAY::node_fail_si_oper(AVD_SU * > avd_sg_nway_node_fail_stable(avd_cb, su, susi); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(avd_cb, sg, > AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > } > @@ -3449,7 +3449,7 @@ void avd_sg_nway_node_fail_sg_admin(AVD_ > > if (sg->su_oper_list.empty() == true) { > avd_sg_admin_state_set(sg, SA_AMF_ADMIN_LOCKED); > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_STABLE); > + sg->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si dependencies and take action > on whole sg*/ > avd_sidep_update_si_dep_state_for_all_sis(sg); > avd_sidep_sg_take_action(sg); > diff --git a/src/amf/amfd/sg_nwayact_fsm.cc b/src/amf/amfd/sg_nwayact_fsm.cc > --- a/src/amf/amfd/sg_nwayact_fsm.cc > +++ b/src/amf/amfd/sg_nwayact_fsm.cc > @@ -260,7 +260,7 @@ uint32_t SG_NACV::si_assign(AVD_CL_CB *c > } > > /* change the FSM state */ > - m_AVD_SET_SG_FSM(cb, (si->sg_of_si), AVD_SG_FSM_SG_REALIGN); > + si->sg_of_si->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > return NCSCC_RC_SUCCESS; > } > @@ -286,7 +286,7 @@ uint32_t SG_NACV::su_fault(AVD_CL_CB *cb > > /* add the SU to the operation list and change the SG FSM to SU > operation. */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), AVD_SG_FSM_SU_OPER); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > break; /* case AVD_SG_FSM_STABLE: */ > case AVD_SG_FSM_SG_REALIGN: > > @@ -426,7 +426,7 @@ uint32_t SG_NACV::su_fault(AVD_CL_CB *cb > } > > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } /* else (su->sg_of_su->su_oper_list.su == su) */ > > break; /* case AVD_SG_FSM_SU_OPER: */ > @@ -453,9 +453,9 @@ uint32_t SG_NACV::su_fault(AVD_CL_CB *cb > (su->sg_of_su->admin_si->list_of_sisu->si_next == > AVD_SU_SI_REL_NULL)) { > > su->sg_of_su->admin_si->set_admin_state(SA_AMF_ADMIN_LOCKED); > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SU_OPER); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > } else { > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { /* if ((susi = > > avd_su_susi_struc_find(cb,su,su->sg_of_su->admin_si->name,false)) > @@ -469,7 +469,7 @@ uint32_t SG_NACV::su_fault(AVD_CL_CB *cb > return NCSCC_RC_FAILURE; > } > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > avd_sg_su_oper_list_add(cb, su, false); > @@ -547,7 +547,7 @@ uint32_t SG_NACV::su_insvc(AVD_CL_CB *cb > } > > /* change the FSM state */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > return NCSCC_RC_SUCCESS; > > } > @@ -627,7 +627,7 @@ uint32_t SG_NACV::susi_success(AVD_CL_CB > if ((su->sg_of_su->admin_si == AVD_SI_NULL) && > (su->sg_of_su->su_oper_list.empty() == true)) { > if (avd_sg_nacvred_su_chose_asgn(cb, > su->sg_of_su) == nullptr) { > /* No New assignments are been done in > the SG. change the FSM state */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > avd_sidep_sg_take_action(su->sg_of_su); > avd_sg_app_su_inst_func(cb, > su->sg_of_su); > if (AVD_SG_FSM_STABLE == > su->sg_of_su->sg_fsm_state) { > @@ -741,7 +741,7 @@ uint32_t SG_NACV::susi_success(AVD_CL_CB > if ((su->sg_of_su->admin_si == AVD_SI_NULL) && > (su->sg_of_su->su_oper_list.empty() == true)) { > if (avd_sg_nacvred_su_chose_asgn(cb, > su->sg_of_su) == nullptr) { > /* No New assignments are been > done in the SG. change the FSM state */ > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_STABLE); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > > avd_sidep_sg_take_action(su->sg_of_su); > avd_sg_app_su_inst_func(cb, > su->sg_of_su); > if (AVD_SG_FSM_STABLE == > su->sg_of_su->sg_fsm_state) { > @@ -782,12 +782,12 @@ uint32_t SG_NACV::susi_success(AVD_CL_CB > if (avd_sg_nacvred_su_chose_asgn(cb, > su->sg_of_su) != nullptr) { > /* New assignments are been done in the > SG. */ > /* change the FSM state */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > return NCSCC_RC_SUCCESS; > } > > /* change the FSM state */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > avd_sidep_sg_take_action(su->sg_of_su); > avd_sg_app_su_inst_func(cb, su->sg_of_su); > if (AVD_SG_FSM_STABLE == > su->sg_of_su->sg_fsm_state) { > @@ -836,12 +836,12 @@ uint32_t SG_NACV::susi_success(AVD_CL_CB > su->sg_of_su->max_assigned_su = > su->sg_of_su->min_assigned_su = nullptr; > > su->sg_of_su->si_tobe_redistributed = nullptr; > > m_AVSV_SEND_CKPT_UPDT_ASYNC_RMV(cb, su->sg_of_su, AVSV_CKPT_AVD_SI_TRANS); > - m_AVD_SET_SG_FSM(cb, > (susi->su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + > susi->su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > return NCSCC_RC_FAILURE; > } > /* Add the SU to the list and change > the FSM state */ > avd_sg_su_oper_list_add(cb, > su->sg_of_su->min_assigned_su, false); > - m_AVD_SET_SG_FSM(cb, > (susi->su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + > susi->su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > } else { /* Target SU is Out of Service. Return > Assignment to max_assigned_su and reset > SI Transfer pointers. */ > @@ -854,7 +854,7 @@ uint32_t SG_NACV::susi_success(AVD_CL_CB > su->sg_of_su->max_assigned_su = > su->sg_of_su->min_assigned_su = nullptr; > su->sg_of_su->si_tobe_redistributed = > nullptr; > m_AVSV_SEND_CKPT_UPDT_ASYNC_RMV(cb, > su->sg_of_su, AVSV_CKPT_AVD_SI_TRANS); > - m_AVD_SET_SG_FSM(cb, > (susi->su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + > susi->su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } /* if (nullptr != su->sg_of_su->max_assigned_su) */ > else { > @@ -872,11 +872,11 @@ uint32_t SG_NACV::susi_success(AVD_CL_CB > > su->list_of_susi->si->name.length()); > > avd_sg_su_oper_list_add(cb, su, > false); > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > return NCSCC_RC_SUCCESS; > } > > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > su_node_ptr = su->get_node_ptr(); > if (su->saAmfSUAdminState == > SA_AMF_ADMIN_SHUTTING_DOWN) { > @@ -919,12 +919,12 @@ uint32_t SG_NACV::susi_success(AVD_CL_CB > avd_sg_su_oper_list_add(cb, > su->sg_of_su->admin_si->list_of_sisu->su, false); > > su->sg_of_su->admin_si->set_admin_state(SA_AMF_ADMIN_LOCKED); > m_AVD_CLEAR_SG_ADMIN_SI(cb, > (su->sg_of_su)); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { > > su->sg_of_su->admin_si->set_admin_state(SA_AMF_ADMIN_LOCKED); > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si dependencies > and take action on whole sg*/ > > avd_sidep_update_si_dep_state_for_all_sis(su->sg_of_su); > avd_sidep_sg_take_action(su->sg_of_su); > @@ -955,7 +955,7 @@ uint32_t SG_NACV::susi_success(AVD_CL_CB > avd_sg_su_oper_list_add(cb, su, false); > > su->sg_of_su->admin_si->set_admin_state(SA_AMF_ADMIN_LOCKED); > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > /* if ((state == SA_AMF_HA_QUIESCED) && (susi != > AVD_SU_SI_REL_NULL)) */ > @@ -977,7 +977,7 @@ uint32_t SG_NACV::susi_success(AVD_CL_CB > avd_sg_admin_state_set(su->sg_of_su, > SA_AMF_ADMIN_LOCKED); > > /* change the FSM state */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si dependencies > and take action on whole sg*/ > > avd_sidep_update_si_dep_state_for_all_sis(su->sg_of_su); > avd_sidep_sg_take_action(su->sg_of_su); > @@ -1121,7 +1121,7 @@ uint32_t SG_NACV::susi_failed(AVD_CL_CB > su->sg_of_su->max_assigned_su = > su->sg_of_su->min_assigned_su = nullptr; > su->sg_of_su->si_tobe_redistributed = nullptr; > m_AVSV_SEND_CKPT_UPDT_ASYNC_RMV(cb, > su->sg_of_su, AVSV_CKPT_AVD_SI_TRANS); > - m_AVD_SET_SG_FSM(cb, (susi->su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > susi->su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else { > if ((susi == AVD_SU_SI_REL_NULL) || (nullptr != > su->sg_of_su->max_assigned_su) || > ((su->list_of_susi == susi) && > (susi->su_next == AVD_SU_SI_REL_NULL))) { > @@ -1139,12 +1139,12 @@ uint32_t SG_NACV::susi_failed(AVD_CL_CB > > su->list_of_susi->si->name.length()); > > avd_sg_su_oper_list_add(cb, su, > false); > - m_AVD_SET_SG_FSM(cb, > (su->sg_of_su), AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > return NCSCC_RC_SUCCESS; > } > > su_node_ptr = su->get_node_ptr(); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > if (su->saAmfSUAdminState == > SA_AMF_ADMIN_SHUTTING_DOWN) { > > su->set_admin_state(SA_AMF_ADMIN_LOCKED); > @@ -1185,7 +1185,7 @@ uint32_t SG_NACV::susi_failed(AVD_CL_CB > avd_sg_su_oper_list_add(cb, su, false); > > su->sg_of_su->admin_si->set_admin_state(SA_AMF_ADMIN_LOCKED); > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } > @@ -1240,7 +1240,7 @@ uint32_t SG_NACV::realign(AVD_CL_CB *cb, > } > > set_adjust_state(AVSV_SG_STABLE); > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN); > + sg->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > done: > TRACE_LEAVE(); > @@ -1271,7 +1271,7 @@ void SG_NACV::node_fail(AVD_CL_CB *cb, A > > if (avd_sg_nacvred_su_chose_asgn(cb, su->sg_of_su) != nullptr) { > /* new assignments are been done in the SG. change the > FSM state */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > break; /* case AVD_SG_FSM_STABLE: */ > @@ -1357,7 +1357,7 @@ void SG_NACV::node_fail(AVD_CL_CB *cb, A > if ((su->sg_of_su->admin_si == AVD_SI_NULL) && > (su->sg_of_su->su_oper_list.empty() == true)) { > if (avd_sg_nacvred_su_chose_asgn(cb, su->sg_of_su) == > nullptr) { > /* No New assignments are been done in the SG. > change the FSM state */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > avd_sidep_sg_take_action(su->sg_of_su); > avd_sg_app_su_inst_func(cb, su->sg_of_su); > if (AVD_SG_FSM_STABLE == > su->sg_of_su->sg_fsm_state) { > @@ -1407,7 +1407,7 @@ void SG_NACV::node_fail(AVD_CL_CB *cb, A > > if (avd_sg_nacvred_su_chose_asgn(cb, su->sg_of_su) == > nullptr) { > /* No New assignments are been done in the SG. > change the FSM state */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > avd_sidep_sg_take_action(su->sg_of_su); > avd_sg_app_su_inst_func(cb, su->sg_of_su); > if (AVD_SG_FSM_STABLE == > su->sg_of_su->sg_fsm_state) { > @@ -1419,7 +1419,7 @@ void SG_NACV::node_fail(AVD_CL_CB *cb, A > } > > } else { > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > > } > @@ -1441,14 +1441,14 @@ void SG_NACV::node_fail(AVD_CL_CB *cb, A > avd_sg_su_oper_list_add(cb, > su->sg_of_su->admin_si->list_of_sisu->su, false); > > su->sg_of_su->admin_si->set_admin_state(SA_AMF_ADMIN_LOCKED); > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } else { > > su->sg_of_su->admin_si->set_admin_state(SA_AMF_ADMIN_LOCKED); > m_AVD_CLEAR_SG_ADMIN_SI(cb, (su->sg_of_su)); > if (avd_sg_nacvred_su_chose_asgn(cb, su->sg_of_su) == > nullptr) { > /* No New assignments are been done in the SG. > change the FSM state */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > avd_sidep_sg_take_action(su->sg_of_su); > avd_sg_app_su_inst_func(cb, su->sg_of_su); > if (AVD_SG_FSM_STABLE == > su->sg_of_su->sg_fsm_state) { > @@ -1460,7 +1460,7 @@ void SG_NACV::node_fail(AVD_CL_CB *cb, A > } > > } else { > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SG_REALIGN); > + > su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > > @@ -1481,7 +1481,7 @@ void SG_NACV::node_fail(AVD_CL_CB *cb, A > avd_sg_admin_state_set(su->sg_of_su, > SA_AMF_ADMIN_LOCKED); > > /* change the FSM state */ > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), AVD_SG_FSM_STABLE); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_STABLE); > /*As sg is stable, screen for si dependencies and take > action on whole sg*/ > avd_sidep_update_si_dep_state_for_all_sis(su->sg_of_su); > avd_sidep_sg_take_action(su->sg_of_su); > @@ -1527,7 +1527,7 @@ uint32_t SG_NACV::su_admin_down(AVD_CL_C > > /* add the SU to the operation list and change the SG > FSM to SU operation. */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SU_OPER); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > } /* if ((su->admin_state == > NCS_ADMIN_STATE_LOCK) || > ((avnd != AVD_AVND_NULL) && > (avnd->su_admin_state == NCS_ADMIN_STATE_LOCK))) */ > else if ((su->saAmfSUAdminState == SA_AMF_ADMIN_SHUTTING_DOWN) > || > @@ -1540,7 +1540,7 @@ uint32_t SG_NACV::su_admin_down(AVD_CL_C > > /* add the SU to the operation list and change the SG > FSM to SU operation. */ > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, (su->sg_of_su), > AVD_SG_FSM_SU_OPER); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > } /* if ((su->admin_state == > NCS_ADMIN_STATE_SHUTDOWN) || > ((avnd != AVD_AVND_NULL) && > (avnd->su_admin_state == NCS_ADMIN_STATE_SHUTDOWN))) */ > break; /* case AVD_SG_FSM_STABLE: */ > @@ -1566,7 +1566,7 @@ uint32_t SG_NACV::su_admin_down(AVD_CL_C > } > > avd_sg_su_oper_list_add(cb, su, false); > - m_AVD_SET_SG_FSM(cb, su->sg_of_su, > AVD_SG_FSM_SG_REALIGN); > + su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > break; /* case AVD_SG_FSM_SU_OPER: */ > case AVD_SG_FSM_SG_REALIGN: > @@ -1615,7 +1615,7 @@ uint32_t SG_NACV::si_admin_down(AVD_CL_C > > /* add the SI to the admin list and change the SG FSM > to SI operation. */ > m_AVD_SET_SG_ADMIN_SI(cb, si); > - m_AVD_SET_SG_FSM(cb, (si->sg_of_si), > AVD_SG_FSM_SI_OPER); > + si->sg_of_si->set_fsm_state(AVD_SG_FSM_SI_OPER); > } /* if (si->admin_state == NCS_ADMIN_STATE_LOCK) */ > else if (si->saAmfSIAdminState == SA_AMF_ADMIN_SHUTTING_DOWN) { > /* SI shutdown. Send D2N-INFO_SU_SI_ASSIGN modify > quiescing for this SI to > @@ -1627,7 +1627,7 @@ uint32_t SG_NACV::si_admin_down(AVD_CL_C > > /* add the SI to the admin list and change the SG FSM > to SI operation. */ > m_AVD_SET_SG_ADMIN_SI(cb, si); > - m_AVD_SET_SG_FSM(cb, (si->sg_of_si), > AVD_SG_FSM_SI_OPER); > + si->sg_of_si->set_fsm_state(AVD_SG_FSM_SI_OPER); > } /* if (si->admin_state == > NCS_ADMIN_STATE_SHUTDOWN) */ > break; /* case AVD_SG_FSM_STABLE: */ > case AVD_SG_FSM_SI_OPER: > @@ -1705,7 +1705,7 @@ uint32_t SG_NACV::sg_admin_down(AVD_CL_C > } > > if (sg->su_oper_list.empty() == false) { > - m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_ADMIN); > + sg->set_fsm_state(AVD_SG_FSM_SG_ADMIN); > } > > break; /* case AVD_SG_FSM_STABLE: */ > @@ -1911,7 +1911,7 @@ void avd_sg_nwayact_screening_for_si_dis > } > /* add the SU to the operation list and change the SG FSM to SU > operation. */ > avd_sg_su_oper_list_add(avd_cb, i_susi->su, false); > - m_AVD_SET_SG_FSM(avd_cb, (i_susi->su->sg_of_su), AVD_SG_FSM_SU_OPER); > + i_susi->su->sg_of_su->set_fsm_state(AVD_SG_FSM_SU_OPER); > > done: > TRACE_LEAVE(); > diff --git a/src/amf/amfd/si.cc b/src/amf/amfd/si.cc > --- a/src/amf/amfd/si.cc > +++ b/src/amf/amfd/si.cc > @@ -1063,7 +1063,7 @@ void AVD_SI::adjust_si_assignments(const > if ( avd_sg_nacvred_su_chose_asgn(avd_cb, sg_of_si ) != > nullptr ) { > /* New assignments are been done in the SG. > change the SG FSM state to > AVD_SG_FSM_SG_REALIGN */ > - m_AVD_SET_SG_FSM(avd_cb, sg_of_si, > AVD_SG_FSM_SG_REALIGN); > + sg_of_si->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } else { > /* No New assignments are been done in the SG > reason might be no more inservice SUs to > take new assignments or > @@ -1095,7 +1095,7 @@ void AVD_SI::adjust_si_assignments(const > sisu = sisu->si_next; > } > /* Change the SG FSM to AVD_SG_FSM_SG_REALIGN SG to > Stable state */ > - m_AVD_SET_SG_FSM(avd_cb, sg_of_si, > AVD_SG_FSM_SG_REALIGN); > + sg_of_si->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > if( sg_of_si->sg_redundancy_model == SA_AMF_N_WAY_REDUNDANCY_MODEL ) { > @@ -1129,7 +1129,7 @@ void AVD_SI::adjust_si_assignments(const > sisu = sisu->si_next; > } > /* Change the SG FSM to AVD_SG_FSM_SG_REALIGN */ > - m_AVD_SET_SG_FSM(avd_cb, sg_of_si, > AVD_SG_FSM_SG_REALIGN); > + sg_of_si->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > TRACE_LEAVE(); > diff --git a/src/amf/amfd/si_dep.cc b/src/amf/amfd/si_dep.cc > --- a/src/amf/amfd/si_dep.cc > +++ b/src/amf/amfd/si_dep.cc > @@ -460,7 +460,7 @@ uint32_t sidep_unassign_dependent(AVD_CL > avd_sidep_si_dep_state_set(si, AVD_SI_SPONSOR_UNASSIGNED); > > /* transition to sg-realign state */ > - m_AVD_SET_SG_FSM(cb, si->sg_of_si, AVD_SG_FSM_SG_REALIGN); > + si->sg_of_si->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > done: > TRACE_LEAVE2("rc:%u", rc); > @@ -1958,7 +1958,7 @@ static void sidep_dependentsi_role_failo > if (si->sg_of_si->su_oper_list.empty() == true) { > /* add the SU to the operation list and change > the SG FSM to SG realign. */ > avd_sg_su_oper_list_add(avd_cb, stdby_su, > false); > - m_AVD_SET_SG_FSM(avd_cb, stdby_su->sg_of_su, > AVD_SG_FSM_SG_REALIGN); > + > stdby_su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > break; > @@ -2014,13 +2014,13 @@ static void sidep_dependentsi_role_failo > avd_sg_su_oper_list_add(avd_cb, stdby_su, false); > > /*Change state to SG_realign. */ > - m_AVD_SET_SG_FSM(avd_cb, stdby_su->sg_of_su, > AVD_SG_FSM_SG_REALIGN); > + > stdby_su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > > avd_sidep_si_dep_state_set(si, AVD_SI_ASSIGNED); > if (si->sg_of_si->su_oper_list.empty() == true) { > /* add the SU to the operation list and change > the SG FSM to SG realign. */ > avd_sg_su_oper_list_add(avd_cb, stdby_su, > false); > - m_AVD_SET_SG_FSM(avd_cb, stdby_su->sg_of_su, > AVD_SG_FSM_SG_REALIGN); > + > stdby_su->sg_of_su->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > } > } > break; > @@ -2030,7 +2030,7 @@ static void sidep_dependentsi_role_failo > susi = avd_find_preferred_standby_susi(si); > if (susi) { > avd_susi_mod_send(susi, SA_AMF_HA_ACTIVE); > - m_AVD_SET_SG_FSM(avd_cb, si->sg_of_si, > AVD_SG_FSM_SG_REALIGN); > + > si->sg_of_si->set_fsm_state(AVD_SG_FSM_SG_REALIGN); > avd_sidep_si_dep_state_set(si, AVD_SI_ASSIGNED); > } > } > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel