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
Change in osmo-mgw[master]: Improve logging on AMR OA<->BWE conversion failure
by pespin 26 Oct '22

26 Oct '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29877 ) Change subject: Improve logging on AMR OA<->BWE conversion failure ...................................................................... Improve logging on AMR OA<->BWE conversion failure Change-Id: I7c7dd10650c1d249c723d6781585b343004bd64d --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/77/29877/1 diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 72d97fd..d93e695 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -737,6 +737,7 @@ struct rtp_hdr *rtp_hdr; unsigned int payload_len; int rc; + bool orig_is_oa; if (msgb_length(msg) < sizeof(struct rtp_hdr)) { LOGPENDP(endp, DRTP, LOGL_ERROR, "AMR RTP packet too short (%d < %zu)\n", msgb_length(msg), sizeof(struct rtp_hdr)); @@ -744,10 +745,10 @@ } rtp_hdr = (struct rtp_hdr *)msgb_data(msg); - payload_len = msgb_length(msg) - sizeof(struct rtp_hdr); + orig_is_oa = osmo_amr_is_oa(rtp_hdr->data, payload_len); - if (osmo_amr_is_oa(rtp_hdr->data, payload_len)) { + if (orig_is_oa) { if (!target_is_oa) /* Input data is oa an target format is bwe * ==> convert */ @@ -769,7 +770,10 @@ } if (rc < 0) { LOGPENDP(endp, DRTP, LOGL_ERROR, - "AMR RTP packet conversion failed\n"); + "RTP AMR packet conversion %s->%s failed: %s\n", + orig_is_oa ? "OA" : "BWE", + target_is_oa ? "OA" : "BWE", + osmo_hexdump(rtp_hdr->data, payload_len)); return -EINVAL; } @@ -1226,7 +1230,8 @@ conn_dst->end.codec->param.amr_octet_aligned); if (rc < 0) { LOGPENDP(endp, DRTP, LOGL_ERROR, - "Error in AMR octet-aligned <-> bandwidth-efficient mode conversion\n"); + "Error in AMR octet-aligned <-> bandwidth-efficient mode conversion (target=%s)\n", + conn_dst->end.codec->param.amr_octet_aligned ? "octet-aligned" : "bandwidth-efficient"); break; } } else if (rtp_end->rfc5993_hr_convert && -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29877 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I7c7dd10650c1d249c723d6781585b343004bd64d Gerrit-Change-Number: 29877 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'
by fixeria 26 Oct '22

26 Oct '22
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29876 ) Change subject: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient' ...................................................................... Patch Set 1: (1 comment) File src/osmo-bsc/bsc_vty.c: https://gerrit.osmocom.org/c/osmo-bsc/+/29876/comment/a8192d04_ed4abc01 PS1, Line 3219: "payload fields packed (AoIP) (DEPRECATED option with typo)\n") We don't really want this deprecated variant to be present in documentation and shown in the VTY help, right? I suggest defining an alias as follows: ALIAS_DEPRECATED(cfg_net_msc_amr_octet_align, deprecated_cfg_net_msc_amr_octet_align_cmd, "amr-payload bandwith-efficient", "Set AMR payload framing mode\n" "payload fields packed (AoIP)\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29876 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59 Gerrit-Change-Number: 29876 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 26 Oct 2022 10:25:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-trx[master]: Transceiver::expectedCorrType(): RACH is always 8-bit on PTCCH/U
by fixeria 26 Oct '22

26 Oct '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/29874 ) Change subject: Transceiver::expectedCorrType(): RACH is always 8-bit on PTCCH/U ...................................................................... Transceiver::expectedCorrType(): RACH is always 8-bit on PTCCH/U It does not make sense for the MS to use 11-bit Access Bursts on PTCCH/U because the payload does not matter, only the ToA does. Change-Id: I5fb9f1c6810cdcd26a885b183e414d01d422eb28 --- M Transceiver52M/Transceiver.cpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index 42aa93e..cbe1e27 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -584,7 +584,7 @@ case XIII: { int mod52 = burstFN % 52; if ((mod52 == 12) || (mod52 == 38)) - return cfg->ext_rach ? EXT_RACH : RACH; + return RACH; /* RACH is always 8-bit on PTCCH/U */ else if ((mod52 == 25) || (mod52 == 51)) return IDLE; else /* Enable 8-PSK burst detection if EDGE is enabled */ -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/29874 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I5fb9f1c6810cdcd26a885b183e414d01d422eb28 Gerrit-Change-Number: 29874 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(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-bsc[master]: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'
by pespin 26 Oct '22

26 Oct '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29876 ) Change subject: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient' ...................................................................... vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient' Related: OS#6161 Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59 --- M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/lchan_rtp_fsm.c 2 files changed, 12 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/76/29876/1 diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 11fcfad..d5df739 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -2524,7 +2524,7 @@ if (msc->amr_octet_aligned) vty_out(vty, " amr-payload octet-aligned%s", VTY_NEWLINE); else - vty_out(vty, " amr-payload bandwith-efficient%s", VTY_NEWLINE); + vty_out(vty, " amr-payload bandwidth-efficient%s", VTY_NEWLINE); } static void msc_write_nri(struct vty *vty, struct bsc_msc_data *msc, bool verbose); @@ -3212,17 +3212,24 @@ DEFUN_USRATTR(cfg_net_msc_amr_octet_align, cfg_net_msc_amr_octet_align_cmd, X(BSC_VTY_ATTR_NEW_LCHAN), - "amr-payload (octet-aligned|bandwith-efficient", + "amr-payload (octet-aligned|bandwidth-efficient|bandwith-efficient)", "Set AMR payload framing mode\n" "payload fields aligned on octet boundaries\n" - "payload fields packed (AoIP)\n") + "payload fields packed (AoIP)\n" + "payload fields packed (AoIP) (DEPRECATED option with typo)\n") { struct bsc_msc_data *data = bsc_msc_data(vty); if (strcmp(argv[0], "octet-aligned") == 0) data->amr_octet_aligned = true; - else if (strcmp(argv[0], "bandwith-efficient") == 0) + else if (strcmp(argv[0], "bandwidth-efficient") == 0) data->amr_octet_aligned = false; + else { + data->amr_octet_aligned = false; + vty_out(vty, "%% Command 'amr-payload': Option 'bandwith-efficient' " + "containing typo is deprecaed, use 'bandwidth-efficient' instead!%s", + VTY_NEWLINE); + } return CMD_SUCCESS; } diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c index b788e99..466b168 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -919,7 +919,7 @@ if (bss_side && verb_info->codecs[0] == CODEC_AMR_8000_1) { /* FIXME: At the moment all BTSs we support are using the * octet-aligned payload format. However, in the future - * we may support BTSs that are using bandwith-efficient + * we may support BTSs that are using bandwidth-efficient * format. In this case we will have to add functionality * that distinguishes by the BTS model which mode to use. */ verb_info->param.amr_octet_aligned = true; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29876 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59 Gerrit-Change-Number: 29876 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-mgw[master]: osmux: Rename function and pass msgb directly to it
by pespin 26 Oct '22

26 Oct '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29873 ) Change subject: osmux: Rename function and pass msgb directly to it ...................................................................... osmux: Rename function and pass msgb directly to it The new prefix now matches other related functions acting on an osmux connection. Pass the msgb to it so simplify new msgb copy. Change-Id: I8c0121485d0c96f70fe8bcbdb150793d428183ff --- M include/osmocom/mgcp/osmux.h M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c 3 files changed, 10 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved 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 044a33f..4ea6da7 100644 --- a/include/osmocom/mgcp/osmux.h +++ b/include/osmocom/mgcp/osmux.h @@ -15,7 +15,7 @@ int conn_osmux_enable(struct mgcp_conn_rtp *conn); void conn_osmux_disable(struct mgcp_conn_rtp *conn); int conn_osmux_event_rx_crcx_mdcx(struct mgcp_conn_rtp *conn); -int osmux_xfrm_to_osmux(char *buf, int buf_len, struct mgcp_conn_rtp *conn); +int conn_osmux_send_rtp(struct mgcp_conn_rtp *conn, struct msgb *msg); int osmux_send_dummy(struct mgcp_conn_rtp *conn); void osmux_cid_pool_get(uint8_t osmux_cid); diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 6edb4ae..3248cbd 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1020,7 +1020,7 @@ LOGPENDP(endp, DRTP, LOGL_DEBUG, "endpoint type is MGCP_RTP_OSMUX, " "using osmux_xfrm_to_osmux() to forward data through OSMUX\n"); - return osmux_xfrm_to_osmux((char*)msgb_data(msg), msgb_length(msg), conn_dst); + return conn_osmux_send_rtp(conn_dst, msg); case MGCP_RTP_IUUP: if (proto == MGCP_PROTO_RTP) { LOGPENDP(endp, DRTP, LOGL_DEBUG, diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 0fd1ba7..e1380ec 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -201,14 +201,13 @@ } /*! send RTP packet through OSMUX connection. - * \param[in] buf rtp data - * \param[in] buf_len length of rtp data * \param[in] conn associated RTP connection + * \param[in] msg msgb containing an RTP AMR packet * \returns 0 on success, -1 on ERROR */ -int osmux_xfrm_to_osmux(char *buf, int buf_len, struct mgcp_conn_rtp *conn) +int conn_osmux_send_rtp(struct mgcp_conn_rtp *conn, struct msgb *msg) { int ret; - struct msgb *msg; + struct msgb *msg2; if (!conn->end.output_enabled) { rtpconn_osmux_rate_ctr_inc(conn, OSMUX_RTP_PACKETS_TX_DROPPED_CTR); @@ -222,14 +221,13 @@ return -1; } - msg = msgb_alloc(4096, "RTP"); - if (!msg) + /* msg is not owned by us and will be freed by the caller stack upon return: */ + msg2 = msgb_copy_c(conn->conn, msg, "osmux-rtp-send"); + if (!msg2) return -1; - memcpy(msg->data, buf, buf_len); - msgb_put(msg, buf_len); - while ((ret = osmux_xfrm_input(conn->osmux.in, msg, conn->osmux.remote_cid)) > 0) { + while ((ret = osmux_xfrm_input(conn->osmux.in, msg2, conn->osmux.remote_cid)) > 0) { /* batch full, build and deliver it */ osmux_xfrm_input_deliver(conn->osmux.in); } @@ -237,7 +235,7 @@ 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)); + rtpconn_osmux_rate_ctr_add(conn, OSMUX_AMR_OCTETS_TX_CTR, msgb_length(msg2) - sizeof(struct rtp_hdr)); } return 0; } 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29873 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I8c0121485d0c96f70fe8bcbdb150793d428183ff Gerrit-Change-Number: 29873 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
Change in osmo-mgw[master]: osmux: Make sure RTP AMR feed to osmux is in octet-aligned mode
by pespin 26 Oct '22

26 Oct '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29867 ) Change subject: osmux: Make sure RTP AMR feed to osmux is in octet-aligned mode ...................................................................... osmux: Make sure RTP AMR feed to osmux is in octet-aligned mode The Osmux implementation in libosmo-netif expects to work with RTP AMR in octet-aligned mode. Therefore, if the peer connection received RTP AMR in bandwidth-efficient mode, we need to convert it to octet-aligned before feeding the packets to the osmux layer. Related: SYS#6161 Change-Id: Ifeec44241079f7a31da12745c92bfdc4fb222f3a --- M include/osmocom/mgcp/mgcp_network.h M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c 3 files changed, 18 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/include/osmocom/mgcp/mgcp_network.h b/include/osmocom/mgcp/mgcp_network.h index a3d57f0..e95907d 100644 --- a/include/osmocom/mgcp/mgcp_network.h +++ b/include/osmocom/mgcp/mgcp_network.h @@ -183,3 +183,5 @@ int id); void forward_data_tap(int fd, struct mgcp_rtp_tap *tap, struct msgb *msg); uint32_t mgcp_get_current_ts(unsigned codec_rate); + +int amr_oa_bwe_convert(struct mgcp_endpoint *endp, struct msgb *msg, bool target_is_oa); diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 3248cbd..72d97fd 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -717,11 +717,18 @@ return 0; } -/* For AMR RTP two framing modes are defined RFC3267. There is a bandwith +/*! Convert msg to AMR RTP framing mode specified by target_is_oa. + * \param[in] endp MGCP Endpoint where this message belongs to (used for logging purposes) + * \param[in] msg Message containing an AMR RTP payload (in octet-aligned or bandwidth-efficient format). + * \param[in] target_is_oa the target framing mode that msg will contain after this function succeeds. + * \returns The size of the new RTP AMR content on success, negative on error. + * + * For AMR RTP two framing modes are defined RFC3267. There is a bandwidth * efficient encoding scheme where all fields are packed together one after * another and an octet aligned mode where all fields are aligned to octet - * boundaries. This function is used to convert between the two modes */ -static int amr_oa_bwe_convert(struct mgcp_endpoint *endp, struct msgb *msg, + * boundaries. This function is used to convert between the two modes. + */ +int amr_oa_bwe_convert(struct mgcp_endpoint *endp, struct msgb *msg, bool target_is_oa) { /* NOTE: the msgb has an allocated length of RTP_BUF_SIZE, so there is diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index e1380ec..5df5446 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -226,6 +226,12 @@ if (!msg2) return -1; + /* Osmux implementation works with AMR OA only, make sure we convert to it if needed: */ + if (amr_oa_bwe_convert(conn->conn->endp, msg2, true) < 0) { + LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR, + "Error converting to AMR octet-aligned mode\n"); + return -1; + } while ((ret = osmux_xfrm_input(conn->osmux.in, msg2, conn->osmux.remote_cid)) > 0) { /* batch full, build and deliver it */ 5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29867 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ifeec44241079f7a31da12745c92bfdc4fb222f3a Gerrit-Change-Number: 29867 Gerrit-PatchSet: 6 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-mgw[master]: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/
by pespin 26 Oct '22

26 Oct '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29865 ) Change subject: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/ ...................................................................... mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/ The previous name is misleading since the function is not really sending stuff over a socket, but rather handling/dispatching the incoming message internally (and finally later it may be sent over a socket under some conditions). Change-Id: Idaf791997b8438a4aede50f614afa0d55ad41faa --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 13 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 432c2b1..6edb4ae 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -982,9 +982,16 @@ return 0; } -/* Send RTP data. Possible options are standard RTP packet - * transmission or trsmission via an osmux connection */ -static int mgcp_send_rtp(struct mgcp_conn_rtp *conn_dst, struct msgb *msg) +/*! Dispatch msg bridged from the sister conn in the endpoint. + * \param[in] conn_dst The destination conn that should handle and transmit the content to + * its peer outside MGW. + * \param[in] msg msgb containing an RTP pkt received by the sister conn in the endpoint, + * \returns bytes sent, -1 on error. + * + * Possible options are standard RTP packet transmission, transmission + * via IuUP or transmission via an osmux connection. + */ +static int mgcp_conn_rtp_dispatch_rtp(struct mgcp_conn_rtp *conn_dst, struct msgb *msg) { struct osmo_rtp_msg_ctx *mc = OSMO_RTP_MSG_CTX(msg); enum rtp_proto proto = mc->proto; @@ -1315,7 +1322,7 @@ osmo_sockaddr_ntop(&from_addr->u.sa, ipbuf), osmo_sockaddr_port(&conn->u.rtp.end.addr.u.sa)); } - return mgcp_send_rtp(conn_src, msg); + return mgcp_conn_rtp_dispatch_rtp(conn_src, msg); } /* Find a destination connection. */ @@ -1347,7 +1354,7 @@ } /* Dispatch RTP packet to destination RTP connection */ - return mgcp_send_rtp(&conn_dst->u.rtp, msg); + return mgcp_conn_rtp_dispatch_rtp(&conn_dst->u.rtp, msg); } /*! dispatch incoming RTP packet to E1 subslot, handle RTCP packets locally. @@ -1380,7 +1387,7 @@ osmo_sockaddr_ntop(&from_addr->u.sa, ipbuf), osmo_sockaddr_port(&conn->u.rtp.end.addr.u.sa)); } - return mgcp_send_rtp(conn_src, msg); + return mgcp_conn_rtp_dispatch_rtp(conn_src, msg); } /* Forward to E1 */ -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29865 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Idaf791997b8438a4aede50f614afa0d55ad41faa Gerrit-Change-Number: 29865 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> 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]: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/
by osmith 26 Oct '22

26 Oct '22
Attention is currently required from: neels, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29865 ) Change subject: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/ ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29865 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Idaf791997b8438a4aede50f614afa0d55ad41faa Gerrit-Change-Number: 29865 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 26 Oct 2022 09:59:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP fro...
by pespin 26 Oct '22

26 Oct '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29875 ) Change subject: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP from MSC to MGW ...................................................................... sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP from MSC to MGW In SCCPlite, the BSC receives the CN-side MGCP from the MSC through an IPA conn, and it then forwards those messages to its co-located MGW through a rawUDP socket created at startup. This forwarding UDP socket still relied exclusively on the "mgw.conf" struct which was filled only by the old VTY interface which was been deprecated lately. This patch moves the mgw-pool setup before the msc setup so that if the VTY config file still uses the old VTY, the single MGW is added to the MGW pool through mgcp_client_pool_register_single(). It then simply picks the first available MGW from the pool when creating the raw UDP MGCP-forwarding socket. This means SCCPLite is still left with supporting only 1 MGW. If more than one MGW is defined in the pool, then when the call is being set up a different MGW could be picked from the pool while the CN-side MGCP would still be sent to the MGW pool selected at osm-bsc startup. This limitation coul be removed later on by adding a new VTY command under the "msc" to pin calls for an MSC to an MGW with a given "mgw_nr" from the pool, and that same MGW be looked for in the pool every time a new call is being established. Another possibility would be to avoid creating the "connected" UDP socket at osmo-bsc startup, and rather use it in non-connected mode and transmit (sendto) using the mgcp_client remote address during call establishment. In any case, this is left as future excercise since so far there hasn't been any need for multiple MGWs in SCCPLite setups. Related: SYS#5987 Change-Id: If105dee52b8d36161c759f979eaef4579b47d365 --- M src/osmo-bsc/osmo_bsc_main.c M src/osmo-bsc/osmo_bsc_msc.c 2 files changed, 16 insertions(+), 10 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/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 863ceea..dd8e696 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -989,6 +989,9 @@ } } + if (bsc_mgw_setup() != 0) + exit(1); + llist_for_each_entry(msc, &bsc_gsmnet->mscs, entry) { if (osmo_bsc_msc_init(msc) != 0) { LOGP(DMSC, LOGL_ERROR, "Failed to start up. Exiting.\n"); @@ -996,9 +999,6 @@ } } - if (bsc_mgw_setup() != 0) - exit(1); - if (osmo_bsc_sigtran_init(&bsc_gsmnet->mscs) != 0) { LOGP(DNM, LOGL_ERROR, "Failed to initialize sigtran backhaul.\n"); exit(1); diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c index 1dd486f..4d5d5b2 100644 --- a/src/osmo-bsc/osmo_bsc_msc.c +++ b/src/osmo-bsc/osmo_bsc_msc.c @@ -40,6 +40,7 @@ #include <osmocom/abis/ipa.h> #include <osmocom/mgcp_client/mgcp_client.h> +#include <osmocom/mgcp_client/mgcp_client_pool.h> #include <sys/socket.h> #include <netinet/tcp.h> @@ -163,27 +164,32 @@ int osmo_bsc_msc_init(struct bsc_msc_data *msc) { struct gsm_network *net = msc->network; - uint16_t mgw_port; + struct mgcp_client *mgcp_cli; int rc; /* Everything below refers to SCCP-Lite MSC connections only. */ if (msc_is_aoip(msc)) return 0; - if (net->mgw.conf->remote_port >= 0) - mgw_port = net->mgw.conf->remote_port; - else - mgw_port = MGCP_CLIENT_REMOTE_PORT_DEFAULT; - + /* Note: MGW is preselected here at startup, which means currently + * osmo-bsc configured for SCCPLite doesn't support MGW pools with more + * than 1 MGW. + */ + mgcp_cli = mgcp_client_pool_get(net->mgw.mgw_pool); + OSMO_ASSERT(mgcp_cli); rc = osmo_sock_init2_ofd(&msc->mgcp_ipa.ofd, AF_UNSPEC, SOCK_DGRAM, IPPROTO_UDP, msc->mgcp_ipa.local_addr, msc->mgcp_ipa.local_port, - net->mgw.conf->remote_addr, mgw_port, + mgcp_client_remote_addr_str(mgcp_cli), + mgcp_client_remote_port(mgcp_cli), OSMO_SOCK_F_BIND | OSMO_SOCK_F_CONNECT); + mgcp_client_pool_put(mgcp_cli); if (rc < 0) { LOGP(DMSC, LOGL_ERROR, "msc %u: Could not create/connect/bind MGCP proxy socket: %d\n", msc->nr, rc); return rc; } + LOGP(DMSC, LOGL_INFO, "msc %u: Socket forwarding IPA-encapsulated MGCP messages towards MGW: %s\n", + msc->nr, osmo_sock_get_name2(msc->mgcp_ipa.ofd.fd)); return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29875 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: If105dee52b8d36161c759f979eaef4579b47d365 Gerrit-Change-Number: 29875 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: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[master]: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP fro...
by pespin 26 Oct '22

26 Oct '22
Attention is currently required from: osmith, fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29875 ) Change subject: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP from MSC to MGW ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29875 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: If105dee52b8d36161c759f979eaef4579b47d365 Gerrit-Change-Number: 29875 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: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 26 Oct 2022 09:59:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • ...
  • 234
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.