Commit Graph

2445 Commits

Author SHA1 Message Date
faluco 4b5e15cd70 - Fixed missing return statements in base_circular_buffer::try_push.
- Fixed array index calculation in base_circular_buffer::clear.
- Removed redundant explicit in srslog::backend_worker.
2021-03-25 19:00:06 +01:00
David Rupprecht 8c86d2084d Adding NR phy config RRC parsing
Added error handling

Reworked flattening error handling
2021-03-25 11:34:53 +01:00
Andre Puschmann 48c106ae64 rlc_um_nr: fix packing/unpacking of PDUs with 12bit SN
* fix SN extraction/writing
* fix packed header size calculation
* fix segmentation logic and take variable header lenght into account
2021-03-25 08:06:49 +01:00
AlaiaL 1cc2cc4e7f Fixed typo 2021-03-24 12:01:12 +01:00
AlaiaL fd3c2b855e - Renamed log to logger.
- Added a log entry in the metrics when skipping a measurement due to
time constrains
2021-03-24 12:01:12 +01:00
AlaiaL bbaebd1274 Added a warning in the log when the cpu metrics are not registered due
to the number cpu cores is greater than supported.
2021-03-24 12:01:12 +01:00
AlaiaL c9d1c77e8c - Deleted the magic number of maximum supported cores, now it is a
constexpr.
- When the system has more cores that the maximum supported, the cpu
metrics will not be registered.
2021-03-24 12:01:12 +01:00
AlaiaL 6cd9bba641 Added the cpu metrics to the system metrics. 2021-03-24 12:01:12 +01:00
Xavier Arteaga 5bdf2c93b3 Initial NR PDSCH CSI-RS RE skip and other changes 2021-03-24 09:06:26 +01:00
Pedro Alvarez 5bc55ec48c Changed discard_if to appyly_if in circular_buffer.h.
This was done so it would work when circular buffer holds other things
that are not unique_pointers. Queue and pop_func had to be made public
to be able to call the pop_func when an SDU is discarded.
2021-03-24 00:57:58 +00:00
Andre Puschmann 1b1cfa40c9 rlc_am_lte: add some more sanity checks around retx of PDUs
this patch doesn't change any functionality but adds a bit
of further error checking around the handling of status PDUs
and the retx of PDUs
2021-03-23 23:36:53 +01:00
Xavier Arteaga 7704c09ce2 Fix typos 2021-03-23 15:11:46 +01:00
faluco e8395c7474 - Implement a pool to store dyn arg store objects in srslog to avoid allocations when passing arguments to the backend.
- Use string views inside the log formatters to avoid allocations.
- Avoid a std::string when using fmt::vsprintf, instead favour fmt::vprintf.
2021-03-23 14:55:34 +01: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 dd336c53ea changed srsran_warning to srsran_expect. Applied new macro to rlc am 2021-03-23 10:49:28 +00:00
Andre Puschmann 9d8d897d3e mac_pcap_base: log warning when PDUs can't be added to write queue 2021-03-23 10:17:03 +01:00
Pedro Alvarez d91119baf6
RLC discard (#2515)
* Added ability to discard to dyn_block_queue

* Change way of keeping track of SDUs

* Check nullptr in poping callback. Starting to check for nullptr in RLC read_pdu.

* Adding RLC discard tests

* Clearing PDCP info when RLC discard happens

* Read SDUs until they are no longer nullptr

* Changed discard_if to use template argument
2021-03-22 16:51:32 +00:00
Codebot 4523ee6087 rename srsLTE to srsRAN 2021-03-21 21:47:01 +01:00
Pedro Alvarez dde8157bf1 Make sure that S1 Setup request is restarted regardless of which error made the procedure fail. 2021-03-19 10:48:45 +00:00
Andre Puschmann 47654af717 pdcp_entity_lte: fix printf formatter for size_t
we've seen a heap-buffer overflow in fmt because printf wasn't using
the right formtter for size_t, which should be %zu

this patch fixes it for the PDCP LTE entity but we might have it elsewhere too

[1m[31m==7595==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x629000e6f1fc at pc 0x562273a45289 bp 0x7f35567641f0 sp 0x7f35567641e0
[1m[0m[1m[34mREAD of size 4 at 0x629000e6f1fc thread T12 (STACK)[1m[0m
    0 0x562273a45288 in fmt::v7::basic_format_arg<fmt::v7::basic_printf_context<std::back_insert_iterator<fmt::v7::detail::buffer<char> >, char> > fmt::v7::detail::make_arg<fmt::v7::basic_printf_context<std::back_insert_iterator<fmt::v7::detail::buffer<char> >, char>, unsigned int>(unsigned int const&) (/osmo-gsm-tester-srsue/srslte/bin/srsue+0x9dc288)
    1 0x562273a3aa86 in void fmt::v7::dynamic_format_arg_store<fmt::v7::basic_printf_context<std::back_insert_iterator<fmt::v7::detail::buffer<char> >, char> >::emplace_arg<unsigned int>(unsigned int const&) (/osmo-gsm-tester-srsue/srslte/bin/srsue+0x9d1a86)
    2 0x562273a308e7 in void fmt::v7::dynamic_format_arg_store<fmt::v7::basic_printf_context<std::back_insert_iterator<fmt::v7::detail::buffer<char> >, char> >::push_back<unsigned int>(unsigned int const&) /mnt/data/jenkins/workspace/srslte_ogt_trial_builder_x86-ubuntu1804-asan/srsLTE/lib/include/srslte/srslog/bundled/fmt/core.h:1548
    3 0x562274361541 in void srslog::log_channel::operator()<unsigned int&, unsigned int&, unsigned long>(char const*, unsigned int&, unsigned int&, unsigned long&&) /mnt/data/jenkins/workspace/srslte_ogt_trial_builder_x86-ubuntu1804-asan/srsLTE/lib/include/srslte/srslog/log_channel.h:101
    4 0x56227430d9e7 in srslte::pdcp_entity_lte::update_rx_counts_queue(unsigned int) /mnt/data/jenkins/workspace/srslte_ogt_trial_builder_x86-ubuntu1804-asan/srsLTE/lib/src/upper/pdcp_entity_lte.cc:451
2021-03-18 22:56:58 +01:00
Andre Puschmann 2cfc657fbb rlc_am_lte: refactor logging when PDCP SDUs are enqueued
the patch refactor the logging when a new PDCP SDU is enqueued for
transmission at RLC.

If the SN is already present, only a warning is logged. From the RLC
perspective operation continues and the SDU will be transmitted.

The patch also changes the order of logs. When the SN cannot be inserted
inside the queue of undelivered SDUs, only one message is logged.
2021-03-18 15:27:49 +01:00
faluco eb27efd867 Modify the policy of the buffered sink to flush its contents continuously instead of doing it once. 2021-03-18 10:28:58 +01:00
Xavier Arteaga 5f954ab379 Fix UHD compilation 2021-03-17 08:53:40 +01:00
Xavier Arteaga a8b5b8efa1 UHD: stability improvements 2021-03-17 08:53:40 +01:00
Xavier Arteaga f9689ec956 Added PUSCH CFO estimation 2021-03-17 08:53:40 +01:00
Francisco 47f1175502 [sched, feature enhancement] - allow variable nof prbs allocated per SIB / Paging message 2021-03-16 19:27:25 +00:00
Xavier Arteaga f3c0360842 Applied aesthetical changes 2021-03-16 11:36:11 +01:00
Xavier Arteaga d9780e1f13 Fix duplicated NR-DCI in different search spaces and CORESET and other aesthetic modification 2021-03-16 11:36:11 +01:00
Xavier Arteaga 6fa33c890d Simultaneous HARQ-ACK, SR and CSI in NR-PUCCH 2021-03-16 11:36:11 +01:00
Xavier Arteaga 1463b11bad Fix compilation 2021-03-16 11:36:11 +01:00
Xavier Arteaga be8e8cbe3e Fix radio decimation Rx stream stall 2021-03-16 11:36:11 +01:00
Xavier Arteaga 10af89fcdd NR-PDCCH aesthetic changes 2021-03-16 11:36:11 +01:00
Xavier Arteaga fb1a0b6bce SRSUE: added NR-PDCCH information 2021-03-16 11:36:11 +01:00
Xavier Arteaga d3cfb00211 SRSUE: Added TDD DL/UL slot detection 2021-03-16 11:36:11 +01:00
Xavier Arteaga f3bf0c1c68 Wrap slot index in modulus macro 2021-03-16 11:36:11 +01:00
Xavier Arteaga 4bab0b53b7 SRSUE: fix slot index overflow 2021-03-16 11:36:11 +01:00
Xavier Arteaga 6f6c20e194 SRSUE: Added procedure for multiplexing UCI in NR-PUSCH 2021-03-16 11:36:11 +01:00
faluco e43f555fc0 - Provide a fast path for logging pre-formatted strings that are small and fit in 64 bytes without any allocations.
- Use this new feature in the tracer.
2021-03-16 11:20:01 +01:00
David Rupprecht be46806495 PCAP: Enable carrier ID TAG 2021-03-13 19:19:19 +01:00
Ismael Gomez 7b33c48fe7 Use static queue in pdu_queue 2021-03-12 19:10:15 +00:00
Pedro Alvarez f02694dd3e PDCP status report: Fix issue in keeping track of Rx'ed COUNTs after eNB reestablishment. Fixed issue in logic that limits the size of the rx_counts info vector. 2021-03-12 13:47:20 +00:00
Pedro Alvarez d2ef541957 Changed the structure to store rx_counts info to std::vector, to reduce
memory allocations.
Update the rx_count_info queue if the queue size is too large.
2021-03-12 13:47:20 +00:00
Pedro Alvarez 3f79cd6281 Changed generation of status report to use rx_counts instead of
undeliverd_sdus_queue. Added a queue to store information about
rx_counts received.
Added unit test for when the SNs wrap-around in status report genaration
2021-03-12 13:47:20 +00:00
Francisco 3e9f93eb8a refactor - remove old log_filter and logmap libraries from the codebase 2021-03-11 20:10:54 +00:00
faluco 173dcdd421 - Import latest srslog version.
- Remove string allocs in some log lines in radio.cc.

Add new tracing buffer capcity options into srsenb and srsue.

Add missing file.
2021-03-10 16:27:33 +01:00
faluco c7542daf43 Remove rlc traces and add new ones into tti run functions both in the enb and ue. 2021-03-10 11:59:09 +01:00
faluco 82db6544fb Add instrumentation points to rlc_am_lte::rlc_am_lte_tx::handle_control_pdu using srslog. 2021-03-10 11:59:09 +01:00
Andre Puschmann 16de8668e0 rlc_am_lte: convert mutexes to std::mutex
replace all pthread_mutex with std::mutex and use lock_guard and unique_lock (where needed)
2021-03-09 21:56:33 +01:00
Andre Puschmann 20cbc48f90 rlc_am_lte: refactor PDCP/RLC interface to use fix sized data structure
this patch replaces the std::vector type used in the interface between
PDCP and RLC to signal delivery status between both layers. The new
data type is a configurable but fixed-size vector.
The RLC AM doesn't need to dynamically allocate the vector for every SN but
uses the tx_window for storage.
2021-03-09 21:56:33 +01:00
Francisco ee77343f26 fix compilation issue for centos7 2021-03-09 16:23:08 +00:00