Daniel Willmann
80367aae17
tbf: Save a timestamp at tbf allocation and print it in the VTY
2014-01-15 17:41:45 +01:00
Daniel Willmann
772415fd8a
pcu_vty: Add a command to print info about all TBFs
2014-01-15 17:41:45 +01:00
Daniel Willmann
afa72f5210
tbf: Add a function to output tbf info to VTY
2014-01-15 17:41:44 +01:00
Daniel Willmann
3ce011f44f
rlc: Rename state() to show_state() to better reflect its function
...
show_state() is only used for debugging output to make the v(b) array
human readable.
2014-01-15 15:23:35 +01:00
Daniel Willmann
146514e180
rlc/tbf: Move v_b into DL window
...
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-15 15:23:21 +01:00
Daniel Willmann
55844795be
rlc/tbf: Add function receive_bsn that updates v_r, v_q, v_n
...
We don't need to expose the mecanics of updating the variables to the
outside.
2014-01-15 15:23:21 +01:00
Daniel Willmann
7c3751b10b
rlc/tbf: Move v_n into gprs_rlc_ul_window and adapt the tests
...
v_n is part of the UL window handling so move it inside the ul_window
2014-01-15 15:23:21 +01:00
Holger Hans Peter Freyther
4af30533f0
alloc/tests: Create an allocation test for various scenarious
...
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.
2014-01-15 10:39:07 +01:00
Holger Hans Peter Freyther
8f399de135
tbf: Kill the tsc member as it duplicates data
...
We can just use first_ts and the trx/pdch to extract this information.
Avoid duplication of data.
2014-01-15 10:34:09 +01:00
Holger Hans Peter Freyther
ba26368040
tbf: Fix typo and call it same
2014-01-15 10:33:56 +01:00
Daniel Willmann
9c623892f5
llc: Calculate the average queuing delay of the LLC queues
...
Use a formula like it is used with TCP. This can help to make
decisions about if frames should be dropped or not at the time
we enqueue them.
This code will store two timeval structs in fron the of the
actual data and compute the average at the time of the dequeue.
2013-12-25 14:55:04 +01:00
Holger Hans Peter Freyther
550bb88a9e
llc: Count the number of frames queued inside the LLC queue
2013-12-18 12:11:27 +01:00
Daniel Willmann
6f7cb2cb4f
decoding: Use 'I' and 'R' in rbb array for DL
...
We want to match up rbb decoding and encoding so it helps to use the
same chars.
2013-12-12 11:03:50 +01:00
Holger Hans Peter Freyther
3cbf9e040c
rlc: Make the RLC types only operate on the BSN
...
The code has an internal optimization to only use window_size
space. This means that the caller needed to know that only half
of the size was used. Change the API to work on the BSN and do
the mapping internally. The compiler should have plenty of
opportunity to propagate the constant(s) but this has not been
verified.
2013-12-04 21:01:02 +01:00
Holger Hans Peter Freyther
3c95776805
tbf: Separate the handling for rh->si and call in case of re-transmission
...
In case of a retransmission ack the window again..
2013-12-04 13:51:43 +01:00
Holger Hans Peter Freyther
7a5f3c2153
tbf/sched: We pick the _last_ entry, rotate the lists
...
We always pick the _last_ entry from the lists. Let's rotate
so we make it a bit more fair.
2013-11-26 21:00:52 +01:00
Holger Hans Peter Freyther
7f3e662b34
tbf/rlc: Move raising of V(Q) into the ul window code
2013-11-26 21:00:51 +01:00
Holger Hans Peter Freyther
cbb00ebd04
rlc/tbf: Move the code to raise V(R) into the ul_window handling
2013-11-26 21:00:51 +01:00
Holger Hans Peter Freyther
423dd2286b
tbf/rlc: Move the putting of a block into the rlc code
2013-11-26 21:00:51 +01:00
Holger Hans Peter Freyther
4c06d9155c
tbf: Move the extraction of the TLLI into a separate method
2013-11-26 21:00:51 +01:00
Holger Hans Peter Freyther
c15d5cc230
tbf/rlc: Remove the side-effect from the loop.
2013-11-26 21:00:51 +01:00
Holger Hans Peter Freyther
9977e1545a
tbf: Reduce complexity and deal with only one way of assignment
...
The normal mode of the PCU doesn't really work right now. There
is no place to have certain kind of features that are not built
and not unit-tested.
2013-11-26 21:00:51 +01:00
Holger Hans Peter Freyther
6ab5b24be4
tbf/rlc: Move the check if something is in the window out.
2013-11-26 21:00:51 +01:00
Holger Hans Peter Freyther
270f7fce1d
tbf/rlc: Move the v_n handling into a dedicated object
2013-11-26 21:00:51 +01:00
Holger Hans Peter Freyther
f1593b7c49
tbf/rlc: Big change and move the window handling out to the rlc
...
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-26 21:00:51 +01:00
Holger Hans Peter Freyther
ab6cd921e3
tbf: Update the legend and mention invalid as well
...
We should not see it but the legend should be complete.
2013-11-26 20:57:42 +01:00
Holger Hans Peter Freyther
9c5539d46d
tbf/rlc: Move the counting of unacked frames into the RLC V_B class
...
Whenwe receive a final ack we assume that all the unacked frames
have been acked now. Move the counting to V_B and now the caller
can remove the BSN and the "lost" variable which has always been
zero.
2013-11-26 20:57:24 +01:00
Holger Hans Peter Freyther
86dc355a33
tbf: Split the handling of DL ACK/NACK into two separate parts
...
Split the handling of the final ack and the handling of frames
that is moving frames.
2013-11-26 20:57:24 +01:00
Holger Hans Peter Freyther
bc15570651
tbf/rlc: Change the code and generate the entire state in the V_B
2013-11-26 20:57:24 +01:00
Holger Hans Peter Freyther
e358ff8fa4
tbf/rlc: Move the moving of V(A) into the V_B code
...
Move the code that moves the V_B to the first not acked frame. Return
how many indexes the V_B was moved and update the V_A in the caller.
2013-11-26 20:57:24 +01:00
Holger Hans Peter Freyther
df6b4f52e0
tbf/rlc: Move the parsing of RBB to Decoding, move window marking out
...
Move the parsing of the bitbmap out of the TBF code into Decoding.
Move the updating of the V_B into the V_B class. Add some comments
about handling the mod_sns, mod_sns_half parameters by using template
code.
2013-11-26 20:57:24 +01:00
Holger Hans Peter Freyther
9eb8ace260
tbf: Fix the indention of this routine
2013-11-26 20:57:24 +01:00
Holger Hans Peter Freyther
12c039cdb2
debug_diagram: Remove the special debug_diagram compilation mode
...
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-26 20:57:24 +01:00
Holger Hans Peter Freyther
a6ba67cb3a
tbf: Simplify the create_dl_acked_block into two parts
...
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-26 20:57:24 +01:00
Holger Hans Peter Freyther
8b16ae30fe
tbf/rlc: Move the marking of frames for resend into the v_b
2013-11-26 20:57:24 +01:00
Holger Hans Peter Freyther
c03e38291a
tbf: Move the check if the window is stalled to a separate method
2013-11-26 20:57:24 +01:00
Holger Hans Peter Freyther
1577779526
rlc/tbf: Move the loop into the gprs_rlc_v_b class
2013-11-26 20:57:19 +01:00
Holger Hans Peter Freyther
ef93bdb19b
tbf: Count how often we re-start a BSN in the send routine
...
There appears to be a scheduling issue. Even without any NACKs
we are re-transmitting a lot of frames. It might be because of
this.
2013-11-24 00:01:50 +01:00
Holger Hans Peter Freyther
64b49bc3ce
tbf: Always increase the tx_counter when we transmit a frame
...
In case the ACK could not be scheduled we were not increasing the
tx_counter. Change the code flow to always increase the tx_counter
after we have created a frame.
2013-11-23 23:16:07 +01:00
Holger Hans Peter Freyther
b18aedcc50
tbf: Make the ws and sns number "private" (they should also be const)
2013-11-23 16:27:50 +01:00
Holger Hans Peter Freyther
321f3c3104
rlc: Move the ack state array into a separate class that can be tested
2013-11-23 16:19:17 +01:00
Holger Hans Peter Freyther
092478f294
rlc: Count nacked frames in the statistics too
2013-11-23 01:01:19 +01:00
Holger Hans Peter Freyther
58db60c68e
rlc: Start to move things out of the tbf into the rlc
...
Add remarks of possible broken behavior inside the tbf
routines. Move the preparation (and init) into the new
rlc.cpp file.
2013-11-19 21:26:43 +01:00
Daniel Willmann
c3d5325fc8
tbf: The memory regions overlap so memmove should be used
2013-11-19 21:26:43 +01:00
Holger Hans Peter Freyther
c70aae4697
rlc: Count the window stalls on the RLC level
2013-11-19 17:09:37 +01:00
Holger Hans Peter Freyther
e5dc2a0ac5
rlc: Pass the gprs_rlc_data to the assemble function for assembly
2013-11-13 20:17:06 +01:00
Holger Hans Peter Freyther
796270bf83
rlc: Put a block and the length into a separate object
...
This will ease passing things around.
2013-11-13 20:05:00 +01:00
Holger Hans Peter Freyther
9241fd0957
rlc: Begin to move the rlc block handling into a separate object
...
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-13 19:51:55 +01:00
Holger Hans Peter Freyther
e9429b5d3e
rlc: Count the sent and resent RLC blocks
2013-11-13 19:36:57 +01:00
Holger Hans Peter Freyther
55cf994c29
tbf: Re-use the code that is re-using the tbf
...
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-13 18:15:45 +01:00