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
2da515e5
Commit
2da515e5
authored
Oct 05, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NR MAC: save total/used PRBs aggregate
parent
5881077e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+5
-0
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+7
-0
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
2da515e5
...
...
@@ -936,6 +936,9 @@ void nr_schedule_ue_spec(module_id_t module_id,
NR_UEs_t
*
UE_info
=
&
gNB_mac
->
UE_info
;
nfapi_nr_dl_tti_request_body_t
*
dl_req
=
&
DL_req
->
dl_tti_request_body
;
const
NR_BWP_t
*
initialDL
=
&
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
;
gNB_mac
->
mac_stats
.
total_prb_aggregate
+=
NRRIV2BW
(
initialDL
->
locationAndBandwidth
,
MAX_BWP_SIZE
);
UE_iterator
(
UE_info
->
list
,
UE
)
{
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
NR_UE_DL_BWP_t
*
current_BWP
=
&
UE
->
current_DL_BWP
;
...
...
@@ -1237,6 +1240,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
T
(
T_GNB_MAC_RETRANSMISSION_DL_PDU_WITH_DATA
,
T_INT
(
module_id
),
T_INT
(
CC_id
),
T_INT
(
rnti
),
T_INT
(
frame
),
T_INT
(
slot
),
T_INT
(
current_harq_pid
),
T_INT
(
harq
->
round
),
T_BUFFER
(
harq
->
transportBlock
,
TBS
));
UE
->
mac_stats
.
dl
.
total_rbs_retx
+=
sched_pdsch
->
rbSize
;
gNB_mac
->
mac_stats
.
used_prb_aggregate
+=
sched_pdsch
->
rbSize
;
}
else
{
/* initial transmission */
LOG_D
(
NR_MAC
,
"Initial HARQ transmission in %d.%d
\n
"
,
frame
,
slot
);
uint8_t
*
buf
=
(
uint8_t
*
)
harq
->
transportBlock
;
...
...
@@ -1353,6 +1357,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
UE
->
mac_stats
.
dl
.
num_mac_sdu
+=
sdus
;
UE
->
mac_stats
.
dl
.
current_rbs
=
sched_pdsch
->
rbSize
;
UE
->
mac_stats
.
dl
.
total_sdu_bytes
+=
dlsch_total_bytes
;
gNB_mac
->
mac_stats
.
used_prb_aggregate
+=
sched_pdsch
->
rbSize
;
/* save retransmission information */
harq
->
sched_pdsch
=
*
sched_pdsch
;
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
2da515e5
...
...
@@ -743,6 +743,11 @@ typedef struct f1_config_t {
uint32_t
gnb_id
;
// associated gNB's ID, not used in DU itself
}
f1_config_t
;
typedef
struct
{
uint64_t
total_prb_aggregate
;
uint64_t
used_prb_aggregate
;
}
mac_stats_t
;
/*! \brief top level eNB MAC structure */
typedef
struct
gNB_MAC_INST_s
{
/// Ethernet parameters for northbound midhaul interface
...
...
@@ -862,6 +867,8 @@ typedef struct gNB_MAC_INST_s {
pthread_mutex_t
sched_lock
;
mac_stats_t
mac_stats
;
}
gNB_MAC_INST
;
#endif
/*__LAYER2_NR_MAC_GNB_H__ */
...
...
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