Commit ce2cbb90 authored by Andrew Burger's avatar Andrew Burger

Episys/andrew/msg4 reception failure

parent ed01a338
...@@ -544,8 +544,8 @@ function main() { ...@@ -544,8 +544,8 @@ function main() {
#fi #fi
fi fi
echo_info "installing protobuf/protobuf-c for flexran agent support" echo_info "installing protobuf/protobuf-c for flexran agent support"
install_protobuf_from_source #install_protobuf_from_source
install_protobuf_c_from_source #install_protobuf_c_from_source
fi fi
if [ "$INSTALL_OPTIONAL" = "1" ] ; then if [ "$INSTALL_OPTIONAL" = "1" ] ; then
......
...@@ -1220,7 +1220,7 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) ...@@ -1220,7 +1220,7 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req)
nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config; nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config;
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!!!!
tx_req->header.message_id = NFAPI_TX_REQUEST; tx_req->header.message_id = NFAPI_TX_REQUEST;
//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);
if (retval!=0) { if (retval!=0) {
...@@ -1282,14 +1282,15 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { ...@@ -1282,14 +1282,15 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) {
for (int i = 0; i < num_pdus; i++) for (int i = 0; i < num_pdus; i++)
{ {
uint8_t pdu_type = pdu_list[i].pdu_type; uint8_t pdu_type = pdu_list[i].pdu_type;
LOG_I(MAC, "ul_config_req num_pdus: %u pdu_number: %d pdu_type: %u SFN.SF: %d.%d\n",
num_pdus, i, pdu_type, ul_config_req->sfn_sf >> 4, ul_config_req->sfn_sf & 15);
if (pdu_type != NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE) if (pdu_type != NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE)
{ {
continue; continue;
} }
LOG_I(MAC, "ul_config_req num_pdus: %u pdu_number: %d pdu_type: %u SFN.SF: %d.%d\n",
num_pdus, i, pdu_type, ul_config_req->sfn_sf >> 4, ul_config_req->sfn_sf & 15);
for (int j = i + 1; j < num_pdus; j++) for (int j = i + 1; j < num_pdus; j++)
{ {
uint8_t pdu_type2 = pdu_list[j].pdu_type; uint8_t pdu_type2 = pdu_list[j].pdu_type;
......
...@@ -414,7 +414,7 @@ ue_send_sdu(module_id_t module_idP, ...@@ -414,7 +414,7 @@ ue_send_sdu(module_id_t module_idP,
if (payload_ptr != NULL) { if (payload_ptr != NULL) {
for (i = 0; i < num_ce; i++) { for (i = 0; i < num_ce; i++) {
// printf("ce %d : %d\n",i,rx_ces[i]); LOG_D(MAC, "ce %d : %d\n",i,rx_ces[i]);
switch (rx_ces[i]) { switch (rx_ces[i]) {
case UE_CONT_RES: case UE_CONT_RES:
LOG_I(MAC, LOG_I(MAC,
......
...@@ -397,6 +397,12 @@ void fill_uci_harq_indication_UE_MAC(int Mod_id, ...@@ -397,6 +397,12 @@ void fill_uci_harq_indication_UE_MAC(int Mod_id,
pdu->harq_indication_fdd_rel13.harq_tb_n[0] = pdu->harq_indication_fdd_rel13.harq_tb_n[0] =
1; // Assuming always an ACK (No NACK or DTX) 1; // Assuming always an ACK (No NACK or DTX)
// TODO: Fix ack/dtx -- needed for 5G
// 1.) if received dl_config_req (with c-rnti) store this info and corresponding subframe.
// 2.) if receiving ul_config_req for uci ack/nack or ulsch ack/nak in subframe n
// go look to see if dl_config_req (with c-rnti) was received in subframe (n - 4)
// 3.) if the answer to #2 is yes then send ACK IF NOT send DTX
} else if ((harq_information->harq_information_rel9_fdd.ack_nack_mode == 0) } else if ((harq_information->harq_information_rel9_fdd.ack_nack_mode == 0)
&& (harq_information->harq_information_rel9_fdd.harq_size && (harq_information->harq_information_rel9_fdd.harq_size
== 2)) { == 2)) {
...@@ -714,7 +720,7 @@ int ul_config_req_UE_MAC(nfapi_ul_config_request_t *req, ...@@ -714,7 +720,7 @@ int ul_config_req_UE_MAC(nfapi_ul_config_request_t *req,
handle_nfapi_ul_pdu_UE_MAC( handle_nfapi_ul_pdu_UE_MAC(
Mod_id, pdu, sfn, sf, req->ul_config_request_body.srs_present, i, req); Mod_id, pdu, sfn, sf, req->ul_config_request_body.srs_present, i, req);
} else { } else {
LOG_E(MAC, "UNKNOWN UL_CONFIG_REQ PDU_TYPE or RNTI not matching pdu type: %d\n", pdu_type); LOG_D(MAC, "UNKNOWN UL_CONFIG_REQ PDU_TYPE or RNTI not matching pdu type: %d\n", pdu_type);
} }
} }
...@@ -774,6 +780,8 @@ void dl_config_req_UE_MAC_dci(int sfn, ...@@ -774,6 +780,8 @@ void dl_config_req_UE_MAC_dci(int sfn,
return; return;
} }
LOG_D(MAC, "%s() rnti value: 0x%x rnti type: %d\n", __func__,
rnti, rnti_type);
if (rnti_type == 1) { // C-RNTI (Normal DLSCH case) if (rnti_type == 1) { // C-RNTI (Normal DLSCH case)
for (int ue_id = 0; ue_id < num_ue; ue_id++) { for (int ue_id = 0; ue_id < num_ue; ue_id++) {
if (UE_mac_inst[ue_id].crnti == rnti) { if (UE_mac_inst[ue_id].crnti == rnti) {
......
...@@ -972,6 +972,16 @@ void ue_stub_rx_handler(unsigned int num_bytes, ...@@ -972,6 +972,16 @@ void ue_stub_rx_handler(unsigned int num_bytes,
} }
} }
uint64_t clock_usec()
{
struct timespec t;
if (clock_gettime(CLOCK_MONOTONIC, &t) == -1)
{
abort();
}
return (uint64_t)t.tv_sec * 1000000 + (t.tv_nsec / 1000);
}
/*! /*!
* \brief This is the UE thread for RX subframe n and TX subframe n+4. * \brief This is the UE thread for RX subframe n and TX subframe n+4.
* This thread performs the phy_procedures_UE_RX() on every received slot. * This thread performs the phy_procedures_UE_RX() on every received slot.
...@@ -1048,8 +1058,31 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) ...@@ -1048,8 +1058,31 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
} }
last_sfn_sf = sfn_sf; last_sfn_sf = sfn_sf;
nfapi_dl_config_request_t *dl_config_req = get_queue(&dl_config_req_queue);
nfapi_tx_request_pdu_t *tx_request_pdu_list = get_queue(&tx_req_pdu_queue); nfapi_tx_request_pdu_t *tx_request_pdu_list = get_queue(&tx_req_pdu_queue);
nfapi_dl_config_request_t *dl_config_req = get_queue(&dl_config_req_queue);
if (tx_request_pdu_list)
{
uint64_t deadline = clock_usec() + 1000;
if (!dl_config_req)
{
for (;;)
{
LOG_E(MAC, "Spinning and waiting for corresponding dl_config_req\n");
dl_config_req = get_queue(&dl_config_req_queue);
if (dl_config_req)
{
break;
}
if (clock_usec() >= deadline)
{
LOG_E(MAC, "Giving up waiting for dl_config_req\n");
break;
}
usleep(1);
}
}
}
nfapi_ul_config_request_t *ul_config_req = get_queue(&ul_config_req_queue); nfapi_ul_config_request_t *ul_config_req = get_queue(&ul_config_req_queue);
nfapi_hi_dci0_request_t *hi_dci0_req = get_queue(&hi_dci0_req_queue); nfapi_hi_dci0_request_t *hi_dci0_req = get_queue(&hi_dci0_req_queue);
......
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