This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17401 ) Change subject: rsl: make IP DSCP configurable ...................................................................... rsl: make IP DSCP configurable Related: OS#4438 Depends: libosmo-abis I41603db8c1286660ad57ac1c78a8fb393a2b080b Change-Id: Icdef5d40243fefdeae23f3bcf9c6702e8487928a --- M include/osmo-bts/gsm_data_shared.h M src/common/bts.c M src/common/rsl.c M src/common/vty.c 4 files changed, 27 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved osmith: Looks good to me, but someone else must approve diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index e0d70b0..3316670 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -741,6 +741,7 @@ uint16_t rtp_port_range_start; uint16_t rtp_port_range_end; uint16_t rtp_port_range_next; + int rtp_ip_dscp; struct { uint8_t ciphers; /* flags A5/1==0x1, A5/2==0x2, A5/3==0x4 */ diff --git a/src/common/bts.c b/src/common/bts.c index da41176..2200615 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -159,6 +159,7 @@ bts->rtp_port_range_start = 16384; bts->rtp_port_range_end = 17407; bts->rtp_port_range_next = bts->rtp_port_range_start; + bts->rtp_ip_dscp = -1; /* configurable via OML */ bts->load.ccch.load_ind_period = 112; diff --git a/src/common/rsl.c b/src/common/rsl.c index 10fb95e..41dd243 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2009,8 +2009,15 @@ bts->rtp_port_range_next += 2; - if (rc == 0) - return 0; + if (rc != 0) + continue; + + if (bts->rtp_ip_dscp != -1) { + if (osmo_rtp_socket_set_dscp(rs, bts->rtp_ip_dscp)) + LOGP(DRSL, LOGL_ERROR, "failed to set DSCP=%i: %s\n", + bts->rtp_ip_dscp, strerror(errno)); + } + return 0; } return -1; diff --git a/src/common/vty.c b/src/common/vty.c index c03f0d4..ab38dc1 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -237,6 +237,8 @@ vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " rtp port-range %u %u%s", bts->rtp_port_range_start, bts->rtp_port_range_end, VTY_NEWLINE); + if (bts->rtp_ip_dscp != -1) + vty_out(vty, " rtp ip-dscp %i%s", bts->rtp_ip_dscp, VTY_NEWLINE); vty_out(vty, " paging queue-size %u%s", paging_get_queue_max(bts->paging_state), VTY_NEWLINE); vty_out(vty, " paging lifetime %u%s", paging_get_lifetime(bts->paging_state), @@ -501,6 +503,19 @@ return CMD_SUCCESS; } +DEFUN(cfg_bts_rtp_ip_dscp, + cfg_bts_rtp_ip_dscp_cmd, + "rtp ip-dscp <0-63>", + RTP_STR "Specify DSCP for RTP/IP packets\n" "The DSCP value (upper 6 bits of TOS)\n") +{ + struct gsm_bts *bts = vty->index; + int dscp = atoi(argv[0]); + + bts->rtp_ip_dscp = dscp; + + return CMD_SUCCESS; +} + #define PAG_STR "Paging related parameters\n" DEFUN(cfg_bts_paging_queue_size, @@ -1665,6 +1680,7 @@ install_element(BTS_NODE, &cfg_bts_rtp_bind_ip_cmd); install_element(BTS_NODE, &cfg_bts_rtp_jitbuf_cmd); install_element(BTS_NODE, &cfg_bts_rtp_port_range_cmd); + install_element(BTS_NODE, &cfg_bts_rtp_ip_dscp_cmd); install_element(BTS_NODE, &cfg_bts_band_cmd); install_element(BTS_NODE, &cfg_description_cmd); install_element(BTS_NODE, &cfg_no_description_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17401 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Icdef5d40243fefdeae23f3bcf9c6702e8487928a Gerrit-Change-Number: 17401 Gerrit-PatchSet: 5 Gerrit-Owner: osmith <osmith at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: osmith <osmith at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200310/44622824/attachment.htm>