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
e57ed9f4
Commit
e57ed9f4
authored
Feb 11, 2021
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring: abort HARQ retransmission and stats update in one function
parent
245a6da1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+19
-14
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
e57ed9f4
...
@@ -319,6 +319,24 @@ void nr_process_mac_pdu(
...
@@ -319,6 +319,24 @@ void nr_process_mac_pdu(
}
}
}
}
void
abort_nr_ul_harq
(
module_id_t
mod_id
,
int
UE_id
,
int8_t
harq_pid
)
{
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
mod_id
]
->
UE_info
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
NR_UE_ul_harq_t
*
harq
=
&
sched_ctrl
->
ul_harq_processes
[
harq_pid
];
harq
->
ndi
^=
1
;
harq
->
round
=
0
;
UE_info
->
mac_stats
[
UE_id
].
ulsch_errors
++
;
add_tail_nr_list
(
&
sched_ctrl
->
available_ul_harq
,
harq_pid
);
/* the transmission failed: the UE won't send the data we expected initially,
* so retrieve to correctly schedule after next BSR */
sched_ctrl
->
sched_ul_bytes
-=
harq
->
sched_pusch
.
tb_size
;
if
(
sched_ctrl
->
sched_ul_bytes
<
0
)
sched_ctrl
->
sched_ul_bytes
=
0
;
}
void
handle_nr_ul_harq
(
module_id_t
mod_id
,
void
handle_nr_ul_harq
(
module_id_t
mod_id
,
frame_t
frame
,
frame_t
frame
,
sub_frame_t
slot
,
sub_frame_t
slot
,
...
@@ -361,14 +379,11 @@ void handle_nr_ul_harq(module_id_t mod_id,
...
@@ -361,14 +379,11 @@ void handle_nr_ul_harq(module_id_t mod_id,
crc_pdu
->
rnti
);
crc_pdu
->
rnti
);
add_tail_nr_list
(
&
sched_ctrl
->
available_ul_harq
,
harq_pid
);
add_tail_nr_list
(
&
sched_ctrl
->
available_ul_harq
,
harq_pid
);
}
else
if
(
harq
->
round
==
MAX_HARQ_ROUNDS
)
{
}
else
if
(
harq
->
round
==
MAX_HARQ_ROUNDS
)
{
harq
->
ndi
^=
1
;
abort_nr_ul_harq
(
mod_id
,
UE_id
,
harq_pid
);
harq
->
round
=
0
;
LOG_D
(
MAC
,
LOG_D
(
MAC
,
"RNTI %04x: Ulharq id %d crc failed in all rounds
\n
"
,
"RNTI %04x: Ulharq id %d crc failed in all rounds
\n
"
,
crc_pdu
->
rnti
,
crc_pdu
->
rnti
,
harq_pid
);
harq_pid
);
UE_info
->
mac_stats
[
UE_id
].
ulsch_errors
++
;
add_tail_nr_list
(
&
sched_ctrl
->
available_ul_harq
,
harq_pid
);
}
else
{
}
else
{
harq
->
round
++
;
harq
->
round
++
;
LOG_D
(
MAC
,
LOG_D
(
MAC
,
...
@@ -454,16 +469,6 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
...
@@ -454,16 +469,6 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
nr_process_mac_pdu
(
gnb_mod_idP
,
current_rnti
,
CC_idP
,
frameP
,
sduP
,
sdu_lenP
);
nr_process_mac_pdu
(
gnb_mod_idP
,
current_rnti
,
CC_idP
,
frameP
,
sduP
,
sdu_lenP
);
}
}
else
{
NR_UE_ul_harq_t
*
cur_harq
=
&
UE_scheduling_control
->
ul_harq_processes
[
harq_pid
];
/* reduce sched_ul_bytes when cur_harq->round == 3 */
if
(
cur_harq
->
round
==
3
){
const
uint32_t
tb_size
=
UE_scheduling_control
->
ul_harq_processes
[
harq_pid
].
sched_pusch
.
tb_size
;
UE_scheduling_control
->
sched_ul_bytes
-=
tb_size
;
if
(
UE_scheduling_control
->
sched_ul_bytes
<
0
)
UE_scheduling_control
->
sched_ul_bytes
=
0
;
}
}
}
else
{
}
else
{
if
(
!
sduP
)
// check that CRC passed
if
(
!
sduP
)
// check that CRC passed
return
;
return
;
...
...
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