diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index bec37e1a29b0d71f930af63bc3e47501deb1ebbf..6194f9394da718658fac3f94f3d097734d6c5174 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -395,7 +395,13 @@ boolean_t pdcp_data_req( confirmP, pdcp_pdu_size, pdcp_pdu_p); /* assume good status */ rlc_status = RLC_OP_STATUS_OK; - } else { + ret = TRUE; + } else if (RC.rrc[ctxt_pP->module_id]->node_type == ngran_eNB_DU + || RC.rrc[ctxt_pP->module_id]->node_type == ngran_gNB_DU){ + LOG_E(PDCP, "Can't be DU, bad node type %d \n", RC.rrc[ctxt_pP->module_id]->node_type); + ret=FALSE; + } + else { rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p @@ -404,6 +410,32 @@ boolean_t pdcp_data_req( ,destinationL2Id #endif ); + switch (rlc_status) { + case RLC_OP_STATUS_OK: + LOG_D(PDCP, "Data sending request over RLC succeeded!\n"); + ret=TRUE; + break; + + case RLC_OP_STATUS_BAD_PARAMETER: + LOG_W(PDCP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n"); + ret= FALSE; + break; + + case RLC_OP_STATUS_INTERNAL_ERROR: + LOG_W(PDCP, "Data sending request over RLC failed with 'Internal Error' reason!\n"); + ret= FALSE; + break; + + case RLC_OP_STATUS_OUT_OF_RESSOURCES: + LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); + ret= FALSE; + break; + + default: + LOG_W(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status); + ret= FALSE; + break; + } // switch case } /* end if node_type is CU */ free_mem_block(pdcp_pdu_p, __FUNCTION__); diff --git a/openair2/LAYER2/RLC/rlc.c b/openair2/LAYER2/RLC/rlc.c index 2d2ac9f1e6dd9dc39c82f1a12fdb477875e1b3e9..8ffe80c9f90c2c288c6e8c50f2a71e030bcf4d72 100644 --- a/openair2/LAYER2/RLC/rlc.c +++ b/openair2/LAYER2/RLC/rlc.c @@ -625,22 +625,25 @@ void rlc_data_ind ( case ngran_eNB_CU : case ngran_ng_eNB_CU : case ngran_gNB_CU : - proto_agent_send_pdcp_data_ind ( - ctxt_pP, - 1, // srb_flagP, - 0, // MBMS_flagP, - rb_idP, - sdu_sizeP, - sdu_pP); - break; + LOG_E(RLC, "Can't be CU, Bad Node type %d\n",RC.rrc[ctxt_pP->module_id]->node_type); + break ; case ngran_eNB_DU : case ngran_gNB_DU : if (srb_flagP == 1) DU_send_UL_RRC_MESSAGE_TRANSFER(ctxt_pP, rb_idP, - sdu_sizeP, - sdu_pP->data); - break; + sdu_sizeP, + sdu_pP->data); + else + proto_agent_send_pdcp_data_ind ( + ctxt_pP, + srb_flagP, + MBMS_flagP, + rb_idP, + sdu_sizeP, + sdu_pP); + + break; default: pdcp_data_ind (