2012-07-12 12:31:57 +00:00
|
|
|
/* OsmoBTS VTY interface */
|
|
|
|
|
|
|
|
|
2012-07-20 19:50:31 +00:00
|
|
|
#include <stdint.h>
|
2014-07-02 12:56:36 +00:00
|
|
|
#include <stdlib.h>
|
2017-02-08 16:07:40 +00:00
|
|
|
#include <string.h>
|
2021-01-18 16:14:14 +00:00
|
|
|
#include <inttypes.h>
|
|
|
|
|
2019-09-05 12:48:35 +00:00
|
|
|
#include <osmocom/core/tdef.h>
|
2019-11-30 13:15:22 +00:00
|
|
|
#include <osmocom/core/utils.h>
|
2019-09-05 12:48:35 +00:00
|
|
|
#include <osmocom/vty/tdef_vty.h>
|
2012-07-20 19:50:31 +00:00
|
|
|
#include <osmocom/vty/logging.h>
|
2015-11-10 14:32:00 +00:00
|
|
|
#include <osmocom/vty/stats.h>
|
2015-04-30 13:59:01 +00:00
|
|
|
#include <osmocom/vty/misc.h>
|
2012-07-20 19:50:31 +00:00
|
|
|
#include <osmocom/core/linuxlist.h>
|
2014-07-02 12:57:47 +00:00
|
|
|
#include <osmocom/core/rate_ctr.h>
|
Introduce NACC support
A new nacc_fsm is introduced per MS object, with its partner priv
structure struct nacc_fsm_ctx, which exists and is available in the MS
object only during the duration of the NACC procedure.
The NACC context is created on an MS whenever a Pkt Cell Change
Notification is received on Uplink RLCMAC, which asks for neighbor
information of a given ARFCN+BSIC.
First, the target ARFCN+BSIC needs to be translated into a CGI-PS
(RAC+CI) address. That's done by asking the BSC through the Neighbour
Resolution Service available in osmo-bsc using the CTRL interface.
Once the CGI-PS of the target cell is known, PCU starts a RIM RAN-INFO
request against the SGSN (which will route the request as needed), and
wait for a response containing the SI bits from the target cell.
After the SI are received, the scheduler is instructed to eventually
poll a TBF for the MS originating the CCN, so that we can send the SI
encapsulated into multiple Packet Neighbor Cell Data messages on the
downlink.
One all the SI bits are sent, the scheduler is instructed to send a
Packet Cell Change Continue message.
Once the message above has been sent, the FSM autodestroys itself.
Caches are also introduced in this patch which allows for re-using
recently known translations ARFCN+BSIC -> CGI-PS and CGI-PS -> SI_INFO
respectively.
Change-Id: Id35f40d05f3e081f32fddbf1fa34cb338db452ca
2021-01-21 17:46:13 +00:00
|
|
|
#include <osmocom/ctrl/ports.h>
|
2017-08-08 13:03:50 +00:00
|
|
|
#include <osmocom/pcu/pcuif_proto.h>
|
2020-09-16 19:52:02 +00:00
|
|
|
#include <osmocom/gprs/gprs_ns2.h>
|
2012-07-12 12:31:57 +00:00
|
|
|
#include "pcu_vty.h"
|
2012-07-20 19:50:31 +00:00
|
|
|
#include "gprs_rlcmac.h"
|
2018-02-19 16:17:28 +00:00
|
|
|
#include <pdch.h>
|
2013-10-17 15:01:54 +00:00
|
|
|
#include "bts.h"
|
2015-04-30 13:59:01 +00:00
|
|
|
#include "tbf.h"
|
2015-06-04 07:42:14 +00:00
|
|
|
#include "pcu_vty_functions.h"
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
#define X(x) (1 << x)
|
|
|
|
|
2017-07-21 19:56:23 +00:00
|
|
|
extern void *tall_pcu_ctx;
|
|
|
|
|
|
|
|
static const struct value_string pcu_gsmtap_categ_names[] = {
|
|
|
|
{ PCU_GSMTAP_C_DL_UNKNOWN, "dl-unknown" },
|
|
|
|
{ PCU_GSMTAP_C_DL_DUMMY, "dl-dummy" },
|
|
|
|
{ PCU_GSMTAP_C_DL_CTRL, "dl-ctrl" },
|
|
|
|
{ PCU_GSMTAP_C_DL_DATA_GPRS, "dl-data-gprs" },
|
|
|
|
{ PCU_GSMTAP_C_DL_DATA_EGPRS, "dl-data-egprs" },
|
2017-07-29 11:42:27 +00:00
|
|
|
{ PCU_GSMTAP_C_DL_PTCCH, "dl-ptcch" },
|
2019-09-30 17:07:16 +00:00
|
|
|
{ PCU_GSMTAP_C_DL_AGCH, "dl-agch" },
|
|
|
|
{ PCU_GSMTAP_C_DL_PCH, "dl-pch" },
|
2017-07-21 19:56:23 +00:00
|
|
|
|
|
|
|
{ PCU_GSMTAP_C_UL_UNKNOWN, "ul-unknown" },
|
|
|
|
{ PCU_GSMTAP_C_UL_DUMMY, "ul-dummy" },
|
|
|
|
{ PCU_GSMTAP_C_UL_CTRL, "ul-ctrl" },
|
|
|
|
{ PCU_GSMTAP_C_UL_DATA_GPRS, "ul-data-gprs" },
|
|
|
|
{ PCU_GSMTAP_C_UL_DATA_EGPRS, "ul-data-egprs" },
|
2019-09-30 16:33:14 +00:00
|
|
|
{ PCU_GSMTAP_C_UL_RACH, "ul-rach" },
|
2020-06-10 17:26:15 +00:00
|
|
|
{ PCU_GSMTAP_C_UL_PTCCH, "ul-ptcch" },
|
2017-07-21 19:56:23 +00:00
|
|
|
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct value_string pcu_gsmtap_categ_help[] = {
|
|
|
|
{ PCU_GSMTAP_C_DL_UNKNOWN, "Unknown / Unparseable / Erroneous Downlink Blocks" },
|
|
|
|
{ PCU_GSMTAP_C_DL_DUMMY, "Downlink Dummy Blocks" },
|
|
|
|
{ PCU_GSMTAP_C_DL_CTRL, "Downlink Control Blocks" },
|
|
|
|
{ PCU_GSMTAP_C_DL_DATA_GPRS, "Downlink Data Blocks (GPRS)" },
|
|
|
|
{ PCU_GSMTAP_C_DL_DATA_EGPRS, "Downlink Data Blocks (EGPRS)" },
|
2017-07-29 11:42:27 +00:00
|
|
|
{ PCU_GSMTAP_C_DL_PTCCH, "Downlink PTCCH Blocks" },
|
2019-09-30 17:07:16 +00:00
|
|
|
{ PCU_GSMTAP_C_DL_AGCH, "Downlink AGCH Blocks" },
|
|
|
|
{ PCU_GSMTAP_C_DL_PCH, "Downlink PCH Blocks" },
|
2017-07-21 19:56:23 +00:00
|
|
|
|
|
|
|
{ PCU_GSMTAP_C_UL_UNKNOWN, "Unknown / Unparseable / Erroneous Downlink Blocks" },
|
|
|
|
{ PCU_GSMTAP_C_UL_DUMMY, "Uplink Dummy Blocks" },
|
|
|
|
{ PCU_GSMTAP_C_UL_CTRL, "Uplink Control Blocks" },
|
|
|
|
{ PCU_GSMTAP_C_UL_DATA_GPRS, "Uplink Data Blocks (GPRS)" },
|
|
|
|
{ PCU_GSMTAP_C_UL_DATA_EGPRS, "Uplink Data Blocks (EGPRS)" },
|
2019-09-30 16:33:14 +00:00
|
|
|
{ PCU_GSMTAP_C_UL_RACH, "Uplink RACH Bursts" },
|
2020-06-10 17:26:15 +00:00
|
|
|
{ PCU_GSMTAP_C_UL_PTCCH, "Uplink PTCCH Bursts" },
|
2017-07-21 19:56:23 +00:00
|
|
|
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2021-11-12 12:42:03 +00:00
|
|
|
DEFUN(cfg_pcu_gsmtap_remote_host,
|
|
|
|
cfg_pcu_gsmtap_remote_host_cmd,
|
|
|
|
"gsmtap-remote-host [HOSTNAME]",
|
|
|
|
"Enable GSMTAP Um logging (see also 'gsmtap-category')\n"
|
|
|
|
"Remote IP address or hostname ('localhost' if omitted)\n")
|
|
|
|
{
|
|
|
|
osmo_talloc_replace_string(the_pcu, &the_pcu->gsmtap_remote_host,
|
|
|
|
argc > 0 ? argv[0] : "localhost");
|
|
|
|
|
|
|
|
if (vty->type != VTY_FILE)
|
|
|
|
vty_out(vty, "%% This command requires restart%s", VTY_NEWLINE);
|
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFUN(cfg_pcu_no_gsmtap_remote_host,
|
|
|
|
cfg_pcu_no_gsmtap_remote_host_cmd,
|
|
|
|
"no gsmtap-remote-host",
|
|
|
|
NO_STR "Disable GSMTAP Um logging\n")
|
|
|
|
{
|
|
|
|
if (the_pcu->gsmtap_remote_host)
|
|
|
|
TALLOC_FREE(the_pcu->gsmtap_remote_host);
|
|
|
|
|
|
|
|
if (vty->type != VTY_FILE)
|
|
|
|
vty_out(vty, "%% This command requires restart%s", VTY_NEWLINE);
|
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFUN(cfg_pcu_gsmtap_sapi_all, pcucfg_pcu_gsmtap_categ_all_cmd,
|
|
|
|
"gsmtap-category (enable-all|disable-all)",
|
|
|
|
"Enable/disable sending of UL/DL messages over GSMTAP\n"
|
|
|
|
"Enable all kinds of messages (all categories)\n"
|
|
|
|
"Disable all kinds of messages (all categories)\n")
|
|
|
|
{
|
|
|
|
|
|
|
|
if (strcmp(argv[0], "enable-all") == 0)
|
|
|
|
the_pcu->gsmtap_categ_mask = UINT32_MAX;
|
|
|
|
else
|
|
|
|
the_pcu->gsmtap_categ_mask = 0x00;
|
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
2017-07-21 19:56:23 +00:00
|
|
|
|
|
|
|
DEFUN(cfg_pcu_gsmtap_categ, cfg_pcu_gsmtap_categ_cmd, "HIDDEN", "HIDDEN")
|
|
|
|
{
|
|
|
|
int categ;
|
|
|
|
|
|
|
|
categ = get_string_value(pcu_gsmtap_categ_names, argv[0]);
|
|
|
|
if (categ < 0)
|
|
|
|
return CMD_WARNING;
|
|
|
|
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
the_pcu->gsmtap_categ_mask |= (1 << categ);
|
2017-07-21 19:56:23 +00:00
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFUN(cfg_pcu_no_gsmtap_categ, cfg_pcu_no_gsmtap_categ_cmd, "HIDDEN", "HIDDEN")
|
|
|
|
{
|
|
|
|
int categ;
|
|
|
|
|
|
|
|
categ = get_string_value(pcu_gsmtap_categ_names, argv[0]);
|
|
|
|
if (categ < 0)
|
|
|
|
return CMD_WARNING;
|
|
|
|
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
the_pcu->gsmtap_categ_mask &= ~(1 << categ);
|
2017-07-21 19:56:23 +00:00
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2012-07-20 19:50:31 +00:00
|
|
|
static struct cmd_node pcu_node = {
|
|
|
|
(enum node_type) PCU_NODE,
|
2015-04-09 13:45:24 +00:00
|
|
|
"%s(config-pcu)# ",
|
2012-07-20 19:50:31 +00:00
|
|
|
1,
|
|
|
|
};
|
|
|
|
|
|
|
|
static int config_write_pcu(struct vty *vty)
|
|
|
|
{
|
2017-07-21 19:56:23 +00:00
|
|
|
unsigned int i;
|
2012-07-20 19:50:31 +00:00
|
|
|
|
|
|
|
vty_out(vty, "pcu%s", VTY_NEWLINE);
|
2021-01-14 13:03:17 +00:00
|
|
|
vty_out(vty, " flow-control-interval %d%s", the_pcu->vty.fc_interval,
|
2012-09-23 04:41:21 +00:00
|
|
|
VTY_NEWLINE);
|
2021-01-14 13:03:17 +00:00
|
|
|
if (the_pcu->vty.fc_bvc_bucket_size)
|
2015-04-21 10:56:48 +00:00
|
|
|
vty_out(vty, " flow-control force-bvc-bucket-size %d%s",
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_bvc_bucket_size, VTY_NEWLINE);
|
|
|
|
if (the_pcu->vty.fc_bvc_leak_rate)
|
2015-04-21 10:56:48 +00:00
|
|
|
vty_out(vty, " flow-control force-bvc-leak-rate %d%s",
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_bvc_leak_rate, VTY_NEWLINE);
|
|
|
|
if (the_pcu->vty.fc_ms_bucket_size)
|
2015-04-21 10:56:48 +00:00
|
|
|
vty_out(vty, " flow-control force-ms-bucket-size %d%s",
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_ms_bucket_size, VTY_NEWLINE);
|
|
|
|
if (the_pcu->vty.fc_ms_leak_rate)
|
2015-04-21 10:56:48 +00:00
|
|
|
vty_out(vty, " flow-control force-ms-leak-rate %d%s",
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_ms_leak_rate, VTY_NEWLINE);
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
if (the_pcu->vty.force_initial_cs) {
|
2021-01-14 15:20:57 +00:00
|
|
|
if (the_pcu->vty.initial_cs_ul == the_pcu->vty.initial_cs_dl)
|
|
|
|
vty_out(vty, " cs %d%s", the_pcu->vty.initial_cs_dl,
|
2012-10-03 12:21:36 +00:00
|
|
|
VTY_NEWLINE);
|
|
|
|
else
|
2021-01-14 15:20:57 +00:00
|
|
|
vty_out(vty, " cs %d %d%s", the_pcu->vty.initial_cs_dl,
|
|
|
|
the_pcu->vty.initial_cs_ul, VTY_NEWLINE);
|
2014-07-02 12:55:17 +00:00
|
|
|
}
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
if (the_pcu->vty.max_cs_dl && the_pcu->vty.max_cs_ul) {
|
|
|
|
if (the_pcu->vty.max_cs_ul == the_pcu->vty.max_cs_dl)
|
|
|
|
vty_out(vty, " cs max %d%s", the_pcu->vty.max_cs_dl,
|
2015-06-04 17:04:30 +00:00
|
|
|
VTY_NEWLINE);
|
|
|
|
else
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
vty_out(vty, " cs max %d %d%s", the_pcu->vty.max_cs_dl,
|
|
|
|
the_pcu->vty.max_cs_ul, VTY_NEWLINE);
|
2015-06-04 17:04:30 +00:00
|
|
|
}
|
2021-01-14 12:17:01 +00:00
|
|
|
if (the_pcu->vty.cs_adj_enabled)
|
2015-06-04 13:12:10 +00:00
|
|
|
vty_out(vty, " cs threshold %d %d%s",
|
2021-01-14 12:17:01 +00:00
|
|
|
the_pcu->vty.cs_adj_lower_limit, the_pcu->vty.cs_adj_upper_limit,
|
2015-06-04 13:12:10 +00:00
|
|
|
VTY_NEWLINE);
|
|
|
|
else
|
|
|
|
vty_out(vty, " no cs threshold%s", VTY_NEWLINE);
|
|
|
|
|
2021-01-14 12:20:55 +00:00
|
|
|
if (the_pcu->vty.cs_downgrade_threshold)
|
2015-06-12 08:52:34 +00:00
|
|
|
vty_out(vty, " cs downgrade-threshold %d%s",
|
2021-01-14 12:20:55 +00:00
|
|
|
the_pcu->vty.cs_downgrade_threshold, VTY_NEWLINE);
|
2015-06-12 08:52:34 +00:00
|
|
|
else
|
|
|
|
vty_out(vty, " no cs downgrade-threshold%s", VTY_NEWLINE);
|
|
|
|
|
2015-06-09 07:44:36 +00:00
|
|
|
vty_out(vty, " cs link-quality-ranges cs1 %d cs2 %d %d cs3 %d %d cs4 %d%s",
|
2021-01-14 12:30:04 +00:00
|
|
|
the_pcu->vty.cs_lqual_ranges[0].high,
|
|
|
|
the_pcu->vty.cs_lqual_ranges[1].low,
|
|
|
|
the_pcu->vty.cs_lqual_ranges[1].high,
|
|
|
|
the_pcu->vty.cs_lqual_ranges[2].low,
|
|
|
|
the_pcu->vty.cs_lqual_ranges[2].high,
|
|
|
|
the_pcu->vty.cs_lqual_ranges[3].low,
|
2015-06-09 07:44:36 +00:00
|
|
|
VTY_NEWLINE);
|
|
|
|
|
2017-08-16 13:50:06 +00:00
|
|
|
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",
|
2021-01-14 12:30:04 +00:00
|
|
|
the_pcu->vty.mcs_lqual_ranges[0].high,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[1].low,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[1].high,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[2].low,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[2].high,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[3].low,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[3].high,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[4].low,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[4].high,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[5].low,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[5].high,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[6].low,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[6].high,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[7].low,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[7].high,
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[8].low,
|
2017-08-16 13:50:06 +00:00
|
|
|
VTY_NEWLINE);
|
|
|
|
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
if (the_pcu->vty.force_initial_mcs) {
|
2021-01-14 15:20:57 +00:00
|
|
|
if (the_pcu->vty.initial_mcs_ul == the_pcu->vty.initial_mcs_dl)
|
|
|
|
vty_out(vty, " mcs %d%s", the_pcu->vty.initial_mcs_dl,
|
2016-02-02 15:02:16 +00:00
|
|
|
VTY_NEWLINE);
|
|
|
|
else
|
2021-01-14 15:20:57 +00:00
|
|
|
vty_out(vty, " mcs %d %d%s", the_pcu->vty.initial_mcs_dl,
|
|
|
|
the_pcu->vty.initial_mcs_ul, VTY_NEWLINE);
|
2016-02-02 15:02:16 +00:00
|
|
|
}
|
2017-08-16 13:50:06 +00:00
|
|
|
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
if (the_pcu->vty.max_mcs_dl && the_pcu->vty.max_mcs_ul) {
|
|
|
|
if (the_pcu->vty.max_mcs_ul == the_pcu->vty.max_mcs_dl)
|
|
|
|
vty_out(vty, " mcs max %d%s", the_pcu->vty.max_mcs_dl,
|
2016-01-07 10:48:28 +00:00
|
|
|
VTY_NEWLINE);
|
|
|
|
else
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
vty_out(vty, " mcs max %d %d%s", the_pcu->vty.max_mcs_dl,
|
|
|
|
the_pcu->vty.max_mcs_ul, VTY_NEWLINE);
|
2016-01-07 10:48:28 +00:00
|
|
|
}
|
|
|
|
|
2021-01-14 13:30:03 +00:00
|
|
|
vty_out(vty, " window-size %d %d%s", the_pcu->vty.ws_base, the_pcu->vty.ws_pdch,
|
2016-01-19 14:53:30 +00:00
|
|
|
VTY_NEWLINE);
|
|
|
|
|
2021-01-14 12:08:02 +00:00
|
|
|
if (the_pcu->vty.dl_arq_type == EGPRS_ARQ2)
|
|
|
|
vty_out(vty, " egprs dl arq-type arq2%s", VTY_NEWLINE);
|
2016-08-22 11:51:10 +00:00
|
|
|
|
2021-01-14 13:45:14 +00:00
|
|
|
if (the_pcu->vty.force_llc_lifetime == 0xffff)
|
2012-07-21 09:09:58 +00:00
|
|
|
vty_out(vty, " queue lifetime infinite%s", VTY_NEWLINE);
|
2021-01-14 13:45:14 +00:00
|
|
|
else if (the_pcu->vty.force_llc_lifetime)
|
|
|
|
vty_out(vty, " queue lifetime %d%s", the_pcu->vty.force_llc_lifetime,
|
2012-07-21 09:09:58 +00:00
|
|
|
VTY_NEWLINE);
|
2021-01-14 13:45:14 +00:00
|
|
|
if (the_pcu->vty.llc_discard_csec)
|
|
|
|
vty_out(vty, " queue hysteresis %d%s", the_pcu->vty.llc_discard_csec,
|
2015-03-20 11:02:42 +00:00
|
|
|
VTY_NEWLINE);
|
2021-01-14 13:45:14 +00:00
|
|
|
if (the_pcu->vty.llc_idle_ack_csec)
|
|
|
|
vty_out(vty, " queue idle-ack-delay %d%s", the_pcu->vty.llc_idle_ack_csec,
|
2015-04-02 11:58:09 +00:00
|
|
|
VTY_NEWLINE);
|
2021-01-14 13:45:14 +00:00
|
|
|
if (the_pcu->vty.llc_codel_interval_msec == LLC_CODEL_USE_DEFAULT)
|
llc: Use CoDel to drop packages from the LLC queue
Currently packets are only dropped if they have reached their maximum
life time. This leads to LLC queues being constantly filled under
load, increasing the latency up to the maximum life time. This kind
of bufferbloat hinders TCP's congestion avoidance algorithms. To keep
the queues short, the CoDel active queue management algorithm can be
used.
This commit changes to llc_dequeue method to apply the CoDel
algorithm to selectively drop LLC frames before they passed to the
TBF layer to be encoded in BSNs. This feature is currently disabled
by default.
The CoDel state is managed per MS since the LLC queues are also kept
in the MS objects.
Note that there is still some buffering in the TBF objects, in the
worst case (CS4) 3.5kByte + LLC-MTU octets are stored there. The
resulting additional packet delay is not (yet) taken into account for
CoDel.
Also note that configuration changes are applied to new MS objects
only.
The following VTY commands are added to the 'pcu' node:
- queue codel activates CoDel, the interval is selected by
the implementation
- queue codel interval <1-1000>
activates CoDel with a fixed interval given
in centiseconds (10ms-10s)
- no queue codel deactivates CoDel
Which interval value to use is still an open issue. For high speed
links (e.g. Ethernet), CoDel suggests 100ms. For slower links, the
expected RTT is recommended. The current implementation uses a
default value of 2000ms.
Measurements:
Note that the following measurements depend on several other factors,
most notably the interaction with the SGSN's flow control. They are
just examples to give an idea how CoDel might influence some
parameters.
The measurements have been done with a single E71, first with a
running ping only (Idle), then with an additional TCP download
of a 360k file (Busy). The CoDel interval was set to 1s.
- Idle :
ping ~400ms, avg queue delay 0ms, dropped 0
- Busy, No CoDel:
ping ~6s, avg queue delay 4-6s,
dropped 0, scheduled 948, duration 54s
- Busy, CoDel:
ping 500-1500ms, avg queue delay ~600ms,
dropped 77, scheduled 1040, duration 60s
More measurements with two MS downloading in parallel (two
independant measurements per case).
- Busy, No CoDel:
dropped 0, scheduled 1883, duration 121s
dropped 19, scheduled 2003, duration 133s
- Busy, CoDel:
dropped 22, scheduled 1926, duration 116s
dropped 22, scheduled 1955, duration 108s
Sponsored-by: On-Waves ehf
2015-07-17 14:39:09 +00:00
|
|
|
vty_out(vty, " queue codel%s", VTY_NEWLINE);
|
2021-01-14 13:45:14 +00:00
|
|
|
else if (the_pcu->vty.llc_codel_interval_msec == LLC_CODEL_DISABLE)
|
llc: Use CoDel to drop packages from the LLC queue
Currently packets are only dropped if they have reached their maximum
life time. This leads to LLC queues being constantly filled under
load, increasing the latency up to the maximum life time. This kind
of bufferbloat hinders TCP's congestion avoidance algorithms. To keep
the queues short, the CoDel active queue management algorithm can be
used.
This commit changes to llc_dequeue method to apply the CoDel
algorithm to selectively drop LLC frames before they passed to the
TBF layer to be encoded in BSNs. This feature is currently disabled
by default.
The CoDel state is managed per MS since the LLC queues are also kept
in the MS objects.
Note that there is still some buffering in the TBF objects, in the
worst case (CS4) 3.5kByte + LLC-MTU octets are stored there. The
resulting additional packet delay is not (yet) taken into account for
CoDel.
Also note that configuration changes are applied to new MS objects
only.
The following VTY commands are added to the 'pcu' node:
- queue codel activates CoDel, the interval is selected by
the implementation
- queue codel interval <1-1000>
activates CoDel with a fixed interval given
in centiseconds (10ms-10s)
- no queue codel deactivates CoDel
Which interval value to use is still an open issue. For high speed
links (e.g. Ethernet), CoDel suggests 100ms. For slower links, the
expected RTT is recommended. The current implementation uses a
default value of 2000ms.
Measurements:
Note that the following measurements depend on several other factors,
most notably the interaction with the SGSN's flow control. They are
just examples to give an idea how CoDel might influence some
parameters.
The measurements have been done with a single E71, first with a
running ping only (Idle), then with an additional TCP download
of a 360k file (Busy). The CoDel interval was set to 1s.
- Idle :
ping ~400ms, avg queue delay 0ms, dropped 0
- Busy, No CoDel:
ping ~6s, avg queue delay 4-6s,
dropped 0, scheduled 948, duration 54s
- Busy, CoDel:
ping 500-1500ms, avg queue delay ~600ms,
dropped 77, scheduled 1040, duration 60s
More measurements with two MS downloading in parallel (two
independant measurements per case).
- Busy, No CoDel:
dropped 0, scheduled 1883, duration 121s
dropped 19, scheduled 2003, duration 133s
- Busy, CoDel:
dropped 22, scheduled 1926, duration 116s
dropped 22, scheduled 1955, duration 108s
Sponsored-by: On-Waves ehf
2015-07-17 14:39:09 +00:00
|
|
|
vty_out(vty, " no queue codel%s", VTY_NEWLINE);
|
|
|
|
else
|
|
|
|
vty_out(vty, " queue codel interval %d%s",
|
2021-01-14 13:45:14 +00:00
|
|
|
the_pcu->vty.llc_codel_interval_msec/10, VTY_NEWLINE);
|
llc: Use CoDel to drop packages from the LLC queue
Currently packets are only dropped if they have reached their maximum
life time. This leads to LLC queues being constantly filled under
load, increasing the latency up to the maximum life time. This kind
of bufferbloat hinders TCP's congestion avoidance algorithms. To keep
the queues short, the CoDel active queue management algorithm can be
used.
This commit changes to llc_dequeue method to apply the CoDel
algorithm to selectively drop LLC frames before they passed to the
TBF layer to be encoded in BSNs. This feature is currently disabled
by default.
The CoDel state is managed per MS since the LLC queues are also kept
in the MS objects.
Note that there is still some buffering in the TBF objects, in the
worst case (CS4) 3.5kByte + LLC-MTU octets are stored there. The
resulting additional packet delay is not (yet) taken into account for
CoDel.
Also note that configuration changes are applied to new MS objects
only.
The following VTY commands are added to the 'pcu' node:
- queue codel activates CoDel, the interval is selected by
the implementation
- queue codel interval <1-1000>
activates CoDel with a fixed interval given
in centiseconds (10ms-10s)
- no queue codel deactivates CoDel
Which interval value to use is still an open issue. For high speed
links (e.g. Ethernet), CoDel suggests 100ms. For slower links, the
expected RTT is recommended. The current implementation uses a
default value of 2000ms.
Measurements:
Note that the following measurements depend on several other factors,
most notably the interaction with the SGSN's flow control. They are
just examples to give an idea how CoDel might influence some
parameters.
The measurements have been done with a single E71, first with a
running ping only (Idle), then with an additional TCP download
of a 360k file (Busy). The CoDel interval was set to 1s.
- Idle :
ping ~400ms, avg queue delay 0ms, dropped 0
- Busy, No CoDel:
ping ~6s, avg queue delay 4-6s,
dropped 0, scheduled 948, duration 54s
- Busy, CoDel:
ping 500-1500ms, avg queue delay ~600ms,
dropped 77, scheduled 1040, duration 60s
More measurements with two MS downloading in parallel (two
independant measurements per case).
- Busy, No CoDel:
dropped 0, scheduled 1883, duration 121s
dropped 19, scheduled 2003, duration 133s
- Busy, CoDel:
dropped 22, scheduled 1926, duration 116s
dropped 22, scheduled 1955, duration 108s
Sponsored-by: On-Waves ehf
2015-07-17 14:39:09 +00:00
|
|
|
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
if (the_pcu->alloc_algorithm == alloc_algorithm_a)
|
2012-07-22 06:58:09 +00:00
|
|
|
vty_out(vty, " alloc-algorithm a%s", VTY_NEWLINE);
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
if (the_pcu->alloc_algorithm == alloc_algorithm_b)
|
2012-07-22 06:58:09 +00:00
|
|
|
vty_out(vty, " alloc-algorithm b%s", VTY_NEWLINE);
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
if (the_pcu->alloc_algorithm == alloc_algorithm_dynamic)
|
2015-07-14 11:31:48 +00:00
|
|
|
vty_out(vty, " alloc-algorithm dynamic%s", VTY_NEWLINE);
|
2021-01-14 11:48:50 +00:00
|
|
|
if (the_pcu->vty.force_two_phase)
|
2012-08-07 14:00:56 +00:00
|
|
|
vty_out(vty, " two-phase-access%s", VTY_NEWLINE);
|
2021-02-09 17:47:34 +00:00
|
|
|
if (the_pcu->vty.force_alpha != (uint8_t)-1)
|
|
|
|
vty_out(vty, " alpha %u%s", the_pcu->vty.force_alpha, VTY_NEWLINE);
|
2021-01-14 11:53:53 +00:00
|
|
|
vty_out(vty, " gamma %d%s", the_pcu->vty.gamma * 2, VTY_NEWLINE);
|
2021-01-14 11:56:58 +00:00
|
|
|
if (!the_pcu->vty.dl_tbf_preemptive_retransmission)
|
2019-09-05 13:12:20 +00:00
|
|
|
vty_out(vty, " no dl-tbf-preemptive-retransmission%s", VTY_NEWLINE);
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
if (strcmp(the_pcu->pcu_sock_path, PCU_SOCK_DEFAULT))
|
|
|
|
vty_out(vty, " pcu-socket %s%s", the_pcu->pcu_sock_path, VTY_NEWLINE);
|
2012-07-22 06:58:09 +00:00
|
|
|
|
2021-11-12 12:42:03 +00:00
|
|
|
if (the_pcu->gsmtap_remote_host)
|
|
|
|
vty_out(vty, " gsmtap-remote-host %s%s", the_pcu->gsmtap_remote_host, VTY_NEWLINE);
|
2017-07-21 19:56:23 +00:00
|
|
|
for (i = 0; i < 32; i++) {
|
2021-11-12 12:42:03 +00:00
|
|
|
if (the_pcu->gsmtap_categ_mask & ((uint32_t)1 << i)) {
|
|
|
|
const char *category_buf;
|
|
|
|
if (!(category_buf = get_value_string_or_null(pcu_gsmtap_categ_names, i)))
|
|
|
|
continue;
|
|
|
|
vty_out(vty, " gsmtap-category %s%s", category_buf, VTY_NEWLINE);
|
2017-07-21 19:56:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-25 19:28:38 +00:00
|
|
|
if (the_pcu->vty.ns_dialect == GPRS_NS2_DIALECT_SNS)
|
2018-07-05 01:11:17 +00:00
|
|
|
vty_out(vty, " gb-dialect ip-sns%s", VTY_NEWLINE);
|
|
|
|
else
|
|
|
|
vty_out(vty, " gb-dialect classic%s", VTY_NEWLINE);
|
|
|
|
|
2021-04-29 20:02:47 +00:00
|
|
|
if (the_pcu->vty.ns_ip_dscp != -1)
|
|
|
|
vty_out(vty, " gb ip-dscp %d%s", the_pcu->vty.ns_ip_dscp, VTY_NEWLINE);
|
|
|
|
if (the_pcu->vty.ns_priority != -1)
|
|
|
|
vty_out(vty, " gb socket-priority %d%s", the_pcu->vty.ns_priority, VTY_NEWLINE);
|
|
|
|
|
2021-02-17 19:24:59 +00:00
|
|
|
if (the_pcu->vty.neigh_ctrl_addr) {
|
|
|
|
vty_out(vty, " neighbor resolution %s %u%s",
|
|
|
|
the_pcu->vty.neigh_ctrl_addr, the_pcu->vty.neigh_ctrl_port, VTY_NEWLINE);
|
|
|
|
}
|
|
|
|
|
2021-01-14 11:01:42 +00:00
|
|
|
osmo_tdef_vty_write(vty, the_pcu->T_defs, " timer ");
|
2019-09-26 16:25:35 +00:00
|
|
|
|
2018-01-30 16:53:02 +00:00
|
|
|
return CMD_SUCCESS;
|
2012-07-20 19:50:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* per-BTS configuration */
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu,
|
|
|
|
cfg_pcu_cmd,
|
|
|
|
"pcu",
|
|
|
|
"BTS specific configure",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2012-07-20 19:50:31 +00:00
|
|
|
{
|
|
|
|
vty->node = PCU_NODE;
|
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2015-09-28 16:12:57 +00:00
|
|
|
#define EGPRS_STR "EGPRS configuration\n"
|
|
|
|
|
2020-10-30 16:15:32 +00:00
|
|
|
DEFUN_DEPRECATED(cfg_pcu_egprs,
|
|
|
|
cfg_pcu_egprs_cmd,
|
|
|
|
"egprs only",
|
|
|
|
EGPRS_STR "Use EGPRS and disable plain GPRS\n")
|
2015-09-28 16:12:57 +00:00
|
|
|
{
|
2020-10-30 16:15:32 +00:00
|
|
|
vty_out (vty, "'egprs only' is deprecated, egprs support is controled from BTS/BSC config, this is now a no-op%s", VTY_NEWLINE);
|
2015-09-28 16:12:57 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-10-30 16:15:32 +00:00
|
|
|
DEFUN_DEPRECATED(cfg_pcu_no_egprs,
|
|
|
|
cfg_pcu_no_egprs_cmd,
|
|
|
|
"no egprs",
|
|
|
|
NO_STR EGPRS_STR)
|
2015-09-28 16:12:57 +00:00
|
|
|
{
|
2020-10-30 16:15:32 +00:00
|
|
|
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);
|
2015-09-28 16:12:57 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_fc_interval,
|
|
|
|
cfg_pcu_fc_interval_cmd,
|
|
|
|
"flow-control-interval <1-10>",
|
|
|
|
"Interval between sending subsequent Flow Control PDUs\n"
|
|
|
|
"Interval time in seconds\n",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2012-09-23 04:41:21 +00:00
|
|
|
{
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_interval = atoi(argv[0]);
|
2012-09-23 04:41:21 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
2015-04-21 10:56:48 +00:00
|
|
|
#define FC_STR "BSSGP Flow Control configuration\n"
|
|
|
|
#define FC_BMAX_STR(who) "Force a fixed value for the " who " bucket size\n"
|
|
|
|
#define FC_LR_STR(who) "Force a fixed value for the " who " leak rate\n"
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_fc_bvc_bucket_size,
|
|
|
|
cfg_pcu_fc_bvc_bucket_size_cmd,
|
|
|
|
"flow-control force-bvc-bucket-size <1-6553500>",
|
|
|
|
FC_STR FC_BMAX_STR("BVC") "Bucket size in octets\n",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-04-21 10:56:48 +00:00
|
|
|
{
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_bvc_bucket_size = atoi(argv[0]);
|
2015-04-21 10:56:48 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_no_fc_bvc_bucket_size,
|
|
|
|
cfg_pcu_no_fc_bvc_bucket_size_cmd,
|
|
|
|
"no flow-control force-bvc-bucket-size",
|
|
|
|
NO_STR FC_STR FC_BMAX_STR("BVC"),
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-04-21 10:56:48 +00:00
|
|
|
{
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_bvc_bucket_size = 0;
|
2015-04-21 10:56:48 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_fc_bvc_leak_rate,
|
|
|
|
cfg_pcu_fc_bvc_leak_rate_cmd,
|
|
|
|
"flow-control force-bvc-leak-rate <1-6553500>",
|
|
|
|
FC_STR FC_LR_STR("BVC") "Leak rate in bit/s\n",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-04-21 10:56:48 +00:00
|
|
|
{
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_bvc_leak_rate = atoi(argv[0]);
|
2015-04-21 10:56:48 +00:00
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_no_fc_bvc_leak_rate,
|
|
|
|
cfg_pcu_no_fc_bvc_leak_rate_cmd,
|
|
|
|
"no flow-control force-bvc-leak-rate",
|
|
|
|
NO_STR FC_STR FC_LR_STR("BVC"),
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-04-21 10:56:48 +00:00
|
|
|
{
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_bvc_leak_rate = 0;
|
2015-04-21 10:56:48 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_fc_ms_bucket_size,
|
|
|
|
cfg_pcu_fc_ms_bucket_size_cmd,
|
|
|
|
"flow-control force-ms-bucket-size <1-6553500>",
|
|
|
|
FC_STR FC_BMAX_STR("default MS") "Bucket size in octets\n",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-04-21 10:56:48 +00:00
|
|
|
{
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_ms_bucket_size = atoi(argv[0]);
|
2015-04-21 10:56:48 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_no_fc_ms_bucket_size,
|
|
|
|
cfg_pcu_no_fc_ms_bucket_size_cmd,
|
|
|
|
"no flow-control force-ms-bucket-size",
|
|
|
|
NO_STR FC_STR FC_BMAX_STR("default MS"),
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-04-21 10:56:48 +00:00
|
|
|
{
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_ms_bucket_size = 0;
|
2015-04-21 10:56:48 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_fc_ms_leak_rate,
|
|
|
|
cfg_pcu_fc_ms_leak_rate_cmd,
|
|
|
|
"flow-control force-ms-leak-rate <1-6553500>",
|
|
|
|
FC_STR FC_LR_STR("default MS") "Leak rate in bit/s\n",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-04-21 10:56:48 +00:00
|
|
|
{
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_ms_leak_rate = atoi(argv[0]);
|
2015-04-21 10:56:48 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_no_fc_ms_leak_rate,
|
|
|
|
cfg_pcu_no_fc_ms_leak_rate_cmd,
|
|
|
|
"no flow-control force-ms-leak-rate",
|
|
|
|
NO_STR FC_STR FC_LR_STR("default MS"),
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-04-21 10:56:48 +00:00
|
|
|
{
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_ms_leak_rate = 0;
|
2015-04-21 10:56:48 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
2012-09-23 04:41:21 +00:00
|
|
|
|
2015-05-06 08:47:30 +00:00
|
|
|
#define FC_BTIME_STR "Set target downlink maximum queueing time (only affects the advertised bucket size)\n"
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_fc_bucket_time,
|
|
|
|
cfg_pcu_fc_bucket_time_cmd,
|
|
|
|
"flow-control bucket-time <1-65534>",
|
|
|
|
FC_STR FC_BTIME_STR "Time in centi-seconds\n",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-05-06 08:47:30 +00:00
|
|
|
{
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_bucket_time = atoi(argv[0]);
|
2015-05-06 08:47:30 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_no_fc_bucket_time,
|
|
|
|
cfg_pcu_no_fc_bucket_time_cmd,
|
|
|
|
"no flow-control bucket-time",
|
|
|
|
NO_STR FC_STR FC_BTIME_STR,
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-05-06 08:47:30 +00:00
|
|
|
{
|
2021-01-14 13:03:17 +00:00
|
|
|
the_pcu->vty.fc_bucket_time = 0;
|
2015-05-06 08:47:30 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2015-06-04 13:12:10 +00:00
|
|
|
#define CS_STR "Coding Scheme configuration\n"
|
2015-05-06 08:47:30 +00:00
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_cs,
|
|
|
|
cfg_pcu_cs_cmd,
|
|
|
|
"cs <1-4> [<1-4>]",
|
|
|
|
CS_STR
|
|
|
|
"Initial CS value to be used (overrides BTS config)\n"
|
|
|
|
"Use a different initial CS value for the uplink",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2012-07-20 19:50:31 +00:00
|
|
|
{
|
2021-01-14 15:20:57 +00:00
|
|
|
uint8_t cs_dl, cs_ul;
|
|
|
|
cs_dl = atoi(argv[0]);
|
2012-10-03 12:21:36 +00:00
|
|
|
if (argc > 1)
|
2021-01-14 15:20:57 +00:00
|
|
|
cs_ul = atoi(argv[1]);
|
2012-10-03 12:21:36 +00:00
|
|
|
else
|
2021-01-14 15:20:57 +00:00
|
|
|
cs_ul = cs_dl;
|
|
|
|
the_pcu->vty.force_initial_cs = true;
|
|
|
|
gprs_pcu_set_initial_cs(the_pcu, cs_dl, cs_ul);
|
2012-07-20 19:50:31 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_no_cs,
|
|
|
|
cfg_pcu_no_cs_cmd,
|
|
|
|
"no cs",
|
|
|
|
NO_STR CS_STR,
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2012-07-20 19:50:31 +00:00
|
|
|
{
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
the_pcu->vty.force_initial_cs = false;
|
2021-01-14 15:20:57 +00:00
|
|
|
gprs_pcu_set_initial_cs(the_pcu, 0, 0);
|
2012-07-20 19:50:31 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2016-01-07 10:48:28 +00:00
|
|
|
#define CS_MAX_STR "Set maximum values for adaptive CS selection (overrides BTS config)\n"
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_cs_max,
|
|
|
|
cfg_pcu_cs_max_cmd,
|
|
|
|
"cs max <1-4> [<1-4>]",
|
|
|
|
CS_STR
|
|
|
|
CS_MAX_STR
|
|
|
|
"Maximum CS value to be used\n"
|
|
|
|
"Use a different maximum CS value for the uplink",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-06-04 17:04:30 +00:00
|
|
|
{
|
2020-10-30 17:35:54 +00:00
|
|
|
uint8_t cs_dl = atoi(argv[0]);
|
|
|
|
uint8_t cs_ul;
|
2015-06-04 17:04:30 +00:00
|
|
|
|
|
|
|
if (argc > 1)
|
2020-10-30 17:35:54 +00:00
|
|
|
cs_ul = atoi(argv[1]);
|
2015-06-04 17:04:30 +00:00
|
|
|
else
|
2020-10-30 17:35:54 +00:00
|
|
|
cs_ul = cs_dl;
|
2015-06-04 17:04:30 +00:00
|
|
|
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
gprs_pcu_set_max_cs(the_pcu, cs_dl, cs_ul);
|
2015-06-04 17:04:30 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_no_cs_max,
|
|
|
|
cfg_pcu_no_cs_max_cmd,
|
|
|
|
"no cs max",
|
|
|
|
NO_STR CS_STR CS_MAX_STR,
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-06-04 17:04:30 +00:00
|
|
|
{
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
gprs_pcu_set_max_cs(the_pcu, 0, 0);
|
2015-06-04 17:04:30 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2016-01-07 10:48:28 +00:00
|
|
|
#define MCS_STR "Modulation and Coding Scheme configuration (EGPRS)\n"
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_mcs,
|
|
|
|
cfg_pcu_mcs_cmd,
|
|
|
|
"mcs <1-9> [<1-9>]",
|
|
|
|
MCS_STR
|
|
|
|
"Initial MCS value to be used (default 1)\n"
|
|
|
|
"Use a different initial MCS value for the uplink",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2016-02-02 15:02:16 +00:00
|
|
|
{
|
2021-01-14 15:20:57 +00:00
|
|
|
uint8_t mcs_dl, mcs_ul;
|
|
|
|
mcs_dl = atoi(argv[0]);
|
2016-02-02 15:02:16 +00:00
|
|
|
if (argc > 1)
|
2021-01-14 15:20:57 +00:00
|
|
|
mcs_ul = atoi(argv[1]);
|
2016-02-02 15:02:16 +00:00
|
|
|
else
|
2021-01-14 15:20:57 +00:00
|
|
|
mcs_ul = mcs_dl;
|
|
|
|
the_pcu->vty.force_initial_mcs = true;
|
|
|
|
gprs_pcu_set_initial_mcs(the_pcu, mcs_dl, mcs_ul);
|
2016-02-02 15:02:16 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_no_mcs,
|
|
|
|
cfg_pcu_no_mcs_cmd,
|
|
|
|
"no mcs",
|
|
|
|
NO_STR MCS_STR,
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2016-02-02 15:02:16 +00:00
|
|
|
{
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
the_pcu->vty.force_initial_mcs = false;
|
2021-01-14 15:20:57 +00:00
|
|
|
gprs_pcu_set_initial_mcs(the_pcu, 0, 0);
|
2016-02-02 15:02:16 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_mcs_max,
|
|
|
|
cfg_pcu_mcs_max_cmd,
|
|
|
|
"mcs max <1-9> [<1-9>]",
|
|
|
|
MCS_STR
|
|
|
|
CS_MAX_STR
|
|
|
|
"Maximum MCS value to be used\n"
|
|
|
|
"Use a different maximum MCS value for the uplink",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2016-01-07 10:48:28 +00:00
|
|
|
{
|
2020-10-30 17:35:54 +00:00
|
|
|
uint8_t mcs_dl = atoi(argv[0]);
|
|
|
|
uint8_t mcs_ul;
|
2016-01-07 10:48:28 +00:00
|
|
|
|
|
|
|
if (argc > 1)
|
2020-10-30 17:35:54 +00:00
|
|
|
mcs_ul = atoi(argv[1]);
|
2016-01-07 10:48:28 +00:00
|
|
|
else
|
2020-10-30 17:35:54 +00:00
|
|
|
mcs_ul = mcs_dl;
|
2016-01-07 10:48:28 +00:00
|
|
|
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
gprs_pcu_set_max_mcs(the_pcu, mcs_dl, mcs_ul);
|
2016-01-07 10:48:28 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_no_mcs_max,
|
|
|
|
cfg_pcu_no_mcs_max_cmd,
|
|
|
|
"no mcs max",
|
|
|
|
NO_STR MCS_STR CS_MAX_STR,
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2016-01-07 10:48:28 +00:00
|
|
|
{
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
gprs_pcu_set_max_mcs(the_pcu, 0, 0);
|
2016-01-07 10:48:28 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2016-08-22 11:51:10 +00:00
|
|
|
#define DL_STR "downlink specific configuration\n"
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_dl_arq_type,
|
|
|
|
cfg_pcu_dl_arq_cmd,
|
|
|
|
"egprs dl arq-type (spb|arq2)",
|
|
|
|
EGPRS_STR DL_STR "ARQ options\n"
|
|
|
|
"enable SPB(ARQ1) support\n"
|
|
|
|
"enable ARQ2 support",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2016-08-22 11:51:10 +00:00
|
|
|
{
|
|
|
|
if (!strcmp(argv[0], "arq2"))
|
2021-01-14 12:08:02 +00:00
|
|
|
the_pcu->vty.dl_arq_type = EGPRS_ARQ2;
|
2016-08-22 11:51:10 +00:00
|
|
|
else
|
2021-01-14 12:08:02 +00:00
|
|
|
the_pcu->vty.dl_arq_type = EGPRS_ARQ1;
|
2016-08-22 11:51:10 +00:00
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_USRATTR(cfg_pcu_window_size,
|
|
|
|
cfg_pcu_window_size_cmd,
|
|
|
|
X(PCU_VTY_ATTR_NEW_TBF),
|
|
|
|
"window-size <0-1024> [<0-256>]",
|
|
|
|
"Window size configuration (b + N_PDCH * f)\n"
|
|
|
|
"Base value (b)\n"
|
|
|
|
"Factor for number of PDCH (f)")
|
2016-01-19 14:53:30 +00:00
|
|
|
{
|
|
|
|
uint16_t b = atoi(argv[0]);
|
|
|
|
|
2021-01-14 13:30:03 +00:00
|
|
|
the_pcu->vty.ws_base = b;
|
2016-01-19 14:53:30 +00:00
|
|
|
if (argc > 1) {
|
|
|
|
uint16_t f = atoi(argv[1]);
|
2021-01-14 13:30:03 +00:00
|
|
|
the_pcu->vty.ws_pdch = f;
|
2016-01-19 14:53:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-07-21 09:09:58 +00:00
|
|
|
#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"
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_USRATTR(cfg_pcu_queue_lifetime,
|
|
|
|
cfg_pcu_queue_lifetime_cmd,
|
|
|
|
X(PCU_VTY_ATTR_NEW_TBF),
|
|
|
|
"queue lifetime <1-65534>",
|
|
|
|
QUEUE_STR LIFETIME_STR "Lifetime in centi-seconds")
|
2012-07-21 09:09:58 +00:00
|
|
|
{
|
2015-04-30 15:55:16 +00:00
|
|
|
uint16_t csec = atoi(argv[0]);
|
2021-01-14 13:45:14 +00:00
|
|
|
the_pcu->vty.force_llc_lifetime = csec;
|
2012-07-21 09:09:58 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_USRATTR(cfg_pcu_queue_lifetime_inf,
|
|
|
|
cfg_pcu_queue_lifetime_inf_cmd,
|
|
|
|
X(PCU_VTY_ATTR_NEW_TBF),
|
|
|
|
"queue lifetime infinite",
|
|
|
|
QUEUE_STR LIFETIME_STR "Infinite lifetime")
|
2012-07-21 09:09:58 +00:00
|
|
|
{
|
2021-01-14 13:45:14 +00:00
|
|
|
the_pcu->vty.force_llc_lifetime = 0xffff;
|
2012-07-21 09:09:58 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_USRATTR(cfg_pcu_no_queue_lifetime,
|
|
|
|
cfg_pcu_no_queue_lifetime_cmd,
|
|
|
|
X(PCU_VTY_ATTR_NEW_TBF),
|
|
|
|
"no queue lifetime",
|
|
|
|
NO_STR QUEUE_STR "Disable lifetime limit of LLC frame (use value given "
|
|
|
|
"by SGSN)\n")
|
2012-07-21 09:09:58 +00:00
|
|
|
{
|
2021-01-14 13:45:14 +00:00
|
|
|
the_pcu->vty.force_llc_lifetime = 0;
|
2012-07-21 09:09:58 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2015-03-20 11:02:42 +00:00
|
|
|
#define QUEUE_HYSTERESIS_STR "Set lifetime hysteresis of LLC frame in centi-seconds " \
|
|
|
|
"(continue discarding until lifetime-hysteresis is reached)\n"
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_USRATTR(cfg_pcu_queue_hysteresis,
|
|
|
|
cfg_pcu_queue_hysteresis_cmd,
|
|
|
|
X(PCU_VTY_ATTR_NEW_TBF),
|
|
|
|
"queue hysteresis <1-65535>",
|
|
|
|
QUEUE_STR QUEUE_HYSTERESIS_STR "Hysteresis in centi-seconds")
|
2015-03-20 11:02:42 +00:00
|
|
|
{
|
2015-04-30 15:55:16 +00:00
|
|
|
uint16_t csec = atoi(argv[0]);
|
2021-01-14 13:45:14 +00:00
|
|
|
the_pcu->vty.llc_discard_csec = csec;
|
2015-03-20 11:02:42 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_USRATTR(cfg_pcu_no_queue_hysteresis,
|
|
|
|
cfg_pcu_no_queue_hysteresis_cmd,
|
|
|
|
X(PCU_VTY_ATTR_NEW_TBF),
|
|
|
|
"no queue hysteresis",
|
|
|
|
NO_STR QUEUE_STR QUEUE_HYSTERESIS_STR)
|
2015-03-20 11:02:42 +00:00
|
|
|
{
|
2021-01-14 13:45:14 +00:00
|
|
|
the_pcu->vty.llc_discard_csec = 0;
|
2015-03-20 11:02:42 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
llc: Use CoDel to drop packages from the LLC queue
Currently packets are only dropped if they have reached their maximum
life time. This leads to LLC queues being constantly filled under
load, increasing the latency up to the maximum life time. This kind
of bufferbloat hinders TCP's congestion avoidance algorithms. To keep
the queues short, the CoDel active queue management algorithm can be
used.
This commit changes to llc_dequeue method to apply the CoDel
algorithm to selectively drop LLC frames before they passed to the
TBF layer to be encoded in BSNs. This feature is currently disabled
by default.
The CoDel state is managed per MS since the LLC queues are also kept
in the MS objects.
Note that there is still some buffering in the TBF objects, in the
worst case (CS4) 3.5kByte + LLC-MTU octets are stored there. The
resulting additional packet delay is not (yet) taken into account for
CoDel.
Also note that configuration changes are applied to new MS objects
only.
The following VTY commands are added to the 'pcu' node:
- queue codel activates CoDel, the interval is selected by
the implementation
- queue codel interval <1-1000>
activates CoDel with a fixed interval given
in centiseconds (10ms-10s)
- no queue codel deactivates CoDel
Which interval value to use is still an open issue. For high speed
links (e.g. Ethernet), CoDel suggests 100ms. For slower links, the
expected RTT is recommended. The current implementation uses a
default value of 2000ms.
Measurements:
Note that the following measurements depend on several other factors,
most notably the interaction with the SGSN's flow control. They are
just examples to give an idea how CoDel might influence some
parameters.
The measurements have been done with a single E71, first with a
running ping only (Idle), then with an additional TCP download
of a 360k file (Busy). The CoDel interval was set to 1s.
- Idle :
ping ~400ms, avg queue delay 0ms, dropped 0
- Busy, No CoDel:
ping ~6s, avg queue delay 4-6s,
dropped 0, scheduled 948, duration 54s
- Busy, CoDel:
ping 500-1500ms, avg queue delay ~600ms,
dropped 77, scheduled 1040, duration 60s
More measurements with two MS downloading in parallel (two
independant measurements per case).
- Busy, No CoDel:
dropped 0, scheduled 1883, duration 121s
dropped 19, scheduled 2003, duration 133s
- Busy, CoDel:
dropped 22, scheduled 1926, duration 116s
dropped 22, scheduled 1955, duration 108s
Sponsored-by: On-Waves ehf
2015-07-17 14:39:09 +00:00
|
|
|
#define QUEUE_CODEL_STR "Set CoDel queue management\n"
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_USRATTR(cfg_pcu_queue_codel,
|
|
|
|
cfg_pcu_queue_codel_cmd,
|
|
|
|
X(PCU_VTY_ATTR_NEW_SUBSCR),
|
|
|
|
"queue codel",
|
|
|
|
QUEUE_STR QUEUE_CODEL_STR)
|
llc: Use CoDel to drop packages from the LLC queue
Currently packets are only dropped if they have reached their maximum
life time. This leads to LLC queues being constantly filled under
load, increasing the latency up to the maximum life time. This kind
of bufferbloat hinders TCP's congestion avoidance algorithms. To keep
the queues short, the CoDel active queue management algorithm can be
used.
This commit changes to llc_dequeue method to apply the CoDel
algorithm to selectively drop LLC frames before they passed to the
TBF layer to be encoded in BSNs. This feature is currently disabled
by default.
The CoDel state is managed per MS since the LLC queues are also kept
in the MS objects.
Note that there is still some buffering in the TBF objects, in the
worst case (CS4) 3.5kByte + LLC-MTU octets are stored there. The
resulting additional packet delay is not (yet) taken into account for
CoDel.
Also note that configuration changes are applied to new MS objects
only.
The following VTY commands are added to the 'pcu' node:
- queue codel activates CoDel, the interval is selected by
the implementation
- queue codel interval <1-1000>
activates CoDel with a fixed interval given
in centiseconds (10ms-10s)
- no queue codel deactivates CoDel
Which interval value to use is still an open issue. For high speed
links (e.g. Ethernet), CoDel suggests 100ms. For slower links, the
expected RTT is recommended. The current implementation uses a
default value of 2000ms.
Measurements:
Note that the following measurements depend on several other factors,
most notably the interaction with the SGSN's flow control. They are
just examples to give an idea how CoDel might influence some
parameters.
The measurements have been done with a single E71, first with a
running ping only (Idle), then with an additional TCP download
of a 360k file (Busy). The CoDel interval was set to 1s.
- Idle :
ping ~400ms, avg queue delay 0ms, dropped 0
- Busy, No CoDel:
ping ~6s, avg queue delay 4-6s,
dropped 0, scheduled 948, duration 54s
- Busy, CoDel:
ping 500-1500ms, avg queue delay ~600ms,
dropped 77, scheduled 1040, duration 60s
More measurements with two MS downloading in parallel (two
independant measurements per case).
- Busy, No CoDel:
dropped 0, scheduled 1883, duration 121s
dropped 19, scheduled 2003, duration 133s
- Busy, CoDel:
dropped 22, scheduled 1926, duration 116s
dropped 22, scheduled 1955, duration 108s
Sponsored-by: On-Waves ehf
2015-07-17 14:39:09 +00:00
|
|
|
{
|
2021-01-14 13:45:14 +00:00
|
|
|
the_pcu->vty.llc_codel_interval_msec = LLC_CODEL_USE_DEFAULT;
|
llc: Use CoDel to drop packages from the LLC queue
Currently packets are only dropped if they have reached their maximum
life time. This leads to LLC queues being constantly filled under
load, increasing the latency up to the maximum life time. This kind
of bufferbloat hinders TCP's congestion avoidance algorithms. To keep
the queues short, the CoDel active queue management algorithm can be
used.
This commit changes to llc_dequeue method to apply the CoDel
algorithm to selectively drop LLC frames before they passed to the
TBF layer to be encoded in BSNs. This feature is currently disabled
by default.
The CoDel state is managed per MS since the LLC queues are also kept
in the MS objects.
Note that there is still some buffering in the TBF objects, in the
worst case (CS4) 3.5kByte + LLC-MTU octets are stored there. The
resulting additional packet delay is not (yet) taken into account for
CoDel.
Also note that configuration changes are applied to new MS objects
only.
The following VTY commands are added to the 'pcu' node:
- queue codel activates CoDel, the interval is selected by
the implementation
- queue codel interval <1-1000>
activates CoDel with a fixed interval given
in centiseconds (10ms-10s)
- no queue codel deactivates CoDel
Which interval value to use is still an open issue. For high speed
links (e.g. Ethernet), CoDel suggests 100ms. For slower links, the
expected RTT is recommended. The current implementation uses a
default value of 2000ms.
Measurements:
Note that the following measurements depend on several other factors,
most notably the interaction with the SGSN's flow control. They are
just examples to give an idea how CoDel might influence some
parameters.
The measurements have been done with a single E71, first with a
running ping only (Idle), then with an additional TCP download
of a 360k file (Busy). The CoDel interval was set to 1s.
- Idle :
ping ~400ms, avg queue delay 0ms, dropped 0
- Busy, No CoDel:
ping ~6s, avg queue delay 4-6s,
dropped 0, scheduled 948, duration 54s
- Busy, CoDel:
ping 500-1500ms, avg queue delay ~600ms,
dropped 77, scheduled 1040, duration 60s
More measurements with two MS downloading in parallel (two
independant measurements per case).
- Busy, No CoDel:
dropped 0, scheduled 1883, duration 121s
dropped 19, scheduled 2003, duration 133s
- Busy, CoDel:
dropped 22, scheduled 1926, duration 116s
dropped 22, scheduled 1955, duration 108s
Sponsored-by: On-Waves ehf
2015-07-17 14:39:09 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_USRATTR(cfg_pcu_queue_codel_interval,
|
|
|
|
cfg_pcu_queue_codel_interval_cmd,
|
|
|
|
X(PCU_VTY_ATTR_NEW_SUBSCR),
|
|
|
|
"queue codel interval <1-1000>",
|
|
|
|
QUEUE_STR QUEUE_CODEL_STR "Specify interval\n" "Interval in centi-seconds")
|
llc: Use CoDel to drop packages from the LLC queue
Currently packets are only dropped if they have reached their maximum
life time. This leads to LLC queues being constantly filled under
load, increasing the latency up to the maximum life time. This kind
of bufferbloat hinders TCP's congestion avoidance algorithms. To keep
the queues short, the CoDel active queue management algorithm can be
used.
This commit changes to llc_dequeue method to apply the CoDel
algorithm to selectively drop LLC frames before they passed to the
TBF layer to be encoded in BSNs. This feature is currently disabled
by default.
The CoDel state is managed per MS since the LLC queues are also kept
in the MS objects.
Note that there is still some buffering in the TBF objects, in the
worst case (CS4) 3.5kByte + LLC-MTU octets are stored there. The
resulting additional packet delay is not (yet) taken into account for
CoDel.
Also note that configuration changes are applied to new MS objects
only.
The following VTY commands are added to the 'pcu' node:
- queue codel activates CoDel, the interval is selected by
the implementation
- queue codel interval <1-1000>
activates CoDel with a fixed interval given
in centiseconds (10ms-10s)
- no queue codel deactivates CoDel
Which interval value to use is still an open issue. For high speed
links (e.g. Ethernet), CoDel suggests 100ms. For slower links, the
expected RTT is recommended. The current implementation uses a
default value of 2000ms.
Measurements:
Note that the following measurements depend on several other factors,
most notably the interaction with the SGSN's flow control. They are
just examples to give an idea how CoDel might influence some
parameters.
The measurements have been done with a single E71, first with a
running ping only (Idle), then with an additional TCP download
of a 360k file (Busy). The CoDel interval was set to 1s.
- Idle :
ping ~400ms, avg queue delay 0ms, dropped 0
- Busy, No CoDel:
ping ~6s, avg queue delay 4-6s,
dropped 0, scheduled 948, duration 54s
- Busy, CoDel:
ping 500-1500ms, avg queue delay ~600ms,
dropped 77, scheduled 1040, duration 60s
More measurements with two MS downloading in parallel (two
independant measurements per case).
- Busy, No CoDel:
dropped 0, scheduled 1883, duration 121s
dropped 19, scheduled 2003, duration 133s
- Busy, CoDel:
dropped 22, scheduled 1926, duration 116s
dropped 22, scheduled 1955, duration 108s
Sponsored-by: On-Waves ehf
2015-07-17 14:39:09 +00:00
|
|
|
{
|
|
|
|
uint16_t csec = atoi(argv[0]);
|
2021-01-14 13:45:14 +00:00
|
|
|
the_pcu->vty.llc_codel_interval_msec = 10*csec;
|
llc: Use CoDel to drop packages from the LLC queue
Currently packets are only dropped if they have reached their maximum
life time. This leads to LLC queues being constantly filled under
load, increasing the latency up to the maximum life time. This kind
of bufferbloat hinders TCP's congestion avoidance algorithms. To keep
the queues short, the CoDel active queue management algorithm can be
used.
This commit changes to llc_dequeue method to apply the CoDel
algorithm to selectively drop LLC frames before they passed to the
TBF layer to be encoded in BSNs. This feature is currently disabled
by default.
The CoDel state is managed per MS since the LLC queues are also kept
in the MS objects.
Note that there is still some buffering in the TBF objects, in the
worst case (CS4) 3.5kByte + LLC-MTU octets are stored there. The
resulting additional packet delay is not (yet) taken into account for
CoDel.
Also note that configuration changes are applied to new MS objects
only.
The following VTY commands are added to the 'pcu' node:
- queue codel activates CoDel, the interval is selected by
the implementation
- queue codel interval <1-1000>
activates CoDel with a fixed interval given
in centiseconds (10ms-10s)
- no queue codel deactivates CoDel
Which interval value to use is still an open issue. For high speed
links (e.g. Ethernet), CoDel suggests 100ms. For slower links, the
expected RTT is recommended. The current implementation uses a
default value of 2000ms.
Measurements:
Note that the following measurements depend on several other factors,
most notably the interaction with the SGSN's flow control. They are
just examples to give an idea how CoDel might influence some
parameters.
The measurements have been done with a single E71, first with a
running ping only (Idle), then with an additional TCP download
of a 360k file (Busy). The CoDel interval was set to 1s.
- Idle :
ping ~400ms, avg queue delay 0ms, dropped 0
- Busy, No CoDel:
ping ~6s, avg queue delay 4-6s,
dropped 0, scheduled 948, duration 54s
- Busy, CoDel:
ping 500-1500ms, avg queue delay ~600ms,
dropped 77, scheduled 1040, duration 60s
More measurements with two MS downloading in parallel (two
independant measurements per case).
- Busy, No CoDel:
dropped 0, scheduled 1883, duration 121s
dropped 19, scheduled 2003, duration 133s
- Busy, CoDel:
dropped 22, scheduled 1926, duration 116s
dropped 22, scheduled 1955, duration 108s
Sponsored-by: On-Waves ehf
2015-07-17 14:39:09 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_USRATTR(cfg_pcu_no_queue_codel,
|
|
|
|
cfg_pcu_no_queue_codel_cmd,
|
|
|
|
X(PCU_VTY_ATTR_NEW_SUBSCR),
|
|
|
|
"no queue codel",
|
|
|
|
NO_STR QUEUE_STR QUEUE_CODEL_STR)
|
llc: Use CoDel to drop packages from the LLC queue
Currently packets are only dropped if they have reached their maximum
life time. This leads to LLC queues being constantly filled under
load, increasing the latency up to the maximum life time. This kind
of bufferbloat hinders TCP's congestion avoidance algorithms. To keep
the queues short, the CoDel active queue management algorithm can be
used.
This commit changes to llc_dequeue method to apply the CoDel
algorithm to selectively drop LLC frames before they passed to the
TBF layer to be encoded in BSNs. This feature is currently disabled
by default.
The CoDel state is managed per MS since the LLC queues are also kept
in the MS objects.
Note that there is still some buffering in the TBF objects, in the
worst case (CS4) 3.5kByte + LLC-MTU octets are stored there. The
resulting additional packet delay is not (yet) taken into account for
CoDel.
Also note that configuration changes are applied to new MS objects
only.
The following VTY commands are added to the 'pcu' node:
- queue codel activates CoDel, the interval is selected by
the implementation
- queue codel interval <1-1000>
activates CoDel with a fixed interval given
in centiseconds (10ms-10s)
- no queue codel deactivates CoDel
Which interval value to use is still an open issue. For high speed
links (e.g. Ethernet), CoDel suggests 100ms. For slower links, the
expected RTT is recommended. The current implementation uses a
default value of 2000ms.
Measurements:
Note that the following measurements depend on several other factors,
most notably the interaction with the SGSN's flow control. They are
just examples to give an idea how CoDel might influence some
parameters.
The measurements have been done with a single E71, first with a
running ping only (Idle), then with an additional TCP download
of a 360k file (Busy). The CoDel interval was set to 1s.
- Idle :
ping ~400ms, avg queue delay 0ms, dropped 0
- Busy, No CoDel:
ping ~6s, avg queue delay 4-6s,
dropped 0, scheduled 948, duration 54s
- Busy, CoDel:
ping 500-1500ms, avg queue delay ~600ms,
dropped 77, scheduled 1040, duration 60s
More measurements with two MS downloading in parallel (two
independant measurements per case).
- Busy, No CoDel:
dropped 0, scheduled 1883, duration 121s
dropped 19, scheduled 2003, duration 133s
- Busy, CoDel:
dropped 22, scheduled 1926, duration 116s
dropped 22, scheduled 1955, duration 108s
Sponsored-by: On-Waves ehf
2015-07-17 14:39:09 +00:00
|
|
|
{
|
2021-01-14 13:45:14 +00:00
|
|
|
the_pcu->vty.llc_codel_interval_msec = LLC_CODEL_DISABLE;
|
llc: Use CoDel to drop packages from the LLC queue
Currently packets are only dropped if they have reached their maximum
life time. This leads to LLC queues being constantly filled under
load, increasing the latency up to the maximum life time. This kind
of bufferbloat hinders TCP's congestion avoidance algorithms. To keep
the queues short, the CoDel active queue management algorithm can be
used.
This commit changes to llc_dequeue method to apply the CoDel
algorithm to selectively drop LLC frames before they passed to the
TBF layer to be encoded in BSNs. This feature is currently disabled
by default.
The CoDel state is managed per MS since the LLC queues are also kept
in the MS objects.
Note that there is still some buffering in the TBF objects, in the
worst case (CS4) 3.5kByte + LLC-MTU octets are stored there. The
resulting additional packet delay is not (yet) taken into account for
CoDel.
Also note that configuration changes are applied to new MS objects
only.
The following VTY commands are added to the 'pcu' node:
- queue codel activates CoDel, the interval is selected by
the implementation
- queue codel interval <1-1000>
activates CoDel with a fixed interval given
in centiseconds (10ms-10s)
- no queue codel deactivates CoDel
Which interval value to use is still an open issue. For high speed
links (e.g. Ethernet), CoDel suggests 100ms. For slower links, the
expected RTT is recommended. The current implementation uses a
default value of 2000ms.
Measurements:
Note that the following measurements depend on several other factors,
most notably the interaction with the SGSN's flow control. They are
just examples to give an idea how CoDel might influence some
parameters.
The measurements have been done with a single E71, first with a
running ping only (Idle), then with an additional TCP download
of a 360k file (Busy). The CoDel interval was set to 1s.
- Idle :
ping ~400ms, avg queue delay 0ms, dropped 0
- Busy, No CoDel:
ping ~6s, avg queue delay 4-6s,
dropped 0, scheduled 948, duration 54s
- Busy, CoDel:
ping 500-1500ms, avg queue delay ~600ms,
dropped 77, scheduled 1040, duration 60s
More measurements with two MS downloading in parallel (two
independant measurements per case).
- Busy, No CoDel:
dropped 0, scheduled 1883, duration 121s
dropped 19, scheduled 2003, duration 133s
- Busy, CoDel:
dropped 22, scheduled 1926, duration 116s
dropped 22, scheduled 1955, duration 108s
Sponsored-by: On-Waves ehf
2015-07-17 14:39:09 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-04-02 11:58:09 +00:00
|
|
|
#define QUEUE_IDLE_ACK_STR "Request an ACK after the last DL LLC frame in centi-seconds\n"
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_queue_idle_ack_delay,
|
|
|
|
cfg_pcu_queue_idle_ack_delay_cmd,
|
|
|
|
"queue idle-ack-delay <1-65535>",
|
|
|
|
QUEUE_STR QUEUE_IDLE_ACK_STR "Idle ACK delay in centi-seconds",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-04-02 11:58:09 +00:00
|
|
|
{
|
2015-04-30 15:55:16 +00:00
|
|
|
uint16_t csec = atoi(argv[0]);
|
2021-01-14 13:45:14 +00:00
|
|
|
the_pcu->vty.llc_idle_ack_csec = csec;
|
2015-04-02 11:58:09 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_no_queue_idle_ack_delay,
|
|
|
|
cfg_pcu_no_queue_idle_ack_delay_cmd,
|
|
|
|
"no queue idle-ack-delay",
|
|
|
|
NO_STR QUEUE_STR QUEUE_IDLE_ACK_STR,
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-04-02 11:58:09 +00:00
|
|
|
{
|
2021-01-14 13:45:14 +00:00
|
|
|
the_pcu->vty.llc_idle_ack_csec = 0;
|
2015-04-02 11:58:09 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_alloc,
|
|
|
|
cfg_pcu_alloc_cmd,
|
|
|
|
"alloc-algorithm (a|b|dynamic)",
|
|
|
|
"Select slot allocation algorithm to use when assigning timeslots on "
|
|
|
|
"PACCH\n"
|
|
|
|
"Single slot is assigned only\n"
|
|
|
|
"Multiple slots are assigned for semi-duplex operation\n"
|
|
|
|
"Dynamically select the algorithm based on the system state\n",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2012-07-22 06:58:09 +00:00
|
|
|
{
|
|
|
|
switch (argv[0][0]) {
|
|
|
|
case 'a':
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
the_pcu->alloc_algorithm = alloc_algorithm_a;
|
2012-07-22 06:58:09 +00:00
|
|
|
break;
|
|
|
|
case 'b':
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
the_pcu->alloc_algorithm = alloc_algorithm_b;
|
2012-07-22 06:58:09 +00:00
|
|
|
break;
|
2015-07-14 11:31:48 +00:00
|
|
|
default:
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
the_pcu->alloc_algorithm = alloc_algorithm_dynamic;
|
2015-07-14 11:31:48 +00:00
|
|
|
break;
|
2012-07-22 06:58:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_two_phase,
|
|
|
|
cfg_pcu_two_phase_cmd,
|
|
|
|
"two-phase-access",
|
|
|
|
"Force two phase access when MS requests single phase access\n",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2012-08-07 14:00:56 +00:00
|
|
|
{
|
2021-01-14 11:48:50 +00:00
|
|
|
the_pcu->vty.force_two_phase = 1;
|
2012-08-07 14:00:56 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_no_two_phase,
|
|
|
|
cfg_pcu_no_two_phase_cmd,
|
|
|
|
"no two-phase-access",
|
|
|
|
NO_STR "Only use two phase access when requested my MS\n",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2012-08-07 14:00:56 +00:00
|
|
|
{
|
2021-01-14 11:48:50 +00:00
|
|
|
the_pcu->vty.force_two_phase = 0;
|
2012-08-07 14:00:56 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_alpha,
|
|
|
|
cfg_pcu_alpha_cmd,
|
2021-02-09 17:47:34 +00:00
|
|
|
"alpha (si13|<0-10>)",
|
2020-09-29 21:31:33 +00:00
|
|
|
"Alpha parameter for MS power control in units of 0.1 (see TS 05.08) "
|
|
|
|
"NOTE: Be sure to set Alpha value at System information 13 too.\n"
|
2021-02-09 17:47:34 +00:00
|
|
|
"Use value received from BSC in System Intormation 13 (default)\n"
|
|
|
|
"Force Alpha in units of 0.1\n",
|
|
|
|
CMD_ATTR_IMMEDIATE | CMD_ATTR_DEPRECATED)
|
2012-09-27 07:20:45 +00:00
|
|
|
{
|
2021-02-09 17:47:34 +00:00
|
|
|
vty_out(vty, "%% 'alpha <0-10>' is now deprecated: use osmo-bsc's 'gprs power-control alpha <0-10>' instead%s",
|
|
|
|
VTY_NEWLINE);
|
|
|
|
if (strcmp(argv[0], "si13") == 0)
|
|
|
|
the_pcu->vty.force_alpha = (uint8_t) -1;
|
|
|
|
else
|
|
|
|
the_pcu->vty.force_alpha = atoi(argv[0]);
|
2012-09-27 07:20:45 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_gamma,
|
|
|
|
cfg_pcu_gamma_cmd,
|
|
|
|
"gamma <0-62>",
|
|
|
|
"Gamma parameter for MS power control in units of dB (see TS 05.08)\n"
|
|
|
|
"Gamma in even unit of dBs\n",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2012-09-27 07:20:45 +00:00
|
|
|
{
|
2021-01-14 11:53:53 +00:00
|
|
|
the_pcu->vty.gamma = atoi(argv[0]) / 2;
|
2012-09-27 07:20:45 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2013-10-27 08:02:31 +00:00
|
|
|
DEFUN(show_bts_stats,
|
|
|
|
show_bts_stats_cmd,
|
|
|
|
"show bts statistics",
|
|
|
|
SHOW_STR "BTS related functionality\nStatistics\n")
|
|
|
|
{
|
2021-01-18 16:14:14 +00:00
|
|
|
struct gprs_rlcmac_bts *bts;
|
|
|
|
llist_for_each_entry(bts, &the_pcu->bts_list, list) {
|
|
|
|
vty_out(vty, "BTS%" PRIu8 ":%s", bts->nr, VTY_NEWLINE);
|
|
|
|
vty_out_rate_ctr_group(vty, " ", bts_rate_counters(bts));
|
|
|
|
}
|
2013-10-27 08:02:31 +00:00
|
|
|
return CMD_SUCCESS;
|
2014-01-15 16:06:51 +00:00
|
|
|
}
|
|
|
|
|
2020-09-22 15:01:31 +00:00
|
|
|
DEFUN(show_bts_pdch,
|
|
|
|
show_bts_pdch_cmd,
|
|
|
|
"show bts pdch",
|
|
|
|
SHOW_STR "BTS related functionality\nPDCH timeslots\n")
|
|
|
|
{
|
2021-01-18 16:14:14 +00:00
|
|
|
struct gprs_rlcmac_bts *bts;
|
|
|
|
llist_for_each_entry(bts, &the_pcu->bts_list, list) {
|
|
|
|
pcu_vty_show_bts_pdch(vty, bts);
|
|
|
|
}
|
|
|
|
return CMD_SUCCESS;
|
2020-09-22 15:01:31 +00:00
|
|
|
}
|
|
|
|
|
2015-03-19 10:22:38 +00:00
|
|
|
#define IDLE_TIME_STR "keep an idle DL TBF alive for the time given\n"
|
2019-09-09 11:41:00 +00:00
|
|
|
DEFUN_DEPRECATED(cfg_pcu_dl_tbf_idle_time,
|
2015-03-19 10:22:38 +00:00
|
|
|
cfg_pcu_dl_tbf_idle_time_cmd,
|
|
|
|
"dl-tbf-idle-time <1-5000>",
|
|
|
|
IDLE_TIME_STR "idle time in msec")
|
|
|
|
{
|
2019-09-09 11:41:00 +00:00
|
|
|
vty_out(vty, "%% 'dl-tbf-idle-time' is now deprecated: use 'timer X2031 <val>' instead%s", VTY_NEWLINE);
|
2015-03-19 10:22:38 +00:00
|
|
|
|
2021-01-14 11:01:42 +00:00
|
|
|
if (osmo_tdef_set(the_pcu->T_defs, -2031, atoi(argv[0]), OSMO_TDEF_MS) < 0)
|
2019-09-09 11:41:00 +00:00
|
|
|
return CMD_WARNING;
|
2015-03-19 10:22:38 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2019-09-09 11:41:00 +00:00
|
|
|
DEFUN_DEPRECATED(cfg_pcu_no_dl_tbf_idle_time,
|
2015-03-19 10:22:38 +00:00
|
|
|
cfg_pcu_no_dl_tbf_idle_time_cmd,
|
|
|
|
"no dl-tbf-idle-time",
|
|
|
|
NO_STR IDLE_TIME_STR)
|
|
|
|
{
|
2019-09-09 11:41:00 +00:00
|
|
|
vty_out(vty, "%% 'no dl-tbf-idle-time' is now deprecated: use 'timer X2031 0' instead%s", VTY_NEWLINE);
|
2015-03-19 10:22:38 +00:00
|
|
|
|
2021-01-14 11:01:42 +00:00
|
|
|
if (osmo_tdef_set(the_pcu->T_defs, -2031, 0, OSMO_TDEF_MS) < 0)
|
2019-09-09 11:41:00 +00:00
|
|
|
return CMD_WARNING;
|
2015-03-19 10:22:38 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2019-09-05 13:12:20 +00:00
|
|
|
#define RETRANSMISSION_STR "retransmit blocks even before the MS had a chance to receive them (better throughput," \
|
|
|
|
" less readable traces)"
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_dl_tbf_preemptive_retransmission,
|
|
|
|
cfg_pcu_dl_tbf_preemptive_retransmission_cmd,
|
|
|
|
"dl-tbf-preemptive-retransmission",
|
|
|
|
RETRANSMISSION_STR " (enabled by default)",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2019-09-05 13:12:20 +00:00
|
|
|
{
|
2021-01-14 11:56:58 +00:00
|
|
|
the_pcu->vty.dl_tbf_preemptive_retransmission = true;
|
2019-09-05 13:12:20 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_no_dl_tbf_preemptive_retransmission,
|
|
|
|
cfg_pcu_no_dl_tbf_preemptive_retransmission_cmd,
|
|
|
|
"no dl-tbf-preemptive-retransmission",
|
|
|
|
NO_STR RETRANSMISSION_STR,
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2019-09-05 13:12:20 +00:00
|
|
|
{
|
2021-01-14 11:56:58 +00:00
|
|
|
the_pcu->vty.dl_tbf_preemptive_retransmission = false;
|
2019-09-05 13:12:20 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2015-05-28 14:11:19 +00:00
|
|
|
#define MS_IDLE_TIME_STR "keep an idle MS object alive for the time given\n"
|
2019-09-09 11:19:06 +00:00
|
|
|
DEFUN_DEPRECATED(cfg_pcu_ms_idle_time,
|
2015-05-28 14:11:19 +00:00
|
|
|
cfg_pcu_ms_idle_time_cmd,
|
|
|
|
"ms-idle-time <1-7200>",
|
|
|
|
MS_IDLE_TIME_STR "idle time in sec")
|
|
|
|
{
|
2019-09-09 11:19:06 +00:00
|
|
|
vty_out(vty, "%% 'ms-idle-time' is now deprecated: use 'timer X2030 <val>' instead%s", VTY_NEWLINE);
|
2021-01-14 11:01:42 +00:00
|
|
|
if (osmo_tdef_set(the_pcu->T_defs, -2030, atoi(argv[0]), OSMO_TDEF_S) < 0)
|
2019-09-09 11:19:06 +00:00
|
|
|
return CMD_WARNING;
|
2015-05-28 14:11:19 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2019-09-09 11:19:06 +00:00
|
|
|
DEFUN_DEPRECATED(cfg_pcu_no_ms_idle_time,
|
2015-05-28 14:11:19 +00:00
|
|
|
cfg_pcu_no_ms_idle_time_cmd,
|
|
|
|
"no ms-idle-time",
|
|
|
|
NO_STR MS_IDLE_TIME_STR)
|
|
|
|
{
|
2019-09-09 11:19:06 +00:00
|
|
|
vty_out(vty, "%% 'no ms-idle-time' is now deprecated: use 'timer X2030 0' instead%s", VTY_NEWLINE);
|
2021-01-14 11:01:42 +00:00
|
|
|
if (osmo_tdef_set(the_pcu->T_defs, -2030, 0, OSMO_TDEF_S) < 0)
|
2019-09-09 11:19:06 +00:00
|
|
|
return CMD_WARNING;
|
2015-05-28 14:11:19 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2019-11-28 16:00:44 +00:00
|
|
|
#define CS_ERR_LIMITS_STR "set thresholds for error rate based downlink (M)CS adjustment\n"
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_cs_err_limits,
|
|
|
|
cfg_pcu_cs_err_limits_cmd,
|
|
|
|
"cs threshold <0-100> <0-100>",
|
|
|
|
CS_STR CS_ERR_LIMITS_STR "lower limit in %\n" "upper limit in %\n",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-06-04 13:12:10 +00:00
|
|
|
{
|
|
|
|
uint8_t lower_limit = atoi(argv[0]);
|
|
|
|
uint8_t upper_limit = atoi(argv[1]);
|
|
|
|
|
|
|
|
if (lower_limit > upper_limit) {
|
|
|
|
vty_out(vty,
|
|
|
|
"The lower limit must be less than or equal to the "
|
|
|
|
"upper limit.%s", VTY_NEWLINE);
|
|
|
|
return CMD_WARNING;
|
|
|
|
}
|
|
|
|
|
2021-01-14 12:17:01 +00:00
|
|
|
the_pcu->vty.cs_adj_enabled = true;
|
|
|
|
the_pcu->vty.cs_adj_upper_limit = upper_limit;
|
|
|
|
the_pcu->vty.cs_adj_lower_limit = lower_limit;
|
2015-06-04 13:12:10 +00:00
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_no_cs_err_limits,
|
|
|
|
cfg_pcu_no_cs_err_limits_cmd,
|
|
|
|
"no cs threshold",
|
|
|
|
NO_STR CS_STR CS_ERR_LIMITS_STR,
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-06-04 13:12:10 +00:00
|
|
|
{
|
2021-01-14 12:17:01 +00:00
|
|
|
the_pcu->vty.cs_adj_enabled = false;
|
|
|
|
the_pcu->vty.cs_adj_upper_limit = 100;
|
|
|
|
the_pcu->vty.cs_adj_lower_limit = 0;
|
2015-06-04 13:12:10 +00:00
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2019-11-28 16:00:44 +00:00
|
|
|
#define CS_DOWNGRADE_STR "set threshold for data size based downlink (M)CS downgrade\n"
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_cs_downgrade_thrsh,
|
|
|
|
cfg_pcu_cs_downgrade_thrsh_cmd,
|
|
|
|
"cs downgrade-threshold <1-10000>",
|
|
|
|
CS_STR CS_DOWNGRADE_STR "downgrade if less octets left\n",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-06-12 08:52:34 +00:00
|
|
|
{
|
2021-01-14 12:20:55 +00:00
|
|
|
the_pcu->vty.cs_downgrade_threshold = atoi(argv[0]);
|
2015-06-12 08:52:34 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_no_cs_downgrade_thrsh,
|
|
|
|
cfg_pcu_no_cs_downgrade_thrsh_cmd,
|
|
|
|
"no cs downgrade-threshold",
|
|
|
|
NO_STR CS_STR CS_DOWNGRADE_STR,
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-06-12 08:52:34 +00:00
|
|
|
{
|
2021-01-14 12:20:55 +00:00
|
|
|
the_pcu->vty.cs_downgrade_threshold = 0;
|
2015-06-12 08:52:34 +00:00
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_cs_lqual_ranges,
|
|
|
|
cfg_pcu_cs_lqual_ranges_cmd,
|
|
|
|
"cs link-quality-ranges cs1 <0-35> cs2 <0-35> <0-35> cs3 <0-35> <0-35> cs4 <0-35>",
|
|
|
|
CS_STR "Set link quality ranges for each uplink CS\n"
|
|
|
|
"Set quality range for CS-1 (high value only)\n"
|
|
|
|
"CS-1 high (dB)\n"
|
|
|
|
"Set quality range for CS-2\n"
|
|
|
|
"CS-2 low (dB)\n"
|
|
|
|
"CS-2 high (dB)\n"
|
|
|
|
"Set quality range for CS-3\n"
|
|
|
|
"CS-3 low (dB)\n"
|
|
|
|
"CS-3 high (dB)\n"
|
|
|
|
"Set quality range for CS-4 (low value only)\n"
|
|
|
|
"CS-4 low (dB)\n",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2015-06-09 07:44:36 +00:00
|
|
|
{
|
|
|
|
uint8_t cs1_high = atoi(argv[0]);
|
|
|
|
uint8_t cs2_low = atoi(argv[1]);
|
|
|
|
uint8_t cs2_high = atoi(argv[2]);
|
|
|
|
uint8_t cs3_low = atoi(argv[3]);
|
|
|
|
uint8_t cs3_high = atoi(argv[4]);
|
|
|
|
uint8_t cs4_low = atoi(argv[5]);
|
|
|
|
|
2021-01-14 12:30:04 +00:00
|
|
|
the_pcu->vty.cs_lqual_ranges[0].high = cs1_high;
|
|
|
|
the_pcu->vty.cs_lqual_ranges[1].low = cs2_low;
|
|
|
|
the_pcu->vty.cs_lqual_ranges[1].high = cs2_high;
|
|
|
|
the_pcu->vty.cs_lqual_ranges[2].low = cs3_low;
|
|
|
|
the_pcu->vty.cs_lqual_ranges[2].high = cs3_high;
|
|
|
|
the_pcu->vty.cs_lqual_ranges[3].low = cs4_low;
|
2015-06-09 07:44:36 +00:00
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_mcs_lqual_ranges,
|
|
|
|
cfg_pcu_mcs_lqual_ranges_cmd,
|
|
|
|
"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>",
|
|
|
|
CS_STR "Set link quality ranges for each uplink MCS\n"
|
|
|
|
"Set quality range for MCS-1 (high value only)\n"
|
|
|
|
"MCS-1 high (dB)\n"
|
|
|
|
"Set quality range for MCS-2\n"
|
|
|
|
"MCS-2 high (dB)\n"
|
|
|
|
"MCS-2 low (dB)\n"
|
|
|
|
"Set quality range for MCS-3\n"
|
|
|
|
"MCS-3 high (dB)\n"
|
|
|
|
"MCS-3 low (dB)\n"
|
|
|
|
"Set quality range for MCS-4\n"
|
|
|
|
"MCS-4 high (dB)\n"
|
|
|
|
"MCS-4 low (dB)\n"
|
|
|
|
"Set quality range for MCS-5\n"
|
|
|
|
"MCS-5 high (dB)\n"
|
|
|
|
"MCS-5 low (dB)\n"
|
|
|
|
"Set quality range for MCS-6\n"
|
|
|
|
"MCS-6 low (dB)\n"
|
|
|
|
"MCS-6 high (dB)\n"
|
|
|
|
"Set quality range for MCS-7\n"
|
|
|
|
"MCS-7 low (dB)\n"
|
|
|
|
"MCS-7 high (dB)\n"
|
|
|
|
"Set quality range for MCS-8\n"
|
|
|
|
"MCS-8 low (dB)\n"
|
|
|
|
"MCS-8 high (dB)\n"
|
|
|
|
"Set quality range for MCS-9 (low value only)\n"
|
|
|
|
"MCS-9 low (dB)\n",
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2017-08-16 13:50:06 +00:00
|
|
|
{
|
2021-01-14 12:30:04 +00:00
|
|
|
the_pcu->vty.mcs_lqual_ranges[0].high = atoi(argv[0]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[1].low = atoi(argv[1]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[1].high = atoi(argv[2]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[2].low = atoi(argv[3]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[2].high = atoi(argv[4]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[3].low = atoi(argv[5]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[3].high = atoi(argv[6]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[4].low = atoi(argv[7]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[4].high = atoi(argv[8]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[5].low = atoi(argv[9]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[5].high = atoi(argv[10]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[6].low = atoi(argv[11]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[6].high = atoi(argv[12]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[7].low = atoi(argv[13]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[7].high = atoi(argv[14]);
|
|
|
|
the_pcu->vty.mcs_lqual_ranges[8].low = atoi(argv[15]);
|
2017-08-16 13:50:06 +00:00
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2017-08-08 13:03:50 +00:00
|
|
|
DEFUN(cfg_pcu_sock,
|
|
|
|
cfg_pcu_sock_cmd,
|
|
|
|
"pcu-socket PATH",
|
|
|
|
"Configure the osmo-bts PCU socket file/path name\n"
|
|
|
|
"Path of the socket to connect to\n")
|
|
|
|
{
|
2019-11-30 13:13:25 +00:00
|
|
|
if (vty->type != VTY_FILE)
|
|
|
|
vty_out(vty, "Changing PCU socket path at run-time has no effect%s", VTY_NEWLINE);
|
|
|
|
|
Split PCU global PCU object from BTS object
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold
both PCU global fields and BTS specific fields, all mangled together.
The BTS is even accessed in lots of places by means of a singleton.
This patch introduces a new struct gprs_pcu object aimed at holding all
global state, and several fields are already moved from BTS to it. The
new object can be accessed as global variable "the_pcu", reusing and
including an already exisitng "the_pcu" global variable only used for
bssgp related purposes so far.
This is only a first step towards having a complete split global pcu and
BTS, some fields are still kept in BTS and will be moved over follow-up
smaller patches in the future (since this patch is already quite big).
So far, the code still only supports one BTS, which can be accessed
using the_pcu->bts. In the future that field will be replaced with a
list, and the BTS singletons will be removed.
The cur_fn output changes in TbfTest are actually a side effect fix,
since the singleton main_bts() now points internally to the_pcu->bts,
hence the same we allocate and assign in the test. Beforehand, "the_bts"
was allocated in the stack while main_bts() still returned an unrelated
singleton BTS object instance.
Related: OS#4935
Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2021-01-13 17:54:38 +00:00
|
|
|
osmo_talloc_replace_string(tall_pcu_ctx, &the_pcu->pcu_sock_path, argv[0]);
|
2017-08-08 13:03:50 +00:00
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
2015-06-09 07:44:36 +00:00
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_USRATTR(cfg_pcu_gb_dialect,
|
|
|
|
cfg_pcu_gb_dialect_cmd,
|
|
|
|
X(PCU_VTY_ATTR_NS_RESET),
|
|
|
|
"gb-dialect (classic|ip-sns)",
|
|
|
|
"Select which Gb interface dialect to use\n"
|
|
|
|
"Classic Gb interface with NS-{RESET,BLOCK,UNBLOCK} and static configuration\n"
|
|
|
|
"Modern Gb interface with IP-SNS (Sub Network Service) and dynamic configuration\n")
|
2018-07-05 01:11:17 +00:00
|
|
|
{
|
2020-09-16 19:52:02 +00:00
|
|
|
if (!strcmp(argv[0], "ip-sns")) {
|
2021-01-25 19:28:38 +00:00
|
|
|
the_pcu->vty.ns_dialect = GPRS_NS2_DIALECT_SNS;
|
2020-09-16 19:52:02 +00:00
|
|
|
} else {
|
2021-01-25 19:28:38 +00:00
|
|
|
the_pcu->vty.ns_dialect = GPRS_NS2_DIALECT_IPACCESS;
|
2020-09-16 19:52:02 +00:00
|
|
|
}
|
2018-07-05 01:11:17 +00:00
|
|
|
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2021-04-29 20:02:47 +00:00
|
|
|
DEFUN_USRATTR(cfg_pcu_gb_ip_dscp,
|
|
|
|
cfg_pcu_gb_ip_dscp_cmd,
|
|
|
|
X(PCU_VTY_ATTR_NS_RESET),
|
|
|
|
"gb ip-dscp <0-63>",
|
|
|
|
"Configure Gb interface\n"
|
|
|
|
"Set IP DSCP value for outbound packets\n"
|
|
|
|
"IP DSCP value to use\n")
|
|
|
|
{
|
|
|
|
the_pcu->vty.ns_ip_dscp = atoi(argv[0]);
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFUN_USRATTR(cfg_pcu_gb_priority,
|
|
|
|
cfg_pcu_gb_priority_cmd,
|
|
|
|
X(PCU_VTY_ATTR_NS_RESET),
|
|
|
|
"gb socket-priority <0-255>",
|
|
|
|
"Configure Gb interface\n"
|
|
|
|
"Set socket priority value for outbound packets\n"
|
|
|
|
"Socket priority value to use (>6 requires CAP_NET_ADMIN)")
|
|
|
|
{
|
|
|
|
the_pcu->vty.ns_priority = atoi(argv[0]);
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
Introduce NACC support
A new nacc_fsm is introduced per MS object, with its partner priv
structure struct nacc_fsm_ctx, which exists and is available in the MS
object only during the duration of the NACC procedure.
The NACC context is created on an MS whenever a Pkt Cell Change
Notification is received on Uplink RLCMAC, which asks for neighbor
information of a given ARFCN+BSIC.
First, the target ARFCN+BSIC needs to be translated into a CGI-PS
(RAC+CI) address. That's done by asking the BSC through the Neighbour
Resolution Service available in osmo-bsc using the CTRL interface.
Once the CGI-PS of the target cell is known, PCU starts a RIM RAN-INFO
request against the SGSN (which will route the request as needed), and
wait for a response containing the SI bits from the target cell.
After the SI are received, the scheduler is instructed to eventually
poll a TBF for the MS originating the CCN, so that we can send the SI
encapsulated into multiple Packet Neighbor Cell Data messages on the
downlink.
One all the SI bits are sent, the scheduler is instructed to send a
Packet Cell Change Continue message.
Once the message above has been sent, the FSM autodestroys itself.
Caches are also introduced in this patch which allows for re-using
recently known translations ARFCN+BSIC -> CGI-PS and CGI-PS -> SI_INFO
respectively.
Change-Id: Id35f40d05f3e081f32fddbf1fa34cb338db452ca
2021-01-21 17:46:13 +00:00
|
|
|
DEFUN(cfg_neighbor_resolution, cfg_neighbor_resolution_cmd,
|
|
|
|
"neighbor resolution " VTY_IPV46_CMD " [<0-65535>]",
|
|
|
|
"Manage local and remote-BSS neighbor cells\n"
|
|
|
|
"Connect to Neighbor Resolution Service (CTRL interface) to given ip and port\n"
|
|
|
|
"IPv4 address to connect to\n" "IPv6 address to connect to\n"
|
|
|
|
"Port to connect to (default 4248)\n")
|
|
|
|
{
|
Support Neighbor Address Resolution over PCUIF IPA multiplex
While NACC was initially developed, it became clear there was need for
a way to interact PCU<->BSC in order resolve ARFCN+BSIC into CGI-PS
for later RIM usage.
Hence, this resolution was first (until today) implemented using an out
of bands RPC system using the CTRL interface, which required specific
config to be written and matches in osmo-pcu and osmo-bsc VTY (ip+port
of the CTRL interface to use).
However, this has several shortcomings:
* As explained above, specific configuration is required
* Since recently, we do support BSC redundancy in osmo-bts. Hence the BTS
may switch to a BSC other than first one. If that happened, that'd mean
the CTRL interface would still point to the initially configured one,
which may not be the same currently serving the PCU.
During recent development of ANR related features, a similar need for
PCU<->BSC was required, but this time it was decided to extend the IPA
multiplex of the Abis OML connection to pass PCUIF messages,
transparently forwarded to each side by the BTS.
This has the advantage that connection PCU<->BTS is handled by BTS and
both sides send messages transparently.
Let's switch by default to using this new interface, while still
maintaing the old way for a while (announcing them as deprecated) to
avoid breaking existing deployments until they are upgraded to new
versions of osmo-pcu and osmo-bsc.
Related: SYS#4971
Change-Id: I6ad33c7ab10202840cf804dea9ba595978d0e920
2021-09-07 12:09:50 +00:00
|
|
|
vty_out(vty, "%% Warning: The CTRL interface for Neighbor Address Resolution is now deprecated."
|
|
|
|
"Upgrade osmo-bsc and drop the 'neighbor resolution " VTY_IPV46_CMD " [<0-65535>]' VTY "
|
|
|
|
"option in order to let osmo-pcu use the new resoluton method using the PCUIF over IPA "
|
|
|
|
"multiplex, which will work out of the box without required configuration.%s", VTY_NEWLINE);
|
Introduce NACC support
A new nacc_fsm is introduced per MS object, with its partner priv
structure struct nacc_fsm_ctx, which exists and is available in the MS
object only during the duration of the NACC procedure.
The NACC context is created on an MS whenever a Pkt Cell Change
Notification is received on Uplink RLCMAC, which asks for neighbor
information of a given ARFCN+BSIC.
First, the target ARFCN+BSIC needs to be translated into a CGI-PS
(RAC+CI) address. That's done by asking the BSC through the Neighbour
Resolution Service available in osmo-bsc using the CTRL interface.
Once the CGI-PS of the target cell is known, PCU starts a RIM RAN-INFO
request against the SGSN (which will route the request as needed), and
wait for a response containing the SI bits from the target cell.
After the SI are received, the scheduler is instructed to eventually
poll a TBF for the MS originating the CCN, so that we can send the SI
encapsulated into multiple Packet Neighbor Cell Data messages on the
downlink.
One all the SI bits are sent, the scheduler is instructed to send a
Packet Cell Change Continue message.
Once the message above has been sent, the FSM autodestroys itself.
Caches are also introduced in this patch which allows for re-using
recently known translations ARFCN+BSIC -> CGI-PS and CGI-PS -> SI_INFO
respectively.
Change-Id: Id35f40d05f3e081f32fddbf1fa34cb338db452ca
2021-01-21 17:46:13 +00:00
|
|
|
osmo_talloc_replace_string(the_pcu, &the_pcu->vty.neigh_ctrl_addr, argv[0]);
|
|
|
|
if (argc > 1)
|
|
|
|
the_pcu->vty.neigh_ctrl_port = atoi(argv[1]);
|
|
|
|
else
|
|
|
|
the_pcu->vty.neigh_ctrl_port = OSMO_CTRL_PORT_BSC_NEIGH;
|
|
|
|
return CMD_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-09-05 12:48:35 +00:00
|
|
|
DEFUN(show_bts_timer, show_bts_timer_cmd,
|
|
|
|
"show bts-timer " OSMO_TDEF_VTY_ARG_T_OPTIONAL,
|
|
|
|
SHOW_STR "Show BTS controlled timers\n"
|
|
|
|
OSMO_TDEF_VTY_DOC_T)
|
|
|
|
{
|
2021-01-18 16:14:14 +00:00
|
|
|
struct gprs_rlcmac_bts *bts;
|
|
|
|
llist_for_each_entry(bts, &the_pcu->bts_list, list) {
|
|
|
|
const char *T_arg = argc > 0 ? argv[0] : NULL;
|
|
|
|
vty_out(vty, "BTS%" PRIu8 ":%s", bts->nr, VTY_NEWLINE);
|
|
|
|
osmo_tdef_vty_show_cmd(vty, bts->T_defs_bts, T_arg, " ");
|
|
|
|
}
|
|
|
|
return CMD_SUCCESS;
|
2019-09-05 12:48:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DEFUN(show_timer, show_timer_cmd,
|
|
|
|
"show timer " OSMO_TDEF_VTY_ARG_T_OPTIONAL,
|
|
|
|
SHOW_STR "Show PCU timers\n"
|
|
|
|
OSMO_TDEF_VTY_DOC_T)
|
|
|
|
{
|
|
|
|
const char *T_arg = argc > 0 ? argv[0] : NULL;
|
2021-01-14 11:01:42 +00:00
|
|
|
return osmo_tdef_vty_show_cmd(vty, the_pcu->T_defs, T_arg, NULL);
|
2019-09-05 12:48:35 +00:00
|
|
|
}
|
|
|
|
|
2020-09-29 21:31:33 +00:00
|
|
|
DEFUN_ATTR(cfg_pcu_timer, cfg_pcu_timer_cmd,
|
|
|
|
"timer " OSMO_TDEF_VTY_ARG_SET_OPTIONAL,
|
|
|
|
"Configure or show PCU timers\n"
|
|
|
|
OSMO_TDEF_VTY_DOC_SET,
|
|
|
|
CMD_ATTR_IMMEDIATE)
|
2019-09-05 12:48:35 +00:00
|
|
|
{
|
2021-01-26 16:51:44 +00:00
|
|
|
int rc;
|
|
|
|
struct osmo_tdef *t;
|
2019-09-05 12:48:35 +00:00
|
|
|
/* If any arguments are missing, redirect to 'show' */
|
|
|
|
if (argc < 2)
|
|
|
|
return show_timer(self, vty, argc, argv);
|
2021-01-26 16:51:44 +00:00
|
|
|
if ((rc = osmo_tdef_vty_set_cmd(vty, the_pcu->T_defs, argv)) != CMD_SUCCESS)
|
|
|
|
return rc;
|
|
|
|
t = osmo_tdef_vty_parse_T_arg(vty, the_pcu->T_defs, argv[0]);
|
|
|
|
switch (t->T) {
|
|
|
|
case PCU_TDEF_NEIGH_CACHE_ALIVE:
|
|
|
|
neigh_cache_set_keep_time_interval(the_pcu->neigh_cache, t->val);
|
|
|
|
break;
|
|
|
|
case PCU_TDEF_SI_CACHE_ALIVE:
|
|
|
|
si_cache_set_keep_time_interval(the_pcu->si_cache, t->val);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return CMD_SUCCESS;
|
2019-09-05 12:48:35 +00:00
|
|
|
}
|
|
|
|
|
2014-01-15 16:06:51 +00:00
|
|
|
DEFUN(show_tbf,
|
|
|
|
show_tbf_cmd,
|
2018-02-01 15:07:33 +00:00
|
|
|
"show tbf (all|ccch|pacch)",
|
|
|
|
SHOW_STR "information about TBFs\n"
|
|
|
|
"All TBFs\n"
|
|
|
|
"TBFs allocated via CCCH\n"
|
|
|
|
"TBFs allocated via PACCH\n")
|
2014-01-15 16:06:51 +00:00
|
|
|
{
|
2021-01-18 16:14:14 +00:00
|
|
|
struct gprs_rlcmac_bts *bts;
|
|
|
|
llist_for_each_entry(bts, &the_pcu->bts_list, list) {
|
|
|
|
uint32_t flags = UINT32_MAX;
|
2018-02-01 15:07:33 +00:00
|
|
|
|
2021-01-18 16:14:14 +00:00
|
|
|
if (argv[0][0] == 'c')
|
|
|
|
flags = (1 << GPRS_RLCMAC_FLAG_CCCH);
|
|
|
|
else if (argv[0][0] == 'p')
|
|
|
|
flags = (1 << GPRS_RLCMAC_FLAG_PACCH);
|
2018-02-01 15:07:33 +00:00
|
|
|
|
2021-01-18 16:14:14 +00:00
|
|
|
pcu_vty_show_tbf_all(vty, bts, flags);
|
|
|
|
}
|
|
|
|
return CMD_SUCCESS;
|
2014-01-15 16:06:51 +00:00
|
|
|
}
|
2013-10-27 08:02:31 +00:00
|
|
|
|
2015-06-04 08:23:24 +00:00
|
|
|
DEFUN(show_ms_all,
|
|
|
|
show_ms_all_cmd,
|
|
|
|
"show ms all",
|
|
|
|
SHOW_STR "information about MSs\n" "All TBFs\n")
|
|
|
|
{
|
2021-01-18 16:14:14 +00:00
|
|
|
struct gprs_rlcmac_bts *bts;
|
|
|
|
llist_for_each_entry(bts, &the_pcu->bts_list, list) {
|
|
|
|
pcu_vty_show_ms_all(vty, bts);
|
|
|
|
}
|
|
|
|
return CMD_SUCCESS;
|
2015-06-04 08:23:24 +00:00
|
|
|
}
|
|
|
|
|
2015-06-05 14:33:33 +00:00
|
|
|
DEFUN(show_ms_tlli,
|
|
|
|
show_ms_tlli_cmd,
|
|
|
|
"show ms tlli TLLI",
|
|
|
|
SHOW_STR "information about MSs\n" "Select MS by TLLI\n" "TLLI as hex\n")
|
|
|
|
{
|
2021-01-18 16:14:14 +00:00
|
|
|
struct gprs_rlcmac_bts *bts;
|
|
|
|
llist_for_each_entry(bts, &the_pcu->bts_list, list) {
|
|
|
|
char *endp = NULL;
|
|
|
|
unsigned long long tlli = strtoll(argv[0], &endp, 16);
|
|
|
|
if ((endp != NULL && *endp != 0) || tlli > 0xffffffffULL) {
|
|
|
|
vty_out(vty, "Invalid TLLI.%s", VTY_NEWLINE);
|
|
|
|
return CMD_WARNING;
|
|
|
|
}
|
|
|
|
pcu_vty_show_ms_by_tlli(vty, bts, (uint32_t)tlli);
|
2015-06-05 14:33:33 +00:00
|
|
|
}
|
2021-01-18 16:14:14 +00:00
|
|
|
return CMD_SUCCESS;
|
2015-06-05 14:33:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DEFUN(show_ms_imsi,
|
|
|
|
show_ms_imsi_cmd,
|
|
|
|
"show ms imsi IMSI",
|
|
|
|
SHOW_STR "information about MSs\n" "Select MS by IMSI\n" "IMSI\n")
|
|
|
|
{
|
2021-01-18 16:14:14 +00:00
|
|
|
struct gprs_rlcmac_bts *bts;
|
|
|
|
llist_for_each_entry(bts, &the_pcu->bts_list, list) {
|
|
|
|
pcu_vty_show_ms_by_imsi(vty, bts, argv[0]);
|
|
|
|
}
|
|
|
|
return CMD_SUCCESS;
|
2015-06-05 14:33:33 +00:00
|
|
|
}
|
|
|
|
|
2012-07-12 12:31:57 +00:00
|
|
|
static const char pcu_copyright[] =
|
2013-01-17 11:24:29 +00:00
|
|
|
"Copyright (C) 2012 by Ivan Kluchnikov <kluchnikovi@gmail.com> and \r\n"
|
|
|
|
" Andreas Eversberg <jolly@eversberg.eu>\r\n"
|
2012-07-12 12:31:57 +00:00
|
|
|
"License GNU GPL version 2 or later\r\n"
|
|
|
|
"This is free software: you are free to change and redistribute it.\r\n"
|
|
|
|
"There is NO WARRANTY, to the extent permitted by law.\r\n";
|
|
|
|
|
|
|
|
struct vty_app_info pcu_vty_info = {
|
2019-11-29 12:37:45 +00:00
|
|
|
.name = "OsmoPCU",
|
2012-07-12 12:31:57 +00:00
|
|
|
.version = PACKAGE_VERSION,
|
|
|
|
.copyright = pcu_copyright,
|
2020-09-29 21:31:33 +00:00
|
|
|
.usr_attr_desc = {
|
|
|
|
[PCU_VTY_ATTR_NEW_TBF] = \
|
|
|
|
"This command applies when a new TBF is begins",
|
|
|
|
[PCU_VTY_ATTR_NEW_SUBSCR] = \
|
|
|
|
"This command applies when a new subscriber attaches",
|
|
|
|
[PCU_VTY_ATTR_NS_RESET] = \
|
|
|
|
"This command applies when the NS is reset",
|
|
|
|
},
|
|
|
|
.usr_attr_letters = {
|
|
|
|
[PCU_VTY_ATTR_NEW_TBF] = 'n',
|
|
|
|
[PCU_VTY_ATTR_NEW_SUBSCR] = 's',
|
|
|
|
[PCU_VTY_ATTR_NS_RESET] = 'r',
|
|
|
|
},
|
2012-07-12 12:31:57 +00:00
|
|
|
};
|
|
|
|
|
2019-08-05 12:30:44 +00:00
|
|
|
int pcu_vty_init(void)
|
2012-07-12 12:31:57 +00:00
|
|
|
{
|
|
|
|
// install_element_ve(&show_pcu_cmd);
|
|
|
|
|
2017-07-21 19:56:23 +00:00
|
|
|
cfg_pcu_gsmtap_categ_cmd.string = vty_cmd_string_from_valstr(tall_pcu_ctx, pcu_gsmtap_categ_names,
|
|
|
|
"gsmtap-category (",
|
|
|
|
"|",")", VTY_DO_LOWER);
|
|
|
|
cfg_pcu_gsmtap_categ_cmd.doc = vty_cmd_string_from_valstr(tall_pcu_ctx, pcu_gsmtap_categ_help,
|
|
|
|
"GSMTAP Category\n",
|
|
|
|
"\n", "", 0);
|
|
|
|
cfg_pcu_no_gsmtap_categ_cmd.string = vty_cmd_string_from_valstr(tall_pcu_ctx, pcu_gsmtap_categ_names,
|
|
|
|
"no gsmtap-category (",
|
|
|
|
"|",")", VTY_DO_LOWER);
|
|
|
|
cfg_pcu_no_gsmtap_categ_cmd.doc = vty_cmd_string_from_valstr(tall_pcu_ctx, pcu_gsmtap_categ_help,
|
|
|
|
NO_STR "GSMTAP Category\n",
|
|
|
|
"\n", "", 0);
|
|
|
|
|
2019-08-05 12:30:44 +00:00
|
|
|
logging_vty_add_cmds();
|
|
|
|
osmo_stats_vty_add_cmds();
|
2020-02-06 09:46:17 +00:00
|
|
|
osmo_talloc_vty_add_cmds();
|
2021-02-05 22:22:37 +00:00
|
|
|
osmo_fsm_vty_add_cmds();
|
2012-07-12 12:31:57 +00:00
|
|
|
|
2012-07-20 19:50:31 +00:00
|
|
|
install_node(&pcu_node, config_write_pcu);
|
|
|
|
install_element(CONFIG_NODE, &cfg_pcu_cmd);
|
2015-09-28 16:12:57 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_egprs_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_egprs_cmd);
|
2012-09-23 04:41:21 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_two_phase_cmd);
|
2012-07-20 19:50:31 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_cs_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_cs_cmd);
|
2015-06-04 17:04:30 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_cs_max_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_cs_max_cmd);
|
2015-06-04 13:12:10 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_cs_err_limits_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_cs_err_limits_cmd);
|
2015-06-12 08:52:34 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_cs_downgrade_thrsh_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_cs_downgrade_thrsh_cmd);
|
2015-06-09 07:44:36 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_cs_lqual_ranges_cmd);
|
2017-08-16 13:50:06 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_mcs_lqual_ranges_cmd);
|
2016-02-02 15:02:16 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_mcs_cmd);
|
2016-08-22 11:51:10 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_dl_arq_cmd);
|
2016-02-02 15:02:16 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_mcs_cmd);
|
2016-01-07 10:48:28 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_mcs_max_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_mcs_max_cmd);
|
2016-01-19 14:53:30 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_window_size_cmd);
|
2012-07-21 09:09:58 +00:00
|
|
|
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);
|
2015-03-20 11:02:42 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_queue_hysteresis_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_queue_hysteresis_cmd);
|
llc: Use CoDel to drop packages from the LLC queue
Currently packets are only dropped if they have reached their maximum
life time. This leads to LLC queues being constantly filled under
load, increasing the latency up to the maximum life time. This kind
of bufferbloat hinders TCP's congestion avoidance algorithms. To keep
the queues short, the CoDel active queue management algorithm can be
used.
This commit changes to llc_dequeue method to apply the CoDel
algorithm to selectively drop LLC frames before they passed to the
TBF layer to be encoded in BSNs. This feature is currently disabled
by default.
The CoDel state is managed per MS since the LLC queues are also kept
in the MS objects.
Note that there is still some buffering in the TBF objects, in the
worst case (CS4) 3.5kByte + LLC-MTU octets are stored there. The
resulting additional packet delay is not (yet) taken into account for
CoDel.
Also note that configuration changes are applied to new MS objects
only.
The following VTY commands are added to the 'pcu' node:
- queue codel activates CoDel, the interval is selected by
the implementation
- queue codel interval <1-1000>
activates CoDel with a fixed interval given
in centiseconds (10ms-10s)
- no queue codel deactivates CoDel
Which interval value to use is still an open issue. For high speed
links (e.g. Ethernet), CoDel suggests 100ms. For slower links, the
expected RTT is recommended. The current implementation uses a
default value of 2000ms.
Measurements:
Note that the following measurements depend on several other factors,
most notably the interaction with the SGSN's flow control. They are
just examples to give an idea how CoDel might influence some
parameters.
The measurements have been done with a single E71, first with a
running ping only (Idle), then with an additional TCP download
of a 360k file (Busy). The CoDel interval was set to 1s.
- Idle :
ping ~400ms, avg queue delay 0ms, dropped 0
- Busy, No CoDel:
ping ~6s, avg queue delay 4-6s,
dropped 0, scheduled 948, duration 54s
- Busy, CoDel:
ping 500-1500ms, avg queue delay ~600ms,
dropped 77, scheduled 1040, duration 60s
More measurements with two MS downloading in parallel (two
independant measurements per case).
- Busy, No CoDel:
dropped 0, scheduled 1883, duration 121s
dropped 19, scheduled 2003, duration 133s
- Busy, CoDel:
dropped 22, scheduled 1926, duration 116s
dropped 22, scheduled 1955, duration 108s
Sponsored-by: On-Waves ehf
2015-07-17 14:39:09 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_queue_codel_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_queue_codel_interval_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_queue_codel_cmd);
|
2015-04-02 11:58:09 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_queue_idle_ack_delay_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_queue_idle_ack_delay_cmd);
|
2012-07-22 06:58:09 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_alloc_cmd);
|
2012-08-07 14:00:56 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_two_phase_cmd);
|
2012-09-23 04:41:21 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_fc_interval_cmd);
|
2015-05-06 08:47:30 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_fc_bucket_time_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_fc_bucket_time_cmd);
|
2015-04-21 10:56:48 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_fc_bvc_bucket_size_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_fc_bvc_bucket_size_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_fc_bvc_leak_rate_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_fc_bvc_leak_rate_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_fc_ms_bucket_size_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_fc_ms_bucket_size_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_fc_ms_leak_rate_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_fc_ms_leak_rate_cmd);
|
2012-09-27 07:20:45 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_alpha_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_gamma_cmd);
|
2015-03-19 10:22:38 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_dl_tbf_idle_time_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_dl_tbf_idle_time_cmd);
|
2019-09-05 13:12:20 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_dl_tbf_preemptive_retransmission_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_dl_tbf_preemptive_retransmission_cmd);
|
2015-05-28 14:11:19 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_ms_idle_time_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_ms_idle_time_cmd);
|
2021-11-12 12:42:03 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_gsmtap_remote_host_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_gsmtap_remote_host_cmd);
|
|
|
|
install_element(PCU_NODE, &pcucfg_pcu_gsmtap_categ_all_cmd);
|
2017-07-21 19:56:23 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_gsmtap_categ_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_no_gsmtap_categ_cmd);
|
2017-08-08 13:03:50 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_sock_cmd);
|
2018-07-05 01:11:17 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_gb_dialect_cmd);
|
2021-04-29 20:02:47 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_gb_ip_dscp_cmd);
|
|
|
|
install_element(PCU_NODE, &cfg_pcu_gb_priority_cmd);
|
Introduce NACC support
A new nacc_fsm is introduced per MS object, with its partner priv
structure struct nacc_fsm_ctx, which exists and is available in the MS
object only during the duration of the NACC procedure.
The NACC context is created on an MS whenever a Pkt Cell Change
Notification is received on Uplink RLCMAC, which asks for neighbor
information of a given ARFCN+BSIC.
First, the target ARFCN+BSIC needs to be translated into a CGI-PS
(RAC+CI) address. That's done by asking the BSC through the Neighbour
Resolution Service available in osmo-bsc using the CTRL interface.
Once the CGI-PS of the target cell is known, PCU starts a RIM RAN-INFO
request against the SGSN (which will route the request as needed), and
wait for a response containing the SI bits from the target cell.
After the SI are received, the scheduler is instructed to eventually
poll a TBF for the MS originating the CCN, so that we can send the SI
encapsulated into multiple Packet Neighbor Cell Data messages on the
downlink.
One all the SI bits are sent, the scheduler is instructed to send a
Packet Cell Change Continue message.
Once the message above has been sent, the FSM autodestroys itself.
Caches are also introduced in this patch which allows for re-using
recently known translations ARFCN+BSIC -> CGI-PS and CGI-PS -> SI_INFO
respectively.
Change-Id: Id35f40d05f3e081f32fddbf1fa34cb338db452ca
2021-01-21 17:46:13 +00:00
|
|
|
install_element(PCU_NODE, &cfg_neighbor_resolution_cmd);
|
2019-09-05 12:48:35 +00:00
|
|
|
install_element(PCU_NODE, &cfg_pcu_timer_cmd);
|
2012-07-20 19:50:31 +00:00
|
|
|
|
2013-10-27 08:02:31 +00:00
|
|
|
install_element_ve(&show_bts_stats_cmd);
|
2020-09-22 15:01:31 +00:00
|
|
|
install_element_ve(&show_bts_pdch_cmd);
|
2014-01-15 16:06:51 +00:00
|
|
|
install_element_ve(&show_tbf_cmd);
|
2015-06-04 08:23:24 +00:00
|
|
|
install_element_ve(&show_ms_all_cmd);
|
2015-06-05 14:33:33 +00:00
|
|
|
install_element_ve(&show_ms_tlli_cmd);
|
|
|
|
install_element_ve(&show_ms_imsi_cmd);
|
2019-09-05 12:48:35 +00:00
|
|
|
install_element_ve(&show_bts_timer_cmd);
|
|
|
|
install_element_ve(&show_timer_cmd);
|
2013-10-27 08:02:31 +00:00
|
|
|
|
2012-07-12 12:31:57 +00:00
|
|
|
return 0;
|
|
|
|
}
|