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

September 2024

  • 1 participants
  • 1983 discussions
[XS] Change in osmo-ttcn3-hacks[master]: library: as_pfcp_ignore(): log SeqNr of received PDUs
by fixeria 19 Sep '24

19 Sep '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38208?usp=email ) Change subject: library: as_pfcp_ignore(): log SeqNr of received PDUs ...................................................................... library: as_pfcp_ignore(): log SeqNr of received PDUs Printing the PFCP PDU template ('?' by default) is not very informative when reading logs. Printing the message type of the received PDU is not informative either, because message types are defined as numbers in PFCP_Types.ttcn. Printing the whole PDU is way too verbose, and would be redundant given that the PFCPEM component already does print all received PDUs. Let's print the sequence number. Change-Id: I803ff46def4ae0182310bc01e753fe0c05112836 --- M library/PFCP_Emulation.ttcn 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/08/38208/1 diff --git a/library/PFCP_Emulation.ttcn b/library/PFCP_Emulation.ttcn index 87deffc..8e79631 100644 --- a/library/PFCP_Emulation.ttcn +++ b/library/PFCP_Emulation.ttcn @@ -374,8 +374,10 @@ altstep as_pfcp_ignore(PFCPEM_PT pt, template PDU_PFCP pfcp_expect := ?) { - [] pt.receive(pfcp_expect) { - log("Ignoring ", pfcp_expect); + var PDU_PFCP pdu; + + [] pt.receive(pfcp_expect) -> value pdu { + log("Ignoring PFCP PDU (SeqNr := ", pdu.sequence_number, ")"); repeat; } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38208?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I803ff46def4ae0182310bc01e753fe0c05112836 Gerrit-Change-Number: 38208 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: s1gw: f_init_pfcp(): use 'PFCPEM' as the prefix
by fixeria 19 Sep '24

19 Sep '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38209?usp=email ) Change subject: s1gw: f_init_pfcp(): use 'PFCPEM' as the prefix ...................................................................... s1gw: f_init_pfcp(): use 'PFCPEM' as the prefix Make it clear that it's the PFCP EMulation component. Change-Id: Ia5413313cffb265f83ea0850e31dfb35274c28ba --- M s1gw/S1GW_Tests.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/09/38209/1 diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index b643f37..1f94477 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -105,7 +105,7 @@ role := UPF }; - vc_PFCP := PFCP_Emulation_CT.create("PFCP-" & testcasename()) alive; + vc_PFCP := PFCP_Emulation_CT.create("PFCPEM-" & testcasename()) alive; vc_PFCP.start(PFCP_Emulation.main(pfcp_cfg)); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38209?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia5413313cffb265f83ea0850e31dfb35274c28ba Gerrit-Change-Number: 38209 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: library/PFCP_Emulation: a better PDU routing concept
by fixeria 19 Sep '24

19 Sep '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38207?usp=email ) Change subject: library/PFCP_Emulation: a better PDU routing concept ...................................................................... library/PFCP_Emulation: a better PDU routing concept In recently merged 2962d170 I wrongly assumed, that SEID of outgoing PFCP PDUs can be used to correlate and route the incoming PDUs. In fact, the PFCP peers use two different SEID values, negotiating them using the F-SEID IE. We could have implemented a logic to look for F-SEID in the outgoing PDUs, store and then use it for routing. However, a more flexible approach is to allow the the PFCP_ConnHdlr components to subscribe and unsubscribe to/from specific SEID values explicitly. In this spirit, let's allow the PFCP_ConnHdlr components to subscribe and unsubscribe to/from broadcast PDUs (i.e. those, for which the PFCPEM component could not find a single recipient) explicitly. Implicit routing using the SeqNr remains unchanged and will be performed by the PFCPEM component automatically like before. Change-Id: I25802471519fa297ad4cb2b056adaa6748b00af2 Related: 2962d170 "library/PFCP_Emulation: fix routing of incoming PDUs" --- M hnbgw/HNBGW_Tests.ttcn M library/PFCP_Emulation.ttcn M s1gw/S1GW_ConnHdlr.ttcn 3 files changed, 189 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/07/38207/1 diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index 86a4f3f..f3ad6a5 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -1947,7 +1947,8 @@ f_init_handler(pars); - f_pfcp_register(); + /* ask PFCPEM to route all PDUs to us */ + f_PFCPEM_subscribe_bcast(); var PDU_PFCP m; var Node_ID upf_node_id := valueof(ts_PFCP_Node_ID_fqdn("\07osmocom\03org")); @@ -1969,12 +1970,19 @@ /* Expect PFCP Session Establishment Request. */ m := f_pfcp_expect(tr_PFCP_Session_Est_Req()); + /* ask PFCPEM to *not* route all PDUs to us anymore */ + f_PFCPEM_subscribe_bcast(); + var PFCP_Session_Establishment_Request serq := m.message_body.pfcp_session_establishment_request; var F_SEID hnbgw_f_seid := serq.CP_F_SEID; + const OCT8 c_SEID1 := '1111111111111111'O; + + /* ask PFCPEM to route PDUs with this specific SEID to us */ + f_PFCPEM_subscribe_seid(c_SEID1); /* Acting as UPF, invent a new PFCP SEID to send to HNBGW. Respond to the Session Establishment. * The PFCP response must have the same sequence_number as the request. */ - var template F_SEID up_f_seid := ts_PFCP_F_SEID_ipv4(f_inet_addr("127.0.0.1"), '1111111111111111'O); + var template F_SEID up_f_seid := ts_PFCP_F_SEID_ipv4(f_inet_addr("127.0.0.1"), c_SEID1); var template F_TEID f_teid1 := ts_PFCP_F_TEID_ipv4(gtp_pars.core.local.teid, f_inet_addr(gtp_pars.core.local.addr)); var template F_TEID f_teid2 := ts_PFCP_F_TEID_ipv4(gtp_pars.access.local.teid, @@ -2020,6 +2028,9 @@ m := f_pfcp_expect(tr_PFCP_Session_Del_Req(up_f_seid.seid)); PFCP.send(ts_PFCP_Session_Del_Resp(m.sequence_number, hnbgw_f_seid.seid)); + /* ask PFCPEM to *not* route PDUs with this specific SEID to us */ + f_PFCPEM_subscribe_seid(c_SEID1); + f_sleep(2.0); } @@ -2050,7 +2061,8 @@ f_init_handler(pars); - f_pfcp_register(); + /* ask PFCPEM to route all PDUs to us */ + f_PFCPEM_subscribe_bcast(); activate(as_disallow_pfcp()); tx := f_build_initial_ue(g_pars); diff --git a/library/PFCP_Emulation.ttcn b/library/PFCP_Emulation.ttcn index c917157..87deffc 100644 --- a/library/PFCP_Emulation.ttcn +++ b/library/PFCP_Emulation.ttcn @@ -53,7 +53,12 @@ var integer g_pfcp_conn_id; var integer g_recovery_timestamp; - var PFCPEM_conns g_conns; + /* List of PFCP_ConnHdlr subscribed for broadcast */ + var PFCPEM_conns g_conns_bcast; + /* List of PFCP_ConnHdlr subscribed for SEID */ + var PFCPEM_conns g_conns_seqnr; + /* List of PFCP_ConnHdlr subscribed for SeqNr */ + var PFCPEM_conns g_conns_seid; var integer g_next_sequence_nr_state; }; @@ -69,16 +74,16 @@ type record PFCPEM_conn { PFCP_ConnHdlr vc_conn, OCT8 seid optional, - LIN3_BO_LAST pfcp_msg_sequence_number optional + LIN3_BO_LAST seqnr optional }; type record of PFCPEM_conn PFCPEM_conns; private function f_PFCPEM_conn_by_seqnr(LIN3_BO_LAST seqnr) runs on PFCP_Emulation_CT return PFCP_ConnHdlr { - for (var integer i := 0; i < lengthof(g_conns); i := i + 1) { - if (seqnr == g_conns[i].pfcp_msg_sequence_number) { - return g_conns[i].vc_conn; + for (var integer i := 0; i < lengthof(g_conns_seqnr); i := i + 1) { + if (seqnr == g_conns_seqnr[i].seqnr) { + return g_conns_seqnr[i].vc_conn; } } return null; @@ -86,9 +91,9 @@ private function f_PFCPEM_conn_by_seid(OCT8 seid) runs on PFCP_Emulation_CT return PFCP_ConnHdlr { - for (var integer i := 0; i < lengthof(g_conns); i := i + 1) { - if (seid == g_conns[i].seid) { - return g_conns[i].vc_conn; + for (var integer i := 0; i < lengthof(g_conns_seid); i := i + 1) { + if (seid == g_conns_seid[i].seid) { + return g_conns_seid[i].vc_conn; } } return null; @@ -100,6 +105,7 @@ vc_conn := f_PFCPEM_conn_by_seqnr(pdu.sequence_number); if (vc_conn != null) { + f_PFCPEM_conns_seqnr_del(pdu.sequence_number); return vc_conn; } @@ -111,16 +117,97 @@ return vc_conn; }; -private function f_PFCPEM_conn_add_or_update(in PFCPEM_conn conn) -runs on PFCP_Emulation_CT { - for (var integer i := 0; i < lengthof(g_conns); i := i + 1) { - if (g_conns[i].vc_conn == conn.vc_conn) { - g_conns[i] := conn; /* update */ - return; +/* subscribe/unsubscribe for/from broadcast PDUs */ +private function f_PFCPEM_conns_bcast_add(PFCP_ConnHdlr vc_conn) +runs on PFCP_Emulation_CT return boolean { + for (var integer i := 0; i < lengthof(g_conns_bcast); i := i + 1) { + if (g_conns_bcast[i].vc_conn == vc_conn) { + log(__SCOPE__, "(): vc_conn ", vc_conn, " is already in the list"); + return false; } } - /* Not in the list yet, add. */ - g_conns := g_conns & { conn }; + g_conns_bcast := g_conns_bcast & {{vc_conn, omit, omit}}; + log(__SCOPE__, "(): vc_conn ", vc_conn, " subscribed for broadcast"); + return true; +} +private function f_PFCPEM_conns_bcast_del(PFCP_ConnHdlr vc_conn) +runs on PFCP_Emulation_CT return boolean { + var PFCPEM_conns conns := { }; + + for (var integer i := 0; i < lengthof(g_conns_bcast); i := i + 1) { + if (g_conns_bcast[i].vc_conn != vc_conn) { + conns := conns & { g_conns_bcast[i] }; + } + } + if (lengthof(conns) == lengthof(g_conns_bcast)) { + log(__SCOPE__, "(): vc_conn ", vc_conn, " was not in the list"); + return false; + } + log(__SCOPE__, "(): vc_conn ", vc_conn, " unsubscribed from broadcast"); + g_conns_bcast := conns; + return true; +} + +/* subscribe/unsubscribe for/from PDUs with the given SeqNr value */ +private function f_PFCPEM_conns_seqnr_add(PFCP_ConnHdlr vc_conn, + LIN3_BO_LAST seqnr) +runs on PFCP_Emulation_CT return boolean { + for (var integer i := 0; i < lengthof(g_conns_seqnr); i := i + 1) { + if (g_conns_seqnr[i].seqnr == seqnr) { + log(__SCOPE__, "(): SeqNr ", seqnr, " is already claimed", + " by vc_conn ", g_conns_seqnr[i].vc_conn); + return false; + } + } + g_conns_seqnr := g_conns_seqnr & { {vc_conn, omit, seqnr} }; + return true; +} +private function f_PFCPEM_conns_seqnr_del(LIN3_BO_LAST seqnr) +runs on PFCP_Emulation_CT return boolean { + var PFCPEM_conns conns := { }; + + for (var integer i := 0; i < lengthof(g_conns_seqnr); i := i + 1) { + if (g_conns_seqnr[i].seqnr != seqnr) { + conns := conns & { g_conns_seqnr[i] }; + } + } + if (lengthof(conns) == lengthof(g_conns_seqnr)) { + log(__SCOPE__, "(): SeqNr ", seqnr, " was not in the list"); + return false; + } + g_conns_seqnr := conns; + return true; +} + +/* subscribe/unsubscribe for/from PDUs with the given SEID value */ +private function f_PFCPEM_conns_seid_add(PFCP_ConnHdlr vc_conn, + OCT8 seid) +runs on PFCP_Emulation_CT return boolean { + for (var integer i := 0; i < lengthof(g_conns_seid); i := i + 1) { + if (g_conns_seid[i].seid == seid) { + log(__SCOPE__, "(): SEID ", seid, " is already claimed", + " by vc_conn ", g_conns_seid[i].vc_conn); + return false; + } + } + g_conns_seid := g_conns_seid & { {vc_conn, seid, omit} }; + return true; +} +private function f_PFCPEM_conns_seid_del(OCT8 seid) +runs on PFCP_Emulation_CT return boolean { + var PFCPEM_conns conns := { }; + + for (var integer i := 0; i < lengthof(g_conns_seid); i := i + 1) { + if (g_conns_seid[i].seid != seid) { + conns := conns & { g_conns_seid[i] }; + } + } + if (lengthof(conns) == lengthof(g_conns_seid)) { + log(__SCOPE__, "(): SEID ", seid, " was not in the list"); + return false; + } + g_conns_seid := conns; + return true; } private function f_init(PFCP_Emulation_Cfg cfg) runs on PFCP_Emulation_CT { @@ -133,7 +220,9 @@ g_recovery_timestamp := f_rnd_int(4294967296); g_pfcp_cfg := cfg; - g_conns := {}; + g_conns_bcast := { }; + g_conns_seqnr := { }; + g_conns_seid := { }; g_next_sequence_nr_state := (1 + f_rnd_int(1000)) * 10000; } @@ -142,6 +231,7 @@ var PFCP_ConnHdlr vc_conn; var PFCP_Unitdata ud; var PDU_PFCP pdu; + var OCT8 seid; f_init(cfg); @@ -162,9 +252,9 @@ log("found destination ", vc_conn); CLIENT.send(ud.pdu) to vc_conn; } else { - log("sending to all conns: ", g_conns); - for (var integer i := 0; i < lengthof(g_conns); i := i + 1) { - CLIENT.send(ud.pdu) to g_conns[i].vc_conn; + for (var integer i := 0; i < lengthof(g_conns_bcast); i := i + 1) { + log("broadcasting to ", g_conns_bcast[i].vc_conn); + CLIENT.send(ud.pdu) to g_conns_bcast[i].vc_conn; } } } @@ -183,19 +273,33 @@ pdu := pdu }; - f_PFCPEM_conn_add_or_update({vc_conn, pdu.seid, pdu.sequence_number}); + /* route the response back to this vc_conn */ + f_PFCPEM_conns_seqnr_add(vc_conn, pdu.sequence_number); PFCP.send(ud); } - [] CLIENT_PROC.getcall(PFCPEM_register:{}) -> sender vc_conn { - log("PFCP_Emulation main() CLIENT_PROC.getcall(PFCPEM_register)"); - f_PFCPEM_conn_add_or_update({vc_conn, omit, omit}); - CLIENT_PROC.reply(PFCPEM_register:{}) to vc_conn; + /* subscribe/unsubscribe for/from broadcast PDUs */ + [] CLIENT_PROC.getcall(PFCPEM_subscribe_bcast:{?}) -> sender vc_conn { + var boolean res := f_PFCPEM_conns_bcast_add(vc_conn); + CLIENT_PROC.reply(PFCPEM_subscribe_bcast:{res}) to vc_conn; + } + [] CLIENT_PROC.getcall(PFCPEM_unsubscribe_bcast:{?}) -> sender vc_conn { + var boolean res := f_PFCPEM_conns_bcast_del(vc_conn); + CLIENT_PROC.reply(PFCPEM_unsubscribe_bcast:{res}) to vc_conn; + } + + /* subscribe/unsubscribe for/from PDUs with the given SEID value */ + [] CLIENT_PROC.getcall(PFCPEM_subscribe_seid:{?, ?}) -> param(seid := seid) sender vc_conn { + var boolean res := f_PFCPEM_conns_seid_add(vc_conn, seid); + CLIENT_PROC.reply(PFCPEM_subscribe_seid:{seid, res}) to vc_conn; + } + [] CLIENT_PROC.getcall(PFCPEM_unsubscribe_seid:{?, ?}) -> param(seid := seid) sender vc_conn { + var boolean res := f_PFCPEM_conns_seid_del(seid); + CLIENT_PROC.reply(PFCPEM_unsubscribe_seid:{seid, res}) to vc_conn; } [] CLIENT_PROC.getcall(PFCPEM_get_recovery_timestamp:{?}) -> sender vc_conn { - log("PFCP_Emulation main() CLIENT_PROC.getcall(PFCPEM_get_recovery_timestamp)"); CLIENT_PROC.reply(PFCPEM_get_recovery_timestamp:{g_recovery_timestamp}) to vc_conn; } } @@ -210,11 +314,17 @@ inout PDU_PFCP; } with { extension "internal" }; -signature PFCPEM_register(); +signature PFCPEM_subscribe_bcast(out boolean success); +signature PFCPEM_unsubscribe_bcast(out boolean success); +signature PFCPEM_subscribe_seid(in OCT8 seid, out boolean success); +signature PFCPEM_unsubscribe_seid(in OCT8 seid, out boolean success); signature PFCPEM_get_recovery_timestamp(out integer rts); type port PFCPEM_PROC_PT procedure { - inout PFCPEM_register; + inout PFCPEM_subscribe_bcast; + inout PFCPEM_unsubscribe_bcast; + inout PFCPEM_subscribe_seid; + inout PFCPEM_unsubscribe_seid; inout PFCPEM_get_recovery_timestamp; } with { extension "internal" }; @@ -227,13 +337,31 @@ port PFCPEM_PROC_PT PFCP_PROC; }; -function f_pfcp_register() runs on PFCP_ConnHdlr { - PFCP_PROC.call(PFCPEM_register:{}) { - [] PFCP_PROC.getreply(PFCPEM_register:{}); +/* subscribe/unsubscribe for/from broadcast PDUs */ +function f_PFCPEM_subscribe_bcast() runs on PFCP_ConnHdlr { + PFCP_PROC.call(PFCPEM_subscribe_bcast:{-}) { + [] PFCP_PROC.getreply(PFCPEM_subscribe_bcast:{true}); + } +} +function f_PFCPEM_unsubscribe_bcast() runs on PFCP_ConnHdlr { + PFCP_PROC.call(PFCPEM_unsubscribe_bcast:{-}) { + [] PFCP_PROC.getreply(PFCPEM_unsubscribe_bcast:{true}); } } -function f_pfcp_get_recovery_timestamp() +/* subscribe/unsubscribe for/from PDUs with the given SEID value */ +function f_PFCPEM_subscribe_seid(in OCT8 seid) runs on PFCP_ConnHdlr { + PFCP_PROC.call(PFCPEM_subscribe_seid:{seid, -}) { + [] PFCP_PROC.getreply(PFCPEM_subscribe_seid:{seid, true}); + } +} +function f_PFCPEM_unsubscribe_seid(in OCT8 seid) runs on PFCP_ConnHdlr { + PFCP_PROC.call(PFCPEM_unsubscribe_seid:{seid, -}) { + [] PFCP_PROC.getreply(PFCPEM_unsubscribe_seid:{seid, true}); + } +} + +function f_PFCPEM_get_recovery_timestamp() runs on PFCP_ConnHdlr return integer { var integer rts; diff --git a/s1gw/S1GW_ConnHdlr.ttcn b/s1gw/S1GW_ConnHdlr.ttcn index 5b2e7bb..8d1a2b2 100644 --- a/s1gw/S1GW_ConnHdlr.ttcn +++ b/s1gw/S1GW_ConnHdlr.ttcn @@ -232,7 +232,9 @@ { var PDU_PFCP rx; + f_PFCPEM_subscribe_bcast(); /* ask PFCPEM to route all PDUs to us */ rx := f_ConnHdlr_pfcp_expect(tr_PFCP_Assoc_Setup_Req, Tval := 10.0); + f_PFCPEM_unsubscribe_bcast(); /* ask PFCPEM to *not* route all PDUs to us */ PFCP.send(ts_PFCP_Assoc_Setup_Resp(rx.sequence_number, ts_PFCP_Node_ID_fqdn("\07osmocom\03org"), ts_PFCP_Cause(REQUEST_ACCEPTED), @@ -264,8 +266,7 @@ function f_ConnHdlr_register_pfcp() runs on ConnHdlr { - f_pfcp_register(); - g_pfcp_recovery_timestamp := f_pfcp_get_recovery_timestamp(); + g_pfcp_recovery_timestamp := f_PFCPEM_get_recovery_timestamp(); /* First ConnHdlr answers the AssocSetup: */ if (g_pars.idx != 0) { @@ -561,6 +562,11 @@ function f_ConnHdlr_erab_setup_req(inout ERabList erabs) runs on ConnHdlr { + const OCT8 c_SEID0 := '0000000000000000'O; + + /* Subscribe for PFCP Session Establishment Request PDU(s), which are + * expected to have SEID set to 0, as per 3GPP TS 29.244, section 7.2.2.4.2. */ + f_PFCPEM_subscribe_seid(c_SEID0); log("eNB <- [S1GW <- MME]: E-RAB SETUP REQUEST"); f_ConnHdlr_tx_erab_setup_req(erabs); for (var integer i := 0; i < lengthof(erabs); i := i + 1) { @@ -568,9 +574,13 @@ var PDU_PFCP pdu := f_ConnHdlr_rx_session_establish_req(erabs[i]); /* store peer's SEID, so that it can be used in outgoing PDUs later */ erabs[i].pfcp_rem_seid := pdu.message_body.pfcp_session_establishment_request.CP_F_SEID.seid; + /* ask PFCPEM to route PDUs with the local SEID to us */ + f_PFCPEM_subscribe_seid(erabs[i].pfcp_loc_seid); log("UPF -> S1GW: PFCP Session Establishment Response for E-RAB ID ", erabs[i].erab_id); f_ConnHdlr_tx_session_establish_resp(erabs[i], pdu); } + /* We no longer expect to receive PFCP Session Establishment Request PDU(s). */ + f_PFCPEM_unsubscribe_seid(c_SEID0); log("[eNB <- S1GW] <- MME: E-RAB SETUP REQUEST"); f_ConnHdlr_rx_erab_setup_req(erabs); } @@ -598,6 +608,8 @@ var PDU_PFCP pdu := f_ConnHdlr_rx_session_delete_req(erabs[i]); log("UPF -> S1GW: PFCP Session Deletion Response for E-RAB ID ", erabs[i].erab_id); f_ConnHdlr_tx_session_delete_resp(erabs[i], pdu); + /* ask PFCPEM to *not* route PDUs with this SEID to us */ + f_PFCPEM_unsubscribe_seid(erabs[i].pfcp_loc_seid); } f_ConnHdlr_rx_erab_release_cmd(erabs, cause); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38207?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I25802471519fa297ad4cb2b056adaa6748b00af2 Gerrit-Change-Number: 38207 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: s1gw: make number of eNBs configurable via module params
by fixeria 19 Sep '24

19 Sep '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38210?usp=email ) Change subject: s1gw: make number of eNBs configurable via module params ...................................................................... s1gw: make number of eNBs configurable via module params ... so that we can scale the number of eNBs simulated in the *_multi TCs without having to touch and compile code. Change-Id: Ia80b9118e66a5d6721b89d3ba068227d30dcc01f --- M s1gw/S1GW_Tests.ttcn 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/10/38210/1 diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index 1f94477..2090478 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -55,6 +55,8 @@ charstring mp_local_statsd_ip := "127.0.4.10"; integer mp_local_statsd_port := 8125; charstring mp_statsd_prefix := "s1gw."; + + integer mp_multi_enb_num := 42; /* number of eNBs in _multi TCs */ } type component test_CT extends StatsD_Checker_CT { @@ -215,17 +217,16 @@ f_ConnHdlr_s1ap_unregister(g_pars.genb_id); } testcase TC_setup_multi() runs on test_CT { - var ConnHdlrList vc_conns := { }; + var ConnHdlrList vc_conns; f_init(); - for (var integer i := 0; i < 42; i := i + 1) { + for (var integer i := 0; i < mp_multi_enb_num; i := i + 1) { var ConnHdlrPars pars := valueof(t_ConnHdlrPars(i)); - var ConnHdlr vc_conn := f_ConnHdlr_spawn(refers(f_TC_setup_multi), pars); - vc_conns := vc_conns & { vc_conn }; + vc_conns[i] := f_ConnHdlr_spawn(refers(f_TC_setup_multi), pars); } - for (var integer i := 0; i < 42; i := i + 1) { + for (var integer i := 0; i < mp_multi_enb_num; i := i + 1) { vc_conns[i].done; } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38210?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia80b9118e66a5d6721b89d3ba068227d30dcc01f Gerrit-Change-Number: 38210 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: Revert "s1gw: cache PFCP Recovery Timestamp in ConnHdlr"
by fixeria 19 Sep '24

19 Sep '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38211?usp=email ) Change subject: Revert "s1gw: cache PFCP Recovery Timestamp in ConnHdlr" ...................................................................... Revert "s1gw: cache PFCP Recovery Timestamp in ConnHdlr" This reverts commit 7ad95e1cfb00d269069bd052c44a9cae9027f763. A follow-up commit will remove the need for each ConnHdlr to call f_ConnHdlr_register_pfcp(), that among with handling the PFCP association retrieves a PFCP Recovery Timestamp from the PFCPEM. Caching the PFCP Recovery Timestamp value is not really worth it, since it's rarely used and can always be retrieved on demand. Change-Id: I3b1c488e3ec251c7659cd9bc3197cca2f9d03144 --- M s1gw/S1GW_ConnHdlr.ttcn M s1gw/S1GW_Tests.ttcn 2 files changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/11/38211/1 diff --git a/s1gw/S1GW_ConnHdlr.ttcn b/s1gw/S1GW_ConnHdlr.ttcn index 8d1a2b2..a5638f8 100644 --- a/s1gw/S1GW_ConnHdlr.ttcn +++ b/s1gw/S1GW_ConnHdlr.ttcn @@ -44,7 +44,6 @@ var ConnHdlrPars g_pars; port S1AP_CODEC_PT S1AP_ENB; var ConnectionId g_s1ap_conn_id := -1; - var integer g_pfcp_recovery_timestamp := -1; }; type record of ConnHdlr ConnHdlrList; @@ -238,7 +237,7 @@ PFCP.send(ts_PFCP_Assoc_Setup_Resp(rx.sequence_number, ts_PFCP_Node_ID_fqdn("\07osmocom\03org"), ts_PFCP_Cause(REQUEST_ACCEPTED), - g_pfcp_recovery_timestamp)); + f_PFCPEM_get_recovery_timestamp())); } function f_ConnHdlr_pfcp_expect(template (present) PDU_PFCP exp_rx := ?, @@ -266,8 +265,6 @@ function f_ConnHdlr_register_pfcp() runs on ConnHdlr { - g_pfcp_recovery_timestamp := f_PFCPEM_get_recovery_timestamp(); - /* First ConnHdlr answers the AssocSetup: */ if (g_pars.idx != 0) { activate(as_pfcp_ignore(PFCP, tr_PFCP_Assoc_Setup_Req())); diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index 2090478..8eadb66 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -314,12 +314,13 @@ } function f_TC_pfcp_heartbeat(charstring id) runs on ConnHdlr { + var integer rts := f_PFCPEM_get_recovery_timestamp(); var PDU_PFCP pfcp_pdu; f_ConnHdlr_register_pfcp(); /* Tx Heartbeat Request */ - PFCP.send(ts_PFCP_Heartbeat_Req(g_pfcp_recovery_timestamp)); + PFCP.send(ts_PFCP_Heartbeat_Req(rts)); /* Expect Heartbeat Response * TODO: validate the indicated Recovery Time Stamp against -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38211?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3b1c488e3ec251c7659cd9bc3197cca2f9d03144 Gerrit-Change-Number: 38211 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: s1gw: move PFCP association handling into a dedicated ConnHdlr
by fixeria 19 Sep '24

19 Sep '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38212?usp=email ) Change subject: s1gw: move PFCP association handling into a dedicated ConnHdlr ...................................................................... s1gw: move PFCP association handling into a dedicated ConnHdlr Previously, the PFCP association request from the IUT was handled by the first ConnHdlr component (idx := 0). While this approach has worked, it fails when multiple ConnHdlr instances (idx > 0) are spawned. The problem arises when other ConnHdlr (idx > 0) instances initiate PFCP procedures before the first ConnHdlr (idx := 0) has established the association, so we end up playing races. This patch introduces a dedicated ConnHdlr component to handle the PFCP association independently. Once the association is established, the actual test ConnHdlr instances are spawned, ensuring a more reliable and orderly process. Change-Id: I5e1a14105a35b785bf598dc2a8c436ea6fb6b0f1 --- M s1gw/S1GW_ConnHdlr.ttcn M s1gw/S1GW_Tests.ttcn 2 files changed, 11 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/12/38212/1 diff --git a/s1gw/S1GW_ConnHdlr.ttcn b/s1gw/S1GW_ConnHdlr.ttcn index a5638f8..89d647a 100644 --- a/s1gw/S1GW_ConnHdlr.ttcn +++ b/s1gw/S1GW_ConnHdlr.ttcn @@ -226,7 +226,7 @@ } } -private function f_pfcp_handle_assoc_setup_req() +private function f_ConnHdlr_pfcp_assoc_setup() runs on ConnHdlr { var PDU_PFCP rx; @@ -263,23 +263,16 @@ return pdu; } -function f_ConnHdlr_register_pfcp() runs on ConnHdlr -{ - /* First ConnHdlr answers the AssocSetup: */ - if (g_pars.idx != 0) { - activate(as_pfcp_ignore(PFCP, tr_PFCP_Assoc_Setup_Req())); - return; - } - - var StatsDMetricKeys statsd_keys := { - valueof(ts_StatsDMetricKey(g_pars.statsd_prefix & "gauge.pfcp.associated.value", "g")) - }; +function f_ConnHdlr_pfcp_assoc_handler(charstring id) +runs on ConnHdlr { + var charstring key_name := g_pars.statsd_prefix & "gauge.pfcp.associated.value"; + var StatsDMetricKeys statsd_keys := { valueof(ts_StatsDMetricKey(key_name, "g")) }; var StatsDMetrics statsd_snapshot := f_statsd_snapshot(statsd_keys, since_last_snapshot := false); var boolean pfcp_associated := statsd_snapshot[0].val == 1; if (not pfcp_associated) { log("Waiting for IUT to associate over PFCP"); - f_pfcp_handle_assoc_setup_req(); + f_ConnHdlr_pfcp_assoc_setup(); } } diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index 8eadb66..dfd3d30 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -109,6 +109,11 @@ vc_PFCP := PFCP_Emulation_CT.create("PFCPEM-" & testcasename()) alive; vc_PFCP.start(PFCP_Emulation.main(pfcp_cfg)); + + /* ensure that the PFCP association is set up */ + var ConnHdlr vc_conn := f_ConnHdlr_spawn(refers(f_ConnHdlr_pfcp_assoc_handler), + pars := valueof(t_ConnHdlrPars)); + vc_conn.done; } template (value) ConnHdlrPars @@ -170,7 +175,6 @@ } function f_TC_setup(charstring id) runs on ConnHdlr { - f_ConnHdlr_register_pfcp(); f_ConnHdlr_s1ap_register(g_pars.genb_id); /* Expected values relative to snapshot: */ @@ -205,7 +209,6 @@ } function f_TC_setup_multi(charstring id) runs on ConnHdlr { - f_ConnHdlr_register_pfcp(); f_ConnHdlr_s1ap_register(g_pars.genb_id); f_ConnHdlr_s1ap_connect(mp_enb_bind_ip, mp_s1gw_enb_ip); @@ -234,7 +237,6 @@ /* MME terminates connection, expect S1GW to terminate the eNB connection */ function f_TC_conn_term_by_mme(charstring id) runs on ConnHdlr { - f_ConnHdlr_register_pfcp(); f_ConnHdlr_s1ap_register(g_pars.genb_id); f_ConnHdlr_s1ap_connect(mp_enb_bind_ip, mp_s1gw_enb_ip); @@ -261,7 +263,6 @@ /* MME is not available, expect S1GW to terminate the eNB connection */ function f_TC_conn_term_mme_unavail(charstring id) runs on ConnHdlr { - f_ConnHdlr_register_pfcp(); /* establish an eNB connection to the S1GW */ f_ConnHdlr_s1ap_connect(mp_enb_bind_ip, mp_s1gw_enb_ip); /* expect our eNB connection to be released gracefully */ @@ -280,7 +281,6 @@ /* Test E-RAB SETUP [and RELEASE] procedures */ function f_TC_e_rab_setup(charstring id) runs on ConnHdlr { - f_ConnHdlr_register_pfcp(); f_ConnHdlr_s1ap_register(g_pars.genb_id); f_ConnHdlr_s1ap_connect(mp_enb_bind_ip, mp_s1gw_enb_ip); f_ConnHdlr_s1ap_setup(g_pars.genb_id); @@ -317,8 +317,6 @@ var integer rts := f_PFCPEM_get_recovery_timestamp(); var PDU_PFCP pfcp_pdu; - f_ConnHdlr_register_pfcp(); - /* Tx Heartbeat Request */ PFCP.send(ts_PFCP_Heartbeat_Req(rts)); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38212?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5e1a14105a35b785bf598dc2a8c436ea6fb6b0f1 Gerrit-Change-Number: 38212 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: s1gw: add multi-eNB variants of TC_e_rab_setup
by fixeria 19 Sep '24

19 Sep '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38213?usp=email ) Change subject: s1gw: add multi-eNB variants of TC_e_rab_setup ...................................................................... s1gw: add multi-eNB variants of TC_e_rab_setup The idea is to simulate multiple eNBs establishing one or more E-RAB(s) simultaneously. In order to achieve that, use the new Mutex API to ensure that only one ConnHdlr component is triggering PFCP session establishment at any given time. The problem is that there is no way for the PFCPEM component to correlate which PFCP session belongs to which eNB when multiple ConnHdlr instances establish E-RAB(s) in parallel. This can be solved by making a part of the test scenario synchronous. Change-Id: I9e2eb25a7ae78ff623b94802d881af4894d0cacd --- M s1gw/S1GW_ConnHdlr.ttcn M s1gw/S1GW_Tests.ttcn M s1gw/expected-results.xml M s1gw/gen_links.sh 4 files changed, 52 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/13/38213/1 diff --git a/s1gw/S1GW_ConnHdlr.ttcn b/s1gw/S1GW_ConnHdlr.ttcn index 89d647a..122a71d 100644 --- a/s1gw/S1GW_ConnHdlr.ttcn +++ b/s1gw/S1GW_ConnHdlr.ttcn @@ -18,6 +18,7 @@ import from Native_Functions all; import from IPL4asp_Types all; import from Misc_Helpers all; +import from Mutex all; import from PFCP_Types all; import from PFCP_Emulation all; @@ -40,7 +41,7 @@ import from S1AP_Server all; -type component ConnHdlr extends S1APSRV_ConnHdlr, PFCP_ConnHdlr, StatsD_ConnHdlr { +type component ConnHdlr extends MutexCT, S1APSRV_ConnHdlr, PFCP_ConnHdlr, StatsD_ConnHdlr { var ConnHdlrPars g_pars; port S1AP_CODEC_PT S1AP_ENB; var ConnectionId g_s1ap_conn_id := -1; @@ -554,9 +555,16 @@ runs on ConnHdlr { const OCT8 c_SEID0 := '0000000000000000'O; - /* Subscribe for PFCP Session Establishment Request PDU(s), which are - * expected to have SEID set to 0, as per 3GPP TS 29.244, section 7.2.2.4.2. */ + /* This code block cannot be executed by more than one component at a time because + * the S1AP E-RAB SETUP REQUEST triggers the IUT to send PFCP Session Establishment + * Request PDU(s), with need to be routed to the respective ConnHdlr component (us). + * As per 3GPP TS 29.244, section 7.2.2.4.2, these PFCP PDUs shall all have SEID=0, + * so that the PFCPEM component cannot route them unambiguously. This is why we + * need to ensure that only one ConnHdlr is triggering PFCP session establishment + * at the given moment of time. */ + f_Mutex_lock(__BFILE__, __LINE__); f_PFCPEM_subscribe_seid(c_SEID0); + log("eNB <- [S1GW <- MME]: E-RAB SETUP REQUEST"); f_ConnHdlr_tx_erab_setup_req(erabs); for (var integer i := 0; i < lengthof(erabs); i := i + 1) { @@ -569,8 +577,13 @@ log("UPF -> S1GW: PFCP Session Establishment Response for E-RAB ID ", erabs[i].erab_id); f_ConnHdlr_tx_session_establish_resp(erabs[i], pdu); } - /* We no longer expect to receive PFCP Session Establishment Request PDU(s). */ + + /* We're done establishing PFCP sessions, so at this point we no longer expect to + * receive Session Establishment Request PDUs with SEID=0. Unregister and unlock + * the mutex, enabling other components to establish PFCP sessions after us. */ f_PFCPEM_unsubscribe_seid(c_SEID0); + f_Mutex_unlock(__BFILE__, __LINE__); + log("[eNB <- S1GW] <- MME: E-RAB SETUP REQUEST"); f_ConnHdlr_rx_erab_setup_req(erabs); } diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index dfd3d30..d32a477 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -18,6 +18,7 @@ import from Native_Functions all; import from IPL4asp_Types all; import from Misc_Helpers all; +import from Mutex all; import from S1AP_CodecPort all; import from S1AP_CodecPort_CtrlFunct all; @@ -61,6 +62,7 @@ type component test_CT extends StatsD_Checker_CT { timer g_Tguard; + var MutexDispCT vc_mutex_disp; var S1AP_Server_CT vc_S1APSRV; var PFCP_Emulation_CT vc_PFCP; var StatsD_Checker_CT vc_STATSD; @@ -78,6 +80,8 @@ g_Tguard.start(Tval); activate(as_Tguard()); + vc_mutex_disp := f_MutexDisp_start(); + f_init_statsd("StatsDSRV", vc_STATSD, mp_local_statsd_ip, mp_local_statsd_port); if (s1apsrv_start) { @@ -169,6 +173,7 @@ connect(vc_conn:PFCP, vc_PFCP:CLIENT); connect(vc_conn:PFCP_PROC, vc_PFCP:CLIENT_PROC); } + f_MutexDisp_connect(vc_mutex_disp, vc_conn); vc_conn.start(f_ConnHdlr_init(fn, id, pars)); return vc_conn; @@ -292,25 +297,36 @@ f_ConnHdlr_s1ap_disconnect(); f_ConnHdlr_s1ap_unregister(g_pars.genb_id); } -/* 1 E-RAB at a time */ -testcase TC_e_rab_setup() runs on test_CT { - var ConnHdlrPars pars := valueof(t_ConnHdlrPars(num_erabs := 1)); - var ConnHdlr vc_conn; +private function f_TC_e_rab_setup_exec(integer num_enbs, integer num_erabs) +runs on test_CT { + var ConnHdlrList vc_conns; f_init(); - vc_conn := f_ConnHdlr_spawn(refers(f_TC_e_rab_setup), pars); - vc_conn.done; + for (var integer i := 0; i < num_enbs; i := i + 1) { + var ConnHdlrPars pars := valueof(t_ConnHdlrPars(i, num_erabs)); + vc_conns[i] := f_ConnHdlr_spawn(refers(f_TC_e_rab_setup), pars); + } + + for (var integer i := 0; i < num_enbs; i := i + 1) { + vc_conns[i].done; + } } -/* 3 E-RABs at a time */ +/* 1 E-RAB at a time, single eNB */ +testcase TC_e_rab_setup() runs on test_CT { + f_TC_e_rab_setup_exec(num_enbs := 1, num_erabs := 1); +} +/* 1 E-RAB at a time, multiple eNB connections */ +testcase TC_e_rab_setup_multi() runs on test_CT { + f_TC_e_rab_setup_exec(num_enbs := mp_multi_enb_num, num_erabs := 1); +} +/* 3 E-RABs at a time, single eNB */ testcase TC_e_rab_setup3() runs on test_CT { - var ConnHdlrPars pars := valueof(t_ConnHdlrPars(num_erabs := 3)); - var ConnHdlr vc_conn; - - f_init(); - - vc_conn := f_ConnHdlr_spawn(refers(f_TC_e_rab_setup), pars); - vc_conn.done; + f_TC_e_rab_setup_exec(num_enbs := 1, num_erabs := 3); +} +/* 3 E-RABs at a time, multiple eNB connections */ +testcase TC_e_rab_setup3_multi() runs on test_CT { + f_TC_e_rab_setup_exec(num_enbs := mp_multi_enb_num, num_erabs := 3); } function f_TC_pfcp_heartbeat(charstring id) runs on ConnHdlr { @@ -343,6 +359,8 @@ execute( TC_conn_term_mme_unavail() ); execute( TC_e_rab_setup() ); execute( TC_e_rab_setup3() ); + execute( TC_e_rab_setup_multi() ); + execute( TC_e_rab_setup3_multi() ); execute( TC_pfcp_heartbeat() ); } diff --git a/s1gw/expected-results.xml b/s1gw/expected-results.xml index f7b0c3b..ccec855 100644 --- a/s1gw/expected-results.xml +++ b/s1gw/expected-results.xml @@ -6,5 +6,7 @@ <testcase classname='S1GW_Tests' name='TC_conn_term_mme_unavail' time='MASKED'/> <testcase classname='S1GW_Tests' name='TC_e_rab_setup' time='MASKED'/> <testcase classname='S1GW_Tests' name='TC_e_rab_setup3' time='MASKED'/> + <testcase classname='S1GW_Tests' name='TC_e_rab_setup_multi' time='MASKED'/> + <testcase classname='S1GW_Tests' name='TC_e_rab_setup3_multi' time='MASKED'/> <testcase classname='S1GW_Tests' name='TC_pfcp_heartbeat' time='MASKED'/> </testsuite> diff --git a/s1gw/gen_links.sh b/s1gw/gen_links.sh index 919e7f8..f2fc81b 100755 --- a/s1gw/gen_links.sh +++ b/s1gw/gen_links.sh @@ -28,7 +28,7 @@ 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="Misc_Helpers.ttcn Mutex.ttcn General_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn " FILES+="PFCP_CodecPort.ttcn PFCP_CodecPort_CtrlFunct.ttcn PFCP_CodecPort_CtrlFunctDef.cc PFCP_Emulation.ttcn PFCP_Templates.ttcn " FILES+="S1AP_CodecPort.ttcn S1AP_CodecPort_CtrlFunctDef.cc S1AP_CodecPort_CtrlFunct.ttcn " FILES+="SCTP_Templates.ttcn " -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38213?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I9e2eb25a7ae78ff623b94802d881af4894d0cacd Gerrit-Change-Number: 38213 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: s1gw: add f_ConnHdlrList_done()
by fixeria 19 Sep '24

19 Sep '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38214?usp=email ) Change subject: s1gw: add f_ConnHdlrList_done() ...................................................................... s1gw: add f_ConnHdlrList_done() Change-Id: I20c472dd8ce7f5a25c349cc079bd5bd873be2950 --- M s1gw/S1GW_Tests.ttcn 1 file changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/14/38214/1 diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index d32a477..2e1437d 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -179,6 +179,14 @@ return vc_conn; } +/* wait for all ConnHdlr in the given list to be .done() */ +function f_ConnHdlrList_done(in ConnHdlrList vc_conns) +runs on test_CT { + for (var integer i := 0; i < lengthof(vc_conns); i := i + 1) { + vc_conns[i].done; + } +} + function f_TC_setup(charstring id) runs on ConnHdlr { f_ConnHdlr_s1ap_register(g_pars.genb_id); @@ -234,9 +242,7 @@ vc_conns[i] := f_ConnHdlr_spawn(refers(f_TC_setup_multi), pars); } - for (var integer i := 0; i < mp_multi_enb_num; i := i + 1) { - vc_conns[i].done; - } + f_ConnHdlrList_done(vc_conns); } @@ -308,9 +314,7 @@ vc_conns[i] := f_ConnHdlr_spawn(refers(f_TC_e_rab_setup), pars); } - for (var integer i := 0; i < num_enbs; i := i + 1) { - vc_conns[i].done; - } + f_ConnHdlrList_done(vc_conns); } /* 1 E-RAB at a time, single eNB */ testcase TC_e_rab_setup() runs on test_CT { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38214?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I20c472dd8ce7f5a25c349cc079bd5bd873be2950 Gerrit-Change-Number: 38214 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in pysim[master]: requirements: require at least construct version 2.10.70
by laforge 19 Sep '24

19 Sep '24
Attention is currently required from: dexter. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38198?usp=email ) Change subject: requirements: require at least construct version 2.10.70 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38198?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: If59dc708a7194649d1f42c4cf33f6328edcb80d2 Gerrit-Change-Number: 38198 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Thu, 19 Sep 2024 18:09:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in pysim[master]: pySim-shell: improve command "desc"
by laforge 19 Sep '24

19 Sep '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38194?usp=email ) Change subject: pySim-shell: improve command "desc" ...................................................................... pySim-shell: improve command "desc" The "desc" command displays a string with a file description, let's also display some size information as part of the description as well. Related: OS#5714 Change-Id: I98e139ba2bf35df5524245cdd96f5c52cf09b986 --- M pySim-shell.py M pySim/runtime.py 2 files changed, 28 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim-shell.py b/pySim-shell.py index 7db77f0..d3f0d87 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -56,7 +56,7 @@ from pySim.utils import sanitize_pin_adm, tabulate_str_list, boxed_heading_str, dec_iccid, sw_match from pySim.card_handler import CardHandler, CardHandlerAuto -from pySim.filesystem import CardMF, CardEF, CardDF, CardADF +from pySim.filesystem import CardMF, CardEF, CardDF, CardADF, LinFixedEF, TransparentEF, BerTlvEF from pySim.ts_102_221 import pin_names from pySim.ts_102_222 import Ts102222Commands from pySim.gsm_r import DF_EIRENE @@ -766,9 +766,28 @@ """Display human readable file description for the currently selected file""" desc = self._cmd.lchan.selected_file.desc if desc: - self._cmd.poutput(desc) + self._cmd.poutput("%s: %s" % (self._cmd.lchan.selected_file, desc)) else: - self._cmd.poutput("no description available") + self._cmd.poutput("%s: no description available" % self._cmd.lchan.selected_file) + self._cmd.poutput(" file structure: %s" % self._cmd.lchan.selected_file_structure()) + if isinstance(self._cmd.lchan.selected_file, LinFixedEF): + self._cmd.poutput(" record length:") + self._cmd.poutput(" minimum_length: %s" % str(self._cmd.lchan.selected_file.rec_len[0])) + self._cmd.poutput(" recommended_length: %s" % str(self._cmd.lchan.selected_file.rec_len[1])) + self._cmd.poutput(" actual_length: %s" % str(self._cmd.lchan.selected_file_record_len())) + self._cmd.poutput(" number of records: %s" % str(self._cmd.lchan.selected_file_num_of_rec())) + elif isinstance(self._cmd.lchan.selected_file, TransparentEF): + self._cmd.poutput(" file size:") + self._cmd.poutput(" minimum_size: %s" % str(self._cmd.lchan.selected_file.size[0])) + self._cmd.poutput(" recommended_size: %s" % str(self._cmd.lchan.selected_file.size[1])) + self._cmd.poutput(" actual_size: %s" % str(self._cmd.lchan.selected_file_size())) + elif isinstance(self._cmd.lchan.selected_file, BerTlvEF): + self._cmd.poutput(" file size:") + self._cmd.poutput(" minimum_size: %s" % str(self._cmd.lchan.selected_file.size[0])) + self._cmd.poutput(" recommended_size: %s" % str(self._cmd.lchan.selected_file.size[1])) + self._cmd.poutput(" actual_size: %s" % str(self._cmd.lchan.selected_file_size())) + self._cmd.poutput(" reserved_file_size: %s" % str(self._cmd.lchan.selected_file_reserved_file_size())) + self._cmd.poutput(" maximum_file_size: %s" % str(self._cmd.lchan.selected_file_maximum_file_size())) verify_adm_parser = argparse.ArgumentParser() verify_adm_parser.add_argument('--pin-is-hex', action='store_true', diff --git a/pySim/runtime.py b/pySim/runtime.py index 898008e..3714832 100644 --- a/pySim/runtime.py +++ b/pySim/runtime.py @@ -217,6 +217,12 @@ def selected_file_size(self) -> Optional[int]: return self.selected_file_fcp.get('file_size') + def selected_file_reserved_file_size(self) -> Optional[int]: + return self.selected_file_fcp['proprietary_information'].get('reserved_file_size') + + def selected_file_maximum_file_size(self) -> Optional[int]: + return self.selected_file_fcp['proprietary_information'].get('maximum_file_size') + def get_cwd(self) -> CardDF: """Obtain the current working directory. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38194?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I98e139ba2bf35df5524245cdd96f5c52cf09b986 Gerrit-Change-Number: 38194 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • ...
  • 199
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.