Commit a137a266 authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'l1-sidelink' of https://gitlab.eurecom.fr/matzakos/LTE-D2D into l1-sidelink

parents a4eb4fe0 529b717d
......@@ -867,18 +867,21 @@ void ue_send_sl_sdu(module_id_t module_idP,
for (j = 0; j< MAX_NUM_LCID; j++){
if ((longh->LCID < MAX_NUM_LCID_DATA) && (j < MAX_NUM_LCID_DATA)){
if ((UE_mac_inst[module_idP].sl_info[j].destinationL2Id == sourceL2Id) && (UE_mac_inst[module_idP].sl_info[j].sourceL2Id == destinationL2Id)) {
lcid = UE_mac_inst[module_idP].sl_info[j].LCID;
lcid = longh->LCID; //UE_mac_inst[module_idP].sl_info[j].LCID;
break;
}
}
if ((longh->LCID >= MAX_NUM_LCID_DATA) && (j >= MAX_NUM_LCID_DATA)){
//PC5-S (receive message after transmitting, e.g, security-command...)
if ((UE_mac_inst[module_idP].sl_info[j].sourceL2Id == destinationL2Id) && (UE_mac_inst[module_idP].sl_info[j].destinationL2Id == 0)) {
if (UE_mac_inst[module_idP].sl_info[j].LCID > 0) lcid = UE_mac_inst[module_idP].sl_info[j].LCID;
if (UE_mac_inst[module_idP].sl_info[j].LCID > 0) lcid = longh->LCID;//UE_mac_inst[module_idP].sl_info[j].LCID;
break;
}
}
}
/*
int k = 0;
if (j == MAX_NUM_LCID) {
......@@ -892,7 +895,6 @@ void ue_send_sl_sdu(module_id_t module_idP,
}
}
*/
//match the destinationL2Id with UE L2Id or groupL2ID
if (!(((destinationL2Id == UE_mac_inst[module_idP].sourceL2Id) && (j < MAX_NUM_LCID)) | ((destinationL2Id == UE_mac_inst[module_idP].sourceL2Id) && (longh->LCID >= MAX_NUM_LCID_DATA)) | (i < MAX_NUM_LCID))){
......@@ -905,7 +907,10 @@ void ue_send_sl_sdu(module_id_t module_idP,
return;
}
LOG_I( MAC, "DestinationL2Id: 0x%08x, sl_rbid %d, longh->LCID %d \n", destinationL2Id, lcid, longh->LCID );
*/
lcid = longh->LCID;
// LOG_I( MAC, "DestinationL2Id: 0x%08x, sl_rbid %d, longh->LCID %d \n", destinationL2Id, lcid, longh->LCID );
if (longh->F==1) {
......@@ -930,11 +935,13 @@ void ue_send_sl_sdu(module_id_t module_idP,
}
}
if (reset_flag == SL_RESET_RLC_FLAG_YES){
LOG_I(MAC, "SL_RESET_RLC_FLAG_YES\n");
LOG_D(MAC, "SL_RESET_RLC_FLAG_YES\n");
} else {
LOG_I(MAC, "SL_RESET_RLC_FLAG_NO\n");
LOG_D(MAC, "SL_RESET_RLC_FLAG_NO\n");
}
LOG_D(MAC,"%d.%d sending sdu of size %d, lcid %d to RLC\n",frameP,subframeP,rlc_sdu_len,lcid);
mac_rlc_data_ind(
module_idP,
0x1234,
......
......@@ -30,7 +30,7 @@
*/
#define PDCP_FIFO_C
#define PDCP_DEBUG 1
//#define PDCP_DEBUG 1
//#define DEBUG_PDCP_FIFO_FLUSH_SDU
extern int otg_enabled;
......@@ -189,7 +189,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
#endif /* defined(ENABLE_USE_MME) */
#ifdef PDCP_DEBUG
LOG_D(PDCP, "PDCP->IP TTI %d INST %d: Preparing %d Bytes of data from rab %d to Nas_mesh\n",
LOG_I(PDCP, "PDCP->IP TTI %d INST %d: Preparing %d Bytes of data from rab %d to Nas_mesh\n",
ctxt_pP->frame, ((pdcp_data_ind_header_t *)(sdu_p->data))->inst,
((pdcp_data_ind_header_t *)(sdu_p->data))->data_size, ((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id);
#endif //PDCP_DEBUG
......@@ -250,7 +250,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
#endif //PDCP_USE_RT_FIFO
#ifdef PDCP_DEBUG
LOG_D(PDCP, "Frame %d Sent %d Bytes of header to Nas_mesh\n",
LOG_I(PDCP, "Frame %d Sent %d Bytes of header to Nas_mesh\n",
ctxt_pP->frame,
bytes_wrote);
#endif //PDCP_DEBUG
......@@ -307,7 +307,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
#endif // PDCP_USE_RT_FIFO
#ifdef PDCP_DEBUG
LOG_D(PDCP, "PDCP->IP Frame %d INST %d: Sent %d Bytes of data from rab %d to higher layers\n",
LOG_I(PDCP, "PDCP->IP Frame %d INST %d: Sent %d Bytes of data from rab %d to higher layers\n",
ctxt_pP->frame,
((pdcp_data_ind_header_t *)(sdu_p->data))->inst,
bytes_wrote,
......@@ -338,6 +338,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
}
} else {
LOG_W(PDCP, "2: RADIO->IP SEND SDU CONGESTION!\n");
AssertFatal(1==0,"congestion, aborting\n");
}
} else {
LOG_W(PDCP, "3: RADIO->IP SEND SDU CONGESTION!\n");
......
......@@ -205,7 +205,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
// establishment, the RLC entity:
// - is created; and
// - enters the DATA_TRANSFER_READY state.
LOG_N(RLC, PROTOCOL_RLC_UM_CTXT_FMT" ERROR MAC_DATA_IND IN RLC_NULL_STATE\n",
LOG_W(RLC, PROTOCOL_RLC_UM_CTXT_FMT" ERROR MAC_DATA_IND IN RLC_NULL_STATE\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,l_rlc_p));
#if MESSAGE_CHART_GENERATOR
......@@ -396,7 +396,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
sn = pdu_mem_pP->b1 & 0x1F;
}
LOG_I(RLC, "[rlc_um_rx]DEBUG SN %d, rlc_pP->vr_uh %d rlc_pP->vr_ur %d, l_rlc_p->vr_ux %d \n", sn, l_rlc_p->vr_uh, l_rlc_p->vr_ur, l_rlc_p->vr_ux);
LOG_D(RLC, "[rlc_um_rx]DEBUG SN %d, rlc_pP->vr_uh %d rlc_pP->vr_ur %d, l_rlc_p->vr_ux %d \n", sn, l_rlc_p->vr_uh, l_rlc_p->vr_ur, l_rlc_p->vr_ux);
l_rlc_p->vr_ur = sn;
l_rlc_p->vr_uh = sn;
......@@ -821,7 +821,7 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t
}
message_string_size += sprintf(&message_string[message_string_size], " |\n");
/*
# if ENABLE_ITTI
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_SDU_REQ, message_string_size + sizeof (IttiMsgText));
msg_p->ittiMsg.rlc_um_sdu_req.size = message_string_size;
......@@ -831,6 +831,7 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t
#else
LOG_T(RLC, "%s", message_string);
#endif
*/
# endif
RLC_UM_MUTEX_LOCK(&rlc_p->lock_input_sdus, ctxt_pP, rlc_p);
rlc_p->buffer_occupancy += ((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_size;
......
......@@ -1007,7 +1007,7 @@ rlc_um_receive_process_dar (
}
LOG_I(RLC, "DEBUG SN %d, rlc_pP->vr_uh %d rlc_pP->vr_ur %d \n", sn, rlc_pP->vr_uh, rlc_pP->vr_ur);
LOG_D(RLC, "DEBUG SN %d, rlc_pP->vr_uh %d rlc_pP->vr_ur %d \n", sn, rlc_pP->vr_uh, rlc_pP->vr_ur);
RLC_UM_MUTEX_LOCK(&rlc_pP->lock_dar_buffer, ctxt_pP, rlc_pP);
in_window = rlc_um_in_window(ctxt_pP, rlc_pP, rlc_pP->vr_uh - rlc_pP->rx_um_window_size, sn, rlc_pP->vr_ur);
......
......@@ -37,7 +37,7 @@
#include "assertions.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
//#define DEBUG_MAC_INTERFACE 1
#define DEBUG_MAC_INTERFACE 1
//-----------------------------------------------------------------------------
struct mac_data_ind mac_rlc_deserialize_tb (
......@@ -253,12 +253,13 @@ void mac_rlc_data_ind (
#ifdef DEBUG_MAC_INTERFACE
if (num_tbP) {
LOG_D(RLC, PROTOCOL_CTXT_FMT" MAC_RLC_DATA_IND on channel %d (%d), rb max %d, Num_tb %d\n",
LOG_D(RLC, PROTOCOL_CTXT_FMT" MAC_RLC_DATA_IND on channel %d (%d), rb max %d, Num_tb %d tb_size %d\n",
PROTOCOL_CTXT_ARGS(&ctxt),
channel_idP,
RLC_MAX_LC,
NB_RB_MAX,
num_tbP);
num_tbP,
tb_sizeP);
}
#endif // DEBUG_MAC_INTERFACE
......
......@@ -57,7 +57,7 @@
ntohs((addr)->s6_addr16[7])
#define OAI_DRV_DEBUG_SEND
//#define OAI_DRV_DEBUG_SEND
//#define OAI_DRV_DEBUG_RECEIVE
void
......
......@@ -807,7 +807,7 @@ int main( int argc, char **argv )
set_comp_log(HW, LOG_DEBUG, LOG_HIGH, 1);
set_comp_log(PHY, LOG_INFO, LOG_HIGH, 1);
set_comp_log(MAC, LOG_INFO, LOG_HIGH, 1);
set_comp_log(RLC, LOG_INFO, LOG_HIGH | FLAG_THREAD, 1);
set_comp_log(RLC, LOG_INFO, LOG_HIGH, 1);
set_comp_log(PDCP, LOG_INFO, LOG_HIGH, 1);
set_comp_log(OTG, LOG_INFO, LOG_HIGH, 1);
set_comp_log(RRC, LOG_INFO, LOG_HIGH, 1);
......
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