Skip to content

Conversation

@rsarwad
Copy link
Contributor

@rsarwad rsarwad commented Dec 18, 2019

Summary: Lock less changes for CSFB related changes for combined attach, TAU and detach procedure
Type: Refactor
Test Plan: Executed s1ap tester test suite

ue_context_p->mme_ue_s1ap_id);
OAILOG_FUNC_RETURN(LOG_MME_APP, RETURNerror);
}
/*Initialize SGS context to default values*/
Copy link
Contributor Author

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;
Copy link
Contributor Author

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;
Copy link
Contributor Author

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
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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)
{
Copy link
Contributor Author

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);
Copy link
Contributor Author

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 **
*******************************************************************************/

Copy link
Contributor Author

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);
}

/**********************************************************************************
Copy link
Contributor Author

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) {
Copy link
Contributor

@ssanadhya ssanadhya Dec 20, 2019

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)

Copy link
Contributor

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);
Copy link
Contributor

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 =
Copy link
Contributor

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;
Copy link
Contributor

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
Copy link
Contributor

@ssanadhya ssanadhya Dec 20, 2019

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;
Copy link
Contributor

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(
Copy link
Contributor

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

@rsarwad rsarwad force-pushed the rsarwad_merge_csfb branch from ca5ee50 to a77716b Compare January 1, 2020 05:11
*/
case SGS_DETACH_TYPE_UE_INITIATED_EPS: {
/*
* Handle Ue initiated EPS detach towards SGS
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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"
Copy link
Contributor

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?

Copy link
Contributor Author

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 =
Copy link
Contributor

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(
Copy link
Contributor

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?

@rsarwad rsarwad force-pushed the rsarwad_merge_csfb branch from 9419de0 to 67dd562 Compare January 13, 2020 11:59
@rsarwad rsarwad force-pushed the rsarwad_merge_csfb branch from 67dd562 to ec6d70a Compare January 14, 2020 02:49
@rsarwad rsarwad force-pushed the rsarwad_merge_csfb branch from de84313 to e15490c Compare January 14, 2020 04:41
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

facebook-github-bot pushed a commit that referenced this pull request Jan 14, 2020
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants