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
Michael Black
OpenXG-RAN
Commits
43e22429
Commit
43e22429
authored
Nov 15, 2021
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change variable types in statistics to accommodate more bytes and to avoid negative values
parent
cfbfd90f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
31 deletions
+31
-31
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+15
-15
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+12
-12
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
43e22429
...
...
@@ -420,9 +420,9 @@ int get_mcs_from_bler(module_id_t mod_id, int CC_id, frame_t frame, sub_frame_t
return
old_mcs
;
// no update
// last update is longer than x frames ago
const
int
dtx
=
stats
->
dlsch_rounds
[
0
]
-
bler_stats
->
dlsch_rounds
[
0
]
;
const
int
dretx
=
stats
->
dlsch_rounds
[
1
]
-
bler_stats
->
dlsch_rounds
[
1
]
;
const
int
dretx2
=
stats
->
dlsch_rounds
[
2
]
-
bler_stats
->
dlsch_rounds
[
2
]
;
const
int
dtx
=
(
int
)(
stats
->
dlsch_rounds
[
0
]
-
bler_stats
->
dlsch_rounds
[
0
])
;
const
int
dretx
=
(
int
)(
stats
->
dlsch_rounds
[
1
]
-
bler_stats
->
dlsch_rounds
[
1
])
;
const
int
dretx2
=
(
int
)(
stats
->
dlsch_rounds
[
2
]
-
bler_stats
->
dlsch_rounds
[
2
])
;
const
float
bler_window
=
dtx
>
0
?
(
float
)
dretx
/
dtx
:
bler_stats
->
bler
;
const
float
rd2_bler_wnd
=
dtx
>
0
?
(
float
)
dretx2
/
dtx
:
bler_stats
->
rd2_bler
;
bler_stats
->
bler
=
BLER_FILTER
*
bler_stats
->
bler
+
(
1
-
BLER_FILTER
)
*
bler_window
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
43e22429
...
...
@@ -582,7 +582,7 @@ static void handle_dl_harq(module_id_t mod_id,
harq
->
ndi
^=
1
;
NR_mac_stats_t
*
stats
=
&
UE_info
->
mac_stats
[
UE_id
];
stats
->
dlsch_errors
++
;
LOG_D
(
NR_MAC
,
"retransmission error for UE %d (total %
d
)
\n
"
,
UE_id
,
stats
->
dlsch_errors
);
LOG_D
(
NR_MAC
,
"retransmission error for UE %d (total %
"
PRIu64
"
)
\n
"
,
UE_id
,
stats
->
dlsch_errors
);
}
else
{
add_tail_nr_list
(
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
retrans_dl_harq
,
harq_pid
);
harq
->
round
++
;
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
43e22429
...
...
@@ -94,36 +94,36 @@ void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen)
avg_rsrp
,
stats
->
num_rsrp_meas
);
stroff
+=
sprintf
(
output
+
stroff
,
"UE %d: dlsch_rounds %
d/%d/%d/%d, dlsch_errors %d
, pucch0_DTX %d, BLER %.5f MCS %d
\n
"
,
UE_id
,
stats
->
dlsch_rounds
[
0
],
stats
->
dlsch_rounds
[
1
],
stats
->
dlsch_rounds
[
2
],
stats
->
dlsch_rounds
[
3
],
stats
->
dlsch_errors
,
stats
->
pucch0_DTX
,
sched_ctrl
->
dl_bler_stats
.
bler
,
sched_ctrl
->
dl_bler_stats
.
mcs
);
stroff
+=
sprintf
(
output
+
stroff
,
"UE %d: dlsch_rounds %
"
PRIu64
"/%"
PRIu64
"/%"
PRIu64
"/%"
PRIu64
", dlsch_errors %"
PRIu64
"
, pucch0_DTX %d, BLER %.5f MCS %d
\n
"
,
UE_id
,
stats
->
dlsch_rounds
[
0
],
stats
->
dlsch_rounds
[
1
],
stats
->
dlsch_rounds
[
2
],
stats
->
dlsch_rounds
[
3
],
stats
->
dlsch_errors
,
stats
->
pucch0_DTX
,
sched_ctrl
->
dl_bler_stats
.
bler
,
sched_ctrl
->
dl_bler_stats
.
mcs
);
stats
->
num_rsrp_meas
=
0
;
stats
->
cumul_rsrp
=
0
;
stroff
+=
sprintf
(
output
+
stroff
,
"UE %d: dlsch_total_bytes %
d
\n
"
,
UE_id
,
stats
->
dlsch_total_bytes
);
stroff
+=
sprintf
(
output
+
stroff
,
"UE %d: ulsch_rounds %
d/%d/%d/%d, ulsch_DTX %d, ulsch_errors %d
\n
"
,
stroff
+=
sprintf
(
output
+
stroff
,
"UE %d: dlsch_total_bytes %
"
PRIu64
"
\n
"
,
UE_id
,
stats
->
dlsch_total_bytes
);
stroff
+=
sprintf
(
output
+
stroff
,
"UE %d: ulsch_rounds %
"
PRIu64
"/%"
PRIu64
"/%"
PRIu64
"/%"
PRIu64
", ulsch_DTX %d, ulsch_errors %"
PRIu64
"
\n
"
,
UE_id
,
stats
->
ulsch_rounds
[
0
],
stats
->
ulsch_rounds
[
1
],
stats
->
ulsch_rounds
[
2
],
stats
->
ulsch_rounds
[
3
],
stats
->
ulsch_DTX
,
stats
->
ulsch_errors
);
stroff
+=
sprintf
(
output
+
stroff
,
"UE %d: ulsch_total_bytes_scheduled %
d, ulsch_total_bytes_received %d
\n
"
,
"UE %d: ulsch_total_bytes_scheduled %
"
PRIu64
", ulsch_total_bytes_received %"
PRIu64
"
\n
"
,
UE_id
,
stats
->
ulsch_total_bytes_scheduled
,
stats
->
ulsch_total_bytes_rx
);
for
(
int
lc_id
=
0
;
lc_id
<
63
;
lc_id
++
)
{
if
(
stats
->
lc_bytes_tx
[
lc_id
]
>
0
)
{
stroff
+=
sprintf
(
output
+
stroff
,
"UE %d: LCID %d: %
d
bytes TX
\n
"
,
UE_id
,
lc_id
,
stats
->
lc_bytes_tx
[
lc_id
]);
LOG_D
(
NR_MAC
,
"UE %d: LCID %d: %
d
bytes TX
\n
"
,
UE_id
,
lc_id
,
stats
->
lc_bytes_tx
[
lc_id
]);
stroff
+=
sprintf
(
output
+
stroff
,
"UE %d: LCID %d: %
"
PRIu64
"
bytes TX
\n
"
,
UE_id
,
lc_id
,
stats
->
lc_bytes_tx
[
lc_id
]);
LOG_D
(
NR_MAC
,
"UE %d: LCID %d: %
"
PRIu64
"
bytes TX
\n
"
,
UE_id
,
lc_id
,
stats
->
lc_bytes_tx
[
lc_id
]);
}
if
(
stats
->
lc_bytes_rx
[
lc_id
]
>
0
)
{
stroff
+=
sprintf
(
output
+
stroff
,
"UE %d: LCID %d: %
d
bytes RX
\n
"
,
UE_id
,
lc_id
,
stats
->
lc_bytes_rx
[
lc_id
]);
LOG_D
(
NR_MAC
,
"UE %d: LCID %d: %
d
bytes RX
\n
"
,
UE_id
,
lc_id
,
stats
->
lc_bytes_rx
[
lc_id
]);
stroff
+=
sprintf
(
output
+
stroff
,
"UE %d: LCID %d: %
"
PRIu64
"
bytes RX
\n
"
,
UE_id
,
lc_id
,
stats
->
lc_bytes_rx
[
lc_id
]);
LOG_D
(
NR_MAC
,
"UE %d: LCID %d: %
"
PRIu64
"
bytes RX
\n
"
,
UE_id
,
lc_id
,
stats
->
lc_bytes_rx
[
lc_id
]);
}
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
43e22429
...
...
@@ -427,7 +427,7 @@ typedef struct NR_DL_bler_stats {
float
bler
;
float
rd2_bler
;
uint8_t
mcs
;
in
t
dlsch_rounds
[
8
];
uint64_
t
dlsch_rounds
[
8
];
}
NR_DL_bler_stats_t
;
//
...
...
@@ -618,19 +618,19 @@ typedef struct {
}
NRUEcontext_t
;
typedef
struct
{
in
t
lc_bytes_tx
[
64
];
in
t
lc_bytes_rx
[
64
];
in
t
dlsch_rounds
[
8
];
in
t
dlsch_errors
;
in
t
dlsch_total_bytes
;
uint64_
t
lc_bytes_tx
[
64
];
uint64_
t
lc_bytes_rx
[
64
];
uint64_
t
dlsch_rounds
[
8
];
uint64_
t
dlsch_errors
;
uint64_
t
dlsch_total_bytes
;
int
dlsch_current_bytes
;
in
t
ulsch_rounds
[
8
];
in
t
ulsch_errors
;
in
t
ulsch_DTX
;
in
t
ulsch_total_bytes_scheduled
;
in
t
ulsch_total_bytes_rx
;
uint64_
t
ulsch_rounds
[
8
];
uint64_
t
ulsch_errors
;
uint32_
t
ulsch_DTX
;
uint64_
t
ulsch_total_bytes_scheduled
;
uint64_
t
ulsch_total_bytes_rx
;
int
ulsch_current_bytes
;
in
t
pucch0_DTX
;
uint32_
t
pucch0_DTX
;
int
cumul_rsrp
;
uint8_t
num_rsrp_meas
;
}
NR_mac_stats_t
;
...
...
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