add UE wireshark trace
This commit is contained in:
@@ -607,7 +607,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
|
||||
uint16_t number_pdus = 1;
|
||||
|
||||
nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, gNB_id);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SSB, gNB_id, ue, NULL, NULL, number_pdus);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SSB, gNB_id, ue, NULL, NULL, number_pdus, proc);
|
||||
|
||||
if (ue->if_inst && ue->if_inst->dl_indication)
|
||||
ue->if_inst->dl_indication(&dl_indication, NULL);
|
||||
|
||||
@@ -257,7 +257,6 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
Ilbrm = 0;
|
||||
Tbslbrm = 950984; //max tbs
|
||||
Coderate = 0.0;
|
||||
trace_NRpdu(DIRECTION_UPLINK, harq_process->a, harq_process->pusch_pdu.pusch_data.tb_size, 0, WS_C_RNTI, 0, 0, 0,0, 0);
|
||||
///////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
|
||||
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
|
||||
#include <openair2/UTIL/OPT/opt.h>
|
||||
|
||||
//#define DEBUG_PUSCH_MAPPING
|
||||
//#define DEBUG_MAC_PDU
|
||||
@@ -158,7 +159,10 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
unsigned int G = nr_get_G(nb_rb, number_of_symbols,
|
||||
nb_dmrs_re_per_rb, number_dmrs_symbols, mod_order, Nl);
|
||||
|
||||
|
||||
trace_NRpdu(DIRECTION_UPLINK,
|
||||
ulsch_ue->harq_processes[harq_pid]->a,
|
||||
ulsch_ue->harq_processes[harq_pid]->pusch_pdu.pusch_data.tb_size,
|
||||
0, WS_C_RNTI, rnti, frame, slot, 0, 0);
|
||||
nr_ulsch_encoding(ulsch_ue, frame_parms, harq_pid, G);
|
||||
|
||||
///////////
|
||||
|
||||
@@ -418,7 +418,8 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
NR_UE_DLSCH_t *dlsch0,
|
||||
NR_UE_DLSCH_t *dlsch1,
|
||||
uint16_t n_pdus);
|
||||
uint16_t n_pdus,
|
||||
UE_nr_rxtx_proc_t *proc);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -123,7 +123,8 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
NR_UE_DLSCH_t *dlsch0,
|
||||
NR_UE_DLSCH_t *dlsch1,
|
||||
uint16_t n_pdus){
|
||||
uint16_t n_pdus,
|
||||
UE_nr_rxtx_proc_t *proc ){
|
||||
|
||||
|
||||
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
@@ -132,6 +133,16 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
|
||||
LOG_E(PHY, "In %s: multiple number of DL PDUs not supported yet...\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
if (pdu_type != FAPI_NR_RX_PDU_TYPE_SSB)
|
||||
trace_NRpdu(DIRECTION_DOWNLINK,
|
||||
dlsch0->harq_processes[dlsch0->current_harq_pid]->b,
|
||||
dlsch0->harq_processes[dlsch0->current_harq_pid]->TBS / 8,
|
||||
pdu_type,
|
||||
WS_C_RNTI,
|
||||
dlsch0->rnti,
|
||||
proc->frame_rx,
|
||||
proc->nr_slot_rx,
|
||||
0,0);
|
||||
switch (pdu_type){
|
||||
case FAPI_NR_RX_PDU_TYPE_SIB:
|
||||
rx_ind->rx_indication_body[n_pdus - 1].pdsch_pdu.harq_pid = dlsch0->current_harq_pid;
|
||||
@@ -1035,16 +1046,16 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
switch (pdsch) {
|
||||
case RA_PDSCH:
|
||||
nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, gNB_id);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_RAR, gNB_id, ue, dlsch0, NULL, number_pdus);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_RAR, gNB_id, ue, dlsch0, NULL, number_pdus, proc);
|
||||
ue->UE_mode[gNB_id] = RA_RESPONSE;
|
||||
break;
|
||||
case PDSCH:
|
||||
nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, gNB_id);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_DLSCH, gNB_id, ue, dlsch0, NULL, number_pdus);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_DLSCH, gNB_id, ue, dlsch0, NULL, number_pdus, proc);
|
||||
break;
|
||||
case SI_PDSCH:
|
||||
nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, gNB_id);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SIB, gNB_id, ue, dlsch0, NULL, number_pdus);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SIB, gNB_id, ue, dlsch0, NULL, number_pdus, proc);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -28,4 +28,5 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
NR_UE_DLSCH_t *dlsch0,
|
||||
NR_UE_DLSCH_t *dlsch1,
|
||||
uint16_t n_pdus) {}
|
||||
uint16_t n_pdus,
|
||||
UE_nr_rxtx_proc_t *proc) {}
|
||||
|
||||
@@ -576,20 +576,20 @@ void nr_rlc_entity_am_recv_pdu(nr_rlc_entity_t *_entity,
|
||||
|
||||
/* dicard PDU if no data */
|
||||
if (data_size <= 0) {
|
||||
LOG_D(RLC, "%s:%d:%s: warning: discard PDU, no data\n",
|
||||
LOG_W(RLC, "%s:%d:%s: warning: discard PDU, no data\n",
|
||||
__FILE__, __LINE__, __FUNCTION__);
|
||||
goto discard;
|
||||
}
|
||||
|
||||
/* dicard PDU if rx buffer is full */
|
||||
if (entity->rx_size + data_size > entity->rx_maxsize) {
|
||||
LOG_D(RLC, "%s:%d:%s: warning: discard PDU, RX buffer full\n",
|
||||
LOG_W(RLC, "%s:%d:%s: warning: discard PDU, RX buffer full\n",
|
||||
__FILE__, __LINE__, __FUNCTION__);
|
||||
goto discard;
|
||||
}
|
||||
|
||||
if (!sn_in_recv_window(entity, sn)) {
|
||||
LOG_D(RLC, "%s:%d:%s: warning: discard PDU, sn out of window (sn %d rx_next %d)\n",
|
||||
LOG_W(RLC, "%s:%d:%s: warning: discard PDU, sn out of window (sn %d rx_next %d)\n",
|
||||
__FILE__, __LINE__, __FUNCTION__,
|
||||
sn, entity->rx_next);
|
||||
goto discard;
|
||||
@@ -597,7 +597,7 @@ void nr_rlc_entity_am_recv_pdu(nr_rlc_entity_t *_entity,
|
||||
|
||||
/* discard segment if all the bytes of the segment are already there */
|
||||
if (segment_already_received(entity, sn, so, data_size)) {
|
||||
LOG_D(RLC, "%s:%d:%s: warning: discard PDU, already received\n",
|
||||
LOG_W(RLC, "%s:%d:%s: warning: discard PDU, already received\n",
|
||||
__FILE__, __LINE__, __FUNCTION__);
|
||||
goto discard;
|
||||
}
|
||||
@@ -623,7 +623,7 @@ void nr_rlc_entity_am_recv_pdu(nr_rlc_entity_t *_entity,
|
||||
entity->status_triggered = 1;
|
||||
if (!(sn_compare_rx(entity, sn, entity->rx_highest_status) < 0 ||
|
||||
sn_compare_rx(entity, sn, v) >= 0)) {
|
||||
LOG_D(RLC, "%s:%d:%s: warning: STATUS trigger should be delayed, according to specs\n",
|
||||
LOG_W(RLC, "%s:%d:%s: warning: STATUS trigger should be delayed, according to specs\n",
|
||||
__FILE__, __LINE__, __FUNCTION__);
|
||||
}
|
||||
}
|
||||
@@ -633,7 +633,7 @@ void nr_rlc_entity_am_recv_pdu(nr_rlc_entity_t *_entity,
|
||||
control:
|
||||
cpt = nr_rlc_pdu_decoder_get_bits(&decoder, 3); R(decoder);
|
||||
if (cpt != 0) {
|
||||
LOG_D(RLC, "%s:%d:%s: warning: discard PDU, CPT not 0 (%d)\n",
|
||||
LOG_W(RLC, "%s:%d:%s: warning: discard PDU, CPT not 0 (%d)\n",
|
||||
__FILE__, __LINE__, __FUNCTION__, cpt);
|
||||
goto discard;
|
||||
}
|
||||
@@ -1644,7 +1644,7 @@ static void check_t_poll_retransmit(nr_rlc_entity_am_t *entity)
|
||||
*/
|
||||
entity->force_poll = 1;
|
||||
|
||||
LOG_D(RLC, "%s:%d:%s: warning: t_poll_retransmit expired\n",
|
||||
LOG_W(RLC, "%s:%d:%s: warning: t_poll_retransmit expired\n",
|
||||
__FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
/* do we meet conditions of 38.322 5.3.3.4? */
|
||||
|
||||
@@ -299,21 +299,21 @@ void nr_rlc_entity_um_recv_pdu(nr_rlc_entity_t *_entity,
|
||||
|
||||
/* dicard PDU if no data */
|
||||
if (data_size <= 0) {
|
||||
LOG_D(RLC, "%s:%d:%s: warning: discard PDU, no data\n",
|
||||
LOG_W(RLC, "%s:%d:%s: warning: discard PDU, no data\n",
|
||||
__FILE__, __LINE__, __FUNCTION__);
|
||||
goto discard;
|
||||
}
|
||||
|
||||
/* dicard PDU if rx buffer is full */
|
||||
if (entity->rx_size + data_size > entity->rx_maxsize) {
|
||||
LOG_D(RLC, "%s:%d:%s: warning: discard PDU, RX buffer full\n",
|
||||
LOG_W(RLC, "%s:%d:%s: warning: discard PDU, RX buffer full\n",
|
||||
__FILE__, __LINE__, __FUNCTION__);
|
||||
goto discard;
|
||||
}
|
||||
|
||||
/* discard PDU if sn < rx_next_reassembly */
|
||||
if (sn_compare_rx(entity, sn, entity->rx_next_reassembly) < 0) {
|
||||
LOG_D(RLC, "%s:%d:%s: warning: discard PDU, SN (%d) < rx_next_reassembly (%d)\n",
|
||||
LOG_W(RLC, "%s:%d:%s: warning: discard PDU, SN (%d) < rx_next_reassembly (%d)\n",
|
||||
__FILE__, __LINE__, __FUNCTION__,
|
||||
sn, entity->rx_next_reassembly);
|
||||
goto discard;
|
||||
@@ -545,7 +545,7 @@ void nr_rlc_entity_um_recv_sdu(nr_rlc_entity_t *_entity,
|
||||
}
|
||||
|
||||
if (entity->tx_size + size > entity->tx_maxsize) {
|
||||
LOG_D(RLC, "%s:%d:%s: warning: SDU rejected, SDU buffer full\n",
|
||||
LOG_W(RLC, "%s:%d:%s: warning: SDU rejected, SDU buffer full\n",
|
||||
__FILE__, __LINE__, __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3054,7 +3054,7 @@ static int rrc_process_DU_DL(MessageDef *msg_p, const char *msg_name, instance_
|
||||
}
|
||||
} else if (req->srb_id == 2) {
|
||||
// TODO
|
||||
abort();
|
||||
//abort();
|
||||
}
|
||||
|
||||
LOG_I(F1AP, "Received DL RRC Transfer on srb_id %ld\n", req->srb_id);
|
||||
|
||||
Reference in New Issue
Block a user