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
40fc8f9e46
sched: Make internal methods static
2013-11-23 23:03:14 +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
9525567d77
rlc: Create a basic test that mark/is is talking about the same
2013-11-23 16:19:17 +01:00
Holger Hans Peter Freyther
6b5660c19f
rlc: Move the rlc headers into a separate header file
2013-11-23 16:19:17 +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
5a7f636ce4
llc: FIx a typo in the message
2013-11-21 21:59:32 +01:00
Holger Hans Peter Freyther
c6382ddd6e
rlc: Add a simple test for the RLC data structure for the init
2013-11-21 21:42:20 +01:00
Holger Hans Peter Freyther
6058220d2a
types: Add a simple testcase for basic types and fix the LLC code
...
* Make append_data, remaining_space and fits_in_current.. work
on m_length and not the index. This ways things can't overflow.
* The current API consumer was moving the m_index so it should have
worked okay.
2013-11-21 21:30:23 +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
937e2a6919
meas: Add a warning for flow control handling here
2013-11-19 17:01:49 +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
Holger Hans Peter Freyther
b1302b083e
llc: Move the decision if a frame has expired into the LLC
...
This way the generation of the expiry information and the check
is at the same place. This should make reading the code more easy.
2013-11-13 17:16:28 +01:00
Holger Hans Peter Freyther
32f9a59ab4
llc: Make the index 'private' by appending a m_ to it.
...
At some point in the future we can start using the private/protected
keywords in this struct.
2013-11-13 17:14:42 +01:00
Holger Hans Peter Freyther
e23102602c
llc: Move some more secrets from the TBF into the LLC
...
Introduce a method to append data to a TBF and then reset the
read pointer when the frame has been sent.
2013-11-13 17:08:07 +01:00
Holger Hans Peter Freyther
b3d5ee2934
bts: Count the number of llc frames that were "scheduled" to be sent
...
This does not mean that they have been successfully transferred
to the SGSN/MS but at least that they have reached a certain point
in the message flow.
2013-11-13 16:43:26 +01:00
Holger Hans Peter Freyther
51e093bd1c
llc: Use timeradd and timercmp and fix for < 1s PDU llc timeouts
2013-11-13 15:35:45 +01:00
Holger Hans Peter Freyther
985fd114f2
llc: Change the flow. Exit early for the special case and initialize the tv
2013-11-13 15:19:39 +01:00
Holger Hans Peter Freyther
fce431cf3a
llc: Move the timeout calculation into the TBF
2013-11-13 15:17:12 +01:00
Holger Hans Peter Freyther
aa35ba7584
tbf: Count how often we re-use a TBF that was already being deactivated
2013-11-13 15:02:50 +01:00
Holger Hans Peter Freyther
857281f7ff
llc: Remove one of the two variants to put data into the frame
2013-11-13 14:58:19 +01:00
Holger Hans Peter Freyther
d26318e4a7
misc: Fix coverity warning about indention
...
So we had one intended line inside the if for "SMS VALUE" and
at the same time one line with "SMS VALUE" at the same indention.
Assume it is copy and paste and remove the line. Currently we
are only parsing the ms_class so this change should not have any
semantic change.
Fixes: Coverity CID 1058761
2013-11-11 20:28:29 +01:00
Holger Hans Peter Freyther
4e8b50cd8d
misc: Fix a potential leak on config parsing
...
Fixes: Coverity CID 1040949
2013-11-11 20:12:30 +01:00
Holger Hans Peter Freyther
0e0f2f5faf
pcu: Address the return without value
...
Fixes: Coverity CID 1040959
2013-11-11 20:10:04 +01:00
Holger Hans Peter Freyther
a6e47c7f54
llc: Add another warning for me to take a look
2013-11-11 20:08:35 +01:00
Holger Hans Peter Freyther
5697b4ccfa
tbf: Make sure that tfi is signed so we can make a < 0 check
...
For the failure check we need this variable to be < 0.
Fixes: Coverity CID 1107941
2013-11-11 16:22:39 +01:00
Holger Hans Peter Freyther
acb5427bda
llc: Move all direct accesses to the frame into the llc structure
...
Add some todo items where we could add assertions now that I see
the constraints and invariants of this code.
2013-11-07 08:15:58 +01:00
Holger Hans Peter Freyther
be57081721
llc: Move the llc structure to a new header file
2013-11-07 08:02:10 +01:00
Holger Hans Peter Freyther
b7840466ce
tbf: Split create_dl_acked_block into two methods
...
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-07 07:50:26 +01:00
Holger Hans Peter Freyther
a1da251c10
tbf: Move the tbf_handle and tbf_append_data into the class
2013-11-07 07:32:51 +01:00
Holger Hans Peter Freyther
096f6f9f39
llc: Move the llc code out of the tbf.cpp into a new dedicated one
2013-11-07 07:21:06 +01:00
Holger Hans Peter Freyther
758dc12c9f
llc: First routines moved from the TBF into the LLC
2013-11-07 07:16:21 +01:00
Holger Hans Peter Freyther
28e5378b55
llc: Begin creating a LLC class and move counts into it.
...
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-06 20:23:56 +01:00
Holger Hans Peter Freyther
9948514086
tbf: Move the tx part into the tbf as it accesses internal data
2013-11-06 20:15:11 +01:00
Holger Hans Peter Freyther
77e05971b4
tbf: Move the llc handling into the tbf (from the bts)
...
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-11-06 19:16:43 +01:00
Holger Hans Peter Freyther
bc1626e5de
tbf: Update the timing advance for the new tlli based on the old one
2013-10-30 21:24:13 +01:00