aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2015-07-02alloc: Use least reserved PDCH for algo A (TODO)zecke/wipJacob Erlbeck1-1/+60
TODO: - unify find_least_reserved_pdch and find_least_busy_pdch or - force find_multi_slots to single slot reservation
2015-07-02Revert "ms: Delay the call to set_reserved_slots(NULL, 0,0) (EXPERIMENTAL)"Jacob Erlbeck1-1/+2
This reverts commit 341c9189caf00c077ef73138d087bf29e3ae12d1.
2015-07-02FIXUP bts: Add Poll Timeout counter (TODO)Jacob Erlbeck3-6/+20
2015-07-02sba: Reverse TS search order (TODO)Jacob Erlbeck1-2/+2
- when using multiple TS the first TS cannot be used for UL eventually if a TBF is still active or releasing. - Currently RACH requests are often accompanied by poll timeouts - This cannot prevent them completely (especially with multiple TRX in the future)
2015-07-02bts: Add Poll Timeout counter (TODO)Jacob Erlbeck3-0/+6
2015-07-02tbf: Remove call to update() in reuse_tbf (TODO)Jacob Erlbeck1-2/+0
2015-07-02tbf: Set ms in call to tbf_alloc_dl_tbf (TODO)Jacob Erlbeck1-2/+2
- reuse - alloc didn't know slot reservation TODO: - cm
2015-07-02ms: Delay the call to set_reserved_slots(NULL, 0,0) (EXPERIMENTAL)Jacob Erlbeck1-2/+1
TODO: - Check whether this fixes the issues.
2015-07-02ms: Clear the reserved slots in the destructor (FIXUP)Jacob Erlbeck1-0/+2
2015-07-01alloc: Disable inner loop debugging by default (TODO)Jacob Erlbeck1-9/+15
Callgrind: 42%-> 25%
2015-07-01alloc: Optimize find_free_usfJacob Erlbeck1-9/+4
According to callgrind, this function consumes 33% CPU when running the AllocTest program. This commit uses the assigned_usf() method to get the USFs allocated by a PDCH instead of traversing the TBFs. Sponsored-by: On-Waves ehf
2015-07-01tbf: Keep a set of used TFI and USF per PDCH (TODO)Jacob Erlbeck3-61/+96
2015-07-01FIXUP tbf: Maintain the number of TBF per PDCHJacob Erlbeck1-1/+1
2015-07-01alloc: Skip common TS without free USF when rating (TODO)Jacob Erlbeck4-19/+30
2015-07-01alloc: Only reserve 1 UL slot with algorithm B (TODO)Jacob Erlbeck4-49/+46
Since currently the algorithm B will only allocate a single UL slot and will have to stick to it (first common TS), the other possible UL slots will not be allocated while the reservation is kept. This commit adds code to update the reserved set of UL slots to the single common TS when the UL TBF is allocated. TODO: - test it Sponsored-by: On-Waves ehf
2015-07-01alloc: Set minimum slot capacity to 1 (TODO)Jacob Erlbeck1-0/+2
- < 0 can only happen rarely (if at all ATM) - doesn't change anything TODO: - test it anyway
2015-07-01alloc: Only use common UL slots when calculating the capacityJacob Erlbeck4-55/+67
Currently al possible UL slots are included in the capacity calculation which is the base of the slot selection. Nevertheless UL-only slots will never be used, since only one uplink slot (which must be a common slot) will be used. This patch changes the code to only include common slots in the capacity sum. Note that this might not be optimal if algorithm B supported multiple uplink slots. Sponsored-by: On-Waves ehf
2015-07-01WIP Algorithm B UL (TODO)Jacob Erlbeck4-517/+514
Select UL slot based on slot usage (similar to algorithm A) - Ensure to keep the first common TS TODO: - cm
2015-06-30alloc: Base algo A on reserved PDCHsJacob Erlbeck2-10/+12
Currently algorithm A bases its time slots selection on the number of TBF actively using the PDCHs. This statistically prefers the first time slots, especially with short living TBFs. So when the first TBF is triggered by an uplink transfer (which generally results in a short-lived TBF) the potentially longer living DL TBF will be bound to the same slot. When another MS then requests an uplink TBF, it will get the same slot (no UL TBF currently active). This commit changes the algorithm to base its selection on reserved slots instead. Sponsored-by: On-Waves ehf
2015-06-30alloc: Ignore slots with differing TSC if multiple slots are requestedJacob Erlbeck1-1/+18
According to TS 45.002, 6.4.2 the training sequence (TSC) must be the same for all slots in a multi-slot set. This commit updates find_possible_pdchs() to only consider slots with the same TSC if more that 1 slot shall be assigned. Note that the first PDCH's TSC will be used as reference, so if two or more groups with a common TSC are configured, only the first will be used. This restriction does not apply to algorithm A, since it will not assign more than one slot and therefore sets the max_slots parameter to 1. Sponsored-by: On-Waves ehf
2015-06-30ms: Get the set of slots currently activeJacob Erlbeck4-0/+66
This commits adds methods to GprsMs and gprs_rlcmac_tbf to retrieve the slots that are actively used. Sponsored-by: On-Waves ehf
2015-06-30ms: Add support for slot reservationJacob Erlbeck4-3/+100
In contrast to the slots currently used by existing TBFs, the reserved slots refer to the time slots that can be used for newly allocated TBFs without causing conflicts (given that the first common TS does not change). They correspond to the potential use of the PDCHs and can be used to achieve a more uniform slot allocation. This commit adds bit set based methods to GprsMs and gprs_rlcmac_trx and a counter to gprs_rlcmac_pdch. The current TRX will also be stored in the MS object. Sponsored-by: On-Waves ehf
2015-06-30alloc: Load balancing for algo AJacob Erlbeck5-25/+283
Currently only the first enabled PDCH will be used. Beside the throughput this will also limit the number of TBFs: - number of UL TBFs <= 7 - number of DL TBFs <= 32 This commit changes the allocation algorithm to use the PDCH with the least number of attached TBFs. This will improve the troughput in both directions and the UL limits: - number of UL TBFs <= min(32, N_PDCH * 7) UL TBFs Ticket: #1794 Sponsored-by: On-Waves ehf
2015-06-30ms: Add tbf() method to get the TBF based on the directionJacob Erlbeck6-0/+33
To avoid the need for a switch or conditional statement when needing a TBF from an MS object in direction independant code, this method contains that case distinction. For additional flexibility, a reverse() function is added to get the opposite direction. Sponsored-by: On-Waves ehf
2015-06-30ms: Add first_common_ts method to GprsMsJacob Erlbeck2-0/+13
This method gets the index (0 based) of first common time slot used by the TBFs attach to it. It expects that all of them have the same notion of this. If no TBF is attached, -1 will be returned. Sponsored-by: On-Waves ehf
2015-06-30tbf: Maintain the number of TBF per PDCHJacob Erlbeck5-8/+106
Currently the PDCH object do not know anything about the TBFs using them. To make the slot allocation load dependant, at least some numbers are required. This commit adds TBF counters (one per direction) and the related methods attach_tbf, detach_tbf, and num_tbfs to gprs_rlcmac_pdch. Sponsored-by: On-Waves ehf
2015-06-29tbf: Update the new TBF in tbf_reuse (TODO)Jacob Erlbeck1-1/+1
Currently the old TBF is updated for reallocation in tbf_reuse(). This commit changes this to update the new TBF instead. TODO: - does this make sense? - does this fix anything? - should the call to update() be removed completely there?
2015-06-29tbf/test: Add assertionsJacob Erlbeck1-0/+2
These assertions check for the TBF allocation result before the tbf object is dereferenced the first time. Sponsored-by: On-Waves ehf
2015-06-29alloc/test: Use LOGL_DEBUG environment variableJacob Erlbeck1-0/+2
When this environment variable is set, the logging level is set to LOGL_DEBUG to help debugging without putting everything into AllocTest.err. Sponsored-by: On-Waves ehf
2015-06-29alloc/test: Enhance test_alloc_aJacob Erlbeck3-5/+20
This commit adds: - an assertion to check that count is valid, - an assertion the verify that tbf_alloc did not fail - a slots parameter to specify the enabled slots - additional test invocations with more slots enabled Sponsored-by: On-Waves ehf
2015-06-29alloc/test: Add test for successive allocationJacob Erlbeck3-0/+150
This test allocates as many as possible UL/DL TBF pairs, shows their PDCH usage, and checks how many of them has been created successfully. Sponsored-by: On-Waves ehf
2015-06-29tbf: Add BTS::ms_alloc methodJacob Erlbeck5-14/+30
Currently the code that creates the MS objects with tbf.cpp is duplicated. This commit moves the corresponding code into a new method. Since there is no TLLI available there, the GprsMsStorage::create_ms method has been refactored into two variants: one with TLLI/direction and one without. Sponsored-by: On-Waves ehf
2015-06-29tbf: Always create an MS object on TBF allocationJacob Erlbeck4-152/+163
Currently the MS object are created when the TLLI gets known. Therefore some information (TA, MS class) must be stored in the TBF itself and is copied to the MS object later on. This would get even more complex, if the allocation algorithms were extended based on this scheme. This commit ensures, that an MS object will always be created on TBF allocation, even if the TLLI is not yet known. These 'anonymous' objects are still managed by the MS storage. To avoid dangling entries without a TLLI there (which cannnot be retrieved anyway), the timer in the MS objects is not started after all TBF have been detached, so that they get deleted immediately in that case. Note that an MS object can still be removed (e.g. by replacement) from an existing TBF, so tbf->ms() can be NULL. Ticket: #1794 Sponsored-by: On-Waves ehf
2015-06-29tbf: Pass the MS object around instead of old_tbfJacob Erlbeck9-42/+45
Currently the old TBF (either uplink or downlink) is passed around at TBF allocation mainly to get information about the MS. To implement more complex allocation algorithms, the MS object itself will be needed anyway. This commit replaces the old_tbf arguments by MS object arguments. Sponsored-by: On-Waves ehf
2015-06-29tbf: Remove update_tlli methodJacob Erlbeck4-10/+0
This method does not do anything anymore, it's functionality has been taken over by update_ms. This commit removes gprs_rlcmac_tbf::update_tlli completely. Sponsored-by: On-Waves ehf
2015-06-29vty: Fix documentation for 'no cs downgrade-threshold'Jacob Erlbeck1-1/+1
The NO_STR is missing, this commit adds it. Fixes: Jenkins #603 Sponsored-by: On-Waves ehf
2015-06-29llc/test: Use a portable way to set timeval variablesJacob Erlbeck1-8/+12
Using complex initialiser lists doesn't seem to work well with Debian Squeeze. This commit changes the initialisation to use separate assignments instead. Fixes: Jenkins #601, #602 Addresses: CXX LlcTest.o ../../tests/llc/LlcTest.cpp: In function 'void test_llc_meta()': ../../tests/llc/LlcTest.cpp:137: error: expected primary-expression before '.' token ../../tests/llc/LlcTest.cpp:137: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x Sponsored-by: On-Waves ehf
2015-06-29Revert "llc/test: Explicitly enable extended initialiser lists"Jacob Erlbeck1-4/+0
This reverts commit a99d95e3afc528829f657e37f0572ac78bf06d4b. That commit has only removed the warning but not the error. Sponsored-by: On-Waves ehf
2015-06-29llc/test: Explicitly enable extended initialiser listsJacob Erlbeck1-0/+4
To support extended initialiser lists some platforms (at least debian squeeze) require to add -std=c++0x or -std=gnu++0x to CXXFLAGS. While that option is deprecated on newer platforms (at least gcc 4.8) this options is still supported on every platform currently in use. This commit adds -std=gnu++0x to the CXXFLAGS used to compile LlcTest.cpp. Sponsored-by: On-Waves ehf
2015-06-29llc: Add missing include directive for struct timevalJacob Erlbeck1-1/+1
While including time.h is sufficient with Ubuntu's current libc6 2.19, the correct (and portable) include file is sys/time.h. This commit modifies the include directive in llc.h accordingly. Fixes: Jenkins #600 Addresses: In file included from gprs_ms.h:28, from gprs_ms.cpp:22: llc.h:68: error: field 'recv_time' has incomplete type llc.h:69: error: field 'expire_time' has incomplete type Sponsored-by: On-Waves ehf
2015-06-22llc: Move storage of timestamps into gprs_llc_queueJacob Erlbeck6-50/+96
Currently the receive and expiry timestamps are prepended to the LLC msgb before it is passed to gprs_llc_queue::enqueue(). Since this meta information should not be counted as LLC octets, the gprs_llc_queue needs to known about this (unless the correction was done in the LLC layer). This commit moves the meta information storage code into gprs_llc_queue. The meta data is now stored in the control block (cb) area of the msgb. Note that the info pointer that is returned from the dequeue method is only valid if that method returns a (non-NULL) msgb. It must not be used after that msgb has been modified or freed. Sponsored-by: On-Waves ehf
2015-06-22llc: Make timeval arguments constJacob Erlbeck4-7/+10
Some struct timeval pointer arguments do not have the const qualifier, albeit the methods do not write to the structures. The next commit will change related pointers to const, so this commit provides the required constness. Sponsored-by: On-Waves ehf
2015-06-22ms: Reduce DL CS level if only a few LLC bytes are leftJacob Erlbeck8-5/+111
If just a few bytes are left to send to the MS, it makes sense to reduce the coding scheme level to increase the throughput. This has been shown by Chen and Goodman in their paper "Theoretical Analysis of GPRS Throughput and Delay". See their throughput over C/I measurement graphs (figures 4 and 5 in the paper) for details. This commit implements a simplified CS downgrade feature for the downlink. The coding scheme will be downgraded if there are only a few octets are left to be send over the TBF (see the downgrade-threshold command below) and the NACK rate is not low (the CS will not get degraded on a high quality RF link). As an exception, CS-3 will be degraded to CS-1, since CS-2 does not improve the throughput in general when a few small packets are sent and the signal fades slowly (see Chen/Goodman). The following VTY command is added to the config-pcu node: - cs downgrade-threshold <1-10000> - cs no downgrade-threshold to set the threshold of the number of remaining bytes to be RLC/MAC encoded. The CS will only be reduced, if the number is below the threshold. The 'no' command disables this feature completely. The default value is 200 octets. Sponsored-by: On-Waves ehf
2015-06-22llc: Keep track of the number of stored LLC octetsJacob Erlbeck3-0/+18
To get the number of LLC octets that are stored in the queue, this commit adds a m_queue_octets member along with a octets() method. This value is updated similarly to m_queue_size on each modifying method call. Sponsored-by: On-Waves ehf
2015-06-22llc: Add missing include directive to llc.hJacob Erlbeck1-0/+4
Currently struct llist_head is used without declaration which accidently did not produce an error so far. This commit adds the missing include directive. Sponsored-by: On-Waves ehf
2015-06-22llc/test: Add test program for LLC related testsJacob Erlbeck5-1/+199
Sponsored-by: On-Waves ehf
2015-06-22tbf: Fix downlink packet lossJacob Erlbeck4-73/+122
When the MS is pinged with a longer interval, many packets get lost even if the GprsMs object is kept. If the interval is above the time where the DL TBF is in state FLOW (mainly influenced be the dl-tbf-idle-time command), an new TBF must be requested via AGCH for each ICMP PING message. Currently the LLC frame containing the PING is immediately stored in the TBF and gets lost, if TBF establishment fails for some reason. This commit moves all calls to put_frame() to schedule_next_frame(), where the data is moved from the LLC queue to the frame storage within the TBF object. This method is only called from within create_new_bsn() when the TBF is in the FLOW state and the frame is going to be encoded immediately. At all other places, where put_frame() has been called before, the LLC message is just appended to the LLC queue in the GprsMs object. This change effectively simplifies the related code parts, since date/len information and discard notifications is no longer needed there. Ticket: #1759 Sponsored-by: On-Waves ehf
2015-06-22tbf/test: Add test for DL LLC packet lossJacob Erlbeck3-0/+132
Currently LLC frames are lost or even reordered when the TBF has be established via the AGCH and the procedure fails for some reason. This test tries to reproduce this behaviour by throwing away the first TBF while calling the handle() method several times. The results of create_dl_acked_block() are checked against expected values (this is currently party disabled because the bug still persists). Ticket: #1759 Sponsored-by: On-Waves ehf
2015-06-22ms: Store the NACK rate in the MS objectJacob Erlbeck3-1/+14
Currently the NACK/unconfirmed ratio is already passed to the corresponding MS object, but the value is not being stored there. This commit adds a member and a getter method and include the values into the output of the 'show ms' command. Sponsored-by: On-Waves ehf
2015-06-22tbf: Include CS into create_new_bsn log messageJacob Erlbeck2-30/+30
This change lets the test suite fail, so it get its own commit. Sponsored-by: On-Waves ehf