aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tbf
AgeCommit message (Collapse)AuthorFilesLines
2015-04-09tbf: Send BSSGP LLC discarded on TBI exhaustionJacob Erlbeck1-0/+1
Currently the PCU silently discard LLC frames from the SGSN if a DL TBF cannot be allocated. This commit changes tbf_new_dl_assignment and reuse_tbf to send an LLC discarded message to the SGSN in this case. Ticket: #607 Sponsored-by: On-Waves ehf
2015-04-09tbf/test: Add test for DL TBF exhaustionJacob Erlbeck3-0/+601
This test calls gprs_rlcmac_dl_tbf::handle() with varying TLLI and IMSI until the function fails. Sponsored-by: On-Waves ehf
2015-03-25tbf: Poll MS on idle DL TBFsJacob Erlbeck1-27/+27
If an MS wants to open a new UL TBF, it can either use (P)RACH or request one in a Ack/Nack message for a DL TBF (PACCH). When a TBF becomes idle (LCC queue is empty but the TBF is kept open), there aren't any Ack/Nack requests that can be used by the MS to ask for an UL TBF, therefore it has to use the RACH. This leads to many RACH requests even for a single HTTP transaction, so it takes some time to retrieve even a simple web page. This commit modifies the scheduler to regularly send Ack/Nack requests on idle DL TBFs. It does so by extending the priority based scheduling algorithm to have 5 priority levels (highest priority first): - Control block is pending - High age (100%) threshold reached (-> request Ack/Nack) - Data is waiting or there are pending Nacks - Low age (200ms) threshold reached (-> request Ack/Nack) - Pending Nacks that have been resent already - None of the above (-> send DL dummy control block) The 'age' refers to the time since since the last control block has been sent on the TBF. This high age threshold is set to dl-tbf-idle-time or to 50% of T3190 (whichever is smaller), aiming for at least a poll (and TBF shutdown) after the TBF has expired and to safely prevent expiry of T3190. So if dl-tbf-idle-time > 200ms, there will be a poll every 200ms and a final poll after dl-tbf-idle-time. On high load, the interval between polls can get higher, but the 'high age' poll should be in place. This commit implements the scheduling with respect to GSM 44.060, 9.3.1a ("Delayed release of downlink TBF"). Ticket: #556 Sponsored-by: On-Waves ehf
2015-03-25tbf/test: Add test for delayed releaseJacob Erlbeck3-0/+293
This tests checks the implementation of the delayed release of an downlink TBF. Ticket: #556 Sponsored-by: On-Waves ehf
2015-03-25tbf: Use put_frame in append_data if the TBF has no dataJacob Erlbeck1-18/+12
Currently if append_data() is used when there is no LLC data in the DL TBF, it will either call reuse_tbf() which in turn will call put_frame(), or it will append the LLC message to the queue, even if the queue and the frame buffer are empty. This only happens with the test case so far, but this would change when idle DL TBFs are kept open for some time. It results in empty LLC message being sent to the MS (see log below). This commit changes append_data to check for this case and to eventually use put_frame() instead of appending the LLC data to the queue. Addresses: TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW) downlink (V(A)==0 .. V(S)==0) - Sending new block at BSN 0 -- Chunk with length 0 is less than remaining space (20): add length header to to delimit LLC frame Complete DL frame for TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW)len=0 - Dequeue next LLC for TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW) (len=200) Sponsored-by: On-Waves ehf
2015-03-25tbf/test: Fix fn/block_nr in test_tbf_final_ackJacob Erlbeck2-8/+25
Currently fn and block_nr are not incremented correctly. In addition, the comments around the sending of blocks are not accurate either. This commit introduces the send_rlc_block helper function which takes care of the increments, updates the comments to reflect what is really happening, and adds assertion to verify at least some aspects of what is now stated in the comments. Sponsored-by: On-Waves ehf
2015-03-25tbf/test: Put BTS setup and DL TBF creation into helper functionsJacob Erlbeck1-23/+45
Put the generic parts of test_tbf_final_ack into helper functions to reduce the size of the test and to avoid too much code duplication when creating new tests. Sponsored-by: On-Waves ehf
2015-03-06tbf: Reduce m_new_tbf logging messagesJacob Erlbeck1-2/+0
Currently tbf->m_new_tbf may point to itself if no new TBF is assigned. But this leads to additional logging messages, since the code in set_new_tbf and tbf_free assumes, that a real new TBF is assigned and generates log messages accordingly. This commit adds checks to avoid those messages in the above case. Sponsored-by: On-Waves ehf
2015-03-06tbf: Add name() method and put the buf into the tbfJacob Erlbeck1-4/+4
Currently tbf_name() must not be used twice in a printf statement with different TBFs, since the same baffer will be used for each. This commit puts the text buffer into struct gprs_rlcmac_tbf to avoid this problem. Sponsored-by: On-Waves ehf
2015-02-23tbf: Fix dangling m_new_tbf pointerJacob Erlbeck2-6/+19
Currently if a 'new' TBF is freed before the 'old' one (where old_tbf->m_new_tbf == new_tbf), the old_tbf->m_new_tbf is not cleared and can be accessed later on. This can lead to inconsistencies or segmentation faults. This commit adds m_old_tbf which points back from new_tbf to old_pdf. m_new_tbf and m_old_tbf are either both set to NULL or one is the reverse pointer of the other (tbf->m_new_tbf->m_old_tbf == tbf and tbf->m_old_tbf->m_new_tbf == tbf). It extends set_new_tbf and tbf_free to update the pointee accordingly. The TBF test is extended to check this invariant at several places. Sponsored-by: On-Waves ehf
2015-02-23tbf/test: Modify test to create a dangling TBF pointerJacob Erlbeck2-4/+86
When new_tbf is freed before dl_tbf in test_tbf_final_ack, dl_tbf still contains a pointer to it in m_new_tbf. This patch changes the test to accept a test mode parameter and runs it twice which a different order of tbf_free in each run. Consistency checks are added, to check for a danglilng m_new_tbf pointer in both cases. Sponsored-by: On-Waves ehf
2014-09-19tests/tbf: Commit TbfTest.err *with* whitespace "errors"Daniel Willmann1-4/+4
Otherwise the diff and hence the test will fail...
2014-09-19tests/tbf: Use correct function to enqueue llc dataDaniel Willmann2-14/+11
The test called the llc enqueue() function directly which didn't take care of prepending the tv values for the timeout to the data. Now the test uses dl_tbf.append() which takes care of prepending the tv values. With this patch make distcheck on jenkins should no longer fail with "Discarding LLC PDU because lifetime limit reached." messages.
2014-09-10tests/tbf: Test for final ack issueDaniel Willmann2-0/+142
Ticket: SYS#382 Sponsored-by: On-Waves ehf
2014-08-15tbf: Include TBF state in tbf_name outputDaniel Willmann1-3/+3
Sponsored-by: On-Waves ehf
2014-08-15TbfTest: Make logging more verboseDaniel Willmann2-1/+40
Sponsored-by: On-Waves ehf
2014-07-22bts, tbf: Split alloc_tbf function into separate UL and DL versionsDaniel Willmann1-4/+4
UL and DL tbfs are used in very separate parts and are not the same thing so split the alloc function and use the UL/DL version throughout the code. Ticket: SYS#389 Sponsored-by: On-Waves ehf
2014-07-03bts, tbf: Separate functions for dl/ul tbf_by_tlli lookupDaniel Willmann1-6/+6
In the future we want to separate ul and dl tbf into different classes that inherit from a common base. Ticket: SYS#389 Sponsored-by: On-Waves ehf
2013-10-30tbf: Update the timing advance for the new tlli based on the old oneHolger Hans Peter Freyther1-0/+2
2013-10-30tbf: Learn and propagate the TLLI changes due a new P-TMSIHolger Hans Peter Freyther3-0/+105
During a routing area update a new P-TMSI was assigned. During the PACKET CONTROL ACK on the DL we notice the change of TLLI but didn't propagate this. This means that a Routing Area Update Complete was only sent after a new RACH request. Addresses: <0007> gprs_rlcmac_meas.cpp:103 UL RSSI of TLLI=0x88661bc6: -67 dBm <0002> bts.cpp:945 Got ACK, but UL TBF is gone TLLI=0xe512eba3 <0007> gprs_rlcmac_meas.cpp:158 DL packet loss of IMSI=274080000004765 / TLLI=0xe512eba3: 0% <0002> tbf.cpp:668 TBF TFI=0 TLLI=0x88661bc6 T3169 timeout during transsmission <0002> tbf.cpp:690 - Assignment was on PACCH <0002> tbf.cpp:694 - No uplink data received yet