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
This commit is contained in:
@@ -187,7 +187,8 @@ typedef struct rlc_am_entity_s {
|
||||
// note occupancy of other buffers is deducted from nb elements in lists
|
||||
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;
|
||||
/** @} */
|
||||
# endif
|
||||
|
||||
@@ -42,39 +42,42 @@ Address : EURECOM,
|
||||
void rlc_am_init(rlc_am_entity_t *rlc_pP, frame_t frameP)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
int saved_allocation = rlc_pP->allocation;
|
||||
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));
|
||||
rlc_pP->allocation = saved_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);
|
||||
memset(rlc_pP, 0, sizeof(rlc_am_entity_t));
|
||||
|
||||
list2_init(&rlc_pP->receiver_buffer, "RX BUFFER");
|
||||
list_init(&rlc_pP->pdus_to_mac_layer, "PDUS TO MAC");
|
||||
list_init(&rlc_pP->control_pdu_list, "CONTROL PDU LIST");
|
||||
list_init(&rlc_pP->segmentation_pdu_list, "SEGMENTATION PDU LIST");
|
||||
//LOG_D(RLC,"RLC_AM_SDU_CONTROL_BUFFER_SIZE %d sizeof(rlc_am_tx_sdu_management_t) %d \n", RLC_AM_SDU_CONTROL_BUFFER_SIZE, sizeof(rlc_am_tx_sdu_management_t));
|
||||
|
||||
rlc_pP->input_sdus = calloc(1, RLC_AM_SDU_CONTROL_BUFFER_SIZE*sizeof(rlc_am_tx_sdu_management_t));
|
||||
rlc_pP->pdu_retrans_buffer = calloc(1, (uint16_t)((unsigned int)RLC_AM_PDU_RETRANSMISSION_BUFFER_SIZE*(unsigned int)sizeof(rlc_am_tx_data_pdu_management_t)));
|
||||
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] input_sdus[] = %p element size=%d\n", frameP, rlc_pP->input_sdus,sizeof(rlc_am_tx_sdu_management_t));
|
||||
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] pdu_retrans_buffer[] = %p element size=%d\n", frameP, rlc_pP->pdu_retrans_buffer,sizeof(rlc_am_tx_data_pdu_management_t));
|
||||
list2_init(&rlc_pP->receiver_buffer, "RX BUFFER");
|
||||
list_init(&rlc_pP->pdus_to_mac_layer, "PDUS TO MAC");
|
||||
list_init(&rlc_pP->control_pdu_list, "CONTROL PDU LIST");
|
||||
list_init(&rlc_pP->segmentation_pdu_list, "SEGMENTATION PDU LIST");
|
||||
//LOG_D(RLC,"RLC_AM_SDU_CONTROL_BUFFER_SIZE %d sizeof(rlc_am_tx_sdu_management_t) %d \n", RLC_AM_SDU_CONTROL_BUFFER_SIZE, sizeof(rlc_am_tx_sdu_management_t));
|
||||
|
||||
// TX state variables
|
||||
//rlc_pP->vt_a = 0;
|
||||
rlc_pP->vt_ms = rlc_pP->vt_a + RLC_AM_WINDOW_SIZE;
|
||||
//rlc_pP->vt_s = 0;
|
||||
//rlc_pP->poll_sn = 0;
|
||||
// TX counters
|
||||
//rlc_pP->c_pdu_without_poll = 0;
|
||||
//rlc_pP->c_byte_without_poll = 0;
|
||||
// RX state variables
|
||||
//rlc_pP->vr_r = 0;
|
||||
rlc_pP->vr_mr = rlc_pP->vr_r + RLC_AM_WINDOW_SIZE;
|
||||
//rlc_pP->vr_x = 0;
|
||||
//rlc_pP->vr_ms = 0;
|
||||
//rlc_pP->vr_h = 0;
|
||||
rlc_pP->input_sdus = calloc(1, RLC_AM_SDU_CONTROL_BUFFER_SIZE*sizeof(rlc_am_tx_sdu_management_t));
|
||||
rlc_pP->pdu_retrans_buffer = calloc(1, (uint16_t)((unsigned int)RLC_AM_PDU_RETRANSMISSION_BUFFER_SIZE*(unsigned int)sizeof(rlc_am_tx_data_pdu_management_t)));
|
||||
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] input_sdus[] = %p element size=%d\n", frameP, rlc_pP->input_sdus,sizeof(rlc_am_tx_sdu_management_t));
|
||||
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] pdu_retrans_buffer[] = %p element size=%d\n", frameP, rlc_pP->pdu_retrans_buffer,sizeof(rlc_am_tx_data_pdu_management_t));
|
||||
|
||||
rlc_pP->last_frame_status_indication = 123456; // any value > 1
|
||||
rlc_pP->first_retrans_pdu_sn = -1;
|
||||
// TX state variables
|
||||
//rlc_pP->vt_a = 0;
|
||||
rlc_pP->vt_ms = rlc_pP->vt_a + RLC_AM_WINDOW_SIZE;
|
||||
//rlc_pP->vt_s = 0;
|
||||
//rlc_pP->poll_sn = 0;
|
||||
// TX counters
|
||||
//rlc_pP->c_pdu_without_poll = 0;
|
||||
//rlc_pP->c_byte_without_poll = 0;
|
||||
// RX state variables
|
||||
//rlc_pP->vr_r = 0;
|
||||
rlc_pP->vr_mr = rlc_pP->vr_r + RLC_AM_WINDOW_SIZE;
|
||||
//rlc_pP->vr_x = 0;
|
||||
//rlc_pP->vr_ms = 0;
|
||||
//rlc_pP->vr_h = 0;
|
||||
|
||||
rlc_pP->last_frame_status_indication = 123456; // any value > 1
|
||||
rlc_pP->first_retrans_pdu_sn = -1;
|
||||
rlc_pP->initialized = TRUE;
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void rlc_am_cleanup(rlc_am_entity_t *rlc_pP)
|
||||
|
||||
@@ -227,9 +227,6 @@ void config_req_rlc_um_asn1 (
|
||||
ul_sn_FieldLength,
|
||||
mbms_flagP);
|
||||
}
|
||||
if (mbms_flagP == MBMS_FLAG_YES) {
|
||||
rlc_p->allocation = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -239,43 +236,47 @@ rlc_um_init (rlc_um_entity_t * const rlc_pP)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
AssertFatal(rlc_pP, "Bad RLC UM pointer (NULL)");
|
||||
int saved_allocation = rlc_pP->allocation;
|
||||
memset (rlc_pP, 0, sizeof (rlc_um_entity_t));
|
||||
rlc_pP->allocation = saved_allocation;
|
||||
// TX SIDE
|
||||
list_init (&rlc_pP->pdus_to_mac_layer, NULL);
|
||||
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));
|
||||
// TX SIDE
|
||||
list_init (&rlc_pP->pdus_to_mac_layer, NULL);
|
||||
|
||||
rlc_pP->protocol_state = RLC_NULL_STATE;
|
||||
//rlc_pP->nb_sdu = 0;
|
||||
//rlc_pP->next_sdu_index = 0;
|
||||
//rlc_pP->current_sdu_index = 0;
|
||||
rlc_pP->protocol_state = RLC_NULL_STATE;
|
||||
//rlc_pP->nb_sdu = 0;
|
||||
//rlc_pP->next_sdu_index = 0;
|
||||
//rlc_pP->current_sdu_index = 0;
|
||||
|
||||
//rlc_pP->vt_us = 0;
|
||||
//rlc_pP->vt_us = 0;
|
||||
|
||||
// RX SIDE
|
||||
list_init (&rlc_pP->pdus_from_mac_layer, NULL);
|
||||
//rlc_pP->vr_ur = 0;
|
||||
//rlc_pP->vr_ux = 0;
|
||||
//rlc_pP->vr_uh = 0;
|
||||
//rlc_pP->output_sdu_size_to_write = 0;
|
||||
//rlc_pP->output_sdu_in_construction = NULL;
|
||||
// RX SIDE
|
||||
list_init (&rlc_pP->pdus_from_mac_layer, NULL);
|
||||
//rlc_pP->vr_ur = 0;
|
||||
//rlc_pP->vr_ux = 0;
|
||||
//rlc_pP->vr_uh = 0;
|
||||
//rlc_pP->output_sdu_size_to_write = 0;
|
||||
//rlc_pP->output_sdu_in_construction = NULL;
|
||||
|
||||
rlc_pP->rx_sn_length = 10;
|
||||
rlc_pP->rx_header_min_length_in_bytes = 2;
|
||||
rlc_pP->tx_sn_length = 10;
|
||||
rlc_pP->tx_header_min_length_in_bytes = 2;
|
||||
rlc_pP->rx_sn_length = 10;
|
||||
rlc_pP->rx_header_min_length_in_bytes = 2;
|
||||
rlc_pP->tx_sn_length = 10;
|
||||
rlc_pP->tx_header_min_length_in_bytes = 2;
|
||||
|
||||
// SPARE : not 3GPP
|
||||
rlc_pP->size_input_sdus_buffer =128;
|
||||
// SPARE : not 3GPP
|
||||
rlc_pP->size_input_sdus_buffer =128;
|
||||
|
||||
if ((rlc_pP->input_sdus == NULL) && (rlc_pP->size_input_sdus_buffer > 0)) {
|
||||
rlc_pP->input_sdus = calloc(1 , rlc_pP->size_input_sdus_buffer * sizeof (void *));
|
||||
if ((rlc_pP->input_sdus == NULL) && (rlc_pP->size_input_sdus_buffer > 0)) {
|
||||
rlc_pP->input_sdus = calloc(1 , rlc_pP->size_input_sdus_buffer * sizeof (void *));
|
||||
}
|
||||
if (rlc_pP->dar_buffer == NULL) {
|
||||
rlc_pP->dar_buffer = calloc (1, 1024 * sizeof (void *));
|
||||
}
|
||||
|
||||
rlc_pP->first_pdu = 1;
|
||||
rlc_pP->initialized = TRUE;
|
||||
}
|
||||
if (rlc_pP->dar_buffer == NULL) {
|
||||
rlc_pP->dar_buffer = calloc (1, 1024 * sizeof (void *));
|
||||
}
|
||||
|
||||
rlc_pP->first_pdu = 1;
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
|
||||
@@ -64,7 +64,7 @@ typedef struct rlc_um_timer_s {
|
||||
typedef struct rlc_um_entity_s {
|
||||
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. */
|
||||
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? */
|
||||
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. */
|
||||
|
||||
@@ -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,
|
||||
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[ue_mod_idP].Status = RRC_IDLE;
|
||||
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP] = 0;
|
||||
|
||||
@@ -74,8 +74,8 @@ static const uint16_t S1AP_INTEGRITY_EIA2_MASK = 0x2;
|
||||
#ifdef Rel10
|
||||
# define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920
|
||||
#else
|
||||
#ifdef EXMIMO_IOT
|
||||
# define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_eia2
|
||||
#ifndef EXMIMO_IOT
|
||||
# define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_eia2
|
||||
#else
|
||||
# define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_reserved
|
||||
#endif
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user