Commit c2cb5678 authored by gauthier's avatar gauthier
Browse files

make build test work after the removal of RAL, MIH (802.21), minor coding...

make build test work after the removal of RAL, MIH (802.21), minor coding guidelines corrections in RLCs

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7753 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent aff0b849
......@@ -26,14 +26,13 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_AM_MODULE
#define RLC_AM_WINDOWS_C
#define RLC_AM_MODULE 1
#define RLC_AM_WINDOWS_C 1
//-----------------------------------------------------------------------------
#ifdef USER_MODE
#if USER_MODE
#include <assert.h>
#endif
//-----------------------------------------------------------------------------
//#include "rtos_header.h"
#include "platform_types.h"
//-----------------------------------------------------------------------------
#include "rlc_am.h"
......@@ -43,7 +42,6 @@ signed int rlc_am_in_tx_window(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP)
//-----------------------------------------------------------------------------
{
rlc_usn_t shifted_sn;
rlc_usn_t upper_bound;
......@@ -67,7 +65,6 @@ rlc_am_in_rx_window(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP)
//-----------------------------------------------------------------------------
{
rlc_usn_t shifted_sn;
rlc_usn_t upper_bound;
......@@ -91,7 +88,6 @@ rlc_am_sn_gte_vr_h(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP)
//-----------------------------------------------------------------------------
{
rlc_usn_t shifted_sn;
rlc_usn_t upper_bound;
......@@ -114,7 +110,6 @@ signed int rlc_am_sn_gte_vr_x(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP)
//-----------------------------------------------------------------------------
{
rlc_usn_t shifted_sn;
rlc_usn_t upper_bound;
......@@ -138,7 +133,6 @@ rlc_am_sn_gt_vr_ms(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t snP)
//-----------------------------------------------------------------------------
{
rlc_usn_t shifted_sn;
rlc_usn_t upper_bound;
......@@ -163,7 +157,6 @@ rlc_am_tx_sn1_gt_sn2(
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t sn1P,
const rlc_sn_t sn2P)
//-----------------------------------------------------------------------------
{
rlc_usn_t shifted_sn;
rlc_usn_t upper_bound;
......@@ -188,7 +181,6 @@ rlc_am_rx_sn1_gt_sn2(
const rlc_am_entity_t* const rlc_pP,
const rlc_sn_t sn1P,
const rlc_sn_t sn2P)
//-----------------------------------------------------------------------------
{
rlc_usn_t shifted_sn;
rlc_usn_t upper_bound;
......
......@@ -26,8 +26,8 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_TM_MODULE
#define RLC_TM_C
#define RLC_TM_MODULE 1
#define RLC_TM_C 1
//-----------------------------------------------------------------------------
#include "platform_types.h"
#include "platform_constants.h"
......@@ -46,12 +46,11 @@ rlc_tm_send_sdu (
uint8_t * const srcP,
const sdu_size_t length_in_bitsP)
{
//-----------------------------------------------------------------------------
int length_in_bytes;
#ifdef DEBUG_RLC_TM_DISPLAY_ASCII_DATA
#if DEBUG_RLC_TM_DISPLAY_ASCII_DATA
int index;
#endif
#ifdef DEBUG_RLC_TM_REASSEMBLY
#if DEBUG_RLC_TM_REASSEMBLY
LOG_D(RLC, PROTOCOL_RLC_TM_CTXT_FMT"[SEND_SDU] %d bits\n",
PROTOCOL_RLC_TM_CTXT_ARGS(ctxt_pP, rlc_pP),
length_in_bitsP);
......@@ -63,7 +62,7 @@ rlc_tm_send_sdu (
}
if ((rlc_pP->output_sdu_in_construction)) {
#ifdef DEBUG_RLC_TM_DISPLAY_ASCII_DATA
#if DEBUG_RLC_TM_DISPLAY_ASCII_DATA
LOG_D(RLC, PROTOCOL_RLC_TM_CTXT_FMT"[SEND_SDU] DATA :",
PROTOCOL_RLC_TM_CTXT_ARGS(ctxt_pP, rlc_pP));
......@@ -95,7 +94,6 @@ rlc_tm_no_segment (
rlc_tm_entity_t *const rlc_pP
)
{
//-----------------------------------------------------------------------------
mem_block_t *pdu_p = NULL;
struct rlc_tm_tx_sdu_management *sdu_mngt_p = NULL;
struct rlc_tm_tx_pdu_management *pdu_mngt_p = NULL;
......@@ -138,7 +136,6 @@ rlc_tm_rx (
void * const argP,
struct mac_data_ind data_indP)
{
//-----------------------------------------------------------------------------
rlc_tm_entity_t * const rlc_p = (rlc_tm_entity_t *) argP;
mem_block_t *tb_p;
......@@ -164,7 +161,6 @@ rlc_tm_mac_status_indication (
const tb_size_t tb_sizeP,
struct mac_status_ind tx_statusP)
{
//-----------------------------------------------------------------------------
struct mac_status_resp status_resp;
((rlc_tm_entity_t *) rlc_pP)->rlc_pdu_size = tb_sizeP;
......@@ -181,7 +177,6 @@ rlc_tm_mac_data_request (
const protocol_ctxt_t* const ctxt_pP,
void * const rlc_pP)
{
//-----------------------------------------------------------------------------
rlc_tm_entity_t* rlc_p = (rlc_tm_entity_t*) rlc_pP;
struct mac_data_req data_req;
......@@ -208,7 +203,6 @@ rlc_tm_mac_data_indication (
void * const rlc_pP,
struct mac_data_ind data_indP)
{
//-----------------------------------------------------------------------------
rlc_tm_entity_t* rlc_p = (rlc_tm_entity_t*) rlc_pP;
if (data_indP.data.nb_elements > 0) {
......@@ -227,10 +221,9 @@ rlc_tm_data_req (
void *const rlc_pP,
mem_block_t *const sdu_pP)
{
//-----------------------------------------------------------------------------
rlc_tm_entity_t *rlc_p = (rlc_tm_entity_t *) rlc_pP;
#ifdef DEBUG_RLC_TM_DATA_REQUEST
#if DEBUG_RLC_TM_DATA_REQUEST
LOG_D (RLC, PROTOCOL_RLC_TM_CTXT_FMT" RLC_TM_DATA_REQ size %d Bytes, BO %ld , NB SDU %d current_sdu_index=%d next_sdu_index=%d\n",
PROTOCOL_RLC_TM_CTXT_ARGS(ctxt_pP, rlc_p),
((struct rlc_um_data_req *) (sdu_pP->data))->data_size,
......
......@@ -26,8 +26,8 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_TM_MODULE
#define RLC_TM_INIT_C
#define RLC_TM_MODULE 1
#define RLC_TM_INIT_C 1
//-----------------------------------------------------------------------------
#include "rlc_tm.h"
#include "LAYER2/MAC/extern.h"
......@@ -39,7 +39,6 @@ void config_req_rlc_tm (
const rb_id_t rb_idP
)
{
//-----------------------------------------------------------------------------
rlc_union_t *rlc_union_p = NULL;
rlc_tm_entity_t *rlc_p = NULL;
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
......@@ -71,7 +70,6 @@ void rlc_tm_init (
rlc_tm_entity_t * const rlcP
)
{
//-----------------------------------------------------------------------------
int saved_allocation = rlcP->allocation;
memset (rlcP, 0, sizeof (struct rlc_tm_entity));
rlcP->allocation = saved_allocation;
......@@ -103,7 +101,6 @@ rlc_tm_reset_state_variables (
struct rlc_tm_entity * const rlcP
)
{
//-----------------------------------------------------------------------------
rlcP->output_sdu_size_to_write = 0;
rlcP->buffer_occupancy = 0;
rlcP->nb_sdu = 0;
......@@ -116,7 +113,6 @@ rlc_tm_cleanup (
rlc_tm_entity_t * const rlcP
)
{
//-----------------------------------------------------------------------------
int index;
// TX SIDE
list_free (&rlcP->pdus_to_mac_layer);
......@@ -146,7 +142,6 @@ void rlc_tm_configure(
rlc_tm_entity_t * const rlcP,
const boolean_t is_uplink_downlinkP)
{
//-----------------------------------------------------------------------------
rlcP->is_uplink_downlink = is_uplink_downlinkP;
rlc_tm_reset_state_variables (ctxt_pP, rlcP);
}
......@@ -157,7 +152,6 @@ void rlc_tm_set_debug_infos(
rlc_tm_entity_t * const rlcP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP)
//-----------------------------------------------------------------------------
{
rlcP->rb_id = rb_idP;
......
......@@ -26,14 +26,14 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_UM_MODULE
#define RLC_UM_C
#define RLC_UM_MODULE 1
#define RLC_UM_C 1
//-----------------------------------------------------------------------------
//#include "rtos_header.h"
#include "platform_types.h"
#include "platform_constants.h"
//-----------------------------------------------------------------------------
#if defined(ENABLE_ITTI)
#if ENABLE_ITTI
# include "intertask_interface.h"
#endif
#include "assertions.h"
......@@ -68,7 +68,6 @@ void rlc_um_stat_req (rlc_um_entity_t *rlc_pP,
unsigned int* stat_rx_data_bytes_out_of_window,
unsigned int* stat_timer_reordering_timed_out)
{
//-----------------------------------------------------------------------------
*stat_tx_pdcp_sdu = rlc_pP->stat_tx_pdcp_sdu;
*stat_tx_pdcp_bytes = rlc_pP->stat_tx_pdcp_bytes;
*stat_tx_pdcp_sdu_discarded = rlc_pP->stat_tx_pdcp_sdu_discarded;
......@@ -91,7 +90,6 @@ void rlc_um_stat_req (rlc_um_entity_t *rlc_pP,
uint32_t
rlc_um_get_buffer_occupancy (rlc_um_entity_t *rlc_pP)
{
//-----------------------------------------------------------------------------
if (rlc_pP->buffer_occupancy > 0) {
return rlc_pP->buffer_occupancy;
} else {
......@@ -102,7 +100,6 @@ rlc_um_get_buffer_occupancy (rlc_um_entity_t *rlc_pP)
void
rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP)
{
//-----------------------------------------------------------------------------
rlc_um_entity_t *rlc_p = (rlc_um_entity_t *) argP;
switch (rlc_p->protocol_state) {
......@@ -178,9 +175,8 @@ rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP)
void
rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind data_indP)
{
//-----------------------------------------------------------------------------
rlc_um_entity_t *l_rlc_p = (rlc_um_entity_t *) argP;
#if defined(TRACE_RLC_UM_PDU) || defined(MESSAGE_CHART_GENERATOR)
#if TRACE_RLC_UM_PDU || MESSAGE_CHART_GENERATOR
char message_string[10000];
mem_block_t *tb_p;
int16_t tb_size_in_bytes;
......@@ -188,9 +184,9 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
rlc_um_pdu_info_t pdu_info;
int index;
#endif
#if defined(TRACE_RLC_UM_PDU)
#if TRACE_RLC_UM_PDU
int octet_index;
# if defined(ENABLE_ITTI)
# if ENABLE_ITTI
MessageDef *msg_p;
# endif
#endif
......@@ -207,7 +203,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
// - enters the DATA_TRANSFER_READY state.
LOG_N(RLC, PROTOCOL_RLC_UM_CTXT_FMT" ERROR MAC_DATA_IND IN RLC_NULL_STATE\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,l_rlc_p));
#if defined(MESSAGE_CHART_GENERATOR)
#if MESSAGE_CHART_GENERATOR
if (data_indP.data.nb_elements > 0) {
tb_p = data_indP.data.head;
......@@ -265,7 +261,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
// - enters the LOCAL_SUSPEND state.
data_indP.tb_size = data_indP.tb_size >> 3;
#if defined(TRACE_RLC_UM_PDU) || defined(MESSAGE_CHART_GENERATOR)
#if TRACE_RLC_UM_PDU || MESSAGE_CHART_GENERATOR
if (data_indP.data.nb_elements > 0) {
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" MAC_DATA_IND %d TBs\n",
......@@ -282,7 +278,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
&pdu_info,
l_rlc_p->rx_sn_length);
#if defined(MESSAGE_CHART_GENERATOR)
#if MESSAGE_CHART_GENERATOR
message_string_size = 0;
message_string_size += sprintf(&message_string[message_string_size],
MSC_AS_TIME_FMT" "PROTOCOL_RLC_UM_MSC_FMT"DATA SN %u size %u FI %u",
......@@ -308,7 +304,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
message_string);
#endif
#if defined(TRACE_RLC_UM_PDU)
#if TRACE_RLC_UM_PDU
message_string_size = 0;
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
......@@ -361,7 +357,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
message_string_size += sprintf(&message_string[message_string_size], " |\n");
# if defined(ENABLE_ITTI)
# if ENABLE_ITTI
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_DATA_PDU_IND, message_string_size + sizeof (IttiMsgText));
msg_p->ittiMsg.rlc_um_data_pdu_ind.size = message_string_size;
memcpy(&msg_p->ittiMsg.rlc_um_data_pdu_ind.text, message_string, message_string_size);
......@@ -370,8 +366,8 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
# else
LOG_T(RLC, "%s", message_string);
# endif // defined(ENABLE_ITTI)
#endif // defined(TRACE_RLC_UM_PDU)
# endif // ENABLE_ITTI
#endif // TRACE_RLC_UM_PDU
tb_p = tb_p->next;
}
......@@ -439,7 +435,6 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
struct mac_status_resp
rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
{
//-----------------------------------------------------------------------------
struct mac_status_resp status_resp;
uint16_t sdu_size = 0;
uint16_t sdu_remaining_size = 0;
......@@ -489,7 +484,7 @@ rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP
//msg("[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] MAC_STATUS_INDICATION BO = %d\n", ((rlc_um_entity_t *) rlc_pP)->module_id, ((rlc_um_entity_t *) rlc_pP)->rb_id, status_resp.buffer_occupancy_in_bytes);
status_resp.rlc_info.rlc_protocol_state = ((rlc_um_entity_t *) rlc_pP)->protocol_state;
#ifdef TRACE_RLC_UM_TX_STATUS
#if TRACE_RLC_UM_TX_STATUS
if ((((rlc_um_entity_t *) rlc_pP)->rb_id > 0) && (status_resp.buffer_occupancy_in_bytes > 0)) {
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" MAC_STATUS_INDICATION (DATA) %d bytes requested -> %d bytes available\n",
......@@ -522,14 +517,13 @@ rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP
struct mac_data_req
rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP)
{
//-----------------------------------------------------------------------------
struct mac_data_req data_req;
int16_t tb_size_in_bytes;
mem_block_t *tb_p;
#if defined(TRACE_RLC_UM_PDU) || defined(MESSAGE_CHART_GENERATOR)
#if TRACE_RLC_UM_PDU || MESSAGE_CHART_GENERATOR
char message_string[10000];
size_t message_string_size = 0;
# if defined(ENABLE_ITTI)
# if ENABLE_ITTI
MessageDef *msg_p;
# endif
rlc_um_pdu_info_t pdu_info;
......@@ -564,10 +558,10 @@ rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP)
l_rlc_p->stat_tx_data_bytes += tb_size_in_bytes;
AssertFatal( tb_size_in_bytes > 0 , "RLC UM PDU LENGTH %d", tb_size_in_bytes);
#if defined(TRACE_RLC_UM_PDU) || defined(MESSAGE_CHART_GENERATOR)
#if TRACE_RLC_UM_PDU || MESSAGE_CHART_GENERATOR
rlc_um_get_pdu_infos(ctxt_pP, l_rlc_p,(rlc_um_pdu_sn_10_t*) ((struct mac_tb_req*) (tb_p->data))->data_ptr, tb_size_in_bytes, &pdu_info, l_rlc_p->rx_sn_length);
#endif
#ifdef MESSAGE_CHART_GENERATOR
#if MESSAGE_CHART_GENERATOR
message_string_size = 0;
message_string_size += sprintf(&message_string[message_string_size],
MSC_AS_TIME_FMT" "PROTOCOL_RLC_UM_MSC_FMT" DATA SN %u size %u FI %u",
......@@ -593,7 +587,7 @@ rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP)
message_string);
#endif
#ifdef TRACE_RLC_UM_PDU
#if TRACE_RLC_UM_PDU
message_string_size = 0;
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
......@@ -646,7 +640,7 @@ rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP)
message_string_size += sprintf(&message_string[message_string_size], " |\n");
# if defined(ENABLE_ITTI)
# if ENABLE_ITTI
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_DATA_PDU_REQ, message_string_size + sizeof (IttiMsgText));
msg_p->ittiMsg.rlc_um_data_pdu_req.size = message_string_size;
memcpy(&msg_p->ittiMsg.rlc_um_data_pdu_req.text, message_string, message_string_size);
......@@ -668,7 +662,6 @@ rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP)
void
rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, struct mac_data_ind data_indP)
{
//-----------------------------------------------------------------------------
rlc_um_rx (ctxt_pP, rlc_pP, data_indP);
rlc_um_check_timer_dar_time_out(ctxt_pP, rlc_pP);
}
......@@ -677,15 +670,14 @@ rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP,
void
rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t *sdu_pP)
{
//-----------------------------------------------------------------------------
rlc_um_entity_t *rlc_p = (rlc_um_entity_t *) rlc_pP;
#ifndef USER_MODE
#if ! USER_MODE
unsigned long int rlc_um_time_us;
int min, sec, usec;
#endif
#if defined(TRACE_RLC_UM_PDU)
#if defined(ENABLE_ITTI)
#if TRACE_RLC_UM_PDU
#if ENABLE_ITTI
MessageDef *msg_p;
# endif
uint16_t data_offset;
......@@ -730,7 +722,7 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t
((struct rlc_um_tx_sdu_management*) (sdu_pP->data))->sdu_size);
# if defined(TRACE_RLC_UM_PDU)
# if TRACE_RLC_UM_PDU
data_offset = sizeof (struct rlc_um_data_req_alloc);
data_size = ((struct rlc_um_tx_sdu_management *)(sdu_pP->data))->sdu_size;
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", rlc_p->rb_id);
......@@ -768,7 +760,7 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t
message_string_size += sprintf(&message_string[message_string_size], " |\n");
# if defined(ENABLE_ITTI)
# if ENABLE_ITTI
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_SDU_REQ, message_string_size + sizeof (IttiMsgText));
msg_p->ittiMsg.rlc_um_sdu_req.size = message_string_size;
memcpy(&msg_p->ittiMsg.rlc_um_sdu_req.text, message_string, message_string_size);
......@@ -783,4 +775,18 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t
rlc_p->buffer_occupancy += ((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_size;
list_add_tail_eurecom(sdu_pP, &rlc_p->input_sdus);
RLC_UM_MUTEX_UNLOCK(&rlc_p->lock_input_sdus);
#if DEBUG_RLC_CONGESTION
#if MESSAGE_CHART_GENERATOR
if (rlc_p->buffer_occupancy > 4096) {
MSC_LOG_EVENT((ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,\
"0 "PROTOCOL_RLC_AM_MSC_FMT" BO %u bytes",\
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP,rlc_pP), rlc_p->buffer_occupancy);
}
#else
LOG_W(RLC, PROTOCOL_RLC_UM_CTXT_FMT" BO %d , NB SDU %d\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
rlc_p->buffer_occupancy,
rlc_p->input_sdus.nb_elements);
#endif
#endif
}
......@@ -26,8 +26,8 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_UM_MODULE
#define RLC_UM_CONTROL_PRIMITIVES_C
#define RLC_UM_MODULE 1
#define RLC_UM_CONTROL_PRIMITIVES_C 1
#include "platform_types.h"
#include "assertions.h"
//-----------------------------------------------------------------------------
......@@ -49,7 +49,6 @@ void config_req_rlc_um (
const rlc_um_info_t * const config_um_pP,
const rb_id_t rb_idP)
{
//-----------------------------------------------------------------------------
rlc_union_t *rlc_union_p = NULL;
rlc_um_entity_t *rlc_p = NULL;
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
......@@ -105,7 +104,7 @@ void config_req_rlc_um_asn1 (
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
hashtable_rc_t h_rc;
#if defined(Rel10)
#if Rel10
if (mbms_flagP) {
AssertFatal(dl_rlc_pP, "No RLC UM DL config");
......@@ -266,7 +265,6 @@ rlc_um_init (
rlc_um_entity_t * const rlc_pP
)
{
//-----------------------------------------------------------------------------
AssertFatal(rlc_pP, "Bad RLC UM pointer (NULL)");
......@@ -316,7 +314,6 @@ rlc_um_reset_state_variables (
rlc_um_entity_t * const rlc_pP
)
{
//-----------------------------------------------------------------------------
rlc_pP->buffer_occupancy = 0;
......@@ -332,7 +329,6 @@ void
rlc_um_cleanup (
rlc_um_entity_t * const rlc_pP)
{
//-----------------------------------------------------------------------------
int index;
// TX SIDE
list_free (&rlc_pP->pdus_to_mac_layer);
......@@ -369,7 +365,6 @@ void rlc_um_configure(
const uint32_t rx_sn_field_lengthP,
const uint32_t tx_sn_field_lengthP,
const uint32_t is_mXchP)
//-----------------------------------------------------------------------------
{
if (rx_sn_field_lengthP == 10) {
rlc_pP->rx_sn_length = 10;
......@@ -430,7 +425,6 @@ void rlc_um_set_debug_infos(
rlc_um_entity_t * const rlc_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP)
//-----------------------------------------------------------------------------
{
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [SET DEBUG INFOS] rb_id %d srb_flag %d\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
......
This diff is collapsed.
......@@ -26,14 +26,13 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_UM_MODULE
#define RLC_UM_FSM_C
#define RLC_UM_MODULE 1
#define RLC_UM_FSM_C 1
#include "platform_types.h"
//-----------------------------------------------------------------------------
#include "rlc_um.h"
#include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h"
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
......@@ -42,7 +41,6 @@ rlc_um_fsm_notify_event (
const protocol_ctxt_t* const ctxt_pP,
rlc_um_entity_t *rlc_pP, uint8_t eventP)
{
//-----------------------------------------------------------------------------
switch (rlc_pP->protocol_state) {
//-------------------------------
......
......@@ -26,14 +26,15 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define RLC_UM_MODULE
#define RLC_UM_REASSEMBLY_C
#define RLC_UM_MODULE 1
#define RLC_UM_REASSEMBLY_C 1
#include "platform_types.h"
//-----------------------------------------------------------------------------
#ifdef USER_MODE
#if USER_MODE
#include <string.h>
#endif
#if defined(ENABLE_ITTI)
#if ENABLE_ITTI
# include "platform_types.h"
# include "intertask_interface.h"
#endif
#include "assertions.h"
......@@ -45,13 +46,10 @@
#include "UTIL/LOG/log.h"
#include "msc.h"
//#define TRACE_RLC_UM_DISPLAY_ASCII_DATA 1
//-----------------------------------------------------------------------------
inline void
rlc_um_clear_rx_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t* rlc_pP)
{
//-----------------------------------------------------------------------------
rlc_pP->output_sdu_size_to_write = 0;
}
......@@ -59,7 +57,6 @@ rlc_um_clear_rx_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t* rlc_
void
rlc_um_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP, uint8_t * src_pP, int32_t lengthP)
{
//-----------------------------------------------------------------------------
sdu_size_t sdu_max_size;
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[REASSEMBLY] reassembly() %d bytes %d bytes already reassemblied\n",
......@@ -88,14 +85,14 @@ rlc_um_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
if ((rlc_pP->output_sdu_size_to_write + lengthP) <= sdu_max_size) {
memcpy (&rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write], src_pP, lengthP);
rlc_pP->output_sdu_size_to_write += lengthP;
#ifdef TRACE_RLC_UM_DISPLAY_ASCII_DATA
#if TRACE_RLC_UM_DISPLAY_ASCII_DATA
rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
LOG_T(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[REASSEMBLY] DATA :",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
rlc_util_print_hex_octets(RLC, (unsigned char*)rlc_pP->output_sdu_in_construction->data, rlc_pP->output_sdu_size_to_write);
#endif
} else {
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
#if STOP_ON_IP_TRAFFIC_OVERLOAD
AssertFatal(0, PROTOCOL_RLC_UM_CTXT_FMT" RLC_UM_DATA_IND, SDU TOO BIG, DROPPED\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
#endif
......@@ -108,7 +105,7 @@ rlc_um_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
} else {
LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[REASSEMBLY]ERROR OUTPUT SDU IS NULL\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
#if STOP_ON_IP_TRAFFIC_OVERLOAD
AssertFatal(0, PROTOCOL_RLC_UM_CTXT_FMT" RLC_UM_DATA_IND, SDU DROPPED, OUT OF MEMORY\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP));
#endif
......@@ -119,8 +116,6 @@ rlc_um_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
void
rlc_um_send_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
{
//-----------------------------------------------------------------------------
if ((rlc_pP->output_sdu_in_construction)) {
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" SEND_SDU to upper layers %d bytes sdu %p\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
......@@ -142,8 +137,8 @@ rlc_um_send_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
rlc_pP->output_sdu_size_to_write
);
#ifdef TEST_RLC_UM
#ifdef TRACE_RLC_UM_DISPLAY_ASCII_DATA
#if TEST_RLC_UM
#if TRACE_RLC_UM_DISPLAY_ASCII_DATA
rlc_pP->output_sdu_in_construction->data[rlc_pP-