 
            neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/33131 )
Change subject: tdefs; combine timer groups 'ps' and 'cmap' to 'hnbgw' ......................................................................
tdefs; combine timer groups 'ps' and 'cmap' to 'hnbgw'
Makes no sense to have groups with one member each. Soon I will add a new timer that matches neither 'cmap' nor 'ps', and I would have to open a third group with a single member.
Add a shim that redirects 'ps' to 'hnbgw'. The group 'cmap' has not yet been released, so just drop that one without a shim.
Change-Id: Ica6063fae4588b51897e5574d975b3185fa9ae80 --- M include/osmocom/hnbgw/tdefs.h M src/osmo-hnbgw/context_map_rua.c M src/osmo-hnbgw/context_map_sccp.c M src/osmo-hnbgw/hnbgw_vty.c M src/osmo-hnbgw/ps_rab_ass_fsm.c M src/osmo-hnbgw/ps_rab_fsm.c M src/osmo-hnbgw/tdefs.c 7 files changed, 35 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/31/33131/1
diff --git a/include/osmocom/hnbgw/tdefs.h b/include/osmocom/hnbgw/tdefs.h index 6fee79b..6a27e36 100644 --- a/include/osmocom/hnbgw/tdefs.h +++ b/include/osmocom/hnbgw/tdefs.h @@ -3,6 +3,5 @@ #include <osmocom/core/tdef.h>
extern struct osmo_tdef mgw_fsm_T_defs[]; -extern struct osmo_tdef ps_T_defs[]; -extern struct osmo_tdef cmap_T_defs[]; +extern struct osmo_tdef hnbgw_T_defs[]; extern struct osmo_tdef_group hnbgw_tdef_group[]; diff --git a/src/osmo-hnbgw/context_map_rua.c b/src/osmo-hnbgw/context_map_rua.c index 9e8f028..9cb45b0 100644 --- a/src/osmo-hnbgw/context_map_rua.c +++ b/src/osmo-hnbgw/context_map_rua.c @@ -67,7 +67,7 @@ #define map_rua_fsm_state_chg(state) \ OSMO_ASSERT(osmo_tdef_fsm_inst_state_chg(fi, state, \ map_rua_fsm_timeouts, \ - cmap_T_defs, \ + hnbgw_T_defs, \ 5) == 0)
void map_rua_fsm_alloc(struct hnbgw_context_map *map) diff --git a/src/osmo-hnbgw/context_map_sccp.c b/src/osmo-hnbgw/context_map_sccp.c index 0e3d2b0..3bdec8c 100644 --- a/src/osmo-hnbgw/context_map_sccp.c +++ b/src/osmo-hnbgw/context_map_sccp.c @@ -73,7 +73,7 @@ #define map_sccp_fsm_state_chg(state) \ OSMO_ASSERT(osmo_tdef_fsm_inst_state_chg(fi, state, \ map_sccp_fsm_timeouts, \ - cmap_T_defs, \ + hnbgw_T_defs, \ 5) == 0)
void map_sccp_fsm_alloc(struct hnbgw_context_map *map) diff --git a/src/osmo-hnbgw/hnbgw_vty.c b/src/osmo-hnbgw/hnbgw_vty.c index 3404a3f..a84fc25 100644 --- a/src/osmo-hnbgw/hnbgw_vty.c +++ b/src/osmo-hnbgw/hnbgw_vty.c @@ -794,6 +794,15 @@
#endif /* ENABLE_PFCP */
+DEFUN_DEPRECATED(cfg_hnbgw_timer_ps, cfg_hnbgw_timer_ps_cmd, + "timer ps " OSMO_TDEF_VTY_ARG_SET, + "Configure or show timers\n" + "Deprecated: 'ps' timers are now in 'hnbgw'\n" + OSMO_TDEF_VTY_DOC_SET) +{ + return osmo_tdef_vty_set_cmd(vty, hnbgw_T_defs, argv); +} + /* hnbgw * iucs } this part * foo } @@ -955,6 +964,7 @@ #endif
osmo_tdef_vty_groups_init(HNBGW_NODE, hnbgw_tdef_group); + install_element(HNBGW_NODE, &cfg_hnbgw_timer_ps_cmd);
install_element(CONFIG_NODE, &cfg_msc_nr_cmd); install_node(&msc_node, config_write_msc); diff --git a/src/osmo-hnbgw/ps_rab_ass_fsm.c b/src/osmo-hnbgw/ps_rab_ass_fsm.c index aa1fe74..4dff7c6 100644 --- a/src/osmo-hnbgw/ps_rab_ass_fsm.c +++ b/src/osmo-hnbgw/ps_rab_ass_fsm.c @@ -119,7 +119,7 @@ };
#define ps_rab_ass_fsm_state_chg(state) \ - osmo_tdef_fsm_inst_state_chg(fi, state, ps_rab_ass_fsm_timeouts, ps_T_defs, -1) + osmo_tdef_fsm_inst_state_chg(fi, state, ps_rab_ass_fsm_timeouts, hnbgw_T_defs, -1)
static struct osmo_fsm ps_rab_ass_fsm;
diff --git a/src/osmo-hnbgw/ps_rab_fsm.c b/src/osmo-hnbgw/ps_rab_fsm.c index bcf097d..df98826 100644 --- a/src/osmo-hnbgw/ps_rab_fsm.c +++ b/src/osmo-hnbgw/ps_rab_fsm.c @@ -72,7 +72,7 @@
#define ps_rab_fsm_state_chg(state) \ - osmo_tdef_fsm_inst_state_chg(fi, state, ps_rab_fsm_timeouts, ps_T_defs, -1) + osmo_tdef_fsm_inst_state_chg(fi, state, ps_rab_fsm_timeouts, hnbgw_T_defs, -1)
#define PS_RAB_USE_ACTIVE "active"
diff --git a/src/osmo-hnbgw/tdefs.c b/src/osmo-hnbgw/tdefs.c index 7af292d..645cdbf 100644 --- a/src/osmo-hnbgw/tdefs.c +++ b/src/osmo-hnbgw/tdefs.c @@ -31,20 +31,15 @@ { } };
-struct osmo_tdef ps_T_defs[] = { - {.T = -1002, .default_val = 10, .desc = "Timeout for the HNB to respond to PS RAB Assignment Request" }, - { } -}; - -struct osmo_tdef cmap_T_defs[] = { +struct osmo_tdef hnbgw_T_defs[] = { {.T = -31, .default_val = 5, .desc = "Timeout for discarding a partially released context map (RUA <-> SCCP)" }, + {.T = -1002, .default_val = 10, .desc = "Timeout for the HNB to respond to PS RAB Assignment Request" }, { } };
struct osmo_tdef_group hnbgw_tdef_group[] = { {.name = "mgw", .tdefs = mgw_fsm_T_defs, .desc = "MGW (Media Gateway) interface" }, - {.name = "ps", .tdefs = ps_T_defs, .desc = "timers for Packet Switched domain" }, - {.name = "cmap", .tdefs = cmap_T_defs, .desc = "timers for context maps (RUA <-> SCCP)" }, + {.name = "hnbgw", .tdefs = hnbgw_T_defs, .desc = "Timers" }, #if ENABLE_PFCP {.name = "pfcp", .tdefs = osmo_pfcp_tdefs, .desc = "PFCP timers" }, #endif
