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
canghaiwuhen
OpenXG-RAN
Commits
c1e680dd
Commit
c1e680dd
authored
Oct 30, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FlexRAN: free memory of statistics reports
parent
836f6c63
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
23 deletions
+48
-23
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
+11
-13
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h
+1
-1
openair2/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c
openair2/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c
+8
-0
openair2/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.h
openair2/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.h
+1
-0
openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
+17
-1
openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.h
openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.h
+1
-1
openair2/ENB_APP/flexran_agent_handler.c
openair2/ENB_APP/flexran_agent_handler.c
+9
-7
No files found.
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
View file @
c1e680dd
...
...
@@ -646,14 +646,9 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
return
-
1
;
}
int
flexran_agent_mac_destroy_stats_reply
(
Protocol__FlexranMessage
*
msg
)
{
//TODO: Need to deallocate memory for the stats reply message
if
(
msg
->
msg_case
!=
PROTOCOL__FLEXRAN_MESSAGE__MSG_STATS_REPLY_MSG
)
goto
error
;
free
(
msg
->
stats_reply_msg
->
header
);
int
flexran_agent_mac_destroy_stats_reply
(
Protocol__FlexStatsReply
*
reply
)
{
int
i
,
j
,
k
;
Protocol__FlexStatsReply
*
reply
=
msg
->
stats_reply_msg
;
Protocol__FlexDlCqiReport
*
dl_report
;
Protocol__FlexUlCqiReport
*
ul_report
;
Protocol__FlexPagingBufferReport
*
paging_report
;
...
...
@@ -744,20 +739,23 @@ int flexran_agent_mac_destroy_stats_reply(Protocol__FlexranMessage *msg) {
free
(
ul_report
->
pucch_dbm
[
j
]);
}
free
(
ul_report
->
pucch_dbm
);
free
(
ul_report
);
}
if
(
reply
->
ue_report
[
i
]
->
flags
&
PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_STATS
)
{
for
(
j
=
0
;
j
<
reply
->
ue_report
[
i
]
->
mac_stats
->
n_mac_sdus_dl
;
j
++
)
free
(
reply
->
ue_report
[
i
]
->
mac_stats
->
mac_sdus_dl
[
j
]);
free
(
reply
->
ue_report
[
i
]
->
mac_stats
->
mac_sdus_dl
);
free
(
reply
->
ue_report
[
i
]
->
mac_stats
);
}
free
(
reply
->
ue_report
[
i
]);
}
free
(
reply
->
ue_report
);
// Free memory for all Cell reports
for
(
i
=
0
;
i
<
reply
->
n_cell_report
;
i
++
)
{
if
(
reply
->
cell_report
[
i
]
->
flags
&
PROTOCOL__FLEX_CELL_STATS_TYPE__FLCST_NOISE_INTERFERENCE
)
{
free
(
reply
->
cell_report
[
i
]
->
noise_inter_report
);
free
(
reply
->
cell_report
[
i
]);
}
free
(
reply
->
cell_report
);
}
free
(
reply
);
free
(
msg
);
return
0
;
error:
...
...
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h
View file @
c1e680dd
...
...
@@ -53,7 +53,7 @@ int flexran_agent_mac_destroy_sf_trigger(Protocol__FlexranMessage *msg);
/* Statistics reply protocol message constructor and destructor */
int
flexran_agent_mac_stats_reply
(
mid_t
mod_id
,
const
report_config_t
*
report_config
,
Protocol__FlexUeStatsReport
**
ue_report
,
Protocol__FlexCellStatsReport
**
cell_report
);
int
flexran_agent_mac_destroy_stats_reply
(
Protocol__Flex
ranMessage
*
msg
);
int
flexran_agent_mac_destroy_stats_reply
(
Protocol__Flex
StatsReply
*
reply
);
/* DL MAC scheduling decision protocol message constructor (empty command) and destructor */
int
flexran_agent_mac_create_empty_dl_config
(
mid_t
mod_id
,
Protocol__FlexranMessage
**
msg
);
...
...
openair2/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c
View file @
c1e680dd
...
...
@@ -136,6 +136,14 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
return
-
1
;
}
int
flexran_agent_pdcp_destroy_stats_reply
(
Protocol__FlexStatsReply
*
reply
)
{
for
(
int
i
=
0
;
i
<
reply
->
n_ue_report
;
++
i
)
{
if
(
reply
->
ue_report
[
i
]
->
pdcp_stats
)
free
(
reply
->
ue_report
[
i
]
->
pdcp_stats
);
}
return
0
;
}
int
flexran_agent_register_pdcp_xface
(
mid_t
mod_id
)
...
...
openair2/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.h
View file @
c1e680dd
...
...
@@ -51,6 +51,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
const
report_config_t
*
report_config
,
Protocol__FlexUeStatsReport
**
ue_report
,
Protocol__FlexCellStatsReport
**
cell_report
);
int
flexran_agent_pdcp_destroy_stats_reply
(
Protocol__FlexStatsReply
*
reply
);
/* Get the stats from RAN API and aggregate them per USER*/
void
flexran_agent_pdcp_aggregate_stats
(
const
mid_t
mod_id
,
...
...
openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
View file @
c1e680dd
...
...
@@ -493,7 +493,7 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
for
(
int
i
=
0
;
i
<
report_config
->
nr_ue
;
i
++
){
if
(
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
!=
NULL
){
if
(
ue_report
[
i
]
->
rrc_measurements
&&
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
!=
NULL
){
for
(
int
j
=
0
;
j
<
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
n_eutra_meas
;
j
++
){
free
(
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
eutra_meas
[
j
]);
...
...
@@ -510,6 +510,22 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
return
-
1
;
}
int
flexran_agent_rrc_destroy_stats_reply
(
Protocol__FlexStatsReply
*
reply
)
{
for
(
int
i
=
0
;
i
<
reply
->
n_ue_report
;
i
++
){
if
(
reply
->
ue_report
[
i
]
->
rrc_measurements
&&
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
){
for
(
int
j
=
0
;
j
<
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
n_eutra_meas
;
j
++
){
free
(
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
eutra_meas
[
j
]
->
meas_result
);
free
(
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
eutra_meas
[
j
]);
}
free
(
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
->
eutra_meas
);
free
(
reply
->
ue_report
[
i
]
->
rrc_measurements
->
neigh_meas
);
free
(
reply
->
ue_report
[
i
]
->
rrc_measurements
);
}
}
return
0
;
}
void
flexran_agent_fill_rrc_ue_config
(
mid_t
mod_id
,
rnti_t
rnti
,
Protocol__FlexUeConfig
*
ue_conf
)
{
...
...
openair2/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.h
View file @
c1e680dd
...
...
@@ -58,7 +58,7 @@ void flexran_trigger_rrc_measurements (mid_t mod_id, MeasResults_t *);
/* Statistics reply protocol message constructor and destructor */
int
flexran_agent_rrc_stats_reply
(
mid_t
mod_id
,
const
report_config_t
*
report_config
,
Protocol__FlexUeStatsReport
**
ue_report
,
Protocol__FlexCellStatsReport
**
cell_report
);
int
flexran_agent_rrc_destroy_stats_reply
(
Protocol__Flex
ranMessage
*
msg
);
int
flexran_agent_rrc_destroy_stats_reply
(
Protocol__Flex
StatsReply
*
reply
);
/* Fill the RRC part of a ue_config message */
void
flexran_agent_fill_rrc_ue_config
(
mid_t
mod_id
,
rnti_t
rnti
,
...
...
openair2/ENB_APP/flexran_agent_handler.c
View file @
c1e680dd
...
...
@@ -113,7 +113,7 @@ Protocol__FlexranMessage* flexran_agent_handle_message (mid_t mod_id,
err_code
=
((
*
agent_messages_callback
[
decoded_message
->
msg_case
-
1
][
decoded_message
->
msg_dir
-
1
])(
mod_id
,
(
void
*
)
decoded_message
,
&
reply_message
));
if
(
err_code
<
0
){
goto
error
;
}
else
if
(
err_code
==
1
)
{
//If err_code > 1, we do not want to dispose the message yet
}
else
if
(
err_code
==
0
)
{
//If err_code > 1, we do not want to dispose the message yet
protocol__flexran_message__free_unpacked
(
decoded_message
,
NULL
);
}
return
reply_message
;
...
...
@@ -653,14 +653,16 @@ int flexran_agent_destroy_stats_reply(Protocol__FlexranMessage *msg)
return
-
1
;
}
flexran_agent_mac_destroy_stats_reply
((
Protocol__FlexranMessage
*
)
msg
->
stats_reply_msg
);
// TODO implement rrc_destroy_stats_reply()
//flexran_agent_rrc_destroy_stats_reply(msg->stats_reply_msg);
// TODO implement pdcp_destroy_stats_reply()
//flexran_agent_pdcp_destroy_stats_reply(msg->stats_reply_msg);
free
(
msg
->
stats_reply_msg
->
header
);
flexran_agent_mac_destroy_stats_reply
(
msg
->
stats_reply_msg
);
flexran_agent_rrc_destroy_stats_reply
(
msg
->
stats_reply_msg
);
flexran_agent_pdcp_destroy_stats_reply
(
msg
->
stats_reply_msg
);
for
(
int
i
=
0
;
i
<
msg
->
stats_reply_msg
->
n_cell_report
;
++
i
)
free
(
msg
->
stats_reply_msg
->
cell_report
[
i
]);
for
(
int
i
=
0
;
i
<
msg
->
stats_reply_msg
->
n_ue_report
;
++
i
)
free
(
msg
->
stats_reply_msg
->
ue_report
[
i
]);
free
(
msg
->
stats_reply_msg
->
cell_report
);
free
(
msg
->
stats_reply_msg
->
ue_report
);
free
(
msg
->
stats_reply_msg
->
header
);
free
(
msg
->
stats_reply_msg
);
free
(
msg
);
return
0
;
...
...
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