pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38673?usp=email )
Change subject: hnbgw: Parametrize UPF F-SEID
......................................................................
hnbgw: Parametrize UPF F-SEID
This is needed if we want to support several concurrent PFCP sessions.
Change-Id: I8c32998c839f75ed93de639e48d08e1458a8032c
---
M hnbgw/ConnHdlr.ttcn
M hnbgw/HNBGW_Tests.ttcn
2 files changed, 10 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/73/38673/1
diff --git a/hnbgw/ConnHdlr.ttcn b/hnbgw/ConnHdlr.ttcn
index f6bde48..9205599 100644
--- a/hnbgw/ConnHdlr.ttcn
+++ b/hnbgw/ConnHdlr.ttcn
@@ -195,23 +195,23 @@
}
const OCT8 c_SEID0 := '0000000000000000'O;
-const OCT8 c_SEID1 := '1111111111111111'O;
type record PfcpParameters {
/* whether we expect HNBGW to manage a UPF through PFCP: */
boolean pfcp_enabled,
charstring pfcp_local_addr,
Node_ID upf_node_id,
- F_SEID up_f_seid,
+ F_SEID upf_f_seid,
F_SEID hnbgw_f_seid optional
}
template (value) PfcpParameters t_PfcpParams(boolean pfcp_enabled := false,
charstring pfcp_local_addr := "127.0.0.1",
- charstring pfcp_upf_node_id := "\07osmocom\03org") := {
+ charstring pfcp_upf_node_id := "\07osmocom\03org",
+ uint64_t upf_f_seid := 1) := {
pfcp_enabled := pfcp_enabled,
pfcp_local_addr := pfcp_local_addr,
upf_node_id := valueof(ts_PFCP_Node_ID_fqdn(pfcp_upf_node_id)),
- up_f_seid := ts_PFCP_F_SEID_ipv4(f_inet_addr(pfcp_local_addr), c_SEID1),
+ upf_f_seid := ts_PFCP_F_SEID_ipv4(f_inet_addr(pfcp_local_addr), int2oct(upf_f_seid,
8)),
hnbgw_f_seid := omit
}
@@ -551,10 +551,10 @@
}
if (pfcp_teardown) {
var PDU_PFCP m;
- m := f_pfcp_expect(tr_PFCP_Session_Del_Req(g_pars.pfcp_pars.up_f_seid.seid));
+ m := f_pfcp_expect(tr_PFCP_Session_Del_Req(g_pars.pfcp_pars.upf_f_seid.seid));
PFCP.send(ts_PFCP_Session_Del_Resp(m.sequence_number,
g_pars.pfcp_pars.hnbgw_f_seid.seid));
/* ask PFCPEM to *not* route PDUs with this specific SEID to us */
- f_PFCPEM_unsubscribe_seid(c_SEID1);
+ f_PFCPEM_unsubscribe_seid(g_pars.pfcp_pars.upf_f_seid.seid);
}
tx := valueof(ts_RANAP_IuReleaseComplete());
@@ -787,7 +787,7 @@
/* Expect PFCP Session Establishment Request. */
m := f_pfcp_expect(tr_PFCP_Session_Est_Req());
/* Ask PFCPEM to route PDUs with to be indicated F-SEID to us. */
- f_PFCPEM_subscribe_seid(c_SEID1);
+ f_PFCPEM_subscribe_seid(g_pars.pfcp_pars.upf_f_seid.seid);
/* We no longer expect to receive PFCP Session Establishment Request PDU(s). */
f_PFCPEM_unsubscribe_seid(c_SEID0);
@@ -808,7 +808,7 @@
var template PDU_PFCP r := ts_PFCP_Session_Est_Resp(seq_nr := m.sequence_number,
node_id := g_pars.pfcp_pars.upf_node_id,
seid := g_pars.pfcp_pars.hnbgw_f_seid.seid,
- f_seid := g_pars.pfcp_pars.up_f_seid,
+ f_seid := g_pars.pfcp_pars.upf_f_seid,
created_pdr := {pdr1, pdr2});
PFCP.send(r);
@@ -832,7 +832,7 @@
tx := valueof(ts_RANAP_RabAssResp(rab_smdl));
RUA.send(tx);
- m := f_pfcp_expect(tr_PFCP_Session_Mod_Req(g_pars.pfcp_pars.up_f_seid.seid));
+ m := f_pfcp_expect(tr_PFCP_Session_Mod_Req(g_pars.pfcp_pars.upf_f_seid.seid));
r := ts_PFCP_Session_Mod_Resp(m.sequence_number, g_pars.pfcp_pars.hnbgw_f_seid.seid);
PFCP.send(r);
diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index e15bba4..97ae334 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -1449,7 +1449,7 @@
/* HNBGW tears down related PFCP sessions: */
if (g_pars.pfcp_pars.pfcp_enabled) {
- var PDU_PFCP m :=
f_pfcp_expect(tr_PFCP_Session_Del_Req(g_pars.pfcp_pars.up_f_seid.seid));
+ var PDU_PFCP m :=
f_pfcp_expect(tr_PFCP_Session_Del_Req(g_pars.pfcp_pars.upf_f_seid.seid));
PFCP.send(ts_PFCP_Session_Del_Resp(m.sequence_number,
g_pars.pfcp_pars.hnbgw_f_seid.seid));
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38673?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: I8c32998c839f75ed93de639e48d08e1458a8032c
Gerrit-Change-Number: 38673
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>