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
wangjie
OpenXG-RAN
Commits
6210519d
Commit
6210519d
authored
Jun 15, 2021
by
Mahesh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix - UL info filling
parent
e93df004
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
593 additions
and
437 deletions
+593
-437
nfapi/oai_integration/nfapi_vnf.c
nfapi/oai_integration/nfapi_vnf.c
+98
-1
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
+107
-91
nfapi/open-nFAPI/vnf/public_inc/nfapi_vnf_interface.h
nfapi/open-nFAPI/vnf/public_inc/nfapi_vnf_interface.h
+9
-1
nfapi/open-nFAPI/vnf/src/vnf_p7.c
nfapi/open-nFAPI/vnf/src/vnf_p7.c
+379
-344
No files found.
nfapi/oai_integration/nfapi_vnf.c
View file @
6210519d
...
@@ -596,7 +596,7 @@ extern pthread_mutex_t nfapi_sync_mutex;
...
@@ -596,7 +596,7 @@ extern pthread_mutex_t nfapi_sync_mutex;
extern
int
nfapi_sync_var
;
extern
int
nfapi_sync_var
;
int
phy_sync_indication
(
struct
nfapi_vnf_p7_config
*
config
,
uint8_t
sync
)
{
int
phy_sync_indication
(
struct
nfapi_vnf_p7_config
*
config
,
uint8_t
sync
)
{
printf
(
"[VNF] SYNC %s
\n
"
,
sync
==
1
?
"ACHIEVED"
:
"LOST"
);
//
printf("[VNF] SYNC %s\n", sync==1 ? "ACHIEVED" : "LOST");
if
(
sync
==
1
&&
nfapi_sync_var
!=
0
)
{
if
(
sync
==
1
&&
nfapi_sync_var
!=
0
)
{
...
@@ -1014,6 +1014,98 @@ int phy_cqi_indication(struct nfapi_vnf_p7_config *config, nfapi_cqi_indication_
...
@@ -1014,6 +1014,98 @@ int phy_cqi_indication(struct nfapi_vnf_p7_config *config, nfapi_cqi_indication_
return
1
;
return
1
;
}
}
//NR phy indication
int
phy_nr_crc_indication
(
nfapi_nr_crc_indication_t
*
ind
)
{
struct
PHY_VARS_gNB_s
*
gNB
=
RC
.
gNB
[
0
];
pthread_mutex_lock
(
&
gNB
->
UL_INFO_mutex
);
ind
->
number_crcs
=
1
;
if
(
ind
->
number_crcs
>
0
)
gNB
->
UL_INFO
.
crc_ind
.
crc_list
=
malloc
(
sizeof
(
nfapi_nr_crc_t
)
*
ind
->
number_crcs
);
for
(
int
i
=
0
;
i
<
ind
->
number_crcs
;
i
++
)
memcpy
(
&
gNB
->
UL_INFO
.
crc_ind
.
crc_list
[
i
],
&
ind
->
crc_list
[
i
],
sizeof
(
ind
->
crc_list
[
0
]));
pthread_mutex_unlock
(
&
gNB
->
UL_INFO_mutex
);
return
1
;
}
int
phy_nr_rx_data_indication
(
nfapi_nr_rx_data_indication_t
*
ind
)
{
struct
PHY_VARS_gNB_s
*
gNB
=
RC
.
gNB
[
0
];
pthread_mutex_lock
(
&
gNB
->
UL_INFO_mutex
);
if
(
ind
->
number_of_pdus
>
0
)
gNB
->
UL_INFO
.
rx_ind
.
pdu_list
=
malloc
(
sizeof
(
nfapi_nr_rx_data_pdu_t
)
*
ind
->
number_of_pdus
);
for
(
int
i
=
0
;
i
<
ind
->
number_of_pdus
;
i
++
)
memcpy
(
&
gNB
->
UL_INFO
.
rx_ind
.
pdu_list
[
i
],
&
ind
->
pdu_list
[
i
],
sizeof
(
ind
->
pdu_list
[
0
]));
pthread_mutex_unlock
(
&
gNB
->
UL_INFO_mutex
);
return
1
;
}
int
phy_nr_uci_indication
(
nfapi_nr_uci_indication_t
*
ind
)
{
struct
PHY_VARS_gNB_s
*
gNB
=
RC
.
gNB
[
0
];
pthread_mutex_lock
(
&
gNB
->
UL_INFO_mutex
);
if
(
ind
->
num_ucis
>
0
)
gNB
->
UL_INFO
.
uci_ind
.
uci_list
=
malloc
(
sizeof
(
nfapi_nr_uci_t
)
*
ind
->
num_ucis
);
for
(
int
i
=
0
;
i
<
ind
->
num_ucis
;
i
++
)
memcpy
(
&
gNB
->
UL_INFO
.
uci_ind
.
uci_list
[
i
],
&
ind
->
uci_list
[
i
],
sizeof
(
ind
->
uci_list
[
0
]));
pthread_mutex_unlock
(
&
gNB
->
UL_INFO_mutex
);
return
1
;
}
int
phy_nr_srs_indication
(
nfapi_nr_srs_indication_t
*
ind
)
{
struct
PHY_VARS_gNB_s
*
gNB
=
RC
.
gNB
[
0
];
pthread_mutex_lock
(
&
gNB
->
UL_INFO_mutex
);
if
(
ind
->
number_of_pdus
>
0
)
gNB
->
UL_INFO
.
srs_ind
.
pdu_list
=
malloc
(
sizeof
(
nfapi_nr_srs_indication_pdu_t
)
*
ind
->
number_of_pdus
);
for
(
int
i
=
0
;
i
<
ind
->
number_of_pdus
;
i
++
)
{
memcpy
(
&
gNB
->
UL_INFO
.
srs_ind
.
pdu_list
[
i
],
&
ind
->
pdu_list
[
i
],
sizeof
(
ind
->
pdu_list
[
0
]));
LOG_D
(
MAC
,
"%s() NFAPI SFN/Slot:%d.%d SRS_IND:number_of_pdus:%d UL_INFO:pdus:%d
\n
"
,
__FUNCTION__
,
ind
->
sfn
,
ind
->
slot
,
ind
->
number_of_pdus
,
gNB
->
UL_INFO
.
srs_ind
.
number_of_pdus
);
}
pthread_mutex_unlock
(
&
gNB
->
UL_INFO_mutex
);
return
1
;
}
int
phy_nr_rach_indication
(
nfapi_nr_rach_indication_t
*
ind
)
{
struct
PHY_VARS_gNB_s
*
gNB
=
RC
.
gNB
[
0
];
pthread_mutex_lock
(
&
gNB
->
UL_INFO_mutex
);
if
(
ind
->
number_of_pdus
>
0
)
gNB
->
UL_INFO
.
rach_ind
.
pdu_list
=
malloc
(
sizeof
(
nfapi_nr_prach_indication_pdu_t
)
*
ind
->
number_of_pdus
);
for
(
int
i
=
0
;
i
<
ind
->
number_of_pdus
;
i
++
)
{
memcpy
(
&
gNB
->
UL_INFO
.
rach_ind
.
pdu_list
[
i
],
&
ind
->
pdu_list
[
i
],
sizeof
(
ind
->
pdu_list
[
0
]));
LOG_D
(
MAC
,
"%s() NFAPI SFN/Slot:%d.%d RACH_IND:number_of_pdus:%d UL_INFO:pdus:%d
\n
"
,
__FUNCTION__
,
ind
->
sfn
,
ind
->
slot
,
ind
->
number_of_pdus
,
gNB
->
UL_INFO
.
rach_ind
.
number_of_pdus
);
}
pthread_mutex_unlock
(
&
gNB
->
UL_INFO_mutex
);
return
1
;
}
//end NR phy indication
int
phy_lbt_dl_indication
(
struct
nfapi_vnf_p7_config
*
config
,
nfapi_lbt_dl_indication_t
*
ind
)
{
int
phy_lbt_dl_indication
(
struct
nfapi_vnf_p7_config
*
config
,
nfapi_lbt_dl_indication_t
*
ind
)
{
// vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
// vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
//mac_lbt_dl_ind(p7_vnf->mac, ind);
//mac_lbt_dl_ind(p7_vnf->mac, ind);
...
@@ -1179,6 +1271,11 @@ void *vnf_nr_p7_thread_start(void *ptr) {
...
@@ -1179,6 +1271,11 @@ void *vnf_nr_p7_thread_start(void *ptr) {
p7_vnf
->
config
->
lbt_dl_indication
=
&
phy_lbt_dl_indication
;
p7_vnf
->
config
->
lbt_dl_indication
=
&
phy_lbt_dl_indication
;
p7_vnf
->
config
->
nb_harq_indication
=
&
phy_nb_harq_indication
;
p7_vnf
->
config
->
nb_harq_indication
=
&
phy_nb_harq_indication
;
p7_vnf
->
config
->
nrach_indication
=
&
phy_nrach_indication
;
p7_vnf
->
config
->
nrach_indication
=
&
phy_nrach_indication
;
p7_vnf
->
config
->
nr_crc_indication
=
&
phy_nr_crc_indication
;
p7_vnf
->
config
->
nr_rx_data_indication
=
&
phy_nr_rx_data_indication
;
p7_vnf
->
config
->
nr_uci_indication
=
&
phy_nr_uci_indication
;
p7_vnf
->
config
->
nr_rach_indication
=
&
phy_nr_rach_indication
;
p7_vnf
->
config
->
nr_srs_indication
=
&
phy_nr_srs_indication
;
p7_vnf
->
config
->
malloc
=
&
vnf_allocate
;
p7_vnf
->
config
->
malloc
=
&
vnf_allocate
;
p7_vnf
->
config
->
free
=
&
vnf_deallocate
;
p7_vnf
->
config
->
free
=
&
vnf_deallocate
;
p7_vnf
->
config
->
trace
=
&
vnf_trace
;
p7_vnf
->
config
->
trace
=
&
vnf_trace
;
...
...
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
View file @
6210519d
This diff is collapsed.
Click to expand it.
nfapi/open-nFAPI/vnf/public_inc/nfapi_vnf_interface.h
View file @
6210519d
...
@@ -853,6 +853,14 @@ typedef struct nfapi_vnf_p7_config
...
@@ -853,6 +853,14 @@ typedef struct nfapi_vnf_p7_config
*/
*/
int
(
*
nrach_indication
)(
struct
nfapi_vnf_p7_config
*
config
,
nfapi_nrach_indication_t
*
ind
);
int
(
*
nrach_indication
)(
struct
nfapi_vnf_p7_config
*
config
,
nfapi_nrach_indication_t
*
ind
);
//The NR indication functions below copy uplink information received at the VNF into the UL info struct
int
(
*
nr_crc_indication
)(
nfapi_nr_crc_indication_t
*
ind
);
int
(
*
nr_rx_data_indication
)(
nfapi_nr_rx_data_indication_t
*
ind
);
int
(
*
nr_uci_indication
)(
nfapi_nr_uci_indication_t
*
ind
);
int
(
*
nr_rach_indication
)(
nfapi_nr_rach_indication_t
*
ind
);
int
(
*
nr_srs_indication
)(
nfapi_nr_srs_indication_t
*
ind
);
/*! A callback for any vendor extension messages
/*! A callback for any vendor extension messages
* \param config A pointer to the vnf p7 configuration
* \param config A pointer to the vnf p7 configuration
* \param msg A data structure for the decoded vendor extention message allocated
* \param msg A data structure for the decoded vendor extention message allocated
...
...
nfapi/open-nFAPI/vnf/src/vnf_p7.c
View file @
6210519d
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