Commit Graph

3921 Commits

Author SHA1 Message Date
David Rupprecht f90e359208 Moved cp to test common 2021-07-02 17:23:06 +02:00
Andre Puschmann bbcaa49429 network_utils: fix TSAN detected race 2021-07-02 17:22:49 +02:00
Andre Puschmann a9ad408f51 task_scheduler: use block_queue for internal tasks
TSAN detected wrong use of the old deque-based internal queue. To avoid
unwanted/undetected mis-use the patch uses the thread-safe block_queue
data structure instead.
2021-07-02 17:22:49 +02:00
Andre Puschmann 626f24c9f9 block_queue: use class mutex to protect size() getter
detected with TSAN
2021-07-02 17:22:49 +02:00
Andre Puschmann 0e6e3d201e sys_metrics: reduce log level when measurement interval is shorter than expected
on highly loaded systems it can happen that the get_metrics() is called
twice within a few houndred milliseconds. Logging a warning in this
case isn't needed, so reduce to info.

on the other hand, 100ms might be to convervative. Patch also
lowers the smallest interval to 10ms
2021-07-02 12:01:39 +02:00
Ismael Gomez 4e39982a19
Fix TSAN warnings in UE (#3021)
* Protect PHY SR signal management in a class

* Protect intra_freq_meas vector

* Protect cell and srate shared variables in thread-safe classes

* srsue,srsenb: include TSAN options header

* Protect ue_rnti_t and rnti scheduling windows behind thread-safe classes

* Protect access to state variable in sync_state

* Protect access to metrics configuration

* Protect access to is_pending_sr

* Protect access to UE prach worker

* Protect UE mux

* Avoid unlocking mutex twice

* Fix data races in RF/ZMQ

* Fix data races in intra_measure and PHY

* Fix minor data races in MAC

* Make TSAN default behaviour to not halt on error

* Fix blocking in intra cell measurement

* Address comments

Co-authored-by: Andre Puschmann <andre@softwareradiosystems.com>
2021-07-01 17:39:54 +02:00
David Rupprecht 4ed33fed7d Fixed unpack bytes limit 2021-07-01 17:02:29 +02:00
Pedro Alvarez 05fbca43d1 Fix GCC 11 warning in dyn_array 2021-07-01 10:55:11 +01:00
Pedro Alvarez 1b676aa406 Moved lib GTPU to its own folder 2021-06-30 18:19:20 +01:00
Pedro Alvarez 865298f8d5 Moved lib PDCP to its own folder 2021-06-30 18:19:20 +01:00
Pedro Alvarez 171d5727be Moved lib RLC into it's own folder 2021-06-30 18:19:20 +01:00
Francisco Paisana 4d014e7ceb s1ap,feature: make the ts1 reloc timers configurable via the enb.conf 2021-06-29 20:39:32 +02:00
Andre Puschmann b6a3b8c5b1 rlc: fix dtor
TSAN was complaining about destroying a locked mutex
2021-06-29 14:27:07 +02:00
faluco a70ad58440 Fix a data race in the UHD class wrapper where the last error member was being set concurrently causing random crashes.
Introduce a new macro to catch UHD exceptions and log them directly instead of storing an error string, similar to what errno does.

Remove usrp logging helpers that depend on the now removed member since all calls potentially log the error directly.
2021-06-28 21:16:56 +02:00
Andre Puschmann 4d11e5552a rrc,ue: for RRC conn release, delay transition to RRC idle by 60ms as per TS 36.331
when receiving RRC connection release all actions shall be delayed by 60ms as
per the standard
2021-06-28 17:35:02 +02:00
Andre Puschmann 368c7b9e4f ue,stack: clear all EPS bearers when going RRC idle
the EPS bearer manager was only informed when a single DRB
was removed but not when entering idle which requires to
remove all bearers.

This cause the service request to fail.
2021-06-28 17:35:02 +02:00
faluco e20934583e Remove an unsafe assert in the log backend that could be triggered under very certain circumstances.
RFCI has detected this assert failing in the log_backend_test. I have not been able to reproduce this locally but my theory is the following one:
one of the unit tests does the following:

backend.start();
backend.stop();

the internal running_flag member could be set to true and then to false by the main thread before the worker thread calls do_work(). If this happens
the assert will be triggered, which is wrong and too conservative, so remove the assert.
2021-06-28 10:02:22 +02:00
Xavier Arteaga 6f5614a0cc Suggested modifications on gNb MAC/PHY interface 2021-06-28 00:27:36 +02:00
Xavier Arteaga 8378c85ec4 Refactored gNb PHY 2021-06-28 00:27:36 +02:00
Xavier Arteaga aef3e5a40a More NR PHY test and GNB PHY development 2021-06-28 00:27:36 +02:00
Xavier Arteaga 9126ad3b8b Added NR type1 RIV function helper 2021-06-28 00:27:36 +02:00
Xavier Arteaga d49734b1bc SRSENB: Refactor to accomodate 5G NR 2021-06-28 00:27:36 +02:00
Xavier Arteaga e98a6f9eea Make ACK M constant i UEDLNR 2021-06-28 00:27:36 +02:00
Xavier Arteaga 567c7c9c77 Create TTI semaphpore default constructor 2021-06-28 00:27:36 +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
Andre Puschmann a4b2a065ff pdcp: reword warning when dropping PDU 2021-06-24 16:52:58 +02:00
Andre Puschmann 7113e55d53 rlc: refactor RLC entity to use smart pointers for holding bearers
this patch mainly modernizes the bearer creation to use smart pointers.
that allows to simplify the error handling.

ue_stack is changed to match new interface. This commit compiles
but doesn't work.
2021-06-24 16:52:58 +02:00
David Rupprecht 6d5391756c Refactor build of RLC NR config 2021-06-24 16:52:58 +02:00
David Rupprecht d1d8500ce5 Add testcase for reconfiguration 2021-06-24 16:52:58 +02:00
David Rupprecht ec19919246 Fix NGAP valgrind test 2021-06-22 20:53:43 +02:00
Xavier Arteaga eb7980f2b3 Initial UE synchronization for NR 2021-06-22 16:36:24 +02:00
Pedro Alvarez 4d13906760 Increase logging level of MAC mismatches to warning in PDCP 2021-06-22 15:35:38 +01:00
Andre Puschmann e1fb58d76e rlc_um: reduce log level for message handling lost PDUs
when a lost PDU is detected a warning will be logged. In theory
this could be info as well but a warning may help to detect issues
in tests. The same event causes multiple other warnings to be logged,
which is very spammy. The patch reduces the log level for
those messages to info.
2021-06-22 13:06:57 +02:00
Pedro Alvarez aae266e848 Added configuration option for S1AP SCTP bind port 2021-06-22 11:11:54 +01:00
David Rupprecht 85d7a851fb Added 5G NAS PCAP support 2021-06-22 09:02:07 +02:00
Francisco 78acf81cf0 bugfix,sched: avoid instability in TPCs around PHR~0 2021-06-21 17:35:24 +01:00
Xavier Arteaga b1e4720721 SRSUE/SRSENB: added tx_enable flag in worker_end 2021-06-21 18:07:53 +02:00
Xavier Arteaga 027201d457 SRSUE/SRSENB: Refactor NR workers to generalise lower PHY 2021-06-21 18:07:53 +02:00
Andre Puschmann 83bf5dcd49 rlc_am_lte: reduce time holding Tx mutex when processing status PDUs
the patch is a re-implementation of the customer-specific optimization
we did in order to reduce the time the RLC holds the Tx mutex when
processing an incoming status PDU.

The patch makes sure to never operate on a raw mutex but instead
uses the deadlock-avoiding RAII lock.
2021-06-21 13:28:07 +02:00
Ismael Gomez 5aa5a8e997 Revert UE changes 2021-06-18 23:17:14 +02:00
Ismael Gomez e35a0d72fa Revert UE changes 2021-06-18 23:17:14 +02:00
Ismael Gomez dd9889e07c Add carrier index to uplink PCAP captures 2021-06-18 23:17:14 +02:00
Bedran Karakoc c280ac5ad6 Introducing extended NGAP functionality
Remove unused logger for now in ngap::ue to pass tests
2021-06-17 13:05:29 +02:00
Francisco 5a82a63bb5 bugfix,srsenb: fix intraenb handover softbuffer allocation during handover 2021-06-16 10:21:13 +01:00
Xavier Arteaga cf09044453 Optimised random bit (unpacked) and byte (packed) generator 2021-06-15 12:44:21 +02:00
Xavier Arteaga d2a19c3043 SCH minimum number of iterations to 2 to reduce systematic false alarm probability 2021-06-15 12:44:21 +02:00
Xavier Arteaga ef4c978d72 Optimized byte random generator 2021-06-15 12:44:21 +02:00
Andre Puschmann 475c033440 rlc_am_test: extend status PDU test
add full test with malformed status PDU
2021-06-15 11:01:02 +02:00
Andre Puschmann d7204df896 rlc_am_lte: check rx window first when receiving status PDU
move rx window check up so no actions are taken when receiving
malformed status PDU
2021-06-15 11:01:02 +02:00
Xavier Arteaga 2cd8ba3a1a PDCCH test skips 100PRB for ARM 2021-06-14 20:32:51 +02:00