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
028be9e4
Commit
028be9e4
authored
Oct 22, 2020
by
heshanyun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build error of phy simulator
parent
0312db24
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
18 deletions
+101
-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
+16
-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 @
028be9e4
...
@@ -17,4 +17,5 @@ set ( UE_DEBUG_TRACE False )
...
@@ -17,4 +17,5 @@ set ( UE_DEBUG_TRACE False )
set
(
UE_TIMING_TRACE False
)
set
(
UE_TIMING_TRACE False
)
set
(
USRP_REC_PLAY False
)
set
(
USRP_REC_PLAY False
)
set
(
SKIP_SHARED_LIB_FLAG False
)
set
(
SKIP_SHARED_LIB_FLAG False
)
set
(
PHYSIM True
)
include
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../CMakeLists.txt
)
include
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../CMakeLists.txt
)
openair2/RRC/NR/L2_nr_interface.c
View file @
028be9e4
...
@@ -43,6 +43,77 @@
...
@@ -43,6 +43,77 @@
extern
RAN_CONTEXT_t
RC
;
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
,
int8_t
mac_rrc_nr_data_req
(
const
module_id_t
Mod_idP
,
const
int
CC_id
,
const
int
CC_id
,
const
frame_t
frameP
,
const
frame_t
frameP
,
...
...
openair2/RRC/NR/nr_rrc_proto.h
View file @
028be9e4
...
@@ -116,3 +116,19 @@ void *rrc_gnb_task(void *args_p);
...
@@ -116,3 +116,19 @@ void *rrc_gnb_task(void *args_p);
/* Trigger RRC periodic processing. To be called once per ms. */
/* 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
);
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 @
028be9e4
...
@@ -546,7 +546,7 @@ rrc_gNB_generate_defaultRRCReconfiguration(
...
@@ -546,7 +546,7 @@ rrc_gNB_generate_defaultRRCReconfiguration(
ue_context_pP
->
ue_context
.
rnti
,
ue_context_pP
->
ue_context
.
rnti
,
rrc_gNB_mui
,
rrc_gNB_mui
,
size
);
size
);
rrc_data_req
(
ctxt_pP
,
nr_
rrc_data_req
(
ctxt_pP
,
DCCH
,
DCCH
,
rrc_gNB_mui
++
,
rrc_gNB_mui
++
,
SDU_CONFIRM_NO
,
SDU_CONFIRM_NO
,
...
@@ -577,18 +577,11 @@ rrc_gNB_process_RRCReconfigurationComplete(
...
@@ -577,18 +577,11 @@ rrc_gNB_process_RRCReconfigurationComplete(
NR_SRB_ToAddModList_t
*
SRB_configList
=
ue_context_pP
->
ue_context
.
SRB_configList2
[
xid
];
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_ToReleaseList_t
*
DRB_Release_configList2
=
ue_context_pP
->
ue_context
.
DRB_Release_configList2
[
xid
];
NR_DRB_Identity_t
*
drb_id_p
=
NULL
;
NR_DRB_Identity_t
*
drb_id_p
=
NULL
;
uint8_t
nr_DRB2LCHAN
[
8
];
ue_context_pP
->
ue_context
.
ue_reestablishment_timer
=
0
;
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 */
/* Derive the keys from kgnb */
if
(
DRB_configList
!=
NULL
)
{
if
(
DRB_configList
!=
NULL
)
{
derive_key_up_enc
(
ue_context_pP
->
ue_context
.
ciphering_algorithm
,
derive_key_up_enc
(
ue_context_pP
->
ue_context
.
ciphering_algorithm
,
...
@@ -602,7 +595,7 @@ rrc_gNB_process_RRCReconfigurationComplete(
...
@@ -602,7 +595,7 @@ rrc_gNB_process_RRCReconfigurationComplete(
derive_key_rrc_int
(
ue_context_pP
->
ue_context
.
integrity_algorithm
,
derive_key_rrc_int
(
ue_context_pP
->
ue_context
.
integrity_algorithm
,
ue_context_pP
->
ue_context
.
kgnb
,
ue_context_pP
->
ue_context
.
kgnb
,
&
kRRCint
);
&
kRRCint
);
#endif
/* Refresh SRBs/DRBs */
/* 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_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
),
MSC_AS_TIME_ARGS
(
ctxt_pP
),
...
@@ -649,7 +642,7 @@ rrc_gNB_process_RRCReconfigurationComplete(
...
@@ -649,7 +642,7 @@ rrc_gNB_process_RRCReconfigurationComplete(
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
PROTOCOL_NR_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
if
(
DRB_configList
->
list
.
array
[
i
]
->
pdcp_Config
->
moreThanOneRLC
->
primaryPath
.
logicalChannel
)
{
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
// rrc_mac_config_req_eNB
...
@@ -663,7 +656,7 @@ rrc_gNB_process_RRCReconfigurationComplete(
...
@@ -663,7 +656,7 @@ rrc_gNB_process_RRCReconfigurationComplete(
SRB_FLAG_NO
,
SRB_FLAG_NO
,
MBMS_FLAG_NO
,
MBMS_FLAG_NO
,
CONFIG_ACTION_REMOVE
,
CONFIG_ACTION_REMOVE
,
DRB2LCHAN
[
i
],
nr_
DRB2LCHAN
[
i
],
Rlc_info_um
);
Rlc_info_um
);
}
}
...
@@ -798,7 +791,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
...
@@ -798,7 +791,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
)))
{
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
);
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 */
/* replace rnti in the context */
/* for that, remove the context from the RB tree */
/* for that, remove the context from the RB tree */
...
@@ -1429,7 +1422,7 @@ rrc_gNB_generate_SecurityModeCommand(
...
@@ -1429,7 +1422,7 @@ rrc_gNB_generate_SecurityModeCommand(
size
);
size
);
LOG_I
(
NR_RRC
,
"calling rrc_data_req :securityModeCommand
\n
"
);
LOG_I
(
NR_RRC
,
"calling rrc_data_req :securityModeCommand
\n
"
);
rrc_data_req
(
ctxt_pP
,
nr_
rrc_data_req
(
ctxt_pP
,
DCCH
,
DCCH
,
rrc_gNB_mui
++
,
rrc_gNB_mui
++
,
SDU_CONFIRM_NO
,
SDU_CONFIRM_NO
,
...
@@ -1473,7 +1466,7 @@ rrc_gNB_generate_UECapabilityEnquiry(
...
@@ -1473,7 +1466,7 @@ rrc_gNB_generate_UECapabilityEnquiry(
ue_context_pP
->
ue_context
.
rnti
,
ue_context_pP
->
ue_context
.
rnti
,
rrc_gNB_mui
,
rrc_gNB_mui
,
size
);
size
);
rrc_data_req
(
nr_
rrc_data_req
(
ctxt_pP
,
ctxt_pP
,
DCCH
,
DCCH
,
rrc_gNB_mui
++
,
rrc_gNB_mui
++
,
...
@@ -1533,7 +1526,7 @@ rrc_gNB_generate_RRCConnectionRelease(
...
@@ -1533,7 +1526,7 @@ rrc_gNB_generate_RRCConnectionRelease(
F1AP_UE_CONTEXT_RELEASE_CMD
(
m
).
rrc_container_length
=
size
;
F1AP_UE_CONTEXT_RELEASE_CMD
(
m
).
rrc_container_length
=
size
;
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt_pP
->
module_id
,
m
);
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt_pP
->
module_id
,
m
);
}
else
{
}
else
{
rrc_data_req
(
ctxt_pP
,
nr_
rrc_data_req
(
ctxt_pP
,
DCCH
,
DCCH
,
rrc_gNB_mui
++
,
rrc_gNB_mui
++
,
SDU_CONFIRM_NO
,
SDU_CONFIRM_NO
,
...
...
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
028be9e4
...
@@ -134,6 +134,7 @@ nr_rrc_pdcp_config_security(
...
@@ -134,6 +134,7 @@ nr_rrc_pdcp_config_security(
hashtable_rc_t
h_rc
;
hashtable_rc_t
h_rc
;
hash_key_t
key
;
hash_key_t
key
;
#ifndef PHYSIM
/* Derive the keys from kgnb */
/* Derive the keys from kgnb */
if
(
SRB_configList
!=
NULL
)
{
if
(
SRB_configList
!=
NULL
)
{
derive_key_up_enc
(
ue_context_pP
->
ue_context
.
ciphering_algorithm
,
derive_key_up_enc
(
ue_context_pP
->
ue_context
.
ciphering_algorithm
,
...
@@ -147,6 +148,7 @@ nr_rrc_pdcp_config_security(
...
@@ -147,6 +148,7 @@ nr_rrc_pdcp_config_security(
derive_key_rrc_int
(
ue_context_pP
->
ue_context
.
integrity_algorithm
,
derive_key_rrc_int
(
ue_context_pP
->
ue_context
.
integrity_algorithm
,
ue_context_pP
->
ue_context
.
kgnb
,
ue_context_pP
->
ue_context
.
kgnb
,
&
kRRCint
);
&
kRRCint
);
#endif
if
(
!
IS_SOFTMODEM_IQPLAYER
)
{
if
(
!
IS_SOFTMODEM_IQPLAYER
)
{
SET_LOG_DUMP
(
DEBUG_SECURITY
)
;
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