From 324e6501d617befc803b92f41bfe288023486c6f Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 23 May 2017 15:42:09 +0200 Subject: [PATCH 1/3] bugfix: wrong CCE allocation We have to not only ensure that the CCE is free but also that it's below the number of availables CCEs with respect to the current PDCCH size. --- openair1/PHY/LTE_TRANSPORT/dci.c | 3 ++- openair2/LAYER2/MAC/eNB_scheduler_primitives.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c index 8b7a818297..9a929947ee 100755 --- a/openair1/PHY/LTE_TRANSPORT/dci.c +++ b/openair1/PHY/LTE_TRANSPORT/dci.c @@ -2653,7 +2653,8 @@ int get_nCCE_offset_l1(int *CCE_table, search_space_free = 1; for (l=0; l= nCCE || CCE_table[cce] == 1) { search_space_free = 0; break; } diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index 56ede260e8..6554f49d10 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -990,7 +990,8 @@ int get_nCCE_offset(int *CCE_table, search_space_free = 1; for (l=0; l= nCCE || CCE_table[cce] == 1) { search_space_free = 0; break; } From 31ef9b520311cdcdd13e5de6194c3d47143b483f Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 23 May 2017 15:44:48 +0200 Subject: [PATCH 2/3] cleanup - rewrite a bit allocate_CCEs for better logging We want the log in case of failure also for the case: if (nCCE + (1<L) > nCCE_max) --- .../LAYER2/MAC/eNB_scheduler_primitives.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index 6554f49d10..6c7ec35399 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -1080,13 +1080,8 @@ try_again: dci_alloc->rnti,1<L, nCCE,nCCE_max,DCI_pdu->num_pdcch_symbols); - if (nCCE + (1<L) > nCCE_max) { - if (DCI_pdu->num_pdcch_symbols == 3) - 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; - } + if (nCCE + (1<L) > nCCE_max) + goto failed; // number of CCEs left can potentially hold this allocation fCCE = get_nCCE_offset(CCE_table, @@ -1096,9 +1091,11 @@ try_again: dci_alloc->rnti, subframeP); if (fCCE == -1) { +failed: if (DCI_pdu->num_pdcch_symbols == 3) { - LOG_I(MAC,"subframe %d: Dropping Allocation for RNTI %x\n", - subframeP,dci_alloc->rnti); + LOG_I(MAC,"subframe %d: Dropping Allocation for RNTI %x (DCI %d/%d)\n", + subframeP,dci_alloc->rnti, + i, DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci); 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", j,DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci, @@ -1108,7 +1105,7 @@ try_again: nCCE,nCCE_max,DCI_pdu->num_pdcch_symbols); } //dump_CCE_table(CCE_table,nCCE_max,subframeP,dci_alloc->rnti,1<L); - goto failed; + goto fatal; } DCI_pdu->num_pdcch_symbols++; nCCE_max = mac_xface->get_nCCE_max(module_idP,CC_idP,DCI_pdu->num_pdcch_symbols,subframeP); @@ -1126,7 +1123,7 @@ try_again: return 0; -failed: +fatal: return -1; } From b67847c9cf271f887ba6e74fc522f275b7f2471e Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 23 May 2017 17:33:29 +0200 Subject: [PATCH 3/3] minor: fix file permissions (from 755 to 644) --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 openair2/LAYER2/MAC/eNB_scheduler_dlsch.c diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c old mode 100755 new mode 100644