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-pcu/+/23988 ) Change subject: vty: Add configuration for Gb DSCP and socket priority ...................................................................... vty: Add configuration for Gb DSCP and socket priority While libosmogb / ns2 supports that natively in the VTY, the PCU doesn't want to use the complexities of the full NS2 vty. Change-Id: I7bfbad46582e65e5ad2ac0cc66545538bc632df8 Related: SYS#5427 --- M TODO-RELEASE M src/gprs_bssgp_pcu.c M src/gprs_pcu.c M src/gprs_pcu.h M src/pcu_vty.c 5 files changed, 41 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index 716f713..5b2720b 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,3 +8,4 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line libosmocore struct bssgp_bvc_ctx->is_sgsn field used available only on libosmocore >1.5.1 +libosmocore gprs_ns2_ip_bind_set_priority function used available only on libosmocore >1.5.1 diff --git a/src/gprs_bssgp_pcu.c b/src/gprs_bssgp_pcu.c index 06e1814..f6114de 100644 --- a/src/gprs_bssgp_pcu.c +++ b/src/gprs_bssgp_pcu.c @@ -1060,6 +1060,11 @@ continue; } } + + if (the_pcu->vty.ns_ip_dscp != -1) + gprs_ns2_ip_bind_set_dscp(bind[i], the_pcu->vty.ns_ip_dscp); + if (the_pcu->vty.ns_priority != -1) + gprs_ns2_ip_bind_set_priority(bind[i], the_pcu->vty.ns_priority); } binds |= 1 << i; diff --git a/src/gprs_pcu.c b/src/gprs_pcu.c index 3875e09..df439ef 100644 --- a/src/gprs_pcu.c +++ b/src/gprs_pcu.c @@ -105,6 +105,8 @@ pcu->vty.mcs_lqual_ranges[8].low = 23; pcu->vty.mcs_lqual_ranges[8].high = 256; pcu->vty.ns_dialect = GPRS_NS2_DIALECT_IPACCESS; + pcu->vty.ns_ip_dscp = -1; + pcu->vty.ns_priority = -1; /* TODO: increase them when CRBB decoding is implemented */ pcu->vty.ws_base = 64; pcu->vty.ws_pdch = 0; diff --git a/src/gprs_pcu.h b/src/gprs_pcu.h index a17144c..86fe8eb 100644 --- a/src/gprs_pcu.h +++ b/src/gprs_pcu.h @@ -102,6 +102,8 @@ struct {int16_t low; int16_t high; } cs_lqual_ranges[MAX_GPRS_CS]; struct {int16_t low; int16_t high; } mcs_lqual_ranges[MAX_EDGE_MCS]; enum gprs_ns2_dialect ns_dialect; /* Are we talking Gb with IP-SNS (true) or classic Gb? */ + int ns_ip_dscp; + int ns_priority; uint16_t ws_base; uint16_t ws_pdch; /* increase WS by this value per PDCH */ uint16_t force_llc_lifetime; /* overrides lifetime from SGSN */ diff --git a/src/pcu_vty.c b/src/pcu_vty.c index abc3d8d..1ca6376 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -251,6 +251,11 @@ else vty_out(vty, " gb-dialect classic%s", VTY_NEWLINE); + 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); + 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); @@ -1031,6 +1036,30 @@ return CMD_SUCCESS; } +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; +} + DEFUN(cfg_neighbor_resolution, cfg_neighbor_resolution_cmd, "neighbor resolution " VTY_IPV46_CMD " [<0-65535>]", "Manage local and remote-BSS neighbor cells\n" @@ -1265,6 +1294,8 @@ install_element(PCU_NODE, &cfg_pcu_no_gsmtap_categ_cmd); install_element(PCU_NODE, &cfg_pcu_sock_cmd); install_element(PCU_NODE, &cfg_pcu_gb_dialect_cmd); + install_element(PCU_NODE, &cfg_pcu_gb_ip_dscp_cmd); + install_element(PCU_NODE, &cfg_pcu_gb_priority_cmd); install_element(PCU_NODE, &cfg_neighbor_resolution_cmd); install_element(PCU_NODE, &cfg_pcu_timer_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/23988 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7bfbad46582e65e5ad2ac0cc66545538bc632df8 Gerrit-Change-Number: 23988 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210430/c643fa1d/attachment.htm>