Commit Graph

64 Commits

Author SHA1 Message Date
Francisco cdf72248f3 Reimplement batch-based background object/memory pool
Main changes:
- addition of pool utilities
- The node size/alignment and batch allocation threshold are now runtime arguments
- object pool and memory pool are not anymore based on the same class.
  The object pool cannot use intrusive free list because it would overwrite the object
  memory
2021-04-07 12:02:22 +01:00
Francisco b004c2024d integration of object pool in mac::ue for allocation of softbuffers. Definition of common object pool interface class 2021-04-07 12:02:22 +01:00
Francisco 4869b14de3 application of new circular map to mac::ue_db 2021-03-22 14:58:25 +00:00
Codebot 4523ee6087 rename srsLTE to srsRAN 2021-03-21 21:47:01 +01:00
Francisco 3e9f93eb8a refactor - remove old log_filter and logmap libraries from the codebase 2021-03-11 20:10:54 +00:00
Francisco f0ed1e06a8 documentation,bugfix - added documentation to new blocking queues, changed class names, and removed blocking pushes from the critical path 2021-03-08 14:49:14 +01:00
Francisco d1236fd62f stack,optimization - replaced previous block_queue design for new bounded queue in several places in the enb 2021-03-08 14:49:14 +01:00
David Rupprecht aef6805d03 Added pcap net feature to eNodeB 2021-03-03 09:50:15 +01:00
Francisco 23459dee28 Created enb_{rlc/pdcp/gtpu/phy_interfaces.h files. 2021-02-12 16:36:50 +01:00
Francisco 43e57df00b breaking enb_interfaces.h into multiple files on a layer basis. Created enb_rrc_interfaces.h, enb_mac_interfaces.h and enb_s1ap_interfaces.h 2021-02-12 16:36:50 +01:00
faluco 711438f756
Port enb specific classes to use srslog (#2155)
* - Started porting the enb PHY layer to use srslog loggers.
- Updated srslog to manage the none level.

* Finished porting enb phy layer including the NR part.

* Ported MAC, GTPU, PDCP, RLC and S1AP enb classes to use srslog.

* Use new stack logger.

* Ported the enb RRC clases to use srslog.

* Remove unused log macros.

* Replace loggers in sched, sched_carrier, sched_helpers.

* Replaced loggers in sched grid.

* Replaced loggers in sched harq.

* Replaced loggers in sched ue.

* Replaced loggers in sched ue ctrl.

* Replace loggers in sched ue ctrl TPC.

* Replaced loggers in sched subclasses.

* Replaced loggers in rrc_meascfg_test

* Configure loggers in rrc_mobility_test.

* Fix compilation errors left out after the rebase.

* - Implement a custom log sink that will serve as a test spy to intercept and count the number of error and warning log entries.
- Adapt the erab_test_setup and rrc_mobility tests to use this new class and make them pass again.

* - Remove trailing new lines introduced in the rebase.
- Ported the sched_ue_cell class to srslog.

* Remove unused log member.

* Ported mac tests to srslog.

* - Removed remaining trailing newlines from log entries.

* Fix compiler errors detected in CI.

* Fix another static variable without definition passed to log lines.

* Fixed a bug in srslog::flush that would never end when the backend queue is full.

* Fetch the RRC logger instead of injecting it in the constructor.
2021-01-28 12:17:18 +01:00
yagoda 1420c23863 adding RAR buffers for multiple carriers, previously RARs into different carriers in the same TTI would overwrite each other 2021-01-26 21:19:06 +01:00
Ismael Gomez 47dbd6ed70
Merge pull request #2214 from softwareradiosystems/pr_mac_buffers
Limit the number of UL buffers in MAC and deallocate old ones
2021-01-20 21:12:39 +01:00
Ismael Gomez d5f0634975
Add PUCCH SNR measurement (#2175)
* Add PUCCH SNR measurement

* Fix PUCCH SNR estimation

* Reverted PUCCH noise estimation

* use fpclassify instead of iszero

Co-authored-by: Xavier Arteaga <xavier@softwareradiosystems.com>
2021-01-19 21:55:24 +01:00
Ismael Gomez c1c5fa426c Fix issue with new way of managing ul buffers not working with CA 2021-01-19 16:59:36 +01:00
Andre Puschmann 732a108982 mac: convert rar_pdu_msg[] from vector into array and protect access
attempt to address ASAN detected issue:

RACH:  tti=821, cc=3, preamble=11, offset=0, temp_crnti=0x47
ASAN:DEADLYSIGNAL
=================================================================
m==25385==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000024 (pc 0x564b19a26c93 bp 0x7fa0e5f1a8c0 sp 0x7fa0e5f1a798 T8)
==25385==The signal is caused by a WRITE memory access.
==25385==Hint: address points to the zero page.

------DL--------------------------------UL------------------------------------
rnti cqi  ri mcs brate   ok  nok  (%)  snr  phr mcs brate   ok  nok  (%)   bsr
  46 0.10   0 0.0     0    0    0   0%    0  0.0   0     0    0    0   0%   0.0
  47 0.10   0 0.0     0    0    0   0%    0  0.0   0     0    0    0   0%   0.0
    #0 0x564b19a26c92 in srslte::rar_subh::set_ta_cmd(unsigned int) /mnt/data/jenkins/workspace/srslte_ogt_manual_zmq/srsLTE/lib/src/mac/pdu.cc:1136
    #1 0x564b19577f7e in srsenb::mac::assemble_rar(srsenb::sched_interface::dl_sched_rar_grant_t*, unsigned int, int, unsigned int, unsigned int) /mnt/data/jenkins/workspace/srslte_ogt_manual_zmq/srsLTE/srsenb/src/stack/mac/mac.cc:837
    #2 0x564b19591765 in srsenb::mac::get_dl_sched(unsigned int, std::vector<srsenb::mac_interface_phy_lte::dl_sched_t, std::allocator<srsenb::mac_interface_phy_lte::dl_sched_t> >&) /mnt/data/jenkins/workspace/srslte_ogt_manual_zmq/srsLTE/srsenb/src/stack/mac/mac.cc:653
    #3 0x564b19497ee2 in srsenb::lte::sf_worker::work_imp() /mnt/data/jenkins/workspace/srslte_ogt_manual_zmq/srsLTE/srsenb/src/phy/lte/sf_worker.cc:208
    #4 0x564b199f8db4 in
2021-01-03 21:46:41 +01:00
Ismael Gomez f9a02299f9 Use MAC PDU pointer instead of tti_rx and rnti as a key to associate buffers. Decouple crc_info() and push_pdu() functions. This allows for different timing architectures in the PHY 2020-12-16 13:49:29 +01:00
faluco f20b75a05f Re-structure enb metrics a bit. Create a generic mac metric struct and per ue mac metrics struct. 2020-12-14 13:16:13 +01:00
faluco 5529943172 Add a per sector rach preable counter for the metrics. 2020-12-14 13:16:13 +01:00
Francisco b71e8075f4 Refactoring of scheduling algorithms
- Use single interface for both DL and UL
- Wrote helper functions for tasks that are common to different algorithms
- created subfolder for all scheduling algorithms
2020-12-12 15:59:26 +01:00
Andre Puschmann 07d2bc4fe8 change license header to agnostic version with hint to root LICENSE file 2020-12-12 15:59:25 +01:00
Francisco eae0dc93ad rename scheduler files. scheduler -> sched 2020-12-12 15:59:25 +01:00
Francisco 68eda336bd remove ENB_METRICS_MAX_USERS compile time macro and use run-time variable to set maximum number of UEs the srseNB can have connected at a given instant. 2020-12-12 15:59:25 +01:00
yagoda bdc1964335 consolidating RRC eMBMS configuration into single function, setting some parameters to const 2020-12-12 15:58:34 +01:00
yagoda b90574975b refactoring asn1 eMBMS code, removing asn1 from PHY and MAC in eNodeB 2020-12-12 15:58:34 +01:00
Francisco Paisana 26f46ea067 add S1 Handover Request handling in target eNB 2020-08-14 14:28:56 +01:00
Francisco Paisana 5e06430455 removal of stack handler interface 2020-07-13 11:19:25 +01:00
Francisco Paisana 039977aeb5 renamed interfaces 2020-07-13 11:19:25 +01:00
Francisco Paisana 2cb80f9bf3 remove rnti in mac/phy in staged manner. First the "upper mac", and then the "lower mac" and phy 2020-06-26 11:59:06 +01:00
Ismael Gomez 493b7ea2da Remove SNR threshold based link failure detection 2020-06-25 22:57:31 +02:00
Andre Puschmann a0e4b18507 enb_mac: pre-allocate UE object for quicker PRACH/RAR handling
we've seen long delays in handling PRACH on low-power devices
such as the RPi4. This was mainly caused by long delays
in creating the UE object on the fly during PRACH handling.

This patch pre-allocates one UE object that is then used
during the PRACH.
2020-05-25 13:12:19 +02:00
faluco 7ff251f112 - Fixed warnings caught by Clang 9.0.0 2020-05-07 10:10:24 +02:00
Francisco Paisana 0526ae8ab1 updated rrc mobility parsing. added some utility methods 2020-04-22 12:57:11 +01:00
Francisco Paisana 64557740fc use mac_buffer_state interface to schedule CEs in scheduler 2020-04-22 11:34:08 +01:00
Francisco Paisana d183d64409 added allocate_rnti method to mac. Useful both during PRACH and handover UE resource allocation 2020-04-22 11:34:08 +01:00
Francisco Paisana c661025cda fix log tti, and print a warning when the ul_harq tti does not match existing ones 2020-04-01 15:02:21 +01:00
Ismael Gomez 7a7385d0e5 Support multiple carriers for common buffers (RAR/BCCH/PCCH) 2020-03-24 16:47:33 +01:00
Francisco Paisana a2866f661b made the number of ue payload allocations proportional to number of active carriers. Made mac::ue_db use unique_ptrs 2020-03-23 14:49:17 +00:00
Francisco Paisana 82cb6baef0 now the whole ue and enb mac uses the logmap 2020-03-20 11:32:03 +00:00
Xavier Arteaga ada8772f57 Initial srenb TA compensation 2020-03-17 17:21:43 +01:00
Xavier Arteaga e832769ae6 Updated copyright 2020-03-16 11:26:06 +01:00
Andre Puschmann a8acd235f6 extend eNB MAC to support multiple CC per UE
- add tx/rx softbuffers for each CC that a UE might have
- make sure to call assign correct buffers when iterating
  over the CC for UL/DL grant assignment
2020-03-11 10:16:23 +01:00
Andre Puschmann 2edecea33e fix SIB transmission for CA
Avoid double buffering of SIBs in MAC as this would require one buffer for each CC.
Instead, use byte_buffer managed by RRC that contains packed SIBs to avoid
double memcpy for each SIB tx. Only use MAC provided buffer in error case.

Also avoid MAC calling RLC for each SIB and call RRC directly.
2020-03-09 14:18:09 +01:00
Andre Puschmann 120ad76c63 refactor cell param handling and fix SIB transmissions
- move cell specific eNB params to cell list in rr.conf
- make sure DL EARFCN and DL freq can be used to manually overwrite a single cell config
- fix SIB packing and transmission for multi cell configs
- introduce cell list to MAC
- adapt default enb.conf.example and rr.conf.example
2020-03-06 16:20:44 +01:00
Xavier Arteaga da701cd82b SRSENB: Added PUSCH TA and EVM measurement. Some more PHY cleanup. 2020-03-06 13:58:49 +01:00
Francisco Paisana fed06138b9 moved rach_detected to stack thread. Created a more friendly interface to enqueue tasks in stack 2020-03-03 21:03:21 +00:00
Xavier Arteaga b45223c880 Fix minor MAC Clang warnings 2020-03-02 12:19:09 +01:00
Francisco Paisana d831522692 addition of SCell Activation CE Cmd to scheduler and MAC 2020-02-14 21:49:01 +00:00
Xavier Arteaga 385102fa2d SRSENB: minor format, renaming and interface changes 2020-02-13 10:29:00 +01:00
Xavier Arteaga 231431f569 SRSENB: enabled CA PUCCH decode in eNb 2020-02-13 10:29:00 +01:00