Commit b6a9bb33 authored by David Price's avatar David Price

Bit of tidy up, rename variables. change some logs

parent 17322170
......@@ -43,7 +43,7 @@ extern void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, nfa
extern void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu);
extern void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu);
extern uint8_t nfapi_pnf;
extern uint8_t nfapi_mode;
nfapi_tx_request_pdu_t* tx_request_pdu[1023][10][10]; // [frame][subframe][max_num_pdus]
......@@ -923,19 +923,13 @@ void pnf_phy_deallocate_p7_vendor_ext(nfapi_p7_message_header_t* header)
int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t* req)
{
//printf("[PNF] hi dci0 request\n");
LOG_D(PHY,"[PNF] hi dci0 request sfn_sf:%d number_of_dci:%d number_of_hi:%d\n", NFAPI_SFNSF2DEC(req->sfn_sf), req->hi_dci0_request_body.number_of_dci, req->hi_dci0_request_body.number_of_hi);
//phy_info* phy = (phy_info*)(pnf_p7->user_data);
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
eNB_rxtx_proc_t *proc = &eNB->proc.proc_rxtx[0];
LOG_D(PHY,"[PNF] HI_DCI0_REQ sfn_sf:%d sfnsf:%u DCIs:%d HIs:%d\n",
NFAPI_SFNSF2DEC(req->sfn_sf),
req->hi_dci0_request_body.sfnsf,
req->hi_dci0_request_body.number_of_dci,
req->hi_dci0_request_body.number_of_hi
);
for (int i=0; i<req->hi_dci0_request_body.number_of_dci + req->hi_dci0_request_body.number_of_hi; i++)
{
LOG_D(PHY,"[PNF] HI_DCI0_REQ sfn_sf:%d PDU[%d]\n", NFAPI_SFNSF2DEC(req->sfn_sf), i);
......@@ -960,6 +954,10 @@ int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t*
eNB->pdcch_vars[NFAPI_SFNSF2SF(req->sfn_sf)&1].num_dci++;
}
else
{
LOG_E(PHY,"[PNF] HI_DCI0_REQ sfn_sf:%d PDU[%d] - unknown pdu type:%d\n", NFAPI_SFNSF2DEC(req->sfn_sf), i, req->hi_dci0_request_body.hi_dci0_pdu_list[i].pdu_type);
}
}
return 0;
......@@ -1752,7 +1750,7 @@ void* pnf_start_thread(void* ptr)
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port)
{
nfapi_pnf = 1; // PNF!
nfapi_mode = 1; // PNF!
nfapi_pnf_config_t* config = nfapi_pnf_config_create();
......@@ -1820,7 +1818,7 @@ void oai_subframe_ind(eNB_rxtx_proc_t *proc)
//PHY_VARS_eNB *eNB = RC.eNB[0][0];
//int even_frame_thread = eNB->proc.proc_rxtx[0] == proc ? 0 : 1;
int pnf = nfapi_pnf==1 ? 1 : 0;
int pnf = nfapi_mode==1 ? 1 : 0;
uint16_t sfn = pnf ? proc->frame_tx : proc->frame_rx;
uint16_t sf = pnf ? proc->subframe_tx : proc->frame_rx;
uint16_t sfn_sf_tx = sfn<<4 | sf;
......
......@@ -446,7 +446,7 @@ int pnf_param_resp_cb(nfapi_vnf_config_t* config, int p5_idx, nfapi_pnf_param_re
int pnf_config_resp_cb(nfapi_vnf_config_t* config, int p5_idx, nfapi_pnf_config_response_t* resp)
{
printf("[VNF] pnf config response idx:%d resp[header[phy_id:%u message_id:%u message_length:%u]]\n", p5_idx, resp->header.phy_id, resp->header.message_id, resp->header.message_length);
printf("[VNF] pnf config response idx:%d resp[header[phy_id:%u message_id:%02x message_length:%u]]\n", p5_idx, resp->header.phy_id, resp->header.message_id, resp->header.message_length);
if(1)
{
......@@ -659,19 +659,22 @@ int phy_rach_indication(struct nfapi_vnf_p7_config* config, nfapi_rach_indicatio
int phy_harq_indication(struct nfapi_vnf_p7_config* config, nfapi_harq_indication_t* ind)
{
LOG_E(MAC, "%s() NFAPI SFN/SF:%d number_of_preambles:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->harq_indication_body.number_of_harqs);
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
LOG_E(MAC, "%s() NFAPI SFN/SF:%d number_of_harqs:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->harq_indication_body.number_of_harqs);
pthread_mutex_lock(&eNB->UL_INFO_mutex);
eNB->UL_INFO.harq_ind = *ind;
eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list = eNB->harq_pdu_list;
for (int i=0; i<ind->harq_indication_body.number_of_harqs; i++)
{
harq_indication(
0, // DJP - fixme
0, // DJP - fixme
NFAPI_SFNSF2SFN(ind->sfn_sf),
NFAPI_SFNSF2SF(ind->sfn_sf),
&ind->harq_indication_body.harq_pdu_list[i]
);
memcpy(&eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list[i], &ind->harq_indication_body.harq_pdu_list[i], sizeof(eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list[i]));
}
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
// vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
//mac_harq_ind(p7_vnf->mac, ind);
return 1;
......@@ -832,7 +835,7 @@ int phy_vendor_ext(struct nfapi_vnf_p7_config* config, nfapi_p7_message_header_t
}
else
{
printf("[VNF] unknown %d\n", msg->message_id);
printf("[VNF] unknown %02x\n", msg->message_id);
}
return 0;
}
......@@ -1270,11 +1273,11 @@ void vnf_start_thread(void* ptr)
}
static vnf_info vnf;
extern uint8_t nfapi_pnf;
extern uint8_t nfapi_mode;
/*------------------------------------------------------------------------------*/
void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port)
{
nfapi_pnf = 2;
nfapi_mode = 2;
memset(&vnf, 0, sizeof(vnf));
......@@ -1342,9 +1345,9 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req)
dl_config_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
//dl_config_req->header.message_id = NFAPI_DL_CONFIG_BCH_PDU_TYPE;
//NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() header message_id:%d\n", __FUNCTION__, dl_config_req->header.message_id);
//NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() header message_id:%02x\n", __FUNCTION__, dl_config_req->header.message_id);
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() DL_CONFIG p7_config:%p phy_id:%d message_id:%d sfn_sf:%d pdcch:%d dci:%d pdu:%d pdsch_rnti:%d pcfich:%d\n", __FUNCTION__, p7_config, dl_config_req->header.phy_id, dl_config_req->header.message_id, NFAPI_SFNSF2DEC(dl_config_req->sfn_sf), dl_config_req->dl_config_request_body.number_pdcch_ofdm_symbols, dl_config_req->dl_config_request_body.number_dci, dl_config_req->dl_config_request_body.number_pdu, dl_config_req->dl_config_request_body.number_pdsch_rnti, dl_config_req->dl_config_request_body.transmission_power_pcfich);
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() DL_CONFIG p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d pdcch:%d dci:%d pdu:%d pdsch_rnti:%d pcfich:%d\n", __FUNCTION__, p7_config, dl_config_req->header.phy_id, dl_config_req->header.message_id, NFAPI_SFNSF2DEC(dl_config_req->sfn_sf), dl_config_req->dl_config_request_body.number_pdcch_ofdm_symbols, dl_config_req->dl_config_request_body.number_dci, dl_config_req->dl_config_request_body.number_pdu, dl_config_req->dl_config_request_body.number_pdsch_rnti, dl_config_req->dl_config_request_body.transmission_power_pcfich);
int retval = nfapi_vnf_p7_dl_config_req(p7_config, dl_config_req);
......@@ -1361,7 +1364,7 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req)
tx_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() TX_REQ p7_config:%p phy_id:%d message_id:%d sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, p7_config, tx_req->header.phy_id, tx_req->header.message_id, NFAPI_SFNSF2DEC(tx_req->sfn_sf), tx_req->tx_request_body.number_of_pdus);
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() TX_REQ p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, p7_config, tx_req->header.phy_id, tx_req->header.message_id, NFAPI_SFNSF2DEC(tx_req->sfn_sf), tx_req->tx_request_body.number_of_pdus);
int retval = nfapi_vnf_p7_tx_req(p7_config, tx_req);
......@@ -1378,7 +1381,7 @@ int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req)
hi_dci0_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() HI_DCI0_REQ p7_config:%p phy_id:%d message_id:%d sfn_sf:%d number_of_dci:%d number_of_hi:%d\n", __FUNCTION__, p7_config, hi_dci0_req->header.phy_id, hi_dci0_req->header.message_id, NFAPI_SFNSF2DEC(hi_dci0_req->sfn_sf), hi_dci0_req->hi_dci0_request_body.number_of_dci, hi_dci0_req->hi_dci0_request_body.number_of_hi);
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() HI_DCI0_REQ p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d number_of_dci:%d number_of_hi:%d\n", __FUNCTION__, p7_config, hi_dci0_req->header.phy_id, hi_dci0_req->header.message_id, NFAPI_SFNSF2DEC(hi_dci0_req->sfn_sf), hi_dci0_req->hi_dci0_request_body.number_of_dci, hi_dci0_req->hi_dci0_request_body.number_of_hi);
int retval = nfapi_vnf_p7_hi_dci0_req(p7_config, hi_dci0_req);
......@@ -1395,9 +1398,9 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req)
ul_config_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
//NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() header message_id:%d\n", __FUNCTION__, ul_config_req->header.message_id);
//NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() header message_id:%02x\n", __FUNCTION__, ul_config_req->header.message_id);
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() UL_CONFIG p7_config:%p phy_id:%d message_id:%d sfn_sf:%d PDUs:%d rach_prach_frequency_resources:%d srs_present:%d\n",
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() UL_CONFIG p7_config:%p phy_id:%d message_id:%02x sfn_sf:%d PDUs:%d rach_prach_frequency_resources:%d srs_present:%d\n",
__FUNCTION__, p7_config, ul_config_req->header.phy_id, ul_config_req->header.message_id, NFAPI_SFNSF2DEC(ul_config_req->sfn_sf),
ul_config_req->ul_config_request_body.number_of_pdus,
ul_config_req->ul_config_request_body.rach_prach_frequency_resources,
......
......@@ -42,7 +42,7 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req);
int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req);
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req);
extern uint8_t nfapi_pnf;
extern uint8_t nfapi_mode;
void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB,
......@@ -715,14 +715,14 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
}
}
if (nfapi_pnf && do_oai)
if (nfapi_mode && do_oai)
{
oai_nfapi_tx_req(Sched_INFO->TX_req);
oai_nfapi_dl_config_req(Sched_INFO->DL_req); // DJP - .dl_config_request_body.dl_config_pdu_list[0]); // DJP - FIXME TODO - yuk - only copes with 1 pdu
}
if (nfapi_pnf && number_hi_dci0_pdu!=0)
if (nfapi_mode && number_hi_dci0_pdu!=0)
{
oai_nfapi_hi_dci0_req(HI_DCI0_req);
}
......@@ -750,7 +750,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
}
}
if (nfapi_pnf)
if (nfapi_mode)
{
for (int future_subframe=0;future_subframe<10;future_subframe++)
{
......
......@@ -50,7 +50,7 @@
# include "intertask_interface.h"
#endif
extern uint8_t nfapi_pnf;
extern uint8_t nfapi_mode;
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
......@@ -703,7 +703,7 @@ void prach_procedures(PHY_VARS_eNB *eNB,
eNB->preamble_list[0].instance_length = 0; //don't know exactly what this is
// If NFAPI PNF then we need to send the message to the VNF
if (nfapi_pnf == 1)
if (nfapi_mode == 1)
{
nfapi_rach_indication_t rach_ind;
rach_ind.header.message_id = NFAPI_RACH_INDICATION;
......@@ -711,7 +711,8 @@ void prach_procedures(PHY_VARS_eNB *eNB,
rach_ind.rach_indication_body = eNB->UL_INFO.rach_ind;
LOG_E(PHY,"\n\n\n\nDJP - this needs to be sent to VNF **********************************************\n\n\n\n");
LOG_E(PHY,"Filling NFAPI indication for RACH : TA %d, Preamble %d, rnti %x, rach_resource_type %d\n",
LOG_E(PHY,"Filling NFAPI indication for RACH : SFN_SF:%d TA %d, Preamble %d, rnti %x, rach_resource_type %d\n",
NFAPI_SFNSF2DEC(rach_ind.sfn_sf),
eNB->preamble_list[0].preamble_rel8.timing_advance,
eNB->preamble_list[0].preamble_rel8.preamble,
eNB->preamble_list[0].preamble_rel8.rnti,
......@@ -1727,7 +1728,7 @@ void fill_ulsch_harq_indication(PHY_VARS_eNB *eNB,LTE_UL_eNB_HARQ_t *ulsch_harq,
AssertFatal(UE_id>=0,"UE_id doesn't exist\n");
pthread_mutex_lock(&eNB->UL_INFO_mutex);
nfapi_harq_indication_pdu_t *pdu = &eNB->UL_INFO.harq_ind.harq_pdu_list[eNB->UL_INFO.harq_ind.number_of_harqs];
nfapi_harq_indication_pdu_t *pdu = &eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list[eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs];
int M;
int i;
......@@ -1782,8 +1783,8 @@ void fill_ulsch_harq_indication(PHY_VARS_eNB *eNB,LTE_UL_eNB_HARQ_t *ulsch_harq,
}
}
LOG_E(PHY,"eNB->UL_INFO.harq_ind.number_of_harqs:%d\n", eNB->UL_INFO.harq_ind.number_of_harqs);
eNB->UL_INFO.harq_ind.number_of_harqs++;
LOG_E(PHY,"eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs:%d\n", eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs);
eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs++;
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
}
......@@ -1801,7 +1802,7 @@ void fill_uci_harq_indication(PHY_VARS_eNB *eNB,
pthread_mutex_lock(&eNB->UL_INFO_mutex);
nfapi_harq_indication_pdu_t *pdu = &eNB->UL_INFO.harq_ind.harq_pdu_list[eNB->UL_INFO.harq_ind.number_of_harqs];
nfapi_harq_indication_pdu_t *pdu = &eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list[eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs];
pdu->instance_length = 0; // don't know what to do with this
// pdu->rx_ue_information.handle = handle;
......@@ -1945,8 +1946,8 @@ void fill_uci_harq_indication(PHY_VARS_eNB *eNB,
} //TDD
eNB->UL_INFO.harq_ind.number_of_harqs++;
LOG_E(PHY,"Incremented eNB->UL_INFO.harq_ind.number_of_harqs:%d\n", eNB->UL_INFO.harq_ind.number_of_harqs);
eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs++;
LOG_E(PHY,"Incremented eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs:%d\n", eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs);
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
}
......@@ -2021,7 +2022,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
uci_procedures(eNB,proc);
if (nfapi_pnf == 0 || nfapi_pnf == 1) // If PNF or monolithic
if (nfapi_mode == 0 || nfapi_mode == 1) // If PNF or monolithic
{
pusch_procedures(eNB,proc);
}
......
......@@ -105,7 +105,7 @@ static int enb_check_band_frequencies(char* lib_config_file_name_pP,
}
extern void mac_top_init_eNB(void );
extern uint8_t nfapi_pnf;
extern uint8_t nfapi_mode;
......@@ -288,7 +288,7 @@ void RCconfig_L1(void) {
RC.eNB[j][0]->eth_params_n.remote_portd = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTD_IDX].iptr);
RC.eNB[j][0]->eth_params_n.transp_preference = ETH_UDP_MODE;
nfapi_pnf = 1;
nfapi_mode = 1;
RC.nb_macrlc_inst = 1; // This is used by mac_top_init_eNB()
......@@ -386,7 +386,7 @@ void RCconfig_macrlc() {
RC.mac[j]->eth_params_s.remote_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTD_IDX].iptr);
RC.mac[j]->eth_params_s.transp_preference = ETH_UDP_MODE;
nfapi_pnf = 2;
nfapi_mode = 2;
printf("**************** vnf_port:%d\n", RC.mac[j]->eth_params_s.my_portc);
configure_nfapi_vnf(RC.mac[j]->eth_params_s.my_addr, RC.mac[j]->eth_params_s.my_portc);
......
......@@ -14,7 +14,7 @@ extern int oai_nfapi_harq_indication(nfapi_harq_indication_t *harq_ind);
extern int oai_nfapi_crc_indication(nfapi_crc_indication_t *crc_ind);
extern int oai_nfapi_cqi_indication(nfapi_cqi_indication_t *cqi_ind);
extern int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind);
extern uint8_t nfapi_pnf;
extern uint8_t nfapi_mode;
void handle_rach(UL_IND_t *UL_info) {
int i;
......@@ -79,7 +79,7 @@ void handle_cqi(UL_IND_t *UL_info) {
int i;
if (nfapi_pnf == 1)
if (nfapi_mode == 1)
{
if (UL_info->cqi_ind.number_of_cqis>0)
{
......@@ -113,9 +113,9 @@ void handle_harq(UL_IND_t *UL_info) {
//if (UL_info->harq_ind.number_of_harqs>0)
if (nfapi_pnf == 1 && UL_info->harq_ind.number_of_harqs>0) // PNF
if (nfapi_mode == 1 && UL_info->harq_ind.harq_indication_body.number_of_harqs>0) // PNF
{
LOG_E(PHY, "UL_info->harq_ind.number_of_harqs:%d Send to VNF\n", UL_info->harq_ind.number_of_harqs);
LOG_E(PHY, "UL_info->harq_ind.harq_indication_body.number_of_harqs:%d Send to VNF\n", UL_info->harq_ind.harq_indication_body.number_of_harqs);
nfapi_harq_indication_t ind;
......@@ -130,21 +130,21 @@ void handle_harq(UL_IND_t *UL_info) {
}
}
for (i=0;i<UL_info->harq_ind.number_of_harqs;i++)
for (i=0;i<UL_info->harq_ind.harq_indication_body.number_of_harqs;i++)
harq_indication(UL_info->module_id,
UL_info->CC_id,
UL_info->frame,
UL_info->subframe,
&UL_info->harq_ind.harq_pdu_list[i]);
&UL_info->harq_ind.harq_indication_body.harq_pdu_list[i]);
UL_info->harq_ind.number_of_harqs=0;
UL_info->harq_ind.harq_indication_body.number_of_harqs=0;
}
void handle_ulsch(UL_IND_t *UL_info) {
int i,j;
if(nfapi_pnf == 1)
if(nfapi_mode == 1)
{
if (UL_info->crc_ind.crc_indication_body.number_of_crcs>0)
{
......@@ -155,7 +155,7 @@ void handle_ulsch(UL_IND_t *UL_info) {
}
if (nfapi_pnf == 1 && UL_info->rx_ind.rx_indication_body.number_of_pdus>0)
if (nfapi_mode == 1 && UL_info->rx_ind.rx_indication_body.number_of_pdus>0)
{
LOG_D(PHY,"UL_info->rx_ind.number_of_pdus:%d\n", UL_info->rx_ind.rx_indication_body.number_of_pdus);
oai_nfapi_rx_ind(&UL_info->rx_ind);
......@@ -251,9 +251,9 @@ static void dump_ul(UL_IND_t *u)
A("XXXX UL mod %d CC %d f.sf %d.%d\n",
u->module_id, u->CC_id, u->frame, u->subframe);
A("XXXX harq_ind %d\n", u->harq_ind.number_of_harqs);
for (i = 0; i < u->harq_ind.number_of_harqs; i++) {
nfapi_harq_indication_pdu_t *v = &u->harq_ind.harq_pdu_list[i];
A("XXXX harq_ind %d\n", u->harq_ind.harq_indication_body.number_of_harqs);
for (i = 0; i < u->harq_ind.harq_indication_body.number_of_harqs; i++) {
nfapi_harq_indication_pdu_t *v = &u->harq_ind.harq_indication_body.harq_pdu_list[i];
A("XXXX harq ind %d\n", i);
A("XXXX rnti %d\n", v->rx_ue_information.rnti);
A("XXXX tb1 %d tb2 %d\n", v->harq_indication_fdd_rel8.harq_tb1,
......@@ -513,7 +513,7 @@ void UL_indication(UL_IND_t *UL_info)
UL_info->frame,UL_info->subframe,
module_id,CC_id);
if (nfapi_pnf != 1)
if (nfapi_mode != 1)
{
if (ifi->CC_mask==0) {
ifi->current_frame = UL_info->frame;
......@@ -531,7 +531,7 @@ void UL_indication(UL_IND_t *UL_info)
clear_nfapi_information(RC.mac[module_id],CC_id,
UL_info->frame,UL_info->subframe);
LOG_D(PHY, "UL_info[rx_ind:%d number_of_harqs:%d number_of_crcs:%d number_of_cqis:%d number_of_preambles:%d]\n", UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs, UL_info->cqi_ind.number_of_cqis, UL_info->rach_ind.number_of_preambles);
LOG_D(PHY, "UL_info[rx_ind:%d number_of_harqs:%d number_of_crcs:%d number_of_cqis:%d number_of_preambles:%d]\n", UL_info->rx_ind.rx_indication_body.number_of_pdus, UL_info->harq_ind.harq_indication_body.number_of_harqs, UL_info->crc_ind.crc_indication_body.number_of_crcs, UL_info->cqi_ind.number_of_cqis, UL_info->rach_ind.number_of_preambles);
handle_rach(UL_info);
......@@ -546,7 +546,7 @@ void UL_indication(UL_IND_t *UL_info)
handle_ulsch(UL_info);
if (nfapi_pnf != 1)
if (nfapi_mode != 1)
{
if (ifi->CC_mask == ((1<<MAX_NUM_CCs)-1)) {
......
......@@ -61,7 +61,7 @@ typedef struct{
sub_frame_t subframe;
/// harq indication list
nfapi_harq_indication_body_t harq_ind;
nfapi_harq_indication_t harq_ind;
/// crc indication list
nfapi_crc_indication_t crc_ind;
......
......@@ -152,7 +152,7 @@ void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe);
#endif
extern void oai_subframe_ind(eNB_rxtx_proc_t *proc);
extern uint8_t nfapi_pnf;
extern uint8_t nfapi_mode;
static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_name) {
......@@ -199,11 +199,11 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
}
}
if (nfapi_pnf)
if (nfapi_mode)
{
oai_subframe_ind(proc); // PNF ---> P7:subframe_ind --> VNF
//LOG_E(PHY, "Returned from oai_subframe_ind()\n");
LOG_D(PHY, "UL_info[rx_ind:%d number_of_harqs:%d number_of_crcs:%d number_of_cqis:%d number_of_preambles:%d]\n", eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus, eNB->UL_INFO.harq_ind.number_of_harqs, eNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs, eNB->UL_INFO.cqi_ind.number_of_cqis, eNB->UL_INFO.rach_ind.number_of_preambles);
LOG_D(PHY, "UL_info[rx_ind:%d number_of_harqs:%d number_of_crcs:%d number_of_cqis:%d number_of_preambles:%d]\n", eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus, eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs, eNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs, eNB->UL_INFO.cqi_ind.number_of_cqis, eNB->UL_INFO.rach_ind.number_of_preambles);
}
// UE-specific RX processing for subframe n
......@@ -1055,7 +1055,7 @@ void init_eNB(int single_thread_flag,int wait_for_sync) {
eNB->UL_INFO.rx_ind.rx_indication_body.rx_pdu_list = eNB->rx_pdu_list;
eNB->UL_INFO.crc_ind.crc_indication_body.crc_pdu_list = eNB->crc_pdu_list;
eNB->UL_INFO.sr_ind.sr_pdu_list = eNB->sr_pdu_list;
eNB->UL_INFO.harq_ind.harq_pdu_list = eNB->harq_pdu_list;
eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list = eNB->harq_pdu_list;
eNB->UL_INFO.cqi_ind.cqi_pdu_list = eNB->cqi_pdu_list;
eNB->UL_INFO.cqi_ind.cqi_raw_pdu_list = eNB->cqi_raw_pdu_list;
}
......
......@@ -116,7 +116,7 @@ pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex;
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
uint8_t nfapi_pnf = 0;
uint8_t nfapi_mode = 0;
pthread_cond_t sync_cond;
pthread_mutex_t sync_mutex;
......@@ -1198,15 +1198,15 @@ int main( int argc, char **argv )
// Will have parsed the config files by now
printf("NFAPI_PNF:%d\n", nfapi_pnf);
printf("NFAPI MODE:%d\n", nfapi_mode);
if (nfapi_pnf==1) // PNF
if (nfapi_mode==1) // PNF
{
set_comp_log(PHY, LOG_DEBUG, LOG_FULL, 1);
printf("DJP - forcing PHY to DEBUG - should see similar line if it works\n");
LOG_E(PHY,"%s() DJP - forcing PHY to LOG_DEBUG for PNF\n", __FUNCTION__);
}
else if (nfapi_pnf == 2) // VNF
else if (nfapi_mode == 2) // VNF
{
set_comp_log(MAC, LOG_DEBUG, LOG_FULL, 1);
set_comp_log(RRC, LOG_INFO, LOG_FULL, 1);
......@@ -1283,7 +1283,7 @@ int main( int argc, char **argv )
rt_sleep_ns(10*100000000ULL);
if (nfapi_pnf)
if (nfapi_mode)
{
printf("NFAPI*** - mutex and cond created - will block shortly for completion of PNF connection\n");
pthread_cond_init(&sync_cond,NULL);
......@@ -1292,7 +1292,7 @@ int main( int argc, char **argv )
const char *nfapi_mode_str = "<UNKNOWN>";
switch(nfapi_pnf)
switch(nfapi_mode)
{
case 0:
nfapi_mode_str = "MONOLITHIC";
......@@ -1305,7 +1305,7 @@ int main( int argc, char **argv )
}
printf("NFAPI MODE:%s\n", nfapi_mode_str);
if (nfapi_pnf==2) // VNF
if (nfapi_mode==2) // VNF
wait_nfapi_init("main?");
printf("START MAIN THREADS\n");
......@@ -1346,7 +1346,7 @@ int main( int argc, char **argv )
config_sync_var=0;
if (nfapi_pnf==1) // PNF
if (nfapi_mode==1) // PNF
{
//set_comp_log(PHY, LOG_DEBUG, LOG_FULL, 1);
//printf("DJP - forcing PHY to DEBUG - should see similar line if it works\n");
......@@ -1362,7 +1362,7 @@ int main( int argc, char **argv )
// once all RUs are ready intiailize the rest of the eNBs ((dependence on final RU parameters after configuration)
printf("ALL RUs ready - init eNBs\n");
if (nfapi_pnf != 1 && nfapi_pnf != 2)
if (nfapi_mode != 1 && nfapi_mode != 2)
{
printf("Not NFAPI mode - call init_eNB_afterRU()\n");
init_eNB_afterRU();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment