From bf10230185e9075d8fca73bdd928cf7a11cbfa2d Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Sat, 15 Apr 2023 20:20:10 +0200 Subject: [PATCH 1/2] bugfix: use correct index in array Accelleran CU configures DRB ID 4, not 1, so we need to take index 3 in the array 'priority', not 0. So let's use i-1 as it was before. --- openair2/RRC/NR/MESSAGES/asn1_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 283b1b9b79..c7f67ff3aa 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1014,7 +1014,7 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGr // DRB Configuration for (int i = bearer_id_start; i < bearer_id_start + nb_bearers_to_setup; i++ ){ const NR_RLC_Config_PR rlc_conf = use_rlc_um_for_drb ? NR_RLC_Config_PR_um_Bi_Directional : NR_RLC_Config_PR_am; - NR_RLC_BearerConfig_t *rlc_BearerConfig = get_DRB_RLC_BearerConfig(3 + i, i, rlc_conf, priority[0]); // Fixme: priority hardcoded see caller function, all is wrong + NR_RLC_BearerConfig_t *rlc_BearerConfig = get_DRB_RLC_BearerConfig(3 + i, i, rlc_conf, priority[i - 1]); asn1cSeqAdd(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig); asn1cSeqAdd(&ue_context_mastercellGroup->rlc_BearerToAddModList->list, rlc_BearerConfig); } From 6e5511b220f4df804ea1f656c724f9d9ff30c56e Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Sat, 15 Apr 2023 21:26:24 +0200 Subject: [PATCH 2/2] bugfix: use an array of size NGAP_MAX_DRBS_PER_UE for drb_priority It may happen that the drb to configure is not 1, so we may need this array in rrc_gNB_generate_dedicatedRRCReconfiguration(). Not tested, this commit is mostly to harmonize with other places in openair2/RRC/NR/rrc_gNB.c --- openair2/RRC/NR/rrc_gNB.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index f9447fc57a..1cfb01b2a4 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -669,7 +669,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration( //----------------------------------------------------------------------------- { gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; - long drb_priority[1] = {13}; // For now, we assume only one drb per pdu sessions with a default preiority (will be dynamique in future) + long drb_priority[NGAP_MAX_DRBS_PER_UE]; NR_CellGroupConfig_t *cellGroupConfig = NULL; int xid = -1; @@ -701,6 +701,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration( } xid = ue_p->pduSession[j].xid; + drb_priority[DRB_config->drb_Identity - 1] = 13; // For now, we assume only one drb per pdu sessions with a default preiority (will be dynamique in future) } /* If list is empty free the list and reset the address */