-
Notifications
You must be signed in to change notification settings - Fork 638
Lockless changes for CSFB related changes for combined attach, TAU and detach procedure #1035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…and detach procedure
6828405 to
21572e1
Compare
| ue_context_p->mme_ue_s1ap_id); | ||
| OAILOG_FUNC_RETURN(LOG_MME_APP, RETURNerror); | ||
| } | ||
| /*Initialize SGS context to default values*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change //
| ue_context_p->sgs_context->neaf = false; | ||
| ue_context_p->sgs_context->ts6_1_timer.id = MME_APP_TIMER_INACTIVE_ID; | ||
| ue_context_p->sgs_context->ts8_timer.id = MME_APP_TIMER_INACTIVE_ID; | ||
| ue_context_p->sgs_context->ts9_timer.id = MME_APP_TIMER_INACTIVE_ID; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ts9_timer, ts10_timer, ts13_timer and ts8_timer remove
Remove duplicates
| //LAI | ||
| itti_nas_location_update_acc_p->laicsfb.mccdigit2 = | ||
| //Store LAI to be sent in Attach Accept/TAU Accept | ||
| emm_ctx_p->csfbparams.presencemask |= LAI_CSFB; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep in order for LAI copy
| itti_sgsap_location_update_acc->presencemask); | ||
|
|
||
| // Mobile Identity | ||
| //Store Mobile Identity to be sent in Attach Accept/TAU Accept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space
| * If fsm_state is DE-REGISTERED,Location Update Accept is received for | ||
| * Attach procedure | ||
| */ | ||
| if (EMM_REGISTERED == fsm_state) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use variable on left and constant on right
|
|
||
| //------------------------------------------------------------------------------ | ||
| static int _is_csfb_enabled(struct emm_context_s *emm_ctx_p, bstring esm_data) | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename fun is_csfb_enabled() to emm_proc_combined_attach_req( )
| } | ||
| rc = itti_send_msg_to_task(TASK_NAS_MME, INSTANCE_DEFAULT, message_p); | ||
| //Send Attach Accept/TAU Accept | ||
| rc = handle_cs_domain_loc_updt_acc(ue_context_p); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
send_cs_domain_attach_tau_accept()()
Change the current fun name to handle_cs_domain_loc_updt_acc()
| ** Outputs: ** | ||
| ** Return: Selected emm cause ** | ||
| *******************************************************************************/ | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove line
| OAILOG_FUNC_RETURN(LOG_MME_APP, rc); | ||
| } | ||
|
|
||
| /********************************************************************************** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the map_sgs_emm_cause() to mme_app_sgsap_location_update.c file
| TASK_S1AP, INSTANCE_DEFAULT, ue_context_p->sgs_context->message_p); | ||
| ue_context_p->sgs_context->message_p = NULL; | ||
| } | ||
| if (NULL == ue_context_p->sgs_context->message_p) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to "if (!ue_context_p->sgs_context->message_p)"
| MESSAGE_PRIORITY_MED, | ||
| itti_nas_cs_domain_location_update_fail_t, | ||
| nas_cs_domain_location_update_fail) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove space here to be consistent with rest of the file
| const char *imsi, const unsigned int imsi_len) | ||
| #include "nas_proc.h" | ||
|
|
||
| static uint8_t _get_eps_attach_type(uint8_t emm_attach_type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move definition of _get_eps_attach_type, _mme_app_update_granted_service_for_ue and _mme_app_compare_tmsi here
| itti_nas_location_update_acc_p->laicsfb.mncdigit3 = | ||
| emm_ctx_p->csfbparams.lai.mccdigit2 = | ||
| itti_sgsap_location_update_acc->laicsfb.mccdigit2; | ||
| emm_ctx_p->csfbparams.lai.mncdigit3 = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swap line 230 and 236 so all MCC and MNC digits are in order
| MOBILE_IDENTITY_TMSI) { | ||
| tmsi_mobile_identity_t *tmsi_p = | ||
| &itti_nas_location_update_acc_p->mobileid.tmsi; | ||
| tmsi_mobile_identity_t received_tmsi = {0}, *received_tmsi_p = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need two variables here, just "received_tmsi" is enough. Replace calls to "received_tmsi_p" below with "&received_tmsi"
| itti_nas_location_update_acc_p->mobileid.imsi.typeofidentity = | ||
| itti_sgsap_location_update_acc->mobileid.typeofidentity; | ||
| } | ||
| /* Store the status of Location Update procedure(success/failure) to send appropriate cause |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line longer than 80 characters
| sgsap_location_update_req->presencemask |= SGSAP_E_CGI; | ||
| sgsap_location_update_req->ecgi.plmn.mcc_digit2 = | ||
| ue_context->e_utran_cgi.plmn.mcc_digit2; | ||
| ue_context_p->e_utran_cgi.plmn.mcc_digit2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-order the statements so that all MCC and MNC digits are together
| RETURNerror == | ||
| (_send_cs_domain_loc_updt_acc_to_nas( | ||
| itti_sgsap_location_update_acc_p, ue_context_p, SGS_ASSOC_INACTIVE))) { | ||
| RETURNerror == (_handle_cs_domain_loc_updt_acc( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move Macro to right side of check
ca5ee50 to
a77716b
Compare
| */ | ||
| case SGS_DETACH_TYPE_UE_INITIATED_EPS: { | ||
| /* | ||
| * Handle Ue initiated EPS detach towards SGS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convert to single line comment
| */ | ||
| case SGS_DETACH_TYPE_UE_INITIATED_EXPLICIT_NONEPS: { | ||
| /* | ||
| * Handle Ue initiated IMSI detach towards SGS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convert to single line comment
| */ | ||
| case SGS_DETACH_TYPE_UE_INITIATED_COMBINED: { | ||
| /* | ||
| * Handle Ue initiated Combined EPS/IMSI detach towards SGS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convert to single line comment
| * and update the SGS State based on event | ||
| */ | ||
| * Call the SGS FSM process function to | ||
| * process the respective message in different state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment can be wrapped in fewer lines
| #include "nas_messages_types.h" | ||
| #include "s1ap_messages_types.h" | ||
| #include "sgs_messages_types.h" | ||
| #include "emm_proc.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this header here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes removed
| OAILOG_FUNC_IN(LOG_MME_APP); | ||
| additional_updt_t additional_update_type = -1; | ||
|
|
||
| additional_update_type = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be merged with line 73
| ** else RETURNerror ** | ||
| ** ** | ||
| ********************************************************************************/ | ||
| int _mme_app_compare_tmsi( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be converted into a macro?
9419de0 to
67dd562
Compare
67dd562 to
ec6d70a
Compare
de84313 to
e15490c
Compare
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ssanadhya has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
…d detach procedure (#1035) Summary: Lock less changes for CSFB related changes for combined attach, TAU and detach procedure Type: Refactor Pull Request resolved: #1035 Test Plan: Executed s1ap tester test suite Reviewed By: ardzoht Differential Revision: D19393873 Pulled By: ssanadhya fbshipit-source-id: 36ff5bff75f040c3fb6cede0454d40d7bd55b29a
Summary: Lock less changes for CSFB related changes for combined attach, TAU and detach procedure
Type: Refactor
Test Plan: Executed s1ap tester test suite