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

February 2025

  • 1 participants
  • 1182 discussions
[S] Change in libosmocore[master]: codec: add some constant frames for HR and EFR
by laforge 27 Feb '25

27 Feb '25
Attention is currently required from: falconia. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmocore/+/39636?usp=email ) Change subject: codec: add some constant frames for HR and EFR ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39636?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2c510ac62a0786c137115c45eee7a48b9736265f Gerrit-Change-Number: 39636 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Thu, 27 Feb 2025 09:23:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-ci[master]: jobs/dahdi: build against linux latest stable too
by osmith 27 Feb '25

27 Feb '25
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/39629?usp=email ) Change subject: jobs/dahdi: build against linux latest stable too ...................................................................... jobs/dahdi: build against linux latest stable too As discussed with Harald, add a job that builds against the current latest release of the linux kernel. Change-Id: Ib5031958d8b707bbdf32af9e582b7dabd9bd803c --- M jobs/gerrit-verifications-dahdi.yml M jobs/master-builds-dahdi.yml 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/jobs/gerrit-verifications-dahdi.yml b/jobs/gerrit-verifications-dahdi.yml index de11b25..78909c8 100644 --- a/jobs/gerrit-verifications-dahdi.yml +++ b/jobs/gerrit-verifications-dahdi.yml @@ -6,6 +6,7 @@ - "linux-4.19.y" - "linux-5.10.y" - "linux-6.1.y" + - "linux-rolling-stable" jobs: - 'gerrit-dahdi-linux-{type}-{linux-ver}' diff --git a/jobs/master-builds-dahdi.yml b/jobs/master-builds-dahdi.yml index d6e2bfd..7ba5985 100644 --- a/jobs/master-builds-dahdi.yml +++ b/jobs/master-builds-dahdi.yml @@ -6,6 +6,7 @@ - "linux-4.19.y" - "linux-5.10.y" - "linux-6.1.y" + - "linux-rolling-stable" jobs: - 'master-dahdi-linux-{type}-{linux-ver}' -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/39629?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib5031958d8b707bbdf32af9e582b7dabd9bd803c Gerrit-Change-Number: 39629 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in dahdi-linux[master]: firmware: download from https
by osmith 27 Feb '25

27 Feb '25
osmith has submitted this change. ( https://gerrit.osmocom.org/c/dahdi-linux/+/39628?usp=email ) Change subject: firmware: download from https ...................................................................... firmware: download from https Change-Id: Ia0ecbd03984fa536275a97b06b5516be124ea69d --- M drivers/dahdi/firmware/Makefile 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: pespin: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/drivers/dahdi/firmware/Makefile b/drivers/dahdi/firmware/Makefile index fbd6582..b098b38 100644 --- a/drivers/dahdi/firmware/Makefile +++ b/drivers/dahdi/firmware/Makefile @@ -40,7 +40,7 @@ A4A_VERSION:=a0017 A4B_VERSION:=d001e -FIRMWARE_URL:=http://downloads.digium.com/pub/telephony/firmware/releases +FIRMWARE_URL:=https://downloads.digium.com/pub/telephony/firmware/releases ALL_FIRMWARE=FIRMWARE-OCT6114-032 FIRMWARE-OCT6114-064 FIRMWARE-OCT6114-128 FIRMWARE-OCT6114-256 ALL_FIRMWARE+=FIRMWARE-TC400M FIRMWARE-HX8 FIRMWARE-VPMOCT032 FIRMWARE-TE820 FIRMWARE-TE133 FIRMWARE-TE134 -- To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/39628?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: dahdi-linux Gerrit-Branch: master Gerrit-Change-Id: Ia0ecbd03984fa536275a97b06b5516be124ea69d Gerrit-Change-Number: 39628 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in dahdi-linux[master]: Revert "contrib/jenkins: set -Wno-error=address"
by osmith 27 Feb '25

27 Feb '25
osmith has submitted this change. ( https://gerrit.osmocom.org/c/dahdi-linux/+/39627?usp=email ) Change subject: Revert "contrib/jenkins: set -Wno-error=address" ...................................................................... Revert "contrib/jenkins: set -Wno-error=address" In patch I33ee446a32de3bb8d9fe966a2989994bf4bbd806 ("drivers/dahdi: fix always true cond") the warnings were fixed. Remove -Wnoerror=address again, we don't need it anymore. This reverts commit a210405427440651e2f3f611af070d9214a9eb46. Change-Id: I256aaf62216bc4405fe578dd9b65408c0ef90b15 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 8 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 5044602..6a39daf 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -29,11 +29,4 @@ git log -1 --pretty="%t - %s" make -j "$JOBS" modules_prepare - -# Wno-error=address: OS#6098 -make \ - -j "$JOBS" \ - -C "$TOPDIR" \ - KSRC="$KSRC" \ - KBUILD_MODPOST_WARN=1 \ - KCFLAGS="-Wno-error=address" +make -j "$JOBS" -C "$TOPDIR" KSRC="$KSRC" KBUILD_MODPOST_WARN=1 -- To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/39627?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: dahdi-linux Gerrit-Branch: master Gerrit-Change-Id: I256aaf62216bc4405fe578dd9b65408c0ef90b15 Gerrit-Change-Number: 39627 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: codec: add some constant frames for HR and EFR
by falconia 27 Feb '25

27 Feb '25
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/39636?usp=email ) Change subject: codec: add some constant frames for HR and EFR ...................................................................... codec: add some constant frames for HR and EFR With all 3 classic GSM codecs (FR, HR and EFR) sometimes a need arises for a constant fill frame, to be inserted when no good speech frame is available. For GSM-FR codec the substitution/muting spec (GSM 06.11) explicitly defines a silence frame for this purpose, but no such officially defined fill frames exist for HR or EFR. Those newer codecs do, however, have homing frames that all decoders are required to implement, and there is an unofficial silence frame for GSM-HR, observed as the output from the official encoder fed with all-zeros input. Add these 3 constant frames (HR silence, HR homing, EFR homing) to libosmocodec in order to make them easily usable in any application that may need them, including applications that cannot have ThemWi codec libraries as dependencies. Change-Id: I2c510ac62a0786c137115c45eee7a48b9736265f --- M include/osmocom/codec/codec.h M src/codec/gsm620.c M src/codec/gsm660.c 3 files changed, 49 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/36/39636/1 diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index 7a23e7f..008eab1 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -34,6 +34,9 @@ extern const uint16_t gsm690_4_75_bitorder[]; /* AMR 4.75 kbits */ extern const uint8_t osmo_gsm611_silence_frame[GSM_FR_BYTES]; +extern const uint8_t osmo_gsm620_silence_frame[GSM_HR_BYTES]; +extern const uint8_t osmo_gsm620_homing_frame[GSM_HR_BYTES]; +extern const uint8_t osmo_gsm660_homing_frame[GSM_EFR_BYTES]; extern const struct value_string osmo_amr_type_names[]; diff --git a/src/codec/gsm620.c b/src/codec/gsm620.c index 49ee724..a24d762 100644 --- a/src/codec/gsm620.c +++ b/src/codec/gsm620.c @@ -263,6 +263,37 @@ 81, /* Code 3:7 */ }; +/* + * There is no officially defined silence frame for GSM-HR codec like there is + * for GSM-FR. However, if one feeds all-zeros (complete silence) linear PCM + * input to the official GSM-HR encoder, the result will be an endless stream + * of these frames: + * + * R0=00 LPC=164,171,cb Int=0 Mode=0 + * s1=00,00,00 s2=00,00,00 s3=00,00,00 s4=00,00,00 + * + * The following const datum is the above unofficial GSM-HR silence frame in + * the packed RTP format of TS 101 318. + */ +const uint8_t osmo_gsm620_silence_frame[GSM_HR_BYTES] = { + 0x01, 0x64, 0xB8, 0xE5, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +/* + * GSM 06.20 defines, by reference to GSM 06.06 C code and GSM 06.07 test + * sequences, a special frame of codec parameters called the decoder homing + * frame (DHF). When a spec-compliant speech decoder processes this frame, + * it resets itself to the spec-defined home state. + * + * The following const datum is GSM-HR DHF in the packed RTP format of + * TS 101 318. + */ +const uint8_t osmo_gsm620_homing_frame[GSM_HR_BYTES] = { + 0x03, 0x71, 0xAF, 0x61, 0xC8, 0xF2, 0x80, + 0x25, 0x31, 0xC0, 0x00, 0x00, 0x00, 0x00 +}; + /*! Check whether RTP frame contains HR SID code word according to * TS 101 318 §5.2.2 * \param[in] rtp_payload Buffer with RTP payload diff --git a/src/codec/gsm660.c b/src/codec/gsm660.c index b15bdf3..fbb69c4 100644 --- a/src/codec/gsm660.c +++ b/src/codec/gsm660.c @@ -258,6 +258,21 @@ 246, /* 259 -> PULSE 4_10: b0 */ }; +/* + * GSM 06.60 defines (in Table 7) a special frame of codec parameters called + * the decoder homing frame (DHF). When a spec-compliant speech decoder + * processes this frame, it resets itself to the spec-defined home state. + * + * The following const datum is GSM-EFR DHF in the packed RTP format of + * TS 101 318 or RFC 3551. + */ +const uint8_t osmo_gsm660_homing_frame[GSM_EFR_BYTES] = { + 0xC0, 0x85, 0xEB, 0x49, 0x0F, 0xAA, 0xD6, 0x03, + 0xE3, 0xA1, 0x86, 0x07, 0xB0, 0xC4, 0x2C, 0x08, + 0x04, 0x80, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + static const uint8_t sid_code_word_bits[95] = { /* bit numbers are relative to "pure" EFR frame beginning, * not counting the signature bits. */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39636?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2c510ac62a0786c137115c45eee7a48b9736265f Gerrit-Change-Number: 39636 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org>
1 0
0 0
[M] Change in libosmo-sigtran[master]: asp: Refactor osmo_ss7_asp_restart() into smaller chunks
by pespin 26 Feb '25

26 Feb '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39634?usp=email ) Change subject: asp: Refactor osmo_ss7_asp_restart() into smaller chunks ...................................................................... asp: Refactor osmo_ss7_asp_restart() into smaller chunks This is a preparation patch towards fixing osmo_ss7_asp_restart() doing too many things at the same time, like tearing down the stream, FSMs, recreating them etc, not always in the best order. This function split steps into functions, better ordering the steps in the process. For instance, when reopening the stream_cli, make sure to close it beforehand. This would anyway be done inside osmo_stream_cli_open() but then all events (and hence logging) even weird, due to disconnect_cb triggering in the middle of the creation and then calling osmo_ss7_asp_restart() again while it is being called. The later will be fixed in a follow-up commit. Change-Id: I5c3461b724924f528b46f7fe815f017a5b4a1ff5 --- M src/osmo_ss7_asp.c M src/ss7_asp.h 2 files changed, 124 insertions(+), 90 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/34/39634/1 diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c index ab772ff..faf4a0a 100644 --- a/src/osmo_ss7_asp.c +++ b/src/osmo_ss7_asp.c @@ -612,95 +612,82 @@ static int xua_cli_disconnect_cb(struct osmo_stream_cli *cli); static int xua_cli_close_and_reconnect(struct osmo_stream_cli *cli); -int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp) + +static int ss7_asp_start_client(struct osmo_ss7_asp *asp) { - int rc; - char bufloc[512], bufrem[512]; uint8_t byte; + int rc; - OSMO_ASSERT(ss7_initialized); - ss7_asp_peer_snprintf(bufloc, sizeof(bufloc), &asp->cfg.local); - ss7_asp_peer_snprintf(bufrem, sizeof(bufrem), &asp->cfg.remote); - LOGPASP(asp, DLSS7, LOGL_INFO, "Restarting ASP %s, r=%s<->l=%s\n", - asp->cfg.name, bufrem, bufloc); - - if (!asp->cfg.is_server) { - /* We are in client mode now */ - if (asp->server) { - /* if we previously were in server mode, - * destroy it */ - osmo_stream_srv_destroy(asp->server); - asp->server = NULL; - } - if (!asp->client) - asp->client = osmo_stream_cli_create(asp); - if (!asp->client) { - LOGPASP(asp, DLSS7, LOGL_ERROR, "Unable to create stream" - " client for ASP %s\n", asp->cfg.name); - return -1; - } - osmo_stream_cli_set_name(asp->client, asp->cfg.name); - osmo_stream_cli_set_nodelay(asp->client, true); - osmo_stream_cli_set_addrs(asp->client, (const char **)asp->cfg.remote.host, asp->cfg.remote.host_cnt); - osmo_stream_cli_set_port(asp->client, asp->cfg.remote.port); - osmo_stream_cli_set_local_addrs(asp->client, (const char **)asp->cfg.local.host, asp->cfg.local.host_cnt); - osmo_stream_cli_set_local_port(asp->client, asp->cfg.local.port); - osmo_stream_cli_set_proto(asp->client, asp->cfg.trans_proto); - osmo_stream_cli_set_reconnect_timeout(asp->client, 5); - osmo_stream_cli_set_connect_cb(asp->client, xua_cli_connect_cb); - osmo_stream_cli_set_disconnect_cb(asp->client, xua_cli_disconnect_cb); - switch (asp->cfg.proto) { - case OSMO_SS7_ASP_PROT_IPA: - OSMO_ASSERT(asp->cfg.trans_proto == IPPROTO_TCP); - osmo_stream_cli_set_read_cb2(asp->client, ipa_cli_read_cb); - osmo_stream_cli_set_segmentation_cb(asp->client, osmo_ipa_segmentation_cb); - break; - case OSMO_SS7_ASP_PROT_M3UA: - if (asp->cfg.trans_proto == IPPROTO_SCTP) { - osmo_stream_cli_set_read_cb2(asp->client, xua_cli_read_cb); - osmo_stream_cli_set_segmentation_cb(asp->client, NULL); - } else if (asp->cfg.trans_proto == IPPROTO_TCP) { - osmo_stream_cli_set_read_cb2(asp->client, m3ua_tcp_cli_read_cb); - osmo_stream_cli_set_segmentation_cb(asp->client, xua_tcp_segmentation_cb); - } else - OSMO_ASSERT(0); - break; - default: - OSMO_ASSERT(asp->cfg.trans_proto == IPPROTO_SCTP); + if (!asp->client) + asp->client = osmo_stream_cli_create(asp); + if (!asp->client) { + LOGPASP(asp, DLSS7, LOGL_ERROR, "Unable to create stream" + " client for ASP %s\n", asp->cfg.name); + return -1; + } + osmo_stream_cli_set_name(asp->client, asp->cfg.name); + osmo_stream_cli_set_nodelay(asp->client, true); + osmo_stream_cli_set_addrs(asp->client, (const char **)asp->cfg.remote.host, asp->cfg.remote.host_cnt); + osmo_stream_cli_set_port(asp->client, asp->cfg.remote.port); + osmo_stream_cli_set_local_addrs(asp->client, (const char **)asp->cfg.local.host, asp->cfg.local.host_cnt); + osmo_stream_cli_set_local_port(asp->client, asp->cfg.local.port); + osmo_stream_cli_set_proto(asp->client, asp->cfg.trans_proto); + osmo_stream_cli_set_reconnect_timeout(asp->client, 5); + osmo_stream_cli_set_connect_cb(asp->client, xua_cli_connect_cb); + osmo_stream_cli_set_disconnect_cb(asp->client, xua_cli_disconnect_cb); + switch (asp->cfg.proto) { + case OSMO_SS7_ASP_PROT_IPA: + OSMO_ASSERT(asp->cfg.trans_proto == IPPROTO_TCP); + osmo_stream_cli_set_read_cb2(asp->client, ipa_cli_read_cb); + osmo_stream_cli_set_segmentation_cb(asp->client, osmo_ipa_segmentation_cb); + break; + case OSMO_SS7_ASP_PROT_M3UA: + if (asp->cfg.trans_proto == IPPROTO_SCTP) { osmo_stream_cli_set_read_cb2(asp->client, xua_cli_read_cb); osmo_stream_cli_set_segmentation_cb(asp->client, NULL); - break; - } - osmo_stream_cli_set_data(asp->client, asp); - byte = 1; /*AUTH is needed by ASCONF. enable, don't abort socket creation if AUTH can't be enabled */ - osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_SOCKOPT_AUTH_SUPPORTED, &byte, sizeof(byte)); - byte = 1; /* enable, don't abort socket creation if ASCONF can't be enabled */ - osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_SOCKOPT_ASCONF_SUPPORTED, &byte, sizeof(byte)); - if (asp->cfg.sctp_init.num_ostreams_present) - osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_NUM_OSTREAMS, - &asp->cfg.sctp_init.num_ostreams_value, - sizeof(asp->cfg.sctp_init.num_ostreams_value)); - if (asp->cfg.sctp_init.max_instreams_present) - osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_MAX_INSTREAMS, - &asp->cfg.sctp_init.max_instreams_value, - sizeof(asp->cfg.sctp_init.max_instreams_value)); - if (asp->cfg.sctp_init.max_attempts_present) - osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_MAX_ATTEMPTS, - &asp->cfg.sctp_init.max_attempts_value, - sizeof(asp->cfg.sctp_init.max_attempts_value)); - if (asp->cfg.sctp_init.max_init_timeo_present) - osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_TIMEOUT, - &asp->cfg.sctp_init.max_init_timeo_value, - sizeof(asp->cfg.sctp_init.max_init_timeo_value)); - rc = osmo_stream_cli_open(asp->client); - if (rc < 0) { - LOGPASP(asp, DLSS7, LOGL_ERROR, "Unable to open stream" - " client for ASP %s, %s ==> %s\n", asp->cfg.name, bufloc, bufrem); - /* we don't return error in here because osmo_stream_cli_open() - will continue to retry (due to timeout being explicitly set with - osmo_stream_cli_set_reconnect_timeout() above) to connect so the error is transient */ - } - } else { + } else if (asp->cfg.trans_proto == IPPROTO_TCP) { + osmo_stream_cli_set_read_cb2(asp->client, m3ua_tcp_cli_read_cb); + osmo_stream_cli_set_segmentation_cb(asp->client, xua_tcp_segmentation_cb); + } else + OSMO_ASSERT(0); + break; + default: + OSMO_ASSERT(asp->cfg.trans_proto == IPPROTO_SCTP); + osmo_stream_cli_set_read_cb2(asp->client, xua_cli_read_cb); + osmo_stream_cli_set_segmentation_cb(asp->client, NULL); + break; + } + osmo_stream_cli_set_data(asp->client, asp); + byte = 1; /*AUTH is needed by ASCONF. enable, don't abort socket creation if AUTH can't be enabled */ + osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_SOCKOPT_AUTH_SUPPORTED, &byte, sizeof(byte)); + byte = 1; /* enable, don't abort socket creation if ASCONF can't be enabled */ + osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_SOCKOPT_ASCONF_SUPPORTED, &byte, sizeof(byte)); + if (asp->cfg.sctp_init.num_ostreams_present) + osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_NUM_OSTREAMS, + &asp->cfg.sctp_init.num_ostreams_value, + sizeof(asp->cfg.sctp_init.num_ostreams_value)); + if (asp->cfg.sctp_init.max_instreams_present) + osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_MAX_INSTREAMS, + &asp->cfg.sctp_init.max_instreams_value, + sizeof(asp->cfg.sctp_init.max_instreams_value)); + if (asp->cfg.sctp_init.max_attempts_present) + osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_MAX_ATTEMPTS, + &asp->cfg.sctp_init.max_attempts_value, + sizeof(asp->cfg.sctp_init.max_attempts_value)); + if (asp->cfg.sctp_init.max_init_timeo_present) + osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_INIT_TIMEOUT, + &asp->cfg.sctp_init.max_init_timeo_value, + sizeof(asp->cfg.sctp_init.max_init_timeo_value)); + rc = osmo_stream_cli_open(asp->client); + return rc; +} + +/* Force stream disconnection, which should trigger disconnect_cb/close_cb() and + * announce disconnection to upper layers. */ +int ss7_asp_disconnect_stream(struct osmo_ss7_asp *asp) +{ + /* First tear down previous state if existing: */ + if (asp->cfg.is_server) { /* We are in server mode now */ if (asp->client) { /* if we previously were in client mode, @@ -708,18 +695,64 @@ osmo_stream_cli_destroy(asp->client); asp->client = NULL; } - /* FIXME: ensure we have a SCTP server */ - LOGPASP(asp, DLSS7, LOGL_NOTICE, "ASP Restart for server " - "not implemented yet!\n"); + } else { + /* We are in client mode now */ + if (asp->server) { + /* if we previously were in server mode, + * destroy it */ + osmo_stream_srv_destroy(asp->server); + asp->server = NULL; + } + if (asp->client) { + /* Make sure we close the previous stream before starting a new one: */ + osmo_stream_cli_close(asp->client); + } } + return 0; +} - /* (re)start the ASP FSM */ - if (asp->fi) +int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp) +{ + int rc; + char bufloc[512], bufrem[512]; + + OSMO_ASSERT(ss7_initialized); + ss7_asp_peer_snprintf(bufloc, sizeof(bufloc), &asp->cfg.local); + ss7_asp_peer_snprintf(bufrem, sizeof(bufrem), &asp->cfg.remote); + LOGPASP(asp, DLSS7, LOGL_INFO, "Restarting ASP %s, r=%s<->l=%s\n", + asp->cfg.name, bufrem, bufloc); + + /* First tear down previous state if existing: */ + ss7_asp_disconnect_stream(asp); + + /* The ASP FSM must be terminated *after* tearing down the conn, so that + * DISCONNECT events go up the stack */ + if (asp->fi) { osmo_fsm_inst_term(asp->fi, OSMO_FSM_TERM_REQUEST, NULL); - OSMO_ASSERT(!asp->fi); + OSMO_ASSERT(!asp->fi); + } if ((rc = xua_asp_fsm_start(asp, asp->cfg.role, LOGL_DEBUG)) < 0) return rc; OSMO_ASSERT(asp->fi); + + /* Now start the new stream: */ + + if (asp->cfg.is_server) { + /* We are in server mode now */ + /* FIXME: ensure we have a SCTP server */ + LOGPASP(asp, DLSS7, LOGL_NOTICE, "ASP Restart for server " + "not implemented yet!\n"); + } else { + /* We are in client mode now */ + rc = ss7_asp_start_client(asp); + if (rc < 0) { + LOGPASP(asp, DLSS7, LOGL_ERROR, "Unable to open stream" + " client for ASP %s, %s ==> %s\n", asp->cfg.name, bufloc, bufrem); + /* we don't return error in here because osmo_stream_cli_open() + will continue to retry (due to timeout being explicitly set with + osmo_stream_cli_set_reconnect_timeout() above) to connect so the error is transient */ + } + } return 0; } diff --git a/src/ss7_asp.h b/src/ss7_asp.h index e2bd46d..377274a 100644 --- a/src/ss7_asp.h +++ b/src/ss7_asp.h @@ -103,6 +103,7 @@ bool ss7_asp_set_default_peer_hosts(struct osmo_ss7_asp *asp); bool ss7_asp_is_started(const struct osmo_ss7_asp *asp); int ss7_asp_get_fd(const struct osmo_ss7_asp *asp); +int ss7_asp_disconnect_stream(struct osmo_ss7_asp *asp); int ss7_asp_apply_peer_primary_address(const struct osmo_ss7_asp *asp); int ss7_asp_apply_primary_address(const struct osmo_ss7_asp *asp); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39634?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I5c3461b724924f528b46f7fe815f017a5b4a1ff5 Gerrit-Change-Number: 39634 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-sigtran[master]: default_lm_fsm: Trigger ASP restart by disconnecting the stream
by pespin 26 Feb '25

26 Feb '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39635?usp=email ) Change subject: default_lm_fsm: Trigger ASP restart by disconnecting the stream ...................................................................... default_lm_fsm: Trigger ASP restart by disconnecting the stream Previous behavior was to restart the ASP top-to-bottom in the stack, which doesn't play well with the disconnect_cb(). For instance, upon LM FSM timer callback, osmo_ss7_asp_restart() would call osmo_stream_cli_open() which in turn would call osmo_stream_close(). As a result, in that code path events were being sent to the LM FSM itself notifying the disconnection of the SCTP conn, which in turn would call osmo_ss7_asp_restart() again, and everything ended up in a weird state where it couldn't create sockets properly. The better approach is to, from LM FSM, trigger disconnection of the SCTP conn, which will in turn, through disconnect_cb(), send the SCTP disconnect notification up the stack, which should then trigger re-establishment of the SCTP conn in the SCTP client case. Change-Id: I21ebc3cd716a0bcc74da0a789032570f038e119d --- M src/xua_default_lm_fsm.c 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/35/39635/1 diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c index 7c27b19..fc01605 100644 --- a/src/xua_default_lm_fsm.c +++ b/src/xua_default_lm_fsm.c @@ -207,7 +207,7 @@ /* we have been waiting for the ASP to come up, but it * failed to do so */ LOGPFSML(fi, LOGL_NOTICE, "Peer didn't send any ASP_UP in time! Restarting ASP\n"); - restart_asp(fi); + ss7_asp_disconnect_stream(lmp->asp); break; case SS7_ASP_LM_T_WAIT_NOTIFY: if (lmp->asp->cfg.quirks & OSMO_SS7_ASP_QUIRK_NO_NOTIFY) { @@ -226,7 +226,7 @@ as = find_first_as_in_asp(lmp->asp); if (!as) { LOGPFSML(fi, LOGL_ERROR, "Unable to find AS!\n"); - restart_asp(fi); + ss7_asp_disconnect_stream(lmp->asp); return 0; } /* Fill in settings from first AS (TODO: multiple AS support) */ @@ -237,11 +237,11 @@ case SS7_ASP_LM_T_WAIT_NOTIY_RKM: /* No AS has reported via NOTIFY even after dynamic RKM * configuration */ - restart_asp(fi); + ss7_asp_disconnect_stream(lmp->asp); break; case SS7_ASP_LM_T_WAIT_RK_REG_RESP: /* timeout of registration of routing key */ - restart_asp(fi); + ss7_asp_disconnect_stream(lmp->asp); break; } return 0; @@ -285,12 +285,12 @@ oxp = data; if (oxp->u.rk_reg.status != M3UA_RKM_REG_SUCCESS) { LOGPFSML(fi, LOGL_NOTICE, "Received RKM_REG_RSP with negative result\n"); - restart_asp(fi); + ss7_asp_disconnect_stream(lmp->asp); } else { unsigned long timeout_sec; rc = handle_reg_conf(fi, oxp->u.rk_reg.key.l_rk_id, oxp->u.rk_reg.key.context); if (rc < 0) - restart_asp(fi); + ss7_asp_disconnect_stream(lmp->asp); /* RKM registration was successful, we can transition to WAIT_NOTIFY * state and assume that an NOTIFY/AS-INACTIVE arrives within * T_WAIT_NOTIFY_RKM seconds */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39635?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I21ebc3cd716a0bcc74da0a789032570f038e119d Gerrit-Change-Number: 39635 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmo-sigtran[master]: asp: Make sure asp->fi is set to NULL when freeing the object
by pespin 26 Feb '25

26 Feb '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39633?usp=email ) Change subject: asp: Make sure asp->fi is set to NULL when freeing the object ...................................................................... asp: Make sure asp->fi is set to NULL when freeing the object The asp->fi is freed in lots of places through osmo_fsm_inst_term(). Make sure the pointer is actually set to NULL to catch potential accesses to it after being freed. Change-Id: I1e6a25f6db695a16bd05ae4ec481df6e14cf65b5 --- M src/osmo_ss7_asp.c M src/xua_asp_fsm.c M src/xua_asp_fsm.h 3 files changed, 41 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/33/39633/1 diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c index 44ffa68..ab772ff 100644 --- a/src/osmo_ss7_asp.c +++ b/src/osmo_ss7_asp.c @@ -716,8 +716,10 @@ /* (re)start the ASP FSM */ if (asp->fi) osmo_fsm_inst_term(asp->fi, OSMO_FSM_TERM_REQUEST, NULL); - asp->fi = xua_asp_fsm_start(asp, asp->cfg.role, LOGL_DEBUG); - + OSMO_ASSERT(!asp->fi); + if ((rc = xua_asp_fsm_start(asp, asp->cfg.role, LOGL_DEBUG)) < 0) + return rc; + OSMO_ASSERT(asp->fi); return 0; } diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 089c31c..12640d6 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -714,7 +714,13 @@ { struct xua_asp_fsm_priv *xafp = fi->priv; + if (!xafp) + return; + osmo_timer_del(&xafp->t_ack.timer); + + if (xafp->asp) + xafp->asp->fi = NULL; } static const struct osmo_fsm_state xua_asp_states[] = { @@ -779,16 +785,16 @@ .cleanup = xua_asp_fsm_cleanup, }; -static struct osmo_fsm_inst *ipa_asp_fsm_start(struct osmo_ss7_asp *asp, - enum osmo_ss7_asp_role role, int log_level); +static int ipa_asp_fsm_start(struct osmo_ss7_asp *asp, + enum osmo_ss7_asp_role role, int log_level); -/*! \brief Start a new ASP finite stae machine for given ASP +/*! \brief Start a new ASP finite stae machine for given ASP (stored in asp->fi) * \param[in] asp Application Server Process for which to start FSM * \param[in] role Role (ASP, SG, IPSP) of this FSM * \param[in] log_level Logging Level for ASP FSM logging - * \returns FSM instance on success; NULL on error */ -struct osmo_fsm_inst *xua_asp_fsm_start(struct osmo_ss7_asp *asp, - enum osmo_ss7_asp_role role, int log_level) + * \returns 0 on success; negative on error */ +int xua_asp_fsm_start(struct osmo_ss7_asp *asp, + enum osmo_ss7_asp_role role, int log_level) { struct osmo_fsm_inst *fi; struct xua_asp_fsm_priv *xafp; @@ -802,14 +808,17 @@ xafp = talloc_zero(fi, struct xua_asp_fsm_priv); if (!xafp) { osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL); - return NULL; + return -ENOMEM; } xafp->role = role; xafp->asp = asp; fi->priv = xafp; - return fi; + /* Attach FSM to ASP: */ + asp->fi = fi; + + return 0; } @@ -1124,6 +1133,14 @@ return -1; } +static void ipa_asp_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) +{ + struct ipa_asp_fsm_priv *iafp = fi->priv; + + if (iafp && iafp->asp) + iafp->asp->fi = NULL; +} + static const struct osmo_fsm_state ipa_asp_states[] = { [IPA_ASP_S_DOWN] = { .in_event_mask = S(XUA_ASP_E_M_ASP_UP_REQ) | @@ -1200,16 +1217,17 @@ S(XUA_ASP_E_ASPSM_BEAT_ACK) | S(XUA_ASP_E_AS_ASSIGNED), .allstate_action = ipa_asp_allstate, + .cleanup = ipa_asp_fsm_cleanup, }; -/*! \brief Start a new ASP finite state machine for given ASP +/*! \brief Start a new ASP finite state machine for given ASP (stored on asp->fi) * \param[in] asp Application Server Process for which to start FSM * \param[in] role Role (ASP, SG, IPSP) of this FSM * \param[in] log_level Logging Level for ASP FSM logging - * \returns FSM instance on success; NULL on error */ -static struct osmo_fsm_inst *ipa_asp_fsm_start(struct osmo_ss7_asp *asp, - enum osmo_ss7_asp_role role, int log_level) + * \returns 0 on success; negative on error */ +static int ipa_asp_fsm_start(struct osmo_ss7_asp *asp, + enum osmo_ss7_asp_role role, int log_level) { struct osmo_fsm_inst *fi; struct ipa_asp_fsm_priv *iafp; @@ -1223,7 +1241,7 @@ iafp = talloc_zero(fi, struct ipa_asp_fsm_priv); if (!iafp) { osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL); - return NULL; + return -ENOMEM; } if (as) { @@ -1251,8 +1269,11 @@ fi->priv = iafp; + /* Attach FSM to ASP: */ + asp->fi = fi; + if (can_start && role == OSMO_SS7_ASP_ROLE_ASP) osmo_fsm_inst_dispatch(fi, XUA_ASP_E_M_ASP_UP_REQ, NULL); - return fi; + return 0; } diff --git a/src/xua_asp_fsm.h b/src/xua_asp_fsm.h index ca44514..ab19e36 100644 --- a/src/xua_asp_fsm.h +++ b/src/xua_asp_fsm.h @@ -42,5 +42,5 @@ extern struct osmo_fsm xua_asp_fsm; extern struct osmo_fsm ipa_asp_fsm; -struct osmo_fsm_inst *xua_asp_fsm_start(struct osmo_ss7_asp *asp, - enum osmo_ss7_asp_role role, int log_level); +int xua_asp_fsm_start(struct osmo_ss7_asp *asp, + enum osmo_ss7_asp_role role, int log_level); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39633?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I1e6a25f6db695a16bd05ae4ec481df6e14cf65b5 Gerrit-Change-Number: 39633 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-abis[master]: rtp2trau HR to DL: validate ToC octet of RFC 5993
by pespin 26 Feb '25

26 Feb '25
Attention is currently required from: falconia. pespin has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39626?usp=email ) Change subject: rtp2trau HR to DL: validate ToC octet of RFC 5993 ...................................................................... Patch Set 2: Code-Review+1 (1 comment) File src/trau/trau_rtp_conv.c: https://gerrit.osmocom.org/c/libosmo-abis/+/39626/comment/83da1da0_224fe334… : PS1, Line 671: if (data[0] & 0xD0) > The check in question needs to be performed in two functions, HR to TRAU-16k-DL and HR to TRAU-8k-DL […] Done -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ibbaa1e1e12254eaf75a999dd1b58e2145eff158c Gerrit-Change-Number: 39626 Gerrit-PatchSet: 2 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Wed, 26 Feb 2025 21:14:54 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: falconia <falcon(a)freecalypso.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in ...osmo-s1gw[master]: sctp_server: invalidate handler's Pid on 'EXIT'
by pespin 26 Feb '25

26 Feb '25
Attention is currently required from: fixeria. pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39631?usp=email ) Change subject: sctp_server: invalidate handler's Pid on 'EXIT' ...................................................................... Patch Set 1: (1 comment) Commit Message: https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39631/comment/6bd3e0db_62b2… : PS1, Line 11: happens, the current implementation sends an EOF to the eNB and simply > I meant graceful termination of the SCTP association, which is performed by calling `gen_sctp:eof/2` […] yes, because it definetly doesn't send an EOF, probably an SCTP SHUTDOWN, I was confused by this. -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39631?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I21fedf8579baa54dc1e7ade348abffd7ee9b04c4 Gerrit-Change-Number: 39631 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 26 Feb 2025 21:13:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • ...
  • 119
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.