vty: Add support for Ny1 configuration

Related: OS#5475

Change-Id: I6318cceb4ebdce50005e39e2e9323c1c8433250a
This commit is contained in:
arehbein 2022-12-12 19:56:59 +01:00 committed by pespin
parent 8c8905302f
commit 9ff26123b3
6 changed files with 50 additions and 15 deletions

View File

@ -40,6 +40,17 @@
#define GSM_T3122_DEFAULT 10
#define GSM_T3105_DEFAULT 100UL
#define GSM_T3124_SDCCH 675UL
#define GSM_T3124_OTHER_CH 320UL
#define GSM_T3124_MAX GSM_T3124_SDCCH
/* Some guess for delta (see comment below) */
#define GSM_NY1_REQ_DELTA 1000UL
/* Requirements: We want Ny1 to be as low as possible, while respecting T3105 * Ny1 > T3124 + delta
* with delta = time between expiration of T3124 and receiving HANDOVER FAILURE by the serving BSC. */
#define GSM_NY1_DEFAULT ((unsigned long)((GSM_T3124_MAX + GSM_NY1_REQ_DELTA)/GSM_T3105_DEFAULT + 1))
struct mgcp_client_conf;
struct mgcp_client;
struct gsm0808_cell_id;

View File

@ -91,8 +91,8 @@ struct msgb *nanobts_gen_set_bts_attr(struct gsm_bts *bts)
/* BTS Air Timer (3GPP TS 12.21 sec 9.4.10), 10 milliseconds */
msgb_tv_put(msgb, NM_ATT_BTS_AIR_TIMER, osmo_tdef_get(bts->network->T_defs, 3105, OSMO_TDEF_MS, -1)/10);
/* NY1 (3GPP TS 12.21 sec 9.4.37), 10 retransmissions of physical config */
msgb_tv_put(msgb, NM_ATT_NY1, 10);
/* NY1 (3GPP TS 12.21 sec 9.4.37), number of retransmissions of physical config */
msgb_tv_put(msgb, NM_ATT_NY1, osmo_tdef_get(bts->network->T_defs, -3105, OSMO_TDEF_CUSTOM, -1));
/* BCCH ARFCN (3GPP TS 12.21 sec 9.4.8) */
buf[0] = (bts->c0->arfcn >> 8) & 0x0f;

View File

@ -36,7 +36,7 @@ static struct osmo_tdef gsm_network_T_defs[] = {
{ .T = 101, .default_val = 10, .desc = "inter-BSC/MSC Handover incoming, BSSMAP HO Request to HO Accept" },
{ .T = 3101, .default_val = 3, .desc = "RR Immediate Assignment" },
{ .T = 3103, .default_val = 5, .desc = "Handover" },
{ .T = 3105, .default_val = 100, .unit = OSMO_TDEF_MS, .desc = "Physical Information" },
{ .T = 3105, .default_val = GSM_T3105_DEFAULT, .unit = OSMO_TDEF_MS, .desc = "Physical Information" },
{ .T = 3107, .default_val = 5, .desc = "(unused)" },
{ .T = 3109, .default_val = 5, .desc = "RSL SACCH deactivation" },
{ .T = 3111, .default_val = 2, .desc = "Wait time before RSL RF Channel Release" },
@ -74,6 +74,8 @@ static struct osmo_tdef gsm_network_T_defs[] = {
" after this amount of idle time, forget internally cumulated time remainders. Zero to always"
" keep remainders. See also X16, X17." },
{ .T = -25, .default_val = 5, .desc = "Timeout for initial user data after an MSC initiated an SCCP connection to the BSS" },
{ .T = -3105, .default_val = GSM_NY1_DEFAULT, .unit = OSMO_TDEF_CUSTOM,
.desc = "Ny1: Maximum number of Physical Information (re)transmissions" },
{ .T = -3111, .default_val = 4, .desc = "Wait time after lchan was released in error (should be T3111 + 2s)" },
{ .T = -3113, .default_val = PAGING_THRESHOLD_X3113_DEFAULT_SEC,
.desc = "Maximum Paging Request Transmit Delay Threshold: " \

View File

@ -25,6 +25,7 @@
#include <osmocom/bsc/bts.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/tdef.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/application.h>
#include <osmocom/core/sockaddr_str.h>
@ -125,9 +126,11 @@ static const struct log_info log_info = {
};
static struct osmo_tdef gsm_network_T_defs[] = {
{ .T = 3105, .default_val = 100, .val = 13, .unit = OSMO_TDEF_MS, .desc = "Physical Information" },
{ .T = 3212, .default_val = 5, .unit = OSMO_TDEF_CUSTOM,
{ .T = 3105, .default_val = GSM_T3105_DEFAULT, .val = GSM_T3105_DEFAULT, .min_val = 0, .max_val = UINT8_MAX, .unit = OSMO_TDEF_MS, .desc = "Physical Information" },
{ .T = 3212, .default_val = 5, .unit = OSMO_TDEF_CUSTOM, .min_val = 0, .max_val = UINT8_MAX,
.desc = "Periodic Location Update timer, sent to MS (1 = 6 minutes)" },
{ .T = -3105, .default_val = GSM_NY1_DEFAULT, .val = GSM_NY1_DEFAULT, .min_val = 0, .max_val = UINT8_MAX, .unit = OSMO_TDEF_CUSTOM,
.desc = "Ny1: Maximum number of Physical Information (re)transmissions" },
{}
};
@ -163,14 +166,31 @@ int main(int argc, char **argv)
bts->location_area_code = 0x0001;
bts->gprs.rac = 0;
uint8_t attr_bts_expected[] =
{ 0x19, 0x73, 0x6d, 0x67, 0x61, 0x5b, 0x55, 0x18, 0x06, 0x0e, 0x00,
0x02, 0x01, 0x20, 0x33, 0x1e, 0x24, 0x24, 0xa8, 0x34, 0x21,
0xa8, 0x1f, 0x3f, 0x25,
0x00, 0x01, 0x0a, 0x0c, 0x0a, 0x0b, 0x01, 0x2a, 0x5a, 0x2b,
0x03, 0xe8, 0x0a, 0x01,
0x23, 0x0a, 0x08, 0x03, 0x62, 0x09, 0x3f, 0x99, 0x00, 0x07,
0x00, 0xf1, 0x10, 0x00,
0x01, 0x05, 0x39
{ 0x19, 0x73, 0x6d, 0x67, 0x61, 0x5b, 0x55,
/* 0x18 Intave Parameter */
0x18, 0x06,
/* 0x0e: Connection Failure Criterion, rlt == 0x20 */
0x0e, 0x00, 0x02, 0x01, 0x20,
/* 0x33: T200 */
0x33, 0x1e, 0x24, 0x24, 0xa8, 0x34, 0x21, 0xa8,
/* 0x1f: Max Timing Advance */
0x1f, 0x3f,
/* 0x25: Overload Period */
0x25, 0x00, 0x01, 0x0a,
/* 0x0c CCCH Load Threshold */
0x0c, 0x0a,
/* 0x0b CCCH Load Indication Period */
0x0b, 0x01,
/* 0x2a: RACH Busy Threshold */
0x2a, 0x5a,
/* 0x2b: RACH Load Averaging Slots */
0x2b, 0x03, 0xe8,
/* 0x0a: BTS Air Timer */
0x0a, 0x0a,
/* Ny1 */
0x23, 0x11,
0x08, 0x03, 0x62, 0x09, 0x3f, 0x99, 0x00, 0x07,
0x00, 0xf1, 0x10, 0x00, 0x01, 0x05, 0x39
};
/* Parameters needed to test nanobts_gen_set_nse_attr() */

View File

@ -1,6 +1,6 @@
Testing nanobts_gen_set_bts_attr()...
result= 19736d67615b5518060e00020120331e2424a83421a81f3f2500010a0c0a0b012a5a2b03e80a01230a080362093f99000700f11000010539
expected=19736d67615b5518060e00020120331e2424a83421a81f3f2500010a0c0a0b012a5a2b03e80a01230a080362093f99000700f11000010539
result= 19736d67615b5518060e00020120331e2424a83421a81f3f2500010a0c0a0b012a5a2b03e80a0a2311080362093f99000700f11000010539
expected=19736d67615b5518060e00020120331e2424a83421a81f3f2500010a0c0a0b012a5a2b03e80a0a2311080362093f99000700f11000010539
ok.
Testing nanobts_gen_set_nse_attr()...

View File

@ -34,6 +34,7 @@ net: X16 = 1000 ms Granularity for all_allocated:* rate counters: amount of mill
net: X17 = 0 ms Rounding threshold for all_allocated:* rate counters: round up to the next counter increment after this many milliseconds. If set to half of X16 (or 0), employ the usual round() behavior: round up after half of a granularity period. If set to 1, behave like ceil(): already increment the counter immediately when all channels are allocated. If set >= X16, behave like floor(): only increment after a full X16 period of all channels being occupied. See also X16, X18 (default: 0 ms)
net: X18 = 60000 ms Forget-sum period for all_allocated:* rate counters: after this amount of idle time, forget internally cumulated time remainders. Zero to always keep remainders. See also X16, X17. (default: 60000 ms)
net: X25 = 5 s Timeout for initial user data after an MSC initiated an SCCP connection to the BSS (default: 5 s)
net: X3105 = 17 Ny1: Maximum number of Physical Information (re)transmissions (default: 17)
net: X3111 = 4 s Wait time after lchan was released in error (should be T3111 + 2s) (default: 4 s)
net: X3113 = 60 s Maximum Paging Request Transmit Delay Threshold: If the estimated transmit delay of the messages in the paging queue surpasses this threshold, then new incoming paging requests will if possible replace a request in retransmission state from the queue or otherwise be discarded, hence limiting the size of the queue and maximum delay of its scheduled requests. X3113 also serves as the upper boundary for dynamic T3113 when estimating the expected maximum delay to get a response (default: 60 s)
net: X3210 = 20 s After L3 Complete, wait for MSC to confirm (default: 20 s)
@ -89,6 +90,7 @@ net: X16 = 1000 ms Granularity for all_allocated:* rate counters: amount of mill
net: X17 = 0 ms Rounding threshold for all_allocated:* rate counters: round up to the next counter increment after this many milliseconds. If set to half of X16 (or 0), employ the usual round() behavior: round up after half of a granularity period. If set to 1, behave like ceil(): already increment the counter immediately when all channels are allocated. If set >= X16, behave like floor(): only increment after a full X16 period of all channels being occupied. See also X16, X18 (default: 0 ms)
net: X18 = 60000 ms Forget-sum period for all_allocated:* rate counters: after this amount of idle time, forget internally cumulated time remainders. Zero to always keep remainders. See also X16, X17. (default: 60000 ms)
net: X25 = 5 s Timeout for initial user data after an MSC initiated an SCCP connection to the BSS (default: 5 s)
net: X3105 = 17 Ny1: Maximum number of Physical Information (re)transmissions (default: 17)
net: X3111 = 4 s Wait time after lchan was released in error (should be T3111 + 2s) (default: 4 s)
net: X3113 = 60 s Maximum Paging Request Transmit Delay Threshold: If the estimated transmit delay of the messages in the paging queue surpasses this threshold, then new incoming paging requests will if possible replace a request in retransmission state from the queue or otherwise be discarded, hence limiting the size of the queue and maximum delay of its scheduled requests. X3113 also serves as the upper boundary for dynamic T3113 when estimating the expected maximum delay to get a response (default: 60 s)
net: X3210 = 20 s After L3 Complete, wait for MSC to confirm (default: 20 s)