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
wangjie
OpenXG-RAN
Commits
4ea8b38d
Commit
4ea8b38d
authored
Jan 19, 2021
by
Xue Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
c-plane is ok
parent
133ecd52
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
197 additions
and
102 deletions
+197
-102
openair2/F1AP/f1ap_cu_rrc_message_transfer.c
openair2/F1AP/f1ap_cu_rrc_message_transfer.c
+5
-4
openair2/F1AP/f1ap_cu_ue_context_management.c
openair2/F1AP/f1ap_cu_ue_context_management.c
+19
-2
openair2/F1AP/f1ap_decoder.c
openair2/F1AP/f1ap_decoder.c
+3
-0
openair2/F1AP/f1ap_du_rrc_message_transfer.c
openair2/F1AP/f1ap_du_rrc_message_transfer.c
+44
-48
openair2/F1AP/f1ap_du_ue_context_management.c
openair2/F1AP/f1ap_du_ue_context_management.c
+51
-33
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+71
-13
openair2/RRC/NR/L2_nr_interface.c
openair2/RRC/NR/L2_nr_interface.c
+1
-1
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+3
-1
No files found.
openair2/F1AP/f1ap_cu_rrc_message_transfer.c
View file @
4ea8b38d
...
@@ -199,6 +199,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
...
@@ -199,6 +199,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
f1ap_dl_rrc_message_t
*
f1ap_dl_rrc
)
f1ap_dl_rrc_message_t
*
f1ap_dl_rrc
)
{
{
LOG_D
(
F1AP
,
"CU send DL_RRC_MESSAGE_TRANSFER
\n
"
);
F1AP_F1AP_PDU_t
pdu
;
F1AP_F1AP_PDU_t
pdu
;
F1AP_DLRRCMessageTransfer_t
*
out
;
F1AP_DLRRCMessageTransfer_t
*
out
;
F1AP_DLRRCMessageTransferIEs_t
*
ie
;
F1AP_DLRRCMessageTransferIEs_t
*
ie
;
...
@@ -280,10 +281,10 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
...
@@ -280,10 +281,10 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
OCTET_STRING_fromBuf
(
&
ie
->
value
.
choice
.
RRCContainer
,
(
const
char
*
)
f1ap_dl_rrc
->
rrc_container
,
f1ap_dl_rrc
->
rrc_container_length
);
OCTET_STRING_fromBuf
(
&
ie
->
value
.
choice
.
RRCContainer
,
(
const
char
*
)
f1ap_dl_rrc
->
rrc_container
,
f1ap_dl_rrc
->
rrc_container_length
);
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
//
LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, f1ap_dl_rrc->rrc_container_length);
LOG_I
(
F1AP
,
"%s() RRCContainer size %d: "
,
__func__
,
f1ap_dl_rrc
->
rrc_container_length
);
//
for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
for
(
int
i
=
0
;
i
<
ie
->
value
.
choice
.
RRCContainer
.
size
;
i
++
)
//
printf("%02x ", f1ap_dl_rrc->rrc_container[i]);
printf
(
"%02x "
,
f1ap_dl_rrc
->
rrc_container
[
i
]);
//
printf("\n");
printf
(
"
\n
"
);
/* optional */
/* optional */
/* c7. RAT_FrequencyPriorityInformation */
/* c7. RAT_FrequencyPriorityInformation */
...
...
openair2/F1AP/f1ap_cu_ue_context_management.c
View file @
4ea8b38d
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
extern
f1ap_setup_req_t
*
f1ap_du_data_from_du
;
extern
f1ap_setup_req_t
*
f1ap_du_data_from_du
;
extern
f1ap_cudu_inst_t
f1ap_cu_inst
[
MAX_eNB
];
extern
f1ap_cudu_inst_t
f1ap_cu_inst
[
MAX_eNB
];
extern
RAN_CONTEXT_t
RC
;
extern
RAN_CONTEXT_t
RC
;
extern
uint32_t
f1ap_assoc_id
;
int
CU_send_UE_CONTEXT_SETUP_REQUEST
(
instance_t
instance
,
int
CU_send_UE_CONTEXT_SETUP_REQUEST
(
instance_t
instance
,
f1ap_ue_context_setup_req_t
*
f1ap_ue_context_setup_req
)
{
f1ap_ue_context_setup_req_t
*
f1ap_ue_context_setup_req
)
{
...
@@ -150,7 +151,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
...
@@ -150,7 +151,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
if
(
0
)
{
/* mandatory */
/* mandatory */
/* c7. Candidate_SpCell_List */
/* c7. Candidate_SpCell_List */
ie
=
(
F1AP_UEContextSetupRequestIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_UEContextSetupRequestIEs_t
));
ie
=
(
F1AP_UEContextSetupRequestIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_UEContextSetupRequestIEs_t
));
...
@@ -696,7 +697,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
...
@@ -696,7 +697,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
}
}
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
}
/* OPTIONAL */
/* OPTIONAL */
/* InactivityMonitoringRequest */
/* InactivityMonitoringRequest */
if
(
0
)
{
if
(
0
)
{
...
@@ -754,6 +755,22 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
...
@@ -754,6 +755,22 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
return
-
1
;
return
-
1
;
}
}
// xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, (void *)pdu);
// asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
// res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
// buffer = res.buffer;
// len = res.result.encoded;
// if (res.result.encoded <= 0) {
// LOG_E(F1AP, "ASN1 message encoding failed (%s, %lu)!\n", res.result.failed_type->name, res.result.encoded);
// return -1;
// }
LOG_D
(
F1AP
,
"F1AP UEContextSetupRequest Encoded %zd bits
\n
"
,
len
);
cu_f1ap_itti_send_sctp_data_req
(
instance
,
f1ap_assoc_id
/* BK: fix me*/
,
buffer
,
len
,
0
/* BK: fix me*/
);
return
0
;
return
0
;
}
}
...
...
openair2/F1AP/f1ap_decoder.c
View file @
4ea8b38d
...
@@ -69,6 +69,9 @@ static int f1ap_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
...
@@ -69,6 +69,9 @@ static int f1ap_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
case
F1AP_ProcedureCode_id_UEContextReleaseRequest
:
case
F1AP_ProcedureCode_id_UEContextReleaseRequest
:
LOG_I
(
F1AP
,
"%s(): F1AP_ProcedureCode_id_UEContextReleaseRequest
\n
"
,
__func__
);
LOG_I
(
F1AP
,
"%s(): F1AP_ProcedureCode_id_UEContextReleaseRequest
\n
"
,
__func__
);
break
;
break
;
case
F1AP_ProcedureCode_id_UEContextSetup
:
LOG_I
(
F1AP
,
"%s(): F1AP_ProcedureCode_id_UEContextSetup
\n
"
,
__func__
);
break
;
// case F1AP_ProcedureCode_id_InitialContextSetup:
// case F1AP_ProcedureCode_id_InitialContextSetup:
// res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
// res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
// message_id = F1AP_INITIAL_CONTEXT_SETUP_LOG;
// message_id = F1AP_INITIAL_CONTEXT_SETUP_LOG;
...
...
openair2/F1AP/f1ap_du_rrc_message_transfer.c
View file @
4ea8b38d
...
@@ -1350,12 +1350,6 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
...
@@ -1350,12 +1350,6 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
break
;
break
;
}
// switch case
}
// switch case
/* for rfsim */
mem_block_t
*
memblock
;
memblock
=
get_free_mem_block
(
rrc_dl_sdu_len
,
__FUNCTION__
);
memcpy
(
memblock
->
data
,
ie
->
value
.
choice
.
RRCContainer
.
buf
,
rrc_dl_sdu_len
);
du_rlc_data_req
(
&
ctxt
,
1
,
0x00
,
1
,
1
,
0
,
rrc_dl_sdu_len
,
memblock
);
return
(
0
);
}
else
if
(
srb_id
==
1
)
{
}
else
if
(
srb_id
==
1
)
{
NR_DL_DCCH_Message_t
*
dl_dcch_msg
=
NULL
;
NR_DL_DCCH_Message_t
*
dl_dcch_msg
=
NULL
;
...
@@ -1363,8 +1357,8 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
...
@@ -1363,8 +1357,8 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
dec_rval
=
uper_decode
(
NULL
,
dec_rval
=
uper_decode
(
NULL
,
&
asn_DEF_NR_DL_DCCH_Message
,
&
asn_DEF_NR_DL_DCCH_Message
,
(
void
**
)
&
dl_dcch_msg
,
(
void
**
)
&
dl_dcch_msg
,
&
ie
->
value
.
choice
.
RRCContainer
.
buf
[
1
],
// buf[0] includes the pdcp header
&
ie
->
value
.
choice
.
RRCContainer
.
buf
[
2
],
// buf[0] includes the pdcp header
rrc_dl_sdu_len
,
0
,
0
);
rrc_dl_sdu_len
-
6
,
0
,
0
);
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
LOG_E
(
F1AP
,
" Failed to decode DL-DCCH (%zu bytes)
\n
"
,
dec_rval
.
consumed
);
LOG_E
(
F1AP
,
" Failed to decode DL-DCCH (%zu bytes)
\n
"
,
dec_rval
.
consumed
);
...
@@ -1490,7 +1484,7 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
...
@@ -1490,7 +1484,7 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
}
}
LOG_I
(
F1AP
,
"Received DL RRC Transfer on srb_id %ld
\n
"
,
srb_id
);
LOG_I
(
F1AP
,
"Received DL RRC Transfer on srb_id %ld
\n
"
,
srb_id
);
#if(0)
rlc_op_status_t
rlc_status
;
rlc_op_status_t
rlc_status
;
boolean_t
ret
=
TRUE
;
boolean_t
ret
=
TRUE
;
mem_block_t
*
pdcp_pdu_p
=
NULL
;
mem_block_t
*
pdcp_pdu_p
=
NULL
;
...
@@ -1508,45 +1502,47 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
...
@@ -1508,45 +1502,47 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
memset
(
pdcp_pdu_p
->
data
,
0
,
rrc_dl_sdu_len
);
memset
(
pdcp_pdu_p
->
data
,
0
,
rrc_dl_sdu_len
);
memcpy
(
&
pdcp_pdu_p
->
data
[
0
],
ie
->
value
.
choice
.
RRCContainer
.
buf
,
rrc_dl_sdu_len
);
memcpy
(
&
pdcp_pdu_p
->
data
[
0
],
ie
->
value
.
choice
.
RRCContainer
.
buf
,
rrc_dl_sdu_len
);
rlc_status
=
rlc_data_req
(
&
ctxt
/* for rfsim */
,
1
du_rlc_data_req
(
&
ctxt
,
1
,
0x00
,
1
,
1
,
0
,
rrc_dl_sdu_len
,
pdcp_pdu_p
);
,
MBMS_FLAG_NO
// rlc_status = rlc_data_req(&ctxt
,
srb_id
// , 1
,
0
// , MBMS_FLAG_NO
,
0
// , srb_id
,
rrc_dl_sdu_len
// , 0
,
pdcp_pdu_p
// , 0
,
NULL
// , rrc_dl_sdu_len
,
NULL
// , pdcp_pdu_p
);
// ,NULL
switch
(
rlc_status
)
{
// ,NULL
case
RLC_OP_STATUS_OK
:
// );
//LOG_I(F1AP, "Data sending request over RLC succeeded!\n");
// switch (rlc_status) {
ret
=
TRUE
;
// case RLC_OP_STATUS_OK:
break
;
// //LOG_I(F1AP, "Data sending request over RLC succeeded!\n");
// ret=TRUE;
case
RLC_OP_STATUS_BAD_PARAMETER
:
// break;
LOG_W
(
F1AP
,
"Data sending request over RLC failed with 'Bad Parameter' reason!
\n
"
);
ret
=
FALSE
;
// case RLC_OP_STATUS_BAD_PARAMETER:
break
;
// LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
// ret= FALSE;
case
RLC_OP_STATUS_INTERNAL_ERROR
:
// break;
LOG_W
(
F1AP
,
"Data sending request over RLC failed with 'Internal Error' reason!
\n
"
);
ret
=
FALSE
;
// case RLC_OP_STATUS_INTERNAL_ERROR:
break
;
// LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
// ret= FALSE;
case
RLC_OP_STATUS_OUT_OF_RESSOURCES
:
// break;
LOG_W
(
F1AP
,
"Data sending request over RLC failed with 'Out of Resources' reason!
\n
"
);
ret
=
FALSE
;
// case RLC_OP_STATUS_OUT_OF_RESSOURCES:
break
;
// LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
// ret= FALSE;
default:
// break;
LOG_W
(
F1AP
,
"RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)
\n
"
,
rlc_status
);
ret
=
FALSE
;
// default:
break
;
// LOG_W(F1AP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
}
// switch case
// ret= FALSE;
return
ret
;
// break;
// } // switch case
// return ret;
}
// if pdcp_pdu_p
}
// if pdcp_pdu_p
#endif
return
0
;
return
0
;
}
}
openair2/F1AP/f1ap_du_ue_context_management.c
View file @
4ea8b38d
...
@@ -118,6 +118,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
...
@@ -118,6 +118,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* SRBs_ToBeSetup_List */
/* SRBs_ToBeSetup_List */
/* DRBs_ToBeSetup_List */
/* DRBs_ToBeSetup_List */
/* Decode DRBs_ToBeSetup_List */
/* Decode DRBs_ToBeSetup_List */
if
(
0
)
{
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupRequestIEs_t
,
ie
,
container
,
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupRequestIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_DRBs_ToBeSetup_List
,
true
);
F1AP_ProtocolIE_ID_id_DRBs_ToBeSetup_List
,
true
);
f1ap_ue_context_setup_req
->
drbs_to_be_setup_length
=
ie
->
value
.
choice
.
DRBs_ToBeSetup_List
.
list
.
count
;
f1ap_ue_context_setup_req
->
drbs_to_be_setup_length
=
ie
->
value
.
choice
.
DRBs_ToBeSetup_List
.
list
.
count
;
...
@@ -151,7 +152,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
...
@@ -151,7 +152,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
break
;
break
;
}
}
}
}
}
/* RRCContainer */
/* RRCContainer */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupRequestIEs_t
,
ie
,
container
,
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_UEContextSetupRequestIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_RRCContainer
,
false
);
F1AP_ProtocolIE_ID_id_RRCContainer
,
false
);
...
@@ -163,7 +164,24 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
...
@@ -163,7 +164,24 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
LOG_E
(
F1AP
,
"can't find RRCContainer in UEContextSetupRequestIEs by id %ld
\n
"
,
F1AP_ProtocolIE_ID_id_RRCContainer
);
LOG_E
(
F1AP
,
"can't find RRCContainer in UEContextSetupRequestIEs by id %ld
\n
"
,
F1AP_ProtocolIE_ID_id_RRCContainer
);
}
}
AssertFatal
(
0
,
"check configuration, send to appropriate handler
\n
"
);
// AssertFatal(0, "check configuration, send to appropriate handler\n");
protocol_ctxt_t
ctxt
;
// ctxt.rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], ie->value.choice.GNB_DU_UE_F1AP_ID);
ctxt
.
rnti
=
0x1234
;
ctxt
.
module_id
=
instance
;
ctxt
.
instance
=
instance
;
ctxt
.
enb_flag
=
1
;
mem_block_t
*
pdcp_pdu_p
=
NULL
;
pdcp_pdu_p
=
get_free_mem_block
(
ie
->
value
.
choice
.
RRCContainer
.
size
,
__func__
);
if
(
pdcp_pdu_p
!=
NULL
)
{
memset
(
pdcp_pdu_p
->
data
,
0
,
ie
->
value
.
choice
.
RRCContainer
.
size
);
memcpy
(
&
pdcp_pdu_p
->
data
[
0
],
ie
->
value
.
choice
.
RRCContainer
.
buf
,
ie
->
value
.
choice
.
RRCContainer
.
size
);
/* for rfsim */
du_rlc_data_req
(
&
ctxt
,
1
,
0x00
,
1
,
1
,
0
,
ie
->
value
.
choice
.
RRCContainer
.
size
,
pdcp_pdu_p
);
}
return
0
;
return
0
;
}
}
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
4ea8b38d
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include "NR_RLC-BearerConfig.h"
#include "NR_RLC-BearerConfig.h"
#include "NR_RLC-Config.h"
#include "NR_RLC-Config.h"
#include "NR_CellGroupConfig.h"
#include "NR_CellGroupConfig.h"
#include "NR_DL-DCCH-Message.h"
#include "openair2/RRC/NR/nr_rrc_proto.h"
#include "openair2/RRC/NR/nr_rrc_proto.h"
/* from OAI */
/* from OAI */
...
@@ -47,6 +48,7 @@ static uint64_t pdcp_optmask;
...
@@ -47,6 +48,7 @@ static uint64_t pdcp_optmask;
#include "common/ran_context.h"
#include "common/ran_context.h"
extern
RAN_CONTEXT_t
RC
;
extern
RAN_CONTEXT_t
RC
;
extern
ngran_node_t
node_type
;
extern
ngran_node_t
node_type
;
uint8_t
first_dcch
=
0
;
/****************************************************************************/
/****************************************************************************/
/* rlc_data_req queue - begin */
/* rlc_data_req queue - begin */
...
@@ -676,9 +678,47 @@ printf("!!!!!!! deliver_pdu_srb (srb %d) calling rlc_data_req size %d: ", srb_id
...
@@ -676,9 +678,47 @@ printf("!!!!!!! deliver_pdu_srb (srb %d) calling rlc_data_req size %d: ", srb_id
//for (i = 0; i < size; i++) printf(" %2.2x", (unsigned char)memblock->data[i]);
//for (i = 0; i < size; i++) printf(" %2.2x", (unsigned char)memblock->data[i]);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
if
(
NODE_IS_CU
(
RC
.
nrrrc
[
0
]
->
node_type
))
{
if
(
NODE_IS_CU
(
RC
.
nrrrc
[
0
]
->
node_type
))
{
NR_DL_DCCH_Message_t
*
dl_dcch_msg
=
NULL
;
asn_dec_rval_t
dec_rval
;
MessageDef
*
message_p
;
MessageDef
*
message_p
;
uint8_t
*
message_buffer
;
message_buffer
=
itti_malloc
(
TASK_PDCP_ENB
,
TASK_CU_F1
,
size
);
memcpy
(
message_buffer
,
buf
,
size
);
if
(
first_dcch
==
1
)
{
dec_rval
=
uper_decode
(
NULL
,
&
asn_DEF_NR_DL_DCCH_Message
,
(
void
**
)
&
dl_dcch_msg
,
&
buf
[
2
],
size
-
6
,
0
,
0
);
if
(
dec_rval
.
code
==
RC_OK
)
{
if
(
dl_dcch_msg
->
message
.
choice
.
c1
->
present
==
NR_DL_DCCH_MessageType__c1_PR_securityModeCommand
)
{
LOG_I
(
PDCP
,
"CU send securityModeCommand by F1AP_UE_CONTEXT_SETUP_REQ
\n
"
);
message_p
=
itti_alloc_new_message
(
TASK_PDCP_ENB
,
F1AP_UE_CONTEXT_SETUP_REQ
);
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
rrc_container
=
message_buffer
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
rrc_container_length
=
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
).
rnti
=
ue
->
rnti
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
mcc
=
RC
.
nrrrc
[
0
]
->
configuration
.
mcc
[
0
];
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
mnc
=
RC
.
nrrrc
[
0
]
->
configuration
.
mnc
[
0
];
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
mnc_digit_length
=
RC
.
nrrrc
[
0
]
->
configuration
.
mnc_digit_length
[
0
];
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
nr_cellid
=
RC
.
nrrrc
[
0
]
->
nr_cellid
;
// for rfsim
f1ap_drb_to_be_setup_t
drb
;
drb
.
drb_id
=
1
;
drb
.
up_ul_tnl
[
0
].
tl_address
=
inet_addr
(
"127.0.0.3"
);
drb
.
up_ul_tnl
[
0
].
gtp_teid
=
0
;
drb
.
up_ul_tnl_length
=
sizeof
(
drb
.
up_ul_tnl
);
drb
.
rlc_mode
=
RLC_MODE_AM
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup_length
=
1
;
F1AP_UE_CONTEXT_SETUP_REQ
(
message_p
).
drbs_to_be_setup
=
&
drb
;
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt
.
module_id
,
message_p
);
}
else
{
LOG_I
(
PDCP
,
"other NR_DL_DCCH_Message
\n
"
);
message_p
=
itti_alloc_new_message
(
TASK_PDCP_ENB
,
F1AP_DL_RRC_MESSAGE
);
message_p
=
itti_alloc_new_message
(
TASK_PDCP_ENB
,
F1AP_DL_RRC_MESSAGE
);
F1AP_DL_RRC_MESSAGE
(
message_p
).
rrc_container
=
buf
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
rrc_container
=
message_buffer
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
rrc_container_length
=
size
;
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_CU_ue_id
=
0
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
gNB_DU_ue_id
=
0
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
gNB_DU_ue_id
=
0
;
...
@@ -688,6 +728,24 @@ printf("\n");
...
@@ -688,6 +728,24 @@ printf("\n");
F1AP_DL_RRC_MESSAGE
(
message_p
).
execute_duplication
=
1
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
execute_duplication
=
1
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
RAT_frequency_priority_information
.
en_dc
=
0
;
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
);
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt
.
module_id
,
message_p
);
}
}
else
{
LOG_E
(
PDCP
,
"error NR_DL_DCCH_Message
\n
"
);
}
}
else
{
first_dcch
=
1
;
message_p
=
itti_alloc_new_message
(
TASK_PDCP_ENB
,
F1AP_DL_RRC_MESSAGE
);
F1AP_DL_RRC_MESSAGE
(
message_p
).
rrc_container
=
message_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
->
rnti
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
srb_id
=
srb_id
;
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
);
}
}
else
{
}
else
{
enqueue_rlc_data_req
(
&
ctxt
,
1
,
MBMS_FLAG_NO
,
srb_id
,
sdu_id
,
0
,
size
,
memblock
,
NULL
,
NULL
);
enqueue_rlc_data_req
(
&
ctxt
,
1
,
MBMS_FLAG_NO
,
srb_id
,
sdu_id
,
0
,
size
,
memblock
,
NULL
,
NULL
);
}
}
...
@@ -922,7 +980,7 @@ boolean_t nr_rrc_pdcp_config_asn1_req(
...
@@ -922,7 +980,7 @@ boolean_t nr_rrc_pdcp_config_asn1_req(
}
}
}
}
if
(
drb2add_list
!=
NULL
)
{
if
(
(
drb2add_list
!=
NULL
)
&&
(
rlc_bearer2add_list
!=
NULL
)
)
{
for
(
i
=
0
;
i
<
drb2add_list
->
list
.
count
;
i
++
)
{
for
(
i
=
0
;
i
<
drb2add_list
->
list
.
count
;
i
++
)
{
add_drb
(
rnti
,
drb2add_list
->
list
.
array
[
i
],
rlc_bearer2add_list
->
list
.
array
[
i
]
->
rlc_Config
);
add_drb
(
rnti
,
drb2add_list
->
list
.
array
[
i
],
rlc_bearer2add_list
->
list
.
array
[
i
]
->
rlc_Config
);
}
}
...
...
openair2/RRC/NR/L2_nr_interface.c
View file @
4ea8b38d
...
@@ -103,7 +103,7 @@ nr_rrc_data_req(
...
@@ -103,7 +103,7 @@ nr_rrc_data_req(
ctxt_pP
->
enb_flag
?
TASK_PDCP_ENB
:
TASK_PDCP_UE
,
ctxt_pP
->
enb_flag
?
TASK_PDCP_ENB
:
TASK_PDCP_UE
,
ctxt_pP
->
instance
,
ctxt_pP
->
instance
,
message_p
);
message_p
);
LOG_I
(
NR_RRC
,
"sen
t RRC_DCCH_DATA_REQ to TASK_PDCP_ENB
\n
"
);
LOG_I
(
NR_RRC
,
"sen
d RRC_DCCH_DATA_REQ to PDCP
\n
"
);
/* Hack: only trigger PDCP if in CU, otherwise it is triggered by RU threads
/* 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
* Ideally, PDCP would not neet to be triggered like this but react to ITTI
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
4ea8b38d
...
@@ -1012,12 +1012,14 @@ rrc_gNB_process_RRCReconfigurationComplete(
...
@@ -1012,12 +1012,14 @@ rrc_gNB_process_RRCReconfigurationComplete(
NULL
,
NULL
,
NULL
);
NULL
);
/* Refresh SRBs/DRBs */
/* Refresh SRBs/DRBs */
if
(
!
NODE_IS_CU
(
RC
.
nrrrc
[
ctxt_pP
->
module_id
]
->
node_type
))
{
nr_rrc_rlc_config_asn1_req
(
ctxt_pP
,
nr_rrc_rlc_config_asn1_req
(
ctxt_pP
,
SRB_configList
,
// NULL,
SRB_configList
,
// NULL,
DRB_configList
,
DRB_configList
,
DRB_Release_configList2
,
DRB_Release_configList2
,
NULL
,
NULL
,
NULL
);
NULL
);
}
#endif
#endif
/* Set the SRB active in UE context */
/* Set the SRB active in UE context */
...
...
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