aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarehbein <arehbein@sysmocom.de>2023-09-20 16:18:20 +0200
committerarehbein <arehbein@sysmocom.de>2023-11-20 00:08:04 +0100
commite2acba5cfa34fa0860a2c2dcaac3e8b1843bd3b6 (patch)
treea649c06541055d5a01821f9dc0403668be9918d4
parent1df2167748256c6d61a4f3f06898f85db1d1c6c5 (diff)
Make NSE timing data configurablearehbein/rlc_timer_cfg_wip
Also: Deprecate/hide old respective VTY command, while preserving backwards compatibility for NSE timing data configuration. Related: OS#5335 Change-Id: Ie46ec5cb7095bc1dfe3effd0e76d6ccfd6bd2f3f
-rw-r--r--include/osmocom/bsc/bts.h13
-rw-r--r--include/osmocom/bsc/bts_sm.h1
-rw-r--r--include/osmocom/bsc/vty.h3
-rw-r--r--src/osmo-bsc/bsc_vty.c8
-rw-r--r--src/osmo-bsc/bts_init.c26
-rw-r--r--src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c16
-rw-r--r--src/osmo-bsc/bts_sm.c7
-rw-r--r--src/osmo-bsc/bts_vty.c42
-rw-r--r--src/osmo-bsc/pcu_sock.c40
-rw-r--r--tests/bts_features.vty39
-rw-r--r--tests/gprs_params.vty7
-rw-r--r--tests/nanobts_omlattr/nanobts_omlattr_test.c27
12 files changed, 159 insertions, 70 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index f5a2a78b9..79c615bdb 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -320,9 +320,18 @@ struct gsm_bts_model {
bool features_get_reported;
};
+/* RLC */
#define GSM_BTS_TDEF_ID_COUNTDOWN_VALUE (-1)
#define GSM_BTS_TDEF_ID_UL_TBF_EXT (-2)
#define GSM_BTS_TDEF_ID_DL_TBF_DELAYED (-3)
+/* NS */
+#define GSM_BTS_TDEF_ID_TNS_BLOCK (-21)
+#define GSM_BTS_TDEF_ID_TNS_BLOCK_RETRIES (-22)
+#define GSM_BTS_TDEF_ID_TNS_RESET (-23)
+#define GSM_BTS_TDEF_ID_TNS_RESET_RETRIES (-24)
+#define GSM_BTS_TDEF_ID_TNS_TEST (-25)
+#define GSM_BTS_TDEF_ID_TNS_ALIVE (-26)
+#define GSM_BTS_TDEF_ID_TNS_ALIVE_RETRIES (-27)
/* 3GPP TS 04.60 V8.27.0 (2005-09) */
#define GSM_RLCMACN3101_STRICT_LOWER_BOUND 8UL
@@ -337,10 +346,10 @@ struct gsm_gprs_cell {
/* Used for indexing tdef group arrays */
enum gsm_gprs_bts_tdef_groups {
OSMO_BSC_BTS_TDEF_GROUPS_RLC = 0,
- /* TODO: Add additional groups here (BSSGP, NS) */
+ OSMO_BSC_BTS_TDEF_GROUPS_NS,
+ /* TODO: Add additional group here (BSSGP) */
_NUM_OSMO_BSC_BTS_TDEF_GROUPS
};
-extern const size_t bts_gprs_rlc_timer_templates_bytes;
extern struct osmo_tdef_group bts_gprs_timer_template_groups[_NUM_OSMO_BSC_BTS_TDEF_GROUPS + 1];
/* One BTS */
diff --git a/include/osmocom/bsc/bts_sm.h b/include/osmocom/bsc/bts_sm.h
index e25b8dac0..a38ba4687 100644
--- a/include/osmocom/bsc/bts_sm.h
+++ b/include/osmocom/bsc/bts_sm.h
@@ -32,7 +32,6 @@ struct gsm_bts;
struct gsm_gprs_nse {
struct gsm_abis_mo mo;
uint16_t nsei;
- uint8_t timer[7];
};
struct gsm_gprs_nsvc {
diff --git a/include/osmocom/bsc/vty.h b/include/osmocom/bsc/vty.h
index 33207a15e..5d449b5ef 100644
--- a/include/osmocom/bsc/vty.h
+++ b/include/osmocom/bsc/vty.h
@@ -100,6 +100,9 @@ enum bsc_vty_cmd_attr {
/* Defines for per-BTS string commands */
#define BTS_VTY_RLC_STR "rlc"
+#define BTS_VTY_RLC_DESC_STR "RLC (Radio Link Control)"
+#define BTS_VTY_NS_STR "ns"
+#define BTS_VTY_NS_DESC_STR "ns"
/* Add additional group strings for vty command generation here */
#define BTS_VTY_SHOW_TIMER_STR BTS_SHOW_TIMER_STR_NONEWLINE " & for this BTS\n"
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 669e94276..024f61c5e 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -320,16 +320,16 @@ DEFUN(show_bts_fail_rep, show_bts_fail_rep_cmd, "show bts <0-255> fail-rep [rese
return CMD_SUCCESS;
}
-/* TODO: Add other options for group argument bssgp, ns '[(rlc|bssgp|ns)]' when adding additional timer groups.
- * (Assume that with two args, the first is always the group. The second is always the timer) */
+/* TODO: Add other option for group argument bssgp -> '[(rlc|bssgp|ns)]' when adding additional timer groups. */
DEFUN(show_bts_rlc_timer, show_bts_rlc_timer_cmd,
- "show bts <0-255> gprs timer [" BTS_VTY_RLC_STR "] " OSMO_TDEF_VTY_ARG_T_OPTIONAL,
+ "show bts <0-255> gprs timer [(" BTS_VTY_RLC_STR "|" BTS_VTY_NS_STR ")] " OSMO_TDEF_VTY_ARG_T_OPTIONAL,
SHOW_STR
BTS_STR
BTS_NUM_STR
"GPRS Packet Network\n"
BTS_SHOW_TIMER_STR
- "RLC (Radio Link Control)\n"
+ BTS_VTY_RLC_DESC_STR "\n"
+ BTS_VTY_NS_DESC_STR "\n"
OSMO_TDEF_VTY_DOC_T)
{
struct gsm_network *net = gsmnet_from_vty(vty);
diff --git a/src/osmo-bsc/bts_init.c b/src/osmo-bsc/bts_init.c
index a4a4320e0..c838e1b33 100644
--- a/src/osmo-bsc/bts_init.c
+++ b/src/osmo-bsc/bts_init.c
@@ -73,10 +73,31 @@ static struct osmo_tdef bts_gprs_rlc_timer_templates[] = {
{}
};
+static struct osmo_tdef bts_gprs_ns_timer_templates[] = {
+ { .T = GSM_BTS_TDEF_ID_TNS_BLOCK, .default_val = 3, .min_val = 0, .max_val = UINT8_MAX,
+ .desc = "Tns-block: Guards the blocking and unblocking procedures" },
+ { .T = GSM_BTS_TDEF_ID_TNS_BLOCK_RETRIES, .default_val = 3, .min_val = 0, .max_val = UINT8_MAX,
+ .desc = "NS-BLOCK-RETRIES: Blocking procedure retries", .unit = OSMO_TDEF_CUSTOM },
+ { .T = GSM_BTS_TDEF_ID_TNS_RESET, .default_val = 3, .min_val = 0, .max_val = UINT8_MAX,
+ .desc = "Tns-reset: Guards the reset procedure" },
+ { .T = GSM_BTS_TDEF_ID_TNS_RESET_RETRIES, .default_val = 3, .min_val = 0, .max_val = UINT8_MAX,
+ .desc = "Reset procedure retries", .unit = OSMO_TDEF_CUSTOM },
+ { .T = GSM_BTS_TDEF_ID_TNS_TEST, .default_val = 30, .min_val = 0, .max_val = UINT8_MAX,
+ .desc = "Tns-test: Periodicity of the NS-VC test procedure" },
+ { .T = GSM_BTS_TDEF_ID_TNS_ALIVE, .default_val = 3, .min_val = 0, .max_val = UINT8_MAX,
+ .desc = "Tns-alive: Guards the NS-VC test procedure" },
+ { .T = GSM_BTS_TDEF_ID_TNS_ALIVE_RETRIES, .default_val = 10, .min_val = 0, .max_val = UINT8_MAX,
+ .desc = "NS-ALIVE-RETRIES: Retries for the the NS-VC test procedure", .unit = OSMO_TDEF_CUSTOM },
+ {}
+};
+
+
/* This is only used by bts_vty.c to init the default values for the templates */
struct osmo_tdef_group bts_gprs_timer_template_groups[_NUM_OSMO_BSC_BTS_TDEF_GROUPS + 1] = {
[OSMO_BSC_BTS_TDEF_GROUPS_RLC] = {
- .name = BTS_VTY_RLC_STR, .tdefs = bts_gprs_rlc_timer_templates, .desc = "RLC (Radio Link Control)" },
+ .name = BTS_VTY_RLC_STR, .tdefs = bts_gprs_rlc_timer_templates, .desc = BTS_VTY_RLC_DESC_STR },
+ [OSMO_BSC_BTS_TDEF_GROUPS_NS] = {
+ .name = BTS_VTY_NS_STR, .tdefs = bts_gprs_ns_timer_templates, .desc = BTS_VTY_NS_DESC_STR },
/* Additional per-BTS timer groups here, set as above using 'enum gprs_bts_tdef_groups' */
{}
};
@@ -90,6 +111,9 @@ void bts_gprs_timer_groups_init(struct gsm_bts *bts)
/* Init per-BTS RLC timers */
bts->timer_groups[OSMO_BSC_BTS_TDEF_GROUPS_RLC].tdefs = talloc_memdup(bts, bts_gprs_rlc_timer_templates, sizeof(bts_gprs_rlc_timer_templates));
OSMO_ASSERT(bts->timer_groups[OSMO_BSC_BTS_TDEF_GROUPS_RLC].tdefs);
+ /* Init per-BTS NS timers */
+ bts->timer_groups[OSMO_BSC_BTS_TDEF_GROUPS_NS].tdefs = talloc_memdup(bts, bts_gprs_ns_timer_templates, sizeof(bts_gprs_ns_timer_templates));
+ OSMO_ASSERT(bts->timer_groups[OSMO_BSC_BTS_TDEF_GROUPS_NS].tdefs);
}
/* Init default values for all per-BTS timer templates */
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
index 6fdcfa774..d19220e15 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
@@ -184,6 +184,7 @@ struct msgb *nanobts_gen_set_nse_attr(struct gsm_bts_sm *bts_sm)
struct abis_nm_ipacc_att_ns_cfg ns_cfg;
struct abis_nm_ipacc_att_bssgp_cfg bssgp_cfg;
struct gsm_bts *bts = gsm_bts_sm_get_bts(bts_sm);
+ const struct osmo_tdef_group *nstg = &bts->timer_groups[OSMO_BSC_BTS_TDEF_GROUPS_NS];
msgb = msgb_alloc(1024, __func__);
if (!msgb)
@@ -194,15 +195,14 @@ struct msgb *nanobts_gen_set_nse_attr(struct gsm_bts_sm *bts_sm)
buf[1] = bts_sm->gprs.nse.nsei & 0xff;
msgb_tl16v_put(msgb, NM_ATT_IPACC_NSEI, 2, buf);
- osmo_static_assert(ARRAY_SIZE(bts_sm->gprs.nse.timer) == 7, nse_timer_array_wrong_size);
ns_cfg = (struct abis_nm_ipacc_att_ns_cfg){
- .un_blocking_timer = bts_sm->gprs.nse.timer[0],
- .un_blocking_retries = bts_sm->gprs.nse.timer[1],
- .reset_timer = bts_sm->gprs.nse.timer[2],
- .reset_retries = bts_sm->gprs.nse.timer[3],
- .test_timer = bts_sm->gprs.nse.timer[4],
- .alive_timer = bts_sm->gprs.nse.timer[5],
- .alive_retries = bts_sm->gprs.nse.timer[6],
+ .un_blocking_timer = osmo_tdef_get(nstg->tdefs, GSM_BTS_TDEF_ID_TNS_BLOCK, OSMO_TDEF_S, -1),
+ .un_blocking_retries = osmo_tdef_get(nstg->tdefs, GSM_BTS_TDEF_ID_TNS_BLOCK_RETRIES, OSMO_TDEF_CUSTOM, -1),
+ .reset_timer = osmo_tdef_get(nstg->tdefs, GSM_BTS_TDEF_ID_TNS_RESET, OSMO_TDEF_S, -1),
+ .reset_retries = osmo_tdef_get(nstg->tdefs, GSM_BTS_TDEF_ID_TNS_RESET_RETRIES, OSMO_TDEF_CUSTOM, -1),
+ .test_timer = osmo_tdef_get(nstg->tdefs, GSM_BTS_TDEF_ID_TNS_TEST, OSMO_TDEF_S, -1),
+ .alive_timer = osmo_tdef_get(nstg->tdefs, GSM_BTS_TDEF_ID_TNS_ALIVE, OSMO_TDEF_S, -1),
+ .alive_retries = osmo_tdef_get(nstg->tdefs, GSM_BTS_TDEF_ID_TNS_ALIVE_RETRIES, OSMO_TDEF_CUSTOM, -1),
};
msgb_tl16v_put(msgb, NM_ATT_IPACC_NS_CFG, sizeof(ns_cfg), (const uint8_t *)&ns_cfg);
diff --git a/src/osmo-bsc/bts_sm.c b/src/osmo-bsc/bts_sm.c
index ca572f146..8a9634ba3 100644
--- a/src/osmo-bsc/bts_sm.c
+++ b/src/osmo-bsc/bts_sm.c
@@ -26,8 +26,6 @@
#include <osmocom/bsc/debug.h>
#include <osmocom/bsc/nm_common_fsm.h>
-static const uint8_t bts_nse_timer_default[] = { 3, 3, 3, 3, 30, 3, 10 };
-
static int gsm_bts_sm_talloc_destructor(struct gsm_bts_sm *bts_sm)
{
int i;
@@ -76,8 +74,6 @@ struct gsm_bts_sm *gsm_bts_sm_alloc(struct gsm_network *net, uint8_t bts_num)
LOGL_INFO, NULL);
osmo_fsm_inst_update_id_f(bts_sm->gprs.nse.mo.fi, "nse%d", bts_num);
gsm_mo_init(&bts_sm->gprs.nse.mo, bts, NM_OC_GPRS_NSE, bts->nr, 0xff, 0xff);
- memcpy(&bts_sm->gprs.nse.timer, bts_nse_timer_default,
- sizeof(bts_sm->gprs.nse.timer));
for (i = 0; i < ARRAY_SIZE(bts_sm->gprs.nsvc); i++) {
bts_sm->gprs.nsvc[i].bts = bts;
@@ -91,8 +87,7 @@ struct gsm_bts_sm *gsm_bts_sm_alloc(struct gsm_network *net, uint8_t bts_num)
gsm_mo_init(&bts_sm->gprs.nsvc[i].mo, bts, NM_OC_GPRS_NSVC,
bts->nr, i, 0xff);
}
- memcpy(&bts_sm->gprs.nse.timer, bts_nse_timer_default,
- sizeof(bts_sm->gprs.nse.timer));
+
gsm_mo_init(&bts_sm->gprs.nse.mo, bts, NM_OC_GPRS_NSE,
bts->nr, 0xff, 0xff);
diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c
index 1d265ce78..77bab3e15 100644
--- a/src/osmo-bsc/bts_vty.c
+++ b/src/osmo-bsc/bts_vty.c
@@ -59,6 +59,8 @@
#define X(x) (1 << x)
+extern struct osmo_tdef gsm_network_T_defs[];
+
/* FIXME: this should go to some common file */
static const struct value_string gprs_ns_timer_strs[] = {
{ 0, "tns-block" },
@@ -1655,8 +1657,24 @@ DEFUN_ATTR(cfg_bts_pag_free, cfg_bts_pag_free_cmd,
return CMD_SUCCESS;
}
-DEFUN_USRATTR(cfg_bts_gprs_ns_timer,
+#define TDEF_DATA_ID_IDX 0
+#define TDEF_DATA_UNIT_IDX 1
+/* Indices here correspond to those in gprs_ns_timer_str. Each row contains information for setting the respective tdef */
+static const int gprs_ns_timer_tdef_data[][2] = {
+ [0] = { GSM_BTS_TDEF_ID_TNS_BLOCK, OSMO_TDEF_S },
+ [1] = { GSM_BTS_TDEF_ID_TNS_BLOCK_RETRIES, OSMO_TDEF_CUSTOM },
+ [2] = { GSM_BTS_TDEF_ID_TNS_RESET, OSMO_TDEF_S },
+ [3] = { GSM_BTS_TDEF_ID_TNS_RESET_RETRIES, OSMO_TDEF_CUSTOM },
+ [4] = { GSM_BTS_TDEF_ID_TNS_TEST, OSMO_TDEF_S},
+ [5] = { GSM_BTS_TDEF_ID_TNS_ALIVE, OSMO_TDEF_S},
+ [6] = { GSM_BTS_TDEF_ID_TNS_ALIVE_RETRIES, OSMO_TDEF_CUSTOM },
+};
+
+static struct cmd_element cfg_gprs_timer_cmd;
+
+DEFUN_ATTR_USRATTR(cfg_bts_gprs_ns_timer,
cfg_bts_gprs_ns_timer_cmd,
+ CMD_ATTR_DEPRECATED,
X(BSC_VTY_ATTR_RESTART_ABIS_OML_LINK),
"gprs ns timer " NS_TIMERS " <0-255>",
GPRS_TEXT "Network Service\n"
@@ -1664,16 +1682,20 @@ DEFUN_USRATTR(cfg_bts_gprs_ns_timer,
NS_TIMERS_HELP "Timer Value\n")
{
struct gsm_bts *bts = vty->index;
- int idx = get_string_value(gprs_ns_timer_strs, argv[0]);
- int val = atoi(argv[1]);
+ int idx = get_string_value(gprs_ns_timer_strs, argv[0]), val = atoi(argv[1]);
+ const int *tdef_params;
+ const struct osmo_tdef_group *bts_ns = &bts->timer_groups[OSMO_BSC_BTS_TDEF_GROUPS_NS];
+
+ vty_out(vty, "This command is deprecated; use '%s' instead%s", cfg_gprs_timer_cmd.string, VTY_NEWLINE);
GPRS_CHECK_ENABLED(bts);
- if (idx < 0 || idx >= ARRAY_SIZE(bts->site_mgr->gprs.nse.timer))
+ if (idx < 0 || idx >= ARRAY_SIZE(gprs_ns_timer_tdef_data))
return CMD_WARNING;
- bts->site_mgr->gprs.nse.timer[idx] = val;
-
+ tdef_params = gprs_ns_timer_tdef_data[idx];
+ if (osmo_tdef_set(bts_ns->tdefs, tdef_params[TDEF_DATA_ID_IDX], val, tdef_params[TDEF_DATA_UNIT_IDX]) < 0)
+ return CMD_WARNING;
return CMD_SUCCESS;
}
@@ -1893,7 +1915,7 @@ DEFUN_USRATTR(cfg_bts_gprs_egprs_pkt_chan_req,
/* Adapted from libosmocore.git:src/vty/tdef_vty.c. cmdstr/helpstr args set by bts_vty_tdef_cmds_init()
* The group argument is optional here (if omitted, all timer groups will be searched) */
DEFUN(show_gprs_timer, show_gprs_timer_cmd, NULL, NULL)
- /* show gprs timer [(rlc)] [TNNNN] */
+ /* show gprs timer [(rlc|ns)] [TNNNN] */
{
const char *group_arg = argc >= 1 ? argv[0] : NULL;
const char *T_arg = argc >= 2 ? argv[1] : NULL;
@@ -1912,7 +1934,7 @@ DEFUN(show_gprs_timer, show_gprs_timer_cmd, NULL, NULL)
/* Adapted from libosmocore.git:src/vty/tdef_vty.c. cmdstr/helpstr args set by bts_vty_tdef_cmds_init().
* The group argument is optional here (if omitted, all timer groups will be searched) */
DEFUN(cfg_gprs_timer, cfg_gprs_timer_cmd, NULL, NULL)
- /* gprs timer [rlc] [TNNNN] [(<0-2147483647>|default)] */
+ /* gprs timer [(rlc|ns)] [TNNNN] [(<0-2147483647>|default)] */
{
const char **timer_args;
struct osmo_tdef_group *g = NULL;
@@ -4342,10 +4364,6 @@ static void config_write_bts_gprs(struct vty *vty, struct gsm_bts *bts)
bts->gprs.cell.timer[i], VTY_NEWLINE);
vty_out(vty, " gprs nsei %u%s", bts_sm->gprs.nse.nsei,
VTY_NEWLINE);
- for (i = 0; i < ARRAY_SIZE(bts_sm->gprs.nse.timer); i++)
- vty_out(vty, " gprs ns timer %s %u%s",
- get_value_string(gprs_ns_timer_strs, i),
- bts_sm->gprs.nse.timer[i], VTY_NEWLINE);
for (i = 0; i < ARRAY_SIZE(bts_sm->gprs.nsvc); i++) {
const struct gsm_gprs_nsvc *nsvc = &bts_sm->gprs.nsvc[i];
struct osmo_sockaddr_str remote;
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index 8942b78f9..192cef322 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -181,7 +181,7 @@ static int pcu_tx_info_ind(struct gsm_bts *bts)
struct gsm_pcu_if *pcu_prim;
struct gsm_pcu_if_info_ind *info_ind;
struct gprs_rlc_cfg *rlcc;
- const struct osmo_tdef_group *rlctg = &bts->timer_groups[OSMO_BSC_BTS_TDEF_GROUPS_RLC];
+ const struct osmo_tdef_group *g;
struct gsm_bts_sm *bts_sm;
struct gsm_gprs_nsvc *nsvc;
struct gsm_bts_trx *trx;
@@ -211,29 +211,35 @@ static int pcu_tx_info_ind(struct gsm_bts *bts)
info_ind->rac = bts->gprs.rac;
/* NSE */
+ g = &bts->timer_groups[OSMO_BSC_BTS_TDEF_GROUPS_NS];
info_ind->nsei = bts_sm->gprs.nse.nsei;
- memcpy(info_ind->nse_timer, bts_sm->gprs.nse.timer, 7);
+ info_ind->nse_timer[0] = osmo_tdef_get(g->tdefs, GSM_BTS_TDEF_ID_TNS_BLOCK, OSMO_TDEF_S, -1);
+ info_ind->nse_timer[1] = osmo_tdef_get(g->tdefs, GSM_BTS_TDEF_ID_TNS_BLOCK_RETRIES, OSMO_TDEF_CUSTOM, -1);
+ info_ind->nse_timer[2] = osmo_tdef_get(g->tdefs, GSM_BTS_TDEF_ID_TNS_RESET, OSMO_TDEF_S, -1);
+ info_ind->nse_timer[3] = osmo_tdef_get(g->tdefs, GSM_BTS_TDEF_ID_TNS_RESET_RETRIES, OSMO_TDEF_CUSTOM, -1);
+ info_ind->nse_timer[4] = osmo_tdef_get(g->tdefs, GSM_BTS_TDEF_ID_TNS_TEST, OSMO_TDEF_S, -1);
+ /* Communicating TNS Alive/having it con->tdefs,igurable for backwards compatibility */
+ info_ind->nse_timer[5] = osmo_tdef_get(g->tdefs, GSM_BTS_TDEF_ID_TNS_ALIVE, OSMO_TDEF_S, -1);
+ info_ind->nse_timer[6] = osmo_tdef_get(g->tdefs, GSM_BTS_TDEF_ID_TNS_ALIVE_RETRIES, OSMO_TDEF_CUSTOM, -1);
memcpy(info_ind->cell_timer, bts->gprs.cell.timer, 11);
/* cell attributes */
+ g = &bts->timer_groups[OSMO_BSC_BTS_TDEF_GROUPS_RLC];
info_ind->bsic = bts->bsic;
info_ind->cell_id = bts->cell_identity;
info_ind->repeat_time = rlcc->paging.repeat_time;
info_ind->repeat_count = rlcc->paging.repeat_count;
info_ind->bvci = bts->gprs.cell.bvci;
- info_ind->t3142 = osmo_tdef_get(rlctg->tdefs, 3142, OSMO_TDEF_S, -1);
- info_ind->t3169 = osmo_tdef_get(rlctg->tdefs, 3169, OSMO_TDEF_S, -1);
- info_ind->t3191 = osmo_tdef_get(rlctg->tdefs, 3191, OSMO_TDEF_S, -1);
- info_ind->t3193_10ms = osmo_tdef_get(rlctg->tdefs, 3193, OSMO_TDEF_MS, -1)/10;
- info_ind->t3195 = osmo_tdef_get(rlctg->tdefs, 3195, OSMO_TDEF_S, -1);
- info_ind->n3101 =
- osmo_tdef_get(rlctg->tdefs, 3101, OSMO_TDEF_CUSTOM, -1);
- info_ind->n3103 =
- osmo_tdef_get(rlctg->tdefs, 3103, OSMO_TDEF_CUSTOM, -1);
- info_ind->n3105 =
- osmo_tdef_get(rlctg->tdefs, 3105, OSMO_TDEF_CUSTOM, -1);
- info_ind->cv_countdown =
- osmo_tdef_get(rlctg->tdefs, GSM_BTS_TDEF_ID_COUNTDOWN_VALUE, OSMO_TDEF_CUSTOM, -1);
+ info_ind->t3142 = osmo_tdef_get(g->tdefs, 3142, OSMO_TDEF_S, -1);
+ info_ind->t3169 = osmo_tdef_get(g->tdefs, 3169, OSMO_TDEF_S, -1);
+ info_ind->t3191 = osmo_tdef_get(g->tdefs, 3191, OSMO_TDEF_S, -1);
+ info_ind->t3193_10ms = osmo_tdef_get(g->tdefs, 3193, OSMO_TDEF_MS, -1)/10;
+ info_ind->t3195 = osmo_tdef_get(g->tdefs, 3195, OSMO_TDEF_S, -1);
+ info_ind->n3101 = osmo_tdef_get(g->tdefs, 3101, OSMO_TDEF_CUSTOM, -1);
+ info_ind->n3103 = osmo_tdef_get(g->tdefs, 3103, OSMO_TDEF_CUSTOM, -1);
+ info_ind->n3105 = osmo_tdef_get(g->tdefs, 3105, OSMO_TDEF_CUSTOM, -1);
+ info_ind->cv_countdown = osmo_tdef_get(g->tdefs, GSM_BTS_TDEF_ID_COUNTDOWN_VALUE,
+ OSMO_TDEF_CUSTOM, -1);
if (rlcc->cs_mask & (1 << GPRS_CS1))
info_ind->flags |= PCU_IF_FLAG_CS1;
if (rlcc->cs_mask & (1 << GPRS_CS2))
@@ -264,10 +270,10 @@ static int pcu_tx_info_ind(struct gsm_bts *bts)
}
/* TODO: isn't dl_tbf_ext wrong?: * 10 and no ntohs */
info_ind->dl_tbf_ext =
- osmo_tdef_get(rlctg->tdefs, GSM_BTS_TDEF_ID_DL_TBF_DELAYED, OSMO_TDEF_MS, -1);
+ osmo_tdef_get(g->tdefs, GSM_BTS_TDEF_ID_DL_TBF_DELAYED, OSMO_TDEF_MS, -1);
/* TODO: isn't ul_tbf_ext wrong?: * 10 and no ntohs */
info_ind->ul_tbf_ext =
- osmo_tdef_get(rlctg->tdefs, GSM_BTS_TDEF_ID_UL_TBF_EXT, OSMO_TDEF_MS, -1);
+ osmo_tdef_get(g->tdefs, GSM_BTS_TDEF_ID_UL_TBF_EXT, OSMO_TDEF_MS, -1);
info_ind->initial_cs = rlcc->initial_cs;
info_ind->initial_mcs = rlcc->initial_mcs;
diff --git a/tests/bts_features.vty b/tests/bts_features.vty
index b946f5820..7c25b9434 100644
--- a/tests/bts_features.vty
+++ b/tests/bts_features.vty
@@ -73,12 +73,19 @@ rlc: T3169 = 5 s Release radio resource (TFI, USF) timer (linked to N3103, N3103
rlc: T3191 = 5 s Downlink TBF Release downlink RLC data block retransmission timer (default: 5 s, range: [0 .. 255])
rlc: T3193 = 1600 ms Downlink TBF Release timer (default: 1600 ms, range: [0 .. 2550])
rlc: T3195 = 5 s Timer for TFI release on N3105 overflow (unresponsive MS) (default: 5 s, range: [0 .. 255])
-rlc: T100 = 15 CV: Countdown value/remaining blocks to transmit (default: 15, range: [0 .. 255])
-rlc: T101 = 2500 ms Extended uplink TBF (default: 2500 ms, range: [0 .. 5000])
-rlc: T102 = 2500 ms Extended downlink TBF (default: 2500 ms, range: [0 .. 5000])
+rlc: X1 = 15 CV: Countdown value/remaining blocks to transmit (default: 15, range: [0 .. 255])
+rlc: X2 = 2500 ms Extended uplink TBF (default: 2500 ms, range: [0 .. 5000])
+rlc: X3 = 2500 ms Extended downlink TBF (default: 2500 ms, range: [0 .. 5000])
rlc: T3101 = 10 N3101: Maximum USFs without response from the MS (default: 10, range: [9 .. 255])
rlc: T3103 = 4 N3103: Maximum PACKET UPLINK ACK/NACK messages within a TBF unacknowledged by MS (default: 4, range: [0 .. 255])
rlc: T3105 = 8 N3105: Maximum allocated data blocks without RLC/MAC control reply from MS (default: 8, range: [0 .. 255])
+ns: X4 = 3 s Tns-block: Guards the blocking and unblocking procedures (default: 3 s, range: [0 .. 255])
+ns: X5 = 3 NS-BLOCK-RETRIES: Blocking procedure retries (default: 3, range: [0 .. 255])
+ns: X6 = 3 s Tns-reset: Guards the reset procedure (default: 3 s, range: [0 .. 255])
+ns: X7 = 3 Reset procedure retries (default: 3, range: [0 .. 255])
+ns: X8 = 30 s Tns-test: Periodicity of the NS-VC test procedure (default: 30 s, range: [0 .. 255])
+ns: X9 = 3 s Tns-alive: Guards the NS-VC test procedure (default: 3 s, range: [0 .. 255])
+ns: X10 = 10 NS-ALIVE-RETRIES: Retries for the the NS-VC test procedure (default: 10, range: [0 .. 255])
OsmoBSC(config-net-bts)# show gprs timer rlc T3101
rlc: T3101 = 10 N3101: Maximum USFs without response from the MS (default: 10, range: [9 .. 255])
@@ -91,12 +98,19 @@ rlc: T3169 = 5 s Release radio resource (TFI, USF) timer (linked to N3103, N3103
rlc: T3191 = 5 s Downlink TBF Release downlink RLC data block retransmission timer (default: 5 s, range: [0 .. 255])
rlc: T3193 = 1600 ms Downlink TBF Release timer (default: 1600 ms, range: [0 .. 2550])
rlc: T3195 = 5 s Timer for TFI release on N3105 overflow (unresponsive MS) (default: 5 s, range: [0 .. 255])
-rlc: T100 = 15 CV: Countdown value/remaining blocks to transmit (default: 15, range: [0 .. 255])
-rlc: T101 = 2500 ms Extended uplink TBF (default: 2500 ms, range: [0 .. 5000])
-rlc: T102 = 2500 ms Extended downlink TBF (default: 2500 ms, range: [0 .. 5000])
+rlc: X1 = 15 CV: Countdown value/remaining blocks to transmit (default: 15, range: [0 .. 255])
+rlc: X2 = 2500 ms Extended uplink TBF (default: 2500 ms, range: [0 .. 5000])
+rlc: X3 = 2500 ms Extended downlink TBF (default: 2500 ms, range: [0 .. 5000])
rlc: T3101 = 10 N3101: Maximum USFs without response from the MS (default: 10, range: [9 .. 255])
rlc: T3103 = 4 N3103: Maximum PACKET UPLINK ACK/NACK messages within a TBF unacknowledged by MS (default: 4, range: [0 .. 255])
rlc: T3105 = 8 N3105: Maximum allocated data blocks without RLC/MAC control reply from MS (default: 8, range: [0 .. 255])
+ns: X4 = 3 s Tns-block: Guards the blocking and unblocking procedures (default: 3 s, range: [0 .. 255])
+ns: X5 = 3 NS-BLOCK-RETRIES: Blocking procedure retries (default: 3, range: [0 .. 255])
+ns: X6 = 3 s Tns-reset: Guards the reset procedure (default: 3 s, range: [0 .. 255])
+ns: X7 = 3 Reset procedure retries (default: 3, range: [0 .. 255])
+ns: X8 = 30 s Tns-test: Periodicity of the NS-VC test procedure (default: 30 s, range: [0 .. 255])
+ns: X9 = 3 s Tns-alive: Guards the NS-VC test procedure (default: 3 s, range: [0 .. 255])
+ns: X10 = 10 NS-ALIVE-RETRIES: Retries for the the NS-VC test procedure (default: 10, range: [0 .. 255])
OsmoBSC(config-net-bts)# #### Show/set timer for this BTS
OsmoBSC(config-net-bts)# gprs timer rlc T3142
@@ -128,12 +142,19 @@ bts-0-rlc: T3169 = 5 s Release radio resource (TFI, USF) timer (linked to N3103,
bts-0-rlc: T3191 = 5 s Downlink TBF Release downlink RLC data block retransmission timer (default: 5 s, range: [0 .. 255])
bts-0-rlc: T3193 = 1600 ms Downlink TBF Release timer (default: 1600 ms, range: [0 .. 2550])
bts-0-rlc: T3195 = 5 s Timer for TFI release on N3105 overflow (unresponsive MS) (default: 5 s, range: [0 .. 255])
-bts-0-rlc: T100 = 15 CV: Countdown value/remaining blocks to transmit (default: 15, range: [0 .. 255])
-bts-0-rlc: T101 = 2500 ms Extended uplink TBF (default: 2500 ms, range: [0 .. 5000])
-bts-0-rlc: T102 = 2500 ms Extended downlink TBF (default: 2500 ms, range: [0 .. 5000])
+bts-0-rlc: X1 = 15 CV: Countdown value/remaining blocks to transmit (default: 15, range: [0 .. 255])
+bts-0-rlc: X2 = 2500 ms Extended uplink TBF (default: 2500 ms, range: [0 .. 5000])
+bts-0-rlc: X3 = 2500 ms Extended downlink TBF (default: 2500 ms, range: [0 .. 5000])
bts-0-rlc: T3101 = 10 N3101: Maximum USFs without response from the MS (default: 10, range: [9 .. 255])
bts-0-rlc: T3103 = 4 N3103: Maximum PACKET UPLINK ACK/NACK messages within a TBF unacknowledged by MS (default: 4, range: [0 .. 255])
bts-0-rlc: T3105 = 8 N3105: Maximum allocated data blocks without RLC/MAC control reply from MS (default: 8, range: [0 .. 255])
+bts-0-ns: X4 = 3 s Tns-block: Guards the blocking and unblocking procedures (default: 3 s, range: [0 .. 255])
+bts-0-ns: X5 = 3 NS-BLOCK-RETRIES: Blocking procedure retries (default: 3, range: [0 .. 255])
+bts-0-ns: X6 = 3 s Tns-reset: Guards the reset procedure (default: 3 s, range: [0 .. 255])
+bts-0-ns: X7 = 3 Reset procedure retries (default: 3, range: [0 .. 255])
+bts-0-ns: X8 = 30 s Tns-test: Periodicity of the NS-VC test procedure (default: 30 s, range: [0 .. 255])
+bts-0-ns: X9 = 3 s Tns-alive: Guards the NS-VC test procedure (default: 3 s, range: [0 .. 255])
+bts-0-ns: X10 = 10 NS-ALIVE-RETRIES: Retries for the the NS-VC test procedure (default: 10, range: [0 .. 255])
OsmoBSC# show bts 2 gprs timer rlc T3142
bts-2-rlc: T3142 = 5 s Used during packet access on CCCH/while in dedicated mode. Started after the receipt of IMMEDIATE ASSIGNMENT REJECT or DTM REJECT or EC IMMEDIATE ASSIGNMENT REJECT (default: 20 s, range: [0 .. 255])
diff --git a/tests/gprs_params.vty b/tests/gprs_params.vty
index e0c8b39e0..88fe15008 100644
--- a/tests/gprs_params.vty
+++ b/tests/gprs_params.vty
@@ -34,13 +34,6 @@ OsmoBSC(config-net-bts)# show running-config
gprs cell timer capability-update-timer 10
gprs cell timer capability-update-retries 3
gprs nsei 0
- gprs ns timer tns-block 3
- gprs ns timer tns-block-retries 3
- gprs ns timer tns-reset 3
- gprs ns timer tns-reset-retries 3
- gprs ns timer tns-test 30
- gprs ns timer tns-alive 3
- gprs ns timer tns-alive-retries 10
gprs nsvc 0 nsvci 0
gprs nsvc 0 local udp port 0
gprs nsvc 1 nsvci 0
diff --git a/tests/nanobts_omlattr/nanobts_omlattr_test.c b/tests/nanobts_omlattr/nanobts_omlattr_test.c
index 23fca9ebe..fe5ee8873 100644
--- a/tests/nanobts_omlattr/nanobts_omlattr_test.c
+++ b/tests/nanobts_omlattr/nanobts_omlattr_test.c
@@ -157,6 +157,20 @@ static struct osmo_tdef gsm_network_T_defs[] = {
.unit = OSMO_TDEF_CUSTOM},
{ .T = 3105, .default_val = 8, .desc = "N3105: Maximum allocated data blocks without RLC/MAC control reply from MS",
.unit = OSMO_TDEF_CUSTOM },
+ { .T = GSM_BTS_TDEF_ID_TNS_BLOCK, .default_val = 3, .max_val = UINT8_MAX,
+ .desc = "Tns-block: Guards the blocking and unblocking procedures" },
+ { .T = GSM_BTS_TDEF_ID_TNS_BLOCK_RETRIES, .default_val = 3, .max_val = UINT8_MAX,
+ .desc = "NS-BLOCK-RETRIES: Blocking procedure retries", .unit = OSMO_TDEF_CUSTOM },
+ { .T = GSM_BTS_TDEF_ID_TNS_RESET, .default_val = 3, .max_val = UINT8_MAX,
+ .desc = "Tns-reset: Guards the reset procedure" },
+ { .T = GSM_BTS_TDEF_ID_TNS_RESET_RETRIES, .default_val = 3, .max_val = UINT8_MAX,
+ .desc = "Reset procedure retries", .unit = OSMO_TDEF_CUSTOM },
+ { .T = GSM_BTS_TDEF_ID_TNS_TEST, .default_val = 30, .max_val = UINT8_MAX,
+ .desc = "Tns-test: Periodicity of the NS-VC test procedure" },
+ { .T = GSM_BTS_TDEF_ID_TNS_ALIVE, .default_val = 3, .max_val = UINT8_MAX,
+ .desc = "Tns-alive: Guards the NS-VC test procedure" },
+ { .T = GSM_BTS_TDEF_ID_TNS_ALIVE_RETRIES, .default_val = 10, .max_val = UINT8_MAX,
+ .desc = "NS-ALIVE-RETRIES: Retries for the the NS-VC test procedure", .unit = OSMO_TDEF_CUSTOM },
{}
};
@@ -223,9 +237,16 @@ int main(int argc, char **argv)
/* Parameters needed to test nanobts_gen_set_nse_attr() */
bts->site_mgr->gprs.nse.nsei = 101;
- uint8_t attr_nse_expected[] =
- { 0x9d, 0x00, 0x02, 0x00, 0x65, 0xa0, 0x00, 0x07, 0x03, 0x03, 0x03,
- 0x03, 0x1e, 0x03, 0x0a, 0xa1, 0x00, 0x0b, 0x03, 0x03, 0x03,
+ uint8_t attr_nse_expected[] = {
+ /* NM_ATT_IPACC_NS_CFG */
+ 0x9d, 0x00, 0x02, 0x00, 0x65, 0xa0,
+ /* LEN1, LEN2 */
+ 0x00, 0x07,
+ /* TNS BLK, TNS BLK RE, TNS_RST, TNS_RST_RE, TNS_TEST */
+ 0x03, 0x03, 0x03, 0x03, 0x1e,
+ /* TNS ALIVE, TNS ALIVE_RE */
+ 0x03, 0x0a,
+ 0xa1, 0x00, 0x0b, 0x03, 0x03, 0x03,
0x03, 0x03, 0x0a, 0x03,
0x0a, 0x03, 0x0a, 0x03
};