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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
ad988b34
Commit
ad988b34
authored
Mar 28, 2024
by
francescomani
Committed by
sagar arora
May 22, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoid another segfault at detach
parent
a896c809
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
25 deletions
+22
-25
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+22
-25
No files found.
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
ad988b34
...
...
@@ -1326,32 +1326,29 @@ void nr_ue_ul_scheduler(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_info)
nr_update_sr
(
mac
);
// update Bj for all active lcids before LCP procedure
LOG_D
(
NR_MAC
,
"====================[Frame %d][Slot %d]Logical Channel Prioritization===========
\n
"
,
frame_tx
,
slot_tx
);
for
(
int
i
=
0
;
i
<
mac
->
lc_ordered_list
.
count
;
i
++
)
{
nr_lcordered_info_t
*
lc_info
=
mac
->
lc_ordered_list
.
array
[
i
];
int
lcid
=
lc_info
->
lcid
;
// max amount of data that can be buffered/accumulated in a logical channel buffer
uint32_t
bucketSize_max
=
lc_info
->
bucket_size
;
/*
measure Bj
increment the value of Bj by product PBR * T
*/
NR_LC_SCHEDULING_INFO
*
sched_info
=
get_scheduling_info_from_lcid
(
mac
,
lcid
);
int32_t
bj
=
sched_info
->
Bj
;
if
(
lc_info
->
pbr
<
UINT_MAX
)
{
uint32_t
slots_elapsed
=
nr_timer_elapsed_time
(
sched_info
->
Bj_timer
);
// slots elapsed since Bj was last incremented
// it is safe to divide by 1k since pbr in lc_info is computed multiplying by 1000 the RRC value to convert kB/s to B/s
uint32_t
pbr_ms
=
lc_info
->
pbr
/
1000
;
bj
+=
((
pbr_ms
*
slots_elapsed
)
>>
mac
->
current_UL_BWP
->
scs
);
// each slot length is 1/scs ms
if
(
mac
->
current_UL_BWP
)
{
LOG_D
(
NR_MAC
,
"%4d.%2d Logical Channel Prioritization
\n
"
,
frame_tx
,
slot_tx
);
for
(
int
i
=
0
;
i
<
mac
->
lc_ordered_list
.
count
;
i
++
)
{
nr_lcordered_info_t
*
lc_info
=
mac
->
lc_ordered_list
.
array
[
i
];
int
lcid
=
lc_info
->
lcid
;
// max amount of data that can be buffered/accumulated in a logical channel buffer
uint32_t
bucketSize_max
=
lc_info
->
bucket_size
;
// measure Bj increment the value of Bj by product PBR * T
NR_LC_SCHEDULING_INFO
*
sched_info
=
get_scheduling_info_from_lcid
(
mac
,
lcid
);
int32_t
bj
=
sched_info
->
Bj
;
if
(
lc_info
->
pbr
<
UINT_MAX
)
{
uint32_t
slots_elapsed
=
nr_timer_elapsed_time
(
sched_info
->
Bj_timer
);
// slots elapsed since Bj was last incremented
// it is safe to divide by 1k since pbr in lc_info is computed multiplying by 1000 the RRC value to convert kB/s to B/s
uint32_t
pbr_ms
=
lc_info
->
pbr
/
1000
;
bj
+=
((
pbr_ms
*
slots_elapsed
)
>>
mac
->
current_UL_BWP
->
scs
);
// each slot length is 1/scs ms
}
else
bj
=
INT_MAX
;
// bj > max bucket size, set bj to max bucket size, as in ts38.321 5.4.3.1 Logical Channel Prioritization
sched_info
->
Bj
=
min
(
bj
,
bucketSize_max
);
// reset bj timer
nr_timer_start
(
&
sched_info
->
Bj_timer
);
}
else
bj
=
INT_MAX
;
// bj > max bucket size, set bj to max bucket size, as in ts38.321 5.4.3.1 Logical Channel Prioritization
sched_info
->
Bj
=
min
(
bj
,
bucketSize_max
);
// reset bj timer
nr_timer_start
(
&
sched_info
->
Bj_timer
);
}
if
(
mac
->
state
>=
UE_PERFORMING_RA
)
...
...
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