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
lizhongxiao
OpenXG-RAN
Commits
96e0e7a3
Commit
96e0e7a3
authored
Oct 17, 2023
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create-rrc-to-mac-thread-queue
parent
bba14188
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
17 deletions
+55
-17
executables/nr-ue.c
executables/nr-ue.c
+1
-0
openair2/COMMON/rrc_messages_def.h
openair2/COMMON/rrc_messages_def.h
+4
-1
openair2/COMMON/rrc_messages_types.h
openair2/COMMON/rrc_messages_types.h
+7
-0
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+1
-0
openair2/RRC/NR_UE/L2_interface_ue.c
openair2/RRC/NR_UE/L2_interface_ue.c
+31
-0
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+11
-16
No files found.
executables/nr-ue.c
View file @
96e0e7a3
...
@@ -599,6 +599,7 @@ nr_phy_data_t UE_dl_preprocessing(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc)
...
@@ -599,6 +599,7 @@ nr_phy_data_t UE_dl_preprocessing(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc)
UE
->
target_Nid_cell
=
-
1
;
UE
->
target_Nid_cell
=
-
1
;
}
}
nr_mac_process_rrc_msg
(
0
);
/* send tick to RLC and PDCP every ms */
/* send tick to RLC and PDCP every ms */
if
(
proc
->
nr_slot_rx
%
UE
->
frame_parms
.
slots_per_subframe
==
0
)
{
if
(
proc
->
nr_slot_rx
%
UE
->
frame_parms
.
slots_per_subframe
==
0
)
{
void
nr_rlc_tick
(
int
frame
,
int
subframe
);
void
nr_rlc_tick
(
int
frame
,
int
subframe
);
...
...
openair2/COMMON/rrc_messages_def.h
View file @
96e0e7a3
...
@@ -76,7 +76,10 @@ MESSAGE_DEF(NAS_CONN_RELEASE_IND, MESSAGE_PRIORITY_MED, NasConnRelea
...
@@ -76,7 +76,10 @@ MESSAGE_DEF(NAS_CONN_RELEASE_IND, MESSAGE_PRIORITY_MED, NasConnRelea
MESSAGE_DEF
(
NAS_UPLINK_DATA_CNF
,
MESSAGE_PRIORITY_MED
,
NasUlDataCnf
,
nas_ul_data_cnf
)
MESSAGE_DEF
(
NAS_UPLINK_DATA_CNF
,
MESSAGE_PRIORITY_MED
,
NasUlDataCnf
,
nas_ul_data_cnf
)
MESSAGE_DEF
(
NAS_DOWNLINK_DATA_IND
,
MESSAGE_PRIORITY_MED
,
NasDlDataInd
,
nas_dl_data_ind
)
MESSAGE_DEF
(
NAS_DOWNLINK_DATA_IND
,
MESSAGE_PRIORITY_MED
,
NasDlDataInd
,
nas_dl_data_ind
)
// eNB: realtime -> RRC messages
// NR UE: RRC -> NAS messages
MESSAGE_DEF
(
MAC_MIB_REQ
,
MESSAGE_PRIORITY_MED
,
mac_mib_req_t
,
macMibReq
)
// xNB: realtime -> RRC messages
MESSAGE_DEF
(
RRC_SUBFRAME_PROCESS
,
MESSAGE_PRIORITY_MED
,
RrcSubframeProcess
,
rrc_subframe_process
)
MESSAGE_DEF
(
RRC_SUBFRAME_PROCESS
,
MESSAGE_PRIORITY_MED
,
RrcSubframeProcess
,
rrc_subframe_process
)
MESSAGE_DEF
(
NRRRC_FRAME_PROCESS
,
MESSAGE_PRIORITY_MED
,
NRRrcFrameProcess
,
nr_rrc_frame_process
)
MESSAGE_DEF
(
NRRRC_FRAME_PROCESS
,
MESSAGE_PRIORITY_MED
,
NRRrcFrameProcess
,
nr_rrc_frame_process
)
...
...
openair2/COMMON/rrc_messages_types.h
View file @
96e0e7a3
...
@@ -459,4 +459,11 @@ typedef struct rlc_sdu_indication_s {
...
@@ -459,4 +459,11 @@ typedef struct rlc_sdu_indication_s {
int
message_id
;
int
message_id
;
}
RlcSduIndication
;
}
RlcSduIndication
;
typedef
struct
{
instance_t
module_id
;
int
cc_idP
;
void
*
mib
;
int
sched_sib
;
}
mac_mib_req_t
;
#endif
/* RRC_MESSAGES_TYPES_H_ */
#endif
/* RRC_MESSAGES_TYPES_H_ */
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
96e0e7a3
...
@@ -416,5 +416,6 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
...
@@ -416,5 +416,6 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
RAR_grant_t
*
rar_grant
,
RAR_grant_t
*
rar_grant
,
uint16_t
rnti
,
uint16_t
rnti
,
const
nr_dci_format_t
*
dci_format
);
const
nr_dci_format_t
*
dci_format
);
void
nr_mac_process_rrc_msg
(
instance_t
instance
);
#endif
#endif
/** @}*/
/** @}*/
openair2/RRC/NR_UE/L2_interface_ue.c
View file @
96e0e7a3
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#include "rrc_vars.h"
#include "rrc_vars.h"
#include "MAC/mac.h"
#include "MAC/mac.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac.h"
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
typedef
uint32_t
channel_t
;
typedef
uint32_t
channel_t
;
...
@@ -155,6 +156,36 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP,
...
@@ -155,6 +156,36 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP,
return
0
;
return
0
;
}
}
void
nr_mac_process_rrc_msg
(
instance_t
instance
)
{
MessageDef
*
msg
;
do
{
// Checks if a message has been sent to MAC sub-task
itti_poll_msg
(
TASK_MAC_UE
,
&
msg
);
if
(
!
msg
)
return
;
LOG_I
(
NR_MAC
,
"Received %s from %s: instance %ld
\n
"
,
ITTI_MSG_NAME
(
msg
),
ITTI_MSG_ORIGIN_NAME
(
msg
),
ITTI_MSG_DESTINATION_INSTANCE
(
msg
));
switch
(
ITTI_MSG_ID
(
msg
))
{
case
MAC_MIB_REQ
:
{
mac_mib_req_t
*
req
=
&
msg
->
ittiMsg
.
macMibReq
;
nr_rrc_mac_config_req_mib
(
req
->
module_id
,
req
->
cc_idP
,
req
->
mib
,
req
->
sched_sib
);
}
break
;
default:
LOG_E
(
NR_MAC
,
"Received unexpected message %s
\n
"
,
ITTI_MSG_NAME
(
msg
));
break
;
}
int
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
msg
),
msg
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
}
while
(
msg
!=
NULL
);
}
void
nr_mac_rrc_ra_ind
(
const
module_id_t
mod_id
,
int
frame
,
bool
success
)
void
nr_mac_rrc_ra_ind
(
const
module_id_t
mod_id
,
int
frame
,
bool
success
)
{
{
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_MAC_UE
,
0
,
NR_RRC_MAC_RA_IND
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_MAC_UE
,
0
,
NR_RRC_MAC_RA_IND
);
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
96e0e7a3
...
@@ -351,21 +351,6 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* uecap_file, char* reconfig_fi
...
@@ -351,21 +351,6 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* uecap_file, char* reconfig_fi
return
NR_UE_rrc_inst
;
return
NR_UE_rrc_inst
;
}
}
int8_t
nr_ue_process_secondary_cell_list
(
NR_CellGroupConfig_t
*
cell_group_config
){
return
0
;
}
int8_t
nr_ue_process_mac_cell_group_config
(
NR_MAC_CellGroupConfig_t
*
mac_cell_group_config
){
return
0
;
}
int8_t
nr_ue_process_physical_cell_group_config
(
NR_PhysicalCellGroupConfig_t
*
phy_cell_group_config
){
return
0
;
}
bool
check_si_validity
(
NR_UE_RRC_SI_INFO
*
SI_info
,
int
si_type
)
bool
check_si_validity
(
NR_UE_RRC_SI_INFO
*
SI_info
,
int
si_type
)
{
{
switch
(
si_type
)
{
switch
(
si_type
)
{
...
@@ -478,7 +463,17 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(const module_id_t module_id, const u
...
@@ -478,7 +463,17 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(const module_id_t module_id, const u
// to schedule MAC to get SI if required
// to schedule MAC to get SI if required
get_sib
=
check_si_status
(
SI_info
);
get_sib
=
check_si_status
(
SI_info
);
}
}
nr_rrc_mac_config_req_mib
(
module_id
,
0
,
NR_UE_rrc_inst
[
module_id
].
mib
,
get_sib
);
NR_BCCH_BCH_Message_t
*
reDecode
=
NULL
;
uper_decode_complete
(
NULL
,
&
asn_DEF_NR_BCCH_BCH_Message
,
(
void
**
)
&
reDecode
,
(
const
void
*
)
bufferP
,
buffer_len
);
MessageDef
*
msg
=
itti_alloc_new_message
(
TASK_RRC_NRUE
,
0
,
MAC_MIB_REQ
);
mac_mib_req_t
*
req
=
&
msg
->
ittiMsg
.
macMibReq
;
req
->
module_id
=
module_id
;
req
->
cc_idP
=
0
;
req
->
mib
=
reDecode
->
message
.
choice
.
mib
;
req
->
sched_sib
=
get_sib
;
itti_send_msg_to_task
(
TASK_MAC_UE
,
module_id
,
msg
);
reDecode
->
message
.
choice
.
mib
=
NULL
;
ASN_STRUCT_FREE
(
asn_DEF_NR_BCCH_BCH_Message
,
reDecode
);
ret
=
0
;
ret
=
0
;
}
}
ASN_STRUCT_FREE
(
asn_DEF_NR_BCCH_BCH_Message
,
bcch_message
);
ASN_STRUCT_FREE
(
asn_DEF_NR_BCCH_BCH_Message
,
bcch_message
);
...
...
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