Merge remote-tracking branch 'origin/develop' into develop-nr
Conflicts: ci-scripts/Jenkinsfile-gitlab ci-scripts/buildOnVM.sh ci-scripts/checkCodingFormattingRules.sh ci-scripts/createVM.sh ci-scripts/destroyAllRunningVM.sh ci-scripts/reportBuildLocally.sh cmake_targets/CMakeLists.txt cmake_targets/build_oai cmake_targets/tools/build_helper common/utils/LOG/log.h openair1/PHY/LTE_ESTIMATION/lte_sync_timefreq.c openair1/PHY/TOOLS/file_output.c openair1/PHY/TOOLS/lte_dfts.c openair1/PHY/TOOLS/tools_defs.h openair1/PHY/defs_eNB.h openair1/PHY/impl_defs_lte.h openair1/SCHED_UE/phy_procedures_lte_ue.c openair2/COMMON/platform_constants.h openair2/COMMON/platform_types.h openair2/LAYER2/MAC/eNB_scheduler.c openair2/LAYER2/MAC/main.c openair2/RRC/LTE/L2_interface.c openair2/RRC/LTE/MESSAGES/asn1_msg.c openair2/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c openair2/RRC/LTE/rrc_UE.c openair2/RRC/LTE/rrc_eNB.c openair2/RRC/LTE/rrc_eNB_S1AP.c openair2/UTIL/LOG/log.c openair3/S1AP/s1ap_common.h openair3/S1AP/s1ap_eNB.c openair3/S1AP/s1ap_eNB_context_management_procedures.c openair3/S1AP/s1ap_eNB_decoder.c openair3/S1AP/s1ap_eNB_decoder.h openair3/S1AP/s1ap_eNB_handlers.c openair3/S1AP/s1ap_eNB_nas_procedures.c openair3/S1AP/s1ap_eNB_overload.c openair3/S1AP/s1ap_eNB_trace.c openair3/TEST/EPC_TEST/play_scenario_decode.c openair3/TEST/EPC_TEST/play_scenario_s1ap.c openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c targets/COMMON/openairinterface5g_limits.h targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf targets/RT/USER/lte-ran.c targets/RT/USER/lte-ru.c targets/RT/USER/lte-ue.c targets/SIMU/USER/oaisim_functions.c
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "nfapi.h"
|
||||
#include "nfapi_pnf.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "openair2/PHY_INTERFACE/phy_stub_UE.h"
|
||||
//#include "openair1/PHY/vars.h"
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -46,7 +47,7 @@ extern RAN_CONTEXT_t RC;
|
||||
#include <vendor_ext.h>
|
||||
#include "fapi_stub.h"
|
||||
//#include "fapi_l1.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "openair2/LAYER2/MAC/mac_proto.h"
|
||||
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
@@ -64,8 +65,10 @@ extern pthread_mutex_t nfapi_sync_mutex;
|
||||
extern int nfapi_sync_var;
|
||||
|
||||
extern int sync_var;
|
||||
char uecap_xer_in;
|
||||
|
||||
extern void init_eNB_afterRU(void);
|
||||
extern void init_UE_stub(int nb_inst,int,int);
|
||||
extern void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB, int frame, int subframe, eNB_rxtx_proc_t *proc, nfapi_dl_config_request_pdu_t *dl_config_pdu);
|
||||
extern void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, nfapi_ul_config_request_pdu_t *ul_config_pdu, uint16_t frame,uint8_t subframe,uint8_t srs_present);
|
||||
extern void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame, int subframe, eNB_rxtx_proc_t *proc, nfapi_dl_config_request_pdu_t *dl_config_pdu, uint8_t codeword_index, uint8_t *sdu);
|
||||
@@ -190,26 +193,25 @@ typedef struct {
|
||||
static pnf_info pnf;
|
||||
static pthread_t pnf_start_pthread;
|
||||
|
||||
extern void nfapi_log(char *file, char *func, int line, int comp, int level, const char* format, va_list args);
|
||||
int nfapitooai_level(int nfapi_level) {
|
||||
switch(nfapi_level) {
|
||||
case NFAPI_TRACE_ERROR:
|
||||
return LOG_ERR;
|
||||
case NFAPI_TRACE_WARN:
|
||||
return LOG_WARNING;
|
||||
case NFAPI_TRACE_NOTE:
|
||||
return LOG_INFO;
|
||||
case NFAPI_TRACE_INFO:
|
||||
return LOG_DEBUG;
|
||||
}
|
||||
return LOG_ERR;
|
||||
}
|
||||
|
||||
void pnf_nfapi_trace(nfapi_trace_level_t nfapi_level, const char* message, ...) {
|
||||
va_list args;
|
||||
int oai_level;
|
||||
|
||||
if (nfapi_level==NFAPI_TRACE_ERROR) {
|
||||
oai_level = LOG_ERR;
|
||||
} else if (nfapi_level==NFAPI_TRACE_WARN) {
|
||||
oai_level = LOG_WARNING;
|
||||
} else if (nfapi_level==NFAPI_TRACE_NOTE) {
|
||||
oai_level = LOG_INFO;
|
||||
} else if (nfapi_level==NFAPI_TRACE_INFO) {
|
||||
oai_level = LOG_DEBUG;
|
||||
} else {
|
||||
oai_level = LOG_ERR;
|
||||
}
|
||||
|
||||
va_start(args, message);
|
||||
nfapi_log("FILE>", "FUNC", 999, PHY, oai_level, message, args);
|
||||
nfapi_log("FILE>", "FUNC", 999, PHY, nfapitooai_level(nfapi_level), message, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
@@ -511,8 +513,18 @@ int config_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfap
|
||||
|
||||
pnf_info* pnf = (pnf_info*)(config->user_data);
|
||||
uint8_t num_tlv = 0;
|
||||
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
|
||||
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
|
||||
//struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
|
||||
|
||||
// In the case of nfapi_mode = 3 (UE = PNF) we should not have dependency on any eNB var. So we aim
|
||||
// to keep only the necessary just to keep the nfapi FSM rolling by sending a dummy response.
|
||||
LTE_DL_FRAME_PARMS *fp;
|
||||
if (nfapi_mode!=3) {
|
||||
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
|
||||
fp = &eNB->frame_parms;
|
||||
}
|
||||
else{
|
||||
fp = (LTE_DL_FRAME_PARMS*) malloc(sizeof(LTE_DL_FRAME_PARMS));
|
||||
}
|
||||
|
||||
phy_info* phy_info = pnf->phys;
|
||||
|
||||
@@ -670,6 +682,7 @@ int config_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfap
|
||||
num_tlv++;
|
||||
}
|
||||
|
||||
if(nfapi_mode!=3) {
|
||||
printf("[PNF] CONFIG_REQUEST[num_tlv:%d] TLVs processed:%d\n", req->num_tlv, num_tlv);
|
||||
|
||||
printf("[PNF] Simulating PHY CONFIG - DJP\n");
|
||||
@@ -681,6 +694,7 @@ int config_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfap
|
||||
phy_config_request(&phy_config);
|
||||
|
||||
dump_frame_parms(fp);
|
||||
}
|
||||
|
||||
phy_info->remote_port = req->nfapi_config.p7_vnf_port.value;
|
||||
|
||||
@@ -698,6 +712,8 @@ int config_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfap
|
||||
nfapi_resp.error_code = 0; // DJP - some value resp->error_code;
|
||||
nfapi_pnf_config_resp(config, &nfapi_resp);
|
||||
printf("[PNF] Sent NFAPI_CONFIG_RESPONSE phy_id:%d\n", phy_info->id);
|
||||
if(nfapi_mode ==3)
|
||||
free(fp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -842,7 +858,11 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request
|
||||
AssertFatal(UE_id<NUMBER_OF_UE_MAX,"returned UE_id %d >= %d(NUMBER_OF_UE_MAX)\n",UE_id,NUMBER_OF_UE_MAX);
|
||||
LTE_eNB_DLSCH_t *dlsch0 = eNB->dlsch[UE_id][0];
|
||||
//LTE_eNB_DLSCH_t *dlsch1 = eNB->dlsch[UE_id][1];
|
||||
int harq_pid = dlsch0->harq_ids[sf];
|
||||
int harq_pid = dlsch0->harq_ids[sfn%2][sf];
|
||||
if(harq_pid >= dlsch0->Mdlharq) {
|
||||
LOG_E(PHY,"pnf_phy_dl_config_req illegal harq_pid %d\n", harq_pid);
|
||||
return(-1);
|
||||
}
|
||||
uint8_t *dlsch_sdu = tx_pdus[UE_id][harq_pid];
|
||||
|
||||
memcpy(dlsch_sdu, tx_pdu->segments[0].segment_data, tx_pdu->segments[0].segment_length);
|
||||
@@ -1093,77 +1113,101 @@ int start_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfapi
|
||||
p7_config->tx_req = &pnf_phy_tx_req;
|
||||
p7_config->lbt_dl_config_req = &pnf_phy_lbt_dl_config_req;
|
||||
|
||||
memset(&dummy_dl_config_req, 0, sizeof(dummy_dl_config_req));
|
||||
dummy_dl_config_req.dl_config_request_body.tl.tag=NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
||||
dummy_dl_config_req.dl_config_request_body.number_pdcch_ofdm_symbols=1;
|
||||
dummy_dl_config_req.dl_config_request_body.number_dci=0;
|
||||
dummy_dl_config_req.dl_config_request_body.number_pdu=0;
|
||||
dummy_dl_config_req.dl_config_request_body.number_pdsch_rnti=0;
|
||||
dummy_dl_config_req.dl_config_request_body.transmission_power_pcfich=6000;
|
||||
dummy_dl_config_req.dl_config_request_body.dl_config_pdu_list=0;
|
||||
if (nfapi_mode==3) {
|
||||
p7_config->dl_config_req = &memcpy_dl_config_req;
|
||||
p7_config->ul_config_req = &memcpy_ul_config_req;
|
||||
p7_config->hi_dci0_req = &memcpy_hi_dci0_req;
|
||||
p7_config->tx_req = &memcpy_tx_req;
|
||||
}
|
||||
else {
|
||||
p7_config->dl_config_req = &pnf_phy_dl_config_req;
|
||||
p7_config->ul_config_req = &pnf_phy_ul_config_req;
|
||||
p7_config->hi_dci0_req = &pnf_phy_hi_dci0_req;
|
||||
p7_config->tx_req = &pnf_phy_tx_req;
|
||||
}
|
||||
p7_config->lbt_dl_config_req = &pnf_phy_lbt_dl_config_req;
|
||||
|
||||
memset(&dummy_tx_req, 0, sizeof(dummy_tx_req));
|
||||
dummy_tx_req.tx_request_body.number_of_pdus=0;
|
||||
dummy_tx_req.tx_request_body.tl.tag=NFAPI_TX_REQUEST_BODY_TAG;
|
||||
memset(&dummy_dl_config_req, 0, sizeof(dummy_dl_config_req));
|
||||
dummy_dl_config_req.dl_config_request_body.tl.tag=NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
||||
dummy_dl_config_req.dl_config_request_body.number_pdcch_ofdm_symbols=1;
|
||||
dummy_dl_config_req.dl_config_request_body.number_dci=0;
|
||||
dummy_dl_config_req.dl_config_request_body.number_pdu=0;
|
||||
dummy_dl_config_req.dl_config_request_body.number_pdsch_rnti=0;
|
||||
dummy_dl_config_req.dl_config_request_body.transmission_power_pcfich=6000;
|
||||
dummy_dl_config_req.dl_config_request_body.dl_config_pdu_list=0;
|
||||
|
||||
dummy_subframe.dl_config_req = &dummy_dl_config_req;
|
||||
dummy_subframe.tx_req = 0;//&dummy_tx_req;
|
||||
memset(&dummy_tx_req, 0, sizeof(dummy_tx_req));
|
||||
dummy_tx_req.tx_request_body.number_of_pdus=0;
|
||||
dummy_tx_req.tx_request_body.tl.tag=NFAPI_TX_REQUEST_BODY_TAG;
|
||||
|
||||
dummy_subframe.ul_config_req=0;
|
||||
dummy_subframe.hi_dci0_req=0;
|
||||
dummy_subframe.lbt_dl_config_req=0;
|
||||
dummy_subframe.dl_config_req = &dummy_dl_config_req;
|
||||
dummy_subframe.tx_req = 0;//&dummy_tx_req;
|
||||
|
||||
p7_config->dummy_subframe = dummy_subframe;
|
||||
dummy_subframe.ul_config_req=0;
|
||||
dummy_subframe.hi_dci0_req=0;
|
||||
dummy_subframe.lbt_dl_config_req=0;
|
||||
|
||||
p7_config->vendor_ext = &pnf_phy_vendor_ext;
|
||||
p7_config->dummy_subframe = dummy_subframe;
|
||||
|
||||
p7_config->allocate_p7_vendor_ext = &pnf_phy_allocate_p7_vendor_ext;
|
||||
p7_config->deallocate_p7_vendor_ext = &pnf_phy_deallocate_p7_vendor_ext;
|
||||
p7_config->vendor_ext = &pnf_phy_vendor_ext;
|
||||
|
||||
p7_config->codec_config.unpack_p7_vendor_extension = &pnf_phy_unpack_p7_vendor_extension;
|
||||
p7_config->codec_config.pack_p7_vendor_extension = &pnf_phy_pack_p7_vendor_extension;
|
||||
p7_config->codec_config.unpack_vendor_extension_tlv = &pnf_phy_unpack_vendor_extension_tlv;
|
||||
p7_config->codec_config.pack_vendor_extension_tlv = &pnf_phy_pack_vendor_extention_tlv;
|
||||
p7_config->allocate_p7_vendor_ext = &pnf_phy_allocate_p7_vendor_ext;
|
||||
p7_config->deallocate_p7_vendor_ext = &pnf_phy_deallocate_p7_vendor_ext;
|
||||
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] Creating P7 thread %s\n", __FUNCTION__);
|
||||
pthread_t p7_thread;
|
||||
pthread_create(&p7_thread, NULL, &pnf_p7_thread_start, p7_config);
|
||||
p7_config->codec_config.unpack_p7_vendor_extension = &pnf_phy_unpack_p7_vendor_extension;
|
||||
p7_config->codec_config.pack_p7_vendor_extension = &pnf_phy_pack_p7_vendor_extension;
|
||||
p7_config->codec_config.unpack_vendor_extension_tlv = &pnf_phy_unpack_vendor_extension_tlv;
|
||||
p7_config->codec_config.pack_vendor_extension_tlv = &pnf_phy_pack_vendor_extention_tlv;
|
||||
|
||||
//((pnf_phy_user_data_t*)(phy_info->fapi->user_data))->p7_config = p7_config;
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] Creating P7 thread %s\n", __FUNCTION__);
|
||||
pthread_t p7_thread;
|
||||
pthread_create(&p7_thread, NULL, &pnf_p7_thread_start, p7_config);
|
||||
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] Calling l1_north_init_eNB() %s\n", __FUNCTION__);
|
||||
l1_north_init_eNB();
|
||||
//((pnf_phy_user_data_t*)(phy_info->fapi->user_data))->p7_config = p7_config;
|
||||
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] DJP - HACK - Set p7_config global ready for subframe ind%s\n", __FUNCTION__);
|
||||
p7_config_g = p7_config;
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] Calling l1_north_init_eNB() %s\n", __FUNCTION__);
|
||||
l1_north_init_eNB();
|
||||
|
||||
// Need to wait for main thread to create RU structures
|
||||
while(config_sync_var<0) {
|
||||
usleep(5000000);
|
||||
printf("[PNF] waiting for OAI to be configured (eNB/RU)\n");
|
||||
}
|
||||
printf("[PNF] OAI eNB/RU configured\n");
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] DJP - HACK - Set p7_config global ready for subframe ind%s\n", __FUNCTION__);
|
||||
p7_config_g = p7_config;
|
||||
|
||||
printf("[PNF] About to call init_eNB_afterRU()\n");
|
||||
init_eNB_afterRU();
|
||||
// Need to wait for main thread to create RU structures
|
||||
while(config_sync_var<0)
|
||||
{
|
||||
usleep(5000000);
|
||||
printf("[PNF] waiting for OAI to be configured (eNB/RU)\n");
|
||||
}
|
||||
printf("[PNF] OAI eNB/RU configured\n");
|
||||
|
||||
// Signal to main thread that it can carry on - otherwise RU will startup too quickly and it is not initialised
|
||||
pthread_mutex_lock(&nfapi_sync_mutex);
|
||||
nfapi_sync_var=0;
|
||||
pthread_cond_broadcast(&nfapi_sync_cond);
|
||||
pthread_mutex_unlock(&nfapi_sync_mutex);
|
||||
//printf("[PNF] About to call phy_init_RU() for RC.ru[0]:%p\n", RC.ru[0]);
|
||||
//phy_init_RU(RC.ru[0]);
|
||||
|
||||
while(sync_var<0) {
|
||||
usleep(5000000);
|
||||
printf("[PNF] waiting for OAI to be started\n");
|
||||
}
|
||||
printf("[PNF] About to call init_eNB_afterRU()\n");
|
||||
|
||||
printf("[PNF] Sending PNF_START_RESP\n");
|
||||
nfapi_send_pnf_start_resp(config, p7_config->phy_id);
|
||||
if (nfapi_mode != 3) {
|
||||
init_eNB_afterRU();
|
||||
}
|
||||
|
||||
printf("[PNF] Sending first P7 subframe ind\n");
|
||||
nfapi_pnf_p7_subframe_ind(p7_config, p7_config->phy_id, 0); // DJP - SFN_SF set to zero - correct???
|
||||
printf("[PNF] Sent first P7 subframe ind\n");
|
||||
// Signal to main thread that it can carry on - otherwise RU will startup too quickly and it is not initialised
|
||||
{
|
||||
pthread_mutex_lock(&nfapi_sync_mutex);
|
||||
nfapi_sync_var=0;
|
||||
pthread_cond_broadcast(&nfapi_sync_cond);
|
||||
pthread_mutex_unlock(&nfapi_sync_mutex);
|
||||
}
|
||||
|
||||
while(sync_var<0)
|
||||
{
|
||||
usleep(5000000);
|
||||
printf("[PNF] waiting for OAI to be started\n");
|
||||
}
|
||||
|
||||
printf("[PNF] Sending PNF_START_RESP\n");
|
||||
nfapi_send_pnf_start_resp(config, p7_config->phy_id);
|
||||
|
||||
printf("[PNF] Sending first P7 subframe ind\n");
|
||||
nfapi_pnf_p7_subframe_ind(p7_config, p7_config->phy_id, 0); // DJP - SFN_SF set to zero - correct???
|
||||
printf("[PNF] Sent first P7 subframe ind\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1467,7 +1511,9 @@ void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr,
|
||||
|
||||
printf("%s() PNF\n\n\n\n\n\n", __FUNCTION__);
|
||||
|
||||
if(nfapi_mode!=3) {
|
||||
nfapi_mode = 1; // PNF!
|
||||
}
|
||||
|
||||
nfapi_pnf_config_t* config = nfapi_pnf_config_create();
|
||||
|
||||
|
||||
@@ -357,18 +357,6 @@ int wake_eNB_rxtx(PHY_VARS_eNB *eNB, uint16_t sfn, uint16_t sf) {
|
||||
wait.tv_sec=0;
|
||||
wait.tv_nsec=5000000L;
|
||||
|
||||
#if 0
|
||||
/* accept some delay in processing - up to 5ms */
|
||||
for (i = 0; i < 10 && proc_rxtx->instance_cnt_rxtx == 0; i++) {
|
||||
LOG_W( PHY,"[eNB] sfn/sf:%d:%d proc_rxtx[%d]:TXsfn:%d/%d eNB RXn-TXnp4 thread busy!! (cnt_rxtx %i)\n", sfn, sf, sf&1, proc_rxtx->frame_tx, proc_rxtx->subframe_tx, proc_rxtx->instance_cnt_rxtx);
|
||||
usleep(500);
|
||||
}
|
||||
if (proc_rxtx->instance_cnt_rxtx == 0) {
|
||||
exit_fun( "TX thread busy" );
|
||||
return(-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
// wake up TX for subframe n+sf_ahead
|
||||
// lock the TX mutex and make sure the thread is ready
|
||||
if (pthread_mutex_timedlock(&proc_rxtx->mutex_rxtx,&wait) != 0) {
|
||||
@@ -692,36 +680,13 @@ void vnf_deallocate(void* ptr) {
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
extern void nfapi_log(char *file, char *func, int line, int comp, int level, const char* format, va_list args);
|
||||
|
||||
void vnf_trace(nfapi_trace_level_t nfapi_level, const char* message, ...) {
|
||||
|
||||
va_list args;
|
||||
int oai_level;
|
||||
|
||||
if (nfapi_level==NFAPI_TRACE_ERROR)
|
||||
{
|
||||
oai_level = LOG_ERR;
|
||||
}
|
||||
else if (nfapi_level==NFAPI_TRACE_WARN)
|
||||
{
|
||||
oai_level = LOG_WARNING;
|
||||
}
|
||||
else if (nfapi_level==NFAPI_TRACE_NOTE)
|
||||
{
|
||||
oai_level = LOG_INFO;
|
||||
}
|
||||
else if (nfapi_level==NFAPI_TRACE_INFO)
|
||||
{
|
||||
oai_level = LOG_INFO;
|
||||
}
|
||||
else
|
||||
{
|
||||
oai_level = LOG_INFO;
|
||||
}
|
||||
|
||||
va_start(args, message);
|
||||
nfapi_log("FILE>", "FUNC", 999, PHY, oai_level, message, args);
|
||||
nfapi_log("FILE>", "FUNC", 999, PHY, nfapitooai_level(nfapi_level), message, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ extern "C" {
|
||||
// todo : move to public_inc so can be used by vendor extensions
|
||||
|
||||
#define MAX_BAD_TAG 3
|
||||
|
||||
int nfapitooai_level(int nfapilevel);
|
||||
uint8_t push8(uint8_t in, uint8_t **out, uint8_t *end);
|
||||
uint8_t pushs8(int8_t in, uint8_t **out, uint8_t *end);
|
||||
uint8_t push16(uint16_t in, uint8_t **out, uint8_t *end);
|
||||
|
||||
@@ -1339,7 +1339,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
nfapi_tl_t tl;
|
||||
uint16_t length;
|
||||
uint16_t pdu_index;
|
||||
int16_t pdu_index;
|
||||
uint16_t transmission_power;
|
||||
} nfapi_dl_config_bch_pdu_rel8_t;
|
||||
#define NFAPI_DL_CONFIG_REQUEST_BCH_PDU_REL8_TAG 0x2004
|
||||
@@ -1351,7 +1351,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
nfapi_tl_t tl;
|
||||
uint16_t length;
|
||||
uint16_t pdu_index;
|
||||
int16_t pdu_index;
|
||||
uint16_t rnti;
|
||||
uint8_t resource_allocation_type;
|
||||
uint32_t resource_block_coding;
|
||||
@@ -1375,7 +1375,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
nfapi_tl_t tl;
|
||||
uint16_t length;
|
||||
uint16_t pdu_index;
|
||||
int16_t pdu_index;
|
||||
uint16_t rnti;
|
||||
uint8_t resource_allocation_type;
|
||||
uint8_t virtual_resource_block_assignment_flag;
|
||||
@@ -1460,7 +1460,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
nfapi_tl_t tl;
|
||||
uint16_t length;
|
||||
uint16_t pdu_index;
|
||||
int16_t pdu_index;
|
||||
uint16_t p_rnti;
|
||||
uint8_t resource_allocation_type;
|
||||
uint8_t virtual_resource_block_assignment_flag;
|
||||
@@ -1626,7 +1626,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
nfapi_tl_t tl;
|
||||
uint16_t length;
|
||||
uint16_t pdu_index;
|
||||
int16_t pdu_index;
|
||||
uint16_t transmission_power;
|
||||
uint16_t hyper_sfn_2_lsbs;
|
||||
} nfapi_dl_config_nbch_pdu_rel13_t;
|
||||
@@ -1640,7 +1640,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
nfapi_tl_t tl;
|
||||
uint16_t length;
|
||||
uint16_t pdu_index;
|
||||
int16_t pdu_index;
|
||||
uint8_t ncce_index;
|
||||
uint8_t aggregation_level;
|
||||
uint8_t start_symbol;
|
||||
@@ -1673,7 +1673,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
nfapi_tl_t tl;
|
||||
uint16_t length;
|
||||
uint16_t pdu_index;
|
||||
int16_t pdu_index;
|
||||
uint8_t start_symbol;
|
||||
uint8_t rnti_type;
|
||||
uint16_t rnti;
|
||||
@@ -2249,6 +2249,7 @@ typedef struct {
|
||||
uint8_t dl_assignment_index;
|
||||
uint32_t tpc_bitmap;
|
||||
uint16_t transmission_power;
|
||||
uint8_t harq_pid;
|
||||
} nfapi_hi_dci0_dci_pdu_rel8_t;
|
||||
#define NFAPI_HI_DCI0_REQUEST_DCI_PDU_REL8_TAG 0x2020
|
||||
|
||||
@@ -2392,7 +2393,7 @@ typedef struct {
|
||||
#define NFAPI_TX_MAX_SEGMENTS 32
|
||||
typedef struct {
|
||||
uint16_t pdu_length;
|
||||
uint16_t pdu_index;
|
||||
int16_t pdu_index;
|
||||
uint8_t num_segments;
|
||||
struct {
|
||||
uint32_t segment_length;
|
||||
@@ -2933,7 +2934,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
uint8_t sub_error_code;
|
||||
uint16_t pdu_index;
|
||||
int16_t pdu_index;
|
||||
} nfapi_error_indication_msg_tx_err;
|
||||
|
||||
//
|
||||
|
||||
@@ -2924,7 +2924,7 @@ static uint8_t unpack_dl_config_bch_pdu_rel8_value(void *tlv, uint8_t **ppReadPa
|
||||
nfapi_dl_config_bch_pdu_rel8_t* bch_pdu_rel8 = (nfapi_dl_config_bch_pdu_rel8_t*)tlv;
|
||||
|
||||
return ( pull16(ppReadPackedMsg, &bch_pdu_rel8->length, end) &&
|
||||
pull16(ppReadPackedMsg, &bch_pdu_rel8->pdu_index, end) &&
|
||||
pull16(ppReadPackedMsg, (uint16_t *)&bch_pdu_rel8->pdu_index, end) &&
|
||||
pull16(ppReadPackedMsg, &bch_pdu_rel8->transmission_power, end));
|
||||
}
|
||||
|
||||
@@ -2933,7 +2933,7 @@ static uint8_t unpack_dl_config_mch_pdu_rel8_value(void *tlv, uint8_t **ppReadPa
|
||||
nfapi_dl_config_mch_pdu_rel8_t* mch_pdu_rel8 = (nfapi_dl_config_mch_pdu_rel8_t*)tlv;
|
||||
|
||||
return (pull16(ppReadPackedMsg, &mch_pdu_rel8->length, end) &&
|
||||
pull16(ppReadPackedMsg, &mch_pdu_rel8->pdu_index, end) &&
|
||||
pull16(ppReadPackedMsg, (uint16_t *)&mch_pdu_rel8->pdu_index, end) &&
|
||||
pull16(ppReadPackedMsg, &mch_pdu_rel8->rnti, end) &&
|
||||
pull8(ppReadPackedMsg, &mch_pdu_rel8->resource_allocation_type, end) &&
|
||||
pull32(ppReadPackedMsg, &mch_pdu_rel8->resource_block_coding, end) &&
|
||||
@@ -2947,7 +2947,7 @@ static uint8_t unpack_dl_config_dlsch_pdu_rel8_value(void *tlv, uint8_t **ppRead
|
||||
nfapi_dl_config_dlsch_pdu_rel8_t* dlsch_pdu_rel8 = (nfapi_dl_config_dlsch_pdu_rel8_t*)tlv;
|
||||
|
||||
if (!(pull16(ppReadPackedMsg, &dlsch_pdu_rel8->length, end) &&
|
||||
pull16(ppReadPackedMsg, &dlsch_pdu_rel8->pdu_index, end) &&
|
||||
pull16(ppReadPackedMsg, (uint16_t *)&dlsch_pdu_rel8->pdu_index, end) &&
|
||||
pull16(ppReadPackedMsg, &dlsch_pdu_rel8->rnti, end) &&
|
||||
pull8(ppReadPackedMsg, &dlsch_pdu_rel8->resource_allocation_type, end) &&
|
||||
pull8(ppReadPackedMsg, &dlsch_pdu_rel8->virtual_resource_block_assignment_flag, end) &&
|
||||
@@ -3033,7 +3033,7 @@ static uint8_t unpack_dl_config_pch_pdu_rel8_value(void *tlv, uint8_t **ppReadPa
|
||||
nfapi_dl_config_pch_pdu_rel8_t* pch_pdu_rel8 = (nfapi_dl_config_pch_pdu_rel8_t*)tlv;
|
||||
|
||||
return ( pull16(ppReadPackedMsg, &pch_pdu_rel8->length, end) &&
|
||||
pull16(ppReadPackedMsg, &pch_pdu_rel8->pdu_index, end) &&
|
||||
pull16(ppReadPackedMsg, (uint16_t *)&pch_pdu_rel8->pdu_index, end) &&
|
||||
pull16(ppReadPackedMsg, &pch_pdu_rel8->p_rnti, end) &&
|
||||
pull8(ppReadPackedMsg, &pch_pdu_rel8->resource_allocation_type, end) &&
|
||||
pull8(ppReadPackedMsg, &pch_pdu_rel8->virtual_resource_block_assignment_flag, end) &&
|
||||
@@ -3179,7 +3179,7 @@ static uint8_t unpack_dl_config_nbch_pdu_rel13_value(void *tlv, uint8_t **ppRead
|
||||
nfapi_dl_config_nbch_pdu_rel13_t* nbch_params_rel13 = (nfapi_dl_config_nbch_pdu_rel13_t*)tlv;
|
||||
|
||||
return ( pull16(ppReadPackedMsg, &nbch_params_rel13->length, end) &&
|
||||
pull16(ppReadPackedMsg, &nbch_params_rel13->pdu_index, end) &&
|
||||
pull16(ppReadPackedMsg, (uint16_t *)&nbch_params_rel13->pdu_index, end) &&
|
||||
pull16(ppReadPackedMsg, &nbch_params_rel13->transmission_power, end) &&
|
||||
pull16(ppReadPackedMsg, &nbch_params_rel13->hyper_sfn_2_lsbs, end));
|
||||
}
|
||||
@@ -3189,7 +3189,7 @@ static uint8_t unpack_dl_config_npdcch_pdu_rel13_value(void *tlv, uint8_t **ppRe
|
||||
nfapi_dl_config_npdcch_pdu_rel13_t* npdcch_params_rel13 = (nfapi_dl_config_npdcch_pdu_rel13_t*)tlv;
|
||||
|
||||
return ( pull16(ppReadPackedMsg, &npdcch_params_rel13->length, end) &&
|
||||
pull16(ppReadPackedMsg, &npdcch_params_rel13->pdu_index, end) &&
|
||||
pull16(ppReadPackedMsg, (uint16_t *)&npdcch_params_rel13->pdu_index, end) &&
|
||||
pull8(ppReadPackedMsg, &npdcch_params_rel13->ncce_index, end) &&
|
||||
pull8(ppReadPackedMsg, &npdcch_params_rel13->aggregation_level, end) &&
|
||||
pull8(ppReadPackedMsg, &npdcch_params_rel13->start_symbol, end) &&
|
||||
@@ -3218,7 +3218,7 @@ static uint8_t unpack_dl_config_ndlsch_pdu_rel13_value(void *tlv, uint8_t **ppRe
|
||||
nfapi_dl_config_ndlsch_pdu_rel13_t* ndlsch_params_rel13 = (nfapi_dl_config_ndlsch_pdu_rel13_t*)tlv;
|
||||
|
||||
return ( pull16(ppReadPackedMsg, &ndlsch_params_rel13->length, end) &&
|
||||
pull16(ppReadPackedMsg, &ndlsch_params_rel13->pdu_index, end) &&
|
||||
pull16(ppReadPackedMsg, (uint16_t *)&ndlsch_params_rel13->pdu_index, end) &&
|
||||
pull8(ppReadPackedMsg, &ndlsch_params_rel13->start_symbol, end) &&
|
||||
pull8(ppReadPackedMsg, &ndlsch_params_rel13->rnti_type, end) &&
|
||||
pull16(ppReadPackedMsg, &ndlsch_params_rel13->rnti, end) &&
|
||||
@@ -3602,7 +3602,7 @@ static uint8_t unpack_ul_config_ue_info_rel8_value(void *tlv, uint8_t **ppReadPa
|
||||
nfapi_ul_config_ue_information_rel8_t* ue_info_rel8 = (nfapi_ul_config_ue_information_rel8_t*)tlv;
|
||||
|
||||
return (pull32(ppReadPackedMsg, &ue_info_rel8->handle, end) &&
|
||||
pull16(ppReadPackedMsg, &ue_info_rel8->rnti, end));
|
||||
pull16(ppReadPackedMsg, (uint16_t *)&ue_info_rel8->rnti, end));
|
||||
}
|
||||
static uint8_t unpack_ul_config_ue_info_rel11_value(void *tlv, uint8_t **ppReadPackedMsg, uint8_t *end)
|
||||
{
|
||||
|
||||
@@ -1624,10 +1624,6 @@ void pnf_nfapi_p7_read_dispatch_message(pnf_p7_t* pnf_p7, uint32_t now_hr_time)
|
||||
|
||||
// need to update the time as we would only use the value from the
|
||||
// select
|
||||
#if 0
|
||||
// DJP - why do this here and not on return from recv???
|
||||
now_hr_time = pnf_get_current_time_hr();
|
||||
#endif
|
||||
}
|
||||
while(recvfrom_result > 0);
|
||||
}
|
||||
|
||||
@@ -1247,9 +1247,14 @@ void vnf_handle_timing_info(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
|
||||
int16_t vnf_pnf_sfnsf_delta = NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf) - NFAPI_SFNSF2DEC(ind.last_sfn_sf);
|
||||
|
||||
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() PNF:SFN/SF:%d VNF:SFN/SF:%d deltaSFNSF:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind.last_sfn_sf), NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf), vnf_pnf_sfnsf_delta);
|
||||
if (vnf_pnf_sfnsf_delta>1 || vnf_pnf_sfnsf_delta < -1)
|
||||
|
||||
// Panos: Careful here!!! Modification of the original nfapi-code
|
||||
//if (vnf_pnf_sfnsf_delta>1 || vnf_pnf_sfnsf_delta < -1)
|
||||
if (vnf_pnf_sfnsf_delta>0 || vnf_pnf_sfnsf_delta < 0)
|
||||
{
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() LARGE SFN/SF DELTA between PNF and VNF delta:%d VNF:%d PNF:%d\n\n\n\n\n\n\n\n\n", __FUNCTION__, vnf_pnf_sfnsf_delta, NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf), NFAPI_SFNSF2DEC(ind.last_sfn_sf));
|
||||
// Panos: Careful here!!! Modification of the original nfapi-code
|
||||
vnf_p7->p7_connections[0].sfn_sf = ind.last_sfn_sf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,13 +200,6 @@ int nfapi_vnf_p7_start(nfapi_vnf_p7_config_t* config)
|
||||
// still time before the end of the subframe wait
|
||||
pselect_timeout = timespec_sub(sf_start, pselect_start);
|
||||
|
||||
#if 0
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() sf_start:%d.%ld pselect_start:%d.%ld pseclect_timeout:%d.%ld\n",
|
||||
__FUNCTION__,
|
||||
sf_start.tv_sec, sf_start.tv_nsec,
|
||||
pselect_start.tv_sec, pselect_start.tv_nsec,
|
||||
pselect_timeout.tv_sec, pselect_timeout.tv_nsec);
|
||||
#endif
|
||||
}
|
||||
|
||||
//original_pselect_timeout = pselect_timeout;
|
||||
@@ -266,13 +259,6 @@ if (selectRetval==-1 && errno == 22)
|
||||
phy->insync_minor_adjustment_duration, phy->insync_minor_adjustment,
|
||||
sf_duration.tv_sec, sf_duration.tv_nsec);
|
||||
}
|
||||
#if 0
|
||||
if (selectRetval != 0 || phy->insync_minor_adjustment_duration != 0)
|
||||
NFAPI_TRACE(NFAPI_TRACE_NOTE, "pselect()=%d maxSock:%d vnf_p7->socket:%d pselect_timeout:%u.%u original_pselect_timeout:%u.%u\n",
|
||||
selectRetval, maxSock, vnf_p7->socket, pselect_timeout.tv_sec, pselect_timeout.tv_nsec,
|
||||
original_pselect_timeout.tv_sec, original_pselect_timeout.tv_nsec);
|
||||
#endif
|
||||
|
||||
if(selectRetval == 0)
|
||||
{
|
||||
// calculate the start of the next subframe
|
||||
|
||||
Reference in New Issue
Block a user