aboutsummaryrefslogtreecommitdiffstats
path: root/tests/alloc
AgeCommit message (Collapse)AuthorFilesLines
2015-06-08tbf: Store MS class in GprsMs objectsJacob Erlbeck1-0/+3
The ms_class value is a property of the MS and thus belongs to the GprsMs class. Nevertheless the MS object is created after the TLLI gets known, so the value still has to be stored in the TBF initially. This commit add the ms_class value to the GprsMs class and introduces TBF accessor functions which either access that object or, if that is not available, the value stored locally. Ticket: #1674 Sponsored-by: On-Waves ehf
2015-05-27tbf: Remove the TLLI from the TBFsJacob Erlbeck1-12/+4
Currently the TLLI is stored in each TBF. Since each MS is now represented by a GprsMs object which takes care of TLLI updating, and each TBF that has been associated with an TLLI also contains a reference to a GprsMs object, per TBF TLLI handling is no longer needed. Keeping all TBF m_tlli members up to date is complex and doesn't currently work correctly in all circumstances. This commit removes m_tlli and related members from the TBF class and the tbf_by_tlli functions from the BTS class. Ticket: #1674 Sponsored-by: On-Waves ehf
2015-05-21tbf: Explicitly pass the direction to update_ms()Jacob Erlbeck1-4/+4
The type of the TBF update_ms() is being called on does not always reflect whether the TLLI has been signaled by the MS or the SGSN. This commit adds an additional parameter to tell the method, in which direction the TLLI has been passed. Sponsored-by: On-Waves ehf
2015-05-20ms: Integrate the MS storageJacob Erlbeck1-0/+4
Use the MS storage to find a MS object for a given TLLI instead of searching the TBF lists. The TBFs are then taken from the MS object, if one has been found. If all TBF might be temporarily detached from the MS object, a GprsMs::Guard is added to prevent the deletion of the object, in case another TBF gets attached later on in the scope. Ticket: #1674 Sponsored-by: On-Waves ehf
2015-05-04pcu: Fix non-critical warningsJacob Erlbeck1-9/+7
These fixes do not affect the semantics of the code. They either help gcc by providing default values that won't be used ("may be uninitialised"), remove unused variables, or change signed to unsigned variables to avoid comparison warnings. Addresses: bts.cpp:494:32: warning: 'tbf' may be used uninitialized in this function emu/test_replay_gprs_attach.cpp:81:27: warning: comparison between signed and unsigned integer expressions emu/test_pdp_activation.cpp:95:23: warning: unused variable ‘budh’ emu/test_pdp_activation.cpp:97:6: warning: variable ‘rc’ set but not used emu/pcu_emu.cpp:109:26: warning: unused variable ‘bts’ alloc/AllocTest.cpp:74:27: warning: unused variable ‘tbf’ osmocom/core/utils.h:13:50: warning: comparison between signed and unsigned integer expressions types/TypesTest.cpp:319:7: warning: unused variable ‘count’ types/TypesTest.cpp:320:11: warning: unused variable ‘rbb’ alloc/AllocTest.cpp:74:27: warning: unused variable ‘tbf’ alloc/AllocTest.cpp:132:11: warning: unused variable ‘ts_no’
2014-08-07tbf, ...: Make the fields in the dl/ul struct member variablesDaniel Willmann1-2/+2
There is no need for the union/struct anymore. Make the variable members of the UL/DL class. As a result gprs_rlc_dl_window gets a reset() method because memset(&dir.dl, 0, sizeof(dir.dl)) doesn't work anymore in reuse_tbf(). Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07tests/alloc: Use the specific UL/DL TBF classes instead of the baseDaniel Willmann1-2/+4
Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-07-22bts, tbf: Split alloc_tbf function into separate UL and DL versionsDaniel Willmann1-10/+21
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-01-15alloc: Update the test result now that everything is back to working againHolger Hans Peter Freyther1-0/+7650
2014-01-15alloc/test: Add a crazy test that tests each possible combinationHolger Hans Peter Freyther1-0/+130
Make a crazy test that will test each possible PDCH configuration and MS Class and verify that the UL/DL assignments work and that they are on the same first_common_ts.
2014-01-15alloc/test: Go through all possible ms_classes for the allocationHolger Hans Peter Freyther2-9/+955
Generate results for all possible classes.
2014-01-15alloc/tests: Create an allocation test for various scenariousHolger Hans Peter Freyther2-0/+173
The allocation in the TBF/BTS code is quite complex. In parts this is due the assignment and requests occuring under differen circumstances. Attempt to re-create the commono scenarios. Remove the bogus msclass check in gprs_rlcmac_tbf::update as the allocation code will check the ms class anyway.
2013-10-30tbf/bts: Move the tfi_find_free into the btsHolger Hans Peter Freyther1-3/+3
2013-10-30bts/tbf: Move the lists into the BTS and do the look-up from the BTSHolger Hans Peter Freyther1-10/+12
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-30pdch: Move enable/disable into the PDCH codeHolger Hans Peter Freyther1-2/+2
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-30bts: Introduce a singleton for the BTS and use it in the codeHolger Hans Peter Freyther1-2/+0
Compared to the previous code there will be a branch to get the global pointer so the code will be slightly slower than the previous version but it allows us to start creating objects but still use the code from C. It is best approach I have found so far. One downside of C++ is that by default talloc will not be used (unless we override the new operator to use talloc. Right now we need to memset the C data structure by hand. The benefit of enforcing a better structure should is more important though.
2013-10-30alloc: Add very basic test case for the alloc_a algorithmHolger Hans Peter Freyther3-0/+127