Commit Graph

230 Commits

Author SHA1 Message Date
Codebot 73a61b884e Merge branch 'next' into agpl_next 2021-06-06 23:12:31 +02:00
Andre Puschmann c0be8187c8 rlc interface: convert entire read_pdu() interface to return uint32_t
we had it returning int but had a bug in using the return value properly,
i.e. handling when -1 was returned in RLC TM.

Thinking about it more, it doesn't make sense to have a negative return
value here anyway. Either the RLC can return a PDU or not. If it can't the
returned lenght is zero.
2021-06-04 13:23:54 +02:00
Francisco f7aef3ffc1 sched,bugfix: fix nof_retx update when UL HARQs are resumed 2021-06-02 20:21:32 +01:00
Andre Puschmann 1ef3cb7e5d threads: fix race in stopping periodic thread 2021-06-01 22:44:12 +02:00
Andre Puschmann 312b5a241c mac_pcap_base: fix race detected with TSAN 2021-06-01 22:44:12 +02:00
Francisco f36f5271d3 timers,feature: make timers thread-safe by using atomic to store timers state. 2021-05-31 23:26:36 +01:00
Andre Puschmann bb6a5ebe80 tsan: add TSAN options file to set some default flags and exclude some libs from checks 2021-05-27 17:26:39 +02:00
Andre Puschmann d9a5d3f95a pcap_base: increase PDU queue length
some systems with slower HDD seem to have issues
writing the PDUs to disk. increasing length to see if that helps.
2021-05-27 13:29:00 +02:00
Andre Puschmann c1ad867824 epoll_helper: use std::atomic to protect exit called from different thread 2021-05-26 14:25:38 +02:00
Andre Puschmann f1e6a975de thread_pool: fix concurrent access of state variable
the thread workers need access to their current state to exit properly
when they are set to state STOP. However, since the state is kept in
a std::vector for all workers, it seems more appropiate to add a per-thread
running variable rather then mutexing the entire vector.
2021-05-26 14:25:38 +02:00
Francisco f2a56c9139 simplification of multiqueue design.
- the consumer does multi-staged waiting:
  1. spins first across all queues in a RR fashion
  2. each queue access is done with a try_lock.
  3. if the try_lock fails, it increases the number of spins needed
  2. if no queue had data, the consumer sleeps for 100 usec.
- no differentiation between queues, in terms of notification features
2021-05-24 17:24:12 +02:00
Francisco 60a8ee0af9 multiqueue optimization - use condition_var wait_for() method, use queue try_lock in the consumer side 2021-05-24 17:24:12 +02:00
Francisco 2d6a878826 change interface to create multiqueue queues 2021-05-24 17:24:12 +02:00
Francisco f705735093 optimization - only allow some multiqueue queues to notify the multiqueue consumer of the arrival of tasks 2021-05-24 17:24:12 +02:00
Codebot e77c197633 Merge branch 'next' into agpl_next
# Conflicts:
#	srsue/hdr/phy/scell/intra_measure.h
#	srsue/src/phy/scell/intra_measure.cc
2021-05-23 23:12:20 +02:00
Xavier Arteaga c8cb128317 Declare band helper methods as constant 2021-05-18 18:41:03 +02:00
Andre Puschmann 167200f5cd rrc_bearer_cfg: replace fixed E-RAB to DRB mapping
also make sure we don't assign LCIDs beyond the possible
number.

possible fix for https://github.com/srsran/srsRAN/issues/658

Co-authored-by: herlesupreeth <herlesupreeth@gmail.com>
Co-authored-by: Francisco <francisco.paisana@softwareradiosystems.com>
2021-05-17 15:17:27 +02:00
Codebot f3da533f6b Merge branch 'next' into agpl_next 2021-05-16 23:12:25 +02:00
Francisco 84ad6dd8ee Integrated new sched_dl_cqi class in sched_ue_cell
- extend sched_dl_cqi interface to allow getting tti when cqi was last updated
- extend sched_dl_cqi to quickly get average cqi across the whole bandwidth
2021-05-14 19:58:03 +01:00
Francisco a841b7580e fix deadlock caused by non-notification of multiqueue consumer side 2021-05-13 16:48:17 +01:00
Xavier Arteaga 7450232b3e Added more NR band related helpers 2021-05-13 07:55:46 +02:00
Francisco 996d8ef74d multiqueue bugfix for non-blocking pushes when queue is full 2021-05-11 21:27:08 +02:00
Francisco 99abae9e6a fix multiqueue producer to consumer notification to avoid deadlocks 2021-05-10 15:27:21 +01:00
Francisco 0d800eb8f6 stack, multiqueue - bugfix for multiqueue destruction, and addition of unit test 2021-05-10 15:27:21 +01:00
Francisco d947e259c9 stack optimization - optimization of the multiqueue
avoid notifying the consumer side of the multiqueue of a new pushed object, if the
multiqueue already knows that the queue is not empty.
2021-05-10 15:27:21 +01:00
Francisco d574afcd33 cleanup of multiqueue unused methods, and made queue_handle move semantics correct 2021-05-10 15:27:21 +01:00
Francisco ef9d1b8c13 stack optimization - reduction of contention in multiqueue class
With the new design, each queue created in the multiqueue object has its own mutex.
Pushing tasks to separate queues will, therefore, not cause contention.
There will be, however, still contention between the popping thread and the pushing threads.
2021-05-10 15:27:21 +01:00
Codebot 5fe9a14aa5 Merge branch 'next' into agpl_next 2021-05-09 23:12:20 +02:00
Andre Puschmann bbea3dd6a1 byte_buffer: fix compilation when buffer pool log is enabled 2021-05-03 12:42:38 +02:00
Codebot 887f1da10c Merge branch 'next' into agpl_next 2021-04-28 12:40:09 +02:00
David Rupprecht fafa03f7c8 Extended the band helper table 2021-04-27 20:28:36 +02:00
Andre Puschmann f76cd5ef83 backward: fix compile error on aarch64 2021-04-26 09:43:58 +02:00
Codebot aeb4a5fc9d Merge branch 'next' into agpl_next 2021-04-25 23:12:23 +02:00
Andre Puschmann 92d4e6e746 adt/common: remove const from return type
reported by LGTM https://lgtm.com/projects/g/srsLTE/srsLTE/rev/pr-9ae46cae260b6b8137b34b9423bf1477bd6b5c42
2021-04-25 21:03:53 +02:00
Andre Puschmann ff53d2b8b8 all: set of trivial changes reported by LGTM
mainly fixmes, unused/empty code, etc.
2021-04-25 21:03:53 +02:00
Codebot 0a15eeb57a Adding AGPL copyright to new files 2021-04-22 10:59:40 +02:00
Codebot 1bb31e42ab Merge branch 'next' into agpl_next
# Conflicts:
#	lib/include/srsran/interfaces/nr_common_interface_types.h
2021-04-22 10:59:12 +02:00
Francisco 2b572f5376 fix overwrite of timer timeout when it matches previous time wheel position 2021-04-21 10:02:03 +01:00
Francisco ce47cf5910 fix - re-add log flush to srsran_assert 2021-04-20 16:27:40 +01:00
Francisco 6137e4569b fix srsran_assert definition when asserts are disabled 2021-04-20 14:01:05 +01:00
Francisco 3b78bf3730 bugfix - fix memcheck warnings. move instructions with side effects outside of asserts 2021-04-20 14:01:05 +01:00
David Rupprecht a064e85c54 rename common lte header 2021-04-19 22:23:59 +02:00
David Rupprecht 81ad72b0ff Refactor srb and drb handling 2021-04-19 22:23:59 +02:00
Codebot c7444949f8 Adding AGPL copyright to new files 2021-04-18 23:12:30 +02:00
Codebot 34dbee4c7d Merge branch 'next' into agpl_next 2021-04-18 23:12:28 +02:00
faluco e1752c0878 Replace the queue in thread pool in favour of a static circular buffer to avoid allocations. 2021-04-16 09:29:44 +02:00
Ismael Gomez 635db8dde1 Initialize metrics in hub 2021-04-15 21:32:35 +02:00
Francisco 1f1233782f timers - fix old gcc compilation issue. Changed free list to intrusive list. 2021-04-15 18:46:42 +01:00
Francisco e37968410e simplification of timers handler design, relying solely on one time wheel. 2021-04-15 18:46:42 +01:00
Francisco 60896e30b5 implementation of time wheel-based timer handler, using a circular array and intrusive list 2021-04-15 18:46:42 +01:00
Francisco 4838cd2f5e implement cell measurement bandwidth feature 2021-04-15 17:48:18 +01:00
faluco 582ad5f6de Replace the std::stack member in the buffer_pool class for a vector to avoid reallocs. 2021-04-15 14:56:56 +02:00
Francisco 685c971dc2 fix recursive call to get rb name 2021-04-12 13:21:43 +01:00
Francisco f7a8b8bf94 separate drb srb ids into separate enum types 2021-04-12 13:21:43 +01:00
Francisco 21718af3b6 avoid allocating std::string to get lcid radio bearer name. Refactored the lte radio bearer enum type 2021-04-12 13:21:43 +01:00
Codebot c0282856d0 Merge branch 'next' into agpl_next
# Conflicts:
#	srsue/test/mac_nr/mac_nr_test.cc
2021-04-11 23:14:49 +02:00
Francisco 437db3af03 forbid allocations when dispatching task to thread pool 2021-04-10 15:03:38 +01:00
Francisco d02cc51e33 use mutex or atomic in running flag to signal the interruption of a thread 2021-04-07 16:11:31 +01:00
Codebot a047e13479 Merge branch 'next' into agpl_next
# Conflicts:
#	lib/include/srsran/adt/adt_utils.h
2021-04-04 23:12:37 +02:00
Francisco c24e382c19 Refactor of socket manager class
- use of inheritance to simplify testing
- removal of global network manager
- pass of custon socket manager to s1ap and gtpu ctors
- overhauled the registration of socket fd,callback in socket manager
2021-04-02 11:42:50 +01:00
Francisco 4aac7ac238 use global rx multisocket handler, and remove stack-s1ap interface 2021-04-02 11:42:50 +01:00
Francisco 39de2efa69 multisocket handler - use blocking socket remove method 2021-04-02 11:42:50 +01:00
Francisco bf96d897ee network utils refactor - renaming of socket handle to unique socket and cleanup of its methods 2021-04-02 11:42:50 +01:00
Pedro Alvarez 8194b5ec73 Added check for consequetive KOs in MAC. Change set_activity_user to pass activity and max KOs to RRC and trigger RLF timeout. 2021-04-01 13:21:43 +01:00
faluco 54fab314c0 Enhance RRC eNB events:
- Implement a common event "log_rrc" for all RRC events and discriminate by procedure using an enum.
- Log events for connection, reestablishment, reconfig, reject and release.
- Log the corresponding ASN1 message used by each procedure.
- Redefine the JSON object for this event to match the new structure.

Fixed a compilation error detected by the static analyzer in gcc9.3 where bounded_vector::data() was using taking the address of the internal buffer which confused it, prefer to use the data method of std::array.
2021-03-31 19:37:49 +02:00
Francisco d04a19f8bc refactor - increase code reuse in adt files 2021-03-29 22:11:25 +01:00
Francisco 5eccfad05b gtpu - added comments, updated expected construct, handled in rrc the case a gtpu teid fails to allocate 2021-03-29 10:20:55 +01:00
Francisco cfd24f6a0e gtpu - leverage byte_buffer_pool to store buffered sdus in gtpu 2021-03-29 10:20:55 +01:00
Codebot 24290dcae2 Adding AGPL copyright to new files 2021-03-28 23:12:42 +02:00
Francisco be771e5c23 performance - use of new concurrent fixed size pool for byte_buffer pool 2021-03-27 12:21:08 +00:00
Francisco e1523692c2 implementation of concurrent fixed size pool that leverages thread local caches to avoid mutexing 2021-03-27 12:21:08 +00:00
faluco 3c1a97f450 - Use fprintf in the srsran_assert context incase the assert is being triggered by srslog producing a circular loop.
- Switch to use a dynamic circular buffer for the log backend queue.
2021-03-25 19:00:06 +01:00
faluco b06ef3f390 Switch the queue of the log backend to use a circular buffer. 2021-03-25 19:00:06 +01:00
Francisco 6d9709fe54 adt - make circular buffer work with types without default ctor 2021-03-23 17:28:35 +00:00
Andre Puschmann 1a0891df51 all: check return value of make_byte_buffer() and handle them safely 2021-03-23 14:31:15 +01:00
Francisco 46d46e70ff add documentation for srsran_assert and srsran_expect macros 2021-03-23 10:49:28 +00:00
Francisco dd336c53ea changed srsran_warning to srsran_expect. Applied new macro to rlc am 2021-03-23 10:49:28 +00:00
Francisco b5692037a2 created macros for assertions and warnings. The assert macro prints the whole callstack on crash. The warning macro can just log a warning or call an assertion fail depending on the cmake flag STOP_ON_WARNING 2021-03-23 10:49:28 +00:00
Andre Puschmann 26e7964694 mac_pcap_base: increase PDU queue size to 512 2021-03-23 10:17:03 +01:00
Codebot 4523ee6087 rename srsLTE to srsRAN 2021-03-21 21:47:01 +01:00