Commit Graph

2808 Commits

Author SHA1 Message Date
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
Francisco Paisana 8b174ce2f4 changed interval interface to disallow interval::stop < interval::start via an assertion 2020-08-14 15:06:06 +01:00
Francisco Paisana 39b380c8e0 fix compilation issue for gcc version < 5 2020-08-14 15:06:06 +01:00
Francisco Paisana 2f689372dd added missing header 2020-08-14 15:06:06 +01:00
Francisco Paisana c1755727d7 changed interval method names, and added comments and assertions 2020-08-14 15:06:06 +01:00
Francisco Paisana b2dd46ccad remove extra space in to_string 2020-08-14 15:06:06 +01:00
Francisco Paisana 20b69fb22e substitution of ul_alloc_t for prb_interval 2020-08-14 15:06:06 +01:00
Francisco Paisana 26f46ea067 add S1 Handover Request handling in target eNB 2020-08-14 14:28:56 +01:00
Francisco Paisana 857cc141c7 fix macro checking for exceptions, added missing includes, fixed bounded bitset methods' noexcept specifiers 2020-08-13 13:13:34 +01:00
Francisco Paisana cceeff10de moved expected, bounded_bitset, move_callback to adt folder. created a test for bitset 2020-08-13 13:13:34 +01:00
Francisco Paisana caf862c99f moved expected, bounded_bitset, move_callback to adt folder. created a test for bitset 2020-08-13 13:13:34 +01:00
Ismael Gomez 382811e10e
Update S1AP RNTI context when doing Reestablishment (#1582) 2020-08-12 23:48:20 +02:00
faluco 1253740da3 - Extracted traits from class to a detail namespace. 2020-08-11 19:47:26 +01:00
faluco 072e84cec8 - Simplified the usage of span now with implicit constructors as it should be.
- Added overload for generic containers that have size and data members like vector.
- Removed unnecessary uses of make_span.
2020-08-11 19:47:26 +01:00
faluco 158edd4fe7 Removed init list constructor test. 2020-08-11 19:47:26 +01:00
faluco eb4b2d4e43 - Added a clarification comment on why to use make_span.
- Moved byte_buffer utilities to common.h thus breaking the dependency of ADT to COMMON.
- Fixed compilation failures in tests.
2020-08-11 19:47:26 +01:00
faluco af8dfcf19c Extended a bit the span implementation with the following changes:
- Documented methods and class.
- Adapted interface to the latest standard: no init list and generic container constructors, new iterator pair ctor.
- Implemented some SFINAE for managing conversions in constructors.
- Re-organised some methods to be grouped by category (modifiers, observers, iterators, ...).
- Added convenience make_span functions.
- Added some more  asserts.
- Adapted test to use some syntax that was modified.
2020-08-11 19:47:26 +01:00
Francisco Paisana 76a62909c1 use of span type for universal array views 2020-08-11 19:47:26 +01:00
Francisco Paisana a9d882c1f1 fix task_scheduler_test. Fix potential reference invalidation in task_scheduler internal tasks data structure 2020-08-11 17:16:06 +01:00
Francisco Paisana 9d877e55b3 add test for when scope exit lambda is an lvalue 2020-08-10 17:23:43 +01:00
faluco 9e2a116e11 - Fix a missing template parameter in the constructor.
- Decay the type to the template.
- Switched member order to improve memory layout.
2020-08-10 17:23:43 +01:00
Francisco Paisana 0f67bee556 creation of a scope exit standalone file. Created a new folder ADT. Added test for scope exit. 2020-08-10 17:23:43 +01:00
Andre Puschmann cb2d7f4c16 rf_uhd_generic: add explicit ctor and dtor
clang 6 complained about a missing virtual dtor and thus
failed compilation. this patch adds both, an explicit ctor and dtor.
2020-08-10 10:42:54 +02:00
Andre Puschmann 498af989bf rf_uhd: add missing endl to UHD log macros 2020-08-06 22:42:48 +02:00
Xavier Arteaga 46ab07123d UHD: fix compatibility with 3.9.7 LTS 2020-08-06 22:42:48 +02:00
Andre Puschmann 5867668c0c rf_uhd_rfnoc: fix compilation for UHD before 3.15
the enable_rx_timestamps() for the radio_ctrl object has only been
introduced in Nov 2019 for UHD 3.15 and therefore needs
to be excluded when compiling for 3.14 and below.

Note: According to the original UHD commit in
67dbaa41f2 (diff-60a9387c0fc8406fd5b39fa995dd8c14)
it looks like the Rx timestamps are disabled by default
for UHD versions before 3.15

This commit fixes #1602
2020-08-05 13:05:29 +02:00
Xavier Arteaga 0cd61145ca RFNOC: added optional FPGA FIFO 2020-07-31 13:11:10 +02:00
Xavier Arteaga 237de07ab3 UHD: disable AD936x based device reset 2020-07-31 13:11:10 +02:00
Xavier Arteaga ff8925b6ec UHD: use same timeout policy than previous release 2020-07-31 13:11:10 +02:00
Xavier Arteaga ac76a398fe UHD: Minor stability improvement 2020-07-31 13:11:10 +02:00
Xavier Arteaga d2abaaf719 UHD: add initial test for AD936x based devices during initialization 2020-07-31 13:11:10 +02:00
Xavier Arteaga f80c779d88 RFNOC: added DUC/DDC internal loopback option and test 2020-07-31 13:11:10 +02:00
Xavier Arteaga dcf05f7a53 UHD: Improved RFNOC 2020-07-31 13:11:10 +02:00
Xavier Arteaga 38d9545e99 UHD: API improvement 2020-07-31 13:11:10 +02:00
Xavier Arteaga 405e0c8195 UHD: Check if tree exist before requesting access 2020-07-31 13:11:10 +02:00
Xavier Arteaga 5d43fc903e UHD: fix SPP equal 0 2020-07-31 13:11:10 +02:00
Xavier Arteaga 774c0926a6 UHD: added device args for log level, spp and return if timeout 2020-07-31 13:11:10 +02:00
Xavier Arteaga 88a1ab12c5 UHD: Generic detects if it a AD9361, USB based device and resets if LIBUSB_TRANSFER_ERROR is detected 2020-07-31 13:11:10 +02:00
Xavier Arteaga 04a661d239 UHD: RFNOC class detects custom DDC and DUC 2020-07-31 13:11:10 +02:00
Xavier Arteaga 180fb42dc3 UHD: minor aesthetic corrections 2020-07-31 13:11:10 +02:00
Xavier Arteaga 0f24d510ac UHD: Fix RFNOC DDC frequency calculator 2020-07-31 13:11:10 +02:00
Xavier Arteaga ebf995c621 UHD: better RFNOC detection and configuration 2020-07-31 13:11:10 +02:00
Xavier Arteaga 0e360b3953 UHD: RFNOC Dynamic re-configuration 2020-07-31 13:11:10 +02:00
Xavier Arteaga d9cb51d261 UHD: Added custom DDC/DUC support
UHD: Aesthetic corrections

UHD: minor aesthetic changes
2020-07-31 13:11:10 +02:00
Xavier Arteaga e4a794fdbd UHD: Initial RFNOC implementation
UHD: Fix RFNOC for multiple carriers
2020-07-31 13:11:10 +02:00
faluco cfd3f51931
Import of srslog into srsepc and srsenb. (#1574)
* - Import of srslog into srsepc and srsenb.
* - Removed logger_file and logger_stdout files.
2020-07-30 19:17:23 +02:00
Xavier Arteaga 21e9a3958f Minor changes 2020-07-28 09:31:34 +02:00
Xavier Arteaga 2271aec6b2 Radio: remove trace 2020-07-28 09:31:34 +02:00
Xavier Arteaga a5fefbfdd3 Radio: fix possible overflow 2020-07-28 09:31:34 +02:00
Xavier Arteaga 51c6e8d1a6 Radio: channel map includes device mapping, unmapped Rx uses dummy buffers 2020-07-28 09:31:34 +02:00
Xavier Arteaga 74fde5597f PDSCH_UE: added synchronization error to console 2020-07-28 09:31:34 +02:00
Xavier Arteaga edda1f730a srsLTE: Placeholder Band correction 2020-07-28 09:31:34 +02:00
Xavier Arteaga d8eaa99132 Radio: do not use more radios than necessary 2020-07-28 09:31:34 +02:00
Xavier Arteaga 5258f27490 Fix start-of_burst for PRACH Test USRP 2020-07-28 09:31:34 +02:00
Ismael Gomez dda91b14f7 Remove duplicate add_rnti() function since already done in set_config 2020-07-27 17:58:06 +02:00
Xavier Arteaga fda1d040e7 SRSENB: implement PUSCH threshold for UCI bits 2020-07-27 16:44:15 +02:00
faluco efdff8ba4c
Import srslog into srsue (#1556)
- Import the srslog project into srslte.
- Ported srsue app to use the new logging framework.
- Implemented a wrapper that dispatches log entries to srslog.
- Renamed an existing log test to be more specific to avoid name clashes.
2020-07-22 16:04:18 +02:00
Andre Puschmann d441486f76 fading: fix heap buffer overflow in fading sim
at the when applying the fading channel we copied the state back
to our buffer. Since we are offsetting the read buffer
by X samples, we need to make sure that we don't read after then
(len-X) samples of the temporary memory buffer
2020-07-21 21:42:22 +02:00
Andre Puschmann 1199a79851 fix Scell sync for large cells
the PSS detection needs more temporary buffer than a full subframe.
we therefore need to allocate and initialize the sync object with
larger maximum size to support Scell search of large cells, e.g.
20 MHz

this fixes issue #1538
2020-07-21 18:35:53 +02:00
Ismael Gomez f380f46a10 Revert "Remove unnecessary zero memory (#1564)"
This reverts commit f662aeaff3.
2020-07-21 16:24:06 +02:00
Andre Puschmann 9550bd3ef8 rlc: revisit interface for MAC and RRC
* add locked and unlocked version of has_data() since one is
  called from stack and one from PHY threads

* add comments in each interface section as to why locking
  is required or not

* remove RLC rwlock when not required

* move calls only used by RRC to RRC section
2020-07-21 11:56:43 +02:00
Andre Puschmann 7f98cb9b62 pdcp: log discard timer duration in init()
to log the configured discard timer length
2020-07-21 11:56:43 +02:00
Andre Puschmann a578ff1975 pdcp: fix typo 2020-07-21 11:56:43 +02:00
Francisco Paisana 58c4bcf288 reduce mcs for UL grants carrying UCI 2020-07-21 10:51:11 +01:00
Ismael Gomez f662aeaff3
Remove unnecessary zero memory (#1564)
* RF drivers to allow nullptr buffers in send/recv

* Remove zeromem from radio

* remove unused buffers
2020-07-20 19:11:56 +02:00
Andre Puschmann dc67d28709 nas: do not generate NAS encryption key if also is set to NULL
its more a cosmetic change to clean the logs. this makes
sure that a zero key is logged when NULL encryption is selected.
2020-07-20 10:58:10 +02:00
Ismael Gomez 1eaf7efab0 Fix UL adaptive retx rv index 2020-07-15 18:24:23 +02:00
Xavier Arteaga 5cf2089a8c srsLTE: increased SRS test TA us threshold 2020-07-15 07:34:14 +02:00
Xavier Arteaga 794f969e1a srsLTE: fix TA calculation 2020-07-15 07:34:14 +02:00
Xavier Arteaga 729986f259 srsLTE: Added PUCCH format 3 valid correlation 2020-07-15 07:34:14 +02:00
Xavier Arteaga 0192130742 SRSUE/SRSENB: UCI bits are carrier by the lowest serving cell index
SRSENB: Fix UCI in lowest serving cell index PUSCH transmission
2020-07-15 07:34:14 +02:00
Andre Puschmann c8b4ba885b rename rlc_tx_queue to byte_buffer_queue
this data structure will be used by the PDCP layer as well.
2020-07-14 18:18:32 +02:00
Francisco Paisana 36fc88d2e2 fsm log macros, and utility methods to convert event callbacks to move tasks 2020-07-14 13:33:50 +01:00
Francisco Paisana 9c5471b094 more ergonomic event callback 2020-07-14 13:33:50 +01:00
Francisco Paisana d48a45976e moved cell selection/search complete event signalling out of phy_controller 2020-07-14 13:33:50 +01:00
Francisco Paisana 489969722e implemented phy controller FSM to perform cell selection & search. The controller also tracks the phy sync state 2020-07-14 13:33:50 +01:00
Andre Puschmann 6fb01d61a7 rlc: change remaining occurances of "SN: " to "SN="
streamline all RLC AM and UM for better log analysis
2020-07-14 09:47:53 +02:00
Xavier Arteaga 137d250d66 srsLTE: fix ZMQ decimation pointer 2020-07-13 19:15:25 +02:00
Andre Puschmann a7911f0dab pdcp,rlc: refactor SDU queueing policy
this patch refactors the SDU queuing and dropping policy of the RLC and PDCP layer.
the previous design had issues when packets have been generated at a higher
rate above the PDCP than they could be consumed below the RLC.

When the RLC SDU queues were full, we allowed two policies, one to block on the write
and the other to drop the SDU. Both options are not ideal because they either
lead to a blocking stack thread or to lost PDCP PDUs.

To avoid this, this patch makes the following changes:

* PDCP monitors RLC's SDU queue and drops packets on its north-bound SAP if queues are full
  * a new method sdu_queue_is_full() has been added to the RLC interface for PDCP
* remove blocking write from pdcp and rlc write_sdu() interface
  * all writes into queues need to be non-blocking
  * if Tx queues are overflowing, SDUs are dropped above PDCP, not RLC
* log warning if RLC still needs to drop SDUs
  * this case should be avoided with the monitoring mechanism
2020-07-13 17:05:28 +02:00
Andre Puschmann 7a66a00e15 block_queue: add method to check if given queue is full 2020-07-13 17:05:28 +02:00
Xavier Arteaga f39abe0094 SRSENB: fix MAC pending PHY config 2020-07-13 15:27:46 +02:00
Francisco Paisana 5e06430455 removal of stack handler interface 2020-07-13 11:19:25 +01:00
Francisco Paisana 7c364070ee creation of task scheduler interface for classes/functions running outside the main control thread 2020-07-13 11:19:25 +01:00
Francisco Paisana 039977aeb5 renamed interfaces 2020-07-13 11:19:25 +01:00
Francisco Paisana 1a9c04bf2f use of task scheduler handle in pdcp 2020-07-13 11:19:25 +01:00
Francisco Paisana e9f34c7613 using task scheduler in enb stack 2020-07-13 11:19:25 +01:00
Francisco Paisana 4f5e65781f created task scheduler class to deal with timers, thread pool, multiqueue, internal tasks 2020-07-13 11:19:25 +01:00
Pedro Alvarez 89b6e0f714 Send paging message to all cells. 2020-07-10 10:14:08 +01:00
Francisco Paisana fe8f8be62d apply separate cqi configurations to scells 2020-07-09 18:56:01 +02:00
Andre Puschmann d5f0ad9f35 pdcp: fix typo 2020-07-09 16:13:16 +02:00
Andre Puschmann 2749c870e3 rlc_am: refactor control test
* move both tests into own functions and call those in main()
* use common test header and macros
2020-07-08 10:09:06 +02:00
Andre Puschmann 035c369a43 mac_pdu: fix check of remaining length when adding new subheader to MAC PDU
when adding a new subheader to a MAC PDU we should only add the subheader
if at least 2 bytes are left in the PDU. Even a 1 Byte MAC Control Element requires
another byte to pack the subheader.

This fixes #1424 in which a 3 B MAC opportunity is provided in the UL. After
adding the Short BSR, we tried to add another MAC subheader. Adding the subheader
succeeded even though no space is left to add a single byte. With this patch,
adding the subheader fails and the generates MAC PDU is correct.
2020-07-08 10:08:26 +02:00
Andre Puschmann 58e255cb63 pdu_test: add unit test to verify correct packing of 3B PDU with Short BSR 2020-07-08 10:08:26 +02:00
Andre Puschmann 5589816690 pdu_test: fix PCAP output
API now requires to pass CC index
2020-07-08 10:08:26 +02:00
Andre Puschmann f6d3467884 ringbuffer: fix timeout calculation for timed read
with ZMQ RF, we've seen the radio returning -1 and traced
the issue down to the ringbuffer.
in fact, pthread_cond_timedwait() returned 22 (EINVAL) indicating
a wrong timeout value. The issue was likely an overflow
in the timespec parameter. This patch checks for the return
value of pthread_cond_timedwait() and also calculates the
nanosecond wrap around for the timespec
2020-07-07 23:04:05 +02:00
Andre Puschmann aed38a6028 rf_zmq: increase default ZMQ timeout to 2s
amarisoft flags an RF error and exits after not receiving samples
for the radio. Running with ZMQ in the RFCI, the UE sometimes needs more
time to start up due to slow processing and no fftw wisdom file and
then Amarisoft eNB times out. This gives the whole process a little
bit more time. Should we still find it too short we may increase
it further.
2020-07-07 23:04:05 +02:00
Andre Puschmann b3e92883d4 rlc_um: reduce log level when provided space is not enough to build PDU
this is not a warning case as it can always happen. reduce level to info therefore.
2020-07-07 18:01:39 +02:00
Andre Puschmann 95f5093432 rlc_am: hold lock while handling new PDUs
This lock was removed in 1cbf7eac because it was considered unneeded.
However, as can be seen in issue #1503, we need to protect the access
to rx_window, for example.

Issue #1503 shows a stack trace where a PHY worker generates a status PDU.
While holding the mutex to access rx_window, the stack thread on the
other hand, happily accesses the rx_window member without acquiring
the lock. This commit protects all handle_*() functions in write_pdu().

This reverts commit 1cbf7eac04.
2020-07-07 10:41:14 +02:00
Francisco Paisana e550bf726d updated fsm to allow enter methods to receive event that caused them 2020-07-06 14:25:03 +01:00
Andre Puschmann 6f5da19312 pdcp: similar to tx, also reduce log for Rx
instead of logging PDU received from below, and SDU that is forwarded
to above, only log the PDU in rx in info mode.

The next layer will do the same and log the PDU received (which is the SDU coming from here)
so there is now loss of information in the logs.
2020-07-05 16:56:06 +02:00
Andre Puschmann 6654453e22 pdcp: reduce amount of log messages during tx
drop logging encrypted PDU seperately. Instead, only log formatted
PDCP PDU before passing to lower layers
2020-07-05 16:56:06 +02:00