Commit fbd69663 authored by Cedric Roux's avatar Cedric Roux

rlc v2: fix for CU/DU split

Limitation: this fix only works if there is only one eNB,
because we force module_id = 0 in the function deliver_sdu where
(as the code is today) we have no way to know which module_id is
concerned. More generally, the rlc v2 does not work with more than
1 eNB.
parent 8ca42918
...@@ -337,6 +337,9 @@ void rlc_util_print_hex_octets(comp_name_t componentP, unsigned char *dataP, con ...@@ -337,6 +337,9 @@ void rlc_util_print_hex_octets(comp_name_t componentP, unsigned char *dataP, con
{ {
} }
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
static void deliver_sdu(void *_ue, rlc_entity_t *entity, char *buf, int size) static void deliver_sdu(void *_ue, rlc_entity_t *entity, char *buf, int size)
{ {
rlc_ue_t *ue = _ue; rlc_ue_t *ue = _ue;
...@@ -399,9 +402,23 @@ rb_found: ...@@ -399,9 +402,23 @@ rb_found:
T(T_ENB_RLC_UL, T(T_ENB_RLC_UL,
T_INT(0 /*ctxt_pP->module_id*/), T_INT(0 /*ctxt_pP->module_id*/),
T_INT(ue->rnti), T_INT(rb_id), T_INT(size)); T_INT(ue->rnti), T_INT(rb_id), T_INT(size));
const ngran_node_t type = RC.rrc[0 /*ctxt_pP->module_id*/]->node_type;
AssertFatal(type != ngran_eNB_CU && type != ngran_ng_eNB_CU && type != ngran_gNB_CU,
"Can't be CU, bad node type %d\n", type);
if (NODE_IS_DU(type) && is_srb == 1) {
MessageDef *msg = itti_alloc_new_message(TASK_RLC_ENB, F1AP_UL_RRC_MESSAGE);
F1AP_UL_RRC_MESSAGE(msg).rnti = ue->rnti;
F1AP_UL_RRC_MESSAGE(msg).srb_id = rb_id;
F1AP_UL_RRC_MESSAGE(msg).rrc_container = (unsigned char *)buf;
F1AP_UL_RRC_MESSAGE(msg).rrc_container_length = size;
itti_send_msg_to_task(TASK_DU_F1, ENB_MODULE_ID_TO_INSTANCE(0 /*ctxt_pP->module_id*/), msg);
return;
}
} }
if (!pdcp_data_ind(&ctx, is_srb, 0, rb_id, size, memblock)) { if (!get_pdcp_data_ind_func()(&ctx, is_srb, 0, rb_id, size, memblock, NULL, NULL)) {
LOG_E(RLC, "%s:%d:%s: ERROR: pdcp_data_ind failed\n", __FILE__, __LINE__, __FUNCTION__); LOG_E(RLC, "%s:%d:%s: ERROR: pdcp_data_ind failed\n", __FILE__, __LINE__, __FUNCTION__);
/* what to do in case of failure? for the moment: nothing */ /* what to do in case of failure? for the moment: nothing */
} }
......
...@@ -3533,6 +3533,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t ...@@ -3533,6 +3533,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
, NULL); , NULL);
/* Refresh SRBs/DRBs */ /* Refresh SRBs/DRBs */
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
rrc_rlc_config_asn1_req(ctxt_pP, rrc_rlc_config_asn1_req(ctxt_pP,
*SRB_configList2, // NULL, *SRB_configList2, // NULL,
*DRB_configList, *DRB_configList,
...@@ -3543,6 +3544,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t ...@@ -3543,6 +3544,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
0 0
#endif #endif
); );
}
free(Sparams); free(Sparams);
Sparams = NULL; Sparams = NULL;
...@@ -6077,6 +6079,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct ...@@ -6077,6 +6079,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
, NULL); , NULL);
/* Refresh SRBs/DRBs */ /* Refresh SRBs/DRBs */
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
rrc_rlc_config_asn1_req(ctxt_pP, rrc_rlc_config_asn1_req(ctxt_pP,
*SRB_configList2, // NULL, *SRB_configList2, // NULL,
*DRB_configList, *DRB_configList,
...@@ -6087,6 +6090,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct ...@@ -6087,6 +6090,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
0 0
#endif #endif
); );
}
free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ); free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ);
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = NULL; quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = NULL;
...@@ -6131,12 +6135,14 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc ...@@ -6131,12 +6135,14 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
NULL, NULL,
NULL, NULL,
(LTE_PMCH_InfoList_r9_t *) NULL, NULL); (LTE_PMCH_InfoList_r9_t *) NULL, NULL);
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
rrc_rlc_config_asn1_req(ctxt_pP, rrc_rlc_config_asn1_req(ctxt_pP,
ue_context_p->ue_context.SRB_configList, ue_context_p->ue_context.SRB_configList,
(LTE_DRB_ToAddModList_t *) NULL, (LTE_DRB_ToAddModList_t *) NULL,
(LTE_DRB_ToReleaseList_t *) NULL, (LTE_DRB_ToReleaseList_t *) NULL,
(LTE_PMCH_InfoList_r9_t *) NULL, 0, 0 (LTE_PMCH_InfoList_r9_t *) NULL, 0, 0
); );
}
if (EPC_MODE_ENABLED) { if (EPC_MODE_ENABLED) {
rrc_eNB_process_security ( rrc_eNB_process_security (
...@@ -6271,6 +6277,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -6271,6 +6277,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
(LTE_PMCH_InfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL,
NULL); NULL);
/* Refresh SRBs/DRBs */ /* Refresh SRBs/DRBs */
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
rrc_rlc_config_asn1_req(ctxt_pP, rrc_rlc_config_asn1_req(ctxt_pP,
SRB_configList, // NULL, SRB_configList, // NULL,
DRB_configList, DRB_configList,
...@@ -6279,6 +6286,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -6279,6 +6286,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
0, 0,
0 0
); );
}
/* Set the SRB active in UE context */ /* Set the SRB active in UE context */
if (SRB_configList != NULL) { if (SRB_configList != NULL) {
......
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