diff --git a/nfapi/nfapi_pnf.c b/nfapi/nfapi_pnf.c index 27adaba5d326be14f5d728bdd3275733e8aed7d8..bb70eb0fc8868f105927fbc52ce2fa880504de46 100644 --- a/nfapi/nfapi_pnf.c +++ b/nfapi/nfapi_pnf.c @@ -1113,7 +1113,7 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req) int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request_t* req) { - LOG_D(PHY,"[PNF] UL_CONFIG_REQ %s() sfn_sf:%d pdu:%d rach_prach_frequency_resources:%d srs_present:%u\n", + if (0)LOG_D(PHY,"[PNF] UL_CONFIG_REQ %s() sfn_sf:%d pdu:%d rach_prach_frequency_resources:%d srs_present:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), req->ul_config_request_body.number_of_pdus, @@ -1719,6 +1719,10 @@ void* pnf_start_thread(void* ptr) nfapi_pnf_config_t *config = (nfapi_pnf_config_t*)ptr; + struct sched_param sp; + sp.sched_priority = 20; + pthread_setschedparam(pthread_self(),SCHED_FIFO,&sp); + nfapi_pnf_start(config); return (void*)0; @@ -1781,6 +1785,9 @@ void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] Creating PNF NFAPI start thread %s\n", __FUNCTION__); pthread_create(&pnf_start_pthread, NULL, &pnf_start_thread, config); + + pthread_setname_np(pnf_start_pthread, "NFAPI_PNF"); + } void oai_subframe_ind(uint16_t sfn, uint16_t sf) @@ -1845,7 +1852,7 @@ int oai_nfapi_crc_indication(nfapi_crc_indication_t *crc_ind) crc_ind->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!! crc_ind->header.message_id = NFAPI_CRC_INDICATION; - LOG_E(PHY, "%s() sfn_sf:%d number_of_crcs:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(crc_ind->sfn_sf), crc_ind->crc_indication_body.number_of_crcs); + //LOG_E(PHY, "%s() sfn_sf:%d number_of_crcs:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(crc_ind->sfn_sf), crc_ind->crc_indication_body.number_of_crcs); return nfapi_pnf_p7_crc_ind(p7_config_g, crc_ind); } @@ -1855,7 +1862,7 @@ int oai_nfapi_cqi_indication(nfapi_cqi_indication_t *ind) ind->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!! ind->header.message_id = NFAPI_RX_CQI_INDICATION; - LOG_E(PHY, "%s() sfn_sf:%d number_of_cqis:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->cqi_indication_body.number_of_cqis); + //LOG_E(PHY, "%s() sfn_sf:%d number_of_cqis:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->cqi_indication_body.number_of_cqis); return nfapi_pnf_p7_cqi_ind(p7_config_g, ind); } @@ -1867,7 +1874,7 @@ int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind) int retval = nfapi_pnf_p7_rx_ind(p7_config_g, ind); - LOG_D(PHY,"%s() SFN/SF:%d pdus:%d retval:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rx_indication_body.number_of_pdus, retval); + //LOG_D(PHY,"%s() SFN/SF:%d pdus:%d retval:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rx_indication_body.number_of_pdus, retval); //free(ind.rx_indication_body.rx_pdu_list); @@ -1880,7 +1887,7 @@ int oai_nfapi_sr_indication(nfapi_sr_indication_t *ind) int retval = nfapi_pnf_p7_sr_ind(p7_config_g, ind); - LOG_E(PHY,"%s() SFN/SF:%d srs:%d retval:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->sr_indication_body.number_of_srs, retval); + //LOG_E(PHY,"%s() SFN/SF:%d srs:%d retval:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->sr_indication_body.number_of_srs, retval); //free(ind.rx_indication_body.rx_pdu_list); diff --git a/nfapi/nfapi_vnf.c b/nfapi/nfapi_vnf.c index 9fedec4c2c973fb748233d125885e7a3cf91c67d..e73bd35995223583f9d16f393f8afe825470d65c 100644 --- a/nfapi/nfapi_vnf.c +++ b/nfapi/nfapi_vnf.c @@ -1424,7 +1424,7 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) //LOG_D(PHY, "[VNF] %s() header message_id:%02x\n", __FUNCTION__, dl_config_req->header.message_id); - LOG_D(PHY, "[VNF] %s() DL_CONFIG sfn_sf:%d pdcch:%d dci:%d pdu:%d pdsch_rnti:%d pcfich:%d\n", __FUNCTION__, 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); + //LOG_D(PHY, "[VNF] %s() DL_CONFIG sfn_sf:%d pdcch:%d dci:%d pdu:%d pdsch_rnti:%d pcfich:%d\n", __FUNCTION__, 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); @@ -1446,7 +1446,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!!!! - LOG_D(PHY, "[VNF] %s() TX_REQ sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(tx_req->sfn_sf), tx_req->tx_request_body.number_of_pdus); + //LOG_D(PHY, "[VNF] %s() TX_REQ sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, 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); @@ -1468,7 +1468,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!!!! - LOG_D(PHY, "[VNF] %s() HI_DCI0_REQ sfn_sf:%d dci:%d hi:%d\n", __FUNCTION__, 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); + //LOG_D(PHY, "[VNF] %s() HI_DCI0_REQ sfn_sf:%d dci:%d hi:%d\n", __FUNCTION__, 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); @@ -1493,11 +1493,7 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) //LOG_D(PHY, "[VNF] %s() header message_id:%02x\n", __FUNCTION__, ul_config_req->header.message_id); - LOG_D(PHY, "[VNF] %s() UL_CONFIG sfn_sf:%d PDUs:%d rach_prach_frequency_resources:%d srs_present:%d\n", - __FUNCTION__, 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, - ul_config_req->ul_config_request_body.srs_present); + //LOG_D(PHY, "[VNF] %s() UL_CONFIG sfn_sf:%d PDUs:%d rach_prach_frequency_resources:%d srs_present:%d\n", __FUNCTION__, 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, ul_config_req->ul_config_request_body.srs_present); int retval = nfapi_vnf_p7_ul_config_req(p7_config, ul_config_req); diff --git a/open-nfapi.oai.patch b/open-nfapi.oai.patch index b557d723df9e52322580e29dd1313745547c3b7d..9eb5ccf6353988fb433057e724515eac0b9f826d 100644 --- a/open-nfapi.oai.patch +++ b/open-nfapi.oai.patch @@ -1,3 +1,17 @@ +diff --git a/common/public_inc/debug.h b/common/public_inc/debug.h +index 05e9870..14f97a1 100644 +--- a/common/public_inc/debug.h ++++ b/common/public_inc/debug.h +@@ -39,7 +39,8 @@ extern nfapi_trace_fn_t nfapi_trace_g; + extern nfapi_trace_level_t nfapi_trace_level_g; + + /*! NFAPI trace macro */ +-#define NFAPI_TRACE(level, format, ...) { if(nfapi_trace_g && ((nfapi_trace_level_t)level <= nfapi_trace_level_g)) (*nfapi_trace_g)(level, format, ##__VA_ARGS__); } ++//#define NFAPI_TRACE(level, format, ...) { if(nfapi_trace_g && ((nfapi_trace_level_t)level <= nfapi_trace_level_g)) (*nfapi_trace_g)(level, format, ##__VA_ARGS__); } ++#define NFAPI_TRACE(level, format, ...) { if (nfapi_trace_g) (*nfapi_trace_g)(level, format, ##__VA_ARGS__); } + + /*! Function to change the trace level + * \param new_level The modified trace level diff --git a/nfapi/public_inc/nfapi_interface.h b/nfapi/public_inc/nfapi_interface.h index 2d58c2a..f665d11 100644 --- a/nfapi/public_inc/nfapi_interface.h @@ -27,7 +41,7 @@ index 0e06963..3f017bc 100644 return 1; diff --git a/nfapi/src/nfapi_p7.c b/nfapi/src/nfapi_p7.c -index a3b0141..4083a47 100644 +index a3b0141..69ff860 100644 --- a/nfapi/src/nfapi_p7.c +++ b/nfapi/src/nfapi_p7.c @@ -111,6 +111,8 @@ static uint8_t pack_dl_config_dci_dl_pdu_rel8_value(void* tlv, uint8_t **ppWrite @@ -100,7 +114,20 @@ index a3b0141..4083a47 100644 } static uint8_t pack_ul_config_request_ulsch_rel8_value(void *tlv, uint8_t **ppWritePackedMsg, uint8_t * end) -@@ -1518,7 +1539,21 @@ static uint8_t pack_tx_request_body_value(void* tlv, uint8_t **ppWritePackedMsg, +@@ -796,9 +817,10 @@ static uint8_t pack_ul_config_request_cqi_ri_rel9_value(void *tlv, uint8_t **ppW + if(push8(cqi_ri_info_rel9->aperiodic_cqi_pmi_ri_report.cc[i].ri_size, ppWritePackedMsg, end) == 0) + return 0; + +- if(cqi_ri_info_rel9->aperiodic_cqi_pmi_ri_report.cc[i].ri_size > 0) ++ uint8_t j; ++ for(j = 0; j < 8; ++j) + { +- if(push8(cqi_ri_info_rel9->aperiodic_cqi_pmi_ri_report.cc[i].dl_cqi_pmi_size, ppWritePackedMsg, end) == 0) ++ if(push8(cqi_ri_info_rel9->aperiodic_cqi_pmi_ri_report.cc[i].dl_cqi_pmi_size[j], ppWritePackedMsg, end) == 0) + return 0; + } + } +@@ -1518,7 +1540,21 @@ static uint8_t pack_tx_request_body_value(void* tlv, uint8_t **ppWritePackedMsg, for(j = 0; j < pdu->num_segments; ++j) { // Use -1 as it is unbounded @@ -123,7 +150,7 @@ index a3b0141..4083a47 100644 { return 0; } -@@ -1532,9 +1567,13 @@ static uint8_t pack_tx_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *e +@@ -1532,9 +1568,13 @@ static uint8_t pack_tx_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *e { nfapi_tx_request_t *pNfapiMsg = (nfapi_tx_request_t*)msg; @@ -140,43 +167,43 @@ index a3b0141..4083a47 100644 } static uint8_t pack_rx_ue_information_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end) -@@ -1844,6 +1883,8 @@ static uint8_t pack_rx_ulsch_indication_body_value(void *tlv, uint8_t **ppWriteP +@@ -1844,6 +1884,8 @@ static uint8_t pack_rx_ulsch_indication_body_value(void *tlv, uint8_t **ppWriteP { nfapi_rx_indication_body_t* value = (nfapi_rx_indication_body_t*)tlv; -+ printf("RX ULSCH BODY\n"); ++ //printf("RX ULSCH BODY\n"); + if( push16(value->number_of_pdus, ppWritePackedMsg, end) == 0) return 0; -@@ -1851,21 +1892,26 @@ static uint8_t pack_rx_ulsch_indication_body_value(void *tlv, uint8_t **ppWriteP +@@ -1851,21 +1893,26 @@ static uint8_t pack_rx_ulsch_indication_body_value(void *tlv, uint8_t **ppWriteP uint16_t i = 0; uint16_t offset = 2; // taking into account the number_of_pdus uint16_t total_number_of_pdus = value->number_of_pdus; -+ printf("ULSCH:pdus:%d\n", total_number_of_pdus); ++ //printf("ULSCH:pdus:%d\n", total_number_of_pdus); + for(i = 0; i < total_number_of_pdus; ++i) { nfapi_rx_indication_pdu_t* pdu = &(value->rx_pdu_list[i]); if(pdu->rx_ue_information.tl.tag == NFAPI_RX_UE_INFORMATION_TAG) { -+ printf("NFAPI_RX_UE_INFORMATION_TAG\n"); ++ //printf("NFAPI_RX_UE_INFORMATION_TAG\n"); offset += 4 + 6; } if(pdu->rx_indication_rel8.tl.tag == NFAPI_RX_INDICATION_REL8_TAG) { -+ printf("NFAPI_RX_INDICATION_REL8_TAG\n"); ++ //printf("NFAPI_RX_INDICATION_REL8_TAG\n"); offset += 4 + 7; } if(pdu->rx_indication_rel9.tl.tag == NFAPI_RX_INDICATION_REL9_TAG) { -+ printf("NFAPI_RX_INDICATION_REL9_TAG\n"); ++ //printf("NFAPI_RX_INDICATION_REL9_TAG\n"); offset += 4 + 2; } } -@@ -2592,11 +2638,16 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu +@@ -2592,11 +2639,16 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu return -1; } @@ -193,7 +220,7 @@ index a3b0141..4083a47 100644 result = pack_dl_config_request(pMessageHeader, &pWritePackedMessage, end, config); break; -@@ -2609,6 +2660,7 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu +@@ -2609,6 +2661,7 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu break; case NFAPI_TX_REQUEST: @@ -201,15 +228,28 @@ index a3b0141..4083a47 100644 result = pack_tx_request(pMessageHeader, &pWritePackedMessage, end, config); break; -@@ -2621,6 +2673,7 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu +@@ -2621,6 +2674,7 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu break; case NFAPI_RX_ULSCH_INDICATION: -+ printf("RX ULSCH\n"); ++ //printf("RX ULSCH\n"); result = pack_rx_ulsch_indication(pMessageHeader, &pWritePackedMessage, end, config); break; -@@ -4394,6 +4447,14 @@ static uint8_t unpack_tx_request(uint8_t **ppReadPackedMsg, uint8_t *end, void * +@@ -3482,9 +3536,10 @@ static uint8_t unpack_ul_config_cqi_ri_info_rel9_value(void *tlv, uint8_t **ppRe + if(pull8(ppReadPackedMsg, &cqi_ri_info_rel9->aperiodic_cqi_pmi_ri_report.cc[i].ri_size, end) == 0) + return 0; + +- if(cqi_ri_info_rel9->aperiodic_cqi_pmi_ri_report.cc[i].ri_size > 0) ++ uint8_t j; ++ for(j = 0; j < 8; ++j) + { +- if(pull8(ppReadPackedMsg, &cqi_ri_info_rel9->aperiodic_cqi_pmi_ri_report.cc[i].dl_cqi_pmi_size, end) == 0) ++ if(pull8(ppReadPackedMsg, &cqi_ri_info_rel9->aperiodic_cqi_pmi_ri_report.cc[i].dl_cqi_pmi_size[j], end) == 0) + return 0; + } + } +@@ -4394,6 +4449,14 @@ static uint8_t unpack_tx_request(uint8_t **ppReadPackedMsg, uint8_t *end, void * { if(!pullarray8(ppReadPackedMsg, pdu->segments[0].segment_data, pdu->segments[0].segment_length, pdu->segments[0].segment_length, end)) return 0; @@ -289,7 +329,7 @@ index 74f29a0..7310fc0 100644 } diff --git a/pnf/src/pnf_p7.c b/pnf/src/pnf_p7.c -index 0fd7828..6d9a332 100644 +index 0fd7828..02b828d 100644 --- a/pnf/src/pnf_p7.c +++ b/pnf/src/pnf_p7.c @@ -25,12 +25,64 @@ @@ -795,7 +835,7 @@ index 0fd7828..6d9a332 100644 } } -@@ -785,15 +938,32 @@ void pnf_handle_dl_config_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_ +@@ -785,15 +938,35 @@ void pnf_handle_dl_config_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_ return; } @@ -823,7 +863,10 @@ index 0fd7828..6d9a332 100644 + uint32_t sfn_sf_dec = NFAPI_SFNSF2DEC(req->sfn_sf); + uint8_t buffer_index = sfn_sf_dec % pnf_p7->_public.subframe_buffer_size; + -+ printf("%s() POPULATE DL_CONFIG_REQ sfn_sf:%d buffer_index:%d\n", __FUNCTION__, sfn_sf_dec, buffer_index); ++ struct timespec t; ++ clock_gettime(CLOCK_MONOTONIC, &t); ++ ++ NFAPI_TRACE(NFAPI_TRACE_INFO,"%s() %ld.%09ld POPULATE DL_CONFIG_REQ sfn_sf:%d buffer_index:%d\n", __FUNCTION__, t.tv_sec, t.tv_nsec, sfn_sf_dec, buffer_index); // if there is already an dl_config_req make sure we free it. if(pnf_p7->subframe_buffer[buffer_index].dl_config_req != 0) @@ -833,16 +876,19 @@ index 0fd7828..6d9a332 100644 //NFAPI_TRACE(NFAPI_TRACE_NOTE, "[%d] Freeing dl_config_req at index %d (%d/%d)", // pMyPhyInfo->sfnSf, bufferIdx, // SFNSF2SFN(dreq->sfn_sf), SFNSF2SF(dreq->sfn_sf)); -@@ -860,6 +1030,8 @@ void pnf_handle_ul_config_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_ +@@ -860,6 +1033,11 @@ void pnf_handle_ul_config_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_ uint32_t sfn_sf_dec = NFAPI_SFNSF2DEC(req->sfn_sf); uint8_t buffer_index = sfn_sf_dec % pnf_p7->_public.subframe_buffer_size; -+ printf("%s() POPULATE UL_CONFIG_REQ sfn_sf:%d buffer_index:%d\n", __FUNCTION__, sfn_sf_dec, buffer_index); ++ struct timespec t; ++ clock_gettime(CLOCK_MONOTONIC, &t); ++ ++ NFAPI_TRACE(NFAPI_TRACE_INFO,"%s() %ld.%09ld POPULATE UL_CONFIG_REQ sfn_sf:%d buffer_index:%d\n", __FUNCTION__, t.tv_sec, t.tv_nsec, sfn_sf_dec, buffer_index); + if(pnf_p7->subframe_buffer[buffer_index].ul_config_req != 0) { //NFAPI_TRACE(NFAPI_TRACE_NOTE, "[%d] Freeing ul_config_req at index %d (%d/%d)", -@@ -876,7 +1048,7 @@ void pnf_handle_ul_config_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_ +@@ -876,7 +1054,7 @@ void pnf_handle_ul_config_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_ } else { @@ -851,14 +897,14 @@ index 0fd7828..6d9a332 100644 deallocate_nfapi_ul_config_request(req, pnf_p7); if(pnf_p7->_public.timing_info_mode_aperiodic) -@@ -994,6 +1166,16 @@ void pnf_handle_tx_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7) +@@ -994,6 +1172,16 @@ void pnf_handle_tx_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7) uint32_t sfn_sf_dec = NFAPI_SFNSF2DEC(req->sfn_sf); uint8_t buffer_index = sfn_sf_dec % pnf_p7->_public.subframe_buffer_size; + struct timespec t; + clock_gettime(CLOCK_MONOTONIC, &t); + -+ printf("%s() %ld.%09ld POPULATE TX_REQ sfn_sf:%d buffer_index:%d\n", __FUNCTION__, t.tv_sec, t.tv_nsec, sfn_sf_dec, buffer_index); ++ NFAPI_TRACE(NFAPI_TRACE_INFO,"%s() %ld.%09ld POPULATE TX_REQ sfn_sf:%d buffer_index:%d\n", __FUNCTION__, t.tv_sec, t.tv_nsec, sfn_sf_dec, buffer_index); + + if (0 && NFAPI_SFNSF2DEC(req->sfn_sf)%100==0) NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() TX_REQ.req sfn_sf:%d pdus:%d - TX_REQ is within window\n", + __FUNCTION__, @@ -868,16 +914,16 @@ index 0fd7828..6d9a332 100644 if(pnf_p7->subframe_buffer[buffer_index].tx_req != 0) { //NFAPI_TRACE(NFAPI_TRACE_NOTE, "[%d] Freeing tx_req at index %d (%d/%d)", -@@ -1010,6 +1192,8 @@ void pnf_handle_tx_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7) +@@ -1010,6 +1198,8 @@ void pnf_handle_tx_request(void* pRecvMsg, int recvMsgLen, pnf_p7_t* pnf_p7) } else { -+ printf("%s() TX_REQUEST Request is outside of window REQ:SFN_SF:%d CURR:SFN_SF:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), NFAPI_SFNSF2DEC(pnf_p7->sfn_sf)); ++ NFAPI_TRACE(NFAPI_TRACE_INFO,"%s() TX_REQUEST Request is outside of window REQ:SFN_SF:%d CURR:SFN_SF:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), NFAPI_SFNSF2DEC(pnf_p7->sfn_sf)); + deallocate_nfapi_tx_request(req, pnf_p7); if(pnf_p7->_public.timing_info_mode_aperiodic) -@@ -1126,12 +1310,27 @@ uint32_t calculate_t2(uint32_t now_time_hr, uint16_t sfn_sf, uint32_t sf_start_t +@@ -1126,12 +1316,27 @@ uint32_t calculate_t2(uint32_t now_time_hr, uint16_t sfn_sf, uint32_t sf_start_t uint32_t sf_time_us = get_sf_time(now_time_hr, sf_start_time_hr); uint32_t t2 = (NFAPI_SFNSF2DEC(sfn_sf) * 1000) + sf_time_us; @@ -906,7 +952,7 @@ index 0fd7828..6d9a332 100644 uint32_t sf_time_us = get_sf_time(now_time_hr, sf_start_time_hr); -@@ -1391,6 +1590,8 @@ void pnf_nfapi_p7_read_dispatch_message(pnf_p7_t* pnf_p7, uint32_t now_hr_time) +@@ -1391,6 +1596,8 @@ void pnf_nfapi_p7_read_dispatch_message(pnf_p7_t* pnf_p7, uint32_t now_hr_time) // read the segment recvfrom_result = recvfrom(pnf_p7->p7_sock, pnf_p7->rx_message_buffer, header.message_length, MSG_DONTWAIT, (struct sockaddr*)&remote_addr, &remote_addr_size); @@ -915,7 +961,7 @@ index 0fd7828..6d9a332 100644 if(recvfrom_result > 0) { pnf_handle_p7_message(pnf_p7->rx_message_buffer, recvfrom_result, pnf_p7, now_hr_time); -@@ -1417,7 +1618,10 @@ void pnf_nfapi_p7_read_dispatch_message(pnf_p7_t* pnf_p7, uint32_t now_hr_time) +@@ -1417,7 +1624,10 @@ 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 @@ -927,7 +973,7 @@ index 0fd7828..6d9a332 100644 } while(recvfrom_result > 0); } -@@ -1512,7 +1716,7 @@ int pnf_p7_message_pump(pnf_p7_t* pnf_p7) +@@ -1512,7 +1722,7 @@ int pnf_p7_message_pump(pnf_p7_t* pnf_p7) selectRetval = select(pnf_p7->p7_sock+1, &rfds, NULL, NULL, &timeout); @@ -1060,7 +1106,7 @@ index e559730..0aba0a2 100644 info->timing_info_period = 128; diff --git a/vnf/src/vnf_p7.c b/vnf/src/vnf_p7.c -index 8630385..70f97d6 100644 +index 8630385..1304176 100644 --- a/vnf/src/vnf_p7.c +++ b/vnf/src/vnf_p7.c @@ -15,6 +15,8 @@ @@ -1277,7 +1323,7 @@ index 8630385..70f97d6 100644 + //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) + { -+ NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() LARGE SFN/SF DELTA between PNF and VNF\n\n\n\n\n\n\n\n\n", __FUNCTION__); ++ 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)); + } + } } diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c index 45ca334d52b143d051a151c413f1913c624341d1..ac7b6484979087e502be90660491d8497060722e 100755 --- a/openair1/PHY/LTE_TRANSPORT/dci.c +++ b/openair1/PHY/LTE_TRANSPORT/dci.c @@ -2221,7 +2221,7 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols, if (num_dci>0) { - LOG_D(PHY,"%s(num_pdcch_symbols:%d num_dci:%d dci_alloc:%p n_rnti:%04x amp:%d frame_parms:%p txdataF:%p subframe:%d)\n", __FUNCTION__, num_pdcch_symbols, num_dci, dci_alloc, n_rnti, amp, frame_parms, txdataF, subframe); + //LOG_D(PHY,"%s(num_pdcch_symbols:%d num_dci:%d dci_alloc:%p n_rnti:%04x amp:%d frame_parms:%p txdataF:%p subframe:%d)\n", __FUNCTION__, num_pdcch_symbols, num_dci, dci_alloc, n_rnti, amp, frame_parms, txdataF, subframe); } switch (frame_parms->N_RB_DL) { diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c index ca9b4b45b474a5fa30d8d9cb97a59a9afed8b5df..2a4b3ce47c3bba4041ab85605776301c21fdcfc5 100644 --- a/openair1/SCHED/fapi_l1.c +++ b/openair1/SCHED/fapi_l1.c @@ -79,7 +79,7 @@ void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, int idx = proc->subframe_tx&1; LTE_eNB_PDCCH *pdcch_vars = &eNB->pdcch_vars[idx]; - LOG_D(PHY,"%s() Before num_dci:%d\n", __FUNCTION__, pdcch_vars->num_dci); + //LOG_D(PHY,"%s() Before num_dci:%d\n", __FUNCTION__, pdcch_vars->num_dci); // copy dci configuration in to eNB structure fill_dci0(eNB,proc,&pdcch_vars->dci_alloc[pdcch_vars->num_dci], &hi_dci0_config_pdu->dci_pdu); @@ -789,7 +789,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) if (nfapi_mode) { if (number_ul_pdu>0) { - LOG_D(PHY, "UL_CONFIG to send to PNF\n"); + //LOG_D(PHY, "UL_CONFIG to send to PNF\n"); oai_nfapi_ul_config_req(UL_req); UL_req->ul_config_request_body.number_of_pdus=0; number_ul_pdu=0; diff --git a/openair1/SCHED/phy_procedures_lte_common.c b/openair1/SCHED/phy_procedures_lte_common.c index 1e0c12303e421cf8d09f44052bf7ecd0a562719f..302bedad0b173f8e1c59b9168be4efb5540f6f65 100644 --- a/openair1/SCHED/phy_procedures_lte_common.c +++ b/openair1/SCHED/phy_procedures_lte_common.c @@ -951,7 +951,7 @@ int is_srs_occasion_common(LTE_DL_FRAME_PARMS *frame_parms,int frame_tx,int subf } LOG_D(PHY," ISTDD: %d, TSFC: %d, deltaTSFC: %d, AbsSubframeTX: %d.%d\n", frame_parms->frame_type, TSFC, deltaTSFC, frame_tx, subframe_tx); } - LOG_D(PHY," isSubframeSRS %d\n", isSubframeSRS); + //LOG_D(PHY," isSubframeSRS %d\n", isSubframeSRS); return(isSubframeSRS); } diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 67d4afaa55df699640e0c8583a3dd01657514212..455b1fcbf2985f69f0b4eb0d3025ff979c865412 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -484,7 +484,9 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,(frame*10)+subframe); if (num_dci > 0) - LOG_D(PHY,"[eNB %"PRIu8"] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (num_dci %"PRIu8") num_pdcch_symbols:%d\n",eNB->Mod_id,frame, subframe, num_dci, num_pdcch_symbols); + { + //LOG_D(PHY,"[eNB %"PRIu8"] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (num_dci %"PRIu8") num_pdcch_symbols:%d\n",eNB->Mod_id,frame, subframe, num_dci, num_pdcch_symbols); + } //LOG_D(PHY,"Before generate_dci_top num_pdcch_symbols:%d num_dci:%d dci_alloc:dci_length:%d\n", num_pdcch_symbols, num_dci, eNB->pdcch_vars[subframe&1].dci_alloc[0].dci_length); @@ -1349,11 +1351,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) eNB->rb_mask_ul[rb2>>5] |= (1<<(rb2&31)); } - LOG_D(PHY,"[eNB %d] frame %d, subframe %d: Scheduling ULSCH Reception for UE %d \n", - eNB->Mod_id, - frame, - subframe, - i); + //LOG_D(PHY,"[eNB %d] frame %d, subframe %d: Scheduling ULSCH Reception for UE %d \n", eNB->Mod_id, frame, subframe, i); nPRS = fp->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[subframe<<1]; @@ -1533,7 +1531,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) } } // for (i=0; i<NUMBER_OF_UE_MAX; i++) { clock_gettime(CLOCK_MONOTONIC,&t_end); - LOG_E(PHY,"%s() TIMING:decode:%ld.%09ld crc:%ld.%09ld rx_ind:%ld.%09ld-%ld.%09ld harq:%ld.%09ld-%ld.%09ld end:%ld.%09ld\n", __FUNCTION__, + if (0)LOG_E(PHY,"%s() TIMING:decode:%ld.%09ld crc:%ld.%09ld rx_ind:%ld.%09ld-%ld.%09ld harq:%ld.%09ld-%ld.%09ld end:%ld.%09ld\n", __FUNCTION__, t_decode.tv_sec, t_decode.tv_nsec, t_crc.tv_sec, t_crc.tv_nsec, t_rx_ind.tv_sec, t_rx_ind.tv_nsec, @@ -2029,7 +2027,7 @@ void fill_crc_indication(PHY_VARS_eNB *eNB,int UE_id,int frame,int subframe,uint eNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs++; - LOG_D(PHY, "%s() rnti:%04x crcs:%d crc_flag:%d\n", __FUNCTION__, pdu->rx_ue_information.rnti, eNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs, crc_flag); + //LOG_D(PHY, "%s() rnti:%04x crcs:%d crc_flag:%d\n", __FUNCTION__, pdu->rx_ue_information.rnti, eNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs, crc_flag); pthread_mutex_unlock(&eNB->UL_INFO_mutex); } @@ -2053,7 +2051,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 1 ); - LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_uespec_RX(%d)\n",eNB->Mod_id,frame, subframe); + //LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_uespec_RX(%d)\n",eNB->Mod_id,frame, subframe); eNB->rb_mask_ul[0]=0; eNB->rb_mask_ul[1]=0; diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index 212b90e8250347d429052362c1e6acd3d355208b..f9a442fc1e04eb42ee0768c076a5c901805da6ad 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -474,7 +474,7 @@ void copy_ulreq(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP) if (ul_req->ul_config_request_body.number_of_pdus>0) { - LOG_E(PHY, "%s() Copying stored UL_req_tmp to UL_req for activation NOW (frameP:%d subframeP:%d) ul_req_body->number_of_pdus:%d\n", __FUNCTION__, frameP, subframeP, ul_req->ul_config_request_body.number_of_pdus); + LOG_E(PHY, "%s() active NOW (frameP:%d subframeP:%d) pdus:%d\n", __FUNCTION__, frameP, subframeP, ul_req->ul_config_request_body.number_of_pdus); } memcpy((void*)ul_req->ul_config_request_body.ul_config_pdu_list, diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 631eb150be9b64ad2abca9f7a6ada663509bd3de..8f1535408f9f589b51d37c9be05c2dd3fb678a53 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -1082,7 +1082,7 @@ schedule_ue_spec( TBS = get_TBS_DL(mcs,nb_rb); } - LOG_D(MAC,"dlsch_mcs before and after the rate matching = (%d, %d)\n",eNB_UE_stats->dlsch_mcs1, mcs); + //LOG_D(MAC,"dlsch_mcs before and after the rate matching = (%d, %d)\n",eNB_UE_stats->dlsch_mcs1, mcs); #ifdef DEBUG_eNB_SCHEDULER LOG_D(MAC,"[eNB %d] CC_id %d Generated DLSCH header (mcs %d, TBS %d, nb_rb %d)\n", @@ -1213,7 +1213,7 @@ schedule_ue_spec( tpc = 1; //0 } - LOG_D(MAC,"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, normalized/target rx power %d/%d\n", + if(0)LOG_D(MAC,"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, normalized/target rx power %d/%d\n", module_idP,frameP, subframeP,harq_pid,tpc, tpc_accumulated,normalized_rx_power,target_rx_power); @@ -1257,7 +1257,7 @@ schedule_ue_spec( module_idP,CC_id,harq_pid,mcs,t.tv_sec,t.tv_nsec); } - LOG_D(MAC,"Checking feasibility pdu %d (new sdu)\n",dl_req->number_pdu); + //LOG_D(MAC,"Checking feasibility pdu %d (new sdu)\n",dl_req->number_pdu); if (!CCE_allocation_infeasible(module_idP,CC_id,1,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level,rnti)) { diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index 5b5b086542ea55a3f9b400b60756d07bdff96c95..1f30a5a6c4b7d8b73253b35387cbb095d0685122 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -1316,7 +1316,7 @@ void fill_nfapi_dlsch_config(eNB_MAC_INST *eNB, dl_req->number_pdu++; dl_req->tl.tag=NFAPI_DL_CONFIG_REQUEST_BODY_TAG; - LOG_D(MAC,"Filled DL_CONFIG_PDU - DLSCH - dl_req->number_pdu:%d pdu_index:%d\n", dl_req->number_pdu, pdu_index); + //LOG_D(MAC,"Filled DL_CONFIG_PDU - DLSCH - dl_req->number_pdu:%d pdu_index:%d\n", dl_req->number_pdu, pdu_index); } uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t *tx_req_body,uint16_t absSF,uint16_t pdu_length, uint16_t pdu_index, uint8_t *pdu) @@ -1331,7 +1331,7 @@ uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t *tx_req_body,uint16_t absSF,u tx_req_body->tl.tag = NFAPI_TX_REQUEST_BODY_TAG; tx_req_body->number_of_pdus++; - LOG_D(MAC,"Filling TX_req SFN/SF:%d/%d PDUs:%d for pdu length %d pdu_index:%d\n",absSF/10,absSF%10,tx_req_body->number_of_pdus,pdu_length,pdu_index); + //LOG_D(MAC,"Filling TX_req SFN/SF:%d/%d PDUs:%d for pdu length %d pdu_index:%d\n",absSF/10,absSF%10,tx_req_body->number_of_pdus,pdu_length,pdu_index); return(((absSF/10)<<4) + (absSF%10)); } @@ -2127,7 +2127,7 @@ uint8_t UE_is_to_be_scheduled(module_id_t module_idP,int CC_id,uint8_t UE_id) if (UE_sched_ctl->ul_out_of_sync>0) return(0); - LOG_D(MAC,"[eNB %d][PUSCH] Checking UL requirements UE %d/%x bsr_info:%d:%d:%d:%d ul_SR:%d ul_inactivity_timer:%d ul_scheduled:%d rrc_status:%d\n",module_idP,UE_id,UE_RNTI(module_idP,UE_id),UE_template->bsr_info[LCGID0], UE_template->bsr_info[LCGID1],UE_template->bsr_info[LCGID2],UE_template->bsr_info[LCGID3],UE_template->ul_SR, UE_sched_ctl->ul_inactivity_timer, UE_sched_ctl->ul_scheduled,mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP,UE_id))); + //LOG_D(MAC,"[eNB %d][PUSCH] Checking UL requirements UE %d/%x bsr_info:%d:%d:%d:%d ul_SR:%d ul_inactivity_timer:%d ul_scheduled:%d rrc_status:%d\n",module_idP,UE_id,UE_RNTI(module_idP,UE_id),UE_template->bsr_info[LCGID0], UE_template->bsr_info[LCGID1],UE_template->bsr_info[LCGID2],UE_template->bsr_info[LCGID3],UE_template->ul_SR, UE_sched_ctl->ul_inactivity_timer, UE_sched_ctl->ul_scheduled,mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP,UE_id))); if (1|| // DJP - no check in (UE_template->bsr_info[LCGID0]>0) || @@ -2751,7 +2751,7 @@ try_again: if (nCCE + (dl_config_pdu[i].dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level) > nCCE_max) { if (DL_req->number_pdcch_ofdm_symbols == 3) goto failed; - LOG_D(MAC,"Can't fit DCI allocations with %d PDCCH symbols, increasing by 1\n",DL_req->number_pdcch_ofdm_symbols); + //LOG_D(MAC,"Can't fit DCI allocations with %d PDCCH symbols, increasing by 1\n",DL_req->number_pdcch_ofdm_symbols); DL_req->number_pdcch_ofdm_symbols++; nCCE_max = get_nCCE_max(&RC.mac[module_idP]->common_channels[CC_idP],DL_req->number_pdcch_ofdm_symbols,subframeP); goto try_again; @@ -2781,7 +2781,7 @@ try_again: //dump_CCE_table(CCE_table,nCCE_max,subframeP,dci_alloc->rnti,1<<dci_alloc->L); goto failed; } - LOG_D(MAC,"Can't fit DCI allocations with %d PDCCH symbols (rnti condition), increasing by 1\n",DL_req->number_pdcch_ofdm_symbols); + //LOG_D(MAC,"Can't fit DCI allocations with %d PDCCH symbols (rnti condition), increasing by 1\n",DL_req->number_pdcch_ofdm_symbols); DL_req->number_pdcch_ofdm_symbols++; nCCE_max = get_nCCE_max(&RC.mac[module_idP]->common_channels[CC_idP],DL_req->number_pdcch_ofdm_symbols,subframeP); @@ -2805,7 +2805,7 @@ try_again: // allocate UL DCIs if (hi_dci0_pdu[i].pdu_type == NFAPI_HI_DCI0_DCI_PDU_TYPE) { - LOG_D(MAC,"Trying to allocate format 0 DCI %d/%d (%d,%d) : rnti %x, aggreg %d nCCE %d / %d (num_pdcch_symbols %d)\n", + if (0)LOG_D(MAC,"Trying to allocate format 0 DCI %d/%d (%d,%d) : rnti %x, aggreg %d nCCE %d / %d (num_pdcch_symbols %d)\n", idci,DL_req->number_dci+HI_DCI0_req->number_of_dci, DL_req->number_dci,HI_DCI0_req->number_of_dci, hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.rnti,hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.aggregation_level, @@ -2814,7 +2814,7 @@ try_again: if (nCCE + (hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.aggregation_level) > nCCE_max) { if (DL_req->number_pdcch_ofdm_symbols == 3) goto failed; - LOG_D(MAC,"Can't fit DCI allocations with %d PDCCH symbols, increasing by 1\n",DL_req->number_pdcch_ofdm_symbols); + //LOG_D(MAC,"Can't fit DCI allocations with %d PDCCH symbols, increasing by 1\n",DL_req->number_pdcch_ofdm_symbols); DL_req->number_pdcch_ofdm_symbols++; nCCE_max = get_nCCE_max(&RC.mac[module_idP]->common_channels[CC_idP],DL_req->number_pdcch_ofdm_symbols,subframeP); @@ -2845,7 +2845,7 @@ try_again: //dump_CCE_table(CCE_table,nCCE_max,subframeP,dci_alloc->rnti,1<<dci_alloc->L); goto failed; } - LOG_D(MAC,"Can't fit DCI allocations with %d PDCCH symbols (rnti condition), increasing by 1\n",DL_req->number_pdcch_ofdm_symbols); + //LOG_D(MAC,"Can't fit DCI allocations with %d PDCCH symbols (rnti condition), increasing by 1\n",DL_req->number_pdcch_ofdm_symbols); DL_req->number_pdcch_ofdm_symbols++; nCCE_max = get_nCCE_max(&RC.mac[module_idP]->common_channels[CC_idP],DL_req->number_pdcch_ofdm_symbols,subframeP); @@ -2854,10 +2854,10 @@ try_again: // the allocation is feasible, rnti rule passes nCCE += hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.aggregation_level; - LOG_D(MAC,"Allocating at nCCE %d\n",fCCE); + //LOG_D(MAC,"Allocating at nCCE %d\n",fCCE); if (test_onlyP == 0) { hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.cce_index=fCCE; - LOG_D(MAC,"Allocate CCEs subframe %d, test %d\n",subframeP,test_onlyP); + //LOG_D(MAC,"Allocate CCEs subframe %d, test %d\n",subframeP,test_onlyP); } idci++; } @@ -2876,7 +2876,7 @@ try_again: if (nCCE + (dl_config_pdu[i].dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level) > nCCE_max) { if (DL_req->number_pdcch_ofdm_symbols == 3) goto failed; - LOG_D(MAC,"Can't fit DCI allocations with %d PDCCH symbols, increasing by 1\n",DL_req->number_pdcch_ofdm_symbols); + //LOG_D(MAC,"Can't fit DCI allocations with %d PDCCH symbols, increasing by 1\n",DL_req->number_pdcch_ofdm_symbols); DL_req->number_pdcch_ofdm_symbols++; nCCE_max = get_nCCE_max(&RC.mac[module_idP]->common_channels[CC_idP],DL_req->number_pdcch_ofdm_symbols,subframeP); @@ -2907,7 +2907,7 @@ try_again: //dump_CCE_table(CCE_table,nCCE_max,subframeP,dci_alloc->rnti,1<<dci_alloc->L); goto failed; } - LOG_D(MAC,"Can't fit DCI allocations with %d PDCCH symbols (rnti condition), increasing by 1\n",DL_req->number_pdcch_ofdm_symbols); + //LOG_D(MAC,"Can't fit DCI allocations with %d PDCCH symbols (rnti condition), increasing by 1\n",DL_req->number_pdcch_ofdm_symbols); DL_req->number_pdcch_ofdm_symbols++; nCCE_max = get_nCCE_max(&RC.mac[module_idP]->common_channels[CC_idP],DL_req->number_pdcch_ofdm_symbols,subframeP); @@ -2975,7 +2975,7 @@ nfapi_ul_config_request_pdu_t* has_ul_grant(module_id_t module_idP,int CC_idP,ui ul_req = &RC.mac[module_idP]->UL_req_tmp[CC_idP][absSFP%10].ul_config_request_body; ul_config_pdu = &ul_req->ul_config_pdu_list[0]; - LOG_D(MAC,"Checking for rnti %x UL grant in subframeP %d (num pdu %d)\n",rnti,absSFP%10,ul_req->number_of_pdus); + //LOG_D(MAC,"Checking for rnti %x UL grant in subframeP %d (num pdu %d)\n",rnti,absSFP%10,ul_req->number_of_pdus); for (int i=0; i<ul_req->number_of_pdus;i++){ LOG_D(MAC,"PDU %d : type %d,rnti %x\n",i,ul_config_pdu[i].pdu_type,rnti); @@ -3039,7 +3039,7 @@ boolean_t CCE_allocation_infeasible(int module_idP, dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = (format_flag == 0)?2:1; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = aggregation; DL_req->number_pdu++; - LOG_D(MAC,"Subframe %d: Checking CCE feasibility format %d : (%x,%d) (%x,%d,%d)\n", + if(0)LOG_D(MAC,"Subframe %d: Checking CCE feasibility format %d : (%x,%d) (%x,%d,%d)\n", subframe,format_flag,rnti,aggregation, dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti, dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 559c16a1f68ab5399fb9f82b538c7b6fc85a592b..72edb5554f080ab4e508889d487bd71745d052fc 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -574,7 +574,7 @@ abort(); } // Program ACK for PHICH - LOG_D(MAC,"SFN/SF:%d%d Programming PHICH ACK for rnti %x harq_pid %d (first_rb %d)\n",frameP,subframeP,rntiP,harq_pid,first_rb); + //LOG_D(MAC,"SFN/SF:%d%d Programming PHICH ACK for rnti %x harq_pid %d (first_rb %d)\n",frameP,subframeP,rntiP,harq_pid,first_rb); nfapi_hi_dci0_request_t *hi_dci0_req = &eNB->HI_DCI0_req[CC_idP]; nfapi_hi_dci0_request_body_t *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body; nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci+hi_dci0_req_body->number_of_hi]; @@ -1191,8 +1191,7 @@ abort(); ul_req_tmp->sfn_sf = sched_frame<<4|sched_subframeP; ul_req_tmp->header.message_id = NFAPI_UL_CONFIG_REQUEST; - LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d\n", - harq_pid,frameP,subframeP,UE_id,rnti,sched_frame,sched_subframeP); + //LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d\n", harq_pid,frameP,subframeP,UE_id,rnti,sched_frame,sched_subframeP); // Scheduler dips into this structure to work out if UE has a grant, so in nfapi mode we still need to populate it diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 36649742c1d160655385b02f4237f61fb1a087e6..26c3c90e9784985ea1ba9e73edacbaa3cccd699c 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -216,7 +216,7 @@ void assign_rbs_required (module_id_t Mod_id, } if (UE_list->UE_template[pCCid][UE_id].dl_buffer_total> 0) { - LOG_D(MAC,"[preprocessor] assign RB for UE %d\n",UE_id); + //LOG_D(MAC,"[preprocessor] assign RB for UE %d\n",UE_id); for (i=0; i<UE_list->numactiveCCs[UE_id]; i++) { CC_id = UE_list->ordered_CCids[i][UE_id]; @@ -230,7 +230,7 @@ void assign_rbs_required (module_id_t Mod_id, TBS = get_TBS_DL(eNB_UE_stats->dlsch_mcs1,nb_rbs_required[CC_id][UE_id]); - LOG_D(MAC,"[preprocessor] start RB assignment for UE %d CC_id %d dl buffer %d (RB unit %d, MCS %d, TBS %d) \n", + if(0)LOG_D(MAC,"[preprocessor] start RB assignment for UE %d CC_id %d dl buffer %d (RB unit %d, MCS %d, TBS %d) \n", UE_id, CC_id, UE_list->UE_template[pCCid][UE_id].dl_buffer_total, nb_rbs_required[CC_id][UE_id],eNB_UE_stats->dlsch_mcs1,TBS); diff --git a/openair2/PHY_INTERFACE/IF_Module.c b/openair2/PHY_INTERFACE/IF_Module.c index a2af0cada97c5b8cf4061c0398d8add1c1b25355..6847b152114b63bbbdc42b927836b529d45a8d8a 100644 --- a/openair2/PHY_INTERFACE/IF_Module.c +++ b/openair2/PHY_INTERFACE/IF_Module.c @@ -163,7 +163,7 @@ void handle_ulsch(UL_IND_t *UL_info) { { if (UL_info->crc_ind.crc_indication_body.number_of_crcs>0) { - LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf)); + //LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf)); oai_nfapi_crc_indication(&UL_info->crc_ind); @@ -172,7 +172,7 @@ void handle_ulsch(UL_IND_t *UL_info) { if (UL_info->rx_ind.rx_indication_body.number_of_pdus>0) { - LOG_D(PHY,"UL_info->rx_ind.number_of_pdus:%d RX_IND:SFN/SF:%d\n", UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf)); + //LOG_D(PHY,"UL_info->rx_ind.number_of_pdus:%d RX_IND:SFN/SF:%d\n", UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf)); oai_nfapi_rx_ind(&UL_info->rx_ind); UL_info->rx_ind.rx_indication_body.number_of_pdus = 0; } @@ -221,12 +221,12 @@ void handle_ulsch(UL_IND_t *UL_info) { if (UL_info->rx_ind.rx_indication_body.number_of_pdus>0) { UL_info->rx_ind.rx_indication_body.number_of_pdus = 0; - LOG_D(PHY, "UL_INFO:SFN/SF:%d%d ZEROING rx_ind[SFN/SF:%d number_of_pdus:%d]\n", UL_info->frame, UL_info->subframe, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf), UL_info->rx_ind.rx_indication_body.number_of_pdus); + //LOG_D(PHY, "UL_INFO:SFN/SF:%d%d ZEROING rx_ind[SFN/SF:%d number_of_pdus:%d]\n", UL_info->frame, UL_info->subframe, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf), UL_info->rx_ind.rx_indication_body.number_of_pdus); } if (UL_info->subframe && UL_info->crc_ind.crc_indication_body.number_of_crcs>0) { - LOG_D(PHY, "UL_INFO:SFN/SF:%d%d ZEROING crc_ind[SFN/SF:%d crcs:%d]\n", UL_info->frame, UL_info->subframe, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf), UL_info->crc_ind.crc_indication_body.number_of_crcs); + //LOG_D(PHY, "UL_INFO:SFN/SF:%d%d ZEROING crc_ind[SFN/SF:%d crcs:%d]\n", UL_info->frame, UL_info->subframe, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf), UL_info->crc_ind.crc_indication_body.number_of_crcs); UL_info->crc_ind.crc_indication_body.number_of_crcs=0; } } diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 3a30d43be69e209ddcbbb63e34184291ecd4f717..5d94021e0f48a2af82fd23026dd0c3982d8adcc8 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -128,6 +128,7 @@ uint16_t sf_ahead=2; time_stats_t softmodem_stats_mt; // main thread time_stats_t softmodem_stats_hw; // hw acquisition time_stats_t softmodem_stats_rxtx_sf; // total tx time +time_stats_t nfapi_meas; // total tx time time_stats_t softmodem_stats_rx_sf; // total rx time /* mutex, cond and variable to serialize phy proc TX calls @@ -157,7 +158,9 @@ extern uint8_t nfapi_mode; extern void oai_subframe_ind(uint16_t sfn, uint16_t sf); extern void add_subframe(uint16_t *frameP, uint16_t *subframeP, int offset); -#define TICK_TO_US(ts) (ts.diff/ts.trials/cpu_freq_GHz) +//#define TICK_TO_US(ts) (ts.diff) +#define TICK_TO_US(ts) (ts.trials==0?0:ts.diff/ts.trials) + static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_name) { @@ -181,7 +184,9 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam //oai_subframe_ind(proc->frame_tx, proc->subframe_tx); //LOG_D(PHY, "oai_subframe_ind(frame:%u, subframe:%d) - NOT CALLED ********\n", frame, subframe); + start_meas(&nfapi_meas); oai_subframe_ind(frame, subframe); + stop_meas(&nfapi_meas); LOG_D(PHY, "UL_info[rx_ind:%d:%d harqs:%d:%d crcs:%d:%d preambles:%d:%d cqis:%d] RX:%d%d TX:%d%d num_pdcch_symbols:%d\n", NFAPI_SFNSF2DEC(eNB->UL_INFO.rx_ind.sfn_sf), eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus, @@ -240,19 +245,23 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam if (oai_exit) return(-1); - if (nfapi_mode == 0 || nfapi_mode == 1) - phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1); + phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1); stop_meas( &softmodem_stats_rxtx_sf ); - LOG_D(PHY,"%s() Exit proc[rx:%d%d tx:%d%d] rxtx:%lld phy:%15.3f tx:%15.3f rx:%15.3f prach:%15.3f ofdm:%15.3f dlsch[enc:%15.3f mod:%15.3f scr:%15.3f rm:%15.3f t:%15.3f i:%15.3f] rx_dft:%15.3f ", - __FUNCTION__, proc->frame_rx, proc->subframe_rx, proc->frame_tx, proc->subframe_tx, - softmodem_stats_rxtx_sf.diff_now, + LOG_D(PHY,"%s() Exit proc[rx:%d%d tx:%d%d] rxtx:%lld nfapi:%lld", + __FUNCTION__, proc->frame_rx, proc->subframe_rx, proc->frame_tx, proc->subframe_tx, + softmodem_stats_rxtx_sf.diff_now, nfapi_meas.diff_now); + + LOG_D(PHY, "phy:%lld tx:%lld rx:%lld prach:%lld ofdm:%lld ", TICK_TO_US(eNB->phy_proc), TICK_TO_US(eNB->phy_proc_tx), TICK_TO_US(eNB->phy_proc_rx), TICK_TO_US(eNB->rx_prach), - TICK_TO_US(eNB->ofdm_mod_stats), + TICK_TO_US(eNB->ofdm_mod_stats)); + + LOG_D(PHY, + "dlsch[enc:%lld mod:%lld scr:%lld rm:%lld t:%lld i:%lld] rx_dft:%lld ", TICK_TO_US(eNB->dlsch_encoding_stats), TICK_TO_US(eNB->dlsch_modulation_stats), TICK_TO_US(eNB->dlsch_scrambling_stats), @@ -261,17 +270,20 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam TICK_TO_US(eNB->dlsch_interleaving_stats), TICK_TO_US(eNB->rx_dft_stats)); - LOG_D(PHY," ulsch[ch:%15.3f freq:%15.3f dec:%15.3f demod:%15.3f ru:%15.3f td:%15.3f dei:%15.3f dem:%15.3f llr:%15.3f tci:%15.3f tca:%15.3f tcb:%15.3f tcg:%15.3f tce:%15.3f l1:%15.3f l2:%15.3f]\n\n", + LOG_D(PHY," ulsch[ch:%lld freq:%lld dec:%lld demod:%lld ru:%lld ", TICK_TO_US(eNB->ulsch_channel_estimation_stats), TICK_TO_US(eNB->ulsch_freq_offset_estimation_stats), TICK_TO_US(eNB->ulsch_decoding_stats), TICK_TO_US(eNB->ulsch_demodulation_stats), - TICK_TO_US(eNB->ulsch_rate_unmatching_stats), + TICK_TO_US(eNB->ulsch_rate_unmatching_stats)); + + LOG_D(PHY, "td:%lld dei:%lld dem:%lld llr:%lld tci:%lld ", TICK_TO_US(eNB->ulsch_turbo_decoding_stats), TICK_TO_US(eNB->ulsch_deinterleaving_stats), TICK_TO_US(eNB->ulsch_demultiplexing_stats), TICK_TO_US(eNB->ulsch_llr_stats), - TICK_TO_US(eNB->ulsch_tc_init_stats), + TICK_TO_US(eNB->ulsch_tc_init_stats)); + LOG_D(PHY, "tca:%lld tcb:%lld tcg:%lld tce:%lld l1:%lld l2:%lld]\n\n", TICK_TO_US(eNB->ulsch_tc_alpha_stats), TICK_TO_US(eNB->ulsch_tc_beta_stats), TICK_TO_US(eNB->ulsch_tc_gamma_stats),