Commit 31ef9b52 authored by Cedric Roux's avatar Cedric Roux

cleanup - rewrite a bit allocate_CCEs for better logging

We want the log in case of failure also for the case:
    if (nCCE + (1<<dci_alloc->L) > nCCE_max)
parent 324e6501
...@@ -1080,13 +1080,8 @@ try_again: ...@@ -1080,13 +1080,8 @@ try_again:
dci_alloc->rnti,1<<dci_alloc->L, dci_alloc->rnti,1<<dci_alloc->L,
nCCE,nCCE_max,DCI_pdu->num_pdcch_symbols); nCCE,nCCE_max,DCI_pdu->num_pdcch_symbols);
if (nCCE + (1<<dci_alloc->L) > nCCE_max) { if (nCCE + (1<<dci_alloc->L) > nCCE_max)
if (DCI_pdu->num_pdcch_symbols == 3)
goto failed; goto failed;
DCI_pdu->num_pdcch_symbols++;
nCCE_max = mac_xface->get_nCCE_max(module_idP,CC_idP,DCI_pdu->num_pdcch_symbols,subframeP);
goto try_again;
}
// number of CCEs left can potentially hold this allocation // number of CCEs left can potentially hold this allocation
fCCE = get_nCCE_offset(CCE_table, fCCE = get_nCCE_offset(CCE_table,
...@@ -1096,9 +1091,11 @@ try_again: ...@@ -1096,9 +1091,11 @@ try_again:
dci_alloc->rnti, dci_alloc->rnti,
subframeP); subframeP);
if (fCCE == -1) { if (fCCE == -1) {
failed:
if (DCI_pdu->num_pdcch_symbols == 3) { if (DCI_pdu->num_pdcch_symbols == 3) {
LOG_I(MAC,"subframe %d: Dropping Allocation for RNTI %x\n", LOG_I(MAC,"subframe %d: Dropping Allocation for RNTI %x (DCI %d/%d)\n",
subframeP,dci_alloc->rnti); subframeP,dci_alloc->rnti,
i, DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci);
for (j=0;j<=i;j++){ for (j=0;j<=i;j++){
LOG_I(MAC,"DCI %d/%d (%d,%d) : rnti %x dci format %d, aggreg %d nCCE %d / %d (num_pdcch_symbols %d)\n", LOG_I(MAC,"DCI %d/%d (%d,%d) : rnti %x dci format %d, aggreg %d nCCE %d / %d (num_pdcch_symbols %d)\n",
j,DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci, j,DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci,
...@@ -1108,7 +1105,7 @@ try_again: ...@@ -1108,7 +1105,7 @@ try_again:
nCCE,nCCE_max,DCI_pdu->num_pdcch_symbols); nCCE,nCCE_max,DCI_pdu->num_pdcch_symbols);
} }
//dump_CCE_table(CCE_table,nCCE_max,subframeP,dci_alloc->rnti,1<<dci_alloc->L); //dump_CCE_table(CCE_table,nCCE_max,subframeP,dci_alloc->rnti,1<<dci_alloc->L);
goto failed; goto fatal;
} }
DCI_pdu->num_pdcch_symbols++; DCI_pdu->num_pdcch_symbols++;
nCCE_max = mac_xface->get_nCCE_max(module_idP,CC_idP,DCI_pdu->num_pdcch_symbols,subframeP); nCCE_max = mac_xface->get_nCCE_max(module_idP,CC_idP,DCI_pdu->num_pdcch_symbols,subframeP);
...@@ -1126,7 +1123,7 @@ try_again: ...@@ -1126,7 +1123,7 @@ try_again:
return 0; return 0;
failed: fatal:
return -1; return -1;
} }
......
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