Commit Graph

59 Commits

Author SHA1 Message Date
Vadim Yanitskiy 74b2c5c711 srsue/extnas: add a possibility to enable the external NAS interface
The new configuration section '[extnas]' allows to disable the
built-in NAS implementation, and provide the interface (UNIX
domain socket) to an external entity. The interface itself will
be implemented in the follow up commits.
2020-11-09 06:31:45 +07:00
Vadim Yanitskiy 900ad92912 srsue/extnas: implement a simple UNIX domain socket server
Unfortunately, the existing networking API (common/network_utils.h)
lacks the UNIX domain socket support, and it turned to be easier
to implement a simple, single client server using Boost.Asio.

The server runs in its own thread with a blocking Tx queue, and
calls a user definted callback on receipt of any data from client.
Multiple client connections are not supported and will be rejected.
2020-11-09 06:31:45 +07:00
Vadim Yanitskiy 2b1ded220e srsue/extnas: derive abstract 'nas_base' class from 'nas'
This is the first step towards the goal of having an external NAS
interface.  The new 'nas_base' class becomes a parent of 'nas',
combining all interfaces and the basic (common) API.

The 'ue_stack_lte' now holds a unique_ptr of type 'srsue::nas_base',
so the underlying NAS implementation (built-in or external) can
be choosen at run-time depending on configuration.

The implementation specific configuration now needs to be passed
to the constructor instead, not to the init() method as was before.
2020-11-09 05:34:03 +07:00
Andre Puschmann 1afc137032
[REBASE] Make PHY non-blocking and fefactor HO procedure (#1753)
* 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>
2020-09-22 21:47:16 +02:00
Andre Puschmann a7911f0dab pdcp,rlc: refactor SDU queueing policy
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
2020-07-13 17:05:28 +02:00
Francisco Paisana 5e06430455 removal of stack handler interface 2020-07-13 11:19:25 +01:00
Francisco Paisana 039977aeb5 renamed interfaces 2020-07-13 11:19:25 +01:00
Francisco Paisana 4f5e65781f created task scheduler class to deal with timers, thread pool, multiqueue, internal tasks 2020-07-13 11:19:25 +01:00
Andre Puschmann bd0c13aad0 ue_stack: bump priority of stack thread
the stack thread should really run with the next highest priority after
sync + phy workers to make sure it gets enough CPU
2020-07-05 16:56:06 +02:00
Ismael Gomez e378a45db0 Reorganized priorities to avoid GW starve the CPU 2020-07-02 11:52:14 +02:00
Daniel Willmann 31f1516d74 Use callback to establish connection before sending PDUs in TestmodeB 2020-06-23 12:12:58 +02:00
Xavier Arteaga 77d5dedddc Fix LGTM warnings and recommendations 2020-04-22 18:01:43 +02:00
Francisco Paisana c09f76ed6c unified stack task defer method 2020-04-10 22:30:59 +01:00
Francisco Paisana 30ae2226c1 common interface for stack multiqueue tasks, background tasks and timers 2020-03-31 13:42:06 +01:00
Francisco Paisana 599588ff51 removed uneeded locks in the rlc, moved ue stack get_metrics to stack thread, solved the idle procedure double-locking 2020-03-25 19:18:00 +00:00
Francisco Paisana 8e837e173d printf has already a way to pad spaces. If we use it, we can avoid accidentally adding extra logs because we did srslte::logmap::get("MAC") instead of srslte::logmap::get("MAC ") 2020-03-24 22:36:27 +00:00
Andre Puschmann 3f10224729 refactor airplane mode simulation and move to NAS
- move handling to NAS
- use switch off to enable airplane mode (don't wait for EPC response)
- add tiny FSM to control airplane mode activation/deactivation
- only start on/off counter after state has been entered
2020-03-23 13:36:25 +01:00
Francisco Paisana e91a7ea513 removed stack-mac interface dedicated methods. We use now the task dispatch methods instead 2020-03-22 11:50:58 +00:00
Francisco Paisana de03c96c3b mac::process_pdus now uses the stack task dispatch interface 2020-03-22 11:50:58 +00:00
Francisco Paisana de3c28e52d added task dispatch capabilities to stack interface 2020-03-22 11:50:58 +00:00
Francisco Paisana 82cb6baef0 now the whole ue and enb mac uses the logmap 2020-03-20 11:32:03 +00:00
Francisco Paisana 45bc123967 remove manual tti counters from the rrc 2020-03-19 21:52:53 +00:00
Francisco Paisana 770f04b92a the rrc now only works with the stack latest tti, instead of mac's tti 2020-03-19 16:47:55 +00:00
Francisco Paisana d3f49d0e3c changed interface sync-stack to allow tti jumps > 1 2020-03-19 16:47:55 +00:00
Francisco Paisana e73cbb09b0 created tprof statistic for sliding windows 2020-03-19 10:59:37 +00:00
Xavier Arteaga e832769ae6 Updated copyright 2020-03-16 11:26:06 +01:00
Andre Puschmann 664170fec6 pcap: add CC index when writing PCAP 2020-03-05 20:46:14 +01:00
Francisco Paisana fed06138b9 moved rach_detected to stack thread. Created a more friendly interface to enqueue tasks in stack 2020-03-03 21:03:21 +00:00
Andre Puschmann a8bbe551ac move thread class into srslte namespace to avoid ambiguity between std::thread 2020-03-03 16:22:04 +01:00
Andre Puschmann 8b46f631c1 add basic TTI stats in stack 2020-03-03 16:22:04 +01:00
Francisco Paisana ac52208409 removed most of clang-tidy warnings, introduced logmap in asn1, fixed info object naming in s1ap and ngap for successful and unsuccessful outcomes 2020-02-28 18:03:29 +00:00
Francisco Paisana c29f08d8d5 refactored si acquisition procedure to use stack timers. Also created an interface that is going to be used for the task/timer handling 2020-02-20 20:48:36 +01:00
Francisco Paisana 22f51bb30b made cell select non-blocking using background threads 2020-02-18 09:47:33 +01:00
Ismael Gomez 4fb83ae26d Run configure_prach_params as a background task 2020-02-16 21:27:24 +01:00
Xavier Arteaga f8294fb9df SRSUE: RRC measurements refactor and more fixes 2020-02-03 12:51:46 +01:00
Ismael Gomez 52716f8716 Process HO complete in the background to avoid heap-after-use bug when PHY measurements are reported during a HO
rrc_meas refactor. Need to split commit

Fix typo

Temporal commit

Apply rx_gain_offset to neighbour cell measurements

srsLTE: modify TESTASSERT Macro to follow codeline

SRSUE: prevent RRC from having serving cell in neighbour list

SRSUE: DL HARQ does not need Time Aligment Timer. UL is disabled using PUCCH resources release

SRSUE: extend intra-frequency to CA SCell

SRSUE: fix confusing/ambiguous code in the RRC measurements and fix concurrency issue

SRSUE: remove RRC measurement report triggers when measurements are modified or HO succesful

SRSUE: fix compilation issues and Reest SIB indexes

Fixes sync using incorrect cell configuration when search cell does not find a correct cell

Small refactor to remove measurement report triggers always after removing measurement

SRSUE: Removed SIC PSS from UE

SRSUE: fix inter-frequency reestablishment and added more traces

SRSUE: Fix compilation issue
2020-02-03 12:51:46 +01:00
Francisco Paisana ea777d92e8 applied new logmap class to nas 2020-01-29 14:20:43 +00:00
Francisco Paisana d59016ae68 use of srslte::log* type for ASN1 logging. Initialization of the asn1 and rrc_asn1 loggers done now in both the ue and enb 2019-12-12 15:45:24 +00:00
Francisco Paisana 54992e72f1 fixed and simplified multiqueue task api to avoid dangling pointers. 2019-11-28 11:57:41 +00:00
Francisco Paisana b2d3c2a150 fix compilation issue 2019-11-28 11:57:41 +00:00
Francisco Paisana ac4d3b9624 std::functions do not accept move-only captures. So I had to create a wrapper earlier. In this PR, I cleaned a bit the previous API for the code to be a bit more readable 2019-11-28 11:57:41 +00:00
Francisco Paisana d2c56caf7e applied new timer class to the whole code base 2019-10-23 19:33:25 +01:00
Francisco Paisana e67f66e539 moved cell search completed signal from the background thread to the stack thread 2019-10-14 11:44:40 +02:00
Andre Puschmann c5f52adfba nas: fix issue in which NAS wouldn't allow to attach once it failed
the main issue was the plmn_selected variable. the solution
was to create a function to enter the deregistered state that resets the variable
and performs all other actions that need to be performed, like clearing
EPS bearers.

The patch also extends the SS to support AT commands to enable/disable
data services and now succesfully passes TC_9_2_2_1_7
2019-10-09 11:34:49 +02:00
Francisco Paisana 2fb830fcfa moved cell search to background task thread pool, and provided a stack interface to rrc to call "start_cell_search". Once completed, the background task signals back to RRC 2019-10-04 22:01:44 +02:00
Francisco Paisana 6db0e474be moved RA waiting procedure to a background task of the stack thread pool 2019-10-02 11:04:47 +02:00
Francisco Paisana 946ead06e8 using an interface between the stack and lower mac to process demux pdus. 2019-09-19 10:19:46 +02:00
Francisco Paisana 63457f195c extented queue test 2019-09-18 12:18:33 +02:00
Francisco Paisana a2d7b2320a placed GW packets in the same thread as UE stack thread 2019-09-18 12:18:33 +02:00
Francisco Paisana 647c624423 created a multiqueue handler, and started using it for the ue stack 2019-09-18 12:18:33 +02:00