Commit Graph

1408 Commits

Author SHA1 Message Date
Ismael Gomez 0780f3caea pdu_queue must be non-blocking in order to avoid the ue or enb to block in the event of a memory leak and the buffer pool running out of buffers. In that case, the null return shall be handled properly and error logged. This commit restores commit c4c44c33f4. 2021-01-16 15:22:29 +01:00
Francisco Paisana 5391001c46 remove unused variable 2021-01-15 23:24:39 +01:00
Francisco Paisana d4242f2db7 precompute nof_re_table[sf][prb][slot][cfi] for faster nof_re computation and for more accurate lower bound nof_re computation 2021-01-15 23:24:39 +01:00
Francisco Paisana d0a17b0a40 created sched_ue_cell class that is indexed based on enb_cc_idx 2021-01-15 23:24:39 +01:00
Francisco Paisana 8b306c81e2 refactor tbs/mcs computation in sched 2021-01-15 11:36:59 +01:00
Francisco Paisana 32c47d4fac change sched warning when it fails to fit srb0 data in grant to info 2021-01-15 11:36:59 +01:00
Francisco Paisana 1dd211c91c fix log initialization in sched_helpers.cc 2021-01-15 11:36:59 +01:00
Francisco Paisana afef5188a6 move sched_harq to subfolder 2021-01-15 11:36:59 +01:00
Francisco Paisana 233e604cfe cleanup sched_ue, moving some unrelated functions to sched_helpers 2021-01-15 11:36:59 +01:00
Francisco Paisana 7e6744037c fix error check in ue addition 2021-01-15 00:10:42 +01:00
Francisco Paisana 9c7c190074 when the rrc fails to allocate the ue cell resources, it should erase the ue from all stack layers 2021-01-15 00:10:42 +01:00
Andre Puschmann eb515c5205 enb,mac: check return value when packing RAR PDU
this make sure that we only send valid MAC PDUs in the DL.
2021-01-13 20:39:09 +01:00
Francisco Paisana 0d9ff3ecc7 fixed RBG<->PRB conversion. Changed PHICH logging to be single line 2021-01-13 17:41:45 +01:00
Francisco Paisana 68e7df1248 allocate PUCCH resources in RRC UE only in case UE CA is activated 2021-01-13 17:30:38 +01:00
Ismael Gomez a360580999 Run PRACH workers before cc_workers fixes memory corruption when PRACH workers run in foreground (eg in ZMQ) 2021-01-12 21:30:57 +01:00
Francisco Paisana 0761a8f08b Add RLF-Report handling functions to srsENB 2021-01-12 20:40:39 +01:00
Francisco Paisana 434bdfca68 decoupled srsenb rrc ue mac controller from the rrc::ue class 2021-01-12 18:16:03 +01:00
Francisco Paisana f8b7351e1b implementation of object memory pool via class-specific operator new/delete 2021-01-12 16:22:10 +01:00
Francisco Paisana 8912a8ce6c added extra comments to memory pool code. generalized object pool to mutexed and non-mutexed cases 2021-01-12 16:22:10 +01:00
Francisco Paisana 768a4fa627 added growth policy for rrc::ue memory pool. Fixed memory leak 2021-01-12 16:22:10 +01:00
Francisco Paisana a73cbcdc9d added mem_pool for growing object pools. Applied the mem pool to the rrc::ue creation 2021-01-12 16:22:10 +01:00
Francisco Paisana 9883dc2171 remove warning when RAR fails to allocate in a given TTI due to lack of space 2021-01-12 15:49:34 +01:00
Francisco Paisana bc8e65c82f bug fix in the PF scheduler. The correct history was not being stored for newtxs 2021-01-12 15:49:34 +01:00
Andre Puschmann 02b0f251aa prach_worker: move variable to function body
the variable was only used inside the run_tti() function
and isn't needed elsewhere. refactor therefore.
2021-01-11 15:45:48 +01:00
Francisco Paisana 02d4dde1f5 issue 2170 fix: add extra check that UL harq is empty before allocating it 2021-01-11 15:36:12 +01:00
Francisco Paisana f45d31d899 add fairness coefficient to UL. 2021-01-11 11:56:13 +01:00
Francisco Paisana ea8ad153c4 add configurable fairness parameter to pf scheduler 2021-01-11 11:56:13 +01:00
Francisco Paisana 2abe486e18 separate control loops for PUCCH and PUSCH TPC 2021-01-06 22:14:46 +01:00
Andre Puschmann f0138d45fe srsenb,phy: fix setting of PHY log level
same regression that was fixed for the UE in 52da9eb46f
2021-01-04 21:03:21 +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
Xavier Arteaga b3200d9ef5 Renaming common UL/DL DMRS related types and initial NR PUSCH implementation 2020-12-30 13:39:08 +01:00
Andre Puschmann d0d7ab4662 srsenb: log cell gain updates
add a logline in info whenever the user updates the cell individual
gain. Note that this log happens before checking whether the
cell even exists and can be updated. This is mainly because
phy_common doesn't have an own logger object.
2020-12-28 21:21:44 +01:00
Xavier Arteaga 909e5de34f Fix NR workers 2020-12-28 10:11:08 +01:00
Ismael Gomez 6348ddefd5 Add option to run prach_worker in the caller thread instead of by a background worker. This is useful when running simulations with ZMQ, to avoid the prach worker to take too much time and miss the RAR deadline 2020-12-26 23:49:42 +01:00
Francisco Paisana 9de318c7e6 avoid allocating DL harqs when respective acks are still pending, when there is a reordering of ttis in the phy 2020-12-21 17:23:26 +01:00
faluco 92b11c1adb Backport misc changes from the fapi repo. 2020-12-21 13:45:22 +01:00
faluco 88611fe0ab Added the latency and buffered bytes bearer metrics. 2020-12-18 14:44:59 +01:00
faluco d3964c70ea Dump to the json reporter the missing bearer metrics. 2020-12-18 14:44:59 +01:00
Francisco Paisana 66aa34d173 update RRC NR ASN1 to 2020-09 v15.11 2020-12-18 12:50:37 +01:00
Pedro Alvarez 0c20b7a455 Added support for S1AP modify bearer request support. This includes:
- Handle received E-RAB S1AP at s1ap.cc.
 - Added methods to rrc.cc, rrc_ue.cc and rrc_bearer_cfg.cc to handle erab modify request.
 - Made RLC add_bearer() function capable of re-creating the RLC entity.
 - Send RRC reconfiguration to the UE and reply to the EPC with S1AP
   modify bearer response.

This commit also adds support to srsEPC to send S1AP modify bearer request for
testing purposes.
2020-12-18 10:52:51 +00:00
Francisco Paisana 099dad8cb1 disable PHR handling in the UL sched by default 2020-12-17 17:56:42 +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
Ismael Gomez 0498439d41
Backport some changes from FAPI branch (#2124)
* Reorder DCI FORMAT enum

* Fix endianness issue

* Fix return codes in phy_ue_db

* Log members should be destructed after the layers.

* Add JSON metrics and Events. Add Alarm log channel. Simplify MAC metrics struct.

* Restore metrics_stdout change
2020-12-16 13:48:48 +01:00
Francisco Paisana 1304746bce use of fmt lib in asn1 utils 2020-12-15 15:56:59 +01:00
Francisco Paisana 7869c66fb7 avoid overwriting phy config ul64qam config for scell 2020-12-15 12:24:17 +01:00
Francisco Paisana 442843e276 enb metric bound check. Fix of heap-buffer overflow issue 2020-12-14 17:12:17 +01:00
Francisco Paisana 82eb31f70f add rlc metrics to enb 2020-12-14 16:59:09 +01:00
Francisco e2654e69ec Enable pdu stack latency measurements in the eNB. 2020-12-14 13:47:05 +01:00
Francisco b0a7506a8a add extra check to verify if erab is still available for rrc metric extraction 2020-12-14 13:16:13 +01:00
faluco 8c42ec26c3 Fix error in previous rebase from dev. 2020-12-14 13:16:13 +01:00