Merge remote-tracking branch 'origin/issue_1063' into integration_2026_w16 (!4039)
Verify consistency of CSI report in L2 instead of RRC Closes #1063
This commit is contained in:
+2
-2
@@ -2031,7 +2031,7 @@ add_executable(nr_dlsim
|
||||
)
|
||||
target_link_libraries(nr_dlsim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common
|
||||
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common NR_L2_UE
|
||||
softmodem_common
|
||||
)
|
||||
target_link_libraries(nr_dlsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
@@ -2060,7 +2060,7 @@ add_executable(nr_ulsim
|
||||
|
||||
target_link_libraries(nr_ulsim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common softmodem_common
|
||||
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common softmodem_common NR_L2_UE
|
||||
)
|
||||
target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
|
||||
@@ -136,83 +136,3 @@ int nfapi_p7_message_header_unpack(void *pMessageBuf,
|
||||
UNUSED(config);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nr_mac_rrc_sync_ind(const module_id_t module_id, const frame_t frame, const bool in_sync)
|
||||
{
|
||||
UNUSED(module_id);
|
||||
UNUSED(frame);
|
||||
UNUSED(in_sync);
|
||||
}
|
||||
|
||||
void nr_mac_rrc_msg3_ind(const module_id_t mod_id, int rnti, int gnb_id)
|
||||
{
|
||||
UNUSED(mod_id);
|
||||
UNUSED(gnb_id);
|
||||
UNUSED(rnti);
|
||||
}
|
||||
|
||||
void nr_mac_rrc_ra_ind(const module_id_t mod_id, bool success)
|
||||
{
|
||||
UNUSED(mod_id);
|
||||
UNUSED(success);
|
||||
}
|
||||
|
||||
void nr_mac_rrc_inactivity_timer_ind(const module_id_t mod_id)
|
||||
{
|
||||
UNUSED(mod_id);
|
||||
}
|
||||
|
||||
void rrc_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
const rb_id_t Srb_id,
|
||||
const sdu_size_t sdu_sizeP,
|
||||
const uint8_t *const buffer_pP)
|
||||
{
|
||||
UNUSED(ctxt_pP);
|
||||
UNUSED(Srb_id);
|
||||
UNUSED(sdu_sizeP);
|
||||
UNUSED(buffer_pP);
|
||||
}
|
||||
|
||||
typedef uint32_t channel_t;
|
||||
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
|
||||
const int CC_id,
|
||||
const uint8_t gNB_index,
|
||||
const int hfn,
|
||||
const frame_t frame,
|
||||
const int slot,
|
||||
const rnti_t rnti,
|
||||
const uint32_t cellid,
|
||||
const long arfcn,
|
||||
const channel_t channel,
|
||||
const uint8_t *pduP,
|
||||
const sdu_size_t pdu_len)
|
||||
{
|
||||
UNUSED(module_id);
|
||||
UNUSED(CC_id);
|
||||
UNUSED(gNB_index);
|
||||
UNUSED(hfn);
|
||||
UNUSED(frame);
|
||||
UNUSED(slot);
|
||||
UNUSED(rnti);
|
||||
UNUSED(arfcn);
|
||||
UNUSED(channel);
|
||||
UNUSED(pduP);
|
||||
UNUSED(pdu_len);
|
||||
UNUSED(cellid);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nr_mac_rrc_meas_ind_ue(module_id_t module_id,
|
||||
uint32_t gNB_index,
|
||||
uint16_t Nid_cell,
|
||||
bool csi_meas,
|
||||
bool is_neighboring_cell,
|
||||
int rsrp_dBm)
|
||||
{
|
||||
UNUSED(module_id);
|
||||
UNUSED(Nid_cell);
|
||||
UNUSED(gNB_index);
|
||||
UNUSED(csi_meas);
|
||||
UNUSED(is_neighboring_cell);
|
||||
UNUSED(rsrp_dBm);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,9 @@ void nr_mac_rlc_data_ind(const module_id_t module_idP,
|
||||
int num_data)
|
||||
{
|
||||
}
|
||||
|
||||
void nr_mac_rrc_verification_failed(const module_id_t mod_id)
|
||||
{
|
||||
}
|
||||
bool nr_rlc_activate_srb0(int ue_id,
|
||||
void *data,
|
||||
void (*send_initial_ul_rrc_message)(int ue_id, const uint8_t *sdu, sdu_size_t sdu_len, void *data))
|
||||
@@ -77,6 +79,10 @@ int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
bool check_csi_report_consistency(const NR_CSI_MeasConfig_t *meas)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
void nr_mac_rrc_meas_ind_ue(module_id_t module_id,
|
||||
uint32_t gNB_index,
|
||||
uint16_t Nid_cell,
|
||||
|
||||
@@ -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