Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oai
openairinterface5G
Commits
c4ada56a
Commit
c4ada56a
authored
2 years ago
by
Sakthivel Velumani
Browse files
Options
Downloads
Patches
Plain Diff
setup resp decoding success
parent
a2f41597
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openair2/E1AP/e1ap.c
+29
-2
29 additions, 2 deletions
openair2/E1AP/e1ap.c
openair2/RRC/NR/rrc_gNB.c
+26
-0
26 additions, 0 deletions
openair2/RRC/NR/rrc_gNB.c
with
55 additions
and
2 deletions
openair2/E1AP/e1ap.c
+
29
−
2
View file @
c4ada56a
...
...
@@ -233,7 +233,7 @@ int e1apCUCP_send_SETUP_RESPONSE(instance_t instance,
}
int
e1apCUCP_send_SETUP_FAILURE
(
instance_t
instance
,
e1ap_setup_resp_t
*
e1ap_setup_resp
)
{
long
transac_id
)
{
E1AP_E1AP_PDU_t
pdu
=
{
0
};
/* Create */
/* 0. pdu Type */
...
...
@@ -249,7 +249,7 @@ int e1apCUCP_send_SETUP_FAILURE(instance_t instance,
ieC1
->
id
=
E1AP_ProtocolIE_ID_id_TransactionID
;
ieC1
->
criticality
=
E1AP_Criticality_reject
;
ieC1
->
value
.
present
=
E1AP_GNB_CU_UP_E1SetupResponseIEs__value_PR_TransactionID
;
ieC1
->
value
.
choice
.
TransactionID
=
e1ap_setup_resp
->
transac_id
;
ieC1
->
value
.
choice
.
TransactionID
=
transac_id
;
/* mandatory */
/* c2. cause (integer value) */
asn1cSequenceAdd
(
out
->
protocolIEs
.
list
,
E1AP_GNB_CU_UP_E1SetupFailureIEs_t
,
ieC2
);
...
...
@@ -311,6 +311,16 @@ int e1apCUCP_handle_SETUP_REQUEST(instance_t instance,
}
/* Create ITTI message and send to queue */
MessageDef
*
msg_p
=
itti_alloc_new_message
(
TASK_CUCP_E1
,
instance
,
E1AP_SETUP_REQ
);
memcpy
(
&
E1AP_SETUP_REQ
(
msg_p
),
req
,
sizeof
(
e1ap_setup_req_t
));
if
(
req
->
supported_plmns
>
0
)
{
itti_send_msg_to_task
(
TASK_RRC_GNB
,
instance
,
msg_p
);
}
else
{
e1apCUCP_send_SETUP_FAILURE
(
instance
,
req
->
transac_id
);
itti_free
(
TASK_CUCP_E1
,
msg_p
);
return
-
1
;
}
return
0
;
}
...
...
@@ -1141,6 +1151,7 @@ void *E1AP_CUCP_task(void *arg) {
LOG_I
(
E1AP
,
"Starting E1AP at CU CP
\n
"
);
MessageDef
*
msg
=
NULL
;
e1ap_common_init
();
int
result
;
while
(
1
)
{
itti_receive_msg
(
TASK_CUCP_E1
,
&
msg
);
...
...
@@ -1178,16 +1189,27 @@ void *E1AP_CUCP_task(void *arg) {
cuxp_task_handle_sctp_data_ind
(
myInstance
,
&
msg
->
ittiMsg
.
sctp_data_ind
);
break
;
case
E1AP_SETUP_RESP
:
LOG_I
(
E1AP
,
"CUCP Task Received E1AP_SETUP_RESP
\n
"
);
e1apCUCP_send_SETUP_RESPONSE
(
myInstance
,
&
E1AP_SETUP_RESP
(
msg
));
break
;
default:
LOG_E
(
E1AP
,
"Unknown message received in TASK_CUCP_E1
\n
"
);
break
;
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
msg
),
msg
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d) in E1AP_CUCP_task!
\n
"
,
result
);
msg
=
NULL
;
}
}
void
*
E1AP_CUUP_task
(
void
*
arg
)
{
LOG_I
(
E1AP
,
"Starting E1AP at CU UP
\n
"
);
e1ap_common_init
();
int
result
;
// SCTP
while
(
1
)
{
...
...
@@ -1218,6 +1240,11 @@ void *E1AP_CUUP_task(void *arg) {
LOG_E
(
E1AP
,
"Unknown message received in TASK_CUUP_E1
\n
"
);
break
;
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
msg
),
msg
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d) in E1AP_CUUP_task!
\n
"
,
result
);
msg
=
NULL
;
}
}
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/rrc_gNB.c
+
26
−
0
View file @
c4ada56a
...
...
@@ -3876,6 +3876,26 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
}
}
void
rrc_gNB_process_e1_setup_req
(
e1ap_setup_req_t
*
req
,
instance_t
instance
)
{
AssertFatal
(
req
->
supported_plmns
<=
PLMN_LIST_MAX_SIZE
,
"Supported PLMNs is more than PLMN_LIST_MAX_SIZE
\n
"
);
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
0
];
//TODO: remove hardcoding of RC index here
MessageDef
*
msg_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
instance
,
E1AP_SETUP_RESP
);
e1ap_setup_resp_t
*
resp
=
&
E1AP_SETUP_RESP
(
msg_p
);
resp
->
transac_id
=
req
->
transac_id
;
for
(
int
i
=
0
;
i
<
req
->
supported_plmns
;
i
++
)
{
if
(
rrc
->
configuration
.
mcc
[
i
]
==
req
->
plmns
[
i
].
mcc
&&
rrc
->
configuration
.
mnc
[
i
]
==
req
->
plmns
[
i
].
mnc
)
{
LOG_E
(
NR_RRC
,
"PLMNs received from CUUP (mcc:%d, mnc:%d) did not match with PLMNs in RRC (mcc:%d, mnc:%d)
\n
"
,
req
->
plmns
[
i
].
mcc
,
req
->
plmns
[
i
].
mnc
,
rrc
->
configuration
.
mcc
[
i
],
rrc
->
configuration
.
mnc
[
i
]);
}
}
itti_send_msg_to_task
(
TASK_CUCP_E1
,
instance
,
msg_p
);
}
///---------------------------------------------------------------------------------------------------------------///
///---------------------------------------------------------------------------------------------------------------///
void
*
rrc_gnb_task
(
void
*
args_p
)
{
...
...
@@ -4034,6 +4054,11 @@ void *rrc_gnb_task(void *args_p) {
rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND
(
msg_p
,
msg_name_p
,
instance
);
break
;
case
E1AP_SETUP_REQ
:
LOG_I
(
NR_RRC
,
"Received E1AP_SETUP_REQ for instance %d
\n
"
,
(
int
)
instance
);
rrc_gNB_process_e1_setup_req
(
&
E1AP_SETUP_REQ
(
msg_p
),
instance
);
break
;
default:
LOG_E
(
NR_RRC
,
"[gNB %ld] Received unexpected message %s
\n
"
,
instance
,
msg_name_p
);
break
;
...
...
@@ -4239,3 +4264,4 @@ void nr_rrc_trigger(protocol_ctxt_t *ctxt, int CC_id, int frame, int subframe)
LOG_D
(
NR_RRC
,
"Time in RRC: %u/ %u
\n
"
,
frame
,
subframe
);
itti_send_msg_to_task
(
TASK_RRC_GNB
,
ctxt
->
module_id
,
message_p
);
}
This diff is collapsed.
Click to expand it.
Robert Schmidt
@schmidtr
mentioned in commit
553f1d1a
·
2 years ago
mentioned in commit
553f1d1a
mentioned in commit 553f1d1a52845911be4ba61ec2bcc5c60ad42ae7
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment