Daniel Willmann
fc03bbe078
tbf/bts: Rename tbf->snd_dl_ack to tbf->rcvd_dl_ack
...
This function is called to act upon a received DL ACK packet so this
name makes more sense.
2014-05-30 18:19:06 +02:00
Holger Hans Peter Freyther
a004799699
tbf: Use past-tense and call it created_ts
2014-01-16 10:07:20 +01:00
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
afa72f5210
tbf: Add a function to output tbf info to VTY
2014-01-15 17:41:44 +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
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
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
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
4c06d9155c
tbf: Move the extraction of the TLLI into a separate method
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
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
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
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
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
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
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
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
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
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
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
5464c9baf2
tbf: Have one imsi field and assign it through a function
...
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-30 21:24:13 +01:00
Holger Hans Peter Freyther
34f6e5ebe6
tbf: Make tfi private and update the code
...
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-30 21:24:13 +01:00
Holger Hans Peter Freyther
474685e26e
tbf: Make the tlli "private" and update the updating code
...
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-30 21:24:13 +01:00
Holger Hans Peter Freyther
bd449f57a7
tbf: Create tbf_name and use it in log statements
...
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-30 21:24:13 +01:00
Holger Hans Peter Freyther
ec80f82824
tbf: Remove the trx_no field from the tbf, go through the trx object
2013-10-30 21:24:13 +01:00
Holger Hans Peter Freyther
fc498c9e7b
tbf: Go through the trx to get the ARFCN
2013-10-30 21:24:13 +01:00
Holger Hans Peter Freyther
61a0a04d26
tbf: Move gprs_rlcmac_send_data_block_acknowledged into tbf
...
We can now remove the gprs_rlcmac_data as the code has been
moved into the tbf, pdch and bts.
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
3dc56a3b34
tbf: Move gprs_rlcmac_send_packet_uplink_assignment into the tbf
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
ae03f22199
tbf: Move gprs_rlcmac_send_packet_uplink_assignment to the tbf
...
Again the function was called send but didn't do any sending
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
46bcb8d59d
tbf: Move gprs_rlcmac_send_uplink_ack into the tbf
...
The method was called send but didn't send anything. Move
it to the tbf
2013-10-30 21:24:12 +01:00
Holger Hans Peter Freyther
2db7e7e7db
tbf: Move gprs_rlcmac_send_packet_downlink_assignment into the tbf
...
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-30 21:24:11 +01:00
Holger Hans Peter Freyther
d9262b3b55
tbf: Move gprs_rlcmac_poll_timeout into the tbf
...
Move the gprs_rlcmac_poll_timeout method into the tbf class and
gprs_rlcmac_downlink_assignment into the BTS.
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
70ddde6929
tbf/bts: Move the tfi_find_free into the bts
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
f63cabd931
tbf/pdch/bts: Move the tbf look-up by tfi into the BTS
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
86300bbeea
tbf: Move the timer routine into the class
...
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.
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
af8094d799
tbf: Move the handle tineout into the tbf class
2013-10-30 21:24:11 +01:00
Holger Hans Peter Freyther
aa9c326d7e
tbf: Move the updating of the data into the tbf class
2013-10-30 21:24:11 +01:00