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,6 +283,7 @@ void rx_sdu( ...@@ -278,6 +283,7 @@ void rx_sdu(
LOG_T(MAC,"\n"); LOG_T(MAC,"\n");
#endif #endif
if (UE_id != -1) {
// This check is just to make sure we didn't get a bogus SDU length, to be removed ... // This check is just to make sure we didn't get a bogus SDU length, to be removed ...
if (rx_lengths[i]<CCCH_PAYLOAD_SIZE_MAX) { if (rx_lengths[i]<CCCH_PAYLOAD_SIZE_MAX) {
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DCCH, received %d bytes form UE %d on LCID %d \n", LOG_D(MAC,"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DCCH, received %d bytes form UE %d on LCID %d \n",
...@@ -298,6 +304,7 @@ void rx_sdu( ...@@ -298,6 +304,7 @@ void rx_sdu(
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,6 +325,7 @@ void rx_sdu( ...@@ -318,6 +325,7 @@ 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 (UE_id != -1) {
if ((rx_lengths[i] <SCH_PAYLOAD_SIZE_MAX) && (rx_lengths[i] > 0) ) { // MAX SIZE OF transport block if ((rx_lengths[i] <SCH_PAYLOAD_SIZE_MAX) && (rx_lengths[i] > 0) ) { // MAX SIZE OF transport block
mac_rlc_data_ind( mac_rlc_data_ind(
enb_mod_idP, enb_mod_idP,
...@@ -334,11 +342,13 @@ void rx_sdu( ...@@ -334,11 +342,13 @@ void rx_sdu(
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;
default : //if (rx_lcids[i] >= DTCH) { default : //if (rx_lcids[i] >= DTCH) {
if (UE_id != -1)
UE_list->eNB_UE_stats[CC_idP][UE_id].num_errors_rx+=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);
...@@ -350,6 +360,7 @@ void rx_sdu( ...@@ -350,6 +360,7 @@ 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)) {
if (UE_id != -1)
UE_list->eNB_UE_stats[CC_idP][UE_id].total_num_errors_rx+=1; UE_list->eNB_UE_stats[CC_idP][UE_id].total_num_errors_rx+=1;
if (msg3_flagP != NULL) { if (msg3_flagP != NULL) {
...@@ -359,10 +370,12 @@ void rx_sdu( ...@@ -359,10 +370,12 @@ void rx_sdu(
} }
} }
} else { } else {
if (UE_id != -1) {
UE_list->eNB_UE_stats[CC_idP][UE_id].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_pdu_bytes_rx+=sdu_lenP; 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; 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);
stop_meas(&eNB->rx_ulsch_sdu); stop_meas(&eNB->rx_ulsch_sdu);
......
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