verify consistency of CSI report in L2 instead of RRC
at RRC we don't store CSI-MeasConfig information so in some scenarios (see #1063) we may not have the full pictures to understand if what RRC received is a valid configuration we verify at L2 instead after updating CSI-MeasConfig and if it fails we send a message to RRC
This commit is contained in:
@@ -31,6 +31,7 @@ MESSAGE_DEF(RRC_MAC_PCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacPcchDat
|
||||
MESSAGE_DEF(NR_RRC_MAC_RA_IND, MESSAGE_PRIORITY_MED_PLUS, NRRrcMacRaInd, nr_rrc_mac_ra_ind)
|
||||
MESSAGE_DEF(NR_RRC_MAC_MSG3_IND, MESSAGE_PRIORITY_MED_PLUS, NRRrcMacMsg3Ind, nr_rrc_mac_msg3_ind)
|
||||
MESSAGE_DEF(NR_RRC_MAC_INAC_IND, MESSAGE_PRIORITY_MED_PLUS, NRRrcMacInacInd, nr_rrc_mac_inac_ind)
|
||||
MESSAGE_DEF(NR_RRC_MAC_VERIFY, MESSAGE_PRIORITY_MED_PLUS, NRRrcMacVerify, nr_rrc_mac_verify)
|
||||
|
||||
/* RRC configures DRX context (MAC timers) of a UE */
|
||||
MESSAGE_DEF(RRC_MAC_DRX_CONFIG_REQ, MESSAGE_PRIORITY_MED, rrc_mac_drx_config_req_t, rrc_mac_drx_config_req)
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#define NR_RRC_MAC_RA_IND(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_mac_ra_ind
|
||||
#define NR_RRC_MAC_MSG3_IND(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_mac_msg3_ind
|
||||
#define NR_RRC_MAC_INAC_IND(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_mac_inac_ind
|
||||
#define NR_RRC_MAC_VERIFY(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_mac_verify
|
||||
|
||||
#define RRC_MAC_DRX_CONFIG_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_drx_config_req
|
||||
|
||||
@@ -67,6 +68,10 @@ typedef struct NRRrcMacMsg3Ind_s {
|
||||
bool prepare_payload;
|
||||
} NRRrcMacMsg3Ind;
|
||||
|
||||
typedef struct NRRrcMacVerify_s {
|
||||
bool L2_RRC_verification_failed; // not to leave the struct empty
|
||||
} NRRrcMacVerify;
|
||||
|
||||
typedef struct NRRrcMacInacInd_s {
|
||||
bool inactivity_timer_expired; // not to leave the struct empty
|
||||
} NRRrcMacInacInd;
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "SCHED_NR/phy_frame_config_nr.h"
|
||||
#include "RRC/NR_UE/verify_RRC.h"
|
||||
#include "RRC/NR_UE/L2_interface_ue.h"
|
||||
#include "oai_asn1.h"
|
||||
|
||||
#define ASIGN_P_VAL(dst, src) \
|
||||
@@ -2552,7 +2554,9 @@ static void modify_csi_measconfig(NR_CSI_MeasConfig_t *source, NR_CSI_MeasConfig
|
||||
}
|
||||
}
|
||||
|
||||
static void configure_csiconfig(NR_UE_ServingCell_Info_t *sc_info, struct NR_SetupRelease_CSI_MeasConfig *csi_MeasConfig_sr)
|
||||
static void configure_csiconfig(NR_UE_ServingCell_Info_t *sc_info,
|
||||
struct NR_SetupRelease_CSI_MeasConfig *csi_MeasConfig_sr,
|
||||
module_id_t ue_id)
|
||||
{
|
||||
switch (csi_MeasConfig_sr->present) {
|
||||
case NR_SetupRelease_CSI_MeasConfig_PR_NOTHING:
|
||||
@@ -2574,6 +2578,8 @@ static void configure_csiconfig(NR_UE_ServingCell_Info_t *sc_info, struct NR_Set
|
||||
} else { // modification
|
||||
modify_csi_measconfig(csi_MeasConfig_sr->choice.setup, sc_info->csi_MeasConfig);
|
||||
}
|
||||
if (!check_csi_report_consistency(sc_info->csi_MeasConfig))
|
||||
nr_mac_rrc_verification_failed(ue_id);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -2585,7 +2591,7 @@ static void configure_servingcell_info(NR_UE_MAC_INST_t *mac, NR_ServingCellConf
|
||||
{
|
||||
NR_UE_ServingCell_Info_t *sc_info = &mac->sc_info;
|
||||
if (scd->csi_MeasConfig) {
|
||||
configure_csiconfig(sc_info, scd->csi_MeasConfig);
|
||||
configure_csiconfig(sc_info, scd->csi_MeasConfig, mac->ue_id);
|
||||
compute_csi_bitlen(sc_info->csi_MeasConfig, mac->csi_report_template);
|
||||
}
|
||||
|
||||
|
||||
@@ -155,6 +155,13 @@ void process_msg_rcc_to_mac(nr_mac_rrc_message_t *msg, int instance_id)
|
||||
}
|
||||
}
|
||||
|
||||
void nr_mac_rrc_verification_failed(const module_id_t mod_id)
|
||||
{
|
||||
MessageDef *message_p = itti_alloc_new_message(TASK_MAC_UE, 0, NR_RRC_MAC_VERIFY);
|
||||
NR_RRC_MAC_VERIFY (message_p).L2_RRC_verification_failed = true;
|
||||
itti_send_msg_to_task(TASK_RRC_NRUE, GNB_MODULE_ID_TO_INSTANCE(mod_id), message_p);
|
||||
}
|
||||
|
||||
void nr_mac_rrc_inactivity_timer_ind(const module_id_t mod_id)
|
||||
{
|
||||
MessageDef *message_p = itti_alloc_new_message(TASK_MAC_UE, 0, NR_RRC_MAC_INAC_IND);
|
||||
|
||||
@@ -30,5 +30,6 @@ void nr_mac_rrc_msg3_ind(const module_id_t mod_id, const int rnti, bool prepare_
|
||||
void nr_ue_rrc_timer_trigger(int instance, int hfn, int frame, int gnb_id);
|
||||
void nr_mac_rrc_ra_ind(const module_id_t mod_id, bool success);
|
||||
void process_msg_rcc_to_mac(nr_mac_rrc_message_t *msg, int instance_id);
|
||||
void nr_mac_rrc_verification_failed(const module_id_t mod_id);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "rrc_defs.h"
|
||||
#include "rrc_proto.h"
|
||||
#include "verify_RRC.h"
|
||||
#include "L2_interface_ue.h"
|
||||
#include "LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
|
||||
@@ -3115,6 +3116,11 @@ void *rrc_nrue(void *notUsed)
|
||||
}
|
||||
break;
|
||||
|
||||
case NR_RRC_MAC_VERIFY:
|
||||
LOG_W(NR_RRC, "L2 verification of RRC consistency failed\n");
|
||||
handle_rlf_detection(rrc);
|
||||
break;
|
||||
|
||||
case NR_RRC_MAC_INAC_IND:
|
||||
LOG_D(NR_RRC, "Received data inactivity indication from lower layers\n");
|
||||
NR_Release_Cause_t release_cause = RRC_CONNECTION_FAILURE;
|
||||
|
||||
@@ -72,7 +72,6 @@ void nr_rrc_ue_decode_NR_SBCCH_SL_BCH_Message(NR_UE_RRC_INST_t *rrc,
|
||||
const uint16_t rx_slss_id);
|
||||
|
||||
void nr_rrc_set_mac_queue(instance_t instance, notifiedFIFO_t *mac_input_nf);
|
||||
bool check_cellgroup_config(const NR_CellGroupConfig_t *cgConfig);
|
||||
/** @}*/
|
||||
#endif
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ static bool check_csi_resourceMapping_consistency(NR_CSI_RS_ResourceMapping_t re
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool check_csi_report_consistency(const NR_CSI_MeasConfig_t *meas)
|
||||
bool check_csi_report_consistency(const NR_CSI_MeasConfig_t *meas)
|
||||
{
|
||||
if (!meas || !meas->csi_ReportConfigToAddModList)
|
||||
return true;
|
||||
@@ -223,8 +223,6 @@ static bool check_csi_resource_consistency(const NR_CSI_MeasConfig_t *meas)
|
||||
static bool check_csi_MeasConfig(struct NR_SetupRelease_CSI_MeasConfig *csi_MeasConfig)
|
||||
{
|
||||
const NR_CSI_MeasConfig_t *meas = csi_MeasConfig->choice.setup;
|
||||
if (!check_csi_report_consistency(meas))
|
||||
return false;
|
||||
if (!check_csi_resource_consistency(meas))
|
||||
return false;
|
||||
return true;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
|
||||
*/
|
||||
|
||||
/*
|
||||
* \brief RRC functions prototypes for eNB and UE
|
||||
*/
|
||||
|
||||
#ifndef _VERIFY_RRC_H_
|
||||
#define _VERIFY_RRC_H_
|
||||
|
||||
#include "NR_MeasConfig.h"
|
||||
|
||||
bool check_csi_report_consistency(const NR_CSI_MeasConfig_t *meas);
|
||||
bool check_cellgroup_config(const NR_CellGroupConfig_t *cgConfig);
|
||||
#endif
|
||||
Reference in New Issue
Block a user