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
1d09adc7
Commit
1d09adc7
authored
Aug 20, 2021
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for msg4 retransmission
parent
8c91e719
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
16 deletions
+28
-16
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+27
-15
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+1
-1
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
1d09adc7
...
...
@@ -1210,11 +1210,15 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
long
BWPSize
=
NRRIV2BW
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
long
BWPStart
=
NRRIV2PRBOFFSET
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
/* get the PID of a HARQ process awaiting retrnasmission, or -1 otherwise */
int
current_harq_pid
=
sched_ctrl
->
retrans_dl_harq
.
head
;
// HARQ management
AssertFatal
(
sched_ctrl
->
available_dl_harq
.
head
>=
0
,
"UE context not initialized: no HARQ processes found
\n
"
);
int
current_harq_pid
=
sched_ctrl
->
available_dl_harq
.
head
;
remove_front_nr_list
(
&
sched_ctrl
->
available_dl_harq
);
if
(
current_harq_pid
<
0
)
{
AssertFatal
(
sched_ctrl
->
available_dl_harq
.
head
>=
0
,
"UE context not initialized: no HARQ processes found
\n
"
);
current_harq_pid
=
sched_ctrl
->
available_dl_harq
.
head
;
remove_front_nr_list
(
&
sched_ctrl
->
available_dl_harq
);
}
NR_UE_harq_t
*
harq
=
&
sched_ctrl
->
harq_processes
[
current_harq_pid
];
DevAssert
(
!
harq
->
is_waiting
);
add_tail_nr_list
(
&
sched_ctrl
->
feedback_dl_harq
,
current_harq_pid
);
...
...
@@ -1522,24 +1526,32 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
module_id
]
->
UE_info
;
NR_UE_harq_t
*
harq
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
harq_processes
[
current_harq_pid
];
NR_mac_stats_t
*
stats
=
&
UE_info
->
mac_stats
[
UE_id
];
LOG_D
(
NR_MAC
,
"ue %d, rnti %d, harq is waiting %d, round %d, frame %d %d, harq id %d
\n
"
,
UE_id
,
ra
->
rnti
,
harq
->
is_waiting
,
harq
->
round
,
frame
,
slot
,
current_harq_pid
);
if
(
harq
->
is_waiting
==
0
)
{
if
(
harq
->
round
==
0
)
{
LOG_I
(
NR_MAC
,
"(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!
\n
"
,
UE_id
,
ra
->
rnti
);
nr_clear_ra_proc
(
module_id
,
CC_id
,
frame
,
ra
);
UE_info
->
active
[
UE_id
]
=
true
;
UE_info
->
Msg4_ACKed
[
UE_id
]
=
true
;
if
(
harq
->
is_waiting
==
0
)
{
if
(
harq
->
round
==
0
)
{
if
(
stats
->
dlsch_errors
==
0
)
{
LOG_I
(
NR_MAC
,
"(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!
\n
"
,
UE_id
,
ra
->
rnti
);
nr_clear_ra_proc
(
module_id
,
CC_id
,
frame
,
ra
);
UE_info
->
active
[
UE_id
]
=
true
;
UE_info
->
Msg4_ACKed
[
UE_id
]
=
true
;
}
else
{
LOG_I
(
NR_MAC
,
"(ue %i, rnti 0x%04x) RA Procedure failed at Msg4!
\n
"
,
UE_id
,
ra
->
rnti
);
nr_mac_remove_ra_rnti
(
module_id
,
ra
->
rnti
);
nr_clear_ra_proc
(
module_id
,
CC_id
,
frame
,
ra
);
mac_remove_nr_ue
(
module_id
,
ra
->
rnti
);
}
}
else
{
else
{
LOG_I
(
NR_MAC
,
"(ue %i, rnti 0x%04x) Received Nack of RA-Msg4. Preparing retransmission!
\n
"
,
UE_id
,
ra
->
rnti
);
ra
->
Msg4_frame
=
(
frame
+
1
)
%
1024
;
ra
->
Msg4_slot
=
1
;
ra
->
state
=
Msg4
;
}
}
}
void
nr_clear_ra_proc
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
NR_RA_t
*
ra
){
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
1d09adc7
...
...
@@ -770,7 +770,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
nr_process_mac_pdu
(
gnb_mod_idP
,
UE_id
,
CC_idP
,
frameP
,
slotP
,
sduP
,
sdu_lenP
);
ra
->
state
=
Msg4
;
ra
->
Msg4_frame
=
(
frameP
+
2
)
%
1024
;
ra
->
Msg4_frame
=
(
frameP
+
2
)
%
1024
;
ra
->
Msg4_slot
=
1
;
LOG_I
(
NR_MAC
,
"Scheduling RA-Msg4 for TC_RNTI %04x (state %d, frame %d, slot %d)
\n
"
,
ra
->
rnti
,
ra
->
state
,
ra
->
Msg4_frame
,
ra
->
Msg4_slot
);
...
...
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