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
ef56a5dd
Commit
ef56a5dd
authored
May 13, 2021
by
Deokseong "David" Kim
Committed by
Melissa
May 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nFAPI library update from IISc
parent
dc2865f3
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
898 additions
and
199 deletions
+898
-199
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
nfapi/oai_integration/nfapi_pnf.c
nfapi/oai_integration/nfapi_pnf.c
+33
-0
nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h
nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h
+1
-1
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
+6
-1
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
+684
-156
nfapi/open-nFAPI/pnf/inc/pnf.h
nfapi/open-nFAPI/pnf/inc/pnf.h
+2
-0
nfapi/open-nFAPI/pnf/inc/pnf_p7.h
nfapi/open-nFAPI/pnf/inc/pnf_p7.h
+2
-0
nfapi/open-nFAPI/pnf/src/pnf_p7_interface.c
nfapi/open-nFAPI/pnf/src/pnf_p7_interface.c
+62
-10
nfapi/open-nFAPI/vnf/public_inc/nfapi_vnf_interface.h
nfapi/open-nFAPI/vnf/public_inc/nfapi_vnf_interface.h
+1
-0
nfapi/open-nFAPI/vnf/src/vnf_p7.c
nfapi/open-nFAPI/vnf/src/vnf_p7.c
+106
-30
No files found.
cmake_targets/CMakeLists.txt
View file @
ef56a5dd
...
...
@@ -395,7 +395,7 @@ set (FIRMWARE_VERSION "No svn information")
add_definitions
(
"-DFIRMWARE_VERSION=
\"
${
FIRMWARE_VERSION
}
\"
"
)
add_definitions
(
"-DPACKAGE_VERSION=
\"
Branch:
${
GIT_BRANCH
}
Abrev. Hash:
${
GIT_COMMIT_HASH
}
Date:
${
GIT_COMMIT_DATE
}
\"
"
)
add_definitions
(
"-DPACKAGE_BUGREPORT=
\"
openair4g-devel@lists.eurecom.fr
\"
"
)
add_definitions
(
"-D
EMIT_ASN
_DEBUG=1"
)
add_definitions
(
"-D
ASN_EMIT
_DEBUG=1"
)
# Debug related options
...
...
nfapi/oai_integration/nfapi_pnf.c
View file @
ef56a5dd
...
...
@@ -2402,3 +2402,36 @@ int oai_nfapi_sr_indication(nfapi_sr_indication_t *ind) {
//free(ind.rx_indication_body.rx_pdu_list);
return
retval
;
}
//NR UPLINK INDICATION
int
oai_nfapi_nr_rx_data_indication
(
nfapi_nr_rx_data_indication_t
*
ind
)
{
ind
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
ind
->
header
.
message_id
=
NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION
;
return
nfapi_pnf_p7_nr_rx_data_ind
(
p7_config_g
,
ind
);
}
int
oai_nfapi_nr_crc_indication
(
nfapi_nr_crc_indication_t
*
ind
)
{
ind
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
ind
->
header
.
message_id
=
NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION
;
return
nfapi_pnf_p7_nr_crc_ind
(
p7_config_g
,
ind
);
}
int
oai_nfapi_nr_srs_indication
(
nfapi_nr_srs_indication_t
*
ind
)
{
ind
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
ind
->
header
.
message_id
=
NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION
;
return
nfapi_pnf_p7_nr_srs_ind
(
p7_config_g
,
ind
);
}
int
oai_nfapi_nr_uci_indication
(
nfapi_nr_uci_indication_t
*
ind
)
{
ind
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
ind
->
header
.
message_id
=
NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION
;
return
nfapi_pnf_p7_nr_uci_ind
(
p7_config_g
,
ind
);
}
int
oai_nfapi_nr_rach_indication
(
nfapi_nr_rach_indication_t
*
ind
)
{
ind
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
ind
->
header
.
message_id
=
NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION
;
return
nfapi_pnf_p7_nr_rach_ind
(
p7_config_g
,
ind
);
}
nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h
View file @
ef56a5dd
...
...
@@ -124,7 +124,7 @@ typedef struct {
// Convenience methods to convert between SFN/SLOT formats
#define NFAPI_SFNSLOT2DEC(_sfn,_slot) ( _sfn*20 + _slot ) // total count of slots
#define NFAPI_SFNSLOTDEC2SFNSLOT(_sfnslot_dec) ((((_sfnslot_dec) / 20) <<
4) | (((_sfnslot_dec) - (((_sfnslot_dec) / 20) * 1
0)) & 0x3F))
#define NFAPI_SFNSLOTDEC2SFNSLOT(_sfnslot_dec) ((((_sfnslot_dec) / 20) <<
6) | (((_sfnslot_dec) - (((_sfnslot_dec) / 20) * 2
0)) & 0x3F))
#define NFAPI_SFNSLOT2SFN(_sfnslot) ((_sfnslot) >> 6)
#define NFAPI_SFNSLOT2SLOT(_sfnslot) ((_sfnslot) & 0x3F)
...
...
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
View file @
ef56a5dd
...
...
@@ -1518,10 +1518,11 @@ typedef struct
typedef
struct
{
nfapi_p7_message_header_t
header
;
uint16_t
sfn
;
uint16_t
slot
;
uint16_t
number_of_pdus
;
nfapi_nr_rx_data_pdu_t
*
pdu_list
;
nfapi_nr_rx_data_pdu_t
*
pdu_list
;
//changed from pointer to struct - gokul
}
nfapi_nr_rx_data_indication_t
;
...
...
@@ -1544,6 +1545,7 @@ typedef struct
typedef
struct
{
nfapi_p7_message_header_t
header
;
uint16_t
sfn
;
uint16_t
slot
;
uint16_t
number_crcs
;
...
...
@@ -1681,6 +1683,7 @@ typedef struct
typedef
struct
{
nfapi_p7_message_header_t
header
;
uint16_t
sfn
;
uint16_t
slot
;
uint16_t
num_ucis
;
...
...
@@ -1717,6 +1720,7 @@ typedef struct
typedef
struct
{
nfapi_p7_message_header_t
header
;
uint16_t
sfn
;
uint16_t
slot
;
uint8_t
number_of_pdus
;
...
...
@@ -1749,6 +1753,7 @@ typedef struct{
typedef
struct
{
nfapi_p7_message_header_t
header
;
uint16_t
sfn
;
uint16_t
slot
;
uint8_t
number_of_pdus
;
...
...
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
View file @
ef56a5dd
This diff is collapsed.
Click to expand it.
nfapi/open-nFAPI/pnf/inc/pnf.h
View file @
ef56a5dd
...
...
@@ -20,6 +20,8 @@
#include "nfapi_pnf_interface.h"
#define NFAPI_MAX_PACKED_MESSAGE_SIZE 8192
typedef
struct
{
nfapi_pnf_config_t
_public
;
...
...
nfapi/open-nFAPI/pnf/inc/pnf_p7.h
View file @
ef56a5dd
...
...
@@ -25,6 +25,8 @@
#include "nfapi_pnf_interface.h"
#define NFAPI_MAX_PACKED_MESSAGE_SIZE 8192
typedef
struct
{
uint16_t
dl_conf_ontime
;
uint16_t
dl_tti_ontime
;
...
...
nfapi/open-nFAPI/pnf/src/pnf_p7_interface.c
View file @
ef56a5dd
...
...
@@ -168,17 +168,7 @@ int nfapi_pnf_p7_rach_ind(nfapi_pnf_p7_config_t* config, nfapi_rach_indication_t
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
return
pnf_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_rach_indication_t
));
}
int
nfapi_pnf_p7_srs_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_srs_indication_t
*
ind
)
{
if
(
config
==
NULL
||
ind
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: invalid input params
\n
"
,
__FUNCTION__
);
return
-
1
;
}
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
return
pnf_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_srs_indication_t
));
}
int
nfapi_pnf_p7_sr_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_sr_indication_t
*
ind
)
{
if
(
config
==
NULL
||
ind
==
NULL
)
...
...
@@ -258,3 +248,65 @@ int nfapi_pnf_ue_release_resp(nfapi_pnf_p7_config_t* config, nfapi_ue_release_re
return
pnf_p7_pack_and_send_p7_message
(
_this
,
&
(
resp
->
header
),
sizeof
(
nfapi_ue_release_response_t
));
}
//NR UPLINK INDICATION
int
nfapi_pnf_p7_nr_rx_data_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_nr_rx_data_indication_t
*
ind
)
{
if
(
config
==
NULL
||
ind
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: invalid input params
\n
"
,
__FUNCTION__
);
return
-
1
;
}
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
return
pnf_nr_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_nr_rx_data_indication_t
));
}
int
nfapi_pnf_p7_nr_crc_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_nr_crc_indication_t
*
ind
)
{
if
(
config
==
NULL
||
ind
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: invalid input params
\n
"
,
__FUNCTION__
);
return
-
1
;
}
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
return
pnf_nr_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_nr_crc_indication_t
));
}
int
nfapi_pnf_p7_nr_srs_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_nr_srs_indication_t
*
ind
)
{
if
(
config
==
NULL
||
ind
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: invalid input params
\n
"
,
__FUNCTION__
);
return
-
1
;
}
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
return
pnf_nr_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_nr_srs_indication_t
));
}
int
nfapi_pnf_p7_nr_uci_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_nr_uci_indication_t
*
ind
)
{
if
(
config
==
NULL
||
ind
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: invalid input params
\n
"
,
__FUNCTION__
);
return
-
1
;
}
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
return
pnf_nr_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_nr_uci_indication_t
));
}
int
nfapi_pnf_p7_nr_rach_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_nr_rach_indication_t
*
ind
)
{
if
(
config
==
NULL
||
ind
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: invalid input params
\n
"
,
__FUNCTION__
);
return
-
1
;
}
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
return
pnf_nr_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_nr_rach_indication_t
));
}
nfapi/open-nFAPI/vnf/public_inc/nfapi_vnf_interface.h
View file @
ef56a5dd
...
...
@@ -28,6 +28,7 @@
extern
"C"
{
#endif
#define NFAPI_MAX_PACKED_MESSAGE_SIZE 8192
/*! The nfapi VNF phy configuration information
*/
...
...
nfapi/open-nFAPI/vnf/src/vnf_p7.c
View file @
ef56a5dd
...
...
@@ -1461,6 +1461,102 @@ void vnf_handle_ul_node_sync(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
}
}
//NR HANDLES FOR UPLINK MESSAGES
void
vnf_handle_nr_rx_data_indication
(
void
*
pRecvMsg
,
int
recvMsgLen
,
vnf_p7_t
*
vnf_p7
)
{
// ensure it's valid
if
(
pRecvMsg
==
NULL
||
vnf_p7
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: NULL parameters
\n
"
,
__FUNCTION__
);
}
else
{
nfapi_nr_rx_data_indication_t
ind
;
if
(
nfapi_nr_p7_message_unpack
(
pRecvMsg
,
recvMsgLen
,
&
ind
,
sizeof
(
ind
),
&
vnf_p7
->
_public
.
codec_config
)
<
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
}
void
vnf_handle_nr_crc_indication
(
void
*
pRecvMsg
,
int
recvMsgLen
,
vnf_p7_t
*
vnf_p7
)
{
// ensure it's valid
if
(
pRecvMsg
==
NULL
||
vnf_p7
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: NULL parameters
\n
"
,
__FUNCTION__
);
}
else
{
nfapi_nr_crc_indication_t
ind
;
if
(
nfapi_nr_p7_message_unpack
(
pRecvMsg
,
recvMsgLen
,
&
ind
,
sizeof
(
ind
),
&
vnf_p7
->
_public
.
codec_config
)
<
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
}
void
vnf_handle_nr_srs_indication
(
void
*
pRecvMsg
,
int
recvMsgLen
,
vnf_p7_t
*
vnf_p7
)
{
// ensure it's valid
if
(
pRecvMsg
==
NULL
||
vnf_p7
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: NULL parameters
\n
"
,
__FUNCTION__
);
}
else
{
nfapi_nr_srs_indication_t
ind
;
if
(
nfapi_nr_p7_message_unpack
(
pRecvMsg
,
recvMsgLen
,
&
ind
,
sizeof
(
ind
),
&
vnf_p7
->
_public
.
codec_config
)
<
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
}
void
vnf_handle_nr_uci_indication
(
void
*
pRecvMsg
,
int
recvMsgLen
,
vnf_p7_t
*
vnf_p7
)
{
// ensure it's valid
if
(
pRecvMsg
==
NULL
||
vnf_p7
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: NULL parameters
\n
"
,
__FUNCTION__
);
}
else
{
nfapi_nr_uci_indication_t
ind
;
if
(
nfapi_nr_p7_message_unpack
(
pRecvMsg
,
recvMsgLen
,
&
ind
,
sizeof
(
ind
),
&
vnf_p7
->
_public
.
codec_config
)
<
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
}
void
vnf_handle_nr_rach_indication
(
void
*
pRecvMsg
,
int
recvMsgLen
,
vnf_p7_t
*
vnf_p7
)
{
// ensure it's valid
if
(
pRecvMsg
==
NULL
||
vnf_p7
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: NULL parameters
\n
"
,
__FUNCTION__
);
}
else
{
nfapi_nr_rach_indication_t
ind
;
if
(
nfapi_nr_p7_message_unpack
(
pRecvMsg
,
recvMsgLen
,
&
ind
,
sizeof
(
ind
),
&
vnf_p7
->
_public
.
codec_config
)
<
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
}
void
vnf_nr_handle_ul_node_sync
(
void
*
pRecvMsg
,
int
recvMsgLen
,
vnf_p7_t
*
vnf_p7
)
{
//printf("received UL Node sync");
...
...
@@ -2041,46 +2137,26 @@ void vnf_nr_dispatch_p7_message(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7
vnf_nr_handle_timing_info
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_
HARQ
_INDICATION
:
vnf_handle_
harq
_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
case
NFAPI_
NR_PHY_MSG_TYPE_RX_DATA
_INDICATION
:
vnf_handle_
nr_rx_data
_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_CRC_INDICATION
:
vnf_handle_crc_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
case
NFAPI_
NR_PHY_MSG_TYPE_
CRC_INDICATION
:
vnf_handle_
nr_
crc_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_
RX_ULSCH
_INDICATION
:
vnf_handle_
rx_ulsch
_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
case
NFAPI_
NR_PHY_MSG_TYPE_UCI
_INDICATION
:
vnf_handle_
nr_uci
_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_
RACH
_INDICATION
:
vnf_handle_rach_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
case
NFAPI_
NR_PHY_MSG_TYPE_SRS
_INDICATION
:
vnf_handle_
nr_
rach_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_
SRS
_INDICATION
:
vnf_handle_srs_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
case
NFAPI_
NR_PHY_MSG_TYPE_RACH
_INDICATION
:
vnf_handle_
nr_
srs_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_RX_SR_INDICATION
:
vnf_handle_rx_sr_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_RX_CQI_INDICATION
:
vnf_handle_rx_cqi_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_LBT_DL_INDICATION
:
vnf_handle_lbt_dl_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_NB_HARQ_INDICATION
:
vnf_handle_nb_harq_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_NRACH_INDICATION
:
vnf_handle_nrach_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_UE_RELEASE_RESPONSE
:
vnf_handle_ue_release_resp
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
...
...
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