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
常顺宇
OpenXG-RAN
Commits
c321f9b5
Commit
c321f9b5
authored
Mar 05, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make UE mem alloc for UL_INFO only once in PHY stub mode
parent
5f851d45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
38 deletions
+29
-38
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+29
-38
No files found.
targets/RT/USER/lte-ue.c
View file @
c321f9b5
...
...
@@ -992,6 +992,19 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
phy_stub_ticking
->
num_single_thread
[
ue_thread_id
]
=
-
1
;
UE
=
rtd
->
UE
;
UL_INFO
=
(
UL_IND_t
*
)
malloc
(
sizeof
(
UL_IND_t
));
UL_INFO
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
=
calloc
(
NB_UE_INST
,
sizeof
(
nfapi_rx_indication_pdu_t
));
UL_INFO
->
rx_ind
.
rx_indication_body
.
number_of_pdus
=
0
;
UL_INFO
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
=
calloc
(
NB_UE_INST
,
sizeof
(
nfapi_crc_indication_pdu_t
));
UL_INFO
->
crc_ind
.
crc_indication_body
.
number_of_crcs
=
0
;
UL_INFO
->
harq_ind
.
harq_indication_body
.
harq_pdu_list
=
calloc
(
NB_UE_INST
,
sizeof
(
nfapi_harq_indication_pdu_t
));
UL_INFO
->
harq_ind
.
harq_indication_body
.
number_of_harqs
=
0
;
UL_INFO
->
sr_ind
.
sr_indication_body
.
sr_pdu_list
=
calloc
(
NB_UE_INST
,
sizeof
(
nfapi_sr_indication_pdu_t
));
UL_INFO
->
sr_ind
.
sr_indication_body
.
number_of_srs
=
0
;
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
cqi_pdu_list
=
calloc
(
NB_UE_INST
,
sizeof
(
nfapi_cqi_indication_pdu_t
));
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
cqi_raw_pdu_list
=
calloc
(
NB_UE_INST
,
sizeof
(
nfapi_cqi_indication_raw_pdu_t
));
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
number_of_cqis
=
0
;
if
(
ue_thread_id
==
0
)
{
phy_stub_ticking
->
ticking_var
=
-
1
;
proc
->
subframe_rx
=
proc
->
sub_frame_start
;
...
...
@@ -1064,20 +1077,6 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
initRefTimes(t3);
pickTime(current);
updateTimes(proc->gotIQs, &t2, 10000, "Delay to wake up UE_Thread_Rx (case 2)");*/
// Not sure whether we should put the memory allocation here and not sure how much memory
//we should allocate for each subframe cycle.
UL_INFO
=
(
UL_IND_t
*
)
malloc
(
sizeof
(
UL_IND_t
));
UL_INFO
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
=
(
nfapi_rx_indication_pdu_t
*
)
malloc
(
NB_UE_INST
*
sizeof
(
nfapi_rx_indication_pdu_t
));
UL_INFO
->
rx_ind
.
rx_indication_body
.
number_of_pdus
=
0
;
UL_INFO
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
=
(
nfapi_crc_indication_pdu_t
*
)
malloc
(
NB_UE_INST
*
sizeof
(
nfapi_crc_indication_pdu_t
));
UL_INFO
->
crc_ind
.
crc_indication_body
.
number_of_crcs
=
0
;
UL_INFO
->
harq_ind
.
harq_indication_body
.
harq_pdu_list
=
(
nfapi_harq_indication_pdu_t
*
)
malloc
(
NB_UE_INST
*
sizeof
(
nfapi_harq_indication_pdu_t
));
UL_INFO
->
harq_ind
.
harq_indication_body
.
number_of_harqs
=
0
;
UL_INFO
->
sr_ind
.
sr_indication_body
.
sr_pdu_list
=
(
nfapi_sr_indication_pdu_t
*
)
malloc
(
NB_UE_INST
*
sizeof
(
nfapi_sr_indication_pdu_t
));
UL_INFO
->
sr_ind
.
sr_indication_body
.
number_of_srs
=
0
;
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
cqi_pdu_list
=
(
nfapi_cqi_indication_pdu_t
*
)
malloc
(
NB_UE_INST
*
sizeof
(
nfapi_cqi_indication_pdu_t
));
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
cqi_raw_pdu_list
=
(
nfapi_cqi_indication_raw_pdu_t
*
)
malloc
(
NB_UE_INST
*
sizeof
(
nfapi_cqi_indication_raw_pdu_t
));
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
number_of_cqis
=
0
;
if
(
pthread_mutex_lock
(
&
phy_stub_ticking
->
mutex_single_thread
)
!=
0
)
{
LOG_E
(
MAC
,
"[SCHED][UE] error locking mutex for ue_thread_id %d (mutex_single_thread)
\n
"
,
ue_thread_id
);
...
...
@@ -1267,30 +1266,6 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
UL_INFO
->
sr_ind
.
sr_indication_body
.
number_of_srs
=
0
;
}
// Free UL_INFO messages
//if(UL_INFO->crc_ind.crc_indication_body.crc_pdu_list != NULL){
free
(
UL_INFO
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
);
UL_INFO
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
=
NULL
;
//}
//if(UL_INFO->rx_ind.rx_indication_body.rx_pdu_list != NULL){
free
(
UL_INFO
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
);
UL_INFO
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
=
NULL
;
//}
//if(UL_INFO->harq_ind.harq_indication_body.harq_pdu_list !=NULL){
free
(
UL_INFO
->
harq_ind
.
harq_indication_body
.
harq_pdu_list
);
UL_INFO
->
harq_ind
.
harq_indication_body
.
harq_pdu_list
=
NULL
;
//}
//if(UL_INFO->sr_ind.sr_indication_body.sr_pdu_list!=NULL){
free
(
UL_INFO
->
sr_ind
.
sr_indication_body
.
sr_pdu_list
);
UL_INFO
->
sr_ind
.
sr_indication_body
.
sr_pdu_list
=
NULL
;
//}
free
(
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
cqi_pdu_list
);
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
cqi_pdu_list
=
NULL
;
free
(
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
cqi_raw_pdu_list
);
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
cqi_raw_pdu_list
=
NULL
;
free
(
UL_INFO
);
UL_INFO
=
NULL
;
// De-allocate memory of nfapi requests copies before next subframe round
if
(
dl_config_req
!=
NULL
)
{
if
(
dl_config_req
->
vendor_extension
!=
NULL
)
{
...
...
@@ -1334,6 +1309,22 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
}
}
// Free UL_INFO messages
free
(
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
cqi_raw_pdu_list
);
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
cqi_raw_pdu_list
=
NULL
;
free
(
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
cqi_pdu_list
);
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
cqi_pdu_list
=
NULL
;
free
(
UL_INFO
->
sr_ind
.
sr_indication_body
.
sr_pdu_list
);
UL_INFO
->
sr_ind
.
sr_indication_body
.
sr_pdu_list
=
NULL
;
free
(
UL_INFO
->
harq_ind
.
harq_indication_body
.
harq_pdu_list
);
UL_INFO
->
harq_ind
.
harq_indication_body
.
harq_pdu_list
=
NULL
;
free
(
UL_INFO
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
);
UL_INFO
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
=
NULL
;
free
(
UL_INFO
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
);
UL_INFO
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
=
NULL
;
free
(
UL_INFO
);
UL_INFO
=
NULL
;
// thread finished
free
(
arg
);
return
&
UE_thread_rxtx_retval
;
...
...
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