neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30925 )

Change subject: upf: tweak f_ruleset_add_GTP_decaps
......................................................................

upf: tweak f_ruleset_add_GTP_decaps

Improve function doc.

Always use F-TEID = CHOOSE.

Related: SYS#6192 SYS#5599
Change-Id: Ic88075001c1a7c3bd724ff8d618cef1dbd7423b7
---
M upf/UPF_Tests.ttcn
1 file changed, 6 insertions(+), 5 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/upf/UPF_Tests.ttcn b/upf/UPF_Tests.ttcn
index 8382943..796dc16 100644
--- a/upf/UPF_Tests.ttcn
+++ b/upf/UPF_Tests.ttcn
@@ -505,9 +505,10 @@
        Create_FAR_list far
 };

-/* Add to r a rule set that does GTP decapsulation (half of 
encapsulation/decapsulation) */
-private function f_ruleset_add_GTP_decaps(inout PFCP_Ruleset r,
-                                         template F_TEID local_f_teid := omit) 
{
+/* Add to r a rule set that does GTP decapsulation (half of 
encapsulation/decapsulation):
+ * Receive GTP on src_iface = ACCESS by a local F-TEID to be chosen by 
osmo-upf.
+ * Dispatch GTP payload as plain IP on dest_iface = CORE. */
+private function f_ruleset_add_GTP_decaps(inout PFCP_Ruleset r) {
        var integer pdr_id := lengthof(r.pdr) + 1;
        var integer far_id := lengthof(r.far) + 1;

@@ -517,7 +518,7 @@
                        pdr_id,
                        ts_PFCP_PDI(
                                ACCESS,
-                               local_F_TEID := local_f_teid),
+                               local_F_TEID := ts_PFCP_F_TEID_choose_v4()),
                        ts_PFCP_Outer_Header_Removal(GTP_U_UDP_IPV4),
                        far_id
                        )
@@ -633,7 +634,7 @@
 private function f_ruleset_tunend(GTP_Action gtp) return PFCP_Ruleset
 {
        var PFCP_Ruleset rules := { {}, {} };
-       f_ruleset_add_GTP_decaps(rules, ts_PFCP_F_TEID_choose_v4());
+       f_ruleset_add_GTP_decaps(rules);
        f_ruleset_add_GTP_encaps(rules, gtp.core_ip, gtp.teid_access_r, 
gtp.gtp_access_ip);
        return rules;
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30925
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: Ic88075001c1a7c3bd724ff8d618cef1dbd7423b7
Gerrit-Change-Number: 30925
Gerrit-PatchSet: 2
Gerrit-Owner: neels <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: neels <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to