diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-20 17:10:43 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-20 17:10:43 +0800 |
commit | 242faaafd170e4e81ff26af23e0e2ac5d13ad220 (patch) | |
tree | f4a65806a4a81536d872b7ae2ea9e3b82abffae1 /openbsc/src/vty_interface.c | |
parent | f77c0cd428a0dd35231f17ec877269df3000d396 (diff) |
[paging] Only page if we have some free channels right now
Only page if we have a load that is acceptable for paging. This
option is off by default, and can be enabled per bts. The idea
is that when we have no resources right now we will not page as
it will only create more RACHs and increase the load.
Diffstat (limited to 'openbsc/src/vty_interface.c')
-rw-r--r-- | openbsc/src/vty_interface.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c index aba7bccd9..201c30e48 100644 --- a/openbsc/src/vty_interface.c +++ b/openbsc/src/vty_interface.c @@ -360,6 +360,11 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts) config_write_e1_link(vty, &bts->oml_e1_link, " oml "); vty_out(vty, " oml e1 tei %u%s", bts->oml_tei, VTY_NEWLINE); } + + /* if we have a limit, write it */ + if (bts->paging.free_chans_need >= 0) + vty_out(vty, " paging free %d%s", bts->paging.free_chans_need, VTY_NEWLINE); + vty_out(vty, " gprs mode %s%s", bts_gprs_mode_name(bts->gprs.mode), VTY_NEWLINE); if (bts->gprs.mode != BTS_GPRS_NONE) { @@ -1757,6 +1762,16 @@ DEFUN(cfg_bts_gprs_nsvc_rip, cfg_bts_gprs_nsvc_rip_cmd, return CMD_SUCCESS; } +DEFUN(cfg_bts_pag_free, cfg_bts_pag_free_cmd, + "paging free FREE_NR", + "Only page when having a certain amount of free slots. -1 to disable") +{ + struct gsm_bts *bts = vty->index; + + bts->paging.free_chans_need = atoi(argv[0]); + return CMD_SUCCESS; +} + DEFUN(cfg_bts_gprs_rac, cfg_bts_gprs_rac_cmd, "gprs routing area <0-255>", "GPRS Routing Area Code") @@ -2058,6 +2073,7 @@ int bsc_vty_init(struct gsm_network *net) install_element(BTS_NODE, &cfg_bts_gprs_nsvc_lport_cmd); install_element(BTS_NODE, &cfg_bts_gprs_nsvc_rport_cmd); install_element(BTS_NODE, &cfg_bts_gprs_nsvc_rip_cmd); + install_element(BTS_NODE, &cfg_bts_pag_free_cmd); install_element(BTS_NODE, &cfg_trx_cmd); install_node(&trx_node, dummy_config_write); |