AgeCommit message (Collapse)AuthorFilesLines
2017-12-05TBF: fix compiler warning in testMax1-6/+3
tbf/TbfTest.cpp: In function ‘void egprs_spb_to_normal_validation(BTS*, unsigned int, unsigned int)’: tbf/TbfTest.cpp:2788:26: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] bsn1 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) ~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2788:53: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] bsn1 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) ~~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2825:26: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] bsn2 = (egprs3->bsn1_hi << 9) || (egprs3->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2825:53: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] bsn2 = (egprs3->bsn1_hi << 9) || (egprs3->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2844:26: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] bsn3 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2844:53: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] bsn3 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~~^~~~~ Change-Id: Idf9e5f15faa7810411ed9d68ed43cf907eea2545
2017-12-05Print error cause of pcu socket connect failurePau Espin Pedrol1-1/+2
This log is useful to quickly debug scenarions in which pcu never connects to bts. For instance, if bts is started as root and pcu is not, pcu will fail to connect to the socket and will fail with "Permission Denied". Change-Id: I6fd5736b5916cbad72b96f064929bb667ff97ded
2017-12-04TBF: log timer overrideMax2-218/+218
Currently TBF support only single Txxxx timer so scheduling another timer will cancel out the one which is already running. Until the proper fix is in place, let's at least log this situation as error. Note: cosmetic adjustement to test output is required - we do not report restart of the same timer twice because "restarting" assumes it anyway. Change-Id: I462464a1e6df937b72cad65d19cd48e95dc4db45 Related: OS#2407
2017-12-01Fix compiler warningMax2-2/+9
Move function declarations which use gprs_rlcmac_ul_tbf into tbf.h to avoid compiler warning: In file included from pcu_vty.c:15:0: bts.h:166:27: warning: ‘struct gprs_rlcmac_ul_tbf’ declared inside parameter list will not be visible outside of this definition or declaration void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta); ^~~~~~~~~~~~~~~~~~ bts.h:167:24: warning: ‘struct gprs_rlcmac_ul_tbf’ declared inside parameter list will not be visible outside of this definition or declaration void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta); ^~~~~~~~~~~~~~~~~~ Change-Id: Ic34c72c8bff6d7c775f56bb6026fec5425f7dcb4
2017-11-21Replace '.' in counter names with ':'Max1-85/+85
The '.' is an illegal character in counter names, as they are exported via CTRL interface, where '.' has a special meaning that cannot be used by strings comprising the variable name. Change-Id: I5ef60152a31dea25cb839c47edc93d5337ec3a3e
2017-11-21Move multislot table to separate fileMax4-109/+221
To facilitate testing and addition of support for new multislot classes, hide multislot class struct internals: * introduce mslot_class_get_*() functions * use those functions instead of direct access to array of structs * use ms_class as a parameter to find_multi_slot() instead of entire object Change-Id: Id796bcff1322b1e273a0e3236c66c23b9da8fac6
2017-11-21Remove unused parameterMax1-3/+2
Change-Id: Ifd6e04a29e27b1862cf9e98dec7481d3e0efcd48
2017-11-16PCU: display TA information in TBF statsMinh-Quang Nguyen1-1/+2
Change-Id: I26886224c2ad6d5a29e92203635b8bf7459730a2
2017-11-16PCU: Fix TA adjustmentMinh-Quang Nguyen5-13/+84
Promblem: TA provided from L1 PH-DATA-IND is a relative amount of TA adjustment to actual TA being used for given TBF. The current TA update algorithm in PCU simply applies the relative amount of TA to given TBF but does not take into account of current TA. As a result, the PCU will request wrong TA jump for given TBF if the MS is moving away from BTS more than 2 km. Related issue: http://osmocom.org/issues/2611 Fixes: - The PCU needs increase or decrease current TA of given TBF on receiving of relative amount of TA adjustment provided by PH-DATA-IND from L1 - The PCU needs to set absolute TA of given TBF on receiving absolute TA provided by PH-RA-IND from L1. Change-Id: I65212f8203f1a35278890f51db038d689b2493d5
2017-11-01vty: skip installing cmds now always installed by defaultNeels Hofmeyr1-1/+0
vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I6c9f928f4a4d7fd6bf37c64a64ee5d843ad5bb7a
2017-10-30jenkins: use osmo-clean-workspace.sh before and after buildNeels Hofmeyr1-1/+4
See osmo-ci change I2409b2928b4d7ebbd6c005097d4ad7337307dd93 for rationale. Depends: I2409b2928b4d7ebbd6c005097d4ad7337307dd93 Change-Id: If8aa657c4bf62ef62549fbe9dc15ce3fb018d8d9
2017-10-29Tag/Release Version Welte1-0/+30
Change-Id: I8559585a4513dddf1516c2a2b08968556c69b7ec
2017-10-29Debian: upgrade to debhelper 9 / Standards 3.9.8Harald Welte3-4/+4
Change-Id: I1fd274d85b8fd344517d62dd9e6adc4af6de3e26
2017-10-29Debian: migrate from DEB_BUILD_HARDENING to DEB_BUILD_MAINT_OPTIONSHarald Welte1-1/+1
Change-Id: Ic400c509ecd0c6e8485e9433f144528f6abc600d
2017-10-29Debian: print test results in case of failure + clean-up autotestHarald Welte1-0/+9
Change-Id: Id912a106d42bbd9d2ad89b67d16d52cb2344eb6d
2017-10-29Debian: Cosmetic changes to control file; add better DescriptionHarald Welte1-7/+20
Change-Id: I0a8bf134757f6ed754bfefd45a9fdac255447e43
2017-10-29Call osmo_init_logging() before static BTS constructorHarald Welte3-2/+13
The BTS constructor uses functions of libosmocore that could in turn want to log something. This requires the logging to be initialized before. The only way to achieve this is to add an __attribute__((constructor)) function *before* the BTS constructor is being run. This solution might not be elegant, but I guess it's the only way to initialize a C library before calling C++ constructors of global static instance of a class. In case anyone comes up with a better / cleaner approach, we can always change later. This change requires libosmocore >= 0.10.1, as only that permits multiple calls to osmo_init_logging() which may now occur. Change-Id: I28dc4f0db229518348c92413959fed5ae85d753d
2017-10-29tests: Don't use private version of log_info but global gprs_log_infoHarald Welte6-119/+15
There's no need for each test case to carry their own log_info and filter function. They can simply use the global gprs_log_info and configure the stderr log verbosity according to their needs. Change-Id: I8706a624e5d06e062d1198711aa197fbd0860769
2017-10-24gb: allow only packets from a specific SGSNPhilipp Maier1-0/+2
Each PCU has a specifically assigned SGSN, which may send packets to the PCU. Ensure that no one else except the configured SGSN can send packets to the PCU. Change-Id: Ic2009039fab7cf0fba916556239747ae5b410366 Depends: libosmocore Ifeb201d9006eec275a46708007ff342cdfc14e45
2017-10-10cosmetic: reformat multislot classes tableMax1-31/+32
Add header similar to the one used in the standard, reformat to facilitate further extention. Change-Id: I786df6b154c0668d2cefa0ea84d7dea336b0da1d Related: OS#2282
2017-09-12TS alloc: properly count UL slotsMax1-0/+4
Add cycle to mark multiple allocated UL slots similar to the way we count DL slots in AllocTest. Until multislot UL allocation is implemented it does not affect test output. Change-Id: I2705405119421da3066c6c6bdd5830df4c133a36 Related: OS#2282
2017-09-08TBF-DL: extend index check for RLC block copyMax2-0/+218
Log number of RLC blocks to copy and assert if trying to copy too many blocks. Change-Id: I01cbc26ec67400a44e9fff3f9a30d729320380f9 Fixes: CID143069
2017-09-08Assert valid CSMax2-0/+8
The coding scheme converted to number make sense only if it's valid. This is implicitly assumed by the code using this conversion as non-zero value. Make those assumptions explicit with OSMO_ASSERT(). Change-Id: I8f62627b7b7b89dfa1b0d1a7e71b95b2c40fdffa Fixes: CID70466
2017-09-04cosmetic: convert explicit warnings to fixme/todoMax6-7/+9
We do not use this style (#warning as an issue tracker replacement) in any other Osmocom project. Also those warnings clutter compiler output making it harder to spot warnings for the actual code. Change-Id: I72070e2a027e60e8b80c12ccfa23ff075434689f
2017-09-01Move gsmtap and accounting into separate functionMax1-13/+31
Change-Id: I3609da1850244f25bd4611c9d25795ca379d6325
2017-09-01Support receiving SI13 from BTSMax6-1/+33
* store SI13 in BTS struct * check and handle BCCH SAPI Change-Id: I610a93ce23725b182ec14e3507331295bd542f74 Related: OS#2400
2017-09-01cosmetic: tighten direct-phy related codeMax1-11/+11
* move the code to related SAPI case * get rid of 'unused variable' warning if direct-phy is not used Change-Id: If8cae6f3579cfdecc25bbe1d08fa88a4f664a03b
2017-08-24Use value string check from osmo-ciMax1-2/+2
Change-Id: Ib9c595ef80cb6b0d126d4da8244f6435e0526095
2017-08-24Facilitate future releasesMax3-1/+7
* use release helper from libosmocore * use semantic versioning Change-Id: Ie0a7f5977550bd0a1ba8b03bdb7e2d619a398e4e Related: OS#1861
2017-08-18EDGE: Fix UL link adaptation.Minh-Quang Nguyen4-5/+100
We have seen that UL MCS5- MCS9 link adaptation has not been implemented in current PCU implementation. If the MS slowly moves far away from the BTS, the UL MCS will always stick at MCS9 no matter UL link quality values leading to poor data service experience. The UL MCS is expected to adapt from MCS9 -> MCSx due to bad UL quality. Below PCU traces indicate that UL MCS is quickly increasing to MCS9 (max MCS 9 was used in this test) and it never changes to other UL MCS due zero thresholds. <0004> gprs_ms.cpp:670 MS (IMSI ): Link quality 23dB (23dB) left window [0, 0], modifying uplink CS level: MCS-6 -> MCS-7 <0004> gprs_ms.cpp:670 MS (IMSI 000): Link quality 23dB (23dB) left window [0, 0], modifying uplink CS level: MCS-7 -> MCS-8 <0004> gprs_ms.cpp:670 MS (IMSI 000): Link quality 23dB (23dB) left window [0, 0], modifying uplink CS level: MCS-8 -> MCS-9 Change-Id: I9272c337ad6399da4a47cc6e2736e25f24e099d8
2017-08-17GSMTAP: fix category checks in pcu_rx_data_ind and pcu_l1if_tx_ptcchHarald Welte1-2/+2
We needto shift the PCU_GSMTAP_C_* constants before comparing against the mask of enabled GSMTAP categories. Change-Id: Ieb9332c65ed7bd57baf1aeab5ab722f92fc23b24
2017-08-14Simplify polling troubleshootingMax6-103/+100
* introduce enum describing poll kind and use it in set_polling() * move state change into set_polling() * move logging into set_polling() and unify output * move duplicated code into static function * adjust tests to match unified logging output Change-Id: I14074207f8bbc18b3ebd60875bb99a0a3a4b399d Related: OS#1524
2017-08-14Move DL assignment to TBF-DLMax5-39/+38
This function does not really belongs to BTS and it heavily relies on direct access to TBF-DL members anyway. Change-Id: I04584103018675a2f35cfb565473bfd81a208d7c Closes: OS#1540
2017-08-14Move common code into functionsMax1-57/+36
* separate channel request responder into inline function * move generic TBF poll check into inline function Change-Id: I9ec3ab8de100f0bc75044f55ac769d1083d52806 Related: OS#1539
2017-08-14Encapsulate handling of UL ACK timeoutMax4-21/+39
Use helper methods instead checking and manipulating flag directly. Change-Id: Ia3f009c52118db95b38a077e08eecda844e7f8d1 Related: OS#1539
2017-08-09Add pcu-socket vty configPau Espin Pedrol5-1/+30
osmo-bts already supports configuring a different path for the bts<->pcu socket by using the 'pcu-socket' config field. Change-Id: I9b3e1171da467519750b201849ec892a1e318129
2017-07-29README: Clarify that fixed allocations have been revmoved from 3GPP specsHarald Welte1-1/+1
In Release 5, Fixed Allocations were removed as part of a "GPRS simplification project" inside 3PGPP. This means that any MS compatible with Rel-5 or higher may not support it, which makes implementation in the PCU af historical interest only. See Tdoc GP-021277 for the actual removal, it happened at 5.0.0 time. Change-Id: I8138bc0a47d3468b67cec866447fd4b0fc69d4c5
2017-07-29GSMTAP: Ad PTCCH as separate gsmtap categoryHarald Welte3-1/+5
This allows us to send GSMTAP for PTCCH only if requested by user/vty Change-Id: Id720f4bebdce7f6152fbddddbe05036638c5866e
2017-07-29GSMTAP: Fix logical channel of downlink PTCCHHarald Welte1-1/+1
Change-Id: I29ecc968d56d4d0165cffa206297c42d6fb02cf4
2017-07-29GSMTAP: Fix channel type for data blocks: PDTCH instead of PACCHHarald Welte2-3/+3
PACCH is used only for RLC/MAC control messages, while PDTCH is used for data. Change-Id: I6c912e17d8c8d4178096679a541e61eeeb4b6643
2017-07-29BSSGP: Improve logging of received messagesHarald Welte1-39/+73
We now differentiate clearly between messages that a) we don't expect based on our reading of the spec b) we have not implemented yet (but should) c) we do not even know of Also, unify the log string formats and provide BVCI whenever possible. Change-Id: Ie32f5771d49960547ec5d7611f96a74facc1b035
2017-07-29Remove #warnings that have been adressed since 2015Harald Welte1-2/+0
In commit 939904672961fa7e28397e27f942a7d1fff4bbdf the lookup by TLLI, TLLI-OLD and IMSI has been implemented, but the corresponding compile-time warning was never removed. Change-Id: I7a1767bc7cab01048e851fd4e63112bc676d6c78
2017-07-28BSSGP: Use libosmocore for BVC-RESETMax1-5/+22
Implement proper BVC RESET procedure by using libosmocore code to handle BVCI reset and initiate PTP BVC reset if necessary. Requires I9bf8f4dd784ccddbb9926492a85fff3293a0e913 in libosmocore. Related: OS#1638 Change-Id: I718c949759688cb34ce6bcbb3da2092fcdfa6989
2017-07-21Introduce GSMTAP categoriesHarald Welte7-48/+182
When looking at GSMTAP output so far, one is easily overwhelmed by way too much information being presented. A lot of is consists of DUMMY frames, which are probably of lowest interest, ever. A concept similar to the "gsmtap-sapi" of OsmoBTS is introduced, by which the user can configure which particular categories (uplink or downlink control or data, gprs or egprs, ...) he actually wants to see in his logs. Change-Id: I297183690e98a7234dfc1608c18847d8981306e4
2017-07-12check for missing result of rate_ctr_group_alloc()Harald Welte2-0/+26
In case the counter group allocation fails, we must handle this gracefully and fail the allocation of the parent object, too. Change-Id: Id6d780c67b4af15aaa5c6f2b8b00f2a0b70a7385 Related: OS#2361
2017-07-10jenkins.sh: Proper error message if local environment isn't set upHarald Welte1-0/+7
Change-Id: Ibd24ba6024714f3d7aac14ef661acf52de2a3825
2017-07-10Remove TBF knowledge from rcv_control*dl_ack_nackMax3-22/+34
Do not access TBF internals directly from rcv_control*dl_ack_nack() - wrap corresponding code into TBF-DL method. Change-Id: I3d1b5782001e45617b4a960612fcfc249904b37c Related: OS#1539
2017-07-10Ignore test binaries using maskMax1-9/+2
Change-Id: Ic7930c6e715447e91572f7ed6b0d2bb2238cf367
2017-07-03Copy sysmopcu.service to osmo-pcuMax2-0/+18
This way the name of systemd service file will match the name of the binary similar to OsmoBTS. Add aliases so the user can use both old and new names regardless of which file is installed. Once the corresponding changes to OE recipes are applied old file can be removed. Based on work by Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: I2ca6f6c486bd6fcf4d5b3d0a05d25dc04f020c26
2017-06-26Remove comment warningMax1-3/+2
It's unclear why the warning was placed next to commented log statement to begin with, so let's just follow that warning's advice and drop it. Change-Id: I3ef7a45d015a28fdadf75f97294bc5d4f825b8ae