118 Commits (master)

Author SHA1 Message Date
Codebot 3a533706bf Adding AGPL copyright to new files 2 years ago
Codebot 254cc719a9 Merge branch 'next' into agpl_next
# Conflicts:
#	cmake/modules/FindPolarssl.cmake
2 years ago
Andre Puschmann 15c6feeba6 srsue: init softbuffer structs for mch,pch 2 years ago
Codebot 3defd1bcf6 Merge branch 'next' into agpl_next 2 years ago
yagoda 19918d9a67 phy,mac,mbms: moving payload buffer from MAC to PHY to avoid thread clashes 2 years ago
Codebot 4d2b5b8eda Adding AGPL copyright to new files 3 years ago
Codebot 1cd26af06b Merge branch 'next' into agpl_next 3 years ago
faluco f1385640c4 Fix data race in proc_bsr and ul_harq classes. 3 years ago
faluco 92b81b200f Fix data race in ul_harq_process::current_irv. 3 years ago
Codebot 2cda208936 Merge branch 'next' into agpl_next 3 years ago
faluco 5f93ff6ed0 Batch of data race fixes in the following classes: RLC AM, Intra measure, UL HARQ, PHY common. 3 years ago
Codebot 9d7836817c Merge branch 'next' into agpl_next
# Conflicts:
#	lib/include/srsran/common/signal_handler.h
3 years ago
faluco a9c65bd369 UE: Implement a thread safe wrapper class for accessing the mac_grant_ul_t member in ul_harq_process.
This fixes many race conditions detected by TSAN around this class.
3 years ago
faluco 6c4548c243 Fix several data races in LTE and NR harq classes. 3 years ago
Codebot 8c3332f894 Merge branch 'next' into agpl_next
# Conflicts:
#	srsenb/hdr/stack/upper/pdcp_nr.h
#	srsenb/hdr/stack/upper/rlc_nr.h
#	srsenb/src/stack/upper/pdcp_nr.cc
#	srsenb/src/stack/upper/rlc_nr.cc
3 years ago
faluco fa351cd285 Rename functions that contain the unsafe word to nolock.
The term "unsafe" does not clearly state that the function is not locking the shared date and it sounds "dangerous", so use a more explicit term.
3 years ago
Codebot ecd0580b9e Merge branch 'next' into agpl_next 3 years ago
faluco c2b705c5ce Fix several data races in proc_phr, class needs to be fully protected since most member variables are accessed by different threads. 3 years ago
faluco 6b07e886b7 Fix data race in is_first_ul_grant. 3 years ago
faluco 1796e12084 Fix data race in ul_harq_entity. 3 years ago
faluco 2b73beb3dd Fix data race in ul_harq. 3 years ago
Codebot ccf8cfb65f Merge branch 'next' into agpl_next
# Conflicts:
#	lib/include/srsran/common/basic_pnf.h
#	lib/include/srsran/common/basic_vnf.h
#	lib/include/srsran/common/basic_vnf_api.h
#	lib/src/common/basic_vnf.cc
#	lib/test/common/pnf_bridge.cc
#	lib/test/common/pnf_dummy.cc
#	srsenb/hdr/phy/vnf_phy_nr.h
#	srsenb/hdr/stack/mac/nr/sched_nr_common.h
#	srsenb/hdr/stack/mac/nr/sched_nr_phy_helpers.h
#	srsenb/src/phy/vnf_phy_nr.cc
#	srsenb/src/stack/mac/nr/sched_nr_common.cc
#	srsenb/src/stack/mac/nr/sched_nr_phy_helpers.cc
#	srsue/hdr/phy/vnf_phy_nr.h
#	srsue/src/phy/vnf_phy_nr.cc
3 years ago
Andre Puschmann e0d9afc342 proc_ra: fix race detected with TSAN
rar_received is accessed from PHY worker and Stack thread
3 years ago
Codebot 516951c41c Merge branch 'next' into agpl_next
# Conflicts:
#	lib/include/srsran/interfaces/rrc_nr_interface_types.h
#	lib/include/srsran/phy/enb/enb_dl_nr.h
#	test/phy/nr_dl_flood.cc
3 years ago
Codebot 585e3c51c1 Merge branch 'next' into agpl_next
# Conflicts:
#	srsenb/hdr/phy/nr/cc_worker.h
#	srsenb/hdr/phy/nr/sf_worker.h
#	srsenb/src/phy/nr/cc_worker.cc
#	srsenb/src/phy/nr/sf_worker.cc
#	test/phy/nr_phy_test.cc
3 years ago
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>
3 years ago
Andre Puschmann e2c496d825 srsue,mac: fix race between PHY and MAC when stopping UE
the issue let to unwanted log warning at the end of the UE
execution when the PHY was still pushing DL PDUs while MAC
was already stopped.

This fixes #3003
3 years ago
Ismael Gomez e35a0d72fa Revert UE changes 3 years ago
Ismael Gomez dd9889e07c Add carrier index to uplink PCAP captures 3 years ago
Codebot 73a61b884e Merge branch 'next' into agpl_next 3 years ago
Francisco 486823e5de sched,bugfix: The PHR handling scheme now considers the number of PRBs of the UL grant that carried the PHR. Before, it was assuming the most conservative scenario of Nprb=1 3 years ago
Andre Puschmann 018c734b09 dl_harq: fix unlocking of unlocked mutex bug detected by TSAN
in the mac_test the tb_decoded() method was called twice for
the 2nd codeword, causig TSAN to complain about an unlocked mutex
being unlocked.

The patch resolves the potential issue only calling tb_decoded
for a grant/tb thas has a non-zero MCS.

The patch also adjusts the reset function to have a safe and "unsafe"
version to be called from inside the class, similar to other
classes where we do the same.
3 years ago
Codebot 0a15eeb57a Adding AGPL copyright to new files 4 years ago
Codebot c0282856d0 Merge branch 'next' into agpl_next
# Conflicts:
#	srsue/test/mac_nr/mac_nr_test.cc
4 years ago
Andre Puschmann db496df1e6 mac_nr: add support for periodic BSR reporting
building on the previous refactor this patch now adds support
for peridoic BSR reporting (using short BSR). It furthermore does
the following changes:

* add BSR packing
* add proc_bsr_nr unit test
* move mac_nr test code into test folder under src (needs to be done with other test code too)
4 years ago
Codebot a047e13479 Merge branch 'next' into agpl_next
# Conflicts:
#	lib/include/srsran/adt/adt_utils.h
4 years ago
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
4 years ago
Codebot 24290dcae2 Adding AGPL copyright to new files 4 years ago
Codebot 4523ee6087 rename srsLTE to srsRAN 4 years ago
Xavier Arteaga 2782d96170 SRSUE: compute speed from TA commands 4 years ago
Francisco 3e9f93eb8a refactor - remove old log_filter and logmap libraries from the codebase 4 years ago
Xavier Arteaga 1e55d68b55 Removed set RNTI from API 4 years ago
Francisco b329e25bbb move ue phy interfaces to separate interfaces header file 4 years ago
Francisco b8bd869d0f move ue rlc interfaces to separate interfaces header file 4 years ago
Francisco 3265d940ec remove byte buffer pool cached member variables as they are unnecessary now. 4 years ago
faluco 821925a273 - Upgrade to srslog the loggers in lib/mac.
- Adapted users of these classes and tests.
4 years ago
Andre Puschmann 73cb0dabf2 mac_nr: move UE MAC class into own subfolder
this should simplify further MAC NR extensions and lead
to a more organized folder structure
4 years ago
Andre Puschmann da9e3363f1 mac_pdu_nr: rename MAC PDU class for NR to adhere naming conventions
* mainly to have _nr as trailing name for filename and class
* also add "sch" to class and filename (RAR PDU will have extra class)
4 years ago
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.
4 years ago
David Rupprecht ceda458bb3 Added MAC NR to EUTRA and NR with stack interfaces including MAC config build
Moved MAC logical channel config to MAC interface types
4 years ago