Commit 9026fda4 authored by Lionel Gauthier's avatar Lionel Gauthier

Skip re-init of RLC that erased the internal state variables (VR(R), etc).

Configurable ulsh consecutive max error global variable.


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5323 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent b41325e9
...@@ -179,7 +179,7 @@ enum transmission_access_mode{ ...@@ -179,7 +179,7 @@ enum transmission_access_mode{
#endif #endif
/// Top-level PHY Data Structure for eNB /// Top-level PHY Data Structure for eNB
typedef struct { typedef struct PHY_VARS_eNB_s{
/// Module ID indicator for this instance /// Module ID indicator for this instance
module_id_t Mod_id; module_id_t Mod_id;
uint8_t local_flag; uint8_t local_flag;
......
...@@ -60,6 +60,7 @@ extern unsigned char NB_UE_INST; ...@@ -60,6 +60,7 @@ extern unsigned char NB_UE_INST;
extern unsigned char NB_RN_INST; extern unsigned char NB_RN_INST;
#endif #endif
extern unsigned int ULSCH_max_consecutive_errors;
extern int flag_LA; extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX]; extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16]; extern double sinr_bler_map_up[MCS_COUNT][2][16];
......
...@@ -66,6 +66,8 @@ unsigned char NB_RN_INST=0; ...@@ -66,6 +66,8 @@ unsigned char NB_RN_INST=0;
unsigned char NB_INST=0; unsigned char NB_INST=0;
#endif #endif
unsigned int ULSCH_max_consecutive_errors = 20;
int flag_LA=0; int flag_LA=0;
int flagMag; int flagMag;
//extern channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX]; //extern channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX];
......
...@@ -3061,7 +3061,7 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,ui ...@@ -3061,7 +3061,7 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,ui
// If we've dropped the UE, go back to PRACH mode for this UE // If we've dropped the UE, go back to PRACH mode for this UE
//#if !defined(EXMIMO_IOT) //#if !defined(EXMIMO_IOT)
if (phy_vars_eNB->eNB_UE_stats[i].ulsch_consecutive_errors[harq_pid] == 20) { if (phy_vars_eNB->eNB_UE_stats[i].ulsch_consecutive_errors[harq_pid] == ULSCH_max_consecutive_errors) {
LOG_I(PHY,"[eNB %d] frame %d, subframe %d, UE %d: ULSCH consecutive error count reached %u, removing UE\n", LOG_I(PHY,"[eNB %d] frame %d, subframe %d, UE %d: ULSCH consecutive error count reached %u, removing UE\n",
phy_vars_eNB->Mod_id,frame,last_slot>>1, i, phy_vars_eNB->eNB_UE_stats[i].ulsch_consecutive_errors[harq_pid]); phy_vars_eNB->Mod_id,frame,last_slot>>1, i, phy_vars_eNB->eNB_UE_stats[i].ulsch_consecutive_errors[harq_pid]);
phy_vars_eNB->eNB_UE_stats[i].mode = PRACH; phy_vars_eNB->eNB_UE_stats[i].mode = PRACH;
......
...@@ -187,7 +187,8 @@ typedef struct rlc_am_entity_s { ...@@ -187,7 +187,8 @@ typedef struct rlc_am_entity_s {
// note occupancy of other buffers is deducted from nb elements in lists // note occupancy of other buffers is deducted from nb elements in lists
rlc_buffer_occupancy_t buffer_occupancy_retransmission_buffer; /*!< \brief Number of PDUs. */ rlc_buffer_occupancy_t buffer_occupancy_retransmission_buffer; /*!< \brief Number of PDUs. */
boolean_t allocation; /*!< \brief Boolean for rlc_am_entity_t struct allocation. */ //boolean_t allocation; /*!< \brief Boolean for rlc_am_entity_t struct allocation. */
boolean_t initialized; /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
} rlc_am_entity_t; } rlc_am_entity_t;
/** @} */ /** @} */
# endif # endif
...@@ -42,10 +42,11 @@ Address : EURECOM, ...@@ -42,10 +42,11 @@ Address : EURECOM,
void rlc_am_init(rlc_am_entity_t *rlc_pP, frame_t frameP) void rlc_am_init(rlc_am_entity_t *rlc_pP, frame_t frameP)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
int saved_allocation = rlc_pP->allocation; if (rlc_pP->initialized == TRUE) {
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] ALREADY DONE, DOING NOTHING\n", frameP);
} else {
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] STATE VARIABLES, BUFFERS, LISTS\n", frameP); LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] STATE VARIABLES, BUFFERS, LISTS\n", frameP);
memset(rlc_pP, 0, sizeof(rlc_am_entity_t)); memset(rlc_pP, 0, sizeof(rlc_am_entity_t));
rlc_pP->allocation = saved_allocation;
list2_init(&rlc_pP->receiver_buffer, "RX BUFFER"); list2_init(&rlc_pP->receiver_buffer, "RX BUFFER");
list_init(&rlc_pP->pdus_to_mac_layer, "PDUS TO MAC"); list_init(&rlc_pP->pdus_to_mac_layer, "PDUS TO MAC");
...@@ -75,6 +76,8 @@ void rlc_am_init(rlc_am_entity_t *rlc_pP, frame_t frameP) ...@@ -75,6 +76,8 @@ void rlc_am_init(rlc_am_entity_t *rlc_pP, frame_t frameP)
rlc_pP->last_frame_status_indication = 123456; // any value > 1 rlc_pP->last_frame_status_indication = 123456; // any value > 1
rlc_pP->first_retrans_pdu_sn = -1; rlc_pP->first_retrans_pdu_sn = -1;
rlc_pP->initialized = TRUE;
}
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void rlc_am_cleanup(rlc_am_entity_t *rlc_pP) void rlc_am_cleanup(rlc_am_entity_t *rlc_pP)
......
...@@ -227,9 +227,6 @@ void config_req_rlc_um_asn1 ( ...@@ -227,9 +227,6 @@ void config_req_rlc_um_asn1 (
ul_sn_FieldLength, ul_sn_FieldLength,
mbms_flagP); mbms_flagP);
} }
if (mbms_flagP == MBMS_FLAG_YES) {
rlc_p->allocation = TRUE;
}
} }
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -239,9 +236,11 @@ rlc_um_init (rlc_um_entity_t * const rlc_pP) ...@@ -239,9 +236,11 @@ rlc_um_init (rlc_um_entity_t * const rlc_pP)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
AssertFatal(rlc_pP, "Bad RLC UM pointer (NULL)"); AssertFatal(rlc_pP, "Bad RLC UM pointer (NULL)");
int saved_allocation = rlc_pP->allocation; if (rlc_pP->initialized) {
LOG_D(RLC, "[FRAME XXXXX][RLC_UM][MOD XX][RB XX][INIT] ALREADY DONE, DOING NOTHING\n");
} else {
LOG_D(RLC, "[FRAME XXXXX][RLC_UM][MOD XX][RB XX][INIT] STATE VARIABLES, BUFFERS, LISTS\n");
memset (rlc_pP, 0, sizeof (rlc_um_entity_t)); memset (rlc_pP, 0, sizeof (rlc_um_entity_t));
rlc_pP->allocation = saved_allocation;
// TX SIDE // TX SIDE
list_init (&rlc_pP->pdus_to_mac_layer, NULL); list_init (&rlc_pP->pdus_to_mac_layer, NULL);
...@@ -276,6 +275,8 @@ rlc_um_init (rlc_um_entity_t * const rlc_pP) ...@@ -276,6 +275,8 @@ rlc_um_init (rlc_um_entity_t * const rlc_pP)
} }
rlc_pP->first_pdu = 1; rlc_pP->first_pdu = 1;
rlc_pP->initialized = TRUE;
}
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void void
......
...@@ -64,7 +64,7 @@ typedef struct rlc_um_timer_s { ...@@ -64,7 +64,7 @@ typedef struct rlc_um_timer_s {
typedef struct rlc_um_entity_s { typedef struct rlc_um_entity_s {
module_id_t enb_module_id; /*!< \brief eNB Virtualization index for this protocol instance. */ module_id_t enb_module_id; /*!< \brief eNB Virtualization index for this protocol instance. */
module_id_t ue_module_id; /*!< \brief UE Virtualization index for this protocol instance. */ module_id_t ue_module_id; /*!< \brief UE Virtualization index for this protocol instance. */
boolean_t allocation; /*!< \brief Boolean for rlc_am_entity_t struct allocation. */ boolean_t initialized; /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
boolean_t is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */ boolean_t is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
rlc_protocol_state_t protocol_state; /*!< \brief Protocol state, can be RLC_NULL_STATE, RLC_DATA_TRANSFER_READY_STATE, RLC_LOCAL_SUSPEND_STATE. */ rlc_protocol_state_t protocol_state; /*!< \brief Protocol state, can be RLC_NULL_STATE, RLC_DATA_TRANSFER_READY_STATE, RLC_LOCAL_SUSPEND_STATE. */
boolean_t is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */ boolean_t is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
......
...@@ -521,7 +521,7 @@ void rrc_eNB_free_UE_index( ...@@ -521,7 +521,7 @@ void rrc_eNB_free_UE_index(
AssertFatal(ue_mod_idP < NUMBER_OF_UE_MAX, "UE inst invalid (%d/%d) for eNB %d!", ue_mod_idP, NUMBER_OF_UE_MAX, AssertFatal(ue_mod_idP < NUMBER_OF_UE_MAX, "UE inst invalid (%d/%d) for eNB %d!", ue_mod_idP, NUMBER_OF_UE_MAX,
enb_mod_idP); enb_mod_idP);
LOG_I(RRC, "[eNB %d] Removing UE %d rv 0x%" PRIx64 "\n", enb_mod_idP, ue_mod_idP, LOG_W(RRC, "[eNB %d] Removing UE %d rv 0x%" PRIx64 "\n", enb_mod_idP, ue_mod_idP,
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP]); eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP]);
eNB_rrc_inst[enb_mod_idP].Info.UE[ue_mod_idP].Status = RRC_IDLE; eNB_rrc_inst[enb_mod_idP].Info.UE[ue_mod_idP].Status = RRC_IDLE;
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP] = 0; eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP] = 0;
......
...@@ -74,7 +74,7 @@ static const uint16_t S1AP_INTEGRITY_EIA2_MASK = 0x2; ...@@ -74,7 +74,7 @@ static const uint16_t S1AP_INTEGRITY_EIA2_MASK = 0x2;
#ifdef Rel10 #ifdef Rel10
# define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920 # define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920
#else #else
#ifdef EXMIMO_IOT #ifndef EXMIMO_IOT
# define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_eia2 # define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_eia2
#else #else
# define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_reserved # define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_reserved
...@@ -151,6 +151,10 @@ static uint8_t get_UE_index_from_eNB_ue_s1ap_id(uint8_t mod_id, uint32_t eNB_ue_ ...@@ -151,6 +151,10 @@ static uint8_t get_UE_index_from_eNB_ue_s1ap_id(uint8_t mod_id, uint32_t eNB_ue_
} }
} }
} }
LOG_D(RRC,
"[eNB %d] return UE_INDEX_INVALID for eNB_ue_s1ap_id %u\n",
mod_id,
eNB_ue_s1ap_id);
return UE_INDEX_INVALID; return UE_INDEX_INVALID;
} }
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
# company Eurecom # company Eurecom
# email: lionel.gauthier@eurecom.fr # email: lionel.gauthier@eurecom.fr
########################################### ###########################################
# NO INPUT PARAMETER FOR THIS SCRIPT # INPUT PARAMETER FOR THIS SCRIPT: 'rebuild', 'build' or implicit 'start'
######################################### #########################################
# This script start a ENB # This script start a ENB
# The MME is provided to EURECOM by external partner, and should be started by your own. # The MME is provided to EURECOM by external partner, and should be started by your own.
...@@ -114,6 +114,40 @@ else ...@@ -114,6 +114,40 @@ else
fi fi
fi fi
clean() {
cd $OPENAIR_TARGETS/ARCH/EXMIMO/DRIVER/eurecom && make clean || exit 1
cd $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT && make clean || exit 1
make --directory=$OPENAIR_TARGETS/RTAI/USER clean || exit 1
find $OPENAIR_TARGETS/RTAI/USER -name *.a -delete
find $OPENAIR_TARGETS/RTAI/USER -name *.d -delete
find $OPENAIR_TARGETS/RTAI/USER -name *.o -delete
find $OPENAIR_TARGETS/RTAI/USER -name *.ko -delete
}
build() {
cd $OPENAIR_TARGETS/ARCH/EXMIMO/DRIVER/eurecom && make || exit 1
cd $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT && make || exit 1
make --directory=$OPENAIR_TARGETS/RTAI/USER $MAKE_LTE_ACCESS_STRATUM_TARGET_RT -j`grep -c ^processor /proc/cpuinfo ` || exit 1
}
##################################################
# process script parameters
##################################################
for arg in "$@"
do
case "$arg" in
rebuild) clean;build;build;build;build
;;
build) build
;;
*)
;;
esac
done
################################################## ##################################################
# LAUNCH eNB # LAUNCH eNB
...@@ -149,13 +183,8 @@ fi ...@@ -149,13 +183,8 @@ fi
echo_warning "HARD REAL TIME MODE" echo_warning "HARD REAL TIME MODE"
PATH=$PATH:/usr/realtime/bin PATH=$PATH:/usr/realtime/bin
#make --directory=$OPENAIR_TARGETS/RTAI/USER drivers || exit 1
# 2 lines below replace the line above
cd $OPENAIR_TARGETS/ARCH/EXMIMO/DRIVER/eurecom && make clean && make || exit 1
cd $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT && make clean && make || exit 1
cd $THIS_SCRIPT_PATH cd $THIS_SCRIPT_PATH
make --directory=$OPENAIR_TARGETS/RTAI/USER $MAKE_LTE_ACCESS_STRATUM_TARGET_RT -j`grep -c ^processor /proc/cpuinfo ` || exit 1
if [ ! -f /tmp/init_rt_done.tmp ]; then if [ ! -f /tmp/init_rt_done.tmp ]; then
echo_warning "STARTING REAL TIME (RTAI)" echo_warning "STARTING REAL TIME (RTAI)"
...@@ -174,12 +203,13 @@ fi ...@@ -174,12 +203,13 @@ fi
cd $OPENAIR_TARGETS/RTAI/USER cd $OPENAIR_TARGETS/RTAI/USER
bash ./init_exmimo2.sh bash ./init_exmimo2.sh
echo_warning "STARTING SOFTMODEM..." echo_warning "STARTING SOFTMODEM..."
./lte-softmodem -K $ITTI_LOG_FILE -O $CONFIG_FILE_ENB 2>&1 cat /dev/rtf62 > $STDOUT_LOG_FILE &
#cat /dev/rtf62 > $STDOUT_LOG_FILE ./lte-softmodem -K $ITTI_LOG_FILE -O $CONFIG_FILE_ENB --ulsch-max-errors=40 2>&1
cd $THIS_SCRIPT_PATH cd $THIS_SCRIPT_PATH
sync
pkill tshark pkill tshark
pkill cat
sync
cat $STDOUT_LOG_FILE | grep -v '[PHY]' | grep -v '[MAC]' | grep -v '[EMU]' | \ cat $STDOUT_LOG_FILE | grep -v '[PHY]' | grep -v '[MAC]' | grep -v '[EMU]' | \
grep -v '[OCM]' | grep -v '[OMG]' | \ grep -v '[OCM]' | grep -v '[OMG]' | \
grep -v 'RLC not configured' | grep -v 'check if serving becomes' | \ grep -v 'RLC not configured' | grep -v 'check if serving becomes' | \
......
...@@ -1103,6 +1103,7 @@ static void get_options (int argc, char **argv) ...@@ -1103,6 +1103,7 @@ static void get_options (int argc, char **argv)
enum long_option_e { enum long_option_e {
LONG_OPTION_START = 0x100, /* Start after regular single char options */ LONG_OPTION_START = 0x100, /* Start after regular single char options */
LONG_OPTION_ULSCH_MAX_CONSECUTIVE_ERRORS,
LONG_OPTION_CALIB_UE_RX, LONG_OPTION_CALIB_UE_RX,
LONG_OPTION_CALIB_UE_RX_MED, LONG_OPTION_CALIB_UE_RX_MED,
LONG_OPTION_CALIB_UE_RX_BYP, LONG_OPTION_CALIB_UE_RX_BYP,
...@@ -1113,6 +1114,7 @@ static void get_options (int argc, char **argv) ...@@ -1113,6 +1114,7 @@ static void get_options (int argc, char **argv)
}; };
static const struct option long_options[] = { static const struct option long_options[] = {
{"ulsch-max-errors",required_argument, NULL, LONG_OPTION_ULSCH_MAX_CONSECUTIVE_ERRORS},
{"calib-ue-rx", required_argument, NULL, LONG_OPTION_CALIB_UE_RX}, {"calib-ue-rx", required_argument, NULL, LONG_OPTION_CALIB_UE_RX},
{"calib-ue-rx-med", required_argument, NULL, LONG_OPTION_CALIB_UE_RX_MED}, {"calib-ue-rx-med", required_argument, NULL, LONG_OPTION_CALIB_UE_RX_MED},
{"calib-ue-rx-byp", required_argument, NULL, LONG_OPTION_CALIB_UE_RX_BYP}, {"calib-ue-rx-byp", required_argument, NULL, LONG_OPTION_CALIB_UE_RX_BYP},
...@@ -1124,6 +1126,11 @@ static void get_options (int argc, char **argv) ...@@ -1124,6 +1126,11 @@ static void get_options (int argc, char **argv)
{ {
switch (c) switch (c)
{ {
case LONG_OPTION_ULSCH_MAX_CONSECUTIVE_ERRORS:
ULSCH_max_consecutive_errors = atoi(optarg);
printf("Set ULSCH_max_consecutive_errors = %d\n",ULSCH_max_consecutive_errors);
break;
case LONG_OPTION_CALIB_UE_RX: case LONG_OPTION_CALIB_UE_RX:
mode = rx_calib_ue; mode = rx_calib_ue;
rx_input_level_dBm = atoi(optarg); rx_input_level_dBm = atoi(optarg);
...@@ -1371,10 +1378,10 @@ int main(int argc, char **argv) { ...@@ -1371,10 +1378,10 @@ int main(int argc, char **argv) {
set_comp_log(PHY, LOG_INFO, LOG_HIGH, 1); set_comp_log(PHY, LOG_INFO, LOG_HIGH, 1);
#endif #endif
set_comp_log(MAC, LOG_INFO, LOG_HIGH, 1); set_comp_log(MAC, LOG_INFO, LOG_HIGH, 1);
set_comp_log(RLC, LOG_INFO, LOG_HIGH, 1); set_comp_log(RLC, LOG_TRACE, LOG_HIGH, 1);
set_comp_log(PDCP, LOG_DEBUG, LOG_HIGH, 1); set_comp_log(PDCP, LOG_DEBUG, LOG_HIGH, 1);
set_comp_log(OTG, LOG_INFO, LOG_HIGH, 1); set_comp_log(OTG, LOG_INFO, LOG_HIGH, 1);
set_comp_log(RRC, LOG_INFO, LOG_HIGH, 1); set_comp_log(RRC, LOG_DEBUG, LOG_HIGH, 1);
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
set_comp_log(EMU, LOG_INFO, LOG_MED, 1); set_comp_log(EMU, LOG_INFO, LOG_MED, 1);
# if defined(ENABLE_USE_MME) # if defined(ENABLE_USE_MME)
......
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