aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-09-15tbf: Don't multiplex one timer per tbfsysmocom/tbf-final-ackDaniel Willmann6-102/+177
Multiplexing one timer for all the TBF-specific timers means that only one can run at a time. It's not clear if that is always the case so use one timer per Txxxx timer. Sponsored-by: On-Waves ehf
2014-09-15bts: Poll for DL ACK/NACK again if MS answered with different messageDaniel Willmann1-0/+7
According to 3GPP TS 44.060 ch. 8.1.2.2 the MS can answer a poll request with a message different from a DL ACK/NACK "at most every second time it is polled for the TBF". If the MS sends a different mesage set the DL ACK/NACK timeout bit so the polling will be repeated. Sponsored-by: On-Waves ehf
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-10tests/tbf: Test for final ack issueDaniel Willmann2-0/+142
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 Willmann3-6/+14
Sponsored-by: On-Waves ehf
2014-08-15TbfTest: Make logging more verboseDaniel Willmann2-1/+40
Sponsored-by: On-Waves ehf
2014-08-12Merge branch 'sysmocom/tbf-split'Holger Hans Peter Freyther8-1073/+1152
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-08Merge remote-tracking branch 'origin/sysmocom/tbf-split'Holger Hans Peter Freyther13-270/+287
the TBF handling in osmo-pcu mixes UL and DL TBFs together. They are quite different, however, and should be treated differently. This patch series continues the work of splitting up UL and DL TBFs into their own classes and explicitly using a DL TBF or UL TBF instead of the base class in those parts of the code that deal with only one variant. I didn't test every single commit, but each should compile and the result passes make check as well as our iperf test against a GSM modem. [Text from Daniel's cover mail]
2014-08-07tbf, ...: Make the fields in the dl/ul struct member variablesDaniel Willmann9-85/+86
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-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-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-22Merge branch 'sysmocom/tbf-split'Holger Hans Peter Freyther6-94/+182
We start to separate the UL and DL part of the TBF now as they really behave differently. One works on RLCmac frames (plural) and sends them, the other is just assembling one of them. The code will become more clear now.
2014-07-22bts, tbf: Split alloc_tbf function into separate UL and DL versionsDaniel Willmann5-46/+106
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 Willmann4-23/+35
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