aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2014-12-26tbf: Fix dereference before null checkHolger Hans Peter Freyther1-1/+1
m_new_tbf might be NULL. Assign was_releasing _after_ we have done the NULL check. Related: Coverity CID#1238847
2014-12-20Fix VTY documentationHolger Hans Peter Freyther1-1/+1
Documentation error (missing docs): <command id='show tbf all'> <param name='all' doc='(null)' />
2014-09-17tbf_dl: Fix warningsDaniel Willmann1-3/+1
Remove unused log argument (cnp bug) and unused variable
2014-09-10poll_controller: Be stricter with the timeout handlingDaniel Willmann1-4/+10
There is no reason to believe that an ACK that was polled for FN X and has not arrived on the next frame will arrive sometime after. Ticket: SYS#382 Sponsored-by: On-Waves ehf.
2014-09-10tbf: Handle DL ACK/NACK poll timeout correctlyDaniel Willmann1-1/+11
If the PCU didn't receive the downlink ack/nack when it was polled there is no reason to assume it will arrive at a later time. In that case N3105 is already increased, but the next block sent should have a valid RRBP set as well to poll again. This can happen if either the BSN with the valid RRBP gets lost on the downlink or the DL ACK/NACK gets lost on the uplink path. Ticket: SYS#382 Sponsored-by: On-Waves ehf
2014-09-10tbf,bts: Keep track of new TBF for dl/ul assignment in m_new_tbfDaniel Willmann4-35/+83
There are a couple of possibilities where one TBF is used to assign a new one: 1. Assign a DL TBF from a UL TBF 2. Assign a UL TBF from a DL TBF 3. Assign a DL TBF from a DL TBF which is in wait-release state (T3193 is running) In these cases the assignment is sent on the existing TBF and triggers the assignement of the new TBF (with different TFI/direction). The current code detects these situations by looking at dl/ul_ass_state and then chosing the TBF with the opposite direction (DL/UL) that has the same TLLI. This does not work in the case 3 above where a new DL TBF is triggered for a DL TBF. The current code reuses the old TBF (and TFI), but this violates the spec. This patch introduces a m_new_tbf member which is set to the new TBF to be assigned. When receiving a control ack the code looks up the n_new_tbf member of the tbf that requested the control ack and completes the ul/dl assignment. If the old TBF was in the wait release state (T3193 is running) it is released. From 3GPP TS 04.60 9.3.2.6: """ If the network has received the PACKET DOWNLINK ACK/NACK message with the Final Ack Indicator bit set to '1' and has new data to transmit for the mobile station, the network may establish a new downlink TBF for the mobile station by sending the PACKET DOWNLINK ASSIGNMENT or PACKET TIMESLOT RECONFIGURE message with the Control Ack bit set to '1' on PACCH. In case the network establishes a new downlink TBF for the mobile station, the network shall stop timer T3193. """ reuse_tbf() is modified to allocate a new TBF with a new TFI and trigger a dl assignment for that TBF on the old TBF. All pending data is moved to the new TBF. Ticket: SYS#382 Sponsored-by: On-Waves ehf
2014-08-15tbf: Include TBF state in tbf_name outputDaniel Willmann2-3/+11
Sponsored-by: On-Waves ehf
2014-08-12tbf: Split out UL/DL TBF methods into separate filesDaniel Willmann4-1011/+1092
tbf_ul.cpp for UL TBF methods tbf_dl.cpp for DL TBF methods This commit contains no code changes. Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-08tbf, bts: Use tbf set_state method instead of tbf_new_state functionDaniel Willmann3-31/+24
All the function did was add debug output and call the set_state method. Move the debugging into the method and remove the function. Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-08tbf, gprs_rlcmac_meas: Move the DL bandwidth variables to the DL TBFDaniel Willmann4-28/+33
The bandwidth calculation as well as loss report is only done for DL TBF so move everything related to that in there. Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-08tbf: Make llc_dequeue a method of DL TBFDaniel Willmann2-4/+4
llc_dequeue is only used in DL TBF to send the data from the BSSGP to the MS. Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-08tbf: Make snd_ul_ud() and assemble_forward_llc() methods of UL TBFDaniel Willmann2-6/+6
They are only called for UL TBF. Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07tbf, ...: Make the fields in the dl/ul struct member variablesDaniel Willmann8-83/+84
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-07tbf: Move the dir.dl/ul members out of the base class into DL/UL TBFDaniel Willmann1-21/+29
Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07tbf: Remove unused function sns()Daniel Willmann1-8/+0
The current code uses dir.*l.window.sns() directly. The current implementation only returns the dl.window.sns() which will cause problems. Remove now and re-add it as a method of DL/UL TBF if and when it is needed. Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07gprs_rlcmac_ts_alloc: Be explicit about which TBF is usedDaniel Willmann1-9/+13
Use UL/DL TBFs instead of the base class wherever it is clear that the code only deals with one kind of TBF. Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07encoding: Change function signature to use UL TBFs where it makes senseDaniel Willmann2-4/+4
encode_rbb() and write_packet_uplink_assignment are only called with UL TBFs so change the function signature to reflect that. Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07tbf: Move UL TBF methods from base class into UL TBFDaniel Willmann2-9/+12
The methods create_ul_ack(), rcv_data_block_acknowledged(), maybe_schedule_uplink_acknack() are only used for UL TBFs so make them methods of that class instead of the base class. Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07gprs_rlcmac_sched: Use UL/DL TBFs in schedulerDaniel Willmann1-28/+32
Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07tbf: Split UL and DL TBFs up in create_dl_ass()Daniel Willmann1-10/+12
Explicitly use UL and DL TBFs where they are needed. Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07poll_controller: Use DL/UL TBFs in PollController::expireTimedout()Daniel Willmann1-9/+10
Be specific about where we are handling an UL and DL TBF Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07tbf: Use DL/UL TBFs in poll_timeout codepaths that deal only with one typeDaniel Willmann1-17/+20
Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07tbf, gprs_bssgp_pcu: Move some methods to DL TBFDaniel Willmann3-16/+15
These methods are only used on DL TBFs and can be moved to the subclass. Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07bts: Change parameter in BTS::trigger_dl_ass() to DL TBFDaniel Willmann3-45/+47
This method is always called with a DL TBF as argument so make it clear. Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07bts: Make use of DL TBF explicit in rcv_imm_ass_cnf()Daniel Willmann1-5/+5
Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07tbf: Make create_new_bsn and create_dl_acked_block a method of DL TBFDaniel Willmann3-8/+10
These functions are only used for DL TBFs so move them. sched_select_downlink() in src/gprs_rlcmac_sched.cpp now needs to deal with DL TBFs instead of the base class. Ticket: SYS#389 Sponsored-by: On-Waves ehf
2014-08-07bts, tbf: Make rcvd_dl_ack a method of the DL TBFDaniel Willmann3-3/+3
This method is only userul for DL TBFs so move it. As a result gprs_rlcmac_pdch::rcv_control_ack needs to work with dl_tbfs. Ticket: SYS#389 Sponsored-by: On-Waves ehf
2014-08-07tbf: Make append_data a function of DL TBFsDaniel Willmann2-5/+5
This function is only used in DL TBFs (called by handle). Ticket: SYS#389 Sponsored-by: On-Waves ehf
2014-08-07tbf: Make tbf_lookup_dl() return and handle() use a dl_tbfDaniel Willmann1-6/+6
These two functions only deal with DL TBFs so make it clear Ticket: SYS#389 Sponsored-by: On-Waves ehf
2014-08-07bts: Remove the OSMO_ASSERTs for TBF directionDaniel Willmann1-6/+0
llist_add is called on the TBF lists in tbf_alloc_ul/dl_tbf or in rotate_in_list. All three places check the direction/add the new TBF to the correct list so an ASSERT on entry is not needed. Ticket: SYS#389 Sponsored-by: On-Waves ehf
2014-07-30tbf: Use plain old data structure (PODS) for llist managementDaniel Willmann5-18/+50
The PODS struct has a back pointer to access the actual object. llist_pods_for_each_entry traverses the list of struct llist_pods and makes the entry available (through the back pointer). Ticket: SYS#389 Sponsored-by: On-Waves ehf
2014-07-22bts, tbf: Split alloc_tbf function into separate UL and DL versionsDaniel Willmann3-32/+81
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-22bts, tbf: Change the TBF return type of functions to the ul/dl versionDaniel Willmann3-23/+30
Many functions only ever deal with or return a UL or a DL TBF. Explicitly change the type to reflect which TBF is used where. Ticket: SYS#389 Sponsored-by: On-Waves ehf
2014-07-16bts: Return the special type for {ul,dl}_tbf_by_* functionsDaniel Willmann2-26/+26
Start returning the special type instead of the base gprs_rlcmac_tbf when retrieving a TBF. Ticket: SYS#389 Sponsored-by: On-Waves ehf
2014-07-16tbf: Add ul and dl TBF types and allocate them in tbf_alloc()Daniel Willmann2-1/+11
Ticket: SYS#389 Sponsored-by: On-Waves ehf
2014-07-16bts: Ensure tbf direction with OSMO_ASSERT()Daniel Willmann2-7/+18
In the lookup functions make sure that we are actually returning tbfs with the expected direction. Ticket: SYS#389 Sponsored-by: On-Waves ehf
2014-07-03bts: Split tbf_by_poll_fn into separate dl and ul functionsDaniel Willmann2-6/+18
rcv_control_dl_ack_nack is only meaningful for dl tbf while rcv_control_ack can be sent in response to a dl or ul tbf. So rcv_control_ack still needs to check for ul and dl tbfs. Ticket: SYS#389 Sponsored-by: On-Waves ehf
2014-07-03bts: Separate functions for dl/ul tbf_by_tfi lookupDaniel Willmann2-4/+18
Ticket: SYS#389 Sponsored-by: On-Waves ehf
2014-07-03bts, tbf: Separate functions for dl/ul tbf_by_tlli lookupDaniel Willmann3-17/+29
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
2014-07-02misc: Add missing include for the rate counterHolger Hans Peter Freyther1-0/+1
pcu_vty.c:285:2: warning: implicit declaration of function 'vty_out_rate_ctr_group' is invalid in C99 [-Wimplicit-function-declaration] vty_out_rate_ctr_group(vty, "", bts_main_data_stats()); ^
2014-07-02misc: Add missing include for atoiHolger Hans Peter Freyther1-0/+1
pcu_vty.c:128:21: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration] bts->fc_interval = atoi(argv[0]); ^
2014-07-02misc: Add {} to avoid nested if/if/else ambigioutyHolger Hans Peter Freyther1-1/+2
pcu_vty.c:89:3: warning: add explicit braces to avoid dangling else [-Wdangling-else] else
2014-07-02misc: Do not mix struct/class in the forward declarationHolger Hans Peter Freyther3-3/+3
2014-06-16sysmobts: Add a hot-fix to avoid dumping -1 amount of dataHolger Hans Peter Freyther1-5/+16
2014-06-15Always exit and don't try to recoverDaniel Willmann6-26/+10
The current code tries to recover from dropped connections and resets the pcu state so it can keep running. However, this never worked correctly which is why the -e option is used. This option exits the pcu as soon as the internal state needs to be reset. This patch removes this option and makes this behaviour default. Ticket: SYS#390 Sponsored-by: On-Waves ehf
2014-06-04bts: Remove outdated commentDaniel Willmann1-1/+0
There is no parameter in the function and the bts has a memeber trx which has a member pdch. Sponsored-by: On-Waves ehf
2014-06-04csn1: Add spaces between string literal and identifierDaniel Willmann1-2/+2
This is required by C++11 csn1.cpp:1147:44: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] LOGPC(DCSN1, LOGL_NOTICE, "%"PRIu64"|", bitvec_read_field(vector, readIndex, bits_to_handle)); Sponsored-by: On-Waves ehf
2014-06-04gprs_rlcmac_pdch: Get rid of ul/dl_tbfDaniel Willmann4-26/+24
The current code keeps a reference to all tbfs in the bts and another reference in the pdch. This allows for the possibility of both lists to go out of sync. This patch removes the pdch-specific list of ul and dl tbfs and uses the lists in the bts to lookup tbfs everywhere. Performance for going through the global list is not an issue yet. We can optimize this later and in a better way. Sponsored-by: On-Waves ehf
2014-06-04gprs_rlcmac_pdch: Don't access private membersDaniel Willmann3-2/+19
This patch introduces methods to get ul and dl tbf by tfi and uses them in gprs_rlcmac_sched. Sponsored by: On-Waves ehf
2014-05-30tbf: Re-send dl assignment if we can upgrade to multislotDaniel Willmann3-2/+32
The current code would only ever assign one PDCH for the initial assignment (from CCCH). Only if reuse_tbf is called the algorithm would actually use multiple DL PDCHs if possible. This patch introduced a tbf attribute upgrade_to_multislot that is set if we have multiple PDCH configured, and support multislot assignment, but can only assign a single PDCH (alloc_algorithm_b, parameter single is set). In this case after the assignment completes (and the MS is listening on a PDCH) we resend a DL assignment though the PACCH and this time we can assign multiple timeslots.