Commit Graph

35 Commits

Author SHA1 Message Date
Vadim Yanitskiy a019e9af8b lchan_select: implement dynamic selection mode for assignment
This change implements an additional channel allocation mode, which
can be employed during a TCH channel allocation for assignment.
Selection between ascending and descending order is performed
depending on pre-configured parameters:

* Uplink RxLev threshold and number of samples for averaging,
* C0 (BCCH carrier) channel load threshold.

This is useful in setups where Tx power of the RF carriers cannot be
adjusted +dynamically at run-time and thus BS Power Control cannot
be performed.  In such setups the BCCH carrier is transmitting at
relatively higher power than the other RF carriers.  The key idea
is to allocate channels in a smarter way, so that UEs with poor signal
would get channels on carriers with high Tx power, while UEs with good
signal could use carriers with lower Tx power.

Change-Id: I1b7a0d706976b73cc5c30a8714b830811addfe8d
Related: osmo-ttcn3-hacks.git Ia522f37c1c001b3a36f5145b8875fbb88311c2e5
Related: SYS#5460
2022-06-30 16:36:55 +00:00
Vadim Yanitskiy c2928ac269 lchan_select: allow different alloc order for assignment and handover
A follow-up patch implements a special channel allocation mode, which is
only working for assignment (basically TCH selection for a voice call).
This mode cannot be employed for initial CHANNEL REQUEST or handover due
to the absence of an already established lchan.

Adding this mode to the existing VTY command syntax would be confusing:

  channel allocator (ascending|desscending|dynamic)
                                           ^^^^^^^

so this patch extends the VTY syntax in a way that it becomes possible
to configure different channel allocator modes for different cases:

  OsmoBSC(config-net-bts)# channel allocator mode ?
    set-all     Set a single mode for all variants
    chan-req    Channel allocation for CHANNEL REQUEST (RACH)
    assignment  Channel allocation for assignment
    handover    Channel allocation for handover

The old command syntax, which is basically 'set-all', is kept for
backwards compatibility, but marked as deprecated.

Change-Id: I3ae73b36ee9433cc768376b56f0765e5f416162f
Related: SYS#5460
2022-06-30 16:36:41 +00:00
Vadim Yanitskiy 6411d95a6e VTY: cosmetic: define and use CHAN_ALLOC_{CMD,DESC}
Change-Id: I8e906a9c16247788eec8cd8d99f019b08dc5a8f1
Related: SYS#5460
2022-06-21 08:12:16 +00:00
Michael Iedema 3ef30f3424 Expand VTY option which controls use of TCH for signalling
For statistical clarity and site tuning, it is sometimes
desirable to completely disable the use of TCH for signaling.

In the existing version of this VTY command, there is no way to
accomplish this. We can only restrict TCH for signaling non-voice
related actions.

This patch deprecates 'allow-tch-for-signalling (0|1)' and
adds 'tch-signalling-policy (never|emergency|voice|always)' to
provide more options.

Change-Id: I4459941ddad4e4a3bec8409b180d9a23a735e640
2022-06-15 06:06:26 -07:00
Michael Iedema a7628d9cf0 stats: new trackers for lchan life duration (v2)
This patch adds two stats which track cummulative lchan lifetime by
type TCH and SDCCH. These new counters will accomplish two things:

1) Provide a glanceable way to see if lchan durations look healthy. When
examining a site, short-lived (<5s) and long-lived (>30s) TCH lchans
are difficult to tell apart. If we only see short-lived TCH lchans,
there is most likely an RF or signaling problem to investigate. This
new counter will expose channel ages in the VTY output

2) Provide a more accurate count for Erlangs per site. Currently, we
are basing Erlangs on active TCH channel counts per stats period. This
method skews high very quickly. Each active TCH in that period
translates into the full 10s of activity. This counter should improve
accuracy by two orders of magnitude.

Change-Id: Ie3771233ecbd4bc24a24fb22c1064a18e7b8b2b0
2022-05-23 02:20:12 -07:00
Pau Espin fa3e40e454 Revert "stats: new trackers for lchan life duration"
This reverts commit 5e2ac29703.

This patch was found to be a troublemaker regarding osmo-bsc
performance, since it's scheduling one timer every 100ms for each
channel. On a BSC with dozens of BTS, each with several TRX, this ends
up in a huge amount of timers scheduled in a tight timeframe, which ends
up in osmo-bsc spending CPU time getting in and out of the poll() main
loop.

Related: SYS#5922
Change-Id: Ibd5123e7f04ae8f4eb8f08b63525527f526f0b2c
2022-05-12 12:49:45 +02:00
Michael Iedema 5e2ac29703 stats: new trackers for lchan life duration
This patch adds two stats which track cummulative lchan lifetime by
type TCH and SDCCH. These new counters will accomplish two things:

1) Provide a glanceable way to see if lchan durations look healthy. When
examining a site, short-lived (<5s) and long-lived (>30s) TCH lchans
are difficult to tell apart. If we only see short-lived TCH lchans,
there is most likely an RF or signaling problem to investigate. This
new counter will expose channel ages in the VTY output

2) Provide a more accurate count for Erlangs per site. Currently, we
are basing Erlangs on active TCH channel counts per stats period. This
method skews high very quickly. Each active TCH in that period
translates into the full 10s of activity. This counter should improve
accuracy by two orders of magnitude.

Change-Id: I1b0670c47cb5e0b7776eda89d1e71545ba0e3347
2022-05-03 11:03:28 +00:00
Oliver Smith 159246f94f Check VTY config against features reported by BTS
* Don't copy features for osmo-bts and nanobts initially, wait until
  BTS reported its features
* Checks for BTS features in VTY cmds: pass if features are not known
  (not yet reported by the BTS), fail if the feature is missing
* Once BTS reports its features, check relevant VTY config parts again

Related: SYS#5922, OS#5538
Change-Id: I7fca42a39a4bc98a6ea8b9cfab28c4bad3a6a0aa
2022-05-02 15:21:28 +02:00
Pau Espin c3487dd19d Introduce VTY command 'ccch load-indication-period <0-255>'
Change-Id: Id9d23238863c02a72bcf32942f6b0d40be127904
2022-04-27 10:03:01 +00:00
Vadim Yanitskiy 7f3705742f VTY: clarify help for the Adaptive Multi Rate settings
* Always say 'codec mode', not just 'codec'.
* Suggest proper modes in AMR_{TH,HY}_HELP_STR.
* Use 3GPP's definition of threshold and hysteresis.
* Clarify that threshold and hysteresis values are in 0.5 dB steps.

Change-Id: I996eae8aafeb2850e5e1a6f5a7764d745e1289b5
Related: SYS#5917, OS#4984
2022-04-12 09:53:34 +03:00
Pau Espin 789d4e92c3 bts_vty.c: Fix typo in comment
Change-Id: Id4c49e93fe5b4eaa4efdac116df34853f359dd98
2022-03-18 20:00:25 +01:00
Vadim Yanitskiy c122c10f34 [overpower] By default, permit only for speech channels using AMR
Change-Id: I087025f9db59348f2f70d4a291f8d887644d6b17
Related: SYS#5319
2021-11-15 11:59:03 +00:00
Vadim Yanitskiy 335361fbeb [overpower] Allow configuring specific channel mode(s)
Change-Id: I34d29d7d0f66c629367f3d6e8a660e199ecbe080
Related: SYS#5319
2021-11-15 11:59:03 +00:00
Vadim Yanitskiy f59abedb24 struct gsm_bts: s/temporary_overpower/top_acch_cap/g
Let's have a short and consistent naming for both ACCH repetition
and temporary ACCH overpower structures, like it's done in osmo-bts.

Change-Id: I39b98dcd14219402959646524315d5afea7c08cf
Related: Ib1d51f91139b4c2fe794e37fc8543b2d7a9b9c07
2021-11-15 11:59:03 +00:00
Vadim Yanitskiy c8bd1eeaca struct gsm_bts: s/repeated_acch_policy/rep_acch_cap/g
Let's have a short and consistent naming for both ACCH repetition
and temporary ACCH overpower structures, like it's done in osmo-bts.

Change-Id: Ia12c83ad1af4744ce28ba655ac806784f746e88a
Related: Ib1d51f91139b4c2fe794e37fc8543b2d7a9b9c07
2021-11-15 11:59:03 +00:00
Vadim Yanitskiy e0b9a7fb6c bts_vty: fix tabs-vs-spaces issues in cfg_bts_rep_dl_facch
The linter (executed by Jenkins) complains:

  src/osmo-bsc/bts_vty.c:653: ERROR:CODE_INDENT: code indent should use tabs where possible
  src/osmo-bsc/bts_vty.c:654: ERROR:CODE_INDENT: code indent should use tabs where possible
  src/osmo-bsc/bts_vty.c:656: ERROR:CODE_INDENT: code indent should use tabs where possible
  src/osmo-bsc/bts_vty.c:657: ERROR:CODE_INDENT: code indent should use tabs where possible

and blocks changes, adding V-1 when I am changing the related code.

Change-Id: If3c8c09ddff7cb945425e74344ceb4da989ddffc
2021-11-15 11:59:03 +00:00
Vadim Yanitskiy b599a8baac [overpower] VTY: add more ACCH overpower related parameters
The new fields in 'struct abis_rsl_osmo_temp_ovp_acch_cap' allow:

  * selectively enabling SACCH and/or FACCH,
  * setting the RxQual (BER) threshold.

Change-Id: Ia2e01e11d718ea0ba2a7e49ae2b871d57991f31c
Depends: Ia28293a12de0af71f55e701fb65c46e905dae217
Related: SYS#5319
2021-10-24 13:55:51 +03:00
Vadim Yanitskiy 014f6232d5 [overpower] VTY: fix copy-pasted warning message
Change-Id: Ie0bc0b503c7c7e893b5c94597c84c47fa881874d
Related: SYS#5319
2021-10-21 18:12:04 +00:00
Vadim Yanitskiy 63cc810acc [overpower] VTY: cosmetic: fix lower case in command description
Change-Id: Iadce870b599b4af4269b9026bd8fbe746f1f4979
Related: SYS#5319
2021-10-21 18:12:04 +00:00
Pau Espin d203d173f2 MS Power Control Loop: Use P_CON_INTERVAL=2 by default
Increase the reaction time at the expense of more stable loop with less
temporary oscillations.

See updated user manual documentation in this commit for a larger
description.

Related: SYS#5371
Change-Id: I46be244a5e01a74086e3a977ec3ea139742a0074
2021-10-07 10:44:44 +00:00
Keith Whyte 2262245209 Implement MS Uplink Power Control Loop
* Adds vty option dyn-bsc for ms-power-control -> mode
* Imports power_control.c from osmo-bts project
  [at commit 2f3cd4b697972d8484f9a9d3b7ef634086f65fa5]
* Removes unused C/I code from osmo-bts's power_control.c

This patch then calls the power loop on receipt of measurement
reports and updates the MS Power Level accordingly.

Change-Id: Ibc307e758697eb5ca3fb86622f35709d6077db9e
2021-10-05 04:32:33 +00:00
Pau Espin 464227d071 MS Power Control Loop: Allow Turn off/on C/I independent from value setting
Improve the current VTY support to allow enabling/disabling C/I logic
independent from value setting. This way C/I support can be quickly
disabled & enabled.

Reminder: changing power parameters still require VTY Command "bts NR
resend-power-control-defaults" to be excuted prior to new parameters
being applied on the BTS.

Related: SYS#4917
Change-Id: Id1224c2d9a52db2ed805c49e048d3086ed0167f5
2021-09-29 15:39:17 +02:00
Pau Espin 1b90b3d27a bts_vty: Print C/I power params for osmo-bts only
Those are osmo-bts specific extensions, so there's no point in printing
related VTY config.

Change-Id: Ie85d2aefa1ab7bf943479e18cc79a0f56e54d431
2021-09-29 10:40:26 +00:00
Pau Espin df612507d6 MS Power Control Loop: Support turn off C/I based logic
Setting LOWER_CMP_N and UPPER_CMP_N for all channel types can be quite
cumbersome and end up in lengthy config files. Let's instead add a
placeholder command to apply it to all channel types of a BTS at once.
This is useful specially since a user disabling C/I capabilities
probably does so because it may require a fair amount of fine-tuning
parameters to have it working perfectly. Hence, a user not willing to
spend time configuring those parameters correctly (and for which default
ones doesn't work properly) will require quick way to get rid of C/I
based MS Power Control Loop. By disabling C/I comparison, osmo-bts will
rely on RxLev only when applying the MS Power Control Loop, which is
fine for non noisy environments.

Related: SYS#4917
Change-Id: I0e1a1a9228a15e9ec9c41b7952b03e1d25309706
2021-09-21 16:51:21 +02:00
Pau Espin 8367411772 Power Control Loop: Set P_CON_INTERVAL to 1 by default
TS 45.008 section 4.7.1:
"""
Upon receipt of a command from an SACCH to change its power level on the corresponding uplink channel, the MS
shall change to the new level at a rate of one nominal 2 dB power control step every 60 ms (13 TDMA frames), i.e. a
range change of 15 steps should take about 900 ms. The change shall commence at the first TDMA frame belonging to
the next reporting period (as specified in subclause 8.4). The MS shall change the power one nominal 2 dB step at a
time, at a rate of one step every 60 ms following the initial change, irrespective of whether actual transmission takes
place or not.
"""

Since the reported MS_PWR in L1 SACCH Header is, according to specs, the
one used for the last block of the previous SACCH period, it becomes
clear the first SACCH block after a requested MS Power Level change by
the network may contain mismatches between the announced MS_PWR by the
MS and the measured Rxlev/RxQual. Hence, let's better use a
P_CON_INTERVAL of 1 which retriggers the MS Power Control Loop every second
SACCH block.

Related: SYS#5371
Change-Id: Iade5b597e0e56b07c6d78995fcec7c641e4e643f
2021-09-13 17:48:48 +02:00
Pau Espin 54283ba626 MS Power Control Loop: Support set up of C/I parameters for osmo-bts
This commit extends existing VTY and RSL infrastructure to configure and
manage MS Power Parameters used in MS Power Control loop, by adding
support to set up Carrier-to-Interference (CI) parameters.

Using C/I instead of existing RxQual is preferred due to extended
granularity of C/I (bigger range than RxQual's 0-7).
Furthermore, existing literature (such as "GSM/EDGE: Evolution and Performance"
Table 10.3) provides detailed information about expected target values,
even different values for different channel types. Hence, it was decided
to support setting different MS Power Parameters for different channel
types.

These MS Power Parameters are Osmocom specific, ie. supported only by
newish versions of osmo-bts. Older versions of osmo-bts should ignore
the new IEs added just fine. The new IEs containing the MS POwer
Parameters are not send for non osmo-bts BTSs, hence this commit is
secure with regards to running  osmo-bsc against an ip.access BTS such
as nanoBTS.

Related: SYS#4917
Depends: libosmocore.git Change-Id Iffef0611430ad6c90606149c398d80158633bbca
Change-Id: I7e76ec47b323d469f777624b74b08752d1f5584f
2021-09-06 12:07:20 +02:00
Neels Hofmeyr 08de290aa8 add stat_items for BTS and TRX connection stati
So far we have stat items per BTS. Add stat items summing overall BTS
status.

Add stat items:
- num_bts:oml_connected
- num_bts:all_trx_rsl_connected
- num_bts:total
- num_trx:rsl_connected
- num_trx:total

Related: SYS#5542
Related: Ic1b35b7406547f92818afe399a2383d154576409 (osmo-ttcn3-hacks)
Change-Id: I2057a798e681a169cc03243a09b3d6449734c010
2021-09-05 16:24:18 +02:00
Philipp Maier 034cc1216a bty_vty: add VTY settungs for temporary overpower
To configure temporary overpower, new VTY commands are added. This patch
also addes the logic needed to attach the temporary overpower IE to the
RSL CHANNEL ACTIVATE message.

Change-Id: I488a91bb4ed86f630db56564a0cd293f39f0f690
Related: SYS#5319
2021-09-02 17:44:54 +00:00
Pau Espin fecf321a25 vty: Fix wrongs params passed in vty warning message
Change-Id: If1cc4c7fb70bd69cf8d1c0509e6be60ecae33685
2021-09-01 13:33:26 +02:00
Neels Hofmeyr a5d3c9d0f2 move BSC level stats and rate counters to new bsc_stats.[hc]
Instead of having static const structs in header files (which end up
duplicated in each and every compile unit!), have one .c file with the
rate_ctr and stat_item descriptions.

Related: SYS#5542
Change-Id: I8fd6380b5ae8ed2d3347e7cfbf674c30b6841ed9
2021-08-30 16:18:52 +00:00
Neels Hofmeyr c746509d3c early IMM ASS 3/n: implement 'pre-ts-ack'
Add experimental 'pre-ts-ack' to the 'immediate-assignment' options:
send the IMM ASS even before a dynamic timeslot is switched. This
possibly saves an Abis roundtrip, but may be racy.

When pre-ts-ack is chosen, already do the IMM ASS before the dyn TS
pchan switch is ACKed.

In Immediate Assignment, in case the dyn TS is not ready yet, get the
pchan kind from lchan->type, which already reflects the target type, and
not from ts->pchan_is, which still reflects the previous pchan type.

Related test is in I2ae28cd92910d4bc341a88571599347a64a18fe5

Related: SYS#5559
Change-Id: I19e6a3d614aa5ae24d64eed96caf53e6f0e8bb74
2021-08-16 02:13:17 +02:00
Neels Hofmeyr 225af37f48 early IMM ASS 1/n: add vty config option
This patch adds only the VTY config option without any effect, to ease
patch review.
The implementation follows in I56c25cde152040fb66bdba44399bd37671ae3df2

The new config option is written so that further variants of Immediate
Assignment sequencing may be added easily.
See also I19e6a3d614aa5ae24d64eed96caf53e6f0e8bb74.

Related: SYS#5559
Change-Id: I710343d1728153faf3db9758ff5a1ef26bb8d3d4
2021-08-16 02:13:17 +02:00
Pau Espin 56eda35874 Introduce VTY option to forbid use of TCH for non-voicecall signalling
Usual allocation mechansim, when some signalling channel is needed,
first tries to reserve an SDCCH, and if all of them are exhausted, then
attempts to reserve a TCH as a last resort.
This, however, may cause TCH starvation under certain situations, for
instance if there high load on other services (LU, SMS, etc.).
Hence, it may be desirable for the operator to forbid reservation
of TCH slots once SDCCH become exhausted. This commit is thus adding a
VTY command which allows forbidding it. The default behavior (allow using
TCH timeslots when SDCCHs are exhausted) is kept as before.

The above mentioned prohibition is applied only to non-voicecall related
signalling services. That's because voicecall services will end up
requiring a TCH anyway, and forbidding reservation of TCH straighaway
when SDCCHs are exhausted would mean no voice calls could be initiated
while still TCHs would be available.

Related: SYS#5548
Change-Id: Ib08027125145df26602069bfb51847063b0ccc0c
2021-07-23 13:36:03 +02:00
Pau Espin c8edaad0bf Split bts_vty.c creating bts_trx_vty.c
Change-Id: I15ec8f71a5d31915162cb3ad75ea77e934fa4887
2021-07-23 13:35:04 +02:00
Pau Espin e19289fb89 Split bsc_vty.c creating bts_vty.c
Change-Id: I347e7da328fed0733af2eec10a3ca6e02a148308
2021-07-22 17:26:56 +00:00