pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bsc/+/30539 )
Change subject: vty: Add support for Ny1 configuration
......................................................................
vty: Add support for Ny1 configuration
Related: OS#5475
Change-Id: I6318cceb4ebdce50005e39e2e9323c1c8433250a
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
M src/osmo-bsc/net_init.c
M tests/nanobts_omlattr/nanobts_omlattr_test.c
M tests/nanobts_omlattr/nanobts_omlattr_test.ok
M tests/timer.vty
6 files changed, 50 insertions(+), 15 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 9300dfa..44a9d5e 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -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;
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
index 4fa69fb..14451f8 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
@@ -91,8 +91,8 @@
/* 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;
diff --git a/src/osmo-bsc/net_init.c b/src/osmo-bsc/net_init.c
index ad2f8c4..8a508dd 100644
--- a/src/osmo-bsc/net_init.c
+++ b/src/osmo-bsc/net_init.c
@@ -36,7 +36,7 @@
{ .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 @@
" 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: " \
diff --git a/tests/nanobts_omlattr/nanobts_omlattr_test.c
b/tests/nanobts_omlattr/nanobts_omlattr_test.c
index 3569327..ba58e45 100644
--- a/tests/nanobts_omlattr/nanobts_omlattr_test.c
+++ b/tests/nanobts_omlattr/nanobts_omlattr_test.c
@@ -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 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 @@
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() */
diff --git a/tests/nanobts_omlattr/nanobts_omlattr_test.ok
b/tests/nanobts_omlattr/nanobts_omlattr_test.ok
index b011ed4..5f90769 100644
--- a/tests/nanobts_omlattr/nanobts_omlattr_test.ok
+++ b/tests/nanobts_omlattr/nanobts_omlattr_test.ok
@@ -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()...
diff --git a/tests/timer.vty b/tests/timer.vty
index 9573a09..6d6efe8 100644
--- a/tests/timer.vty
+++ b/tests/timer.vty
@@ -34,6 +34,7 @@
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: 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)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30539
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I6318cceb4ebdce50005e39e2e9323c1c8433250a
Gerrit-Change-Number: 30539
Gerrit-PatchSet: 15
Gerrit-Owner: arehbein <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged