Age | Commit message (Collapse) | Author | Files | Lines |
|
Currently GPRS is handled by the old code path while EGPRS already
uses the unified functions. The rcv_block_egprs is basically not
specific to EGPRS and just needs minor modifications to handle GPRS.
This commit turns gprs_rlcmac_pdch::rcv_block_egprs into a unified
rcv_data_block method and uses it for GPRS, too.
Note that the logging messages of the new parser are different.
Sponsored-by: On-Waves ehf
|
|
Currently gprs_rlcmac_tbf::extract_tlli takes care of decoding and
the TBF update. These are really different things and doing the
decoding in extract_tlli makes EGPRS support more complex.
This commit moves the TBF state related part into a new method
gprs_rlcmac_tbf::set_tlli_from_ul.
Sponsored-by: On-Waves ehf
|
|
Currently gprs_rlc_ul_window::receive_bsn calls raise_v_q and returns
the number of RLC data blocks that can be taken from the queue. This
does not fit the EGPRS feature to put 2 independant data blocks in a
single RLC block.
This commit removes raise_v_q from receive_bsn, hence it must be
called explicitely to get the number of processable data blocks.
Sponsored-by: On-Waves ehf
|
|
This checks the example test cases given in appendix B of
TS 44.060.
Sponsored-by: On-Waves ehf
|
|
This commit adds the methods maxDataBlockBytes and numDataBlocks
which provide information about the data areas within RLC messages.
In these areas, the extension bytes, TLLI, and the LLC data are
stored.
Sponsored-by: On-Waves ehf
|
|
The header type depends on the coding scheme, for GPRS there is a
single data header type per direction, for EGPRS there are 3 per
direction. In addition, control block header types are used with CS-1
only, so there is one of the per direction altogether for GRPS and
EGPRS.
This commit adds the header type enum and two methods headerTypeData
and headerTypeControl.
Sponsored-by: On-Waves ehf
|
|
Currently the block size is mapped by a switch statement to strip
extra bits that are not used for RLC blocks. That information is
already available via the GprsCodingScheme class.
This commit moves the CS/MCS detection to the rcv_block message and
passes the cs object via rcv_block_gprs, where the length gets
adjusted, to gprs_rlcmac_pdch::rcv_data_block_acknowledged. There the
switch statement is removed.
Note that the TbfTest.err changes due to an additional log message.
Sponsored-by: On-Waves ehf
|
|
This test checks constructors, predicates, and operators of the
GprsCodingScheme class.
Sponsored-by: On-Waves ehf
|
|
The multislot (MS) class and the EGPRS MS class can also be passed
via BSSGP in an MS Radio Access Capability element which can
optionally be contained in a DL-UNITDATA PDU. While this case is fully
supported for GPRS, the EGPRS MS class in BSSGP messages is ignored.
This commit extends gprs_rlcmac_dl_tbf::handle to pass the EGPRS MS
class, too.
Note, that the EGPRS class is not yet taken from the CSN.1 RA
capability and is always set to 0. Note also, that append_data
still uses ms_class only.
Sponsored-by: On-Waves ehf
|
|
Add an egprs_ms_class argument to the allocation functions and
set/pass it where necessary.
Sponsored-by: On-Waves ehf
|
|
The leak rate sent to the SGSN does not reflect the current CS level,
lost frames, and control message overhead. So the SGSN cannot do
proper queue control under non-optimal conditions.
This commit computes the leak rate for the last flow control interval
by computing the maximum theoretical leak rate and basically
substracting control blocks, nacked blocks, and reduced block sizes
due to CS downgrade. By using this approach, the value will by more
stable on low load, where the value will tend to be near the value
derived from the configuration. On full load the transmitted value is
completely derived from the measurements.
Note that the MS default values are no adapted to the adapted BVC
leak rate, since a single MS which has a lower link quality would
otherwise be reducing the rate of another MS with good radio
conditions, which would not make much sense if they did not share any
PDCH.
Sponsored-by: On-Waves ehf
|
|
Currently an existing DL TBF can get lost in the process of
establishing an UL TBF via RACH. This can lead to stalled connections
until the network sends more LLC frames.
This commit adds a check for a non-empty LLC queue after the UL TBF
has been established to rcv_control_ack (GPRS_RLCMAC_UL_ASS_WAIT_ACK
path) to eventually establish a new DL TBF on the UL TBF's PACCH.
Sponsored-by: On-Waves ehf
|
|
Currently an existing DL TBF is freed immediately, when a resource
request is received. This makes sense since the MS might have dropped
it when switching to the PDCH signaled via the AGCH for the SBA. But
if the TBF still is assumed to exist on the MS side, there might be
TFI collisions if the old TBF object is not kept to block its TFI
for some time.
This commit changes rcv_resource_request to call release() instead of
tbf_free() on the DL TBF object (if it exists).
Sponsored-by: On-Waves ehf
|
|
Currently reuse_tbf (partly) resets the old DL TBF and uses its PACCH
to establish a new DL TBF. The method can not be used with UL TBFs.
This commit replaces the reuse_tbf method into a
gprs_rlcmac_dl_tbf:release method which triggers the TBF's timer
based deletion (so that the TFI is still reserved for some time) and
a gprs_rlcmac_tbf::establish_dl_tbf_on_pacch which can establish DL
TBFs on existing PACCHs of either DL or UL TBFs.
Sponsored-by: On-Waves ehf
|
|
Currently when a second MS object has been created for an MS, because
the TLLI was not known yet, the will be detected in
gprs_rlcmac_tbf::extract_tlli and the two objects will be merged by
update_ms. But when the dl_tbf is moved from the old to the new
(second) MS object, the old MS object can get idle and be removed
before the object are merged. This can cause LLC frame loss when the
MS object is deleted immediately after getting idle (no timeout
configured).
This commit adds a guard to keep the MS object until extract_tlli has
been executed.
Sponsored-by: On-Waves ehf
|
|
This reverts commit e91bd3babd5c04a154f296607b401a5050dcba31.
That commit seems to cause hanging DL TBFs when there was a RACH
based UL TBF establishment while it that TBF is active. This could be
caused by the use of a different PDCH for the SBA.
Conflicts:
tests/tbf/TbfTest.cpp
tests/tbf/TbfTest.err
|
|
Currently all of these messages are discarded if they are assumend to
be caused by noise. But even in these cases, the FN and TN values
which are added by the DSP are valid. So these can be used to update
the current_frame value.
The osmo-bts sets the fBFILevel of a physical channel to -200dB if it
is used for PDTCH or PACCH which is the case for all PDCH. This way
a data_ind or ra_ind message is already send at least once per block
period (4 frames) per PDCH. These messages are passed to either
handle_ph_data_ind or handle_ph_ra_ind even if they contain garbage
data.
The ra_ind messages are sometimes sent a few frames earlier than
data_ind messages using the same frame.
This commit adds calls to update the current_frame value based on all
of these messages before they are discarded. The FN taken from ra_ind
are passed with an increased max_delay (5) to compensate for early
ra_ind messages.
Sponsored-by: On-Waves ehf
|
|
The FN of the data_ind taken from the DSP are monotonic, so latency
does not affect the detection of poll timeouts if these FN are used.
If the FN is larger than a poll_fn value, it can safely be assumed
that the poll response will not arrive later on.
Currently a max_delay of 60 frames is used, which has the drawback
that additional ~250ms will pass until a lost ACK is detected.
Using the data_ind's FN alone breaks the poll timeout detection if
there are no other MS sending data blocks.
This commit adds BTS::set_current_block_frame_number that is called
with the FN taken from data_ind messages. The max_delay is set to 0
which removes the additional delay, when this FN is used to detect
poll timeouts. So the average additional delay decreases with the
number of data_ind per time. The current_frame is updated unless it
seems to have been updated already (assumed if 0 < cur_fn - block_fn
< 500). Thus the time_ind has still priority to update the
current_frame value.
Sponsored-by: On-Waves ehf
|
|
This commit adds the relevant frame number to the "poll timeout"
logging message. In addition, logging is added to the places where
poll_fn gets set.
The goal is to track down the source for frequent "poll timeout"
messages.
Sponsored-by: On-Waves ehf
|
|
Currently when allocating tbf_alloc_ul_tbf or tbf_alloc_dl_tbf
objects, the allocated memory area is pre-initialised by talloc_zero
before the C++ constructors are called. This is not recognised by
Coverity, since there is no talloc model file yet. Thus Coverity
complains about missing initialisers.
On the other hand, it is still planned to convert the TBF classes
into real C++ ones. So instead of silencing Coverity directly, this
is an opportunity to do it the C++ way.
This commit adds initialisers and initialisation code for all
members that relied on talloc_zero. The corresponding calls to
talloc_zero are replaced by calls to talloc to give ASAN/valgrind
a chance to detect future initialisation errors. Some initialisation
code is also moved from setup_tbf to the constructors, notably the
initialisation of the bts pointer.
Fixes: Coverity CID 1320604, 1320605, 1320606
Sponsored-by: On-Waves ehf
|
|
Currently when calling GprsMs::attach_tbf and a TBF of the same
direction already exists, the old TBF gets detached from the MS
object.
Therefore that TBF object loses access to that MS object including
for instance TLLI and IMSI.
This leads to failing DL TBF reuses, since the downlink assigment
cannot be sent on the PACCH later on because that must be sent on the
old DL TBF which ms() is NULL and the new DL TBF cannot be retrieved.
This commit fixes this bug by changing the GprsMs implementation to
keep a list of replaced (old) TBFs. TBFs are only removed when they
are being detached explicitely (see tbf_free and set_ms).
Addresses:
tbf.cpp:741 We have a schedule for downlink assignment at uplink
TBF(TFI=1 TLLI=0xf35a680e DIR=UL STATE=RELEASING), but there is no
downlink TBF
Sponsored-by: On-Waves ehf
|
|
The missing const qualifier prevents the llist_empty() C++ wrapper
function from being compiled successfully when it is used.
Sponsored-by: On-Waves ehf
|
|
The TBF object are currently created by using talloc_zero/talloc_free
directly from plain functions. Therefore C++ constructors and destructors
are not called. So the only initialisation that is done is setting
every member to 0. Non POD members do not have their constructors
called either, which makes it impossible to use the current LListHead
class for real members when the LListHead::m_back member has to be set.
This commit changes the TBF allocation functions to call the
corresponding C++ constructor after the call to talloc_zero and to
register the C++ destructor with the talloc context, so that is is
called before talloc_free actually frees the memory.
With this change, non-POD members and custom
constructors/desctructors can be used with gprs_rlcmac_tbf,
gprs_rlcmac_dl_tbf, and gprs_rlcmac_ul_tbf.
Note that this change is only a single step of the plan to turn the
TBF classes into real C++ classes.
Sponsored-by: On-Waves ehf
|
|
This tests the usage of an existing TBF that is no longer in FLOW
state to request a new DL TBF via the old TBF's PACCH.
The test triggers a bug that breaks the association between both TBF
objects, resulting in packet loss and transmission stalling.
Sponsored-by: On-Waves ehf
|
|
Currently the assignment is completed by manipulating the state of
the TBF objects directly by setting the state fields to fixed values.
This way, the PCU's code that is responsible to update the state
accordingly is not tested.
This commit changes this to simulate RLC Control Acknowledgement
messages instead.
Sponsored-by: On-Waves ehf
|
|
This function basically request the generation of the next downlink
RLC block. Since this will no really send somthing to the PCU, the
current name can be misleading.
This commit just renames the function.
Sponsored-by: On-Waves ehf
|
|
The block number can always be deduced from the frame number. The
current test code handles the block number explicitely, which makes
the code more complex and has also led to block number errors cause
by not wrapping the numbers (valid block numbers range from 0 to 11).
This commit changes send_rlc_block to always compute the block number
based on the frame number. It also turns the block_nr into an
optionaly output-only parameter.
Sponsored-by: On-Waves ehf
|
|
The current implementation takes a lot of parameters (bts, trx_no,
...) that can also be taken from a TBF object.
This commit adds an alternative variant with just takes a TBF, the fn
(in/out), and the block number (in/out).
Sponsored-by: On-Waves ehf
|
|
This commits adds send_ul_mac_block() to encode and send a
RlcMacUplink_t to the PCU.
Sponsored-by: On-Waves ehf
|
|
Currently the pending LLC packets are lost in some cases when MS
objects are merged, for instance after a RACH when there were 2 MS
object for the same MS (they get merged, when the TLLI is known for
both objects).
This patch modifies GprsMs::merge_old_ms to move all pending LLC
packets (if there are any) to the current MS object.
Sponsored-by: On-Waves ehf
|
|
This methods takes all LLC frames from the old LLC queue and moves
them into the current. If both queues are ordered chronologically
(recv_time), the resulting queue is also ordered.
Sponsored-by: On-Waves ehf
|
|
Currently all active TBF of an MS are killed if a Packet Resource
Request is received from the MS. In general this happens after a RACH
request. This does not happen after a resource request that has been
included into a Downlink Ack/Nack.
Sometimes an UL TBF is requested by an MS via RACH while a DL TBF is
running for instance to send a TCP Ack. This can happen, if a former
request via PACCH did not work.
This commit removes the killing of the DL TBF from
gprs_rlcmac_pdch::rcv_resource_request().
Sponsored-by: On-Waves ehf
|
|
This adds tests for
- RA update with RACH for the RAUpdateComplete message
- RACH for UL while DL is active (LLC queue not empty)
Sponsored-by: On-Waves ehf
|
|
This commit fixes several issues:
- Set MS class in request
- Set IMSI in establish_ul_tbf_two_phase
- Fake assigment acknowledgement in establish_ul_tbf_two_phase
- Fix TFI bit offset to 1 (was 2)
Sponsored-by: On-Waves ehf
|
|
Currently the functions test_tbf_single_phase and test_tbf_two_phase
do the test logging, BTS intialisation, and the complete message
sequencing on their own. Therefore they cannot be used to test more
complex sequences like TBF reestablishment.
This commit moves the code that does the actual messaging into own
functions. The frame number handling is generalised which also fixes
a block number wrapping error on the way.
Sponsored-by: On-Waves ehf
|
|
Currently the merging of the meta information (MS class, IMSI) takes
place in gprs_rlcmac_tbf::merge_and_clear_ms(). This makes it
difficult to merge the internal state and does not directly relate to
TBFs anyway.
This commit moves this into a new method GprsMs::merge_old_ms.
Sponsored-by: On-Waves ehf
|
|
Currently there is not support for Network Service (NS) logging.
This commit adds the missing definitions and sets the default level
to INFO. Further configuration can now be done with the 'logging
level ns' VTY command.
Sponsored-by: On-Waves ehf
|
|
Currently if an MS retries to access the PCU by using RACH and if
there is already an entry for that MS, a duplicated MS object
referring to the same TLLI is created. This is caused by blindly
setting the TLLI without querying the MS storage to avoid
inconsitencies.
This leads to several entries in the MS storage that are assigned to
the same TLLI. If that happens, 'show ms all' can display multiple
entries with the same TLLI (note that an MS object can belong to
several TLLIs, so there might be an intersection that is not visible
in the list) or 'show tbf all' can show entries with MS_CLASS == 0 in
some cases.
This commit changes update_ms() to merge and clean up old entries
that belong to the given TLLI if they exist. Some data (like the MS
class) is copied to the new MS object.
Note that TBF belonging to the old MS object are deleted immediately
if they have not registered a timer.
Sponsored-by: On-Waves ehf
|
|
Currently when receiving a PACKET DL ACK/NACK message with the Final
Ack Indicator bit set, the TBF's state is set to
GPRS_RLCMAC_WAIT_RELEASE but T3193 is only started when the LLC queue is
empty. Otherwise the reuse_tbf() method is called to establish a new
DL TBF. In that case, the timer is not started. This will leave the
current TBF without a timer so it is potentially not released later
on.
This is recognisable by sticky entries in the output of the
'show tbf all' command and possibly allocation failures if there are
too many of them.
This commit changes the code to always start T3193 to make sure, that
a timer is always active when the the state is set to
GPRS_RLCMAC_WAIT_RELEASE.
Note that TS 44.060, 9.3.2.6 requests to release the 'old' TBF
immediately in some cases, which is not implemented by this change.
This will lead to a longer reservation period of the TFI only, which
is safer than reassigning it too early.
Sponsored-by: On-Waves ehf
|
|
This commit adds an implementation of the CoDel algorithm based on
the reference pseudocode presented in
http://queue.acm.org/appendices/codel.html. Instead of abstracting
the queue itself, the implementation provides a time stamp based
automaton which is invoked after a package has been dequeued.
Note that the modifications of the algorithm shown in
https://tools.ietf.org/html/draft-ietf-aqm-codel-01 are not yet
applied.
Sponsored-by: On-Waves ehf
|
|
Currently there is no persistent state being used in
alloc_algorithm_dynamic. So algorithm B is even used in persistent
high usage scenarios. If there are many active TBFs, multislot
assigments are not fair, because MS of a "higher" multislot class get
higher troughputs. On the other hand, as long as all PDCH are busy no
bandwidth will be wasted even if all MS use algorithm A.
This commit modifies alloc_algorithm_dynamic to disable algorithm B
when that call fails. It then keeps it disabled until there is a
single PDCH which is idle (it is considered idle, if there is at most
one active DL TBF assigned to it).
Sponsored-by: On-Waves ehf
|
|
Currently the value of trx_no2 is used in the assertion, even if the
call to tfi_find_free has failed.
This commit fixes the asserted expression to only compare the trx_no
values if the function call has succeeded.
Sponsored-by: On-Waves ehf
|
|
Currently if both an uplink and a downlink TBF are to be allocated by
alloc_tbfs() and the second allocation fails, the first TBF is not
freed.
This commit changes the recursive function to free the TBF if the ms
variable has been changed to NULL.
Sponsored-by: On-Waves ehf
|
|
Indicate those slots with lower case letters that do not have a spare
TFI for the other direction if such a TBF has not been attached to
the MS object yet.
Sponsored-by: On-Waves ehf
|
|
Currently algorithm A can select an TBF even when there is no free
TBF in the reverse direction. While this does not necessarily lead to
an allocation failure, the probabily is higher. In addition, the
current slot reservations are not taken into account.
This commit changes the selection algorithm to prefer slots where TFI
are available in both directions and which are less reserved.
Sponsored-by: On-Waves ehf
|
|
To simplify debugging, show the actuals value before the assertion
fails in some cases.
Sponsored-by: On-Waves ehf
|
|
The idea behind this meta algorithm is to automatically select one of
the other algorithms based on the system state. Basically algorithm B
will be selected if the PDCH usage is low to improve throughput and
latency. Algorithm A will be selected to support more concurrent MS.
This commit adds a first simple state-less version of this algorithm
that always tries B first and only if that fails A is tried
afterwards.
The following VTY command is added to the 'pcu' node:
- alloc-algorithm dynamic
Ticket: #1934
Sponsored-by: On-Waves ehf
|
|
Currently these algorithms modify other objects (MS, TBF, PDCH) even
if the allocation will fail later on. To implement an algorithm that
dynamically tries another algorithm on failure (e.g. A after B), the
first (failing) algorithm should not change or damage anything.
This commit refactors algorithm A and B to delay the actual allocation
until it is known that the allocation will not fail.
Ticket: #1934
Sponsored-by: On-Waves ehf
|
|
MS iniated TCP connections generally result in a sequence
of short time UL and longer lasting DL TBFs, being interleaved
between several MS. This scenario is not covered by the existing
tests.
This commit adds a test, that allocates as man as possible TBFs
several times with different test modes without clearing the BTS (and
thus the TBF list) in between. The number of allocated DL TBFs in
each round is expected to be constant.
Sponsored-by: On-Waves ehf
|
|
Currently all TBFs are deleted after the allocation loop finishes.
This make it difficult to interleave the TBF allocation like it
happens with real MS.
This commit refactors the allocation loop into alloc_many_tbfs and
adds support for TLLIs, which are derived from the counter value and
used to retrieve an old MS object if alloc_many_tbfs is called a
second time.
Note that this does not make a difference for the existing tests.
Sponsored-by: On-Waves ehf
|