Convert paging response timer into an osmocom own X4 timer

All timeout values should use tdef.

Change-Id: Ic050eb49ba0c5811b43d8d8b44145a1115fd8546
changes/80/20280/4
Alexander Couzens 2 years ago
parent 9194b33ec1
commit ae167fcc9a
  1. 2
      include/osmocom/msc/gsm_data.h
  2. 2
      src/libmsc/msc_net_init.c
  3. 22
      src/libmsc/msc_vty.c
  4. 5
      src/libmsc/paging.c
  5. 2
      src/libmsc/ran_infra.c
  6. 1
      tests/test_nodes.vty

@ -172,8 +172,6 @@ struct gsm_network {
*/
struct llist_head trans_list;
unsigned int paging_response_timer;
/* Radio Resource Location Protocol (TS 04.31) */
struct {
enum rrlp_mode mode;

@ -72,8 +72,6 @@ struct gsm_network *gsm_network_init(void *ctx, mncc_recv_cb_t mncc_recv)
net->mncc_guard_timeout = 180;
net->ncss_guard_timeout = 30;
net->paging_response_timer = MSC_PAGING_RESPONSE_TIMER_DEFAULT;
INIT_LLIST_HEAD(&net->trans_list);
INIT_LLIST_HEAD(&net->upqueue);
INIT_LLIST_HEAD(&net->neighbor_ident_list);

@ -67,6 +67,7 @@
#include <osmocom/msc/sgs_vty.h>
#include <osmocom/msc/sccp_ran.h>
#include <osmocom/msc/ran_peer.h>
#include <osmocom/msc/ran_infra.h>
static struct gsm_network *gsmnet = NULL;
@ -562,7 +563,7 @@ DEFUN(cfg_msc_check_imei_rqd, cfg_msc_check_imei_rqd_cmd,
return CMD_SUCCESS;
}
DEFUN(cfg_msc_paging_response_timer, cfg_msc_paging_response_timer_cmd,
DEFUN_DEPRECATED(cfg_msc_paging_response_timer, cfg_msc_paging_response_timer_cmd,
"paging response-timer (default|<1-65535>)",
"Configure Paging\n"
"Set Paging timeout, the minimum time to pass between (unsuccessful) Pagings sent towards"
@ -570,10 +571,22 @@ DEFUN(cfg_msc_paging_response_timer, cfg_msc_paging_response_timer_cmd,
"Set to default timeout (" OSMO_STRINGIFY_VAL(MSC_PAGING_RESPONSE_TIMER_DEFAULT) " seconds)\n"
"Set paging timeout in seconds\n")
{
int rat;
int paging_response_timer;
if (!strcmp(argv[0], "default"))
gsmnet->paging_response_timer = MSC_PAGING_RESPONSE_TIMER_DEFAULT;
paging_response_timer = MSC_PAGING_RESPONSE_TIMER_DEFAULT;
else
gsmnet->paging_response_timer = atoi(argv[0]);
paging_response_timer = atoi(argv[0]);
for (rat = 0; rat < OSMO_RAT_COUNT; rat++) {
osmo_tdef_set(msc_ran_infra[rat].tdefs, -4, paging_response_timer, OSMO_TDEF_S);
}
vty_out(vty, "%% paging response-timer is deprecated.%s"
"%% All ran timer has been modified.%s"
"%% use 'timer <geran|utran|sgs> X4 %s' instead%s",
VTY_NEWLINE, VTY_NEWLINE, argv[0], VTY_NEWLINE);
return CMD_SUCCESS;
}
@ -773,9 +786,6 @@ static int config_write_msc(struct vty *vty)
vty_out(vty, " check-imei-rqd 1%s", VTY_NEWLINE);
}
if (gsmnet->paging_response_timer != MSC_PAGING_RESPONSE_TIMER_DEFAULT)
vty_out(vty, " paging response-timer %u%s", gsmnet->paging_response_timer, VTY_NEWLINE);
if (gsmnet->emergency.route_to_msisdn) {
vty_out(vty, " emergency-call route-to-msisdn %s%s",
gsmnet->emergency.route_to_msisdn, VTY_NEWLINE);

@ -84,7 +84,7 @@ struct paging_request *paging_request_start(struct vlr_subscr *vsub, enum paging
{
int rc;
struct paging_request *pr;
struct gsm_network *net = vsub->vlr->user_ctx;
int paging_response_timer;
pr = talloc(vsub, struct paging_request);
OSMO_ASSERT(pr);
@ -110,8 +110,9 @@ struct paging_request *paging_request_start(struct vlr_subscr *vsub, enum paging
/* reduced on the first paging callback */
vlr_subscr_get(vsub, VSUB_USE_PAGING);
vsub->cs.is_paging = true;
paging_response_timer = osmo_tdef_get(msc_ran_infra[vsub->cs.attached_via_ran].tdefs, -4, OSMO_TDEF_S, 10);
osmo_timer_setup(&vsub->cs.paging_response_timer, paging_response_timer_cb, vsub);
osmo_timer_schedule(&vsub->cs.paging_response_timer, net->paging_response_timer, 0);
osmo_timer_schedule(&vsub->cs.paging_response_timer, paging_response_timer, 0);
}
llist_add_tail(&pr->entry, &vsub->cs.requests);

@ -43,6 +43,7 @@ const struct value_string an_proto_names[] = {
{ .T = -1, .default_val = 5, .desc = "RAN connection Complete Layer 3, Authentication and Ciphering timeout" }, \
{ .T = -2, .default_val = 30, .desc = "RAN connection release sanity timeout" }, \
{ .T = -3, .default_val = 10, .desc = "Timeout to find a target BSS after Handover Required" }, \
{ .T = -4, .default_val = 10, .desc = "Paging response timeout" }, \
struct osmo_tdef msc_tdefs_geran[] = {
RAN_TDEFS
@ -55,6 +56,7 @@ struct osmo_tdef msc_tdefs_utran[] = {
};
struct osmo_tdef msc_tdefs_sgs[] = {
{ .T = -4, .default_val = 10, .desc = "Paging response timeout" },
{}
};

@ -58,7 +58,6 @@ OsmoMSC(config-msc)# list
check-imei-rqd (0|1|early)
cs7-instance-a <0-15>
cs7-instance-iu <0-15>
paging response-timer (default|<1-65535>)
emergency-call route-to-msisdn MSISDN
sms-over-gsup
no sms-over-gsup

Loading…
Cancel
Save