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
5db290dd
Commit
5db290dd
authored
4 years ago
by
Andrew Burger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Need to fix these carriage returns but here are some important changes
parent
b397bc44
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
226 additions
and
188 deletions
+226
-188
nfapi/oai_integration/nfapi_vnf.c
nfapi/oai_integration/nfapi_vnf.c
+28
-3
nfapi/open-nFAPI/nfapi/src/nfapi.c
nfapi/open-nFAPI/nfapi/src/nfapi.c
+1
-1
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
+171
-166
openair2/PHY_INTERFACE/IF_Module.c
openair2/PHY_INTERFACE/IF_Module.c
+15
-10
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+6
-3
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+5
-5
No files found.
nfapi/oai_integration/nfapi_vnf.c
View file @
5db290dd
...
...
@@ -435,7 +435,7 @@ int phy_subframe_indication(struct nfapi_vnf_p7_config *config, uint16_t phy_id,
}
int
phy_rach_indication
(
struct
nfapi_vnf_p7_config
*
config
,
nfapi_rach_indication_t
*
ind
)
{
LOG_
D
(
MAC
,
"%s() NFAPI SFN/SF:%d number_of_preambles:%u
\n
"
,
__FUNCTION__
,
NFAPI_SFNSF2DEC
(
ind
->
sfn_sf
),
ind
->
rach_indication_body
.
number_of_preambles
);
LOG_
I
(
MAC
,
"%s() NFAPI SFN/SF:%d number_of_preambles:%u
\n
"
,
__FUNCTION__
,
NFAPI_SFNSF2DEC
(
ind
->
sfn_sf
),
ind
->
rach_indication_body
.
number_of_preambles
);
struct
PHY_VARS_eNB_s
*
eNB
=
RC
.
eNB
[
0
][
0
];
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
);
...
...
@@ -454,7 +454,7 @@ int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indicatio
UL_RCC_INFO
.
rach_ind
[
index
]
=
*
ind
;
if
(
ind
->
rach_indication_body
.
number_of_preambles
>
0
)
UL_RCC_INFO
.
rach_ind
[
index
].
rach_indication_body
.
preamble_list
=
malloc
(
sizeof
(
nfapi_preamble_pdu_t
)
*
ind
->
rach_indication_body
.
number_of_preambles
);
UL_RCC_INFO
.
rach_ind
[
index
].
rach_indication_body
.
preamble_list
=
malloc
(
sizeof
(
nfapi_preamble_pdu_t
)
*
ind
->
rach_indication_body
.
number_of_preambles
);
for
(
int
i
=
0
;
i
<
ind
->
rach_indication_body
.
number_of_preambles
;
i
++
)
{
if
(
ind
->
rach_indication_body
.
preamble_list
[
i
].
preamble_rel8
.
tl
.
tag
==
NFAPI_PREAMBLE_REL8_TAG
)
{
...
...
@@ -501,7 +501,7 @@ int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indicatio
int
phy_harq_indication
(
struct
nfapi_vnf_p7_config
*
config
,
nfapi_harq_indication_t
*
ind
)
{
struct
PHY_VARS_eNB_s
*
eNB
=
RC
.
eNB
[
0
][
0
];
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
);
LOG_
I
(
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
=
NFAPI_SFNSF2SF
(
ind
->
sfn_sf
);
...
...
@@ -596,6 +596,31 @@ int phy_crc_indication(struct nfapi_vnf_p7_config *config, nfapi_crc_indication_
return
1
;
}
const
char
*
hexdump
(
const
void
*
data
,
size_t
data_len
,
char
*
out
,
size_t
out_len
)
{
char
*
p
=
out
;
char
*
endp
=
out
+
out_len
;
const
uint8_t
*
q
=
data
;
snprintf
(
p
,
endp
-
p
,
"[%zu]"
,
data_len
);
p
+=
strlen
(
p
);
for
(
size_t
i
=
0
;
i
<
data_len
;
++
i
)
{
if
(
p
>=
endp
)
{
static
const
char
ellipses
[]
=
"..."
;
char
*
s
=
endp
-
sizeof
(
ellipses
);
if
(
s
>=
p
)
{
strcpy
(
s
,
ellipses
);
}
break
;
}
snprintf
(
p
,
endp
-
p
,
" %02X"
,
*
q
++
);
p
+=
strlen
(
p
);
}
return
out
;
}
int
phy_rx_indication
(
struct
nfapi_vnf_p7_config
*
config
,
nfapi_rx_indication_t
*
ind
)
{
struct
PHY_VARS_eNB_s
*
eNB
=
RC
.
eNB
[
0
][
0
];
...
...
This diff is collapsed.
Click to expand it.
nfapi/open-nFAPI/nfapi/src/nfapi.c
View file @
5db290dd
...
...
@@ -860,7 +860,7 @@ int unpack_p7_tlv_list(unpack_p7_tlv_t unpack_fns[], uint16_t size, uint8_t **pp
if
(
tagMatch
==
0
)
{
if
(
generic_tl
.
tag
>=
NFAPI_VENDOR_EXTENSION_MIN_TAG_VALUE
&&
if
(
generic_tl
.
tag
>=
NFAPI_VENDOR_EXTENSION_MIN_TAG_VALUE
&&
generic_tl
.
tag
<=
NFAPI_VENDOR_EXTENSION_MAX_TAG_VALUE
)
{
int
result
=
unpack_p7_vendor_extension_tlv
(
&
generic_tl
,
ppReadPackedMsg
,
end
,
config
,
ve
);
...
...
This diff is collapsed.
Click to expand it.
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
View file @
5db290dd
This diff is collapsed.
Click to expand it.
openair2/PHY_INTERFACE/IF_Module.c
View file @
5db290dd
...
...
@@ -26,12 +26,15 @@ void handle_rach(UL_IND_t *UL_info) {
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
));
if
(
UL_RCC_INFO
.
rach_ind
[
j
].
rach_indication_body
.
number_of_preambles
>
1
)
{
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
);
LOG_I
(
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
,
...
...
@@ -700,12 +703,14 @@ 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_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
,
UL_info
->
cqi_ind
.
cqi_indication_body
.
number_of_cqis
,
UL_info
->
rach_ind
.
rach_indication_body
.
number_of_preambles
,
UL_info
->
sr_ind
.
sr_indication_body
.
number_of_srs
);
if
(
UL_info
->
subframe
==
3
)
{
LOG_I
(
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
,
UL_info
->
cqi_ind
.
cqi_indication_body
.
number_of_cqis
,
UL_info
->
rach_ind
.
rach_indication_body
.
number_of_preambles
,
UL_info
->
sr_ind
.
sr_indication_body
.
number_of_srs
);
}
if
(
UL_info
->
frame
==
1023
&&
UL_info
->
subframe
==
6
)
{
// dl scheduling (0,0)
frame_cnt
=
(
frame_cnt
+
1
)
%
7
;
// to prevent frame_cnt get too big
LOG_D
(
MAC
,
"current (%d,%d) frame count dl is %d
\n
"
,
UL_info
->
frame
,
UL_info
->
subframe
,
frame_cnt
);
...
...
This diff is collapsed.
Click to expand it.
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
5db290dd
...
...
@@ -534,6 +534,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
rnti
,
index
,
ul_config_req
);
fill_ulsch_cqi_indication_UE_MAC
(
Mod_id
,
frame
,
subframe
,
UL_INFO
,
rnti
);
}
}
if
(
ulsch_harq_information
!=
NULL
)
...
...
@@ -575,6 +576,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
rnti
,
index
,
ul_config_req
);
fill_ulsch_cqi_indication_UE_MAC
(
Mod_id
,
frame
,
subframe
,
UL_INFO
,
rnti
);
}
}
}
else
if
(
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE
)
{
...
...
@@ -614,6 +616,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
rnti
,
index
,
ul_config_req
);
fill_ulsch_cqi_indication_UE_MAC
(
Mod_id
,
frame
,
subframe
,
UL_INFO
,
rnti
);
}
}
...
...
@@ -912,7 +915,6 @@ void hi_dci0_req_UE_MAC(int sfn,
return
;
for
(
int
ue_id
=
0
;
ue_id
<
num_ue
;
ue_id
++
)
{
if
(
dci
->
rnti
==
UE_mac_inst
[
ue_id
].
crnti
)
{
fill_ulsch_cqi_indication_UE_MAC
(
ue_id
,
sfn
,
sf
,
UL_INFO
,
dci
->
rnti
);
return
;
}
}
...
...
@@ -1319,8 +1321,9 @@ const char *hexdump(const void *data, size_t data_len, char *out, size_t out_len
break
;
case
NFAPI_RX_ULSCH_INDICATION
:
// is this the right nfapi message_id? Ask Raymond
encoded_size
=
nfapi_p7_message_pack
(
&
UL
->
rx_ind
,
buffer
,
sizeof
(
buffer
),
NULL
);
LOG_E
(
MAC
,
"RX_IND sent to Proxy, Size: %d Frame %d Subframe %d
\n
"
,
encoded_size
,
NFAPI_SFNSF2SFN
(
UL
->
rx_ind
.
sfn_sf
),
NFAPI_SFNSF2SF
(
UL
->
rx_ind
.
sfn_sf
));
LOG_E
(
MAC
,
"RX_IND sent to Proxy, Size: %d Frame %d Subframe %d rx_ind.tl.length: %u vdorext: %p
\n
"
,
encoded_size
,
NFAPI_SFNSF2SFN
(
UL
->
rx_ind
.
sfn_sf
),
NFAPI_SFNSF2SF
(
UL
->
rx_ind
.
sfn_sf
),
UL
->
rx_ind
.
rx_indication_body
.
tl
.
length
,
UL
->
rx_ind
.
vendor_extension
);
break
;
case
NFAPI_RX_CQI_INDICATION
:
// is this the right nfapi message_id? Ask Raymond
encoded_size
=
nfapi_p7_message_pack
(
&
UL
->
cqi_ind
,
buffer
,
sizeof
(
buffer
),
NULL
);
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ue.c
View file @
5db290dd
...
...
@@ -1044,24 +1044,24 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
nfapi_ul_config_request_t
*
ul_config_req
=
get_queue
(
&
ul_config_req_queue
);
nfapi_hi_dci0_request_t
*
hi_dci0_req
=
get_queue
(
&
hi_dci0_req_queue
);
LOG_
I
(
MAC
,
"received from proxy frame %d subframe %d
\n
"
,
LOG_
D
(
MAC
,
"received from proxy frame %d subframe %d
\n
"
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
NFAPI_SFNSF2SF
(
sfn_sf
));
if
(
dl_config_req
!=
NULL
)
{
LOG_
I
(
MAC
,
"dl_config_req pdus: %u Frame: %d Subframe: %d
\n
"
,
LOG_
D
(
MAC
,
"dl_config_req pdus: %u Frame: %d Subframe: %d
\n
"
,
dl_config_req
->
dl_config_request_body
.
number_pdu
,
NFAPI_SFNSF2SFN
(
dl_config_req
->
sfn_sf
),
NFAPI_SFNSF2SF
(
dl_config_req
->
sfn_sf
));
}
if
(
tx_request_pdu_list
!=
NULL
)
{
LOG_
I
(
MAC
,
"tx_req segments: %u
\n
"
,
LOG_
D
(
MAC
,
"tx_req segments: %u
\n
"
,
tx_request_pdu_list
->
num_segments
);
}
if
(
ul_config_req
!=
NULL
)
{
LOG_
I
(
MAC
,
"ul_config_req pdus: %u Frame: %d Subframe: %d
\n
"
,
LOG_
D
(
MAC
,
"ul_config_req pdus: %u Frame: %d Subframe: %d
\n
"
,
ul_config_req
->
ul_config_request_body
.
number_of_pdus
,
NFAPI_SFNSF2SFN
(
ul_config_req
->
sfn_sf
),
NFAPI_SFNSF2SF
(
ul_config_req
->
sfn_sf
));
}
if
(
hi_dci0_req
!=
NULL
)
{
LOG_
I
(
MAC
,
"hi_dci0_req pdus: %u Frame: %d Subframe: %d
\n
"
,
LOG_
D
(
MAC
,
"hi_dci0_req pdus: %u Frame: %d Subframe: %d
\n
"
,
hi_dci0_req
->
hi_dci0_request_body
.
number_of_dci
,
NFAPI_SFNSF2SFN
(
hi_dci0_req
->
sfn_sf
),
NFAPI_SFNSF2SF
(
hi_dci0_req
->
sfn_sf
));
}
...
...
This diff is collapsed.
Click to expand it.
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