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
693b137e
Commit
693b137e
authored
Jun 03, 2021
by
Mahesh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix - UL_ind struct filled
parent
926acf7a
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
251 additions
and
106 deletions
+251
-106
nfapi/oai_integration/nfapi_vnf.c
nfapi/oai_integration/nfapi_vnf.c
+98
-10
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
+8
-0
nfapi/open-nFAPI/vnf/src/vnf_p7.c
nfapi/open-nFAPI/vnf/src/vnf_p7.c
+37
-4
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+1
-1
No files found.
nfapi/oai_integration/nfapi_vnf.c
View file @
693b137e
...
@@ -1020,6 +1020,98 @@ int phy_nrach_indication(struct nfapi_vnf_p7_config *config, nfapi_nrach_indicat
...
@@ -1020,6 +1020,98 @@ int phy_nrach_indication(struct nfapi_vnf_p7_config *config, nfapi_nrach_indicat
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
void
*
vnf_allocate
(
size_t
size
)
{
void
*
vnf_allocate
(
size_t
size
)
{
//return (void*)memory_pool::allocate(size);
//return (void*)memory_pool::allocate(size);
return
(
void
*
)
malloc
(
size
);
return
(
void
*
)
malloc
(
size
);
...
@@ -1157,16 +1249,12 @@ void *vnf_nr_p7_thread_start(void *ptr) {
...
@@ -1157,16 +1249,12 @@ void *vnf_nr_p7_thread_start(void *ptr) {
p7_vnf
->
config
->
sync_indication
=
&
phy_sync_indication
;
p7_vnf
->
config
->
sync_indication
=
&
phy_sync_indication
;
p7_vnf
->
config
->
slot_indication
=
&
phy_slot_indication
;
p7_vnf
->
config
->
slot_indication
=
&
phy_slot_indication
;
p7_vnf
->
config
->
harq_indication
=
&
phy_harq_indication
;
p7_vnf
->
config
->
nr_crc_indication
=
&
phy_nr_crc_indication
;
p7_vnf
->
config
->
crc_indication
=
&
phy_crc_indication
;
p7_vnf
->
config
->
nr_rx_data_indication
=
&
phy_nr_rx_data_indication
;
p7_vnf
->
config
->
rx_indication
=
&
phy_rx_indication
;
p7_vnf
->
config
->
nr_uci_indication
=
&
phy_nr_uci_indication
;
p7_vnf
->
config
->
rach_indication
=
&
phy_rach_indication
;
p7_vnf
->
config
->
nr_rach_indication
=
&
phy_nr_rach_indication
;
p7_vnf
->
config
->
srs_indication
=
&
phy_srs_indication
;
p7_vnf
->
config
->
nr_srs_indication
=
&
phy_nr_srs_indication
;
p7_vnf
->
config
->
sr_indication
=
&
phy_sr_indication
;
p7_vnf
->
config
->
cqi_indication
=
&
phy_cqi_indication
;
p7_vnf
->
config
->
lbt_dl_indication
=
&
phy_lbt_dl_indication
;
p7_vnf
->
config
->
nb_harq_indication
=
&
phy_nb_harq_indication
;
p7_vnf
->
config
->
nrach_indication
=
&
phy_nrach_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 @
693b137e
This diff is collapsed.
Click to expand it.
nfapi/open-nFAPI/vnf/public_inc/nfapi_vnf_interface.h
View file @
693b137e
...
@@ -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 @
693b137e
...
@@ -1472,7 +1472,13 @@ void vnf_handle_nr_rx_data_indication(void *pRecvMsg, int recvMsgLen, vnf_p7_t*
...
@@ -1472,7 +1472,13 @@ void vnf_handle_nr_rx_data_indication(void *pRecvMsg, int recvMsgLen, vnf_p7_t*
{
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
else
{
if
(
vnf_p7
->
_public
.
nr_rx_data_indication
)
{
(
vnf_p7
->
_public
.
nr_rx_data_indication
)(
&
ind
);
}
}
}
}
}
}
...
@@ -1491,7 +1497,15 @@ void vnf_handle_nr_crc_indication(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_
...
@@ -1491,7 +1497,15 @@ void vnf_handle_nr_crc_indication(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_
{
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
else
{
if
(
vnf_p7
->
_public
.
nr_crc_indication
)
{
//nfapi_nr_crc_indication_t temp = {};
//memset(&temp,1,sizeof(temp)); memset(temp.crc_list,1,sizeof(temp.crc_list[0]));
(
vnf_p7
->
_public
.
nr_crc_indication
)(
&
ind
);
}
}
}
}
}
}
...
@@ -1510,7 +1524,13 @@ void vnf_handle_nr_srs_indication(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_
...
@@ -1510,7 +1524,13 @@ void vnf_handle_nr_srs_indication(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_
{
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
else
{
if
(
vnf_p7
->
_public
.
nr_srs_indication
)
{
(
vnf_p7
->
_public
.
nr_srs_indication
)(
&
ind
);
}
}
}
}
}
}
...
@@ -1529,6 +1549,13 @@ void vnf_handle_nr_uci_indication(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_
...
@@ -1529,6 +1549,13 @@ void vnf_handle_nr_uci_indication(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_
{
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
else
{
if
(
vnf_p7
->
_public
.
nr_uci_indication
)
{
(
vnf_p7
->
_public
.
nr_uci_indication
)(
&
ind
);
}
}
}
}
}
}
...
@@ -1547,7 +1574,13 @@ void vnf_handle_nr_rach_indication(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf
...
@@ -1547,7 +1574,13 @@ void vnf_handle_nr_rach_indication(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf
{
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
else
{
if
(
vnf_p7
->
_public
.
nr_rach_indication
)
{
(
vnf_p7
->
_public
.
nr_rach_indication
)(
&
ind
);
}
}
}
}
}
}
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
693b137e
...
@@ -90,7 +90,7 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
...
@@ -90,7 +90,7 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
if
(
NFAPI_MODE
==
NFAPI_MODE_PNF
)
{
if
(
NFAPI_MODE
==
NFAPI_MODE_PNF
)
{
if
(
UL_info
->
uci_ind
.
num_ucis
>
0
)
{
if
(
UL_info
->
uci_ind
.
num_ucis
>
0
)
{
//LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf));
//LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf));
//
oai_nfapi_nr_uci_indication(&UL_info->uci_ind);
oai_nfapi_nr_uci_indication
(
&
UL_info
->
uci_ind
);
UL_info
->
uci_ind
.
num_ucis
=
0
;
UL_info
->
uci_ind
.
num_ucis
=
0
;
}
}
}
}
...
...
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