hack: in schedule_ue_spec, 3 bytes are "reserved" (this should be
done better). An RLC AM entity may ask for only 2 bytes for
ACKing and get a TBS of 32 bits and due to these 3 reserved bytes we may
end up with only 1 byte left for RLC, which is not enough. This hack
prevents the problem. To be done better at some point. If the function
schedule_ue_spec is (has been) reworked, this hack can be removed.
Dig for "TBS - ta_len - header_length_total - sdu_length_total - 3"
in schedule_ue_spec.
This should be done better at some point.
Selects the UE with the highest CQI. If two UEs have the same CQI,
choses the one with highest number of bytes in RLC queue. Allocates as
many RBGs as possible, and potentially continues with the next UE.
Selects UE with highest coefficient. Allocates until there are no more
RBGs to allocate, or UE has no more data. In the latter case, continues
with the next UE (second-highest coefficient).
- Loop only to next UE instead of jumping multiple
- mark used RBGs in rbg_mask
- Only calculate number of RBs based on CQI when UE is selected, instead
of calculating for all UEs which might be unnecessary.
- When looping the list of UEs for RB allocation, remove UEs that have
no data anymore instead of skipping them.
This refactors the preprocessor. The new preprocessor implements the
same scheduling strategy (Modified Round-Robin: give resources according
to round-robin, then group) but should be fairer by changing every time
the RR start UE (i.e., 1st TTI UE 0 starts, 2nd TTI UE 1, etc) when the
UE number is not a divisor/multiple of the RBG size (and the last RBG is
often smaller). This also removes all unneeded code of the preprocessor
such as allocate(), positioning(), etc.
Previously, the various rlc_*_ind() functions had a parameter to enable
the MAC to specify the max TB size that a subsequent call to the
corresponding rlc_*_req() (!) function would return. This patch removes
this parameter from the rlc_*_ind() functions and makes the parameter
working that is already in the rlc_*_req() functions.
store_dlsch_buffer() puts the RLC buffer status results in the
UE_TEMPLATE, which is per-CC. Since the DLSCH scheduler works per-CC,
too, we pass the right CC. However, this is not strictly necessary, as
we could do this once before every CC, and it might be updated.
UE_list_t is now used as a separate list. It can be e.g. used in the
scheduler to mark groups of users. The original UE_list_t is renamed to
UE_info_t to reflect that it is a container for information about UEs.
* Simplify store_dlsch_buffer()
* Simplify assign_rbs_required()
* Simplify dlsch_scheduler_pre_processor_partitioning()
* Simplify dlsch_scheduler_pre_processor_accounting() and dlsch_scheduler_pre_processor_accounting_allocate()
* Simplify allocation printing
The original functions used in the fairRR scheduler have been moved to
eNB_scheduler_fairRR
* Remove MIMO_mode_indicator: it is simply not used ATM
* Remove min_rb_unit as parameter: function auto-detects
* Remove commented code
* Remove slice sharing/multiplexing: it is broken
* Remove UE sorting, add UE with add_new_ue() in MAC
- UE sorting is useless overhead on every iteration, instead it should
be governed by a scheduling algorithm (e.g., RR or PF)
- The MAC keeps a UE list and automatically adds a UE
- UE_list empty, set head to -1
* Remove slice_positioning: the slicing functionality is broken
* Remove unused/untested code
In TDD mode, CQI requests are not possible in special subframes (at
least for some TDD configurations, see 36.213 7.2.3 that says "a
DL subframe is valid if it does not contain a DwPTS field if the
length is less than 7680 Ts").
In the code, we simply disable CQI requests in special subframes,
no matter what the length of DwPTS.
A problem can arise if the DCI0 for a given UE are sent only in
those special subframes. In this case the UE will never report
CQI and the eNB will use low MCS for this UE, impacting performances.
Another, related, problem is when there are several UEs. There again
one UE might always get its DCI0 in special subframes and thus never
report CQI. There again, performance issues.
This commit is an attempt to improve the situation.
It does two things.
1 - tag the UE as schedulable in the function UE_is_to_be_scheduled
if the cqi_req_timer is expired
2 - use cqi_req_timer as a criterium when ordering UEs for UL scheduling
The value chosen for the expiration of the cqi_req_timer in
UE_is_to_be_scheduled is quite high (300) because as the code is
today we may overschedule the UE for short bursts until we receive
a CQI from the UE. [TODO: fix the code properly to avoid this behavior.]
Note: the fairRR scheduler has not been analyzed and this commit may
not fix anything in case the fairRR scheduler is used.
- size of PUCCH has been fixed to:
- 2 RBs for N_RB_UL = 25 (1 RB at top of resource grid, 1 RB at bottom)
- 4 RBs for N_RB_UL = 50
- 6 RBs for N_RB_UL = 100
this is arbitrary and will need some rework at some point.
This may be also wrong. PUCCH size actually depends on DL traffic
(if the ack/nack is not done in PUSCH) and scheduling request
configurations.
- add sched_frame %= 1024 at one needed place
- reserve RBs for retransmission
this was not done so new transmissions were scheduled in the same
RBs. Since the code works with the notion of 'first_rb' only, it
was decided to skip all RBs lower than those retransmitted. This
works but is not correct (imagine we have to retransmit RB 23, then
all RBs < 23 will not be used for new transmission). The work to
fix this properly is complex, a lot has to change, so let's do it
this simple way for now.
- sort_ue_ul was not correct
- add the function maxround_ul to use the correct 'round' (the one
from DL was used, which is totally wrong)
- be sure to use the correct frame/subframe to get the correct HARQ pid