From 568bf8ae35d7288acf1d5ba450b79a00b145ae5f Mon Sep 17 00:00:00 2001
From: Robert Schmidt <robert.schmidt@eurecom.fr>
Date: Mon, 9 Apr 2018 15:42:42 +0200
Subject: [PATCH] bugfix: deactive slice_counter

slice_counter had a wrong condition, not scheduling in DLSCH if the number of
slices is greater than one
---
 openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 14 +++++++-------
 openair2/LAYER2/MAC/mac.h                 |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
index 79589a064e..ad48aba116 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
@@ -415,7 +415,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in
 
   sli->tot_pct_dl = 0;
   sli->avg_pct_dl = 1.0 / sli->n_dl;
-  sli->slice_counter = sli->n_dl;
+  //sli->slice_counter = sli->n_dl;
 
   // reset the slice percentage for inactive slices
   for (i = sli->n_dl; i < MAX_NUM_SLICES; i++) {
@@ -727,13 +727,13 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP,
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR, VCD_FUNCTION_OUT);
 
-  RC.mac[module_idP]->slice_info.slice_counter--;
+  //RC.mac[module_idP]->slice_info.slice_counter--;
   // Do the multiplexing and actual allocation only when all slices have been pre-processed.
-  if (RC.mac[module_idP]->slice_info.slice_counter > 0) {
-    stop_meas(&eNB->schedule_dlsch);
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_OUT);
-    return;
-  }
+  //if (RC.mac[module_idP]->slice_info.slice_counter > 0) {
+    //stop_meas(&eNB->schedule_dlsch);
+    //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_OUT);
+    //return;
+  //}
 
   if (RC.mac[module_idP]->slice_info.interslice_share_active) {
     dlsch_scheduler_interslice_multiplexing(module_idP, frameP, subframeP);
diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h
index cb6aa5bf3b..e16d24b98b 100644
--- a/openair2/LAYER2/MAC/mac.h
+++ b/openair2/LAYER2/MAC/mac.h
@@ -1230,7 +1230,7 @@ typedef struct {
 
 typedef struct {
     /// counter used to indicate when all slices have pre-allocated UEs
-    int      slice_counter;
+    //int      slice_counter;
 
     /// indicates whether remaining RBs after first intra-slice allocation will
     /// be allocated to UEs of the same slice
-- 
GitLab