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
alex037yang
OpenXG-RAN
Commits
abefe1a0
Commit
abefe1a0
authored
Jun 25, 2020
by
MaheshK1995
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added custom error codes for p5
parent
e3a05b9a
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
59 additions
and
46 deletions
+59
-46
nfapi/README.md
nfapi/README.md
+5
-1
nfapi/oai_integration/nfapi_pnf.c
nfapi/oai_integration/nfapi_pnf.c
+1
-1
nfapi/oai_integration/nfapi_vnf.c
nfapi/oai_integration/nfapi_vnf.c
+1
-9
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf
+0
-0
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
+28
-18
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
+4
-4
nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h
nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h
+1
-1
nfapi/open-nFAPI/pnf/src/pnf_interface.c
nfapi/open-nFAPI/pnf/src/pnf_interface.c
+2
-2
nfapi/open-nFAPI/vnf/public_inc/nfapi_vnf_interface.h
nfapi/open-nFAPI/vnf/public_inc/nfapi_vnf_interface.h
+1
-1
nfapi/open-nFAPI/vnf/src/vnf.c
nfapi/open-nFAPI/vnf/src/vnf.c
+15
-8
openair1/SCHED_NR/phy_frame_config_nr.c
openair1/SCHED_NR/phy_frame_config_nr.c
+1
-1
No files found.
nfapi/README.md
View file @
abefe1a0
...
...
@@ -31,4 +31,8 @@
### 19/06/20
*
`ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);`
sloc: 1428 in
`nr-ru.c`
*
the
`ru->rfdevice`
has all members zero or null.
*
This issue was solved by adding
`sdr_addrs`
to config file of PNF.
\ No newline at end of file
*
This issue was solved by adding
`sdr_addrs`
to config file of PNF.
*
`if (cfg->tdd_table.max_tdd_periodicity_list[nr_tti].max_num_of_symbol_per_slot_list[symbol_count].slot_config.value==1`
*
throws segmentation error
*
`max_tdd_periodicity_list`
is not assigned memory
nfapi/oai_integration/nfapi_pnf.c
View file @
abefe1a0
...
...
@@ -419,7 +419,7 @@ int pnf_config_request(nfapi_pnf_config_t *config, nfapi_pnf_config_request_t *r
void
nfapi_send_pnf_start_resp
(
nfapi_pnf_config_t
*
config
,
uint16_t
phy_id
)
{
printf
(
"Sending NFAPI_START_RESPONSE config:%p phy_id:%d
\n
"
,
config
,
phy_id
);
nfapi_
start_response
_t
start_resp
;
nfapi_
nr_start_response_scf
_t
start_resp
;
memset
(
&
start_resp
,
0
,
sizeof
(
start_resp
));
start_resp
.
header
.
message_id
=
NFAPI_START_RESPONSE
;
start_resp
.
header
.
phy_id
=
phy_id
;
...
...
nfapi/oai_integration/nfapi_vnf.c
View file @
abefe1a0
...
...
@@ -1017,14 +1017,6 @@ extern uint32_t to_earfcn(int eutra_bandP,uint32_t dl_CarrierFreq,uint32_t bw);
int
param_resp_cb
(
nfapi_vnf_config_t
*
config
,
int
p5_idx
,
nfapi_nr_param_response_scf_t
*
resp
)
{
#ifdef TEST
if
(
resp
->
cell_param
.
phy_state
.
tl
.
tag
==
NFAPI_NR_PARAM_TLV_PHY_STATE_TAG
)
printf
(
"
\n\n
Matched
\n\n
"
);
// like this we can check for all the tags
#endif
printf
(
"[VNF] Received NFAPI_PARAM_RESP idx:%d phy_id:%d
\n
"
,
p5_idx
,
resp
->
header
.
phy_id
);
vnf_info
*
vnf
=
(
vnf_info
*
)(
config
->
user_data
);
vnf_p7_info
*
p7_vnf
=
vnf
->
p7_vnfs
;
...
...
@@ -1093,7 +1085,7 @@ int config_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_nr_config_respo
return
0
;
}
int
start_resp_cb
(
nfapi_vnf_config_t
*
config
,
int
p5_idx
,
nfapi_
start_response
_t
*
resp
)
{
int
start_resp_cb
(
nfapi_vnf_config_t
*
config
,
int
p5_idx
,
nfapi_
nr_start_response_scf
_t
*
resp
)
{
printf
(
"[VNF] Received NFAPI_START_RESP idx:%d phy_id:%d
\n
"
,
p5_idx
,
resp
->
header
.
phy_id
);
vnf_info
*
vnf
=
(
vnf_info
*
)(
config
->
user_data
);
pnf_info
*
pnf
=
vnf
->
pnfs
;
...
...
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf
0 → 100644
View file @
abefe1a0
File added
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
View file @
abefe1a0
...
...
@@ -85,11 +85,6 @@ typedef struct {
nfapi_vendor_extension_tlv_t
vendor_extension
;
}
nfapi_nr_param_request_t
;
typedef
enum
{
NFAPI_NR_PARAM_MSG_OK
=
0
,
NFAPI_NR_PARAM_MSG_INVALID_STATE
}
nfapi_nr_param_errors_e
;
/*typedef struct {
nfapi_nr_param_errors_e error_code;
...
...
@@ -263,12 +258,6 @@ typedef struct
//-------------------------------------------//
//3.3.2 CONFIG
typedef
enum
{
NFAPI_NR_CONFIG_MSG_OK
=
0
,
NFAPI_NR_CONFIG_MSG_INVALID_CONFIG
//The configuration provided has missing mandatory TLVs, or TLVs that are invalid or unsupported in this state.
}
nfapi_nr_config_errors_e
;
/*typedef struct {
nfapi_nr_config_errors_e error_code;
uint8_t number_of_invalid_tlvs_that_can_only_be_configured_in_idle;
...
...
@@ -448,6 +437,25 @@ typedef struct
}
nfapi_nr_measurement_config_t
;
// ERROR enums
typedef
enum
{
// Table 2-22
NFAPI_NR_PARAM_MSG_OK
=
0
,
NFAPI_NR_PARAM_MSG_INVALID_STATE
}
nfapi_nr_param_errors_e
;
typedef
enum
{
// Table 2-25
NFAPI_NR_CONFIG_MSG_OK
=
0
,
NFAPI_NR_CONFIG_MSG_INVALID_STATE
,
//The CONFIG.request was received when the PHY was not in the IDLE state or the CONFIGURED state.
NFAPI_NR_CONFIG_MSG_INVALID_CONFIG
//The configuration provided has missing mandatory TLVs, or TLVs that are invalid or unsupported in this state.
}
nfapi_nr_config_errors_e
;
typedef
enum
{
// Table 2-27
NFAPI_NR_START_MSG_OK
=
0
,
NFAPI_NR_START_MSG_INVALID_STATE
}
nfapi_nr_start_errors_e
;
/* PARAM.REQUEST */
typedef
struct
{
nfapi_p4_p5_message_header_t
header
;
...
...
@@ -479,7 +487,7 @@ typedef struct {
/* CONFIG.REQUEST */
typedef
struct
{
nfapi_p4_p5_message_header_t
header
;
nfapi_nr_param_errors_e
error_code
;
nfapi_nr_param_errors_e
error_code
;
// TODO: check if needed
uint8_t
num_tlv
;
nfapi_vendor_extension_tlv_t
vendor_extension
;
...
...
@@ -497,10 +505,9 @@ typedef struct {
/* CONFIG.RESPONSE */
typedef
struct
{
// TODO: add here
nfapi_p4_p5_message_header_t
header
;
nfapi_nr_
param
_errors_e
error_code
;
uint8_t
num_invalid_tlvs
;
nfapi_nr_
config
_errors_e
error_code
;
//
uint8_t num_invalid_tlvs;
// TODO: add list of invalid/unsupported TLVs (see Table 3.18)
nfapi_vendor_extension_tlv_t
vendor_extension
;
}
nfapi_nr_config_response_scf_t
;
...
...
@@ -513,9 +520,11 @@ typedef struct {
nfapi_vendor_extension_tlv_t
vendor_extension
;
}
nfapi_nr_start_request_scf_t
;
typedef
enum
{
NFAPI_NR_START_MSG_INVALID_STATE
}
nfapi_nr_start_errors_e
;
typedef
struct
{
nfapi_p4_p5_message_header_t
header
;
nfapi_nr_start_errors_e
error_code
;
nfapi_vendor_extension_tlv_t
vendor_extension
;
}
nfapi_nr_start_response_scf_t
;
//3.3.4 STOP
...
...
@@ -524,6 +533,7 @@ typedef struct {
nfapi_vendor_extension_tlv_t
vendor_extension
;
}
nfapi_nr_stop_request_t
;
typedef
struct
{
nfapi_p4_p5_message_header_t
header
;
nfapi_vendor_extension_tlv_t
vendor_extension
;
...
...
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
View file @
abefe1a0
...
...
@@ -871,7 +871,7 @@ static uint8_t pack_start_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t
static
uint8_t
pack_start_response
(
void
*
msg
,
uint8_t
**
ppWritePackedMsg
,
uint8_t
*
end
,
nfapi_p4_p5_codec_config_t
*
config
)
{
nfapi_
start_response_t
*
pNfapiMsg
=
(
nfapi_start_response
_t
*
)
msg
;
nfapi_
nr_start_response_scf_t
*
pNfapiMsg
=
(
nfapi_nr_start_response_scf
_t
*
)
msg
;
return
(
push32
(
pNfapiMsg
->
error_code
,
ppWritePackedMsg
,
end
)
&&
pack_vendor_extension_tlv
(
pNfapiMsg
->
vendor_extension
,
ppWritePackedMsg
,
end
,
config
)
);
...
...
@@ -1809,7 +1809,7 @@ static uint8_t unpack_start_request(uint8_t **ppReadPackedMsg, uint8_t *end, voi
static
uint8_t
unpack_start_response
(
uint8_t
**
ppReadPackedMsg
,
uint8_t
*
end
,
void
*
msg
,
nfapi_p4_p5_codec_config_t
*
config
)
{
nfapi_
start_response_t
*
pNfapiMsg
=
(
nfapi_start_response
_t
*
)
msg
;
nfapi_
nr_start_response_scf_t
*
pNfapiMsg
=
(
nfapi_nr_start_response_scf
_t
*
)
msg
;
unpack_tlv_t
unpack_fns
[]
=
{
...
...
@@ -1957,8 +1957,8 @@ static int check_unpack_length(nfapi_message_id_e msgId, uint32_t unpackedBufLen
break
;
case
NFAPI_START_RESPONSE
:
if
(
unpackedBufLen
>=
sizeof
(
nfapi_
start_response
_t
))
retLen
=
sizeof
(
nfapi_
start_response
_t
);
if
(
unpackedBufLen
>=
sizeof
(
nfapi_
nr_start_response_scf
_t
))
retLen
=
sizeof
(
nfapi_
nr_start_response_scf
_t
);
break
;
case
NFAPI_STOP_REQUEST
:
...
...
nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h
View file @
abefe1a0
...
...
@@ -421,7 +421,7 @@ int nfapi_pnf_config_resp(nfapi_pnf_config_t* config, nfapi_nr_config_response_s
* \return 0 for success, -1 for failure
*
*/
int
nfapi_pnf_start_resp
(
nfapi_pnf_config_t
*
config
,
nfapi_
start_response
_t
*
resp
);
int
nfapi_pnf_start_resp
(
nfapi_pnf_config_t
*
config
,
nfapi_
nr_start_response_scf
_t
*
resp
);
/*! Send the STOP.response
* \param config A pointer to a pnf configuraiton
...
...
nfapi/open-nFAPI/pnf/src/pnf_interface.c
View file @
abefe1a0
...
...
@@ -210,7 +210,7 @@ int nfapi_pnf_config_resp(nfapi_pnf_config_t* config, nfapi_nr_config_response_s
return
pnf_pack_and_send_p5_message
(
_this
,
&
(
resp
->
header
),
sizeof
(
nfapi_nr_config_response_scf_t
));
}
int
nfapi_pnf_start_resp
(
nfapi_pnf_config_t
*
config
,
nfapi_
start_response
_t
*
resp
)
int
nfapi_pnf_start_resp
(
nfapi_pnf_config_t
*
config
,
nfapi_
nr_start_response_scf
_t
*
resp
)
{
if
(
config
==
NULL
||
resp
==
NULL
)
{
...
...
@@ -234,7 +234,7 @@ int nfapi_pnf_start_resp(nfapi_pnf_config_t* config, nfapi_start_response_t* res
return
-
1
;
}
return
pnf_pack_and_send_p5_message
(
_this
,
&
(
resp
->
header
),
sizeof
(
nfapi_
start_response
_t
));
return
pnf_pack_and_send_p5_message
(
_this
,
&
(
resp
->
header
),
sizeof
(
nfapi_
nr_start_response_scf
_t
));
}
int
nfapi_pnf_stop_resp
(
nfapi_pnf_config_t
*
config
,
nfapi_stop_response_t
*
resp
)
...
...
nfapi/open-nFAPI/vnf/public_inc/nfapi_vnf_interface.h
View file @
abefe1a0
...
...
@@ -286,7 +286,7 @@ typedef struct nfapi_vnf_config
* then the substructure pointers should be set to 0 and then the client should
* use the codec_config.deallocate function to release it at a future point
*/
int
(
*
start_resp
)(
nfapi_vnf_config_t
*
config
,
int
p5_idx
,
nfapi_
start_response
_t
*
resp
);
int
(
*
start_resp
)(
nfapi_vnf_config_t
*
config
,
int
p5_idx
,
nfapi_
nr_start_response_scf
_t
*
resp
);
/*! A callback for the STOP.resp
* \param config A pointer to the vnf configuration
...
...
nfapi/open-nFAPI/vnf/src/vnf.c
View file @
abefe1a0
...
...
@@ -302,6 +302,7 @@ void vnf_handle_param_response(void *pRecvMsg, int recvMsgLen, nfapi_vnf_config_
void
vnf_handle_config_response
(
void
*
pRecvMsg
,
int
recvMsgLen
,
nfapi_vnf_config_t
*
config
,
int
p5_idx
)
{
// ensure it's valid
if
(
pRecvMsg
==
NULL
||
config
==
NULL
)
{
...
...
@@ -316,9 +317,13 @@ void vnf_handle_config_response(void *pRecvMsg, int recvMsgLen, nfapi_vnf_config
// unpack the message
if
(
nfapi_p5_message_unpack
(
pRecvMsg
,
recvMsgLen
,
&
msg
,
sizeof
(
msg
),
&
config
->
codec_config
)
>=
0
)
{
if
(
config
->
config_resp
)
{
(
config
->
config_resp
)(
config
,
p5_idx
,
&
msg
);
// check the error code:
if
(
msg
.
error_code
==
NFAPI_MSG_OK
){
if
(
config
->
config_resp
)
{
(
config
->
config_resp
)(
config
,
p5_idx
,
&
msg
);
}
}
}
else
...
...
@@ -343,14 +348,16 @@ void vnf_handle_start_response(void *pRecvMsg, int recvMsgLen, nfapi_vnf_config_
{
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"Received START_RESPONSE
\n
"
);
nfapi_
start_response
_t
msg
;
nfapi_
nr_start_response_scf
_t
msg
;
// unpack the message
if
(
nfapi_p5_message_unpack
(
pRecvMsg
,
recvMsgLen
,
&
msg
,
sizeof
(
msg
),
&
config
->
codec_config
)
>=
0
)
{
if
(
config
->
start_resp
)
{
(
config
->
start_resp
)(
config
,
p5_idx
,
&
msg
);
{
// check the error code
if
(
msg
.
error_code
==
NFAPI_MSG_OK
){
if
(
config
->
start_resp
)
{
(
config
->
start_resp
)(
config
,
p5_idx
,
&
msg
);
}
}
}
else
...
...
openair1/SCHED_NR/phy_frame_config_nr.c
View file @
abefe1a0
...
...
@@ -311,7 +311,7 @@ int set_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms) {
*********************************************************************/
int
nr_slot_select
(
nfapi_nr_config_request_scf_t
*
cfg
,
int
nr_frame
,
int
nr_tti
)
{
/* for F
F
D all slot can be considered as an uplink */
/* for F
D
D all slot can be considered as an uplink */
int
mu
=
cfg
->
ssb_config
.
scs_common
.
value
,
check_slot
=
0
;
if
(
cfg
->
cell_config
.
frame_duplex_type
.
value
==
FDD
)
{
...
...
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