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

June 2024

  • 1 participants
  • 1566 discussions
[S] Change in osmo-hnbgw[master]: improve HNBAP error logging
by neels 11 Jun '24

11 Jun '24
Attention is currently required from: dexter. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36141?usp=email ) Change subject: improve HNBAP error logging ...................................................................... Patch Set 3: (1 comment) Patchset: PS3: i'm giving this the benefit of the doubt, because it is so trivial -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36141?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I17d2809f59087d32e7c11a3ada1d3fadf6f0b660 Gerrit-Change-Number: 36141 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: dexter <pmaier(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 11 Jun 2024 00:40:38 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-hnbgw[master]: improve HNBAP error logging
by neels 11 Jun '24

11 Jun '24
Attention is currently required from: dexter. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36141?usp=email ) Change subject: improve HNBAP error logging ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36141?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I17d2809f59087d32e7c11a3ada1d3fadf6f0b660 Gerrit-Change-Number: 36141 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: dexter <pmaier(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 11 Jun 2024 00:39:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-hnbgw[master]: nft-kpi: remove X34 drifting: adjust delay by elapsed time
by Jenkins Builder 11 Jun '24

11 Jun '24
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/37188?usp=email ) Change subject: nft-kpi: remove X34 drifting: adjust delay by elapsed time ...................................................................... Patch Set 1: (1 comment) File src/osmo-hnbgw/nft_kpi.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-16677): https://gerrit.osmocom.org/c/osmo-hnbgw/+/37188/comment/86626ffa_5787dfd3 PS1, Line 729: LOGP(DNFT, LOGL_DEBUG, "nft-kpi: scheduling timer: period is %ld.%06ld s, next occurence in %ld.%06ld s\n", 'occurence' may be misspelled - perhaps 'occurrence'? -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/37188?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I04f572890c04a48bb19c59f613a492ef96624baa Gerrit-Change-Number: 37188 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 11 Jun 2024 00:38:29 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-hnbgw[master]: nft-kpi: log errors of counter retrieval
by neels 11 Jun '24

11 Jun '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/37187?usp=email ) Change subject: nft-kpi: log errors of counter retrieval ...................................................................... nft-kpi: log errors of counter retrieval Make sure errors of getting counters from nft are logged. Some context: we'll try again each X34 period, hence this is only a problem when the error persists. For example, when the get-counters thread is faster than the maintenance thread can even create the nft table initially, this error will show. We could add a definite check whether the maintenance thread has created the tables yet, and wait for that event. But this complexity is not really needed: it is fine to just fail getting counters once or twice. Related: SYS#6773 Change-Id: I84340482e4a5bfcac158a21c9378a9511fa5ea10 --- M src/osmo-hnbgw/nft_kpi.c 1 file changed, 30 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/87/37187/1 diff --git a/src/osmo-hnbgw/nft_kpi.c b/src/osmo-hnbgw/nft_kpi.c index 5f2359b..4fa932f 100644 --- a/src/osmo-hnbgw/nft_kpi.c +++ b/src/osmo-hnbgw/nft_kpi.c @@ -990,7 +990,14 @@ break; case NFT_THREAD_GET_COUNTERS: - main_thread_handle_get_counters_resp(req); + if (req->rc) { + /* Maybe we requested counters before the table was created by the maintenance thread. If so, + * it's not harmful and we can just try again next time. */ + LOGP(DNFT, LOGL_ERROR, "Retrieving counters from nftables failed. Trying again (timer X34).\n"); + } else { + main_thread_handle_get_counters_resp(req); + } + /* Schedule the next counter retrieval. */ nft_kpi_get_counters_schedule(); break; -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/37187?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I84340482e4a5bfcac158a21c9378a9511fa5ea10 Gerrit-Change-Number: 37187 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-hnbgw[master]: dbg log: nft kpi: clarify nr of rate ctrs vs nr of hnbp
by neels 11 Jun '24

11 Jun '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/37186?usp=email ) Change subject: dbg log: nft kpi: clarify nr of rate ctrs vs nr of hnbp ...................................................................... dbg log: nft kpi: clarify nr of rate ctrs vs nr of hnbp Change-Id: I84346d3151f3040967f39a3a6e6db2e29bc1e2ec --- M src/osmo-hnbgw/nft_kpi.c 1 file changed, 12 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/86/37186/1 diff --git a/src/osmo-hnbgw/nft_kpi.c b/src/osmo-hnbgw/nft_kpi.c index 9eff35e..5f2359b 100644 --- a/src/osmo-hnbgw/nft_kpi.c +++ b/src/osmo-hnbgw/nft_kpi.c @@ -951,7 +951,7 @@ struct hnb_persistent *hnbp = NULL; int count = 0; - LOGP(DNFT, LOGL_DEBUG, "main thread: updating %zu hnbp with rate counters from nft response\n", + LOGP(DNFT, LOGL_DEBUG, "main thread: updating %zu rate counters from nft response (2 counters per hnbp)\n", req->get_counters.counters_len); for (; c < end; c++) { @@ -965,8 +965,8 @@ count++; } - LOGP(DNFT, LOGL_DEBUG, "main thread: rate counters for %d of %zu hnbp have incremented\n", count, - req->get_counters.counters_len); + LOGP(DNFT, LOGL_DEBUG, "main thread: %d of %zu rate counters have incremented (2 counters per hnbp)\n", + count, req->get_counters.counters_len); } /* main thread: handle responses from a worker thread */ -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/37186?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I84346d3151f3040967f39a3a6e6db2e29bc1e2ec Gerrit-Change-Number: 37186 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-hnbgw[master]: nft-kpi: remove X34 drifting: adjust delay by elapsed time
by neels 11 Jun '24

11 Jun '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/37188?usp=email ) Change subject: nft-kpi: remove X34 drifting: adjust delay by elapsed time ...................................................................... nft-kpi: remove X34 drifting: adjust delay by elapsed time Change-Id: I04f572890c04a48bb19c59f613a492ef96624baa --- M include/osmocom/hnbgw/hnbgw.h M src/osmo-hnbgw/nft_kpi.c 2 files changed, 48 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/88/37188/1 diff --git a/include/osmocom/hnbgw/hnbgw.h b/include/osmocom/hnbgw/hnbgw.h index 36358b1..a647abd 100644 --- a/include/osmocom/hnbgw/hnbgw.h +++ b/include/osmocom/hnbgw/hnbgw.h @@ -499,6 +499,7 @@ struct { bool active; struct osmo_timer_list get_counters_timer; + struct timespec next_timer; } nft_kpi; }; diff --git a/src/osmo-hnbgw/nft_kpi.c b/src/osmo-hnbgw/nft_kpi.c index 4fa932f..aff981f 100644 --- a/src/osmo-hnbgw/nft_kpi.c +++ b/src/osmo-hnbgw/nft_kpi.c @@ -690,15 +690,47 @@ /* main thread */ static void nft_kpi_get_counters_schedule(void) { - unsigned long period_s; + struct timespec now; + struct timespec period; + struct timespec diff; + struct timespec *next = &g_hnbgw->nft_kpi.next_timer; unsigned long period_us = osmo_tdef_get(hnbgw_T_defs, -34, OSMO_TDEF_US, 1000000); - if (period_us < 1) - period_us = 1; - period_s = period_us / 1000000; - period_us %= 1000000; + period.tv_sec = period_us / 1000000; + period.tv_nsec = (period_us % 1000000) * 1000; + + /* Try to keep the period of getting counters close to the configured period, i.e. don't drift by the time it + * takes to read counters. */ + osmo_clock_gettime(CLOCK_MONOTONIC, &now); + + if (!next->tv_sec && !next->tv_nsec) { + /* Not yet initialized. Schedule to get counters one 'period' from 'now': + * Set 'next' to 'now', and the period is added by timespecadd() below. + * (We could retrieve counters immediately -- but at startup counters are then queried even before the + * nft table was created by the maintenance thread. That is not harmful, but it causes an ugly error + * message in the logs. So rather wait one period.) + */ + *next = now; + } + timespecadd(next, &period, next); + if (timespeccmp(next, &now, <)) { + /* The time that has elapsed since last scheduling counter retrieval is already more than the configured + * period. Continue counting the time period from 'now', and ask for counters right now. */ + timespecsub(&now, next, &diff); + LOGP(DNFT, LOGL_NOTICE, "nft-kpi: retrieving counters took %ld.%06ld s longer" + " than the timeout configured in timer hnbgw X34.\n", diff.tv_sec, diff.tv_nsec / 1000); + *next = now; + nft_kpi_get_counters_cb(NULL); + return; + } + + /* next > now, wait for the remaining time. */ + timespecsub(next, &now, &diff); + LOGP(DNFT, LOGL_DEBUG, "nft-kpi: scheduling timer: period is %ld.%06ld s, next occurence in %ld.%06ld s\n", + period.tv_sec, period.tv_nsec / 1000, + diff.tv_sec, diff.tv_nsec / 1000); osmo_timer_setup(&g_hnbgw->nft_kpi.get_counters_timer, nft_kpi_get_counters_cb, NULL); - osmo_timer_schedule(&g_hnbgw->nft_kpi.get_counters_timer, period_s, period_us); + osmo_timer_schedule(&g_hnbgw->nft_kpi.get_counters_timer, diff.tv_sec, diff.tv_nsec / 1000); } /* from main(), initialize all worker threads and other nft state. */ -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/37188?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I04f572890c04a48bb19c59f613a492ef96624baa Gerrit-Change-Number: 37188 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-hnbgw[master]: prevent use-after-free after FSM instance termination
by neels 11 Jun '24

11 Jun '24
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/37147?usp=email ) Change subject: prevent use-after-free after FSM instance termination ...................................................................... prevent use-after-free after FSM instance termination - Set osmo_fsm_set_dealloc_ctx(OTC_SELECT) in osmo-hnbgw's main(). - Only dispatch RANAP when FSM instances aren't terminated. This way we possibly pre-empt use-after-free crashes for deallocating FSM "nests" for obscure corner cases. Use-after-free is a general problem for FSM design. For this, we created osmo_fsm_set_dealloc_ctx(): When an FSM is terminated, move it to a separate talloc context, instead of being deallocated. An actual use-after-free was observed as described in OS#6484, but that needs a separate, orthogonal fix: When the Iuh link is lost while the CN link is waiting for SCCP CC or CREF -- the better solution is described in OS#6085: don't wait for CC at all, just dispatch DISCONN to SCCP-SCOC. So even though the code where a crash was observed will be removed, this patch is a general safeguard against corner case crashes, improving general stability. Related: OS#6484 Change-Id: Ib41e1a996aaa03221e73643636140947ac8f99e2 --- M src/osmo-hnbgw/context_map_rua.c M src/osmo-hnbgw/context_map_sccp.c M src/osmo-hnbgw/osmo_hnbgw_main.c 3 files changed, 42 insertions(+), 0 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/osmo-hnbgw/context_map_rua.c b/src/osmo-hnbgw/context_map_rua.c index 3c6ea1e..7286906 100644 --- a/src/osmo-hnbgw/context_map_rua.c +++ b/src/osmo-hnbgw/context_map_rua.c @@ -158,6 +158,11 @@ static int handle_rx_rua(struct osmo_fsm_inst *fi, struct msgb *ranap_msg) { struct hnbgw_context_map *map = fi->priv; + + /* If the FSM instance has already terminated, don't dispatch anything. */ + if (fi->proc.terminating) + return 0; + if (!msg_has_l2_data(ranap_msg)) return 0; diff --git a/src/osmo-hnbgw/context_map_sccp.c b/src/osmo-hnbgw/context_map_sccp.c index 10ddaf2..511577c 100644 --- a/src/osmo-hnbgw/context_map_sccp.c +++ b/src/osmo-hnbgw/context_map_sccp.c @@ -198,6 +198,10 @@ struct hnbgw_context_map *map = fi->priv; int rc; + /* If the FSM instance has already terminated, don't dispatch anything. */ + if (fi->proc.terminating) + return 0; + /* When there was no message received along with the received event, then there is nothing to forward to RUA. */ if (!msg_has_l2_data(ranap_msg)) return 0; diff --git a/src/osmo-hnbgw/osmo_hnbgw_main.c b/src/osmo-hnbgw/osmo_hnbgw_main.c index 2f71251..3e715b0 100644 --- a/src/osmo-hnbgw/osmo_hnbgw_main.c +++ b/src/osmo-hnbgw/osmo_hnbgw_main.c @@ -360,6 +360,8 @@ signal(SIGUSR2, &signal_handler); osmo_init_ignore_signals(); + osmo_fsm_set_dealloc_ctx(OTC_SELECT); + while (1) { rc = osmo_select_main_ctx(0); if (rc < 0) -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/37147?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: Ib41e1a996aaa03221e73643636140947ac8f99e2 Gerrit-Change-Number: 37147 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: s1gw: initial osmo-s1gw testsuite skeleton
by fixeria 10 Jun '24

10 Jun '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37183?usp=email ) Change subject: s1gw: initial osmo-s1gw testsuite skeleton ...................................................................... s1gw: initial osmo-s1gw testsuite skeleton Change-Id: If0521cbfe9576c2529bf13579899bc64a50e45b3 Related: SYS#6772 --- M Makefile A s1gw/S1GW_Tests.cfg A s1gw/S1GW_Tests.default A s1gw/S1GW_Tests.ttcn A s1gw/gen_links.sh A s1gw/regen_makefile.sh 6 files changed, 129 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/83/37183/1 diff --git a/Makefile b/Makefile index d216aab..5a35e6e 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,7 @@ pcu \ pgw \ remsim \ + s1gw \ sccp \ selftest \ sgsn \ diff --git a/s1gw/S1GW_Tests.cfg b/s1gw/S1GW_Tests.cfg new file mode 100644 index 0000000..336be14 --- /dev/null +++ b/s1gw/S1GW_Tests.cfg @@ -0,0 +1,18 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"../Common.cfg" +# testsuite specific configuration, not expected to change +"./S1GW_Tests.default" + +# Local configuration below + +[LOGGING] + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] + +[MAIN_CONTROLLER] + +[EXECUTE] +S1GW_Tests.control diff --git a/s1gw/S1GW_Tests.default b/s1gw/S1GW_Tests.default new file mode 100644 index 0000000..1c220d8 --- /dev/null +++ b/s1gw/S1GW_Tests.default @@ -0,0 +1,12 @@ +[LOGGING] +FileMask := LOG_ALL | TTCN_MATCHING; +mtc.FileMask := ERROR | WARNING | PARALLEL | VERDICTOP; + +[TESTPORT_PARAMETERS] + + +[MODULE_PARAMETERS] + +[MAIN_CONTROLLER] + +[EXECUTE] diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn new file mode 100644 index 0000000..7f9bd44 --- /dev/null +++ b/s1gw/S1GW_Tests.ttcn @@ -0,0 +1,31 @@ +/* OsmoS1GW (S1AP Gateway) test suite in TTCN-3 + * + * (C) 2024 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * Author: Vadim Yanitskiy <vyanitskiy(a)sysmocom.de> + * + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +module S1GW_Tests { + +import from General_Types all; +import from Native_Functions all; +import from IPL4asp_Types all; +import from Misc_Helpers all; +import from S1AP_Types all; +import from S1AP_Templates all; +import from S1AP_PDU_Descriptions all; +import from S1AP_IEs all; +import from S1AP_PDU_Contents all; +import from S1AP_Constants all; +import from Osmocom_Types all; + +control { +} + +} diff --git a/s1gw/gen_links.sh b/s1gw/gen_links.sh new file mode 100755 index 0000000..9587c59 --- /dev/null +++ b/s1gw/gen_links.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +BASEDIR=../deps + +. ../gen_links.sh.inc + +DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src +FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" +FILES+=" TCCEncoding_Functions.ttcn TCCEncoding.cc " +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src +FILES="Socket_API_Definitions.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.IPL4asp/src +FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" +gen_links $DIR $FILES + +DIR=../library/s1ap +FILES="S1AP_CommonDataTypes.asn S1AP_Constants.asn S1AP_Containers.asn S1AP_IEs.asn " +FILES+="S1AP_PDU_Contents.asn S1AP_PDU_Descriptions.asn " +FILES+="S1AP_EncDec.cc S1AP_Types.ttcn S1AP_Templates.ttcn " +gen_links $DIR $FILES + +DIR=../library +FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn " +FILES+="S1AP_CodecPort.ttcn S1AP_CodecPort_CtrlFunctDef.cc S1AP_CodecPort_CtrlFunct.ttcn " +gen_links $DIR $FILES + +ignore_pp_results diff --git a/s1gw/regen_makefile.sh b/s1gw/regen_makefile.sh new file mode 100755 index 0000000..7eef51b --- /dev/null +++ b/s1gw/regen_makefile.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +NAME=S1GW_Tests + +FILES=" + *.asn + *.ttcn + IPL4asp_PT.cc + IPL4asp_discovery.cc + Native_FunctionDefs.cc + S1AP_CodecPort_CtrlFunctDef.cc + S1AP_EncDec.cc + TCCConversion.cc + TCCEncoding.cc + TCCInterface.cc +" + + +export CPPFLAGS_TTCN3=" +" + +../regen-makefile.sh -e $NAME $FILES + +sed -i -e '/^CPPFLAGS/ s/$/ `pkg-config --cflags libfftranscode`/' Makefile +sed -i -e '/^LDFLAGS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile +sed -i -e '/^LINUX_LIBS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37183?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: If0521cbfe9576c2529bf13579899bc64a50e45b3 Gerrit-Change-Number: 37183 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: s1gw: add first testcases TC_setup and TC_setup_multi
by fixeria 10 Jun '24

10 Jun '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37185?usp=email ) Change subject: s1gw: add first testcases TC_setup and TC_setup_multi ...................................................................... s1gw: add first testcases TC_setup and TC_setup_multi Change-Id: Ia2fc53306ac09064c071fd9ff86cf7ccfc42fcec Related: SYS#6772 --- M s1gw/S1GW_Tests.default M s1gw/S1GW_Tests.ttcn 2 files changed, 174 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/85/37185/1 diff --git a/s1gw/S1GW_Tests.default b/s1gw/S1GW_Tests.default index 1c220d8..ceca1b2 100644 --- a/s1gw/S1GW_Tests.default +++ b/s1gw/S1GW_Tests.default @@ -1,5 +1,6 @@ [LOGGING] FileMask := LOG_ALL | TTCN_MATCHING; +ConsoleMask := ERROR | WARNING | PARALLEL | VERDICTOP | USER; mtc.FileMask := ERROR | WARNING | PARALLEL | VERDICTOP; [TESTPORT_PARAMETERS] diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index 7f9bd44..ad42a59 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -14,18 +14,180 @@ module S1GW_Tests { import from General_Types all; +import from Osmocom_Types all; import from Native_Functions all; import from IPL4asp_Types all; import from Misc_Helpers all; + +import from S1AP_CodecPort all; +import from S1AP_CodecPort_CtrlFunct all; import from S1AP_Types all; import from S1AP_Templates all; import from S1AP_PDU_Descriptions all; import from S1AP_IEs all; import from S1AP_PDU_Contents all; import from S1AP_Constants all; -import from Osmocom_Types all; + +import from S1AP_Server all; + +modulepar { + charstring mp_s1gw_ip := "127.0.1.1"; + charstring mp_mme_bind_ip := "127.0.2.10"; +} + +private type record of ConnHdlr ConnHdlrList; + +type component ConnHdlr extends S1APSRV_ConnHdlr { + port S1AP_CODEC_PT S1AP_ENB; + var ConnectionId g_s1ap_conn_id := -1; +}; + +type component test_CT { + var S1AP_Server_CT vc_S1APSRV; +}; + +template Global_ENB_ID +ts_Global_ENB_ID(integer enb_id := 0, + OCT3 plmn_id := '00f110'O) := { + pLMNidentity := plmn_id, + eNB_ID := { + macroENB_ID := int2bit(enb_id, 20) + }, + iE_Extensions := omit +} + +function f_init_s1ap_srv() runs on test_CT { + var S1APSRV_ConnParams cpars := { + local_ip := mp_mme_bind_ip, + local_port := 36412 + }; + + vc_S1APSRV := S1AP_Server_CT.create("S1APSRV-" & testcasename()); + vc_S1APSRV.start(S1AP_Server.main(cpars)); +} + +type union ConnHdlrPars { + integer seed +}; + +type function void_fn(ConnHdlrPars pars) runs on ConnHdlr; + +function f_ConnHdlr_spawn(void_fn fn, ConnHdlrPars pars) +runs on test_CT return ConnHdlr { + var ConnHdlr vc_conn; + + vc_conn := ConnHdlr.create("ConnHdlr-" & testcasename()); + connect(vc_conn:S1AP_CONN, vc_S1APSRV:S1AP_CLIENT); + connect(vc_conn:S1AP_PROC, vc_S1APSRV:S1AP_PROC); + vc_conn.start(derefers(fn)(pars)); + + return vc_conn; +} + +function f_ConnHdlr_connect() runs on ConnHdlr { + var Result res; + + map(self:S1AP_ENB, system:S1AP_CODEC_PT); + res := S1AP_CodecPort_CtrlFunct.f_IPL4_connect(S1AP_ENB, + mp_s1gw_ip, 36412, + "0.0.0.0", 0, -1, + { sctp := valueof(ts_SCTP) }); + if (not ispresent(res.connId)) { + setverdict(fail, "Could not create an S1AP socket, check your configuration"); + mtc.stop; + } + g_s1ap_conn_id := res.connId; + + log("eNB connection established"); +} + +function f_ConnHdlr_disconnect() runs on ConnHdlr { + var Result res; + + S1AP_CodecPort_CtrlFunct.f_IPL4_close(S1AP_ENB, g_s1ap_conn_id, + { sctp := valueof(ts_SCTP) }); + g_s1ap_conn_id := -1; + unmap(self:S1AP_ENB, system:S1AP_CODEC_PT); + + S1AP_CONN.receive(S1APSRV_Event:S1APSRV_EVENT_CONN_DOWN); + + log("eNB connection closed"); +} + +function f_ConnHdlr_setup(Global_ENB_ID genb_id) runs on ConnHdlr { + var S1AP_PDU pdu; + timer T; + + var SupportedTAs supported_tas_dummy := { + { + tAC := '0000'O, + broadcastPLMNs := { '00f000'O }, + iE_Extensions := omit + } + }; + + S1AP_ENB.send(t_S1AP_Send(g_s1ap_conn_id, + ts_S1AP_SetupReq(genb_id, + supported_tas_dummy, + v32))); + T.start(1.0); + alt { + [] S1AP_CONN.receive(S1APSRV_Event:S1APSRV_EVENT_CONN_UP) { repeat; } + [] S1AP_CONN.receive(tr_S1AP_SetupReq) { + setverdict(pass); + T.stop; + } + [] S1AP_CONN.receive(S1AP_PDU:?) -> value pdu { + setverdict(fail, "Rx unexpected S1AP PDU: ", pdu); + T.stop; + } + [] T.timeout { + setverdict(fail, "Timeout waiting for S1AP SetupReq"); + } + } +} + + +function f_TC_setup(ConnHdlrPars pars) runs on ConnHdlr { + var Global_ENB_ID genb_id := valueof(ts_Global_ENB_ID(pars.seed)); + + f_ConnHdlr_register(genb_id); + + f_ConnHdlr_connect(); + f_ConnHdlr_setup(genb_id); + f_sleep(0.5); /* keep the connection idle for some time */ + f_ConnHdlr_disconnect(); + + f_ConnHdlr_unregister(genb_id); +} +testcase TC_setup() runs on test_CT { + var ConnHdlrPars pars := { seed := 0 }; + var ConnHdlr vc_conn; + + f_init_s1ap_srv(); + + vc_conn := f_ConnHdlr_spawn(refers(f_TC_setup), pars); + vc_conn.done; +} +testcase TC_setup_multi() runs on test_CT { + var ConnHdlrList vc_conns := { }; + + f_init_s1ap_srv(); + + for (var integer i := 0; i < 42; i := i + 1) { + var ConnHdlrPars pars := { seed := i }; + var ConnHdlr vc_conn := f_ConnHdlr_spawn(refers(f_TC_setup), pars); + vc_conns := vc_conns & { vc_conn }; + } + + for (var integer i := 0; i < 42; i := i + 1) { + vc_conns[i].done; + } +} control { + execute( TC_setup() ); + execute( TC_setup_multi() ); } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37185?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia2fc53306ac09064c071fd9ff86cf7ccfc42fcec Gerrit-Change-Number: 37185 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: s1gw: add S1AP Server (dispatcher) component
by fixeria 10 Jun '24

10 Jun '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37184?usp=email ) Change subject: s1gw: add S1AP Server (dispatcher) component ...................................................................... s1gw: add S1AP Server (dispatcher) component Change-Id: Ib8a14c1a76c980f4d8a153461c9b63d205574573 Related: SYS#6772 --- A s1gw/S1AP_Server.ttcn 1 file changed, 444 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/84/37184/1 diff --git a/s1gw/S1AP_Server.ttcn b/s1gw/S1AP_Server.ttcn new file mode 100644 index 0000000..fe0c8f3 --- /dev/null +++ b/s1gw/S1AP_Server.ttcn @@ -0,0 +1,434 @@ +module S1AP_Server { + +/* S1AP Server, runs on top of S1AP_CodecPort, accepting the S1AP + * connections and forwarding S1AP PDUs to/from the S1APSRV_CONN_PT components. + * + * (C) 2024 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * Author: Vadim Yanitskiy <vyanitskiy(a)sysmocom.de> + * + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +import from General_Types all; +import from Osmocom_Types all; +import from IPL4asp_Types all; + +import from S1AP_CodecPort all; +import from S1AP_CodecPort_CtrlFunct all; +import from S1AP_Types all; +import from S1AP_Constants all; +import from S1AP_PDU_Contents all; +import from S1AP_PDU_Descriptions all; +import from S1AP_IEs all; +import from S1AP_Templates all; + +type enumerated S1APSRV_Event { + S1APSRV_EVENT_CONN_UP, + S1APSRV_EVENT_CONN_DOWN +}; + +type port S1APSRV_CONN_PT message { + inout S1AP_PDU, S1APSRV_Event; +} with { extension "internal" }; + +type component S1APSRV_ConnHdlr { + port S1APSRV_CONN_PT S1AP_CONN; + port S1APSRV_PROC_PT S1AP_PROC; +}; + +type record S1APSRV_ConnParams { + HostName local_ip, + PortNumber local_port +}; + +type component S1AP_Server_CT { + /* port facing to the SUT */ + port S1AP_CODEC_PT S1AP; + /* all S1APSRV_ConnHdlr S1AP ports connect here */ + port S1APSRV_CONN_PT S1AP_CLIENT; + /* procedure based port to register for incoming connections */ + port S1APSRV_PROC_PT S1AP_PROC; + + /* active eNB connections */ + var ConnList g_conn_list; + /* registered ConnHdlr */ + var ConnHdlrList g_conn_hdlr_list; + + var S1APSRV_ConnParams g_cpars; + var ConnectionId g_s1ap_conn_id := -1; +}; + + +/* represents a single eNB connection */ +private type record ConnData { + ConnectionId conn_id, + Global_ENB_ID genb_id /* can be unbound */ +}; +private type record of ConnData ConnList; + +/* represents a single ConnHdlr item */ +private type record ConnHdlrData { + S1APSRV_ConnHdlr vc_conn, + Global_ENB_ID genb_id, + ConnectionId conn_id /* can be -1 */ +}; +private type record of ConnHdlrData ConnHdlrList; + +private template (present) S1AP_RecvFrom +tr_S1AP_RecvFrom_R(template (present) S1AP_PDU msg := ?, + template (present) ConnectionId conn_id := ?) := { + connId := conn_id, + remName := ?, + remPort := ?, + locName := ?, + locPort := ?, + msg := msg +}; + +template (value) SctpTuple ts_SCTP(template (omit) integer ppid := 18) := { + sinfo_stream := omit, + sinfo_ppid := ppid, + remSocks := omit, + assocId := omit +}; + +/*********************************************************************************** + * Connection management API + **********************************************************************************/ + +/* find a connection [index] by a connection ID */ +private function f_conn_find_by_conn_id(ConnectionId conn_id) +runs on S1AP_Server_CT return integer { + for (var integer i := 0; i < lengthof(g_conn_list); i := i + 1) { + if (g_conn_list[i].conn_id == conn_id) { + return i; + } + } + + return -1; +} + +/* find a connection [index] by a global eNB ID */ +private function f_conn_find_by_genb_id(Global_ENB_ID genb_id) +runs on S1AP_Server_CT return integer { + for (var integer i := 0; i < lengthof(g_conn_list); i := i + 1) { + if (isbound(g_conn_list[i].genb_id) and + g_conn_list[i].genb_id == genb_id) { + return i; + } + } + + return -1; +} + +/* add a new connection, return its index */ +private function f_conn_add(ConnectionId conn_id) +runs on S1AP_Server_CT return integer { + var ConnData conn := { conn_id, - }; + var integer idx; + + if (f_conn_find_by_conn_id(conn_id) != -1) { + setverdict(fail, "Connection (id=", conn_id, ") is already added"); + mtc.stop; + } + + idx := lengthof(g_conn_list); + g_conn_list := g_conn_list & { conn }; + log("Connection (id=", conn_id, ") is registered"); + + return idx; +} + +/* del an existing connection */ +private function f_conn_del(ConnectionId conn_id) +runs on S1AP_Server_CT { + var ConnList conn_list := { }; + + for (var integer i := 0; i < lengthof(g_conn_list); i := i + 1) { + if (g_conn_list[i].conn_id == conn_id) { + if (isbound(g_conn_list[i].genb_id)) { + f_ConnHdlr_update(g_conn_list[i].genb_id, -1); + } + } else { + conn_list := conn_list & { g_conn_list[i] }; + } + } + + if (lengthof(conn_list) == lengthof(g_conn_list)) { + setverdict(fail, "Connection (id=", conn_id, ") is not known"); + mtc.stop; + } + + g_conn_list := conn_list; + log("Connection (id=", conn_id, ") is deleted"); +} + +/* add a new connection, return its index */ +private function f_conn_set_genb_id(ConnectionId conn_id, Global_ENB_ID genb_id) +runs on S1AP_Server_CT { + var integer idx; + + if (f_conn_find_by_genb_id(genb_id) != -1) { + setverdict(fail, "Duplicate Global eNB ID ", genb_id); + mtc.stop; + } + + idx := f_conn_find_by_conn_id(conn_id); + if (idx == -1) { + setverdict(fail, "Connection (id=", conn_id, ") is not known"); + mtc.stop; + } + + g_conn_list[idx].genb_id := genb_id; + + f_ConnHdlr_update(genb_id, conn_id); +} + +private function f_conn_close(ConnectionId conn_id) +runs on S1AP_Server_CT { + log("Closing an eNB connection (id=", conn_id, ")"); + S1AP_CodecPort_CtrlFunct.f_IPL4_close(S1AP, conn_id, + { sctp := valueof(ts_SCTP) }); + f_conn_del(conn_id); +} + +private function f_conn_close_by_genb_id(Global_ENB_ID genb_id) +runs on S1AP_Server_CT { + var integer idx; + + idx := f_conn_find_by_genb_id(genb_id); + if (idx == -1) { + setverdict(fail, "There is no connection for Global eNB ID ", genb_id); + mtc.stop; + } + + f_conn_close(g_conn_list[idx].conn_id); +} + +/*********************************************************************************** + * ConnHdlr management API + **********************************************************************************/ + +/* find a ConnHdlr [index] by a connection ID */ +private function f_ConnHdlr_find_by_conn_id(ConnectionId conn_id) +runs on S1AP_Server_CT return integer { + for (var integer i := 0; i < lengthof(g_conn_hdlr_list); i := i + 1) { + if (g_conn_hdlr_list[i].conn_id == conn_id) { + return i; + } + } + + return -1; +} + +/* find a ConnHdlr [index] by a global eNB ID */ +private function f_ConnHdlr_find_by_genb_id(Global_ENB_ID genb_id) +runs on S1AP_Server_CT return integer { + for (var integer i := 0; i < lengthof(g_conn_hdlr_list); i := i + 1) { + if (g_conn_hdlr_list[i].genb_id == genb_id) { + return i; + } + } + + return -1; +} + +/* find a ConnHdlr [index] by a component reference */ +private function f_ConnHdlr_find_by_vc_conn(S1APSRV_ConnHdlr vc_conn) +runs on S1AP_Server_CT return integer { + for (var integer i := 0; i < lengthof(g_conn_hdlr_list); i := i + 1) { + if (g_conn_hdlr_list[i].vc_conn == vc_conn) { + return i; + } + } + + return -1; +} + +private function f_ConnHdlr_add(S1APSRV_ConnHdlr vc_conn, Global_ENB_ID genb_id) +runs on S1AP_Server_CT { + var ConnectionId conn_id := -1; + var integer idx; + + if (f_ConnHdlr_find_by_genb_id(genb_id) != -1) { + setverdict(fail, "Global eNB ID ", genb_id, " is already registered"); + mtc.stop; + } + + idx := f_conn_find_by_genb_id(genb_id); + if (idx != -1) { + conn_id := g_conn_list[idx].conn_id; + } + + g_conn_hdlr_list := g_conn_hdlr_list & { {vc_conn, genb_id, conn_id} }; + log("Global eNB ID ", genb_id, " has been registered"); +} + +private function f_ConnHdlr_del(integer idx) +runs on S1AP_Server_CT { + var ConnHdlrList conn_hdlr_list := { }; + + for (var integer i := 0; i < lengthof(g_conn_hdlr_list); i := i + 1) { + if (i != idx) { + conn_hdlr_list := conn_hdlr_list & { g_conn_hdlr_list[i] }; + } + } + + g_conn_hdlr_list := conn_hdlr_list; +} + +private function f_ConnHdlr_del_by_genb_id(Global_ENB_ID genb_id) +runs on S1AP_Server_CT { + var integer idx; + + idx := f_ConnHdlr_find_by_genb_id(genb_id); + if (idx == -1) { + setverdict(fail, "Global eNB ID ", genb_id, " is not registered"); + mtc.stop; + } + + f_ConnHdlr_del(idx); + log("Global eNB ID ", genb_id, " has been unregistered"); +} + +private function f_ConnHdlr_update(Global_ENB_ID genb_id, ConnectionId conn_id) +runs on S1AP_Server_CT { + for (var integer i := 0; i < lengthof(g_conn_hdlr_list); i := i + 1) { + if (g_conn_hdlr_list[i].genb_id == genb_id) { + g_conn_hdlr_list[i].conn_id := conn_id; + /* notify the ConnHdlr about connection state */ + var S1APSRV_Event ev; + if (conn_id == -1) { + ev := S1APSRV_EVENT_CONN_DOWN; + } else { + ev := S1APSRV_EVENT_CONN_UP; + } + S1AP_CLIENT.send(ev) to g_conn_hdlr_list[i].vc_conn; + } + } +} + +signature S1APSRV_register(in S1APSRV_ConnHdlr vc_conn, in Global_ENB_ID genb_id); +signature S1APSRV_unregister(in S1APSRV_ConnHdlr vc_conn, in Global_ENB_ID genb_id); +signature S1APSRV_close_conn(in S1APSRV_ConnHdlr vc_conn, in Global_ENB_ID genb_id); + +type port S1APSRV_PROC_PT procedure { + inout S1APSRV_register; + inout S1APSRV_unregister; + inout S1APSRV_close_conn; +} with { extension "internal" }; + +function f_ConnHdlr_register(Global_ENB_ID genb_id) +runs on S1APSRV_ConnHdlr { + S1AP_PROC.call(S1APSRV_register:{self, genb_id}) { + [] S1AP_PROC.getreply(S1APSRV_register:{?, ?}) { }; + } +} + +function f_ConnHdlr_unregister(Global_ENB_ID genb_id) +runs on S1APSRV_ConnHdlr { + S1AP_PROC.call(S1APSRV_unregister:{self, genb_id}) { + [] S1AP_PROC.getreply(S1APSRV_unregister:{?, ?}) { }; + } +} + +function f_ConnHdlr_close_conn(Global_ENB_ID genb_id) +runs on S1APSRV_ConnHdlr { + S1AP_PROC.call(S1APSRV_close_conn:{self, genb_id}) { + [] S1AP_PROC.getreply(S1APSRV_close_conn:{?, ?}) { }; + } +} + +function main(S1APSRV_ConnParams cpars) runs on S1AP_Server_CT { + var Result res; + + g_cpars := cpars; + g_conn_list := { }; + g_conn_hdlr_list := { }; + + map(self:S1AP, system:S1AP_CODEC_PT); + res := S1AP_CodecPort_CtrlFunct.f_IPL4_listen(S1AP, + cpars.local_ip, cpars.local_port, + { sctp := valueof(ts_SCTP) }); + if (not ispresent(res.connId)) { + setverdict(fail, "Could not create an S1AP socket, check your configuration"); + mtc.stop; + } + g_s1ap_conn_id := res.connId; + + log("SCTP server listening on ", cpars.local_ip, ":", cpars.local_port); + + while (true) { + var S1APSRV_ConnHdlr vc_conn; + var S1AP_RecvFrom mrf; + var S1AP_PDU msg; + + var Global_ENB_ID genb_id; + var PortEvent pev; + + alt { + /* S1AP PDU from a peer (eNB) */ + [] S1AP.receive(tr_S1AP_RecvFrom_R) -> value mrf { + if (match(mrf.msg, tr_S1AP_SetupReq)) { + genb_id := mrf.msg.initiatingMessage.value_.S1SetupRequest.protocolIEs[0].value_.Global_ENB_ID; + f_conn_set_genb_id(mrf.connId, genb_id); + } + var integer idx := f_ConnHdlr_find_by_conn_id(mrf.connId); + if (idx != -1) { + S1AP_CLIENT.send(mrf.msg) to g_conn_hdlr_list[idx].vc_conn; + } /* else: no ConnHdlr, drop PDU */ + } + /* S1AP PDU from a ConnHdlr: pass on transparently */ + [] S1AP_CLIENT.receive(S1AP_PDU:?) -> value msg sender vc_conn { + var integer idx := f_ConnHdlr_find_by_vc_conn(vc_conn); + if (idx == -1) { + setverdict(fail, "Component ", vc_conn, " is not registered"); + mtc.stop; + } + if (g_conn_hdlr_list[idx].conn_id == -1) { + setverdict(fail, "S1AP connection is not up"); + mtc.stop; + } + S1AP.send(t_S1AP_Send(g_conn_hdlr_list[idx].conn_id, msg)); + } + + /* connection opened/closed events */ + [] S1AP.receive(PortEvent:{connOpened := ?}) -> value pev { + log("eNB connection (id=", pev.connOpened.connId, ", ", + pev.connOpened.remName, ":", pev.connOpened.remPort, ") ", + "established"); + f_conn_add(pev.connOpened.connId); + } + [] S1AP.receive(PortEvent:{connClosed := ?}) -> value pev { + log("eNB connection (id=", pev.connClosed.connId, ", ", + pev.connClosed.remName, ":", pev.connClosed.remPort, ") ", + "closed"); + f_conn_del(pev.connClosed.connId); + } + + /* SCTP events we don't care about */ + [] S1AP.receive(PortEvent:{sctpEvent := ?}) { } + + /* ConnHdlr registration/unregistration */ + [] S1AP_PROC.getcall(S1APSRV_register:{?, ?}) -> param(vc_conn, genb_id) { + f_ConnHdlr_add(vc_conn, genb_id); + S1AP_PROC.reply(S1APSRV_register:{vc_conn, genb_id}) to vc_conn; + } + [] S1AP_PROC.getcall(S1APSRV_unregister:{?, ?}) -> param(vc_conn, genb_id) { + f_ConnHdlr_del_by_genb_id(genb_id); + S1AP_PROC.reply(S1APSRV_unregister:{vc_conn, genb_id}) to vc_conn; + } + [] S1AP_PROC.getcall(S1APSRV_close_conn:{?, ?}) -> param(vc_conn, genb_id) { + f_conn_close_by_genb_id(genb_id); + S1AP_PROC.reply(S1APSRV_close_conn:{vc_conn, genb_id}) to vc_conn; + } + } + } +} + +} -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37184?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib8a14c1a76c980f4d8a153461c9b63d205574573 Gerrit-Change-Number: 37184 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • ...
  • 157
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.