diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index b5ada482ea..38033b2005 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -94,7 +94,7 @@ int8_t nr_ue_scheduled_response_stub(nr_scheduled_response_t *scheduled_response rx_ind->pdu_list[j].ul_cqi = scheduled_response->tx_request->tx_config.ul_cqi; char buffer[1024]; hexdump(rx_ind->pdu_list[j].pdu, rx_ind->pdu_list[j].pdu_length, buffer, sizeof(buffer)); - LOG_I(MAC, "Melissa Elkadi, this is hexdump of pdu %s before queuing rx_ind\n", + LOG_D(MAC, "Melissa Elkadi, this is hexdump of pdu %s before queuing rx_ind\n", buffer); } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index c3247438d2..2efd567e48 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -1841,7 +1841,10 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, buflen_remain-MAX_RLC_SDU_SUBHEADER_SIZE, (char *)&ulsch_sdus[sdu_length_total],0, 0); - + char buffer[1024]; + hexdump((char *)&ulsch_sdus[sdu_length_total], buflen_remain, buffer, sizeof(buffer)); + LOG_I(MAC, "Melissa Elkadi, this is hexdump of pdu %s right after receving in MAC layer\n", + buffer); AssertFatal(buflen_remain >= sdu_lengths[num_sdus], "LCID=%d RLC has segmented %d bytes but MAC has max=%d\n", lcid, sdu_lengths[num_sdus], buflen_remain); @@ -1868,8 +1871,9 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, buflen - (total_rlc_pdu_header_len + sdu_length_total + MAX_RLC_SDU_SUBHEADER_SIZE); } char buffer[1024]; - hexdump(&ulsch_sdus[sdu_length_total], lcid_buffer_occupancy_new, buffer, sizeof(buffer)); - LOG_I(MAC, "Melissa Elkadi, this is hexdump of pdu %s \n", buffer); + hexdump(&ulsch_sdus[sdu_length_total], buflen_remain, buffer, sizeof(buffer)); + LOG_I(MAC, "Melissa Elkadi, total_rlc_pdu_header_len %d and this is hexdump of pdu %s \n", + total_rlc_pdu_header_len, buffer); } } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 18c816b050..89efb1db1c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -283,7 +283,7 @@ void nr_process_mac_pdu( 1, NULL); char buf[1024]; - hexdump((char *) (pdu_ptr + mac_subheader_len), mac_sdu_len, buff, sizeof(buf)); + hexdump((char *) (pdu_ptr + mac_subheader_len), mac_sdu_len, buf, sizeof(buf)); LOG_I(MAC, "Melissa Elkadi, after passing to rlc this is hexdump of pdu %s \n", buf); /* Updated estimated buffer when receiving data */ if (sched_ctrl->estimated_ul_buffer >= mac_sdu_len) diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.c index d3c8f6908c..5f20215fa7 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity_drb_am.c @@ -58,6 +58,10 @@ void nr_pdcp_entity_drb_am_recv_sdu(nr_pdcp_entity_t *_entity, char *buffer, int nr_pdcp_entity_drb_am_t *entity = (nr_pdcp_entity_drb_am_t *)_entity; int sn; char buf[size+3]; + char buf_mel[1024]; + hexdump(buffer, size, buf_mel, sizeof(buf_mel)); + LOG_I(PDCP, "Melissa Elkadi in %s, this is hexdump of pdu %s recevied in PDCP layer directly\n", + __FUNCTION__, buf_mel); sn = entity->common.next_nr_pdcp_tx_sn; @@ -71,6 +75,10 @@ void nr_pdcp_entity_drb_am_recv_sdu(nr_pdcp_entity_t *_entity, char *buffer, int buf[1] = (sn >> 8) & 0xff; buf[2] = sn & 0xff; memcpy(buf+3, buffer, size); + char buf_melissa[1024]; + hexdump(buf+3, size, buf_melissa, sizeof(buf_melissa)); + LOG_I(PDCP, "Melissa Elkadi in %s, this is hexdump of pdu %s copied into buf+3 in PDCP. And this is the sdu_id %d\n", + __FUNCTION__, buf_melissa, sdu_id); if (entity->common.has_ciphering) entity->common.cipher(entity->common.security_context, (unsigned char *)buf+3, size, @@ -78,6 +86,10 @@ void nr_pdcp_entity_drb_am_recv_sdu(nr_pdcp_entity_t *_entity, char *buffer, int entity->common.deliver_pdu(entity->common.deliver_pdu_data, (nr_pdcp_entity_t *)entity, buf, size+3, sdu_id); + char buf_meli[1024]; + hexdump(buf, size + 3, buf_meli, sizeof(buf_meli)); + LOG_I(PDCP, "Melissa Elkadi in %s, this is hexdump of pdu %s After delivering to RLC\n", + __FUNCTION__, buf_meli); } void nr_pdcp_entity_drb_am_set_integrity_key(nr_pdcp_entity_t *_entity, char *key) diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 912d5a8f49..40c0aa0054 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -265,6 +265,9 @@ static void *ue_tun_read_thread(void *_) } LOG_D(PDCP, "%s(): nas_sock_fd read returns len %d\n", __func__, len); + char buffer[1024]; + hexdump(rx_buf, len, buffer, sizeof(buffer)); + LOG_I(MAC, "Melissa Elkadi, this is hexdump of pdu %s from tunnel interface\n", buffer); nr_pdcp_manager_lock(nr_pdcp_ue_manager); rnti = nr_pdcp_get_first_rnti(nr_pdcp_ue_manager); @@ -940,7 +943,10 @@ static boolean_t pdcp_data_req_drb( __FILE__, __LINE__, __FUNCTION__, rnti, rb_id); return 0; } - + char buffer[1024]; + hexdump((char *)sdu_buffer, sdu_buffer_size, buffer, sizeof(buffer)); + LOG_I(PDCP, "Melissa Elkadi in %s, this is hexdump of pdu %s from tunnel interface in PDCP layer\n", + __FUNCTION__, buffer); rb->recv_sdu(rb, (char *)sdu_buffer, sdu_buffer_size, muiP); nr_pdcp_manager_unlock(nr_pdcp_ue_manager); diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c b/openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c index 2dee3c193c..5fa5ed35c3 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c @@ -552,7 +552,10 @@ void nr_rlc_entity_am_recv_pdu(nr_rlc_entity_t *_entity, int control_e2; int control_e3; unsigned char sn_set[32768]; /* used to dec retx_count only once per sdu */ - + char buf_3[1024]; + hexdump(buffer, size, buf_3, sizeof(buf_3)); + LOG_I(MAC, "Melissa Elkadi, %s in %s():%d\n", + buf_3, __FUNCTION__, __LINE__); nr_rlc_pdu_decoder_init(&decoder, buffer, size); dc = nr_rlc_pdu_decoder_get_bits(&decoder, 1); R(decoder); LOG_I(RLC, "Melissa Elkadi, we are here %s(): %d. dc = %d\n", __FUNCTION__, __LINE__, dc); @@ -815,9 +818,20 @@ static int serialize_sdu(nr_rlc_entity_am_t *entity, nr_rlc_pdu_encoder_put_bits(&encoder, 1, 1); /* D/C: 1 = data */ nr_rlc_pdu_encoder_put_bits(&encoder, 0, 1); /* P: reserve, set later */ - + char buf_1[1024]; + hexdump(sdu->sdu->data, sdu->size, buf_1, sizeof(buf_1)); + LOG_I(MAC, "Melissa Elkadi, %s in %s():%d\n", + buf_1, __FUNCTION__, __LINE__); nr_rlc_pdu_encoder_put_bits(&encoder, 1-sdu->is_first,1);/* 1st bit of SI */ + char buf_2[1024]; + hexdump(sdu->sdu->data, sdu->size, buf_2, sizeof(buf_2)); + LOG_I(MAC, "Melissa Elkadi, %s in %s():%d\n", + buf_2, __FUNCTION__, __LINE__); nr_rlc_pdu_encoder_put_bits(&encoder, 1-sdu->is_last,1); /* 2nd bit of SI */ + char buf_3[1024]; + hexdump(sdu->sdu->data, sdu->size, buf_3, sizeof(buf_3)); + LOG_I(MAC, "Melissa Elkadi, %s in %s():%d\n", + buf_3, __FUNCTION__, __LINE__); if (entity->sn_field_length == 18) nr_rlc_pdu_encoder_put_bits(&encoder, 0, 2); /* R */ @@ -833,7 +847,10 @@ static int serialize_sdu(nr_rlc_entity_am_t *entity, if (p) include_poll(entity, buffer); - + char buf[1024]; + hexdump(buffer + encoder.byte, sdu->size, buf, sizeof(buf)); + LOG_I(MAC, "Melissa Elkadi, this is hexdump of pdu %s right after calling generate_pdu in %s\n", + buf, __FUNCTION__); return encoder.byte + sdu->size; } @@ -1557,19 +1574,25 @@ int nr_rlc_entity_am_generate_pdu(nr_rlc_entity_t *_entity, { nr_rlc_entity_am_t *entity = (nr_rlc_entity_am_t *)_entity; int ret; + LOG_I(MAC, "Melissa Elkadi, in %s(): %d\n", __FUNCTION__, __LINE__); if (status_to_report(entity)) { + LOG_I(MAC, "Melissa Elkadi, in %s(): %d\n", __FUNCTION__, __LINE__); ret = generate_status(entity, buffer, size); if (ret != 0) return ret; } if (entity->retransmit_list != NULL) { + LOG_I(MAC, "Melissa Elkadi, in %s(): %d\n", __FUNCTION__, __LINE__); ret = generate_retx_pdu(entity, buffer, size); if (ret != 0) return ret; } - + char buf[1024]; + hexdump(buffer, size, buf, sizeof(buf)); + LOG_I(MAC, "Melissa Elkadi, this is hexdump of pdu %s right before calling generate_pdu in %s\n", + buf, __FUNCTION__); return generate_tx_pdu(entity, buffer, size); } diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_entity_tm.c b/openair2/LAYER2/nr_rlc/nr_rlc_entity_tm.c index 86a0697624..1bd404da77 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_entity_tm.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_entity_tm.c @@ -104,6 +104,7 @@ int nr_rlc_entity_tm_generate_pdu(nr_rlc_entity_t *_entity, char *buffer, int size) { nr_rlc_entity_tm_t *entity = (nr_rlc_entity_tm_t *)_entity; + LOG_I(MAC, "Melissa Elkadi, in %s(): %d\n", __FUNCTION__, __LINE__); return generate_tx_pdu(entity, buffer, size); } diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c b/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c index 4ef952667d..463e67bb37 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c @@ -353,9 +353,20 @@ static int serialize_sdu(nr_rlc_entity_um_t *entity, /* generate header */ nr_rlc_pdu_encoder_init(&encoder, buffer, bufsize); + char buf_1[1024]; + hexdump(sdu->sdu->data, sdu->size, buf_1, sizeof(buf_1)); + LOG_I(MAC, "Melissa Elkadi, %s in %s():%d\n", + buf_1, __FUNCTION__, __LINE__); nr_rlc_pdu_encoder_put_bits(&encoder, 1-sdu->is_first,1);/* 1st bit of SI */ + char buf_2[1024]; + hexdump(sdu->sdu->data, sdu->size, buf_2, sizeof(buf_2)); + LOG_I(MAC, "Melissa Elkadi, %s in %s():%d\n", + buf_2, __FUNCTION__, __LINE__); nr_rlc_pdu_encoder_put_bits(&encoder, 1-sdu->is_last,1); /* 2nd bit of SI */ - + char buf_3[1024]; + hexdump(sdu->sdu->data, sdu->size, buf_3, sizeof(buf_3)); + LOG_I(MAC, "Melissa Elkadi, %s in %s():%d\n", + buf_3, __FUNCTION__, __LINE__); /* SN, if required */ if (sdu->is_first == 1 && sdu->is_last == 1) { nr_rlc_pdu_encoder_put_bits(&encoder, 0, 6); /* R */ @@ -369,9 +380,23 @@ static int serialize_sdu(nr_rlc_entity_um_t *entity, if (!sdu->is_first) nr_rlc_pdu_encoder_put_bits(&encoder, sdu->so, 16); /* SO */ + char buf_sdu[1024]; + hexdump(sdu->sdu->data, sdu->size, buf_sdu, sizeof(buf_sdu)); + LOG_I(MAC, "Melissa Elkadi, this is hexdump of sdu->data %s in %s\n", + buf_sdu, __FUNCTION__); + /* data */ memcpy(buffer + encoder.byte, sdu->sdu->data + sdu->so, sdu->size); + char buf_5[1024]; + hexdump(buffer, sdu->size, buf_5, sizeof(buf_5)); + LOG_I(MAC, "Melissa Elkadi, this is hexdump of pdu %s right after memcpy of just buffer %s\n", + buf_5, __FUNCTION__); + + char buf[1024]; + hexdump(buffer + encoder.byte, sdu->size, buf, sizeof(buf)); + LOG_I(MAC, "Melissa Elkadi, this is hexdump of pdu %s right after memcpy sdu into buffer in %s\n", + buf, __FUNCTION__); return encoder.byte + sdu->size; } @@ -479,9 +504,15 @@ static int generate_tx_pdu(nr_rlc_entity_um_t *entity, char *buffer, int size) /* update tx_next if the SDU is an SDU segment and is the last */ if (!sdu->is_first && sdu->is_last) entity->tx_next = (entity->tx_next + 1) % entity->sn_modulus; - + char buf[1024]; + hexdump(buffer, sdu->size, buf, sizeof(buf)); + LOG_I(MAC, "Melissa Elkadi, this is hexdump of pdu %s right before calling serialize_sdu in %s\n", + buf, __FUNCTION__); ret = serialize_sdu(entity, sdu, buffer, size); - + char buf_1[1024]; + hexdump(buffer, size, buf_1, sizeof(buf_1)); + LOG_I(MAC, "Melissa Elkadi, this is hexdump of pdu %s right after calling serialize_sdu in %s\n", + buf_1, __FUNCTION__); entity->tx_size -= sdu->size; nr_rlc_free_sdu_segment(sdu); @@ -523,6 +554,7 @@ int nr_rlc_entity_um_generate_pdu(nr_rlc_entity_t *_entity, char *buffer, int size) { nr_rlc_entity_um_t *entity = (nr_rlc_entity_um_t *)_entity; + LOG_I(MAC, "Melissa Elkadi, in %s(): %d\n", __FUNCTION__, __LINE__); return generate_tx_pdu(entity, buffer, size); } diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c index 111d952cc7..5875e66e94 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c @@ -197,6 +197,10 @@ tbs_size_t mac_rlc_data_req( rb->set_time(rb, nr_rlc_current_time); maxsize = tb_sizeP; ret = rb->generate_pdu(rb, buffer_pP, maxsize); + char buffer[1024]; + hexdump(buffer_pP, ret, buffer, sizeof(buffer)); + LOG_I(MAC, "Melissa Elkadi, this is hexdump of pdu %s right after calling generate_pdu in %s\n", + buffer, __FUNCTION__); } else { LOG_E(RLC, "%s:%d:%s: fatal: data req for unknown RB, channel_idP: %d\n", __FILE__, __LINE__, __FUNCTION__, channel_idP); exit(1);