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 libosmo-abis[master]: rtp2trau_hr16: use osmo_hr_check_sid()
by pespin 18 Jun '24

18 Jun '24
Attention is currently required from: falconia. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37250?usp=email ) Change subject: rtp2trau_hr16: use osmo_hr_check_sid() ...................................................................... Patch Set 1: (1 comment) File TODO-RELEASE: https://gerrit.osmocom.org/c/libosmo-abis/+/37250/comment/c5f0a1ff_5ef8a4b5 PS1, Line 12: libosmocodec >1.9.0 bugfix in osmo_hr_check_sid() in case length=0 the useful hint here is actually ABI/API related, so the interesting info you should add here in decription is "use osmo_hr_check_sid() API". -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37250?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ia8fe7e9ea65fadf7f5c136355ca8c24c89f09ef2 Gerrit-Change-Number: 37250 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Tue, 18 Jun 2024 18:52:50 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-abis[master]: trau_rtp_conv.c cosmetic: fix typo in name of static function
by falconia 18 Jun '24

18 Jun '24
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37251?usp=email ) Change subject: trau_rtp_conv.c cosmetic: fix typo in name of static function ...................................................................... trau_rtp_conv.c cosmetic: fix typo in name of static function Change I7a6d13d406484c01210594bb6d2f0aff7c1341ab introduced a static function in src/trau/trau_rtp_conv.c that was intended to be named twts002_hr16_set_extra_flags(). However, a typo crept in unnoticed, and the patch was merged with this function name misspelled as twtw002_hr16_set_extra_flags(). Fix it. Related: OS#6448 Change-Id: I63bb678f7a1f26fefba070ddc10850db24cb88b3 --- M src/trau/trau_rtp_conv.c 1 file changed, 19 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/51/37251/1 diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index f347cca..91bf228 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -162,7 +162,7 @@ FT_NO_DATA = 7, }; -static void twtw002_hr16_set_extra_flags(uint8_t *out, const struct osmo_trau_frame *tf) +static void twts002_hr16_set_extra_flags(uint8_t *out, const struct osmo_trau_frame *tf) { if (tf->c_bits[16]) /* DTXd */ out[0] |= 0x08; @@ -223,7 +223,7 @@ if (emit_twts002) { if (tf->c_bits[11] && sidc == OSMO_GSM631_SID_CLASS_SPEECH) out[0] = FT_BFI_WITH_DATA << 4; - twtw002_hr16_set_extra_flags(out, tf); + twts002_hr16_set_extra_flags(out, tf); /* invalid SID frames are truncated in TW-TS-002 */ if (sidc == OSMO_GSM631_SID_CLASS_INVALID) return 1; @@ -243,7 +243,7 @@ bad_frame: if (emit_twts002) { out[0] = FT_NO_DATA << 4; - twtw002_hr16_set_extra_flags(out, tf); + twts002_hr16_set_extra_flags(out, tf); return 1; } else return 0; -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37251?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I63bb678f7a1f26fefba070ddc10850db24cb88b3 Gerrit-Change-Number: 37251 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-abis[master]: rtp2trau_hr16: use osmo_hr_check_sid()
by falconia 18 Jun '24

18 Jun '24
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37250?usp=email ) Change subject: rtp2trau_hr16: use osmo_hr_check_sid() ...................................................................... rtp2trau_hr16: use osmo_hr_check_sid() The code in libosmotrau previously used its own local function to check incoming 112-bit HRv1 frames against the possibility of perfect SID (all 79 bits of SID field set to 1). However, there is a public API function in libosmocodec that does the exact same job - use the common library function. Until recently, the implementation of osmo_hr_check_sid() in libosmocodec was quite inefficient (the local version in libosmotrau was faster) and contained a logic error in the handling of zero-length input in the place of a received frame. However, both of these defects in osmo_hr_check_sid() have now been fixed in libosmocore, clearing the way for this common library function to be used. Depends: Ib14204102c03c14d6c5aab42b0ffbef2c3dda3fd (libosmocore) Change-Id: Ia8fe7e9ea65fadf7f5c136355ca8c24c89f09ef2 --- M TODO-RELEASE M src/trau/trau_rtp_conv.c 2 files changed, 26 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/50/37250/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index e3ad20a..515adef 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -9,3 +9,4 @@ #library what description / commit summary line libosmotrau struct osmo_trau2rtp_state extended (ABI break) libosmogsm >1.9.0 rtp_extensions.h new header +libosmocodec >1.9.0 bugfix in osmo_hr_check_sid() in case length=0 diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index 15d5a08..f347cca 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -162,8 +162,6 @@ FT_NO_DATA = 7, }; -static const uint8_t rtp_hr_sid[14] = { 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; - static void twtw002_hr16_set_extra_flags(uint8_t *out, const struct osmo_trau_frame *tf) { if (tf->c_bits[16]) /* DTXd */ @@ -446,21 +444,6 @@ return 0; } -/* does the RTP HR payload resemble a SID frame or not */ -static bool is_rtp_hr_sid(const uint8_t *data, const uint8_t data_len) -{ - int i; - - if (data_len < GSM_HR_BYTES) - return false; - - for (i = 0; i < GSM_HR_BYTES; i++) { - if ((data[i] & rtp_hr_sid[i]) != rtp_hr_sid[i]) - return false; - } - return true; -} - static int rtp2trau_hr16(struct osmo_trau_frame *tf, const uint8_t *data, size_t data_len) { /* accept both TS 101 318 and RFC 5993 payloads */ @@ -503,7 +486,7 @@ tf->c_bits[11] = 1; else tf->c_bits[11] = 0; - if (is_rtp_hr_sid(data, data_len)) { + if (osmo_hr_check_sid(data, data_len)) { /* SID=2 is a valid SID frame */ tf->c_bits[12] = 1; tf->c_bits[13] = 0; @@ -519,7 +502,7 @@ tf->c_bits[12] = 1; /* C13: spare */ tf->c_bits[13] = 1; /* C14: spare */ tf->c_bits[14] = 1; /* C15: spare */ - if (is_rtp_hr_sid(data, data_len)) + if (osmo_hr_check_sid(data, data_len)) tf->c_bits[15] = 0; /* C16: SP */ else tf->c_bits[15] = 1; /* C16: SP */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37250?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ia8fe7e9ea65fadf7f5c136355ca8c24c89f09ef2 Gerrit-Change-Number: 37250 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in libosmocore[master]: codec: make osmo_hr_check_sid() more efficient
by falconia 18 Jun '24

18 Jun '24
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/37227?usp=email ) Change subject: codec: make osmo_hr_check_sid() more efficient ...................................................................... codec: make osmo_hr_check_sid() more efficient The operation of checking an HRv1 codec frame for the possibility of a perfect, error-free SID entails checking the last 79 bits out of 112, to see if they are all 1s. This operation can be done much more efficiently without using bitvec. This change also affects the logic of what osmo_hr_check_sid() does when the payload length argument is 0, or otherwise less than the expected 14. The old code had a surely-unintended effect of returning true on a 0-length payload; the new version returns false (the input is not a perfect SID frame) if the payload length is 0 or otherwise shorter than GSM_HR_BYTES. Change-Id: Ib14204102c03c14d6c5aab42b0ffbef2c3dda3fd --- M src/codec/gsm620.c 1 file changed, 42 insertions(+), 12 deletions(-) Approvals: pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/codec/gsm620.c b/src/codec/gsm620.c index ef1d3b9..49ee724 100644 --- a/src/codec/gsm620.c +++ b/src/codec/gsm620.c @@ -23,8 +23,6 @@ #include <stdbool.h> #include <string.h> -#include <osmocom/core/bitvec.h> -#include <osmocom/core/utils.h> #include <osmocom/codec/codec.h> /* GSM HR unvoiced (mode=0) frames - subjective importance bit ordering */ @@ -270,21 +268,32 @@ * \param[in] rtp_payload Buffer with RTP payload * \param[in] payload_len Length of payload * \returns true if code word is found, false otherwise + * + * Note that this function checks only for a perfect, error-free SID. + * Unlike GSM 06.31 for FR or GSM 06.81 for EFR, GSM 06.41 spec for HR + * does not prescribe exact bit counting rules, hence detection of + * partially corrupted SID frames in downstream network elements + * without out-of-band indication is not possible. */ bool osmo_hr_check_sid(const uint8_t *rtp_payload, size_t payload_len) { - struct bitvec bv = { - .data = (uint8_t *)rtp_payload, - .data_len = payload_len, - }; + static const uint8_t all_ff_bytes[9] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF}; - /* A SID frame is identified by a SID codeword consisting of 79 bits which are all 1, - * so we basically check if all bits in range r34..r112 (inclusive) are 1. */ - for (bv.cur_bit = 33; bv.cur_bit < bv.data_len * 8; bv.cur_bit++) - if (bitvec_get_bit_pos(&bv, bv.cur_bit) != ONE) - return false; + if (payload_len < GSM_HR_BYTES) + return false; - return true; + /* A SID frame is identified by a SID codeword consisting of 79 bits + * which are all 1, so we basically check if all bits in range + * r34..r112 (inclusive) are 1. However, given the position of + * these bits in the frame, the most efficient way to perform + * this check does not use any bit-level operations. */ + if ((rtp_payload[4] & 0x7F) != 0x7F) + return false; + if (memcmp(rtp_payload + 5, all_ff_bytes, 9) == 0) + return true; + else + return false; } /*! Reset the SID field of a potentially corrupted, but still valid GSM-HR -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/37227?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib14204102c03c14d6c5aab42b0ffbef2c3dda3fd Gerrit-Change-Number: 37227 Gerrit-PatchSet: 3 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: s1gw: add TC_e_rab_setup
by fixeria 18 Jun '24

18 Jun '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37245?usp=email ) Change subject: s1gw: add TC_e_rab_setup ...................................................................... s1gw: add TC_e_rab_setup Change-Id: I94eb8cac4b5659c0f6f1bb248a80692b8cf84b6f Related: SYS#6772 --- M s1gw/S1GW_Tests.ttcn M s1gw/expected-results.xml 2 files changed, 148 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index c7c55ef..0fb3075 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -155,6 +155,63 @@ S1AP_ENB.receive(PortEvent:{connClosed := ?}); } +function f_ConnHdlr_tx_s1ap_from_enb(template (value) S1AP_PDU pdu) +runs on ConnHdlr { + S1AP_ENB.send(t_S1AP_Send(g_s1ap_conn_id, pdu)); +} + +function f_ConnHdlr_tx_s1ap_from_mme(template (value) S1AP_PDU pdu) +runs on ConnHdlr { + S1AP_CONN.send(pdu); +} + +function f_ConnHdlr_rx_s1ap_from_enb(out S1AP_PDU pdu, + template (present) S1AP_PDU tr_pdu := ?, + float Tval := 0.5) +runs on ConnHdlr { + timer T := Tval; + + T.start; + alt { + [] S1AP_CONN.receive(tr_pdu) -> value pdu { + setverdict(pass); + T.stop; + } + [] S1AP_CONN.receive(S1AP_PDU:?) -> value pdu { + setverdict(fail, "Rx unexpected S1AP PDU from eNB: ", pdu); + T.stop; + } + [] T.timeout { + setverdict(fail, "Timeout waiting for S1AP PDU from eNB: ", tr_pdu); + } + } +} + +function f_ConnHdlr_rx_s1ap_from_mme(out S1AP_PDU pdu, + template (present) S1AP_PDU tr_pdu := ?, + float Tval := 0.5) +runs on ConnHdlr { + var S1AP_RecvFrom recv; + timer T := Tval; + + T.start; + alt { + [] S1AP_ENB.receive(t_S1AP_RecvFrom(tr_pdu)) -> value recv { + pdu := recv.msg; + setverdict(pass); + T.stop; + } + [] S1AP_ENB.receive(t_S1AP_RecvFrom(?)) -> value recv { + pdu := recv.msg; + setverdict(fail, "Rx unexpected S1AP PDU from MME: ", pdu); + T.stop; + } + [] T.timeout { + setverdict(fail, "Timeout waiting for S1AP PDU from MME: ", tr_pdu); + } + } +} + function f_ConnHdlr_setup(Global_ENB_ID genb_id) runs on ConnHdlr { var S1AP_PDU pdu; timer T; @@ -167,10 +224,9 @@ } }; - S1AP_ENB.send(t_S1AP_Send(g_s1ap_conn_id, - ts_S1AP_SetupReq(genb_id, - supported_tas_dummy, - v32))); + f_ConnHdlr_tx_s1ap_from_enb(ts_S1AP_SetupReq(genb_id, + supported_tas_dummy, + v32)); T.start(1.0); alt { [] S1AP_CONN.receive(S1APSRV_Event:S1APSRV_EVENT_CONN_UP) { repeat; } @@ -274,11 +330,87 @@ vc_conn.done; } +function f_TC_e_rab_setup(ConnHdlrPars pars) runs on ConnHdlr { + const integer mme_id := 7; + const integer enb_id := 9; + const integer erab_id := 6; + var S1AP_PDU pdu; + + f_ConnHdlr_register(pars.genb_id); + f_ConnHdlr_connect(); + f_ConnHdlr_setup(pars.genb_id); + + log("eNB -> [S1GW] -> MME: E-RAB SETUP REQUEST"); + var template (value) E_RABToBeSetupListBearerSUReq items_req; + var E_RABToBeSetupItemBearerSUReq item_req := { + e_RAB_ID := erab_id, + e_RABlevelQoSParameters := { + qCI := 5, + allocationRetentionPriority := { + priorityLevel := 1, + pre_emptionCapability := shall_not_trigger_pre_emption, + pre_emptionVulnerability := not_pre_emptable, + iE_Extensions := omit + }, + gbrQosInformation := omit, + iE_Extensions := omit + }, + transportLayerAddress := -, + gTP_TEID := f_rnd_octstring(4), + nAS_PDU := ''O, + iE_Extensions := omit + }; + + /* eNB -> S1GW */ + item_req.transportLayerAddress := oct2bit(f_inet_addr("1.2.3.4")); + items_req := ts_S1AP_RABToBeSetupListBearerSUReq(item_req); + f_ConnHdlr_tx_s1ap_from_enb(ts_S1AP_RABSetupReq(mme_id, enb_id, items_req)); + + /* S1GW -> MME */ + item_req.transportLayerAddress := oct2bit(f_inet_addr(mp_s1gw_mme_ip)); + items_req := ts_S1AP_RABToBeSetupListBearerSUReq(item_req); + f_ConnHdlr_rx_s1ap_from_enb(pdu, tr_S1AP_RABSetupReq(mme_id, enb_id, items_req)); + + + log("eNB <- [S1GW] <- MME: E-RAB SETUP RESPONSE"); + var template (value) E_RABSetupListBearerSURes items_res; + var E_RABSetupItemBearerSURes item_res := { + e_RAB_ID := erab_id, + transportLayerAddress := -, + gTP_TEID := f_rnd_octstring(4), + iE_Extensions := omit + }; + + /* MME -> S1GW */ + item_res.transportLayerAddress := oct2bit(f_inet_addr("4.3.2.1")); + items_res := ts_S1AP_RABSetupListBearerSURes(item_res); + f_ConnHdlr_tx_s1ap_from_mme(ts_S1AP_RABSetupRsp(mme_id, enb_id, items_res)); + + /* S1GW -> eNB */ + item_res.transportLayerAddress := oct2bit(f_inet_addr(mp_s1gw_enb_ip)); + items_res := ts_S1AP_RABSetupListBearerSURes(item_res); + f_ConnHdlr_rx_s1ap_from_mme(pdu, tr_S1AP_RABSetupRsp(mme_id, enb_id, items_res)); + + f_ConnHdlr_disconnect(); + f_ConnHdlr_unregister(pars.genb_id); +} +testcase TC_e_rab_setup() runs on test_CT { + var ConnHdlrPars pars := valueof(t_ConnHdlrPars); + var ConnHdlr vc_conn; + + f_init(); + f_init_s1ap_srv(); + + vc_conn := f_ConnHdlr_spawn(refers(f_TC_e_rab_setup), pars); + vc_conn.done; +} + control { execute( TC_setup() ); execute( TC_setup_multi() ); execute( TC_conn_term_by_mme() ); execute( TC_conn_term_mme_unavail() ); + execute( TC_e_rab_setup() ); } } diff --git a/s1gw/expected-results.xml b/s1gw/expected-results.xml index b10fd4a..ed75300 100644 --- a/s1gw/expected-results.xml +++ b/s1gw/expected-results.xml @@ -1,7 +1,8 @@ <?xml version="1.0"?> -<testsuite name='S1GW_Tests' tests='4' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'> +<testsuite name='S1GW_Tests' tests='5' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'> <testcase classname='S1GW_Tests' name='TC_setup' time='MASKED'/> <testcase classname='S1GW_Tests' name='TC_setup_multi' time='MASKED'/> <testcase classname='S1GW_Tests' name='TC_conn_term_by_mme' time='MASKED'/> <testcase classname='S1GW_Tests' name='TC_conn_term_mme_unavail' time='MASKED'/> + <testcase classname='S1GW_Tests' name='TC_e_rab_setup' time='MASKED'/> </testsuite> -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37245?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: I94eb8cac4b5659c0f6f1bb248a80692b8cf84b6f Gerrit-Change-Number: 37245 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy(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> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: s1gw: add TC_e_rab_setup
by osmith 18 Jun '24

18 Jun '24
Attention is currently required from: fixeria. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37245?usp=email ) Change subject: s1gw: add TC_e_rab_setup ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37245?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: I94eb8cac4b5659c0f6f1bb248a80692b8cf84b6f Gerrit-Change-Number: 37245 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 18 Jun 2024 11:43:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: s1gw: pass Global_ENB_ID to ConnHdlr
by fixeria 18 Jun '24

18 Jun '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37243?usp=email ) Change subject: s1gw: pass Global_ENB_ID to ConnHdlr ...................................................................... s1gw: pass Global_ENB_ID to ConnHdlr Change-Id: I9660ca96f13c4e4c890f3957a25d01a27e2e0cac Related: SYS#6772 --- M s1gw/S1GW_Tests.ttcn 1 file changed, 28 insertions(+), 17 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved osmith: Looks good to me, but someone else must approve diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index ffc5c9b..df988d5 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -79,10 +79,15 @@ vc_S1APSRV.start(S1AP_Server.main(cpars)); } -type union ConnHdlrPars { - integer seed +type record ConnHdlrPars { + Global_ENB_ID genb_id }; +template (value) ConnHdlrPars +t_ConnHdlrPars(integer enb_id := 0) := { + genb_id := ts_Global_ENB_ID(enb_id) +} + type function void_fn(ConnHdlrPars pars) runs on ConnHdlr; function f_ConnHdlr_spawn(void_fn fn, ConnHdlrPars pars) @@ -184,19 +189,17 @@ 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_register(pars.genb_id); f_ConnHdlr_connect(); - f_ConnHdlr_setup(genb_id); + f_ConnHdlr_setup(pars.genb_id); f_sleep(0.5); /* keep the connection idle for some time */ f_ConnHdlr_disconnect(); - f_ConnHdlr_unregister(genb_id); + f_ConnHdlr_unregister(pars.genb_id); } testcase TC_setup() runs on test_CT { - var ConnHdlrPars pars := { seed := 0 }; + var ConnHdlrPars pars := valueof(t_ConnHdlrPars); var ConnHdlr vc_conn; f_init(); @@ -212,7 +215,7 @@ f_init_s1ap_srv(); for (var integer i := 0; i < 42; i := i + 1) { - var ConnHdlrPars pars := { seed := i }; + var ConnHdlrPars pars := valueof(t_ConnHdlrPars(i)); var ConnHdlr vc_conn := f_ConnHdlr_spawn(refers(f_TC_setup), pars); vc_conns := vc_conns & { vc_conn }; } @@ -225,23 +228,21 @@ /* MME terminates connection, expect S1GW to terminate the eNB connection */ function f_TC_conn_term_by_mme(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_register(pars.genb_id); f_ConnHdlr_connect(); - f_ConnHdlr_setup(genb_id); + f_ConnHdlr_setup(pars.genb_id); f_sleep(0.5); /* keep the connection idle for some time */ /* MME (S1AP_Server_CT) terminates connection */ - f_ConnHdlr_close_conn(genb_id); + f_ConnHdlr_close_conn(pars.genb_id); /* expect our eNB connection to be released gracefully */ f_ConnHdlr_expect_shutdown(); - f_ConnHdlr_unregister(genb_id); + f_ConnHdlr_unregister(pars.genb_id); } testcase TC_conn_term_by_mme() runs on test_CT { - var ConnHdlrPars pars := { seed := 0 }; + var ConnHdlrPars pars := valueof(t_ConnHdlrPars); var ConnHdlr vc_conn; f_init(); @@ -261,7 +262,7 @@ setverdict(pass); } testcase TC_conn_term_mme_unavail() runs on test_CT { - var ConnHdlrPars pars := { seed := 0 }; + var ConnHdlrPars pars := valueof(t_ConnHdlrPars); var ConnHdlr vc_conn; f_init(); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37243?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: I9660ca96f13c4e4c890f3957a25d01a27e2e0cac Gerrit-Change-Number: 37243 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(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> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: s1gw: add and use f_ConnHdlr_expect_shutdown()
by fixeria 18 Jun '24

18 Jun '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37242?usp=email ) Change subject: s1gw: add and use f_ConnHdlr_expect_shutdown() ...................................................................... s1gw: add and use f_ConnHdlr_expect_shutdown() Change-Id: I7e982f0268a6ee6059e9dfd5fbd6c9019c18359d Related: SYS#6772 --- M s1gw/S1GW_Tests.ttcn 1 file changed, 18 insertions(+), 6 deletions(-) Approvals: pespin: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index 30dcd46..ffc5c9b 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -143,6 +143,12 @@ log("eNB connection closed"); } +function f_ConnHdlr_expect_shutdown() runs on ConnHdlr { + S1AP_ENB.receive(tr_SctpShutDownEvent(g_s1ap_conn_id)); + S1AP_ENB.receive(tr_SctpAssocChange(SCTP_SHUTDOWN_COMP, g_s1ap_conn_id)); + S1AP_ENB.receive(PortEvent:{connClosed := ?}); +} + function f_ConnHdlr_setup(Global_ENB_ID genb_id) runs on ConnHdlr { var S1AP_PDU pdu; timer T; @@ -230,9 +236,7 @@ /* MME (S1AP_Server_CT) terminates connection */ f_ConnHdlr_close_conn(genb_id); /* expect our eNB connection to be released gracefully */ - S1AP_ENB.receive(tr_SctpShutDownEvent(g_s1ap_conn_id)); - S1AP_ENB.receive(tr_SctpAssocChange(SCTP_SHUTDOWN_COMP, g_s1ap_conn_id)); - S1AP_ENB.receive(PortEvent:{connClosed := ?}); + f_ConnHdlr_expect_shutdown(); f_ConnHdlr_unregister(genb_id); } @@ -253,9 +257,7 @@ /* establish an eNB connection to the S1GW */ f_ConnHdlr_connect(); /* expect our eNB connection to be released gracefully */ - S1AP_ENB.receive(tr_SctpShutDownEvent(g_s1ap_conn_id)); - S1AP_ENB.receive(tr_SctpAssocChange(SCTP_SHUTDOWN_COMP, g_s1ap_conn_id)); - S1AP_ENB.receive(PortEvent:{connClosed := ?}); + f_ConnHdlr_expect_shutdown(); setverdict(pass); } testcase TC_conn_term_mme_unavail() runs on test_CT { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37242?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: I7e982f0268a6ee6059e9dfd5fbd6c9019c18359d Gerrit-Change-Number: 37242 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(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> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: s1gw: rework module parameter naming, add mp_s1gw_mme_ip
by fixeria 18 Jun '24

18 Jun '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37246?usp=email ) Change subject: s1gw: rework module parameter naming, add mp_s1gw_mme_ip ...................................................................... s1gw: rework module parameter naming, add mp_s1gw_mme_ip Change-Id: Ice665662c8448c8314d5e6cc1e401e62b635872c Related: SYS#6772 --- M s1gw/S1GW_Tests.cfg M s1gw/S1GW_Tests.ttcn 2 files changed, 17 insertions(+), 3 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve diff --git a/s1gw/S1GW_Tests.cfg b/s1gw/S1GW_Tests.cfg index 336be14..536f0ec 100644 --- a/s1gw/S1GW_Tests.cfg +++ b/s1gw/S1GW_Tests.cfg @@ -11,6 +11,9 @@ [TESTPORT_PARAMETERS] [MODULE_PARAMETERS] +S1GW_Tests.mp_s1gw_enb_ip := "127.0.1.1"; +S1GW_Tests.mp_s1gw_mme_ip := "127.0.2.1"; +S1GW_Tests.mp_mme_bind_ip := "127.0.2.10"; [MAIN_CONTROLLER] diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index df988d5..c7c55ef 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -32,8 +32,9 @@ import from S1AP_Server all; modulepar { - charstring mp_s1gw_ip := "127.0.1.1"; - charstring mp_mme_bind_ip := "127.0.2.10"; + charstring mp_s1gw_enb_ip; /* eNB facing address of the S1GW */ + charstring mp_s1gw_mme_ip; /* MME facing address of the S1GW */ + charstring mp_mme_bind_ip; /* MME address on which we get connections from S1GW */ } private type record of ConnHdlr ConnHdlrList; @@ -112,7 +113,7 @@ /* initiate SCTP connection establishment */ res := S1AP_CodecPort_CtrlFunct.f_IPL4_connect(S1AP_ENB, - mp_s1gw_ip, 36412, + mp_s1gw_enb_ip, 36412, "0.0.0.0", 0, -1, { sctp := c_SctpTuple_S1AP }); if (not ispresent(res.connId)) { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37246?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: Ice665662c8448c8314d5e6cc1e401e62b635872c Gerrit-Change-Number: 37246 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(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> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: s1ap: add templates for E-RAB SETUP REQUEST/RESPONSE
by fixeria 18 Jun '24

18 Jun '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37244?usp=email ) Change subject: s1ap: add templates for E-RAB SETUP REQUEST/RESPONSE ...................................................................... s1ap: add templates for E-RAB SETUP REQUEST/RESPONSE Change-Id: I145e2068ba62cdff8f3075f97c274e248864a9f7 Related: SYS#6772 --- M library/s1ap/S1AP_Templates.ttcn 1 file changed, 167 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/library/s1ap/S1AP_Templates.ttcn b/library/s1ap/S1AP_Templates.ttcn index 26e1ae1..64167ec 100644 --- a/library/s1ap/S1AP_Templates.ttcn +++ b/library/s1ap/S1AP_Templates.ttcn @@ -971,4 +971,161 @@ tr_S1AP_Reset, tr_S1AP_ResetAck, tr_S1AP_ResetAck_any, tr_S1AP_MMEDirectInfTrans ); + +/* 9.1.3.1 E-RAB SETUP REQUEST */ +template (value) E_RABToBeSetupItemBearerSUReq +ts_S1AP_RABToBeSetupItemBearerSUReq(template (value) E_RAB_ID rab_id, + template (value) E_RABLevelQoSParameters qos_params, + template (value) TransportLayerAddress tla, + template (value) GTP_TEID gtp_teid, + template (value) NAS_PDU nas_pdu) := { + e_RAB_ID := rab_id, + e_RABlevelQoSParameters := qos_params, + transportLayerAddress := tla, + gTP_TEID := gtp_teid, + nAS_PDU := nas_pdu, + iE_Extensions := omit +} +template (value) E_RABToBeSetupListBearerSUReq +ts_S1AP_RABToBeSetupListBearerSUReq(template (value) E_RABToBeSetupItemBearerSUReq it) := { + { + id := S1AP_Constants.id_E_RABToBeSetupItemBearerSUReq, + criticality := reject, + value_ := { E_RABToBeSetupItemBearerSUReq := it } + } +} + +template (value) S1AP_PDU +ts_S1AP_RABSetupReq(template (value) MME_UE_S1AP_ID mme_id, + template (value) ENB_UE_S1AP_ID enb_id, + template (value) E_RABToBeSetupListBearerSUReq rab_setup_items) := { + initiatingMessage := { + procedureCode := S1AP_Constants.id_E_RABSetup, + criticality := reject, + value_ := { + E_RABSetupRequest := { + protocolIEs := { + { + id := S1AP_Constants.id_MME_UE_S1AP_ID, + criticality := reject, + value_ := { MME_UE_S1AP_ID := mme_id } + }, { + id := S1AP_Constants.id_eNB_UE_S1AP_ID, + criticality := reject, + value_ := { ENB_UE_S1AP_ID := enb_id } + }, { + id := S1AP_Constants.id_E_RABToBeSetupListBearerSUReq, + criticality := reject, + value_ := { E_RABToBeSetupListBearerSUReq := rab_setup_items } + } + } + } + } + } +} +template (present) S1AP_PDU +tr_S1AP_RABSetupReq(template (present) MME_UE_S1AP_ID mme_id := ?, + template (present) ENB_UE_S1AP_ID enb_id := ?, + template (present) E_RABToBeSetupListBearerSUReq rab_setup_items := ?) := { + initiatingMessage := { + procedureCode := S1AP_Constants.id_E_RABSetup, + criticality := reject, + value_ := { + E_RABSetupRequest := { + protocolIEs := { + { + id := S1AP_Constants.id_MME_UE_S1AP_ID, + criticality := reject, + value_ := { MME_UE_S1AP_ID := mme_id } + }, { + id := S1AP_Constants.id_eNB_UE_S1AP_ID, + criticality := reject, + value_ := { ENB_UE_S1AP_ID := enb_id } + }, { + id := S1AP_Constants.id_E_RABToBeSetupListBearerSUReq, + criticality := reject, + value_ := { E_RABToBeSetupListBearerSUReq := rab_setup_items } + }, * + } + } + } + } +} + +/* 9.1.3.2 E-RAB SETUP RESPONSE */ +template (value) E_RABSetupItemBearerSURes +ts_S1AP_RABSetupItemBearerSURes(template (value) E_RAB_ID rab_id, + template (value) TransportLayerAddress tla, + template (value) GTP_TEID gtp_teid) := { + e_RAB_ID := rab_id, + transportLayerAddress := tla, + gTP_TEID := gtp_teid, + iE_Extensions := omit +} +template (value) E_RABSetupListBearerSURes +ts_S1AP_RABSetupListBearerSURes(template (value) E_RABSetupItemBearerSURes it) := { + { + id := S1AP_Constants.id_E_RABSetupItemBearerSURes, + criticality := reject, + value_ := { E_RABSetupItemBearerSURes := it } + } +} + +template (value) S1AP_PDU +ts_S1AP_RABSetupRsp(template (value) MME_UE_S1AP_ID mme_id, + template (value) ENB_UE_S1AP_ID enb_id, + template (value) E_RABSetupListBearerSURes rab_setup_items) := { + successfulOutcome := { + procedureCode := S1AP_Constants.id_E_RABSetup, + criticality := reject, + value_ := { + e_RABSetupResponse := { + protocolIEs := { + { + id := S1AP_Constants.id_MME_UE_S1AP_ID, + criticality := reject, + value_ := { MME_UE_S1AP_ID := mme_id } + }, { + id := S1AP_Constants.id_eNB_UE_S1AP_ID, + criticality := reject, + value_ := { ENB_UE_S1AP_ID := enb_id } + }, { + id := S1AP_Constants.id_E_RABSetupListBearerSURes, + criticality := reject, + value_ := { e_RABSetupListBearerSURes := rab_setup_items } + } + } + } + } + } +} +template (present) S1AP_PDU +tr_S1AP_RABSetupRsp(template (present) MME_UE_S1AP_ID mme_id := ?, + template (present) ENB_UE_S1AP_ID enb_id := ?, + template (present) E_RABSetupListBearerSURes rab_setup_items := ?) := { + successfulOutcome := { + procedureCode := S1AP_Constants.id_E_RABSetup, + criticality := reject, + value_ := { + e_RABSetupResponse := { + protocolIEs := { + { + id := S1AP_Constants.id_MME_UE_S1AP_ID, + criticality := reject, + value_ := { MME_UE_S1AP_ID := mme_id } + }, { + id := S1AP_Constants.id_eNB_UE_S1AP_ID, + criticality := reject, + value_ := { ENB_UE_S1AP_ID := enb_id } + }, { + id := S1AP_Constants.id_E_RABSetupListBearerSURes, + criticality := reject, + value_ := { e_RABSetupListBearerSURes := rab_setup_items } + }, * + } + } + } + } +} + } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37244?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: I145e2068ba62cdff8f3075f97c274e248864a9f7 Gerrit-Change-Number: 37244 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy(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> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • ...
  • 157
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.