Commit Graph

7220 Commits

Author SHA1 Message Date
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
Andre Puschmann dadff1a947 pdu: default initialize pdu members with MAC log
MAC PDUs are default logged using the MAC log. So this gives
hex prints, etc. without having to manually set the logger for each
PDU.
2021-01-12 20:24:20 +01:00
Andre Puschmann fcf481b83e pdu: add check when unpacking MAC PDUs to not read beyond PDU length
we've checked the same when unpacking the subheaders but missed the
case where the payload was read beyond the PDU length, as has been
seen with a malformed RAR PDU.
2021-01-12 20:24:20 +01:00
Andre Puschmann 10da7df194 pdu_test: add TC with malformed RAR PDU
a malformed RAR PDU should not be decoded further if the payload
indicates a length beyond the actual PDU size.
2021-01-12 20:24:20 +01:00
David Rupprecht a89477a805 Hardcoded Samsung caps can be activated with if 1 in rrc_nr.cc 2021-01-12 20:23:35 +01:00
David Rupprecht bc2e230461 Enable UM mode for Amarisoft 2021-01-12 20:23:35 +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 2866886ade fix gcc4.8 compilation issue 2021-01-12 16:22:10 +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 ea74ca67eb resolve forward declaration compilation issue in memory pool 2021-01-12 16:22:10 +01:00
Francisco Paisana e96b8c263a add mem pool test. fix mem pool leak bug 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
David Rupprecht da0e64c51a Add non_crit_ext for irat parameter 2021-01-12 11:07:52 +01:00
Andre Puschmann 78b07daf3b pcap: make public interfaces thread-safe and handle fopen returning nullptr
the previous patch only introduced a thread-safe queue between
PHY workers (writers) and PCAP writer thread (consumer).

However, it is also required to protect the ctor (and close()) to
prevent corrupted PCAP files.

The patch also correctly handles the case where the PCAP couldn't
be openend for writing and doesn't start the thread.
2021-01-11 15:45:48 +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
David Rupprecht ffe513415c stop gw in srsue nas test 2021-01-08 17:20:31 +01:00
David Rupprecht 1a10c783b5 Faking measurements 2021-01-08 17:20:08 +01:00
David Rupprecht f7d313147a Added infrastrukture for measurements
Init rrc_nr as part of the LTE stack
2021-01-08 17:20:08 +01:00
David Rupprecht 4305929ec7 Hardcoded NR/MRDC-Capabilities 2021-01-08 17:20:08 +01:00
David Rupprecht b79eef0860 Introducing nr_rrc <-> rrc interface for eutra and nr cap query 2021-01-08 17:20:08 +01:00
David Rupprecht 020d0dacc8 add the additional sec cap to NAS attach request
use same capabilities that are signaled for EUTRA
2021-01-08 17:20:08 +01:00
David Rupprecht 9eb0b72cb4 Added rrc function has_nr_dc 2021-01-08 17:20:08 +01:00
Andre Puschmann c02aa8f124 liblte_mme: add DCNR UE capabilties packing 2021-01-08 17:20:08 +01:00
Andre Puschmann 37fc1c59e3 fix DRB release logging
this caused wrong logs because the LCID was printed based on the assumption
that the DRB LCID is alwasy 2 + drb ID

Use drb_id as drb_cfg key
2021-01-08 17:20:08 +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 4fa89b7039 pcap: make PCAP write thread-safe
* offload PCAP writing to background thread
* use blocking_queue between writer and clients to make it thread-safe
* add basic test case

this fixes point 1-3 of #2161
2021-01-04 11:05:02 +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
Andre Puschmann 2ca894df01 pdu: fortify RAR packing
detected with ASAN trying to write negative number of padding bytes.

The patch checks the calculated length and returns with an error
if the length is negative.

=================================================================
==5759==AddressSanitizer: while reporting a bug found another one. Ignoring.
m==5759==ERROR: AddressSanitizer: negative-size-param: (size=-6)
2021-01-03 21:46:41 +01:00
faluco 63bd43fa52 Upgrade the swapping logic of the file sink to use the new srslog functionality. 2020-12-30 19:23:20 +01:00
Xavier Arteaga 54a864e021 Added Initial NR-PRACH configuration for preamble format 0 2020-12-30 17:46:00 +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
Xavier Arteaga cc5fdb68f3 Added on-the-fly sequence for bit packed 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
Andre Puschmann 52da9eb46f srsue,phy: fix setting of PHY log level
probably a regression from the new log system integration.
it was disabling PHY logs, from PRACH for example.
2020-12-28 21:21:44 +01:00
Andre Puschmann 3573644624 srsue: fix stdout metrics print when scells aren't configured yet
during MAC reset, scells are reset to and their PCI is set to UINT32_MAX
which results in malformatted stdout prints, see below:

Random Access Transmission: seq=16, ra-rnti=0x2
Random Access Transmission: seq=14, ra-rnti=0x2
 0   4   -24    24  -1.1u   1.0   140  0.50    0.0     0%   0.0   0.0    0.0    0.0    67%
 14294967295   0.0   0.0  -1.1u   0.0   0.0   0.0    0.0     0%   0.0   0.0    0.0    0.0     0%
 24294967295   0.0   0.0  -1.1u   0.0   0.0   0.0    0.0     0%   0.0   0.0    0.0    0.0     0%
 34294967295   0.0   0.0  -1.1u   0.0   0.0   0.0    0.0     0%   0.0   0.0    0.0    0.0     0%

this patch checks the configured PCI value against UINT32_MAX and
prints "n/a" in case the scells aren't set yet.
2020-12-28 21:21:44 +01:00
Xavier Arteaga 909e5de34f Fix NR workers 2020-12-28 10:11:08 +01:00