From 8daf1edbc634cd3afe03429991896366576657bc Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 19 Dec 2023 08:52:43 +0100 Subject: [PATCH] RRC: bearer context setup: correctly store DRB QoS params When setting up bearer(s) through F1, the corresponding F1 message has QoS fields for the DRB(s) to be set up, as well as for all flows associated to this DRB. In this commit, set the DRB QoS field to be equal to the first flow (it is unclear/unspecified how it should be set up, based on the flows), which was not set before and therefore contained unitialized data. The F1 module uses this data, and in split mode, F1 message generation failed due to uninitialized data. --- openair2/RRC/NR/rrc_gNB.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index ee5afbce48..680b89fbde 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -2093,6 +2093,7 @@ void rrc_gNB_process_e1_bearer_context_setup_resp(e1ap_bearer_setup_resp_t *resp /* pass QoS info to MAC */ int nb_qos_flows = drb_config->numQosFlowSetup; + AssertFatal(nb_qos_flows > 0, "must map at least one flow to a DRB\n"); drbs[i].drb_info.flows_to_be_setup_length = nb_qos_flows; drbs[i].drb_info.flows_mapped_to_drb = (f1ap_flows_mapped_to_drb_t *)calloc(nb_qos_flows, sizeof(f1ap_flows_mapped_to_drb_t)); AssertFatal(drbs[i].drb_info.flows_mapped_to_drb, "could not allocate memory\n"); @@ -2111,6 +2112,9 @@ void rrc_gNB_process_e1_bearer_context_setup_resp(e1ap_bearer_setup_resp_t *resp qos_char->non_dynamic.qos_priority_level = in_qos_char->qos_priority; } } + /* the DRB QoS parameters: we just reuse the ones from the first flow */ + drbs[i].drb_info.drb_qos = drbs[i].drb_info.flows_mapped_to_drb[0].qos_params; + /* pass NSSAI info to MAC */ drbs[i].nssai = RRC_pduSession->param.nssai; }