Commit c5e3a467 authored by gauthier's avatar gauthier

RAL Updates + RLC PDU dumped in ITTI msg text

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4886 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 247257f1
......@@ -132,7 +132,7 @@ struct mac_tb_req {
// BE CAREFULL TO KEEP THE SAME MAPPING FOR THE 6 FIELDS BELLOW AS FOR struct mac_tx_tb_management
unsigned char *data_ptr;
unsigned char first_bit;
unsigned short tb_size_in_bits; // L1H does not care of the field first bit any more, so in order to byte
unsigned short tb_size;
// align the tb we have to know its size
// for reporting tx status to upper layers
......@@ -225,41 +225,5 @@ struct mac_primitive {
} primitive;
};
# ifdef BYPASS_L1
// List element of TrCh Blocks data
struct Bypass_TrChBlk_MAC_Interface {
unsigned char first_bit; // First valid Bit in first word. 0 if word is full
unsigned char valid_checksum; // 1 if valid checksum (receive only)
unsigned char peer_trch_id;
unsigned int data_start_index;
unsigned char data[100];
};
struct Bypass_TrChData_MAC_Interface {
unsigned short tf;
unsigned char nb_blocks;
unsigned char updated;
struct Bypass_TrChBlk_MAC_Interface tb[32];
};
struct Bypass_L1 {
struct Bypass_TrChData_MAC_Interface ul_trch[JRRM_MAX_TRCH_RG]; // MT write data here. RG read here, index are rg trch ids
struct Bypass_TrChData_MAC_Interface dl_trch[JRRM_MAX_TRCH_RG]; // RG write data here. MT read here,
unsigned char mt_ack[JRRM_MAX_MANAGED_MOBILES_PER_RG];
unsigned char rg_ack[JRRM_MAX_MANAGED_MOBILES_PER_RG];
unsigned char mt_wrote[JRRM_MAX_MANAGED_MOBILES_PER_RG];
unsigned char rg_wrote[JRRM_MAX_MANAGED_MOBILES_PER_RG];
unsigned char num_mobiles;
unsigned char join_request; // act as boolean
unsigned char detach_request; // act as boolean
unsigned char join_requests[JRRM_MAX_MANAGED_MOBILES_PER_RG];
unsigned char join_acks[JRRM_MAX_MANAGED_MOBILES_PER_RG];
unsigned char detach_requests[JRRM_MAX_MANAGED_MOBILES_PER_RG];
unsigned char detach_acks[JRRM_MAX_MANAGED_MOBILES_PER_RG];
};
# endif
/** @} */
#endif
......@@ -350,9 +350,9 @@ rlc_am_get_pdus (rlc_am_entity_t *rlc_pP,u32_t frameP)
rlc_pP->stat_tx_data_pdu += 1;
rlc_pP->stat_tx_retransmit_pdu += 1;
rlc_pP->stat_tx_retransmit_pdu_by_status += 1;
rlc_pP->stat_tx_data_bytes += (((struct mac_tb_req*)(copy->data))->tb_size_in_bits >> 3);
rlc_pP->stat_tx_retransmit_bytes += (((struct mac_tb_req*)(copy->data))->tb_size_in_bits >> 3);
rlc_pP->stat_tx_retransmit_bytes_by_status += (((struct mac_tb_req*)(copy->data))->tb_size_in_bits >> 3);
rlc_pP->stat_tx_data_bytes += (((struct mac_tb_req*)(copy->data))->tb_size);
rlc_pP->stat_tx_retransmit_bytes += (((struct mac_tb_req*)(copy->data))->tb_size);
rlc_pP->stat_tx_retransmit_bytes_by_status += (((struct mac_tb_req*)(copy->data))->tb_size);
list_add_tail_eurecom (copy, &rlc_pP->pdus_to_mac_layer);
} else {
break;
......@@ -390,7 +390,7 @@ rlc_am_get_pdus (rlc_am_entity_t *rlc_pP,u32_t frameP)
list_add_list (&rlc_pP->segmentation_pdu_list, &rlc_pP->pdus_to_mac_layer);
if (rlc_pP->pdus_to_mac_layer.head != NULL) {
rlc_pP->stat_tx_data_pdu += 1;
rlc_pP->stat_tx_data_bytes += (((struct mac_tb_req*)(rlc_pP->pdus_to_mac_layer.head->data))->tb_size_in_bits >> 3);
rlc_pP->stat_tx_data_bytes += (((struct mac_tb_req*)(rlc_pP->pdus_to_mac_layer.head->data))->tb_size);
return;
}
}
......@@ -523,7 +523,9 @@ rlc_am_mac_data_request (void *rlc_pP,u32 frameP)
int num_nack;
char message_string[9000];
size_t message_string_size = 0;
# if defined(ENABLE_ITTI)
MessageDef *msg_p;
# endif
int octet_index, index;
#endif
......@@ -546,7 +548,7 @@ rlc_am_mac_data_request (void *rlc_pP,u32 frameP)
while (tb_p != NULL) {
rlc_am_pdu_sn_10_p = (rlc_am_pdu_sn_10_t*)((struct mac_tb_req *) (tb_p->data))->data_ptr;
tb_size_in_bytes = ((struct mac_tb_req *) (tb_p->data))->tb_size_in_bits >> 3;
tb_size_in_bytes = ((struct mac_tb_req *) (tb_p->data))->tb_size;
if ((((struct mac_tb_req *) (tb_p->data))->data_ptr[0] & RLC_DC_MASK) == RLC_DC_DATA_PDU ) {
if (rlc_am_get_data_pdu_infos(frameP,rlc_am_pdu_sn_10_p, tb_size_in_bytes, &pdu_info) >= 0) {
......@@ -610,12 +612,12 @@ rlc_am_mac_data_request (void *rlc_pP,u32 frameP)
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->module_id + NB_eNB_INST, msg_p);
# else
rlc_am_display_data_pdu_infos(l_rlc_p, frameP, pdu_info);
rlc_am_display_data_pdu_infos(l_rlc_p, frameP, &pdu_info);
# endif
}
} else {
if (rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_p, &tb_size_in_bytes, &g_rlc_am_control_pdu_info) >= 0) {
tb_size_in_bytes = ((struct mac_tb_req *) (tb_p->data))->tb_size_in_bits >> 3; //tb_size_in_bytes modified by rlc_am_get_control_pdu_infos!
tb_size_in_bytes = ((struct mac_tb_req *) (tb_p->data))->tb_size; //tb_size_in_bytes modified by rlc_am_get_control_pdu_infos!
# if defined(ENABLE_ITTI)
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
......@@ -667,7 +669,9 @@ rlc_am_mac_data_indication (void *rlc_pP, u32_t frameP, u8 eNB_flagP, struct mac
int num_nack;
char message_string[7000];
size_t message_string_size = 0;
# if defined(ENABLE_ITTI)
MessageDef *msg_p;
# endif
int octet_index, index;
#endif
......@@ -684,9 +688,6 @@ rlc_am_mac_data_indication (void *rlc_pP, u32_t frameP, u8 eNB_flagP, struct mac
if ((((struct mac_tb_ind *) (tb_p->data))->data_ptr[0] & RLC_DC_MASK) == RLC_DC_DATA_PDU ) {
if (rlc_am_get_data_pdu_infos(frameP,rlc_am_pdu_sn_10_p, tb_size_in_bytes, &pdu_info) >= 0) {
# if defined(ENABLE_ITTI)
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);
message_string_size += sprintf(&message_string[message_string_size], "Header size : %u\n", pdu_info.header_size);
......@@ -746,7 +747,7 @@ rlc_am_mac_data_indication (void *rlc_pP, u32_t frameP, u8 eNB_flagP, struct mac
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->module_id + NB_eNB_INST, msg_p);
# else
rlc_am_display_data_pdu_infos(l_rlc_p, frameP, pdu_info);
rlc_am_display_data_pdu_infos(l_rlc_p, frameP, &pdu_info);
# endif
}
} else {
......
......@@ -545,7 +545,7 @@ mem_block_t* rlc_am_retransmit_get_subsegment(rlc_am_entity_t *rlcP, u32_t frame
&rlcP->pdu_retrans_buffer[snP].payload[start_offset],
test_pdu_copy_size);
((struct mac_tb_req*)(mb_sub_segment->data))->tb_size_in_bits = ((((u32_t)fill_payload)+ test_pdu_copy_size) - ((u32_t)(&pdu_sub_segment->b1))) << 3;
((struct mac_tb_req*)(mb_sub_segment->data))->tb_size = (((u64_t)fill_payload)+ test_pdu_copy_size) - ((u64_t)(&pdu_sub_segment->b1));
// set LSF
if ((test_pdu_copy_size + start_offset) == rlcP->pdu_retrans_buffer[snP].payload_size) {
......@@ -553,12 +553,27 @@ mem_block_t* rlc_am_retransmit_get_subsegment(rlc_am_entity_t *rlcP, u32_t frame
rlcP->pdu_retrans_buffer[snP].flags.retransmit = 0;
LOG_D(RLC, "[FRAME %05d][RLC_AM][MOD %02d][RB %02d][RE-SEGMENT] RE-SEND DATA PDU SN %04d SO %d %d BYTES PAYLOAD %d BYTES LSF!\n", frame, rlcP->module_id,rlcP->rb_id, snP, start_offset, ((struct mac_tb_req*)(mb_sub_segment->data))->tb_size_in_bits >> 3, test_pdu_copy_size);
LOG_D(RLC, "[FRAME %05d][RLC_AM][MOD %02d][RB %02d][RE-SEGMENT] RE-SEND DATA PDU SN %04d SO %d %d BYTES PAYLOAD %d BYTES LSF!\n",
frame,
rlcP->module_id,rlcP->rb_id,
snP,
start_offset,
((struct mac_tb_req*)(mb_sub_segment->data))->tb_size,
test_pdu_copy_size);
}
else {
LOG_D(RLC, "[FRAME %05d][RLC_AM][MOD %02d][RB %02d][RE-SEGMENT] RE-SEND DATA PDU SN %04d SO %d %d BYTES PAYLOAD %d BYTES\n", frame, rlcP->module_id,rlcP->rb_id, snP, start_offset, ((struct mac_tb_req*)(mb_sub_segment->data))->tb_size_in_bits >> 3, test_pdu_copy_size);
LOG_D(RLC, "[FRAME %05d][RLC_AM][MOD %02d][RB %02d][RE-SEGMENT] RE-SEND DATA PDU SN %04d SO %d %d BYTES PAYLOAD %d BYTES\n",
frame,
rlcP->module_id,
rlcP->rb_id,
snP,
start_offset,
((struct mac_tb_req*)(mb_sub_segment->data))->tb_size,
test_pdu_copy_size);
}
LOG_T(RLC, "[FRAME XXXXX][RLC_AM][MOD XX][RB XX][RE-SEGMENT] *sizeP %d = *sizeP %d - test_pdu_copy_size %d\n",*sizeP - test_pdu_copy_size, *sizeP, test_pdu_copy_size);
LOG_T(RLC, "[FRAME XXXXX][RLC_AM][MOD XX][RB XX][RE-SEGMENT] *sizeP %d = *sizeP %d - test_pdu_copy_size %d\n",
*sizeP - test_pdu_copy_size, *sizeP,
test_pdu_copy_size);
*sizeP = *sizeP - test_pdu_copy_size;
//---------------------------------------------------------------
......@@ -653,8 +668,8 @@ void rlc_am_retransmit_any_pdu(rlc_am_entity_t* rlcP,u32_t frame)
rlc_am_start_timer_poll_retransmit(rlcP,frame);
rlcP->stat_tx_data_pdu += 1;
rlcP->stat_tx_retransmit_pdu += 1;
rlcP->stat_tx_data_bytes += (((struct mac_tb_req*)(pdu->data))->tb_size_in_bits >> 3);
rlcP->stat_tx_retransmit_bytes += (((struct mac_tb_req*)(pdu->data))->tb_size_in_bits >> 3);
rlcP->stat_tx_data_bytes += ((struct mac_tb_req*)(pdu->data))->tb_size;
rlcP->stat_tx_retransmit_bytes += ((struct mac_tb_req*)(pdu->data))->tb_size;
list_add_tail_eurecom (pdu, &rlcP->pdus_to_mac_layer);
return;
}
......@@ -677,8 +692,8 @@ void rlc_am_retransmit_any_pdu(rlc_am_entity_t* rlcP,u32_t frame)
rlc_am_start_timer_poll_retransmit(rlcP,frame);
rlcP->stat_tx_data_pdu += 1;
rlcP->stat_tx_retransmit_pdu += 1;
rlcP->stat_tx_data_bytes += (((struct mac_tb_req*)(pdu->data))->tb_size_in_bits >> 3);
rlcP->stat_tx_retransmit_bytes += (((struct mac_tb_req*)(pdu->data))->tb_size_in_bits >> 3);
rlcP->stat_tx_data_bytes += ((struct mac_tb_req*)(pdu->data))->tb_size;
rlcP->stat_tx_retransmit_bytes += ((struct mac_tb_req*)(pdu->data))->tb_size;
list_add_tail_eurecom (pdu, &rlcP->pdus_to_mac_layer);
return;
} else {
......
......@@ -426,9 +426,9 @@ void rlc_am_segment_10 (rlc_am_entity_t *rlcP,u32_t frame)
rlcP->vt_s = (rlcP->vt_s+1) & RLC_AM_SN_MASK;
pdu_tb_req->data_ptr = (unsigned char*)pdu;
pdu_tb_req->tb_size_in_bits = (data_pdu_size - pdu_remaining_size) << 3;
pdu_tb_req->tb_size = data_pdu_size - pdu_remaining_size;
assert((pdu_tb_req->tb_size_in_bits >> 3) < 3000);
assert(pdu_tb_req->tb_size < 3000);
rlc_am_pdu_polling(rlcP, frame,pdu, pdu_mngt->payload_size);
//list_add_tail_eurecom (pdu_mem, &rlcP->segmentation_pdu_list);
......
......@@ -568,13 +568,13 @@ end_push_nack:
#endif
tb = get_free_mem_block(sizeof(struct mac_tb_req) + pdu_size);
memset(tb->data, 0, sizeof(struct mac_tb_req) + pdu_size);
//estimation only ((struct mac_tb_req*)(tb->data))->tb_size_in_bits = pdu_size << 3;
//estimation only ((struct mac_tb_req*)(tb->data))->tb_size = pdu_size;
((struct mac_tb_req*)(tb->data))->data_ptr = (u8_t*)&(tb->data[sizeof(struct mac_tb_req)]);
// warning reuse of pdu_size
pdu_size = rlc_am_write_status_pdu(frame,(rlc_am_pdu_sn_10_t*)(((struct mac_tb_req*)(tb->data))->data_ptr), &control_pdu_info);
((struct mac_tb_req*)(tb->data))->tb_size_in_bits = pdu_size << 3;
//assert((((struct mac_tb_req*)(tb->data))->tb_size_in_bits >> 3) < 3000);
((struct mac_tb_req*)(tb->data))->tb_size = pdu_size;
//assert((((struct mac_tb_req*)(tb->data))->tb_size) < 3000);
#ifdef TRACE_STATUS_CREATION
LOG_D(RLC, "[FRAME %05d][RLC_AM][MOD %02d][RB %02d][SEND-STATUS] SEND STATUS PDU SIZE %d, rlcP->nb_bytes_requested_by_mac %d, nb_bits_to_transmit>>3 %d\n", frame, rlcP->module_id, rlcP->rb_id, pdu_size, rlcP->nb_bytes_requested_by_mac, nb_bits_to_transmit >> 3);
......
......@@ -112,7 +112,7 @@ rlc_tm_no_segment (rlc_tm_entity_t *rlcP)
((struct mac_tb_req *) (pdu->data))->rlc = NULL;
((struct mac_tb_req *) (pdu->data))->data_ptr = pdu_mngt->first_byte;
((struct mac_tb_req *) (pdu->data))->first_bit = 0;
((struct mac_tb_req *) (pdu->data))->tb_size_in_bits = rlcP->rlc_pdu_size;
((struct mac_tb_req *) (pdu->data))->tb_size = rlcP->rlc_pdu_size >> 3;
list_add_tail_eurecom (pdu, &rlcP->pdus_to_mac_layer);
rlcP->buffer_occupancy -= (sdu_mngt->sdu_size >> 3);
......@@ -185,7 +185,7 @@ rlc_tm_mac_data_request (void *rlcP, u32_t frame)
tb = data_req.data.head;
while (tb != NULL) {
rlc[l_rlc->module_id].m_mscgen_trace_length += sprintf(&rlc[l_rlc->module_id].m_mscgen_trace[rlc[l_rlc->module_id].m_mscgen_trace_length], "%d Bytes ",
((struct mac_tb_req *) (tb->data))->tb_size_in_bits>>3);
((struct mac_tb_req *) (tb->data))->tb_size);
tb = tb->next;
}
rlc[l_rlc->module_id].m_mscgen_trace_length += sprintf(&rlc[l_rlc->module_id].m_mscgen_trace[rlc[l_rlc->module_id].m_mscgen_trace_length], "BO=%d --->][MAC_%s][MOD %02d][]\n",
......
This diff is collapsed.
......@@ -43,7 +43,7 @@ Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis
//#define DEBUG_RLC_UM_RX
//#define DEBUG_DISPLAY_NVIDIA
//-----------------------------------------------------------------------------
signed int rlc_um_get_pdu_infos(u32_t frame,rlc_um_pdu_sn_10_t* headerP, s16_t total_sizeP, rlc_um_pdu_info_t* pdu_infoP)
signed int rlc_um_get_pdu_infos(u32_t frame,rlc_um_pdu_sn_10_t* headerP, s16_t total_sizeP, rlc_um_pdu_info_t* pdu_infoP, u8_t sn_lengthP)
//-----------------------------------------------------------------------------
{
memset(pdu_infoP, 0, sizeof (rlc_um_pdu_info_t));
......@@ -51,21 +51,31 @@ signed int rlc_um_get_pdu_infos(u32_t frame,rlc_um_pdu_sn_10_t* headerP, s16_t t
s16_t sum_li = 0;
pdu_infoP->num_li = 0;
AssertFatal( total_sizeP > 0 , "RLC UM PDU LENGTH %d", total_sizeP);
if (sn_lengthP == 10) {
pdu_infoP->fi = (headerP->b1 >> 3) & 0x03;
pdu_infoP->e = (headerP->b1 >> 2) & 0x01;
pdu_infoP->sn = headerP->b2 + (((u16_t)(headerP->b1 & 0x03)) << 8);
pdu_infoP->header_size = 2;
pdu_infoP->payload = &headerP->data[0];
} else if (sn_lengthP == 5) {
pdu_infoP->fi = (headerP->b1 >> 6) & 0x03;
pdu_infoP->e = (headerP->b1 >> 5) & 0x01;
pdu_infoP->sn = headerP->b1 & 0x1F;
pdu_infoP->header_size = 1;
pdu_infoP->payload = &headerP->b2;
} else {
AssertFatal( sn_lengthP == 5 || sn_lengthP == 10, "RLC UM SN LENGTH %d", sn_lengthP);
}
pdu_infoP->fi = (headerP->b1 >> 3) & 0x03;
pdu_infoP->e = (headerP->b1 >> 2) & 0x01;
pdu_infoP->sn = headerP->b2 + (((u16_t)(headerP->b1 & 0x03)) << 8);
pdu_infoP->header_size = 2;
pdu_infoP->payload = &headerP->data[0];
if (pdu_infoP->e) {
rlc_am_e_li_t *e_li;
unsigned int li_length_in_bytes = 1;
unsigned int li_to_read = 1;
e_li = (rlc_am_e_li_t*)(headerP->data);
e_li = (rlc_am_e_li_t*)(pdu_infoP->payload);
while (li_to_read) {
li_length_in_bytes = li_length_in_bytes ^ 3;
......@@ -85,10 +95,10 @@ signed int rlc_um_get_pdu_infos(u32_t frame,rlc_um_pdu_sn_10_t* headerP, s16_t t
e_li++;
pdu_infoP->header_size += 1;
}
AssertFatal( pdu_infoP->num_li >= RLC_AM_MAX_SDU_IN_PDU, "[FRAME %05d][RLC_UM][MOD XX][RB XX][GET PDU INFO] SN %04d TOO MANY LIs ", frame, pdu_infoP->sn);
AssertFatal( pdu_infoP->num_li <= RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU, "[FRAME %05d][RLC_UM][MOD XX][RB XX][GET PDU INFO] SN %04d TOO MANY LIs ", frame, pdu_infoP->sn);
sum_li += pdu_infoP->li_list[pdu_infoP->num_li];
pdu_infoP->num_li = pdu_infoP->num_li + 1;
if (pdu_infoP->num_li > RLC_AM_MAX_SDU_IN_PDU) {
if (pdu_infoP->num_li > RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU) {
return -2;
}
}
......
......@@ -68,9 +68,10 @@ Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis
* \param[in] headerP RLC UM header PDU pointer.
* \param[in] total_sizeP Size of RLC UM PDU.
* \param[in] pdu_infoP Structure containing extracted informations from PDU.
* \param[in] sn_lengthP Sequence number length in bits in PDU header (5 or 10).
* \return 0 if no error was encountered during the parsing of the PDU, else -1;
*/
protected_rlc_um_dar( signed int rlc_um_get_pdu_infos(u32_t frame, rlc_um_pdu_sn_10_t* headerP, s16_t total_sizeP, rlc_um_pdu_info_t* pdu_infoP));
protected_rlc_um_dar( signed int rlc_um_get_pdu_infos(u32_t frame, rlc_um_pdu_sn_10_t* headerP, s16_t total_sizeP, rlc_um_pdu_info_t* pdu_infoP, u8_t sn_lengthP));
/*! \fn int rlc_um_read_length_indicators(unsigned char**dataP, rlc_um_e_li_t* e_liP, unsigned int* li_arrayP, unsigned int *num_liP, unsigned int *data_sizeP)
* \brief Reset protocol variables and state variables to initial values.
......
......@@ -35,6 +35,7 @@ Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis
#ifdef USER_MODE
#include <assert.h>
#endif
#include "assertions.h"
#include "list.h"
#include "rlc_um.h"
#include "rlc_primitives.h"
......@@ -202,7 +203,17 @@ rlc_um_segment_10 (struct rlc_um_entity *rlcP,u32_t frame)
if (sdu_mngt->sdu_remaining_size > pdu_remaining_size) {
LOG_D(RLC, "[RLC_UM][MOD %d][RB %d][FRAME %05d] SEGMENT10 Filling all remaining PDU with %d bytes\n", rlcP->module_id, rlcP->rb_id, frame, pdu_remaining_size);
LOG_D(RLC, "[RLC_UM][MOD %d][RB %d][FRAME %05d] SEGMENT10 pdu_mem %p pdu %p pdu->data %p data %p data_sdu %p pdu_remaining_size %d\n", rlcP->module_id, rlcP->rb_id, frame, pdu_mem, pdu, pdu->data, data, data_sdu,pdu_remaining_size);
LOG_D(RLC, "[RLC_UM][MOD %d][RB %d][FRAME %05d] SEGMENT10 pdu_mem %p pdu_mem->data %p pdu %p pdu->data %p data %p data_sdu %p pdu_remaining_size %d\n",
rlcP->module_id,\
rlcP->rb_id,
frame,
pdu_mem,
pdu_mem->data,
pdu,
pdu->data,
data,
data_sdu,
pdu_remaining_size);
memcpy(data, data_sdu, pdu_remaining_size);
sdu_mngt->sdu_remaining_size = sdu_mngt->sdu_remaining_size - pdu_remaining_size;
......@@ -306,9 +317,10 @@ rlc_um_segment_10 (struct rlc_um_entity *rlcP,u32_t frame)
rlcP->vt_us = rlcP->vt_us+1;
pdu_tb_req->data_ptr = (unsigned char*)pdu;
pdu_tb_req->tb_size_in_bits = (data_pdu_size - pdu_remaining_size) << 3;
pdu_tb_req->tb_size = data_pdu_size - pdu_remaining_size;
list_add_tail_eurecom (pdu_mem, &rlcP->pdus_to_mac_layer);
//rlc_util_print_hex_octets(RLC, pdu_mem->data, data_pdu_size);
AssertFatal( pdu_tb_req->tb_size > 0 , "SEGMENT10: FINAL RLC UM PDU LENGTH %d", pdu_tb_req->tb_size);
pdu = NULL;
pdu_mem = NULL;
......@@ -580,9 +592,12 @@ rlc_um_segment_5 (struct rlc_um_entity *rlcP,u32_t frame)
rlcP->vt_us = rlcP->vt_us+1;
pdu_tb_req->data_ptr = (unsigned char*)pdu;
pdu_tb_req->tb_size_in_bits = (data_pdu_size - pdu_remaining_size) << 3;
pdu_tb_req->tb_size = data_pdu_size - pdu_remaining_size;
list_add_tail_eurecom (pdu_mem, &rlcP->pdus_to_mac_layer);
rlc_util_print_hex_octets(RLC, (unsigned char*)pdu_mem->data, data_pdu_size);
AssertFatal( pdu_tb_req->tb_size > 0 , "SEGMENT5: FINAL RLC UM PDU LENGTH %d", pdu_tb_req->tb_size);
pdu = NULL;
pdu_mem = NULL;
......
This diff is collapsed.
......@@ -67,7 +67,7 @@ tbs_size_t mac_rlc_serialize_tb (char* bufferP, list_t transport_blocksP) {
while (transport_blocksP.nb_elements > 0) {
tb = list_remove_head (&transport_blocksP);
if (tb != NULL) {
tb_size = ((struct mac_tb_req *) (tb->data))->tb_size_in_bits>>3;
tb_size = ((struct mac_tb_req *) (tb->data))->tb_size;
#ifdef DEBUG_MAC_INTERFACE
LOG_T(RLC, "[MAC-RLC] DUMP TX PDU(%d bytes):\n", tb_size);
rlc_util_print_hex_octets(RLC, ((struct mac_tb_req *) (tb->data))->data_ptr, tb_size);
......
......@@ -137,7 +137,7 @@ static int rrc_set_state (u8 Mod_id, Rrc_State_t state) {
}
static int rrc_set_sub_state (u8 Mod_id, Rrc_Sub_State_t subState) {
#if (defined(ENABLE_ITTI) && defined(ENABLE_USE_MME))
#if (defined(ENABLE_ITTI) && (defined(ENABLE_USE_MME) || defined(ENABLE_RAL)))
switch (UE_rrc_inst[Mod_id].RrcState) {
case RRC_STATE_INACTIVE:
AssertFatal ((RRC_SUB_STATE_INACTIVE_FIRST <= subState) && (subState <= RRC_SUB_STATE_INACTIVE_LAST),
......@@ -3001,9 +3001,9 @@ void *rrc_ue_task(void *args_p) {
&PHY_MEAS_REPORT_IND(msg_p).threshold,
sizeof(RRC_RAL_MEASUREMENT_REPORT_IND (message_p).threshold));
memcpy(&RRC_RAL_MEASUREMENT_REPORT_IND (message_p).link_param_type,
&PHY_MEAS_REPORT_IND(msg_p).link_param_type,
sizeof(RRC_RAL_MEASUREMENT_REPORT_IND (message_p).link_param_type));
memcpy(&RRC_RAL_MEASUREMENT_REPORT_IND (message_p).link_param,
&PHY_MEAS_REPORT_IND(msg_p).link_param,
sizeof(RRC_RAL_MEASUREMENT_REPORT_IND (message_p).link_param));
itti_send_msg_to_task(TASK_RAL_UE, instance, message_p);
break;
......
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