diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-01-19 15:53:30 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-08 00:45:36 +0100 |
commit | 36df7740dd7f81fe36d35e808cc53f518f4e360e (patch) | |
tree | c204fcc8e691a99ce2a42eb7b7491bea6248c01c /src/pcu_vty.c | |
parent | 08c72fb4a91c267410535be26d2bb399914ff6d4 (diff) |
edge: Make window size configurable
Currently the window size is fixed to 64 even for EGPRS.
Support dynamic window sizes depending on the number of PDCH. The
WS can be set to b + f * N_PDCH. If the result is not valid according
to TS 44.060, Table 9.1.9.2.1, the value will be corrected to use the
next lower valid value (or 64).
The following VTY commands are added (config-pcu node):
window-size <0-1024> set base (b) value and leave f unchanged
window-size <0-1024> <0-256> set base (b) and factor (f)
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/pcu_vty.c')
-rw-r--r-- | src/pcu_vty.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 97be4c72..b5ee1b55 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -118,6 +118,9 @@ static int config_write_pcu(struct vty *vty) bts->max_mcs_ul, VTY_NEWLINE); } + vty_out(vty, " window-size %d %d%s", bts->ws_base, bts->ws_pdch, + VTY_NEWLINE); + if (bts->force_llc_lifetime == 0xffff) vty_out(vty, " queue lifetime infinite%s", VTY_NEWLINE); else if (bts->force_llc_lifetime) @@ -437,6 +440,26 @@ DEFUN(cfg_pcu_no_mcs_max, return CMD_SUCCESS; } +DEFUN(cfg_pcu_window_size, + cfg_pcu_window_size_cmd, + "window-size <0-1024> [<0-256>]", + "Window size configuration (b + N_PDCH * f)\n" + "Base value (b)\n" + "Factor for number of PDCH (f)") +{ + struct gprs_rlcmac_bts *bts = bts_main_data(); + uint16_t b = atoi(argv[0]); + + bts->ws_base = b; + if (argc > 1) { + uint16_t f = atoi(argv[1]); + bts->ws_pdch = f; + } + + return CMD_SUCCESS; +} + + #define QUEUE_STR "Packet queue options\n" #define LIFETIME_STR "Set lifetime limit of LLC frame in centi-seconds " \ "(overrides the value given by SGSN)\n" @@ -892,6 +915,7 @@ int pcu_vty_init(const struct log_info *cat) install_element(PCU_NODE, &cfg_pcu_cs_lqual_ranges_cmd); install_element(PCU_NODE, &cfg_pcu_mcs_max_cmd); install_element(PCU_NODE, &cfg_pcu_no_mcs_max_cmd); + install_element(PCU_NODE, &cfg_pcu_window_size_cmd); install_element(PCU_NODE, &cfg_pcu_queue_lifetime_cmd); install_element(PCU_NODE, &cfg_pcu_queue_lifetime_inf_cmd); install_element(PCU_NODE, &cfg_pcu_no_queue_lifetime_cmd); |