Age | Commit message (Collapse) | Author | Files | Lines |
|
The current code keeps a reference to all tbfs in the bts and another
reference in the pdch. This allows for the possibility of both lists to
go out of sync.
This patch removes the pdch-specific list of ul and dl tbfs and uses the
lists in the bts to lookup tbfs everywhere.
Performance for going through the global list is not an issue yet. We
can optimize this later and in a better way.
Sponsored-by: On-Waves ehf
|
|
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.
|
|
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.
|
|
This function is called to act upon a received DL ACK packet so this
name makes more sense.
|
|
|
|
Make finding use-after-free more easy by setting things to NULL
or simply return after tbf_free(this) has been called.
|
|
|
|
|
|
|
|
|
|
show_state() is only used for debugging output to make the v(b) array
human readable.
|
|
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.
|
|
We don't need to expose the mecanics of updating the variables to the
outside.
|
|
v_n is part of the UL window handling so move it inside the ul_window
|
|
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.
|
|
We can just use first_ts and the trx/pdch to extract this information.
Avoid duplication of data.
|
|
|
|
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.
|
|
|
|
We want to match up rbb decoding and encoding so it helps to use the
same chars.
|
|
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.
|
|
In case of a retransmission ack the window again..
|
|
We always pick the _last_ entry from the lists. Let's rotate
so we make it a bit more fair.
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
We should not see it but the legend should be complete.
|
|
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.
|
|
Split the handling of the final ack and the handling of frames
that is moving frames.
|
|
|
|
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.
|
|
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.
|
|
|
|
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).
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
Add remarks of possible broken behavior inside the tbf
routines. Move the preparation (and init) into the new
rlc.cpp file.
|