Commit 8dff7f2b authored by Marius Tillner's avatar Marius Tillner

Merge branch 'LatSeq_5GSA_downlink' into LatSeq_5GSA

parents 073597ad 84521388
...@@ -853,6 +853,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) { ...@@ -853,6 +853,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST,
(timestamp + ru->ts_offset - ru->openair0_cfg.tx_sample_advance) & 0xffffffff); (timestamp + ru->ts_offset - ru->openair0_cfg.tx_sample_advance) & 0xffffffff);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1);
LATSEQ_P("D phy.ant--phy.SOUTHout", "len%u::fm%u.sl%u", (siglen+sf_extension)*sizeof(int32_t), frame, slot);
// prepare tx buffer pointers // prepare tx buffer pointers
txs = ru->rfdevice.trx_write_func(&ru->rfdevice, txs = ru->rfdevice.trx_write_func(&ru->rfdevice,
timestamp + ru->ts_offset - ru->openair0_cfg.tx_sample_advance - sf_extension, timestamp + ru->ts_offset - ru->openair0_cfg.tx_sample_advance - sf_extension,
...@@ -860,6 +861,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) { ...@@ -860,6 +861,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
siglen + sf_extension, siglen + sf_extension,
ru->nb_tx, ru->nb_tx,
flags); flags);
LATSEQ_P("D phy.SOUTHout--phy.out", "len%u::fm%u.sl%u", (siglen+sf_extension)*sizeof(int32_t), frame, slot);
LOG_D(PHY, LOG_D(PHY,
"[TXPATH] RU %d aa %d tx_rf, writing to TS %llu, %d.%d, unwrapped_frame %d, slot %d, flags %d, siglen+sf_extension %d, " "[TXPATH] RU %d aa %d tx_rf, writing to TS %llu, %d.%d, unwrapped_frame %d, slot %d, flags %d, siglen+sf_extension %d, "
"returned %d, E %f\n", "returned %d, E %f\n",
...@@ -1081,6 +1083,7 @@ void ru_tx_func(void *param) { ...@@ -1081,6 +1083,7 @@ void ru_tx_func(void *param) {
// do OFDM with/without TX front-end processing if needed // do OFDM with/without TX front-end processing if needed
if ((ru->fh_north_asynch_in == NULL) && (ru->feptx_ofdm)) ru->feptx_ofdm(ru,frame_tx,slot_tx); if ((ru->fh_north_asynch_in == NULL) && (ru->feptx_ofdm)) ru->feptx_ofdm(ru,frame_tx,slot_tx);
LATSEQ_P("D phy.ofdmidft--phy.ant", "len%u::fm%u.sl%u", samples, frame_tx, slot_tx);
if(!emulate_rf) { if(!emulate_rf) {
// do outgoing fronthaul (south) if needed // do outgoing fronthaul (south) if needed
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/nr/nr_common.h" #include "common/utils/nr/nr_common.h"
#include "executables/softmodem-common.h" #include "executables/softmodem-common.h"
#include "common/utils/LATSEQ/latseq.h"
//#define DEBUG_DLSCH //#define DEBUG_DLSCH
//#define DEBUG_DLSCH_MAPPING //#define DEBUG_DLSCH_MAPPING
...@@ -129,13 +130,13 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, ...@@ -129,13 +130,13 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
unsigned char output[rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * Qm * rel15->nrOfLayers] __attribute__((aligned(32))); unsigned char output[rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * Qm * rel15->nrOfLayers] __attribute__((aligned(32)));
bzero(output,rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * Qm * rel15->nrOfLayers); bzero(output,rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * Qm * rel15->nrOfLayers);
start_meas(dlsch_encoding_stats); start_meas(dlsch_encoding_stats);
if (nr_dlsch_encoding(gNB, if (nr_dlsch_encoding(gNB,
frame, slot, harq, frame_parms,output,tinput,tprep,tparity,toutput, frame, slot, harq, frame_parms,output,tinput,tprep,tparity,toutput,
dlsch_rate_matching_stats, dlsch_rate_matching_stats,
dlsch_interleaving_stats, dlsch_interleaving_stats,
dlsch_segmentation_stats) == -1) dlsch_segmentation_stats) == -1)
return; return;
LATSEQ_P("D phy.ldcp--phy.scrambled", "len%u::fm%u.sl%u.dlschid%u.rnti%u", 1, frame, slot, dlsch_id, rel15->rnti);
stop_meas(dlsch_encoding_stats); stop_meas(dlsch_encoding_stats);
#ifdef DEBUG_DLSCH #ifdef DEBUG_DLSCH
printf("PDSCH encoding:\nPayload:\n"); printf("PDSCH encoding:\nPayload:\n");
...@@ -178,6 +179,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, ...@@ -178,6 +179,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
} }
#endif #endif
LATSEQ_P("D phy.scrambled--phy.modulated", "len%u::fm%u.sl%u.codeword%u.rnti%u", 1, frame, slot, q, rel15->rnti);
stop_meas(dlsch_scrambling_stats); stop_meas(dlsch_scrambling_stats);
/// Modulation /// Modulation
start_meas(dlsch_modulation_stats); start_meas(dlsch_modulation_stats);
...@@ -185,6 +187,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, ...@@ -185,6 +187,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
encoded_length, encoded_length,
Qm, Qm,
mod_symbs[q]); mod_symbs[q]);
LATSEQ_P("D phy.modulated--phy.layermapped", "len%u::fm%u.sl%u.codeword%u.qm%u.rnti%u", 1, frame, slot, q, Qm, rel15->rnti);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_MODULATION, 0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_MODULATION, 0);
stop_meas(dlsch_modulation_stats); stop_meas(dlsch_modulation_stats);
#ifdef DEBUG_DLSCH #ifdef DEBUG_DLSCH
...@@ -215,7 +218,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, ...@@ -215,7 +218,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
printf("\n"); printf("\n");
} }
#endif #endif
LATSEQ_P("D phy.layermapped--phy.resourcemapped", "len%u::fm%u.sl%u.rnti%u", 1, frame, slot, rel15->rnti);
stop_meas(&gNB->dlsch_layer_mapping_stats); stop_meas(&gNB->dlsch_layer_mapping_stats);
/// Resource mapping /// Resource mapping
...@@ -467,6 +470,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, ...@@ -467,6 +470,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
} // no DMRS/PTRS in symbol } // no DMRS/PTRS in symbol
} // symbol loop } // symbol loop
}// layer loop }// layer loop
LATSEQ_P("D phy.resourcemapped--phy.antennamapped", "len%u::fm%u.sl%u.rnti%u", 1, frame, slot, rel15->rnti);
stop_meas(&gNB->dlsch_resource_mapping_stats); stop_meas(&gNB->dlsch_resource_mapping_stats);
///Layer Precoding and Antenna port mapping ///Layer Precoding and Antenna port mapping
...@@ -477,7 +481,6 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, ...@@ -477,7 +481,6 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
// The Precoding matrix: // The Precoding matrix:
// The Codebook Type I // The Codebook Type I
start_meas(&gNB->dlsch_precoding_stats); start_meas(&gNB->dlsch_precoding_stats);
for (int ap=0; ap<frame_parms->nb_antennas_tx; ap++) { for (int ap=0; ap<frame_parms->nb_antennas_tx; ap++) {
for (int l=rel15->StartSymbolIndex; l<rel15->StartSymbolIndex+rel15->NrOfSymbols; l++) { for (int l=rel15->StartSymbolIndex; l<rel15->StartSymbolIndex+rel15->NrOfSymbols; l++) {
...@@ -562,7 +565,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, ...@@ -562,7 +565,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
} //RB loop } //RB loop
} // symbol loop } // symbol loop
}// port loop }// port loop
LATSEQ_P("D phy.antennamapped--phy.rotated", "len%u::fm%u.sl%u.nbant%u.rnti%u", 1, frame, slot, frame_parms->nb_antennas_tx, rel15->rnti);
stop_meas(&gNB->dlsch_precoding_stats); stop_meas(&gNB->dlsch_precoding_stats);
// TODO: handle precoding // TODO: handle precoding
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include "common/utils/nr/nr_common.h" #include "common/utils/nr/nr_common.h"
#include <syscall.h> #include <syscall.h>
#include <openair2/UTIL/OPT/opt.h> #include <openair2/UTIL/OPT/opt.h>
#include "common/utils/LATSEQ/latseq.h"
//#define DEBUG_DLSCH_CODING //#define DEBUG_DLSCH_CODING
//#define DEBUG_DLSCH_FREE 1 //#define DEBUG_DLSCH_FREE 1
...@@ -329,11 +330,13 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB, ...@@ -329,11 +330,13 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
max_bytes); max_bytes);
memcpy(harq->b, a, (A / 8) + 3); // using 3 bytes to mimic the case of 24 bit crc memcpy(harq->b, a, (A / 8) + 3); // using 3 bytes to mimic the case of 24 bit crc
} }
LATSEQ_P("D phy.crc--phy.cbseg", "len%u::fm%u.sl%u.rnti%u", 1, frame, slot, rel15->rnti);
impp.BG = rel15->maintenance_parms_v3.ldpcBaseGraph; impp.BG = rel15->maintenance_parms_v3.ldpcBaseGraph;
start_meas(dlsch_segmentation_stats); start_meas(dlsch_segmentation_stats);
impp.Kb = nr_segmentation(harq->b, harq->c, harq->B, &impp.n_segments, &impp.K, impp.Zc, &impp.F, impp.BG); impp.Kb = nr_segmentation(harq->b, harq->c, harq->B, &impp.n_segments, &impp.K, impp.Zc, &impp.F, impp.BG);
LATSEQ_P("D phy.cbseg--phy.ldcp", "len%u::fm%u.sl%u.nbseg%u.nbbitscb%u.rnti%u", 1, frame, slot, impp.n_segments, impp.K, rel15->rnti);
stop_meas(dlsch_segmentation_stats); stop_meas(dlsch_segmentation_stats);
if (impp.n_segments>MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER*rel15->nrOfLayers) { if (impp.n_segments>MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER*rel15->nrOfLayers) {
......
...@@ -192,6 +192,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, ...@@ -192,6 +192,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
if (msgTx->num_pdsch_slot > 0) { if (msgTx->num_pdsch_slot > 0) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,1);
LOG_D(PHY, "PDSCH generation started (%d) in frame %d.%d\n", msgTx->num_pdsch_slot,frame,slot); LOG_D(PHY, "PDSCH generation started (%d) in frame %d.%d\n", msgTx->num_pdsch_slot,frame,slot);
LATSEQ_P("D mac.dci--phy.crc", "len%u::fm%u.sl%u", 1, frame, slot);
nr_generate_pdsch(msgTx, frame, slot); nr_generate_pdsch(msgTx, frame, slot);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0);
} }
...@@ -237,6 +238,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, ...@@ -237,6 +238,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX + gNB->CC_id, 0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX + gNB->CC_id, 0);
LATSEQ_P("D phy.rotated--phy.ofdmidft", "len%u::fm%u.sl%u", 1, frame, slot);
} }
static void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) static void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req)
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
/*Softmodem params*/ /*Softmodem params*/
#include "executables/softmodem-common.h" #include "executables/softmodem-common.h"
#include "../../../nfapi/oai_integration/vendor_ext.h" #include "../../../nfapi/oai_integration/vendor_ext.h"
#include "common/utils/LATSEQ/latseq.h"
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
/////* DLSCH MAC PDU generation (6.1.2 TS 38.321) *///// /////* DLSCH MAC PDU generation (6.1.2 TS 38.321) */////
...@@ -1208,6 +1209,7 @@ void nr_schedule_ue_spec(module_id_t module_id, ...@@ -1208,6 +1209,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
pdcch_pdu->DurationSymbols); pdcch_pdu->DurationSymbols);
if (harq->round != 0) { /* retransmission */ if (harq->round != 0) { /* retransmission */
LATSEQ_P("D mac.retx--mac.dci", "len%u::fm%u.sl%u.hqpid%u.hqround%u", TBS, frame, slot, current_harq_pid, harq->round);
/* we do not have to do anything, since we do not require to get data /* we do not have to do anything, since we do not require to get data
* from RLC or encode MAC CEs. The TX_req structure is filled below * from RLC or encode MAC CEs. The TX_req structure is filled below
* or copy data to FAPI structures */ * or copy data to FAPI structures */
...@@ -1294,6 +1296,8 @@ void nr_schedule_ue_spec(module_id_t module_id, ...@@ -1294,6 +1296,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
dlsch_total_bytes += len; dlsch_total_bytes += len;
lcid_bytes += len; lcid_bytes += len;
sdus += 1; sdus += 1;
LATSEQ_P("D mac.hdr--mac.dci", "len%u::RMbuf%u.fm%u.sl%u.hqpid%u.mcs%u.tbsize%u.rnti%u", len, buf-len, frame, slot, current_harq_pid, sched_pdsch->mcs, sched_pdsch->tb_size, rnti);
LATSEQ_P("D mac.hdr--mac.retx", "len%u::RMbuf%u.hqpid%u.mcs%u.tbsize%u.rnti%u", len, buf-len, current_harq_pid, sched_pdsch->mcs, sched_pdsch->tb_size,rnti);
} }
UE->mac_stats.dl.lc_bytes[lcid] += lcid_bytes; UE->mac_stats.dl.lc_bytes[lcid] += lcid_bytes;
......
...@@ -251,6 +251,7 @@ static int nr_pdcp_entity_process_sdu(nr_pdcp_entity_t *entity, ...@@ -251,6 +251,7 @@ static int nr_pdcp_entity_process_sdu(nr_pdcp_entity_t *entity,
entity->security_mode_completed = true; entity->security_mode_completed = true;
} }
LATSEQ_P("D pdcp.hdr--pdcp.enqueue", "len%u::SPbuf%u.sn%u.Pbuf%u", header_size+size+integrity_size, buffer, sn, buf);
entity->tx_next++; entity->tx_next++;
entity->stats.txpdu_pkts++; entity->stats.txpdu_pkts++;
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "NR_CellGroupConfig.h" #include "NR_CellGroupConfig.h"
#include "openair2/RRC/NR/nr_rrc_proto.h" #include "openair2/RRC/NR/nr_rrc_proto.h"
#include <stdint.h> #include <stdint.h>
#include "common/utils/LATSEQ/latseq.h"
/* from OAI */ /* from OAI */
#include "oai_asn1.h" #include "oai_asn1.h"
...@@ -698,6 +699,7 @@ static void deliver_pdu_drb_gnb(void *deliver_pdu_data, ue_id_t ue_id, int rb_id ...@@ -698,6 +699,7 @@ static void deliver_pdu_drb_gnb(void *deliver_pdu_data, ue_id_t ue_id, int rb_id
mem_block_t *memblock = get_free_mem_block(size, __FUNCTION__); mem_block_t *memblock = get_free_mem_block(size, __FUNCTION__);
memcpy(memblock->data, buf, size); memcpy(memblock->data, buf, size);
LOG_D(PDCP, "%s(): (drb %d) calling rlc_data_req size %d\n", __func__, rb_id, size); LOG_D(PDCP, "%s(): (drb %d) calling rlc_data_req size %d\n", __func__, rb_id, size);
LATSEQ_P("D pdcp.enqueue--rlc.buf", "len%u::Pbuf%u.PRbuf%u.ueid%u", size, buf, memblock->data, ue_id);
enqueue_rlc_data_req(&ctxt, 0, MBMS_FLAG_NO, rb_id, sdu_id, 0, size, memblock); enqueue_rlc_data_req(&ctxt, 0, MBMS_FLAG_NO, rb_id, sdu_id, 0, size, memblock);
} }
} }
......
...@@ -1546,6 +1546,7 @@ static int generate_retx_pdu(nr_rlc_entity_am_t *entity, char *buffer, ...@@ -1546,6 +1546,7 @@ static int generate_retx_pdu(nr_rlc_entity_am_t *entity, char *buffer,
int p; int p;
sdu = entity->retransmit_list; sdu = entity->retransmit_list;
LATSEQ_P("D rlc.retx--TODO", "len%u::sn%u.so%u", sdu->size, sdu->sdu->sn, sdu->so);
pdu_header_size = compute_pdu_header_size(entity, sdu); pdu_header_size = compute_pdu_header_size(entity, sdu);
...@@ -1622,6 +1623,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size) ...@@ -1622,6 +1623,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
return 0; return 0;
sdu = entity->tx_list; sdu = entity->tx_list;
LATSEQ_P("D rlc.genpdu--rlc.seg", "len%u::Rbuf%u.sn%u", sdu->size, sdu->sdu, sdu->sdu->sn);
pdu_header_size = compute_pdu_header_size(entity, sdu); pdu_header_size = compute_pdu_header_size(entity, sdu);
...@@ -1641,7 +1643,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size) ...@@ -1641,7 +1643,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
entity->common.bstatus.tx_size -= pdu_size; entity->common.bstatus.tx_size -= pdu_size;
/* assign SN to SDU */ /* assign SN to SDU */
sdu->sdu->sn = entity->tx_next; //sdu->sdu->sn = entity->tx_next;
/* segment if necessary */ /* segment if necessary */
if (pdu_size > size) { if (pdu_size > size) {
...@@ -1660,8 +1662,8 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size) ...@@ -1660,8 +1662,8 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
} }
/* update tx_next if the SDU segment is the last */ /* update tx_next if the SDU segment is the last */
if (sdu->is_last) //if (sdu->is_last)
entity->tx_next = (entity->tx_next + 1) % entity->sn_modulus; // entity->tx_next = (entity->tx_next + 1) % entity->sn_modulus;
/* put SDU/SDU segment in the wait list */ /* put SDU/SDU segment in the wait list */
/* speedup: check end of wait list, probably the new sdu comes after */ /* speedup: check end of wait list, probably the new sdu comes after */
...@@ -1693,6 +1695,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size) ...@@ -1693,6 +1695,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
entity->force_poll = 0; entity->force_poll = 0;
} }
int ret_size = serialize_sdu(entity, sdu, buffer, size, p); int ret_size = serialize_sdu(entity, sdu, buffer, size, p);
LATSEQ_P("D rlc.seg--mac.hdr", "len%u::Rbuf%u.sn%u.so%u.RMbuf%u", ret_size, sdu->sdu, sdu->sdu->sn, sdu->so, buffer);
entity->common.stats.txpdu_pkts++; entity->common.stats.txpdu_pkts++;
entity->common.stats.txpdu_bytes += ret_size; entity->common.stats.txpdu_bytes += ret_size;
...@@ -1774,10 +1777,12 @@ void nr_rlc_entity_am_recv_sdu(nr_rlc_entity_t *_entity, ...@@ -1774,10 +1777,12 @@ void nr_rlc_entity_am_recv_sdu(nr_rlc_entity_t *_entity,
entity->sdu_rejected); entity->sdu_rejected);
entity->sdu_rejected = 0; entity->sdu_rejected = 0;
entity->t_log_buffer_full = entity->t_current; entity->t_log_buffer_full = entity->t_current;
LATSEQ_P("D rlc.sdu--rlc.rejected1", "len%u::PRbuf%u", size, buffer);
} }
if (entity->tx_size + size > entity->tx_maxsize) { if (entity->tx_size + size > entity->tx_maxsize) {
entity->sdu_rejected++; entity->sdu_rejected++;
LATSEQ_P("D rlc.sdu--rlc.rejected2", "len%u::PRbuf%u", size, buffer);
return; return;
} }
...@@ -1786,6 +1791,9 @@ void nr_rlc_entity_am_recv_sdu(nr_rlc_entity_t *_entity, ...@@ -1786,6 +1791,9 @@ void nr_rlc_entity_am_recv_sdu(nr_rlc_entity_t *_entity,
entity->common.stats.rxsdu_bytes += size; entity->common.stats.rxsdu_bytes += size;
sdu = nr_rlc_new_sdu(buffer, size, sdu_id); sdu = nr_rlc_new_sdu(buffer, size, sdu_id);
sdu->sdu->sn = entity->tx_next;
entity->tx_next = (entity->tx_next + 1) % entity->sn_modulus;
LATSEQ_P("D rlc.buf--rlc.genpdu", "len%u::PRbuf%u.Rbuf%u.sn%u", size, buffer, sdu->sdu, sdu->sdu->sn);
LOG_D(RLC, "Created new RLC SDU and append it to the RLC list \n"); LOG_D(RLC, "Created new RLC SDU and append it to the RLC list \n");
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h> #include <openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h>
#include <openair3/ocp-gtpu/gtp_itf.h> #include <openair3/ocp-gtpu/gtp_itf.h>
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h" #include "openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h"
#include "common/utils/LATSEQ/latseq.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
...@@ -70,6 +71,7 @@ static bool nr_sdap_tx_entity(nr_sdap_entity_t *entity, ...@@ -70,6 +71,7 @@ static bool nr_sdap_tx_entity(nr_sdap_entity_t *entity,
const uint32_t *destinationL2Id, const uint32_t *destinationL2Id,
const uint8_t qfi, const uint8_t qfi,
const bool rqi) { const bool rqi) {
LATSEQ_P("D sdap.pdu--pdcp.hdr", "len%u::SPbuf%u.ueid%u", sdu_buffer_size, sdu_buffer, entity->ue_id);
/* The offset of the SDAP header, it might be 0 if has_sdap_tx is not true in the pdcp entity. */ /* The offset of the SDAP header, it might be 0 if has_sdap_tx is not true in the pdcp entity. */
int offset=0; int offset=0;
bool ret = false; bool ret = false;
......
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