Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
ff688f16
Commit
ff688f16
authored
Jul 04, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NNSF my MME code: respect selected PLMN ID
parent
6c0680db
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
15 deletions
+23
-15
openair3/S1AP/s1ap_eNB_nas_procedures.c
openair3/S1AP/s1ap_eNB_nas_procedures.c
+1
-0
openair3/S1AP/s1ap_eNB_nnsf.c
openair3/S1AP/s1ap_eNB_nnsf.c
+21
-15
openair3/S1AP/s1ap_eNB_nnsf.h
openair3/S1AP/s1ap_eNB_nnsf.h
+1
-0
No files found.
openair3/S1AP/s1ap_eNB_nas_procedures.c
View file @
ff688f16
...
...
@@ -89,6 +89,7 @@ int s1ap_eNB_handle_nas_first_req(
mme_desc_p
=
s1ap_eNB_nnsf_select_mme_by_mme_code
(
instance_p
,
s1ap_nas_first_req_p
->
establishment_cause
,
s1ap_nas_first_req_p
->
selected_plmn_identity
,
s1ap_nas_first_req_p
->
ue_identity
.
s_tmsi
.
mme_code
);
}
}
...
...
openair3/S1AP/s1ap_eNB_nnsf.c
View file @
ff688f16
...
...
@@ -92,11 +92,10 @@ s1ap_eNB_nnsf_select_mme(s1ap_eNB_instance_t *instance_p,
struct
s1ap_eNB_mme_data_s
*
s1ap_eNB_nnsf_select_mme_by_mme_code
(
s1ap_eNB_instance_t
*
instance_p
,
rrc_establishment_cause_t
cause
,
int
selected_plmn_identity
,
uint8_t
mme_code
)
{
struct
s1ap_eNB_mme_data_s
*
mme_data_p
=
NULL
;
struct
s1ap_eNB_mme_data_s
*
mme_highest_capacity_p
=
NULL
;
uint8_t
current_capacity
=
0
;
RB_FOREACH
(
mme_data_p
,
s1ap_mme_map
,
&
instance_p
->
s1ap_mme_head
)
{
struct
served_gummei_s
*
gummei_p
=
NULL
;
...
...
@@ -135,30 +134,37 @@ s1ap_eNB_nnsf_select_mme_by_mme_code(s1ap_eNB_instance_t *instance_p,
}
}
if
(
current_capacity
<
mme_data_p
->
relative_mme_capacity
)
{
/* We find a better MME, keep a reference to it */
current_capacity
=
mme_data_p
->
relative_mme_capacity
;
mme_highest_capacity_p
=
mme_data_p
;
}
/* Looking for MME code matching the one provided by NAS */
STAILQ_FOREACH
(
gummei_p
,
&
mme_data_p
->
served_gummei
,
next
)
{
struct
mme_code_s
*
mme_code_p
=
NULL
;
struct
plmn_identity_s
*
served_plmn_p
=
NULL
;
STAILQ_FOREACH
(
served_plmn_p
,
&
gummei_p
->
served_plmns
,
next
)
{
if
((
served_plmn_p
->
mcc
==
instance_p
->
mcc
[
selected_plmn_identity
])
&&
(
served_plmn_p
->
mnc
==
instance_p
->
mnc
[
selected_plmn_identity
]))
{
break
;
}
}
STAILQ_FOREACH
(
mme_code_p
,
&
gummei_p
->
mme_codes
,
next
)
{
if
(
mme_code_p
->
mme_code
==
mme_code
)
{
return
mme_data_p
;
break
;
}
}
/* The MME matches the parameters provided by the NAS layer ->
* the MME is knwown and the association is ready.
* Return the reference to the MME to use it for this UE.
*/
if
(
mme_code_p
&&
served_plmn_p
)
{
return
mme_data_p
;
}
}
}
/* At this point no MME matches the provided GUMMEI. Select the one with the
* highest relative capacity.
* In case the list of known MME is empty, simply return NULL, that way the RRC
* layer should know about it and reject RRC connectivity.
*/
return
mme_highest_capacity_p
;
/* At this point no MME matches the selected PLMN and MME code. In this case,
* return NULL. That way the RRC layer should know about it and reject RRC
* connectivity. */
return
NULL
;
}
struct
s1ap_eNB_mme_data_s
*
...
...
openair3/S1AP/s1ap_eNB_nnsf.h
View file @
ff688f16
...
...
@@ -29,6 +29,7 @@ s1ap_eNB_nnsf_select_mme(s1ap_eNB_instance_t *instance_p,
struct
s1ap_eNB_mme_data_s
*
s1ap_eNB_nnsf_select_mme_by_mme_code
(
s1ap_eNB_instance_t
*
instance_p
,
rrc_establishment_cause_t
cause
,
int
selected_plmn_identity
,
uint8_t
mme_code
);
struct
s1ap_eNB_mme_data_s
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment