Commit Graph

33 Commits

Author SHA1 Message Date
Fabian Eckermann dd8db1a929 Replaced inet_addr() with inet_pton. 2021-09-21 11:59:40 +02:00
Andre Puschmann 483a216bd5 ue,stack: refactor handling of radio bearears in UE stack
this is a rather large commit that is hard to split because
it touches quite a few components.

It's a preparation patch for adding NR split bearers in the next
step.

We realized that managing RLC and PDCP bearers for both NR and LTE
in the same entity doesn't work. This is because we use the LCID
as a key for all accesses. With NR dual connectivity however we
can have the same LCID active at the same time for both LTE and NR
carriers.

The patch solves that by creating a dedicated NR instance for RLC/PDCP
in the stack. But then the question arises for UL traffic on, e.g. LCID 4
what PDCP instance the GW should use for pushing SDUs. It doesnt' know
that. And in fact it doesn't need to. It just needs to know EPS
bearer IDs. So the next change was to remove the knowledge of what
LCIDs are from the GW. Make is agnostic and only work on EPS bearer IDs.

The handling and mapping between EPS bearer IDs and LCIDs for LTE
or NR (mainly PDCP for pushing data) is done in the Stack because
it has access to both.

The NAS also has a EPS bearer map but only knows about default and
dedicated bearers. It doesn't know on which logical channels they
are transmitted.
2021-06-24 16:52:58 +02:00
Francisco f2a56c9139 simplification of multiqueue design.
- the consumer does multi-staged waiting:
  1. spins first across all queues in a RR fashion
  2. each queue access is done with a try_lock.
  3. if the try_lock fails, it increases the number of spins needed
  2. if no queue had data, the consumer sleeps for 100 usec.
- no differentiation between queues, in terms of notification features
2021-05-24 17:24:12 +02:00
Francisco 2d6a878826 change interface to create multiqueue queues 2021-05-24 17:24:12 +02:00
Francisco f705735093 optimization - only allow some multiqueue queues to notify the multiqueue consumer of the arrival of tasks 2021-05-24 17:24:12 +02:00
Francisco ef9d1b8c13 stack optimization - reduction of contention in multiqueue class
With the new design, each queue created in the multiqueue object has its own mutex.
Pushing tasks to separate queues will, therefore, not cause contention.
There will be, however, still contention between the popping thread and the pushing threads.
2021-05-10 15:27:21 +01:00
Xavier Arteaga af97538448 Remove NR from log lines 2021-04-14 08:16:44 +02:00
Xavier Arteaga 7823bfc28c Fix append NR to loggers for NR components 2021-04-14 08:16:44 +02:00
Andre Puschmann d135ae4d29 proc_bsr: initial BSR procedure for NR
* refactor some common methods to mac_common.cc
* add common mux_base class
* move UL PDU generation to mux class
* add logical channel registration to MAC, MUX, BSR
* add initial proc BSR
* add basic MAC NR test
* rework MAC interfaces
2021-03-30 13:46:12 +02:00
Codebot 4523ee6087 rename srsLTE to srsRAN 2021-03-21 21:47:01 +01:00
Francisco 3e9f93eb8a refactor - remove old log_filter and logmap libraries from the codebase 2021-03-11 20:10:54 +00:00
David Rupprecht bb3e87302d Added new pcap enable option and mac nr 2021-03-03 09:50:15 +01:00
Francisco f610a7b83d Change background worker pool to become a global variable
Allocate rrc::ue objects in batches in the background worker pool
2021-02-25 15:56:40 +01:00
David Rupprecht f6f6ee406b SRSUE NR: use correct rnti in rar and make NR proc ra 2021-02-23 17:02:23 +01:00
David Rupprecht 3dab82c42f Added interface that allows to update the lcid in case of a nr reconfiguration
nr rrc updates gw lcid if reconf was received
2021-02-05 11:08:08 +01:00
Andre Puschmann 8e13f04684 mac_pcap: refactor MAC PCAP and include NR RAT into same object
after adding the thread-safe PCAP writer functionality to the EUTRA
MAC object it became clear that we don't wont to replicate the
same for the NR object.

This patch therefore refactors the class that now supports both EUTRA and
NR rats. The old mac_nr_pcap.[h/cc] has been deleted. All test-cases
and usages now use the new object that needs to pass the RAT type in
the ctor.

this patch addresses the last open point of #2160
2021-02-03 17:21:57 +01:00
faluco d37a07a47f Replaced loggers in buffer_pool.h 2021-02-03 14:15:27 +01:00
faluco 5981469f9f
Upgrade loggers in srsue (#2163)
* Replaced UE logger in the ue class.

* Replaced loggers in the main phy class and prach.

* Replaced loggers in phy common and ta_control.

* Replace loggers in cc and sf workers.

* Replaced loggers in intra_measure, scell_recv, search, sfn_sync, sync.

* Remove last uses of the old loggers in the main phy class.

* Remove stray newline in logs.

* Replaced loggers in ue gw.

* - Started to replace loggers in the ue stack.
- Replaced loggers in usim and pcsc.
- Adapted nas and usim tests.

* Replace loggers in nas.

* Added missing log init calls in two previously modified tests.

* Replaced logger in nas idle procs.

* Replaced loggers in nas emm state.

* Replaced loggers in tft packet filter and adapted tft test.

* Replaced loggers in main RRC class.

* Replaced loggers in RRC cell.

* Replaced loggers in RRC meas.

* Replaced loggers in rrc procedures.

* Started logger replacement in MAC layer, more precisely in demux and dl_harq classes.
Been unable to inject loggers in construction for dl_tb_process due to very weird static assertions in the std::vector code being the type not constructible which is not true, so instead use the main MAC logger directly.

* Replaced loggers in mac mux class.

* Replaced loggers in mac pro_bsr.

* Replaced loggers in mac proc phr.

* Replaced loggers in mac proc SR and RA.

* Replace loggers in mac UL HARQ.

* Replaced loggers in main ue stack class.

* Fixed nas test crashing due to a null string.

* Ported mac_test to use the new loggers.

* Removed TTI reporting for the PHY log as the old logger did.

* Replaced loggers in UE phy tests.

* Configure loggers in nas_test.

* Replaced loggers in rrc_meas_test.

* Replaced loggers in rrc_reconfig_test.

* Added missing newline in tft_test.

* Fix compilation errors in TTCN3 tests.

* Fix linker error detected in CI and warning.

* Replaced loggers in TTCN3 tests.

* Fix a text replace error in some log messages.

* Remove trailing newlines from log entries.

* Remove old logger from rrc.

* Flush backend before printing the test status.

* - Fix compilation error from previous rebase.
- Remove trailing newlines from some missing log entries.
2021-01-28 17:17:43 +01:00
David Rupprecht 1b19ee40e7 Added usim features for key derivation 2021-01-27 10:37:09 +01:00
David Rupprecht 1a10c783b5 Faking measurements 2021-01-08 17:20:08 +01:00
David Rupprecht f7d313147a Added infrastrukture for measurements
Init rrc_nr as part of the LTE stack
2021-01-08 17:20:08 +01:00
Andre Puschmann c0883291f6 rlc: pass TTI to get_metrics to calculate "real" LTE rx/tx rate
when retrieving the RLC metrics, the number of TTIs since the last
call are passed. This allows to calculate the actual rate
based on the LTE timing rather than only the system timing.
2020-12-12 15:59:27 +01:00
Andre Puschmann 07d2bc4fe8 change license header to agnostic version with hint to root LICENSE file 2020-12-12 15:59:25 +01: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 7c364070ee creation of task scheduler interface for classes/functions running outside the main control thread 2020-07-13 11:19:25 +01:00
Francisco Paisana 1a9c04bf2f use of task scheduler handle in pdcp 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
Francisco Paisana a0606669e2 fix ue nr gw initialization 2020-06-24 23:28:53 +01:00
Francisco Paisana fddcbc9879 fix vnf-ue stack interface 2020-06-24 23:28:53 +01:00
Francisco Paisana f0874b780b add radio_base/null classes 2020-06-18 23:37:26 +01:00
Francisco Paisana 76a3c0ed1c removed deadcode 2020-05-29 14:11:23 +01:00
Francisco Paisana 4cf756434f add srsue::rrc_nr srsue::ue_stack_nr 2020-05-29 14:11:23 +01:00