Commit 5db290dd authored by Andrew Burger's avatar Andrew Burger

Need to fix these carriage returns but here are some important changes

parent b397bc44
...@@ -435,7 +435,7 @@ int phy_subframe_indication(struct nfapi_vnf_p7_config *config, uint16_t phy_id, ...@@ -435,7 +435,7 @@ int phy_subframe_indication(struct nfapi_vnf_p7_config *config, uint16_t phy_id,
} }
int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indication_t *ind) { int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indication_t *ind) {
LOG_D(MAC, "%s() NFAPI SFN/SF:%d number_of_preambles:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rach_indication_body.number_of_preambles); LOG_I(MAC, "%s() NFAPI SFN/SF:%d number_of_preambles:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rach_indication_body.number_of_preambles);
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0]; struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
printf("[VNF] RACH_IND eNB:%p sfn_sf:%d number_of_preambles:%d\n", eNB, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rach_indication_body.number_of_preambles); printf("[VNF] RACH_IND eNB:%p sfn_sf:%d number_of_preambles:%d\n", eNB, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rach_indication_body.number_of_preambles);
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
...@@ -454,7 +454,7 @@ int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indicatio ...@@ -454,7 +454,7 @@ int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indicatio
UL_RCC_INFO.rach_ind[index] = *ind; UL_RCC_INFO.rach_ind[index] = *ind;
if (ind->rach_indication_body.number_of_preambles > 0) if (ind->rach_indication_body.number_of_preambles > 0)
UL_RCC_INFO.rach_ind[index].rach_indication_body.preamble_list = malloc(sizeof(nfapi_preamble_pdu_t)*ind->rach_indication_body.number_of_preambles ); UL_RCC_INFO.rach_ind[index].rach_indication_body.preamble_list = malloc(sizeof(nfapi_preamble_pdu_t)*ind->rach_indication_body.number_of_preambles);
for (int i=0; i<ind->rach_indication_body.number_of_preambles; i++) { for (int i=0; i<ind->rach_indication_body.number_of_preambles; i++) {
if (ind->rach_indication_body.preamble_list[i].preamble_rel8.tl.tag == NFAPI_PREAMBLE_REL8_TAG) { if (ind->rach_indication_body.preamble_list[i].preamble_rel8.tl.tag == NFAPI_PREAMBLE_REL8_TAG) {
...@@ -501,7 +501,7 @@ int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indicatio ...@@ -501,7 +501,7 @@ 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) { int phy_harq_indication(struct nfapi_vnf_p7_config *config, nfapi_harq_indication_t *ind) {
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0]; struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
LOG_D(MAC, "%s() NFAPI SFN/SF:%d number_of_harqs:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->harq_indication_body.number_of_harqs); LOG_I(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); pthread_mutex_lock(&eNB->UL_INFO_mutex);
if(NFAPI_MODE == NFAPI_MODE_VNF){ if(NFAPI_MODE == NFAPI_MODE_VNF){
int8_t index = NFAPI_SFNSF2SF(ind->sfn_sf); int8_t index = NFAPI_SFNSF2SF(ind->sfn_sf);
...@@ -596,6 +596,31 @@ int phy_crc_indication(struct nfapi_vnf_p7_config *config, nfapi_crc_indication_ ...@@ -596,6 +596,31 @@ int phy_crc_indication(struct nfapi_vnf_p7_config *config, nfapi_crc_indication_
return 1; return 1;
} }
const char *hexdump(const void *data, size_t data_len, char *out, size_t out_len)
{
char *p = out;
char *endp = out + out_len;
const uint8_t *q = data;
snprintf(p, endp - p, "[%zu]", data_len);
p += strlen(p);
for (size_t i = 0; i < data_len; ++i)
{
if (p >= endp)
{
static const char ellipses[] = "...";
char *s = endp - sizeof(ellipses);
if (s >= p)
{
strcpy(s, ellipses);
}
break;
}
snprintf(p, endp - p, " %02X", *q++);
p += strlen(p);
}
return out;
}
int phy_rx_indication(struct nfapi_vnf_p7_config *config, nfapi_rx_indication_t *ind) { int phy_rx_indication(struct nfapi_vnf_p7_config *config, nfapi_rx_indication_t *ind) {
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0]; struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
......
...@@ -860,7 +860,7 @@ int unpack_p7_tlv_list(unpack_p7_tlv_t unpack_fns[], uint16_t size, uint8_t **pp ...@@ -860,7 +860,7 @@ int unpack_p7_tlv_list(unpack_p7_tlv_t unpack_fns[], uint16_t size, uint8_t **pp
if(tagMatch == 0) if(tagMatch == 0)
{ {
if(generic_tl.tag >= NFAPI_VENDOR_EXTENSION_MIN_TAG_VALUE && if(generic_tl.tag >= NFAPI_VENDOR_EXTENSION_MIN_TAG_VALUE &&
generic_tl.tag <= NFAPI_VENDOR_EXTENSION_MAX_TAG_VALUE) generic_tl.tag <= NFAPI_VENDOR_EXTENSION_MAX_TAG_VALUE)
{ {
int result = unpack_p7_vendor_extension_tlv(&generic_tl, ppReadPackedMsg, end, config, ve); int result = unpack_p7_vendor_extension_tlv(&generic_tl, ppReadPackedMsg, end, config, ve);
......
This diff is collapsed.
...@@ -26,12 +26,15 @@ void handle_rach(UL_IND_t *UL_info) { ...@@ -26,12 +26,15 @@ void handle_rach(UL_IND_t *UL_info) {
if (NFAPI_MODE == NFAPI_MODE_VNF) if (NFAPI_MODE == NFAPI_MODE_VNF)
{ {
LOG_I(MAC, "handle_rach j: %d UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles: %d\n",
j, UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles);
if (UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles > 0) if (UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles > 0)
{ {
LOG_E(MAC, "UL_info[Frame %d, Subframe %d] Calling initiate_ra_proc RACH:Frame: %d Subframe: %d\n", if (UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles > 1)
UL_info->frame, UL_info->subframe, NFAPI_SFNSF2SFN(UL_RCC_INFO.rach_ind[j].sfn_sf), NFAPI_SFNSF2SF(UL_RCC_INFO.rach_ind[j].sfn_sf)); {
LOG_I(MAC, "handle_rach j: %d UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles: %d\n",
j, UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles);
LOG_I(MAC, "UL_info[Frame %d, Subframe %d] Calling initiate_ra_proc RACH:Frame: %d Subframe: %d\n",
UL_info->frame, UL_info->subframe, NFAPI_SFNSF2SFN(UL_RCC_INFO.rach_ind[j].sfn_sf), NFAPI_SFNSF2SF(UL_RCC_INFO.rach_ind[j].sfn_sf));
}
AssertFatal(UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles == 1, "More than 1 preamble not supported\n"); // dump frame/sf and all things in UL_RCC_INFO AssertFatal(UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles == 1, "More than 1 preamble not supported\n"); // dump frame/sf and all things in UL_RCC_INFO
initiate_ra_proc(UL_info->module_id, initiate_ra_proc(UL_info->module_id,
UL_info->CC_id, UL_info->CC_id,
...@@ -700,12 +703,14 @@ void UL_indication(UL_IND_t *UL_info, L1_rxtx_proc_t *proc) { ...@@ -700,12 +703,14 @@ void UL_indication(UL_IND_t *UL_info, L1_rxtx_proc_t *proc) {
Sched_Rsp_t *sched_info = &Sched_INFO[module_id][CC_id]; Sched_Rsp_t *sched_info = &Sched_INFO[module_id][CC_id];
IF_Module_t *ifi = if_inst[module_id]; IF_Module_t *ifi = if_inst[module_id];
eNB_MAC_INST *mac = RC.mac[module_id]; eNB_MAC_INST *mac = RC.mac[module_id];
LOG_E(PHY,"SFN/SF:%d%d module_id:%d CC_id:%d UL_info[rx_ind:%d harqs:%d crcs:%d cqis:%d preambles:%d sr_ind:%d]\n", if (UL_info->subframe == 3)
UL_info->frame,UL_info->subframe, {
module_id,CC_id, LOG_I(PHY,"SFN/SF:%d%d module_id:%d CC_id:%d UL_info[rx_ind:%d harqs:%d crcs:%d cqis:%d preambles:%d sr_ind:%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->frame,UL_info->subframe,
UL_info->cqi_ind.cqi_indication_body.number_of_cqis, UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs); module_id,CC_id,
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.cqi_indication_body.number_of_cqis, UL_info->rach_ind.rach_indication_body.number_of_preambles, UL_info->sr_ind.sr_indication_body.number_of_srs);
}
if(UL_info->frame==1023&&UL_info->subframe==6) { // dl scheduling (0,0) if(UL_info->frame==1023&&UL_info->subframe==6) { // dl scheduling (0,0)
frame_cnt= (frame_cnt + 1)%7; // to prevent frame_cnt get too big frame_cnt= (frame_cnt + 1)%7; // to prevent frame_cnt get too big
LOG_D(MAC,"current (%d,%d) frame count dl is %d\n",UL_info->frame,UL_info->subframe,frame_cnt); LOG_D(MAC,"current (%d,%d) frame count dl is %d\n",UL_info->frame,UL_info->subframe,frame_cnt);
......
...@@ -534,6 +534,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -534,6 +534,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
rnti, rnti,
index, index,
ul_config_req); ul_config_req);
fill_ulsch_cqi_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, rnti);
} }
} }
if (ulsch_harq_information != NULL) if (ulsch_harq_information != NULL)
...@@ -575,6 +576,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -575,6 +576,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
rnti, rnti,
index, index,
ul_config_req); ul_config_req);
fill_ulsch_cqi_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, rnti);
} }
} }
} else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE) { } else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE) {
...@@ -614,6 +616,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, ...@@ -614,6 +616,7 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
rnti, rnti,
index, index,
ul_config_req); ul_config_req);
fill_ulsch_cqi_indication_UE_MAC(Mod_id, frame, subframe, UL_INFO, rnti);
} }
} }
...@@ -912,7 +915,6 @@ void hi_dci0_req_UE_MAC(int sfn, ...@@ -912,7 +915,6 @@ void hi_dci0_req_UE_MAC(int sfn,
return; return;
for (int ue_id = 0; ue_id < num_ue; ue_id++) { for (int ue_id = 0; ue_id < num_ue; ue_id++) {
if (dci->rnti == UE_mac_inst[ue_id].crnti) { if (dci->rnti == UE_mac_inst[ue_id].crnti) {
fill_ulsch_cqi_indication_UE_MAC(ue_id, sfn, sf, UL_INFO, dci->rnti);
return; return;
} }
} }
...@@ -1319,8 +1321,9 @@ const char *hexdump(const void *data, size_t data_len, char *out, size_t out_len ...@@ -1319,8 +1321,9 @@ const char *hexdump(const void *data, size_t data_len, char *out, size_t out_len
break; break;
case NFAPI_RX_ULSCH_INDICATION: // is this the right nfapi message_id? Ask Raymond case NFAPI_RX_ULSCH_INDICATION: // is this the right nfapi message_id? Ask Raymond
encoded_size = nfapi_p7_message_pack(&UL->rx_ind, buffer, sizeof(buffer), NULL); encoded_size = nfapi_p7_message_pack(&UL->rx_ind, buffer, sizeof(buffer), NULL);
LOG_E(MAC, "RX_IND sent to Proxy, Size: %d Frame %d Subframe %d\n", encoded_size, LOG_E(MAC, "RX_IND sent to Proxy, Size: %d Frame %d Subframe %d rx_ind.tl.length: %u vdorext: %p\n",
NFAPI_SFNSF2SFN(UL->rx_ind.sfn_sf), NFAPI_SFNSF2SF(UL->rx_ind.sfn_sf)); encoded_size, NFAPI_SFNSF2SFN(UL->rx_ind.sfn_sf), NFAPI_SFNSF2SF(UL->rx_ind.sfn_sf),
UL->rx_ind.rx_indication_body.tl.length, UL->rx_ind.vendor_extension);
break; break;
case NFAPI_RX_CQI_INDICATION: // is this the right nfapi message_id? Ask Raymond case NFAPI_RX_CQI_INDICATION: // is this the right nfapi message_id? Ask Raymond
encoded_size = nfapi_p7_message_pack(&UL->cqi_ind, buffer, sizeof(buffer), NULL); encoded_size = nfapi_p7_message_pack(&UL->cqi_ind, buffer, sizeof(buffer), NULL);
......
...@@ -1044,24 +1044,24 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) ...@@ -1044,24 +1044,24 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
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);
LOG_I(MAC, "received from proxy frame %d subframe %d\n", LOG_D(MAC, "received from proxy frame %d subframe %d\n",
NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf)); NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf));
if (dl_config_req != NULL) { if (dl_config_req != NULL) {
LOG_I(MAC, "dl_config_req pdus: %u Frame: %d Subframe: %d\n", LOG_D(MAC, "dl_config_req pdus: %u Frame: %d Subframe: %d\n",
dl_config_req->dl_config_request_body.number_pdu, dl_config_req->dl_config_request_body.number_pdu,
NFAPI_SFNSF2SFN(dl_config_req->sfn_sf), NFAPI_SFNSF2SF(dl_config_req->sfn_sf)); NFAPI_SFNSF2SFN(dl_config_req->sfn_sf), NFAPI_SFNSF2SF(dl_config_req->sfn_sf));
} }
if (tx_request_pdu_list != NULL) { if (tx_request_pdu_list != NULL) {
LOG_I(MAC, "tx_req segments: %u\n", LOG_D(MAC, "tx_req segments: %u\n",
tx_request_pdu_list->num_segments); tx_request_pdu_list->num_segments);
} }
if (ul_config_req != NULL) { if (ul_config_req != NULL) {
LOG_I(MAC, "ul_config_req pdus: %u Frame: %d Subframe: %d\n", LOG_D(MAC, "ul_config_req pdus: %u Frame: %d Subframe: %d\n",
ul_config_req->ul_config_request_body.number_of_pdus, ul_config_req->ul_config_request_body.number_of_pdus,
NFAPI_SFNSF2SFN(ul_config_req->sfn_sf), NFAPI_SFNSF2SF(ul_config_req->sfn_sf)); NFAPI_SFNSF2SFN(ul_config_req->sfn_sf), NFAPI_SFNSF2SF(ul_config_req->sfn_sf));
} }
if (hi_dci0_req != NULL) { if (hi_dci0_req != NULL) {
LOG_I(MAC, "hi_dci0_req pdus: %u Frame: %d Subframe: %d\n", LOG_D(MAC, "hi_dci0_req pdus: %u Frame: %d Subframe: %d\n",
hi_dci0_req->hi_dci0_request_body.number_of_dci, hi_dci0_req->hi_dci0_request_body.number_of_dci,
NFAPI_SFNSF2SFN(hi_dci0_req->sfn_sf), NFAPI_SFNSF2SF(hi_dci0_req->sfn_sf)); NFAPI_SFNSF2SFN(hi_dci0_req->sfn_sf), NFAPI_SFNSF2SF(hi_dci0_req->sfn_sf));
} }
......
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