Age | Commit message (Collapse) | Author | Files | Lines |
|
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
|
|
The TBF in create_dl_ass can be of any direction. The text in
rcv_resource_request uses DL instead of UL.
Sponsored-by: On-Waves ehf
|
|
This adds counters for algorithm A and B with count successful
allocation combined for UL and DL.
Ticket: #1934
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 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
|
|
Currently is is rather expensive to get TFI and USF usage per PDCH,
because the TBFs need to be scanned to get that information.
This commit adds corresponding bit sets which get updated by the
attach_tbf/detach_tbf methods of the gprs_rlcmac_pdch class.
Sponsored-by: On-Waves ehf
|
|
This commits adds three poll timeout counters
- RLC Assign Timeout
- RLC Ack Timeout
- RLC Release Timeout
to help diagnosing to cause for these events. There seems to be an
increased rate of these when a PDCH is shared by multiple TBFs.
Sponsored-by: On-Waves ehf
|
|
In contrast to the slots currently used by existing TBFs, the
reserved slots refer to the time slots that can be used for newly
allocated TBFs without causing conflicts (given that the first common
TS does not change). They correspond to the potential use of the
PDCHs and can be used to achieve a more uniform slot allocation.
This commit adds bit set based methods to GprsMs and gprs_rlcmac_trx
and a counter to gprs_rlcmac_pdch. The current TRX will also be
stored in the MS object.
Sponsored-by: On-Waves ehf
|
|
Currently the PDCH object do not know anything about the TBFs using
them. To make the slot allocation load dependant, at least some
numbers are required.
This commit adds TBF counters (one per direction) and the related methods
attach_tbf, detach_tbf, and num_tbfs to gprs_rlcmac_pdch.
Sponsored-by: On-Waves ehf
|
|
Currently the code that creates the MS objects with tbf.cpp is
duplicated.
This commit moves the corresponding code into a new method. Since
there is no TLLI available there, the GprsMsStorage::create_ms method
has been refactored into two variants: one with TLLI/direction and
one without.
Sponsored-by: On-Waves ehf
|
|
Currently the MS object are created when the TLLI gets known.
Therefore some information (TA, MS class) must be stored in the TBF
itself and is copied to the MS object later on. This would get even
more complex, if the allocation algorithms were extended based on
this scheme.
This commit ensures, that an MS object will always be created on TBF
allocation, even if the TLLI is not yet known. These 'anonymous'
objects are still managed by the MS storage. To avoid dangling
entries without a TLLI there (which cannnot be retrieved anyway), the
timer in the MS objects is not started after all TBF have been
detached, so that they get deleted immediately in that case.
Note that an MS object can still be removed (e.g. by replacement)
from an existing TBF, so tbf->ms() can be NULL.
Ticket: #1794
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
|
|
This method does not do anything anymore, it's functionality has been
taken over by update_ms.
This commit removes gprs_rlcmac_tbf::update_tlli completely.
Sponsored-by: On-Waves ehf
|
|
The I_LEVEL values that are obtained now look suspicious. They do not
seem to be contained in messages recorded via gsmtab.
To help debugging this issue, this commit adds related debug messages
that are generated while the encoded values are taken from the
RLC/MAC messages.
Sponsored-by: On-Waves ehf
|
|
This commit extends the pcu_l1_meas structure by MS side measurement
values which are transmitted by PACKET DOWNLINK ACK/NACK and
PACKET RESOURCE REQUEST messages. The encoded values are remapped to
dB respectively % values. The values are stored in the corresponding
MS object (if there is one).
Note that the values are store as (rounded) integers, so some
different encodings are mapped to the same decoded value.
Sponsored-by: On-Waves ehf
|
|
Currently only the RSSI value is passed to the upper layers. Other
values like TA and BER which are needed for TA update respectively CS
selection are not propagated.
This commit introduces and passes a struct that contains a set of
measurement values.
Sponsored-by: On-Waves ehf
|
|
Since more functionality will be moved to the GprsMs class, a pointer
to the current BTS object is added to allow access to configuration
data and other methods.
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 TA storage stores up to 30 TLLI->TA mappings, if more
entries are created the oldest one is dropped. In theory this can
lead to missing TA information if many MS are present.
This commit removes the TimingAdvance class completely, since the TA
value is now stored in the GprsMs objects.
Note that the GprsMs objects are currently not kept after the TBFs
have detached from them, so the TA values are now kept for a shorter
time than before.
Ticket: #1674
Sponsored-by: On-Waves ehf
|
|
The TA value rather relates to an MS and not to a single TBF. So all
TBFs share the same TA value. Currently the TA value is stored per
TBF and eventually copied from an old TBF to a new one. It is in
general only passed with an RACH request when the TLLI and thus the
MS is not yet known.
This commit adds a TA member to the GprsMs class and uses that one
when the TBF is associated to an MS object. Since the TBF is not
always associated with an MS object (after RACH or when it has been
replaced by another TBF), the TA value is still stored in each TBF
and that value is used as long as no MS object is being associated.
Sponsored-by: On-Waves ehf
|
|
These tests cover the message exchange from receiving from the first
RACH request to the first data block when establishing an uplink TBF.
This will be used to check, whether TA and other values are passed to
an MS object correctly.
In addition, the RX RACH log message in rcv_rach is extended to
contain the single block fn.
Sponsored-by: On-Waves ehf
|
|
Currently a new TBF is chained to an existing older one, either of
the other direction (active or releasing) or of the same direction
(releasing). This does not work properly work if and uplink and a
downlink TBF are being established at the same time while an old TBF
is being released. In that case, one of them is thrown away and the
pending procedure is cancelled.
The chaining is no longer necessary since the GprsMs objects have
been introduced which keep track of the active TBFs.
This commit removes the TBF members m_new_tbf and m_old_tbf and the
related methods and code paths.
Note that a new TBF can replace an older TBF entry of the same
direction within an MS object when it is associated with an MS (e.g.
by TLLI or because it is assigned via another, already associated
TBF). In that case, the old TBF is no longer associated with an MS
object.
Ticket: #1674
Sponsored-by: On-Waves ehf
|
|
Currently the BTS::trigger_dl_ass() method assigns the IMSI to the MS
object. This should be (and is already) done earlier where the MS
object is retrieved/created.
This commit removes the corresponding code along with the 'imsi'
parameter from trigger_dl_ass.
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
|
|
This commit adds MS object creation and cleanup to the TBF related
code. MS objects are created when a TBF that has been "anonymous" so
far gets associated with a TLLI. When a TBF is replaced by another,
the old TBF is detached and the new one is attached to the MS. When
all TBFs have been detached, the MS object gets deleted.
The TBF related code should not call attach_tbf/detach_tbf directly
but use set_ms instead to make sure, that the references are updated
properly. GprsMs::detach_tbf also calls set_ms(NULL) on the detached
TBF object.
The MS object is not really used yet, the focus is still on object
creation, TBF association, and cleanup.
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’
|
|
Currently two DL TBF objects with the same TLLI exist after reuse_tbf
which make the result of tbf_by_tlli undefined. This leads to several
DL TBFs belonging to the same TLLI.
This commit extends tbf_by_tlli to check the m_tlli_valid flag for
DL, too. That flag is set to 0 in reuse_tbf to mark the 'old' DL TBF
as invalid after its LLC data has been copied to the new one.
Sponsored-by: On-Waves ehf
|
|
There are a couple of possibilities where one TBF is used to assign a
new one:
1. Assign a DL TBF from a UL TBF
2. Assign a UL TBF from a DL TBF
3. Assign a DL TBF from a DL TBF which is in wait-release state (T3193 is
running)
In these cases the assignment is sent on the existing TBF and triggers
the assignement of the new TBF (with different TFI/direction).
The current code detects these situations by looking at dl/ul_ass_state
and then chosing the TBF with the opposite direction (DL/UL) that has
the same TLLI. This does not work in the case 3 above where a new DL TBF
is triggered for a DL TBF. The current code reuses the old TBF (and
TFI), but this violates the spec.
This patch introduces a m_new_tbf member which is set to the new TBF to
be assigned. When receiving a control ack the code looks up the
n_new_tbf member of the tbf that requested the control ack and completes
the ul/dl assignment. If the old TBF was in the wait release state
(T3193 is running) it is released.
From 3GPP TS 04.60 9.3.2.6:
"""
If the network has received the PACKET DOWNLINK ACK/NACK message with
the Final Ack Indicator bit set to '1' and has new data to transmit for
the mobile station, the network may establish a new downlink TBF for the
mobile station by sending the PACKET DOWNLINK ASSIGNMENT or PACKET
TIMESLOT RECONFIGURE message with the Control Ack bit set to '1' on
PACCH. In case the network establishes a new downlink TBF for the mobile
station, the network shall stop timer T3193.
"""
reuse_tbf() is modified to allocate a new TBF with a new TFI and trigger
a dl assignment for that TBF on the old TBF. All pending data is moved
to the new TBF.
Ticket: SYS#382
Sponsored-by: On-Waves ehf
|
|
All the function did was add debug output and call the set_state method.
Move the debugging into the method and remove the function.
Ticket: SYS#389
Sponsored by: On-Waves ehf
|
|
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
|
|
This method is always called with a DL TBF as argument so make it clear.
Ticket: SYS#389
Sponsored by: On-Waves ehf
|
|
Ticket: SYS#389
Sponsored by: On-Waves ehf
|
|
This method is only userul for DL TBFs so move it. As a result
gprs_rlcmac_pdch::rcv_control_ack needs to work with dl_tbfs.
Ticket: SYS#389
Sponsored-by: On-Waves ehf
|
|
llist_add is called on the TBF lists in tbf_alloc_ul/dl_tbf or in
rotate_in_list. All three places check the direction/add the new TBF to
the correct list so an ASSERT on entry is not needed.
Ticket: SYS#389
Sponsored-by: On-Waves ehf
|
|
The PODS struct has a back pointer to access the actual object.
llist_pods_for_each_entry traverses the list of struct llist_pods and
makes the entry available (through the back pointer).
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
|
|
Many functions only ever deal with or return a UL or a DL TBF.
Explicitly change the type to reflect which TBF is used where.
Ticket: SYS#389
Sponsored-by: On-Waves ehf
|
|
Start returning the special type instead of the base gprs_rlcmac_tbf
when retrieving a TBF.
Ticket: SYS#389
Sponsored-by: On-Waves ehf
|
|
In the lookup functions make sure that we are actually returning tbfs
with the expected direction.
Ticket: SYS#389
Sponsored-by: On-Waves ehf
|
|
rcv_control_dl_ack_nack is only meaningful for dl tbf while
rcv_control_ack can be sent in response to a dl or ul tbf. So
rcv_control_ack still needs to check for ul and dl tbfs.
Ticket: SYS#389
Sponsored-by: On-Waves ehf
|
|
Ticket: SYS#389
Sponsored-by: On-Waves ehf
|
|
In the future we want to separate ul and dl tbf into different
classes that inherit from a common base.
Ticket: SYS#389
Sponsored-by: On-Waves ehf
|
|
There is no parameter in the function and the bts has a memeber trx
which has a member pdch.
Sponsored-by: On-Waves ehf
|
|
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
|
|
This patch introduces methods to get ul and dl tbf by tfi and uses them
in gprs_rlcmac_sched.
Sponsored by: On-Waves ehf
|
|
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.
|