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
zzha zzha
OpenXG-RAN
Commits
8e4ff595
Commit
8e4ff595
authored
Nov 10, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/fix-no-f1uedata-when-in-mac' into integration_2023_w44
parents
45dd4813
31ed25ac
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
20 deletions
+44
-20
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+30
-3
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+1
-0
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
+9
-12
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+4
-5
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
8e4ff595
...
@@ -2809,6 +2809,34 @@ int nr_mac_enable_ue_rrc_processing_timer(gNB_MAC_INST *mac, NR_UE_info_t *UE, b
...
@@ -2809,6 +2809,34 @@ int nr_mac_enable_ue_rrc_processing_timer(gNB_MAC_INST *mac, NR_UE_info_t *UE, b
return
0
;
return
0
;
}
}
void
nr_mac_release_ue
(
gNB_MAC_INST
*
mac
,
int
rnti
)
{
NR_SCHED_ENSURE_LOCKED
(
&
mac
->
sched_lock
);
nr_rlc_remove_ue
(
rnti
);
mac_remove_nr_ue
(
mac
,
rnti
);
// the CU might not know such UE, e.g., because we never sent a message to
// it, so there might not be a corresponding entry for such UE in the look up
// table. This can happen, e.g., on Msg.3 with C-RNTI, where we create a UE
// MAC context, decode the PDU, find the C-RNTI MAC CE, and then throw the
// newly created context away. See also in _nr_rx_sdu() and commit 93f59a3c6e56f
if
(
du_exists_f1_ue_data
(
rnti
))
{
// unlock the scheduler temporarily to prevent possible deadlocks with
// du_remove_f1_ue_data() (and also while sending the message to RRC)
NR_SCHED_UNLOCK
(
&
mac
->
sched_lock
);
f1_ue_data_t
ue_data
=
du_get_f1_ue_data
(
rnti
);
f1ap_ue_context_release_complete_t
complete
=
{
.
gNB_CU_ue_id
=
ue_data
.
secondary_ue
,
.
gNB_DU_ue_id
=
rnti
,
};
mac
->
mac_rrc
.
ue_context_release_complete
(
&
complete
);
du_remove_f1_ue_data
(
rnti
);
NR_SCHED_LOCK
(
&
mac
->
sched_lock
);
}
}
void
nr_mac_update_timers
(
module_id_t
module_id
,
void
nr_mac_update_timers
(
module_id_t
module_id
,
frame_t
frame
,
frame_t
frame
,
sub_frame_t
slot
)
sub_frame_t
slot
)
...
@@ -2823,8 +2851,7 @@ void nr_mac_update_timers(module_id_t module_id,
...
@@ -2823,8 +2851,7 @@ void nr_mac_update_timers(module_id_t module_id,
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
if
(
nr_mac_check_release
(
sched_ctrl
,
UE
->
rnti
))
{
if
(
nr_mac_check_release
(
sched_ctrl
,
UE
->
rnti
))
{
nr_rlc_remove_ue
(
UE
->
rnti
);
nr_mac_release_ue
(
mac
,
UE
->
rnti
);
mac_remove_nr_ue
(
mac
,
UE
->
rnti
);
// go back to examine the next UE, which is at the position the
// go back to examine the next UE, which is at the position the
// current UE was
// current UE was
UE
--
;
UE
--
;
...
@@ -2963,7 +2990,7 @@ void prepare_initial_ul_rrc_message(gNB_MAC_INST *mac, NR_UE_info_t *UE)
...
@@ -2963,7 +2990,7 @@ void prepare_initial_ul_rrc_message(gNB_MAC_INST *mac, NR_UE_info_t *UE)
void
nr_mac_trigger_release_timer
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
NR_SubcarrierSpacing_t
subcarrier_spacing
)
void
nr_mac_trigger_release_timer
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
NR_SubcarrierSpacing_t
subcarrier_spacing
)
{
{
// trigger 60ms
// trigger 60ms
sched_ctrl
->
release_timer
=
6
0
<<
subcarrier_spacing
;
sched_ctrl
->
release_timer
=
10
0
<<
subcarrier_spacing
;
}
}
bool
nr_mac_check_release
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
int
rnti
)
bool
nr_mac_check_release
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
int
rnti
)
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
8e4ff595
...
@@ -443,6 +443,7 @@ void abort_nr_dl_harq(NR_UE_info_t* UE, int8_t harq_pid);
...
@@ -443,6 +443,7 @@ void abort_nr_dl_harq(NR_UE_info_t* UE, int8_t harq_pid);
void
nr_mac_trigger_release_timer
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
NR_SubcarrierSpacing_t
subcarrier_spacing
);
void
nr_mac_trigger_release_timer
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
NR_SubcarrierSpacing_t
subcarrier_spacing
);
bool
nr_mac_check_release
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
int
rnti
);
bool
nr_mac_check_release
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
int
rnti
);
void
nr_mac_release_ue
(
gNB_MAC_INST
*
mac
,
int
rnti
);
void
nr_mac_trigger_ul_failure
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
NR_SubcarrierSpacing_t
subcarrier_spacing
);
void
nr_mac_trigger_ul_failure
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
NR_SubcarrierSpacing_t
subcarrier_spacing
);
void
nr_mac_reset_ul_failure
(
NR_UE_sched_ctrl_t
*
sched_ctrl
);
void
nr_mac_reset_ul_failure
(
NR_UE_sched_ctrl_t
*
sched_ctrl
);
...
...
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
View file @
8e4ff595
...
@@ -493,27 +493,24 @@ void ue_context_release_command(const f1ap_ue_context_release_cmd_t *cmd)
...
@@ -493,27 +493,24 @@ void ue_context_release_command(const f1ap_ue_context_release_cmd_t *cmd)
{
{
/* mark UE as to be deleted after PUSCH failure */
/* mark UE as to be deleted after PUSCH failure */
gNB_MAC_INST
*
mac
=
RC
.
nrmac
[
0
];
gNB_MAC_INST
*
mac
=
RC
.
nrmac
[
0
];
pthread_mutex_lock
(
&
mac
->
sched_lock
);
NR_SCHED_LOCK
(
&
mac
->
sched_lock
);
NR_UE_info_t
*
UE
=
find_nr_UE
(
&
mac
->
UE_info
,
cmd
->
gNB_DU_ue_id
);
NR_UE_info_t
*
UE
=
find_nr_UE
(
&
mac
->
UE_info
,
cmd
->
gNB_DU_ue_id
);
if
(
UE
==
NULL
)
{
LOG_E
(
MAC
,
"ERROR: unknown UE with RNTI %04x, ignoring UE Context Release Command
\n
"
,
cmd
->
gNB_DU_ue_id
);
NR_SCHED_UNLOCK
(
&
mac
->
sched_lock
);
return
;
}
if
(
UE
->
UE_sched_ctrl
.
ul_failure
||
cmd
->
rrc_container_length
==
0
)
{
if
(
UE
->
UE_sched_ctrl
.
ul_failure
||
cmd
->
rrc_container_length
==
0
)
{
/* The UE is already not connected anymore or we have nothing to forward*/
/* The UE is already not connected anymore or we have nothing to forward*/
nr_rlc_remove_ue
(
cmd
->
gNB_DU_ue_id
);
nr_mac_release_ue
(
mac
,
cmd
->
gNB_DU_ue_id
);
mac_remove_nr_ue
(
mac
,
cmd
->
gNB_DU_ue_id
);
}
else
{
}
else
{
/* UE is in sync: forward release message and mark to be deleted
/* UE is in sync: forward release message and mark to be deleted
* after UL failure */
* after UL failure */
nr_rlc_srb_recv_sdu
(
cmd
->
gNB_DU_ue_id
,
cmd
->
srb_id
,
cmd
->
rrc_container
,
cmd
->
rrc_container_length
);
nr_rlc_srb_recv_sdu
(
cmd
->
gNB_DU_ue_id
,
cmd
->
srb_id
,
cmd
->
rrc_container
,
cmd
->
rrc_container_length
);
nr_mac_trigger_release_timer
(
&
UE
->
UE_sched_ctrl
,
UE
->
current_UL_BWP
.
scs
);
nr_mac_trigger_release_timer
(
&
UE
->
UE_sched_ctrl
,
UE
->
current_UL_BWP
.
scs
);
}
}
pthread_mutex_unlock
(
&
mac
->
sched_lock
);
NR_SCHED_UNLOCK
(
&
mac
->
sched_lock
);
f1ap_ue_context_release_complete_t
complete
=
{
.
gNB_CU_ue_id
=
cmd
->
gNB_CU_ue_id
,
.
gNB_DU_ue_id
=
cmd
->
gNB_DU_ue_id
,
};
mac
->
mac_rrc
.
ue_context_release_complete
(
&
complete
);
du_remove_f1_ue_data
(
cmd
->
gNB_DU_ue_id
);
}
}
void
dl_rrc_message_transfer
(
const
f1ap_dl_rrc_message_t
*
dl_rrc
)
void
dl_rrc_message_transfer
(
const
f1ap_dl_rrc_message_t
*
dl_rrc
)
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
8e4ff595
...
@@ -2503,10 +2503,6 @@ static void write_rrc_stats(const gNB_RRC_INST *rrc)
...
@@ -2503,10 +2503,6 @@ static void write_rrc_stats(const gNB_RRC_INST *rrc)
{
{
const
gNB_RRC_UE_t
*
ue_ctxt
=
&
ue_context_p
->
ue_context
;
const
gNB_RRC_UE_t
*
ue_ctxt
=
&
ue_context_p
->
ue_context
;
f1_ue_data_t
ue_data
=
cu_get_f1_ue_data
(
ue_ctxt
->
rrc_ue_id
);
f1_ue_data_t
ue_data
=
cu_get_f1_ue_data
(
ue_ctxt
->
rrc_ue_id
);
/* currently, we support only one DU. If we support multiple, need to
* search for the DU corresponding to this UE here */
const
nr_rrc_du_container_t
*
du
=
rrc
->
du
;
DevAssert
(
du
!=
NULL
);
fprintf
(
f
,
fprintf
(
f
,
"UE %d CU UE ID %d DU UE ID %d RNTI %04x random identity %016lx"
,
"UE %d CU UE ID %d DU UE ID %d RNTI %04x random identity %016lx"
,
...
@@ -2528,7 +2524,10 @@ static void write_rrc_stats(const gNB_RRC_INST *rrc)
...
@@ -2528,7 +2524,10 @@ static void write_rrc_stats(const gNB_RRC_INST *rrc)
fprintf
(
f
,
" PDU session %d ID %d status %s
\n
"
,
nb_pdu
,
pdu
->
param
.
pdusession_id
,
get_pdusession_status_text
(
pdu
->
status
));
fprintf
(
f
,
" PDU session %d ID %d status %s
\n
"
,
nb_pdu
,
pdu
->
param
.
pdusession_id
,
get_pdusession_status_text
(
pdu
->
status
));
}
}
if
(
ue_ctxt
->
UE_Capability_nr
)
{
/* currently, we support only one DU. If we support multiple, need to
* search for the DU corresponding to this UE here */
const
nr_rrc_du_container_t
*
du
=
rrc
->
du
;
if
(
du
!=
NULL
&&
ue_ctxt
->
UE_Capability_nr
)
{
AssertFatal
(
du
->
setup_req
->
num_cells_available
==
1
,
"only one cell supported at the moment
\n
"
);
AssertFatal
(
du
->
setup_req
->
num_cells_available
==
1
,
"only one cell supported at the moment
\n
"
);
const
f1ap_served_cell_info_t
*
cell_info
=
&
du
->
setup_req
->
cell
[
0
].
info
;
const
f1ap_served_cell_info_t
*
cell_info
=
&
du
->
setup_req
->
cell
[
0
].
info
;
fprintf
(
f
,
fprintf
(
f
,
...
...
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