Andreas Eversberg | 1294256 | 2012-07-12 14:31:57 +0200 | [diff] [blame] | 1 | /* OsmoBTS VTY interface */ |
| 2 | |
Andreas Eversberg | 1294256 | 2012-07-12 14:31:57 +0200 | [diff] [blame] | 3 | |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 4 | #include <stdint.h> |
Holger Hans Peter Freyther | 2c98f1d | 2014-07-02 14:56:36 +0200 | [diff] [blame] | 5 | #include <stdlib.h> |
Neels Hofmeyr | d34646a | 2017-02-08 17:07:40 +0100 | [diff] [blame] | 6 | #include <string.h> |
Pau Espin Pedrol | d1049dc | 2021-01-18 17:14:14 +0100 | [diff] [blame^] | 7 | #include <inttypes.h> |
| 8 | |
Pau Espin Pedrol | 28f160e | 2019-09-05 14:48:35 +0200 | [diff] [blame] | 9 | #include <osmocom/core/tdef.h> |
Vadim Yanitskiy | 657a4c0 | 2019-11-30 20:15:22 +0700 | [diff] [blame] | 10 | #include <osmocom/core/utils.h> |
Pau Espin Pedrol | 28f160e | 2019-09-05 14:48:35 +0200 | [diff] [blame] | 11 | #include <osmocom/vty/tdef_vty.h> |
Andreas Eversberg | 1294256 | 2012-07-12 14:31:57 +0200 | [diff] [blame] | 12 | #include <osmocom/vty/logging.h> |
Jacob Erlbeck | 42aba81 | 2015-11-10 15:32:00 +0100 | [diff] [blame] | 13 | #include <osmocom/vty/stats.h> |
Jacob Erlbeck | c0c580c | 2015-04-30 15:59:01 +0200 | [diff] [blame] | 14 | #include <osmocom/vty/misc.h> |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 15 | #include <osmocom/core/linuxlist.h> |
Holger Hans Peter Freyther | e8915b9 | 2014-07-02 14:57:47 +0200 | [diff] [blame] | 16 | #include <osmocom/core/rate_ctr.h> |
Pau Espin Pedrol | c4178e5 | 2017-08-08 15:03:50 +0200 | [diff] [blame] | 17 | #include <osmocom/pcu/pcuif_proto.h> |
Alexander Couzens | 290d903 | 2020-09-16 21:52:02 +0200 | [diff] [blame] | 18 | #include <osmocom/gprs/gprs_ns2.h> |
Andreas Eversberg | 1294256 | 2012-07-12 14:31:57 +0200 | [diff] [blame] | 19 | #include "pcu_vty.h" |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 20 | #include "gprs_rlcmac.h" |
Max | 6dc90b8 | 2018-02-19 17:17:28 +0100 | [diff] [blame] | 21 | #include <pdch.h> |
Holger Hans Peter Freyther | 67ed34e | 2013-10-17 17:01:54 +0200 | [diff] [blame] | 22 | #include "bts.h" |
Jacob Erlbeck | c0c580c | 2015-04-30 15:59:01 +0200 | [diff] [blame] | 23 | #include "tbf.h" |
Jacob Erlbeck | 62e96a3 | 2015-06-04 09:42:14 +0200 | [diff] [blame] | 24 | #include "pcu_vty_functions.h" |
| 25 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 26 | #define X(x) (1 << x) |
| 27 | |
Harald Welte | 717cdf5 | 2017-07-21 21:56:23 +0200 | [diff] [blame] | 28 | extern void *tall_pcu_ctx; |
| 29 | |
| 30 | static const struct value_string pcu_gsmtap_categ_names[] = { |
| 31 | { PCU_GSMTAP_C_DL_UNKNOWN, "dl-unknown" }, |
| 32 | { PCU_GSMTAP_C_DL_DUMMY, "dl-dummy" }, |
| 33 | { PCU_GSMTAP_C_DL_CTRL, "dl-ctrl" }, |
| 34 | { PCU_GSMTAP_C_DL_DATA_GPRS, "dl-data-gprs" }, |
| 35 | { PCU_GSMTAP_C_DL_DATA_EGPRS, "dl-data-egprs" }, |
Harald Welte | bc219d5 | 2017-07-29 13:42:27 +0200 | [diff] [blame] | 36 | { PCU_GSMTAP_C_DL_PTCCH, "dl-ptcch" }, |
Pau Espin Pedrol | 5854370 | 2019-09-30 19:07:16 +0200 | [diff] [blame] | 37 | { PCU_GSMTAP_C_DL_AGCH, "dl-agch" }, |
| 38 | { PCU_GSMTAP_C_DL_PCH, "dl-pch" }, |
Harald Welte | 717cdf5 | 2017-07-21 21:56:23 +0200 | [diff] [blame] | 39 | |
| 40 | { PCU_GSMTAP_C_UL_UNKNOWN, "ul-unknown" }, |
| 41 | { PCU_GSMTAP_C_UL_DUMMY, "ul-dummy" }, |
| 42 | { PCU_GSMTAP_C_UL_CTRL, "ul-ctrl" }, |
| 43 | { PCU_GSMTAP_C_UL_DATA_GPRS, "ul-data-gprs" }, |
| 44 | { PCU_GSMTAP_C_UL_DATA_EGPRS, "ul-data-egprs" }, |
Pau Espin Pedrol | 1ec211f | 2019-09-30 18:33:14 +0200 | [diff] [blame] | 45 | { PCU_GSMTAP_C_UL_RACH, "ul-rach" }, |
Vadim Yanitskiy | 07b6487 | 2020-06-11 00:26:15 +0700 | [diff] [blame] | 46 | { PCU_GSMTAP_C_UL_PTCCH, "ul-ptcch" }, |
Harald Welte | 717cdf5 | 2017-07-21 21:56:23 +0200 | [diff] [blame] | 47 | |
| 48 | { 0, NULL } |
| 49 | }; |
| 50 | |
| 51 | static const struct value_string pcu_gsmtap_categ_help[] = { |
| 52 | { PCU_GSMTAP_C_DL_UNKNOWN, "Unknown / Unparseable / Erroneous Downlink Blocks" }, |
| 53 | { PCU_GSMTAP_C_DL_DUMMY, "Downlink Dummy Blocks" }, |
| 54 | { PCU_GSMTAP_C_DL_CTRL, "Downlink Control Blocks" }, |
| 55 | { PCU_GSMTAP_C_DL_DATA_GPRS, "Downlink Data Blocks (GPRS)" }, |
| 56 | { PCU_GSMTAP_C_DL_DATA_EGPRS, "Downlink Data Blocks (EGPRS)" }, |
Harald Welte | bc219d5 | 2017-07-29 13:42:27 +0200 | [diff] [blame] | 57 | { PCU_GSMTAP_C_DL_PTCCH, "Downlink PTCCH Blocks" }, |
Pau Espin Pedrol | 5854370 | 2019-09-30 19:07:16 +0200 | [diff] [blame] | 58 | { PCU_GSMTAP_C_DL_AGCH, "Downlink AGCH Blocks" }, |
| 59 | { PCU_GSMTAP_C_DL_PCH, "Downlink PCH Blocks" }, |
Harald Welte | 717cdf5 | 2017-07-21 21:56:23 +0200 | [diff] [blame] | 60 | |
| 61 | { PCU_GSMTAP_C_UL_UNKNOWN, "Unknown / Unparseable / Erroneous Downlink Blocks" }, |
| 62 | { PCU_GSMTAP_C_UL_DUMMY, "Uplink Dummy Blocks" }, |
| 63 | { PCU_GSMTAP_C_UL_CTRL, "Uplink Control Blocks" }, |
| 64 | { PCU_GSMTAP_C_UL_DATA_GPRS, "Uplink Data Blocks (GPRS)" }, |
| 65 | { PCU_GSMTAP_C_UL_DATA_EGPRS, "Uplink Data Blocks (EGPRS)" }, |
Pau Espin Pedrol | 1ec211f | 2019-09-30 18:33:14 +0200 | [diff] [blame] | 66 | { PCU_GSMTAP_C_UL_RACH, "Uplink RACH Bursts" }, |
Vadim Yanitskiy | 07b6487 | 2020-06-11 00:26:15 +0700 | [diff] [blame] | 67 | { PCU_GSMTAP_C_UL_PTCCH, "Uplink PTCCH Bursts" }, |
Harald Welte | 717cdf5 | 2017-07-21 21:56:23 +0200 | [diff] [blame] | 68 | |
| 69 | { 0, NULL } |
| 70 | }; |
| 71 | |
| 72 | |
| 73 | DEFUN(cfg_pcu_gsmtap_categ, cfg_pcu_gsmtap_categ_cmd, "HIDDEN", "HIDDEN") |
| 74 | { |
Harald Welte | 717cdf5 | 2017-07-21 21:56:23 +0200 | [diff] [blame] | 75 | int categ; |
| 76 | |
| 77 | categ = get_string_value(pcu_gsmtap_categ_names, argv[0]); |
| 78 | if (categ < 0) |
| 79 | return CMD_WARNING; |
| 80 | |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 81 | the_pcu->gsmtap_categ_mask |= (1 << categ); |
Harald Welte | 717cdf5 | 2017-07-21 21:56:23 +0200 | [diff] [blame] | 82 | |
| 83 | return CMD_SUCCESS; |
| 84 | } |
| 85 | |
| 86 | DEFUN(cfg_pcu_no_gsmtap_categ, cfg_pcu_no_gsmtap_categ_cmd, "HIDDEN", "HIDDEN") |
| 87 | { |
Harald Welte | 717cdf5 | 2017-07-21 21:56:23 +0200 | [diff] [blame] | 88 | int categ; |
| 89 | |
| 90 | categ = get_string_value(pcu_gsmtap_categ_names, argv[0]); |
| 91 | if (categ < 0) |
| 92 | return CMD_WARNING; |
| 93 | |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 94 | the_pcu->gsmtap_categ_mask &= ~(1 << categ); |
Harald Welte | 717cdf5 | 2017-07-21 21:56:23 +0200 | [diff] [blame] | 95 | |
| 96 | return CMD_SUCCESS; |
| 97 | } |
| 98 | |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 99 | static struct cmd_node pcu_node = { |
| 100 | (enum node_type) PCU_NODE, |
Jacob Erlbeck | cc12f02 | 2015-04-09 15:45:24 +0200 | [diff] [blame] | 101 | "%s(config-pcu)# ", |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 102 | 1, |
| 103 | }; |
| 104 | |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 105 | static int config_write_pcu(struct vty *vty) |
| 106 | { |
Harald Welte | 717cdf5 | 2017-07-21 21:56:23 +0200 | [diff] [blame] | 107 | unsigned int i; |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 108 | |
| 109 | vty_out(vty, "pcu%s", VTY_NEWLINE); |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 110 | vty_out(vty, " flow-control-interval %d%s", the_pcu->vty.fc_interval, |
Andreas Eversberg | cd8a83a | 2012-09-23 06:41:21 +0200 | [diff] [blame] | 111 | VTY_NEWLINE); |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 112 | if (the_pcu->vty.fc_bvc_bucket_size) |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 113 | vty_out(vty, " flow-control force-bvc-bucket-size %d%s", |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 114 | the_pcu->vty.fc_bvc_bucket_size, VTY_NEWLINE); |
| 115 | if (the_pcu->vty.fc_bvc_leak_rate) |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 116 | vty_out(vty, " flow-control force-bvc-leak-rate %d%s", |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 117 | the_pcu->vty.fc_bvc_leak_rate, VTY_NEWLINE); |
| 118 | if (the_pcu->vty.fc_ms_bucket_size) |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 119 | vty_out(vty, " flow-control force-ms-bucket-size %d%s", |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 120 | the_pcu->vty.fc_ms_bucket_size, VTY_NEWLINE); |
| 121 | if (the_pcu->vty.fc_ms_leak_rate) |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 122 | vty_out(vty, " flow-control force-ms-leak-rate %d%s", |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 123 | the_pcu->vty.fc_ms_leak_rate, VTY_NEWLINE); |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 124 | if (the_pcu->vty.force_initial_cs) { |
Pau Espin Pedrol | 793583e | 2021-01-14 16:20:57 +0100 | [diff] [blame] | 125 | if (the_pcu->vty.initial_cs_ul == the_pcu->vty.initial_cs_dl) |
| 126 | vty_out(vty, " cs %d%s", the_pcu->vty.initial_cs_dl, |
Andreas Eversberg | 499ff41 | 2012-10-03 14:21:36 +0200 | [diff] [blame] | 127 | VTY_NEWLINE); |
| 128 | else |
Pau Espin Pedrol | 793583e | 2021-01-14 16:20:57 +0100 | [diff] [blame] | 129 | vty_out(vty, " cs %d %d%s", the_pcu->vty.initial_cs_dl, |
| 130 | the_pcu->vty.initial_cs_ul, VTY_NEWLINE); |
Holger Hans Peter Freyther | c421e8a | 2014-07-02 14:55:17 +0200 | [diff] [blame] | 131 | } |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 132 | if (the_pcu->vty.max_cs_dl && the_pcu->vty.max_cs_ul) { |
| 133 | if (the_pcu->vty.max_cs_ul == the_pcu->vty.max_cs_dl) |
| 134 | vty_out(vty, " cs max %d%s", the_pcu->vty.max_cs_dl, |
Jacob Erlbeck | b33e675 | 2015-06-04 19:04:30 +0200 | [diff] [blame] | 135 | VTY_NEWLINE); |
| 136 | else |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 137 | vty_out(vty, " cs max %d %d%s", the_pcu->vty.max_cs_dl, |
| 138 | the_pcu->vty.max_cs_ul, VTY_NEWLINE); |
Jacob Erlbeck | b33e675 | 2015-06-04 19:04:30 +0200 | [diff] [blame] | 139 | } |
Pau Espin Pedrol | e8dcf64 | 2021-01-14 13:17:01 +0100 | [diff] [blame] | 140 | if (the_pcu->vty.cs_adj_enabled) |
Jacob Erlbeck | 8322d08 | 2015-06-04 15:12:10 +0200 | [diff] [blame] | 141 | vty_out(vty, " cs threshold %d %d%s", |
Pau Espin Pedrol | e8dcf64 | 2021-01-14 13:17:01 +0100 | [diff] [blame] | 142 | the_pcu->vty.cs_adj_lower_limit, the_pcu->vty.cs_adj_upper_limit, |
Jacob Erlbeck | 8322d08 | 2015-06-04 15:12:10 +0200 | [diff] [blame] | 143 | VTY_NEWLINE); |
| 144 | else |
| 145 | vty_out(vty, " no cs threshold%s", VTY_NEWLINE); |
| 146 | |
Pau Espin Pedrol | ad79b85 | 2021-01-14 13:20:55 +0100 | [diff] [blame] | 147 | if (the_pcu->vty.cs_downgrade_threshold) |
Jacob Erlbeck | 70b96aa | 2015-06-12 10:52:34 +0200 | [diff] [blame] | 148 | vty_out(vty, " cs downgrade-threshold %d%s", |
Pau Espin Pedrol | ad79b85 | 2021-01-14 13:20:55 +0100 | [diff] [blame] | 149 | the_pcu->vty.cs_downgrade_threshold, VTY_NEWLINE); |
Jacob Erlbeck | 70b96aa | 2015-06-12 10:52:34 +0200 | [diff] [blame] | 150 | else |
| 151 | vty_out(vty, " no cs downgrade-threshold%s", VTY_NEWLINE); |
| 152 | |
Jacob Erlbeck | 94cde13 | 2015-06-09 09:44:36 +0200 | [diff] [blame] | 153 | vty_out(vty, " cs link-quality-ranges cs1 %d cs2 %d %d cs3 %d %d cs4 %d%s", |
Pau Espin Pedrol | 54b159a | 2021-01-14 13:30:04 +0100 | [diff] [blame] | 154 | the_pcu->vty.cs_lqual_ranges[0].high, |
| 155 | the_pcu->vty.cs_lqual_ranges[1].low, |
| 156 | the_pcu->vty.cs_lqual_ranges[1].high, |
| 157 | the_pcu->vty.cs_lqual_ranges[2].low, |
| 158 | the_pcu->vty.cs_lqual_ranges[2].high, |
| 159 | the_pcu->vty.cs_lqual_ranges[3].low, |
Jacob Erlbeck | 94cde13 | 2015-06-09 09:44:36 +0200 | [diff] [blame] | 160 | VTY_NEWLINE); |
| 161 | |
Minh-Quang Nguyen | 1f18909 | 2017-08-16 09:50:06 -0400 | [diff] [blame] | 162 | vty_out(vty, " mcs link-quality-ranges mcs1 %d mcs2 %d %d mcs3 %d %d mcs4 %d %d mcs5 %d %d mcs6 %d %d mcs7 %d %d mcs8 %d %d mcs9 %d%s", |
Pau Espin Pedrol | 54b159a | 2021-01-14 13:30:04 +0100 | [diff] [blame] | 163 | the_pcu->vty.mcs_lqual_ranges[0].high, |
| 164 | the_pcu->vty.mcs_lqual_ranges[1].low, |
| 165 | the_pcu->vty.mcs_lqual_ranges[1].high, |
| 166 | the_pcu->vty.mcs_lqual_ranges[2].low, |
| 167 | the_pcu->vty.mcs_lqual_ranges[2].high, |
| 168 | the_pcu->vty.mcs_lqual_ranges[3].low, |
| 169 | the_pcu->vty.mcs_lqual_ranges[3].high, |
| 170 | the_pcu->vty.mcs_lqual_ranges[4].low, |
| 171 | the_pcu->vty.mcs_lqual_ranges[4].high, |
| 172 | the_pcu->vty.mcs_lqual_ranges[5].low, |
| 173 | the_pcu->vty.mcs_lqual_ranges[5].high, |
| 174 | the_pcu->vty.mcs_lqual_ranges[6].low, |
| 175 | the_pcu->vty.mcs_lqual_ranges[6].high, |
| 176 | the_pcu->vty.mcs_lqual_ranges[7].low, |
| 177 | the_pcu->vty.mcs_lqual_ranges[7].high, |
| 178 | the_pcu->vty.mcs_lqual_ranges[8].low, |
Minh-Quang Nguyen | 1f18909 | 2017-08-16 09:50:06 -0400 | [diff] [blame] | 179 | VTY_NEWLINE); |
| 180 | |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 181 | if (the_pcu->vty.force_initial_mcs) { |
Pau Espin Pedrol | 793583e | 2021-01-14 16:20:57 +0100 | [diff] [blame] | 182 | if (the_pcu->vty.initial_mcs_ul == the_pcu->vty.initial_mcs_dl) |
| 183 | vty_out(vty, " mcs %d%s", the_pcu->vty.initial_mcs_dl, |
Jacob Erlbeck | 4cc46d3 | 2016-02-02 16:02:16 +0100 | [diff] [blame] | 184 | VTY_NEWLINE); |
| 185 | else |
Pau Espin Pedrol | 793583e | 2021-01-14 16:20:57 +0100 | [diff] [blame] | 186 | vty_out(vty, " mcs %d %d%s", the_pcu->vty.initial_mcs_dl, |
| 187 | the_pcu->vty.initial_mcs_ul, VTY_NEWLINE); |
Jacob Erlbeck | 4cc46d3 | 2016-02-02 16:02:16 +0100 | [diff] [blame] | 188 | } |
Minh-Quang Nguyen | 1f18909 | 2017-08-16 09:50:06 -0400 | [diff] [blame] | 189 | |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 190 | if (the_pcu->vty.max_mcs_dl && the_pcu->vty.max_mcs_ul) { |
| 191 | if (the_pcu->vty.max_mcs_ul == the_pcu->vty.max_mcs_dl) |
| 192 | vty_out(vty, " mcs max %d%s", the_pcu->vty.max_mcs_dl, |
Jacob Erlbeck | 0d05805 | 2016-01-07 11:48:28 +0100 | [diff] [blame] | 193 | VTY_NEWLINE); |
| 194 | else |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 195 | vty_out(vty, " mcs max %d %d%s", the_pcu->vty.max_mcs_dl, |
| 196 | the_pcu->vty.max_mcs_ul, VTY_NEWLINE); |
Jacob Erlbeck | 0d05805 | 2016-01-07 11:48:28 +0100 | [diff] [blame] | 197 | } |
| 198 | |
Pau Espin Pedrol | 519d071 | 2021-01-14 14:30:03 +0100 | [diff] [blame] | 199 | vty_out(vty, " window-size %d %d%s", the_pcu->vty.ws_base, the_pcu->vty.ws_pdch, |
Jacob Erlbeck | 36df774 | 2016-01-19 15:53:30 +0100 | [diff] [blame] | 200 | VTY_NEWLINE); |
| 201 | |
Pau Espin Pedrol | 97296b2 | 2021-01-14 13:08:02 +0100 | [diff] [blame] | 202 | if (the_pcu->vty.dl_arq_type == EGPRS_ARQ2) |
| 203 | vty_out(vty, " egprs dl arq-type arq2%s", VTY_NEWLINE); |
Aravind Sirsikar | 50b0970 | 2016-08-22 17:21:10 +0530 | [diff] [blame] | 204 | |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 205 | if (the_pcu->vty.force_llc_lifetime == 0xffff) |
Andreas Eversberg | 24131bf | 2012-07-21 11:09:58 +0200 | [diff] [blame] | 206 | vty_out(vty, " queue lifetime infinite%s", VTY_NEWLINE); |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 207 | else if (the_pcu->vty.force_llc_lifetime) |
| 208 | vty_out(vty, " queue lifetime %d%s", the_pcu->vty.force_llc_lifetime, |
Andreas Eversberg | 24131bf | 2012-07-21 11:09:58 +0200 | [diff] [blame] | 209 | VTY_NEWLINE); |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 210 | if (the_pcu->vty.llc_discard_csec) |
| 211 | vty_out(vty, " queue hysteresis %d%s", the_pcu->vty.llc_discard_csec, |
Jacob Erlbeck | 0c1c877 | 2015-03-20 12:02:42 +0100 | [diff] [blame] | 212 | VTY_NEWLINE); |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 213 | if (the_pcu->vty.llc_idle_ack_csec) |
| 214 | vty_out(vty, " queue idle-ack-delay %d%s", the_pcu->vty.llc_idle_ack_csec, |
Jacob Erlbeck | d0261b7 | 2015-04-02 13:58:09 +0200 | [diff] [blame] | 215 | VTY_NEWLINE); |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 216 | if (the_pcu->vty.llc_codel_interval_msec == LLC_CODEL_USE_DEFAULT) |
Jacob Erlbeck | d4ad731 | 2015-07-17 16:39:09 +0200 | [diff] [blame] | 217 | vty_out(vty, " queue codel%s", VTY_NEWLINE); |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 218 | else if (the_pcu->vty.llc_codel_interval_msec == LLC_CODEL_DISABLE) |
Jacob Erlbeck | d4ad731 | 2015-07-17 16:39:09 +0200 | [diff] [blame] | 219 | vty_out(vty, " no queue codel%s", VTY_NEWLINE); |
| 220 | else |
| 221 | vty_out(vty, " queue codel interval %d%s", |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 222 | the_pcu->vty.llc_codel_interval_msec/10, VTY_NEWLINE); |
Jacob Erlbeck | d4ad731 | 2015-07-17 16:39:09 +0200 | [diff] [blame] | 223 | |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 224 | if (the_pcu->alloc_algorithm == alloc_algorithm_a) |
Andreas Eversberg | a1503fa | 2012-07-22 08:58:09 +0200 | [diff] [blame] | 225 | vty_out(vty, " alloc-algorithm a%s", VTY_NEWLINE); |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 226 | if (the_pcu->alloc_algorithm == alloc_algorithm_b) |
Andreas Eversberg | a1503fa | 2012-07-22 08:58:09 +0200 | [diff] [blame] | 227 | vty_out(vty, " alloc-algorithm b%s", VTY_NEWLINE); |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 228 | if (the_pcu->alloc_algorithm == alloc_algorithm_dynamic) |
Jacob Erlbeck | 400ec02 | 2015-07-14 13:31:48 +0200 | [diff] [blame] | 229 | vty_out(vty, " alloc-algorithm dynamic%s", VTY_NEWLINE); |
Pau Espin Pedrol | 03de898 | 2021-01-14 12:48:50 +0100 | [diff] [blame] | 230 | if (the_pcu->vty.force_two_phase) |
Andreas Eversberg | 07e97cf | 2012-08-07 16:00:56 +0200 | [diff] [blame] | 231 | vty_out(vty, " two-phase-access%s", VTY_NEWLINE); |
Pau Espin Pedrol | a281495 | 2021-01-14 12:53:53 +0100 | [diff] [blame] | 232 | vty_out(vty, " alpha %d%s", the_pcu->vty.alpha, VTY_NEWLINE); |
| 233 | vty_out(vty, " gamma %d%s", the_pcu->vty.gamma * 2, VTY_NEWLINE); |
Pau Espin Pedrol | 05f9f59 | 2021-01-14 12:56:58 +0100 | [diff] [blame] | 234 | if (!the_pcu->vty.dl_tbf_preemptive_retransmission) |
Oliver Smith | 45fdc44 | 2019-09-05 15:12:20 +0200 | [diff] [blame] | 235 | vty_out(vty, " no dl-tbf-preemptive-retransmission%s", VTY_NEWLINE); |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 236 | if (strcmp(the_pcu->pcu_sock_path, PCU_SOCK_DEFAULT)) |
| 237 | vty_out(vty, " pcu-socket %s%s", the_pcu->pcu_sock_path, VTY_NEWLINE); |
Andreas Eversberg | a1503fa | 2012-07-22 08:58:09 +0200 | [diff] [blame] | 238 | |
Harald Welte | 717cdf5 | 2017-07-21 21:56:23 +0200 | [diff] [blame] | 239 | for (i = 0; i < 32; i++) { |
| 240 | unsigned int cs = (1 << i); |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 241 | if (the_pcu->gsmtap_categ_mask & cs) { |
Harald Welte | 717cdf5 | 2017-07-21 21:56:23 +0200 | [diff] [blame] | 242 | vty_out(vty, " gsmtap-category %s%s", |
| 243 | get_value_string(pcu_gsmtap_categ_names, i), VTY_NEWLINE); |
| 244 | } |
| 245 | } |
| 246 | |
Pau Espin Pedrol | 113fb41 | 2021-01-14 13:36:02 +0100 | [diff] [blame] | 247 | if (the_pcu->vty.ns_dialect == NS2_DIALECT_SNS) |
Harald Welte | 57d3515 | 2018-07-05 03:11:17 +0200 | [diff] [blame] | 248 | vty_out(vty, " gb-dialect ip-sns%s", VTY_NEWLINE); |
| 249 | else |
| 250 | vty_out(vty, " gb-dialect classic%s", VTY_NEWLINE); |
| 251 | |
Pau Espin Pedrol | 924aaad | 2021-01-14 12:01:42 +0100 | [diff] [blame] | 252 | osmo_tdef_vty_write(vty, the_pcu->T_defs, " timer "); |
Pau Espin Pedrol | 1879442 | 2019-09-26 18:25:35 +0200 | [diff] [blame] | 253 | |
Max | c9ce6f9 | 2018-01-30 17:53:02 +0100 | [diff] [blame] | 254 | return CMD_SUCCESS; |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 255 | } |
| 256 | |
| 257 | /* per-BTS configuration */ |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 258 | DEFUN_ATTR(cfg_pcu, |
| 259 | cfg_pcu_cmd, |
| 260 | "pcu", |
| 261 | "BTS specific configure", |
| 262 | CMD_ATTR_IMMEDIATE) |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 263 | { |
| 264 | vty->node = PCU_NODE; |
| 265 | |
| 266 | return CMD_SUCCESS; |
| 267 | } |
| 268 | |
Jacob Erlbeck | 953c789 | 2015-09-28 18:12:57 +0200 | [diff] [blame] | 269 | #define EGPRS_STR "EGPRS configuration\n" |
| 270 | |
Pau Espin Pedrol | 270c9ea | 2020-10-30 17:15:32 +0100 | [diff] [blame] | 271 | DEFUN_DEPRECATED(cfg_pcu_egprs, |
| 272 | cfg_pcu_egprs_cmd, |
| 273 | "egprs only", |
| 274 | EGPRS_STR "Use EGPRS and disable plain GPRS\n") |
Jacob Erlbeck | 953c789 | 2015-09-28 18:12:57 +0200 | [diff] [blame] | 275 | { |
Pau Espin Pedrol | 270c9ea | 2020-10-30 17:15:32 +0100 | [diff] [blame] | 276 | vty_out (vty, "'egprs only' is deprecated, egprs support is controled from BTS/BSC config, this is now a no-op%s", VTY_NEWLINE); |
Jacob Erlbeck | 953c789 | 2015-09-28 18:12:57 +0200 | [diff] [blame] | 277 | return CMD_SUCCESS; |
| 278 | } |
| 279 | |
Pau Espin Pedrol | 270c9ea | 2020-10-30 17:15:32 +0100 | [diff] [blame] | 280 | DEFUN_DEPRECATED(cfg_pcu_no_egprs, |
| 281 | cfg_pcu_no_egprs_cmd, |
| 282 | "no egprs", |
| 283 | NO_STR EGPRS_STR) |
Jacob Erlbeck | 953c789 | 2015-09-28 18:12:57 +0200 | [diff] [blame] | 284 | { |
Pau Espin Pedrol | 270c9ea | 2020-10-30 17:15:32 +0100 | [diff] [blame] | 285 | vty_out (vty, "'no egprs only' is deprecated, egprs support is controled from BTS/BSC config, this is now a no-op%s", VTY_NEWLINE); |
Jacob Erlbeck | 953c789 | 2015-09-28 18:12:57 +0200 | [diff] [blame] | 286 | return CMD_SUCCESS; |
| 287 | } |
| 288 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 289 | DEFUN_ATTR(cfg_pcu_fc_interval, |
| 290 | cfg_pcu_fc_interval_cmd, |
| 291 | "flow-control-interval <1-10>", |
| 292 | "Interval between sending subsequent Flow Control PDUs\n" |
| 293 | "Interval time in seconds\n", |
| 294 | CMD_ATTR_IMMEDIATE) |
Andreas Eversberg | cd8a83a | 2012-09-23 06:41:21 +0200 | [diff] [blame] | 295 | { |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 296 | the_pcu->vty.fc_interval = atoi(argv[0]); |
Andreas Eversberg | cd8a83a | 2012-09-23 06:41:21 +0200 | [diff] [blame] | 297 | return CMD_SUCCESS; |
| 298 | } |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 299 | #define FC_STR "BSSGP Flow Control configuration\n" |
| 300 | #define FC_BMAX_STR(who) "Force a fixed value for the " who " bucket size\n" |
| 301 | #define FC_LR_STR(who) "Force a fixed value for the " who " leak rate\n" |
| 302 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 303 | DEFUN_ATTR(cfg_pcu_fc_bvc_bucket_size, |
| 304 | cfg_pcu_fc_bvc_bucket_size_cmd, |
| 305 | "flow-control force-bvc-bucket-size <1-6553500>", |
| 306 | FC_STR FC_BMAX_STR("BVC") "Bucket size in octets\n", |
| 307 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 308 | { |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 309 | the_pcu->vty.fc_bvc_bucket_size = atoi(argv[0]); |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 310 | return CMD_SUCCESS; |
| 311 | } |
| 312 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 313 | DEFUN_ATTR(cfg_pcu_no_fc_bvc_bucket_size, |
| 314 | cfg_pcu_no_fc_bvc_bucket_size_cmd, |
| 315 | "no flow-control force-bvc-bucket-size", |
| 316 | NO_STR FC_STR FC_BMAX_STR("BVC"), |
| 317 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 318 | { |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 319 | the_pcu->vty.fc_bvc_bucket_size = 0; |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 320 | return CMD_SUCCESS; |
| 321 | } |
| 322 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 323 | DEFUN_ATTR(cfg_pcu_fc_bvc_leak_rate, |
| 324 | cfg_pcu_fc_bvc_leak_rate_cmd, |
| 325 | "flow-control force-bvc-leak-rate <1-6553500>", |
| 326 | FC_STR FC_LR_STR("BVC") "Leak rate in bit/s\n", |
| 327 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 328 | { |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 329 | the_pcu->vty.fc_bvc_leak_rate = atoi(argv[0]); |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 330 | |
| 331 | return CMD_SUCCESS; |
| 332 | } |
| 333 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 334 | DEFUN_ATTR(cfg_pcu_no_fc_bvc_leak_rate, |
| 335 | cfg_pcu_no_fc_bvc_leak_rate_cmd, |
| 336 | "no flow-control force-bvc-leak-rate", |
| 337 | NO_STR FC_STR FC_LR_STR("BVC"), |
| 338 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 339 | { |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 340 | the_pcu->vty.fc_bvc_leak_rate = 0; |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 341 | return CMD_SUCCESS; |
| 342 | } |
| 343 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 344 | DEFUN_ATTR(cfg_pcu_fc_ms_bucket_size, |
| 345 | cfg_pcu_fc_ms_bucket_size_cmd, |
| 346 | "flow-control force-ms-bucket-size <1-6553500>", |
| 347 | FC_STR FC_BMAX_STR("default MS") "Bucket size in octets\n", |
| 348 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 349 | { |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 350 | the_pcu->vty.fc_ms_bucket_size = atoi(argv[0]); |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 351 | return CMD_SUCCESS; |
| 352 | } |
| 353 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 354 | DEFUN_ATTR(cfg_pcu_no_fc_ms_bucket_size, |
| 355 | cfg_pcu_no_fc_ms_bucket_size_cmd, |
| 356 | "no flow-control force-ms-bucket-size", |
| 357 | NO_STR FC_STR FC_BMAX_STR("default MS"), |
| 358 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 359 | { |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 360 | the_pcu->vty.fc_ms_bucket_size = 0; |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 361 | return CMD_SUCCESS; |
| 362 | } |
| 363 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 364 | DEFUN_ATTR(cfg_pcu_fc_ms_leak_rate, |
| 365 | cfg_pcu_fc_ms_leak_rate_cmd, |
| 366 | "flow-control force-ms-leak-rate <1-6553500>", |
| 367 | FC_STR FC_LR_STR("default MS") "Leak rate in bit/s\n", |
| 368 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 369 | { |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 370 | the_pcu->vty.fc_ms_leak_rate = atoi(argv[0]); |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 371 | return CMD_SUCCESS; |
| 372 | } |
| 373 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 374 | DEFUN_ATTR(cfg_pcu_no_fc_ms_leak_rate, |
| 375 | cfg_pcu_no_fc_ms_leak_rate_cmd, |
| 376 | "no flow-control force-ms-leak-rate", |
| 377 | NO_STR FC_STR FC_LR_STR("default MS"), |
| 378 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 379 | { |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 380 | the_pcu->vty.fc_ms_leak_rate = 0; |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 381 | return CMD_SUCCESS; |
| 382 | } |
Andreas Eversberg | cd8a83a | 2012-09-23 06:41:21 +0200 | [diff] [blame] | 383 | |
Jacob Erlbeck | 0288cdb | 2015-05-06 10:47:30 +0200 | [diff] [blame] | 384 | #define FC_BTIME_STR "Set target downlink maximum queueing time (only affects the advertised bucket size)\n" |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 385 | DEFUN_ATTR(cfg_pcu_fc_bucket_time, |
| 386 | cfg_pcu_fc_bucket_time_cmd, |
| 387 | "flow-control bucket-time <1-65534>", |
| 388 | FC_STR FC_BTIME_STR "Time in centi-seconds\n", |
| 389 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 0288cdb | 2015-05-06 10:47:30 +0200 | [diff] [blame] | 390 | { |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 391 | the_pcu->vty.fc_bucket_time = atoi(argv[0]); |
Jacob Erlbeck | 0288cdb | 2015-05-06 10:47:30 +0200 | [diff] [blame] | 392 | return CMD_SUCCESS; |
| 393 | } |
| 394 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 395 | DEFUN_ATTR(cfg_pcu_no_fc_bucket_time, |
| 396 | cfg_pcu_no_fc_bucket_time_cmd, |
| 397 | "no flow-control bucket-time", |
| 398 | NO_STR FC_STR FC_BTIME_STR, |
| 399 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 0288cdb | 2015-05-06 10:47:30 +0200 | [diff] [blame] | 400 | { |
Pau Espin Pedrol | e891222 | 2021-01-14 14:03:17 +0100 | [diff] [blame] | 401 | the_pcu->vty.fc_bucket_time = 0; |
Jacob Erlbeck | 0288cdb | 2015-05-06 10:47:30 +0200 | [diff] [blame] | 402 | return CMD_SUCCESS; |
| 403 | } |
| 404 | |
Jacob Erlbeck | 8322d08 | 2015-06-04 15:12:10 +0200 | [diff] [blame] | 405 | #define CS_STR "Coding Scheme configuration\n" |
Jacob Erlbeck | 0288cdb | 2015-05-06 10:47:30 +0200 | [diff] [blame] | 406 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 407 | DEFUN_ATTR(cfg_pcu_cs, |
| 408 | cfg_pcu_cs_cmd, |
| 409 | "cs <1-4> [<1-4>]", |
| 410 | CS_STR |
| 411 | "Initial CS value to be used (overrides BTS config)\n" |
| 412 | "Use a different initial CS value for the uplink", |
| 413 | CMD_ATTR_IMMEDIATE) |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 414 | { |
Pau Espin Pedrol | 793583e | 2021-01-14 16:20:57 +0100 | [diff] [blame] | 415 | uint8_t cs_dl, cs_ul; |
| 416 | cs_dl = atoi(argv[0]); |
Andreas Eversberg | 499ff41 | 2012-10-03 14:21:36 +0200 | [diff] [blame] | 417 | if (argc > 1) |
Pau Espin Pedrol | 793583e | 2021-01-14 16:20:57 +0100 | [diff] [blame] | 418 | cs_ul = atoi(argv[1]); |
Andreas Eversberg | 499ff41 | 2012-10-03 14:21:36 +0200 | [diff] [blame] | 419 | else |
Pau Espin Pedrol | 793583e | 2021-01-14 16:20:57 +0100 | [diff] [blame] | 420 | cs_ul = cs_dl; |
| 421 | the_pcu->vty.force_initial_cs = true; |
| 422 | gprs_pcu_set_initial_cs(the_pcu, cs_dl, cs_ul); |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 423 | return CMD_SUCCESS; |
| 424 | } |
| 425 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 426 | DEFUN_ATTR(cfg_pcu_no_cs, |
| 427 | cfg_pcu_no_cs_cmd, |
| 428 | "no cs", |
| 429 | NO_STR CS_STR, |
| 430 | CMD_ATTR_IMMEDIATE) |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 431 | { |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 432 | the_pcu->vty.force_initial_cs = false; |
Pau Espin Pedrol | 793583e | 2021-01-14 16:20:57 +0100 | [diff] [blame] | 433 | gprs_pcu_set_initial_cs(the_pcu, 0, 0); |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 434 | return CMD_SUCCESS; |
| 435 | } |
| 436 | |
Jacob Erlbeck | 0d05805 | 2016-01-07 11:48:28 +0100 | [diff] [blame] | 437 | #define CS_MAX_STR "Set maximum values for adaptive CS selection (overrides BTS config)\n" |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 438 | DEFUN_ATTR(cfg_pcu_cs_max, |
| 439 | cfg_pcu_cs_max_cmd, |
| 440 | "cs max <1-4> [<1-4>]", |
| 441 | CS_STR |
| 442 | CS_MAX_STR |
| 443 | "Maximum CS value to be used\n" |
| 444 | "Use a different maximum CS value for the uplink", |
| 445 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | b33e675 | 2015-06-04 19:04:30 +0200 | [diff] [blame] | 446 | { |
Pau Espin Pedrol | 343ec9b | 2020-10-30 18:35:54 +0100 | [diff] [blame] | 447 | uint8_t cs_dl = atoi(argv[0]); |
| 448 | uint8_t cs_ul; |
Jacob Erlbeck | b33e675 | 2015-06-04 19:04:30 +0200 | [diff] [blame] | 449 | |
Jacob Erlbeck | b33e675 | 2015-06-04 19:04:30 +0200 | [diff] [blame] | 450 | if (argc > 1) |
Pau Espin Pedrol | 343ec9b | 2020-10-30 18:35:54 +0100 | [diff] [blame] | 451 | cs_ul = atoi(argv[1]); |
Jacob Erlbeck | b33e675 | 2015-06-04 19:04:30 +0200 | [diff] [blame] | 452 | else |
Pau Espin Pedrol | 343ec9b | 2020-10-30 18:35:54 +0100 | [diff] [blame] | 453 | cs_ul = cs_dl; |
Jacob Erlbeck | b33e675 | 2015-06-04 19:04:30 +0200 | [diff] [blame] | 454 | |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 455 | gprs_pcu_set_max_cs(the_pcu, cs_dl, cs_ul); |
Jacob Erlbeck | b33e675 | 2015-06-04 19:04:30 +0200 | [diff] [blame] | 456 | return CMD_SUCCESS; |
| 457 | } |
| 458 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 459 | DEFUN_ATTR(cfg_pcu_no_cs_max, |
| 460 | cfg_pcu_no_cs_max_cmd, |
| 461 | "no cs max", |
| 462 | NO_STR CS_STR CS_MAX_STR, |
| 463 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | b33e675 | 2015-06-04 19:04:30 +0200 | [diff] [blame] | 464 | { |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 465 | gprs_pcu_set_max_cs(the_pcu, 0, 0); |
Jacob Erlbeck | b33e675 | 2015-06-04 19:04:30 +0200 | [diff] [blame] | 466 | return CMD_SUCCESS; |
| 467 | } |
| 468 | |
Jacob Erlbeck | 0d05805 | 2016-01-07 11:48:28 +0100 | [diff] [blame] | 469 | #define MCS_STR "Modulation and Coding Scheme configuration (EGPRS)\n" |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 470 | DEFUN_ATTR(cfg_pcu_mcs, |
| 471 | cfg_pcu_mcs_cmd, |
| 472 | "mcs <1-9> [<1-9>]", |
| 473 | MCS_STR |
| 474 | "Initial MCS value to be used (default 1)\n" |
| 475 | "Use a different initial MCS value for the uplink", |
| 476 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 4cc46d3 | 2016-02-02 16:02:16 +0100 | [diff] [blame] | 477 | { |
Pau Espin Pedrol | 793583e | 2021-01-14 16:20:57 +0100 | [diff] [blame] | 478 | uint8_t mcs_dl, mcs_ul; |
| 479 | mcs_dl = atoi(argv[0]); |
Jacob Erlbeck | 4cc46d3 | 2016-02-02 16:02:16 +0100 | [diff] [blame] | 480 | if (argc > 1) |
Pau Espin Pedrol | 793583e | 2021-01-14 16:20:57 +0100 | [diff] [blame] | 481 | mcs_ul = atoi(argv[1]); |
Jacob Erlbeck | 4cc46d3 | 2016-02-02 16:02:16 +0100 | [diff] [blame] | 482 | else |
Pau Espin Pedrol | 793583e | 2021-01-14 16:20:57 +0100 | [diff] [blame] | 483 | mcs_ul = mcs_dl; |
| 484 | the_pcu->vty.force_initial_mcs = true; |
| 485 | gprs_pcu_set_initial_mcs(the_pcu, mcs_dl, mcs_ul); |
Jacob Erlbeck | 4cc46d3 | 2016-02-02 16:02:16 +0100 | [diff] [blame] | 486 | return CMD_SUCCESS; |
| 487 | } |
| 488 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 489 | DEFUN_ATTR(cfg_pcu_no_mcs, |
| 490 | cfg_pcu_no_mcs_cmd, |
| 491 | "no mcs", |
| 492 | NO_STR MCS_STR, |
| 493 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 4cc46d3 | 2016-02-02 16:02:16 +0100 | [diff] [blame] | 494 | { |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 495 | the_pcu->vty.force_initial_mcs = false; |
Pau Espin Pedrol | 793583e | 2021-01-14 16:20:57 +0100 | [diff] [blame] | 496 | gprs_pcu_set_initial_mcs(the_pcu, 0, 0); |
Jacob Erlbeck | 4cc46d3 | 2016-02-02 16:02:16 +0100 | [diff] [blame] | 497 | return CMD_SUCCESS; |
| 498 | } |
| 499 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 500 | DEFUN_ATTR(cfg_pcu_mcs_max, |
| 501 | cfg_pcu_mcs_max_cmd, |
| 502 | "mcs max <1-9> [<1-9>]", |
| 503 | MCS_STR |
| 504 | CS_MAX_STR |
| 505 | "Maximum MCS value to be used\n" |
| 506 | "Use a different maximum MCS value for the uplink", |
| 507 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 0d05805 | 2016-01-07 11:48:28 +0100 | [diff] [blame] | 508 | { |
Pau Espin Pedrol | 343ec9b | 2020-10-30 18:35:54 +0100 | [diff] [blame] | 509 | uint8_t mcs_dl = atoi(argv[0]); |
| 510 | uint8_t mcs_ul; |
Jacob Erlbeck | 0d05805 | 2016-01-07 11:48:28 +0100 | [diff] [blame] | 511 | |
Jacob Erlbeck | 0d05805 | 2016-01-07 11:48:28 +0100 | [diff] [blame] | 512 | if (argc > 1) |
Pau Espin Pedrol | 343ec9b | 2020-10-30 18:35:54 +0100 | [diff] [blame] | 513 | mcs_ul = atoi(argv[1]); |
Jacob Erlbeck | 0d05805 | 2016-01-07 11:48:28 +0100 | [diff] [blame] | 514 | else |
Pau Espin Pedrol | 343ec9b | 2020-10-30 18:35:54 +0100 | [diff] [blame] | 515 | mcs_ul = mcs_dl; |
Jacob Erlbeck | 0d05805 | 2016-01-07 11:48:28 +0100 | [diff] [blame] | 516 | |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 517 | gprs_pcu_set_max_mcs(the_pcu, mcs_dl, mcs_ul); |
Jacob Erlbeck | 0d05805 | 2016-01-07 11:48:28 +0100 | [diff] [blame] | 518 | return CMD_SUCCESS; |
| 519 | } |
| 520 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 521 | DEFUN_ATTR(cfg_pcu_no_mcs_max, |
| 522 | cfg_pcu_no_mcs_max_cmd, |
| 523 | "no mcs max", |
| 524 | NO_STR MCS_STR CS_MAX_STR, |
| 525 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 0d05805 | 2016-01-07 11:48:28 +0100 | [diff] [blame] | 526 | { |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 527 | gprs_pcu_set_max_mcs(the_pcu, 0, 0); |
Jacob Erlbeck | 0d05805 | 2016-01-07 11:48:28 +0100 | [diff] [blame] | 528 | return CMD_SUCCESS; |
| 529 | } |
| 530 | |
Aravind Sirsikar | 50b0970 | 2016-08-22 17:21:10 +0530 | [diff] [blame] | 531 | #define DL_STR "downlink specific configuration\n" |
| 532 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 533 | DEFUN_ATTR(cfg_pcu_dl_arq_type, |
| 534 | cfg_pcu_dl_arq_cmd, |
| 535 | "egprs dl arq-type (spb|arq2)", |
| 536 | EGPRS_STR DL_STR "ARQ options\n" |
| 537 | "enable SPB(ARQ1) support\n" |
| 538 | "enable ARQ2 support", |
| 539 | CMD_ATTR_IMMEDIATE) |
Aravind Sirsikar | 50b0970 | 2016-08-22 17:21:10 +0530 | [diff] [blame] | 540 | { |
Aravind Sirsikar | 50b0970 | 2016-08-22 17:21:10 +0530 | [diff] [blame] | 541 | if (!strcmp(argv[0], "arq2")) |
Pau Espin Pedrol | 97296b2 | 2021-01-14 13:08:02 +0100 | [diff] [blame] | 542 | the_pcu->vty.dl_arq_type = EGPRS_ARQ2; |
Aravind Sirsikar | 50b0970 | 2016-08-22 17:21:10 +0530 | [diff] [blame] | 543 | else |
Pau Espin Pedrol | 97296b2 | 2021-01-14 13:08:02 +0100 | [diff] [blame] | 544 | the_pcu->vty.dl_arq_type = EGPRS_ARQ1; |
Aravind Sirsikar | 50b0970 | 2016-08-22 17:21:10 +0530 | [diff] [blame] | 545 | |
| 546 | return CMD_SUCCESS; |
| 547 | } |
| 548 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 549 | DEFUN_USRATTR(cfg_pcu_window_size, |
| 550 | cfg_pcu_window_size_cmd, |
| 551 | X(PCU_VTY_ATTR_NEW_TBF), |
| 552 | "window-size <0-1024> [<0-256>]", |
| 553 | "Window size configuration (b + N_PDCH * f)\n" |
| 554 | "Base value (b)\n" |
| 555 | "Factor for number of PDCH (f)") |
Jacob Erlbeck | 36df774 | 2016-01-19 15:53:30 +0100 | [diff] [blame] | 556 | { |
Jacob Erlbeck | 36df774 | 2016-01-19 15:53:30 +0100 | [diff] [blame] | 557 | uint16_t b = atoi(argv[0]); |
| 558 | |
Pau Espin Pedrol | 519d071 | 2021-01-14 14:30:03 +0100 | [diff] [blame] | 559 | the_pcu->vty.ws_base = b; |
Jacob Erlbeck | 36df774 | 2016-01-19 15:53:30 +0100 | [diff] [blame] | 560 | if (argc > 1) { |
| 561 | uint16_t f = atoi(argv[1]); |
Pau Espin Pedrol | 519d071 | 2021-01-14 14:30:03 +0100 | [diff] [blame] | 562 | the_pcu->vty.ws_pdch = f; |
Jacob Erlbeck | 36df774 | 2016-01-19 15:53:30 +0100 | [diff] [blame] | 563 | } |
| 564 | |
| 565 | return CMD_SUCCESS; |
| 566 | } |
| 567 | |
| 568 | |
Andreas Eversberg | 24131bf | 2012-07-21 11:09:58 +0200 | [diff] [blame] | 569 | #define QUEUE_STR "Packet queue options\n" |
| 570 | #define LIFETIME_STR "Set lifetime limit of LLC frame in centi-seconds " \ |
| 571 | "(overrides the value given by SGSN)\n" |
| 572 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 573 | DEFUN_USRATTR(cfg_pcu_queue_lifetime, |
| 574 | cfg_pcu_queue_lifetime_cmd, |
| 575 | X(PCU_VTY_ATTR_NEW_TBF), |
| 576 | "queue lifetime <1-65534>", |
| 577 | QUEUE_STR LIFETIME_STR "Lifetime in centi-seconds") |
Andreas Eversberg | 24131bf | 2012-07-21 11:09:58 +0200 | [diff] [blame] | 578 | { |
Jacob Erlbeck | 2acfbeb | 2015-04-30 17:55:16 +0200 | [diff] [blame] | 579 | uint16_t csec = atoi(argv[0]); |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 580 | the_pcu->vty.force_llc_lifetime = csec; |
Andreas Eversberg | 24131bf | 2012-07-21 11:09:58 +0200 | [diff] [blame] | 581 | return CMD_SUCCESS; |
| 582 | } |
| 583 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 584 | DEFUN_USRATTR(cfg_pcu_queue_lifetime_inf, |
| 585 | cfg_pcu_queue_lifetime_inf_cmd, |
| 586 | X(PCU_VTY_ATTR_NEW_TBF), |
| 587 | "queue lifetime infinite", |
| 588 | QUEUE_STR LIFETIME_STR "Infinite lifetime") |
Andreas Eversberg | 24131bf | 2012-07-21 11:09:58 +0200 | [diff] [blame] | 589 | { |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 590 | the_pcu->vty.force_llc_lifetime = 0xffff; |
Andreas Eversberg | 24131bf | 2012-07-21 11:09:58 +0200 | [diff] [blame] | 591 | return CMD_SUCCESS; |
| 592 | } |
| 593 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 594 | DEFUN_USRATTR(cfg_pcu_no_queue_lifetime, |
| 595 | cfg_pcu_no_queue_lifetime_cmd, |
| 596 | X(PCU_VTY_ATTR_NEW_TBF), |
| 597 | "no queue lifetime", |
| 598 | NO_STR QUEUE_STR "Disable lifetime limit of LLC frame (use value given " |
| 599 | "by SGSN)\n") |
Andreas Eversberg | 24131bf | 2012-07-21 11:09:58 +0200 | [diff] [blame] | 600 | { |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 601 | the_pcu->vty.force_llc_lifetime = 0; |
Andreas Eversberg | 24131bf | 2012-07-21 11:09:58 +0200 | [diff] [blame] | 602 | return CMD_SUCCESS; |
| 603 | } |
| 604 | |
Jacob Erlbeck | 0c1c877 | 2015-03-20 12:02:42 +0100 | [diff] [blame] | 605 | #define QUEUE_HYSTERESIS_STR "Set lifetime hysteresis of LLC frame in centi-seconds " \ |
| 606 | "(continue discarding until lifetime-hysteresis is reached)\n" |
| 607 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 608 | DEFUN_USRATTR(cfg_pcu_queue_hysteresis, |
| 609 | cfg_pcu_queue_hysteresis_cmd, |
| 610 | X(PCU_VTY_ATTR_NEW_TBF), |
| 611 | "queue hysteresis <1-65535>", |
| 612 | QUEUE_STR QUEUE_HYSTERESIS_STR "Hysteresis in centi-seconds") |
Jacob Erlbeck | 0c1c877 | 2015-03-20 12:02:42 +0100 | [diff] [blame] | 613 | { |
Jacob Erlbeck | 2acfbeb | 2015-04-30 17:55:16 +0200 | [diff] [blame] | 614 | uint16_t csec = atoi(argv[0]); |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 615 | the_pcu->vty.llc_discard_csec = csec; |
Jacob Erlbeck | 0c1c877 | 2015-03-20 12:02:42 +0100 | [diff] [blame] | 616 | return CMD_SUCCESS; |
| 617 | } |
| 618 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 619 | DEFUN_USRATTR(cfg_pcu_no_queue_hysteresis, |
| 620 | cfg_pcu_no_queue_hysteresis_cmd, |
| 621 | X(PCU_VTY_ATTR_NEW_TBF), |
| 622 | "no queue hysteresis", |
| 623 | NO_STR QUEUE_STR QUEUE_HYSTERESIS_STR) |
Jacob Erlbeck | 0c1c877 | 2015-03-20 12:02:42 +0100 | [diff] [blame] | 624 | { |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 625 | the_pcu->vty.llc_discard_csec = 0; |
Jacob Erlbeck | 0c1c877 | 2015-03-20 12:02:42 +0100 | [diff] [blame] | 626 | return CMD_SUCCESS; |
| 627 | } |
| 628 | |
Jacob Erlbeck | d4ad731 | 2015-07-17 16:39:09 +0200 | [diff] [blame] | 629 | #define QUEUE_CODEL_STR "Set CoDel queue management\n" |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 630 | DEFUN_USRATTR(cfg_pcu_queue_codel, |
| 631 | cfg_pcu_queue_codel_cmd, |
| 632 | X(PCU_VTY_ATTR_NEW_SUBSCR), |
| 633 | "queue codel", |
| 634 | QUEUE_STR QUEUE_CODEL_STR) |
Jacob Erlbeck | d4ad731 | 2015-07-17 16:39:09 +0200 | [diff] [blame] | 635 | { |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 636 | the_pcu->vty.llc_codel_interval_msec = LLC_CODEL_USE_DEFAULT; |
Jacob Erlbeck | d4ad731 | 2015-07-17 16:39:09 +0200 | [diff] [blame] | 637 | return CMD_SUCCESS; |
| 638 | } |
| 639 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 640 | DEFUN_USRATTR(cfg_pcu_queue_codel_interval, |
| 641 | cfg_pcu_queue_codel_interval_cmd, |
| 642 | X(PCU_VTY_ATTR_NEW_SUBSCR), |
| 643 | "queue codel interval <1-1000>", |
| 644 | QUEUE_STR QUEUE_CODEL_STR "Specify interval\n" "Interval in centi-seconds") |
Jacob Erlbeck | d4ad731 | 2015-07-17 16:39:09 +0200 | [diff] [blame] | 645 | { |
Jacob Erlbeck | d4ad731 | 2015-07-17 16:39:09 +0200 | [diff] [blame] | 646 | uint16_t csec = atoi(argv[0]); |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 647 | the_pcu->vty.llc_codel_interval_msec = 10*csec; |
Jacob Erlbeck | d4ad731 | 2015-07-17 16:39:09 +0200 | [diff] [blame] | 648 | return CMD_SUCCESS; |
| 649 | } |
| 650 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 651 | DEFUN_USRATTR(cfg_pcu_no_queue_codel, |
| 652 | cfg_pcu_no_queue_codel_cmd, |
| 653 | X(PCU_VTY_ATTR_NEW_SUBSCR), |
| 654 | "no queue codel", |
| 655 | NO_STR QUEUE_STR QUEUE_CODEL_STR) |
Jacob Erlbeck | d4ad731 | 2015-07-17 16:39:09 +0200 | [diff] [blame] | 656 | { |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 657 | the_pcu->vty.llc_codel_interval_msec = LLC_CODEL_DISABLE; |
Jacob Erlbeck | d4ad731 | 2015-07-17 16:39:09 +0200 | [diff] [blame] | 658 | return CMD_SUCCESS; |
| 659 | } |
| 660 | |
| 661 | |
Jacob Erlbeck | d0261b7 | 2015-04-02 13:58:09 +0200 | [diff] [blame] | 662 | #define QUEUE_IDLE_ACK_STR "Request an ACK after the last DL LLC frame in centi-seconds\n" |
| 663 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 664 | DEFUN_ATTR(cfg_pcu_queue_idle_ack_delay, |
| 665 | cfg_pcu_queue_idle_ack_delay_cmd, |
| 666 | "queue idle-ack-delay <1-65535>", |
| 667 | QUEUE_STR QUEUE_IDLE_ACK_STR "Idle ACK delay in centi-seconds", |
| 668 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | d0261b7 | 2015-04-02 13:58:09 +0200 | [diff] [blame] | 669 | { |
Jacob Erlbeck | 2acfbeb | 2015-04-30 17:55:16 +0200 | [diff] [blame] | 670 | uint16_t csec = atoi(argv[0]); |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 671 | the_pcu->vty.llc_idle_ack_csec = csec; |
Jacob Erlbeck | d0261b7 | 2015-04-02 13:58:09 +0200 | [diff] [blame] | 672 | return CMD_SUCCESS; |
| 673 | } |
| 674 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 675 | DEFUN_ATTR(cfg_pcu_no_queue_idle_ack_delay, |
| 676 | cfg_pcu_no_queue_idle_ack_delay_cmd, |
| 677 | "no queue idle-ack-delay", |
| 678 | NO_STR QUEUE_STR QUEUE_IDLE_ACK_STR, |
| 679 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | d0261b7 | 2015-04-02 13:58:09 +0200 | [diff] [blame] | 680 | { |
Pau Espin Pedrol | f473ec9 | 2021-01-14 14:45:14 +0100 | [diff] [blame] | 681 | the_pcu->vty.llc_idle_ack_csec = 0; |
Jacob Erlbeck | d0261b7 | 2015-04-02 13:58:09 +0200 | [diff] [blame] | 682 | return CMD_SUCCESS; |
| 683 | } |
| 684 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 685 | DEFUN_ATTR(cfg_pcu_alloc, |
| 686 | cfg_pcu_alloc_cmd, |
| 687 | "alloc-algorithm (a|b|dynamic)", |
| 688 | "Select slot allocation algorithm to use when assigning timeslots on " |
| 689 | "PACCH\n" |
| 690 | "Single slot is assigned only\n" |
| 691 | "Multiple slots are assigned for semi-duplex operation\n" |
| 692 | "Dynamically select the algorithm based on the system state\n", |
| 693 | CMD_ATTR_IMMEDIATE) |
Andreas Eversberg | a1503fa | 2012-07-22 08:58:09 +0200 | [diff] [blame] | 694 | { |
Andreas Eversberg | a1503fa | 2012-07-22 08:58:09 +0200 | [diff] [blame] | 695 | switch (argv[0][0]) { |
| 696 | case 'a': |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 697 | the_pcu->alloc_algorithm = alloc_algorithm_a; |
Andreas Eversberg | a1503fa | 2012-07-22 08:58:09 +0200 | [diff] [blame] | 698 | break; |
| 699 | case 'b': |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 700 | the_pcu->alloc_algorithm = alloc_algorithm_b; |
Andreas Eversberg | a1503fa | 2012-07-22 08:58:09 +0200 | [diff] [blame] | 701 | break; |
Jacob Erlbeck | 400ec02 | 2015-07-14 13:31:48 +0200 | [diff] [blame] | 702 | default: |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 703 | the_pcu->alloc_algorithm = alloc_algorithm_dynamic; |
Jacob Erlbeck | 400ec02 | 2015-07-14 13:31:48 +0200 | [diff] [blame] | 704 | break; |
Andreas Eversberg | a1503fa | 2012-07-22 08:58:09 +0200 | [diff] [blame] | 705 | } |
| 706 | |
| 707 | return CMD_SUCCESS; |
| 708 | } |
| 709 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 710 | DEFUN_ATTR(cfg_pcu_two_phase, |
| 711 | cfg_pcu_two_phase_cmd, |
| 712 | "two-phase-access", |
| 713 | "Force two phase access when MS requests single phase access\n", |
| 714 | CMD_ATTR_IMMEDIATE) |
Andreas Eversberg | 07e97cf | 2012-08-07 16:00:56 +0200 | [diff] [blame] | 715 | { |
Pau Espin Pedrol | 03de898 | 2021-01-14 12:48:50 +0100 | [diff] [blame] | 716 | the_pcu->vty.force_two_phase = 1; |
Andreas Eversberg | 07e97cf | 2012-08-07 16:00:56 +0200 | [diff] [blame] | 717 | return CMD_SUCCESS; |
| 718 | } |
| 719 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 720 | DEFUN_ATTR(cfg_pcu_no_two_phase, |
| 721 | cfg_pcu_no_two_phase_cmd, |
| 722 | "no two-phase-access", |
| 723 | NO_STR "Only use two phase access when requested my MS\n", |
| 724 | CMD_ATTR_IMMEDIATE) |
Andreas Eversberg | 07e97cf | 2012-08-07 16:00:56 +0200 | [diff] [blame] | 725 | { |
Pau Espin Pedrol | 03de898 | 2021-01-14 12:48:50 +0100 | [diff] [blame] | 726 | the_pcu->vty.force_two_phase = 0; |
Andreas Eversberg | 07e97cf | 2012-08-07 16:00:56 +0200 | [diff] [blame] | 727 | return CMD_SUCCESS; |
| 728 | } |
| 729 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 730 | DEFUN_ATTR(cfg_pcu_alpha, |
| 731 | cfg_pcu_alpha_cmd, |
| 732 | "alpha <0-10>", |
| 733 | "Alpha parameter for MS power control in units of 0.1 (see TS 05.08) " |
| 734 | "NOTE: Be sure to set Alpha value at System information 13 too.\n" |
| 735 | "Alpha in units of 0.1\n", |
| 736 | CMD_ATTR_IMMEDIATE) |
Andreas Eversberg | aafcbbb | 2012-09-27 09:20:45 +0200 | [diff] [blame] | 737 | { |
Pau Espin Pedrol | a281495 | 2021-01-14 12:53:53 +0100 | [diff] [blame] | 738 | the_pcu->vty.alpha = atoi(argv[0]); |
Andreas Eversberg | aafcbbb | 2012-09-27 09:20:45 +0200 | [diff] [blame] | 739 | return CMD_SUCCESS; |
| 740 | } |
| 741 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 742 | DEFUN_ATTR(cfg_pcu_gamma, |
| 743 | cfg_pcu_gamma_cmd, |
| 744 | "gamma <0-62>", |
| 745 | "Gamma parameter for MS power control in units of dB (see TS 05.08)\n" |
| 746 | "Gamma in even unit of dBs\n", |
| 747 | CMD_ATTR_IMMEDIATE) |
Andreas Eversberg | aafcbbb | 2012-09-27 09:20:45 +0200 | [diff] [blame] | 748 | { |
Pau Espin Pedrol | a281495 | 2021-01-14 12:53:53 +0100 | [diff] [blame] | 749 | the_pcu->vty.gamma = atoi(argv[0]) / 2; |
Andreas Eversberg | aafcbbb | 2012-09-27 09:20:45 +0200 | [diff] [blame] | 750 | return CMD_SUCCESS; |
| 751 | } |
| 752 | |
Holger Hans Peter Freyther | f537298 | 2013-10-27 09:02:31 +0100 | [diff] [blame] | 753 | DEFUN(show_bts_stats, |
| 754 | show_bts_stats_cmd, |
| 755 | "show bts statistics", |
| 756 | SHOW_STR "BTS related functionality\nStatistics\n") |
| 757 | { |
Pau Espin Pedrol | d1049dc | 2021-01-18 17:14:14 +0100 | [diff] [blame^] | 758 | struct gprs_rlcmac_bts *bts; |
| 759 | llist_for_each_entry(bts, &the_pcu->bts_list, list) { |
| 760 | vty_out(vty, "BTS%" PRIu8 ":%s", bts->nr, VTY_NEWLINE); |
| 761 | vty_out_rate_ctr_group(vty, " ", bts_rate_counters(bts)); |
| 762 | } |
Holger Hans Peter Freyther | f537298 | 2013-10-27 09:02:31 +0100 | [diff] [blame] | 763 | return CMD_SUCCESS; |
Daniel Willmann | 772415f | 2014-01-15 17:06:51 +0100 | [diff] [blame] | 764 | } |
| 765 | |
Pau Espin Pedrol | a1ac2f0 | 2020-09-22 17:01:31 +0200 | [diff] [blame] | 766 | DEFUN(show_bts_pdch, |
| 767 | show_bts_pdch_cmd, |
| 768 | "show bts pdch", |
| 769 | SHOW_STR "BTS related functionality\nPDCH timeslots\n") |
| 770 | { |
Pau Espin Pedrol | d1049dc | 2021-01-18 17:14:14 +0100 | [diff] [blame^] | 771 | struct gprs_rlcmac_bts *bts; |
| 772 | llist_for_each_entry(bts, &the_pcu->bts_list, list) { |
| 773 | pcu_vty_show_bts_pdch(vty, bts); |
| 774 | } |
| 775 | return CMD_SUCCESS; |
Pau Espin Pedrol | a1ac2f0 | 2020-09-22 17:01:31 +0200 | [diff] [blame] | 776 | } |
| 777 | |
Jacob Erlbeck | 3bed5d1 | 2015-03-19 11:22:38 +0100 | [diff] [blame] | 778 | #define IDLE_TIME_STR "keep an idle DL TBF alive for the time given\n" |
Pau Espin Pedrol | 2b5c629 | 2019-09-09 13:41:00 +0200 | [diff] [blame] | 779 | DEFUN_DEPRECATED(cfg_pcu_dl_tbf_idle_time, |
Jacob Erlbeck | 3bed5d1 | 2015-03-19 11:22:38 +0100 | [diff] [blame] | 780 | cfg_pcu_dl_tbf_idle_time_cmd, |
| 781 | "dl-tbf-idle-time <1-5000>", |
| 782 | IDLE_TIME_STR "idle time in msec") |
| 783 | { |
Pau Espin Pedrol | 2b5c629 | 2019-09-09 13:41:00 +0200 | [diff] [blame] | 784 | vty_out(vty, "%% 'dl-tbf-idle-time' is now deprecated: use 'timer X2031 <val>' instead%s", VTY_NEWLINE); |
| 785 | |
Pau Espin Pedrol | 924aaad | 2021-01-14 12:01:42 +0100 | [diff] [blame] | 786 | if (osmo_tdef_set(the_pcu->T_defs, -2031, atoi(argv[0]), OSMO_TDEF_MS) < 0) |
Pau Espin Pedrol | 2b5c629 | 2019-09-09 13:41:00 +0200 | [diff] [blame] | 787 | return CMD_WARNING; |
Jacob Erlbeck | 3bed5d1 | 2015-03-19 11:22:38 +0100 | [diff] [blame] | 788 | return CMD_SUCCESS; |
| 789 | } |
| 790 | |
Pau Espin Pedrol | 2b5c629 | 2019-09-09 13:41:00 +0200 | [diff] [blame] | 791 | DEFUN_DEPRECATED(cfg_pcu_no_dl_tbf_idle_time, |
Jacob Erlbeck | 3bed5d1 | 2015-03-19 11:22:38 +0100 | [diff] [blame] | 792 | cfg_pcu_no_dl_tbf_idle_time_cmd, |
| 793 | "no dl-tbf-idle-time", |
| 794 | NO_STR IDLE_TIME_STR) |
| 795 | { |
Pau Espin Pedrol | 2b5c629 | 2019-09-09 13:41:00 +0200 | [diff] [blame] | 796 | vty_out(vty, "%% 'no dl-tbf-idle-time' is now deprecated: use 'timer X2031 0' instead%s", VTY_NEWLINE); |
| 797 | |
Pau Espin Pedrol | 924aaad | 2021-01-14 12:01:42 +0100 | [diff] [blame] | 798 | if (osmo_tdef_set(the_pcu->T_defs, -2031, 0, OSMO_TDEF_MS) < 0) |
Pau Espin Pedrol | 2b5c629 | 2019-09-09 13:41:00 +0200 | [diff] [blame] | 799 | return CMD_WARNING; |
Jacob Erlbeck | 3bed5d1 | 2015-03-19 11:22:38 +0100 | [diff] [blame] | 800 | return CMD_SUCCESS; |
| 801 | } |
| 802 | |
Oliver Smith | 45fdc44 | 2019-09-05 15:12:20 +0200 | [diff] [blame] | 803 | #define RETRANSMISSION_STR "retransmit blocks even before the MS had a chance to receive them (better throughput," \ |
| 804 | " less readable traces)" |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 805 | DEFUN_ATTR(cfg_pcu_dl_tbf_preemptive_retransmission, |
| 806 | cfg_pcu_dl_tbf_preemptive_retransmission_cmd, |
| 807 | "dl-tbf-preemptive-retransmission", |
| 808 | RETRANSMISSION_STR " (enabled by default)", |
| 809 | CMD_ATTR_IMMEDIATE) |
Oliver Smith | 45fdc44 | 2019-09-05 15:12:20 +0200 | [diff] [blame] | 810 | { |
Pau Espin Pedrol | 05f9f59 | 2021-01-14 12:56:58 +0100 | [diff] [blame] | 811 | the_pcu->vty.dl_tbf_preemptive_retransmission = true; |
Oliver Smith | 45fdc44 | 2019-09-05 15:12:20 +0200 | [diff] [blame] | 812 | return CMD_SUCCESS; |
| 813 | } |
| 814 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 815 | DEFUN_ATTR(cfg_pcu_no_dl_tbf_preemptive_retransmission, |
| 816 | cfg_pcu_no_dl_tbf_preemptive_retransmission_cmd, |
| 817 | "no dl-tbf-preemptive-retransmission", |
| 818 | NO_STR RETRANSMISSION_STR, |
| 819 | CMD_ATTR_IMMEDIATE) |
Oliver Smith | 45fdc44 | 2019-09-05 15:12:20 +0200 | [diff] [blame] | 820 | { |
Pau Espin Pedrol | 05f9f59 | 2021-01-14 12:56:58 +0100 | [diff] [blame] | 821 | the_pcu->vty.dl_tbf_preemptive_retransmission = false; |
Oliver Smith | 45fdc44 | 2019-09-05 15:12:20 +0200 | [diff] [blame] | 822 | return CMD_SUCCESS; |
| 823 | } |
| 824 | |
Jacob Erlbeck | a098c19 | 2015-05-28 16:11:19 +0200 | [diff] [blame] | 825 | #define MS_IDLE_TIME_STR "keep an idle MS object alive for the time given\n" |
Pau Espin Pedrol | 63700ea | 2019-09-09 13:19:06 +0200 | [diff] [blame] | 826 | DEFUN_DEPRECATED(cfg_pcu_ms_idle_time, |
Jacob Erlbeck | a098c19 | 2015-05-28 16:11:19 +0200 | [diff] [blame] | 827 | cfg_pcu_ms_idle_time_cmd, |
| 828 | "ms-idle-time <1-7200>", |
| 829 | MS_IDLE_TIME_STR "idle time in sec") |
| 830 | { |
Pau Espin Pedrol | 63700ea | 2019-09-09 13:19:06 +0200 | [diff] [blame] | 831 | vty_out(vty, "%% 'ms-idle-time' is now deprecated: use 'timer X2030 <val>' instead%s", VTY_NEWLINE); |
Pau Espin Pedrol | 924aaad | 2021-01-14 12:01:42 +0100 | [diff] [blame] | 832 | if (osmo_tdef_set(the_pcu->T_defs, -2030, atoi(argv[0]), OSMO_TDEF_S) < 0) |
Pau Espin Pedrol | 63700ea | 2019-09-09 13:19:06 +0200 | [diff] [blame] | 833 | return CMD_WARNING; |
Jacob Erlbeck | a098c19 | 2015-05-28 16:11:19 +0200 | [diff] [blame] | 834 | return CMD_SUCCESS; |
| 835 | } |
| 836 | |
Pau Espin Pedrol | 63700ea | 2019-09-09 13:19:06 +0200 | [diff] [blame] | 837 | DEFUN_DEPRECATED(cfg_pcu_no_ms_idle_time, |
Jacob Erlbeck | a098c19 | 2015-05-28 16:11:19 +0200 | [diff] [blame] | 838 | cfg_pcu_no_ms_idle_time_cmd, |
| 839 | "no ms-idle-time", |
| 840 | NO_STR MS_IDLE_TIME_STR) |
| 841 | { |
Pau Espin Pedrol | 63700ea | 2019-09-09 13:19:06 +0200 | [diff] [blame] | 842 | vty_out(vty, "%% 'no ms-idle-time' is now deprecated: use 'timer X2030 0' instead%s", VTY_NEWLINE); |
Pau Espin Pedrol | 924aaad | 2021-01-14 12:01:42 +0100 | [diff] [blame] | 843 | if (osmo_tdef_set(the_pcu->T_defs, -2030, 0, OSMO_TDEF_S) < 0) |
Pau Espin Pedrol | 63700ea | 2019-09-09 13:19:06 +0200 | [diff] [blame] | 844 | return CMD_WARNING; |
Jacob Erlbeck | a098c19 | 2015-05-28 16:11:19 +0200 | [diff] [blame] | 845 | return CMD_SUCCESS; |
| 846 | } |
| 847 | |
Pau Espin Pedrol | 1e6eb30 | 2019-11-28 17:00:44 +0100 | [diff] [blame] | 848 | #define CS_ERR_LIMITS_STR "set thresholds for error rate based downlink (M)CS adjustment\n" |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 849 | DEFUN_ATTR(cfg_pcu_cs_err_limits, |
| 850 | cfg_pcu_cs_err_limits_cmd, |
| 851 | "cs threshold <0-100> <0-100>", |
| 852 | CS_STR CS_ERR_LIMITS_STR "lower limit in %\n" "upper limit in %\n", |
| 853 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 8322d08 | 2015-06-04 15:12:10 +0200 | [diff] [blame] | 854 | { |
Jacob Erlbeck | 8322d08 | 2015-06-04 15:12:10 +0200 | [diff] [blame] | 855 | uint8_t lower_limit = atoi(argv[0]); |
| 856 | uint8_t upper_limit = atoi(argv[1]); |
| 857 | |
| 858 | if (lower_limit > upper_limit) { |
| 859 | vty_out(vty, |
| 860 | "The lower limit must be less than or equal to the " |
| 861 | "upper limit.%s", VTY_NEWLINE); |
| 862 | return CMD_WARNING; |
| 863 | } |
| 864 | |
Pau Espin Pedrol | e8dcf64 | 2021-01-14 13:17:01 +0100 | [diff] [blame] | 865 | the_pcu->vty.cs_adj_enabled = true; |
| 866 | the_pcu->vty.cs_adj_upper_limit = upper_limit; |
| 867 | the_pcu->vty.cs_adj_lower_limit = lower_limit; |
Jacob Erlbeck | 8322d08 | 2015-06-04 15:12:10 +0200 | [diff] [blame] | 868 | |
| 869 | return CMD_SUCCESS; |
| 870 | } |
| 871 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 872 | DEFUN_ATTR(cfg_pcu_no_cs_err_limits, |
| 873 | cfg_pcu_no_cs_err_limits_cmd, |
| 874 | "no cs threshold", |
| 875 | NO_STR CS_STR CS_ERR_LIMITS_STR, |
| 876 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 8322d08 | 2015-06-04 15:12:10 +0200 | [diff] [blame] | 877 | { |
Pau Espin Pedrol | e8dcf64 | 2021-01-14 13:17:01 +0100 | [diff] [blame] | 878 | the_pcu->vty.cs_adj_enabled = false; |
| 879 | the_pcu->vty.cs_adj_upper_limit = 100; |
| 880 | the_pcu->vty.cs_adj_lower_limit = 0; |
Jacob Erlbeck | 8322d08 | 2015-06-04 15:12:10 +0200 | [diff] [blame] | 881 | |
| 882 | return CMD_SUCCESS; |
| 883 | } |
| 884 | |
Pau Espin Pedrol | 1e6eb30 | 2019-11-28 17:00:44 +0100 | [diff] [blame] | 885 | #define CS_DOWNGRADE_STR "set threshold for data size based downlink (M)CS downgrade\n" |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 886 | DEFUN_ATTR(cfg_pcu_cs_downgrade_thrsh, |
| 887 | cfg_pcu_cs_downgrade_thrsh_cmd, |
| 888 | "cs downgrade-threshold <1-10000>", |
| 889 | CS_STR CS_DOWNGRADE_STR "downgrade if less octets left\n", |
| 890 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 70b96aa | 2015-06-12 10:52:34 +0200 | [diff] [blame] | 891 | { |
Pau Espin Pedrol | ad79b85 | 2021-01-14 13:20:55 +0100 | [diff] [blame] | 892 | the_pcu->vty.cs_downgrade_threshold = atoi(argv[0]); |
Jacob Erlbeck | 70b96aa | 2015-06-12 10:52:34 +0200 | [diff] [blame] | 893 | return CMD_SUCCESS; |
| 894 | } |
| 895 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 896 | DEFUN_ATTR(cfg_pcu_no_cs_downgrade_thrsh, |
| 897 | cfg_pcu_no_cs_downgrade_thrsh_cmd, |
| 898 | "no cs downgrade-threshold", |
| 899 | NO_STR CS_STR CS_DOWNGRADE_STR, |
| 900 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 70b96aa | 2015-06-12 10:52:34 +0200 | [diff] [blame] | 901 | { |
Pau Espin Pedrol | ad79b85 | 2021-01-14 13:20:55 +0100 | [diff] [blame] | 902 | the_pcu->vty.cs_downgrade_threshold = 0; |
Jacob Erlbeck | 70b96aa | 2015-06-12 10:52:34 +0200 | [diff] [blame] | 903 | return CMD_SUCCESS; |
| 904 | } |
| 905 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 906 | DEFUN_ATTR(cfg_pcu_cs_lqual_ranges, |
| 907 | cfg_pcu_cs_lqual_ranges_cmd, |
| 908 | "cs link-quality-ranges cs1 <0-35> cs2 <0-35> <0-35> cs3 <0-35> <0-35> cs4 <0-35>", |
| 909 | CS_STR "Set link quality ranges for each uplink CS\n" |
| 910 | "Set quality range for CS-1 (high value only)\n" |
| 911 | "CS-1 high (dB)\n" |
| 912 | "Set quality range for CS-2\n" |
| 913 | "CS-2 low (dB)\n" |
| 914 | "CS-2 high (dB)\n" |
| 915 | "Set quality range for CS-3\n" |
| 916 | "CS-3 low (dB)\n" |
| 917 | "CS-3 high (dB)\n" |
| 918 | "Set quality range for CS-4 (low value only)\n" |
| 919 | "CS-4 low (dB)\n", |
| 920 | CMD_ATTR_IMMEDIATE) |
Jacob Erlbeck | 94cde13 | 2015-06-09 09:44:36 +0200 | [diff] [blame] | 921 | { |
Jacob Erlbeck | 94cde13 | 2015-06-09 09:44:36 +0200 | [diff] [blame] | 922 | uint8_t cs1_high = atoi(argv[0]); |
| 923 | uint8_t cs2_low = atoi(argv[1]); |
| 924 | uint8_t cs2_high = atoi(argv[2]); |
| 925 | uint8_t cs3_low = atoi(argv[3]); |
| 926 | uint8_t cs3_high = atoi(argv[4]); |
| 927 | uint8_t cs4_low = atoi(argv[5]); |
| 928 | |
Pau Espin Pedrol | 54b159a | 2021-01-14 13:30:04 +0100 | [diff] [blame] | 929 | the_pcu->vty.cs_lqual_ranges[0].high = cs1_high; |
| 930 | the_pcu->vty.cs_lqual_ranges[1].low = cs2_low; |
| 931 | the_pcu->vty.cs_lqual_ranges[1].high = cs2_high; |
| 932 | the_pcu->vty.cs_lqual_ranges[2].low = cs3_low; |
| 933 | the_pcu->vty.cs_lqual_ranges[2].high = cs3_high; |
| 934 | the_pcu->vty.cs_lqual_ranges[3].low = cs4_low; |
Jacob Erlbeck | 94cde13 | 2015-06-09 09:44:36 +0200 | [diff] [blame] | 935 | |
| 936 | return CMD_SUCCESS; |
| 937 | } |
| 938 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 939 | DEFUN_ATTR(cfg_pcu_mcs_lqual_ranges, |
| 940 | cfg_pcu_mcs_lqual_ranges_cmd, |
| 941 | "mcs link-quality-ranges mcs1 <0-35> mcs2 <0-35> <0-35> mcs3 <0-35> <0-35> mcs4 <0-35> <0-35> mcs5 <0-35> <0-35> mcs6 <0-35> <0-35> mcs7 <0-35> <0-35> mcs8 <0-35> <0-35> mcs9 <0-35>", |
| 942 | CS_STR "Set link quality ranges for each uplink MCS\n" |
| 943 | "Set quality range for MCS-1 (high value only)\n" |
| 944 | "MCS-1 high (dB)\n" |
| 945 | "Set quality range for MCS-2\n" |
| 946 | "MCS-2 high (dB)\n" |
| 947 | "MCS-2 low (dB)\n" |
| 948 | "Set quality range for MCS-3\n" |
| 949 | "MCS-3 high (dB)\n" |
| 950 | "MCS-3 low (dB)\n" |
| 951 | "Set quality range for MCS-4\n" |
| 952 | "MCS-4 high (dB)\n" |
| 953 | "MCS-4 low (dB)\n" |
| 954 | "Set quality range for MCS-5\n" |
| 955 | "MCS-5 high (dB)\n" |
| 956 | "MCS-5 low (dB)\n" |
| 957 | "Set quality range for MCS-6\n" |
| 958 | "MCS-6 low (dB)\n" |
| 959 | "MCS-6 high (dB)\n" |
| 960 | "Set quality range for MCS-7\n" |
| 961 | "MCS-7 low (dB)\n" |
| 962 | "MCS-7 high (dB)\n" |
| 963 | "Set quality range for MCS-8\n" |
| 964 | "MCS-8 low (dB)\n" |
| 965 | "MCS-8 high (dB)\n" |
| 966 | "Set quality range for MCS-9 (low value only)\n" |
| 967 | "MCS-9 low (dB)\n", |
| 968 | CMD_ATTR_IMMEDIATE) |
Minh-Quang Nguyen | 1f18909 | 2017-08-16 09:50:06 -0400 | [diff] [blame] | 969 | { |
Pau Espin Pedrol | 54b159a | 2021-01-14 13:30:04 +0100 | [diff] [blame] | 970 | the_pcu->vty.mcs_lqual_ranges[0].high = atoi(argv[0]); |
| 971 | the_pcu->vty.mcs_lqual_ranges[1].low = atoi(argv[1]); |
| 972 | the_pcu->vty.mcs_lqual_ranges[1].high = atoi(argv[2]); |
| 973 | the_pcu->vty.mcs_lqual_ranges[2].low = atoi(argv[3]); |
| 974 | the_pcu->vty.mcs_lqual_ranges[2].high = atoi(argv[4]); |
| 975 | the_pcu->vty.mcs_lqual_ranges[3].low = atoi(argv[5]); |
| 976 | the_pcu->vty.mcs_lqual_ranges[3].high = atoi(argv[6]); |
| 977 | the_pcu->vty.mcs_lqual_ranges[4].low = atoi(argv[7]); |
| 978 | the_pcu->vty.mcs_lqual_ranges[4].high = atoi(argv[8]); |
| 979 | the_pcu->vty.mcs_lqual_ranges[5].low = atoi(argv[9]); |
| 980 | the_pcu->vty.mcs_lqual_ranges[5].high = atoi(argv[10]); |
| 981 | the_pcu->vty.mcs_lqual_ranges[6].low = atoi(argv[11]); |
| 982 | the_pcu->vty.mcs_lqual_ranges[6].high = atoi(argv[12]); |
| 983 | the_pcu->vty.mcs_lqual_ranges[7].low = atoi(argv[13]); |
| 984 | the_pcu->vty.mcs_lqual_ranges[7].high = atoi(argv[14]); |
| 985 | the_pcu->vty.mcs_lqual_ranges[8].low = atoi(argv[15]); |
Minh-Quang Nguyen | 1f18909 | 2017-08-16 09:50:06 -0400 | [diff] [blame] | 986 | |
| 987 | return CMD_SUCCESS; |
| 988 | } |
| 989 | |
Pau Espin Pedrol | c4178e5 | 2017-08-08 15:03:50 +0200 | [diff] [blame] | 990 | DEFUN(cfg_pcu_sock, |
| 991 | cfg_pcu_sock_cmd, |
| 992 | "pcu-socket PATH", |
| 993 | "Configure the osmo-bts PCU socket file/path name\n" |
| 994 | "Path of the socket to connect to\n") |
| 995 | { |
Vadim Yanitskiy | fc75cc0 | 2019-11-30 20:13:25 +0700 | [diff] [blame] | 996 | if (vty->type != VTY_FILE) |
| 997 | vty_out(vty, "Changing PCU socket path at run-time has no effect%s", VTY_NEWLINE); |
| 998 | |
Pau Espin Pedrol | ac3fd12 | 2021-01-13 18:54:38 +0100 | [diff] [blame] | 999 | osmo_talloc_replace_string(tall_pcu_ctx, &the_pcu->pcu_sock_path, argv[0]); |
Pau Espin Pedrol | c4178e5 | 2017-08-08 15:03:50 +0200 | [diff] [blame] | 1000 | |
| 1001 | return CMD_SUCCESS; |
| 1002 | } |
Jacob Erlbeck | 94cde13 | 2015-06-09 09:44:36 +0200 | [diff] [blame] | 1003 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 1004 | DEFUN_USRATTR(cfg_pcu_gb_dialect, |
| 1005 | cfg_pcu_gb_dialect_cmd, |
| 1006 | X(PCU_VTY_ATTR_NS_RESET), |
| 1007 | "gb-dialect (classic|ip-sns)", |
| 1008 | "Select which Gb interface dialect to use\n" |
| 1009 | "Classic Gb interface with NS-{RESET,BLOCK,UNBLOCK} and static configuration\n" |
| 1010 | "Modern Gb interface with IP-SNS (Sub Network Service) and dynamic configuration\n") |
Harald Welte | 57d3515 | 2018-07-05 03:11:17 +0200 | [diff] [blame] | 1011 | { |
Alexander Couzens | 290d903 | 2020-09-16 21:52:02 +0200 | [diff] [blame] | 1012 | if (!strcmp(argv[0], "ip-sns")) { |
Pau Espin Pedrol | 113fb41 | 2021-01-14 13:36:02 +0100 | [diff] [blame] | 1013 | the_pcu->vty.ns_dialect = NS2_DIALECT_SNS; |
Alexander Couzens | 290d903 | 2020-09-16 21:52:02 +0200 | [diff] [blame] | 1014 | } else { |
Pau Espin Pedrol | 113fb41 | 2021-01-14 13:36:02 +0100 | [diff] [blame] | 1015 | the_pcu->vty.ns_dialect = NS2_DIALECT_IPACCESS; |
Alexander Couzens | 290d903 | 2020-09-16 21:52:02 +0200 | [diff] [blame] | 1016 | } |
Harald Welte | 57d3515 | 2018-07-05 03:11:17 +0200 | [diff] [blame] | 1017 | |
| 1018 | return CMD_SUCCESS; |
| 1019 | } |
| 1020 | |
Pau Espin Pedrol | 28f160e | 2019-09-05 14:48:35 +0200 | [diff] [blame] | 1021 | DEFUN(show_bts_timer, show_bts_timer_cmd, |
| 1022 | "show bts-timer " OSMO_TDEF_VTY_ARG_T_OPTIONAL, |
| 1023 | SHOW_STR "Show BTS controlled timers\n" |
| 1024 | OSMO_TDEF_VTY_DOC_T) |
| 1025 | { |
Pau Espin Pedrol | d1049dc | 2021-01-18 17:14:14 +0100 | [diff] [blame^] | 1026 | struct gprs_rlcmac_bts *bts; |
| 1027 | llist_for_each_entry(bts, &the_pcu->bts_list, list) { |
| 1028 | const char *T_arg = argc > 0 ? argv[0] : NULL; |
| 1029 | vty_out(vty, "BTS%" PRIu8 ":%s", bts->nr, VTY_NEWLINE); |
| 1030 | osmo_tdef_vty_show_cmd(vty, bts->T_defs_bts, T_arg, " "); |
| 1031 | } |
| 1032 | return CMD_SUCCESS; |
Pau Espin Pedrol | 28f160e | 2019-09-05 14:48:35 +0200 | [diff] [blame] | 1033 | } |
| 1034 | |
| 1035 | DEFUN(show_timer, show_timer_cmd, |
| 1036 | "show timer " OSMO_TDEF_VTY_ARG_T_OPTIONAL, |
| 1037 | SHOW_STR "Show PCU timers\n" |
| 1038 | OSMO_TDEF_VTY_DOC_T) |
| 1039 | { |
Pau Espin Pedrol | 28f160e | 2019-09-05 14:48:35 +0200 | [diff] [blame] | 1040 | const char *T_arg = argc > 0 ? argv[0] : NULL; |
Pau Espin Pedrol | 924aaad | 2021-01-14 12:01:42 +0100 | [diff] [blame] | 1041 | return osmo_tdef_vty_show_cmd(vty, the_pcu->T_defs, T_arg, NULL); |
Pau Espin Pedrol | 28f160e | 2019-09-05 14:48:35 +0200 | [diff] [blame] | 1042 | } |
| 1043 | |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 1044 | DEFUN_ATTR(cfg_pcu_timer, cfg_pcu_timer_cmd, |
| 1045 | "timer " OSMO_TDEF_VTY_ARG_SET_OPTIONAL, |
| 1046 | "Configure or show PCU timers\n" |
| 1047 | OSMO_TDEF_VTY_DOC_SET, |
| 1048 | CMD_ATTR_IMMEDIATE) |
Pau Espin Pedrol | 28f160e | 2019-09-05 14:48:35 +0200 | [diff] [blame] | 1049 | { |
Pau Espin Pedrol | 28f160e | 2019-09-05 14:48:35 +0200 | [diff] [blame] | 1050 | /* If any arguments are missing, redirect to 'show' */ |
| 1051 | if (argc < 2) |
| 1052 | return show_timer(self, vty, argc, argv); |
Pau Espin Pedrol | 924aaad | 2021-01-14 12:01:42 +0100 | [diff] [blame] | 1053 | return osmo_tdef_vty_set_cmd(vty, the_pcu->T_defs, argv); |
Pau Espin Pedrol | 28f160e | 2019-09-05 14:48:35 +0200 | [diff] [blame] | 1054 | } |
| 1055 | |
Daniel Willmann | 772415f | 2014-01-15 17:06:51 +0100 | [diff] [blame] | 1056 | DEFUN(show_tbf, |
| 1057 | show_tbf_cmd, |
Max | 12a0987 | 2018-02-01 16:07:33 +0100 | [diff] [blame] | 1058 | "show tbf (all|ccch|pacch)", |
| 1059 | SHOW_STR "information about TBFs\n" |
| 1060 | "All TBFs\n" |
| 1061 | "TBFs allocated via CCCH\n" |
| 1062 | "TBFs allocated via PACCH\n") |
Daniel Willmann | 772415f | 2014-01-15 17:06:51 +0100 | [diff] [blame] | 1063 | { |
Pau Espin Pedrol | d1049dc | 2021-01-18 17:14:14 +0100 | [diff] [blame^] | 1064 | struct gprs_rlcmac_bts *bts; |
| 1065 | llist_for_each_entry(bts, &the_pcu->bts_list, list) { |
| 1066 | uint32_t flags = UINT32_MAX; |
Max | 12a0987 | 2018-02-01 16:07:33 +0100 | [diff] [blame] | 1067 | |
Pau Espin Pedrol | d1049dc | 2021-01-18 17:14:14 +0100 | [diff] [blame^] | 1068 | if (argv[0][0] == 'c') |
| 1069 | flags = (1 << GPRS_RLCMAC_FLAG_CCCH); |
| 1070 | else if (argv[0][0] == 'p') |
| 1071 | flags = (1 << GPRS_RLCMAC_FLAG_PACCH); |
Max | 12a0987 | 2018-02-01 16:07:33 +0100 | [diff] [blame] | 1072 | |
Pau Espin Pedrol | d1049dc | 2021-01-18 17:14:14 +0100 | [diff] [blame^] | 1073 | pcu_vty_show_tbf_all(vty, bts, flags); |
| 1074 | } |
| 1075 | return CMD_SUCCESS; |
Daniel Willmann | 772415f | 2014-01-15 17:06:51 +0100 | [diff] [blame] | 1076 | } |
Holger Hans Peter Freyther | f537298 | 2013-10-27 09:02:31 +0100 | [diff] [blame] | 1077 | |
Jacob Erlbeck | f47f68a | 2015-06-04 10:23:24 +0200 | [diff] [blame] | 1078 | DEFUN(show_ms_all, |
| 1079 | show_ms_all_cmd, |
| 1080 | "show ms all", |
| 1081 | SHOW_STR "information about MSs\n" "All TBFs\n") |
| 1082 | { |
Pau Espin Pedrol | d1049dc | 2021-01-18 17:14:14 +0100 | [diff] [blame^] | 1083 | struct gprs_rlcmac_bts *bts; |
| 1084 | llist_for_each_entry(bts, &the_pcu->bts_list, list) { |
| 1085 | pcu_vty_show_ms_all(vty, bts); |
| 1086 | } |
| 1087 | return CMD_SUCCESS; |
Jacob Erlbeck | f47f68a | 2015-06-04 10:23:24 +0200 | [diff] [blame] | 1088 | } |
| 1089 | |
Jacob Erlbeck | 37e896d | 2015-06-05 16:33:33 +0200 | [diff] [blame] | 1090 | DEFUN(show_ms_tlli, |
| 1091 | show_ms_tlli_cmd, |
| 1092 | "show ms tlli TLLI", |
| 1093 | SHOW_STR "information about MSs\n" "Select MS by TLLI\n" "TLLI as hex\n") |
| 1094 | { |
Pau Espin Pedrol | d1049dc | 2021-01-18 17:14:14 +0100 | [diff] [blame^] | 1095 | struct gprs_rlcmac_bts *bts; |
| 1096 | llist_for_each_entry(bts, &the_pcu->bts_list, list) { |
| 1097 | char *endp = NULL; |
| 1098 | unsigned long long tlli = strtoll(argv[0], &endp, 16); |
| 1099 | if ((endp != NULL && *endp != 0) || tlli > 0xffffffffULL) { |
| 1100 | vty_out(vty, "Invalid TLLI.%s", VTY_NEWLINE); |
| 1101 | return CMD_WARNING; |
| 1102 | } |
| 1103 | pcu_vty_show_ms_by_tlli(vty, bts, (uint32_t)tlli); |
Jacob Erlbeck | 37e896d | 2015-06-05 16:33:33 +0200 | [diff] [blame] | 1104 | } |
Pau Espin Pedrol | d1049dc | 2021-01-18 17:14:14 +0100 | [diff] [blame^] | 1105 | return CMD_SUCCESS; |
Jacob Erlbeck | 37e896d | 2015-06-05 16:33:33 +0200 | [diff] [blame] | 1106 | } |
| 1107 | |
| 1108 | DEFUN(show_ms_imsi, |
| 1109 | show_ms_imsi_cmd, |
| 1110 | "show ms imsi IMSI", |
| 1111 | SHOW_STR "information about MSs\n" "Select MS by IMSI\n" "IMSI\n") |
| 1112 | { |
Pau Espin Pedrol | d1049dc | 2021-01-18 17:14:14 +0100 | [diff] [blame^] | 1113 | struct gprs_rlcmac_bts *bts; |
| 1114 | llist_for_each_entry(bts, &the_pcu->bts_list, list) { |
| 1115 | pcu_vty_show_ms_by_imsi(vty, bts, argv[0]); |
| 1116 | } |
| 1117 | return CMD_SUCCESS; |
Jacob Erlbeck | 37e896d | 2015-06-05 16:33:33 +0200 | [diff] [blame] | 1118 | } |
| 1119 | |
Andreas Eversberg | 1294256 | 2012-07-12 14:31:57 +0200 | [diff] [blame] | 1120 | static const char pcu_copyright[] = |
Harald Welte | d1e340f | 2013-01-17 12:24:29 +0100 | [diff] [blame] | 1121 | "Copyright (C) 2012 by Ivan Kluchnikov <kluchnikovi@gmail.com> and \r\n" |
| 1122 | " Andreas Eversberg <jolly@eversberg.eu>\r\n" |
Andreas Eversberg | 1294256 | 2012-07-12 14:31:57 +0200 | [diff] [blame] | 1123 | "License GNU GPL version 2 or later\r\n" |
| 1124 | "This is free software: you are free to change and redistribute it.\r\n" |
| 1125 | "There is NO WARRANTY, to the extent permitted by law.\r\n"; |
| 1126 | |
| 1127 | struct vty_app_info pcu_vty_info = { |
Pau Espin Pedrol | d0fc9e8 | 2019-11-29 13:37:45 +0100 | [diff] [blame] | 1128 | .name = "OsmoPCU", |
Andreas Eversberg | 1294256 | 2012-07-12 14:31:57 +0200 | [diff] [blame] | 1129 | .version = PACKAGE_VERSION, |
| 1130 | .copyright = pcu_copyright, |
Philipp Maier | 9459ebd | 2020-09-29 23:31:33 +0200 | [diff] [blame] | 1131 | .usr_attr_desc = { |
| 1132 | [PCU_VTY_ATTR_NEW_TBF] = \ |
| 1133 | "This command applies when a new TBF is begins", |
| 1134 | [PCU_VTY_ATTR_NEW_SUBSCR] = \ |
| 1135 | "This command applies when a new subscriber attaches", |
| 1136 | [PCU_VTY_ATTR_NS_RESET] = \ |
| 1137 | "This command applies when the NS is reset", |
| 1138 | }, |
| 1139 | .usr_attr_letters = { |
| 1140 | [PCU_VTY_ATTR_NEW_TBF] = 'n', |
| 1141 | [PCU_VTY_ATTR_NEW_SUBSCR] = 's', |
| 1142 | [PCU_VTY_ATTR_NS_RESET] = 'r', |
| 1143 | }, |
Andreas Eversberg | 1294256 | 2012-07-12 14:31:57 +0200 | [diff] [blame] | 1144 | }; |
| 1145 | |
Pau Espin Pedrol | cd2ac56 | 2019-08-05 14:30:44 +0200 | [diff] [blame] | 1146 | int pcu_vty_init(void) |
Andreas Eversberg | 1294256 | 2012-07-12 14:31:57 +0200 | [diff] [blame] | 1147 | { |
| 1148 | // install_element_ve(&show_pcu_cmd); |
| 1149 | |
Harald Welte | 717cdf5 | 2017-07-21 21:56:23 +0200 | [diff] [blame] | 1150 | cfg_pcu_gsmtap_categ_cmd.string = vty_cmd_string_from_valstr(tall_pcu_ctx, pcu_gsmtap_categ_names, |
| 1151 | "gsmtap-category (", |
| 1152 | "|",")", VTY_DO_LOWER); |
| 1153 | cfg_pcu_gsmtap_categ_cmd.doc = vty_cmd_string_from_valstr(tall_pcu_ctx, pcu_gsmtap_categ_help, |
| 1154 | "GSMTAP Category\n", |
| 1155 | "\n", "", 0); |
| 1156 | cfg_pcu_no_gsmtap_categ_cmd.string = vty_cmd_string_from_valstr(tall_pcu_ctx, pcu_gsmtap_categ_names, |
| 1157 | "no gsmtap-category (", |
| 1158 | "|",")", VTY_DO_LOWER); |
| 1159 | cfg_pcu_no_gsmtap_categ_cmd.doc = vty_cmd_string_from_valstr(tall_pcu_ctx, pcu_gsmtap_categ_help, |
| 1160 | NO_STR "GSMTAP Category\n", |
| 1161 | "\n", "", 0); |
| 1162 | |
Pau Espin Pedrol | cd2ac56 | 2019-08-05 14:30:44 +0200 | [diff] [blame] | 1163 | logging_vty_add_cmds(); |
| 1164 | osmo_stats_vty_add_cmds(); |
Vadim Yanitskiy | d83c8ff | 2020-02-06 16:46:17 +0700 | [diff] [blame] | 1165 | osmo_talloc_vty_add_cmds(); |
Andreas Eversberg | 1294256 | 2012-07-12 14:31:57 +0200 | [diff] [blame] | 1166 | |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 1167 | install_node(&pcu_node, config_write_pcu); |
| 1168 | install_element(CONFIG_NODE, &cfg_pcu_cmd); |
Jacob Erlbeck | 953c789 | 2015-09-28 18:12:57 +0200 | [diff] [blame] | 1169 | install_element(PCU_NODE, &cfg_pcu_egprs_cmd); |
| 1170 | install_element(PCU_NODE, &cfg_pcu_no_egprs_cmd); |
Andreas Eversberg | cd8a83a | 2012-09-23 06:41:21 +0200 | [diff] [blame] | 1171 | install_element(PCU_NODE, &cfg_pcu_no_two_phase_cmd); |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 1172 | install_element(PCU_NODE, &cfg_pcu_cs_cmd); |
| 1173 | install_element(PCU_NODE, &cfg_pcu_no_cs_cmd); |
Jacob Erlbeck | b33e675 | 2015-06-04 19:04:30 +0200 | [diff] [blame] | 1174 | install_element(PCU_NODE, &cfg_pcu_cs_max_cmd); |
| 1175 | install_element(PCU_NODE, &cfg_pcu_no_cs_max_cmd); |
Jacob Erlbeck | 8322d08 | 2015-06-04 15:12:10 +0200 | [diff] [blame] | 1176 | install_element(PCU_NODE, &cfg_pcu_cs_err_limits_cmd); |
| 1177 | install_element(PCU_NODE, &cfg_pcu_no_cs_err_limits_cmd); |
Jacob Erlbeck | 70b96aa | 2015-06-12 10:52:34 +0200 | [diff] [blame] | 1178 | install_element(PCU_NODE, &cfg_pcu_cs_downgrade_thrsh_cmd); |
| 1179 | install_element(PCU_NODE, &cfg_pcu_no_cs_downgrade_thrsh_cmd); |
Jacob Erlbeck | 94cde13 | 2015-06-09 09:44:36 +0200 | [diff] [blame] | 1180 | install_element(PCU_NODE, &cfg_pcu_cs_lqual_ranges_cmd); |
Minh-Quang Nguyen | 1f18909 | 2017-08-16 09:50:06 -0400 | [diff] [blame] | 1181 | install_element(PCU_NODE, &cfg_pcu_mcs_lqual_ranges_cmd); |
Jacob Erlbeck | 4cc46d3 | 2016-02-02 16:02:16 +0100 | [diff] [blame] | 1182 | install_element(PCU_NODE, &cfg_pcu_mcs_cmd); |
Aravind Sirsikar | 50b0970 | 2016-08-22 17:21:10 +0530 | [diff] [blame] | 1183 | install_element(PCU_NODE, &cfg_pcu_dl_arq_cmd); |
Jacob Erlbeck | 4cc46d3 | 2016-02-02 16:02:16 +0100 | [diff] [blame] | 1184 | install_element(PCU_NODE, &cfg_pcu_no_mcs_cmd); |
Jacob Erlbeck | 0d05805 | 2016-01-07 11:48:28 +0100 | [diff] [blame] | 1185 | install_element(PCU_NODE, &cfg_pcu_mcs_max_cmd); |
| 1186 | install_element(PCU_NODE, &cfg_pcu_no_mcs_max_cmd); |
Jacob Erlbeck | 36df774 | 2016-01-19 15:53:30 +0100 | [diff] [blame] | 1187 | install_element(PCU_NODE, &cfg_pcu_window_size_cmd); |
Andreas Eversberg | 24131bf | 2012-07-21 11:09:58 +0200 | [diff] [blame] | 1188 | install_element(PCU_NODE, &cfg_pcu_queue_lifetime_cmd); |
| 1189 | install_element(PCU_NODE, &cfg_pcu_queue_lifetime_inf_cmd); |
| 1190 | install_element(PCU_NODE, &cfg_pcu_no_queue_lifetime_cmd); |
Jacob Erlbeck | 0c1c877 | 2015-03-20 12:02:42 +0100 | [diff] [blame] | 1191 | install_element(PCU_NODE, &cfg_pcu_queue_hysteresis_cmd); |
| 1192 | install_element(PCU_NODE, &cfg_pcu_no_queue_hysteresis_cmd); |
Jacob Erlbeck | d4ad731 | 2015-07-17 16:39:09 +0200 | [diff] [blame] | 1193 | install_element(PCU_NODE, &cfg_pcu_queue_codel_cmd); |
| 1194 | install_element(PCU_NODE, &cfg_pcu_queue_codel_interval_cmd); |
| 1195 | install_element(PCU_NODE, &cfg_pcu_no_queue_codel_cmd); |
Jacob Erlbeck | d0261b7 | 2015-04-02 13:58:09 +0200 | [diff] [blame] | 1196 | install_element(PCU_NODE, &cfg_pcu_queue_idle_ack_delay_cmd); |
| 1197 | install_element(PCU_NODE, &cfg_pcu_no_queue_idle_ack_delay_cmd); |
Andreas Eversberg | a1503fa | 2012-07-22 08:58:09 +0200 | [diff] [blame] | 1198 | install_element(PCU_NODE, &cfg_pcu_alloc_cmd); |
Andreas Eversberg | 07e97cf | 2012-08-07 16:00:56 +0200 | [diff] [blame] | 1199 | install_element(PCU_NODE, &cfg_pcu_two_phase_cmd); |
Andreas Eversberg | cd8a83a | 2012-09-23 06:41:21 +0200 | [diff] [blame] | 1200 | install_element(PCU_NODE, &cfg_pcu_fc_interval_cmd); |
Jacob Erlbeck | 0288cdb | 2015-05-06 10:47:30 +0200 | [diff] [blame] | 1201 | install_element(PCU_NODE, &cfg_pcu_fc_bucket_time_cmd); |
| 1202 | install_element(PCU_NODE, &cfg_pcu_no_fc_bucket_time_cmd); |
Jacob Erlbeck | 87d7341 | 2015-04-21 12:56:48 +0200 | [diff] [blame] | 1203 | install_element(PCU_NODE, &cfg_pcu_fc_bvc_bucket_size_cmd); |
| 1204 | install_element(PCU_NODE, &cfg_pcu_no_fc_bvc_bucket_size_cmd); |
| 1205 | install_element(PCU_NODE, &cfg_pcu_fc_bvc_leak_rate_cmd); |
| 1206 | install_element(PCU_NODE, &cfg_pcu_no_fc_bvc_leak_rate_cmd); |
| 1207 | install_element(PCU_NODE, &cfg_pcu_fc_ms_bucket_size_cmd); |
| 1208 | install_element(PCU_NODE, &cfg_pcu_no_fc_ms_bucket_size_cmd); |
| 1209 | install_element(PCU_NODE, &cfg_pcu_fc_ms_leak_rate_cmd); |
| 1210 | install_element(PCU_NODE, &cfg_pcu_no_fc_ms_leak_rate_cmd); |
Andreas Eversberg | aafcbbb | 2012-09-27 09:20:45 +0200 | [diff] [blame] | 1211 | install_element(PCU_NODE, &cfg_pcu_alpha_cmd); |
| 1212 | install_element(PCU_NODE, &cfg_pcu_gamma_cmd); |
Jacob Erlbeck | 3bed5d1 | 2015-03-19 11:22:38 +0100 | [diff] [blame] | 1213 | install_element(PCU_NODE, &cfg_pcu_dl_tbf_idle_time_cmd); |
| 1214 | install_element(PCU_NODE, &cfg_pcu_no_dl_tbf_idle_time_cmd); |
Oliver Smith | 45fdc44 | 2019-09-05 15:12:20 +0200 | [diff] [blame] | 1215 | install_element(PCU_NODE, &cfg_pcu_dl_tbf_preemptive_retransmission_cmd); |
| 1216 | install_element(PCU_NODE, &cfg_pcu_no_dl_tbf_preemptive_retransmission_cmd); |
Jacob Erlbeck | a098c19 | 2015-05-28 16:11:19 +0200 | [diff] [blame] | 1217 | install_element(PCU_NODE, &cfg_pcu_ms_idle_time_cmd); |
| 1218 | install_element(PCU_NODE, &cfg_pcu_no_ms_idle_time_cmd); |
Harald Welte | 717cdf5 | 2017-07-21 21:56:23 +0200 | [diff] [blame] | 1219 | install_element(PCU_NODE, &cfg_pcu_gsmtap_categ_cmd); |
| 1220 | install_element(PCU_NODE, &cfg_pcu_no_gsmtap_categ_cmd); |
Pau Espin Pedrol | c4178e5 | 2017-08-08 15:03:50 +0200 | [diff] [blame] | 1221 | install_element(PCU_NODE, &cfg_pcu_sock_cmd); |
Harald Welte | 57d3515 | 2018-07-05 03:11:17 +0200 | [diff] [blame] | 1222 | install_element(PCU_NODE, &cfg_pcu_gb_dialect_cmd); |
Pau Espin Pedrol | 28f160e | 2019-09-05 14:48:35 +0200 | [diff] [blame] | 1223 | install_element(PCU_NODE, &cfg_pcu_timer_cmd); |
Andreas Eversberg | 8b761a3 | 2012-07-20 21:50:31 +0200 | [diff] [blame] | 1224 | |
Holger Hans Peter Freyther | f537298 | 2013-10-27 09:02:31 +0100 | [diff] [blame] | 1225 | install_element_ve(&show_bts_stats_cmd); |
Pau Espin Pedrol | a1ac2f0 | 2020-09-22 17:01:31 +0200 | [diff] [blame] | 1226 | install_element_ve(&show_bts_pdch_cmd); |
Daniel Willmann | 772415f | 2014-01-15 17:06:51 +0100 | [diff] [blame] | 1227 | install_element_ve(&show_tbf_cmd); |
Jacob Erlbeck | f47f68a | 2015-06-04 10:23:24 +0200 | [diff] [blame] | 1228 | install_element_ve(&show_ms_all_cmd); |
Jacob Erlbeck | 37e896d | 2015-06-05 16:33:33 +0200 | [diff] [blame] | 1229 | install_element_ve(&show_ms_tlli_cmd); |
| 1230 | install_element_ve(&show_ms_imsi_cmd); |
Pau Espin Pedrol | 28f160e | 2019-09-05 14:48:35 +0200 | [diff] [blame] | 1231 | install_element_ve(&show_bts_timer_cmd); |
| 1232 | install_element_ve(&show_timer_cmd); |
Holger Hans Peter Freyther | f537298 | 2013-10-27 09:02:31 +0100 | [diff] [blame] | 1233 | |
Andreas Eversberg | 1294256 | 2012-07-12 14:31:57 +0200 | [diff] [blame] | 1234 | return 0; |
| 1235 | } |