From fb0a80ee84a9ce6240b46369c8ec09e96e6f1623 Mon Sep 17 00:00:00 2001 From: Melissa Elkadi Date: Fri, 1 Oct 2021 15:53:23 -0700 Subject: [PATCH] Adding memset of def_dci_pdu_rel15 back in Removing the memset seemed to hide the problem and now the problem is appearing in a differnt manner... it is causing the NRUE to skip HARQ PIDs as its filling the UCI indication and process the DCI PDUs. So adding the memset causes the NR UE to crash becasue the DL_BWP_ID is becoming 0 which leads us to index into an pointer that is not allocated and then a crash happens in DCI handling. --- openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h | 2 -- openair2/LAYER2/NR_MAC_UE/mac_extern.h | 2 -- openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c | 1 + 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h index 8145a37b45..5b4ebe2397 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h @@ -39,8 +39,6 @@ extern const uint8_t nr_slots_per_frame[5]; -extern dci_pdu_rel15_t def_dci_pdu_rel15[8]; - /* extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE]; extern const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE]; extern const uint8_t cqi2fmt0_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE]; diff --git a/openair2/LAYER2/NR_MAC_UE/mac_extern.h b/openair2/LAYER2/NR_MAC_UE/mac_extern.h index 7dd2a740f6..7959b07694 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_extern.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_extern.h @@ -66,8 +66,6 @@ extern const uint8_t table_7_3_2_3_3_4_twoCodeword[6][10]; extern const uint16_t table_7_2_1[16]; -extern dci_pdu_rel15_t def_dci_pdu_rel15[8]; - extern void mac_rlc_data_ind(const module_id_t module_idP, const rnti_t rntiP, const eNB_index_t eNB_index, diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 2aeb289b41..d816d294cf 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -951,6 +951,7 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_ fill_scheduled_response(&scheduled_response, dl_config, NULL, NULL, dl_info->module_id, dl_info->cc_id, dl_info->frame, dl_info->slot, dl_info->thread_id); nr_ue_if_module_inst[module_id]->scheduled_response(&scheduled_response); } + memset(def_dci_pdu_rel15, 0, sizeof(*def_dci_pdu_rel15)); } }