Commit Graph

2808 Commits

Author SHA1 Message Date
faluco 62faef7c71 - Replaced all uses of the log::console method. 2020-09-29 17:38:13 +02:00
faluco 302f9793ca - Add common utils to print to stdout and stderr as a first step to remove the log::console method. 2020-09-29 17:38:13 +02:00
Andre Puschmann 58ce9d3959 pdcp: adding basic test to check if control PDUs are handled correctly
use a 3 B long status PDU to check if its dropped from the rx'ing entity
2020-09-29 15:29:04 +02:00
Andre Puschmann 795db30338 pdcp: drop PDCP control PDUs
this patch adds a check to drop all PDCP control PDUs
in order to prevent handling them as data PDUs.

This could happen when the size exceeded the arbitrary length check.

This should fix #1787
2020-09-29 15:29:04 +02:00
Sylvain Munaut 2890bd07ea liblte_mme.h: Adjust LIBLTE_MME_PACKET_FILTER_MAX_SIZE for IPv6
Original was 20 but TS 24.008, section 10.5.6.12 specifies a max
of 60 for ipv6 packet filter
2020-09-28 16:08:28 +02:00
Xavier Arteaga d375e305ec Initial NR DMRS for PDSCH 2020-09-25 11:28:04 +02:00
Ismael Gomez 76bfc78147
Fix issues with Sounding-RS (#1761)
* Fix deadlock caused by update_measurements calling in_sync

* Fix overlapping SRS condition

* Do not use shortened PUSCH in transmissions and retx from RAR

* Revert "Fix deadlock caused by update_measurements calling in_sync"

This reverts commit f58c8c8c766f8f95baa3a3bf8287d8e25b2057ba.
2020-09-24 22:25:24 +02:00
Pedro Alvarez 86f4d469c6 Added some functions to save and restore AS keys for the case of failed handover in the USIM 2020-09-24 13:30:08 +01:00
Ismael Gomez b94d24ed98
Take into account CRS from neigbhour cells when measuring interference (#1757)
* Take into account CRS from neigbhour cells when measuring interference

* fix std::isnormal compilation

* Fixed compilation of test

* Address comments

* Remove unused overrides
2020-09-23 21:46:03 +02:00
Xavier Arteaga 236ef4378d Fix u32 parsing 2020-09-23 14:16:52 +02:00
Xavier Arteaga ede58319ae Vector: added conjugate complex float to short 2020-09-23 09:06:03 +02:00
Xavier Arteaga 8566cbb079 Added device name to prach_test_usrp 2020-09-23 09:06:03 +02:00
Xavier Arteaga 60d563aa06 Fix ringbuffer read conversion 2020-09-23 09:06:03 +02:00
Xavier Arteaga eb5210dbda Radio stops Rx stream prior to stop and benchmark prompts RF metrics 2020-09-23 09:06:03 +02:00
Xavier Arteaga de0501cc55 Fix radio benchmark 2020-09-23 09:06:03 +02:00
Xavier Arteaga c20d4ff5cc Added ringbuffer zerocopy a timeout 2020-09-23 09:06:03 +02:00
Xavier Arteaga 759719ad55 Improved RF helper 2020-09-23 09:06:03 +02:00
Andre Puschmann 1afc137032
[REBASE] Make PHY non-blocking and fefactor HO procedure (#1753)
* Make PHY non-blocking and fefactor HO procedure

* makes entire PHY non-blocking through command interface
* adds dedicated queue for cell_search/cell_select commands
* refactor HO procedure to run faster, in one stack cycle. Looks closer to the specs
* force ue to always apply SIB2 configuration during reestablishment
* Run update_measurements in all workers

Co-authored-by: Ismael Gomez <ismagom@gmail.com>
2020-09-22 21:47:16 +02:00
faluco c1e680769c - Remove stray code left behind. 2020-09-22 18:00:50 +02:00
faluco f604506858 - Fixed missing initialization issues in nas that caused several jumps in liblte_mme to use uninitialized memory.
- Fixed missing initialization in spgw that caused recvfrom to use an unitialized argument.
2020-09-22 18:00:50 +02:00
faluco f0d651ae8e - Fixed a leak in the MME class not releasing the static byte buffer pool.
- Now the pool gets destroyed on program exit using a unique_ptr.
- Removed manual cleanup() calls in all the code base to free the pool instance.
2020-09-22 18:00:50 +02:00
Francisco Paisana dcf5a727f2 do not send RRC release in case the eNB receives a S1AP UEContextRelease command and the UE is doing handover. Handle GTPU end marker 2020-09-22 16:51:45 +01:00
faluco b892da0294 - Calculate the FFT of the PRACH on demand.
- Fixed a PRACH test that was failing with ASAN.
2020-09-21 09:50:20 +02:00
Xavier Arteaga 8cb3945886 SRSUE: fix RV assertion for PUSCH 2020-09-17 22:39:56 +02:00
Xavier Arteaga 44c2412be2 SRSUE: silent PUSCH encoding error by dropping invalid grant 2020-09-17 22:39:56 +02:00
Andre Puschmann 9dd02af15c network_utils: lower verbosity of when socket connection fails
the network helper can log this event but it should be up to
the caller to decide whether this is an error or not.
2020-09-16 13:41:32 +02:00
Andre Puschmann 6dc7841369 epoll_helper: move code to block OS signals into own helper function
before epoll can handle signals, the calling thread needs to block
them. the blocking needs to happen before any other threads get
spawned so they inherit the mask.
2020-09-14 21:20:00 +02:00
Andre Puschmann 33c050791f pdu: add missing to_string() content for MAC SCH PDU subheaders
* add both scell activation CE
* add rnti to CRNTI and CONT RES CE
2020-09-14 20:09:46 +02:00
Xavier Arteaga 1d71cf8557 Avoid zero division 2020-09-10 11:11:46 +02:00
faluco 5e8a4c898d
Bring back the circular array object. (#1712) 2020-09-09 17:16:47 +02:00
Andre Puschmann 6a56476b2a rlc: increase RLC Tx SDU queue
the Tx SDU has been set to 128 PDUs because this gives approx.
150kByte UL buffer state (max value for Rel 8 BSR).

Previously, however, we've always reported too much pending UL
data because we weren't subtracting the transmitted data from
the reported data.

with this newer BSR reporting, however, even with full buffers we would
never report full buffers because the queues size is too short.

This seems to cause issues for iperf TCP sessions not resulting
in full DL rate, see isse #1703. It seems that the TCP bandwitdh
probing works better with larger buffers (in our case this can
only be achieved with more PDUs in the pool).

This should fix #1703
2020-09-08 22:27:21 +02:00
Andre Puschmann 569d8ee860 rlc: remove unused macro
this seems to be a legacy copy of the RLC_TX_QUEUE_LEN macro
in rlc_interfaces_types.h
2020-09-08 22:27:21 +02:00
faluco 1860006203 - Fixed leaks in prach module spotted by asan. 2020-09-08 17:26:50 +02:00
Andre Puschmann e80aa0a553 add circular array class to simplify access to truly circular arrays 2020-09-07 15:56:48 +02:00
yagoda 24574caf44 cleaning up the PRACH time offset calculation 2020-09-07 14:56:12 +01:00
yagoda b5a8d82058 -adding more prach tests to make test, removing some variables from stack
-PRACH time offset to TA unit conversion
2020-09-07 14:56:12 +01:00
yagoda 59082770d3 moving some arrays to the heap, fixing formatting, setting dft norm 2020-09-07 14:56:12 +01:00
yagoda f6ea431555 -adopting new PRACH equalization approach for successive cancellation
-adding frequency domain time offset detection
-adding to testing of PRACH
2020-09-07 14:56:12 +01:00
yagoda ec7873e7cc refactoring PRACH, adding phase correction to successive cancellation 2020-09-07 14:56:12 +01:00
yagoda 4d8888aae6 - adding simple successive cancellation to PRACH detection
- adding testing for same and for offset detection
2020-09-07 14:56:12 +01:00
Ismael Gomez 1bd3e76f98 Move unncessary buffer in radio 2020-09-07 15:10:22 +02:00
Ismael Gomez c4080e35cc Set different timestamp behaviour for X300 and B200 2020-09-07 15:10:22 +02:00
Pedro Alvarez 08a0d6bc0a Fix compilation warning with unecessary comparison. 2020-09-07 13:10:08 +01:00
Ismael Gomez f49fbd6d02
Fix the order of HO/reest measurement actions (#1696) 2020-09-04 12:18:12 +02:00
Andre Puschmann d48bc8837e pdu: refactor MAC PDU class
this patch refactors the MAC PDU class, the main changes are:

* add to_string() method to pretty print PDU and subheaders
  This allows to have a single log entry per MAC PDU with all its
  contents.
  It removes the C-style fprint() method

* Simplity payload vs. w_payload_ce
  Before we've used payload when reading the PDU and w_payload_ce
  as a buffer when writing. In all getters we needed to differentiate
  between both. Now payload points to w_payload_ce initially and is
  only updated when parsing a new PDU.

* add various helpers, e.g. to get subheader index, update a BSR, ..

* fix PDU test to use new to_string() method
2020-09-03 15:00:36 +02:00
Ismael Gomez 54eed11e1d Refactor decision for extended CSI/SRS 2020-09-03 10:45:06 +02:00
Ismael Gomez c9daf1f61a Make const args 2020-09-03 10:45:06 +02:00
Ismael Gomez e2154d2213 Renamed constants to SRSLTE and use SRSLTE_CFI macros 2020-09-03 10:45:06 +02:00
Ismael Gomez 38e2ffe414 Use Format1A when using CA and 15 PRB due to DCI size ambiguity 2020-09-03 10:45:06 +02:00
Ismael Gomez 51521ad8e4 Improved PDCCH blind search and fixed a few issues with ambiguous DCI size with Release 10 2020-09-03 10:45:06 +02:00
faluco db03275337 - Fix compiler errors when trying to build the project without SIMD support. 2020-09-02 12:35:18 +02:00
faluco 12e82a947f
LTO compiler and linker fixes (#1676)
* Guard the LTO feature in a CMAKE option and document possible issues of using it.
2020-09-02 09:21:56 +02:00
Xavier Arteaga af8898943f SRSENB: implement console cell_gain command
SRSENB: fix 5GNR compilation

SRSENB: fix override methods
2020-09-01 09:37:52 +02:00
Xavier Arteaga 1f18e8a054 SIMD: frequency estimate optimization 2020-08-31 16:44:19 +02:00
Xavier Arteaga bf1b7b8527 SIMD: fix NEON compilation 2020-08-31 16:44:19 +02:00
Ismael Gomez 0afcea9d61
Do not allow empty TBS PUSCH. Account for CQI from inactive cells before activated. (#1667) 2020-08-31 12:53:18 +02:00
Francisco Paisana 92221eb780 update of rrc_interface_mac to remove signal from mac to rrc that RA failed in case of handover failure 2020-08-29 20:06:08 +01:00
Xavier Arteaga 080543815f Solved compilation warnings and enb_phy_test stop 2020-08-28 11:36:44 +02:00
Xavier Arteaga b8f4d03979 Fix in SIMD frequency estimation 2020-08-28 11:36:44 +02:00
Xavier Arteaga 611dd67364 SRSENB: PUCCH TA measurement only available with detected PUCCH 2020-08-28 11:36:44 +02:00
Xavier Arteaga 87edafeddb Reduced SRS test cases to SF index 0 2020-08-28 11:36:44 +02:00
Xavier Arteaga ee6f24befe Optimize vector frequency estimation 2020-08-28 11:36:44 +02:00
Xavier Arteaga bc0aba0d8a SRSENB: calculate TA from PUCCH messages 2020-08-28 11:36:44 +02:00
Andre Puschmann 49a7a90698 mac: simplify BSR packing logic
simplify logic to check whether a BSR fits and, if so, which type.
before the check has been done in two places.

we now also accomodate for the CE subheader size.
2020-08-27 23:46:28 +02:00
Andre Puschmann 96c911752c pdu: add test case for issue #1649
testcase checks the correct handling of the remaining PDU space
when a long BSR is added but no space is left in PDU to fit it
2020-08-27 23:46:28 +02:00
Xavier Arteaga 1843c9efbc SRSENB: PUCCH TA measurement only available with detected PUCCH 2020-08-27 09:31:05 +02:00
Xavier Arteaga 3aec23f7d8 SRSENB: calculate TA from PUCCH messages 2020-08-27 09:31:05 +02:00
Xavier Arteaga df2c949417 Radio: add individual Rx gain and integrate in srsue
Fix compilation

Fix compilation

Add missing variable. Wasn't compiling

Radio: revert some changes
2020-08-27 09:31:05 +02:00
Xavier Arteaga 04d7267734 UHD: Force LO frequency option 2020-08-27 09:31:05 +02:00
Xavier Arteaga b3d66c98c3 SRSENB: tx gain per channel and fix bug 2020-08-27 09:31:05 +02:00
Andre Puschmann 3f02e56a1e uhd: do not stop rx_stream when setting rx_rate for the B210
with the B210 and 2 RF ports, i.e. MIMO mode, we have stopped the
Rx stream after changing the rx_samp_rate but didn't start it again.

Either the issue doesn't exist in SISO mode or we never saw it but for MIMO
it can be reproduced easily with rate changes during streaming, i.e.:

$ ./lib/src/radio/test/benchmark_radio -p 2 -t 10 -x -y -s 23.04e6
Instantiating objects and allocating memory...
Initialising instances...
Opening 2 channels in RF device= with args=default
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [LOGGING] Fastpath logging disabled at runtime.
Opening USRP channels=2, args: type=b200,master_clock_rate=23.04e6
[INFO] [B200] Detected Device: B210
[INFO] [B200] Operating over USB 3.
[INFO] [B200] Initialize CODEC control...
[INFO] [B200] Initialize Radio control...
[INFO] [B200] Performing register loopback test...
[INFO] [B200] Register loopback test passed
[INFO] [B200] Performing register loopback test...
[INFO] [B200] Register loopback test passed
[INFO] [B200] Asking for clock rate 23.040000 MHz...
[INFO] [B200] Actually got clock rate 23.040000 MHz.
[INFO] [MULTI_USRP]     1) catch time transition at pps edge
[INFO] [MULTI_USRP]     2) set times next pps (synchronously)

Warning: TX gain was not set. Using open-loop power control (not working properly)

Setting manual TX/RX offset to 0 samples
Start capturing 10000 frames of 23040 samples...
Changing sampling rate to 23.04 Msamps/s
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 1.92 Msamps/s
Setting manual TX/RX offset to 0 samples
/home/anpu/src/srsLTE/lib/src/phy/rf/rf_uhd_imp.cc.1211: Error timed out while receiving samples from UHD.

/home/anpu/src/srsLTE/lib/src/phy/rf/rf_uhd_imp.cc.1211: Error timed out while receiving samples from UHD.

/home/anpu/src/srsLTE/lib/src/phy/rf/rf_uhd_imp.cc.1211: Error timed out while receiving samples from UHD.

/home/anpu/src/srsLTE/lib/src/phy/rf/rf_uhd_imp.cc.1211: Error timed out while receiving samples from UHD.

/home/anpu/src/srsLTE/lib/src/phy/rf/rf_uhd_imp.cc.1211: Error timed out while receiving samples from UHD.
2020-08-26 17:22:35 +02:00
Andre Puschmann 7253efe17e rf_blade: fix memleak when device wasn't found 2020-08-26 17:22:35 +02:00
Andre Puschmann 9684b2a63a uhd: fix memleak when USRP wasn't found 2020-08-26 17:22:35 +02:00
Andre Puschmann c327a18f59 radio: fix memleak of dummy buffers 2020-08-26 17:22:35 +02:00
Ismael Gomez 59b9125d4e
Do not send time_spec in between the burst. X300 does not like it (#1583) 2020-08-26 11:21:29 +02:00
Ismael Gomez a4835dd2c8
More accurate MCS reduction when PUSCH carries UCI (#1630) 2020-08-25 22:30:35 +02:00
Xavier Arteaga bd46c40650 srsLTE: fix minor aesthetics 2020-08-25 16:19:52 +02:00
Xavier Arteaga 7bad21c30a Radio: added locks to protect sample rate change concurrent access 2020-08-25 16:19:52 +02:00
Xavier Arteaga 029f36b449 srsLTE: added efficient integer resampler and srsue/srsenb integration 2020-08-25 16:19:52 +02:00
Francisco Paisana 834c0b3929 integrated new observer pattern into phy controller fsm 2020-08-24 22:10:32 +01:00
Francisco Paisana 48dd436d86 integrated observer pattern into rrc phy ctrl fsm 2020-08-24 22:10:32 +01:00
Francisco Paisana b2313e3631 observer pattern classes. Allows auto and explicit dispatch, and specifying which trigger method to use of an observer. 2020-08-24 22:10:32 +01:00
Xavier Arteaga 0e96ef3df0 Channel emulator takes SNR as input parameter 2020-08-24 10:46:11 +02:00
Andre Puschmann 9149cf852d rf_uhd: fix rx timeout error after late with B210
it fixes #1623.

this happens more often with MIMO since lates are more likely here.

after a late, the Rx stream must not be stopped on the B2xx either.

<log>
RF status: O=3, U=0, L=1
/home/anpu/src/srsLTE/lib/src/phy/rf/rf_uhd_imp.cc.1209: Error timed out while receiving samples from UHD.

stop rx stream
./home/anpu/src/srsLTE/lib/src/phy/rf/rf_uhd_imp.cc.1209: Error timed out while receiving samples from UHD.

stop rx stream
/home/anpu/src/srsLTE/lib/src/phy/ue/ue_sync.c.775: Error receiving samples

/home/anpu/src/srsLTE/lib/src/phy/ue/ue_cell_search.c.312: Error calling srslte_ue_sync_work()

/home/anpu/src/srsLTE/lib/src/phy/ue/ue_cell_search.c.272: Error searching cell
</log>
2020-08-21 15:28:08 +02:00
Andre Puschmann 5e40bfe72c mac_pdu: unpack and print BSR index as well as BSR value in bytes
before the BSR was extracted but the actual index (between 0 and 63)
was not stored but directly converted into bytes.

for log parsing and debugging it is easier to follow the index
value. this patch therefore adds both values to the log message
and extends the API accordingly.
2020-08-21 12:03:07 +02:00
Andre Puschmann 55336665b9 rlc: remove timers and sdu queue length from RLC TM ctor
timers aren't used in RLC TM, also the default queue length is
fine to be used at all times.
2020-08-21 12:03:07 +02:00
Francisco Paisana bb5dd92dca implemented s1 handover cancellation procedure to force the target enb to release the ue ctxt 2020-08-21 00:05:58 +01:00
Francisco Paisana 8c9e596f89 refactored s1ap handover request interface. cleaned up rrc tenb s1 handover code 2020-08-21 00:05:58 +01:00
Andre Puschmann 8e44d0504c radio: fix device mapping for mimo
commit #51c6e8d1 introduced a regression in which the 2nd antenna
port was never considered. All MIMO ZMQ based tests therefore failed.
this fixes #1608
2020-08-19 15:39:13 +02:00
Xavier Arteaga 710700d0eb SRSUE: Fix synch error correction for multiple channels 2020-08-19 15:39:13 +02:00
Andre Puschmann d5da4bd8b6 radio: fix printf for 32bit 2020-08-19 11:57:04 +02:00
Francisco Paisana 7cd4f45d62 fsm refactor.
- avoid triggering directly a subfsm
- improved metafunctions
- other cleanups
2020-08-18 16:07:21 +01:00
Francisco Paisana 5d1343fe75 implemented S1 bearer status transfer 2020-08-18 13:55:17 +01:00
Francisco Paisana db8af399f8 extended rrc tenb s1 handover test. implemented layer reconfig during s1 handover 2020-08-18 13:55:17 +01:00
Francisco Paisana 7605c7df23 added s1ap handover notification, fixed s1ap asn1 bug, and fixed bad fields for admitted erabs in ho req ack 2020-08-18 13:55:17 +01:00
Francisco Paisana 841b884796 remove extern C flags from common_helper.h 2020-08-18 13:54:23 +01:00
Francisco Paisana a2b8bc9e0a check all cpus scaling governor 2020-08-18 13:54:23 +01:00
Francisco Paisana 5be5409f62 scaling governor function moved to common header file 2020-08-18 13:54:23 +01:00
Francisco Paisana 9146e6ddf1 change method name to resize intervals 2020-08-14 15:06:06 +01:00
Francisco Paisana 4457bbda7e added new asserts to interval interface 2020-08-14 15:06:06 +01:00