Sync more NFAPI changes from multi-ue-proxy.git
Most notably, nfapi_rx_indication_pdu_t.data type is changed from `uint8_t*` to `uint8_t[]`. Also, renamed from `data` to `rx_ind_data` to make it easier to find.
This commit is contained in:
@@ -130,6 +130,7 @@ typedef struct {
|
||||
#define NFAPI_SFNSLOT2SLOT(_sfnslot) ((_sfnslot) & 0x3F)
|
||||
#define NFAPI_SFNSLOTDEC2SFN(_sfnslot_dec) ((_sfnslot_dec) / 20)
|
||||
#define NFAPI_SFNSLOTDEC2SLOT(_sfnslot_dec) ((_sfnslot_dec) % 20)
|
||||
#define NFAPI_SFNSLOT2HEX(_sfn,_slot) ((_sfn << 6) | (_slot & 0x3F))
|
||||
|
||||
#define NFAPI_MAX_SFNSLOTDEC 1024*20 // 20 is for numerology 1
|
||||
|
||||
@@ -708,7 +709,6 @@ typedef struct {
|
||||
#define NFAPI_PHICH_CONFIG_PHICH_DURATION_TAG 0x0015
|
||||
#define NFAPI_PHICH_CONFIG_PHICH_POWER_OFFSET_TAG 0x0016
|
||||
|
||||
|
||||
typedef struct {
|
||||
nfapi_uint16_tlv_t primary_synchronization_signal_epre_eprers;
|
||||
nfapi_uint16_tlv_t secondary_synchronization_signal_epre_eprers;
|
||||
@@ -2499,7 +2499,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
nfapi_p7_message_header_t header;
|
||||
uint32_t t1;
|
||||
int32_t delta_sfn_sf;
|
||||
int32_t delta_sfn_sf;
|
||||
nfapi_vendor_extension_tlv_t vendor_extension;
|
||||
} nfapi_dl_node_sync_t;
|
||||
|
||||
@@ -2874,11 +2874,12 @@ typedef struct {
|
||||
} nfapi_rx_indication_rel9_t;
|
||||
#define NFAPI_RX_INDICATION_REL9_TAG 0x2025
|
||||
|
||||
#define NFAPI_RX_IND_DATA_MAX 8192
|
||||
typedef struct {
|
||||
nfapi_rx_ue_information rx_ue_information;
|
||||
nfapi_rx_indication_rel8_t rx_indication_rel8;
|
||||
nfapi_rx_indication_rel9_t rx_indication_rel9;
|
||||
uint8_t* data;
|
||||
uint8_t rx_ind_data[NFAPI_RX_IND_DATA_MAX];
|
||||
} nfapi_rx_indication_pdu_t;
|
||||
|
||||
#define NFAPI_RX_IND_MAX_PDU 100
|
||||
|
||||
@@ -300,6 +300,10 @@ static uint8_t pack_pnf_config_request(void *msg, uint8_t **ppWritePackedMsg, ui
|
||||
{
|
||||
nfapi_pnf_config_request_t *pNfapiMsg = (nfapi_pnf_config_request_t*)msg;
|
||||
return (pack_tlv(NFAPI_PNF_PHY_RF_TAG, &pNfapiMsg->pnf_phy_rf_config, ppWritePackedMsg, end, &pack_pnf_phy_rf_config_value) &&
|
||||
// xxx - This next line (push8) was previously commented out and then was uncommented here:
|
||||
// commit e6bf90e2ddc96a6c0af620c80acc3c286a8c81c7
|
||||
// Author: Mahesh <maheshaithal@iisc.ac.in>
|
||||
// Date: Wed Nov 11 15:10:32 2020 +0530
|
||||
push8(pNfapiMsg->num_tlvs,ppWritePackedMsg,end) &&
|
||||
pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end , config));
|
||||
}
|
||||
@@ -909,7 +913,25 @@ static uint8_t pack_config_response(void *msg, uint8_t **ppWritePackedMsg, uint8
|
||||
{
|
||||
nfapi_config_response_t *pNfapiMsg = (nfapi_config_response_t*)msg;
|
||||
|
||||
return ( push8(pNfapiMsg->error_code, ppWritePackedMsg, end) &&
|
||||
// xxx - This function was added here:
|
||||
// commit e6bf90e2ddc96a6c0af620c80acc3c286a8c81c7
|
||||
// Author: Mahesh <maheshaithal@iisc.ac.in>
|
||||
// Date: Wed Nov 11 15:10:32 2020 +0530
|
||||
//
|
||||
// The first expression was push8 in that commit.
|
||||
// But unpack_config_response did pull32.
|
||||
// So, the push8 seems to be wrong.
|
||||
//
|
||||
// In emane.git, this same function was added but with push32:
|
||||
// commit 045261031bac557e4cf28c41afb09e9204d0ce22
|
||||
// Author: RS <rsachdeva@episci.com>
|
||||
// Date: Sat Feb 15 10:39:31 2020 -0800
|
||||
//
|
||||
// Adding open-nFAPI source code
|
||||
//
|
||||
// From: https://gitlab.eurecom.fr/oai/openairinterface5g/tree/master/nfapi/open-nFAPI
|
||||
// Commit: 0f0b44373d1a5be572daa0dba261420a82fae9f7
|
||||
return ( push32(pNfapiMsg->error_code, ppWritePackedMsg, end) &&
|
||||
pack_vendor_extension_tlv(pNfapiMsg->vendor_extension, ppWritePackedMsg, end, config) );
|
||||
}
|
||||
|
||||
|
||||
@@ -2647,7 +2647,7 @@ static uint8_t pack_rx_ulsch_indication_body_value(void *tlv, uint8_t **ppWriteP
|
||||
length = pdu->rx_indication_rel8.length;
|
||||
}
|
||||
|
||||
if( pusharray8(value->rx_pdu_list[i].data, length, length, ppWritePackedMsg, end) == 0)
|
||||
if( pusharray8(value->rx_pdu_list[i].rx_ind_data, NFAPI_RX_IND_DATA_MAX, length, ppWritePackedMsg, end) == 0)
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
@@ -7185,9 +7185,7 @@ static uint8_t unpack_rx_indication_body_value(void *tlv, uint8_t **ppReadPacked
|
||||
if (pdu->rx_indication_rel8.tl.tag == NFAPI_RX_INDICATION_REL8_TAG)
|
||||
{
|
||||
uint32_t length = pdu->rx_indication_rel8.length;
|
||||
value->rx_pdu_list[i].data = nfapi_p7_allocate(length, config);
|
||||
|
||||
if (pullarray8(ppReadPackedMsg, pdu->data, length, length, end) == 0)
|
||||
if (pullarray8(ppReadPackedMsg, pdu->rx_ind_data, NFAPI_RX_IND_DATA_MAX, length, end) == 0)
|
||||
{
|
||||
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s pullarray8 failure\n", __FUNCTION__);
|
||||
return 0;
|
||||
|
||||
@@ -827,7 +827,7 @@ void vnf_handle_rx_ulsch_indication(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vn
|
||||
uint16_t i = 0;
|
||||
for(i = 0; i < ind.rx_indication_body.number_of_pdus; ++i)
|
||||
{
|
||||
vnf_p7_codec_free(vnf_p7, ind.rx_indication_body.rx_pdu_list[i].data);
|
||||
vnf_p7_codec_free(vnf_p7, ind.rx_indication_body.rx_pdu_list[i].rx_ind_data);
|
||||
}
|
||||
vnf_p7_codec_free(vnf_p7, ind.rx_indication_body.rx_pdu_list);
|
||||
vnf_p7_codec_free(vnf_p7, ind.vendor_extension);
|
||||
@@ -2609,7 +2609,7 @@ void vnf_p7_release_msg(vnf_p7_t* vnf_p7, nfapi_p7_message_header_t* header)
|
||||
assert(number_of_pdus <= NFAPI_RX_IND_MAX_PDU);
|
||||
for(size_t i = 0; i < number_of_pdus; ++i)
|
||||
{
|
||||
vnf_p7_codec_free(vnf_p7, rx_ind->rx_indication_body.rx_pdu_list[i].data);
|
||||
vnf_p7_codec_free(vnf_p7, rx_ind->rx_indication_body.rx_pdu_list[i].rx_ind_data);
|
||||
}
|
||||
|
||||
vnf_p7_codec_free(vnf_p7, rx_ind->rx_indication_body.rx_pdu_list);
|
||||
|
||||
Reference in New Issue
Block a user