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
b67badef
Commit
b67badef
authored
Oct 22, 2020
by
heshanyun
Committed by
Xue Song
Oct 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build error of phy simulator
parent
41d3892c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
103 additions
and
18 deletions
+103
-18
cmake_targets/phy_simulators/CMakeLists.txt
cmake_targets/phy_simulators/CMakeLists.txt
+1
-0
openair2/RRC/NR/L2_nr_interface.c
openair2/RRC/NR/L2_nr_interface.c
+72
-1
openair2/RRC/NR/nr_rrc_proto.h
openair2/RRC/NR/nr_rrc_proto.h
+18
-0
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+10
-17
openair2/RRC/NR/rrc_gNB_NGAP.c
openair2/RRC/NR/rrc_gNB_NGAP.c
+2
-0
No files found.
cmake_targets/phy_simulators/CMakeLists.txt
View file @
b67badef
...
...
@@ -16,4 +16,5 @@ set ( UE_DEBUG_TRACE False )
set
(
UE_TIMING_TRACE False
)
set
(
USRP_REC_PLAY False
)
set
(
SKIP_SHARED_LIB_FLAG False
)
set
(
PHYSIM True
)
include
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../CMakeLists.txt
)
openair2/RRC/NR/L2_nr_interface.c
View file @
b67badef
...
...
@@ -43,6 +43,77 @@
extern
RAN_CONTEXT_t
RC
;
int
nr_rrc_mac_remove_ue
(
module_id_t
mod_idP
,
rnti_t
rntiP
){
// todo
return
0
;
}
//------------------------------------------------------------------------------
uint8_t
nr_rrc_data_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
rb_id_t
rb_idP
,
const
mui_t
muiP
,
const
confirm_t
confirmP
,
const
sdu_size_t
sdu_sizeP
,
uint8_t
*
const
buffer_pP
,
const
pdcp_transmission_mode_t
modeP
)
//------------------------------------------------------------------------------
{
if
(
sdu_sizeP
==
255
)
{
LOG_I
(
RRC
,
"sdu_sizeP == 255"
);
return
FALSE
;
}
MSC_LOG_TX_MESSAGE
(
ctxt_pP
->
enb_flag
?
MSC_RRC_ENB
:
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_ARGS
(
ctxt_pP
),
ctxt_pP
->
rnti
,
muiP
,
sdu_sizeP
);
MessageDef
*
message_p
;
// 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_ENB
:
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
).
enb_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
).
eNB_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_ENB
\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
* messages automatically */
if
(
ctxt_pP
->
enb_flag
&&
NODE_IS_CU
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
node_type
))
pdcp_run
(
ctxt_pP
);
return
TRUE
;
// TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
}
int8_t
mac_rrc_nr_data_req
(
const
module_id_t
Mod_idP
,
const
int
CC_id
,
const
frame_t
frameP
,
...
...
@@ -114,4 +185,4 @@ int8_t mac_rrc_nr_data_req(const module_id_t Mod_idP,
return
(
0
);
}
\ No newline at end of file
}
openair2/RRC/NR/nr_rrc_proto.h
View file @
b67badef
...
...
@@ -112,3 +112,21 @@ rrc_gNB_generate_UECapabilityEnquiry(
\param void *args_p Pointer on arguments to start the task. */
void
*
rrc_gnb_task
(
void
*
args_p
);
/* Trigger RRC periodic processing. To be called once per ms. */
void
nr_rrc_trigger
(
protocol_ctxt_t
*
ctxt
,
int
CC_id
,
int
frame
,
int
subframe
);
uint8_t
nr_rrc_data_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
rb_id_t
rb_idP
,
const
mui_t
muiP
,
const
confirm_t
confirmP
,
const
sdu_size_t
sdu_size
,
uint8_t
*
const
buffer_pP
,
const
pdcp_transmission_mode_t
modeP
);
int
nr_rrc_mac_remove_ue
(
module_id_t
mod_idP
,
rnti_t
rntiP
);
openair2/RRC/NR/rrc_gNB.c
View file @
b67badef
...
...
@@ -528,7 +528,7 @@ rrc_gNB_generate_defaultRRCReconfiguration(
ue_context_pP
->
ue_context
.
rnti
,
rrc_gNB_mui
,
size
);
rrc_data_req
(
ctxt_pP
,
nr_
rrc_data_req
(
ctxt_pP
,
DCCH
,
rrc_gNB_mui
++
,
SDU_CONFIRM_NO
,
...
...
@@ -559,18 +559,11 @@ rrc_gNB_process_RRCReconfigurationComplete(
NR_SRB_ToAddModList_t
*
SRB_configList
=
ue_context_pP
->
ue_context
.
SRB_configList2
[
xid
];
NR_DRB_ToReleaseList_t
*
DRB_Release_configList2
=
ue_context_pP
->
ue_context
.
DRB_Release_configList2
[
xid
];
NR_DRB_Identity_t
*
drb_id_p
=
NULL
;
uint8_t
nr_DRB2LCHAN
[
8
];
ue_context_pP
->
ue_context
.
ue_reestablishment_timer
=
0
;
// rnti_t rnti = ue_context_pP->ue_id_rnti;
// module_id_t module_id = ctxt_pP->module_id;
// int UE_id_mac = find_UE_id(module_id, rnti);
// if (UE_id_mac == -1) {
// LOG_E(RRC, "Can't find UE_id(MAC) of UE rnti %x\n", rnti);
// return;
// }
#ifndef PHYSIM
/* Derive the keys from kgnb */
if
(
DRB_configList
!=
NULL
)
{
derive_key_up_enc
(
ue_context_pP
->
ue_context
.
ciphering_algorithm
,
...
...
@@ -584,7 +577,7 @@ rrc_gNB_process_RRCReconfigurationComplete(
derive_key_rrc_int
(
ue_context_pP
->
ue_context
.
integrity_algorithm
,
ue_context_pP
->
ue_context
.
kgnb
,
&
kRRCint
);
#endif
/* Refresh SRBs/DRBs */
MSC_LOG_TX_MESSAGE
(
MSC_RRC_GNB
,
MSC_PDCP_ENB
,
NULL
,
0
,
MSC_AS_TIME_FMT
" CONFIG_REQ UE %x DRB (security unchanged)"
,
MSC_AS_TIME_ARGS
(
ctxt_pP
),
...
...
@@ -656,7 +649,7 @@ rrc_gNB_process_RRCReconfigurationComplete(
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
if
(
DRB_configList
->
list
.
array
[
i
]
->
pdcp_Config
->
moreThanOneRLC
->
primaryPath
.
logicalChannel
)
{
DRB2LCHAN
[
i
]
=
(
uint8_t
)
*
DRB_configList
->
list
.
array
[
i
]
->
pdcp_Config
->
moreThanOneRLC
->
primaryPath
.
logicalChannel
;
nr_
DRB2LCHAN
[
i
]
=
(
uint8_t
)
*
DRB_configList
->
list
.
array
[
i
]
->
pdcp_Config
->
moreThanOneRLC
->
primaryPath
.
logicalChannel
;
}
// rrc_mac_config_req_eNB
...
...
@@ -670,7 +663,7 @@ rrc_gNB_process_RRCReconfigurationComplete(
SRB_FLAG_NO
,
MBMS_FLAG_NO
,
CONFIG_ACTION_REMOVE
,
DRB2LCHAN
[
i
],
nr_
DRB2LCHAN
[
i
],
Rlc_info_um
);
}
...
...
@@ -805,7 +798,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
if
((
ue_context_p
=
rrc_gNB_ue_context_5g_s_tmsi_exist
(
RC
.
nrrrc
[
ctxt_pP
->
module_id
],
s_tmsi_part1
)))
{
LOG_I
(
NR_RRC
,
" 5G-S-TMSI-Part1 exists, ue_context_p %p, old rnti %x => %x
\n
"
,
ue_context_p
,
ue_context_p
->
ue_context
.
rnti
,
ctxt_pP
->
rnti
);
rrc_mac_remove_ue
(
ctxt_pP
->
module_id
,
ue_context_p
->
ue_context
.
rnti
);
nr_
rrc_mac_remove_ue
(
ctxt_pP
->
module_id
,
ue_context_p
->
ue_context
.
rnti
);
/* replace rnti in the context */
/* for that, remove the context from the RB tree */
...
...
@@ -1431,7 +1424,7 @@ rrc_gNB_generate_SecurityModeCommand(
size
);
LOG_I
(
NR_RRC
,
"calling rrc_data_req :securityModeCommand
\n
"
);
rrc_data_req
(
ctxt_pP
,
nr_
rrc_data_req
(
ctxt_pP
,
DCCH
,
rrc_gNB_mui
++
,
SDU_CONFIRM_NO
,
...
...
@@ -1475,7 +1468,7 @@ rrc_gNB_generate_UECapabilityEnquiry(
ue_context_pP
->
ue_context
.
rnti
,
rrc_gNB_mui
,
size
);
rrc_data_req
(
nr_
rrc_data_req
(
ctxt_pP
,
DCCH
,
rrc_gNB_mui
++
,
...
...
@@ -1535,7 +1528,7 @@ rrc_gNB_generate_RRCConnectionRelease(
F1AP_UE_CONTEXT_RELEASE_CMD
(
m
).
rrc_container_length
=
size
;
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt_pP
->
module_id
,
m
);
}
else
{
rrc_data_req
(
ctxt_pP
,
nr_
rrc_data_req
(
ctxt_pP
,
DCCH
,
rrc_gNB_mui
++
,
SDU_CONFIRM_NO
,
...
...
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
b67badef
...
...
@@ -134,6 +134,7 @@ nr_rrc_pdcp_config_security(
hashtable_rc_t
h_rc
;
hash_key_t
key
;
#ifndef PHYSIM
/* Derive the keys from kgnb */
if
(
SRB_configList
!=
NULL
)
{
derive_key_up_enc
(
ue_context_pP
->
ue_context
.
ciphering_algorithm
,
...
...
@@ -147,6 +148,7 @@ nr_rrc_pdcp_config_security(
derive_key_rrc_int
(
ue_context_pP
->
ue_context
.
integrity_algorithm
,
ue_context_pP
->
ue_context
.
kgnb
,
&
kRRCint
);
#endif
if
(
!
IS_SOFTMODEM_IQPLAYER
)
{
SET_LOG_DUMP
(
DEBUG_SECURITY
)
;
}
...
...
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