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
wangwenhui
OpenXG-RAN
Commits
507c1ea9
Commit
507c1ea9
authored
Jan 24, 2018
by
matzakos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added correct handling of HI_DCI0.req + memory management issues
parent
5dc306ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
24 deletions
+57
-24
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+42
-4
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+15
-20
No files found.
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
507c1ea9
...
@@ -1027,14 +1027,23 @@ int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req)
...
@@ -1027,14 +1027,23 @@ int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req)
free
(
tx_request_pdu_list
);
free
(
tx_request_pdu_list
);
tx_request_pdu_list
=
NULL
;
tx_request_pdu_list
=
NULL
;
}
}
if
(
req
->
dl_config_request_body
.
dl_config_pdu_list
!=
NULL
){
free
(
req
->
dl_config_request_body
.
dl_config_pdu_list
);
req
->
dl_config_request_body
.
dl_config_pdu_list
=
NULL
;
}
free
(
req
);
free
(
req
);
req
=
NULL
;
req
=
NULL
;
return
0
;
return
0
;
}
}
else
if
(
req
!=
NULL
){
else
if
(
req
!=
NULL
){
//LOG_I(MAC, "Panos-D: dl_config_req_UE_MAC probably dummy DL_Config \n");
//LOG_I(MAC, "Panos-D: dl_config_req_UE_MAC probably dummy DL_Config \n");
//free(req);
if
(
req
->
dl_config_request_body
.
dl_config_pdu_list
!=
NULL
){
//req = NULL;
//LOG_I(MAC, "Panos-D: dl_config_req_UE_MAC probably dummy DL_Config 2\n");
free
(
req
->
dl_config_request_body
.
dl_config_pdu_list
);
req
->
dl_config_request_body
.
dl_config_pdu_list
=
NULL
;
}
free
(
req
);
req
=
NULL
;
return
-
1
;
return
-
1
;
}
}
...
@@ -1053,6 +1062,7 @@ int deallocate_mem_nfapi_dl(nfapi_dl_config_request_t* req, nfapi_tx_request_pdu
...
@@ -1053,6 +1062,7 @@ int deallocate_mem_nfapi_dl(nfapi_dl_config_request_t* req, nfapi_tx_request_pdu
int
hi_dci0_req_UE_MAC
(
nfapi_hi_dci0_request_t
*
req
)
int
hi_dci0_req_UE_MAC
(
nfapi_hi_dci0_request_t
*
req
)
{
{
if
(
req
!=
NULL
&&
req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
!=
NULL
){
LOG_D
(
PHY
,
"[UE-PHY_STUB] hi dci0 request sfn_sf:%d number_of_dci:%d number_of_hi:%d
\n
"
,
NFAPI_SFNSF2DEC
(
req
->
sfn_sf
),
req
->
hi_dci0_request_body
.
number_of_dci
,
req
->
hi_dci0_request_body
.
number_of_hi
);
LOG_D
(
PHY
,
"[UE-PHY_STUB] hi dci0 request sfn_sf:%d number_of_dci:%d number_of_hi:%d
\n
"
,
NFAPI_SFNSF2DEC
(
req
->
sfn_sf
),
req
->
hi_dci0_request_body
.
number_of_dci
,
req
->
hi_dci0_request_body
.
number_of_hi
);
//phy_info* phy = (phy_info*)(pnf_p7->user_data);
//phy_info* phy = (phy_info*)(pnf_p7->user_data);
...
@@ -1073,12 +1083,13 @@ int hi_dci0_req_UE_MAC(nfapi_hi_dci0_request_t* req)
...
@@ -1073,12 +1083,13 @@ int hi_dci0_req_UE_MAC(nfapi_hi_dci0_request_t* req)
}
}
else
if
(
req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
[
i
].
pdu_type
==
NFAPI_HI_DCI0_HI_PDU_TYPE
)
else
if
(
req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
[
i
].
pdu_type
==
NFAPI_HI_DCI0_HI_PDU_TYPE
)
{
{
LOG_
D
(
PHY
,
"[UE-PHY_STUB] HI_DCI0_REQ sfn_sf:%d PDU[%d] - NFAPI_HI_DCI0_HI_PDU_TYPE
\n
"
,
NFAPI_SFNSF2DEC
(
req
->
sfn_sf
),
i
);
LOG_
I
(
MAC
,
"[UE-PHY_STUB] HI_DCI0_REQ sfn_sf:%d PDU[%d] - NFAPI_HI_DCI0_HI_PDU_TYPE
\n
"
,
NFAPI_SFNSF2DEC
(
req
->
sfn_sf
),
i
);
nfapi_hi_dci0_request_pdu_t
*
hi_dci0_req_pdu
=
&
req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
[
i
];
nfapi_hi_dci0_request_pdu_t
*
hi_dci0_req_pdu
=
&
req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
[
i
];
// This is meaningful only after ACKnowledging the first ULSCH Txon (i.e. Msg3)
// This is meaningful only after ACKnowledging the first ULSCH Txon (i.e. Msg3)
if
(
hi_dci0_req_pdu
->
hi_pdu
.
hi_pdu_rel8
.
hi_value
==
1
&&
UE_mac_inst
[
Mod_id
].
first_ULSCH_Tx
==
1
){
if
(
hi_dci0_req_pdu
->
hi_pdu
.
hi_pdu_rel8
.
hi_value
==
1
&&
UE_mac_inst
[
Mod_id
].
first_ULSCH_Tx
==
1
){
LOG_I
(
MAC
,
"[UE-PHY_STUB] HI_DCI0_REQ 2 sfn_sf:%d PDU[%d] - NFAPI_HI_DCI0_HI_PDU_TYPE
\n
"
,
NFAPI_SFNSF2DEC
(
req
->
sfn_sf
),
i
);
UE_mac_inst
[
Mod_id
].
UE_mode
[
0
]
=
PUSCH
;
UE_mac_inst
[
Mod_id
].
UE_mode
[
0
]
=
PUSCH
;
UE_mac_inst
[
Mod_id
].
first_ULSCH_Tx
=
0
;
UE_mac_inst
[
Mod_id
].
first_ULSCH_Tx
=
0
;
}
}
...
@@ -1090,6 +1101,19 @@ int hi_dci0_req_UE_MAC(nfapi_hi_dci0_request_t* req)
...
@@ -1090,6 +1101,19 @@ int hi_dci0_req_UE_MAC(nfapi_hi_dci0_request_t* req)
}
}
}
}
/*if(req->hi_dci0_request_body.hi_dci0_pdu_list!=NULL){
free(req->hi_dci0_request_body.hi_dci0_pdu_list);
req->hi_dci0_request_body.hi_dci0_pdu_list = NULL;
}
free(req);
req = NULL;*/
}
/*else if(req!=NULL){
free(req);
req = NULL;
}*/
return
0
;
return
0
;
}
}
...
@@ -1101,6 +1125,7 @@ int hi_dci0_req_UE_MAC(nfapi_hi_dci0_request_t* req)
...
@@ -1101,6 +1125,7 @@ int hi_dci0_req_UE_MAC(nfapi_hi_dci0_request_t* req)
// pnf_p7_subframe_ind.
// pnf_p7_subframe_ind.
int
memcpy_dl_config_req
(
nfapi_pnf_p7_config_t
*
pnf_p7
,
nfapi_dl_config_request_t
*
req
)
int
memcpy_dl_config_req
(
nfapi_pnf_p7_config_t
*
pnf_p7
,
nfapi_dl_config_request_t
*
req
)
{
{
//LOG_I(MAC, "Panos-D: memcpy_dl_config_req 1");
module_id_t
Mod_id
=
0
;
//Panos: Currently static (only for one UE) but this should change.
module_id_t
Mod_id
=
0
;
//Panos: Currently static (only for one UE) but this should change.
UE_mac_inst
[
Mod_id
].
dl_config_req
=
(
nfapi_dl_config_request_t
*
)
malloc
(
sizeof
(
nfapi_dl_config_request_t
));
UE_mac_inst
[
Mod_id
].
dl_config_req
=
(
nfapi_dl_config_request_t
*
)
malloc
(
sizeof
(
nfapi_dl_config_request_t
));
...
@@ -1163,6 +1188,7 @@ int memcpy_ul_config_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request
...
@@ -1163,6 +1188,7 @@ int memcpy_ul_config_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request
}
}
//UE_mac_inst[Mod_id].ul_config_req = req;
//UE_mac_inst[Mod_id].ul_config_req = req;
return
0
;
return
0
;
}
}
...
@@ -1212,6 +1238,8 @@ int memcpy_tx_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req)
...
@@ -1212,6 +1238,8 @@ int memcpy_tx_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req)
int
memcpy_hi_dci0_req
(
nfapi_pnf_p7_config_t
*
pnf_p7
,
nfapi_hi_dci0_request_t
*
req
)
int
memcpy_hi_dci0_req
(
nfapi_pnf_p7_config_t
*
pnf_p7
,
nfapi_hi_dci0_request_t
*
req
)
{
{
//if(req!=0){
module_id_t
Mod_id
=
0
;
//Panos: Currently static (only for one UE) but this should change.
module_id_t
Mod_id
=
0
;
//Panos: Currently static (only for one UE) but this should change.
UE_mac_inst
[
Mod_id
].
hi_dci0_req
=
(
nfapi_hi_dci0_request_t
*
)
malloc
(
sizeof
(
nfapi_hi_dci0_request_t
));
UE_mac_inst
[
Mod_id
].
hi_dci0_req
=
(
nfapi_hi_dci0_request_t
*
)
malloc
(
sizeof
(
nfapi_hi_dci0_request_t
));
...
@@ -1222,11 +1250,21 @@ int memcpy_hi_dci0_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t*
...
@@ -1222,11 +1250,21 @@ int memcpy_hi_dci0_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t*
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
number_of_hi
=
req
->
hi_dci0_request_body
.
number_of_hi
;
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
number_of_hi
=
req
->
hi_dci0_request_body
.
number_of_hi
;
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
sfnsf
=
req
->
hi_dci0_request_body
.
sfnsf
;
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
sfnsf
=
req
->
hi_dci0_request_body
.
sfnsf
;
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
tl
=
req
->
hi_dci0_request_body
.
tl
;
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
tl
=
req
->
hi_dci0_request_body
.
tl
;
int
total_pdus
=
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
number_of_dci
+
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
number_of_dci
;
int
total_pdus
=
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
number_of_dci
+
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
number_of_hi
;
LOG_I
(
MAC
,
"Original hi_dci0 req. #:%d, Copy #: %d
\n
"
,
req
->
hi_dci0_request_body
.
number_of_dci
+
req
->
hi_dci0_request_body
.
number_of_hi
,
total_pdus
);
//(nfapi_ul_config_request_pdu_t*) malloc(req->ul_config_request_body.number_of_pdus*sizeof(nfapi_ul_config_request_pdu_t));
//(nfapi_ul_config_request_pdu_t*) malloc(req->ul_config_request_body.number_of_pdus*sizeof(nfapi_ul_config_request_pdu_t));
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
=
(
nfapi_hi_dci0_request_pdu_t
*
)
malloc
(
total_pdus
*
sizeof
(
nfapi_hi_dci0_request_pdu_t
));
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
=
(
nfapi_hi_dci0_request_pdu_t
*
)
malloc
(
total_pdus
*
sizeof
(
nfapi_hi_dci0_request_pdu_t
));
for
(
int
i
=
0
;
i
<
total_pdus
;
i
++
){
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
[
i
]
=
req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
[
i
];
LOG_I
(
MAC
,
"Original hi_dci0 req. type:%d, Copy type: %d
\n
"
,
req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
[
i
].
pdu_type
,
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
[
i
].
pdu_type
);
}
//}
//else
// LOG_I(MAC, "Panos-D: Dummy HI_DCI0");
LOG_I
(
MAC
,
"Panos-D: memcpy_hi_dci0_req 2
\n
"
);
LOG_I
(
MAC
,
"Panos-D: memcpy_hi_dci0_req 2
\n
"
);
//module_id_t Mod_id = 0; //Panos: Currently static (only for one UE) but this should change.
//module_id_t Mod_id = 0; //Panos: Currently static (only for one UE) but this should change.
//UE_mac_inst[Mod_id].hi_dci0_req = req;
//UE_mac_inst[Mod_id].hi_dci0_req = req;
...
...
targets/RT/USER/lte-ue.c
View file @
507c1ea9
...
@@ -936,10 +936,22 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
...
@@ -936,10 +936,22 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
//LOG_I( MAC, "Panos-D: UE_phy_stub_thread_rxn_txnp4 after oai_subframe_ind 3 \n");
//LOG_I( MAC, "Panos-D: UE_phy_stub_thread_rxn_txnp4 after oai_subframe_ind 3 \n");
dl_config_req_UE_MAC
(
UE_mac_inst
[
Mod_id
].
dl_config_req
);
dl_config_req_UE_MAC
(
UE_mac_inst
[
Mod_id
].
dl_config_req
);
}
}
if
(
UE_mac_inst
[
Mod_id
].
hi_dci0_req
!=
NULL
){
//if(UE_mac_inst[Mod_id].hi_dci0_req!= NULL){
LOG_I
(
MAC
,
"Panos-D: UE_phy_stub_thread_rxn_txnp4 after oai_subframe_ind 4
\n
"
);
if
(
UE_mac_inst
[
Mod_id
].
hi_dci0_req
!=
NULL
&&
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
!=
NULL
){
hi_dci0_req_UE_MAC
(
UE_mac_inst
[
Mod_id
].
hi_dci0_req
);
LOG_I
(
MAC
,
"Panos-D: UE_phy_stub_thread_rxn_txnp4 after oai_subframe_ind 4
\n
"
);
hi_dci0_req_UE_MAC
(
UE_mac_inst
[
Mod_id
].
hi_dci0_req
);
//if(UE_mac_inst[Mod_id].hi_dci0_req->hi_dci0_request_body.hi_dci0_pdu_list!=NULL){
free
(
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
);
UE_mac_inst
[
Mod_id
].
hi_dci0_req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
=
NULL
;
//}
free
(
UE_mac_inst
[
Mod_id
].
hi_dci0_req
);
UE_mac_inst
[
Mod_id
].
hi_dci0_req
=
NULL
;
}
}
else
if
(
UE_mac_inst
[
Mod_id
].
hi_dci0_req
!=
NULL
){
free
(
UE_mac_inst
[
Mod_id
].
hi_dci0_req
);
UE_mac_inst
[
Mod_id
].
hi_dci0_req
=
NULL
;
}
//stop_meas(&UE->timer_stats);
//stop_meas(&UE->timer_stats);
//t_diff = get_time_meas_us(&UE->timer_stats);
//t_diff = get_time_meas_us(&UE->timer_stats);
//LOG_E(MAC," Panos-D Absolute time: %f\n", t_diff);
//LOG_E(MAC," Panos-D Absolute time: %f\n", t_diff);
...
@@ -1030,23 +1042,6 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
...
@@ -1030,23 +1042,6 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
UE_mac_inst
[
Mod_id
].
ul_config_req
=
NULL
;
UE_mac_inst
[
Mod_id
].
ul_config_req
=
NULL
;
}
}
}
}
/*else{
AssertFatal(UE_mac_inst[Mod_id].ul_config_req!= NULL, "Panos-D: Copy of ul_config_req is NULL");
}*/
//>>>>>>> Stashed changes
/*if ((subframe_select( &UE->frame_parms, proc->subframe_tx) == SF_UL) ||
(UE->frame_parms.frame_type == FDD) )
if (UE->mode != loop_through_memory){
// Panos: Substitute call to phy_procedures Tx with call to phy_stub functions in order to trigger
// UE Tx procedures directly at the MAC layer, based on the received ul_config requests from the vnf (eNB).
// Generate UL_indications which corresponf to UL traffic.
if(UE_mac_inst[Mod_id].ul_config_req!= NULL){
ul_config_req_UE_MAC(UE_mac_inst[Mod_id].ul_config_req);
UL_indication(UL_INFO);
}
}*/
phy_procedures_UE_SL_RX
(
UE
,
proc
);
phy_procedures_UE_SL_RX
(
UE
,
proc
);
...
...
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