Commit Graph

179 Commits

Author SHA1 Message Date
faluco c9c2d6982f Implement a function to remove emergency handlers when a signal is raised.
Make PCAP handlers deregister from this list when they are destructed. This avoid the signal handler calling destructed objects under very rare circumstances.
2022-02-09 18:11:20 +01:00
Francisco Paisana e4a15c9c51 rrc,gnb: move non-phy fields out of phy_cell_nr_t 2022-02-08 18:21:07 +01:00
Robert Falkenberg 57f84d4ca4 Radio: add support for file-based RF device abstraction 2022-02-01 10:47:51 +01:00
Bedran Karakoc efa13290a9 ue,rrc_nr,nas_5g: Introduce NR AS Key derivation and update context handling in 5G NAS 2022-01-25 14:24:58 +01:00
Xavier Arteaga a9591f1d45 Avoid poping queue if empty 2022-01-24 10:09:17 +01:00
Francisco 52106be3d5 sched,nr: remove phy cfg types from sched_nr_cell_cfg_t 2022-01-20 10:54:00 +00:00
Andre Puschmann 02cdc66302 security: fix k_gnb* derivation for 5G
add FC code for gNB KDF and fix ARFCN encoding (can be more than 2 bytes)
2022-01-18 18:07:21 +01:00
Francisco Paisana c8f7976014 asn1: use byte buffer pool for temporary variable length field generation instead of stack array 2022-01-11 22:59:38 +00:00
Carlo Galiotto 0f92869156 rrc,sched: add csi-MeasConfig setup in RRC
Signed-off-by: Carlo Galiotto <carlo@srs.io>
2022-01-06 20:32:20 +01:00
Carlo Galiotto a7255cfac6 sched: add fnc to map CQI to MCS
Signed-off-by: Carlo Galiotto <carlo@srs.io>
2022-01-06 20:32:20 +01:00
Merlin Chlosta c967b688ff emergency handler for NAS PCAP to close file
Previously NAS PCAP wasn't closed/fflushed on
unclean exit, resulting in missing or corrupted PCAP.
2021-12-22 17:13:21 +01:00
Ismael Gomez 6947f87bcb Add minimum NR SA logic in parent PHY class 2021-11-30 14:45:26 +01:00
Francisco b27c184d2f nr,gnb,stack: add bearer manager to gNB stack to correctly map between eps bearer ids and lcids 2021-11-26 20:33:47 +00:00
Andre Puschmann 97997b6d0b buffer_pool: add helper to build byte_buffer from raw payload+len 2021-11-24 12:10:17 +01:00
Pedro Alvarez 2fad9ded01 Make sure that the pcap is started before NGAP init, so that the NGSetupRequest is caught 2021-11-23 17:12:53 +00:00
Pedro Alvarez 5e22e42762 Added option to save NGAP pcaps. 2021-11-23 17:12:53 +00:00
Pedro Alvarez c0d2e8c11d gNB NR security context:
- changed variables to use nia/nea instead of eia/eea.
  - make rrc_nr_cfg a ref
  - Changed NR ciphering/integrity algo enums to their own enum
2021-11-19 18:24:03 +00:00
faluco 453a7760b3 Port misc SSN changes to dev. 2021-11-16 14:46:51 +01:00
Francisco 92c4e6e2d0 nr,gnb: account for CORESET#0 RB offset (See 38.213, table 13-1) in computation of SSB center frequency 2021-11-15 15:47:31 +01:00
Francisco 83c1fb65d7 nr,gnb,rrc: add rrc nr message handler and send functions to establish an SA RRC connection 2021-11-12 14:46:44 +00:00
Francisco 16753a006a nr,gnb,rrc: add test logger delimiter; handle rrc setup complete 2021-11-11 10:55:35 +00:00
Francisco 96fd3aae3c nr,gnb: small gnb interface refactors and fix of byte buffer operator= 2021-11-04 18:05:14 +00:00
Francisco dab6e8bdcd nr,gnb: updates in parsing and phy files to allow the splitting of NR and LTE stacks 2021-11-04 15:24:57 +00:00
faluco 74456bf3d2 Whitelist a reported deadlock involving read lock. 2021-10-29 12:45:47 +02:00
Ismael Gomez d972fb368c
Some LGTM fixes (#3564)
* Fix LGTM issues

* ue: add logging to switch on function

* Fix new LGTM issues
2021-10-26 21:15:36 +02:00
Xavier Arteaga ebab12403f
Asynchronous NR PHY configuration (#3527)
* Fix a race condition when accessing the NR PHY cfg by the RRC and phy workers.
Rework how the phy cfg is handled, now workers have their own copy that gets updated after a reconfig moving it out of the state class.

* Default initialize sf_len member in sf_worker for consistency.

* Asynchronous NR PHY configuration

* Fix compilation

* Corrected method override and fix unitialised value

* Added carrier equal comparison to avoid aligment byte padding comparison

Co-authored-by: faluco <borja.ferrer@softwareradiosystems.com>
2021-10-25 10:51:02 +02:00
faluco 0ada9a01ec Whitelist TSAN issue in srsenb::mac::sr_detected. 2021-10-23 21:26:00 +02:00
faluco a1b2f3915d Whitelist lock order inversion tsan issue in srsenb::rlc::rb_is_um. 2021-10-23 21:26:00 +02:00
Carlo Galiotto 284207dad6 WIP: fixing collision in the the users_map
Signed-off-by: Carlo Galiotto <carlo@srs.io>
2021-10-21 23:26:46 +02:00
Ismael Gomez 7920e084b8 Revert "Do not abort tsan"
This reverts commit e8e1d101c553912f733070e71d020a33ec895280.
2021-10-21 21:31:21 +02:00
Ismael Gomez 4239222909 Do not abort tsan 2021-10-21 21:31:21 +02:00
Pedro Alvarez e721504f8e Removed the sctp_init_server for consistency. Added listen method to unique_socket class. 2021-10-21 14:50:44 +01:00
Pedro Alvarez e9a7e6dbae Getting rid of sctp_init_client function. The only thing it does is call the sctp_init_socket function. 2021-10-21 14:50:44 +01:00
faluco dacf40f63e Delete move constructor and move assignment operator explictly for mac_pcap_base and s1ap_pcap classes.
Move emergency handlers header file into the support folder.

Refactored signal handling:
- Remove the dependency with the running static variable in the header file.
- Move implementations down to cc files.
- Allow specifying a new signal handler that will be used to stop the applications.
- Move signal handling files to support.
2021-10-15 15:05:37 +02:00
faluco 9075251627 Move the cleanup code from the signal handlers down to the new emergency handlers for the ue, epc and enb. 2021-10-15 15:05:37 +02:00
faluco 2c1e9c0c55 Implement an emergency cleanup handler registration mechanism to allow modules to clean themselves before application gets killed.
Flush PCAP contents just before killing the application.
2021-10-15 15:05:37 +02:00
Francisco ea324e8cbe nr,sched,test: update sched nr test to better reflect MAC-PHY FAPI 2021-10-14 19:27:52 +01:00
faluco 28bbaa7816 Blacklist TSAN issues from libusb and libuhd. 2021-10-14 08:55:06 +02:00
Alejandro Leal Conejos 1a64c6adad Enum fixes so clang 12 can build the repo 2021-10-14 08:48:04 +02:00
Carlo Galiotto f53e01cfa3 mac: apply changes by PR reviewers
- reinstate write_lock on ue metrics
- change "rwlock" variable name in mac_nr.h

Signed-off-by: Carlo Galiotto <carlo@srs.io>
2021-10-13 11:12:03 +02:00
Carlo Galiotto dc3e3a89f8 mac: update CQI in MAC with CSI reports from PHY
Signed-off-by: Carlo Galiotto <carlo@srs.io>
2021-10-13 11:12:03 +02:00
Carlo Galiotto 43a7d822fa stack,rrc: fix double removal of EPS bearer
The EPS bearer was removed twice, causing an error in the logs.

Fix issue #3380

Signed-off-by: Carlo Galiotto <carlo@srs.io>
2021-10-08 11:19:12 +02:00
faluco 7b0b76d58e Whitelist two lock order inversion TSAN issues that acquire a readlock. 2021-10-06 12:49:34 +02:00
Fabian Eckermann cb721aa292 fix calculation of ssb frequency. 2021-10-05 18:21:58 +02:00
Andre Puschmann 8bb06ff2c0 Added SSB in gNb PHY 2021-10-04 19:26:07 +02:00
Andre Puschmann 7496b7c14f Add SSB to configuration factory 2021-10-04 19:26:07 +02:00
Andre Puschmann 5b0767772b Added SSB center frequency to band helper 2021-10-04 19:26:07 +02:00
Fabian Eckermann 95abfbfec8 Calculate ssb frequency from freqency point a. 2021-10-04 15:59:05 +02:00
Francisco Paisana f22483ce72 sched,nr: use formatting %d to represent slot index 2021-10-04 13:43:56 +02:00
Xavier Arteaga c9d7db7314 Minor changes 2021-10-04 10:28:34 +02:00