Attention is currently required from: pespin.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39523?usp=email )
Change subject: erab_fsm: make erab_release_{cmd,ind}/1 non-blocking
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39523?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: If519334359c3ef331720cb87bdba2d969601816e
Gerrit-Change-Number: 39523
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 12 Feb 2025 21:56:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39539?usp=email )
Change subject: s1gw: f_ConnHdlr_session_delete(): respect any order
......................................................................
s1gw: f_ConnHdlr_session_delete(): respect any order
It's not guranteed (nor required) that PFCP Session Deletion Request
PDUs are sent in the same order as their respective ERab records are
organized in the given ERabList. They can be emitted in any order.
Make f_ConnHdlr_session_delete() more flexible:
* Expect to receive N PFCP Session Deletion Request PDUs;
* For each received PFCP PDU, find the matching E-RAB;
* Make sure that an E-RAB is never released twice;
* Send PFCP Session Deletion Response.
This patch fixes the following TCs:
* TC_ue_ctx_release_req3
* TC_ue_ctx_release_cmd_compl3
Change-Id: I93d3d38829b1f425d18d59464894da239e3511eb
Related: 75cb01b7 ("s1gw: add TCs for UE CONTEXT RELEASE procedures")
Related: SYS#7310
---
M s1gw/S1GW_ConnHdlr.ttcn
1 file changed, 34 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/39/39539/1
diff --git a/s1gw/S1GW_ConnHdlr.ttcn b/s1gw/S1GW_ConnHdlr.ttcn
index be9f9d7..3f79e47 100644
--- a/s1gw/S1GW_ConnHdlr.ttcn
+++ b/s1gw/S1GW_ConnHdlr.ttcn
@@ -302,6 +302,20 @@
private const LIN4_BO_LAST c_PFCP_FAR_ID_C2A := 1; /* Core -> Access */
private const LIN4_BO_LAST c_PFCP_FAR_ID_A2C := 2; /* Access -> Core */
+/* look-up an E-RAB in the given list by SEID of the received PFCP PDU */
+private function f_ERabList_find_by_pdu(in ERabList erabs, in PDU_PFCP rsp)
+return integer {
+ for (var integer i := 0; i < lengthof(erabs); i := i + 1) {
+ if (erabs[i].pfcp_loc_seid == rsp.seid) {
+ return i;
+ }
+ }
+
+ setverdict(fail, __SCOPE__, "(): no matching E-RAB found");
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+ return -1; /* make compiler happy */
+}
+
function f_ConnHdlr_tx_erab_setup_req(in ERabList erabs)
runs on ConnHdlr {
var template (value) E_RABToBeSetupListBearerSUReq items;
@@ -747,15 +761,27 @@
function f_ConnHdlr_session_delete(inout ERabList erabs)
runs on ConnHdlr {
- for (var integer i := 0; i < lengthof(erabs); i := i + 1) {
- log("UPF <- S1GW: PFCP Session Deletion Request for E-RAB ID ", erabs[i].erab_id);
- 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);
+ var integer pending_erabs := lengthof(erabs);
+
+ while (pending_erabs > 0) {
+ var PDU_PFCP pdu := f_ConnHdlr_pfcp_expect(tr_PFCP_Session_Del_Req);
+ var integer idx := f_ERabList_find_by_pdu(erabs, pdu);
+
+ log("UPF <- S1GW: PFCP Session Deletion Request for E-RAB ID ", erabs[idx].erab_id);
+ /* make sure that an E-RAB is never released twice */
+ if (not ispresent(erabs[idx].pfcp_rem_seid)) {
+ setverdict(fail, __SCOPE__, "(): PFCP Session Deletion Request ",
+ "was not expected for E-RAB ID ", erabs[idx].erab_id);
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+ }
+ log("UPF -> S1GW: PFCP Session Deletion Response for E-RAB ID ", erabs[idx].erab_id);
+ f_ConnHdlr_tx_session_delete_resp(erabs[idx], pdu);
+ /* ask PFCPEM to *not* route PDUs with the local SEID to us */
+ f_PFCPEM_unsubscribe_seid(erabs[idx].pfcp_loc_seid);
/* peer's SEID is no longer valid, invalidate it */
- erabs[i].pfcp_rem_seid := omit;
+ erabs[idx].pfcp_rem_seid := omit;
+
+ pending_erabs := pending_erabs - 1;
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39539?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: I93d3d38829b1f425d18d59464894da239e3511eb
Gerrit-Change-Number: 39539
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: pespin.
kirr has posted comments on this change by kirr. ( https://gerrit.osmocom.org/c/osmocom-bb/+/39536?usp=email )
Change subject: trx_toolkit/*: Represent bursts as arrays instead of lists
......................................................................
Patch Set 1:
(4 comments)
Commit Message:
https://gerrit.osmocom.org/c/osmocom-bb/+/39536/comment/af32cb51_b0f67ed2?u… :
PS1, Line 13: item as just byte, and by leveraging bytearray.translate, we can sped
> sped -> speed up?
Acknowledged
File src/target/trx_toolkit/data_msg.py:
https://gerrit.osmocom.org/c/osmocom-bb/+/39536/comment/33f4f7e5_cd3c26ed?u… :
PS1, Line 71: self.burst = burst # bytes|bytearray for ubit, array[b] for sbit, array[B] for usbit
> I don't really understand what you mean with this comment here.
this comment says that the type of self.burst is either bytes or bytearray for unpacked bits, array with typecode='b' for signed soft-bits, and array with typecode='B' for unsigned soft-bits.
https://gerrit.osmocom.org/c/osmocom-bb/+/39536/comment/01dd689b_59d3136d?u… :
PS1, Line 134: def usbit2sbit(bits): # array[B] -> array[b]
> sou one cannot declare a param type for an array as done previously by List?
seems no: https://stackoverflow.com/questions/69200339/type-hinting-an-array . But I do not use typehints with python beside the very basic cases, so might be missing something.
https://gerrit.osmocom.org/c/osmocom-bb/+/39536/comment/aa05eca1_50812634?u… :
PS1, Line 672: burst = array('B', burst)
> I wonder whether we'll probably want to have all this encapsulated into eg. SBits, UBits, etc. […]
Maybe. My primary goal for now was/is to study the system, so I did not pushed hard with optimizing/refactoring things.
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/39536?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7314e9e79752e06fa86b9e346a9beacc5e59579e
Gerrit-Change-Number: 39536
Gerrit-PatchSet: 1
Gerrit-Owner: kirr <kirr(a)nexedi.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 12 Feb 2025 21:43:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
kirr has posted comments on this change by kirr. ( https://gerrit.osmocom.org/c/osmocom-bb/+/39533?usp=email )
Change subject: trx_toolkit/transceiver: Do not forward nor log from under tx_queue_lock
......................................................................
Patch Set 1:
(1 comment)
File src/target/trx_toolkit/transceiver.py:
https://gerrit.osmocom.org/c/osmocom-bb/+/39533/comment/921b8be5_d1f374e6?u… :
PS1, Line 322: self._tx_queue = [msg for msg in self._tx_queue if msg.fn > fn]
> Done
Thanks for feedback. Indeed I did the change, including what you suggest, initially as a whole, and later splitted it to patches that each do one logical step.
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/39533?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7d10c972c45b2b5765e7c3a28f8646508b3c8a82
Gerrit-Change-Number: 39533
Gerrit-PatchSet: 1
Gerrit-Owner: kirr <kirr(a)nexedi.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 12 Feb 2025 21:25:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39524?usp=email )
Change subject: erab_fsm: handle RELEASE.{cmd,ind} in state erab_wait_setup_rsp
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39524?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I91a010f304456c1593ef257051a912f0fe8ae2a1
Gerrit-Change-Number: 39524
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 12 Feb 2025 19:39:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39524?usp=email )
Change subject: erab_fsm: handle RELEASE.{cmd,ind} in state erab_wait_setup_rsp
......................................................................
Patch Set 1:
(1 comment)
File src/erab_fsm.erl:
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39524/comment/7d6ab708_c19b… :
PS1, Line 266: {next_state, session_delete,
> imho this may be wrong. You probably need to wait first for create resolution
The PFCP session has already been created at this state, it's just not modified yet. In other words, we have received E-RAB SETUP.req from the core network, created a PFCP session, and forwarded modified F-TEID to the eNB. But we haven't heard from the eNB yet.
As we have seen in the field, it may happen that the core network orders E-RAB SETUP, and then releases the UE CONTEXT before the eNB response with E-RAB SETUP.rsp. This patch helps to tear the FSMs down properly in such case.
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39524?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I91a010f304456c1593ef257051a912f0fe8ae2a1
Gerrit-Change-Number: 39524
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 12 Feb 2025 18:43:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>