Commit b0769164 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/f1-bwp-switching' into integration_2023_w44

parents 0c51db05 58edc4a5
...@@ -1282,7 +1282,6 @@ set(L2_NR_SRC ...@@ -1282,7 +1282,6 @@ set(L2_NR_SRC
${NR_SDAP_SRC} ${NR_SDAP_SRC}
${NR_RRC_DIR}/rrc_gNB.c ${NR_RRC_DIR}/rrc_gNB.c
${NR_RRC_DIR}/nr_rrc_common.c ${NR_RRC_DIR}/nr_rrc_common.c
${NR_RRC_DIR}/L2_nr_interface.c
${NR_RRC_DIR}/mac_rrc_dl_direct.c ${NR_RRC_DIR}/mac_rrc_dl_direct.c
${NR_RRC_DIR}/mac_rrc_dl_f1ap.c ${NR_RRC_DIR}/mac_rrc_dl_f1ap.c
${NR_RRC_DIR}/nr_rrc_config.c ${NR_RRC_DIR}/nr_rrc_config.c
......
...@@ -1901,7 +1901,6 @@ INPUT = \ ...@@ -1901,7 +1901,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_config.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_config.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_radio_bearers.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_radio_bearers.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_extern.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_extern.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/L2_nr_interface.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_reconfig.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_reconfig.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_NGAP.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_NGAP.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/mac_rrc_dl_f1ap.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/mac_rrc_dl_f1ap.c \
......
...@@ -168,7 +168,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_ ...@@ -168,7 +168,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_
start_meas(&gNB->eNB_scheduler); start_meas(&gNB->eNB_scheduler);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_IN);
/* send tick to RLC and RRC every ms */ /* send tick to RLC, PDCP, and X2AP every ms */
if ((slot & ((1 << *scc->ssbSubcarrierSpacing) - 1)) == 0) { if ((slot & ((1 << *scc->ssbSubcarrierSpacing) - 1)) == 0) {
void nr_rlc_tick(int frame, int subframe); void nr_rlc_tick(int frame, int subframe);
void nr_pdcp_tick(int frame, int subframe); void nr_pdcp_tick(int frame, int subframe);
...@@ -201,8 +201,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_ ...@@ -201,8 +201,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_
nr_mac_update_timers(module_idP, frame, slot); nr_mac_update_timers(module_idP, frame, slot);
schedule_nr_bwp_switch(module_idP, frame, slot);
// This schedules MIB // This schedules MIB
schedule_nr_mib(module_idP, frame, slot, &sched_info->DL_req); schedule_nr_mib(module_idP, frame, slot, &sched_info->DL_req);
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
*/ */
#include "GNB_APP/RRC_nr_paramsvalues.h"
#include "assertions.h" #include "assertions.h"
#include "NR_MAC_gNB/nr_mac_gNB.h" #include "NR_MAC_gNB/nr_mac_gNB.h"
#include "NR_MAC_gNB/mac_proto.h" #include "NR_MAC_gNB/mac_proto.h"
...@@ -38,7 +37,6 @@ ...@@ -38,7 +37,6 @@
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h" #include "UTIL/OPT/opt.h"
#include "RRC/NR/nr_rrc_config.h"
#include "common/utils/nr/nr_common.h" #include "common/utils/nr/nr_common.h"
#include "openair1/PHY/defs_nr_common.h" #include "openair1/PHY/defs_nr_common.h"
......
...@@ -44,8 +44,6 @@ ...@@ -44,8 +44,6 @@
#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h" #include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h"
#include "F1AP_CauseRadioNetwork.h" #include "F1AP_CauseRadioNetwork.h"
#include "RRC/NR/MESSAGES/asn1_msg.h"
#include "intertask_interface.h" #include "intertask_interface.h"
#include "openair2/F1AP/f1ap_ids.h" #include "openair2/F1AP/f1ap_ids.h"
#include "F1AP_CauseRadioNetwork.h" #include "F1AP_CauseRadioNetwork.h"
...@@ -2012,8 +2010,6 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac, ...@@ -2012,8 +2010,6 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
else { else {
DL_BWP = &UE->current_DL_BWP; DL_BWP = &UE->current_DL_BWP;
UL_BWP = &UE->current_UL_BWP; UL_BWP = &UE->current_UL_BWP;
sched_ctrl->next_dl_bwp_id = -1;
sched_ctrl->next_ul_bwp_id = -1;
CellGroup = UE->CellGroup; CellGroup = UE->CellGroup;
} }
NR_BWP_Downlink_t *dl_bwp = NULL; NR_BWP_Downlink_t *dl_bwp = NULL;
...@@ -2302,8 +2298,6 @@ NR_UE_info_t *add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConf ...@@ -2302,8 +2298,6 @@ NR_UE_info_t *add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConf
sched_ctrl->sched_pusch.time_domain_allocation = -1; sched_ctrl->sched_pusch.time_domain_allocation = -1;
/* Set default BWPs */ /* Set default BWPs */
sched_ctrl->next_dl_bwp_id = -1;
sched_ctrl->next_ul_bwp_id = -1;
AssertFatal(ul_bwp->n_ul_bwp <= NR_MAX_NUM_BWP, AssertFatal(ul_bwp->n_ul_bwp <= NR_MAX_NUM_BWP,
"uplinkBWP_ToAddModList has %d BWP!\n", "uplinkBWP_ToAddModList has %d BWP!\n",
ul_bwp->n_ul_bwp); ul_bwp->n_ul_bwp);
...@@ -2878,39 +2872,6 @@ void nr_mac_update_timers(module_id_t module_id, ...@@ -2878,39 +2872,6 @@ void nr_mac_update_timers(module_id_t module_id,
} }
} }
void schedule_nr_bwp_switch(module_id_t module_id,
frame_t frame,
sub_frame_t slot)
{
/* already mutex protected: held in gNB_dlsch_ulsch_scheduler() */
NR_SCHED_ENSURE_LOCKED(&RC.nrmac[module_id]->sched_lock);
NR_UEs_t *UE_info = &RC.nrmac[module_id]->UE_info;
// TODO: Implementation of a algorithm to perform:
// - DL BWP selection: sched_ctrl->next_dl_bwp_id = dl_bwp_id
// - UL BWP selection: sched_ctrl->next_ul_bwp_id = ul_bwp_id
UE_iterator(UE_info->list, UE) {
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
NR_UE_DL_BWP_t *dl_bwp = &UE->current_DL_BWP;
NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP;
if (sched_ctrl->rrc_processing_timer == 0 && UE->Msg4_ACKed && sched_ctrl->next_dl_bwp_id >= 0) {
LOG_W(NR_MAC,
"%4d.%2d UE %04x Scheduling BWP switch from DL_BWP %ld to %ld and from UL_BWP %ld to %ld\n",
frame,
slot,
UE->rnti,
dl_bwp->bwp_id,
sched_ctrl->next_dl_bwp_id,
ul_bwp->bwp_id,
sched_ctrl->next_ul_bwp_id);
nr_mac_rrc_bwp_switch_req(module_id, frame, slot, UE->rnti, sched_ctrl->next_dl_bwp_id, sched_ctrl->next_ul_bwp_id);
}
}
}
int ul_buffer_index(int frame, int slot, int scs, int size) int ul_buffer_index(int frame, int slot, int scs, int size)
{ {
const int abs_slot = frame * nr_slots_per_frame[scs] + slot; const int abs_slot = frame * nr_slots_per_frame[scs] + slot;
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h" #include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include "NR_TAG-Id.h" #include "NR_TAG-Id.h"
#include "common/ngran_types.h" #include "common/ngran_types.h"
#include "rrc_messages_types.h"
void set_cset_offset(uint16_t); void set_cset_offset(uint16_t);
...@@ -67,10 +66,6 @@ void nr_mac_update_timers(module_id_t module_id, ...@@ -67,10 +66,6 @@ void nr_mac_update_timers(module_id_t module_id,
void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame_rxP, sub_frame_t slot_rxP, NR_Sched_Rsp_t *sched_info); void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame_rxP, sub_frame_t slot_rxP, NR_Sched_Rsp_t *sched_info);
void schedule_nr_bwp_switch(module_id_t module_id,
frame_t frame,
sub_frame_t slot);
/* \brief main DL scheduler function. Calls a preprocessor to decide on /* \brief main DL scheduler function. Calls a preprocessor to decide on
* resource allocation, then "post-processes" resource allocation (nFAPI * resource allocation, then "post-processes" resource allocation (nFAPI
* messages, statistics, HARQ handling, CEs, ... */ * messages, statistics, HARQ handling, CEs, ... */
......
...@@ -35,11 +35,8 @@ ...@@ -35,11 +35,8 @@
#include "assertions.h" #include "assertions.h"
#include "nr_pdcp/nr_pdcp_oai_api.h" #include "nr_pdcp/nr_pdcp_oai_api.h"
#include "RRC/NR/nr_rrc_defs.h"
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "nr_rlc/nr_rlc_oai_api.h" #include "nr_rlc/nr_rlc_oai_api.h"
#include "RRC/NR/MESSAGES/asn1_msg.h"
//#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "openair2/F1AP/f1ap_ids.h" #include "openair2/F1AP/f1ap_ids.h"
#include "common/ran_context.h" #include "common/ran_context.h"
......
...@@ -539,11 +539,6 @@ typedef struct NR_UE_ul_harq { ...@@ -539,11 +539,6 @@ typedef struct NR_UE_ul_harq {
/*! \brief scheduling control information set through an API */ /*! \brief scheduling control information set through an API */
#define MAX_CSI_REPORTS 48 #define MAX_CSI_REPORTS 48
typedef struct { typedef struct {
/// the next active BWP ID in DL
NR_BWP_Id_t next_dl_bwp_id;
/// the next active BWP ID in UL
NR_BWP_Id_t next_ul_bwp_id;
/// CCE index and aggregation, should be coherent with cce_list /// CCE index and aggregation, should be coherent with cce_list
NR_SearchSpace_t *search_space; NR_SearchSpace_t *search_space;
NR_ControlResourceSet_t *coreset; NR_ControlResourceSet_t *coreset;
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file L2_nr_interface.c
* \brief layer 2 interface, used to support different RRC sublayer
* \author Raymond Knopp and Navid Nikaein, WEI-TAI CHEN
* \date 2010-2014, 2018
* \version 1.0
* \company Eurecom, NTUST
* \email: raymond.knopp@eurecom.fr, kroempa@gmail.com
*/
#include "platform_types.h"
#include "nr_rrc_defs.h"
#include "nr_rrc_extern.h"
#include "common/utils/LOG/log.h"
#include "common/ran_context.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
#include "LAYER2/nr_rlc/nr_rlc_oai_api.h"
#include "intertask_interface.h"
#include "uper_encoder.h"
#include "NR_MIB.h"
#include "NR_BCCH-BCH-Message.h"
#include "rrc_gNB_UE_context.h"
#include <openair2/RRC/NR/MESSAGES/asn1_msg.h>
#include "nr_pdcp/nr_pdcp_oai_api.h"
extern RAN_CONTEXT_t RC;
int8_t nr_mac_rrc_bwp_switch_req(const module_id_t module_idP,
const frame_t frameP,
const sub_frame_t sub_frameP,
const rnti_t rntiP,
const int dl_bwp_id,
const int ul_bwp_id) {
rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[module_idP], rntiP);
protocol_ctxt_t ctxt;
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, GNB_FLAG_YES, rntiP, frameP, sub_frameP, 0);
nr_rrc_reconfiguration_req(ue_context_p, &ctxt, dl_bwp_id, ul_bwp_id);
return 0;
}
...@@ -110,13 +110,6 @@ void *rrc_gnb_task(void *args_p); ...@@ -110,13 +110,6 @@ void *rrc_gnb_task(void *args_p);
\ *reOffset Pointer to RE Offset Value */ \ *reOffset Pointer to RE Offset Value */
void rrc_config_dl_ptrs_params(NR_BWP_Downlink_t *bwp, long *ptrsNrb, long *ptrsMcs, long *epre_Ratio, long *reOffset); void rrc_config_dl_ptrs_params(NR_BWP_Downlink_t *bwp, long *ptrsNrb, long *ptrsMcs, long *epre_Ratio, long *reOffset);
int8_t nr_mac_rrc_bwp_switch_req(const module_id_t module_idP,
const frame_t frameP,
const sub_frame_t sub_frameP,
const rnti_t rntiP,
const int dl_bwp_id,
const int ul_bwp_id);
int nr_rrc_reconfiguration_req(rrc_gNB_ue_context_t *const ue_context_pP, int nr_rrc_reconfiguration_req(rrc_gNB_ue_context_t *const ue_context_pP,
protocol_ctxt_t *const ctxt_pP, protocol_ctxt_t *const ctxt_pP,
const int dl_bwp_id, const int dl_bwp_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment