80 Commits (ff7811c822bb109f7405821234286ba28ecc6504)

Author SHA1 Message Date
Andre Puschmann d51a060bfa nas_test: fix potential out of bounds access 4 years ago
faluco 51b27fc255
Import latest srslog version (#1796)
* - Import latest srslog version.
- Adjusted the nas_test to create logs correctly.
- Remove timestamp formatting now that is provided by srslog.
4 years ago
faluco f0d651ae8e - Fixed a leak in the MME class not releasing the static byte buffer pool.
- Now the pool gets destroyed on program exit using a unique_ptr.
- Removed manual cleanup() calls in all the code base to free the pool instance.
4 years ago
faluco cfd3f51931
Import of srslog into srsepc and srsenb. (#1574)
* - Import of srslog into srsepc and srsenb.
* - Removed logger_file and logger_stdout files.
4 years ago
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
4 years ago
Francisco Paisana 7c364070ee creation of task scheduler interface for classes/functions running outside the main control thread 4 years ago
Francisco Paisana 1a9c04bf2f use of task scheduler handle in pdcp 4 years ago
Francisco Paisana 4f5e65781f created task scheduler class to deal with timers, thread pool, multiqueue, internal tasks 4 years ago
Pedro Alvarez 528777fa29 Added sleep to avoid nas test concurrency issue. 4 years ago
Andre Puschmann d35c9e2b89 nas: add support ot UE test loop mode B
extend GW-NAS interface to signal test mode activation.
The method is a noop in the normal GW but is implemented in
the TTCN3 DUT according to TS 36.509 for Mode B
5 years ago
Francisco Paisana 30ae2226c1 common interface for stack multiqueue tasks, background tasks and timers 5 years ago
Andre Puschmann 94c6034339 nas: rename start_attach_request to start_attach_proc
this is to better differentiate from "send_attach_request" that
only packs and send the actual attach request message. The
entire attach procedure may include PLMN search, etc.
5 years ago
Francisco Paisana 46a1be3e76 updated mac-rlc interface to use unique_byte_buffer 5 years ago
Francisco Paisana 138347b6b5 nas using stack timers 5 years ago
Francisco Paisana d3f49d0e3c changed interface sync-stack to allow tti jumps > 1 5 years ago
Xavier Arteaga e832769ae6 Updated copyright 5 years ago
Francisco Paisana e859d622c7 added logref class to forbid logmap pointer invalidation. Created a test for the logref, and introduced it in the scheduler, rrc and nas 5 years ago
Francisco Paisana ea777d92e8 applied new logmap class to nas 5 years ago
Pedro Alvarez c5979f59eb Clang format UE, eNB and lib (#850)
* Clang-formated UE, eNB and lib.
* Fixed compiling errors from clang-format.
* Fix linking issues introduced by clang-format
* Fix poor formating in initializing arrays of arrays.
* Fix mistake in conflict resolution on rm_turbo.c
* Re-apply clang format to gtpc_ies.h
5 years ago
Francisco Paisana d2c56caf7e applied new timer class to the whole code base 5 years ago
Francisco Paisana b254bdbb93 typedefed the proc_result_t<void> to become proc_state_t 5 years ago
Francisco Paisana f2d88e5a5b simplified NAS rrc connection request procedure
move non-type-specific methods of proc_t to its base class.
procedure state machine was simplified via a future-type. Now procedures dont get stuck until the user reads the procedure outcome.
made the NAS procedures more event trigger/reaction-based.
5 years ago
Andre Puschmann 891a66a2e5 make the establishment cause a paramter when sending a connection request
needed to signal a mo_sig establishment cause after a RLF
5 years ago
Francisco Paisana e94755c471 revert nas_test fix 5 years ago
Francisco Paisana 9bcb268421 added for-range loop and bool decay checks to clang-tidy. Applied some of the recommendations of clang-tidy to nas.cc 5 years ago
Andre Puschmann 4d688bce98 fixing nas test 5 years ago
Pedro Alvarez 004db4a067 Applied clang-format to zuc_support PR. 5 years ago
David Rupprecht 4ff70b6008 reconfigured test case for eia sec matching 5 years ago
David Rupprecht 06ac8143a4 NAS test working again due to replayed sec caps mismatch 5 years ago
Francisco Paisana c9d3b61038 added resumable procedures to make RRC and NAS non-blocking 5 years ago
Pedro Alvarez 1944bf9a80 Continue to split pdcp_entity_lte and pdcp_entity_nr. Compiling now. 5 years ago
Francisco Paisana bb0dbf0f1c created a asn1 utils with helper functions and types related to the asn1. These types/functions will help isolate the rrc_asn1 lib from most of the layers, reducing this way the compile times, and leading to better isolation. This will also make the transition to NR smoother. I removed the asn1 types from the NAS and USIM interface so far. 5 years ago
Andre Puschmann 58763fb714 stack: move initialization of log object into ctor
this fixes the issue when the stack is torn down if, for example,
the radio couldn't be loaded correctly. it will hence call stop() on all stack
components which are not initialzized yet, and logging therefore doesn't work.
the log object is know during contruction time and therefore can be passed
in as soon as possible.
5 years ago
Francisco Paisana 8f8d9f3f30 applied changes in the stack internal method naming 5 years ago
Francisco Paisana ce29ed545d moved mac thread to the stack. Protect the interface of the stack with PHY and gateway via a queue of tasks 5 years ago
Francisco Paisana 46d298fd9a formatting 5 years ago
Francisco Paisana 10a56e2a84 moved GW out of the UE stack. This is important to keep concurrency out of the stack once it becomes single-threaded 5 years ago
Andre Puschmann 2b7b4d0e7e remove hard-coded LCID for dedicated bearer in GW 5 years ago
Pedro Alvarez 39f5b03674 Removed empty line. Changed comment. Removed unused variables. 5 years ago
Pedro Alvarez 2723aa9b12 Added EPS bearer id to apply_tft interface. Sending packets to the correct LCID if they match the packet filter. 5 years ago
Pedro Alvarez ede5f3318b Remove test function that is no longer used. 5 years ago
Pedro Alvarez a7e0a0624b Starting to add interface apply_traffic_flow_template between NAS and GW. 5 years ago
Pedro Alvarez d3761ccee5 Added some basic test of NAS activate dedicated EPS bearer context request handling. 5 years ago
Pedro Alvarez d67d18cc6b Removing deplicated error codes. 5 years ago
Andre Puschmann 3f613d7183 nas/gw/rrc: make LCID for DRB dynamic
- add interface to RRC to allow NAS to query the DRB for a given
  EPS bearer id
- extend interface for NAS to setup GW to also pass LCID of bearer
- in NAS, use this new interface to pass actual LCID of the default
  DRB when creating the TUN device
6 years ago
Andre Puschmann 34bf738501 nas: add test for dedicated EPS bearer handling 6 years ago
Andre Puschmann 65f50cd7ba introduce new UE layer design
- abstract UE object now consists of a radio, a PHY, and a stack layer
- add new stack abstraction layer that combines MAC, RLC, RRC, PDCP, NAS and GW
- PHY layer now has a single stack interface and does not talk to MAC and RRC seperatly
6 years ago
Andre Puschmann 3a6dd9b164 move UE RRC into own folder 6 years ago
Francisco Paisana 3bedc93ba5 added _t to unique_byte_buffer type 6 years ago
Francisco Paisana f469e2178b replaced byte_buffer_t allocated by the buffer pool for unique_byte_buffer which is safer and easier to use 6 years ago