Commit ab2a5df5 authored by luis_pereira87's avatar luis_pereira87

Revert "Change variable types in statistics to accommodate more bytes and to avoid negative values"

This reverts commit eca68ea84a0a22153dc7de89ad38290e11f35fb9.
parent a334216a
......@@ -582,7 +582,7 @@ static void handle_dl_harq(module_id_t mod_id,
harq->ndi ^= 1;
NR_mac_stats_t *stats = &UE_info->mac_stats[UE_id];
stats->dlsch_errors++;
LOG_D(NR_MAC, "retransmission error for UE %d (total %lu)\n", UE_id, stats->dlsch_errors);
LOG_D(NR_MAC, "retransmission error for UE %d (total %d)\n", UE_id, stats->dlsch_errors);
} else {
add_tail_nr_list(&UE_info->UE_sched_ctrl[UE_id].retrans_dl_harq, harq_pid);
harq->round++;
......
......@@ -94,7 +94,7 @@ void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen)
avg_rsrp,
stats->num_rsrp_meas);
stroff+=sprintf(output+stroff,"UE %d: dlsch_rounds %lu/%lu/%lu/%lu, dlsch_errors %lu, pucch0_DTX %d, BLER %.5f MCS %d\n",
stroff+=sprintf(output+stroff,"UE %d: dlsch_rounds %d/%d/%d/%d, dlsch_errors %d, pucch0_DTX %d, BLER %.5f MCS %d\n",
UE_id,
stats->dlsch_rounds[0], stats->dlsch_rounds[1],
stats->dlsch_rounds[2], stats->dlsch_rounds[3],
......@@ -105,25 +105,25 @@ void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen)
stats->num_rsrp_meas = 0;
stats->cumul_rsrp = 0 ;
stroff+=sprintf(output+stroff,"UE %d: dlsch_total_bytes %lu\n", UE_id, stats->dlsch_total_bytes);
stroff+=sprintf(output+stroff,"UE %d: ulsch_rounds %lu/%lu/%lu/%lu, ulsch_DTX %d, ulsch_errors %lu\n",
stroff+=sprintf(output+stroff,"UE %d: dlsch_total_bytes %d\n", UE_id, stats->dlsch_total_bytes);
stroff+=sprintf(output+stroff,"UE %d: ulsch_rounds %d/%d/%d/%d, ulsch_DTX %d, ulsch_errors %d\n",
UE_id,
stats->ulsch_rounds[0], stats->ulsch_rounds[1],
stats->ulsch_rounds[2], stats->ulsch_rounds[3],
stats->ulsch_DTX,
stats->ulsch_errors);
stroff+=sprintf(output+stroff,
"UE %d: ulsch_total_bytes_scheduled %lu, ulsch_total_bytes_received %lu\n",
"UE %d: ulsch_total_bytes_scheduled %d, ulsch_total_bytes_received %d\n",
UE_id,
stats->ulsch_total_bytes_scheduled, stats->ulsch_total_bytes_rx);
for (int lc_id = 0; lc_id < 63; lc_id++) {
if (stats->lc_bytes_tx[lc_id] > 0) {
stroff+=sprintf(output+stroff, "UE %d: LCID %d: %lu bytes TX\n", UE_id, lc_id, stats->lc_bytes_tx[lc_id]);
LOG_D(NR_MAC, "UE %d: LCID %d: %lu bytes TX\n", UE_id, lc_id, stats->lc_bytes_tx[lc_id]);
stroff+=sprintf(output+stroff, "UE %d: LCID %d: %d bytes TX\n", UE_id, lc_id, stats->lc_bytes_tx[lc_id]);
LOG_D(NR_MAC, "UE %d: LCID %d: %d bytes TX\n", UE_id, lc_id, stats->lc_bytes_tx[lc_id]);
}
if (stats->lc_bytes_rx[lc_id] > 0) {
stroff+=sprintf(output+stroff, "UE %d: LCID %d: %lu bytes RX\n", UE_id, lc_id, stats->lc_bytes_rx[lc_id]);
LOG_D(NR_MAC, "UE %d: LCID %d: %lu bytes RX\n", UE_id, lc_id, stats->lc_bytes_rx[lc_id]);
stroff+=sprintf(output+stroff, "UE %d: LCID %d: %d bytes RX\n", UE_id, lc_id, stats->lc_bytes_rx[lc_id]);
LOG_D(NR_MAC, "UE %d: LCID %d: %d bytes RX\n", UE_id, lc_id, stats->lc_bytes_rx[lc_id]);
}
}
}
......
......@@ -618,19 +618,19 @@ typedef struct {
} NRUEcontext_t;
typedef struct {
uint64_t lc_bytes_tx[64];
uint64_t lc_bytes_rx[64];
uint64_t dlsch_rounds[8];
uint64_t dlsch_errors;
uint64_t dlsch_total_bytes;
int lc_bytes_tx[64];
int lc_bytes_rx[64];
int dlsch_rounds[8];
int dlsch_errors;
int dlsch_total_bytes;
int dlsch_current_bytes;
uint64_t ulsch_rounds[8];
uint64_t ulsch_errors;
uint32_t ulsch_DTX;
uint64_t ulsch_total_bytes_scheduled;
uint64_t ulsch_total_bytes_rx;
int ulsch_rounds[8];
int ulsch_errors;
int ulsch_DTX;
int ulsch_total_bytes_scheduled;
int ulsch_total_bytes_rx;
int ulsch_current_bytes;
uint32_t pucch0_DTX;
int pucch0_DTX;
int cumul_rsrp;
uint8_t num_rsrp_meas;
} NR_mac_stats_t;
......
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