aboutsummaryrefslogtreecommitdiffstats
path: root/src/sba.cpp
AgeCommit message (Collapse)AuthorFilesLines
2020-05-14bts: Drop specific functions to increase countersPau Espin Pedrol1-3/+3
It's super annoying seeing lots of functions being called everywhere only to find out they are only incrementing a counter. Let's drop all those functions and increment the counter so people looking at code doesn't see dozens of code paths evyerwhere. Most of the commit was generated by following sh snippet: """ #!/bin/bash grep -r -l ^CREATE_COUNT_INLINE . | xargs cat | grep "^CREATE_COUNT_INLINE("| tr -d ",;" | tr "()" " " | awk '{ print $2 " " $3 }' >/tmp/hello while read -r func_name ctr_name do #echo "$func_name -> $ctr_name" files="$(grep -r -l "${func_name}()" .)" for f in $files; do echo "$f: $func_name -> $ctr_name"; sed -i "s#${func_name}()#do_rate_ctr_inc(${ctr_name})#g" $f done; done < /tmp/hello grep -r -l "void do_rate_ctr_inc" | xargs sed -i "/void do_rate_ctr_inc(CTR/d" grep -r -l "CREATE_COUNT_INLINE" | xargs sed -i "/^CREATE_COUNT_INLINE/d" """ Change-Id: I360e322a30edf639aefb3c0f0e4354d98c9035a3
2020-04-20sba: fix possible memleak in SBAController::alloc()Vadim Yanitskiy1-3/+3
Change-Id: I417eda155cd5b1e46dd0b05db3f507abd79121d1
2018-02-19Move PDCH-related functions into separate filesMax1-0/+1
The PDCH class and corresponding functions are rather self-contained and independent from BTS implementation. Let's move them into separate file to make bts.cpp more manageable. As additional benefit it allow us to somewhat untangle all the different cross-dependent includes. Change-Id: Ie05e25361e6741a81b024679f9675c98d4923683 Related: OS#1539
2018-02-19Update header includesMax1-1/+2
Many files include unnecessary headers and don't include headers which are actually used. Because of that combined with the fact that OsmoPCU is a mixture of C and C++, it makes it hard to modularize code. Fix this (using iwyu [1] tool): * add missing headers * remove unused headers [1] https://include-what-you-use.org/ Related: OS#1539 Change-Id: I8c9f488a43b099c72b2d30d3245e7ba50872fc00
2017-05-26Cleanup FN schedulingMax1-5/+5
* replace magic number with defined constant * move copy-pasted code to inline functions * remove unused code Change-Id: I6fee0714453d0c3c3f3f875f88daea2d9c477331 Related: OS#1524
2017-01-16Log additional info for radio errorsMax1-1/+3
Change-Id: I936a07ce87f05d9c3dc351dc3bdc4f00d78265e0 Related: OS#1553
2016-09-09Fix Timing Advance handlingMax1-0/+4
* initialize with invalid TA instead of making assumption that phone is located within 550 meters (TA=0) * only set valid TA Change-Id: Idfc40ff0c11bdac13d9e28fbfa4e95dfc6b735b0 Related: OS#1526
2015-07-15sba: Fix loop exit in SBAController::alloc (Coverity)Jacob Erlbeck1-1/+1
The commit 506f156f7a4aebb52dace00a760f86b2b4f5e19a has reverted the TS search order. The outer loop exit condition was not updated accordingly. This bug would would only lead to an error if there were multiple TRX where the first TRX has not got any PDCH assigned. This commit corrects the break condition. Fixes: Coverity CID 1311776 Sponsored-by: On-Waves ehf
2015-07-07sba: Reverse TS search orderJacob Erlbeck1-2/+2
Currently the search for an enabled PDCH slot for SBA start with the first TS. If there are more than 2 PDCH slots enabled, this slot will conflict with an existing multislot reservation for most multislot classes. This were less likely if the search were reversed and started with the last slot due to the 3 slot shift between Tx and Rx. When multislot allocation is enabled and several MS are connected, and increased rate of poll timeouts can be observed. This commit tries to reduce the number of poll timeouts by reverting the slot search order for SBA allocation. Sponsored-by: On-Waves ehf
2013-10-30sba: Move freeing a sba into a central placeHolger Hans Peter Freyther1-8/+9
2013-10-30sba: Count SBA allocation, frees and timeoutsHolger Hans Peter Freyther1-0/+4
Add a warning about the receive message poking in the internal of the sba. This will be cleaned up in a follow up commit
2013-10-30sba/pdch: Use thepdch to look up a sba for a frame numberHolger Hans Peter Freyther1-0/+5
2013-10-30pdch: Simplify the reset code, rename variables to XYZ_noHolger Hans Peter Freyther1-5/+7
Simplify the reset code now that the PDCH can know where it is located. Rename the variables in the sba to trx_no and ts_no as it stores the number and not the actual thing.
2013-10-30sba: Create a SBAController that will manage the sbas for a BTSHolger Hans Peter Freyther1-9/+25
The PollController is a friend of the SBAController and is allowed to access the internal list. The list is hidden from everyone else. This is done because the calculation of timeout should belong into the PollController and not into the SBAController.
2013-10-30sba: Move the sba code to a dedicated fileHolger Hans Peter Freyther1-0/+121
Move the code around and then turn it into an object...