Andre Puschmann
a15962c817
ue,rrc: move NR RRC into own folder
3 years ago
Codebot
5275f33360
Merge branch 'next' into agpl_next
3 years ago
faluco
3b2f0d2f65
Fix several issues in GW class:
...
- Avoid triggering an assertion when the gw thread is pending termination.
- Re-order gw::stop method to avoid a race condition when closing the TUN device while the gw thread is still running.
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
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>
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
Ismael Gomez
c096270fc7
ue,nr: ignore NDI if received on T-CRNTI or RAR
3 years ago
Codebot
e39b9f3191
Adding AGPL copyright to new files
3 years ago
Codebot
9d7836817c
Merge branch 'next' into agpl_next
...
# Conflicts:
# lib/include/srsran/common/signal_handler.h
3 years ago
faluco
d7e8d6bf65
Fix data race in mux_nr::add_bsr_ce.
3 years ago
Francisco
81174bda64
nr,ue,rrc: release NR logical channels during RRC release
3 years ago
Bedran Karakoc
0507d9df2b
nas,nr: Fix ciphering and sequence numbers in NAS
3 years ago
Alejandro Leal Conejos
1a64c6adad
Enum fixes so clang 12 can build the repo
3 years ago
David Rupprecht
5c44d774d0
Added 5G Metrics
3 years ago
David Rupprecht
59e847ba08
Added NAS 5G args
3 years ago
David Rupprecht
5910d8847a
Split NAS security ctxt
3 years ago
Francisco
b8976ca463
nr,ue,rrc: avoid configuring the CSI until NR RA is complete
3 years ago
Francisco
47e5e85449
refactor: clean unnecessary includes of the asn1/rrc_nr.h
3 years ago
Bedran Karakoc
1e1e1420b1
Return AUTS in authentication failure for case AUTH_SYNCH_FAILURE
3 years ago
Bedran Karakoc
de750fad09
Added helper function for replayed security capabilities
3 years ago
Bedran Karakoc
193ec4abfa
Trigger switch_off in NAS
3 years ago
Bedran Karakoc
441251bdd1
Remove unused parameter
3 years ago
Bedran Karakoc
a4cc9b6ca0
Fix handle_authentication_request and add handler for authentication reject
3 years ago
Bedran Karakoc
e8bcc0a61e
Added handler for identity request and sender for identity response
3 years ago
Bedran Karakoc
850606f20b
Added deregistration (UE terminating)
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
Andre Puschmann
bf2606f94e
ue,mac_nr: fix race condition by using thread-safe RNTI class
3 years ago
Ismael Gomez
c09f09b7be
Move rrc_common from srsue to lib
3 years ago
Fabian Eckermann
8830c2796f
Add support for NSA FDD on band n3, n5 and n7.
3 years ago
Andre Puschmann
bed4cfb5e5
ue,mac_nr: fix generation of padding BSRs
...
* in Msg3 don't add explicit SBSR (rely on padding BSR to add)
* fix padding BSR generation to always use padding bytes to add it
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
Bedran Karakoc
43915550cc
NGAP GTP Bearer Establishment
3 years ago
David Rupprecht
3712983308
Added PDU Session est request
3 years ago
David Rupprecht
c670383ae9
Added NAS 5G functions incoming msg and reg proc
3 years ago
faluco
55f5f74ff3
Fixed case where calling gw::setup_if_addr after ue attachment would spawn a new thread without closing the current one.
...
This would end up being a resource leak as the number of threads grow forever until the application crashes.
3 years ago
Andre Puschmann
26cc6d7886
ue: remove stack type parameter
...
for the moment we always use the LTE stack (also for NSA mode).
For SA we likely pick a smarter approach to pick the stack type, i.e.
using the ARFCN specified in the config.
3 years ago
Codebot
b87b760326
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
7dae4a491e
Fix data race in ue_stack_lte::ul_dropped_sdus.
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
David Rupprecht
e8a464228d
Cleaned string helpers
3 years ago
Andre Puschmann
ab6210b1fc
ue,proc_sr_nr: add mutex to protect access from PHY and Stack
...
also detected by TSAN
3 years ago
Andre Puschmann
2248e63219
ue,proc_ra_nr: add mutex to protect access from PHY and Stack
...
detected with TSAN
3 years ago
Codebot
958542dc2b
Merge branch 'next' into agpl_next
3 years ago
Andre Puschmann
f382a7c7db
Revert "ue,proc_ra_nr: add temporary flag to skip RAR reception"
...
This reverts commit 28668aac34
.
3 years ago
Andre Puschmann
5a936d9940
ue,rrc: handle DRB removal correctly
...
when RRC receives a command to remove a DRB, it also needs to delete
the bearer at RLC and PDCP
3 years ago
Andre Puschmann
54ab64327a
ue,mac_nr: move BSR levels lookup table into lib header
...
prepare for shared use with gNB
3 years ago
David Rupprecht
a9a23214b0
Added more 5G security kdfs
...
Added new 5G SIM functions
Added const parameters for security functions
3 years ago
David Rupprecht
a645d74eaf
USIM functions for res star
...
Added gen_res_star in security.h
Added USIM interfaces for res star
Added RES star test case
3 years ago
Codebot
de59c88954
Merge branch 'next' into agpl_next
...
# Conflicts:
# srsue/hdr/stack/bearer_manager.h
# srsue/src/stack/bearer_manager.cc
3 years ago
Francisco Paisana
f4df55c245
stack lte: separate bearer manager into two classes, one for the ue and one for the enb
3 years ago
Andre Puschmann
db8b710442
bearer_manager: move to lib folder and extend for multiple users
...
prepare bearer manager to be used by eNB which requires
to support multiple RNTIs
3 years ago
Andre Puschmann
40499e6b6d
ue_stack_lte: use std::atomic for running var
3 years ago
Andre Puschmann
79cdc28015
nas_test_common: call NAS layer from stack thread context
...
since NAS layers insn't thread safe, all calls must come from
the same thread
3 years ago
Andre Puschmann
78d60bc138
nas: remove all uses of atomic from 4G and 5G classes
...
the NAS classes aren't thread safe and thread-safety shouldn't be
pretended by using atomics. Remove them and add explicit notice.
3 years ago
Codebot
522ca4b43a
Adding AGPL copyright to new files
3 years ago
Codebot
d1d38d1826
Merge branch 'next' into agpl_next
3 years ago
Ismael Gomez
7839ab09dc
Add RLF-Reportv9 to srsUE
3 years ago
Codebot
83f103fe4b
Merge branch 'next' into agpl_next
3 years ago
David Rupprecht
3217c00cfc
Adjusting NAS base security function to 5G
3 years ago
Codebot
635d0bc6e9
Merge branch 'next' into agpl_next
3 years ago
Andre Puschmann
28668aac34
ue,proc_ra_nr: add temporary flag to skip RAR reception
...
this will be removed again as soon as the eNB supports full RAR
transmission.
3 years ago
Andre Puschmann
99dc94ab38
nas: make state variables atomics
...
NAS states and substates maybe be requested from other threads so
they need to be protected.
Note that the caller still needs to hold it's own mutex if different
actions are required based on the state.
3 years ago
David Rupprecht
04ef6e120d
Added new SIM functions to get MCC, MNC and MSIN
3 years ago
Andre Puschmann
9c298b203d
srsue: reduce the default RRC release to 8 (minimum value)
3 years ago
Codebot
2dd440bb76
Adding AGPL copyright to new files
3 years ago
Codebot
a8ef3ba6b2
Merge branch 'next' into agpl_next
...
# Conflicts:
# srsenb/test/common/dummy_nr_classes.h
3 years ago
David Rupprecht
2563a78f34
Added basic 5G NAS metrics
3 years ago
David Rupprecht
9172059078
Supply ctor with logger instead of fetching
3 years ago
Codebot
3a5ee8d41a
Adding AGPL copyright to new files
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
David Rupprecht
0217bf5332
Fixed name space for rrc ue
3 years ago
David Rupprecht
fb92118bb7
Add 5G NAS infrastructure
3 years ago
David Rupprecht
505225d845
Added ue nas base class with security functions
3 years ago
David Rupprecht
7fa85ab336
Added nas test common file
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
58ca99d22a
Adding AGPL copyright to new files
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
Pedro Alvarez
171d5727be
Moved lib RLC into it's own folder
3 years ago
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.
3 years ago
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.
3 years ago
Andre Puschmann
5313fb99d6
tft: add helper to delete all TFTs for EPS bearer
...
when a EPS bearer is removed, all associated TFTs need
to be removed as well.
3 years ago
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.
3 years ago
Andre Puschmann
3f9c069ff7
ue_stack_lte: add RLC and PDCP entities for NR
3 years ago
David Rupprecht
d1d8500ce5
Add testcase for reconfiguration
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
d9cb5d01ff
Merge branch 'next' into agpl_next
3 years ago
Pedro Alvarez
299d2ee35d
Added interface to make the PDCP notify the RRC of integrity check
...
failures.
3 years ago