Commit Graph

8444 Commits

Author SHA1 Message Date
Xavier Arteaga 658b47d917 Added NR PUSCH and PUCCH decoder in gnb_ul 2021-07-05 17:51:27 +02:00
Xavier Arteaga 89994cd5a8 change ERROR macro format to be parsed by IDE 2021-07-05 17:51:27 +02:00
Xavier Arteaga f6fc215541 Refactored enb_dl_nr to gnb_dl and initial gnb_ul 2021-07-05 17:51:27 +02:00
Xavier Arteaga eecaccb541 Added NR PHY helpers 2021-07-05 17:51:27 +02:00
Andre Puschmann 6372f89c09 s1ap_test: fix compilation on 32bit 2021-07-05 12:29:49 +02:00
Andre Puschmann f292042f66 rlc_am_lte: use try-lock when building status PDU
the patch uses try-lock whenever a status PDU is tried
to be built. This makes sure that when the lock is currently
hold (e.g. by a thread processing rx PDUs) the generation
of the status PDUs is not taking too long and blocking the calling
thread. Instead the status PDU generation is deferred to the next
Tx opportunity.

It's a probabilistic approach that assumes that at some stage the
lock can in fact be acquired.
2021-07-05 09:28:29 +02:00
Andre Puschmann a9d21696c5 rlc_am_lte: make number of RLC SDUs per PDU a compile-time parameter
this allows to set the maximum number of RLC SDUs included
in a single PDU at compile time.
2021-07-05 09:28:29 +02:00
Andre Puschmann 5dbeecdbb5 ue,upper: fix linking on 32bit platforms with missing atomic libs 2021-07-05 08:59:19 +02:00
David Rupprecht f90e359208 Moved cp to test common 2021-07-02 17:23:06 +02:00
Andre Puschmann 5999b0d3a5 ue: move blocking wait for detach outside of stack class
the thread sleep waiting for the UE release should not run
on the stack thread. Move it to the UE class therefore.
2021-07-02 17:22:49 +02:00
Andre Puschmann bbcaa49429 network_utils: fix TSAN detected race 2021-07-02 17:22:49 +02:00
Andre Puschmann 3173dedf0a ue_stack_lte: make sure to execute stack commands on Stack thread
some commands were executed from the calling thread which may lead
to concurrent access to members. Detected by TSAN. The patch
moves all remaining calls (the majority was alread moved) to the
Stack task queue.
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 fb4dd3ba7b ttcn3: fix various races between SS and Stack thread detected by TSAN
fixed through the right usage of mutexes in both TTCN PHY and syssim.
nested mutex locking is solved by calling SS from the PHY after
releaseing the PHY lock again.
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
Ismael Gomez c0fd64c4e6 Fix data races in srsENB MAC 2021-07-01 17:39:06 +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 30802777cf fix,enb: fix enb.conf param description 2021-06-29 20:39:32 +02: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
Francisco 4c316aa9ea sched,nr: integrate mac-phy interface types into the scheduler 2021-06-29 14:19:35 +02:00
Francisco 5b3c5ded63 sched,nr: implement NR PDCCH allocation algorithm 2021-06-29 14:19:35 +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 8087bb01e4 nas: log message when airplane mode timer expires 2021-06-28 17:35:02 +02:00
Andre Puschmann 0a16f48869 gw: fix race condition
GW thread was checking the default_eps_bearer variable without
protection. RRC could update it when deleting DRB or receiving RRC
connection release.
2021-06-28 17:35:02 +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 c4e13f70a2 SRSENB: fix NR worker pointer check 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
Francisco de05e1e549 sched,nr: fix invalid memory write 2021-06-24 16:22:42 +01:00
Francisco 75153c7c83 sched,nr: implementation of sched sim test class 2021-06-24 16:22:42 +01:00
Francisco f1b3cfc764 sched,nr: implementation of sched NR harq retxs. Refactor of rb grid classes. 2021-06-24 16:22:42 +01:00
Francisco d950433cbd sched,nr: fix time-domain parallelization sched nr test. creation of util class to handle acquisition of boolean resources 2021-06-24 16:22:42 +01:00
Francisco 35a236b1b9 sched,nr: fix sched_nr_test. Resolve data race issues. Created new config structs used across the scheduler. 2021-06-24 16:22:42 +01:00
Francisco 407da794e1 sched,nr: implementation of slot grid class 2021-06-24 16:22:42 +01:00
Francisco 4fa27f3841 sched,nr: implementation of main classes for NR scheduler, and basic test for concurrency 2021-06-24 16:22:42 +01:00
Andre Puschmann e248e086ed ttcn3_dut: reset TFT matcher object when DUT is switched off 2021-06-24 16:52:58 +02:00