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
alex037yang
OpenXG-RAN
Commits
c9a200e8
Commit
c9a200e8
authored
Nov 20, 2020
by
masayuki.harada
Committed by
Robert Schmidt
Dec 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix merge miss.
parent
15e6d770
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
82 deletions
+67
-82
openair2/COMMON/tasks_def.h
openair2/COMMON/tasks_def.h
+1
-2
openair2/X2AP/x2ap_common.h
openair2/X2AP/x2ap_common.h
+1
-1
openair3/S1AP/s1ap_eNB.c
openair3/S1AP/s1ap_eNB.c
+46
-79
openair3/S1AP/s1ap_eNB_nas_procedures.c
openair3/S1AP/s1ap_eNB_nas_procedures.c
+19
-0
No files found.
openair2/COMMON/tasks_def.h
View file @
c9a200e8
...
...
@@ -47,8 +47,7 @@ TASK_DEF(TASK_RAL_ENB, TASK_PRIORITY_MED, 200)
TASK_DEF
(
TASK_UDP
,
TASK_PRIORITY_MED
,
1000
)
// GTP_V1U task
TASK_DEF
(
TASK_GTPV1_U
,
TASK_PRIORITY_MED
,
1000
)
//TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200)
TASK_DEF
(
TASK_S1AP
,
TASK_PRIORITY_MED
,
2000
)
TASK_DEF
(
TASK_S1AP
,
TASK_PRIORITY_MED
,
200
)
TASK_DEF
(
TASK_CU_F1
,
TASK_PRIORITY_MED
,
200
)
TASK_DEF
(
TASK_DU_F1
,
TASK_PRIORITY_MED
,
200
)
/// M3ap task, acts as both source and target
...
...
openair2/X2AP/x2ap_common.h
View file @
c9a200e8
...
...
@@ -84,7 +84,7 @@ extern int asn1_xer_print;
break; \
} \
} \
/* if (mandatory) DevAssert(ie != NULL); \*/
\
if (mandatory) DevAssert(ie != NULL);
\
} while(0)
/** \brief Function callback prototype.
...
...
openair3/S1AP/s1ap_eNB.c
View file @
c9a200e8
...
...
@@ -121,55 +121,31 @@ static void s1ap_eNB_register_mme(s1ap_eNB_instance_t *instance_p,
local_ip_addr
,
sizeof
(
*
local_ip_addr
));
S1AP_INFO
(
"[eNB %d] check the mme registration state
\n
"
,
instance_p
->
instance
);
// mme = NULL;
//
// if ( mme == NULL ) {
/* Create new MME descriptor */
s1ap_mme_data_p
=
calloc
(
1
,
sizeof
(
*
s1ap_mme_data_p
));
DevAssert
(
s1ap_mme_data_p
!=
NULL
);
s1ap_mme_data_p
->
cnx_id
=
s1ap_eNB_fetch_add_global_cnx_id
();
sctp_new_association_req_p
->
ulp_cnx_id
=
s1ap_mme_data_p
->
cnx_id
;
s1ap_mme_data_p
->
assoc_id
=
-
1
;
s1ap_mme_data_p
->
broadcast_plmn_num
=
broadcast_plmn_num
;
memcpy
(
&
s1ap_mme_data_p
->
mme_s1_ip
,
mme_ip_address
,
sizeof
(
*
mme_ip_address
));
for
(
int
i
=
0
;
i
<
broadcast_plmn_num
;
++
i
)
s1ap_mme_data_p
->
broadcast_plmn_index
[
i
]
=
broadcast_plmn_index
[
i
];
s1ap_mme_data_p
->
s1ap_eNB_instance
=
instance_p
;
STAILQ_INIT
(
&
s1ap_mme_data_p
->
served_gummei
);
/* Insert the new descriptor in list of known MME
* but not yet associated.
*/
RB_INSERT
(
s1ap_mme_map
,
&
instance_p
->
s1ap_mme_head
,
s1ap_mme_data_p
);
// s1ap_mme_data_p->state = S1AP_ENB_STATE_WAITING;
s1ap_mme_data_p
->
state
=
S1AP_ENB_STATE_DISCONNECTED
;
memcpy
(
&
(
s1ap_mme_data_p
->
mme_ip_address
),
mme_ip_address
,
sizeof
(
net_ip_address_t
)
);
s1ap_mme_data_p
->
overload_state
=
S1AP_NO_OVERLOAD
;
s1ap_mme_data_p
->
sctp_req_cnt
++
;
s1ap_mme_data_p
->
timer_id
=
S1AP_TIMERID_INIT
;
// instance_p->s1ap_mme_nb ++;
instance_p
->
s1ap_mme_pending_nb
++
;
// } else if (mme->state == S1AP_ENB_STATE_WAITING) {
// instance_p->s1ap_mme_pending_nb ++;
// sctp_new_association_req_p->ulp_cnx_id = mme->cnx_id;
// S1AP_INFO("[eNB %d] MME already registered, retrive the data (state %d, cnx %d, mme_nb %d, mme_pending_nb %d)\n",
// instance_p->instance,
// mme->state, mme->cnx_id,
// instance_p->s1ap_mme_nb, instance_p->s1ap_mme_pending_nb);
// /*s1ap_mme_data_p->cnx_id = mme->cnx_id;
// sctp_new_association_req_p->ulp_cnx_id = mme->cnx_id;
//
// s1ap_mme_data_p->assoc_id = -1;
// s1ap_mme_data_p->s1ap_eNB_instance = instance_p;
// */
// } else {
// S1AP_WARN("[eNB %d] MME already registered but not in the waiting state, retrive the data (state %d, cnx %d, mme_nb %d, mme_pending_nb %d)\n",
// instance_p->instance,
// mme->state, mme->cnx_id,
// instance_p->s1ap_mme_nb, instance_p->s1ap_mme_pending_nb);
// }
/* Create new MME descriptor */
s1ap_mme_data_p
=
calloc
(
1
,
sizeof
(
*
s1ap_mme_data_p
));
DevAssert
(
s1ap_mme_data_p
!=
NULL
);
s1ap_mme_data_p
->
cnx_id
=
s1ap_eNB_fetch_add_global_cnx_id
();
sctp_new_association_req_p
->
ulp_cnx_id
=
s1ap_mme_data_p
->
cnx_id
;
s1ap_mme_data_p
->
assoc_id
=
-
1
;
s1ap_mme_data_p
->
broadcast_plmn_num
=
broadcast_plmn_num
;
memcpy
(
&
s1ap_mme_data_p
->
mme_s1_ip
,
mme_ip_address
,
sizeof
(
*
mme_ip_address
));
for
(
int
i
=
0
;
i
<
broadcast_plmn_num
;
++
i
)
s1ap_mme_data_p
->
broadcast_plmn_index
[
i
]
=
broadcast_plmn_index
[
i
];
s1ap_mme_data_p
->
s1ap_eNB_instance
=
instance_p
;
STAILQ_INIT
(
&
s1ap_mme_data_p
->
served_gummei
);
/* Insert the new descriptor in list of known MME
* but not yet associated.
*/
RB_INSERT
(
s1ap_mme_map
,
&
instance_p
->
s1ap_mme_head
,
s1ap_mme_data_p
);
s1ap_mme_data_p
->
state
=
S1AP_ENB_STATE_DISCONNECTED
;
memcpy
(
&
(
s1ap_mme_data_p
->
mme_ip_address
),
mme_ip_address
,
sizeof
(
net_ip_address_t
)
);
s1ap_mme_data_p
->
overload_state
=
S1AP_NO_OVERLOAD
;
s1ap_mme_data_p
->
sctp_req_cnt
++
;
s1ap_mme_data_p
->
timer_id
=
S1AP_TIMERID_INIT
;
instance_p
->
s1ap_mme_pending_nb
++
;
itti_send_msg_to_task
(
TASK_SCTP
,
instance_p
->
instance
,
message_p
);
}
...
...
@@ -210,8 +186,8 @@ void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t *
new_instance
->
tac
=
s1ap_register_eNB
->
tac
;
memcpy
(
&
new_instance
->
eNB_s1_ip
,
&
s1ap_register_eNB
->
enb_ip_address
,
sizeof
(
s1ap_register_eNB
->
enb_ip_address
));
&
s1ap_register_eNB
->
enb_ip_address
,
sizeof
(
s1ap_register_eNB
->
enb_ip_address
));
for
(
int
i
=
0
;
i
<
s1ap_register_eNB
->
num_plmn
;
i
++
)
{
new_instance
->
mcc
[
i
]
=
s1ap_register_eNB
->
mcc
[
i
];
...
...
@@ -238,8 +214,6 @@ void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t *
s1ap_register_eNB
->
eNB_id
);
}
// DevCheck(s1ap_register_eNB->nb_mme <= S1AP_MAX_NB_MME_IP_ADDRESS,
// S1AP_MAX_NB_MME_IP_ADDRESS, s1ap_register_eNB->nb_mme, 0);
if
(
s1ap_register_eNB
->
nb_mme
>
S1AP_MAX_NB_MME_IP_ADDRESS
)
{
S1AP_ERROR
(
"Invalid MME number = %d
\n
"
,
s1ap_register_eNB
->
nb_mme
);
...
...
@@ -306,27 +280,27 @@ void s1ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
if
(
ue_p
->
mme_ref
==
s1ap_mme_data_p
)
{
if
(
cnt
<
NUMBER_OF_UE_MAX
){
enb_s1ap_id
[
cnt
]
=
ue_p
->
eNB_ue_s1ap_id
;
cnt
++
;
message_p
=
NULL
;
message_p
=
itti_alloc_new_message
(
TASK_S1AP
,
S1AP_UE_CONTEXT_RELEASE_COMMAND
);
if
(
message_p
!=
NULL
)
{
S1AP_UE_CONTEXT_RELEASE_COMMAND
(
message_p
).
eNB_ue_s1ap_id
=
ue_p
->
eNB_ue_s1ap_id
;
enb_s1ap_id
[
cnt
]
=
ue_p
->
eNB_ue_s1ap_id
;
cnt
++
;
message_p
=
NULL
;
message_p
=
itti_alloc_new_message
(
TASK_S1AP
,
S1AP_UE_CONTEXT_RELEASE_COMMAND
);
if
(
itti_send_msg_to_task
(
TASK_RRC_ENB
,
ue_p
->
eNB_instance
->
instance
,
message_p
)
<
0
)
if
(
message_p
!=
NULL
)
{
S1AP_ERROR
(
"UE Context Release Command Transmission Failure: eNB_ue_s1ap_id=%u
\n
"
,
ue_p
->
eNB_ue_s1ap_id
);
S1AP_UE_CONTEXT_RELEASE_COMMAND
(
message_p
).
eNB_ue_s1ap_id
=
ue_p
->
eNB_ue_s1ap_id
;
if
(
itti_send_msg_to_task
(
TASK_RRC_ENB
,
ue_p
->
eNB_instance
->
instance
,
message_p
)
<
0
)
{
S1AP_ERROR
(
"UE Context Release Command Transmission Failure: eNB_ue_s1ap_id=%u
\n
"
,
ue_p
->
eNB_ue_s1ap_id
);
}
}
else
{
S1AP_ERROR
(
"Invalid message_p : eNB_ue_s1ap_id=%u
\n
"
,
ue_p
->
eNB_ue_s1ap_id
);
}
}
else
{
S1AP_ERROR
(
"Invalid message_p : eNB_ue_s1ap_id=%u
\n
"
,
ue_p
->
eNB_ue_s1ap_id
);
}
}
else
{
S1AP_ERROR
(
"s1ap_eNB_handle_sctp_association_resp: cnt %d > max
\n
"
,
cnt
);
S1AP_ERROR
(
"s1ap_eNB_handle_sctp_association_resp: cnt %d > max
\n
"
,
cnt
);
}
}
}
...
...
@@ -396,7 +370,7 @@ void s1ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
{
S1AP_ERROR
(
"Retransmission count exceeded of SCTP : MME=%d
\n
"
,
s1ap_mme_data_p
->
cnx_id
);
}
}
}
else
{
S1AP_ERROR
(
"SCTP disconnection reception : MME = %d
\n
"
,
s1ap_mme_data_p
->
cnx_id
);
...
...
@@ -413,14 +387,6 @@ void s1ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
s1ap_mme_data_p
->
state
=
S1AP_ENB_STATE_DISCONNECTED
;
}
}
// if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
// S1AP_WARN("Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
// sctp_new_association_resp->sctp_state,
// instance,
// sctp_new_association_resp->ulp_cnx_id);
// s1ap_handle_s1_setup_message(s1ap_mme_data_p, sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN);
// return;
// }
else
{
/* Update parameters */
...
...
@@ -435,6 +401,7 @@ void s1ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
return
;
}
}
}
static
void
s1ap_eNB_handle_sctp_data_ind
(
sctp_data_ind_t
*
sctp_data_ind
)
{
...
...
openair3/S1AP/s1ap_eNB_nas_procedures.c
View file @
c9a200e8
...
...
@@ -113,6 +113,25 @@ int s1ap_eNB_handle_nas_first_req(
}
}
if
(
mme_desc_p
==
NULL
)
{
/* Select MME based on the selected PLMN identity, received through RRC
* Connection Setup Complete */
mme_desc_p
=
s1ap_eNB_nnsf_select_mme_by_plmn_id
(
instance_p
,
s1ap_nas_first_req_p
->
establishment_cause
,
s1ap_nas_first_req_p
->
selected_plmn_identity
);
if
(
mme_desc_p
)
{
S1AP_INFO
(
"[eNB %d] Chose MME '%s' (assoc_id %d) through selected PLMN Identity index %d MCC %d MNC %d
\n
"
,
instance
,
mme_desc_p
->
mme_name
,
mme_desc_p
->
assoc_id
,
s1ap_nas_first_req_p
->
selected_plmn_identity
,
instance_p
->
mcc
[
s1ap_nas_first_req_p
->
selected_plmn_identity
],
instance_p
->
mnc
[
s1ap_nas_first_req_p
->
selected_plmn_identity
]);
}
}
if
(
mme_desc_p
==
NULL
)
{
/*
* If no MME corresponds to the GUMMEI, the s-TMSI, or the selected PLMN
...
...
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