Age | Commit message (Collapse) | Author | Files | Lines |
|
This function contains 3 independent test cases. Let's split them into
separate functions to simplify further modifications:
* split test cases into separate functions
* use them for mass test as well
* change function names to avoid confusion
* make individual test cases return error instead of failing via assert
on allocation failure
The top-level test_alloc_b() is used as part of exhaustion tests in
test_all_alloc_b() for example, so it's expected that allocation might
fail (due to TFI or USF exhaustion for example) eventually. In this case
it's better to indicate it to caller instead of failing entire program.
The test output does not require any adjustements because we do not
exhaust to the point of allocation failure yet.
Change-Id: Id7e03a85ce96e7d617cecee963759bae589a3a1a
Related: OS#2282
|
|
* make function public
* add tests
Change-Id: I4174703808335c19341cd5b5f4422496d958967f
|
|
Previously all TBF-related events were logged as part of DRLCMAC which
is too broad to make it practically useful due to excessive amount of
log messages generated. Introduce dedicated log categories for
TBF-related events. Adjust test output as necessary.
Change-Id: I64d660e5971263d5c63d2ba95d50625c16a594aa
|
|
Add cycle to mark multiple allocated UL slots similar to the way we
count DL slots in AllocTest. Until multislot UL allocation is
implemented it does not affect test output.
Change-Id: I2705405119421da3066c6c6bdd5830df4c133a36
Related: OS#2282
|
|
msgb_set_talloc_ctx() is deprecated since libosmocore commit
f45334be29016a36594aacc07c90e262e4994525 / change-id
I747fbbf977c4d2c868c8dead64cfc5fd86eb8d4c
Change-Id: I8d40abec428b739460ed545c9983d1b63021bd08
|
|
Change-Id: I166109dc05d3323b92cd2a42f0c7e6009950e15d
|
|
This patch adds a test case test_2_consecutive_dl_tbfs which
expects a current bug with TS allocation for 2nd DL TBF.
The test's expectation is corrected along with the bug fix in a
subsequent commit
Related: OS#1792
Change-Id: I890e4fbb2b64037e051433e70082a197e2a929a6
|
|
This test will check that we exhaust the available TFIs, so the last
TFI is -16 and then we try to store to that address. It is surprising
that it worked!
|
|
LListHead does basically the same like llist_pods, but more C++ish
and with type safety.
This commit turns the former list field of gprs_rlcmac_tbf into a
private field, provides accessors, moves the related code from
pcu_vty.c to pcu_vty_functions.cpp, and removes the llist_pods
type and related code.
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
|
|
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
|
|
Currently the TBFs are registered in a TFI indexed array within the TRX
objects. TBFs can be searched globally by TFI and TRX number. This
conflicts with the use of the same TFI for different TBF on different
PDCH. This use case requires the specification of the PDCH as
additional search dimension.
This commit moves the TFI index TBF arrays into the PDCH objects. The
related methods are updated accordingly.
Ticket: #1793
Sponsored-by: On-Waves ehf
|
|
Currently the TFI are managed per TRX, thus only a maximum of 32 TBF
per direction and per TRX are possible simultaneously.
This commit modifies algorithm_a() to allow the sharing of TFI
between different PDCH. Since algorithm A only assigns a single slot
to each TBF, the TFI of each PDCH can be assigned independently.
This increases the maximum to 32 TBF per direction and per PDCH
concerning the TFI allocation.
Ticket: #1793
Sponsored-by: On-Waves ehf
|
|
Currently the TFI and the TRX have to be determined before the actual TBF
allocation function is called, passing TFI and TRX number as
parameters. This does fit to TFI reuse for different slots, since
this were tightly coupled with the slot selection.
This commit just moves the TFI selection into the alloc_algorithm
functions. The tfi parameter is removed from the the TFI alloc
functions. The trx parameter is changed into use_trx to optionally
limit the trx selection (same semantics like in tfi_find_free).
Sponsored-by: On-Waves ehf
|
|
Currently a single bit set is used to maintain a set of used TFI
without distinguishing between uplink and downlink. Since the
namespaces of UL and DL TFI are separate, this implementation is
not correct.
This commit changes gprs_rlcmac_pdch to use a separate bit set for
each direction. It also replace the corresponding conditional fprintf
statement in check_tfi_usage (AllocTest.cpp) by an equivalent
OSMO_ASSERT.
Sponsored-by: On-Waves ehf
|
|
This commit adds the check_tfi_usage function that checks the TFI
usage. It iterates through all TBFs, records on which PDCH it uses
which TFI and check for conflicts. It also checks the bits returned
by pdch->assigned_tfi(). The latter suffers from an bug in that
method (no separation of uplink and downlink), so a conditional
fprintf is used instead of an assertion. The method tfi_find_free
is checked for conflicts after allocations.
Sponsored-by: On-Waves ehf
|
|
Currently the handling of MS_B and MS_C is not compliant with TS
45.002, annex B.1. These values may only interpreted as 0, if
frequency hopping is not enabled and if there is no change from Rx to
Tx or vice-versa.
This commit sets Ttb/Trb to 1 if the table entry is MS_B/MS_C, since
only combined down/up access modes are supported.
Sponsored-by: On-Waves ehf
|
|
Currently the masks are computed equally for each class type. This
does not make much sense for class type 2 MS, since those are capable
to work in full duplex mode.
This commit sets the masks to 0xff for class type 2 MS.
Sponsored-by: On-Waves ehf
|
|
According to TS 45.002, 6.4.2.2 the choice whether Tta or Tra has to
be applied, depends on the medium access mode (currently always
dynamic) and the number of UL/DL slots. Currently either value can be
used which might result in combinations not covered by the spec.
This commit changes find_multi_slots() to skip non-compliant
combinations.
Note that this code will have to be extended, if other medium
access modes are implemented.
Sponsored-by: On-Waves ehf
|
|
Currently the slot selection of algorithm A is based on the current
slot usage by active TBF. Especially in the Dl after UL case which
reflects the commen use case "MS initiates TCP connection", the
resulting distribution is not optimal with respect to PDCH usage.
This commit changes the implementation to use the slot reservation
information instead.
Sponsored-by: On-Waves ehf
|
|
Currently when using the test modes TEST_MODE_DL_AFTER_UL or
TEST_MODE_UL_AFTER_DL, the first TBF is deleted before the second is
allocated. The far more interesting case were to keep the first TBF a
little bit longer until the second TBF has been created and delete
then. This comes closer the the situation observed with real MS,
where the first TBF takes some time (timeout or waiting for Ack)
before it gets deleted and thus detached from the MS object.
This commit delays the call to tbf_free accordingly.
The effect can be observed in the results of the algo A tests, where
the uniform distribution of the allocated PDCH is lost.
Sponsored-by: On-Waves ehf
|
|
Currently the search of the "best" slot combination is done
separately from the UL slot selection, which can lead to an
allocation failure due to USF exhaustion even if another combination
had been possible.
This commit reduces the probability for this event by skipping UL
slots without free USF while calculation the capacity.
Note that the implementation is rather inefficient which will be
fixed by the following commits.
Sponsored-by: On-Waves ehf
|
|
Since currently the algorithm B will only allocate a single UL slot
and will have to stick to it (first common TS), the other possible UL
slots will not be allocated while the reservation is kept.
This commit adds code to update the reserved set of UL slots to only
reserve the single common TS when the UL TBF is allocated.
Interestingly this leads to fewer allocated TBF in some cases due to
USF exhaustion. This will be improved by the following commit "alloc:
Skip common TS without free USF".
Sponsored-by: On-Waves ehf
|
|
Currently al possible UL slots are included in the capacity
calculation which is the base of the slot selection. Nevertheless
UL-only slots will never be used, since only one uplink slot (which
must be a common slot) will be used.
This patch changes the code to only include common slots in the
capacity sum.
Note that this might not be optimal if algorithm B supported
multiple uplink slots.
Sponsored-by: On-Waves ehf
|
|
The current implementation always starts the downlink slot allocation
with the first possible slot, depending on which channels are enabled
and which multislot class is offered by the MS. So in configurations
with many (>4) PDCH, some PDCH are not really used.
The new implementation introduced by this commit differs as follows:
- The reservation mechanism provided by GprsMs is used to avoid
incompatibilities is used in the same way like algo A does. This
basically means, that the allocation is done once when the first
TBF is requested and then used until all TBF have been released.
- All combinations of Rx and Tx slots are checked for compatibility
with the multiscot class. Basically the combination with the most
usable PDCH and the least number of reservations is used.
- Only one UL slots is provided.
- Tta and Tra are checked.
Sponsored-by: On-Waves ehf
|
|
Currently only the first enabled PDCH will be used. Beside the
throughput this will also limit the number of TBFs:
- number of UL TBFs <= 7
- number of DL TBFs <= 32
This commit changes the allocation algorithm to use the PDCH with the
least number of attached TBFs. This will improve the troughput in
both directions and the UL limits:
- number of UL TBFs <= min(32, N_PDCH * 7) UL TBFs
Ticket: #1794
Sponsored-by: On-Waves ehf
|
|
When this environment variable is set, the logging level is set to
LOGL_DEBUG to help debugging without putting everything into
AllocTest.err.
Sponsored-by: On-Waves ehf
|
|
This commit adds:
- an assertion to check that count is valid,
- an assertion the verify that tbf_alloc did not fail
- a slots parameter to specify the enabled slots
- additional test invocations with more slots enabled
Sponsored-by: On-Waves ehf
|
|
This test allocates as many as possible UL/DL TBF pairs, shows their
PDCH usage, and checks how many of them has been created
successfully.
Sponsored-by: On-Waves ehf
|
|
Currently the old TBF (either uplink or downlink) is passed around at
TBF allocation mainly to get information about the MS. To implement
more complex allocation algorithms, the MS object itself will be
needed anyway.
This commit replaces the old_tbf arguments by MS object arguments.
Sponsored-by: On-Waves ehf
|
|
The ms_class value is a property of the MS and thus belongs to the
GprsMs class. Nevertheless the MS object is created after the TLLI
gets known, so the value still has to be stored in the TBF initially.
This commit add the ms_class value to the GprsMs class and introduces
TBF accessor functions which either access that object or, if that is
not available, the value stored locally.
Ticket: #1674
Sponsored-by: On-Waves ehf
|
|
Currently the TLLI is stored in each TBF. Since each MS is now
represented by a GprsMs object which takes care of TLLI updating,
and each TBF that has been associated with an TLLI also contains a
reference to a GprsMs object, per TBF TLLI handling is no longer
needed. Keeping all TBF m_tlli members up to date is complex and
doesn't currently work correctly in all circumstances.
This commit removes m_tlli and related members from the TBF class and
the tbf_by_tlli functions from the BTS class.
Ticket: #1674
Sponsored-by: On-Waves ehf
|
|
The type of the TBF update_ms() is being called on does not always
reflect whether the TLLI has been signaled by the MS or the SGSN.
This commit adds an additional parameter to tell the method, in which
direction the TLLI has been passed.
Sponsored-by: On-Waves ehf
|
|
Use the MS storage to find a MS object for a given TLLI instead of
searching the TBF lists. The TBFs are then taken from the MS object,
if one has been found. If all TBF might be temporarily detached from
the MS object, a GprsMs::Guard is added to prevent the deletion of
the object, in case another TBF gets attached later on in the scope.
Ticket: #1674
Sponsored-by: On-Waves ehf
|
|
These fixes do not affect the semantics of the code. They either help
gcc by providing default values that won't be used ("may be
uninitialised"), remove unused variables, or change signed to
unsigned variables to avoid comparison warnings.
Addresses:
bts.cpp:494:32: warning: 'tbf' may be used uninitialized in this
function
emu/test_replay_gprs_attach.cpp:81:27: warning: comparison between
signed and unsigned integer expressions
emu/test_pdp_activation.cpp:95:23: warning: unused variable ‘budh’
emu/test_pdp_activation.cpp:97:6: warning: variable ‘rc’ set but
not used
emu/pcu_emu.cpp:109:26: warning: unused variable ‘bts’
alloc/AllocTest.cpp:74:27: warning: unused variable ‘tbf’
osmocom/core/utils.h:13:50: warning: comparison between signed and
unsigned integer expressions
types/TypesTest.cpp:319:7: warning: unused variable ‘count’
types/TypesTest.cpp:320:11: warning: unused variable ‘rbb’
alloc/AllocTest.cpp:74:27: warning: unused variable ‘tbf’
alloc/AllocTest.cpp:132:11: warning: unused variable ‘ts_no’
|
|
There is no need for the union/struct anymore. Make the variable members
of the UL/DL class.
As a result gprs_rlc_dl_window gets a reset() method because
memset(&dir.dl, 0, sizeof(dir.dl)) doesn't work anymore in reuse_tbf().
Ticket: SYS#389
Sponsored by: On-Waves ehf
|
|
Ticket: SYS#389
Sponsored by: On-Waves ehf
|
|
UL and DL tbfs are used in very separate parts and are not the same
thing so split the alloc function and use the UL/DL version throughout
the code.
Ticket: SYS#389
Sponsored-by: On-Waves ehf
|
|
|
|
Make a crazy test that will test each possible PDCH configuration
and MS Class and verify that the UL/DL assignments work and that
they are on the same first_common_ts.
|
|
Generate results for all possible classes.
|