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
ZhouShuya
OpenXG-RAN
Commits
7b859b72
Commit
7b859b72
authored
Dec 18, 2020
by
Xue Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add F1AP_DL_RRC_MESSAGE in NR RRC
parent
5936c80b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
337 additions
and
24 deletions
+337
-24
openair2/F1AP/f1ap_cu_rrc_message_transfer.c
openair2/F1AP/f1ap_cu_rrc_message_transfer.c
+19
-1
openair2/F1AP/f1ap_cu_task.c
openair2/F1AP/f1ap_cu_task.c
+8
-2
openair2/F1AP/f1ap_du_rrc_message_transfer.c
openair2/F1AP/f1ap_du_rrc_message_transfer.c
+193
-0
openair2/RRC/NR/L2_nr_interface.c
openair2/RRC/NR/L2_nr_interface.c
+17
-17
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+62
-3
openair2/RRC/NR/rrc_gNB_NGAP.c
openair2/RRC/NR/rrc_gNB_NGAP.c
+38
-1
No files found.
openair2/F1AP/f1ap_cu_rrc_message_transfer.c
View file @
7b859b72
...
...
@@ -325,7 +325,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
F1AP_ULRRCMessageTransfer_t
*
container
;
F1AP_ULRRCMessageTransferIEs_t
*
ie
;
MessageDef
*
message_p
;
uint64_t
cu_ue_f1ap_id
;
uint64_t
du_ue_f1ap_id
;
...
...
@@ -375,6 +375,22 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
// print message in debug mode
// create an ITTI message and copy SDU
message_p
=
itti_alloc_new_message
(
TASK_CU_F1
,
NR_RRC_DCCH_DATA_IND
);
NR_RRC_DCCH_DATA_IND
(
message_p
).
sdu_p
=
malloc
(
ie
->
value
.
choice
.
RRCContainer
.
size
);
NR_RRC_DCCH_DATA_IND
(
message_p
).
sdu_size
=
ie
->
value
.
choice
.
RRCContainer
.
size
;
memcpy
(
NR_RRC_DCCH_DATA_IND
(
message_p
).
sdu_p
,
ie
->
value
.
choice
.
RRCContainer
.
buf
,
ie
->
value
.
choice
.
RRCContainer
.
size
);
NR_RRC_DCCH_DATA_IND
(
message_p
).
dcch_index
=
srb_id
;
NR_RRC_DCCH_DATA_IND
(
message_p
).
rnti
=
f1ap_get_rnti_by_cu_id
(
&
f1ap_cu_inst
[
instance
],
cu_ue_f1ap_id
);
NR_RRC_DCCH_DATA_IND
(
message_p
).
module_id
=
instance
;
NR_RRC_DCCH_DATA_IND
(
message_p
).
gNB_index
=
instance
;
// not needed for CU
itti_send_msg_to_task
(
TASK_RRC_GNB
,
instance
,
message_p
);
/*
message_p = itti_alloc_new_message (TASK_CU_F1, RRC_DCCH_DATA_IND);
...
...
@@ -392,6 +408,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
itti_send_msg_to_task(TASK_RRC_ENB, instance, message_p);
*/
#if(0)
protocol_ctxt_t
ctxt
;
ctxt
.
module_id
=
instance
;
ctxt
.
instance
=
instance
;
...
...
@@ -412,5 +429,6 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
srb_id
,
ie
->
value
.
choice
.
RRCContainer
.
size
,
mb
);
#endif
return
0
;
}
openair2/F1AP/f1ap_cu_task.c
View file @
7b859b72
...
...
@@ -166,13 +166,19 @@ void *F1AP_CU_task(void *arg) {
&
F1AP_SETUP_RESP
(
received_msg
));
break
;
case
F1AP_DL_RRC_MESSAGE
:
// from rrc
case
F1AP_DL_RRC_MESSAGE
:
// from rrc
LOG_I
(
F1AP
,
"CU Task Received F1AP_DL_RRC_MESSAGE
\n
"
);
CU_send_DL_RRC_MESSAGE_TRANSFER
(
ITTI_MESSAGE_GET_INSTANCE
(
received_msg
),
&
F1AP_DL_RRC_MESSAGE
(
received_msg
));
break
;
case
F1AP_UE_CONTEXT_RELEASE_CMD
:
// from rrc
case
F1AP_UE_CONTEXT_SETUP_REQ
:
// from rrc
LOG_I
(
F1AP
,
"CU Task Received F1AP_UE_CONTEXT_SETUP_REQ
\n
"
);
CU_send_UE_CONTEXT_SETUP_REQUEST
(
ITTI_MESSAGE_GET_INSTANCE
(
received_msg
),
&
F1AP_UE_CONTEXT_SETUP_REQ
(
received_msg
));
break
;
case
F1AP_UE_CONTEXT_RELEASE_CMD
:
// from rrc
LOG_I
(
F1AP
,
"CU Task Received F1AP_UE_CONTEXT_RELEASE_CMD
\n
"
);
CU_send_UE_CONTEXT_RELEASE_COMMAND
(
ITTI_MESSAGE_GET_INSTANCE
(
received_msg
),
&
F1AP_UE_CONTEXT_RELEASE_CMD
(
received_msg
));
...
...
openair2/F1AP/f1ap_du_rrc_message_transfer.c
View file @
7b859b72
...
...
@@ -42,13 +42,19 @@
#include "LTE_DL-DCCH-Message.h"
#include "LTE_UL-DCCH-Message.h"
#include "NR_DL-CCCH-Message.h"
#include "NR_UL-CCCH-Message.h"
#include "NR_DL-DCCH-Message.h"
#include "NR_UL-DCCH-Message.h"
// for SRB1_logicalChannelConfig_defaultValue
#include "rrc_extern.h"
#include "common/ran_context.h"
#include "rrc_eNB_UE_context.h"
#include "openair2/RRC/NR/rrc_gNB_UE_context.h"
#include "asn1_msg.h"
#include "intertask_interface.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
// undefine C_RNTI from
// openair1/PHY/LTE_TRANSPORT/transport_common.h which
...
...
@@ -892,4 +898,191 @@ void init_f1ap_du_ue_inst (void) {
memset
(
f1ap_du_inst
,
0
,
sizeof
(
f1ap_du_inst
));
}
int
DU_send_UL_NR_RRC_MESSAGE_TRANSFER
(
instance_t
instance
,
const
f1ap_ul_rrc_message_t
*
msg
)
{
const
rnti_t
rnti
=
msg
->
rnti
;
F1AP_F1AP_PDU_t
pdu
;
F1AP_ULRRCMessageTransfer_t
*
out
;
F1AP_ULRRCMessageTransferIEs_t
*
ie
;
uint8_t
*
buffer
=
NULL
;
uint32_t
len
;
LOG_I
(
F1AP
,
"[DU %d] %s: size %d UE RNTI %x in SRB %d
\n
"
,
instance
,
__func__
,
msg
->
rrc_container_length
,
rnti
,
msg
->
srb_id
);
//LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, msg->rrc_container_length);
//for (int i = 0;i < msg->rrc_container_length; i++)
// printf("%02x ", msg->rrc_container[i]);
//printf("\n");
/* Create */
/* 0. Message Type */
memset
(
&
pdu
,
0
,
sizeof
(
pdu
));
pdu
.
present
=
F1AP_F1AP_PDU_PR_initiatingMessage
;
pdu
.
choice
.
initiatingMessage
=
(
F1AP_InitiatingMessage_t
*
)
calloc
(
1
,
sizeof
(
F1AP_InitiatingMessage_t
));
pdu
.
choice
.
initiatingMessage
->
procedureCode
=
F1AP_ProcedureCode_id_ULRRCMessageTransfer
;
pdu
.
choice
.
initiatingMessage
->
criticality
=
F1AP_Criticality_ignore
;
pdu
.
choice
.
initiatingMessage
->
value
.
present
=
F1AP_InitiatingMessage__value_PR_ULRRCMessageTransfer
;
out
=
&
pdu
.
choice
.
initiatingMessage
->
value
.
choice
.
ULRRCMessageTransfer
;
/* mandatory */
/* c1. GNB_CU_UE_F1AP_ID */
ie
=
(
F1AP_ULRRCMessageTransferIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_ULRRCMessageTransferIEs_t
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_ULRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID
;
ie
->
value
.
choice
.
GNB_CU_UE_F1AP_ID
=
f1ap_get_cu_ue_f1ap_id
(
&
f1ap_du_inst
[
instance
],
rnti
);
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
/* c2. GNB_DU_UE_F1AP_ID */
ie
=
(
F1AP_ULRRCMessageTransferIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_ULRRCMessageTransferIEs_t
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_ULRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID
;
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
=
f1ap_get_du_ue_f1ap_id
(
&
f1ap_du_inst
[
instance
],
rnti
);
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
/* c3. SRBID */
ie
=
(
F1AP_ULRRCMessageTransferIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_ULRRCMessageTransferIEs_t
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_SRBID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_ULRRCMessageTransferIEs__value_PR_SRBID
;
ie
->
value
.
choice
.
SRBID
=
msg
->
srb_id
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
// issue in here
/* mandatory */
/* c4. RRCContainer */
ie
=
(
F1AP_ULRRCMessageTransferIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_ULRRCMessageTransferIEs_t
));
ie
->
id
=
F1AP_ProtocolIE_ID_id_RRCContainer
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_ULRRCMessageTransferIEs__value_PR_RRCContainer
;
OCTET_STRING_fromBuf
(
&
ie
->
value
.
choice
.
RRCContainer
,
(
const
char
*
)
msg
->
rrc_container
,
msg
->
rrc_container_length
);
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
if
(
msg
->
srb_id
==
1
||
msg
->
srb_id
==
2
)
{
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
rrc_gNB_get_ue_context
(
RC
.
nrrrc
[
instance
],
rnti
);
NR_UL_DCCH_Message_t
*
ul_dcch_msg
=
NULL
;
asn_dec_rval_t
dec_rval
;
dec_rval
=
uper_decode
(
NULL
,
&
asn_DEF_LTE_UL_DCCH_Message
,
(
void
**
)
&
ul_dcch_msg
,
&
ie
->
value
.
choice
.
RRCContainer
.
buf
[
1
],
// buf[0] includes the pdcp header
msg
->
rrc_container_length
,
0
,
0
);
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
LOG_E
(
F1AP
,
" Failed to decode UL-DCCH (%zu bytes)
\n
"
,
dec_rval
.
consumed
);
else
LOG_I
(
F1AP
,
"Received message: present %d and c1 present %d
\n
"
,
ul_dcch_msg
->
message
.
present
,
ul_dcch_msg
->
message
.
choice
.
c1
->
present
);
if
(
ul_dcch_msg
->
message
.
present
==
NR_UL_DCCH_MessageType_PR_c1
)
{
switch
(
ul_dcch_msg
->
message
.
choice
.
c1
->
present
)
{
case
NR_UL_DCCH_MessageType__c1_PR_NOTHING
:
/* No components present */
break
;
case
NR_UL_DCCH_MessageType__c1_PR_measurementReport
:
break
;
case
NR_UL_DCCH_MessageType__c1_PR_rrcReconfigurationComplete
:
LOG_I
(
F1AP
,
"[MSG] RRC UL rrcReconfigurationComplete
\n
"
);
/* CDRX: activated when RRC Connection Reconfiguration Complete is received */
#if(0)
int
UE_id_mac
=
find_nr_UE_id
(
instance
,
rnti
);
if
(
UE_id_mac
==
-
1
)
{
LOG_E
(
F1AP
,
"Can't find UE_id(MAC) of UE rnti %x
\n
"
,
rnti
);
break
;
}
UE_sched_ctrl_t
*
UE_scheduling_control
=
&
(
RC
.
nrmac
[
instance
]
->
UE_info
.
UE_sched_ctrl
[
UE_id_mac
]);
if
(
UE_scheduling_control
->
cdrx_waiting_ack
==
TRUE
)
{
UE_scheduling_control
->
cdrx_waiting_ack
=
FALSE
;
UE_scheduling_control
->
cdrx_configured
=
TRUE
;
// Set to TRUE when RRC Connection Reconfiguration Complete is received
LOG_I
(
F1AP
,
"CDRX configuration activated after RRC Connection Reconfiguration Complete reception
\n
"
);
}
/* End of CDRX processing */
#endif
break
;
case
NR_UL_DCCH_MessageType__c1_PR_rrcSetupComplete
:
LOG_I
(
F1AP
,
"[MSG] RRC UL rrcSetupComplete
\n
"
);
if
(
!
ue_context_p
){
LOG_E
(
F1AP
,
"Did not find the UE context associated with UE RNTOI %x, ue_context_p is NULL
\n
"
,
rnti
);
}
else
{
LOG_I
(
F1AP
,
"Processing RRCSetupComplete UE %x
\n
"
,
rnti
);
ue_context_p
->
ue_context
.
Status
=
NR_RRC_CONNECTED
;
}
break
;
case
NR_UL_DCCH_MessageType__c1_PR_rrcReestablishmentComplete
:
LOG_I
(
F1AP
,
"[MSG] RRC ReestablishmentComplete
\n
"
);
break
;
case
NR_UL_DCCH_MessageType__c1_PR_rrcResumeComplete
:
LOG_I
(
F1AP
,
"[MSG] RRC ResumeComplete
\n
"
);
break
;
case
NR_UL_DCCH_MessageType__c1_PR_securityModeComplete
:
LOG_I
(
F1AP
,
"[MSG] RRC securityModeComplete
\n
"
);
break
;
case
NR_UL_DCCH_MessageType__c1_PR_securityModeFailure
:
LOG_I
(
F1AP
,
"[MSG] RRC securityModeFailure
\n
"
);
break
;
case
NR_UL_DCCH_MessageType__c1_PR_ulInformationTransfer
:
LOG_I
(
F1AP
,
"[MSG] RRC UL Information Transfer
\n
"
);
break
;
case
NR_UL_DCCH_MessageType__c1_PR_locationMeasurementIndication
:
break
;
case
NR_UL_DCCH_MessageType__c1_PR_ueCapabilityInformation
:
LOG_I
(
F1AP
,
"[MSG] RRC ueCapabilityInformation
\n
"
);
break
;
case
NR_UL_DCCH_MessageType__c1_PR_ueAssistanceInformation
:
break
;
case
NR_UL_DCCH_MessageType__c1_PR_failureInformation
:
break
;
case
NR_UL_DCCH_MessageType__c1_PR_scgFailureInformation
:
break
;
case
NR_UL_DCCH_MessageType__c1_PR_scgFailureInformationEUTRA
:
break
;
default:
LOG_E
(
NR_RRC
,
"Unknown UL DCCH message type, present %d
\n
"
,
ul_dcch_msg
->
message
.
choice
.
c1
->
present
);
break
;
}
}
}
/* encode */
if
(
f1ap_encode_pdu
(
&
pdu
,
&
buffer
,
&
len
)
<
0
)
{
LOG_E
(
F1AP
,
"Failed to encode F1 UL RRC MESSAGE TRANSFER
\n
"
);
return
-
1
;
}
du_f1ap_itti_send_sctp_data_req
(
instance
,
f1ap_du_data
->
assoc_id
,
buffer
,
len
,
f1ap_du_data
->
default_sctp_stream_id
);
return
0
;
}
openair2/RRC/NR/L2_nr_interface.c
View file @
7b859b72
...
...
@@ -69,11 +69,11 @@ nr_rrc_data_req(
}
MSC_LOG_TX_MESSAGE
(
ctxt_pP
->
enb_flag
?
MSC_RRC_
E
NB
:
MSC_RRC_UE
,
ctxt_pP
->
enb_flag
?
MSC_RRC_
G
NB
:
MSC_RRC_UE
,
ctxt_pP
->
enb_flag
?
MSC_PDCP_ENB
:
MSC_PDCP_UE
,
buffer_pP
,
sdu_sizeP
,
MSC_AS_TIME_FMT
"RRC_DCCH_DATA_REQ UE %x MUI %d size %u"
,
MSC_AS_TIME_FMT
"
NR_
RRC_DCCH_DATA_REQ UE %x MUI %d size %u"
,
MSC_AS_TIME_ARGS
(
ctxt_pP
),
ctxt_pP
->
rnti
,
muiP
,
...
...
@@ -82,28 +82,28 @@ nr_rrc_data_req(
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
uint8_t
*
message_buffer
;
message_buffer
=
itti_malloc
(
ctxt_pP
->
enb_flag
?
TASK_RRC_
E
NB
:
TASK_RRC_UE
,
ctxt_pP
->
enb_flag
?
TASK_RRC_
G
NB
:
TASK_RRC_UE
,
ctxt_pP
->
enb_flag
?
TASK_PDCP_ENB
:
TASK_PDCP_UE
,
sdu_sizeP
);
memcpy
(
message_buffer
,
buffer_pP
,
sdu_sizeP
);
message_p
=
itti_alloc_new_message
(
ctxt_pP
->
enb_flag
?
TASK_RRC_
ENB
:
TASK_RRC_UE
,
RRC_DCCH_DATA_REQ
);
RRC_DCCH_DATA_REQ
(
message_p
).
frame
=
ctxt_pP
->
frame
;
RRC_DCCH_DATA_REQ
(
message_p
).
e
nb_flag
=
ctxt_pP
->
enb_flag
;
RRC_DCCH_DATA_REQ
(
message_p
).
rb_id
=
rb_idP
;
RRC_DCCH_DATA_REQ
(
message_p
).
muip
=
muiP
;
RRC_DCCH_DATA_REQ
(
message_p
).
confirmp
=
confirmP
;
RRC_DCCH_DATA_REQ
(
message_p
).
sdu_size
=
sdu_sizeP
;
RRC_DCCH_DATA_REQ
(
message_p
).
sdu_p
=
message_buffer
;
//memcpy (
RRC_DCCH_DATA_REQ
(message_p).sdu_p, buffer_pP, sdu_sizeP);
RRC_DCCH_DATA_REQ
(
message_p
).
mode
=
modeP
;
RRC_DCCH_DATA_REQ
(
message_p
).
module_id
=
ctxt_pP
->
module_id
;
RRC_DCCH_DATA_REQ
(
message_p
).
rnti
=
ctxt_pP
->
rnti
;
RRC_DCCH_DATA_REQ
(
message_p
).
e
NB_index
=
ctxt_pP
->
eNB_index
;
message_p
=
itti_alloc_new_message
(
ctxt_pP
->
enb_flag
?
TASK_RRC_
GNB
:
TASK_RRC_UE
,
NR_RRC_DCCH_DATA_IND
);
NR_RRC_DCCH_DATA_IND
(
message_p
).
frame
=
ctxt_pP
->
frame
;
// NR_RRC_DCCH_DATA_IND (message_p).g
nb_flag = ctxt_pP->enb_flag;
// NR_RRC_DCCH_DATA_IND
(message_p).rb_id = rb_idP;
// NR_RRC_DCCH_DATA_IND
(message_p).muip = muiP;
// NR_RRC_DCCH_DATA_IND
(message_p).confirmp = confirmP;
NR_RRC_DCCH_DATA_IND
(
message_p
).
sdu_size
=
sdu_sizeP
;
NR_RRC_DCCH_DATA_IND
(
message_p
).
sdu_p
=
message_buffer
;
//memcpy (
NR_RRC_DCCH_DATA_IND
(message_p).sdu_p, buffer_pP, sdu_sizeP);
// NR_RRC_DCCH_DATA_IND
(message_p).mode = modeP;
NR_RRC_DCCH_DATA_IND
(
message_p
).
module_id
=
ctxt_pP
->
module_id
;
NR_RRC_DCCH_DATA_IND
(
message_p
).
rnti
=
ctxt_pP
->
rnti
;
NR_RRC_DCCH_DATA_IND
(
message_p
).
g
NB_index
=
ctxt_pP
->
eNB_index
;
itti_send_msg_to_task
(
ctxt_pP
->
enb_flag
?
TASK_PDCP_ENB
:
TASK_PDCP_UE
,
ctxt_pP
->
instance
,
message_p
);
LOG_I
(
RRC
,
"sent RRC_DCCH_DATA_REQ to TASK_PDCP_E
NB
\n
"
);
LOG_I
(
NR_RRC
,
"sent RRC_DCCH_DATA_REQ to TASK_PDCP_G
NB
\n
"
);
/* Hack: only trigger PDCP if in CU, otherwise it is triggered by RU threads
* Ideally, PDCP would not neet to be triggered like this but react to ITTI
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
7b859b72
...
...
@@ -445,6 +445,19 @@ rrc_gNB_generate_RRCSetup(
GNB_RRC_CCCH_DATA_IND
(
message_p
).
sdu
=
message_buffer
;
GNB_RRC_CCCH_DATA_IND
(
message_p
).
size
=
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
;
itti_send_msg_to_task
(
TASK_RRC_UE_SIM
,
ctxt_pP
->
instance
,
message_p
);
#else
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
F1AP_DL_RRC_MESSAGE
);
F1AP_DL_RRC_MESSAGE
(
message_p
).
rrc_container
=
(
uint8_t
*
)
ue_p
->
Srb0
.
Tx_buffer
.
Payload
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
rrc_container_length
=
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
gNB_CU_ue_id
=
0
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
gNB_DU_ue_id
=
0
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
old_gNB_DU_ue_id
=
0xFFFFFFFF
;
// unknown
F1AP_DL_RRC_MESSAGE
(
message_p
).
rnti
=
ue_p
->
rnti
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
srb_id
=
CCCH
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
execute_duplication
=
1
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
RAT_frequency_priority_information
.
en_dc
=
0
;
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt_pP
->
module_id
,
message_p
);
LOG_D
(
NR_RRC
,
"Send F1AP_DL_RRC_MESSAGE with ITTI
\n
"
);
#endif
}
...
...
@@ -526,6 +539,7 @@ rrc_gNB_generate_defaultRRCReconfiguration(
uint8_t
buffer
[
RRC_BUF_SIZE
];
uint16_t
size
;
gNB_RRC_INST
*
gnb_rrc_inst
=
RC
.
nrrrc
[
ctxt_pP
->
module_id
];
MessageDef
*
message_p
;
size
=
do_RRCReconfiguration
(
ctxt_pP
,
ue_context_pP
,
buffer
,
rrc_gNB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
),
...
...
@@ -557,7 +571,6 @@ rrc_gNB_generate_defaultRRCReconfiguration(
rrc_gNB_mui
,
size
);
#ifdef ITTI_SIM
MessageDef
*
message_p
;
uint8_t
*
message_buffer
;
message_buffer
=
itti_malloc
(
TASK_RRC_GNB_SIM
,
TASK_RRC_UE_SIM
,
size
);
memcpy
(
message_buffer
,
buffer
,
size
);
...
...
@@ -567,6 +580,19 @@ rrc_gNB_generate_defaultRRCReconfiguration(
GNB_RRC_DCCH_DATA_IND
(
message_p
).
size
=
size
;
itti_send_msg_to_task
(
TASK_RRC_UE_SIM
,
ctxt_pP
->
instance
,
message_p
);
#else
// F1AP_DL_RRC_MESSAGE
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
F1AP_DL_RRC_MESSAGE
);
F1AP_DL_RRC_MESSAGE
(
message_p
).
rrc_container
=
buffer
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
rrc_container_length
=
size
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
gNB_CU_ue_id
=
0
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
gNB_DU_ue_id
=
0
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
old_gNB_DU_ue_id
=
0xFFFFFFFF
;
// unknown
F1AP_DL_RRC_MESSAGE
(
message_p
).
rnti
=
ue_context_pP
->
ue_context
.
rnti
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
srb_id
=
DCCH
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
execute_duplication
=
1
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
RAT_frequency_priority_information
.
en_dc
=
0
;
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt_pP
->
module_id
,
message_p
);
#if(0)
nr_rrc_data_req
(
ctxt_pP
,
DCCH
,
rrc_gNB_mui
++
,
...
...
@@ -574,6 +600,7 @@ rrc_gNB_generate_defaultRRCReconfiguration(
size
,
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
#endif
#endif
// rrc_pdcp_config_asn1_req
// rrc_rlc_config_asn1_req
...
...
@@ -1555,6 +1582,8 @@ rrc_gNB_generate_SecurityModeCommand(
{
uint8_t
buffer
[
100
];
uint8_t
size
;
MessageDef
*
message_p
;
T
(
T_ENB_RRC_SECURITY_MODE_COMMAND
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
ctxt_pP
->
frame
),
T_INT
(
ctxt_pP
->
subframe
),
T_INT
(
ctxt_pP
->
rnti
));
NR_IntegrityProtAlgorithm_t
integrity_algorithm
=
(
NR_IntegrityProtAlgorithm_t
)
ue_context_pP
->
ue_context
.
integrity_algorithm
;
...
...
@@ -1588,7 +1617,6 @@ rrc_gNB_generate_SecurityModeCommand(
LOG_I
(
NR_RRC
,
"calling rrc_data_req :securityModeCommand
\n
"
);
#ifdef ITTI_SIM
MessageDef
*
message_p
;
uint8_t
*
message_buffer
;
message_buffer
=
itti_malloc
(
TASK_RRC_GNB_SIM
,
TASK_RRC_UE_SIM
,
size
);
memcpy
(
message_buffer
,
buffer
,
size
);
...
...
@@ -1598,6 +1626,20 @@ rrc_gNB_generate_SecurityModeCommand(
GNB_RRC_DCCH_DATA_IND
(
message_p
).
size
=
size
;
itti_send_msg_to_task
(
TASK_RRC_UE_SIM
,
ctxt_pP
->
instance
,
message_p
);
#else
// F1AP_DL_RRC_MESSAGE
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
F1AP_DL_RRC_MESSAGE
);
F1AP_DL_RRC_MESSAGE
(
message_p
).
rrc_container
=
buffer
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
rrc_container_length
=
size
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
gNB_CU_ue_id
=
0
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
gNB_DU_ue_id
=
0
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
old_gNB_DU_ue_id
=
0xFFFFFFFF
;
// unknown
F1AP_DL_RRC_MESSAGE
(
message_p
).
rnti
=
ue_context_pP
->
ue_context
.
rnti
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
srb_id
=
DCCH
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
execute_duplication
=
1
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
RAT_frequency_priority_information
.
en_dc
=
0
;
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt_pP
->
module_id
,
message_p
);
LOG_D
(
NR_RRC
,
"Send F1AP_DL_RRC_MESSAGE with ITTI
\n
"
);
#if(0)
nr_rrc_data_req
(
ctxt_pP
,
DCCH
,
rrc_gNB_mui
++
,
...
...
@@ -1606,6 +1648,7 @@ rrc_gNB_generate_SecurityModeCommand(
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
#endif
#endif
}
...
...
@@ -1618,6 +1661,8 @@ rrc_gNB_generate_UECapabilityEnquiry(
{
uint8_t
buffer
[
100
];
uint8_t
size
;
MessageDef
*
message_p
;
T
(
T_ENB_RRC_UE_CAPABILITY_ENQUIRY
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
ctxt_pP
->
frame
),
T_INT
(
ctxt_pP
->
subframe
),
T_INT
(
ctxt_pP
->
rnti
));
size
=
do_NR_SA_UECapabilityEnquiry
(
...
...
@@ -1645,7 +1690,6 @@ rrc_gNB_generate_UECapabilityEnquiry(
rrc_gNB_mui
,
size
);
#ifdef ITTI_SIM
MessageDef
*
message_p
;
uint8_t
*
message_buffer
;
message_buffer
=
itti_malloc
(
TASK_RRC_GNB_SIM
,
TASK_RRC_UE_SIM
,
size
);
memcpy
(
message_buffer
,
buffer
,
size
);
...
...
@@ -1655,6 +1699,20 @@ rrc_gNB_generate_UECapabilityEnquiry(
GNB_RRC_DCCH_DATA_IND
(
message_p
).
size
=
size
;
itti_send_msg_to_task
(
TASK_RRC_UE_SIM
,
ctxt_pP
->
instance
,
message_p
);
#else
// F1AP_DL_RRC_MESSAGE
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
F1AP_DL_RRC_MESSAGE
);
F1AP_DL_RRC_MESSAGE
(
message_p
).
rrc_container
=
buffer
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
rrc_container_length
=
size
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
gNB_CU_ue_id
=
0
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
gNB_DU_ue_id
=
0
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
old_gNB_DU_ue_id
=
0xFFFFFFFF
;
// unknown
F1AP_DL_RRC_MESSAGE
(
message_p
).
rnti
=
ue_context_pP
->
ue_context
.
rnti
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
srb_id
=
DCCH
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
execute_duplication
=
1
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
RAT_frequency_priority_information
.
en_dc
=
0
;
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt_pP
->
module_id
,
message_p
);
LOG_D
(
NR_RRC
,
"Send F1AP_DL_RRC_MESSAGE with ITTI
\n
"
);
#if(0)
nr_rrc_data_req
(
ctxt_pP
,
DCCH
,
...
...
@@ -1664,6 +1722,7 @@ rrc_gNB_generate_UECapabilityEnquiry(
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
#endif
#endif
}
//-----------------------------------------------------------------------------
...
...
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
7b859b72
...
...
@@ -57,6 +57,7 @@
#include "RRC/NR/MESSAGES/asn1_msg.h"
#include "NR_UERadioAccessCapabilityInformation.h"
#include "NR_UE-CapabilityRAT-ContainerList.h"
#include "f1ap_messages_types.h"
extern
RAN_CONTEXT_t
RC
;
...
...
@@ -575,6 +576,26 @@ rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(
rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP
(
&
ctxt
,
ue_context_p
);
}
#if(0)
if
(
RC
.
nrrrc
[
ctxt
.
module_id
]
->
node_type
==
ngran_gNB_CU
)
{
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
F1AP_UE_CONTEXT_SETUP_REQ
);
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
rrc_container
=
ue_context_p
->
Srb0
.
Tx_buffer
.
Payload
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
rrc_container_length
=
ue_context_p
->
Srb0
.
Tx_buffer
.
payload_size
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
gNB_CU_ue_id
=
0
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
gNB_DU_ue_id
=
0
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
old_gNB_DU_ue_id
=
0xFFFFFFFF
;
// unknown
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
rnti
=
ue_context_p
->
rnti
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
srb_id
=
CCCH
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
execute_duplication
=
1
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
RAT_frequency_priority_information
.
en_dc
=
0
;
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt_pP
->
module_id
,
message_p
);
LOG_D
(
NR_RRC
,
"Send F1AP_UE_CONTEXT_SETUP_REQ with ITTI
\n
"
);
}
#endif
return
0
;
}
}
...
...
@@ -719,6 +740,8 @@ rrc_gNB_process_NGAP_DOWNLINK_NAS(
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
NULL
;
protocol_ctxt_t
ctxt
;
memset
(
&
ctxt
,
0
,
sizeof
(
protocol_ctxt_t
));
MessageDef
*
message_p
;
ue_initial_id
=
NGAP_DOWNLINK_NAS
(
msg_p
).
ue_initial_id
;
gNB_ue_ngap_id
=
NGAP_DOWNLINK_NAS
(
msg_p
).
gNB_ue_ngap_id
;
ue_context_p
=
rrc_gNB_get_ue_context_from_ngap_ids
(
instance
,
ue_initial_id
,
gNB_ue_ngap_id
);
...
...
@@ -786,7 +809,6 @@ rrc_gNB_process_NGAP_DOWNLINK_NAS(
* switch UL or DL NAS message without RRC piggybacked to SRB2 if active.
*/
#ifdef ITTI_SIM
MessageDef
*
message_p
;
uint8_t
*
message_buffer
;
message_buffer
=
itti_malloc
(
TASK_RRC_GNB_SIM
,
TASK_RRC_UE_SIM
,
length
);
memcpy
(
message_buffer
,
buffer
,
length
);
...
...
@@ -797,6 +819,20 @@ rrc_gNB_process_NGAP_DOWNLINK_NAS(
itti_send_msg_to_task
(
TASK_RRC_UE_SIM
,
instance
,
message_p
);
LOG_I
(
NR_RRC
,
"Send DL NAS message
\n
"
);
#else
// F1AP_DL_RRC_MESSAGE
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
F1AP_DL_RRC_MESSAGE
);
F1AP_DL_RRC_MESSAGE
(
message_p
).
rrc_container
=
buffer
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
rrc_container_length
=
length
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
gNB_CU_ue_id
=
0
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
gNB_DU_ue_id
=
0
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
old_gNB_DU_ue_id
=
0xFFFFFFFF
;
// unknown
F1AP_DL_RRC_MESSAGE
(
message_p
).
rnti
=
ue_context_p
->
ue_context
.
rnti
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
srb_id
=
DCCH
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
execute_duplication
=
1
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
RAT_frequency_priority_information
.
en_dc
=
0
;
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt
.
module_id
,
message_p
);
LOG_D
(
NR_RRC
,
"Send F1AP_DL_RRC_MESSAGE with ITTI
\n
"
);
#if(0)
/* Transfer data to PDCP */
nr_rrc_data_req
(
&
ctxt
,
...
...
@@ -806,6 +842,7 @@ rrc_gNB_process_NGAP_DOWNLINK_NAS(
length
,
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
#endif
#endif
return
(
0
);
}
...
...
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