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
24399eac
Commit
24399eac
authored
Oct 09, 2025
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update_dlsch_buffer() for individual UEs
parent
27a022d6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
38 deletions
+34
-38
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+34
-38
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
24399eac
...
...
@@ -321,20 +321,18 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
return
offset
;
}
static
void
nr_store_dlsch_buffer
(
module_id_t
module_id
,
frame_t
frame
,
slot_t
slot
)
static
uint32_t
update_dlsch_buffer
(
frame_t
frame
,
slot_t
slot
,
NR_UE_info_t
*
UE
)
{
UE_iterator
(
RC
.
nrmac
[
module_id
]
->
UE_info
.
connected_ue_list
,
UE
)
{
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
sched_ctrl
->
num_total_bytes
=
0
;
sched_ctrl
->
dl_pdus_total
=
0
;
/* loop over all activated logical channels */
// Note: DL_SCH_LCID_DCCH, DL_SCH_LCID_DCCH1, DL_SCH_LCID_DTCH
for
(
int
i
=
0
;
i
<
seq_arr_size
(
&
sched_ctrl
->
lc_config
);
++
i
)
{
const
nr_lc_config_t
*
c
=
seq_arr_at
(
&
sched_ctrl
->
lc_config
,
i
);
const
int
lcid
=
c
->
lcid
;
const
uint16_t
rnti
=
UE
->
rnti
;
LOG_D
(
NR_MAC
,
"In %s: UE %x: LCID %d
\n
"
,
__FUNCTION__
,
rnti
,
lcid
);
LOG_D
(
NR_MAC
,
"UE %x: LCID %d
\n
"
,
rnti
,
lcid
);
memset
(
&
sched_ctrl
->
rlc_status
[
lcid
],
0
,
sizeof
(
sched_ctrl
->
rlc_status
[
lcid
]));
if
(
c
->
suspended
)
continue
;
...
...
@@ -348,19 +346,16 @@ static void nr_store_dlsch_buffer(module_id_t module_id, frame_t frame, slot_t s
sched_ctrl
->
dl_pdus_total
+=
sched_ctrl
->
rlc_status
[
lcid
].
pdus_in_buffer
;
sched_ctrl
->
num_total_bytes
+=
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
;
LOG_D
(
MAC
,
"[gNB %d][%4d.%2d] %s%d->DLSCH, RLC status for UE %d: %d bytes in buffer, total DL buffer size = %d bytes, %d total PDU bytes, %s TA command
\n
"
,
module_id
,
"%4d.%2d UE %04x LCID %d status: %d bytes, total buffer %d bytes %d PDUs
\n
"
,
frame
,
slot
,
lcid
<
4
?
"DCCH"
:
"DTCH"
,
lcid
,
UE
->
rnti
,
lcid
,
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
,
sched_ctrl
->
num_total_bytes
,
sched_ctrl
->
dl_pdus_total
,
sched_ctrl
->
ta_apply
?
"send"
:
"do not send"
);
}
sched_ctrl
->
dl_pdus_total
);
}
return
sched_ctrl
->
num_total_bytes
;
}
void
finish_nr_dl_harq
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
int
harq_pid
)
...
...
@@ -903,7 +898,6 @@ static void pf_dl(gNB_MAC_INST *mac,
static
void
nr_dlsch_preprocessor
(
gNB_MAC_INST
*
mac
,
post_process_pdsch_t
*
pp_pdsch
)
{
module_id_t
module_id
=
0
;
NR_UEs_t
*
UE_info
=
&
mac
->
UE_info
;
if
(
UE_info
->
connected_ue_list
[
0
]
==
NULL
)
...
...
@@ -917,7 +911,9 @@ static void nr_dlsch_preprocessor(gNB_MAC_INST *mac, post_process_pdsch_t *pp_pd
n_rb_sched
[
i
]
=
bw
;
/* Retrieve amount of data to send for this UE */
nr_store_dlsch_buffer
(
module_id
,
pp_pdsch
->
frame
,
pp_pdsch
->
slot
);
UE_iterator
(
mac
->
UE_info
.
connected_ue_list
,
UE
)
{
update_dlsch_buffer
(
pp_pdsch
->
frame
,
pp_pdsch
->
slot
,
UE
);
}
int
average_agg_level
=
4
;
// TODO find a better estimation
int
max_sched_ues
=
bw
/
(
average_agg_level
*
NR_NB_REG_PER_CCE
);
...
...
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