lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

September 2022

  • 2 participants
  • 1860 discussions
Change in libosmocore[master]: comments: gsm_08_08.h: AMR cfg: explain in much more detail
by neels 25 Sep '22

25 Sep '22
neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/29472 ) Change subject: comments: gsm_08_08.h: AMR cfg: explain in much more detail ...................................................................... comments: gsm_08_08.h: AMR cfg: explain in much more detail Change-Id: I1864a6beeeedc301c6dc7e2e0c52a3f94b2fef01 --- M include/osmocom/gsm/protocol/gsm_08_08.h 1 file changed, 48 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified neels: Looks good to me, approved diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h index 611196a..c7cf1d8 100644 --- a/include/osmocom/gsm/protocol/gsm_08_08.h +++ b/include/osmocom/gsm/protocol/gsm_08_08.h @@ -568,7 +568,44 @@ * * Default values for FR_AMR_WB, OFR_AMR_WB and OHR_AMR_WB: * See also: 3GPP TS 26.103, Table 5.7-1: Allowed Configurations - * for the Adaptive Multi-Rate - Wideband Codec Types */ + * for the Adaptive Multi-Rate - Wideband Codec Types + * + * This is a copy of 3GPP TS 28.062, Table 7.11.3.1.3-2: + * + * S0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + * 12,20 (x) x x x + * 10,20 x x x + * 7,95 x x x + * 7,40 x x x x + * 6,70 x x x x x x + * 5,90 x x x x x x x x x x + * 5,15 + * 4,75 x x x x x x x x x x + * + * OM F F F F F F F F F F F A F A F A + * + * HR Y Y Y Y Y Y Y Y Y + * FR Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y + * + * Each bit allows one Codec Configuration. + * E.g. when bit S3 is set, look at column labeled "3", and see that only 6,7k is active in this configuration; it is + * "F" forbidden to change in Optimisation Mode, "Y" HR AMR supports this mode, and "Y" FR AMR can also do it. + * + * This means that whichever configuration is chosen from S0 thru S15, there are never more than four rates active. + * + * The spec praises S1 as the most desired configuration: "because it leads in all call cases to TFO/TrFO compatible + * connections with optimal voice quality." (Since HR AMR supports up to 7.95k, it seems that S14 would be more optimal + * voice quality, but it is not marked as supported by HR AMR.) + * + * For FR_AMR below, the default of 0x57ff means: + * 0x57ff = 0101 0111 1111 1111 + * ^14 ^10 ^0 + * allow config 0 thru 10, and configs 12 and 14. + * + * For HR_AMR, drop all those where there is no "Y" in the HR row: + * 0x073f = 0000 0111 0011 1111 + * ^15 ^11 ^6 ^0 + */ enum gsm0808_speech_codec_defaults { GSM0808_SC_CFG_DEFAULT_FR_AMR = 0x57ff, GSM0808_SC_CFG_DEFAULT_HR_AMR = 0x073f, @@ -578,9 +615,12 @@ GSM0808_SC_CFG_DEFAULT_OHR_AMR_WB = 0x01, }; -/*! Default speech codec configurations broken down by reate. +/*! Default speech codec configurations broken down by rate. * See also: 3GPP TS 28.062, Table 7.11.3.1.3-2: Preferred Configurations for - * the Adaptive Multi-Rate Codec Types. */ + * the Adaptive Multi-Rate Codec Types. + * + * Set all Sn bits that have this rate listed as active. + */ enum gsm0808_speech_codec_rate_defaults { GSM0808_SC_CFG_DEFAULT_AMR_4_75 = 0xff03, GSM0808_SC_CFG_DEFAULT_AMR_5_15 = 0x0000, @@ -592,9 +632,12 @@ GSM0808_SC_CFG_DEFAULT_AMR_12_2 = 0xc082 }; -/*! Single speech codec configurations broken down by reate. +/*! Single speech codec configurations broken down by rate. * See also: 3GPP TS 28.062, Table 7.11.3.1.3-2: Preferred Configurations for - * the Adaptive Multi-Rate Codec Types. */ + * the Adaptive Multi-Rate Codec Types. + * + * Set bit Sn (S0 = 0x01), where Sn is identified by a descriptive name. + */ enum gsm0808_speech_codec_rate { GSM0808_SC_CFG_AMR_4_75 = 0x0001, GSM0808_SC_CFG_AMR_4_75_5_90_7_40_12_20 = 0x0002, -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29472 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1864a6beeeedc301c6dc7e2e0c52a3f94b2fef01 Gerrit-Change-Number: 29472 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmocore[master]: comments: gsm_08_08.h: AMR cfg: explain in much more detail
by neels 25 Sep '22

25 Sep '22
Attention is currently required from: pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/29472 ) Change subject: comments: gsm_08_08.h: AMR cfg: explain in much more detail ...................................................................... Patch Set 2: Code-Review+2 (1 comment) File include/osmocom/gsm/protocol/gsm_08_08.h: https://gerrit.osmocom.org/c/libosmocore/+/29472/comment/84c8d955_4c072ec5 PS1, Line 639: * Set bit Sn (S0 -> 0x01), where Sn is identified by a descriptive name. > "S0 = 0x01". I first thought it was some sort of range with the "->". Done -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29472 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1864a6beeeedc301c6dc7e2e0c52a3f94b2fef01 Gerrit-Change-Number: 29472 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sun, 25 Sep 2022 18:35:14 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: comments: gsm_08_08.h: AMR cfg: explain in much more detail
by neels 25 Sep '22

25 Sep '22
Attention is currently required from: neels. Hello Jenkins Builder, laforge, fixeria, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/29472 to look at the new patch set (#2). Change subject: comments: gsm_08_08.h: AMR cfg: explain in much more detail ...................................................................... comments: gsm_08_08.h: AMR cfg: explain in much more detail Change-Id: I1864a6beeeedc301c6dc7e2e0c52a3f94b2fef01 --- M include/osmocom/gsm/protocol/gsm_08_08.h 1 file changed, 48 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/29472/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29472 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1864a6beeeedc301c6dc7e2e0c52a3f94b2fef01 Gerrit-Change-Number: 29472 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in libosmocore[master]: add gsm0808_amr_modes_from_cfg
by neels 25 Sep '22

25 Sep '22
Attention is currently required from: neels, dexter. Hello Jenkins Builder, laforge, dexter, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/29473 to look at the new patch set (#2). Change subject: add gsm0808_amr_modes_from_cfg ...................................................................... add gsm0808_amr_modes_from_cfg Provide the definitions from 3GPP TS 28.062, Table 7.11.3.1.3-2 as generally usable API. Likely users: - upcoming patch to improve conversion between S0-S15 and MultiRate config. - osmo-msc to figure out conversion between SDP AMR mode-set and 3GPP TS 48.008 Permitted Speech S0-S15. - osmo-bsc to choose AMR modes for channel activation. Related: SYS#5066 Change-Id: Icef7dd626d3d4641c66b8dd87e2047fc0ab547d1 --- M include/osmocom/gsm/protocol/gsm_08_08.h M src/gsm/gsm0808.c M src/gsm/libosmogsm.map 3 files changed, 108 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/73/29473/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29473 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Icef7dd626d3d4641c66b8dd87e2047fc0ab547d1 Gerrit-Change-Number: 29473 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-mgw[master]: osmux: Rename field s/init/initialized
by fixeria 25 Sep '22

25 Sep '22
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29477 ) Change subject: osmux: Rename field s/init/initialized ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29477 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ic48de396b1d8a0774611b4a1c2248ba79bdaf044 Gerrit-Change-Number: 29477 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sun, 25 Sep 2022 17:37:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-mgw[master]: osmux: Rename field s/init/initialized
by pespin 24 Sep '22

24 Sep '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29477 ) Change subject: osmux: Rename field s/init/initialized ...................................................................... osmux: Rename field s/init/initialized Change-Id: Ic48de396b1d8a0774611b4a1c2248ba79bdaf044 --- M include/osmocom/mgcp/mgcp.h M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/77/29477/1 diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index c707f07..a4d4e6f 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -164,7 +164,7 @@ /* The BSC-NAT may ask for enabling osmux on demand. This tells us if * the osmux socket is already initialized. */ - bool osmux_init; + bool osmux_initialized; /* osmux batch factor: from 1 to 4 maximum */ int osmux_batch; /* osmux batch size (in bytes) */ diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 65783f3..1f21888 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -492,7 +492,7 @@ osmo_sock_get_name2(osmux_fd.fd)); return ret; } - cfg->osmux_init = true; + cfg->osmux_initialized = true; LOGP(DOSMUX, LOGL_INFO, "OSMUX socket listening on %s\n", osmo_sock_get_name2(osmux_fd.fd)); diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 506de34..e748c5b 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -740,7 +740,7 @@ */ static int mgcp_osmux_setup(struct mgcp_endpoint *endp, const char *line) { - if (!endp->trunk->cfg->osmux_init) { + if (!endp->trunk->cfg->osmux_initialized) { if (osmux_init(OSMUX_ROLE_BSC, endp->trunk) < 0) { LOGPENDP(endp, DLMGCP, LOGL_ERROR, "Cannot init OSMUX\n"); return -3; -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29477 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ic48de396b1d8a0774611b4a1c2248ba79bdaf044 Gerrit-Change-Number: 29477 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-mgw[master]: osmux: Improve per-conn tx rate counters
by pespin 24 Sep '22

24 Sep '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29470 ) Change subject: osmux: Improve per-conn tx rate counters ...................................................................... osmux: Improve per-conn tx rate counters Change-Id: If030f5d921bdfcfcd00b015b4a9e48bb3b04e721 --- M include/osmocom/mgcp/mgcp_conn.h M src/libosmo-mgcp/mgcp_osmux.c 2 files changed, 17 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index 9ffa7dc..d9b38c0 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -186,7 +186,9 @@ enum { OSMUX_CHUNKS_RX_CTR, OSMUX_OCTETS_RX_CTR, - OSMUX_DROPPED_AMR_PAYLOADS_CTR, + OSMUX_RTP_PACKETS_TX_CTR, + OSMUX_RTP_PACKETS_TX_DROPPED_CTR, + OSMUX_AMR_OCTETS_TX_CTR, /* Only available in global stats: */ OSMUX_NUM_CONNECTIONS, OSMUX_PACKETS_RX_CTR, @@ -200,7 +202,9 @@ static const struct rate_ctr_desc mgcp_conn_osmux_rate_ctr_desc[] = { [OSMUX_CHUNKS_RX_CTR] = {"osmux:chunks_rx", "Inbound Osmux chunks."}, [OSMUX_OCTETS_RX_CTR] = {"osmux:octets_rx", "Inbound Osmux octets."}, - [OSMUX_DROPPED_AMR_PAYLOADS_CTR] = {"osmux:dropped_amr_payloads", "Dropped outbound AMR payloads."} + [OSMUX_RTP_PACKETS_TX_CTR] = {"osmux:rtp_packets_tx", "Tx outbound RTP packets to encode as Osmux."}, + [OSMUX_RTP_PACKETS_TX_DROPPED_CTR] = {"osmux:rtp_packets_tx_dropped", "Dropped Tx outbound RTP packets to encode as Osmux."}, + [OSMUX_AMR_OCTETS_TX_CTR] = {"osmux:amr_octets_tx", "Tx outbound AMD payload octets."}, }; /* Aggregated Osmux connection stats. These are updated when an Osmux connection is freed. @@ -208,7 +212,9 @@ static const struct rate_ctr_desc all_osmux_conn_rate_ctr_desc[] = { [OSMUX_CHUNKS_RX_CTR] = {"all_osmux:chunks_rx", "Inbound Osmux chunks."}, [OSMUX_OCTETS_RX_CTR] = {"all_osmux:octets_rx", "Inbound Osmux octets."}, - [OSMUX_DROPPED_AMR_PAYLOADS_CTR] = {"all_osmux:dropped_amr_payloads", "Dropped outbound AMR payloads."}, + [OSMUX_RTP_PACKETS_TX_CTR] = {"all_osmux:rtp_packets_tx", "Tx outbound RTP packets to encode as Osmux."}, + [OSMUX_RTP_PACKETS_TX_DROPPED_CTR] = {"all_osmux:rtp_packets_tx_dropped", "Dropped Tx outbound RTP packets to encode as Osmux."}, + [OSMUX_AMR_OCTETS_TX_CTR] = {"all_osmux:amr_octets_tx", "Tx outbound AMD payload octets."}, /* These last counters below do not exist in per-connection stats, only here: */ [OSMUX_NUM_CONNECTIONS] = {"all_osmux:num_closed_conns", "Total number of osmux connections closed."}, [OSMUX_PACKETS_RX_CTR] = {"all_osmux:packets_rx", "Total inbound UDP/Osmux packets."}, diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 790c425..6ae0d8e 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -219,14 +219,14 @@ struct msgb *msg; if (!conn->end.output_enabled) { - rtpconn_osmux_rate_ctr_inc(conn, OSMUX_DROPPED_AMR_PAYLOADS_CTR); + rtpconn_osmux_rate_ctr_inc(conn, OSMUX_RTP_PACKETS_TX_DROPPED_CTR); return -1; } if (conn->osmux.state != OSMUX_STATE_ENABLED) { LOGPCONN(conn->conn, DOSMUX, LOGL_INFO, "forwarding RTP to Osmux conn not yet enabled, dropping (cid=%d)\n", conn->osmux.remote_cid); - rtpconn_osmux_rate_ctr_inc(conn, OSMUX_DROPPED_AMR_PAYLOADS_CTR); + rtpconn_osmux_rate_ctr_inc(conn, OSMUX_RTP_PACKETS_TX_DROPPED_CTR); return -1; } @@ -241,6 +241,12 @@ /* batch full, build and deliver it */ osmux_xfrm_input_deliver(conn->osmux.in); } + if (ret < 0) { + rtpconn_osmux_rate_ctr_inc(conn, OSMUX_RTP_PACKETS_TX_DROPPED_CTR); + } else { + rtpconn_osmux_rate_ctr_inc(conn, OSMUX_RTP_PACKETS_TX_CTR); + rtpconn_osmux_rate_ctr_add(conn, OSMUX_AMR_OCTETS_TX_CTR, buf_len - sizeof(struct rtp_hdr)); + } return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29470 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: If030f5d921bdfcfcd00b015b4a9e48bb3b04e721 Gerrit-Change-Number: 29470 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-mgw[master]: vty: show per-connection Osmux VTY stats
by pespin 24 Sep '22

24 Sep '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29471 ) Change subject: vty: show per-connection Osmux VTY stats ...................................................................... vty: show per-connection Osmux VTY stats Related: SYS#5987 Change-Id: Ieab6dcbd195c8e01a73a2a832bce78ee015ae1c3 --- M include/osmocom/mgcp/osmux.h M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_vty.c 3 files changed, 35 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve diff --git a/include/osmocom/mgcp/osmux.h b/include/osmocom/mgcp/osmux.h index 1a99e6d..58d9095 100644 --- a/include/osmocom/mgcp/osmux.h +++ b/include/osmocom/mgcp/osmux.h @@ -34,6 +34,10 @@ OSMUX_STATE_ENABLED, /* Osmux was initialized by \ref osmux_enable_endpoint and can process frames */ }; +extern const struct value_string osmux_state_strs[]; +static inline const char *osmux_state_str(enum osmux_state val) +{ return get_value_string(osmux_state_strs, val); } + enum osmux_usage { OSMUX_USAGE_OFF = 0, OSMUX_USAGE_ON = 1, diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 6ae0d8e..65783f3 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -41,6 +41,13 @@ int refcnt; }; +const struct value_string osmux_state_strs[] = { + { OSMUX_STATE_DISABLED, "disabled" }, + { OSMUX_STATE_ACTIVATING, "activating" }, + { OSMUX_STATE_ENABLED, "enabled" }, + { 0, NULL } +}; + static const struct rate_ctr_group_desc rate_ctr_group_osmux_desc = { .group_name_prefix = "conn_osmux", .group_description = "Osmux connection statistics", diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 34c2d4b..1bf8789 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -197,6 +197,30 @@ VTY_NEWLINE, end->fmtp_extra, codec->audio_name, codec->subtype_name, VTY_NEWLINE, end->output_enabled, end->force_output_ptime, VTY_NEWLINE); + if (mgcp_conn_rtp_is_osmux(conn)) { + struct rate_ctr *rx_chunks, *rx_octets, *rtp_tx, *rtp_tx_dropped, *octets_tx; + rx_chunks = rate_ctr_group_get_ctr(conn->osmux.ctrg, OSMUX_CHUNKS_RX_CTR); + rx_octets = rate_ctr_group_get_ctr(conn->osmux.ctrg, OSMUX_OCTETS_RX_CTR); + rtp_tx = rate_ctr_group_get_ctr(conn->osmux.ctrg, OSMUX_RTP_PACKETS_TX_CTR); + rtp_tx_dropped = rate_ctr_group_get_ctr(conn->osmux.ctrg, OSMUX_RTP_PACKETS_TX_DROPPED_CTR); + octets_tx = rate_ctr_group_get_ctr(conn->osmux.ctrg, OSMUX_AMR_OCTETS_TX_CTR); + vty_out(vty, + " Osmux:%s" + " State: %s%s" + " Local CID: %d%s" + " Remote CID: %d%s" + " Chunks received: %" PRIu64 " (%" PRIu64 " bytes total)%s" + " RTP Packets encoded (Tx): %" PRIu64 " (%" PRIu64 " AMR octets total)%s" + " AMR payloads Dropped (Tx): %" PRIu64 "%s", + VTY_NEWLINE, osmux_state_str(conn->osmux.state), VTY_NEWLINE, + conn->osmux.local_cid_allocated ? conn->osmux.local_cid : -1, VTY_NEWLINE, + conn->osmux.remote_cid_present ? conn->osmux.remote_cid : -1, VTY_NEWLINE, + rx_chunks->current, rx_octets->current, VTY_NEWLINE, + rtp_tx->current, octets_tx->current, VTY_NEWLINE, + rtp_tx_dropped->current, VTY_NEWLINE + ); + + } } static void dump_endpoint(struct vty *vty, struct mgcp_endpoint *endp, -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29471 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ieab6dcbd195c8e01a73a2a832bce78ee015ae1c3 Gerrit-Change-Number: 29471 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-mgw[master]: osmux: Fix incorrect rate_ctr_group used in mgcp_osmux.c
by pespin 24 Sep '22

24 Sep '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29469 ) Change subject: osmux: Fix incorrect rate_ctr_group used in mgcp_osmux.c ...................................................................... osmux: Fix incorrect rate_ctr_group used in mgcp_osmux.c During development of the counters, they were first added to the same RTP counter group and later on split, but some places still used the RTP related functions to increment the counters. Let's add a seaprate set of helpers to update the correct osmux counter group. Fixes: 582c2bf7b0b3f6aabfb048a2d71c5fd9c60a105e Change-Id: Ia2e5601c7d476b79afd95032dbc019517f8209af --- M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_ratectr.c 2 files changed, 21 insertions(+), 6 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 72152c7..790c425 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -49,6 +49,21 @@ .ctr_desc = mgcp_conn_osmux_rate_ctr_desc }; +static void rtpconn_osmux_rate_ctr_add(struct mgcp_conn_rtp *conn_rtp, int id, int inc) +{ + struct rate_ctr_group *conn_osmux_stats = conn_rtp->osmux.ctrg; + struct rate_ctr_group *trunk_osmux_stats = conn_rtp->conn->endp->trunk->ratectr.all_osmux_conn_stats; + + /* add to both the per-connection and the global stats */ + rate_ctr_add(rate_ctr_group_get_ctr(conn_osmux_stats, id), inc); + rate_ctr_add(rate_ctr_group_get_ctr(trunk_osmux_stats, id), inc); +} + +static void rtpconn_osmux_rate_ctr_inc(struct mgcp_conn_rtp *conn_rtp, int id) +{ + rtpconn_osmux_rate_ctr_add(conn_rtp, id, 1); +} + /* Deliver OSMUX batch to the remote end */ static void osmux_deliver_cb(struct msgb *batch_msg, void *data) { @@ -204,14 +219,14 @@ struct msgb *msg; if (!conn->end.output_enabled) { - rtpconn_rate_ctr_inc(conn, conn->conn->endp, OSMUX_DROPPED_AMR_PAYLOADS_CTR); + rtpconn_osmux_rate_ctr_inc(conn, OSMUX_DROPPED_AMR_PAYLOADS_CTR); return -1; } if (conn->osmux.state != OSMUX_STATE_ENABLED) { LOGPCONN(conn->conn, DOSMUX, LOGL_INFO, "forwarding RTP to Osmux conn not yet enabled, dropping (cid=%d)\n", conn->osmux.remote_cid); - rtpconn_rate_ctr_inc(conn, conn->conn->endp, OSMUX_DROPPED_AMR_PAYLOADS_CTR); + rtpconn_osmux_rate_ctr_inc(conn, OSMUX_DROPPED_AMR_PAYLOADS_CTR); return -1; } @@ -428,9 +443,9 @@ goto out; }*/ if (endp_osmux_state_check(endp, conn_src, false) == 0) { - rtpconn_rate_ctr_inc(conn_src, endp, OSMUX_CHUNKS_RX_CTR); - rtpconn_rate_ctr_add(conn_src, endp, OSMUX_OCTETS_RX_CTR, - osmux_chunk_length(msg, rem)); + rtpconn_osmux_rate_ctr_inc(conn_src, OSMUX_CHUNKS_RX_CTR); + rtpconn_osmux_rate_ctr_add(conn_src, OSMUX_OCTETS_RX_CTR, + osmux_chunk_length(msg, rem)); osmux_xfrm_output_sched(conn_src->osmux.out, osmuxh); } rem = msg->len; diff --git a/src/libosmo-mgcp/mgcp_ratectr.c b/src/libosmo-mgcp/mgcp_ratectr.c index bf3d9d3..abf3883 100644 --- a/src/libosmo-mgcp/mgcp_ratectr.c +++ b/src/libosmo-mgcp/mgcp_ratectr.c @@ -151,7 +151,7 @@ .group_description = "aggregated statistics for all osmux connections", .class_id = 1, .num_ctr = ARRAY_SIZE(all_osmux_conn_rate_ctr_desc), - .ctr_desc = all_rtp_conn_rate_ctr_desc + .ctr_desc = all_osmux_conn_rate_ctr_desc }; /*! allocate global rate counters -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29469 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ia2e5601c7d476b79afd95032dbc019517f8209af Gerrit-Change-Number: 29469 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-mgw[master]: vty: show per-connection Osmux VTY stats
by pespin 24 Sep '22

24 Sep '22
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29471 ) Change subject: vty: show per-connection Osmux VTY stats ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29471 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ieab6dcbd195c8e01a73a2a832bce78ee015ae1c3 Gerrit-Change-Number: 29471 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 24 Sep 2022 22:07:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • ...
  • 186
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.