* Make PHY non-blocking and fefactor HO procedure
* makes entire PHY non-blocking through command interface
* adds dedicated queue for cell_search/cell_select commands
* refactor HO procedure to run faster, in one stack cycle. Looks closer to the specs
* force ue to always apply SIB2 configuration during reestablishment
* Run update_measurements in all workers
Co-authored-by: Ismael Gomez <ismagom@gmail.com>
this was preventing that the Temp-CRNTI used in the RAR to be identical
to the currently configured C-RNTI of the UE.
The issue simply was that the RACH procedure was declared successful too
early, even before the Msg3 UL grant was filled with the Msg3 content.
The patch moves the logic that detects the successful completion of
the RACH procedure below the Msg3 packing.
* Removed magic numbers.
* Reduced indentation of statements with early exists.
* Removed elses after a return statement.
* Trimmed unnecessary include files.
* Default initialized members in the class.
we fix a number of very related issues for HO/reestablishment
in the success/error case:
* this patch removes the hard-coded check that intra-cell HO aren't
allowed. There are cases where eNBs use this method to update
the security context.
* the patch also fixes an issue after failed HO where the security context
of the source eNB should be used for the reestablishment.
* update security keys according to specs when mobilitycontrol
indicated change of key
the filter alpha was initialized to zero by default which causes an
issue because the first measurement for a cell can't be updated,
because the filtering function will always return the current value.
According to 36.331 Sec 5.5.3.2 Note 2, a k-value of 0 should turn
off filtering, which should be used as the default value until
an update is received from the network.
this rather large patch changes the way cells are handled in the SS.
It moves RLC and PDCP entities to the cell map of the SS, such that each cell
has its own entities. This allows to support HO operation, for example,
in which two cells need to send SRB messages.
It also extends most of the syssim interface to include the cell name
in all commands so they can be applied on the specified cell only.
stopping the UE in ZMQ mode caused a dead-lock because the Stack was
stopped before the PHY causing the sync queue to overflow. Since we
use a queue-length of 1 in ZMQ, mode, the PHY sync thread was blocking to
push a new sync event while the stack thread was already stopped.
this patch makes sure no new sync events are queued after the stack has
been terminated.
this patch fixes the UL BSR as per TS 36.321, it includes following
main changes:
* report UL buffer state to reflect the UEs transmit buffer after
the MAC UL PDU containing the BSR has been built.
In other words, if the UE, for example, can transmit all outstanding
data in an UL grant, it will not report any pending data to transmit.
* refactor MUX routines and subheader space calculation
* split existing BSR test into dedicated test for short, long, and trunc
BSR tests
* update MAC tests that include packing UL BSR.
(After checking TS 36.321 again it seems we have reported old UL buffer states)
simplify logic to check whether a BSR fits and, if so, which type.
before the check has been done in two places.
we now also accomodate for the CE subheader size.
we've not checked the return value when adding a new CE, like BSR or PHR,
for a UL MAC PDU. For very small UL grants, this could fail and
we need to remove the subheader again before packing the PDU.
This fixes issue #1649.
before the BSR was extracted but the actual index (between 0 and 63)
was not stored but directly converted into bytes.
for log parsing and debugging it is easier to follow the index
value. this patch therefore adds both values to the log message
and extends the API accordingly.
all calls that manipulate the RLC and/or PDCP arrays suffer
from a high deadlock risk if a PHY worker holds the RLC
AM Rx mutex at the same time when the stack wants to carry
out this reconfiguration.
this applies to RRC Reconfigs, but potentially also to RRC Connection
Reestablishment or even RRC Connection Setup, although this should
seldom be the case.
By breaking the call stack between RLC->PDCP->RRC->RCL and
carrying out the reconfig as a single task without holding the
RLC readlock the deadlock should not happen anymore.
This should fix issue #1593
- Import the srslog project into srslte.
- Ported srsue app to use the new logging framework.
- Implemented a wrapper that dispatches log entries to srslog.
- Renamed an existing log test to be more specific to avoid name clashes.
the PSS detection needs more temporary buffer than a full subframe.
we therefore need to allocate and initialize the sync object with
larger maximum size to support Scell search of large cells, e.g.
20 MHz
this fixes issue #1538
* add locked and unlocked version of has_data() since one is
called from stack and one from PHY threads
* add comments in each interface section as to why locking
is required or not
* remove RLC rwlock when not required
* move calls only used by RRC to RRC section
as 3400 or 2.685 GHz is on the edge of band 7, some phones won't connect
to a 20 MHz cell on this EARFCN.
In order to simplify testing with other bandwidths we change the default EARFCN.
this patch refactors the SDU queuing and dropping policy of the RLC and PDCP layer.
the previous design had issues when packets have been generated at a higher
rate above the PDCP than they could be consumed below the RLC.
When the RLC SDU queues were full, we allowed two policies, one to block on the write
and the other to drop the SDU. Both options are not ideal because they either
lead to a blocking stack thread or to lost PDCP PDUs.
To avoid this, this patch makes the following changes:
* PDCP monitors RLC's SDU queue and drops packets on its north-bound SAP if queues are full
* a new method sdu_queue_is_full() has been added to the RLC interface for PDCP
* remove blocking write from pdcp and rlc write_sdu() interface
* all writes into queues need to be non-blocking
* if Tx queues are overflowing, SDUs are dropped above PDCP, not RLC
* log warning if RLC still needs to drop SDUs
* this case should be avoided with the monitoring mechanism
reducing the sync queue len to 1 caused an issue when the
PHY was locking the mutex while trying to push a TTI event
on the stack.
instead of signaling the new TTI within the PHY, we now do it outside
in the DUT (after releasing the PHY mutex)
apply same change that we've done on the eNB also on the UE
to avoid the PHY processing TTIs faster than the stack.
Without that, we see lots of those in the logs:
...
08:39:17.580325 [STCK] [W] Detected slow task processing (sync_queue_len=7).
...
before entering RRC idle, after receiving a RRC connection release for example,
we need to wait until the RLC for SRB1 or SRB2 have been flushed, i.e.
the RLC has acknowledged the reception of the message.
Previously we have only waited for SRB1 but the message can also be received on SRB2
and in this case both bearers need to be checked.
The method is now streamlined to check both SRBs and is also used when
checking the msg transmission of an detach request.
unfortunately, the rapidjson version shipped with Ubuntu 16.04
doesn't support the GetArray() API so we need to use
normal iterator to loop over the array