falconia has uploaded this change for review.
RTP: add vty configuration for twjit
This patch is the first step in the series adding the ability to use
twrtp+twjit instead of Belledonne ortp. twjit requires vty config
for tunable parameters - add this config. Actual use of this added
config will happen in subsequent patches.
Related: OS#6474
Change-Id: I9ccd060fce8416e01356fccd9ae465a7298a9ce5
---
M include/osmo-bts/bts.h
M include/osmo-bts/vty.h
M src/common/bts.c
M src/common/vty.c
4 files changed, 30 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/64/42164/1
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index 8a5fb82..ec13d71 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -3,6 +3,7 @@
#include <osmocom/core/rate_ctr.h>
#include <osmocom/core/socket.h>
+#include <osmocom/netif/twjit.h>
#include <osmo-bts/gsm_data.h>
#include <osmo-bts/bts_trx.h>
#include <osmo-bts/osmux.h>
@@ -318,6 +319,7 @@
struct llist_head bsc_oml_hosts;
unsigned int rtp_jitter_buf_ms;
bool rtp_jitter_adaptive;
+ struct osmo_twjit_config *twjit_cfg;
uint16_t rtp_port_range_start;
uint16_t rtp_port_range_end;
diff --git a/include/osmo-bts/vty.h b/include/osmo-bts/vty.h
index d326c5c..a33ccbb 100644
--- a/include/osmo-bts/vty.h
+++ b/include/osmo-bts/vty.h
@@ -13,6 +13,7 @@
BTS_NODE,
TRX_NODE,
OSMUX_NODE,
+ TWJIT_NODE,
};
extern struct cmd_element cfg_bts_auto_band_cmd;
diff --git a/src/common/bts.c b/src/common/bts.c
index ea6b3d6..78ea417 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -337,7 +337,9 @@
/* configurable via VTY */
bts->paging_state = paging_init(bts, NUM_PAGING_MAX_DEFAULT, 0);
+ bts->rtp_jitter_buf_ms = 100;
bts->rtp_jitter_adaptive = false;
+ bts->twjit_cfg = osmo_twjit_config_alloc(bts);
bts->rtp_port_range_start = 16384;
bts->rtp_port_range_end = 17407;
bts->rtp_port_range_next = bts->rtp_port_range_start;
@@ -353,7 +355,6 @@
bts->bsic = 0xff; /* invalid value, guarded by bsc_configured=false */
bts->bsic_configured = false;
bts->load.ccch.load_ind_period = 112;
- bts->rtp_jitter_buf_ms = 100;
bts->max_ta = MAX_TA_DEF;
bts->ny1 = 4;
bts->ny2 = 4;
diff --git a/src/common/vty.c b/src/common/vty.c
index 62ebff2..461e92f 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -183,6 +183,12 @@
1,
};
+static struct cmd_node twjit_node = {
+ TWJIT_NODE,
+ "%s(twjit)# ",
+ 1,
+};
+
gDEFUN(cfg_bts_auto_band, cfg_bts_auto_band_cmd,
"auto-band",
"Automatically select band for ARFCN based on configured band\n")
@@ -287,6 +293,18 @@
return CMD_SUCCESS;
}
+DEFUN_ATTR(cfg_bts_twjit, cfg_bts_twjit_cmd,
+ "twjit",
+ "Configure TW jitter buffer",
+ CMD_ATTR_IMMEDIATE)
+{
+ struct gsm_bts *bts = vty->index;
+
+ vty->node = TWJIT_NODE;
+ vty->index = bts->twjit_cfg;
+ return CMD_SUCCESS;
+}
+
DEFUN_ATTR(cfg_bts_trx, cfg_bts_trx_cmd,
"trx <0-254>",
"Select a TRX to configure\n" "TRX number\n",
@@ -471,6 +489,8 @@
vty_out(vty, " smscb queue-hysteresis %d%s", bts->smscb_queue_hyst, VTY_NEWLINE);
config_write_osmux(vty, " ", bts);
+ vty_out(vty, " twjit%s", VTY_NEWLINE);
+ osmo_twjit_config_write(vty, bts->twjit_cfg, " ");
bts_model_config_write_bts(vty, bts);
@@ -2808,6 +2828,11 @@
install_element(OSMUX_NODE, &cfg_bts_osmux_batch_size_cmd);
install_element(OSMUX_NODE, &cfg_bts_osmux_dummy_padding_cmd);
+ /* twjit config node */
+ install_element(BTS_NODE, &cfg_bts_twjit_cmd);
+ install_node(&twjit_node, config_write_dummy);
+ osmo_twjit_vty_init(TWJIT_NODE);
+
/* add and link to TRX config node */
install_element(BTS_NODE, &cfg_bts_trx_cmd);
install_node(&trx_node, config_write_dummy);
To view, visit change 42164. To unsubscribe, or for help writing mail filters, visit settings.