Commit 30b4c553 authored by nguyennd's avatar nguyennd
Browse files

LGAUTHIER, Duy, OK for e-MBMS, may be one remaining problem with stats

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5121 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 42f7ca06
...@@ -68,7 +68,7 @@ result could be based on an event-driven measurement report. ...@@ -68,7 +68,7 @@ result could be based on an event-driven measurement report.
*/ */
# define NB_SIG_CNX_CH 1 # define NB_SIG_CNX_CH 1
# define NB_CNX_CH MAX_MOBILES_PER_RG # define NB_CNX_CH MAX_MOBILES_PER_ENB
# define NB_SIG_CNX_UE 2 //MAX_MANAGED_RG_PER_MOBILE # define NB_SIG_CNX_UE 2 //MAX_MANAGED_RG_PER_MOBILE
# define NB_CNX_UE 2//MAX_MANAGED_RG_PER_MOBILE # define NB_CNX_UE 2//MAX_MANAGED_RG_PER_MOBILE
......
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
#else #else
# if defined(OAI_NW_DRIVER_TYPE_ETHERNET) # if defined(OAI_NW_DRIVER_TYPE_ETHERNET)
/* SR: When using ethernet network driver the packet size is 1512 : /* SR: When using ethernet network driver the packet size is 1512 :
* 1500 bytes IP packet + 12 bytes ethernet header * 1500 bytes IP packet + 14 bytes ethernet header
*/ */
# define MAX_IP_PACKET_SIZE 1512 # define MAX_IP_PACKET_SIZE 1514
# else # else
# define MAX_IP_PACKET_SIZE 1500 // 3000 # define MAX_IP_PACKET_SIZE 1500 // 3000
# endif # endif
...@@ -45,17 +45,24 @@ ...@@ -45,17 +45,24 @@
# define MAX_MODULES NB_MODULES_MAX # define MAX_MODULES NB_MODULES_MAX
#ifdef LARGE_SCALE #ifdef LARGE_SCALE
# define MAX_MOBILES_PER_RG 128 # define MAX_MOBILES_PER_ENB 128
# define MAX_RG 2 //# define MAX_RG 2
#else #else
# define MAX_MOBILES_PER_RG 16 # define MAX_MOBILES_PER_ENB 16
# define MAX_RG 2 //# define MAX_RG 2
#endif #endif
#define MAX_MANAGED_RG_PER_MOBILE 2 #define MAX_MANAGED_ENB_PER_MOBILE 2
#define DEFAULT_RAB_ID 3 #define DEFAULT_RAB_ID 3
#define NB_RB_MAX (maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */ #define NB_RB_MAX (maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */
#if defined(Rel10)
#define NB_RB_MBMS_MAX (maxSessionPerPMCH*maxServiceCount)
#else
// Do not allocate unused memory
#define NB_RB_MBMS_MAX 1
#endif
#define NB_RAB_MAX maxDRB /* was 8, now 11 */ #define NB_RAB_MAX maxDRB /* was 8, now 11 */
#define RAB_SHIFT1 9 #define RAB_SHIFT1 9
#define RAB_SHIFT2 3 #define RAB_SHIFT2 3
......
...@@ -1451,6 +1451,19 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) ...@@ -1451,6 +1451,19 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
else { // only MTCH in this subframeP else { // only MTCH in this subframeP
TBS = mac_xface->get_TBS(eNB_mac_inst[module_idP].pmch_Config[0]->dataMCS_r9, mac_xface->lte_frame_parms->N_RB_DL); TBS = mac_xface->get_TBS(eNB_mac_inst[module_idP].pmch_Config[0]->dataMCS_r9, mac_xface->lte_frame_parms->N_RB_DL);
} }
// get MTCH data from RLC (like for DTCH)
LOG_D(MAC,"[eNB %d] Frame %d subframe %d: Schedule MTCH (area %d, sfAlloc %d)\n",Mod_id,frame,subframe,i,j);
header_len_mtch = 3;
LOG_D(MAC,"[eNB %d], Frame %d, MTCH->MCH, Checking RLC status (rab %d, tbs %d, len %d)\n",
Mod_id,frame,MTCH,TBS,
TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch);
rlc_status = mac_rlc_status_ind(Mod_id,frame,1,RLC_MBMS_YES,MTCH+ (maxDRB + 3) * MAX_MOBILES_PER_RG,
TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch);
printf("frame %d, subframe %d, rlc_status.bytes_in_buffer is %d\n",frame,subframe, rlc_status.bytes_in_buffer);
*/ */
// get MTCH data from RLC (like for DTCH) // get MTCH data from RLC (like for DTCH)
...@@ -1461,16 +1474,22 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) ...@@ -1461,16 +1474,22 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
module_idP,frameP,MTCH,TBS, module_idP,frameP,MTCH,TBS,
TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch); TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch);
rlc_status = mac_rlc_status_ind(module_idP,0,frameP,ENB_FLAG_YES,MBMS_FLAG_YES,MTCH+ (maxDRB + 3) * MAX_MOBILES_PER_RG, rlc_status = mac_rlc_status_ind(module_idP,0,frameP,ENB_FLAG_YES,MBMS_FLAG_YES,MTCH,
TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch); TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch);
//printf("frameP %d, subframeP %d, rlc_status.bytes_in_buffer is %d\n",frameP,subframeP, rlc_status.bytes_in_buffer); LOG_D(MAC,"e-MBMS log channel %u frameP %d, subframeP %d, rlc_status.bytes_in_buffer is %d\n",
MTCH,frameP,subframeP, rlc_status.bytes_in_buffer);
if (rlc_status.bytes_in_buffer >0) { if (rlc_status.bytes_in_buffer >0) {
LOG_I(MAC,"[eNB %d][MBMS USER-PLANE], Frame %d, MTCH->MCH, Requesting %d bytes from RLC (header len mtch %d)\n", LOG_I(MAC,"[eNB %d][MBMS USER-PLANE], Frame %d, MTCH->MCH, Requesting %d bytes from RLC (header len mtch %d)\n",
module_idP,frameP,TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch,header_len_mtch); module_idP,frameP,TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch,header_len_mtch);
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, 0, frameP, ENB_FLAG_YES, MBMS_FLAG_YES, sdu_lengths[num_sdus] = mac_rlc_data_req(
MTCH + (maxDRB + 3) * MAX_MOBILES_PER_RG, module_idP,
0,
frameP,
ENB_FLAG_YES,
MBMS_FLAG_YES,
MTCH,
(char*)&mch_buffer[sdu_length_total]); (char*)&mch_buffer[sdu_length_total]);
//sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,frameP, MBMS_FLAG_NO, MTCH+(MAX_NUM_RB*(NUMBER_OF_UE_MAX+1)), (char*)&mch_buffer[sdu_length_total]); //sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,frameP, MBMS_FLAG_NO, MTCH+(MAX_NUM_RB*(NUMBER_OF_UE_MAX+1)), (char*)&mch_buffer[sdu_length_total]);
LOG_I(MAC,"[eNB %d][MBMS USER-PLANE] Got %d bytes for MTCH %d\n",module_idP,sdu_lengths[num_sdus],MTCH); LOG_I(MAC,"[eNB %d][MBMS USER-PLANE] Got %d bytes for MTCH %d\n",module_idP,sdu_lengths[num_sdus],MTCH);
......
...@@ -525,7 +525,7 @@ void ue_send_mch_sdu(module_id_t module_idP, frame_t frameP, uint8_t *sdu, uint1 ...@@ -525,7 +525,7 @@ void ue_send_mch_sdu(module_id_t module_idP, frame_t frameP, uint8_t *sdu, uint1
frameP, frameP,
ENB_FLAG_NO, ENB_FLAG_NO,
MBMS_FLAG_YES, MBMS_FLAG_YES,
MTCH + (maxDRB + 3), MTCH, /*+ (maxDRB + 3),*/
(char *)payload_ptr, (char *)payload_ptr,
rx_lengths[i], rx_lengths[i],
1, 1,
...@@ -533,7 +533,12 @@ void ue_send_mch_sdu(module_id_t module_idP, frame_t frameP, uint8_t *sdu, uint1 ...@@ -533,7 +533,12 @@ void ue_send_mch_sdu(module_id_t module_idP, frame_t frameP, uint8_t *sdu, uint1
} }
} else { } else {
LOG_W(MAC,"[UE %d] Frame %d : unknown sdu %d mcch status %d eNB %d \n",module_idP,frameP,rx_lengths[i], LOG_W(MAC,"[UE %d] Frame %d : unknown sdu %d rx_lcids[%d]=%d mcch status %d eNB %d \n",
module_idP,
frameP,
rx_lengths[i],
i,
rx_lcids[i],
UE_mac_inst[module_idP].mcch_status, eNB_index); UE_mac_inst[module_idP].mcch_status, eNB_index);
} }
......
...@@ -76,8 +76,17 @@ extern int otg_rx_pkt( int src, int dst, int ctime, char *buffer_tx, unsigned in ...@@ -76,8 +76,17 @@ extern int otg_rx_pkt( int src, int dst, int ctime, char *buffer_tx, unsigned in
* this mem_block_t to be dissected for testing purposes. For further details see test * this mem_block_t to be dissected for testing purposes. For further details see test
* code at targets/TEST/PDCP/test_pdcp.c:test_pdcp_data_req() * code at targets/TEST/PDCP/test_pdcp.c:test_pdcp_data_req()
*/ */
boolean_t pdcp_data_req(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, eNB_flag_t enb_flagP, rb_id_t rb_idP, mui_t muiP, confirm_t confirmP, boolean_t pdcp_data_req(
sdu_size_t sdu_buffer_sizeP, unsigned char* sdu_buffer_pP, pdcp_transmission_mode_t modeP) module_id_t enb_mod_idP,
module_id_t ue_mod_idP,
frame_t frameP,
eNB_flag_t enb_flagP,
rb_id_t rb_idP,
mui_t muiP,
confirm_t confirmP,
sdu_size_t sdu_buffer_sizeP,
unsigned char *sdu_buffer_pP,
pdcp_transmission_mode_t modeP)
{ {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
pdcp_t *pdcp_p = NULL; pdcp_t *pdcp_p = NULL;
...@@ -92,7 +101,11 @@ boolean_t pdcp_data_req(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t ...@@ -92,7 +101,11 @@ boolean_t pdcp_data_req(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t
AssertError (enb_mod_idP < NUMBER_OF_eNB_MAX, return FALSE, "eNB id is too high (%u/%d) %u %u!\n", enb_mod_idP, NUMBER_OF_eNB_MAX, ue_mod_idP, rb_idP); AssertError (enb_mod_idP < NUMBER_OF_eNB_MAX, return FALSE, "eNB id is too high (%u/%d) %u %u!\n", enb_mod_idP, NUMBER_OF_eNB_MAX, ue_mod_idP, rb_idP);
AssertError (ue_mod_idP < NUMBER_OF_UE_MAX, return FALSE, "UE id is too high (%u/%d) %u %u!\n", ue_mod_idP, NUMBER_OF_UE_MAX, enb_mod_idP, rb_idP); AssertError (ue_mod_idP < NUMBER_OF_UE_MAX, return FALSE, "UE id is too high (%u/%d) %u %u!\n", ue_mod_idP, NUMBER_OF_UE_MAX, enb_mod_idP, rb_idP);
if (modeP == PDCP_TRANSMISSION_MODE_TRANSPARENT) {
AssertError (rb_idP < NB_RB_MBMS_MAX, return FALSE, "RB id is too high (%u/%d) %u %u!\n", rb_idP, NB_RB_MBMS_MAX, ue_mod_idP, enb_mod_idP);
} else {
AssertError (rb_idP < NB_RB_MAX, return FALSE, "RB id is too high (%u/%d) %u %u!\n", rb_idP, NB_RB_MAX, ue_mod_idP, enb_mod_idP); AssertError (rb_idP < NB_RB_MAX, return FALSE, "RB id is too high (%u/%d) %u %u!\n", rb_idP, NB_RB_MAX, ue_mod_idP, enb_mod_idP);
}
if (enb_flagP == ENB_FLAG_NO) { if (enb_flagP == ENB_FLAG_NO) {
pdcp_p = &pdcp_array_ue[ue_mod_idP][rb_idP]; pdcp_p = &pdcp_array_ue[ue_mod_idP][rb_idP];
...@@ -137,6 +150,10 @@ boolean_t pdcp_data_req(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t ...@@ -137,6 +150,10 @@ boolean_t pdcp_data_req(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t
pdcp_pdu_p = get_free_mem_block(sdu_buffer_sizeP); pdcp_pdu_p = get_free_mem_block(sdu_buffer_sizeP);
if (pdcp_pdu_p != NULL) { if (pdcp_pdu_p != NULL) {
memcpy(&pdcp_pdu_p->data[0], sdu_buffer_pP, sdu_buffer_sizeP); memcpy(&pdcp_pdu_p->data[0], sdu_buffer_pP, sdu_buffer_sizeP);
rlc_util_print_hex_octets(PDCP,
(unsigned char*)&pdcp_pdu_p->data[0],
sdu_buffer_sizeP);
rlc_status = rlc_data_req(enb_mod_idP, ue_mod_idP, frameP, enb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p); rlc_status = rlc_data_req(enb_mod_idP, ue_mod_idP, frameP, enb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p);
} else { } else {
rlc_status = RLC_OP_STATUS_OUT_OF_RESSOURCES; rlc_status = RLC_OP_STATUS_OUT_OF_RESSOURCES;
...@@ -362,8 +379,20 @@ boolean_t pdcp_data_ind(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t ...@@ -362,8 +379,20 @@ boolean_t pdcp_data_ind(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t
oai_emulation.info.first_ue_local); oai_emulation.info.first_ue_local);
} }
#endif #endif
DevCheck4(rb_idP < NB_RB_MAX, rb_idP, NB_RB_MAX, enb_mod_idP, ue_mod_idP); if (MBMS_flagP) {
AssertError (rb_idP < NB_RB_MBMS_MAX, return FALSE, "RB id is too high (%u/%d) %u %u!\n", rb_idP, NB_RB_MBMS_MAX, ue_mod_idP, enb_mod_idP);
if (enb_flagP == ENB_FLAG_NO) {
LOG_I(PDCP, "e-MBMS Data indication notification for PDCP entity from eNB %u to UE %u "
"and radio bearer ID %d rlc sdu size %d enb_flagP %d\n",
enb_mod_idP, ue_mod_idP, rb_idP, sdu_buffer_sizeP, enb_flagP);
} else {
LOG_I(PDCP, "Data indication notification for PDCP entity from UE %u to eNB %u "
"and radio bearer ID %d rlc sdu size %d enb_flagP %d eNB_id %d\n",
ue_mod_idP, enb_mod_idP , rb_idP, sdu_buffer_sizeP, enb_flagP, enb_mod_idP);
}
} else {
rb_idP = rb_idP % NB_RB_MAX;
AssertError (rb_idP < NB_RB_MAX, return FALSE, "RB id is too high (%u/%d) %u %u!\n", rb_idP, NB_RB_MAX, ue_mod_idP, enb_mod_idP);
if (enb_flagP == ENB_FLAG_NO) { if (enb_flagP == ENB_FLAG_NO) {
pdcp_p = &pdcp_array_ue[ue_mod_idP][rb_idP]; pdcp_p = &pdcp_array_ue[ue_mod_idP][rb_idP];
...@@ -377,6 +406,8 @@ boolean_t pdcp_data_ind(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t ...@@ -377,6 +406,8 @@ boolean_t pdcp_data_ind(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t
"and radio bearer ID %d rlc sdu size %d enb_flagP %d eNB_id %d\n", "and radio bearer ID %d rlc sdu size %d enb_flagP %d eNB_id %d\n",
ue_mod_idP, enb_mod_idP , rb_idP, sdu_buffer_sizeP, enb_flagP, enb_mod_idP); ue_mod_idP, enb_mod_idP , rb_idP, sdu_buffer_sizeP, enb_flagP, enb_mod_idP);
} }
}
sdu_list_p = &pdcp_sdu_list; sdu_list_p = &pdcp_sdu_list;
...@@ -482,6 +513,9 @@ boolean_t pdcp_data_ind(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t ...@@ -482,6 +513,9 @@ boolean_t pdcp_data_ind(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t
if (oai_emulation.info.otg_enabled == 1) { if (oai_emulation.info.otg_enabled == 1) {
module_id_t src_id, dst_id; module_id_t src_id, dst_id;
int ctime; int ctime;
rlc_util_print_hex_octets(PDCP,
&sdu_buffer_pP->data[payload_offset],
sdu_buffer_sizeP - payload_offset);
src_id = (enb_flagP != 0) ? ue_mod_idP : enb_mod_idP; src_id = (enb_flagP != 0) ? ue_mod_idP : enb_mod_idP;
dst_id = (enb_flagP == ENB_FLAG_NO) ? ue_mod_idP : enb_mod_idP; dst_id = (enb_flagP == ENB_FLAG_NO) ? ue_mod_idP : enb_mod_idP;
...@@ -924,7 +958,7 @@ boolean_t rrc_pdcp_config_asn1_req (module_id_t enb_mod_idP, ...@@ -924,7 +958,7 @@ boolean_t rrc_pdcp_config_asn1_req (module_id_t enb_mod_idP,
// can set the mch_id = i // can set the mch_id = i
if (enb_flagP) { if (enb_flagP) {
rb_id = (mch_id * maxSessionPerPMCH ) + lc_id; // 1 rb_id = (mch_id * maxSessionPerPMCH ) + lc_id + (maxDRB + 3)*MAX_MOBILES_PER_ENB; // 1
if (pdcp_mbms_array_eNB[enb_mod_idP][mch_id][lc_id].instanciated_instance == TRUE) if (pdcp_mbms_array_eNB[enb_mod_idP][mch_id][lc_id].instanciated_instance == TRUE)
action = CONFIG_ACTION_MBMS_MODIFY; action = CONFIG_ACTION_MBMS_MODIFY;
else else
...@@ -939,7 +973,8 @@ boolean_t rrc_pdcp_config_asn1_req (module_id_t enb_mod_idP, ...@@ -939,7 +973,8 @@ boolean_t rrc_pdcp_config_asn1_req (module_id_t enb_mod_idP,
pdcp_config_req_asn1 (NULL, // unused for MBMS pdcp_config_req_asn1 (
NULL, // unused for MBMS
enb_mod_idP, enb_mod_idP,
ue_mod_idP, ue_mod_idP,
frameP, frameP,
...@@ -1110,8 +1145,8 @@ boolean_t pdcp_config_req_asn1 (pdcp_t *pdcp_pP, ...@@ -1110,8 +1145,8 @@ boolean_t pdcp_config_req_asn1 (pdcp_t *pdcp_pP,
pdcp_mbms_array_eNB[enb_mod_idP][mch_idP][lc_idP].instanciated_instance = TRUE ; pdcp_mbms_array_eNB[enb_mod_idP][mch_idP][lc_idP].instanciated_instance = TRUE ;
pdcp_mbms_array_eNB[enb_mod_idP][mch_idP][lc_idP].rb_id = rb_idP; pdcp_mbms_array_eNB[enb_mod_idP][mch_idP][lc_idP].rb_id = rb_idP;
} else { } else {
pdcp_mbms_array_eNB[ue_mod_idP][mch_idP][lc_idP].instanciated_instance = TRUE ; pdcp_mbms_array_ue[ue_mod_idP][mch_idP][lc_idP].instanciated_instance = TRUE ;
pdcp_mbms_array_eNB[ue_mod_idP][mch_idP][lc_idP].rb_id = rb_idP; pdcp_mbms_array_ue[ue_mod_idP][mch_idP][lc_idP].rb_id = rb_idP;
} }
break; break;
#endif #endif
......
...@@ -372,7 +372,7 @@ int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_fl ...@@ -372,7 +372,7 @@ int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_fl
RLC_SDU_CONFIRM_NO, RLC_SDU_CONFIRM_NO,
pdcp_input_header.data_size, pdcp_input_header.data_size,
pdcp_input_sdu_buffer, pdcp_input_sdu_buffer,
PDCP_TRANSMISSION_MODE_DATA); //PDCP_TRANSMISSION_MODE_TRANSPARENT); PDCP_TRANSMISSION_MODE_TRANSPARENT);
AssertFatal (result == TRUE, "PDCP data request failed!\n"); AssertFatal (result == TRUE, "PDCP data request failed!\n");
} }
...@@ -504,7 +504,7 @@ int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t ...@@ -504,7 +504,7 @@ int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t
(data->pdcp_read_header.traffic_type == TRAFFIC_IPV4_TYPE_MULTICAST) /*TRAFFIC_IPV4_TYPE_MULTICAST */ || (data->pdcp_read_header.traffic_type == TRAFFIC_IPV4_TYPE_MULTICAST) /*TRAFFIC_IPV4_TYPE_MULTICAST */ ||
(data->pdcp_read_header.traffic_type == TRAFFIC_IPV4_TYPE_BROADCAST) /*TRAFFIC_IPV4_TYPE_BROADCAST */ ) { (data->pdcp_read_header.traffic_type == TRAFFIC_IPV4_TYPE_BROADCAST) /*TRAFFIC_IPV4_TYPE_BROADCAST */ ) {
#if defined (Rel10) #if defined (Rel10)
pdcp_mode = PDCP_TRANSMISSION_MODE_DATA; //PDCP_TRANSMISSION_MODE_TRANSPARENT; PDCP_TRANSMISSION_MODE_TRANSPARENT;
#else #else
pdcp_mode= PDCP_TRANSMISSION_MODE_DATA; pdcp_mode= PDCP_TRANSMISSION_MODE_DATA;
#endif #endif
...@@ -829,6 +829,10 @@ void pdcp_fifo_read_input_sdus_from_otg (frame_t frameP, eNB_flag_t enb_flagP, m ...@@ -829,6 +829,10 @@ void pdcp_fifo_read_input_sdus_from_otg (frame_t frameP, eNB_flag_t enb_flagP, m
pkt_size = (otg_pkt_info->otg_pkt).sdu_buffer_size; pkt_size = (otg_pkt_info->otg_pkt).sdu_buffer_size;
if (otg_pkt != NULL) { if (otg_pkt != NULL) {
if (is_ue == 0 ) { if (is_ue == 0 ) {
rlc_util_print_hex_octets(PDCP,
(unsigned char*)otg_pkt,
pkt_size);
//rb_id = (/*NB_eNB_INST +*/ dst_id -1 ) * MAX_NUM_RB + DTCH; //rb_id = (/*NB_eNB_INST +*/ dst_id -1 ) * MAX_NUM_RB + DTCH;
LOG_D(OTG,"[eNB %d] Frame %d sending packet %d from module %d on rab id %d (src %d, dst %d) pkt size %d for pdcp mode %d\n", LOG_D(OTG,"[eNB %d] Frame %d sending packet %d from module %d on rab id %d (src %d, dst %d) pkt size %d for pdcp mode %d\n",
enb_mod_idP, frameP, pkt_cnt++, module_id, rb_id, module_id, dst_id, pkt_size, pdcp_mode); enb_mod_idP, frameP, pkt_cnt++, module_id, rb_id, module_id, dst_id, pkt_size, pdcp_mode);
...@@ -837,6 +841,8 @@ void pdcp_fifo_read_input_sdus_from_otg (frame_t frameP, eNB_flag_t enb_flagP, m ...@@ -837,6 +841,8 @@ void pdcp_fifo_read_input_sdus_from_otg (frame_t frameP, eNB_flag_t enb_flagP, m
} }
else { else {
//rb_id= eNB_index * MAX_NUM_RB + DTCH; //rb_id= eNB_index * MAX_NUM_RB + DTCH;
LOG_D(OTG,"[UE %d] sending packet from module %d on rab id %d (src %d, dst %d) pkt size %d\n", LOG_D(OTG,"[UE %d] sending packet from module %d on rab id %d (src %d, dst %d) pkt size %d\n",
ue_mod_idP, src_id, rb_id, src_id, dst_id, pkt_size); ue_mod_idP, src_id, rb_id, src_id, dst_id, pkt_size);
result = pdcp_data_req( enb_mod_idP, result = pdcp_data_req( enb_mod_idP,
......
...@@ -627,6 +627,10 @@ rlc_um_data_req (void *rlc_pP, frame_t frameP, mem_block_t *sdu_pP) ...@@ -627,6 +627,10 @@ rlc_um_data_req (void *rlc_pP, frame_t frameP, mem_block_t *sdu_pP)
rlc_p->nb_sdu, rlc_p->nb_sdu,
rlc_p->current_sdu_index, rlc_p->current_sdu_index,
rlc_p->next_sdu_index); rlc_p->next_sdu_index);
rlc_util_print_hex_octets(
RLC,
(uint8_t*)&sdu_pP->data[sizeof (struct rlc_um_data_req_alloc)],
((struct rlc_um_data_req *) (sdu_pP->data))->data_size);
/*#ifndef USER_MODE /*#ifndef USER_MODE
rlc_um_time_us = (unsigned long int)(rt_get_time_ns ()/(RTIME)1000); rlc_um_time_us = (unsigned long int)(rt_get_time_ns ()/(RTIME)1000);
......
...@@ -100,12 +100,24 @@ void config_req_rlc_um_asn1 (frame_t frameP, ...@@ -100,12 +100,24 @@ void config_req_rlc_um_asn1 (frame_t frameP,
uint32_t dl_sn_FieldLength = 0; uint32_t dl_sn_FieldLength = 0;
uint32_t t_Reordering; uint32_t t_Reordering;
rlc_um_entity_t *rlc_p = NULL; rlc_um_entity_t *rlc_p = NULL;
#if defined(rel10) #if defined(Rel10)
if (mbms_flagP) { if (mbms_flagP) {
if (eNB_flagP) { if (eNB_flagP) {
rlc_p = &rlc_mbms_array_eNB[enb_module_idP][mbms_service_idP][mbms_session_idP].um; rlc_p = &rlc_mbms_array_eNB[enb_module_idP][mbms_service_idP][mbms_session_idP].um;
LOG_D(RLC,"eNB config_req_rlc_um_asn1 rlc_um_p : %p RB %u service %u session %u",
rlc_p,
rb_idP,
mbms_service_idP,
mbms_session_idP
);
} else { } else {
rlc_p = &rlc_mbms_array_ue[ue_module_idP][mbms_service_idP][mbms_session_idP].um; rlc_p = &rlc_mbms_array_ue[ue_module_idP][mbms_service_idP][mbms_session_idP].um;
LOG_D(RLC,"UE config_req_rlc_um_asn1 rlc_um_p : %p RB %u service %u session %u",
rlc_p,
rb_idP,
mbms_service_idP,
mbms_session_idP
);
} }
} }
else else
...@@ -198,6 +210,9 @@ void config_req_rlc_um_asn1 (frame_t frameP, ...@@ -198,6 +210,9 @@ void config_req_rlc_um_asn1 (frame_t frameP,
ul_sn_FieldLength, ul_sn_FieldLength,
mbms_flagP); mbms_flagP);
} }
if (mbms_flagP == MBMS_FLAG_YES) {
rlc_p->allocation = TRUE;
}
} }
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -379,8 +394,7 @@ void rlc_um_set_debug_infos(rlc_um_entity_t *rlc_pP, ...@@ -379,8 +394,7 @@ void rlc_um_set_debug_infos(rlc_um_entity_t *rlc_pP,
{ {
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][SET DEBUG INFOS] enb_module_id %u ue_module_id %u rb_id %d rb_type %d\n", LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][SET DEBUG INFOS] enb_module_id %u ue_module_id %u rb_id %d rb_type %d\n",
frameP, frameP,
(rlc_pP->is_enb) ? "eNB" : "UE", (eNB_flagP) ? "eNB" : "UE",
eNB_flagP,
enb_module_idP, enb_module_idP,
ue_module_idP, ue_module_idP,
rb_idP, rb_idP,
...@@ -389,7 +403,7 @@ void rlc_um_set_debug_infos(rlc_um_entity_t *rlc_pP, ...@@ -389,7 +403,7 @@ void rlc_um_set_debug_infos(rlc_um_entity_t *rlc_pP,
rlc_pP->enb_module_id = enb_module_idP; rlc_pP->enb_module_id = enb_module_idP;
rlc_pP->ue_module_id = ue_module_idP; rlc_pP->ue_module_id = ue_module_idP;
rlc_pP->rb_id = rb_idP; rlc_pP->rb_id = rb_idP;
if (rb_typeP != SIGNALLING_RADIO_BEARER) { if (rb_typeP == RADIO_ACCESS_BEARER) {
rlc_pP->is_data_plane = 1; rlc_pP->is_data_plane = 1;
} else { } else {
rlc_pP->is_data_plane = 0; rlc_pP->is_data_plane = 0;
......
...@@ -89,7 +89,12 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP) ...@@ -89,7 +89,12 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
return; return;
} }
#if defined(TRACE_RLC_UM_SEGMENT) #if defined(TRACE_RLC_UM_SEGMENT)
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10\n", rlc_pP->module_id, rlc_pP->rb_id, frameP); LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10\n",
frameP,
(rlc_pP->is_enb) ? "eNB" : "UE",
rlc_pP->enb_module_id,
rlc_pP->ue_module_id,
rlc_pP->rb_id);
#endif #endif
list_init (&pdus, NULL); // param string identifying the list is NULL list_init (&pdus, NULL); // param string identifying the list is NULL
pdu_mem_p = NULL; pdu_mem_p = NULL;
...@@ -766,8 +771,8 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP) ...@@ -766,8 +771,8 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
rlc_pP->ue_module_id, rlc_pP->ue_module_id,
rlc_pP->rb_id, rlc_pP->rb_id,
pdu_remaining_size); pdu_remaining_size);
memcpy(data, data_sdu_p, pdu_remaining_size);
#endif #endif
memcpy(data, data_sdu_p, pdu_remaining_size);
// free SDU // free SDU
rlc_pP->buffer_occupancy -= sdu_mngt_p->sdu_remaining_size; rlc_pP->buffer_occupancy -= sdu_mngt_p->sdu_remaining_size;
free_mem_block (rlc_pP->input_sdus[rlc_pP->current_sdu_index]); free_mem_block (rlc_pP->input_sdus[rlc_pP->current_sdu_index]);
......
...@@ -53,8 +53,11 @@ void rlc_util_print_hex_octets(comp_name_t componentP, unsigned char* dataP, uns ...@@ -53,8 +53,11 @@ void rlc_util_print_hex_octets(comp_name_t componentP, unsigned char* dataP, uns
} }
LOG_T(componentP, " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\n");
LOG_T(componentP, "------+-------------------------------------------------|\n");
LOG_T(componentP, "+-----+-------------------------------------------------+\n");
LOG_T(componentP, "| | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\n");
LOG_T(componentP, "+-----+-------------------------------------------------+\n");
for (octet_index = 0; octet_index < sizeP; octet_index++) { for (octet_index = 0; octet_index < sizeP; octet_index++) {
if ((octet_index % 16) == 0){ if ((octet_index % 16) == 0){
if (octet_index != 0) { if (octet_index != 0) {
...@@ -359,6 +362,8 @@ rlc_op_status_t rlc_data_req (module_id_t enb_mod_idP, ...@@ -359,6 +362,8 @@ rlc_op_status_t rlc_data_req (module_id_t enb_mod_idP,
#ifdef Rel10 #ifdef Rel10
rb_id_t mbms_rb_id = 0; rb_id_t mbms_rb_id = 0;
rlc_um_entity_t *rlc_um_p = NULL; rlc_um_entity_t *rlc_um_p = NULL;
rlc_mbms_id_t *mbms_id_p = NULL;
logical_chan_id_t log_ch_id = 0;
#endif #endif
#ifdef DEBUG_RLC_DATA_REQ #ifdef DEBUG_RLC_DATA_REQ
LOG_D(RLC,"rlc_data_req: %s enb id %u ue id %u, rb_id %u (MAX %d), muip %d, confirmP %d, sud_sizeP %d, sdu_pP %p\n", LOG_D(RLC,"rlc_data_req: %s enb id %u ue id %u, rb_id %u (MAX %d), muip %d, confirmP %d, sud_sizeP %d, sdu_pP %p\n",
...@@ -401,7 +406,11 @@ rlc_op_status_t rlc_data_req (module_id_t enb_mod_idP, ...@@ -401,7 +406,11 @@ rlc_op_status_t rlc_data_req (module_id_t enb_mod_idP,
oai_emulation.info.first_ue_local); oai_emulation.info.first_ue_local);
} }
#endif #endif
if (MBMS_flagP) {
AssertFatal (rb_idP < NB_RB_MBMS_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MBMS_MAX);
} else {
AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX); AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
}
DevAssert(sdu_pP != NULL); DevAssert(sdu_pP != NULL);
DevCheck(sdu_sizeP > 0, sdu_sizeP, 0, 0); DevCheck(sdu_sizeP > 0, sdu_sizeP, 0, 0);
...@@ -409,6 +418,33 @@ rlc_op_status_t rlc_data_req (module_id_t enb_mod_idP, ...@@ -409,6 +418,33 @@ rlc_op_status_t rlc_data_req (module_id_t enb_mod_idP,
DevCheck(MBMS_flagP == 0, MBMS_flagP, 0, 0); DevCheck(MBMS_flagP == 0, MBMS_flagP, 0, 0);
#endif #endif
#ifdef Rel10
if (MBMS_flagP == TRUE) {
if (enb_flagP) {
log_ch_id = rlc_mbms_enb_get_lcid_by_rb_id(enb_mod_idP,rb_idP);
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][log_ch_id];
rlc_um_p = &rlc_mbms_array_eNB[enb_mod_idP][mbms_id_p->service_id][mbms_id_p->session_id].um;
LOG_D(RLC,"eNB rlc_um_p : %p RB %u service %u session %u\n",
rlc_um_p,
rb_idP,
mbms_id_p->service_id,
mbms_id_p->session_id
);
} else {
log_ch_id = rlc_mbms_ue_get_lcid_by_rb_id(ue_mod_idP,rb_idP);
mbms_id_p = &rlc_mbms_lcid2service_session_id_ue[ue_mod_idP][log_ch_id];
rlc_um_p = &rlc_mbms_array_ue[ue_mod_idP][mbms_id_p->service_id][mbms_id_p->session_id].um;
LOG_D(RLC,"UE rlc_um_p : %p RB %u service %u session %u\n",
rlc_um_p,
rb_idP,
mbms_id_p->service_id,
mbms_id_p->session_id
);
}
} else
#endif
{
if (enb_flagP) { if (enb_flagP) {
rlc_mode = rlc_array_eNB[enb_mod_idP][ue_mod_idP][rb_idP].mode; rlc_mode = rlc_array_eNB[enb_mod_idP][ue_mod_idP][rb_idP].mode;
switch (rlc_mode) { switch (rlc_mode) {
...@@ -446,7 +482,7 @@ rlc_op_status_t rlc_data_req (module_id_t enb_mod_idP, ...@@ -446,7 +482,7 @@ rlc_op_status_t rlc_data_req (module_id_t enb_mod_idP,
AssertFatal (0 , "UE RLC internal memory error rb id %u module %u!\n", rb_idP, ue_mod_idP); AssertFatal (0 , "UE RLC internal memory error rb id %u module %u!\n", rb_idP, ue_mod_idP);
} }
} }
}
if (MBMS_flagP == 0) { if (MBMS_flagP == 0)