AgeCommit message (Collapse)AuthorFilesLines
13 daysUse osmo_fd_*_{disable,enable}HEADmasterHarald Welte5-17/+18
Change-Id: Ic8c8c418e123fbdff625556a900b19650deefe0b Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d
2020-11-04doc/manuals: generate XML VTY reference at build-timeVadim Yanitskiy6-1413/+70
Unfortunately, we cannot re-use the existing Makefile rules from: $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc because they do not allow to generate the list of $(DOCBOOKS) from a template, and require the project to store everything in separate folders with specific names. Also, those rules expect that the target PDFs contain only a single word in their names (for example, 'osmoapp-vty-reference', not 'osmo-app-vty-reference'), while in a project with multiple similarly named targets this would reduce readability (imagine 'osmotrxuhd-vty-reference'). Change-Id: I798ea3b7417b8ca3e9c7d50911158c5413526237 Depends: I6aac73d998c5937894233631e654a160d5623198 Related: SYS#4937, SYS#4910
2020-11-04main: use logging API to print SIMD info instead of printf()Vadim Yanitskiy1-29/+33
Otherwise these logging lines end up in the automatically generated XML VTY reference (stdout), so this breaks further XML processing. Change-Id: I8e0fd728d406e2452c9c0ddad5bce5f6b17fab42 Related: SYS#4937, SYS#4910
2020-11-04vty: fix documentation for 'ext-rach (disable|enable)'Vadim Yanitskiy1-1/+3
Do not use 'extended' because it's not the same 11-bit Access Burst, as it was assumed before. Add missing docs for 'enable'/'disable'. Change-Id: I80b5a584e554eb7cc2416017b10fee032202b372
2020-11-02vty: auto-generate cmd and doc strings for cfg_filler_type_cmdVadim Yanitskiy1-14/+21
Change-Id: I7fb228c63f3246f443ece67106abba0432b1659e
2020-11-02vty: remove groundless statement about filler type 'dummy'Vadim Yanitskiy1-2/+1
Dummy bursts have nothing to do with A5/x encryption, and I see no reason why (and how?!?) would using that filler type break encryption in osmo-bts-trx. I asked the author of this code back in August 2020 [1], and so far didn't get any response. [1] https://lists.osmocom.org/pipermail/openbsc/2020-August/013208.html Change-Id: Iae513d7acbb8ef682e1744ac8726cbd6ece8bd87
2020-11-02vty: fix documentation for 'multi-arfcn (disable|enable)'Vadim Yanitskiy1-1/+2
Change-Id: Id653ee058b208ddc105947319adad8da667be11f
2020-11-02vty: cosmetic: use VTY_IPV4_CMD in 'bind-ip' / 'remote-ip'Vadim Yanitskiy1-2/+2
Change-Id: I8e44f771cbd03629c066bc24c3186997761f93f1
2020-11-02vty: fix documentation for 'rx-sps (1|4)' and 'tx-sps (1|4)'Vadim Yanitskiy1-2/+6
Change-Id: I70d9b16fd2b1c2cbaafc978724369cd2c9679cbd
2020-10-30vty: fix documentation for 'egprs (disable|enable)'Vadim Yanitskiy1-1/+3
Change-Id: I7a28bede8fd7d68b3afe9deec381fc93e46d65a9
2020-10-30vty: fix documentation for 'swap-channels (disable|enable)'Vadim Yanitskiy1-1/+3
Change-Id: Idca1a2beab07ef4df9ae5c55658cab80f7cc7565
2020-10-25Transceiver: explicitly init m{Rx,Tx}LowerLoopThreadVadim Yanitskiy1-0/+1
Coverity warns us that a non-static class members: - mRxLowerLoopThread, and - mTxLowerLoopThread, are not initialized in this constructor nor in any functions that it calls. I don't think it's critical, because we do initialize them in Transceiver::start(), but let's make them nullptr. Change-Id: If9e06aa7965f17383ab6599c15945e8ce2703bbf Fixes: CID#214952
2020-10-24Transceiver: use size_t and ARRAY_SIZE() in constructorVadim Yanitskiy1-2/+2
Change-Id: I164d66aad04d77957300b07e83b085f43a3ee8c1
2020-10-24device: drop unreasonable LIBOSMO{CTRL,VTY}_{CFLAGS,LIBS}Vadim Yanitskiy6-9/+7
Neither VTY nor CTRL API is used in device specific code, excluding the 'uhd' where osmo_cpu_sched_vty_apply_localthread() is called. Change-Id: I568b443da4b96c005734d749faa22b9c7440f951
2020-10-24main: add --vty-ref-mode, use vty_dump_xml_ref_mode()Vadim Yanitskiy1-14/+36
Change-Id: Ie54c45fdcc8660f37f8db2367b53404b189b3ffc Depends: Ie2022a7f9e167e5ceacf15350c037dd43768ff40 Related: SYS#4910
2020-10-24device/common/Makefile.am: remove $(LMS_CFLAGS) from AM_CXXFLAGSVadim Yanitskiy1-1/+1
This is device-independent code, so it should not be here. Change-Id: I1ffc3431a9a1a46c74c354b3f8a256684bfcbe73
2020-10-24device/lms: get rid of 'using namespace std'Vadim Yanitskiy1-3/+1
Change-Id: I4329801c502db73efa946f15c103b2c081cee5a7
2020-10-24device/lms: fix missing semicolon in LMSDevice::assign_band_desc()Vadim Yanitskiy1-1/+1
Change-Id: I6aedb72306461ebb944fc13a795b0bf3121ea275
2020-10-24device/lms: fix: 'trx_vty.h' header requires C linkageVadim Yanitskiy1-1/+1
Otherwise, the linker fails to produce osmo-trx-lms binary: LMSDevice.cpp:493: undefined reference to `get_value_string(value_string const*, unsigned int)' LMSDevice.cpp:237: undefined reference to `osmo_panic(char const*, ...)' Change-Id: I2fef166c13136af7b7aaa744d39427d76ad11769 Fixes: OS#4828
2020-10-19Use osmo_fd_setup() wherever applicableHarald Welte3-14/+3
Change-Id: Ie093dea96ec8990368695c0c5824e0fe44fb8540
2020-10-18ipc: Use OSMO_FD_* instead of deprecated BSC_FD_*Harald Welte4-25/+25
Change-Id: I98b3f9525954d6882f7488d650038a8e28f7b769
2020-10-14Calculate RSSI offset based on RxGain configurationPau Espin Pedrol16-70/+187
Prior to this patch, osmo-trx relied totally on proper VTY configuration being set in "rssi-offset" together with the RxGain set through TRXC in order to provide correct Uplink RSSI measurements to bts-trx. With this patch, RSSI is now by default calculated (in LMS and UHD backends) based on the currently set RxGain, by providing empirically discovered values. Still, for backward compatibility, the old "rssi-offset" command will overwrite completely the per-default calculated rssi offset. A new optional parameter "relative" is added at the end of the "rssi-offset" VTY command to flag the value as relative to the newly per-default calculated value. This way specific setups (like adding a LNA / RF fronted) can still be expressed while still keeping the automatic per-default offset. Related: OS#4468 Change-Id: I8ef78fd20c22c60d61bfb18d80a4a36df4fd6c20
2020-10-14Transceiver: Pass config struct instead of large list of paramsPau Espin Pedrol5-117/+88
Change-Id: Ifb43cb11f3e7a69b0a88f632f0a0c90ada7f939e
2020-10-12contrib/jenkins: Enable parallel make in make distcheckPau Espin Pedrol1-2/+2
Change-Id: I32925b35126bcd4ef7b5e1315dde28869c2b4b86 Related: OS#4421
2020-10-09osmo-trx: add commandline option --vty-ref-xmlPhilipp Maier1-3/+15
The commandline option --vty-ref-xml is needed to enable automatic generation of the VTY reference manual. Change-Id: I34dd36183e013ab005f39b235c4ab561590befb7 Related: SYS#4937, OS#1601
2020-10-08vty: add attributes to VTY commands indicating when they applyPhilipp Maier1-12/+14
Change-Id: I6dfdedc081eb8c3d53913f6fa38591920c8b3b43 Related: SYS#4937, OS#1601
2020-09-18arch: x86: Fix convolve optimizations breaking signalPau Espin Pedrol1-4/+4
This patch fixes MS failing to even see the network, and only RACHs of 1 zeroed byte being seen in GSMTAP. The issue seems to only appear on some specific machines; others have been running fine for weeks without this memset being an issue. Fixes: 7a52e42ee0676f47e801dd348b478302de5d2e50 Change-Id: I98ad885a5d71e7775973a4d881c0f1cd665ea711
2020-09-12radioDevice: fix set_antennas(): consider MULTI_ARFCN modeVadim Yanitskiy1-0/+14
In the multi-ARFCN mode, if the Tx/Rx antenna names are explicitly set in 'chan N' sections of the configuration file: trx ... multi-arfcn disable chan 0 tx-path TX/RX rx-path RX2 chan 1 tx-path TX/RX rx-path RX2 chan 2 tx-path TX/RX rx-path RX2 osmo-trx would crash, because radioDevice::set_antennas() would attempt to configure antenna names for all N physical channels, while USRP devices usually have 2 or even 1 available. The easiest approach is to remove both 'tx-path'/'rx-path' from all 'chan N' sections excluding 'chan 0', so it would work fine. This makes sense, because in the multi-ARFCN mode we actually use only one physical channel. However, let's still make sure that explicit configuration of the Tx/Rx antenna names would not crash osmo-trx and skip N > 0 in radioDevice::set_antennas(). Change-Id: I09f316f181cbbc2214e8913b73f7c1fcea4e8c05 Related: OS#4636
2020-09-12vty: add multi-ARFCN specific warning for chan N > 0Vadim Yanitskiy1-0/+12
Change-Id: I12d7c466a9a428a384233c4377627e262f165401 Related: OS#4636
2020-09-11proto_trxd: cosmetic: 'if' is not a function, add spaceVadim Yanitskiy1-1/+1
Change-Id: I99cf10662232b1f6845d4019dd3b9be45a82d85b
2020-09-11[cosmetic] radioIntefaceMulti: Fix whitespace / indentHarald Welte1-6/+5
Change-Id: I3addb844a79a8f4e8af03323fc50e57b8a3590a8
2020-09-11[cosmetic] radioInterfaceMulti: More commentsHarald Welte1-0/+9
Change-Id: If608627a77c39b5faabc72c7dd72d00fae8697a9
2020-09-04transceiver: initialize reorder flag so we don't miscountEric1-1/+1
Change-Id: Ia7740b45611dbf09a406b3fd9f0a810d46c96bde
2020-09-01Add support for TRXC MUTE commandPau Espin Pedrol2-2/+16
Related: SYS#4920 Change-Id: I39983d026ad54c479aa224968e9491d01f30dc35
2020-08-27Fix build on Debian8Harald Welte1-2/+4
We cannot use C99 or higher features in C code! Last lines of build log: [ 265s] for (unsigned int i = 0; i < decoded_region->num_chans; i++) [ 265s] ^ [ 265s] ipc-driver-test.c:473:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code [ 265s] Makefile:580: recipe for target 'ipc_driver_test-ipc-driver-test.o' failed [ 265s] make[5]: *** [ipc_driver_test-ipc-driver-test.o] Error 1 Change-Id: I80c9cbd77f1cdf323ad2b492de7e9a177840c383
2020-08-26ipc: fix var declaration in for loopPau Espin Pedrol1-1/+2
""" error: 'for' loop initial declarations are only allowed in C99 or C11 mode """ Change-Id: I97cb9a0a3ecf64e3e5fcfca75431f8fe2a07bd10
2020-08-25jenkins.sh: Verify distro-specific patches applyPau Espin Pedrol1-0/+6
Change-Id: I75792c5defff63b7deaeb533b6818deaac3e0fd3
2020-08-25debian: Update debian8 osmo-trx specific patchPau Espin Pedrol1-9/+9
Recent commit adding osmo-trx-ipc didn't update the patch, which fails to apply now due to files having changed its contents. Change-Id: I6fa50e82320330f83c9753352418755e8b414edf
2020-08-25transceiver: optimize code if optimizations are enabledEric3-18/+27
There is no point in checking basic stuff ten thousand times per second since the sizes never change, so it's enough to enable the checks/assertions for unoptimized (debug) builds. This significantly decreases branch mispredictions. Change-Id: Iebd9e91b3c7f37f2dc646d3017c45139977e4d15
2020-08-25devices: reset internal smart sample buffers upon stopEric4-2/+22
They are too smart, they keep the timestamps. Change-Id: Idb4b8f03eb5ffdfd6d3fdbc137b20e3ddc4cfa65
2020-08-25osmo-trx-ipcEric Wild30-10/+3765
This adds a IPC backend that uses shared memory interface to communicate with (proprietary) devices. Requires config file option dev-args ipc_msock=/path/to/socket to specify the master socket the ipc backend should connect to. If UHD is avaialble the ipc-driver-test tool can be used to test the backend with a uhd device, this was so far only tested with a b2xx. Change-Id: Ice63d3499026293ade8aad675ff7a883bcdd5756
2020-08-14add kernel style .clang-format with 120 chars per line limitEric1-0/+521
Change-Id: I1dc6610d7adfa1a52f3d41ad04544806c2be2c39
2020-08-13debian/control: change maintainer to the Osmocom team / mailing listVadim Yanitskiy1-1/+1
Change-Id: Ida1a3583749a004e2a6c92cfed0b6806a5b83c78
2020-07-31Use new libosmovty cpu sched config featuresPau Espin Pedrol11-7/+32
Using the new libosmovty features allow for: * Setting different cpu-affinity masks for each thread in the process, both at startup through .cfg file as well as changing it at runtime. * Unified VTY interface to change the scheduling policy of the process inherited by all osmocom processes enabling the feature. Depends: libosmocore.git Change-Id If76a4bd2cc7b3c7adf5d84790a944d78be70e10a Depends: osmo-gsm-masnuals.git Change-Id Icd75769ef630c3fa985fc5e2154d5521689cdd3c Related: SYS#4986 Change-Id: I3798603779b88ea37da03033cf7737a6e4751d6e
2020-07-27Transceiver: Add several rate_ctr for rx error conditionsPau Espin Pedrol4-5/+33
Since there's now a rate counter, we can drop log level for those events which can be bursty and hence print lots of output in short periods of time, which may affect performance. This way setting them to INFO it's enough to avoid getting them in stderr unless explicitly configured by the user (for instance to debug stuff), while still allowing a good enough level to be enabled for other targets such as gsmtap. Related: OS#4679 Change-Id: I000f7112e35ac68d3d922444f78468b1ea74cbba
2020-07-27Transceiver: Check log level before generating burst str representationPau Espin Pedrol1-1/+1
Avoid entering the logRxBurst() function and running a long loop even if not used. Change-Id: I67408bc8643d5d97355f277c4a2007064a83ae90
2020-07-17Transceiver: Lower some log levels which have an associated counterPau Espin Pedrol1-5/+5
They are left as INFO instead of DEBUG since they show possible timing/performance issues in the setup. Change-Id: I8aab10054ac89c29b871259fdbe59636723ddfb6
2020-07-17Introduce CTR log categoryPau Espin Pedrol3-19/+26
This way i most usual rate_ctr related internal logging is disabled by default (notice), and it can b eeasily enabled by switching the category to info or debug. Change-Id: Id6c36432da7e7ce673c585bcae6772a695028ec5
2020-07-17trx_rate_ctr: Lower some log levelsPau Espin Pedrol1-6/+6
Change-Id: I1b5a63e6cc09ac02305c31ea7e94aff53ac0e5c2
2020-07-17Transceiver: Restrict conditions where FN gaps are detectedPau Espin Pedrol1-1/+1
In pushRadioVector, like we did for driveTxPriorityQueue already, gaps are possible in any channel for TRX!=0, since TRX0 is the only one expected to be always transmitting. Since we always need to transmit there, it makes no sense to check for channel being not NONE. Change-Id: I3b4b85b9100f69dfa113c54a4357120bd11ec86f