Commit Graph

27 Commits

Author SHA1 Message Date
Andreas Eversberg bd554829a6 alloc_algorithm_b: Add seperate function to shrink rx window when TS are removed
After reduce_rx_window() and update_rx_win_max() was called, one or more TS
might be removed. tx_win_min and tx_win_max must be adjusted to the new range
of allocated slots.
2014-01-04 15:52:00 +01:00
Andreas Eversberg 24ba1d00ae alloc_algorithm_b: Increment 'i', so allocated TS will not exceed tx_range 2014-01-04 15:52:00 +01:00
Andreas Eversberg b5f790a63a alloc_algorithm_b: Do not select uplink slots that cannot be used for downlink
In order to poll MS, the mobile must be able to receive polling request.

In order to allow the MS to transmit, the USF must be received by the mobile.
2014-01-04 15:52:00 +01:00
Andreas Eversberg 92acbaaaa2 alloc_algorithm_b: Set tx_range to 8, if all 8 TS are supported by MS 2014-01-04 15:52:00 +01:00
Andreas Eversberg 315576fa1a alloc_algorithm_b: For type 1 MS, limit number of donwlink TS to 5
The algorithm does not support more than 5 TS on downlink for type 1 MS.
Supporting more than 5 TS would require adding more complexity to this
algorithm. MS that support more than 4 (or 5) TS on downlink are rare,
if they really exist.
2014-01-04 15:51:10 +01:00
Andreas Eversberg d25bc37da2 alloc_algorithm_b: Correctly increment RX/TX window, even if TS is not useable 2014-01-04 15:14:19 +01:00
Holger Hans Peter Freyther a7835299ef alloc: Move the uplink ts selection/pre-assignment out of the code
Create a select_ul_slots which is very (95%) similar to the
select_dl_slots handling. This needs to be refactored and the
todo for multiple uplink slots should be handled too.

Add a warning about a potential failure on a busy PCU.
2013-12-26 10:22:18 +01:00
Holger Hans Peter Freyther 488eddf954 alloc: Move the selection of the first enabled pdch to a new method 2013-12-26 10:22:18 +01:00
Holger Hans Peter Freyther c5caccccc9 alloc: Move the tx window calculation to a new method 2013-12-26 10:22:18 +01:00
Holger Hans Peter Freyther 0dbe724de2 alloc: Move upating of the rx window max for Type==1 to a new method 2013-12-26 10:22:18 +01:00
Holger Hans Peter Freyther 73a45d6759 alloc: Move the collision handling to a new method
The naming of RX/TX still looks fishy and it should use DL/UL instead.
Work on pointers right now. We could introduce a struct with the window
min and max and pass this struct. The usage of 'D' appears wrong in the
ul_usage..
2013-12-26 10:22:18 +01:00
Holger Hans Peter Freyther 77f4307292 alloc: Move the selection of downlink slots to a new method
This code could evolve into working for Uplink and Downlink. The
only different for the final Uplink assignment is that free USFs
are collected.
2013-12-26 10:21:57 +01:00
Holger Hans Peter Freyther 55e75a0a30 alloc: Simplify the assignment of Trb and Ttb
Put the cases for MS_A/MS_B and MS_A/MS_C together.
2013-12-25 20:36:02 +01:00
Holger Hans Peter Freyther e0166a6d6c alloc: Add a note that the tx window handling differs from rx
It looks like the code is different (without a reason) a good
reason.
2013-12-25 20:36:02 +01:00
Holger Hans Peter Freyther bf0d0c7c32 tbf: Kill the tsc member as it duplicates data
We can just use first_ts and the trx/pdch to extract this information.
Avoid duplication of data.
2013-12-25 20:35:58 +01:00
Holger Hans Peter Freyther 34f6e5ebe6 tbf: Make tfi private and update the code
All logging code that used tbf->tfi is now using tbf_name to
print the the TBF. External code is now using tfi() which is
inlined and should result in the same code being generated as
before (+debug code that can be stripped).
2013-10-30 21:24:13 +01:00
Holger Hans Peter Freyther ec80f82824 tbf: Remove the trx_no field from the tbf, go through the trx object 2013-10-30 21:24:13 +01:00
Holger Hans Peter Freyther 6796ed23ab alloc: Remove the ts parameter from the internal interface 2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther 34bd8bdf30 bts/tbf: Move the lists into the BTS and do the look-up from the BTS
The list belongs to the BTS. This makes cleaning this up more easy
and establishes a hierachy of resources that start from the BTS. The
debug_diagram code is now broken.
2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther 17b0d83a1f pdch: Move enable/disable into the PDCH code
When a PDCH is disabled all resources should be freed. This is
currently not possible as the PDCH does not know where it belongs
to. On top of that the list (and other resources) should be
properly initialized on construction so that disable() is idempotent
and does not check if it was disabled. During the re-factoring I
noticed that during a sysmobts re-start some resources are not
freed. I left a warning in the code to resolve this issue later.
2013-10-30 21:24:09 +01:00
Holger Hans Peter Freyther 948a3d62b1 alloc: Move usf into the scope it is actually used 2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther b0a0075845 alloc: Factor out the routine to find an enabled PDCH 2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther 11a748935e alloc: Remove the unimplemented/unfinished time constraint code
The algorithm is already complex enough. No reason to further
introduce the complexity with the branches it has.
2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther 8481a0553d alloc: Remove code duplication for downlink assignment
There was no difference but there is no point in poking in the
internals of the tbf, pdch and trx from various places. Information
hiding has a real purpose, e.g. compare with reading "the mythical
man month".
2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther 743bafa50c alloc: Introduce a backpointer from the tbf to the trx and simplify code
Kill all the level of indirections where one needs to have the BTS
the TBF to find the TRX.
2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther 96efa70a9e alloc: Call it trx_no and not trx as it is not trx object 2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther 02ab4a8803 alloc: Move the two timeslot alloc algorithms to a dedicated file 2013-10-30 14:45:57 +01:00