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

October 2022

  • 2 participants
  • 2331 discussions
Build failure of network:osmocom:nightly/osmo-remsim in Raspbian_11/armv7l
by OBS Notification 11 Oct '22

11 Oct '22
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/o… Package network:osmocom:nightly/osmo-remsim failed to build in Raspbian_11/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-remsim Last lines of build log: [ 484s] update-alternatives: using /usr/share/docutils/scripts/python3/rst2latex to provide /usr/bin/rst2latex (rst2latex) in auto mode [ 484s] update-alternatives: using /usr/share/docutils/scripts/python3/rst2man to provide /usr/bin/rst2man (rst2man) in auto mode [ 484s] update-alternatives: using /usr/share/docutils/scripts/python3/rst2odt to provide /usr/bin/rst2odt (rst2odt) in auto mode [ 484s] update-alternatives: using /usr/share/docutils/scripts/python3/rst2odt_prepstyles to provide /usr/bin/rst2odt_prepstyles (rst2odt_prepstyles) in auto mode [ 484s] update-alternatives: using /usr/share/docutils/scripts/python3/rst2pseudoxml to provide /usr/bin/rst2pseudoxml (rst2pseudoxml) in auto mode [ 484s] update-alternatives: using /usr/share/docutils/scripts/python3/rst2s5 to provide /usr/bin/rst2s5 (rst2s5) in auto mode [ 484s] update-alternatives: using /usr/share/docutils/scripts/python3/rst2xetex to provide /usr/bin/rst2xetex (rst2xetex) in auto mode [ 484s] update-alternatives: using /usr/share/docutils/scripts/python3/rst2xml to provide /usr/bin/rst2xml (rst2xml) in auto mode [ 484s] update-alternatives: using /usr/share/docutils/scripts/python3/rstpep2html to provide /usr/bin/rstpep2html (rstpep2html) in auto mode [ 486s] [482/514] installing python3-reportlab-3.5.59-2 [ 490s] [483/514] installing g++-4:10.2.1-1+rpi1 [ 490s] update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode [ 490s] [484/514] installing mount-2.36.1-8+deb11u1 [ 490s] [485/514] installing libulfius-dev-2.7.1-1+deb11u2 [ 491s] [486/514] installing texlive-latex-extra-2020.20210202-3 [ 492s] dpkg-deb (subprocess): decompressing archive '.init_b_cache/texlive-latex-extra.deb' (size=13661424) member 'data.tar': lzma error: compressed data is corrupt [ 492s] dpkg-deb: error: <decompress> subprocess returned error exit status 2 [ 492s] dpkg: error processing archive .init_b_cache/texlive-latex-extra.deb (--install): [ 492s] cannot copy extracted data for './usr/share/texlive/texmf-dist/tex/generic/xint/xintkernel.sty' to '/usr/share/texlive/texmf-dist/tex/generic/xint/xintkernel.sty.dpkg-new': unexpected end of file or stream [ 492s] Errors were encountered while processing: [ 492s] .init_b_cache/texlive-latex-extra.deb [ 492s] exit ... [ 492s] ### VM INTERACTION START ### [ 493s] [ 341.976891] sysrq: SysRq : Power Off [ 493s] [ 342.018156] reboot: Power down [ 493s] ### VM INTERACTION END ### [ 493s] [ 493s] armbuild02 failed "build osmo-remsim_1.0.0.30.f4be.202210110052.dsc" at Tue Oct 11 07:00:28 UTC 2022. [ 493s] -- Configure notifications at https://build.opensuse.org/my/subscriptions openSUSE Build Service (https://build.opensuse.org/)
1 0
0 0
Build failure of network:osmocom:latest/libosmo-netif in Debian_Testing/x86_64
by OBS Notification 11 Oct '22

11 Oct '22
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/li… Package network:osmocom:latest/libosmo-netif failed to build in Debian_Testing/x86_64 Check out the package for editing: osc checkout network:osmocom:latest libosmo-netif Last lines of build log: [ 0s] [ 0s] cloud119 started "build libosmo-netif_1.2.0.dsc" at Tue Oct 11 04:14:52 UTC 2022. [ 0s] [ 0s] Building libosmo-netif for project 'network:osmocom:latest' repository 'Debian_Testing' arch 'x86_64' srcmd5 'fc976ba5c310efc13b1f1c312bffe64a' [ 0s] [ 0s] processing recipe /var/cache/obs/worker/root_1/.build-srcdir/libosmo-netif_1.2.0.dsc ... [ 0s] running changelog2spec --target debian --file /var/cache/obs/worker/root_1/.build-srcdir/libosmo-netif_1.2.0.dsc [ 0s] init_buildsystem --configdir /var/run/obs/worker/1/build/configs --cachedir /var/cache/build --prepare --clean --rpmlist /var/cache/obs/worker/root_1/.build.rpmlist /var/cache/obs/worker/root_1/.build-srcdir/libosmo-netif_1.2.0.dsc build ... [ 1s] unknown keyword in config: [ 1s] could not autodetect package type [ 1s] [ 1s] cloud119 failed "build libosmo-netif_1.2.0.dsc" at Tue Oct 11 04:14:53 UTC 2022. [ 1s] -- Configure notifications at https://build.opensuse.org/my/subscriptions openSUSE Build Service (https://build.opensuse.org/)
1 0
0 0
Change in osmo-sgsn[master]: Constify LLC/SNDCP parameters
by keith 11 Oct '22

11 Oct '22
Attention is currently required from: msuraev. keith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/29678 ) Change subject: Constify LLC/SNDCP parameters ...................................................................... Patch Set 2: Code-Review+1 (1 comment) Patchset: PS2: tested with two reasonably busy PCU, and I trust laforge's +1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/29678 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I903f8a747a8d3b7f734dac7b0c12373ecbb90b11 Gerrit-Change-Number: 29678 Gerrit-PatchSet: 2 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: keith <keith(a)rhizomatica.org> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Tue, 11 Oct 2022 00:22:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-sgsn[master]: GMM: permit E_GMM_COMMON_PROC_SUCCESS in normal state
by keith 11 Oct '22

11 Oct '22
Attention is currently required from: msuraev. keith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/29676 ) Change subject: GMM: permit E_GMM_COMMON_PROC_SUCCESS in normal state ...................................................................... Patch Set 1: Code-Review+1 (1 comment) Patchset: PS1: +1 on the basis that I'm running it for a while and I see nothing unexpected happening. I'm not fully familiar with the fsm though. -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/29676 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ia97b50aac6c665812ddca9010de7f97b17b78bd5 Gerrit-Change-Number: 29676 Gerrit-PatchSet: 1 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: keith <keith(a)rhizomatica.org> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Tue, 11 Oct 2022 00:18:06 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-mgw[master]: osmux: Erase references to bsc-nat
by pespin 10 Oct '22

10 Oct '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29652 ) Change subject: osmux: Erase references to bsc-nat ...................................................................... osmux: Erase references to bsc-nat Change-Id: I21ab7134de577278175132fc78431a249de76731 --- M include/osmocom/mgcp/mgcp.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_osmux.c 4 files changed, 5 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 930557d..c6d628e 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -162,9 +162,8 @@ /* addr to bind the server to */ char *osmux_addr_v4; char *osmux_addr_v6; - /* The BSC-NAT may ask for enabling osmux on demand. This tells us if - * the osmux socket is already initialized. - */ + /* The osmux socket is allocated on demand (1st time used). + * This tells us if the osmux socket is already initialized. */ bool osmux_initialized; /* osmux batch factor: from 1 to 4 maximum */ int osmux_batch; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 77de23f..2ca3b66 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -442,7 +442,7 @@ osmux_cid, OSMUX_CID_MAX); return -2; } - LOGP(DLMGCP, LOGL_DEBUG, "bsc-nat offered Osmux CID %u\n", osmux_cid); + LOGP(DLMGCP, LOGL_DEBUG, "MGW offered Osmux CID %u\n", osmux_cid); return osmux_cid; } diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 4581b76..26a44c6 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -202,7 +202,7 @@ osmux_cid, OSMUX_CID_MAX); return -2; } - LOGP(DLMGCP, LOGL_DEBUG, "bsc-nat offered Osmux CID %u\n", osmux_cid); + LOGP(DLMGCP, LOGL_DEBUG, "MGCP client offered Osmux CID %u\n", osmux_cid); return osmux_cid; } diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 8ffdf31..e20868b 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -657,7 +657,7 @@ return mgcp_udp_send(osmux_fd_v4.fd, &conn->end.addr, (char *)osmuxh, buf_len); } -/* bsc-nat allocates/releases the Osmux circuit ID. +7 to round up to 8 bit boundary. */ +/* Keeps track of locally allocated Osmux circuit ID. +7 to round up to 8 bit boundary. */ static uint8_t osmux_cid_bitmap[(OSMUX_CID_MAX + 1 + 7) / 8]; /*! count the number of taken OSMUX cids. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29652 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I21ab7134de577278175132fc78431a249de76731 Gerrit-Change-Number: 29652 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder 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]: mgcp_conn_dump(): Separate dump for osmux and iuup connections
by pespin 10 Oct '22

10 Oct '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29653 ) Change subject: mgcp_conn_dump(): Separate dump for osmux and iuup connections ...................................................................... mgcp_conn_dump(): Separate dump for osmux and iuup connections Change-Id: Iec1f2d61e4eb14a8a3c634e2642063bea6000c04 --- M src/libosmo-mgcp/mgcp_conn.c 1 file changed, 32 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index c74069d..b97c161 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -366,14 +366,38 @@ switch (conn->type) { case MGCP_CONN_TYPE_RTP: - /* Dump RTP connection */ - snprintf(str, sizeof(str), "(%s/rtp, id:0x%s, ip:%s, " - "rtp:%u rtcp:%u)", - conn->name, - conn->id, - osmo_sockaddr_ntop(&conn->u.rtp.end.addr.u.sa, ipbuf), - osmo_sockaddr_port(&conn->u.rtp.end.addr.u.sa), - ntohs(conn->u.rtp.end.rtcp_port)); + switch (conn->u.rtp.type) { + case MGCP_RTP_DEFAULT: + /* Dump RTP connection */ + snprintf(str, sizeof(str), "(%s/rtp, id:0x%s, ip:%s, " + "rtp:%u rtcp:%u)", + conn->name, conn->id, + osmo_sockaddr_ntop(&conn->u.rtp.end.addr.u.sa, ipbuf), + osmo_sockaddr_port(&conn->u.rtp.end.addr.u.sa), + ntohs(conn->u.rtp.end.rtcp_port)); + break; + case MGCP_RTP_OSMUX: + snprintf(str, sizeof(str), "(%s/osmux, id:0x%s, ip:%s, " + "port:%u CID:%u)", + conn->name, conn->id, + osmo_sockaddr_ntop(&conn->u.rtp.end.addr.u.sa, ipbuf), + osmo_sockaddr_port(&conn->u.rtp.end.addr.u.sa), + conn->u.rtp.osmux.local_cid); + break; + case MGCP_RTP_IUUP: + snprintf(str, sizeof(str), "(%s/iuup, id:0x%s, ip:%s, " + "port:%u)", + conn->name, conn->id, + osmo_sockaddr_ntop(&conn->u.rtp.end.addr.u.sa, ipbuf), + osmo_sockaddr_port(&conn->u.rtp.end.addr.u.sa)); + break; + default: + /* Should not happen, we should be able to dump + * every possible connection type. */ + snprintf(str, sizeof(str), "(unknown conn_rtp connection type %u)", + conn->u.rtp.type); + break; + } break; default: -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29653 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Iec1f2d61e4eb14a8a3c634e2642063bea6000c04 Gerrit-Change-Number: 29653 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-mgw[master]: osmux: Move setting OSMUX_STATE_DISABLED to initializer function
by pespin 10 Oct '22

10 Oct '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29648 ) Change subject: osmux: Move setting OSMUX_STATE_DISABLED to initializer function ...................................................................... osmux: Move setting OSMUX_STATE_DISABLED to initializer function Change-Id: I7c184b17075fc3e71f1f66775e16b56a5ae91b62 --- M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c 3 files changed, 5 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index 08c9301..c74069d 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -95,6 +95,9 @@ static atomic_uint rate_ctr_index = 0; conn_rtp->type = MGCP_RTP_DEFAULT; + + /* Osmux specific defaults, only used if conn is later on Osmux-enabled: */ + conn_rtp->osmux.state = OSMUX_STATE_DISABLED; conn_rtp->osmux.local_cid_allocated = false; conn_rtp->osmux.local_cid = 0; conn_rtp->osmux.remote_cid_present = false; diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 473e655..8ffdf31 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -524,6 +524,8 @@ conn->osmux.ctrg = rate_ctr_group_alloc(conn->conn, &rate_ctr_group_osmux_desc, conn->ctrg->idx); conn->type = MGCP_RTP_OSMUX; + /* Annotate Osmux circuit ID and set it to negotiating state until this + * is fully set up from the dummy load. */ conn->osmux.state = OSMUX_STATE_ACTIVATING; return 0; } diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index d92725a..fdac665 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -1003,9 +1003,6 @@ goto error2; } - /* Annotate Osmux circuit ID and set it to negotiating state until this - * is fully set up from the dummy load. */ - conn->osmux.state = OSMUX_STATE_DISABLED; /* If X-Osmux (remote CID) was received (-1 is wilcard), alloc next avail CID as local CID */ if (remote_osmux_cid >= -1) { if (osmux_init_conn(conn) < 0) { -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29648 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I7c184b17075fc3e71f1f66775e16b56a5ae91b62 Gerrit-Change-Number: 29648 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder 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: Make conn_osmux_{allocate,release}_local_cid() APIs static
by pespin 10 Oct '22

10 Oct '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29646 ) Change subject: osmux: Make conn_osmux_{allocate,release}_local_cid() APIs static ...................................................................... osmux: Make conn_osmux_{allocate,release}_local_cid() APIs static They are used internally in the mgcp_osmux.c file. Change-Id: If7c83f98a94818090173a8be9d3bff9818b2ead1 --- M include/osmocom/mgcp/osmux.h M src/libosmo-mgcp/mgcp_osmux.c 2 files changed, 29 insertions(+), 31 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/include/osmocom/mgcp/osmux.h b/include/osmocom/mgcp/osmux.h index c5f6871..be5ee6a 100644 --- a/include/osmocom/mgcp/osmux.h +++ b/include/osmocom/mgcp/osmux.h @@ -12,8 +12,6 @@ int osmux_init_conn(struct mgcp_conn_rtp *conn); int conn_osmux_enable(struct mgcp_conn_rtp *conn); void conn_osmux_disable(struct mgcp_conn_rtp *conn); -int conn_osmux_allocate_local_cid(struct mgcp_conn_rtp *conn); -void conn_osmux_release_local_cid(struct mgcp_conn_rtp *conn); int osmux_xfrm_to_osmux(char *buf, int buf_len, struct mgcp_conn_rtp *conn); int osmux_send_dummy(struct mgcp_conn_rtp *conn); diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index cd45a87..3351650 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -485,6 +485,35 @@ return 0; } +/*! relase OSXMUX cid, that had been allocated to this connection. + * \param[in] conn connection with OSMUX cid to release */ +static void conn_osmux_release_local_cid(struct mgcp_conn_rtp *conn) +{ + if (conn->osmux.local_cid_allocated) + osmux_cid_pool_put(conn->osmux.local_cid); + conn->osmux.local_cid = 0; + conn->osmux.local_cid_allocated = false; +} + +/*! allocate local OSMUX cid to connection. + * \param[in] conn connection for which we allocate the local OSMUX cid + * \returns Allocated OSMUX cid, -1 on error (no free CIDs avail). + */ +static int conn_osmux_allocate_local_cid(struct mgcp_conn_rtp *conn) +{ + OSMO_ASSERT(conn->osmux.local_cid_allocated == false); + int osmux_cid = osmux_cid_pool_get_next(); + if (osmux_cid == -1) { + LOGPCONN(conn->conn, DOSMUX, LOGL_INFO, + "no available local Osmux CID to allocate!\n"); + return -1; + } + + conn->osmux.local_cid = (uint8_t) osmux_cid; + conn->osmux.local_cid_allocated = true; + return osmux_cid; +} + /*! Initialize Osmux bits of a conn. * \param[in] conn Osmux connection to initialize * \returns 0 on success, negative on ERROR */ @@ -589,35 +618,6 @@ conn->osmux.ctrg = NULL; } -/*! relase OSXMUX cid, that had been allocated to this connection. - * \param[in] conn connection with OSMUX cid to release */ -void conn_osmux_release_local_cid(struct mgcp_conn_rtp *conn) -{ - if (conn->osmux.local_cid_allocated) - osmux_cid_pool_put(conn->osmux.local_cid); - conn->osmux.local_cid = 0; - conn->osmux.local_cid_allocated = false; -} - -/*! allocate local OSMUX cid to connection. - * \param[in] conn connection for which we allocate the local OSMUX cid - * \returns Allocated OSMUX cid, -1 on error (no free CIDs avail). - */ -int conn_osmux_allocate_local_cid(struct mgcp_conn_rtp *conn) -{ - OSMO_ASSERT(conn->osmux.local_cid_allocated == false); - int osmux_cid = osmux_cid_pool_get_next(); - if (osmux_cid == -1) { - LOGPCONN(conn->conn, DOSMUX, LOGL_INFO, - "no available local Osmux CID to allocate!\n"); - return -1; - } - - conn->osmux.local_cid = (uint8_t) osmux_cid; - conn->osmux.local_cid_allocated = true; - return osmux_cid; -} - /*! send RTP dummy packet to OSMUX connection port. * \param[in] conn associated RTP connection * \returns bytes sent, -1 on error */ -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29646 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: If7c83f98a94818090173a8be9d3bff9818b2ead1 Gerrit-Change-Number: 29646 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-mgw[master]: osmux: Define osmux_dummy cfg as boolean
by pespin 10 Oct '22

10 Oct '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29647 ) Change subject: osmux: Define osmux_dummy cfg as boolean ...................................................................... osmux: Define osmux_dummy cfg as boolean Change-Id: Ifc3384f9871ddfdbd6282c6e03bf6a2dd8a09a9e --- M include/osmocom/mgcp/mgcp.h M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_vty.c 3 files changed, 5 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 2005e4f..930557d 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -172,10 +172,8 @@ int osmux_batch_size; /* osmux port */ uint16_t osmux_port; - /* Pad circuit with dummy messages until we see the first voice - * message. - */ - uint16_t osmux_dummy; + /* Pad circuit with dummy AMR frames if no payload to transmit is available */ + bool osmux_dummy; /* domain name of the media gateway */ char domain[255+1]; diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 3351650..473e655 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -544,7 +544,7 @@ */ const struct mgcp_trunk *trunk = conn->conn->endp->trunk; static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1); - uint16_t osmux_dummy = trunk->cfg->osmux_dummy; + bool osmux_dummy = trunk->cfg->osmux_dummy; /* Check if osmux is enabled for the specified connection */ if (conn->osmux.state != OSMUX_STATE_ACTIVATING) { diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index bc2673d..a3af94a 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -1639,9 +1639,9 @@ "Disable dummy padding\n") { if (strcmp(argv[0], "on") == 0) - g_cfg->osmux_dummy = 1; + g_cfg->osmux_dummy = true; else if (strcmp(argv[0], "off") == 0) - g_cfg->osmux_dummy = 0; + g_cfg->osmux_dummy = false; return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29647 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ifc3384f9871ddfdbd6282c6e03bf6a2dd8a09a9e Gerrit-Change-Number: 29647 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder 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: Simplify and constify param passing
by pespin 10 Oct '22

10 Oct '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29644 ) Change subject: osmux: Simplify and constify param passing ...................................................................... osmux: Simplify and constify param passing Parameters passed to several functions are rearrange to make code simplier to follow, as well as dependencies between the different functions. As a result, some parameters can be marked as const while doing the change. Change-Id: Idebd4a66630c16548f557632a54d6b7e1b3906fd --- M include/osmocom/mgcp/osmux.h M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c 3 files changed, 26 insertions(+), 36 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/mgcp/osmux.h b/include/osmocom/mgcp/osmux.h index 903d58b..c5f6871 100644 --- a/include/osmocom/mgcp/osmux.h +++ b/include/osmocom/mgcp/osmux.h @@ -10,13 +10,12 @@ int osmux_init(struct mgcp_trunk *trunk); int osmux_init_conn(struct mgcp_conn_rtp *conn); -int osmux_enable_conn(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn, - const struct osmo_sockaddr *addr); +int conn_osmux_enable(struct mgcp_conn_rtp *conn); void conn_osmux_disable(struct mgcp_conn_rtp *conn); int conn_osmux_allocate_local_cid(struct mgcp_conn_rtp *conn); void conn_osmux_release_local_cid(struct mgcp_conn_rtp *conn); int osmux_xfrm_to_osmux(char *buf, int buf_len, struct mgcp_conn_rtp *conn); -int osmux_send_dummy(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn); +int osmux_send_dummy(struct mgcp_conn_rtp *conn); void osmux_cid_pool_get(uint8_t osmux_cid); int osmux_cid_pool_get_next(void); @@ -26,8 +25,8 @@ enum osmux_state { OSMUX_STATE_DISABLED = 0, /* Osmux not being currently used by endp */ - OSMUX_STATE_ACTIVATING, /* Osmux was accepted in MGCP CRCX ACK. It can now be enabled by \ref osmux_enable_endpoint. */ - OSMUX_STATE_ENABLED, /* Osmux was initialized by \ref osmux_enable_endpoint and can process frames */ + OSMUX_STATE_ACTIVATING, /* Osmux was accepted in MGCP CRCX ACK. It can now be enabled by \ref conn_osmux_enable. */ + OSMUX_STATE_ENABLED, /* Osmux was initialized by \ref conn_osmux_enable and can process frames */ }; extern const struct value_string osmux_state_strs[]; diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index ebb41a6..f820276 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -151,11 +151,10 @@ /* Allocate free OSMUX handle */ static struct osmux_handle * -osmux_handle_alloc(struct mgcp_conn_rtp *conn, const struct osmo_sockaddr *rem_addr) +osmux_handle_alloc(const struct mgcp_trunk *trunk, const struct osmo_sockaddr *rem_addr) { struct osmux_handle *h; - struct mgcp_trunk *trunk = conn->conn->endp->trunk; - struct mgcp_config *cfg = trunk->cfg; + const struct mgcp_config *cfg = trunk->cfg; h = talloc_zero(trunk, struct osmux_handle); if (!h) @@ -186,7 +185,7 @@ /* Lookup existing handle for a specified address, if the handle can not be * found, the function will automatically allocate one */ static struct osmux_in_handle * -osmux_handle_find_or_create(struct mgcp_conn_rtp *conn, const struct osmo_sockaddr *rem_addr) +osmux_handle_find_or_create(const struct mgcp_trunk *trunk, const struct osmo_sockaddr *rem_addr) { struct osmux_handle *h; @@ -194,7 +193,7 @@ if (h != NULL) return h->in; - h = osmux_handle_alloc(conn, rem_addr); + h = osmux_handle_alloc(trunk, rem_addr); if (h == NULL) return NULL; @@ -245,7 +244,7 @@ /* Lookup the endpoint that corresponds to the specified address (port) */ static struct mgcp_conn_rtp* -osmux_conn_lookup(struct mgcp_trunk *trunk, uint8_t local_cid, const struct osmo_sockaddr *rem_addr) +osmux_conn_lookup(const struct mgcp_trunk *trunk, uint8_t local_cid, const struct osmo_sockaddr *rem_addr) { struct mgcp_endpoint *endp; struct mgcp_conn *conn = NULL; @@ -292,7 +291,7 @@ static void scheduled_from_osmux_tx_rtp_cb(struct msgb *msg, void *data) { struct mgcp_conn_rtp *conn = data; - struct mgcp_endpoint *endp = conn->conn->endp; + const struct mgcp_endpoint *endp = conn->conn->endp; struct osmux_handle *h = osmux_xfrm_input_get_deliver_cb_data(conn->osmux.in); struct osmo_rtp_msg_ctx *mc = OSMO_RTP_MSG_CTX(msg); *mc = (struct osmo_rtp_msg_ctx){ @@ -327,16 +326,13 @@ return msg; } -/* Updates endp osmux state and returns 0 if it can process messages, -1 otherwise */ -static int endp_osmux_state_check(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn, +/* Updates conn osmux state and returns 0 if it can process messages, -1 otherwise */ +static int conn_osmux_state_check(struct mgcp_conn_rtp *conn, bool sending) { - struct osmo_sockaddr rem_addr; - switch(conn->osmux.state) { case OSMUX_STATE_ACTIVATING: - rem_addr = conn->end.addr; - if (osmux_enable_conn(endp, conn, &rem_addr) < 0) { + if (conn_osmux_enable(conn) < 0) { LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR, "Could not enable osmux for conn on %s: %s\n", sending ? "sent" : "received", @@ -347,7 +343,7 @@ "Osmux %s CID %u towards %s is now enabled\n", sending ? "sent" : "received", sending ? conn->osmux.remote_cid : conn->osmux.local_cid, - osmo_sockaddr_to_str(&rem_addr)); + osmo_sockaddr_to_str(&conn->end.addr)); return 0; case OSMUX_STATE_ENABLED: return 0; @@ -362,8 +358,8 @@ /* Old versions of osmux used to send dummy packets [0x23 0x<CID>] to punch the * hole in the NAT. Let's handle them speficially. */ -static int osmux_handle_legacy_dummy(struct mgcp_trunk *trunk, const struct osmo_sockaddr *rem_addr, - struct msgb *msg) +static int osmux_handle_legacy_dummy(const struct mgcp_trunk *trunk, const struct osmo_sockaddr *rem_addr, + struct msgb *msg) { uint8_t osmux_cid = msg->data[1]; struct mgcp_conn_rtp *conn; @@ -375,7 +371,7 @@ goto out; } - endp_osmux_state_check(conn->conn->endp, conn, false); + conn_osmux_state_check(conn, false); /* Only needed to punch hole in firewall, it can be dropped */ out: msgb_free(msg); @@ -413,7 +409,6 @@ rem = msg->len; while((osmuxh = osmux_xfrm_output_pull(msg)) != NULL) { - struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn_src; conn_src = osmux_conn_lookup(trunk, osmuxh->circuit_id, &rem_addr); @@ -424,10 +419,9 @@ rem = msg->len; continue; } - endp = conn_src->conn->endp; mgcp_conn_watchdog_kick(conn_src->conn); - if (endp_osmux_state_check(endp, conn_src, false) == 0) { + if (conn_osmux_state_check(conn_src, false) == 0) { 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)); @@ -505,12 +499,9 @@ } /*! enable OSXMUX circuit for a specified connection. - * \param[in] endp mgcp endpoint (configuration) - * \param[in] conn connection to disable - * \param[in] addr IP address and port of remote OSMUX endpoint + * \param[in] conn connection to enable * \returns 0 on success, -1 on ERROR */ -int osmux_enable_conn(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn, - const struct osmo_sockaddr *rem_addr) +int conn_osmux_enable(struct mgcp_conn_rtp *conn) { /*! If osmux is enabled, initialize the output handler. This handler is * used to reconstruct the RTP flow from osmux. The RTP SSRC is @@ -521,8 +512,9 @@ * overlapping RTP SSRC traveling to the BTSes behind the BSC, * similarly, for flows traveling to the MSC. */ + const struct mgcp_trunk *trunk = conn->conn->endp->trunk; static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1); - uint16_t osmux_dummy = endp->trunk->cfg->osmux_dummy; + uint16_t osmux_dummy = trunk->cfg->osmux_dummy; /* Check if osmux is enabled for the specified connection */ if (conn->osmux.state != OSMUX_STATE_ACTIVATING) { @@ -539,7 +531,7 @@ return -1; } - conn->osmux.in = osmux_handle_find_or_create(conn, rem_addr); + conn->osmux.in = osmux_handle_find_or_create(trunk, &conn->end.addr); if (!conn->osmux.in) { LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR, "Cannot allocate input osmux handle for conn:%s\n", @@ -627,10 +619,9 @@ } /*! send RTP dummy packet to OSMUX connection port. - * \param[in] endp mcgp endpoint that holds the RTP connection * \param[in] conn associated RTP connection * \returns bytes sent, -1 on error */ -int osmux_send_dummy(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn) +int osmux_send_dummy(struct mgcp_conn_rtp *conn) { char ipbuf[INET6_ADDRSTRLEN]; struct osmux_hdr *osmuxh; @@ -646,7 +637,7 @@ * approach is simple though. */ - if (endp_osmux_state_check(endp, conn, true) < 0) + if (conn_osmux_state_check(conn, true) < 0) return 0; buf_len = sizeof(struct osmux_hdr) + osmo_amr_bytes(AMR_FT_0); diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index b4a4792..d92725a 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -330,7 +330,7 @@ return; if (mgcp_conn_rtp_is_osmux(conn)) - osmux_send_dummy(endp, conn); + osmux_send_dummy(conn); else mgcp_send_dummy(endp, conn); } -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29644 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Idebd4a66630c16548f557632a54d6b7e1b3906fd Gerrit-Change-Number: 29644 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • ...
  • 234
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.