Commit 51c49332 authored by Robert Schmidt's avatar Robert Schmidt

MAC: count transported SDU bytes

parent 8d072754
......@@ -1275,7 +1275,6 @@ void nr_schedule_ue_spec(module_id_t module_id,
header->LCID = DL_SCH_LCID_PADDING;
buf += sizeof(NR_MAC_SUBHEADER_LONG);
header->L = htons(bufEnd-buf);
dlsch_total_bytes += bufEnd-buf;
for (; ((intptr_t)buf) % 4; buf++)
*buf = lrand48() & 0xff;
......@@ -1306,6 +1305,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
UE->mac_stats.dl.total_rbs += sched_pdsch->rbSize;
UE->mac_stats.dl.num_mac_sdu += sdus;
UE->mac_stats.dl.current_rbs = sched_pdsch->rbSize;
UE->mac_stats.dl.total_sdu_bytes += dlsch_total_bytes;
/* save retransmission information */
harq->sched_pdsch = *sched_pdsch;
......
......@@ -325,6 +325,7 @@ int nr_process_mac_pdu(instance_t module_idP,
if (UE_idx->CellGroup) {
LOG_D(NR_MAC, "Frame %d : ULSCH -> UL-DCCH %d (gNB %ld, %d bytes), rnti: 0x%04x \n", frameP, rx_lcid, module_idP, mac_len, crnti);
UE->mac_stats.ul.total_sdu_bytes += mac_len;
mac_rlc_data_ind(module_idP,
crnti,
module_idP,
......
......@@ -614,6 +614,7 @@ typedef struct NR_mac_dir_stats {
uint64_t errors;
uint64_t total_bytes;
uint32_t current_bytes;
uint64_t total_sdu_bytes;
uint32_t total_rbs;
uint32_t total_rbs_retx;
uint32_t num_mac_sdu;
......
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