Commit 849b1a0e authored by roux's avatar roux

better handling of MAC CE CRNTI in UL

plus some minor bugfixes.


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7789 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent f8629cd2
...@@ -126,9 +126,14 @@ void rx_sdu( ...@@ -126,9 +126,14 @@ void rx_sdu(
break; break;
case CRNTI: case CRNTI:
LOG_D(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d : Received CRNTI %d \n", LOG_W(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d : Received CRNTI %2.2x%2.2x\n",
enb_mod_idP, CC_idP, rx_ces[i], payload_ptr[0]); enb_mod_idP, CC_idP, rx_ces[i], payload_ptr[0], payload_ptr[1]);
payload_ptr+=1; payload_ptr+=2;
/* FIXME we don't process this CE yet */
if (msg3_flagP != NULL) {
LOG_W(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d : CRNTI in Msg3 not handled\n");
*msg3_flagP = 0;
}
break; break;
case TRUNCATED_BSR: case TRUNCATED_BSR:
...@@ -278,26 +283,28 @@ void rx_sdu( ...@@ -278,26 +283,28 @@ void rx_sdu(
LOG_T(MAC,"\n"); LOG_T(MAC,"\n");
#endif #endif
// This check is just to make sure we didn't get a bogus SDU length, to be removed ... if (UE_id != -1) {
if (rx_lengths[i]<CCCH_PAYLOAD_SIZE_MAX) { // This check is just to make sure we didn't get a bogus SDU length, to be removed ...
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DCCH, received %d bytes form UE %d on LCID %d \n", if (rx_lengths[i]<CCCH_PAYLOAD_SIZE_MAX) {
enb_mod_idP,CC_idP,frameP, rx_lengths[i], UE_id, rx_lcids[i]); LOG_D(MAC,"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DCCH, received %d bytes form UE %d on LCID %d \n",
enb_mod_idP,CC_idP,frameP, rx_lengths[i], UE_id, rx_lcids[i]);
mac_rlc_data_ind(
enb_mod_idP, mac_rlc_data_ind(
rntiP, enb_mod_idP,
rntiP,
enb_mod_idP, enb_mod_idP,
frameP, frameP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
rx_lcids[i], rx_lcids[i],
(char *)payload_ptr, (char *)payload_ptr,
rx_lengths[i], rx_lengths[i],
1, 1,
NULL);//(unsigned int*)crc_status); NULL);//(unsigned int*)crc_status);
UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]]+=1; UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]]+=1;
UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]]+=rx_lengths[i]; UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]]+=rx_lengths[i];
} }
} /* UE_id != -1 */
// } // }
break; break;
...@@ -318,28 +325,31 @@ void rx_sdu( ...@@ -318,28 +325,31 @@ void rx_sdu(
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DTCH, received %d bytes from UE %d for lcid %d\n", LOG_D(MAC,"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DTCH, received %d bytes from UE %d for lcid %d\n",
enb_mod_idP,CC_idP,frameP, rx_lengths[i], UE_id,rx_lcids[i]); enb_mod_idP,CC_idP,frameP, rx_lengths[i], UE_id,rx_lcids[i]);
if ((rx_lengths[i] <SCH_PAYLOAD_SIZE_MAX) && (rx_lengths[i] > 0) ) { // MAX SIZE OF transport block if (UE_id != -1) {
mac_rlc_data_ind( if ((rx_lengths[i] <SCH_PAYLOAD_SIZE_MAX) && (rx_lengths[i] > 0) ) { // MAX SIZE OF transport block
enb_mod_idP, mac_rlc_data_ind(
rntiP, enb_mod_idP,
enb_mod_idP, rntiP,
frameP, enb_mod_idP,
ENB_FLAG_YES, frameP,
MBMS_FLAG_NO, ENB_FLAG_YES,
DTCH, MBMS_FLAG_NO,
(char *)payload_ptr, DTCH,
rx_lengths[i], (char *)payload_ptr,
1, rx_lengths[i],
NULL);//(unsigned int*)crc_status); 1,
UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]]+=1; NULL);//(unsigned int*)crc_status);
UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]]+=rx_lengths[i]; UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]]+=1;
} UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]]+=rx_lengths[i];
}
} /* UE_id != -1 */
// } // }
break; break;
default : //if (rx_lcids[i] >= DTCH) { default : //if (rx_lcids[i] >= DTCH) {
UE_list->eNB_UE_stats[CC_idP][UE_id].num_errors_rx+=1; if (UE_id != -1)
UE_list->eNB_UE_stats[CC_idP][UE_id].num_errors_rx+=1;
LOG_E(MAC,"[eNB %d] CC_id %d Frame %d : received unsupported or unknown LCID %d from UE %d ", LOG_E(MAC,"[eNB %d] CC_id %d Frame %d : received unsupported or unknown LCID %d from UE %d ",
enb_mod_idP, CC_idP, frameP, rx_lcids[i], UE_id); enb_mod_idP, CC_idP, frameP, rx_lcids[i], UE_id);
break; break;
...@@ -350,7 +360,8 @@ void rx_sdu( ...@@ -350,7 +360,8 @@ void rx_sdu(
/* NN--> FK: we could either check the payload, or use a phy helper to detect a false msg3 */ /* NN--> FK: we could either check the payload, or use a phy helper to detect a false msg3 */
if ((num_sdu == 0) && (num_ce==0)) { if ((num_sdu == 0) && (num_ce==0)) {
UE_list->eNB_UE_stats[CC_idP][UE_id].total_num_errors_rx+=1; if (UE_id != -1)
UE_list->eNB_UE_stats[CC_idP][UE_id].total_num_errors_rx+=1;
if (msg3_flagP != NULL) { if (msg3_flagP != NULL) {
if( *msg3_flagP == 1 ) { if( *msg3_flagP == 1 ) {
...@@ -359,9 +370,11 @@ void rx_sdu( ...@@ -359,9 +370,11 @@ void rx_sdu(
} }
} }
} else { } else {
UE_list->eNB_UE_stats[CC_idP][UE_id].pdu_bytes_rx=sdu_lenP; if (UE_id != -1) {
UE_list->eNB_UE_stats[CC_idP][UE_id].total_pdu_bytes_rx+=sdu_lenP; UE_list->eNB_UE_stats[CC_idP][UE_id].pdu_bytes_rx=sdu_lenP;
UE_list->eNB_UE_stats[CC_idP][UE_id].total_num_pdus_rx+=1; UE_list->eNB_UE_stats[CC_idP][UE_id].total_pdu_bytes_rx+=sdu_lenP;
UE_list->eNB_UE_stats[CC_idP][UE_id].total_num_pdus_rx+=1;
}
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU,0);
......
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