Attention is currently required from: fixeria.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/libosmocore/+/39540?usp=email )
Change subject: gsmtap: fix outdated header version in comment
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39540?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iee4cbd5f8699ed7da28a0f9ac5856b435e76b86a
Gerrit-Change-Number: 39540
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: Thu, 13 Feb 2025 14:09:58 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
fixeria has submitted this change. ( 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(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
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: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I93d3d38829b1f425d18d59464894da239e3511eb
Gerrit-Change-Number: 39539
Gerrit-PatchSet: 2
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>
Attention is currently required from: fixeria.
osmith has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39539?usp=email )
Change subject: s1gw: f_ConnHdlr_session_delete(): respect any order
......................................................................
Patch Set 1: Code-Review+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: comment
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>
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: Thu, 13 Feb 2025 10:47:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/39540?usp=email )
Change subject: gsmtap: fix outdated header version in comment
......................................................................
gsmtap: fix outdated header version in comment
Change-Id: Iee4cbd5f8699ed7da28a0f9ac5856b435e76b86a
---
M include/osmocom/core/gsmtap.h
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/40/39540/1
diff --git a/include/osmocom/core/gsmtap.h b/include/osmocom/core/gsmtap.h
index ebb5296..d153efc 100644
--- a/include/osmocom/core/gsmtap.h
+++ b/include/osmocom/core/gsmtap.h
@@ -303,7 +303,7 @@
/* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
/*! Structure of the GSMTAP pseudo-header */
struct gsmtap_hdr {
- uint8_t version; /*!< version, set to 0x01 currently */
+ uint8_t version; /*!< version, set to GSMTAP_VERSION */
uint8_t hdr_len; /*!< length in number of 32bit words */
uint8_t type; /*!< see GSMTAP_TYPE_* */
uint8_t timeslot; /*!< timeslot (0..7 on Um) */
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39540?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iee4cbd5f8699ed7da28a0f9ac5856b435e76b86a
Gerrit-Change-Number: 39540
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>