aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
AgeCommit message (Collapse)AuthorFilesLines
2014-05-30tbf: Re-send dl assignment if we can upgrade to multislotDaniel Willmann1-0/+3
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.
2014-05-30tbf/bts, encoding: Keep track of WAIT_RELEASE state for DL assignmentDaniel Willmann1-0/+4
The current code does not properly distinguish between DL assignments to reuse a tbf (after it was put in state WAIT_RELEASE) and DL assignments for an active tbf to change the allocation of the PDCH timeslots. This patch introduces a new variable was_releasing which remembers if trigger_dl_ass() was called with a tbf in state WAIT_RELEASE. In that case we have to set the CONTROL_ACK field in the download assignment. This should allow us to send DL assignments to change PDCH TS allocation of a tbf before we enter FLOW state.
2014-05-30tbf/bts: Rename tbf->snd_dl_ack to tbf->rcvd_dl_ackDaniel Willmann1-1/+1
This function is called to act upon a received DL ACK packet so this name makes more sense.
2014-01-16tbf: Use past-tense and call it created_tsHolger Hans Peter Freyther1-4/+4
2014-01-15tbf: Save a timestamp at tbf allocation and print it in the VTYDaniel Willmann1-0/+9
2014-01-15tbf: Add a function to output tbf info to VTYDaniel Willmann1-0/+14
2014-01-15rlc/tbf: Move v_b into DL windowDaniel Willmann1-1/+0
Move functions resend_needed(), mark_for_resend(), update(), move_window(), state(), count_unacked() out of v_b directly into the UL window and provide a function get_state in v_b to access the v_b elements.
2014-01-15rlc/tbf: Move v_n into gprs_rlc_ul_window and adapt the testsDaniel Willmann1-1/+0
v_n is part of the UL window handling so move it inside the ul_window
2014-01-15tbf: Kill the tsc member as it duplicates dataHolger Hans Peter Freyther1-1/+1
We can just use first_ts and the trx/pdch to extract this information. Avoid duplication of data.
2013-12-04tbf: Separate the handling for rh->si and call in case of re-transmissionHolger Hans Peter Freyther1-0/+1
In case of a retransmission ack the window again..
2013-11-26tbf/sched: We pick the _last_ entry, rotate the listsHolger Hans Peter Freyther1-0/+3
We always pick the _last_ entry from the lists. Let's rotate so we make it a bit more fair.
2013-11-26tbf: Move the extraction of the TLLI into a separate methodHolger Hans Peter Freyther1-0/+2
2013-11-26tbf/rlc: Move the v_n handling into a dedicated objectHolger Hans Peter Freyther1-1/+1
2013-11-26tbf/rlc: Big change and move the window handling out to the rlcHolger Hans Peter Freyther1-10/+4
The send and receive window is now managed by an external object. There are some issues that can only be solved with C++11 but it is progres and removes some of the spaghetti code. For GPRS the sns and ws is hardcoded. Move that into the window code.
2013-11-26tbf: Split the handling of DL ACK/NACK into two separate partsHolger Hans Peter Freyther1-0/+2
Split the handling of the final ack and the handling of frames that is moving frames.
2013-11-26debug_diagram: Remove the special debug_diagram compilation modeHolger Hans Peter Freyther1-5/+0
This approach is somehow flawed. We need/want to debug problems on systems with real traffic and re-compiling it with debug_diagram is not an option. All internal logging needs to be expressive enough so we can understand what is going on (e.g. create a script to post-process the output).
2013-11-26tbf: Simplify the create_dl_acked_block into two partsHolger Hans Peter Freyther1-0/+1
Separate the resend from creating a new block. It shows that the first_fin_ack is always set to FALSE for re-sending. This might not be what we want.
2013-11-26tbf: Move the check if the window is stalled to a separate methodHolger Hans Peter Freyther1-0/+1
2013-11-23tbf: Make the ws and sns number "private" (they should also be const)Holger Hans Peter Freyther1-2/+9
2013-11-23rlc: Move the rlc headers into a separate header fileHolger Hans Peter Freyther1-103/+1
2013-11-23rlc: Move the ack state array into a separate class that can be testedHolger Hans Peter Freyther1-1/+84
2013-11-21rlc: Add a simple test for the RLC data structure for the initHolger Hans Peter Freyther1-1/+1
2013-11-19rlc: Start to move things out of the tbf into the rlcHolger Hans Peter Freyther1-0/+2
Add remarks of possible broken behavior inside the tbf routines. Move the preparation (and init) into the new rlc.cpp file.
2013-11-13rlc: Pass the gprs_rlc_data to the assemble function for assemblyHolger Hans Peter Freyther1-1/+1
2013-11-13rlc: Put a block and the length into a separate objectHolger Hans Peter Freyther1-2/+8
This will ease passing things around.
2013-11-13rlc: Begin to move the rlc block handling into a separate objectHolger Hans Peter Freyther1-2/+11
The secret of gprs_rlc will be the manipulation of the blocks for the current window. We might add the window handling in this class as well.
2013-11-13tbf: Re-use the code that is re-using the tbfHolger Hans Peter Freyther1-0/+1
Address the fixme and re-use the code. Fix the counting in the final ack case and provide a log message in the other case. Prefix it with the tbf name
2013-11-07llc: Move the llc structure to a new header fileHolger Hans Peter Freyther1-22/+1
2013-11-07tbf: Split create_dl_acked_block into two methodsHolger Hans Peter Freyther1-0/+3
The method was more than 300 hundred lines of code. Split the selection of the index and the creation of the dl_msg.
2013-11-07tbf: Move the tbf_handle and tbf_append_data into the classHolger Hans Peter Freyther1-5/+9
2013-11-07llc: Move the llc code out of the tbf.cpp into a new dedicated oneHolger Hans Peter Freyther1-0/+1
2013-11-07llc: First routines moved from the TBF into the LLCHolger Hans Peter Freyther1-1/+11
2013-11-06llc: Begin creating a LLC class and move counts into it.Holger Hans Peter Freyther1-4/+12
Begin to move state of the LLC into a separate object. This will allow to make side-effects more clear and kill some code duplication.
2013-11-06tbf: Move the tx part into the tbf as it accesses internal dataHolger Hans Peter Freyther1-0/+1
2013-11-06tbf: Move the llc handling into the tbf (from the bts)Holger Hans Peter Freyther1-0/+4
This will be moved to a LLC class in the future but after this we can make the sns/ws private now and have little to update outside the tbf.
2013-10-30tbf: Have one imsi field and assign it through a functionHolger Hans Peter Freyther1-3/+11
Have one IMSI field per TBF and assign through a function call. The IMSI should be used to look-up the TBF on the SGSN->PCU direction.
2013-10-30tbf: Make tfi private and update the codeHolger Hans Peter Freyther1-1/+8
All logging code that used tbf->tfi is now using tbf_name to print the the TBF. External code is now using tfi() which is inlined and should result in the same code being generated as before (+debug code that can be stripped).
2013-10-30tbf: Make the tlli "private" and update the updating codeHolger Hans Peter Freyther1-2/+24
Now all updates to the tlli/tlli_valid are in one place. If we implement the policy to update the matching/linked TBF we can now to do it in a single place. Add a todo item for that as I am waiting for feedback from the mailinglist.
2013-10-30tbf: Create tbf_name and use it in log statementsHolger Hans Peter Freyther1-0/+2
This is like gsm_lchan_name and should be used in log statements. This way we can easily change the information that is printed and we know how to search things. The other part is that direct use of tfi/tlli is removed which will allow us to make them private and at the same time start to resolve the "tlli" updated in many places. Not old log statements are changed yet. This will done whenever a bad log statement is seen on the console...
2013-10-30tbf: Remove the trx_no field from the tbf, go through the trx objectHolger Hans Peter Freyther1-1/+0
2013-10-30tbf: Go through the trx to get the ARFCNHolger Hans Peter Freyther1-1/+0
2013-10-30tbf: Move gprs_rlcmac_send_data_block_acknowledged into tbfHolger Hans Peter Freyther1-0/+1
We can now remove the gprs_rlcmac_data as the code has been moved into the tbf, pdch and bts.
2013-10-30tbf: Move gprs_rlcmac_send_packet_uplink_assignment into the tbfHolger Hans Peter Freyther1-0/+1
2013-10-30tbf: Move gprs_rlcmac_send_packet_uplink_assignment to the tbfHolger Hans Peter Freyther1-0/+1
Again the function was called send but didn't do any sending
2013-10-30tbf: Move gprs_rlcmac_send_uplink_ack into the tbfHolger Hans Peter Freyther1-0/+1
The method was called send but didn't send anything. Move it to the tbf
2013-10-30tbf: Move gprs_rlcmac_send_packet_downlink_assignment into the tbfHolger Hans Peter Freyther1-0/+2
This method was called _send_packet_ but actually didn't do any sending at all. It just formated the right assignment. I replaced tbf-> with nothing.
2013-10-30tbf: Move gprs_rlcmac_poll_timeout into the tbfHolger Hans Peter Freyther1-0/+5
Move the gprs_rlcmac_poll_timeout method into the tbf class and gprs_rlcmac_downlink_assignment into the BTS.
2013-10-30tbf/bts: Move the tfi_find_free into the btsHolger Hans Peter Freyther1-3/+0
2013-10-30tbf/pdch/bts: Move the tbf look-up by tfi into the BTSHolger Hans Peter Freyther1-4/+0
2013-10-30tbf: Move the timer routine into the classHolger Hans Peter Freyther1-2/+2
The timer is used for various timeouts and there is still external client code that is calling it. In a perfect world the client code would indicate that an event has happened and the internal timer will be stopped. The best compromise is the "stop_t3191" method. It allows to add semantic verification that the timer has been running.