4315 Commits (1272f4c327616b9dbd5900b52d8c683c13e7f964)

Author SHA1 Message Date
Andre Puschmann 6d0aafcf69 rlc_um_nr: fix has_missing_byte_segment() routine
return true if rx_window contains segment of this SN
3 years ago
Andre Puschmann 5b025cfbf8 rlc_um_nr: reimplement update of RX_Next_Reassembly 3 years ago
Andre Puschmann 2366dc286d rlc_um_nr: improve logging 3 years ago
Andre Puschmann 85e478d8ad rlc_um_nr_test: add TC to reproduce reassembly issue
* add TC to reproduce reassembly issue that causes low TCP throughput
* fix PCAP writing
* fix other testcase to wait for t_reassembly to expire
3 years ago
Alejandro Leal Conejos ca7a377878 Fixes coverity 262740 3 years ago
Alejandro Leal Conejos 4bd8b6f2de Fixes coverity 359677 3 years ago
Bedran Karakoc a14cc451d0 Addition NGAP cleanup 3 years ago
Andre Puschmann 7f6801cb1e ue_sync: fix 32bit compilation
fix printf format string on 32bit arches like ARMv7

FAILED: lib/src/phy/ue/CMakeFiles/srsran_ue.dir/ue_sync.c.o
/usr/bin/gcc -DASSERTS_ENABLED -DENABLE_TIMEPROF -DENABLE_TTCN3 -DHAVE_BACKWARD -DHAVE_MBEDTLS -DHAVE_PCSC -I/usr/include/PCSC -I/usr/include/SoapySDR -Ilib/include -I../lib/include -Wno-unused-but-set-variable -Wall -Wno-comment -Wno-write-strings -Wno-unused-result -Wformat -Wmissing-field-initializers -Wtype-limits -std=c99 -fno-strict-aliasing -D_GNU_SOURCE -O3 -fno-trapping-math -fno-math-errno -DBUILD_TYPE_RELEASE -DIS_ARM -DHAVE_NEON -mfloat-abi=hard -mfpu=neon -fvisibility=hidden -fdiagnostics-color=always -Werror --param large-function-growth=1600 -O3 -DNDEBUG -fPIC -MD -MT lib/src/phy/ue/CMakeFiles/srsran_ue.dir/ue_sync.c.o -MF lib/src/phy/ue/CMakeFiles/srsran_ue.dir/ue_sync.c.o.d -o lib/src/phy/ue/CMakeFiles/srsran_ue.dir/ue_sync.c.o   -c ../lib/src/phy/ue/ue_sync.c
In file included from ../lib/include/srsran/srsran.h:31,
                 from ../lib/src/phy/ue/ue_sync.c:13:
../lib/src/phy/ue/ue_sync.c: In function ‘srsran_ue_sync_set_tti_from_timestamp’:
../lib/include/srsran/phy/utils/debug.h:59:23: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Werror=format=]
       fprintf(stdout, "[DEBUG]: " _fmt "\n", ##__VA_ARGS__);                                                           \
                       ^~~~~~~~~~~
../lib/src/phy/ue/ue_sync.c:1044:3: note: in expansion of macro ‘DEBUG’
   DEBUG("rx time with 3gpp base in ms %lu\n", time_3gpp_msecs);
   ^~~~~
../lib/src/phy/ue/ue_sync.c:1044:41: note: format string is defined here
   DEBUG("rx time with 3gpp base in ms %lu\n", time_3gpp_msecs);
                                       ~~^
                                       %llu
cc1: all warnings being treated as errors
3 years ago
joaquim-SRS 00b82bc772 Fix more issues in PHY lib
Fix variable shadowing issues in chest_test
Fix mutex unlock position in dft_fftw.c
CID 371598 Out of bounds access, in ssb_decode_test.c
3 years ago
joaquim-SRS 9b74e3429c Fix more Coverity issues in the PHY lib
CID 369560 Missing unlock, in dft_fftw.c
CID 363710 Logically dead code, in resampler.c
CID 55097 Result is not floating point, in chest_test_dl.c
CID 351020 Result is not floating point, in chest_nbiot_test_dl.c
3 years ago
Nils Fürste b036da07de Extend ASN1 utils function from_number() 3 years ago
Fabian Eckermann 0007473c7a Initialize variable. 3 years ago
Fabian Eckermann f539851128 Fix possible out-of-bounds-read. 3 years ago
Fabian Eckermann 1b2d77a49d Fix possible out-of-bounds-read. 3 years ago
Fabian Eckermann 8753ea1be5 Fix coverty defects. 3 years ago
Carlo Galiotto 9c74dda039 rrc,nr: add msg5 and inactivity timers to RRC-NR
Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
faluco edf0926a2f Batch of LGTM fixes. 3 years ago
Francisco 529e2bdf55 nr,rlc: call bsr update callback in RLC UM NR 3 years ago
Francisco 7ad1ad800e lte,enb,rlc: atomically compute DL buffer state and update the scheduler in the eNB 3 years ago
Ismael Gomez d972fb368c
Some LGTM fixes (#3564)
* Fix LGTM issues

* ue: add logging to switch on function

* Fix new LGTM issues
3 years ago
Joaquim 93649429dd
WIP: Fix Coverity issues in PHY lib (#3507)
Fix several Coverity issues

This commit adrresses the following code issues found by Coverity:

CID 339785 Division by zero, in fading_channel_test.c
CID 355272 Division by zero, in awgn_channel_test.c
CID 355277 NULL ptr dereference, in awgn_channel_test.c
CID 359663 NULL ptr dereference, in delay_channel_test.c
CID 369544 NULL ptr dereference, in chest_dl_nbiot.c
CID 373326 Resource Leak, in dft_fftw.c
CID 373329 Resource Leak, in dft_fftw.c
CID 372878 Division by zero, in sliv_test.c
CID 372871 Division by zero, in dmrs_pdcch.c
CID 370622 Negative loop bound, in csr_rs.c
CID 370624 Negative loop bound, in csr_rs.c
CID 370626 Negative loop bound, in csr_rs.c
CID's 369568, 369594 NULL ptr dereference, in ch_awgn.c
CID 369540 Logically dead code, in refsignal_dl.c
CID 369608 Logically dead code, in refsignal_ul.c
CIDs 366291, 366296, 366297 Out-of-bounds access, in zc_sequence.c
CID 372209 Division by zero, in cqi.c
CID 370992 Uninitialized pointer read, in pdcch_test.c
CID 373334 Integer overflow, in ue_sync.h
CID 370993, 370995 Undefined division, in pdcch_test.c
CID 370994 Undefined division, in ssb_decode_test.c
CIDs 353368 353364 353365 359673 353366 353367
Explicit null dereferenced, in psss_file_test.c
CID 371865 Unchecked return value, in rf_uhd_imp.cc
CID 363810 Undefined division, in ldpc_rm_chain_test.c
CID 372209, 372211, 372213, 372216 Undefined modulo, in cqi.c
CID 339834 Array compared against 0, in chest_dl.c
CID 369589 Out of bounds access, in dmrs_pucch.c
CID 371681 Out of bounds access, in ue_sync_nr_test.c
CIDs 370761, 370825 Copy-paste error, in ssb.c
CID 369599 out of bounds read, in dmrs_pdcch_test.c
CID 363795 out of bounds read, in ldpc_dec_c_avx2_flood.c
CID 363805 out of bounds read, in ldpc_dec_c_avx2long_flood.c
CID 363821 out of bounds read, in ldpc_dec_c_flood.c
3 years ago
faluco dc31fb05a3 Fix ODR issue detected by ASAN in arch for the srsran_verbose global variable. 3 years ago
faluco fa8e8ddf1f Fix an ODR issue detected by ASAN in arch, where the global variable handler_registered was defined multiple times. 3 years ago
yagoda 5d6b48311e fixing a few regression bugs in embms 3 years ago
Andre Puschmann 497e183487 rf_zmq_imp: disable Tx baseband scaling
until the correct gain settings are documented and potential
mis-configuration are handled. It seems that the default
Tx/rx gains values are not working with this function.
3 years ago
Andre Puschmann e2d26b5a8c rlc_um_nr: log PDU without SN if full SDU is transmitted
PDUs that contain full SDUs don't have SNs, so the log should be
without it
3 years ago
Andre Puschmann 3eb1862ab9 gnb_interface: reduce MAX_GRANTS to 4
see #3530 for detailed discussion. This change saves some CPU cycles it seems
3 years ago
Fabian Eckermann 32a1646536
nr,gnb,rrc: Derive RRC parameters from config.
* Derive RRC parameters from config.
* nr,gnb,rrc: hard code prach config index to 8 to avoid expiring RA proc window.
3 years ago
faluco 5ff6b2eaa9 Fix data race in ZMQ where nsamples and running variables could be read concurrently. 3 years ago
Xavier Arteaga 322f57a952
Initial real-time Tx gain setting (#2976)
* Make filename const in filesink

* Sine generation returns the next phase

* Avoid malloc/free in radio class

* Implement Tx gain in ZMQ

* Initial ratio RT gain test

* UHD: use timed Tx gain commands to align changes to subframes

* Minor improvement in test_radio_rt_gain

* Fix compilation

* Check RF gain thread id before joining

* Remove redundant zero initialization.

Co-authored-by: Fabian Eckermann <fabian@srs.io>
3 years ago
Xavier Arteaga ebab12403f
Asynchronous NR PHY configuration (#3527)
* Fix a race condition when accessing the NR PHY cfg by the RRC and phy workers.
Rework how the phy cfg is handled, now workers have their own copy that gets updated after a reconfig moving it out of the state class.

* Default initialize sf_len member in sf_worker for consistency.

* Asynchronous NR PHY configuration

* Fix compilation

* Corrected method override and fix unitialised value

* Added carrier equal comparison to avoid aligment byte padding comparison

Co-authored-by: faluco <borja.ferrer@softwareradiosystems.com>
3 years ago
faluco 0ada9a01ec Whitelist TSAN issue in srsenb::mac::sr_detected. 3 years ago
faluco a1b2f3915d Whitelist lock order inversion tsan issue in srsenb::rlc::rb_is_um. 3 years ago
Andre Puschmann 8294724aad gnb_interface: reduce MAX_GRANTS to 4
this significantly reduces data copies when providing the PHY
with scheduler results.
3 years ago
Xavier Arteaga 95bf85b3d3 Reduced maximum number of CSI reports 3 years ago
Pedro Alvarez fbcffb84bd Check if RLC is suspended before transmiting PDCP SDU.
This was done to avoid integrity issues, when the UE's RRC erroneously sent
measurement reports while the re-establishment was already in progress.

As errously sending PDCP PDUs on DRBs can cause issues as well, this was
disabled too.
3 years ago
Alejandro Leal Conejos 9daa32e591 Configure the term timeout using the cmake definition
EXTRA_TERM_TIMEOUT_S
3 years ago
Xavier Arteaga d9bdc3f83e Add CSI resource information and fix segmentation fault 3 years ago
Carlo Galiotto 284207dad6 WIP: fixing collision in the the users_map
Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Xavier Arteaga eace81d613 Fix UCI multiplexing for NR PUSCH 3 years ago
Xavier Arteaga 39bfcf4a5c Add UCI valid in NR PUSCH info 3 years ago
Ismael Gomez 7920e084b8 Revert "Do not abort tsan"
This reverts commit e8e1d101c553912f733070e71d020a33ec895280.
3 years ago
Ismael Gomez 80c48a8b01 rlc: protect access to tx_enabled 3 years ago
Ismael Gomez bf566fbd29 radio: protect concurrent access from tx_end and tx 3 years ago
Ismael Gomez 4239222909 Do not abort tsan 3 years ago
faluco 95b4a92f5f Clarify the error messages printed when trying to open a RF device. 3 years ago
Francisco c6226b0d94 lte,enb,rrc: parse cellIndividualOffset in rr.conf and propagate it to measConfig sent to UE 3 years ago
Pedro Alvarez 65a2b35f09 Fix not checking initialization of S11 in MME. Fixed typo. 3 years ago
Pedro Alvarez 0b948d4098 Make sure that bind returns error if it cannot bind. Added test for SCTP bind error/success. 3 years ago
Pedro Alvarez e721504f8e Removed the sctp_init_server for consistency. Added listen method to unique_socket class. 3 years ago