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
zzha zzha
OpenXG-RAN
Commits
59e10dc8
Commit
59e10dc8
authored
Jun 03, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up MAC stats: don't show timing stats in console log, only file
parent
f2bc364b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
22 deletions
+23
-22
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+4
-5
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+1
-1
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+18
-16
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
59e10dc8
...
@@ -117,8 +117,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
...
@@ -117,8 +117,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
protocol_ctxt_t
ctxt
=
{
0
};
protocol_ctxt_t
ctxt
=
{
0
};
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
module_idP
,
ENB_FLAG_YES
,
NOT_A_RNTI
,
frame
,
slot
,
module_idP
);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
module_idP
,
ENB_FLAG_YES
,
NOT_A_RNTI
,
frame
,
slot
,
module_idP
);
char
stats_output
[
16384
];
gNB_MAC_INST
*
gNB
=
RC
.
nrmac
[
module_idP
];
gNB_MAC_INST
*
gNB
=
RC
.
nrmac
[
module_idP
];
NR_COMMON_channels_t
*
cc
=
gNB
->
common_channels
;
NR_COMMON_channels_t
*
cc
=
gNB
->
common_channels
;
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
...
@@ -180,9 +178,10 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
...
@@ -180,9 +178,10 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
if
((
slot
==
0
)
&&
(
frame
&
127
)
==
0
)
{
if
((
slot
==
0
)
&&
(
frame
&
127
)
==
0
)
{
stats_output
[
0
]
=
'\0'
;
char
stats_output
[
16384
];
dump_mac_stats
(
RC
.
nrmac
[
module_idP
],
stats_output
,
16384
,
true
);
stats_output
[
0
]
=
'\0'
;
LOG_I
(
NR_MAC
,
"Frame.Slot %d.%d
\n
%s
\n
"
,
frame
,
slot
,
stats_output
);
dump_mac_stats
(
RC
.
nrmac
[
module_idP
],
stats_output
,
sizeof
(
stats_output
),
true
);
LOG_I
(
NR_MAC
,
"Frame.Slot %d.%d
\n
%s
\n
"
,
frame
,
slot
,
stats_output
);
}
}
nr_mac_update_timers
(
module_idP
,
frame
,
slot
);
nr_mac_update_timers
(
module_idP
,
frame
,
slot
);
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
59e10dc8
...
@@ -534,7 +534,7 @@ int get_mcs_from_bler(const NR_bler_options_t *bler_options,
...
@@ -534,7 +534,7 @@ int get_mcs_from_bler(const NR_bler_options_t *bler_options,
void
nr_sr_reporting
(
gNB_MAC_INST
*
nrmac
,
frame_t
frameP
,
sub_frame_t
slotP
);
void
nr_sr_reporting
(
gNB_MAC_INST
*
nrmac
,
frame_t
frameP
,
sub_frame_t
slotP
);
void
dump_mac_stats
(
gNB_MAC_INST
*
gNB
,
char
*
output
,
int
strlen
,
bool
reset_rsrp
);
size_t
dump_mac_stats
(
gNB_MAC_INST
*
gNB
,
char
*
output
,
int
strlen
,
bool
reset_rsrp
);
void
process_CellGroup
(
NR_CellGroupConfig_t
*
CellGroup
,
NR_UE_sched_ctrl_t
*
sched_ctrl
);
void
process_CellGroup
(
NR_CellGroupConfig_t
*
CellGroup
,
NR_UE_sched_ctrl_t
*
sched_ctrl
);
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
59e10dc8
...
@@ -45,25 +45,30 @@
...
@@ -45,25 +45,30 @@
extern
RAN_CONTEXT_t
RC
;
extern
RAN_CONTEXT_t
RC
;
#define MACSTATSSTRLEN
16384
#define MACSTATSSTRLEN
65536
void
*
nrmac_stats_thread
(
void
*
arg
)
{
void
*
nrmac_stats_thread
(
void
*
arg
)
{
gNB_MAC_INST
*
gNB
=
(
gNB_MAC_INST
*
)
arg
;
gNB_MAC_INST
*
gNB
=
(
gNB_MAC_INST
*
)
arg
;
char
output
[
MACSTATSSTRLEN
];
char
output
[
MACSTATSSTRLEN
]
=
{
0
};
memset
(
output
,
0
,
MACSTATSSTRLEN
);
FILE
*
file
=
fopen
(
"nrMAC_stats.log"
,
"w"
);
FILE
*
fd
=
fopen
(
"nrMAC_stats.log"
,
"w"
);
AssertFatal
(
file
!=
NULL
,
"Cannot open nrMAC_stats.log, error %s
\n
"
,
strerror
(
errno
));
AssertFatal
(
fd
!=
NULL
,
"Cannot open nrMAC_stats.log, error %s
\n
"
,
strerror
(
errno
));
while
(
oai_exit
==
0
)
{
while
(
oai_exit
==
0
)
{
dump_mac_stats
(
gNB
,
output
,
MACSTATSSTRLEN
,
false
);
size_t
stroff
=
0
;
fprintf
(
fd
,
"%s
\n
"
,
output
);
stroff
+=
dump_mac_stats
(
gNB
,
output
,
MACSTATSSTRLEN
,
false
);
fflush
(
fd
);
stroff
+=
snprintf
(
output
+
stroff
,
MACSTATSSTRLEN
-
stroff
,
"
\n
"
);
usleep
(
200000
);
stroff
+=
print_meas_log
(
&
gNB
->
eNB_scheduler
,
"DL & UL scheduling timing stats"
,
NULL
,
NULL
,
output
+
stroff
);
fseek
(
fd
,
0
,
SEEK_SET
);
stroff
+=
print_meas_log
(
&
gNB
->
schedule_dlsch
,
"dlsch scheduler"
,
NULL
,
NULL
,
output
+
stroff
);
stroff
+=
print_meas_log
(
&
gNB
->
rlc_data_req
,
"rlc_data_req"
,
NULL
,
NULL
,
output
+
stroff
);
stroff
+=
print_meas_log
(
&
gNB
->
rlc_status_ind
,
"rlc_status_ind"
,
NULL
,
NULL
,
output
+
stroff
);
fwrite
(
output
,
stroff
,
1
,
file
);
fflush
(
file
);
sleep
(
1
);
fseek
(
file
,
0
,
SEEK_SET
);
}
}
fclose
(
f
d
);
fclose
(
f
ile
);
return
NULL
;
return
NULL
;
}
}
...
@@ -73,7 +78,7 @@ void clear_mac_stats(gNB_MAC_INST *gNB) {
...
@@ -73,7 +78,7 @@ void clear_mac_stats(gNB_MAC_INST *gNB) {
}
}
}
}
void
dump_mac_stats
(
gNB_MAC_INST
*
gNB
,
char
*
output
,
int
strlen
,
bool
reset_rsrp
)
size_t
dump_mac_stats
(
gNB_MAC_INST
*
gNB
,
char
*
output
,
int
strlen
,
bool
reset_rsrp
)
{
{
int
num
=
1
;
int
num
=
1
;
...
@@ -138,10 +143,7 @@ void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen, bool reset_rsrp
...
@@ -138,10 +143,7 @@ void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen, bool reset_rsrp
}
}
}
}
pthread_mutex_unlock
(
&
gNB
->
UE_info
.
mutex
);
pthread_mutex_unlock
(
&
gNB
->
UE_info
.
mutex
);
print_meas
(
&
gNB
->
eNB_scheduler
,
"DL & UL scheduling timing stats"
,
NULL
,
NULL
);
return
stroff
;
print_meas
(
&
gNB
->
schedule_dlsch
,
"dlsch scheduler"
,
NULL
,
NULL
);
print_meas
(
&
gNB
->
rlc_data_req
,
"rlc_data_req"
,
NULL
,
NULL
);
print_meas
(
&
gNB
->
rlc_status_ind
,
"rlc_status_ind"
,
NULL
,
NULL
);
}
}
...
...
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