Commit bcd998ab authored by David Price's avatar David Price
Browse files

Attach accept and then crash

parent 91aeda82
...@@ -1113,7 +1113,7 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req) ...@@ -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) 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__, __FUNCTION__,
NFAPI_SFNSF2DEC(req->sfn_sf), NFAPI_SFNSF2DEC(req->sfn_sf),
req->ul_config_request_body.number_of_pdus, req->ul_config_request_body.number_of_pdus,
...@@ -1719,6 +1719,10 @@ void* pnf_start_thread(void* ptr) ...@@ -1719,6 +1719,10 @@ void* pnf_start_thread(void* ptr)
nfapi_pnf_config_t *config = (nfapi_pnf_config_t*)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); nfapi_pnf_start(config);
return (void*)0; return (void*)0;
...@@ -1781,6 +1785,9 @@ void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, ...@@ -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__); 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_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) 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) ...@@ -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.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
crc_ind->header.message_id = NFAPI_CRC_INDICATION; 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); 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) ...@@ -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.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
ind->header.message_id = NFAPI_RX_CQI_INDICATION; 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); return nfapi_pnf_p7_cqi_ind(p7_config_g, ind);
} }
...@@ -1867,7 +1874,7 @@ int oai_nfapi_rx_ind(nfapi_rx_indication_t *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); 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); //free(ind.rx_indication_body.rx_pdu_list);
...@@ -1880,7 +1887,7 @@ int oai_nfapi_sr_indication(nfapi_sr_indication_t *ind) ...@@ -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); 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); //free(ind.rx_indication_body.rx_pdu_list);
......
...@@ -1424,7 +1424,7 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) ...@@ -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() 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); 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) ...@@ -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!!!! 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); 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) ...@@ -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!!!! 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); 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) ...@@ -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() 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", //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);
__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); int retval = nfapi_vnf_p7_ul_config_req(p7_config, ul_config_req);
......
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 diff --git a/nfapi/public_inc/nfapi_interface.h b/nfapi/public_inc/nfapi_interface.h
index 2d58c2a..f665d11 100644 index 2d58c2a..f665d11 100644
--- a/nfapi/public_inc/nfapi_interface.h --- a/nfapi/public_inc/nfapi_interface.h
...@@ -27,7 +41,7 @@ index 0e06963..3f017bc 100644 ...@@ -27,7 +41,7 @@ index 0e06963..3f017bc 100644
return 1; return 1;
diff --git a/nfapi/src/nfapi_p7.c b/nfapi/src/nfapi_p7.c 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 --- a/nfapi/src/nfapi_p7.c
+++ b/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 @@ -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 ...@@ -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) 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) for(j = 0; j < pdu->num_segments; ++j)
{ {
// Use -1 as it is unbounded // Use -1 as it is unbounded
...@@ -123,7 +150,7 @@ index a3b0141..4083a47 100644 ...@@ -123,7 +150,7 @@ index a3b0141..4083a47 100644
{ {
return 0; 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; nfapi_tx_request_t *pNfapiMsg = (nfapi_tx_request_t*)msg;
...@@ -140,43 +167,43 @@ index a3b0141..4083a47 100644 ...@@ -140,43 +167,43 @@ index a3b0141..4083a47 100644
} }
static uint8_t pack_rx_ue_information_value(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end) 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; 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) if( push16(value->number_of_pdus, ppWritePackedMsg, end) == 0)
return 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 i = 0;
uint16_t offset = 2; // taking into account the number_of_pdus uint16_t offset = 2; // taking into account the number_of_pdus
uint16_t total_number_of_pdus = value->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) for(i = 0; i < total_number_of_pdus; ++i)
{ {
nfapi_rx_indication_pdu_t* pdu = &(value->rx_pdu_list[i]); nfapi_rx_indication_pdu_t* pdu = &(value->rx_pdu_list[i]);
if(pdu->rx_ue_information.tl.tag == NFAPI_RX_UE_INFORMATION_TAG) 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; offset += 4 + 6;
} }
if(pdu->rx_indication_rel8.tl.tag == NFAPI_RX_INDICATION_REL8_TAG) 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; offset += 4 + 7;
} }
if(pdu->rx_indication_rel9.tl.tag == NFAPI_RX_INDICATION_REL9_TAG) 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; 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; return -1;
} }
...@@ -193,7 +220,7 @@ index a3b0141..4083a47 100644 ...@@ -193,7 +220,7 @@ index a3b0141..4083a47 100644
result = pack_dl_config_request(pMessageHeader, &pWritePackedMessage, end, config); result = pack_dl_config_request(pMessageHeader, &pWritePackedMessage, end, config);
break; 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; break;
case NFAPI_TX_REQUEST: case NFAPI_TX_REQUEST:
...@@ -201,15 +228,28 @@ index a3b0141..4083a47 100644 ...@@ -201,15 +228,28 @@ index a3b0141..4083a47 100644
result = pack_tx_request(pMessageHeader, &pWritePackedMessage, end, config); result = pack_tx_request(pMessageHeader, &pWritePackedMessage, end, config);
break; 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; break;
case NFAPI_RX_ULSCH_INDICATION: case NFAPI_RX_ULSCH_INDICATION:
+ printf("RX ULSCH\n"); + //printf("RX ULSCH\n");
result = pack_rx_ulsch_indication(pMessageHeader, &pWritePackedMessage, end, config); result = pack_rx_ulsch_indication(pMessageHeader, &pWritePackedMessage, end, config);
break; 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)) if(!pullarray8(ppReadPackedMsg, pdu->segments[0].segment_data, pdu->segments[0].segment_length, pdu->segments[0].segment_length, end))
return 0; return 0;
...@@ -289,7 +329,7 @@ index 74f29a0..7310fc0 100644 ...@@ -289,7 +329,7 @@ index 74f29a0..7310fc0 100644
} }
diff --git a/pnf/src/pnf_p7.c b/pnf/src/pnf_p7.c 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 --- a/pnf/src/pnf_p7.c
+++ b/pnf/src/pnf_p7.c +++ b/pnf/src/pnf_p7.c
@@ -25,12 +25,64 @@ @@ -25,12 +25,64 @@
...@@ -795,7 +835,7 @@ index 0fd7828..6d9a332 100644 ...@@ -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; return;
} }
...@@ -823,7 +863,10 @@ index 0fd7828..6d9a332 100644 ...@@ -823,7 +863,10 @@ index 0fd7828..6d9a332 100644
+ uint32_t sfn_sf_dec = NFAPI_SFNSF2DEC(req->sfn_sf); + uint32_t sfn_sf_dec = NFAPI_SFNSF2DEC(req->sfn_sf);
+ uint8_t buffer_index = sfn_sf_dec % pnf_p7->_public.subframe_buffer_size; + 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 there is already an dl_config_req make sure we free it.
if(pnf_p7->subframe_buffer[buffer_index].dl_config_req != 0) if(pnf_p7->subframe_buffer[buffer_index].dl_config_req != 0)
...@@ -833,16 +876,19 @@ index 0fd7828..6d9a332 100644 ...@@ -833,16 +876,19 @@ index 0fd7828..6d9a332 100644
//NFAPI_TRACE(NFAPI_TRACE_NOTE, "[%d] Freeing dl_config_req at index %d (%d/%d)", //NFAPI_TRACE(NFAPI_TRACE_NOTE, "[%d] Freeing dl_config_req at index %d (%d/%d)",
// pMyPhyInfo->sfnSf, bufferIdx, // pMyPhyInfo->sfnSf, bufferIdx,
// SFNSF2SFN(dreq->sfn_sf), SFNSF2SF(dreq->sfn_sf)); // 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); uint32_t sfn_sf_dec = NFAPI_SFNSF2DEC(req->sfn_sf);
uint8_t buffer_index = sfn_sf_dec % pnf_p7->_public.subframe_buffer_size; 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) 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)", //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 else
{ {
...@@ -851,14 +897,14 @@ index 0fd7828..6d9a332 100644 ...@@ -851,14 +897,14 @@ index 0fd7828..6d9a332 100644
deallocate_nfapi_ul_config_request(req, pnf_p7); deallocate_nfapi_ul_config_request(req, pnf_p7);
if(pnf_p7->_public.timing_info_mode_aperiodic) 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); uint32_t sfn_sf_dec = NFAPI_SFNSF2DEC(req->sfn_sf);
uint8_t buffer_index = sfn_sf_dec % pnf_p7->_public.subframe_buffer_size; uint8_t buffer_index = sfn_sf_dec % pnf_p7->_public.subframe_buffer_size;
+ struct timespec t; + struct timespec t;
+ clock_gettime(CLOCK_MONOTONIC, &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", + 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__, + __FUNCTION__,
...@@ -868,16 +914,16 @@ index 0fd7828..6d9a332 100644 ...@@ -868,16 +914,16 @@ index 0fd7828..6d9a332 100644
if(pnf_p7->subframe_buffer[buffer_index].tx_req != 0) if(pnf_p7->subframe_buffer[buffer_index].tx_req != 0)
{ {
//NFAPI_TRACE(NFAPI_TRACE_NOTE, "[%d] Freeing tx_req at index %d (%d/%d)", //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 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); deallocate_nfapi_tx_request(req, pnf_p7);
if(pnf_p7->_public.timing_info_mode_aperiodic) 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 sf_time_us = get_sf_time(now_time_hr, sf_start_time_hr);
uint32_t t2 = (NFAPI_SFNSF2DEC(sfn_sf) * 1000) + sf_time_us; uint32_t t2 = (NFAPI_SFNSF2DEC(sfn_sf) * 1000) + sf_time_us;
...@@ -906,7 +952,7 @@ index 0fd7828..6d9a332 100644 ...@@ -906,7 +952,7 @@ index 0fd7828..6d9a332 100644
uint32_t sf_time_us = get_sf_time(now_time_hr, sf_start_time_hr); 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 // 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); 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 ...@@ -915,7 +961,7 @@ index 0fd7828..6d9a332 100644
if(recvfrom_result > 0) if(recvfrom_result > 0)
{ {
pnf_handle_p7_message(pnf_p7->rx_message_buffer, recvfrom_result, pnf_p7, now_hr_time); 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 // need to update the time as we would only use the value from the
// select // select
...@@ -927,7 +973,7 @@ index 0fd7828..6d9a332 100644 ...@@ -927,7 +973,7 @@ index 0fd7828..6d9a332 100644
} }
while(recvfrom_result > 0); 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); selectRetval = select(pnf_p7->p7_sock+1, &rfds, NULL, NULL, &timeout);
...@@ -1060,7 +1106,7 @@ index e559730..0aba0a2 100644 ...@@ -1060,7 +1106,7 @@ index e559730..0aba0a2 100644
info->timing_info_period = 128; info->timing_info_period = 128;
diff --git a/vnf/src/vnf_p7.c b/vnf/src/vnf_p7.c 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 --- a/vnf/src/vnf_p7.c
+++ b/vnf/src/vnf_p7.c +++ b/vnf/src/vnf_p7.c
@@ -15,6 +15,8 @@ @@ -15,6 +15,8 @@
...@@ -1277,7 +1323,7 @@ index 8630385..70f97d6 100644 ...@@ -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); + //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) + 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));
+ } + }
+ } + }
} }
......
...@@ -2221,7 +2221,7 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols, ...@@ -2221,7 +2221,7 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
if (num_dci>0) 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) { switch (frame_parms->N_RB_DL) {
......
...@@ -79,7 +79,7 @@ void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -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; int idx = proc->subframe_tx&1;
LTE_eNB_PDCCH *pdcch_vars = &eNB->pdcch_vars[idx]; 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 // 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); 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) ...@@ -789,7 +789,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
if (nfapi_mode) { if (nfapi_mode) {
if (number_ul_pdu>0) 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); oai_nfapi_ul_config_req(UL_req);
UL_req->ul_config_request_body.number_of_pdus=0; UL_req->ul_config_request_body.number_of_pdus=0;
number_ul_pdu=0; number_ul_pdu=0;
......
...@@ -951,7 +951,7 @@ int is_srs_occasion_common(LTE_DL_FRAME_PARMS *frame_parms,int frame_tx,int subf ...@@ -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," 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); return(isSubframeSRS);
} }
......
...@@ -484,7 +484,9 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -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); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,(frame*10)+subframe);
if (num_dci > 0) 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); //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) ...@@ -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)); 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",