Commit c962bf36 authored by Cai Yang's avatar Cai Yang

modify code warnings

parent b497dcc2
......@@ -636,7 +636,7 @@ int phy_rx_indication(struct nfapi_vnf_p7_config *config, nfapi_rx_indication_t
for (int i=0; i<ind->rx_indication_body.number_of_pdus; i++) {
nfapi_rx_indication_pdu_t *dest_pdu = &UL_RCC_INFO.rx_ind[index].rx_indication_body.rx_pdu_list[i];
nfapi_rx_indication_pdu_t *src_pdu = &ind->rx_indication_body.rx_pdu_list[i];
//nfapi_rx_indication_pdu_t *src_pdu = &ind->rx_indication_body.rx_pdu_list[i];
LOG_D(PHY, "%s() NFAPI SFN/SF:%d PDUs:%d [PDU:%d] handle:%d rnti:%04x length:%d offset:%d ul_cqi:%d ta:%d data:%p\n",
__FUNCTION__,
......@@ -716,7 +716,7 @@ int phy_sr_indication(struct nfapi_vnf_p7_config *config, nfapi_sr_indication_t
UL_RCC_INFO.sr_ind[index].sr_indication_body.sr_pdu_list = ind->sr_indication_body.sr_pdu_list;
}
for (int i=0; i<ind->sr_indication_body.number_of_srs; i++) {
nfapi_sr_indication_pdu_t *dest_pdu = &UL_RCC_INFO.sr_ind[index].sr_indication_body.sr_pdu_list[i];
//nfapi_sr_indication_pdu_t *dest_pdu = &UL_RCC_INFO.sr_ind[index].sr_indication_body.sr_pdu_list[i];
nfapi_sr_indication_pdu_t *src_pdu = &ind->sr_indication_body.sr_pdu_list[i];
LOG_D(MAC, "SR_IND[PDU:%d %d][rnti:%x cqi:%d channel:%d]\n", index, i, src_pdu->rx_ue_information.rnti, src_pdu->ul_cqi_information.ul_cqi, src_pdu->ul_cqi_information.channel);
......
......@@ -1670,7 +1670,7 @@ void vnf_p7_release_msg(vnf_p7_t* vnf_p7, nfapi_p7_message_header_t* header)
}
vnf_p7_codec_free(vnf_p7, rx_ind->rx_indication_body.rx_pdu_list);
vnf_p7, rx_ind->rx_indication_body.rx_pdu_list = 0;
rx_ind->rx_indication_body.rx_pdu_list = 0;
}
break;
case NFAPI_RACH_INDICATION:
......
......@@ -363,7 +363,7 @@ uint64_t flexran_get_total_TBS_ul(mid_t mod_id, mid_t ue_id, int cc_id)
int flexran_get_harq_round(mid_t mod_id, uint8_t cc_id, mid_t ue_id)
{
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].harq_round;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].harq_round[TB1];
}
uint32_t flexran_get_num_mac_sdu_tx(mid_t mod_id, mid_t ue_id, int cc_id)
......
......@@ -3395,7 +3395,7 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
uint16_t first_rb[MAX_NUM_CCs];
int8_t mcs;
uint8_t snr;
uint8_t snr2mcs_offset = 3;
//uint8_t snr2mcs_offset = 3;
double bler_filter=0.9;
double bler;
uint8_t rb_table_index;
......@@ -3589,7 +3589,7 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = mcs;
}
LOG_D(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d snr %d snr_inst %d mcs %d mcs_offset %d bler %lf total_bler %lf ( %d %d ) rb_num %d phr_info %d tx_power %d bsr %d estimated_ul_buffer %d scheduled_ul_bytes %d\n",
LOG_D(MAC,"[eNB %hu] frame %u subframe %u, UE %d/%x CC %d snr %hhu snr_inst %hhu mcs %c mcs_offset %hhu bler %lf total_bler %lf ( %lu %lu ) rb_num %hhu phr_info %c tx_power %hd bsr %d estimated_ul_buffer %d scheduled_ul_bytes %d\n",
module_idP,frameP,subframeP,UE_id,UE_RNTI(CC_id,UE_id),CC_id, snr, UE_list->UE_sched_ctrl[UE_id].pusch_snr[CC_id], mcs, UE_list->UE_sched_ctrl[UE_id].mcs_offset[CC_id], UE_list->UE_sched_ctrl[UE_id].pusch_bler[CC_id],
total_bler, UE_list->UE_sched_ctrl[UE_id].pusch_rx_num[CC_id], UE_list->UE_sched_ctrl[UE_id].pusch_rx_error_num[CC_id], rb_table[rb_table_index-1], UE_template->phr_info, tx_power, bytes_to_schedule, UE_template->estimated_ul_buffer, UE_template->scheduled_ul_bytes);
......
......@@ -4101,7 +4101,7 @@ frame_subframe2_dl_harq_pid(LTE_TDD_Config_t *tdd_Config,
return harq_pid;
default:
LOG_E(MAC,"TDD config error %d\n",
LOG_E(MAC,"TDD config error %ld\n",
tdd_Config->subframeAssignment);
break;
}
......@@ -4391,7 +4391,7 @@ extract_harq(module_id_t mod_idP,
if(harq_indication_tdd->harq_data[0].bundling.value_0==1){ //ack
sched_ctl->round[CC_idP][harq_pid][TB1] = 8; // release HARQ process
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
LOG_D(MAC,"frame %d subframe %d Acking (%d,%d) harq_pid %d round %d\n",frameP,subframeP,frame_tx,subframe_tx,harq_pid,sched_ctl->round[CC_idP][harq_pid]);
LOG_D(MAC,"frame %u subframe %u Acking (%d,%u) harq_pid %hhu round %hhu\n",frameP,subframeP,frame_tx,subframe_tx,harq_pid,sched_ctl->round[CC_idP][harq_pid][TB1]);
}else{ //nack
if( sched_ctl->round[CC_idP][harq_pid][TB1]<8)
sched_ctl->round[CC_idP][harq_pid][TB1]++;
......@@ -4399,7 +4399,7 @@ extract_harq(module_id_t mod_idP,
sched_ctl->round[CC_idP][harq_pid][TB1] = 8; // release HARQ process
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
}
LOG_D(MAC,"frame %d subframe %d Nacking (%d,%d) harq_pid %d round %d\n",frameP,subframeP,frame_tx,subframe_tx,harq_pid,sched_ctl->round[CC_idP][harq_pid]);
LOG_D(MAC,"frame %u subframe %u Nacking (%d,%u) harq_pid %hhu round %hhu\n",frameP,subframeP,frame_tx,subframe_tx,harq_pid,sched_ctl->round[CC_idP][harq_pid][TB1]);
if(sched_ctl->round[CC_idP][harq_pid][TB1] == 8){
for (uint8_t ra_i = 0; ra_i < NB_RA_PROC_MAX; ra_i++) {
if((ra[ra_i].rnti == rnti) && (ra[ra_i].state == WAITMSG4ACK) && (ra[ra_i].harq_pid == harq_pid)){
......@@ -4415,7 +4415,7 @@ extract_harq(module_id_t mod_idP,
for (uint8_t ra_i = 0; ra_i < NB_RA_PROC_MAX; ra_i++) {
if ((ra[ra_i].rnti == rnti) && (ra[ra_i].state == MSGCRNTI_ACK) && (ra[ra_i].crnti_harq_pid == harq_pid)) {
LOG_D(MAC,"CRNTI Reconfiguration: ACK %d rnti %x round %d frame %d subframe %d \n",harq_indication_tdd->harq_data[0].bundling.value_0,rnti,sched_ctl->round[CC_idP][harq_pid],frameP,subframeP);
LOG_D(MAC,"CRNTI Reconfiguration: ACK %hhu rnti %x round %hhu frame %u subframe %u \n",harq_indication_tdd->harq_data[0].bundling.value_0,rnti,sched_ctl->round[CC_idP][harq_pid][TB1],frameP,subframeP);
if(num_ack_nak == 1 && harq_indication_tdd->harq_data[0].bundling.value_0 == 1) {
cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
}else{
......@@ -4510,7 +4510,7 @@ extract_harq(module_id_t mod_idP,
RA_t *ra = &RC.mac[mod_idP]->common_channels[CC_idP].ra[0];
for (uint8_t ra_i = 0; ra_i < NB_RA_PROC_MAX; ra_i++) {
if ((ra[ra_i].rnti == rnti) && (ra[ra_i].state == MSGCRNTI_ACK) && (ra[ra_i].crnti_harq_pid == harq_pid)) {
LOG_D(MAC,"CRNTI Reconfiguration: ACK %d rnti %x round %d frame %d subframe %d \n",harq_indication_tdd->harq_data[0].bundling.value_0,rnti,sched_ctl->round[CC_idP][harq_pid],frameP,subframeP);
LOG_D(MAC,"CRNTI Reconfiguration: ACK %hhu rnti %x round %hhu frame %u subframe %u \n",harq_indication_tdd->harq_data[0].bundling.value_0,rnti,sched_ctl->round[CC_idP][harq_pid][select_tb],frameP,subframeP);
if( harq_indication_tdd->harq_data[select_tb].bundling.value_0 == 1) {
cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
}else{
......@@ -4538,14 +4538,14 @@ extract_harq(module_id_t mod_idP,
num_ack_nak = harq_indication_fdd->number_of_ack_nack;
pdu = &harq_indication_fdd->harq_tb_n[0];
harq_pid = ((10 * frameP) + subframeP + 10236) & 7;
LOG_D(MAC, "frame %d subframe %d harq_pid %d mode %d tmode[0] %d num_ack_nak %d round %d\n",
LOG_D(MAC, "frame %u subframe %u harq_pid %hhu mode %hhu tmode[0] %d num_ack_nak %d round %hhu\n",
frameP,
subframeP,
harq_pid,
harq_indication_fdd->mode,
tmode[0],
num_ack_nak,
sched_ctl->round[CC_idP][harq_pid]);
sched_ctl->round[CC_idP][harq_pid][TB1]);
// use 1 HARQ proces of BL/CE UE for now
if (UE_list->UE_template[pCCid][UE_id].rach_resource_type > 0) harq_pid = 0;
......@@ -4602,10 +4602,10 @@ extract_harq(module_id_t mod_idP,
for (uint8_t ra_i = 0; ra_i < NB_RA_PROC_MAX; ra_i++) {
if (ra[ra_i].rnti == rnti && ra[ra_i].state == MSGCRNTI_ACK && ra[ra_i].crnti_harq_pid == harq_pid) {
LOG_D(MAC,"CRNTI Reconfiguration: ACK %d rnti %x round %d frame %d subframe %d \n",
LOG_D(MAC,"CRNTI Reconfiguration: ACK %hhu rnti %x round %hhu frame %u subframe %u \n",
pdu[0],
rnti,
sched_ctl->round[CC_idP][harq_pid],
sched_ctl->round[CC_idP][harq_pid][TB1],
frameP,
subframeP);
......
......@@ -164,15 +164,15 @@ int dump_eNB_l2_stats(char *buffer, int length) {
UE_list->eNB_UE_stats[CC_id][UE_id].ncce_used_retx
);
len += sprintf(&buffer[len],
"[MAC] DLSCH bitrate (TTI %d, avg %d), Transmitted bytes "
"(TTI %d, total %"PRIu64"), Total Transmitted PDU %d, Overhead "
"[MAC] DLSCH bitrate (TTI %u, avg %u), Transmitted bytes "
"(TTI %u, total %"PRIu64"), Total Transmitted PDU %u, Overhead "
"(TTI %"PRIu64", total %"PRIu64", avg %"PRIu64")\n",
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_bitrate,
UE_list->eNB_UE_stats[CC_id][UE_id].total_dlsch_bitrate,
UE_list->eNB_UE_stats[CC_id][UE_id].TBS,
UE_list->eNB_UE_stats[CC_id][UE_id].TBS[TB1],
UE_list->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes,
UE_list->eNB_UE_stats[CC_id][UE_id].total_num_pdus,
UE_list->eNB_UE_stats[CC_id][UE_id].overhead_bytes,
UE_list->eNB_UE_stats[CC_id][UE_id].overhead_bytes[TB1],
UE_list->eNB_UE_stats[CC_id][UE_id].total_overhead_bytes,
UE_list->eNB_UE_stats[CC_id][UE_id].avg_overhead_bytes
);
......
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