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
4e1f08fd
Commit
4e1f08fd
authored
Jul 22, 2020
by
Andrew Burger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debugging after msg4 Problem
parent
8c75f74c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
94 deletions
+99
-94
nfapi/oai_integration/nfapi_vnf.c
nfapi/oai_integration/nfapi_vnf.c
+72
-72
openair2/PHY_INTERFACE/IF_Module.c
openair2/PHY_INTERFACE/IF_Module.c
+27
-22
No files found.
nfapi/oai_integration/nfapi_vnf.c
View file @
4e1f08fd
...
...
@@ -440,17 +440,17 @@ int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indicatio
printf
(
"[VNF] RACH_IND eNB:%p sfn_sf:%d number_of_preambles:%d
\n
"
,
eNB
,
NFAPI_SFNSF2DEC
(
ind
->
sfn_sf
),
ind
->
rach_indication_body
.
number_of_preambles
);
pthread_mutex_lock
(
&
eNB
->
UL_INFO_mutex
);
if
(
NFAPI_MODE
==
NFAPI_MODE_VNF
){
int8_t
index
=
-
1
;
for
(
uint8_t
i
=
0
;
i
<
NUM_NFPAI_SUBFRAME
;
i
++
){
if
((
UL_RCC_INFO
.
rach_ind
[
i
].
header
.
message_id
==
0
)
&&
(
index
==
-
1
)){
index
=
i
;
break
;
}
}
if
(
index
==
-
1
){
LOG_E
(
MAC
,
"phy_rach_indication : num of rach reach max
\n
"
);
return
0
;
}
int8_t
index
=
NFAPI_SFNSF2SF
(
ind
->
sfn_sf
)
;
//
for(uint8_t i= 0;i< NUM_NFPAI_SUBFRAME;i++){
//
if((UL_RCC_INFO.rach_ind[i].header.message_id == 0) && (index == -1)){
//
index = i;
//
break;
//
}
//
}
//
if(index == -1){
//
LOG_E(MAC,"phy_rach_indication : num of rach reach max \n");
//
return 0;
//
}
UL_RCC_INFO
.
rach_ind
[
index
]
=
*
ind
;
if
(
ind
->
rach_indication_body
.
number_of_preambles
>
0
)
...
...
@@ -504,17 +504,17 @@ int phy_harq_indication(struct nfapi_vnf_p7_config *config, nfapi_harq_indicatio
LOG_D
(
MAC
,
"%s() NFAPI SFN/SF:%d number_of_harqs:%u
\n
"
,
__FUNCTION__
,
NFAPI_SFNSF2DEC
(
ind
->
sfn_sf
),
ind
->
harq_indication_body
.
number_of_harqs
);
pthread_mutex_lock
(
&
eNB
->
UL_INFO_mutex
);
if
(
NFAPI_MODE
==
NFAPI_MODE_VNF
){
int8_t
index
=
-
1
;
for
(
uint8_t
i
=
0
;
i
<
NUM_NFPAI_SUBFRAME
;
i
++
){
if
((
UL_RCC_INFO
.
harq_ind
[
i
].
header
.
message_id
==
0
)
&&
(
index
==
-
1
)){
index
=
i
;
break
;
}
}
if
(
index
==
-
1
){
LOG_E
(
MAC
,
"phy_harq_indication : num of harq reach max
\n
"
);
return
0
;
}
int8_t
index
=
NFAPI_SFNSF2SF
(
ind
->
sfn_sf
)
;
//
for(uint8_t i= 0;i< NUM_NFPAI_SUBFRAME;i++){
//
if((UL_RCC_INFO.harq_ind[i].header.message_id == 0) && (index == -1)){
//
index = i;
//
break;
//
}
//
}
//
if(index == -1){
//
LOG_E(MAC,"phy_harq_indication : num of harq reach max \n");
//
return 0;
//
}
UL_RCC_INFO
.
harq_ind
[
index
]
=
*
ind
;
if
(
ind
->
harq_indication_body
.
number_of_harqs
>
0
)
...
...
@@ -540,20 +540,20 @@ int phy_crc_indication(struct nfapi_vnf_p7_config *config, nfapi_crc_indication_
struct
PHY_VARS_eNB_s
*
eNB
=
RC
.
eNB
[
0
][
0
];
pthread_mutex_lock
(
&
eNB
->
UL_INFO_mutex
);
if
(
NFAPI_MODE
==
NFAPI_MODE_VNF
){
int8_t
index
=
-
1
;
for
(
uint8_t
i
=
0
;
i
<
NUM_NFPAI_SUBFRAME
;
i
++
){
if
((
UL_RCC_INFO
.
crc_ind
[
i
].
header
.
message_id
==
0
)
&&
(
index
==
-
1
)){
index
=
i
;
}
if
(
UL_RCC_INFO
.
rx_ind
[
i
].
sfn_sf
==
ind
->
sfn_sf
){
index
=
i
;
break
;
}
}
if
(
index
==
-
1
){
LOG_E
(
MAC
,
"phy_crc_indication : num of crc reach max
\n
"
);
return
0
;
}
int8_t
index
=
NFAPI_SFNSF2SF
(
ind
->
sfn_sf
)
;
//
for(uint8_t i= 0;i< NUM_NFPAI_SUBFRAME;i++){
//
if((UL_RCC_INFO.crc_ind[i].header.message_id == 0) && (index == -1)){
//
index = i;
//
}
//
if(UL_RCC_INFO.rx_ind[i].sfn_sf == ind->sfn_sf){
//
index = i;
//
break;
//
}
//
}
//
if(index == -1){
//
LOG_E(MAC,"phy_crc_indication : num of crc reach max \n");
//
return 0;
//
}
UL_RCC_INFO
.
crc_ind
[
index
]
=
*
ind
;
if
(
ind
->
crc_indication_body
.
number_of_crcs
>
0
)
...
...
@@ -605,20 +605,20 @@ int phy_rx_indication(struct nfapi_vnf_p7_config *config, nfapi_rx_indication_t
pthread_mutex_lock
(
&
eNB
->
UL_INFO_mutex
);
if
(
NFAPI_MODE
==
NFAPI_MODE_VNF
){
int8_t
index
=
-
1
;
for
(
uint8_t
i
=
0
;
i
<
NUM_NFPAI_SUBFRAME
;
i
++
){
if
((
UL_RCC_INFO
.
rx_ind
[
i
].
header
.
message_id
==
0
)
&&
(
index
==
-
1
)){
index
=
i
;
}
if
(
UL_RCC_INFO
.
crc_ind
[
i
].
sfn_sf
==
ind
->
sfn_sf
){
index
=
i
;
break
;
}
}
if
(
index
==
-
1
){
LOG_E
(
MAC
,
"phy_rx_indication : num of rx reach max
\n
"
);
return
0
;
}
int8_t
index
=
NFAPI_SFNSF2SF
(
ind
->
sfn_sf
)
;
//
for(uint8_t i= 0;i< NUM_NFPAI_SUBFRAME;i++){
//
if((UL_RCC_INFO.rx_ind[i].header.message_id == 0) && (index == -1)){
//
index = i;
//
}
//
if(UL_RCC_INFO.crc_ind[i].sfn_sf == ind->sfn_sf){
//
index = i;
//
break;
//
}
//
}
//
if(index == -1){
//
LOG_E(MAC,"phy_rx_indication : num of rx reach max \n");
//
return 0;
//
}
UL_RCC_INFO
.
rx_ind
[
index
]
=
*
ind
;
if
(
ind
->
rx_indication_body
.
number_of_pdus
>
0
)
...
...
@@ -691,17 +691,17 @@ int phy_sr_indication(struct nfapi_vnf_p7_config *config, nfapi_sr_indication_t
LOG_D
(
MAC
,
"%s() NFAPI SFN/SF:%d srs:%d
\n
"
,
__FUNCTION__
,
NFAPI_SFNSF2DEC
(
ind
->
sfn_sf
),
ind
->
sr_indication_body
.
number_of_srs
);
pthread_mutex_lock
(
&
eNB
->
UL_INFO_mutex
);
if
(
NFAPI_MODE
==
NFAPI_MODE_VNF
){
int8_t
index
=
-
1
;
for
(
uint8_t
i
=
0
;
i
<
NUM_NFPAI_SUBFRAME
;
i
++
){
if
((
UL_RCC_INFO
.
sr_ind
[
i
].
header
.
message_id
==
0
)
&&
(
index
==
-
1
)){
index
=
i
;
break
;
}
}
if
(
index
==
-
1
){
LOG_E
(
MAC
,
"phy_sr_indication : num of sr reach max
\n
"
);
return
0
;
}
int8_t
index
=
NFAPI_SFNSF2SF
(
ind
->
sfn_sf
)
;
//
for(uint8_t i= 0;i< NUM_NFPAI_SUBFRAME;i++){
//
if((UL_RCC_INFO.sr_ind[i].header.message_id == 0) && (index == -1)){
//
index = i;
//
break;
//
}
//
}
//
if(index == -1){
//
LOG_E(MAC,"phy_sr_indication : num of sr reach max \n");
//
return 0;
//
}
UL_RCC_INFO
.
sr_ind
[
index
]
=
*
ind
;
LOG_D
(
MAC
,
"%s() UL_INFO[%d].sr_ind.sr_indication_body.number_of_srs:%d
\n
"
,
__FUNCTION__
,
index
,
eNB
->
UL_INFO
.
sr_ind
.
sr_indication_body
.
number_of_srs
);
if
(
ind
->
sr_indication_body
.
number_of_srs
>
0
)
...
...
@@ -742,17 +742,17 @@ int phy_cqi_indication(struct nfapi_vnf_p7_config *config, nfapi_cqi_indication_
LOG_D
(
MAC
,
"%s() NFAPI SFN/SF:%d number_of_cqis:%u
\n
"
,
__FUNCTION__
,
NFAPI_SFNSF2DEC
(
ind
->
sfn_sf
),
ind
->
cqi_indication_body
.
number_of_cqis
);
pthread_mutex_lock
(
&
eNB
->
UL_INFO_mutex
);
if
(
NFAPI_MODE
==
NFAPI_MODE_VNF
){
int8_t
index
=
-
1
;
for
(
uint8_t
i
=
0
;
i
<
NUM_NFPAI_SUBFRAME
;
i
++
){
if
((
UL_RCC_INFO
.
cqi_ind
[
i
].
header
.
message_id
==
0
)
&&
(
index
==
-
1
)){
index
=
i
;
break
;
}
}
if
(
index
==
-
1
){
LOG_E
(
MAC
,
"phy_cqi_indication : num of cqi reach max
\n
"
);
return
0
;
}
int8_t
index
=
NFAPI_SFNSF2SF
(
ind
->
sfn_sf
)
;
//
for(uint8_t i= 0;i< NUM_NFPAI_SUBFRAME;i++){
//
if((UL_RCC_INFO.cqi_ind[i].header.message_id == 0) && (index == -1)){
//
index = i;
//
break;
//
}
//
}
//
if(index == -1){
//
LOG_E(MAC,"phy_cqi_indication : num of cqi reach max \n");
//
return 0;
//
}
UL_RCC_INFO
.
cqi_ind
[
index
]
=
*
ind
;
if
(
ind
->
cqi_indication_body
.
number_of_cqis
>
0
){
UL_RCC_INFO
.
cqi_ind
[
index
].
cqi_indication_body
.
cqi_pdu_list
=
malloc
(
sizeof
(
nfapi_cqi_indication_pdu_t
)
*
ind
->
cqi_indication_body
.
number_of_cqis
);
...
...
openair2/PHY_INTERFACE/IF_Module.c
View file @
4e1f08fd
...
...
@@ -22,12 +22,17 @@ extern UL_RCC_IND_t UL_RCC_INFO;
uint16_t
frame_cnt
=
0
;
void
handle_rach
(
UL_IND_t
*
UL_info
)
{
int
i
;
if
(
NFAPI_MODE
==
NFAPI_MODE_VNF
)
{
for
(
uint8_t
j
=
0
;
j
<
NUM_NFPAI_SUBFRAME
;
j
++
)
{
if
(
UL_RCC_INFO
.
rach_ind
[
j
].
rach_indication_body
.
number_of_preambles
>
0
)
{
AssertFatal
(
UL_RCC_INFO
.
rach_ind
[
j
].
rach_indication_body
.
number_of_preambles
==
1
,
"More than 1 preamble not supported
\n
"
);
LOG_D
(
MAC
,
"UL_info[Frame %d, Subframe %d] Calling initiate_ra_proc RACH:SFN/SF:%d
\n
"
,
UL_info
->
frame
,
UL_info
->
subframe
,
NFAPI_SFNSF2DEC
(
UL_RCC_INFO
.
rach_ind
[
j
].
sfn_sf
));
int
j
=
UL_info
->
subframe
;
if
(
NFAPI_MODE
==
NFAPI_MODE_VNF
)
{
LOG_I
(
MAC
,
"handle_rach j: %d UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles: %d
\n
"
,
j
,
UL_RCC_INFO
.
rach_ind
[
j
].
rach_indication_body
.
number_of_preambles
);
if
(
UL_RCC_INFO
.
rach_ind
[
j
].
rach_indication_body
.
number_of_preambles
>
0
)
{
LOG_E
(
MAC
,
"UL_info[Frame %d, Subframe %d] Calling initiate_ra_proc RACH:Frame: %d Subframe: %d
\n
"
,
UL_info
->
frame
,
UL_info
->
subframe
,
NFAPI_SFNSF2SFN
(
UL_RCC_INFO
.
rach_ind
[
j
].
sfn_sf
),
NFAPI_SFNSF2SF
(
UL_RCC_INFO
.
rach_ind
[
j
].
sfn_sf
));
AssertFatal
(
UL_RCC_INFO
.
rach_ind
[
j
].
rach_indication_body
.
number_of_preambles
==
1
,
"More than 1 preamble not supported
\n
"
);
// dump frame/sf and all things in UL_RCC_INFO
initiate_ra_proc
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
NFAPI_SFNSF2SFN
(
UL_RCC_INFO
.
rach_ind
[
j
].
sfn_sf
),
...
...
@@ -35,14 +40,14 @@ void handle_rach(UL_IND_t *UL_info) {
UL_RCC_INFO
.
rach_ind
[
j
].
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
preamble
,
UL_RCC_INFO
.
rach_ind
[
j
].
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
timing_advance
,
UL_RCC_INFO
.
rach_ind
[
j
].
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
rnti
,
0
);
0
);
free
(
UL_RCC_INFO
.
rach_ind
[
j
].
rach_indication_body
.
preamble_list
);
UL_RCC_INFO
.
rach_ind
[
j
].
rach_indication_body
.
number_of_preambles
=
0
;
UL_RCC_INFO
.
rach_ind
[
j
].
header
.
message_id
=
0
;
}
}
}
else
{
else
{
if
(
UL_info
->
rach_ind
.
rach_indication_body
.
number_of_preambles
>
0
)
{
AssertFatal
(
UL_info
->
rach_ind
.
rach_indication_body
.
number_of_preambles
==
1
,
"More than 1 preamble not supported
\n
"
);
UL_info
->
rach_ind
.
rach_indication_body
.
number_of_preambles
=
0
;
...
...
@@ -695,7 +700,7 @@ void UL_indication(UL_IND_t *UL_info, L1_rxtx_proc_t *proc) {
Sched_Rsp_t
*
sched_info
=
&
Sched_INFO
[
module_id
][
CC_id
];
IF_Module_t
*
ifi
=
if_inst
[
module_id
];
eNB_MAC_INST
*
mac
=
RC
.
mac
[
module_id
];
LOG_
D
(
PHY
,
"SFN/SF:%d%d module_id:%d CC_id:%d UL_info[rx_ind:%d harqs:%d crcs:%d cqis:%d preambles:%d sr_ind:%d]
\n
"
,
LOG_
E
(
PHY
,
"SFN/SF:%d%d module_id:%d CC_id:%d UL_info[rx_ind:%d harqs:%d crcs:%d cqis:%d preambles:%d sr_ind:%d]
\n
"
,
UL_info
->
frame
,
UL_info
->
subframe
,
module_id
,
CC_id
,
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
,
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
,
UL_info
->
crc_ind
.
crc_indication_body
.
number_of_crcs
,
...
...
@@ -787,7 +792,7 @@ IF_Module_t *IF_Module_init(int Mod_id) {
AssertFatal
(
pthread_mutex_init
(
&
if_inst
[
Mod_id
]
->
if_mutex
,
NULL
)
==
0
,
"allocation of if_inst[%d]->if_mutex fails
\n
"
,
Mod_id
);
}
memset
(
&
UL_RCC_INFO
,
0
,
sizeof
(
UL_RCC_INFO
));
return
if_inst
[
Mod_id
];
}
...
...
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